ÿþv a r   p a u s e   =   f a l s e ;  
 v a r   c o n _ n u m   =   4 ;  
 v a r   s t a r t I n d e x   =   1 ;  
  
 f u n c t i o n   s e t L o o p ( )  
 {  
         t r y  
         {  
                 v a r   o S c r o l l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' b a n n e r ' ) ;  
                 o S c r o l l . n o W r a p   =   t r u e ;  
                 o S c r o l l . o n m o u s e o v e r   =   f u n c t i o n ( e ) { p a u s e   =   t r u e ; } ;  
                 o S c r o l l . o n m o u s e o u t   =   f u n c t i o n ( e ) { p a u s e   =   f a l s e ; } ;  
                 s e t I n t e r v a l ( ' s c r o l l T o p H o m e ( ) ' ,   2 0 0 0 ) ;  
         }  
         c a t c h ( e ) { a l e r t ( e . t o S t r i n g ( ) ) ; }  
 }  
  
 f u n c t i o n   s c r o l l T o p H o m e ( ) {  
         i f ( p a u s e )   r e t u r n ;  
         s t a r t I n d e x   + =   1 ;  
         i f ( s t a r t I n d e x   >   c o n _ n u m ) {   s t a r t I n d e x   =   1 ; }  
         s e t T a b ( ' t o p h o m e ' , 4 , s t a r t I n d e x , ' o u t ' , ' o n ' ) ;  
 }  
    
 f u n c t i o n   s e t T a b ( / * s t r i n g * / n a m e , / * i n t * /   i t e m C n t , / * i n t * /   c u r I t e m ,   / * * / c l a s s H i d e ,   / * * / c l a s s S h o w )  
 {  
         f o r ( i = 1 ; i < = i t e m C n t ; i + + )  
         {  
 	         e v a l ( " d o c u m e n t . g e t E l e m e n t B y I d ( ' t a b _ "   +   n a m e   +   " _ "   +   i   +   " ' ) . c l a s s N a m e = ' "   +   c l a s s H i d e   +   " ' " ) ;  
         }    
         e v a l ( " d o c u m e n t . g e t E l e m e n t B y I d ( ' t a b _ "   +   n a m e   +   " _ "   +   c u r I t e m   +   " ' ) . c l a s s N a m e = ' "   +   c l a s s S h o w   +   " ' " ) ;  
    
           f o r ( i = 1 ; i < = i t e m C n t ; i + + )  
           {  
             e v a l ( " e l e _ h i d e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c o n _ "   +   n a m e   +   " _ "   +   i   + " ' ) " ) ;  
             i f ( e l e _ h i d e )   e l e _ h i d e . s t y l e . d i s p l a y   =   " n o n e " ;  
           }  
           e v a l ( " e l e _ p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c o n _ "   +   n a m e   +   " _ "   +   c u r I t e m   +   " ' ) " ) ;  
           i f ( e l e _ p l a y )   e l e _ p l a y . s t y l e . d i s p l a y   =   " b l o c k " ;  
 } 
