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