ÿþ	 	 v a r   p r e l o a d e d   =   [ ] ;  
  
 	 	 / /   h e r e   i s   a   l a m e   p r e l o a d i n g   s c r i p t   i   a m   p u t t i n g   i n   j u s t   f o r   d e m o n s t r a t i o n  
 	 	 f o r   ( v a r   i   =   1 ;   i   < =   8 ;   i + + )   {  
 	 	 	 p r e l o a d e d [ i ]   =   [ l o a d I m a g e ( i   +   " - 0 . g i f " ) ,   l o a d I m a g e ( i   +   " - 1 . g i f " ) ] ;  
 	 	 }  
  
 	 	 f u n c t i o n   i n i t ( )   {  
 	 	 	 / /   w h a t e v e r   s t u f f   y o u   n e e d   t o   d o   o n l o a d   g o e s   h e r e .  
  
 	 	 	 / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 	 	 	 / /   i f   s u p p o r t e d ,   i n i t i a l i z e   m t d r o p d o w n s  
 	 	 	 / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 	 	 	 / /   C h e c k   i s S u p p o r t e d ( )   s o   t h a t   m e n u s   a r e n ' t   a c c i d e n t a l l y   s e n t   t o   n o n - s u p p o r t i n g   b r o w s e r s .  
 	 	 	 / /   T h i s   i s   b e t t e r   t h a n   s e r v e r - s i d e   c h e c k i n g   b e c a u s e   i t   w i l l   a l s o   c a t c h   b r o w s e r s   w h i c h   w o u l d  
 	 	 	 / /   n o r m a l l y   s u p p o r t   t h e   m e n u s   b u t   h a v e   j a v a s c r i p t   d i s a b l e d .  
 	 	 	 / /  
 	 	 	 / /   I f   s u p p o r t e d ,   c a l l   i n i t i a l i z e ( )   a n d   t h e n   h o o k   w h a t e v e r   i m a g e   r o l l o v e r   c o d e   y o u   n e e d   t o   d o  
 	 	 	 / /   t o   t h e   . o n a c t i v a t e   a n d   . o n d e a c t i v a t e   e v e n t s   f o r   e a c h   m e n u .  
 	 	 	 / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 	 	 	 i f   ( m t D r o p D o w n . i s S u p p o r t e d ( ) )   {  
 	 	 	 	 m t D r o p D o w n . i n i t i a l i z e ( ) ;  
  
 	 	 	 	 / /   h o o k   a l l   t h e   i m a g e   s w a p p i n g   o f   t h e   m a i n   t o o l b a r   t o   m e n u   a c t i v a t i o n / d e a c t i v a t i o n  
 	 	 	 	 / /   i n s t e a d   o f   s i m p l e   r o l l o v e r   t o   g e t   t h e   e f f e c t   w h e r e   t h e   b u t t o n   s t a y s   h i g h t l i t   u n t i l  
 	 	 	 	 / /   t h e   m e n u   i s   c l o s e d .  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 1 " ,   p r e l o a d e d [ 1 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 1 " ,   p r e l o a d e d [ 1 ] [ 1 ] . s r c )   } ;  
  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 2 " ,   p r e l o a d e d [ 2 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 2 " ,   p r e l o a d e d [ 2 ] [ 1 ] . s r c )   } ;  
  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 3 " ,   p r e l o a d e d [ 3 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 3 " ,   p r e l o a d e d [ 3 ] [ 1 ] . s r c )   } ;  
  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 4 " ,   p r e l o a d e d [ 4 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 4 " ,   p r e l o a d e d [ 4 ] [ 1 ] . s r c )   } ;  
  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 5 " ,   p r e l o a d e d [ 5 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 5 " ,   p r e l o a d e d [ 5 ] [ 1 ] . s r c )   } ;  
 	 	 	 	  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 6 " ,   p r e l o a d e d [ 6 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 6 " ,   p r e l o a d e d [ 6 ] [ 1 ] . s r c )   } ;  
 	 	 	 	  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 7 " ,   p r e l o a d e d [ 7 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 7 " ,   p r e l o a d e d [ 7 ] [ 1 ] . s r c )   } ;  
 	 	 	 	  
 	 	 	 	 / / m e n u 1 . o n a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 8 " ,   p r e l o a d e d [ 8 ] [ 1 ] . s r c )   } ;  
 	 	 	 	 / / m e n u 1 . o n d e a c t i v a t e   =   f u n c t i o n ( )   {   s w a p I m a g e ( " b u t t o n 8 " ,   p r e l o a d e d [ 8 ] [ 1 ] . s r c )   } ;  
 	 	 	 	  
 	 	 	 }  
 	 	 }  
  
 	 	 / /   t h i s   i s   a   c r a p p y   e x a m p l e   p r e l o a d e r .   U s e   w h i c h e v e r   o n e   y o u   w a n t .  
 	 	 f u n c t i o n   l o a d I m a g e ( s F i l e n a m e )   {  
 	 	 	 v a r   i m g   =   n e w   I m a g e ( ) ;  
 	 	 	 i m g . s r c   = " i m a g e s / "   +   s F i l e n a m e ;  
 	 	 	 r e t u r n   i m g ;  
 	 	 }  
  
 	 	 / /   t h i s   i s   a   c r a p p y   e x a m p l e   i m a g e   s w a p p e r .   U s e   w h i c h e v e r   y o u   w a n t .  
 	 	 f u n c t i o n   s w a p I m a g e ( i m g N a m e ,   s F i l e n a m e )   {  
 	 	 d o c u m e n t . i m a g e s [ i m g N a m e ] . s r c   =   s F i l e n a m e ;  
 	 	 } 
