ÿþ< ! - -  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *        
 N e w s S l i d e F a d e    
 *       C o p y r i g h t   ( C )   2 0 0 1   T h o m a s   B r a t t l i  
 *       T h i s   s c r i p t   w a s   r e l e a s e d   a t   D H T M L C e n t r a l . c o m  
 *       V i s i t   f o r   m o r e   g r e a t   s c r i p t s !  
 *       T h i s   m a y   b e   u s e d   a n d   c h a n g e d   f r e e l y   a s   l o n g   a s   t h i s   m s g   i s   i n t a c t !  
 *       W e   w i l l   a l s o   a p p r e c i a t e   a n y   l i n k s   y o u   c o u l d   g i v e   u s .  
 *  
 *       M a d e   b y   T h o m a s   B r a t t l i  
 *  
 *       S c r i p t   d a t e :   0 9 / 0 4 / 2 0 0 1   ( k e e p   t h i s   d a t e   t o   c h e c k   v e r s i o n s )    
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   l i b _ b w c h e c k ( ) {   / / B r o w s e r c h e c k   ( n e e d e d )  
 	 t h i s . v e r = n a v i g a t o r . a p p V e r s i o n  
 	 t h i s . a g e n t = n a v i g a t o r . u s e r A g e n t  
 	 t h i s . d o m = d o c u m e n t . g e t E l e m e n t B y I d ? 1 : 0  
 	 t h i s . o p e r a 5 = ( n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " O p e r a " ) > - 1   & &   d o c u m e n t . g e t E l e m e n t B y I d ) ? 1 : 0  
 	 t h i s . i e 5 = ( t h i s . v e r . i n d e x O f ( " M S I E   5 " ) > - 1   & &   t h i s . d o m   & &   ! t h i s . o p e r a 5 ) ? 1 : 0 ;    
 	 t h i s . i e 6 = ( t h i s . v e r . i n d e x O f ( " M S I E   6 " ) > - 1   & &   t h i s . d o m   & &   ! t h i s . o p e r a 5 ) ? 1 : 0 ;  
 	 t h i s . i e 4 = ( d o c u m e n t . a l l   & &   ! t h i s . d o m   & &   ! t h i s . o p e r a 5 ) ? 1 : 0 ;  
 	 t h i s . i e = t h i s . i e 4 | | t h i s . i e 5 | | t h i s . i e 6  
 	 t h i s . m a c = t h i s . a g e n t . i n d e x O f ( " M a c " ) > - 1  
 	 t h i s . n s 6 = ( t h i s . d o m   & &   p a r s e I n t ( t h i s . v e r )   > =   5 )   ? 1 : 0 ;    
 	 t h i s . n s 4 = ( d o c u m e n t . l a y e r s   & &   ! t h i s . d o m ) ? 1 : 0 ;  
 	 t h i s . b w = ( t h i s . i e 6   | |   t h i s . i e 5   | |   t h i s . i e 4   | |   t h i s . n s 4   | |   t h i s . n s 6   | |   t h i s . o p e r a 5 )  
 	 r e t u r n   t h i s  
 }  
 v a r   b w = l i b _ b w c h e c k ( )  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
 U s e   t h e   s t y l e   t a g   t o   c h a n g e   t h e   p l a c e m e n t   a n d   w i d t h   o f   t h e   l a y e r s .  
 I f   y o u   a r e   t r y i n g   t o   p l a c e   t h i s   i n t o   a   t a b l e   c e l l   o r   s o m e t h i n g   m a k e   t h e  
 p o s i t i o n   o f   t h e   d i v N e w s C o n t   l a y e r   r e l a t i v e . . . R e m e b e r   t h a t   t h a t   m i g h t   c r a s h  
 N e t s c a p e   4   t h o u g h ,   G o o d   l u c k !  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
  
 / * * * *  
 V a r i a b l e s   t o   s e t    
 * * * * /  
  
 / / H o w   d o   y o u   w a n t   t h e   s c r i p t   t o   w o r k ?    
 / / 0   =   F a d e   i n   -   F a d e   o u t  
 / / 1   =   S l i d e   i n   -   F a d e   o u t  
 / / 2   =   R a n d o m    
 n W o r k s   =   1  
  
 / / I f   y o u   u s e   t h e   s l i d e   s e t   t h e s e   v a r i a b l e s :  
 n S l i d e s p e e d   =   5   / / i n   p x  
 n N e w s h e i g h t   =   8 0   / / T h i s   i s   h o w   l o n g   d o w n   i t   s h o u l d   s t a r t   t h e   s l i d e .  
  
 n B e t w e e n d e l a y   =   2 0 0 0   / / T h e   d e l a y   b e f o r e   f a d i n g   o u t .  
 n F o n t   =   ' a r i a l , h e l v e t i v a '   / / T h e   f o n t   f o r   t h e   n e w s .  
 n F o n t s i z e   =   1 6   / / F o n t   s i z e   i n   p i x e l .  
 n F a d e s p e e d   =   1 0 0   / / T h e   s p e e d   t o   f a d e   i n ,   i n   m i l l i s e c o n d s .  
  
 / / S e t   t h e   c o l o r s ,   f i r s t   c o l o r   i s   s a m e   a s   b a c k g r o u n d ,   l a s t   c o l o r   i s   t h e   c o l o r   i t   s t o p s   a t :  
 / / Y o u   c a n   h a v e   a s   m a n y   c o l o r s   y o u   w a n t  
 n C o l o r = n e w   A r r a y ( ' # d d d d d d ' ,   ' # 9 9 9 9 9 9 ' , ' # 6 6 6 6 6 6 ' , ' # 3 3 3 3 3 3 ' ,   ' # 0 0 0 0 0 0 ' ,   ' # 3 1 6 9 b e ' )  
  
 / / T h i s   i s   t h e   n e w s   y o u   w a n n a   h a v e ,   s e t   t h e   l i n k   a n d   t h e   t e x t .   I f   y o u   d o n ' t   w a n ' t   i t   t o   l i n k   a n y w h e r e  
 / / u s e   a   #   a s   t h e   l i n k  
 n N e w s = n e w   A r r a y ( )  
 / / C o p y   t h e r e   t h r e e   l i n e s   a n d   c h a n g e   t h e   i n f o   a n d   n u m b e r s   t o   g e t   m o r e   n e w s .  
 n N e w s [ 0 ] = n e w   A r r a y ( )  
 n N e w s [ 0 ] [ " t e x t " ] = " < b > k o n t a k t < / b >       -       N i e d e r l a s s u n g   < b > A n s b a c h < / b > "  
 n N e w s [ 0 ] [ " l i n k " ] = " h t t p : / / w w w . a n d r e a - b u r g h a r t - z e i t a r b e i t . d e / h t m l / a n / k o n t a k t _ a n . h t m "  
  
 n N e w s [ 1 ] = n e w   A r r a y ( )  
 n N e w s [ 1 ] [ " t e x t " ] = " < b > k o n t a k t < / b >       -       N i e d e r l a s s u n g   < b > C r a i l s h e i m < / b > "  
 n N e w s [ 1 ] [ " l i n k " ] = " h t t p : / / w w w . a n d r e a - b u r g h a r t - z e i t a r b e i t . d e / h t m l / a n / k o n t a k t _ c r . h t m "  
  
 n N e w s [ 2 ] = n e w   A r r a y ( )  
 n N e w s [ 2 ] [ " t e x t " ] = " < b > k o n t a k t < / b >       -       N i e d e r l a s s u n g   < b > N ü r n b e r g < / b > "  
 n N e w s [ 2 ] [ " l i n k " ] = " h t t p : / / w w w . a n d r e a - b u r g h a r t - z e i t a r b e i t . d e / h t m l / a n / k o n t a k t _ n b g . h t m "  
  
 n N e w s [ 3 ] = n e w   A r r a y ( )  
 n N e w s [ 3 ] [ " t e x t " ] = " < b > k o n t a k t < / b >       -       N i e d e r l a s s u n g   < b > W e i ß e n b u r g < / b > "  
 n N e w s [ 3 ] [ " l i n k " ] = " h t t p : / / w w w . a n d r e a - b u r g h a r t - z e i t a r b e i t . d e / h t m l / a n / k o n t a k t _ w u g . h t m "  
  
 / * n N e w s [ 4 ] = n e w   A r r a y ( )  
 n N e w s [ 4 ] [ " t e x t " ] = " < b > . . .   w i r   f r e u e n   u n s   a u f   I h r e n   A n r u f ! < / b > "  
 n N e w s [ 4 ] [ " l i n k " ] = " # "  
  
 n N e w s [ 5 ] = n e w   A r r a y ( )  
 n N e w s [ 5 ] [ " t e x t " ] = " < b > a < / b >   n d r e a "  
 n N e w s [ 5 ] [ " l i n k " ] = " # "  
  
 n N e w s [ 6 ] = n e w   A r r a y ( )  
 n N e w s [ 6 ] [ " t e x t " ] = " < b > b < / b >   u r g h a r t "  
 n N e w s [ 6 ] [ " l i n k " ] = " # "  
  
 n N e w s [ 7 ] = n e w   A r r a y ( )  
 n N e w s [ 7 ] [ " t e x t " ] = " < b > z < / b >   e i t a r b e i t "  
 n N e w s [ 7 ] [ " l i n k " ] = " # " * /  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
 O b j e c t   c o d e . . . O b j e c t   c o n s t r u c t o r s   a n d   f u n c t i o n s . . .  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   m a k e N e w s O b j ( o b j , n e s t , f o n t , s i z e , c o l o r , n e w s , f a d e s p e e d , b e t w e e n d e l a y , s l i d e s p e e d , w o r k s , n e w s h e i g h t ) {  
         n e s t = ( ! n e s t )   ?   " " : ' d o c u m e n t . ' + n e s t + ' . '  
       	 t h i s . c s s = b w . d o m ?   d o c u m e n t . g e t E l e m e n t B y I d ( o b j ) . s t y l e : b w . i e 4 ? d o c u m e n t . a l l [ o b j ] . s t y l e : b w . n s 4 ? e v a l ( n e s t + " d o c u m e n t . l a y e r s . "   + o b j ) : 0 ; 	  
       	 t h i s . w r i t e r e f = b w . d o m ?   d o c u m e n t . g e t E l e m e n t B y I d ( o b j ) : b w . i e 4 ? d o c u m e n t . a l l [ o b j ] : b w . n s 4 ? e v a l ( n e s t + " d o c u m e n t . l a y e r s . "   + o b j + " . d o c u m e n t " ) : 0 ;  
 	 i f ( f o n t ) { t h i s . c o l o r = n e w   A r r a y ( ) ;   t h i s . c o l o r = e v a l ( c o l o r ) ;   t h i s . n e w s = n e w   A r r a y ( ) ;   t h i s . n e w s = e v a l ( n e w s )  
 	 	 t h i s . f o n t = f o n t ;   t h i s . s i z e = s i z e ;   t h i s . s p e e d = f a d e s p e e d ;   t h i s . d e l a y = b e t w e e n d e l a y ;   t h i s . n e w s h e i g h t = n e w s h e i g h t ;  
 	 	 t h i s . f a d e I n = b _ f a d e I n ; t h i s . f a d e O u t = b _ f a d e O u t ;   t h i s . n e w s W r i t e = b _ n e w s W r i t e ;   t h i s . y = 1  
 	 	 t h i s . s l i d e I n = b _ s l i d e I n ;   t h i s . m o v e I t = b _ m o v e I t ;   t h i s . s l i d e S p e e d = s l i d e s p e e d ;   t h i s . w o r k s = w o r k s  
 	 	 i f ( b w . d o m   | |   b w . i e 4 ) { t h i s . c s s . f o n t F a m i l y = t h i s . f o n t ;   t h i s . c s s . f o n t S i z e = t h i s . s i z e ;   t h i s . c s s . c o l o r = t h i s . c o l o r [ 0 ] }  
 	 }  
 	 t h i s . o b j   =   o b j   +   " O b j e c t " ;   	 e v a l ( t h i s . o b j   +   " = t h i s " ) ;   r e t u r n   t h i s  
 }  
  
 / /   A   u n i t   o f   m e a s u r e   t h a t   w i l l   b e   a d d e d   w h e n   s e t t i n g   t h e   p o s i t i o n   o f   a   l a y e r .  
 v a r   p x   =   b w . n s 4 | | w i n d o w . o p e r a ? " " : " p x " ;  
  
 f u n c t i o n   b _ m o v e I t ( x , y ) { t h i s . x = x ;   t h i s . y = y ;   t h i s . c s s . l e f t = t h i s . x + p x ;   t h i s . c s s . t o p = t h i s . y + p x ; }  
  
 f u n c t i o n   b _ n e w s W r i t e ( n u m , i ) {  
 	 i f   ( b w . n s 4 ) {  
 	 	 t h i s . w r i t e r e f . w r i t e ( " < a   h r e f = \ " " + t h i s . n e w s [ n u m ] [ ' l i n k ' ] + " \ "   t a r g e t = \ " m y T a r g e t \ "   s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ;   f o n t - s i z e : " + t h i s . s i z e + " p x \ " > "  
 	 	 	 + " < f o n t   f a c e = \ " " + t h i s . f o n t + " \ "   c o l o r = \ " " + t h i s . c o l o r [ i ] + " \ " > " + t h i s . n e w s [ n u m ] [ ' t e x t ' ] + " < / f o n t > < / a > " )  
 	 	 t h i s . w r i t e r e f . c l o s e ( )  
 	 } e l s e   t h i s . w r i t e r e f . i n n e r H T M L   =   ' < a   i d = " ' + t h i s . o b j + ' l i n k '   + ' "   t a r g e t = " _ s e l f "     s t y l e = " t e x t - d e c o r a t i o n : n o n e ;   f o n t - s i z e : ' + t h i s . s i z e + ' p x ;   c o l o r : ' + t h i s . c o l o r [ i ] + ' "   h r e f = " ' + t h i s . n e w s [ n u m ] [ ' l i n k ' ] + ' " > ' + t h i s . n e w s [ n u m ] [ ' t e x t ' ] + ' < / a > '  
 }  
 / / S l i d e   i n  
 f u n c t i o n   b _ s l i d e I n ( n u m , i ) {  
 	 i f   ( t h i s . y > 0 ) {  
 	 	 i f   ( i = = 0 ) { t h i s . m o v e I t ( 0 , t h i s . n e w s h e i g h t ) ;   t h i s . n e w s W r i t e ( n u m , t h i s . c o l o r . l e n g t h - 1 ) }  
 	 	 t h i s . m o v e I t ( t h i s . x , t h i s . y - t h i s . s l i d e S p e e d )  
 	 	 i   + +  
 	 	 s e t T i m e o u t ( t h i s . o b j + " . s l i d e I n ( " + n u m + " , " + i + " ) ; " , 5 0 )  
 	 } e l s e   s e t T i m e o u t ( t h i s . o b j + " . f a d e O u t ( " + n u m + " , " + ( t h i s . c o l o r . l e n g t h - 1 ) + " ) " , t h i s . d e l a y )  
 }  
 / / T h e   f a d e   f u n c t i o n s  
 f u n c t i o n   b _ f a d e I n ( n u m , i ) {  
 	 i f   ( i < t h i s . c o l o r . l e n g t h ) {  
 	 	 i f   ( i = = 0   | |   b w . n s 4 )   t h i s . n e w s W r i t e ( n u m , i )  
 	 	 e l s e {  
 	 	 	 o b j   =   b w . i e 4 ? e v a l ( t h i s . o b j + " l i n k " ) : d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . o b j + " l i n k " )  
 	 	 	 o b j . s t y l e . c o l o r   =   t h i s . c o l o r [ i ]  
 	 	 }  
 	 	 i   + +  
 	 	 s e t T i m e o u t ( t h i s . o b j + " . f a d e I n ( " + n u m + " , " + i + " ) " , t h i s . s p e e d )  
 	 } e l s e   s e t T i m e o u t ( t h i s . o b j + " . f a d e O u t ( " + n u m + " , " + ( t h i s . c o l o r . l e n g t h - 1 ) + " ) " , t h i s . d e l a y )  
 }  
  
 f u n c t i o n   b _ f a d e O u t ( n u m , i ) {  
 	 i f   ( i > = 0 ) {  
 	 	 i f   ( i = = 0   | |   b w . n s 4 )   t h i s . n e w s W r i t e ( n u m , i ) 	  
 	 	 e l s e {  
 	 	 	 o b j   =   b w . i e 4 ? e v a l ( t h i s . o b j + " l i n k " ) : d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . o b j + " l i n k " )  
 	 	 	 o b j . s t y l e . c o l o r   =   t h i s . c o l o r [ i ]  
 	 	 }  
 	 	 i   - -  
 	 	 s e t T i m e o u t ( t h i s . o b j + " . f a d e O u t ( " + n u m + " , " + i + " ) " , t h i s . s p e e d )  
 	 } e l s e {  
 	 	 n u m   + +  
 	 	 i f ( n u m = = t h i s . n e w s . l e n g t h )   n u m = 0  
 	 	 w o r k s   =   ! t h i s . w o r k s ? 0 : t h i s . w o r k s = = 1 ? 1 : M a t h . r o u n d ( M a t h . r a n d o m ( ) )  
 	 	 i f ( w o r k s = = 0 )   s e t T i m e o u t ( t h i s . o b j + " . f a d e I n ( " + n u m + " , 0 ) " , 5 0 0 )  
 	 	 e l s e   i f   ( w o r k s = = 1 ) { t h i s . y = 1 ;   s e t T i m e o u t ( t h i s . o b j + " . s l i d e I n ( " + n u m + " , 0 ) " , 5 0 0 )  
 	 	 }  
 	 }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
 T h e   i n i t   f u n c t i o n .   C a l l s   t h e   o b j e c t   c o n s t r u c t o r   a n d   s e t   s o m e   p r o p e r t i e s   a n d   s t a r t s   t h e   f a d e  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   f a d e I n i t ( ) {  
 	 o N e w s   =   n e w   m a k e N e w s O b j ( ' d i v N e w s ' , ' d i v N e w s C o n t ' , n F o n t , n F o n t s i z e , " n C o l o r " , " n N e w s " , n F a d e s p e e d , n B e t w e e n d e l a y , n S l i d e s p e e d , n W o r k s , n N e w s h e i g h t )  
 	 o N e w s C o n t   =   n e w   m a k e N e w s O b j ( ' d i v N e w s C o n t ' )  
 	 w o r k s   =   ! o N e w s . w o r k s ? 0 : o N e w s . w o r k s = = 1 ? 1 : M a t h . r o u n d ( M a t h . r a n d o m ( ) )  
 	 i f   ( w o r k s = = 0 )   o N e w s . f a d e I n ( 0 , 0 )  
 	 e l s e   i f   ( w o r k s = = 1 )   o N e w s . s l i d e I n ( 0 , 0 )  
 	 o N e w s C o n t . c s s . v i s i b i l i t y   =   " v i s i b l e "  
 }  
  
 / / C a l l s   t h e   i n i t   f u n c t i o n   o n   p a g e l o a d .    
 i f ( b w . b w )   o n l o a d   =   f a d e I n i t  
 - - >  
 
