ÿþf u n c t i o n   s m a r t R o l l o v e r ( )   { 
 
 	 i f ( d o c u m e n t . g e t E l e m e n t s B y T a g N a m e )   { 
 
 	 	 v a r   i m a g e s   =   d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " i m g " ) ; 
 
 
 
 	 	 f o r ( v a r   i = 0 ;   i   <   i m a g e s . l e n g t h ;   i + + )   { 
 
 	 	 	 i f ( i m a g e s [ i ] . g e t A t t r i b u t e ( " s r c " ) . m a t c h ( " _ o f f . " ) ) 
 
 	 	 	 { 
 
 	 	 	 	 i m a g e s [ i ] . o n m o u s e o v e r   =   f u n c t i o n ( )   { 
 
 	 	 	 	 	 t h i s . s e t A t t r i b u t e ( " s r c " ,   t h i s . g e t A t t r i b u t e ( " s r c " ) . r e p l a c e ( " _ o f f . " ,   " _ o n . " ) ) ; 
 
 	 	 	 	 } 
 
 	 	 	 	 i m a g e s [ i ] . o n m o u s e o u t   =   f u n c t i o n ( )   { 
 
 	 	 	 	 	 t h i s . s e t A t t r i b u t e ( " s r c " ,   t h i s . g e t A t t r i b u t e ( " s r c " ) . r e p l a c e ( " _ o n . " ,   " _ o f f . " ) ) ; 
 
 	 	 	 	 } 
 
 	 	 	 } 
 
 	 	 } 
 
 	 } 
 
 } 
 
 
 
 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 " ,   s m a r t R o l l o v e r ,   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 " ,   s m a r t R o l l o v e r ) ; 
 
 } 
