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