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