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