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