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