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