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