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