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