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