ÿþ/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - d o m - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   u i P r e v ( i n p u t )   {  
         w h i l e   ( i n p u t )   {  
                 i n p u t   =   i n p u t . p r e v i o u s S i b l i n g ;  
                 i f   ( i n p u t   & &   i n p u t . n o d e N a m e   ! =   ' # t e x t ' )  
                         r e t u r n   i n p u t ;  
         }  
 }  
 f u n c t i o n   u i N u l l O r E m p t y ( v a l u e )   {  
         r e t u r n   ( v a l u e = = n u l l   | |   v a l u e = = ' ' ) ;  
 }  
 f u n c t i o n   u i N e x t ( i n p u t )   {  
         w h i l e   ( i n p u t )   {  
                 i n p u t   =   i n p u t . n e x t S i b l i n g ;  
                 i f   ( i n p u t   & &   i n p u t . n o d e N a m e   ! =   ' # t e x t ' )  
                         r e t u r n   i n p u t ;  
         }  
 }  
 f u n c t i o n   u i N e x t B y A t t r i b u t e ( i n p u t , a t t r i b u t e _ n a m e , a t t r i b u t e _ v a l u e )   {  
         w h i l e   ( i n p u t )   {  
                 i n p u t   =   i n p u t . n e x t S i b l i n g ;  
                 i f   ( i n p u t   & &   i n p u t . n o d e N a m e   ! =   ' # t e x t '   & &   i n p u t . g e t A t t r i b u t e ( a t t r i b u t e _ n a m e )   = =   a t t r i b u t e _ v a l u e )  
                         r e t u r n   i n p u t ;  
         }  
 }  
 f u n c t i o n   u i P r e v B y A t t r i b u t e ( i n p u t , a t t r i b u t e _ n a m e , a t t r i b u t e _ v a l u e )   {  
         w h i l e   ( i n p u t )   {  
                 i n p u t   =   i n p u t . p r e v i o u s S i b l i n g ;  
                 i f   ( i n p u t   & &   i n p u t . n o d e N a m e   ! =   ' # t e x t '   & &   i n p u t . g e t A t t r i b u t e ( a t t r i b u t e _ n a m e )   = =   a t t r i b u t e _ v a l u e )  
                         r e t u r n   i n p u t ;  
         }  
 }  
 f u n c t i o n   u i P a r e n t ( i n p u t )   {  
         i f   ( i n p u t )    
                 r e t u r n   i n p u t . p a r e n t N o d e ;  
 }  
 f u n c t i o n   u i P a r e n t B y A t t r i b u t e ( i n p u t , a t t r i b u t e _ n a m e , a t t r i b u t e _ v a l u e )   {  
           w h i l e   ( i n p u t   & &   i n p u t ! = d o c u m e n t )   {  
                 i f   ( i n p u t   & &   i n p u t . g e t A t t r i b u t e ( a t t r i b u t e _ n a m e )   = =   a t t r i b u t e _ v a l u e )  
                         r e t u r n   i n p u t ;  
                 i n p u t   =   i n p u t . p a r e n t N o d e ;  
         }  
 }  
 f u n c t i o n   u i S u b P a r e n t B y A t t r i b u t e ( i n p u t , a t t r i b u t e _ n a m e )  
 {  
   w h i l e   ( i n p u t   & &   i n p u t ! = d o c u m e n t )   {  
                 i f   ( i n p u t   & &   i n p u t . g e t A t t r i b u t e ( a t t r i b u t e _ n a m e ) )  
                         r e t u r n   i n p u t ;  
                 i n p u t   =   i n p u t . p a r e n t N o d e ;  
         }  
  
 }  
 f u n c t i o n   u i C h i l r e n ( p a r e n t )   {  
         v a r   c h i l r e n   =   [ ] ;  
         i f   ( p a r e n t )   {  
                 v a r   p o s i b b l e _ c h i l r e n   =   p a r e n t . c h i l d N o d e s ;  
                 v a r   l e n   =   p o s i b b l e _ c h i l r e n . l e n g t h ;  
                 f o r   ( v a r   i   =   0 ;   i   <   l e n ;   i + + )  
                         i f   ( p o s i b b l e _ c h i l r e n [ i ] . n o d e N a m e   ! =   ' # t e x t ' )  
                         c h i l r e n . p u s h ( p o s i b b l e _ c h i l r e n [ i ] ) ;  
         }  
         r e t u r n   c h i l r e n ;  
 }  
  
 f u n c t i o n   u i C h i l r e n B y A t t r i b u t e ( p a r e n t , c h i l d r e n _ t a g , a t t r i b u t e _ n a m e , a t t r i b u t e _ v a l u e )   {  
         v a r   c h i l r e n   =   [ ] ;  
         i f   ( p a r e n t )   {  
                 v a r   t a g s = c h i l d r e n _ t a g . s p l i t ( ' , ' ) ;  
                 f o r   ( v a r   a   =   0 ;   a   <   t a g s . l e n g t h ;   a + + )   {  
                         v a r   p o s i b b l e _ c h i l r e n   =   p a r e n t . g e t E l e m e n t s B y T a g N a m e ( t a g s [ a ] ) ;  
                         v a r   l e n   =   p o s i b b l e _ c h i l r e n . l e n g t h ;  
                         f o r   ( v a r   i   =   0 ;   i   <   l e n ;   i + + )   {  
                                 i f   ( ! a t t r i b u t e _ n a m e )  
                                         c h i l r e n . p u s h ( p o s i b b l e _ c h i l r e n [ i ] ) ;  
                                 e l s e   i f   ( a t t r i b u t e _ v a l u e   = =   n u l l )   {  
                                         i f   ( p o s i b b l e _ c h i l r e n [ i ] . g e t A t t r i b u t e ( a t t r i b u t e _ n a m e )   ! =   n u l l )  
                                                 c h i l r e n . p u s h ( p o s i b b l e _ c h i l r e n [ i ] ) ;  
                                 }   e l s e   {  
                                           i f   ( p o s i b b l e _ c h i l r e n [ i ] . g e t A t t r i b u t e ( a t t r i b u t e _ n a m e )   = =   a t t r i b u t e _ v a l u e )  
                                                 c h i l r e n . p u s h ( p o s i b b l e _ c h i l r e n [ i ] ) ;  
                               }  
                                  
                             }  
                 }  
         }  
         r e t u r n   c h i l r e n ;  
 }  
  
 f u n c t i o n   c h e c k W i n d o w S i z e ( n e e d T o S h o w )  
   {  
       v a r   w   =   ( d o c u m e n t . b o d y . o f f s e t W i d t h   -   8 9 5 ) / 2 ;  
         i f   ( w   < =   1 3 0 )    
                 $ ( ' o z e n ' ) . s t y l e . d i s p l a y   =   " n o n e " ;    
         e l s e  
                 $ ( ' o z e n ' ) . s t y l e . d i s p l a y   =   ' i n l i n e ' ;      
   }  
    
 f u n c t i o n   $ ( i d )   {  
         r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ;  
 }  
 f u n c t i o n   u i R a d i o S e l e c t e d ( p a r e n t _ i d )   {  
         v a r   o p t i o n s = $ ( p a r e n t _ i d ) . g e t E l e m e n t s B y T a g N a m e ( ' i n p u t ' ) ;  
 	 v a r   s e l e c t e d ;  
 	 f o r   ( v a r   i = 0 ;   i < o p t i o n s . l e n g t h ;   i + + )  
 	 	 i f   ( o p t i o n s [ i ] . c h e c k e d )  
 	 	 	 r e t u r n   o p t i o n s [ i ] ;  
 	 r e t u r n   n u l l ;  
 }  
 f u n c t i o n   u i E v e n t E l e m e n t ( e v )  
 {  
         e v   =   u i E v e n t ( e v ) ;  
         i f   ( ! e v )  
                 r e t u r n   n u l l ;  
                  
         r e t u r n   e v . s r c E l e m e n t   | |   e v . t a r g e t ;  
 }  
 f u n c t i o n   u i E v e n t ( e v )  
 {  
         e v   =   e v   | |   w i n d o w . e v e n t ;  
         r e t u r n   e v ;  
 }  
 	 	 	 	 	 	  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - p o s i t i o n s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 f u n c t i o n   u i M o u s e O f f s e t ( t a r g e t ,   e v )   {  
         e v   =   u i E v e n t ( e v ) ;  
  
         v a r   d o c P o s   =   u i G e t P o s i t i o n ( t a r g e t ) ;  
         v a r   m o u s e P o s   =   u i M o u s e C o o r d s ( e v ) ;  
         r e t u r n   {   x :   m o u s e P o s . x   -   d o c P o s . x ,   y :   m o u s e P o s . y   -   d o c P o s . y   } ;  
 }  
  
 f u n c t i o n   u i G e t P o s i t i o n ( e )   {  
         v a r   l e f t   =   0 ;  
         v a r   t o p   =   0 ;  
         w h i l e   ( e )   {  
                 l e f t   + =   e . o f f s e t L e f t ;  
                 t o p   + =   e . o f f s e t T o p ;  
                 e   =   e . o f f s e t P a r e n t ;  
         }  
         r e t u r n   {   x :   l e f t ,   y :   t o p   } ;  
 }  
  
 f u n c t i o n   u i G e t A b s P o s i t i o n ( e l )   {  
         v a r   l e f t   =   0 ;   / / d o c u m e n t . b o d y . s c r o l l L e f t   -   d o c u m e n t . b o d y . c l i e n t L e f t ;  
         v a r   t o p   =   0 ;   / / d o c u m e n t . b o d y . s c r o l l T o p   -   d o c u m e n t . b o d y . c l i e n t T o p ;  
         i f   ( e l )   {  
                 i f   ( d o c u m e n t . g e t B o x O b j e c t F o r )   {  
                         v a r   b o   =   d o c u m e n t . g e t B o x O b j e c t F o r ( e l ) ;  
                         l e f t   =   b o . x ;  
                         t o p   =   b o . y ;  
                 }  
                 e l s e   i f   ( e l . g e t B o u n d i n g C l i e n t R e c t )   {  
                 v a r   r e c t   =   e l . g e t B o u n d i n g C l i e n t R e c t ( ) ;  
                         l e f t   =   r e c t . l e f t ;  
                         t o p   =   r e c t . t o p ;  
                 }  
                 e l s e   {  
                         w h i l e   ( e l )   {  
                                 l e f t   + =   e l . o f f s e t L e f t ;  
                                 t o p   + =   e l . o f f s e t T o p ;  
                                 e l   =   e l . o f f s e t P a r e n t ;  
                         }  
  
                 }  
         }  
                  
         r e t u r n   {  
                 x :   l e f t ,   y :   t o p  
         } ;  
 }  
 f u n c t i o n   u i M o u s e C o o r d s ( e v )   {  
         i f   ( e v . p a g e X   | |   e v . p a g e Y )   {  
                 r e t u r n   {   x :   e v . p a g e X ,   y :   e v . p a g e Y   } ;  
         }  
         r e t u r n   {  
                 x :   e v . c l i e n t X   +   d o c u m e n t . b o d y . s c r o l l L e f t   -   d o c u m e n t . b o d y . c l i e n t L e f t ,  
                 y :   e v . c l i e n t Y   +   d o c u m e n t . b o d y . s c r o l l T o p   -   d o c u m e n t . b o d y . c l i e n t T o p  
         } ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - d r a g   a n d   d r o p - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 v a r   u i D r a g g e d E l e m e n t   =   n u l l ;  
 v a r   u i D r o p T a r g e t s   =   n u l l ;  
  
 f u n c t i o n   u i S t a r t D r a g ( i t e m ,   e v )   {  
  
                                  
         i f   ( ! e v   | |   ! i t e m )  
                 r e t u r n ;  
         u i D r a g g e d E l e m e n t   =   u i P a r e n t ( u i P a r e n t ( i t e m ) ) ;  
         u i D r a g g e d E l e m e n t . s t a r t e d = 0 ;  
         u i D r a g g e d E l e m e n t . s e p e r a t o r   =   u i N e x t B y A t t r i b u t e ( u i D r a g g e d E l e m e n t ,   ' u i ' ,   ' b o x _ s e p ' ) ;  
  
  
         i f   ( ! u i D r o p T a r g e t s )   {  
                 v a r   p a r e n t _ c o l u m n   =   u i P a r e n t B y A t t r i b u t e ( u i D r a g g e d E l e m e n t ,   ' u i ' ,   ' c o l u m n s ' ) ;  
                 u i D r o p T a r g e t s   =   u i C h i l r e n B y A t t r i b u t e ( p a r e n t _ c o l u m n ,   ' d i v ' ,   ' u i ' ,   ' b o x _ s e p ' ) ;  
         }  
         / / d r o p   T a r g e t s  
         i f   ( ! u i D r a g g e d E l e m e n t . d r o p T a r g e t s )  
         {  
                 v a r   c o l   =   ' s ' ;  
                 i f   ( ( p a r s e I n t ( u i D r a g g e d E l e m e n t . g e t A t t r i b u t e ( ' t a b s _ c o u n t ' ) ) > 2 )   | |  
                         ( u i D r a g g e d E l e m e n t . g e t A t t r i b u t e ( ' i d ' )   = =   ' b o x _ m o u s e ' ) )  
                         c o l   =   ' ' ;  
                 v a r   p a r e n t _ c o l u m n   =   u i P a r e n t B y A t t r i b u t e ( u i D r a g g e d E l e m e n t ,   ' u i ' ,   ' c o l u m n '   +   c o l ) ;  
  
                 i f   ( c o l   = =   ' s ' )   {  
                         u i D r a g g e d E l e m e n t . d r o p T a r g e t s   =   u i D r o p T a r g e t s ;  
                 }   e l s e   {  
                         u i D r a g g e d E l e m e n t . d r o p T a r g e t s   =   n e w   A r r a y ( ) ;  
                         v a r   p o s s i b l e T a r g e t s   =   u i C h i l r e n ( p a r e n t _ c o l u m n ) ;  
                         v a r   l e n   =   p o s s i b l e T a r g e t s . l e n g t h ;  
                         f o r   ( v a r   i   =   0 ;   i   <   l e n ;   i + + )   {  
                                 i f   ( p o s s i b l e T a r g e t s [ i ] . g e t A t t r i b u t e ( ' u i ' )   = =   ' b o x _ s e p ' )  
                                         u i D r a g g e d E l e m e n t . d r o p T a r g e t s . p u s h ( p o s s i b l e T a r g e t s [ i ] ) ;  
                         }  
                 }  
         }  
         / / c o l o r   d r o p   z o n e s  
         v a r   l e n   =   u i D r a g g e d E l e m e n t . d r o p T a r g e t s . l e n g t h ;  
         f o r   ( v a r   i   =   0 ;   i   <   l e n ;   i + + )   {  
                 v a r   d r o p T a r g e t   =   u i D r a g g e d E l e m e n t . d r o p T a r g e t s [ i ] ;  
                 / / d r o p T a r g e t . l a s t _ c l a s s N a m e   =   d r o p T a r g e t . c l a s s N a m e ;  
                 d r o p T a r g e t . c l a s s N a m e   =   ' s e p e r a t o r _ d r o p a b l e ' ;  
         }  
          
         / / g e t   m o u s e   O f f s e t  
         u i D r a g g e d E l e m e n t . m o u s e O f f s e t   =   u i M o u s e O f f s e t ( u i D r a g g e d E l e m e n t ,   e v ) ;  
         / / s e t   d o c u m e n t   o n   m o u s e   e v e n t s  
         d o c u m e n t . o n m o u s e m o v e   =   u i D r a g ;  
         d o c u m e n t . o n m o u s e u p   =   u i D r o p ;  
         r e t u r n   f a l s e ;  
 }  
 f u n c t i o n   u i D r a g ( e v )   {  
         i f   ( u i D r a g g e d E l e m e n t )   {  
                 e v   =   u i E v e n t ( e v ) ;  
                 v a r   m o u s e P o s   =   u i M o u s e C o o r d s ( e v ) ;  
                 i f   ( ! u i D r a g g e d E l e m e n t . s t a r t e d )   {  
                         u i D r a g g e d E l e m e n t . s e p e r a t o r . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                         u i D r a g g e d E l e m e n t . s t y l e . b o r d e r   =   ' s o l i d   1 p x   # 6 6 9 9 F F ' ;  
                         i f   ( u i B r o w s e r = = ' f i r e f o x 2 '   | |   u i B r o w s e r = = ' e x p l o r e r ' )  
                                 u i D r a g g e d E l e m e n t . s t y l e . w i d t h   =   ( u i D r a g g e d E l e m e n t . o f f s e t W i d t h ) + ' p x ' ;  
                         u i D r a g g e d E l e m e n t . s t y l e . m a x W i d t h = ' 3 5 6 p x ' ;          
                         u i D r a g g e d E l e m e n t . s t y l e . p o s i t i o n   =   ' a b s o l u t e ' ;  
                         u i D r a g g e d E l e m e n t . s t a r t e d   =   1 ;  
                 }  
                 v a r   m a i n C o n t e n t S c r o l l = ( u i B r o w s e r = = ' e x p l o r e r '   ?   0   : $ ( ' m a i n C o n t e n t ' ) . s c r o l l T o p ) ;  
                  
                 u i D r a g g e d E l e m e n t . s t y l e . t o p   =   ( m o u s e P o s . y   - m a i n C o n t e n t S c r o l l -   u i D r a g g e d E l e m e n t . m o u s e O f f s e t . y   )   +   ' p x ' ;  
                 u i D r a g g e d E l e m e n t . s t y l e . l e f t   =   ( m o u s e P o s . x   -   u i D r a g g e d E l e m e n t . m o u s e O f f s e t . x   -   ( u i B r o w s e r = = ' e x p l o r e r ' ? d o c u m e n t . b o d y . s c r o l l L e f t : 0 )   )   +   ' p x ' ;  
  
                 i f   ( u i D r a g g e d E l e m e n t . c u r T a r g e t )   {  
                         u i D r a g g e d E l e m e n t . c u r T a r g e t . s t y l e . b a c k g r o u n d C o l o r   =   ' ' ;    
                         u i D r a g g e d E l e m e n t . c u r T a r g e t   =   n u l l ;  
                 }  
                 i f   ( u i B r o w s e r = = ' e x p l o r e r ' )  
                         m o u s e P o s . y   - =   d o c u m e n t . b o d y . s c r o l l T o p   -   d o c u m e n t . b o d y . c l i e n t T o p ;  
                          
                 f o r   ( v a r   i   =   0 ;   i   <   u i D r a g g e d E l e m e n t . d r o p T a r g e t s . l e n g t h ;   i + + )   {  
                         v a r   c u r T a r g e t   =   u i D r a g g e d E l e m e n t . d r o p T a r g e t s [ i ] ;  
                         v a r   t a r g P o s   =   u i G e t A b s P o s i t i o n ( c u r T a r g e t ) ;  
                         v a r   t a r g W i d t h   =   p a r s e I n t ( c u r T a r g e t . o f f s e t W i d t h ) ;  
                         v a r   t a r g H e i g h t   =   p a r s e I n t ( c u r T a r g e t . o f f s e t H e i g h t ) ;  
  
                         i f   ( ( m o u s e P o s . x   >   t a r g P o s . x - 1 0 0 )  
                                 & &   ( m o u s e P o s . x   <   ( t a r g P o s . x   +   t a r g W i d t h + 1 0 0 ) )  
                                 & &   ( m o u s e P o s . y   >   t a r g P o s . y - m a i n C o n t e n t S c r o l l   -   5 0 )  
                                 & &   ( m o u s e P o s . y   <   ( t a r g P o s . y - m a i n C o n t e n t S c r o l l +   t a r g H e i g h t ) + 5 0 ) )   {  
                                 c u r T a r g e t . s t y l e . b a c k g r o u n d C o l o r   =   ' # 6 6 9 9 F F ' ;  
                                 u i D r a g g e d E l e m e n t . c u r T a r g e t   =   c u r T a r g e t ;  
                                 b r e a k ;  
                         }  
                 }  
  
                 r e t u r n   f a l s e ;  
         }  
 }  
  
 f u n c t i o n   u i D r o p ( )   {  
 v a r   f l a g = f a l s e ;  
         / / r e s t o r e   d r o p   z o n e s   c o l o r  
         i f   ( u i D r o p T a r g e t s )   {  
                 v a r   l e n   =   u i D r o p T a r g e t s . l e n g t h ;  
                 f o r   ( v a r   i   =   0 ;   i   <   l e n ;   i + + )   {  
                         u i D r o p T a r g e t s [ i ] . c l a s s N a m e   =   ' s e p e r a t o r ' ;  
                 }  
         }  
      
         i f   ( u i D r a g g e d E l e m e n t )   {  
          
                 i f   ( u i D r a g g e d E l e m e n t . c u r T a r g e t )   {  
                 f l a g = u i R e g e n e r a t e B o x ( u i D r a g g e d E l e m e n t ) ;  
                         u i D r a g g e d E l e m e n t . c u r T a r g e t . p a r e n t N o d e . i n s e r t B e f o r e ( u i D r a g g e d E l e m e n t . s e p e r a t o r ,   u i D r a g g e d E l e m e n t . c u r T a r g e t ) ;  
                         u i D r a g g e d E l e m e n t . c u r T a r g e t . p a r e n t N o d e . i n s e r t B e f o r e ( u i D r a g g e d E l e m e n t ,   u i D r a g g e d E l e m e n t . c u r T a r g e t ) ;  
                         u i D r a g g e d E l e m e n t . c u r T a r g e t . s t y l e . b a c k g r o u n d C o l o r   =   ' ' ;  
                         / *  
                         v a r   o r d e r _ a r r   =   u i O r d e r C u r r . s p l i t ( ' , ' ) ;  
                         f o r   ( v a r   i = 0 ;   i < o r d e r _ a r r . l e n g t h ;   i + + )  
                         {  
                                 i f   ( o r d e r _ a r r [ i ]   = =   u i D r a g g e d E l e m e n t . s e p e r a t o r . i d )  
                                         o r d e r _ a r r [ i ] = u i D r a g g e d E l e m e n t . c u r T a r g e t . i d ;  
                                 e l s e   i f   ( o r d e r _ a r r [ i ]   = =   u i D r a g g e d E l e m e n t . c u r T a r g e t . i d )  
                                         o r d e r _ a r r [ i ] = u i D r a g g e d E l e m e n t . s e p e r a t o r . i d ;  
                         }          
                         v a r   u i O r d e r C u r r 2 = u i O r d e r C u r r ;  
                         u i O r d e r C u r r = o r d e r _ a r r . j o i n ( ' , ' ) ;  
                         * /  
                         v a r   o r d e r = u i G e t C o o k i e ( ' b o x _ o r d e r ' ) ;  
                         i f   ( ! o r d e r )  
                                 o r d e r = ' ' ;  
                         o r d e r + = ' , '   +   u i D r a g g e d E l e m e n t . s e p e r a t o r . i d   +   ' - '   +   u i D r a g g e d E l e m e n t . c u r T a r g e t . i d ;  
                         u i S e t C o o k i e ( ' b o x _ o r d e r ' , o r d e r , 0 ) ;  
                 }  
  
                 i f   ( ( u i B r o w s e r = = ' f i r e f o x 2 '   | |   u i B r o w s e r = = ' e x p l o r e r ' ) & & ! f l a g )  
                         u i D r a g g e d E l e m e n t . s t y l e . w i d t h   =   ' ' ;  
                 u i D r a g g e d E l e m e n t . s t y l e . p o s i t i o n   =   ' s t a t i c ' ;  
                 v a r   x   =   u i D r a g g e d E l e m e n t ;  
                 w i n d o w . s e t T i m e o u t ( f u n c t i o n ( )   {  
                         x . s t y l e . b o r d e r   =   ' s o l i d   1 p x   # f f f f f f ' ;  
                 } ,   5 0 0 ) ;  
                 u i D r a g g e d E l e m e n t . s e p e r a t o r . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
                 u i D r a g g e d E l e m e n t . s e p e r a t o r . s t y l e . w i d t h   =   ' ' ;  
                   u i R e g e n e r a t e B o x ( u i D r a g g e d E l e m e n t ) ;  
                 u i R e s e t P a g e T i m e o u t ( ) ;  
                 u i D r a g g e d E l e m e n t   =   n u l l ;  
                 d o c u m e n t . o n m o u s e m o v e   =   n u l l ;  
                 d o c u m e n t . o n m o u s e u p   =   n u l l ;  
         }  
 }  
 f u n c t i o n   u i R e g e n e r a t e B o x ( u i D r a g g e d E l e m e n t )  
 { v a r   r e s c h ;   v a r   c o n t ;  
   i f ( u i D r a g g e d E l e m e n t . g e t A t t r i b u t e ( ' r e g b o x ' ) )  
   {  
   u i D r a g g e d E l e m e n t . s e p e r a t o r = $ ( " s e p b o t _ " + u i D r a g g e d E l e m e n t . g e t A t t r i b u t e ( ' r e g b o x ' ) ) ;  
   u i D r a g g e d E l e m e n t . s e p e r a t o r . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
   u i D r a g g e d E l e m e n t . s t y l e . w i d t h = ' 1 0 0 % ' ;  
   u i D r a g g e d E l e m e n t . s t y l e . m a x W i d t h = ' 3 5 8 p x ' ;  
   v a r   s i b l i n g = u i N e x t B y A t t r i b u t e ( u i D r a g g e d E l e m e n t , ' r b ' , ' 1 ' ) ;  
   i f ( ! s i b l i n g ) s e e b l i n g = u i P r e v B y A t t r i b u t e ( u i D r a g g e d E l e m e n t , ' r b ' , ' 1 ' ) ;  
   i f ( s i b l i n g )  
   {  
     v a r   o r d e r = u i G e t C o o k i e ( ' b o x _ o r d e r ' ) ;  
     s i b l i n g . s t y l e . w i d t h = ' 1 0 0 % ' ;  
     s i b l i n g . s e p e r a t o r = $ ( " s e p b o t _ " + s i b l i n g . g e t A t t r i b u t e ( ' r e g b o x ' ) ) ;  
     s i b l i n g . s e p e r a t o r . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
     o r d e r + = ' , '   +   s i b l i n g . s e p e r a t o r . i d   +   ' - '   +   s i b l i n g . s e p e r a t o r . i d ;  
     u i S e t C o o k i e ( ' b o x _ o r d e r ' , o r d e r , 0 ) ;  
     c o n t = u i C h i l r e n B y A t t r i b u t e ( s i b l i n g , ' d i v ' , ' i s _ t a b _ c o n t e n t ' , ' 1 ' ) ;  
       i f ( c o n t & & c o n t [ 0 ] )  
       c o n t [ 0 ] . c l a s s N a m e = ' b o x _ c o n t e n t a d v ' ;  
     r e s c h = u i C h i l r e n B y A t t r i b u t e ( s i b l i n g , ' d i v , s p a n ' , ' r e s ' , ' 1 ' ) ;  
      
 f o r ( v a r   i = 0 ; i < r e s c h . l e n g t h ; i + + )  
 {  
 r e s c h [ i ] . s t y l e . w i d t h = ' 7 5 % ' ;  
 i f ( i = = 0 )  
 r e s c h [ i ] . s t y l e . w i d t h = ' 9 9 % '  
 }  
  
   }  
       c o n t = u i C h i l r e n B y A t t r i b u t e ( u i D r a g g e d E l e m e n t , ' d i v ' , ' i s _ t a b _ c o n t e n t ' , ' 1 ' ) ;  
       i f ( c o n t & & c o n t [ 0 ] )  
       c o n t [ 0 ] . c l a s s N a m e = ' b o x _ c o n t e n t a d v ' ;    
 r e s c h = u i C h i l r e n B y A t t r i b u t e ( u i D r a g g e d E l e m e n t , ' d i v , s p a n ' , ' r e s ' , ' 1 ' ) ;  
 f o r ( v a r   i = 0 ; i < r e s c h . l e n g t h ; i + + )  
 {  
 r e s c h [ i ] . s t y l e . w i d t h = ' 7 5 % ' ;  
 i f ( i = = 0 )  
 r e s c h [ i ] . s t y l e . w i d t h = ' 9 9 % '  
 }  
  
   r e t u r n   t r u e ;  
   }  
   r e t u r n   f a l s e ;  
    
 }  
  
  
 f u n c t i o n   u i L o a d A s y n c ( u r l , b o d y ,   d a t a L o a d e d F u n c t i o n )   {  
         v a r   x m l H t t p   =   ( w i n d o w . X M L H t t p R e q u e s t   ?   n e w   X M L H t t p R e q u e s t ( )   :   n e w   A c t i v e X O b j e c t ( ' M i c r o s o f t . X M L H T T P ' ) ) ;  
         x m l H t t p . o p e n ( ( b o d y ? ' P O S T ' : ' G E T ' ) ,   u r l ,   t r u e ) ;  
         x m l H t t p . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( )   {  
                 i f   ( x m l H t t p . r e a d y S t a t e   = =   4 )   {  
                         v a r   r e s p o n s e   =   x m l H t t p . r e s p o n s e T e x t   | |   ( x m l H t t p . r e s p o n s e X m l   & &   x m l H t t p . r e s p o n s e X m l . x m l ) ;  
                         i f   ( d a t a L o a d e d F u n c t i o n )  
                                 d a t a L o a d e d F u n c t i o n ( ( r e s p o n s e   ?   r e s p o n s e   :   ' ' ) ) ;  
                 }  
         }  
         / /   s e n d  
         x m l H t t p . s e n d ( b o d y ) ;  
 }  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - t a b s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   u i G e t E v e n t T a b ( e v )   {  
         v a r   t a r g e t   =   u i E v e n t E l e m e n t ( e v ) ;  
         i f   ( ! t a r g e t )  
                 r e t u r n   n u l l ;  
         i f   ( ! t a r g e t . g e t A t t r i b u t e ( ' t a b ' ) )  
                 t a r g e t   =   t a r g e t . p a r e n t N o d e ;  
         i f   ( u i N u l l O r E m p t y ( t a r g e t . g e t A t t r i b u t e ( ' t a b ' ) ) )  
                 r e t u r n   n u l l ;  
         r e t u r n   t a r g e t ;  
 }  
 f u n c t i o n   u i T a b O v e r ( e v )   {  
         v a r   t a r g e t   =   u i G e t E v e n t T a b ( e v ) ;  
         i f   ( t a r g e t )  
                 t a r g e t . t i m e r   =   w i n d o w . s e t T i m e o u t ( f u n c t i o n ( )   { u i T a b C l i c k ( n u l l , t a r g e t ) ; } , 4 0 0 ) ;  
 }  
 f u n c t i o n   u i T a b O u t ( e v )   {  
         v a r   t a r g e t   =   u i G e t E v e n t T a b ( e v ) ;  
         i f   ( t a r g e t   & &   t a r g e t . t i m e r )  
                 w i n d o w . c l e a r T i m e o u t ( t a r g e t . t i m e r ) ;  
 }  
 f u n c t i o n   u i T a b C l i c k ( e v , t a r g e t )   {  
          
         i f   ( ! t a r g e t )  
                   t a r g e t   =   u i G e t E v e n t T a b ( e v ) ;  
         i f   ( ! t a r g e t )  
                 r e t u r n ;  
                  
         u i R e s e t P a g e T i m e o u t ( ) ;  
         v a r   b o x   =   u i P a r e n t B y A t t r i b u t e ( t a r g e t ,   ' h a s _ t a b s ' ,   ' 1 ' ) ;  
         / /  
         i f   ( ! b o x )  
                 r e t u r n ;  
         i f   ( ! b o x . t a b s )    
                 b o x . t a b s   =   u i C h i l r e n B y A t t r i b u t e ( b o x ,   ' d i v ' ,   ' t a b ' ) ;  
         i f   ( ! b o x . l a s t _ s e l e c t e d )  
                 b o x . l a s t _ s e l e c t e d   =   b o x . t a b s [ 0 ] ;  
         i f   ( b o x . l a s t _ s e l e c t e d   = =   t a r g e t )  
                 r e t u r n ;  
         i f   ( ! b o x . c o n t e n t s )  
                 b o x . c o n t e n t s   =   u i C h i l r e n B y A t t r i b u t e ( b o x ,   ' d i v ' ,   ' i s _ t a b _ c o n t e n t ' ) ;  
                   v a r   c h p l a y = n e w   A r r a y ( ) ;  
     f o r (   v a r   i = 0 ; i < b o x . c o n t e n t s . l e n g t h ; i + + )  
     {  
     i f ( b o x . c o n t e n t s [ i ] . g e t A t t r i b u t e ( ' p u r p ' ) ! = n u l l )  
         {  
         b o x . c o n t e n t s . s p l i c e ( i , 1 ) ; b r e a k ;  
         }  
      
     }  
    
  
         v a r   t a b _ p o s   =   p a r s e I n t ( t a r g e t . g e t A t t r i b u t e ( ' t a b ' ) )   -   1 ;  
         i f   ( t a b _ p o s   <   0   | |   t a b _ p o s   > =   b o x . c o n t e n t s . l e n g t h )  
                 r e t u r n ;  
         / /  
      
         t a r g e t . c l a s s N a m e   =   ' t a b _ s e l e c t e d ' ;  
         b o x . l a s t _ s e l e c t e d . c l a s s N a m e   =   ' t a b ' ;  
         v a r   l a s t _ t a b _ p o s   =   p a r s e I n t ( b o x . l a s t _ s e l e c t e d . g e t A t t r i b u t e ( ' t a b ' ) )   -   1 ;  
         v a r   l a s t _ s e l e c t e d _ c o n t e n t   =   b o x . c o n t e n t s [ l a s t _ t a b _ p o s ] ;  
         b o x . c u r r e n t _ t a b _ c o n t e n t = b o x . c o n t e n t s [ t a b _ p o s ] ;  
        
         b o x . c u r r e n t _ t a b _ c o n t e n t . c l a s s N a m e   =   b o x . c u r r e n t _ t a b _ c o n t e n t . c l a s s N a m e . r e p l a c e ( ' _ h i d d e n ' ,   ' ' ) ;  
         l a s t _ s e l e c t e d _ c o n t e n t . c l a s s N a m e   =   l a s t _ s e l e c t e d _ c o n t e n t . c l a s s N a m e + ( ' _ h i d d e n ' ) ;  
         i f   ( b o x . c u r r e n t _ t a b _ c o n t e n t . g e t A t t r i b u t e ( ' h a s _ t e x t ' )   ! =   ' 1 ' )  
         {  
                 b o x . c u r r e n t _ t a b _ c o n t e n t . s e t A t t r i b u t e ( ' h a s _ t e x t ' ,   ' 1 ' ) ;  
               / /   c u r r e n         t _ t a b _ c o n t e n t . s t y l e . w i d t h = c u r r e n t _ t a b _ c o n t e n t . o f f s e t W i d t h ;  
               v a r   c u r r e n t _ t a b _ c o n t e n t = b o x . c u r r e n t _ t a b _ c o n t e n t ;  
               u i L o a d A s y n c ( ' t e s t . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = C o n t e n t _ G e t B y T a b I d & t a b _ i d = '   +   t a r g e t . g e t A t t r i b u t e ( ' i d ' )   +   " & t i t l e r n d = " + M a t h . r o u n d ( M a t h . r a n d o m ( ) * 1 0 0 0 0 0 0 )  
                 ,   n u l l  
                 ,   f u n c t i o n ( r e s p o n s e )   {  
                         c u r r e n t _ t a b _ c o n t e n t . i n n e r H T M L   =   r e s p o n s e ;  
                         u i L o a d I m a g e s ( c u r r e n t _ t a b _ c o n t e n t ) ;  
                 } ) ;  
         }  
          
         i f   ( b o x . c l a s s N a m e = = ' b o x ' )   / / s h o w   o r   h i d e   s e p e r a t o r  
         {  
                 i f   ( t a r g e t   ! =   b o x . t a b s [ 0 ] )  
                         u i P r e v ( t a r g e t ) . l a s t C h i l d . c l a s s N a m e   =   ' ' ;  
  
                 i f   ( b o x . l a s t _ s e l e c t e d   ! =   b o x . t a b s [ 0 ] )  
                         u i P r e v ( b o x . l a s t _ s e l e c t e d ) . l a s t C h i l d . c l a s s N a m e   =   ' b o x _ t a b _ l e f t ' ;  
         }  
          
         b o x . l a s t _ s e l e c t e d   =   t a r g e t ;  
                    
         r e t u r n   f a l s e ;  
 }  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c o o k i e s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   u i S e t C o o k i e ( n a m e , v a l u e , d a y s )   {  
 	 v a r   d a t e   =   n e w   D a t e ( ) ;  
 	 i f   ( d a y s   & &   d a y s > 0 )  
 	         d a t e . s e t T i m e ( 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 ) ) ;  
 	 e l s e  
 	         d a t e . s e t T i m e ( d a t e . g e t T i m e ( ) + ( 6 6 5 * 2 4 * 6 0 * 6 0 * 1 0 0 0 ) ) ;  
 	 d o c u m e n t . c o o k i e   =   n a m e   +   ' = '   +   e s c a p e ( v a l u e )   +   ' ;   p a t h = / ;   e x p i r e s = '   +   d a t e . t o G M T S t r i n g ( ) ;  
 }  
  
 f u n c t i o n   u i G e t C o o k i e ( n a m e )  
 {  
         i f   ( d o c u m e n t . c o o k i e )  
         {  
                 v a r   c o o k i e s   =   d o c u m e n t . c o o k i e . s p l i t ( ' ;   ' ) ;  
                 v a r   l e n   =   c o o k i e s . l e n g t h ;  
                 f o r   ( v a r   i = 0 ;   i < l e n ;   i + + )  
                 {  
                         i f   ( c o o k i e s [ i ] )  
                         {  
                                 v a r   n a m e _ v a l u e   =   c o o k i e s [ i ] . s p l i t ( ' = ' ) ;  
                                 i f   ( n a m e = = n a m e _ v a l u e [ 0 ] )  
                                         r e t u r n   u n e s c a p e ( n a m e _ v a l u e [ 1 ] ) ;  
                         }  
                 }  
         }  
         r e t u r n   ' ' ;  
 }  
  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e n g i n e s - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 f u n c t i o n   u i A d d S t y l e ( t h e m e )   {  
         v a r   h e a d   =   d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( ' h e a d ' ) [ 0 ] ;  
         v a r   c s s N o d e   =   d o c u m e n t . c r e a t e E l e m e n t ( ' l i n k ' ) ;  
         c s s N o d e . t y p e   =   ' t e x t / c s s ' ;  
         c s s N o d e . r e l   =   ' s t y l e s h e e t ' ;  
         c s s N o d e . h r e f   =   ' c s s / '   +   t h e m e   +   ' . c s s ' ;  
         c s s N o d e . m e d i a   =   ' s c r e e n ' ;  
         c s s N o d e . i d   =   ' c s s _ '   +   t h e m e ;  
         h e a d . a p p e n d C h i l d ( c s s N o d e ) ;  
 }  
  
 f u n c t i o n   u i R e m o v e S t y l e ( t h e m e )   {  
         v a r   c s s   =   $ ( ' c s s _ ' + t h e m e ) ;  
         i f   ( c s s )  
         {  
                 c s s . h r e f   =   ' ' ;  
                 c s s . p a r e n t N o d e . r e m o v e C h i l d ( c s s ) ;  
         }  
 }  
  
  
 f u n c t i o n   u i O n l o a d ( )   {  
         u i L o a d I m a g e s ( d o c u m e n t ) ;  
        
 }  
 f u n c t i o n   g e t F a c e b o o k U r l ( )  
 {  
 $ ( ' f a c e b o o k _ f r a m e ' ) . s r c   = ' h t t p : / / w w w . f a c e b o o k . c o m / p l u g i n s / l i k e . p h p ? h r e f = ' + w i n d o w . l o c a t i o n + ' & l a y o u t = b u t t o n _ c o u n t & s h o w _ f a c e s = t r u e & w i d t h = 8 2 & a c t i o n = l i k e & f o n t = a r i a l & c o l o r s c h e m e = l i g h t & h e i g h t = 2 1 ' ;  
 }  
 f u n c t i o n   u i U s e r C l i c k s ( e v )  
 {  
         u i R e s e t P a g e T i m e o u t ( ) ;  
         v a r   l i n k   =   u i E v e n t E l e m e n t ( e v ) ;  
         i f   ( l i n k   & &   ( l i n k . t a g N a m e = = ' I M G ' | | l i n k . t a g N a m e = = ' B ' | | l i n k . t a g N a m e = = ' S P A N ' ) )  
                   l i n k = l i n k . p a r e n t N o d e ;  
             v a r   l i n k _ n a m e   =   ' ' ;      
               v a r   u r l   =   ' ' ;  
                 v a r   s u p _ t a b ;  
                 v a r   r s s ;  
         i f   ( l i n k   & &   ( l i n k . t a g N a m e = = ' A ' | | l i n k . t a g N a m e = = ' S P A N ' ) | | l i n k . g e t A t t r i b u t e ( ' s t a t i d ' ) )  
         {  
                 v a r   t a b _ c o n t e n t   =   u i P a r e n t B y A t t r i b u t e ( l i n k ,   ' i s _ t a b _ c o n t e n t ' ,   ' 1 ' ) ;  
                
                 i f   ( t a b _ c o n t e n t )  
                 {       l i n k _ n a m e = t a b _ c o n t e n t . g e t A t t r i b u t e ( ' s t a t i d ' ) ;  
                         i f ( ! l i n k _ n a m e )  
                         l i n k _ n a m e   =   t a b _ c o n t e n t . g e t A t t r i b u t e ( ' t a b _ i d ' ) ;  
                         i f   ( ! l i n k _ n a m e )  
                                 l i n k _ n a m e   =   t a b _ c o n t e n t . i d ;  
                         l i n k _ n a m e = l i n k _ n a m e . r e p l a c e ( ' t a b _ ' , ' ' ) ;  
                         s u p _ t a b = u i S u b P a r e n t B y A t t r i b u t e ( t a b _ c o n t e n t , ' s t a t ' ) ;  
                         i f ( s u p _ t a b )  
                         l i n k _ n a m e = '   ' + s u p _ t a b . g e t A t t r i b u t e ( ' s t a t ' ) + '     ' + l i n k _ n a m e ;  
                         v a r   s u b _ t a b = u i S u b P a r e n t B y A t t r i b u t e ( l i n k , ' p u r p ' ) ;  
                         i f ( s u b _ t a b )  
                         l i n k _ n a m e = l i n k _ n a m e + '   ' + s u b _ t a b . g e t A t t r i b u t e ( ' p u r p ' ) + '   ' ;  
                        
                 }  
                   i f ( l i n k & &   l i n k . g e t A t t r i b u t e ( ' s t a t i d ' ) & & ! t a b _ c o n t e n t )  
                   {  
                     l i n k _ n a m e = l i n k . g e t A t t r i b u t e ( ' s t a t i d ' ) ;  
                     v a r   s u p _ t a b = u i S u b P a r e n t B y A t t r i b u t e ( t a b _ c o n t e n t , ' s t a t ' ) ;  
                     i f ( s u p _ t a b )  
                     l i n k _ n a m e = '   ' + s u p _ t a b . g e t A t t r i b u t e ( ' s t a t ' ) + '   ' + l i n k _ n a m e ;  
                     u r l = ' ÔçÜçê  ØÐÑ' ;  
                   }  
                  
                 i f ( l i n k . t a g N a m e = = ' S P A N ' )  
                 {  
                 r s s   =   l i n k . g e t A t t r i b u t e ( ' i d ' ) ;  
                 }  
                 i f ( l i n k . t a g N a m e = = ' A ' & & l i n k . g e t A t t r i b u t e ( ' I n l i n k ' ) & & l i n k _ n a m e & & s u p _ t a b )  
                 {  
                 l i n k _ n a m e = l i n k _ n a m e + '   ÜÙàçÙÝ  ' ;  
                   u r l = '   ' + ( l i n k . i n n e r T e x t   | |   l i n k . t e x t C o n t e n t   | |   l i n k . h r e f ) ;  
                 }  
                 i f ( l i n k . t a g N a m e = = ' A ' & & l i n k . g e t A t t r i b u t e ( ' p u r p ' ) & & l i n k _ n a m e )  
                 {  
                 l i n k _ n a m e = '   éÕèÔ  ÛêÕÞÔ    ' + l i n k _ n a m e + '   ' ;  
                   u r l = ( l i n k . i n n e r T e x t   | |   l i n k . t e x t C o n t e n t   | |   l i n k . h r e f ) + '   ' + l i n k . g e t A t t r i b u t e ( ' p u r p ' ) + '   ' ;  
                 }  
                 e l s e   i f ( ! r s s )  
                 {  
                  
                   r s s   =   l i n k . g e t A t t r i b u t e ( ' r s s ' ) ;  
                 }  
                 i f ( l i n k . t a g N a m e = = ' A ' & & l i n k . g e t A t t r i b u t e ( ' g e t ' ) & & l i n k _ n a m e )  
                 {  
                   l i n k _ n a m e = '   éÕèÔ  ÛêÕÞÔ    ' + l i n k _ n a m e + '   ' ;  
                   u r l = l i n k . g e t A t t r i b u t e ( ' g e t ' ) ;  
                 }  
                 i f   ( r s s )  
                         u r l + = r s s + '   ' ;  
                 v a r   p o s   =   l i n k . g e t A t t r i b u t e ( ' p o s ' ) ;  
                 i f   ( p o s )  
                 {     i f ( u r l = = ' ' )  
                         u r l   + = ( l i n k . i n n e r T e x t   | |   l i n k . t e x t C o n t e n t   | |   l i n k . h r e f ) ;  
                         u r l + = '   ÜÙàç  '   +   p o s ;  
                          
                 }  
                 e l s e  
                 {  
                       i f ( u r l = = ' ' )  
                         u r l   + = '   ' + ( l i n k . i n n e r T e x t   | |   l i n k . t e x t C o n t e n t   | |   l i n k . h r e f ) ;  
                         u r l = u r l . r e p l a c e ( ' \ n ' , '   ' ) ;  
                 }  
                  
                 i f   ( u r l   & &   u r l . l e n g t h > 5 0 )  
                         u r l = u r l . s u b s t r i n g ( 0 , 5 0 ) ;  
                          
                 i f   ( l i n k . i d = = ' h e a d e r _ s e a r c h _ l i n k ' )  
                 {  
                         u r l   =   '   ×ÙäÕé  ' ;  
                         v a r   t a b s   =   $ ( ' h e a d e r _ t a b s ' ) ;  
                         i f   ( t a b s   & &   t a b s . l a s t _ t a b )  
                                 u r l + =   ( t a b s . l a s t _ t a b . i n n e r T e x t   | |   t a b s . l a s t _ t a b . t e x t C o n t e n t ) ;  
                         l i n k _ n a m e = ' ÔÐÓè' ;  
                 }  
                   i f   ( l i n k . i d = = ' f o o t e r _ s e a r c h _ l i n k ' )  
                 {  
                         u r l   =   '   ×ÙäÕé  ' ;  
                         v a r   t a b s   =   $ ( ' h e a d e r _ t a b s ' ) ;  
                         i f   ( t a b s   & &   t a b s . l a s t _ t a b )  
                                 u r l + =   ( t a b s . l a s t _ t a b . i n n e r T e x t   | |   t a b s . l a s t _ t a b . t e x t C o n t e n t ) ;  
                         l i n k _ n a m e = ' äÕØè' ;  
                 }  
                 i f   ( ! u r l )  
                         u r l = ' ÜÐ  ÙÓÕâ' ;  
                 u r l = u r l . r e p l a c e ( ' \ n ' , '   ' ) ;  
                 i f ( l i n k . p a r e n t N o d e . c l a s s N a m e . i n d e x O f ( ' s u b h e a d e r _ l i n k ' ) > 0 )  
                       {  
                         l i n k _ n a m e = ' ÛÕêèê  èÐéÙê' ;  
                         i f ( l i n k . c h i l d r e n . l e n g t h > 0 & & l i n k . c h i l d r e n [ 0 ] . t a g N a m e = = ' I M G ' )  
                         u r l = l i n k . c h i l d r e n [ 0 ] . a l t ;  
                       }  
                  
                  
                
                 i f   ( ! l i n k _ n a m e )  
                   {  
                         v a r   s u b _ t a b = u i S u b P a r e n t B y A t t r i b u t e ( l i n k , ' p u r p ' ) ;  
                         i f ( s u b _ t a b )  
                         l i n k _ n a m e = l i n k _ n a m e + '   ' + s u b _ t a b . g e t A t t r i b u t e ( ' p u r p ' ) + '   ' ;  
                        
                   }  
                   v a r   s u p p l i e r = l i n k . g e t A t t r i b u t e ( ' s u p p l i e r ' ) ;  
                   i f ( ! s u p p l i e r | | s u p p l i e r = = n u l l )  
                         s u p p l i e r = ' ' ;  
                    
                   i f ( u r l ! = ' ' & & u r l ! = ' " ' & & u r l ! = '   " ' & & u r l ! = ' "   ' & & l i n k . c l a s s N a m e ! = ' b o x _ c o n t e n t '   )  
                   {  
                   p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l + " : " + s u p p l i e r ) ;        
                    
                   u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
                   }  
         }  
 }  
  
 f u n c t i o n   u i L o a d I m a g e s ( p a r e n t )   {  
         v a r   i m a g e s   =   u i C h i l r e n B y A t t r i b u t e ( p a r e n t , ' i m g ' , ' n s r c ' ) ;  
         v a r   l e n   =   i m a g e s . l e n g t h ;  
         f o r   ( v a r   i = 0 ;   i < l e n ;   i + + )  
         {  
                 i m a g e s [ i ] . s r c   =   i m a g e s [ i ] . g e t A t t r i b u t e ( ' n s r c ' ) ;  
                 i m a g e s [ i ] . r e m o v e A t t r i b u t e ( ' n s r c ' ) ;  
         }  
          
 }  
  
 f u n c t i o n   u i H i d e A d u l t ( )  
 {  
         u i S e t C o o k i e ( ' h i d e A d u l t C o n t e n t ' , ' t r u e ' , 0 ) ;  
         u i R e m o v e S t y l e ( ' a d u l t ' ) ;  
 }  
 f u n c t i o n   u i M o v e B o x A f t e r ( s e p _ i d _ t o _ m o v e , s e p _ i d _ r e f f e r n c e )   {  
         v a r   s e p e r a t o r _ t o _ m o v e   =   $ ( s e p _ i d _ t o _ m o v e ) ;  
         i f   ( ! s e p e r a t o r _ t o _ m o v e )  
                 r e t u r n ;  
                  
                  
         v a r   b o x _ t o _ m o v e   =   u i P r e v ( s e p e r a t o r _ t o _ m o v e ) ;  
         i f ( s e p e r a t o r _ t o _ m o v e . g e t A t t r i b u t e ( ' r e g s e p ' ) )  
         b o x _ t o _ m o v e = u i P r e v B y A t t r i b u t e ( s e p e r a t o r _ t o _ m o v e , ' r e g b o x ' , s e p e r a t o r _ t o _ m o v e . g e t A t t r i b u t e ( ' r e g s e p ' ) ) ;  
         i f   ( ! b o x _ t o _ m o v e )  
                 r e t u r n ;  
         v a r   s e p e r a t o r _ r e f   =   $ ( s e p _ i d _ r e f f e r n c e ) ;  
         i f   ( ! s e p e r a t o r _ r e f )  
                 r e t u r n ;  
         u i P a r e n t ( s e p e r a t o r _ r e f ) . i n s e r t B e f o r e ( s e p e r a t o r _ t o _ m o v e ,   s e p e r a t o r _ r e f ) ;  
         u i P a r e n t ( s e p e r a t o r _ r e f ) . i n s e r t B e f o r e ( b o x _ t o _ m o v e ,   s e p e r a t o r _ r e f ) ;  
         i f ( b o x _ t o _ m o v e . g e t A t t r i b u t e ( ' r e g b o x ' ) )  
         {  
         b o x _ t o _ m o v e . s t y l e . w i d t h = ' 1 0 0 % ' ;  
         s e p e r a t o r _ t o _ m o v e . s t y l e . d i s p l a y = ' b l o c k ' ;  
       v a r     c o n t = u i C h i l r e n B y A t t r i b u t e ( b o x _ t o _ m o v e , ' d i v ' , ' i s _ t a b _ c o n t e n t ' , ' 1 ' ) ;  
       i f ( c o n t & & c o n t [ 0 ] )  
       c o n t [ 0 ] . c l a s s N a m e = ' b o x _ c o n t e n t a d v ' ;    
       v a r   r e s c h = u i C h i l r e n B y A t t r i b u t e ( b o x _ t o _ m o v e , ' d i v , s p a n ' , ' r e s ' , ' 1 ' ) ;  
 f o r ( v a r   i = 0 ; i < r e s c h . l e n g t h ; i + + )  
 {  
 r e s c h [ i ] . s t y l e . w i d t h = ' 7 5 % ' ;  
 i f ( i = = 0 )  
 r e s c h [ i ] . s t y l e . w i d t h = ' 9 9 % '  
 }  
         }  
 }  
  
  
 f u n c t i o n   u i S o r t B o x e s ( b o x _ o r d e r )    
 {  
         v a r   a r r = b o x _ o r d e r . s p l i t ( ' , ' ) ;  
         f o r   ( v a r   i = 1 ;   i < a r r . l e n g t h ;   i + + )  
         {  
                 v a r   a r r 2 = a r r [ i ] . s p l i t ( ' - ' ) ;  
                 i f   ( a r r 2 . l e n g t h = = 2 )  
                         u i M o v e B o x A f t e r ( a r r 2 [ 0 ] , a r r 2 [ 1 ] ) ;  
         }  
         / *  
         i f   ( c u r r e n t . l e n g t h   = =   d e s i r e d . l e n g t h )    
         {        
                 v a r   l e n   =   c u r r e n t . l e n g t h ;  
                 f o r   ( v a r   i = 0 ;   i < l e n ;   i + + )  
                 {  
                         i f   ( c u r r e n t [ i ] ! = d e s i r e d [ i ] )  
                         {  
                                 f o r   ( v a r   j = 0 ;   j < l e n ;   j + + )  
                                         i f   ( d e s i r e d [ i ] = = d e s i r e d [ j ] )  
                                         {  
                                                 i f   ( j > 0 )  
                                                         u i M o v e B o x A f t e r ( d e s i r e d [ j - 1 ] , d e s i r e d [ j ] ) ;  
                                                 b r e a k ;  
                                         }  
                         }  
                 }  
         }  
         * /  
 }  
  
  
 f u n c t i o n   u i P o s t T o N e w W i n d o w ( u r l ,   f i e l d s )  
 {  
         v a r   f o r m   =   $ ( ' e n g i n e F o r m ' ) ;  
         f o r m . a c t i o n   =   u r l ;  
           f o r ( v a r   f i e l d   i n   f i e l d s )  
           {  
                 f o r m . i n n e r H T M L   + =   ' < i n p u t   t y p e = " h i d d e n "   n a m e = " '   +   f i e l d   +   ' "   v a l u e = " '   +   e v a l ( ' f i e l d s [ " '   +   f i e l d   +   ' " ] ' )   +   ' "   / > ' ;  
                 }  
          
         f o r m . s u b m i t ( ) ;  
 }  
 f u n c t i o n   u i H e a d e r T a b C l i c k ( e v )  
 {  
         v a r   t a b   =   u i E v e n t E l e m e n t ( e v ) ;  
         v a r   t a b s   =   $ ( ' h e a d e r _ t a b s ' ) ;  
         i f   ( ! t a b   | |   ! t a b s )  
                 r e t u r n ;          
         i f   ( t a b . c l a s s N a m e ! = ' h e a d e r _ t a b ' )    
                 r e t u r n ;  
                  
         t a b . c l a s s N a m e = ' h e a d e r _ t a b _ s e l e c t e d '  
         i f   ( ! t a b s . l a s t _ t a b )  
                 t a b s . l a s t _ t a b   =   $ ( ' f i r s t _ h e a d e r _ t a b ' ) ;  
  
         t a b s . l a s t _ t a b . c l a s s N a m e = ' h e a d e r _ t a b ' ;  
         t a b s . l a s t _ t a b = t a b ;  
         i f ( t a b . g e t A t t r i b u t e ( ' k e y ' ) ! = ' w e b ' & & t a b . g e t A t t r i b u t e ( ' k e y ' ) ! = ' p i c s ' & & t a b . g e t A t t r i b u t e ( ' k e y ' ) ! = ' n e w s ' & & t a b . g e t A t t r i b u t e ( ' k e y ' ) ! = ' t r a n s l a t i o n ' )  
             $ ( ' h e a d e r _ i n p u t ' ) . c l a s s N a m e = ' h e a d e r _ s e a r c h _ i n p u t _ e m p t y ' ;  
         e l s e  
         $ ( ' h e a d e r _ i n p u t ' ) . c l a s s N a m e = ' h e a d e r _ s e a r c h _ i n p u t ' ;  
       i f ( t a b . g e t A t t r i b u t e ( ' k e y ' ) = = ' s h o p ' )  
         $ ( ' h e a d e r _ i n p u t ' ) . c l a s s N a m e = ' h e a d e r _ s e a r c h _ i n p u t _ P 1 0 0 0 ' ;  
   i f ( t a b . g e t A t t r i b u t e ( ' k e y ' ) = = ' w i k i ' )  
         $ ( ' h e a d e r _ i n p u t ' ) . c l a s s N a m e = ' h e a d e r _ s e a r c h _ i n p u t _ w i k i ' ;  
          
         i f   ( $ ( ' h e a d e r _ i n p u t ' ) . v a l u e   ! =   ' ' )  
                 $ ( ' h e a d e r _ i n p u t ' ) . c l a s s N a m e = ' h e a d e r _ s e a r c h _ i n p u t _ e m p t y ' ;  
 }  
  
 f u n c t i o n   u i H e a d e r S e a r c h ( f r o m _ i n p u t )  
 {  
      
  
         v a r   t a b s   =   $ ( ' h e a d e r _ t a b s ' ) ;  
         i f   ( ! t a b s )  
                 r e t u r n   f a l s e ;          
                  
         i f   ( ! t a b s . l a s t _ t a b )  
                 t a b s . l a s t _ t a b   =   $ ( ' f i r s t _ h e a d e r _ t a b ' ) ;  
  
         v a r   s e l e c t e d S i t e   =   t a b s . l a s t _ t a b . g e t A t t r i b u t e ( ' k e y ' ) ;  
         v a r   v a l   =   $ ( ' h e a d e r _ i n p u t ' ) . v a l u e ;  
  
         v a r   l i n k ;  
         s w i t c h   ( s e l e c t e d S i t e )    
         {  
                   c a s e   ' w i k i ' :  
                         l i n k   =   ' h t t p : / / h e . w i k i p e d i a . o r g / w i k i / % D 7 % 9 E % D 7 % 9 9 % D 7 % 9 5 % D 7 % 9 7 % D 7 % 9 3 : S e a r c h ? s e a r c h = '   +   v a l   +   ' & f u l l t e x t = % D 7 % 9 7 % D 7 % A 4 % D 7 % A 9 ' ;  
                         b r e a k ;  
                  
                 c a s e   ' t r a n s l a t i o n ' :    
                         l i n k   = ' h t t p : / / t r a n s l a t e . g o o g l e . c o . i l / t r a n s l a t e _ t ? p r e v = h p & h l = i w & j s = y & t e x t = ' + v a l + ' & f i l e = & s l = i w & t l = e n & h i s t o r y _ s t a t e 0 = # ' ;  
                         b r e a k ;  
                
                 c a s e   ' p i c s ' :  
                         l i n k   =   ' h t t p : / / i m a g e s . g o o g l e . c o . i l / i m a g e s ? h l = i w & q = '   + v a l ;  
                         d o c u m e n t . c h a r s e t   =   ' U T F - 8 ' ;  
                         b r e a k ;  
                
                 c a s e   ' s h o p ' :  
                         l i n k   =   ' h t t p : / / w w w . p 1 0 0 0 . c o . i l / S i t e / s e a r c h r e s u l t s . a s p x ? S e a r c h T e x t = ' + e n c o d e U R I C o m p o n e n t ( v a l ) + ' & c a m e = 3 1 4 ' ;  
                             d o c u m e n t . c h a r s e t   =   ' U T F - 8 ' ;  
                         b r e a k ;  
                
                 c a s e   ' n e w s ' :  
                         l i n k   =   ' h t t p : / / n e w s . g o o g l e . c o . i l / n e w s ? h l = i w & u m = 1 & i e = U T F - 8 & s a = N & t a b = w n & q = '   +   e s c a p e ( v a l ) ;  
                         b r e a k ;  
                 c a s e   ' n e t e x ' :  
                         l i n k   =   ' h t t p : / / w w w . n e t e x . c o . i l / D i s p l a y M a n a g e r . a s p x ? s e a r c h P h r a s e = ' + e s c a p e ( v a l ) + ' & l a n g = 2 ~ r t l & s s i d = 2 3 & i n d e x V e r s i o n = s t a r t ' ;  
                         b r e a k ;  
         }  
       d o c u m e n t . c h a r s e t   =   ' U T F - 8 ' ;  
        
       i f   ( u i P a r a m s . m o d e l = = ' s e a r c h '   & &   l i n k )  
       {  
                 d o c u m e n t . l o c a t i o n . h r e f = l i n k ;  
                 r e t u r n   f a l s e ;          
       }  
       e l s e   i f   ( l i n k )  
       {  
                 w i n d o w . o p e n ( l i n k ) ;  
                 r e t u r n   f a l s e ;          
         }  
         e l s e   i f   ( ! f r o m _ i n p u t )  
         {  
                 $ ( ' c s e - s e a r c h - b o x ' ) . s u b m i t ( ) ;  
                 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   u i f o o t e r S e a r c h ( f r o m _ i n p u t )  
 {  
     $ ( ' c s e - s e a r c h - b o x f ' ) . s u b m i t ( ) ;  
     r e t u r n   f a l s e ;          
  
 }  
 f u n c t i o n   u i E n t e r P r e s s e d ( e v )  
 {  
         i f   ( ! e v )  
                 e v = w i n d o w . e v e n t ;  
         i f   ( e v   & &   e v . k e y C o d e = = 1 3 )  
                 r e t u r n   t r u e ;  
         e l s e  
                 r e t u r n   f a l s e ;  
 }  
  
  
 f u n c t i o n   u i E n g i n e s _ G e t S u b I t e m s ( e ,   r s s _ i d ,   s u b I t e m s ,   x a t h )   {        
         v a r   o p t i o n   =   e . o p t i o n s [ e . s e l e c t e d I n d e x ] ;  
         i f   ( o p t i o n . c a c h )  
         {  
                 $ ( s u b I t e m s ) . i n n e r H T M L   =   o p t i o n . c a c h ;  
                 r e t u r n ;  
         }  
         i f   ( ! e . v a l u e )  
         {  
                 $ ( s u b I t e m s ) . i n n e r H T M L   =   ' < s e l e c t     > < o p t i o n > < / o p t i o n > < / s e l e c t > ' ;  
                 r e t u r n ;  
         }  
          
          
  
         $ ( s u b I t e m s ) . i n n e r H T M L   =   ' < s e l e c t     > < o p t i o n > ÔÞêß. . . < / o p t i o n > < / s e l e c t > ' ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = C o n t e n t _ G e t R s s S u b I t e m s & r s s _ i d = '   +   r s s _ i d   +   ' & x p a t h = '   +   e s c a p e ( x a t h )  
                         ,   n u l l  
                         ,   f u n c t i o n ( r e s p o n s e )   {  
                                 o p t i o n . c a c h   =   r e s p o n s e ;  
                                 $ ( s u b I t e m s ) . i n n e r H T M L   =   r e s p o n s e ;  
                                 i f   ( r e s p o n s e   & &   $ ( s u b I t e m s ) . f i r s t C h i l d   & &   $ ( s u b I t e m s ) . f i r s t C h i l d . o n c h a n g e )  
                                         $ ( s u b I t e m s ) . f i r s t C h i l d . o n c h a n g e ( ) ;  
                         } ) ;  
 }  
 v a r   p o p W i n = n u l l ;  
 f u n c t i o n   u i S h o w P o p u p B y S i z e ( u r l ,   w i d t h ,   h e i g h t )   {  
         p o p W i n   =   w i n d o w . o p e n ( u r l ,  
                         " m y w i n d o w " ,   " l o c a t i o n = 0 , s t a t u s = 0 , m e n u b a r = 0 , s c r o l l b a r s = 1 , r e s i z a b l e = 1 , w i d t h = "   +   w i d t h   +   " , h e i g h t = "   +   h e i g h t ) ;  
 }  
 f u n c t i o n   u i S h o w P o p u p ( u r l )   {  
         u i S h o w P o p u p B y S i z e ( u r l ,   ' 5 5 0 ' ,   ' 6 0 0 ' ) ;  
  
         / / $ ( ' p o p u p _ d i v ' ) . s t y l e . d i s p l a y = ' b l o c k ' ;  
         / /   v a r   p o s   =   u i G e t P o s i t i o n ( $ ( ' f o o t e r ' ) ) ;  
         / /   $ ( ' p o p u p _ i f r a m e ' ) . s r c = u r l ;  
         / /   $ ( ' p o p u p _ d i v ' ) . s t y l e . t o p   =   ( p o s . y - 4 0 0 )   + ' p x ' ;  
 }  
 f u n c t i o n   u i H i d e P o p u p ( )  
 {  
         i f   ( p o p W i n )  
                 p o p W i n . c l o s e ( ) ;  
         / / $ ( ' p o p u p _ d i v ' ) . s t y l e . d i s p l a y = ' n o n e ' ;  
 }  
  
 f u n c t i o n   u i W r i t e S c r i p t ( u r l )  
 {  
         u r l = u r l . r e p l a c e ( ' $ r a n d o m $ ' ,   M a t h . r o u n d ( M a t h . r a n d o m ( ) * 1 0 0 0 0 0 0 )   ) ;  
         d o c u m e n t . w r i t e   ( ' < s '   +   ' c r i p t   t y p e = " t e x t / j a v a s c r i p t "   s r c = " '   +   u r l   + ' " > < / s '   +   ' c r i p t > ' ) ;  
 }  
 f u n c t i o n   u i A p p e n d ( u r l , b l o c k )  
 {  
 u r l = u r l . r e p l a c e ( ' $ r a n d o m $ ' ,   M a t h . r o u n d ( M a t h . r a n d o m ( ) * 1 0 0 0 0 0 0 )   ) ;        
   $ ( b l o c k ) . i n n e r H t m l = ' < s '   +   ' c r i p t   t y p e = " t e x t / j a v a s c r i p t "   s r c = " '   +   u r l   + ' " > < / s '   +   ' c r i p t > ' ;  
 }  
 f u n c t i o n   u i W r i t e I f r a m e   ( w i d t h , h e i g h t , s r c , i d , n a m e )  
 {  
            
           s r c = s r c . r e p l a c e ( ' $ r a n d o m $ ' ,   M a t h . r o u n d ( M a t h . r a n d o m ( ) * 1 0 0 0 0 0 0 )   ) ;  
           d o c u m e n t . w r i t e ( " < I F R A M E   W I D T H = ' "   +   w i d t h   +   " '   H E I G H T = ' "   +   h e i g h t   +   " p x '   n a m e = ' " + n a m e + " '   i d = ' " + i d + " '   M A R G I N W I D T H = ' 0 '   M A R G I N H E I G H T = ' 0 '   F R A M E B O R D E R = ' 0 '   a l l o w t r a n s p a r e n c y = ' t r u e '   b a c k g r o u n d - c o l o r = ' t r a n s p a r e n t '   S C R O L L I N G = ' n o '   S R C = ' "   +   s r c   +   " ' > < / I F R A M E > " ) ;  
 }  
  
 f u n c t i o n   u i G e t S t y l e C l a s s   ( c l a s s N a m e )   {  
         v a r   s t y l e S h e e t s _ l e n g t h = d o c u m e n t . s t y l e S h e e t s . l e n g t h ;  
 	 f o r   ( v a r   s   =   0 ;   s   <   s t y l e S h e e t s _ l e n g t h ;   s + + )  
 	 {  
 	         v a r   r u l e s = ( d o c u m e n t . s t y l e S h e e t s [ s ] . r u l e s ? d o c u m e n t . s t y l e S h e e t s [ s ] . r u l e s : d o c u m e n t . s t y l e S h e e t s [ s ] . c s s R u l e s ) ;  
 	         v a r   r u l e s _ l e n g t h = r u l e s . l e n g t h ;  
 	 	 f o r   ( v a r   r   =   0 ;   r   <   r u l e s _ l e n g t h ;   r + + )  
 	 	 {  
 	 	 	 i f   ( r u l e s [ r ] . s e l e c t o r T e x t   = =   ' . '   +   c l a s s N a m e )  
 	 	 	 	 r e t u r n   r u l e s [ r ] ;  
 	 	 }  
 	 }  
 	 r e t u r n   n u l l ;  
 }  
  
 f u n c t i o n   u i S h o w L i n k s ( l i n k ,   s h o w )  
 {  
         v a r   t a b _ c o n t e n t   =   u i P a r e n t B y A t t r i b u t e ( l i n k ,   ' i s _ t a b _ c o n t e n t ' ,   ' 1 ' ) ;  
         i f   ( ! t a b _ c o n t e n t )  
                 r e t u r n ;  
         i f   ( ! t a b _ c o n t e n t . e x t r a _ l i n k s )  
                   t a b _ c o n t e n t . e x t r a _ l i n k s = u i C h i l r e n B y A t t r i b u t e ( t a b _ c o n t e n t , ' d i v ' , ' u i ' , ' e x t r a _ l i n k ' ) ;  
                    
         v a r   l e n   =   t a b _ c o n t e n t . e x t r a _ l i n k s . l e n g t h ;  
         f o r   ( v a r   i = 0 ;   i < l e n ;   i + + )  
                   t a b _ c o n t e n t . e x t r a _ l i n k s [ i ] . s t y l e . d i s p l a y = ( s h o w   ?   ' b l o c k '   :   ' n o n e ' ) ;  
                    
         i f   ( s h o w )  
                 u i N e x t ( l i n k ) . s t y l e . d i s p l a y = ' b l o c k ' ;  
         e l s e  
                 u i P r e v ( l i n k ) . s t y l e . d i s p l a y = ' b l o c k ' ;  
         l i n k . s t y l e . d i s p l a y = ' n o n e ' ;  
 }  
  
 f u n c t i o n   u i S h o w L i n k s A d d ( l i n k , s h o w , i d , s t y l e )  
 {  
     u i S h o w L i n k s ( l i n k , s h o w ) ;  
     $ ( i d ) . s t y l e . d i s p l a y = s t y l e ;  
      
 }  
  
 f u n c t i o n   u i G e t M o r e C o n t e n t ( l i n k )   {  
         v a r   c o n t e n t   =   u i P a r e n t B y A t t r i b u t e ( l i n k ,   ' i s _ t a b _ c o n t e n t ' ,   ' 1 ' ) ;  
          
         i f   ( c o n t e n t . m o r e _ d i v   & &   c o n t e n t . m o r e _ d i v . i n t e r v a l )  
                 w i n d o w . c l e a r I n t e r v a l ( c o n t e n t . m o r e _ d i v . i n t e r v a l ) ;  
         i f   ( c o n t e n t . m i n u s )   {  
                 l i n k . t i t l e   =   l i n k . t i t l e . r e p l a c e ( ' ä×Õê' , ' âÕÓ' ) ;  
                 l i n k . i n n e r H T M L   =   ' [ + ] ' ;  
                 c o n t e n t . m i n u s   =   n u l l ;  
                 c o n t e n t . m o r e _ d i v . c u r r _ h e i g h t   =   c o n t e n t . m o r e _ d i v . o f f s e t H e i g h t ;  
                 c o n t e n t . m o r e _ d i v . s t y l e . h e i g h t   =   ' ' ;  
                 c o n t e n t . m o r e _ d i v . i n n e r H T M L   =   ' ' ;  
                 i f   ( u i B r o w s e r = = ' e x p l o r e r ' )   {  
                         c o n t e n t . m o r e _ d i v . t o _ h e i g h t   =   c o n t e n t . m o r e _ d i v . o f f s e t H e i g h t ;  
                         a n i m a t e H e i g h t ( c o n t e n t . m o r e _ d i v ) ;  
                 }  
                 e l s e  
                         c o n t e n t . m o r e _ d i v . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                  
                         r e t u r n ;  
         }  
         c o n t e n t . m i n u s   =   1 ;  
         c o n t e n t . m o r e _ d i v   =   u i C h i l r e n B y A t t r i b u t e ( c o n t e n t ,   ' d i v ' ,   ' u i ' ,   ' m o r e _ c o n t e n t ' ) [ 0 ] ;  
         l i n k . i n n e r H T M L   =   ' [ - ] ' ;  
         l i n k . t i t l e   =   l i n k . t i t l e . r e p l a c e ( ' âÕÓ' , ' ä×Õê' ) ;  
         c o n t e n t . m o r e _ d i v . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
          
         i f   ( c o n t e n t . m o r e _ d i v . c a c h e )  
         {  
                 c o n t e n t . m o r e _ d i v . c u r r _ h e i g h t   =   c o n t e n t . m o r e _ d i v . o f f s e t H e i g h t ;  
                 c o n t e n t . m o r e _ d i v . s t y l e . h e i g h t   =   ' ' ;  
                 c o n t e n t . m o r e _ d i v . i n n e r H T M L   =   c o n t e n t . m o r e _ d i v . c a c h e ;  
                 i f   ( u i B r o w s e r = = ' e x p l o r e r ' )   {  
                         c o n t e n t . m o r e _ d i v . s t y l e . o v e r f l o w   =   ' h i d d e n ' ;  
                         c o n t e n t . m o r e _ d i v . t o _ h e i g h t   =   c o n t e n t . m o r e _ d i v . o f f s e t H e i g h t ;  
                         a n i m a t e H e i g h t ( c o n t e n t . m o r e _ d i v ) ;  
                 }  
         }  
         e l s e   {  
                 c o n t e n t . m o r e _ d i v . i n n e r H T M L   =   ' < d i v   s t y l e = " p a d d i n g : 5 p x ; " > < i m g   s r c = " i m a g e s / b o x / A j a x I n d i c a t o r . g i f "   h e i g h t = " 2 5 " / > < / d i v > ' ;  
                 u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = C o n t e n t _ G e t M o r e C o n t e n t & t a b _ i d = '   +   c o n t e n t . g e t A t t r i b u t e ( ' t a b _ i d ' )  
                                 ,   n u l l  
                                 ,   f u n c t i o n ( r e s p o n s e )   {  
                                         c o n t e n t . m o r e _ d i v . c u r r _ h e i g h t   =   c o n t e n t . m o r e _ d i v . o f f s e t H e i g h t ;  
                                         c o n t e n t . m o r e _ d i v . s t y l e . h e i g h t   =   ' ' ;  
                                         c o n t e n t . m o r e _ d i v . i n n e r H T M L   =   r e s p o n s e ;  
                                          
                                         u i L o a d I m a g e s ( c o n t e n t . m o r e _ d i v ) ;  
                                         c o n t e n t . m o r e _ d i v . c a c h e = c o n t e n t . m o r e _ d i v . i n n e r H T M L ;  
                                          
                                         i f   ( u i B r o w s e r = = ' e x p l o r e r ' )   {  
                                                 c o n t e n t . m o r e _ d i v . s t y l e . o v e r f l o w   =   ' h i d d e n ' ;  
                                                 c o n t e n t . m o r e _ d i v . t o _ h e i g h t   =   c o n t e n t . m o r e _ d i v . o f f s e t H e i g h t ;  
                                                 a n i m a t e H e i g h t ( c o n t e n t . m o r e _ d i v ) ;  
                                         }  
                                 } ) ;  
         }  
 }  
  
 f u n c t i o n   a n i m a t e H e i g h t ( c o n t e n t )   {  
         c o n t e n t . s t y l e . h e i g h t   =   c o n t e n t . c u r r _ h e i g h t   +   ' p x ' ;  
         v a r   d i r   =   6 ;  
         i f   ( c o n t e n t . t o _ h e i g h t   <   c o n t e n t . c u r r _ h e i g h t )  
                 d i r   =   - 6 ;  
         c o n t e n t . i n t e r v a l   =   w i n d o w . s e t I n t e r v a l ( f u n c t i o n ( )   {  
                 c o n t e n t . c u r r _ h e i g h t   + =   d i r ;  
                 i f   ( c o n t e n t . c u r r _ h e i g h t > = 0 )  
                         c o n t e n t . s t y l e . h e i g h t   =   c o n t e n t . c u r r _ h e i g h t   +   ' p x ' ;  
                 i f   ( d i r   >   0   & &   c o n t e n t . t o _ h e i g h t   < =   c o n t e n t . c u r r _ h e i g h t )  
                         w i n d o w . c l e a r I n t e r v a l ( c o n t e n t . i n t e r v a l ) ;  
                 i f   ( d i r   <   0   & &   c o n t e n t . t o _ h e i g h t   > =   c o n t e n t . c u r r _ h e i g h t )   {  
                         c o n t e n t . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                         w i n d o w . c l e a r I n t e r v a l ( c o n t e n t . i n t e r v a l ) ;  
                 }  
         } ,   2 0 ) ;  
 }  
 f u n c t i o n   u i V i d e o P a g e ( e v )  
 {  
         v a r   t a r g e t = u i E v e n t E l e m e n t ( e v ) ;      
         i f   ( ! t a r g e t )  
                         r e t u r n ;  
         v a r   c l a s s N a m e =   t a r g e t . c l a s s N a m e ;  
         i f   ( c l a s s N a m e = = ' v i d e o s _ f o o t e r _ n e x t '   | |   c l a s s N a m e = = ' v i d e o s _ f o o t e r _ p r e v ' )  
         {  
                 v a r   t a b _ c o n t e n t   =   u i P a r e n t B y A t t r i b u t e ( t a r g e t , ' i s _ t a b _ c o n t e n t ' , ' 1 ' ) ;  
                 v a r   p a g e   =   u i C h i l r e n B y A t t r i b u t e ( t a b _ c o n t e n t , ' d i v ' , ' u i ' , ' p a g e ' ) [ 0 ] ;  
                 i f   ( ! p a g e )  
                         r e t u r n ;  
                 v a r   m i n L i n e = ( p a r s e I n t ( p a g e . g e t A t t r i b u t e ( ' m i n L i n e ' ) ) + 3 * ( c l a s s N a m e = = ' v i d e o s _ f o o t e r _ p r e v ' ? - 1 : 1 ) ) ;  
                 i f   ( m i n L i n e < 0 )  
                         r e t u r n ;  
                  
                 v a r   s t a t u s   =   u i C h i l r e n B y A t t r i b u t e ( t a b _ c o n t e n t ,   ' d i v ' ,   ' u i ' ,   ' s t a t u s ' ) [ 0 ] ;  
                 s t a t u s . s t y l e . d i s p l a y   =   ' ' ;  
                  
                 u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = C o n t e n t _ G e t M o r e C o n t e n t & t a b _ i d = '   +   t a b _ c o n t e n t . g e t A t t r i b u t e ( ' t a b _ i d ' )  
                                                                                         +   ' & m i n L i n e = '   + m i n L i n e  
                         ,   n u l l  
                         ,   f u n c t i o n ( r e s p o n s e )   {  
                                 p a g e . p a r e n t N o d e . i n n e r H T M L   =   r e s p o n s e ;  
                                 u i L o a d I m a g e s ( t a b _ c o n t e n t ) ;  
                                 p a g e   =   u i C h i l r e n B y A t t r i b u t e ( t a b _ c o n t e n t , ' d i v ' , ' u i ' , ' p a g e ' ) [ 0 ] ;  
                                 v a r   p r e v   =   u i C h i l r e n B y A t t r i b u t e ( t a b _ c o n t e n t , ' d i v ' , ' u i ' , ' p r e v ' ) [ 0 ] ;  
                                 v a r   n e x t   =   u i C h i l r e n B y A t t r i b u t e ( t a b _ c o n t e n t , ' d i v ' , ' u i ' , ' n e x t ' ) [ 0 ] ;  
                                 s t a t u s . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                                 p r e v . s t y l e . d i s p l a y   =   ( p a g e . g e t A t t r i b u t e ( ' p r e v ' )   = =   ' 1 '   ?   ' '   :   ' n o n e ' ) ;  
                                 n e x t . s t y l e . d i s p l a y   =   ( p a g e . g e t A t t r i b u t e ( ' n e x t ' ) = = ' 1 ' ? ' ' : ' n o n e ' ) ;  
                         } ) ;  
         }  
 }  
  
  
  
 f u n c t i o n   u i S e t H o m e ( )   {  
         i f   ( u i B r o w s e r   = =   ' e x p l o r e r ' )   {  
                 d o c u m e n t . b o d y . s t y l e . b e h a v i o r   =   ' u r l ( # d e f a u l t # h o m e p a g e ) ' ;  
                 d o c u m e n t . b o d y . s e t H o m e P a g e ( w i n d o w . l o c a t i o n . h r e f ) ;  
         }  
         e l s e   {  
                 u i S h o w P o p u p B y S i z e ( ' h t m l / m a k e H o m e p a g e . h t m ' ,   ' 3 0 0 ' ,   ' 2 0 0 ' ) ;  
         }  
 }  
 f u n c t i o n   u i A d d T o F a v o r i t e s ( )  
 {  
         i f   ( w i n d o w . e x t e r n a l )   {  
                 w i n d o w . e x t e r n a l . A d d F a v o r i t e (   w i n d o w . l o c a t i o n . h r e f ,   ' f u n . s t a r t . c o . i l ' ) ;  
         }   e l s e   i f   ( w i n d o w . s i d e b a r )   {  
         / / a l e r t ( ' F I R E F O X ! ' ) ;  
                 w i n d o w . s i d e b a r . a d d P a n e l ( ' f u n . s t a r t . c o . i l ' ,   w i n d o w . l o c a t i o n . h r e f , ' ' ) ;  
         }      
 }  
 f u n c t i o n   u i R e s e t P a g e ( )  
 {  
         u i S e t C o o k i e ( ' b o x _ o r d e r ' , ' ' , 0 ) ;  
         u i S e t C o o k i e ( ' h i d e A d u l t C o n t e n t ' , ' f a l s e ' , 0 ) ;  
         u i S e t C o o k i e ( ' s e e n P l a z m a ' , ' f a l s e ' , 0 ) ;  
         d o c u m e n t . l o c a t i o n . r e l o a d ( ) ;  
 }  
 f u n c t i o n   u i G o T o O l d ( )  
 {  
         u i S e t C o o k i e ( ' I s N e w S i t e U s e r ' , ' f a l s e ' , 0 ) ;  
         d o c u m e n t . l o c a t i o n . h r e f = ' h t t p : / / w w w . 1 . s t a r t . c o . i l / ? c a m e F r o m N e w S i t e = 1 ' ;  
 }  
 v a r   u i S i d e A d B y W i d t h T i m e o u t = n u l l ;  
 v a r   u i O z e n = n u l l ;  
 f u n c t i o n   u i S i d e A d B y W i d t h ( )   {  
         i f   ( u i S i d e A d B y W i d t h T i m e o u t )  
                 w i n d o w . c l e a r T i m e o u t ( u i S i d e A d B y W i d t h T i m e o u t ) ;  
  
 c h e c k W i n d o w S i z e ( t r u e ) ;  
  
 r e t u r n ;    
         i f   ( u i O z e n . h i d d e n _ b y _ p l a z m a )  
                 r e t u r n ;  
         v a r   o z e n S r c   =   $ ( ' o z e n ' ) ;  
         i f   ( o z e n S r c   & &   u i O z e n   & &   o z e n S r c . i n n e r H T M L   ! =   ' ' )   {  
                 v a r   s r c   =   u i G e t S t r i n g A t t r i b u t e ( o z e n S r c . i n n e r H T M L ,   ' s r c ' ) ;  
                 u i O z e n . c h i l d r e n [ 0 ] . s r c   =   s r c . r e p l a c e ( ' " ' ,   ' ' ) ;  
                 v a r   u i S i d e A d B y W i d t h T i m e o u t   =   w i n d o w . s e t T i m e o u t (  
                 f u n c t i o n ( )   {  
                         v a r   w i d t h   =   ( d o c u m e n t . b o d y . c l i e n t W i d t h   | |   w i n d o w . i n n e r W i d t h ) ;  
                         v a r   s h o w   =   ( w i d t h   >   1 0 1 6 ) ;  
                         u i O z e n . s t y l e . d i s p l a y   =   ( s h o w   ?   ' '   :   ' n o n e ' ) ;  
                         v a r   p a d   =   ( s h o w   & &   w i d t h   <   1 1 1 0 ) ;  
                         v a r   o z e n Z e r o L e f t   =   ( w i d t h   <   1 1 7 0 ) ;  
                         i f   ( s h o w )   {  
                                 u i O z e n . s t y l e . l e f t   =   ( o z e n Z e r o L e f t   ?   ' 0 p x '   :   ' 4 0 p x ' ) ;  
                         }  
  
 / /                         i f   ( u i B r o w s e r   = =   ' e x p l o r e r ' )  
 / /                                 $ ( ' m a i n C o n t e n t ' ) . s t y l e . p a d d i n g L e f t   =   ( p a d   ?   ' 1 2 0 p x '   :   ' 0 p x ' ) ;  
 / /                         e l s e  
                                 $ ( ' m a i n ' ) . s t y l e . p a d d i n g L e f t   =   ( p a d   ?   ' 1 2 0 p x '   :   ' 0 p x ' ) ;  
                 }  
                 ,   2 0 0  
                 )  
         }  
 }  
  
 f u n c t i o n   u i G e t S t r i n g A t t r i b u t e ( s D a t a ,   x p a t h )   {  
         v a r   a t t s   =   s D a t a . s p l i t ( '   ' ) ;  
         f o r   ( i   =   0 ;   i   <   a t t s . l e n g t h ;   i + + )   {  
                 v a r   a t t   =   a t t s [ i ] . s p l i t ( ' = ' ) ;  
                 i f   ( a t t . l e n g t h   >   1   & &   a t t [ 0 ] . t o L o w e r C a s e ( )   = =   x p a t h . t o L o w e r C a s e ( ) )   {  
                         v a r   r e t v a l   =   a t t [ 1 ] ;  
                         f o r   ( j   =   2 ;   j   <   a t t . l e n g t h ;   j + + )  
                                 r e t v a l   + =   ' = '   +   a t t [ j ] ;  
                         r e t u r n   r e t v a l ;  
                 }  
         }  
         r e t u r n   n u l l ;  
 }  
  
 f u n c t i o n   u i A d d S t r i n g A t t r i b u t e ( s D a t a ,   x p a t h ,   v a l u e )   {  
         v a r   a r r   =   s D a t a . s p l i t ( ' > ' ) ;  
         i f   ( a r r . l e n g t h   = =   1 )  
                 r e t u r n   s D a t a ;  
         v a r   r e t v a l   =   a r r [ 0 ] ;  
         r e t v a l   + =   '   '   +   x p a t h   +   ' = '   +   v a l u e ;  
         f o r   ( i   =   1 ;   i   <   a r r . l e n g t h ;   i + + )  
                 r e t v a l   + =   ' > '   +   a r r [ i ] ;  
  
         r e t u r n   r e t v a l ;  
 }  
 / / - - - - - - - - - - - - - e n g i n e s    
 f u n c t i o n   u i E n g i n e s _ e m a i l _ s u b m i t ( )  
 {  
 	 v a r   s e l e c t e d = u i R a d i o S e l e c t e d ( ' e m a i l _ o p t i o n s ' ) ;  
 	 i f   ( ! s e l e c t e d )  
 	 	 r e t u r n ;  
 	 v a r   e m a i l _ u s e r = $ ( ' e m a i l _ u s e r ' ) . v a l u e ;  
 	 v a r   e m a i l _ p w d = $ ( ' e m a i l _ p w d ' ) . v a l u e ;  
 	 v a r   e n g i n e U r l ,   p a r a m e t e r s ;  
 	  
 	 s w i t c h   ( s e l e c t e d . v a l u e )  
 	 {  
 	 	 c a s e   " y a h o o " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / l o g i n . y a h o o . c o m / c o n f i g / l o g i n ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 	 l o g i n   :   e m a i l _ u s e r ,  
 	 	 	 	 	 p a s s w d   :   e m a i l _ p w d ,  
 	 	 	 	 	 ' . t r i e s '   :   ' ' ,  
 	 	 	 	 	 ' . s r c '   :   ' y m ' ,  
 	 	 	 	 	 ' . l a s t '   :   ' ' ,  
 	 	 	 	 	 p r o m o   :   ' ' ,  
 	 	 	 	 	 l g   :   ' u s ' ,  
 	 	 	 	 	 ' . i n t l '   :   ' ' ,  
 	 	 	 	 	 ' . b y p a s s '   :   ' '  
 	 	 	 	 } ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " h o t m a i l " :  
 	 	 	 e n g i n e U r l   =   ' h t t p s : / / l o g i n . p a s s p o r t . c o m / p p s e c u r e / p o s t . s r f ? i d = 2 & a m p ; v v = 3 0 & a m p ; l c = 1 0 3 3 & a m p ; b k = 1 1 1 6 9 2 3 3 0 9 ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 	 l o g i n   :   e m a i l _ u s e r ,  
 	 	 	 	 	 p a s s w d   :   e m a i l _ p w d ,  
 	 	 	 	 	 P P S X   :   ' P a ' ,    
 	 	 	 	 	 P w d P a d   :   ' ' ,  
 	 	 	 	 	 p a s s w d a u t o c o m p l e t e   :   ' '  
 	 	 	 	 } ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " c o o l m a i l " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / w e b m a i l . n a n a 1 0 . c o . i l / ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 	 u s e r n a m e   :   e m a i l _ u s e r ,  
 	 	 	 	 	 p a s s w o r d   :   e m a i l _ p w d ,  
 	 	 	 	 	 l a n g u a g e   :   ' i w ' ,  
 	 	 	 	 	 c o u n t r y   :   ' I L ' 	 	 	  
 	 	 	 	 } ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " i n t e r m a i l " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / w w w . i n t e r m a i l . c o . i l / L o g i n M e m b e r s . a s p ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 	 U s e r   :   e m a i l _ u s e r ,  
 	 	 	 	 	 P a s s w o r d   :   e m a i l _ p w d ,  
 	 	 	 	 	 l o g m e   :   ' 1 '  
 	 	 	 	 } ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " w a l l a " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / f r i e n d s . w a l l a . c o . i l / ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 	 " w "   :   " / @ l o g i n . c o m m i t " ,  
 	 	 	 	 	 " R e t u r n U R L "   :   ' h t t p : / / m a i l . w a l l a . c o . i l / i n d e x . c g i ' ,  
 	 	 	 	 	 " t h e m e "   :   ' ' ,  
 	 	 	 	 	 " u s e r n a m e "   :   e m a i l _ u s e r ,  
 	 	 	 	 	 " p a s s w o r d "   :   e m a i l _ p w d  
 	 	 	 	 } ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " g m a i l " :  
 	 	 	 e n g i n e U r l   =   ' h t t p s : / / w w w . g o o g l e . c o m / a c c o u n t s / S e r v i c e L o g i n A u t h ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 	 s e r v i c e   :   ' m a i l ' ,  
 	 	 	 	 	 " c o n t i n u e "   :   " h t t p : / / g m a i l . g o o g l e . c o m / g m a i l " ,  
 	 	 	 	 	 E m a i l   :   e m a i l _ u s e r ,  
 	 	 	 	 	 P a s s w d   :   e m a i l _ p w d  
 	 	 	 	 } ;  
 	 	 	 b r e a k ;  
 	 }            
 	 v a r   s u p p l i e r = s e l e c t e d . v a l u e ;  
 	 v a r   l i n k _ n a m e = ' ×éÑÕß  ÓÕÐè' ;  
 	 v a r   u r l = ' ÐÙéÕè' ;  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	 u i P o s t T o N e w W i n d o w ( e n g i n e U r l ,   p a r a m e t e r s ) ;  
 }  
  
 f u n c t i o n   u i E n g i n e s _ a d d e r e s s _ s u b m i t ( )  
 {    
  
 	 v a r   s e l e c t e d = u i R a d i o S e l e c t e d ( ' e n g i n e _ o p t i o n s ' ) ;  
 	 i f   ( ! s e l e c t e d )  
 	 	 r e t u r n ;  
 	 v a r   a d r e s s _ i n p u t = $ ( ' a d r e s s _ i n p u t ' ) . v a l u e ;  
 	 v a r   e n g i n e U r l ,   p a r a m e t e r s ;  
 	 s w i t c h   ( s e l e c t e d . v a l u e )  
 	 {  
 	 	 c a s e   " 1 4 4 " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / w w w . b 1 4 4 . c o . i l / B u s i n e s s R e s u l t s . a s p x ? _ b u s i n e s s = & _ b u s i n e s s _ n a m e = '   +   e n c o d e U R I ( a d r e s s _ i n p u t )   +   ' & _ a r e a _ c o d e = 0 & _ c i t y = & _ s t r e e t = & s t n = ' ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " d a p a z " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / w w w . d . c o . i l / ? a r e n a = B u s i n e s s & c a l l b a c k = F o r m _ F i n d & f o r m G r o u p = m a i n & l a n g u a g e = H E B & p a g e = S u m m a r i e s & p r e v i o u s P a g e = H o m e & p r e v p a g e = H o m e & _ b u s i n e s s _ n a m e = '   +   a d r e s s _ i n p u t ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " p o s t i l " :  
 	 	 	 e n g i n e U r l   =   ' h t t p : / / w e b 0 2 . p o s t i l . c o m / z i p c o d e . n s f / s e a r c h z i p ? O p e n F o r m & S e q = 1 ' ;  
 	 	 	 p a r a m e t e r s   =   {  
 	 	 	 	 _ _ C l i c k 	 :   0 ,  
 	 	 	 	 z i p C i t y   :   a d r e s s _ i n p u t ,  
 	 	 	 	 z i p S t r e e t   :   ' ' ,  
 	 	 	 	 z i p P O B   :   ' ' ,  
 	 	 	 	 l o c a t i o n _ d a t a   :   ' ' ,  
 	 	 	 	 s t r e e t _ i d   :   ' '  
 	 	 	 }  
 	 	 	 b r e a k ;  
 	 }  
 	 d o c u m e n t . c h a r s e t   =   " w i n d o w s - 1 2 5 5 " ;  
 	 v a r   s u p p l i e r = s e l e c t e d . v a l u e ;  
 	 v a r   l i n k _ n a m e = ' ØÜäÕß\ ÛêÕÑê' ;  
 	 v a r   u r l = ' ×äé' ;  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	 u i P o s t T o N e w W i n d o w ( e n g i n e U r l ,   p a r a m e t e r s ) ;        
 }  
 f u n c t i o n   u i E n g i n e s _ p r i c e _ c o m p a r e _ s u b m i t ( i s _ c a t e g o r y )  
 {  
 	 v a r   u r l ; v a r   u r l l n k ;  
 	 i f   ( i s _ c a t e g o r y )  
 	 {  
 	         u r l   =   ' h t t p : / / s t a r t . z a p . c o . i l / c a t . a s p ? l a y o u t = s t a r t & c a t = '   +   $ ( ' p r i c e _ c o m p a r e _ c a t e g o r y ' ) . v a l u e ;  
 	       u r l l n k = $ ( ' p r i c e _ c o m p a r e _ c a t e g o r y ' ) . v a l u e ;  
 	 }  
 	 e l s e  
 	 {  
 	 	 u r l   =   ' h t t p : / / s t a r t . z a p . c o . i l / m o d e l s . a s p ? k e y w o r d = '   +   e n c o d e U R I ( $ ( ' p r i c e _ c o m p a r e _ s e a r c h ' ) . v a l u e ) ;  
                 u r l l n k = $ ( ' p r i c e _ c o m p a r e _ s e a r c h ' ) . v a l u e ;  
         }  
         v a r   s u p p l i e r = ' z a p ' ;  
 	 v a r   l i n k _ n a m e = ' ÔéÕÕÐê  Þ×ÙèÙÝ' ;  
 	  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l l n k + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l l n k ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	 u i P o s t T o N e w W i n d o w ( u r l ) ;        
 }  
 f u n c t i o n   u i E n g i n e s _ t r a n s l a t e _ s u b m i t ( )  
 {     v a r   u r i = ' h t t p : / / t r a n s l a t e . g o o g l e . c o . i l / t r a n s l a t e _ t ? p r e v = h p & h l = i w & j s = y & t e x t = ' + $ ( ' t r a n s l a t e _ s e a r c h ' ) . v a l u e + ' & f i l e = & s l = ' + $ ( ' o l d _ s l ' ) . v a l u e + ' & t l = ' + $ ( ' o l d _ t l ' ) . v a l u e + ' & h i s t o r y _ s t a t e 0 = # ' ;  
       w i n d o w . o p e n ( u r i ) ;    
     / /     w i n d o w . o p e n ( ' h t t p : / / w w w . b a b y l o n . c o m / d e f i n i t i o n / '   +   $ ( ' t r a n s l a t e _ s e a r c h ' ) . v a l u e   +   ' / '   +   $ ( ' t r a n s l a t e _ c a t e g o r y ' ) . v a l u e ) ;  
     v a r   s u p p l i e r = ' g o o g l e ' ;  
       v a r   l i n k _ n a m e = ' êèÒÕÝ  ÞÙÜÙÝ' ;  
       v a r   u r l l n k = ' êèÒÝ' ; 	  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l l n k + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l l n k ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	  
 }  
 f u n c t i o n   u i E n g i n e s _ b o a r d s _ s u b m i t ( )  
 {  
         v a r   s e l e c t _ b o a r d s   =   $ ( ' s e l e c t _ b o a r d s ' ) ;  
         v a r   s e l e c t _ c a t _ b o a r d s   =   $ ( ' s e l e c t _ c a t _ b o a r d s ' ) ;  
         i f   ( s e l e c t _ b o a r d s . v a l u e   & &   s e l e c t _ b o a r d s . v a l u e )  
         {  
             v a r   e n g i n e U r l   =   s e l e c t _ b o a r d s . o p t i o n s [ s e l e c t _ b o a r d s . s e l e c t e d I n d e x ] . g e t A t t r i b u t e ( ' u r l ' )   +   ' ? c a t = '   +   s e l e c t _ c a t _ b o a r d s . o p t i o n s [ s e l e c t _ c a t _ b o a r d s . s e l e c t e d I n d e x ] . v a l u e ;  
               {  
                 v a r   w =   w i n d o w . o p e n ( e n g i n e U r l ) ;  
                   i f   ( w )  
                     w . f o c u s ( ) ;  
             }  
              
         }  
 }  
                          
 f u n c t i o n   u i E n g i n e s _ c a r s S u b m i t ( )  
 {  
 	 v a r   s e l e c t _ s u b 2 _ c a r s   =   $ ( ' s e l e c t _ s u b 2 _ c a r s ' ) ;  
 	 i f   ( s e l e c t _ s u b 2 _ c a r s . v a l u e )  
 	 {  
 	 	 v a r   w =   w i n d o w . o p e n ( s e l e c t _ s u b 2 _ c a r s . o p t i o n s [ s e l e c t _ s u b 2 _ c a r s . s e l e c t e d I n d e x ] . g e t A t t r i b u t e ( ' u r l ' ) ) ;  
 	 	 i f   ( w )  
 	 	 w . f o c u s ( ) ;  
 	 }  
 }  
 f u n c t i o n   u i E n g i n e s _ N e w c a r s S u b m i t ( )  
 {  
 	 v a r   s e l e c t _ s u b 2 _ c a r s   =   $ ( ' s e l e c t _ c a r s _ m o d e l s ' ) ;  
 	 v a r   s e l e c t _ c a r s   =   $ ( ' s e l e c t _ c a r _ m a n u f a c t u r e r ' ) ;  
 	 i f   ( s e l e c t _ s u b 2 _ c a r s . v a l u e )  
 	 {  
 	 	 v a r   w =   w i n d o w . o p e n ( s e l e c t _ c a r s . o p t i o n s [ s e l e c t _ c a r s . s e l e c t e d I n d e x ] . g e t A t t r i b u t e ( ' u r l ' ) + " ? q = " +   s e l e c t _ c a r s . o p t i o n s [ s e l e c t _ c a r s . s e l e c t e d I n d e x ] . t e x t   + " & m o d e l = " + s e l e c t _ s u b 2 _ c a r s . v a l u e ) ;  
 	 	 i f   ( w )  
 	 	 w . f o c u s ( ) ;  
 	 }  
 }  
  
 f u n c t i o n   u i E n g i n e s _ a l l J o b s D i p o S u b m i t ( )  
 {  
         v a r   s e l e c t _ d i p o   =   $ ( ' s e l e c t _ j o b _ d i p o _ c a t ' ) ;  
         i f   ( s e l e c t _ d i p o . v a l u e )  
 	 {  
 	 	  
 	 	 v a r   w =   w i n d o w . o p e n ( s e l e c t _ d i p o . v a l u e ) ;  
 	 	 i f   ( w )  
 	 	 w . f o c u s ( ) ;  
 	 }  
 	  
       v a r   s u p p l i e r = ' o f e k 1 ' ;  
       v a r   l i n k _ n a m e = ' ÑÙê  ÓäÕá' ;  
       v a r   u r l l n k = ' ×ÙäÕé' ; 	  
       p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l l n k + " : " + s u p p l i e r ) ;        
       u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l l n k ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	  
 }  
  
 f u n c t i o n   u i E n g i n e s _ c o i n _ c o n v e r t _ s u b m i t ( )  
 {  
 	  
 	 v a r   u r l   =   ' h t t p : / / w w w . i f o r e x . c o m / s c r i p t s / r a t e s / x c o n v e r t . a s p x ' ;  
 	 v a r 	 p a r a m e t e r s   =   {  
 	 	 A m o u n t   :   $ ( ' e n g i n e _ c o i n _ c o n v e r t _ s u m ' ) . v a l u e  
 	 	 , F r o m   :   $ ( ' e n g i n e _ c o i n _ c o n v e r t _ f r o m ' ) . v a l u e  
 	 	 , T o   :   $ ( ' e n g i n e _ c o i n _ c o n v e r t _ t o ' ) . v a l u e  
 	 } ;                
 	  
 	 u i P o s t T o N e w W i n d o w ( u r l , p a r a m e t e r s ) ;        
       v a r   s u p p l i e r = ' i f o r e x ' ;  
       v a r   l i n k _ n a m e = ' ÔÞèê  ÞêÑâ' ;  
       v a r   u r l l n k = ' ×äé' ; 	  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l l n k + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l l n k ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	        
 }  
  
 f u n c t i o n   u i E n g i n e s _ w i n w i n _ s u b m i t ( )  
 {  
          
                   v a r   S e l e c t e d V a l u e   = $ ( ' e n g i n e _ w i n w i n _ b o a r d _ f r o m ' ) . o p t i o n s [ $ ( ' e n g i n e _ w i n w i n _ b o a r d _ f r o m ' ) . s e l e c t e d I n d e x ] . v a l u e ;    
                         i f ( S e l e c t e d V a l u e ! = " " )  
                         {  
                             v a r   n e w W i n d o w   =   w i n d o w . o p e n ( S e l e c t e d V a l u e ,   ' _ b l a n k ' ) ;    
                               n e w W i n d o w . f o c u s ( ) ;  
                         }  
      
       v a r   s u p p l i e r = ' w i n w i n ' ;  
       v a r   l i n k _ n a m e = ' ÜÕ×Õê' ;  
       v a r   u r l = S e l e c t e d V a l u e 	  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
      
 }  
  
 f u n c t i o n   u i E n g i n e s _ a l l j o b s _ s u b m i t ( )  
 {  
  
         v a r   C m b J o b s S e l e c t e d V a l u e   =   $ ( ' c m b J o b s ' ) . o p t i o n s [ $ ( ' c m b J o b s ' ) . s e l e c t e d I n d e x ] . v a l u e ;          
 	 v a r   C m b J o b T y p e s S e l e c t e d V a l u e   =   $ ( ' J o b T y p e s ' ) . o p t i o n s [ $ ( ' J o b T y p e s ' ) . s e l e c t e d I n d e x ] . v a l u e ;  
 	 v a r   C m b R e g i o n s S e l e c t e d V a l u e   =   $ ( ' R e g i o n s ' ) . o p t i o n s [   $ ( ' R e g i o n s ' ) . s e l e c t e d I n d e x ] . v a l u e ;  
 	 i f (   p a r s e I n t ( C m b J o b s S e l e c t e d V a l u e )   = =   - 1   | |   p a r s e I n t ( C m b J o b s S e l e c t e d V a l u e )   = =   0 )    
 	         C m b J o b s S e l e c t e d V a l u e   =   " " ;  
 	 i f ( p a r s e I n t ( C m b J o b T y p e s S e l e c t e d V a l u e )   = =   - 1   | |   p a r s e I n t ( C m b J o b T y p e s S e l e c t e d V a l u e )   = =   0 )  
 	         C m b J o b T y p e s S e l e c t e d V a l u e   =   " " ;  
 	 i f ( p a r s e I n t ( C m b R e g i o n s S e l e c t e d V a l u e )   = =   - 1   | |   p a r s e I n t ( C m b R e g i o n s S e l e c t e d V a l u e )   = =   0 )  
 	       C m b R e g i o n s S e l e c t e d V a l u e   =   " " ;  
  
 	 v a r   U r l T o D i r e c t   =   " h t t p : / / w w w . a l l j o b s . c o . i l / S e a r c h R e s u l t s G u e s t . a s p x ? p a g e = 1 & p o s i t i o n = " + C m b J o b s S e l e c t e d V a l u e + " & r e g i o n = " + C m b R e g i o n s S e l e c t e d V a l u e + " & t y p e = " + C m b J o b T y p e s S e l e c t e d V a l u e + " & p a r a m a f f i l i a t e = 1 0 5 5 " ;  
         v a r   n e w W i n d o w   =   w i n d o w . o p e n ( U r l T o D i r e c t ,   ' _ b l a n k ' ) ;    
 	 n e w W i n d o w . f o c u s ( ) ;  
 	     v a r   s u p p l i e r = ' a l l j o b s ' ;  
       v a r   l i n k _ n a m e = ' ÓèÕéÙÝ' ;  
       v a r   u r l = ' ×äé' ; 	  
 	 p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l + " : " + s u p p l i e r ) ;        
         u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
      
 }  
  
 f u n c t i o n   u i E n g i n e s _ m o v i e _ s u b m i t ( b y _ c i n e m a )  
 {  
 	 v a r   u r l ;  
 	 v a r   c i n e m a _ s e l e c t   =   $ ( ' c i n e m a _ s e l e c t ' ) ;  
 	 v a r   m o v i e _ v a l u e   =   $ ( ' m o v i e _ s e l e c t ' ) . v a l u e ;  
  
 	 i f   ( b y _ c i n e m a )  
 	 {  
 	 	 i f   ( c i n e m a _ s e l e c t . v a l u e = = ' ' )  
 	 	 	 r e t u r n ;  
 	 	 i f   ( c i n e m a _ s e l e c t . o p t i o n s [ c i n e m a _ s e l e c t . s e l e c t e d I n d e x ] . c l a s s N a m e = = ' m o v i e _ a r e a ' )  
 	 	 	 u r l   =   ' h t t p : / / w w w . s e r e t . c o . i l / m o v i e s / l _ m o v i e s . a s p ? f _ a r e a I d = ' + c i n e m a _ s e l e c t . v a l u e ;  
 	 	 e l s e  
 	 	 	 u r l   =   ' h t t p : / / w w w . s e r e t . c o . i l / m o v i e s / s _ t h e a t r e s . a s p ? T I D = ' + c i n e m a _ s e l e c t . v a l u e ;  
 	 }   e l s e   {  
 	 	 i f   ( m o v i e _ v a l u e = = ' ' )  
 	 	 	 r e t u r n ;  
 	 	 u r l   =   ' h t t p : / / w w w . s e r e t . c o . i l / m o v i e s / s _ m o v i e s . a s p ? M I D = ' + m o v i e _ v a l u e ;  
 	 }  
 	 u r l + =   ' & T i t l e = '   +   e s c a p e ( ' ×ÙäÕé  áèØ' )  
 	 	 +   ' & S o u r c e = '   +   e s c a p e ( ' ÞàÕâÙÝ' ) ;  
 	 v a r   n e w W i n d o w   =   w i n d o w . o p e n ( u r l ,   ' _ b l a n k ' ) ;    
 	 n e w W i n d o w . f o c u s ( ) ;    
       v a r   s u p p l i e r = ' s e r e t ' ;  
       v a r   l i n k _ n a m e = ' áèØÙÝ' ;  
       v a r   u r l l n k = ' ×ÙäÕé' ; 	  
       p a g e T r a c k e r . _ t r a c k P a g e v i e w ( l i n k _ n a m e + " : " + u r l l n k + " : " + s u p p l i e r ) ;        
       u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = L i n k s _ U s e r C l i c k s _ I n s e r t & l i n k _ n a m e = ' + e s c a p e ( l i n k _ n a m e ) + ' & u r l = ' + e s c a p e ( u r l l n k ) + ' & s u p p l i e r = ' + e s c a p e ( s u p p l i e r ) ) ;  
 	  
 	  
 	  
 }    
 / / e n g i n e s   e n d  
 v a r   u i P a g e T i m e o u t T i m e r = n u l l ;  
 f u n c t i o n   u i R e s e t P a g e T i m e o u t ( )  
 {  
 / *  
         i f   ( w i n d o w . u i P a r a m s   & &   u i P a r a m s . m o d e l = = ' s t a r t ' )  
         {  
                 i f   ( u i P a g e T i m e o u t T i m e r )  
                         w i n d o w . c l e a r T i m e o u t ( u i P a g e T i m e o u t T i m e r ) ;  
                          
               u i P a g e T i m e o u t T i m e r   =   w i n d o w . s e t T i m e o u t ( f u n c t i o n ( ) { d o c u m e n t . l o c a t i o n . r e l o a d ( ) ; } , 1 0 0 0 * 6 0 * 5 ) ;  
         }  
 * /  
 }  
  
 v a r   u i B r o w s e r   =   ' ' ;  
 f u n c t i o n   u i P r e I n i t ( )   {  
         v a r   u s e r A g e n t   =   n a v i g a t o r . u s e r A g e n t ;  
         i f   ( u s e r A g e n t . i n d e x O f ( ' F i r e f o x / 2 ' )   >   - 1 )  
                 u i B r o w s e r   =   ' f i r e f o x 2 ' ;  
         e l s e   i f   ( d o c u m e n t . a l l )  
                 u i B r o w s e r   =   ' e x p l o r e r ' ;  
         e l s e   i f   ( u s e r A g e n t . i n d e x O f ( ' F i r e f o x ' )   >   - 1 )  
                 u i B r o w s e r   =   ' f i r e f o x ' ;  
         e l s e   i f   ( u s e r A g e n t . i n d e x O f ( ' C h r o m e ' )   >   - 1 )  
                 u i B r o w s e r   =   ' c h r o m e ' ;  
         e l s e   i f   ( u s e r A g e n t . i n d e x O f ( ' S a f a r i ' )   >   - 1 )  
                 u i B r o w s e r   =   ' s a f a r i ' ;  
         e l s e  
                 u i B r o w s e r   =   ' o t h e r ' ;  
          
       v a r   I s N e w S i t e U s e r   =   u i G e t C o o k i e ( ' I s N e w S i t e U s e r ' ) ;  
       i f   ( d o c u m e n t . l o c a t i o n . h r e f . i n d e x O f ( " 1 . s t a r t . c o . i l " ) = = - 1 )  
         {  
               i f   ( I s N e w S i t e U s e r = = ' f a l s e '     )  
               {  
                         i f   ( d o c u m e n t . l o c a t i o n . h r e f . i n d e x O f ( ' c a m e F r o m = o l d S i t e ' ) = = - 1 )  
                                 d o c u m e n t . l o c a t i o n . h r e f = ' h t t p : / / w w w . 1 . s t a r t . c o . i l / ? c a m e F r o m N e w S i t e = 1 ' ;  
                         e l s e                        
                               u i S e t C o o k i e ( ' I s N e w S i t e U s e r ' , ' t r u e ' , 0 ) ;      
                 }  
         }  
        
 }  
  
 f u n c t i o n   u i I n i t ( )   {  
       i f   ( u i P a r a m s . m o d e l = = ' s e a r c h '   & &   $ ( ' c s e - s e a r c h - b o x ' ) )  
                 $ ( ' c s e - s e a r c h - b o x ' ) . t a r g e t = ' ' ;  
            
         v a r   r   =   M a t h . r a n d o m ( ) ;  
         i f   ( r < . 5 )  
                 u i T a b C l i c k ( n u l l , $ ( ' e n g i n e _ d e a l s ' ) ) ;  
                  
       v a r   b o x _ o r d e r = u i G e t C o o k i e ( ' b o x _ o r d e r ' ) ;  
       i f   ( b o x _ o r d e r )  
               u i S o r t B o x e s ( b o x _ o r d e r ) ; / / u i O r d e r O r i g i n a l . s p l i t ( ' , ' ) , b o x _ o r d e r . s p l i t ( ' , ' ) ) ;  
        
       v a r   h e a d e r _ t o p _ l i n e _ d a t e   =   $ ( ' h e a d e r _ t o p _ l i n e _ d a t e ' ) ;  
         i f   ( h e a d e r _ t o p _ l i n e _ d a t e )  
         {  
          
               u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = f u n & a c t i o n = C o n t e n t _ G e t D a t e '   , n u l l  
               ,   f u n c t i o n ( r e s p o n s e ) {  
                        
                         i f   ( r e s p o n s e . l e n g t h > 5 0 )  
                         {  
                                 v a r   d a t e   =   n e w   D a t e ( ) ;  
                                 r e s p o n s e = ( d a t e . g e t D a t e ( ) ) + ' / ' + ( d a t e . g e t M o n t h ( ) + 1 ) + ' / ' + ( d a t e . g e t Y e a r ( ) ) ;  
                         }  
                         i f   ( u i B r o w s e r = = ' e x p l o r e r ' )  
                                 h e a d e r _ t o p _ l i n e _ d a t e . i n n e r T e x t   =   r e s p o n s e ;  
                         e l s e  
                                 h e a d e r _ t o p _ l i n e _ d a t e . t e x t C o n t e n t   =   r e s p o n s e ;  
               } ) ;  
         }  
       i f   ( u i G e t C o o k i e ( ' h i d e A d u l t C o n t e n t ' ) ! = ' t r u e ' )  
                 u i A d d S t y l e ( ' a d u l t ' ) ;  
                  
       d o c u m e n t . o n c l i c k = u i U s e r C l i c k s ;  
       d o c u m e n t . o n f o c u s = u i R e s e t P a g e T i m e o u t ;  
       u i R e s e t P a g e T i m e o u t ( ) ;  
  
  
       u i O z e n   =   $ ( ' o z e n ' ) ;  
 / /       i f   ( u i P a r a m s . m o d e l = = ' d c ' )  
 / /         {  
                 i f   ( $ ( ' p l a z m a _ d i v ' ) ) {  
                 / /         $ ( ' m a i n ' ) . s t y l e . w i d t h   =   " 8 9 5 p x " ;  
                         }  
                 / / u i S e t C o o k i e ( ' s e e n P l a z m a ' , ' f a l s e ' , 1 ) ; / / 3 r d   p a r a m e t e r   -   d a y s   t o   r e m e b e r   c o o c k i e  
                 i f   ( $ ( ' p l a z m a _ d i v ' )   & &   u i G e t C o o k i e ( ' s e e n P l a z m a ' ) ! = ' t r u e '   )  
                 {  
                         $ ( ' p l a z m a _ d i v ' ) . s t y l e . d i s p l a y = ' b l o c k ' ;  
                         $ ( ' j u m b o ' ) . s t y l e . d i s p l a y = ' n o n e ' ;  
                         i f   ( u i O z e n )  
                         {  
                       / /           u i O z e n . h i d d e n _ b y _ p l a z m a = t r u e ;  
                                 c h e c k W i n d o w S i z e ( f a l s e ) ;  
                                 / / u i O z e n . s t y l e . d i s p l a y = ' n o n e ' ;  
                         }  
                                
                           i f   ( $ ( ' b i g b o x ' ) )      
                           {    
                                 $ ( ' b i g b o x ' ) . s t y l e . d i s p l a y = ' n o n e ' ;  
                         }  
                         v a r   u r l   =   $ ( ' p l a z m a ' ) . g e t A t t r i b u t e ( ' n s r c ' ) ;  
                         u r l = u r l . r e p l a c e ( ' $ r a n d o m $ ' ,   M a t h . r o u n d ( M a t h . r a n d o m ( ) * 1 0 0 0 0 0 0 )   ) ;  
                         $ ( ' p l a z m a ' ) . s r c = u r l ;  
                         u i S e t C o o k i e ( ' s e e n P l a z m a ' , ' t r u e ' , 1 ) ; / / 3 r d   p a r a m e t e r   -   d a y s   t o   r e m e b e r   c o o c k i e  
                          
                 }  
                 e l s e  
                 {  
                         c h e c k W i n d o w S i z e ( t r u e ) ;  
                         i f   ( $ ( ' p l a z m a _ d i v ' ) )                  
                                 $ ( ' p l a z m a ' ) . r e m o v e A t t r i b u t e ( ' n s r c ' ) ;  
                 }  
 / /         }  
         i f   ( u i O z e n )  
         {  
                 u i S i d e A d B y W i d t h ( ) ;  
                 w i n d o w . o n r e s i z e = u i S i d e A d B y W i d t h ;  
         }  
       i f   ( u i P a r a m s . m o d e l = = ' s e a r c h ' )  
       {  
        
       }  
       i f   ( d o c u m e n t . l o c a t i o n . h r e f . i n d e x O f ( " 1 . s t a r t . c o . i l " ) ! = - 1 )  
       {  
              
                 v a r   i m g O b j   =   $ ( ' n e w S t a r t L o g o I m g ' ) ;        
                 i m g O b j . s t y l e . d i s p l a y = ' b l o c k ' ;  
       }  
                  
 }  
  
 f u n c t i o n   u i C l o s e P l a z m a ( )  
 {  
         u i S e t C o o k i e ( ' s e e n P l a z m a ' , ' t r u e ' , 1 ) ; / / 3 r d   p a r a m e t e r   -   d a y s   t o   r e m e b e r   c o o c k i e  
         $ ( ' p l a z m a _ d i v ' ) . s t y l e . d i s p l a y = ' n o n e ' ;  
         $ ( ' j u m b o ' ) . s t y l e . d i s p l a y = ' ' ;  
         i f (   $ ( ' b i g b o x ' ) )  
         {  
                 $ ( ' b i g b o x ' ) . s t y l e . d i s p l a y = ' ' ;  
         }  
         i f   ( u i O z e n )  
         {  
                   c h e c k W i n d o w S i z e ( t r u e ) ;  
             / /     u i O z e n . h i d d e n _ b y _ p l a z m a = f a l s e ;  
         / /         u i S i d e A d B y W i d t h ( ) ;  
         }  
 }  
 f u n c t i o n   u i S h o w K u p o n ( l i n k , c o n t e n t _ i d )  
 {  
         v a r   k u p o n _ f r a m e   =     $ ( ' k u p o n _ f r a m e ' ) ;  
         k u p o n _ f r a m e . s t y l e . d i s p l a y = ' b l o c k ' ;  
         v a r   p o s   =   u i G e t P o s i t i o n ( l i n k ) ;  
         k u p o n _ f r a m e . s r c = ' h t m l / k u p o n . h t m l ? c o n t e n t _ i d = '   +   c o n t e n t _ i d ;  
         k u p o n _ f r a m e . s t y l e . t o p   =   ( p o s . y + 2 0 )   + ' p x ' ;  
         k u p o n _ f r a m e . s t y l e . l e f t   =   ( p o s . x + 3 0 0 )   + ' p x ' ;  
 }  
 u i P r e I n i t ( )   ;  
 f u n c t i o n   u i S e a r c h O n E n t e r ( e v e n t )  
 {  
    
         i f   ( u i E n t e r P r e s s e d ( e v e n t ) )   { r e t u r n   u i H e a d e r S e a r c h ( t r u e ) ; }  
         r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   S h o w N e w S t a r t ( d i v N a m e , s r c , w i d t h , h e i g h t )  
 {  
         v a r   d i v O b j   =   $ ( ' N e w S t a r t P o p u p ' ) ;        
         d i v O b j . s t y l e . d i s p l a y = ' ' ;  
         d i v O b j . s t y l e . t o p   =   " 4 0 p x " ;  
         s t a r t T o p   =   d o c u m e n t . b o d y . c l i e n t W i d t h / 2 ;  
         d i v O b j . s t y l e . l e f t   =   s t a r t T o p   +   " p x " ;  
         d i v O b j . s t y l e . w i d t h   =   " 3 p x " ;  
         d i v O b j . s t y l e . h e i g h t   =   h e i g h t   +   " p x " ;  
         A n i m a t e W i d t h ( d i v O b j , w i d t h , s r c ) ;        
        
 }  
  
 f u n c t i o n   A n i m a t e W i d t h ( d i v O b j , w i d t h , s r c )  
 {  
     v a r   S t o p d i v L e f t   =   p a r s e I n t ( d i v O b j . s t y l e . l e f t ) - w i d t h / 2 ;  
     v a r   d e l t a   =   3 0 ;  
       d i v O b j . i n t e r v a l   =   s e t I n t e r v a l ( f u n c t i o n ( )   {          
                 i f   (   p a r s e I n t ( d i v O b j . s t y l e . w i d t h )   > =     w i d t h   & &   p a r s e I n t ( d i v O b j . s t y l e . l e f t )   < =   S t o p d i v L e f t )  
                 {  
                                 d i v O b j . i n n e r H T M L   =   " < o b j e c t   c l a s s i d = ' c l s i d : D 2 7 C D B 6 E - A E 6 D - 1 1 c f - 9 6 B 8 - 4 4 4 5 5 3 5 4 0 0 0 0 '     c o d e b a s e = ' h t t p : / / d o w n l o a d . m a c r o m e d i a . c o m / p u b / s h o c k w a v e / c a b s / f l a s h / s w f l a s h . c a b # v e r s i o n = 7 , 0 , 0 , 0 '   w i d t h = ' 9 0 5 '   h e i g h t = ' 4 2 1 '   s r c = ' " + s r c + " '   w m o d e = ' t r a n s p a r e n t '   > < p a r a m   n a m e = ' m o v i e '   v a l u e = ' " + s r c + " ' > < / p a r a m > < p a r a m   n a m e = ' w m o d e '   v a l u e = ' t r a n s p a r e n t ' > < / p a r a m > < e m b e d   w i d t h = ' 9 0 5 '   h e i g h t = ' 4 2 1 '     s r c = ' " + s r c + " '     t y p e = ' a p p l i c a t i o n / x - s h o c k w a v e - f l a s h '   p l u g i n s p a g e = ' h t t p : / / w w w . a d o b e . c o m / s h o c k w a v e / d o w n l o a d / d o w n l o a d . c g i ? P 1 _ P r o d _ V e r s i o n = S h o c k w a v e F l a s h '   q u a l i t y = ' h i g h '   > < / e m b e d > < o b j e c t / > " ;  
                                 w i n d o w . c l e a r I n t e r v a l ( d i v O b j . i n t e r v a l ) ;  
                                 d i v O b j . i n t e r v a l   =   n u l l ;  
                                 d i v O b j . s t y l e . b a c k g r o u n d C o l o r = " t r a n s p a r e n t " ;                                  
                   }  
                   i f   ( p a r s e I n t ( d i v O b j . s t y l e . l e f t )   > =   S t o p d i v L e f t )  
                 {  
                         d i v O b j . s t y l e . l e f t   =   p a r s e I n t ( d i v O b j . s t y l e . l e f t ) - 2 0   +   " p x " ;  
                 }  
                 d e l t a   =   (   p a r s e I n t ( d i v O b j . s t y l e . w i d t h ) +   d e l t a   <   w i d t h   ?   d e l t a   :   w i d t h - p a r s e I n t ( d i v O b j . s t y l e . w i d t h )   ) ;  
                 d i v O b j . s t y l e . w i d t h   =   p a r s e I n t ( d i v O b j . s t y l e . w i d t h )   +   d e l t a   +   " p x " ;  
                
                
         } ,   3 ) ;    
 }  
 f u n c t i o n   C l o s e N e w S t a r t ( )  
 {  
         v a r   d i v O b j   =   $ ( ' N e w S t a r t P o p u p ' ) ;    
         s t a r t T o p   =   d o c u m e n t . b o d y . c l i e n t W i d t h / 2 ;  
         d i v O b j . s t y l e . l e f t   =   s t a r t T o p   +   " p x " ;    
         d i v O b j . s t y l e . w i d t h   =   " 3 p x " ;  
         d i v O b j . i n n e r H T M L   = " " ;  
         d i v O b j . s t y l e . b a c k g r o u n d C o l o r   =   " # f f f f f f " ;  
         d i v O b j . s t y l e . d i s p l a y = ' n o n e ' ;      
 }  
 f u n c t i o n   U i L i n k ( o b j )  
 	 	 	 	 {  
 	 	 	 	 v a r   s r c = o b j . f i r s t C h i l d . g e t A t t r i b u t e ( ' s r c ' ) ;  
 	 	 	 	 o b j . f i r s t C h i l d . s e t A t t r i b u t e ( ' s r c ' , o b j . f i r s t C h i l d . g e t A t t r i b u t e ( ' r s r c ' ) ) ;  
 	 	 	 	 o b j . f i r s t C h i l d . s e t A t t r i b u t e ( ' r s r c ' , s r c ) ;  
 	 	 	 	 }  
  
 f u n c t i o n   N e t e x L o a d A j a x ( o b j )  
 	 	 { i f ( ! o b j )  
 	 	   r e t u r n ;  
 	 	 u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = N e t e x P i r s _ G e t X m l F o r L o a d '  
 	 	 ,   n u l l  
 	 	 ,   f u n c t i o n ( r e s p o n s e )   {  
 	 	 o b j . i n n e r H T M L   =   r e s p o n s e ;  
 	 	 } ) ;  
 	 	 }  
 f u n c t i o n     u i R a n d o m i s e I f r a m e s ( )  
 {  
     u i R e p l a c e ( ) ;  
      
 }  
 f u n c t i o n   u i R e p l a c e ( )  
 {  
     v a r   f r a m e s = d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( ' I f r a m e ' ) ;  
       f o r ( v a r   i = 0 ; i < = f r a m e s . l e n g t h ; i + + )  
         {   i f ( f r a m e s [ i ] )  
               {  
                   i f ( f r a m e s [ i ] . g e t A t t r i b u t e ( ' n s r c ' ) ! = n u l l )  
                   {  
                   f r a m e s [ i ] . s e t A t t r i b u t e ( ' s r c ' , f r a m e s [ i ] . g e t A t t r i b u t e ( ' n s r c ' ) ) ;  
                   f r a m e s [ i ] . s e t A t t r i b u t e ( ' s r c ' , f r a m e s [ i ] . g e t A t t r i b u t e ( ' s r c ' ) . r e p l a c e ( ' $ r a n d o m $ ' ,   M a t h . r o u n d ( M a t h . r a n d o m ( ) * 1 0 0 0 0 0 0 )   ) ) ;  
                   }  
               }  
         }  
         / /   w i n d o w . s e t T i m e o u t ( f u n c t i o n ( ) { u i R e p l a c e ( ) ; } , 8 0 0 0 ) ;  
 }  
 f u n c t i o n   u i G e t E n c o d e d D a t a ( r e d )  
 {  
       i f ( $ ( r e d + ' _ c o m m N a m e ' ) . v a l u e = = ' ' | | $ ( r e d + ' _ c o m m P a s s ' ) . v a l u e = = ' ' )  
       r e t u r n ;  
       u i L o a d A s y n c ( ' f u n . a s p x ? m o d e l = '   +   u i P a r a m s . m o d e l   +   ' & a c t i o n = C o m m u n i t y _ E n c r i p t C o o k i e & u s n a m e = ' + e s c a p e ( $ ( r e d + ' _ c o m m N a m e ' ) . v a l u e ) + ' & u s p a s s = ' + e s c a p e ( $ ( r e d + ' _ c o m m P a s s ' ) . v a l u e )  
 	 	 ,   n u l l  
 	 	 ,   f u n c t i o n ( r e s p o n s e )   {  
 	 	 r e s p o n s e ;  
 	 	 w i n d o w . l o c a t i o n . h r e f = ' h t t p : / / i . s t a r t . c o . i l / A u t o r i z e . a s p x ? f i d = ' + r e s p o n s e + ' & r e d = ' + r e d ; 	  
 	 	 } ) ;  
  
 }  
 f u n c t i o n   u i p a s s i t ( i p ) {  
 i p . v a l u e = ' ' ;  
 i f ( i p . t y p e ! = ' p a s s w o r d ' )  
 {  
 v a r   n p = i p . c l o n e N o d e ( t r u e ) ;  
 n p . t y p e = ' p a s s w o r d ' ;  
 i p . p a r e n t N o d e . r e p l a c e C h i l d ( n p , i p ) ;  
 n p . f o c u s ( ) ;  
 }  
 }  
 f u n c t i o n   S e t E m p t y ( i p )  
 {  
 i p . v a l u e = ' ' ;  
 }  
 f u n c t i o n   O p e n F l a s h ( o b j )  
 {   v a r   f l g = f a l s e ;   v a r   c o n t t r f = $ ( ' G a l T r f ' ) ;   v a r   t r f c o n t = $ ( ' t r f c o n t ' ) ; v a r   m a r q = $ ( ' m r q _ t r a f f ' ) ; v a r   t t l = $ ( ' t r a f i c _ t i t l e ' ) ;  
   v a r   t r f f l a s h = $ ( ' t r f f l a s h ' ) ;  
   v a r   c o n t = u i P a r e n t ( $ ( m a r q . g e t A t t r i b u t e ( ' s h ' ) ) ) ;  
   i f ( c o n t & & c o n t . c l a s s N a m e = = ' f l a s h C l o s e d ' ) { }  
   e l s e { c o n t . c l a s s N a m e = ' f l a s h C l o s e d ' ; f l g = t r u e ; }  
   i f ( m a r q . g e t A t t r i b u t e ( ' s h ' ) = = ' g a l c o n t ' )  
   {  
   m a r q . s e t A t t r i b u t e ( ' s h ' , ' g l z c o n t ' ) ;  
   t t l . i n n e r H T M L = ' ÞÑÖçÙÝ' ;  
   t r f f l a s h . c l a s s N a m e = ' f l a s h _ t i t l e ' ;  
   }  
   e l s e  
   {  
   m a r q . s e t A t t r i b u t e ( ' s h ' , ' g a l c o n t ' ) ;  
   t t l . i n n e r H T M L = ' ÓÙÕÕ×Ù  êàÕâÔ' ;  
   t r f f l a s h . c l a s s N a m e = ' t r a f f i c _ t i t l e ' ;  
   }  
     m a r q . s t o p ( ) ;  
   m a r q . i n n e r H T M L = $ ( m a r q . g e t A t t r i b u t e ( ' s h ' ) ) . i n n e r H T M L ;  
   m a r q . s t a r t ( ) ;   t t l . t i t l e = m a r q . i n n e r H T M L ;  
   i f ( u i B r o w s e r = = ' e x p l o r e r ' )  
   { $ ( ' m r q C o n t ' ) . i n n e r H t m l = ' < m a r q u e e   g g = " 2 2 2 "   i d = " m r q _ t r a f f "   s h = " g a l c o n t "         D I R E C T I O N = " R I G H T "   S C R O L L D E L A Y = " 1 7 0 " > ' + $ ( m a r q . g e t A t t r i b u t e ( ' s h ' ) ) . i n n e r H T M L + ' < / m a r q u e e > ' ;  
  
   }  
    
  
 i f ( f l g )  
 {  
 c o n t = u i P a r e n t ( $ ( m a r q . g e t A t t r i b u t e ( ' s h ' ) ) ) ;  
 c o n t . c l a s s N a m e = ' f l a s h O p e n e d ' ;  
 t r f c o n t . s t y l e . h e i g h t = c o n t . o f f s e t H e i g h t + 5 + ' p x ' ;  
 }  
                  
 }  
 f u n c t i o n   G e t F l a s h ( o b j )  
 {  
   v a r   t r f c o n t = $ ( ' t r f c o n t ' ) ; v a r   m a r q = $ ( ' m r q _ t r a f f ' ) ;  
   v a r   c o n t = u i P a r e n t ( $ ( m a r q . g e t A t t r i b u t e ( ' s h ' ) ) ) ;  
   i f ( c o n t & & c o n t . c l a s s N a m e = = ' f l a s h C l o s e d ' )  
   {  
     m a r q . s t y l e . d i s p l a y = ' n o n e ' ;  
     o b j . c l a s s N a m e = ' C l o s e b t n '  
     c o n t . c l a s s N a m e = ' f l a s h O p e n e d ' ;  
     t r f c o n t . s t y l e . h e i g h t = c o n t . o f f s e t H e i g h t + 5 + ' p x ' ;  
   }  
   e l s e  
   {  
     m a r q . s t y l e . d i s p l a y = ' ' ;  
     m a r q . s t a r t ( ) ;  
     c o n t . c l a s s N a m e = ' f l a s h C l o s e d ' ;  
     o b j . c l a s s N a m e = ' O p e n b t n '  
     t r f c o n t . s t y l e . h e i g h t = ' ' ;    
   }  
  
      
 }  
 f u n c t i o n   c h a n g e B o x ( )  
   {  
         $ ( ' d v p s t x t ' ) . s t y l e . d i s p l a y = ' n o n e ' ;  
         $ ( ' d v p s p s ' ) . s t y l e . d i s p l a y = ' ' ;  
         $ ( ' g r o u p s _ c o m m P a s s ' ) . f o c u s ( ) ;  
   }  
   f u n c t i o n   r e s t o r e B o x ( )  
   {  
         i f ( $ ( ' g r o u p s _ c o m m P a s s ' ) . v a l u e = = ' ' )  
         {  
             $ ( ' d v p s t x t ' ) . s t y l e . d i s p l a y = ' ' ;  
             $ ( ' d v p s p s ' ) . s t y l e . d i s p l a y = ' n o n e ' ;  
         }  
   }  
   v a r   p p c N N = ( ( n a v i g a t o r . a p p N a m e   = =   " N e t s c a p e " ) & & ( d o c u m e n t . l a y e r s ) ) ;  
 	 	 	 v a r   p p c T T = " < t a b l e   d i r = \ " l t r \ "   w i d t h = \ " 1 6 0 \ "   c e l l s p a c i n g = \ " 1 \ "   c e l l p a d d i n g = \ " 2 \ "   b o r d e r = \ " 0 \ "   b o r d e r c o l o r l i g h t = \ " # 0 0 0 0 0 0 \ "   b o r d e r c o l o r d a r k = \ " # 0 0 0 0 0 0 \ " / > \ n " ;  
 	 	 	 	 v a r   p p c C D = p p c T T ; v a r   p p c F T = " < f o n t   c l a s s = \ " f N 9 s t r o n g \ "   f a c e = \ " A r i a l ,   M S   S a n s   S e r i f ,   s a n s - s e r i f \ "   s i z e = \ " 2 \ "   c o l o r = \ " # 0 0 0 0 0 0 \ " > " ;  
 	 	 	 	 	 f u n c t i o n   r e s t o r e L a y e r s ( e )  
 	 	 	 	 	 {  
 	 	 	 	 	 i f   ( p p c N N )   {  
 	 	 	 	 	 w i t h   ( w i n d o w . d o c u m e n t )   {  
 	 	 	 	 	 o p e n ( " t e x t / h t m l " ) ;  
 	 	 	 	 	 w r i t e ( " < h t m l > < h e a d > < t i t l e > R e s t o r i n g   t h e   l a y e r   s t r u c t u r e . . . < / t i t l e > < / h e a d > " ) ;  
 	 	 	 	 	 	 w r i t e ( " < b o d y   b g c o l o r = \ " # F F F F F F \ "   o n L o a d = \ " h i s t o r y . g o ( - 1 ) \ " > " ) ;  
 	 	 	 	 	 	 	 w r i t e ( " < / b o d y > < / h t m l > " ) ;  
 	 	 	 	 	 c l o s e ( ) ; } }  
 	 	 	 	 	 }  
                                
 	 	 	 	 	 f u n c t i o n   r e c o r d X Y ( e )  
 	 	 	 	 	 {  
 	 	 	 	 	 i f   ( p p c N N )   {  
 	 	 	 	 	 p p c X C   =   e . x ;  
 	 	 	 	 	 p p c Y C   =   e . y ;  
 	 	 	 	 	 d o c u m e n t . r o u t e E v e n t ( e ) ; }  
 	 	 	 	 	 }  
  
 	 	 	 	 	 f u n c t i o n   c o n f i r m X Y ( e )  
 	 	 	 	 	 {  
 	 	 	 	 	 i f   ( p p c N N )   {  
 	 	 	 	 	 p p c X C   =   ( p p c X C   = =   e . x )   ?   e . x   :   n u l l ;  
 	 	 	 	 	 p p c Y C   =   ( p p c Y C   = =   e . y )   ?   e . y   :   n u l l ;  
 	 	 	 	 	 d o c u m e n t . r o u t e E v e n t ( e ) ; }  
 	 	 	 	 	 }  
  
 	 	 	 	 	 f u n c t i o n   g e t C a l e n d a r F o r ( t a r g e t , r u l e s )  
 	 	 	 	 	 {  
 	 	 	 	 	 p p c S V   =   t a r g e t ;  
 	 	 	 	 	 p p c R L   =   r u l e s ;  
 	 	 	 	 	 i f   ( p p c F C )   { s e t C a l e n d a r ( ) ; p p c F C   =   f a l s e ; }  
 	 	 	 	 	 i f   ( ( p p c S V   ! =   n u l l ) & & ( p p c S V ) )   {  
 	 	 	 	 	 v a r   o b j   =   $ ( ' P o p U p C a l e n d a r ' ) ;  
 	 	 	 	 	 o b j . s t y l e . l e f t   =   d o c u m e n t . b o d y . s c r o l l L e f t + e v e n t . c l i e n t X ;  
 	 	 	 	 	 o b j . s t y l e . t o p     =   d o c u m e n t . b o d y . s c r o l l T o p + e v e n t . c l i e n t Y ;  
 	 	 	 	 	 o b j . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ; }  
 	 	 	 	 	 i f   ( p p c N N )   {  
 	 	 	 	 	 v a r   o b j   =   d o c u m e n t . l a y e r s [ ' P o p U p C a l e n d a r ' ] ;  
 	 	 	 	 	 o b j . l e f t   =   p p c X C ;  
 	 	 	 	 	 o b j . t o p     =   p p c Y C ;  
 	 	 	 	 	 o b j . v i s i b i l i t y   =   " s h o w " ; }  
 	 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 }  
  
 	 	 	 	 	 f u n c t i o n   s w i t c h M o n t h ( p a r a m )  
 	 	 	 	 	 {  
 	 	 	 	 	 v a r   t m p   =   p a r a m . s p l i t ( " | " ) ;  
 	 	 	 	 	 s e t C a l e n d a r ( t m p [ 0 ] , t m p [ 1 ] ) ;  
 	 	 	 	 	 }  
  
 	 	 	 	 	 f u n c t i o n   m o v e M o n t h ( d i r )    
 {  
   v a r   o b j   =   n u l l ;  
   v a r   l i m i t   =   f a l s e ;  
   v a r   t m p , d p t r Y e a r , d p t r M o n t h ;  
   o b j   =   $ ( " s I t e m " ) ;  
   i f   ( o b j   ! =   n u l l )   {  
     i f   ( ( d i r . t o L o w e r C a s e ( )   = =   " b a c k " ) & & ( 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 - - ; }  
     e l s e   i f   ( ( d i r . t o L o w e r C a s e ( )   = =   " f o r w a r d " ) & & ( o b j . s e l e c t e d I n d e x   <   1 2 ) )   { o b j . s e l e c t e d I n d e x + + ; }  
     e l s e   { l i m i t   =   t r u e ; } }  
   i f   ( ! l i m i t )   {  
     t m p   =   o b j . o p t i o n s [ o b j . s e l e c t e d I n d e x ] . v a l u e . s p l i t ( " | " ) ;  
     d p t r Y e a r     =   t m p [ 0 ] ;  
     d p t r M o n t h   =   t m p [ 1 ] ;  
     s e t C a l e n d a r ( d p t r Y e a r , d p t r M o n t h ) ; }  
   e l s e   {  
     i f   ( p p c I E )   {  
       o b j . s t y l e . b a c k g r o u n d C o l o r   =   " # F F 0 0 0 0 " ;  
       w i n d o w . s e t T i m e o u t ( " $ ( ' s I t e m ' ) . s t y l e . b a c k g r o u n d C o l o r   =   ' # F F F F F F ' " , 5 0 ) ; } }  
 }  
  
  
 f u n c t i o n   s e l e c t D a t e ( p a r a m )  
 {  
   v a r   a r r       =   p a r a m . s p l i t ( " | " ) ;  
   v a r   y e a r     =   a r r [ 0 ] ;  
   y e a r   =   y e a r * 1   -   2 0 0 0 ;  
   v a r   m o n t h   =   p a r s e I n t ( a r r [ 1 ] ) + 1 ;  
   v a r   d a t e     =   a r r [ 2 ] ;  
   v a r   p t r   =   p a r s e I n t ( d a t e ) ;  
   p p c P t r . s e t D a t e ( p t r ) ;  
 i f ( ! b o o l H a b a m a D i s p )  
   {  
 	 / / v a r   u r l   =   " h t t p : / / w w w . h a b a m a . c o . i l / D r a w W h e r e . a s p ? s t r D = "   +   d a t e   +   " & a m p ; s t r M = "   +   m o n t h   +   " & a m p ; s t r Y = "   +   y e a r ;  
 	 v a r   u r l = " h t t p : / / w w w . h a b a m a . c o . i l / P a g e s / E v e n t A l l f o r D a y . a s p x ? S u b j = 1 & A r e a = 1 & d = "   +   d a t e   +   " & m = "   +   m o n t h   +   " & y = "   +   y e a r ;  
   }  
   e l s e  
   {  
 	 v a r   u r l   =   " h t t p : / / w w w . k e n y o n i m . c o m / e v e n t s r e s u l t s . a s p ? d t = "   +   d a t e   +   " / "   +   m o n t h   +   " / "   +   y e a r ;  
   }  
   w i n d o w . o p e n ( u r l , " " , " " ) ;  
 }  
 f u n c t i o n   s e t C a l e n d a r ( y e a r , m o n t h )    
 {  
   i f   ( y e a r     = =   n u l l )   { y e a r   =   g e t F u l l Y e a r ( p p c N o w ) ; }  
   i f   ( m o n t h   = =   n u l l )   { m o n t h   =   p p c N o w . g e t M o n t h ( ) ; s e t S e l e c t L i s t ( y e a r , m o n t h ) ; }  
   i f   ( m o n t h   = =   1 )   { p p c M L [ 1 ]     =   ( i s L e a p ( y e a r ) )   ?   2 9   :   2 8 ; }  
   p p c P t r . s e t Y e a r ( y e a r ) ;  
   p p c P t r . s e t M o n t h ( m o n t h ) ;  
   p p c P t r . s e t D a t e ( 1 ) ;  
   u p d a t e C o n t e n t ( ) ; }  
 f u n c t i o n   u p d a t e C o n t e n t ( )    
 {  
   g e n e r a t e C o n t e n t ( ) ;  
   $ ( ' m o n t h D a y s ' ) . i n n e r H T M L   =   p p c C D ;  
     i f   ( p p c N N )   {  
     w i t h   ( d o c u m e n t . l a y e r s [ ' P o p U p C a l e n d a r ' ] . d o c u m e n t . l a y e r s [ ' m o n t h D a y s ' ] . d o c u m e n t )   {  
       o p e n ( " t e x t / h t m l " ) ;  
       w r i t e ( " < h t m l > \ n < h e a d > \ n < t i t l e > D y n D o c < / t i t l e > \ n < / h e a d > \ n < b o d y   b g c o l o r = \ " # F F F F F F \ " > \ n " ) ;  
       w r i t e ( p p c C D ) ;  
       w r i t e ( " < / b o d y > \ n < / h t m l > " ) ;  
       c l o s e ( ) ; } }  
    
   p p c C D   =   p p c T T ; }  
 f u n c t i o n   g e n e r a t e C o n t e n t ( )   {  
   v a r   y e a r     =   g e t F u l l Y e a r ( p p c P t r ) ;  
   v a r   m o n t h   =   p p c P t r . g e t M o n t h ( ) ;  
   v a r   d a t e     =   1 ;  
   v a r   d a y       =   p p c P t r . g e t D a y ( ) ;  
   v a r   l e n       =   p p c M L [ m o n t h ] ;  
   v a r   b g r , c n t , t m p   =   " " ;  
   v a r   j , i   =   0 ;  
   f o r   ( j   =   0 ;   j   <   7 ;   + + j )   {  
     i f   ( d a t e   >   l e n )   { b r e a k ; }  
     f o r   ( i   =   0 ;   i   <   7 ;   + + i )   {  
       b g r   =   ( ( i   = =   6 ) )   ?   " # A B 8 1 A 3 "   :   " # C 4 B 1 C 4 " ;  
       i f   ( ( ( j   = =   0 ) & & ( i   <   d a y ) ) | | ( d a t e   >   l e n ) )   { t m p     + =   m a k e C e l l ( b g r , y e a r , m o n t h , 0 ) ; }  
       e l s e   { t m p     + =   m a k e C e l l ( b g r , y e a r , m o n t h , d a t e ) ; + + d a t e ; } }  
     p p c C D   + =   " < t r   a l i g n = \ " c e n t e r \ " > \ n "   +   t m p   +   " < / t r > \ n " ; t m p   =   " " ; }  
   p p c C D   + =   " < / t a b l e > \ n " ;  
 }  
    
 f u n c t i o n   m a k e C e l l ( b g r , y e a r , m o n t h , d a t e )    
 {  
   v a r   p a r a m   =   " \ ' " + y e a r + " | " + m o n t h + " | " + d a t e + " \ ' " ;  
   v a r   t d 1   =   " < t d   w i d t h = \ " 2 4 \ "   b g c o l o r = \ " " + b g r + " \ "   " ;  
   v a r   t d 2   =   ( p p c I E )   ?   " < / f o n t > < / s p a n > < / t d > \ n "   :   " < / f o n t > < / a > < / t d > \ n " ;  
   v a r   e v t   =   " o n M o u s e O v e r = \ " t h i s . s t y l e . b a c k g r o u n d C o l o r = \ ' # f f f f f f \ ' \ "   o n M o u s e O u t = \ " t h i s . s t y l e . b a c k g r o u n d C o l o r = \ ' " + b g r + " \ ' \ "   o n M o u s e U p = \ " s e l e c t D a t e ( " + p a r a m + " ) \ "   " ;  
   v a r   e x t   =   " < s p a n   S t y l e = \ " c u r s o r :   h a n d \ " > " ;  
   v a r   l c k   =   " < s p a n   S t y l e = \ " c u r s o r :   d e f a u l t \ " > " ;  
   v a r   l n k   =   " < a   h r e f = \ " j a v a s c r i p t : s e l e c t D a t e ( " + p a r a m + " ) \ "   o n M o u s e O v e r = \ " w i n d o w . s t a t u s = \ '   \ ' ; r e t u r n   t r u e ; \ " > " ;  
   v a r   c e l l V a l u e   =   ( d a t e   ! =   0 )   ?   d a t e + " "   :   " & n b s p ; " ;  
   i f   ( ( p p c N o w . g e t D a t e ( )   = =   d a t e ) & & ( p p c N o w . g e t M o n t h ( )   = =   m o n t h ) & & ( g e t F u l l Y e a r ( p p c N o w )   = =   y e a r ) )   {  
     c e l l V a l u e   =   " < d i v   s t y l e = ' b a c k g r o u n d - c o l o r :   # F F F F F F ; ' > < b > " + c e l l V a l u e + " < / b > < / d i v > " ; }  
   v a r   c e l l C o d e   =   " " ;  
   i f   ( d a t e   = =   0 )   {  
     i f   ( p p c I E )   { c e l l C o d e   =   t d 1 + " S t y l e = \ " c u r s o r :   d e f a u l t \ " > " + l c k + p p c F T + c e l l V a l u e + t d 2 ; }  
     e l s e   { c e l l C o d e   =   t d 1 + " > " + p p c F T + c e l l V a l u e + t d 2 ; } }  
   e l s e   {  
     i f   ( p p c I E )   { c e l l C o d e   =   t d 1 + e v t + " S t y l e = \ " c u r s o r :   h a n d \ " > " + e x t + p p c F T + c e l l V a l u e + t d 2 ; }  
     e l s e   {  
       i f   ( d a t e   <   1 0 )   { c e l l V a l u e   =   " & n b s p ; "   +   c e l l V a l u e   +   " & n b s p ; " ; }  
       c e l l C o d e   =   t d 1 + " > " + l n k + p p c F T + c e l l V a l u e + t d 2 ; } }  
        
   r e t u r n   c e l l C o d e ;  
 }  
  
 f u n c t i o n   s e t S e l e c t L i s t ( y e a r , m o n t h )    
 {  
   v a r   i   =   0 ;  
   v a r   o b j   =   n u l l ;  
   o b j   =   $ ( " s I t e m " ) ;  
     i f   ( p p c N N )   { o b j   =   $ ( " s I t e m " ) ; }  
   e l s e   { / *   N O P   * / }  
   w h i l e   ( i   <   1 3 )   {  
     o b j . o p t i o n s [ i ] . v a l u e   =   y e a r   +   " | "   +   m o n t h ;  
     o b j . o p t i o n s [ i ] . t e x t     =   y e a r   +   "   "   "   +   p p c M N [ m o n t h ] ;  
     i + + ;  
     m o n t h + + ;  
     i f   ( m o n t h   = =   1 2 )   { y e a r + + ; m o n t h   =   0 ; } }  
 }  
  
 f u n c t i o n   h i d e C a l e n d a r ( )    
 {  
   i f   ( p p c I E )   { d o c u m e n t . a l l [ ' P o p U p C a l e n d a r ' ] . s t y l e . v i s i b i l i t y   =   " h i d d e n " ; }  
   e l s e   i f   ( p p c N N )   { d o c u m e n t . l a y e r s [ ' P o p U p C a l e n d a r ' ] . v i s i b i l i t y   =   " h i d e " ; w i n d o w . s t a t u s   =   "   " ; }  
   e l s e   { / *   N O P   * / }  
   p p c T I   =   f a l s e ;  
   s e t C a l e n d a r ( ) ;  
   p p c S V   =   n u l l ;  
   i f   ( p p c I E )   { v a r   o b j   =   $ ( " s I t e m " ) ; }  
   e l s e   i f   ( p p c N N )   { v a r   o b j   =   $ ( " s I t e m " ) ; }  
   e l s e   { / *   N O P   * / }  
   o b j . s e l e c t e d I n d e x   =   0 ;  
 }  
  
 f u n c t i o n   s h o w E r r o r ( m e s s a g e )    
 {  
   w i n d o w . a l e r t ( " [   P o p U p   C a l e n d a r   ] \ n \ n "   +   m e s s a g e ) ;  
 }  
 f u n c t i o n   i s L e a p ( y e a r )    
 {  
   i f   ( ( y e a r % 4 0 0 = = 0 ) | | ( ( y e a r % 4 = = 0 ) & & ( y e a r % 1 0 0 ! = 0 ) ) )   { r e t u r n   t r u e ; }  
   e l s e   { r e t u r n   f a l s e ; }  
 }  
  
 f u n c t i o n   g e t F u l l Y e a r ( o b j )  
 {  
   i f   ( p p c N N | | u i B r o w s e r = = ' f i r e f o x ' )   { r e t u r n   o b j . g e t Y e a r ( )   +   1 9 0 0 ; }  
   e l s e   { r e t u r n   o b j . g e t Y e a r ( ) ; }  
 }  
 f u n c t i o n   v a l i d D a t e ( d a t e )    
 {  
   v a r   r e p l y   =   t r u e ;  
   i f   ( p p c R L   = =   n u l l )   { / *   N O P   * / }  
   e l s e   {  
     v a r   a r r   =   p p c R L . s p l i t ( " : " ) ;  
     v a r   m o d e   =   a r r [ 0 ] ;  
     v a r   a r g     =   a r r [ 1 ] ;  
     v a r   k e y     =   a r r [ 2 ] . c h a r A t ( 0 ) . t o L o w e r C a s e ( ) ;  
     i f   ( k e y   ! =   " d " )   {  
       v a r   d a y   =   p p c P t r . g e t D a y ( ) ;  
       v a r   o r n   =   i s E v e n O r O d d ( d a t e ) ;  
       r e p l y   =   ( m o d e   = =   " [ ^ ] " )   ?   ! ( ( d a y   = =   a r g ) & & ( ( o r n   = =   k e y ) | | ( k e y   = =   " a " ) ) )   :   ( ( d a y   = =   a r g ) & & ( ( o r n   = =   k e y ) | | ( k e y   = =   " a " ) ) ) ; }  
     e l s e   { r e p l y   =   ( m o d e   = =   " [ ^ ] " )   ?   ( d a t e   ! =   a r g )   :   ( d a t e   = =   a r g ) ; } }  
   r e t u r n   r e p l y ;  
 }  
 f u n c t i o n   i s E v e n O r O d d ( d a t e )    
 {  
   i f   ( d a t e   -   2 1   >   0 )   { r e t u r n   " e " ; }  
   e l s e   i f   ( d a t e   -   1 4   >   0 )   { r e t u r n   " o " ; }  
   e l s e   i f   ( d a t e   -   7   >   0 )   { r e t u r n   " e " ; }  
   e l s e   { r e t u r n   " o " ; }  
 }  
 f u n c t i o n   d a t e F o r m a t ( y e a r , m o n t h , d a t e )    
 {  
   i f   ( p p c D F   = =   n u l l )   { p p c D F   =   " m / d / Y " ; }  
   v a r   d a y   =   p p c P t r . g e t D a y ( ) ;  
   v a r   c r t   =   " " ;  
   v a r   s t r   =   " " ;  
   v a r   c h a r s   =   p p c D F . l e n g t h ;  
   f o r   ( v a r   i   =   0 ;   i   <   c h a r s ;   + + i )   {  
     c r t   =   p p c D F . c h a r A t ( i ) ;  
     s w i t c h   ( c r t )   {  
       c a s e   " M " :   s t r   + =   p p c M N [ m o n t h ] ;   b r e a k ;  
       c a s e   " m " :   s t r   + =   + + m o n t h   ;   b r e a k ;  
       c a s e   " Y " :   s t r   + =   y e a r ;   b r e a k ;  
       c a s e   " y " :   s t r   + =   y e a r . s u b s t r i n g ( 2 ) ;   b r e a k ;  
       c a s e   " d " :   s t r   + =   d a t e ;   b r e a k ;  
       c a s e   " W " :   s t r   + =   p p c W N [ d a y ] ;   b r e a k ;  
         d e f a u l t :   s t r   + =   c r t ; } }  
   r e t u r n   u n e s c a p e ( s t r ) ;  
 }  
 f u n c t i o n   c r e a t e C a l e n d a r ( )  
 {  
 	 	 	 	  
 	 	 	 	 d o c u m e n t . w r i t e ( " < d i v   i d = \ " P o p U p C a l e n d a r \ "   s t y l e = \ " w i d t h : 1 9 0 p x ;   h e i g h t : 7 7 p x ;   o v e r f l o w :   v i s i b l e ;   v i s i b i l i t y :   v i s i b l e ;   b o r d e r :   1 p x   n o n e   # 0 0 0 0 0 0 \ " > " ) ;  
 	 	 	 	 d o c u m e n t . w r i t e ( " < d i v   i d = \ " m o n t h S e l e c t o r \ "   s t y l e = \ " w i d t h : 1 8 5 p x ;   h e i g h t : 2 7 p x ;   o v e r f l o w :   v i s i b l e ;   v i s i b i l i t y :   v i s i b l e \ " > " ) ;  
 	 	 	 	 / / e l s e   i f   ( d o c u m e n t . l a y e r s )   {  
 	 	 	 	 / / d o c u m e n t . w r i t e l n ( " < l a y e r   i d = \ " P o p U p C a l e n d a r \ "   p a g e x = \ " 0 \ "   p a g e y = \ " 0 \ "   w i d t h = \ " 2 0 0 \ "   h e i g h t = \ " 2 0 0 \ "   z - i n d e x = \ " 1 0 0 \ "   v i s i b i l i t y = \ " h i d e \ "   b g c o l o r = \ " # F F F F F F \ "   o n M o u s e O v e r = \ " i f ( p p c T I ) { c l e a r T i m e o u t ( p p c T I ) ; p p c T I = f a l s e ; } \ "   o n M o u s e O u t = \ " p p c T I = s e t T i m e o u t ( ' h i d e C a l e n d a r ( ) ' , 5 0 0 ) \ " > " ) ;  
 	 	 	 	 / / d o c u m e n t . w r i t e l n ( " < l a y e r   i d = \ " m o n t h S e l e c t o r \ "   l e f t = \ " 0 \ "   t o p = \ " 0 \ "   w i d t h = \ " 1 8 1 \ "   h e i g h t = \ " 2 7 \ "   z - i n d e x = \ " 9 \ "   v i s i b i l i t y = \ " i n h e r i t \ " > " ) ; }  
 	 	 	 	 / / e l s e   {  
 	 	 	 	 / / d o c u m e n t . w r i t e l n ( " < p > < f o n t   c o l o r = \ " # F F 0 0 0 0 \ " > < b > E r r o r   !   T h e   c u r r e n t   b r o w s e r   i s   e i t h e r   t o o   o l d   o r   t o o   m o d e r n   ( u s i n d   D O M   d o c u m e n t   s t r u c t u r e ) . < / b > < / f o n t > < / p > " ) ; }  
 	  
 }  
 v a r   b o o l H a b a m a D i s p = f a l s e ;  
  
 f u n c t i o n   c h a n g e P r o v i d e r ( )  
 {  
 	 i f ( b o o l H a b a m a D i s p )  
 	 {  
 	 	 b o o l H a b a m a D i s p   =   f a l s e ;  
 	 	 $ ( " t r H a b a m a " ) . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 $ ( " t r K e n y o n i m " ) . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 }  
 	 e l s e  
 	 {  
 	 	 b o o l H a b a m a D i s p   =   t r u e ;  
 	 	 $ ( " t r H a b a m a " ) . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 $ ( " t r K e n y o n i m " ) . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 }  
 }  
 f u n c t i o n   F i n i s h P o p u l i t e ( )  
 {  
  
 	 	 	 	 d o c u m e n t . w r i t e l n ( " < / d i v > " ) ;  
 	 	 	 	 d o c u m e n t . w r i t e l n ( " < d i v   i d = \ " m o n t h D a y s \ "   s t y l e = \ " w i d t h : 1 6 0 p x ;   h e i g h t : 1 7 p x ;   o v e r f l o w :   v i s i b l e ;   v i s i b i l i t y :   v i s i b l e ;   b a c k g r o u n d - c o l o r :   # F F F F F F ;   b o r d e r :   1 p x   n o n e   # 0 0 0 0 0 0 \ " >   < / d i v > < / d i v > " ) ;  
 	 	 	 	 / / e l s e   i f   ( d o c u m e n t . l a y e r s )   {  
 	 	 	 	 / / d o c u m e n t . w r i t e l n ( " < / l a y e r > " ) ;  
 	 	 	 	 / / d o c u m e n t . w r i t e l n ( " < l a y e r   i d = \ " m o n t h D a y s \ "   l e f t = \ " 0 \ "   t o p = \ " 5 2 \ "   w i d t h = \ " 2 0 0 \ "   h e i g h t = \ " 1 7 \ "   z - i n d e x = \ " 8 \ "   b g c o l o r = \ " # F F F F F F \ "   v i s i b i l i t y = \ " i n h e r i t \ " >   < / l a y e r > < / l a y e r > " ) ; }  
 	 	 	 	 / / e l s e   { / * N O P * / }  
  
 	 	 	 	 s e t C a l e n d a r ( )  
 }  
 d o c E l e m e n t s   =   d o c u m e n t . a l l ; 	  
  
 v a r   x m l U r l s   =    
 {  
 	 ' S e a r c h M o v i e s N a m e s ' 	 	       :   ' X m l F i l e s / s e r e t M o v i e l i s t . x m l ' 	 ,  
 	 ' S e a r c h M o v i e s T h e a t r e s '           :   ' X m l F i l e s / s e r e t T h e a t r e l i s t S t a r t . x m l '   ,  
 	 ' B u y T i c k e t s B y M o v i e ' 	 	       :   ' X m l F i l e s / s e r e t M o v i e l i s t T . x m l '   ,  
 	 ' B u y T i c k e t s B y T h e a t r e '             :   ' X m l F i l e s / s e r e t T h e a t r e L i s t T S t a r t . x m l '   ,  
 	 ' S e a r c h C a n y o n B y M a l l '               :   ' X m l F i l e s / K e n y o n i m a l l m a l l s . x m l '   ,  
 	 ' S e a r c h C a n y o n B y C a t e g o r y '       :   ' X m l F i l e s / K e n y o n i m a l l c a t e g o r i e s . x m l '   ,  
 	 ' S e a r c h C a n y o n B y A r e a ' 	       :   ' X m l F i l e s / K e n y o n i m a l l a r e a s . x m l '    
 }  
 / / t h i s   f u n c t i o n   l o a d   s e a r c h M o v i e   m o d u l e   e l e m e n t s  
 f u n c t i o n   l o a d S e a r c h M o v i e s ( )  
 {  
 	 l o a d X M l ( x m l U r l s . S e a r c h M o v i e s N a m e s ) ;  
 	 i n i t S e a r c h ( " / m o v i e s L i s t / m o v i e / " , " S e a r c h M o v i e s N a m e s " ) ;  
 	 l o a d X M l ( x m l U r l s . S e a r c h M o v i e s T h e a t r e s ) ;  
 	 i n i t S e a r c h W i t h S u b L i s t ( " / c i n e m a L i s t / a r e a " , " t h e a t r e / " , " S e a r c h M o v i e s T h e a t r e " )  
 	  
 }  
 / / t h i s   f u n c t i o n   l o a d   b u t T i c k e t s   m o d u l e   e l e m e n t s  
 f u n c t i o n   l o a d B u y T i c k e t s ( )  
 {  
 	 l o a d X M l ( x m l U r l s . B u y T i c k e t s B y T h e a t r e ) ;  
 	 i n i t S e a r c h W i t h S u b L i s t ( " / c i n e m a L i s t / a r e a " , " t h e a t r e / " , " S e a r c h B u y T i c k e t s B y T h e a t r e " )  
 	 l o a d X M l ( x m l U r l s . B u y T i c k e t s B y M o v i e ) ;  
 	 i n i t S e a r c h ( " / m o v i e s L i s t / m o v i e / " , " S e a r c h B u y T i c k e t s B y M o v i e " ) ;  
 }  
 / / t h i s   f u n c t i o n   l o a d   s e a r c h C a n y o n s   m o d u l e   e l e m e n t s  
 f u n c t i o n   l o a d S e a r c h C a n y o n s ( )  
 {  
 	 l o a d X M l ( x m l U r l s . S e a r c h C a n y o n B y M a l l ) ;  
 	 i n i t S e a r c h ( " / m a l l s L i s t / m a l l / " , " c b o M a l l " ) ;  
 	 l o a d X M l ( x m l U r l s . S e a r c h C a n y o n B y C a t e g o r y ) ;  
 	 i n i t S e a r c h ( " / c a t e g o r i e s L i s t / a r e a / " , " c b o C a t e g o r y " ) ;  
 	 l o a d X M l ( x m l U r l s . S e a r c h C a n y o n B y A r e a ) ;  
 	 i n i t S e a r c h ( " / a r e a s L i s t / a r e a / " , " c b o A r e a " ) ;  
 }  
 / / t h i s   m o d u l e   l o a d   x m l   f i l e s   t o   o b j e c t  
 f u n c t i o n   l o a d X M l ( x m l U r l )  
 {  
     S e a r c h X M L D o c   =   n e w   A c t i v e X O b j e c t ( " M s x m l 2 . D O M D o c u m e n t . 3 . 0 " ) ;  
     S e a r c h X M L D o c . a s y n c   =   f a l s e ;  
     S e a r c h X M L D o c . l o a d ( x m l U r l ) ;  
     i f   ( S e a r c h X M L D o c . p a r s e E r r o r . e r r o r C o d e   ! =   0 )    
     {  
         a l e r t ( " P r o b l e m   r e t r i e v i n g   X M L   d a t a " ) ;  
         r e t u r n ;  
     }  
 }  
 / / t h i s   f u n c t i o n   i n i t i a l i z e   d r o p   d o w n   l i s t   b y   d a t a   f r o m   x m l ( f l a t   f i l e   w i t h o u t   s u b L i s t )    
 f u n c t i o n   i n i t S e a r c h ( x m l P a t h , s e l e c t I D )  
 {  
 	 v a r   n a m e   =   t h i s . S e a r c h X M L D o c . s e l e c t N o d e s ( x m l P a t h + " n a m e " ) ;  
 	 v a r   i d       =   t h i s . S e a r c h X M L D o c . s e l e c t N o d e s ( x m l P a t h + " I D " ) ;  
 	 	  
 	 f o r   ( i = 0 ;   i < = n a m e . l e n g t h - 1 ;   i + + )  
 	 {  
 	 	 d o c E l e m e n t s [ s e l e c t I D ] . o p t i o n s [ i + 1 ]   =   n e w   O p t i o n ( n a m e [ i ] . t e x t , i d [ i ] . t e x t ) ;    
 	 }  
 	      
 }  
 / / t h i s   f u n c t i o n   i n i t i a l i z e   d r o p   d o w n   l i s t   b y   d a t a   f r o m   x m l ( w i t h   s u b L i s t )    
 f u n c t i o n   i n i t S e a r c h W i t h S u b L i s t ( x m l P a t h O u t , x m l S u b N o d e , s e l e c t I D )  
 {  
 	 v a r   a r e a s   =   t h i s . S e a r c h X M L D o c . s e l e c t N o d e s ( x m l P a t h O u t ) ;  
 	 v a r   i n d e x   =   0 ;  
 	  
 	 f o r ( i = 0 ; i < = a r e a s . l e n g t h - 1 ;   i + + )  
 	 { 	  
 	 	 v a r   a r e a s N a m e s   =   a r e a s [ i ] . s e l e c t N o d e s ( " N a m e c i t y " ) ;  
 	 	 v a r   a r e a s I D   =   a r e a s [ i ] . s e l e c t N o d e s ( " I D c i t y " ) ;  
 	 	  
 	 	 i n d e x + + ;  
 	 	 d o c E l e m e n t s [ s e l e c t I D ] . o p t i o n s [ i n d e x ]   =   n e w   O p t i o n ( a r e a s N a m e s [ 0 ] . t e x t , a r e a s I D [ 0 ] . t e x t ) ;    
 	 	 d o c E l e m e n t s [ s e l e c t I D ] . o p t i o n s [ i n d e x ] . s t y l e . b a c k g r o u n d C o l o r = ' # F A E 4 C A ' ;  
 	 	 	  
 	 	 v a r   n a m e =   a r e a s [ i ] . s e l e c t N o d e s ( x m l S u b N o d e + " n a m e " ) ;  
 	 	 v a r   i d =   a r e a s [ i ] . s e l e c t N o d e s ( x m l S u b N o d e + " I D " ) ;  
 	 	  
 	 	 f o r ( j = 0 ;   j < = n a m e . l e n g t h - 1 ;   j + + )  
 	 	 {  
 	 	 	 i n d e x + + ;  
 	 	 	 d o c E l e m e n t s [ s e l e c t I D ] . o p t i o n s [ i n d e x ]   =   n e w   O p t i o n ( n a m e [ j ] . t e x t , i d [ j ] . t e x t ) ;    
 	 	 }  
 	 }  
 }  
 v a r   a r r R e s t C i t i e s   =   [ [ ' 0 ' , ' ÛÜ  ÔÙéÕÑÙÝ' , ' 2 ' ] , [ ' 2 '   , ' ÐÕÝ  ÐÜ  ä×Ý' , ' 2 ' ] , [ ' 3 '   , ' ÐÕè  ÔÒàÕÖ' , ' 2 ' ] , [ ' 4 '   , ' ÐÕè  âçÙÑÐ' , ' 2 ' ] , [ ' 3 8 1 '   , ' ÐÙÙÜÕß' , ' 2 ' ] , [ ' 3 8 2 '   , ' ÐÙÙÜÕß' , ' 2 ' ] ,   [ ' 7 '   , ' ÐÙÜàÙÔ' , ' 2 ' ] , [ ' 8 '   , ' ÐÜÕàÙ  ÔÑéß' , ' 2 ' ] , [ ' 9 '   , ' ÐÜÕàÙÝ' , ' 2 ' ] , [ ' 1 1 '   , ' ÐÜçÕé' , ' 2 ' ] , [ ' 1 2 '   , ' ÐÞÙèÙÝ' , ' 2 ' ] , [ ' 1 3 '   , ' ÐäÙçÙÝ' , ' 2 ' ] , [ ' 1 4 '   , ' ÐéÓÕê  ÙâçÑ  ÐÙ×ÕÓ' , ' 2 ' ] , [ ' 1 5 '   , ' ÑÙê  ÐÕèß' , ' 2 ' ] , [ ' 3 3 9 '   , ' ÑÙê  ÒÐß' , ' 2 ' ] ,   [ ' 1 6 '   , ' ÑÙê  ÔÜÜ' , ' 2 ' ] , [ ' 1 7 '   , ' ÑÙê  ÔéÙØÔ' , ' 2 ' ] , [ ' 1 8 '   , ' ÑÙê  Ü×Ý  ÔÒÜÙÜÙê' , ' 2 ' ] , [ ' 2 0 '   , ' ÑÙê  éÐß' , ' 2 ' ] , [ ' 2 1 '   , ' ÑÙê  éâèÙÝ' , ' 2 ' ] , [ ' 2 3 '   , ' Ñß  âÞÙ' , ' 2 ' ] , [ ' 3 8 4 '   , ' ÑàÙ  ÙÔÕÓÔ' , ' 2 ' ] , [ ' 2 5 '   , ' ÑàÙÞÙàÔ' , ' 2 ' ] , [ ' 2 6 '   , ' Ñê  éÜÞÔ' , ' 2 ' ] , [ ' 2 7 '   , ' ÒÑâê  ÙÕÐÑ' , ' 2 ' ] , [ ' 2 8 '   , ' ÒÑâê  âÓÔ' , ' 2 ' ] , [ ' 3 0 '   , ' ÒÙÜÕß' , ' 2 ' ] , [ ' 3 1 '   , ' ÒÙàÕáè' , ' 2 ' ] , [ ' 3 5 1 '   , ' Ò\ " Ùé' , ' 2 ' ] , [ ' 3 2 '   , ' Òß  ÔéÕÞèÕß' , ' 2 ' ] , [ ' 3 3 '   , ' Òß  éÞÕÐÜ' , ' 2 ' ] , [ ' 3 4 '   , ' Òéè  ÔÖÙÕ' , ' 2 ' ] , [ ' 3 5 '   , ' ÓÐÜÙê  ÐÜ  ÛèÞÜ' , ' 2 ' ] , [ ' 3 6 '   , ' ÓÕè' , ' 2 ' ] , [ ' 3 7 '   , ' ÓÙè  ÐÜ  ÐáÓ' , ' 2 ' ] , [ ' 3 8 '   , ' ÓÙè  ×àÐ' , ' 2 ' ] , [ ' 3 9 '   , ' Óß' , ' 2 ' ] , [ ' 4 0 '   , ' ÓäàÔ' , ' 2 ' ] , [ ' 4 1 '   , ' ÔÒÕéèÙÝ' , ' 2 ' ] , [ ' 4 2 '   , ' ÔÖÕèâ' , ' 2 ' ] , [ ' 4 3 '   , ' ÔèÓÕã' , ' 2 ' ] , [ ' 4 4 '   , ' ÔèèÙê' , ' 2 ' ] , [ ' 4 6 '   , ' ÖÛèÕß  ÙâçÑ' , ' 2 ' ] , [ ' 4 7 '   , ' ÖèâÙê' , ' 2 ' ] , [ ' 4 8 '   , ' ×Ó  àá' , ' 2 ' ] , [ ' 4 9 '   , ' ×ÓèÔ' , ' 2 ' ] , [ ' 5 0 '   , ' ×ÕÜêÔ' , ' 2 ' ] , [ ' 3 4 8 '   , ' ×Õã  Ûàèê' , ' 2 ' ] , [ ' 5 2 '   , ' ×ÕèäÙé' , ' 2 ' ] , [ ' 1 6 7 '   , ' ×ÙäÔ' , ' 2 ' ] , [ ' 3 7 5 '   , ' ×ÞÓê  ÙÞÙÝ' , ' 2 ' ] , [ ' 5 4 '   , ' ×Þê  ÒÓè' , ' 2 ' ] , [ ' 5 6 '   , ' ×äæÙ  ÑÔ' , ' 2 ' ] , [ ' 5 8 '   , ' ×èÑ  ÜÐê' , ' 2 ' ] , [ ' 5 9 '   , ' ØÑèÙÔ' , ' 2 ' ] , [ ' 1 6 8 '   , ' ØÙèê  ÛèÞÜ' , ' 2 ' ] , [ ' 6 1 '   , ' ØÞèÔ' , ' 2 ' ] , [ ' 3 7 1 '   , ' ÙÒÕè' , ' 2 ' ] , [ ' 6 3 '   , ' ÙÕÑÜ' , ' 2 ' ] , [ ' 6 4 '   , ' ÙÕÑÜÙÝ' , ' 2 ' ] , [ ' 6 5 '   , ' ÙÕÓäê' , ' 2 ' ] , [ ' 6 6 '   , ' ÙÕçàâÝ  âÙÜÙê' , ' 2 ' ] , [ ' 6 7 '   , ' Ù×ÙâÝ' , ' 2 ' ] , [ ' 6 8 '   , ' ÙáÕÓ  ÔÞâÜÔ' , ' 2 ' ] , [ ' 6 9 '   , ' ÙáâÕè' , ' 2 ' ] , [ ' 7 0 '   , ' ÙäÙâ' , ' 2 ' ] , [ ' 7 1 '   , ' ÙèÛÐ' , ' 2 ' ] , [ ' 7 2 '   , ' ÛÐÕÛÑ' , ' 2 ' ] , [ ' 3 6 3 '   , ' ÛÑèÙ' , ' 2 ' ] , [ ' 7 3 '   , ' ÛÕèÖÙÝ' , ' 2 ' ] , [ ' 7 4 '   , ' Û×Ü' , ' 2 ' ] , [ ' 7 5 '   , ' ÛÙàèê  - ÔÞÕéÑÔ' , ' 2 ' ] , [ ' 7 6 '   , ' ÛÙàèê  - çÙÑÕå' , ' 2 ' ] , [ ' 7 8 '   , ' ÛÜÙÜ' , ' 2 ' ] , [ ' 7 9 '   , ' ÛÞÕß' , ' 2 ' ] , [ ' 7 7 '   , ' ÛáèÐ  áÞÙâ' , ' 2 ' ] , [ ' 3 7 9 '   , ' Ûäè  ÔèÐ" Ô' , ' 2 ' ] , [ ' 8 1 '   , ' Ûäè  ÕèÓÙÝ' , ' 2 ' ] , [ ' 8 3 '   , ' Ûäè  ÙÐáÙã' , ' 2 ' ] , [ ' 8 5 '   , ' Ûäè  ÛÞÐ' , ' 2 ' ] , [ ' 8 6 '   , ' Ûäè  ÞàÓÐ' , ' 2 ' ] , [ ' 8 7 '   , ' Ûäè  ÞáèÙç' , ' 2 ' ] , [ ' 3 4 7 '   , ' Ûäè  áÜÞÔ' , ' 2 ' ] , [ ' 8 8 '   , ' Ûäè  êÑÕè' , ' 2 ' ] , [ ' 8 9 '   , ' ÛèÝ  Ñß  ÖÞèÔ' , ' 2 ' ] , [ ' 9 0 '   , ' ÛèÞÙÐÜ' , ' 2 ' ] , [ ' 9 2 '   , ' ÜÕØÝ' , ' 2 ' ] , [ ' 9 3 '   , ' ÜÙÞß' , ' 2 ' ] , [ ' 3 3 1 '   , ' ÞÒ\ " Ó  ÐÜ  ÛèÕÝ' , ' 2 ' ] , [ ' 3 4 0 '   , ' ÞÒ\ " ÓÜ  éÞá' , ' 2 ' ] , [ ' 9 7 '   , ' ÞÒÙÓÕ' , ' 2 ' ] , [ ' 9 8 '   , ' ÞÖèâ' , ' 2 ' ] , [ ' 9 9 '   , ' ÞØÕÜÔ' , ' 2 ' ] , [ ' 1 0 1 '   , ' ÞÛÞÕèê' , ' 2 ' ] , [ ' 1 0 3 '   , ' ÞàÕê' , ' 2 ' ] , [ ' 1 0 4 '   , ' Þà×ÞÙÔ' , ' 2 ' ] , [ ' 1 0 5 '   , ' ÞàèÔ' , ' 2 ' ] , [ ' 1 0 6 '   , ' ÞáâÓÔ' , ' 2 ' ] , [ ' 9 4 '   , ' ÞâÐ\ " è' , ' 2 ' ] , [ ' 1 0 7 '   , ' ÞâÒß' , ' 2 ' ] , [ ' 1 0 8 '   , ' ÞâÙÜÙÐ' , ' 2 ' ] , [ ' 1 0 9 '   , ' ÞâÙß  ÑèÕÚ' , ' 2 ' ] , [ ' 1 1 0 '   , ' ÞâÙß  æÑÙ' , ' 2 ' ] , [ ' 1 1 1 '   , ' ÞâÜÕê  êèéÙ×Ð' , ' 2 ' ] , [ ' 1 1 2 '   , ' ÞèÕÝ  ÒÕÜß' , ' 2 ' ] , [ ' 1 1 4 '   , ' àÐÕê  ÞèÓÛÙ' , ' 2 ' ] , [ ' 3 4 5 '   , ' àÔÜÜ' , ' 2 ' ] , [ ' 1 1 5 '   , ' àÔèÙÔ' , ' 2 ' ] , [ ' 1 1 6 '   , ' àÕÕÔ  ÐØÙ\ " Ñ' , ' 2 ' ] , [ ' 3 4 4 '   , ' à×éÕÜÙÝ' , ' 2 ' ] , [ ' 3 3 7 '   , ' àÙè  ÓÕÓ' , ' 2 ' ] , [ ' 1 1 8 '   , ' àÙè  âæÙÕß' , ' 2 ' ] , [ ' 1 1 9 '   , ' àÞèÕÓ' , ' 2 ' ] , [ ' 1 2 0 '   , ' àæèê' , ' 2 ' ] , [ ' 1 2 1 '   , ' àæèê  âÙÜÙê' , ' 2 ' ] , [ ' 1 6 9 '   , ' àéè' , ' 2 ' ] , [ ' 3 3 2 '   , ' áÐÒ\ " Õè' , ' 2 ' ] , [ ' 1 2 2 '   , ' áÐÜÞÔ' , ' 2 ' ] , [ ' 3 3 3 '   , ' á×àÙß' , ' 2 ' ] , [ ' 1 2 3 '   , ' âÙß  ÐÙÙÜÔ' , ' 2 ' ] , [ ' 1 2 4 '   , ' âÙß  ÒÑ' , ' 2 ' ] , [ ' 1 2 5 '   , ' âÙß  ÔÕÓ' , ' 2 ' ] , [ ' 1 2 7 '   , ' âÙß  ×èÕÓ' , ' 2 ' ] , [ ' 1 2 8 '   , ' âÙß  ÛÞÕàÙÝ' , ' 2 ' ] , [ ' 1 2 9 '   , ' âÙß  ÛèÞÜ' , ' 2 ' ] , [ ' 1 3 1 '   , ' âÛÕ' , ' 2 ' ] , [ ' 1 3 2 '   , ' âÞÕçÔ' , ' 2 ' ] , [ ' 1 3 3 '   , ' âÞÙâÓ' , ' 2 ' ] , [ ' 1 3 4 '   , ' âáäÙÐ' , ' 2 ' ] , [ ' 1 3 5 '   , ' âäÕÜÔ' , ' 2 ' ] , [ ' 1 3 6 '   , ' âèÐÑÔ' , ' 2 ' ] , [ ' 1 3 7 '   , ' âêÜÙê' , ' 2 ' ] , [ ' 1 3 8 '   , ' äçÙâÙß' , ' 2 ' ] , [ ' 1 4 0 '   , ' äèÓá  ×àÔ' , ' 2 ' ] , [ ' 3 5 8 '   , ' äèÓáÙÔ' , ' 2 ' ] , [ ' 1 4 1 '   , ' æäê' , ' 2 ' ] , [ ' 9 1 '   , ' ç.   ÜÕ×ÞÙ  ÔÒØÐÕê' , ' 2 ' ] , [ ' 1 4 3 '   , ' çÙáèÙÔ' , ' 2 ' ] , [ ' 1 4 4 '   , ' çæèÙß' , ' 2 ' ] , [ ' 1 4 5 '   , ' çèÙê  ÐêÐ' , ' 2 ' ] , [ ' 1 7 0 '   , ' çèÙê  ÑÙÐÜÙç' , ' 2 ' ] , [ ' 3 6 7 '   , ' çèÙê  ×ÙÙÝ' , ' 2 ' ] , [ ' 1 4 6 '   , ' çèÙê  ØÑâÕß' , ' 2 ' ] , [ ' 1 7 1 '   , ' çèÙê  ÞÕæçÙß' , ' 2 ' ] , [ ' 1 4 7 '   , ' çèÙê  éÞÕàÔ' , ' 2 ' ] , [ ' 1 4 8 '   , ' çéê' , ' 2 ' ] , [ ' 1 4 9 '   , ' èÐÞÔ' , ' 2 ' ] , [ ' 3 3 8 '   , ' èÐé  ÔàçèÔ' , ' 2 ' ] , [ ' 1 5 0 '   , ' èÐé  äÙàÔ' , ' 2 ' ] , [ ' 3 5 9 '   , ' èÒÑÔ' , ' 2 ' ] , [ ' 3 7 3 '   , ' èÙ×ÐàÙÙÔ' , ' 2 ' ] , [ ' 1 5 1 '   , ' èÞÕê' , ' 2 ' ] , [ ' 1 5 2 '   , ' èÞê  ÙéÙ' , ' 2 ' ] , [ ' 1 5 3 '   , ' èçäê' , ' 2 ' ] , [ ' 1 5 5 '   , ' éÓÔ  à×ÞÙÔ' , ' 2 ' ] , [ ' 1 5 7 '   , ' éÕèéÙÝ' , ' 2 ' ] , [ ' 1 5 9 '   , ' éÜÕ×Õê' , ' 2 ' ] , [ ' 1 6 0 '   , ' éÜÕÞÙ' , ' 2 ' ] , [ ' 1 6 1 '   , ' éàÙè' , ' 2 ' ] , [ ' 1 6 4 '   , ' éäèâÝ' , ' 2 ' ] , [ ' 1 6 5 '   , ' éêÕÜÔ' , ' 2 ' ] ,  
     [ ' 0 ' , ' ÛÜ  ÔÙéÕÑÙÝ' , ' 3 ' ] , [ ' 3 2 8 ' , ' ÙäÕ' , ' 3 ' ] , [ ' 1 7 2 ' , ' êÜ  ÐÑÙÑ' , ' 3 ' ] ,  
     [ ' 0 ' , ' ÛÜ  ÔÙéÕÑÙÝ' , ' 4 ' ] , [ ' 1 9 9 '   , ' ÐÑß  ÙÔÕÓÔ' , ' 4 ' ] , [ ' 2 0 0 '   , ' ÐÕÓÙÝ' , ' 4 ' ] , [ ' 1 7 3 '   , ' ÐÕè  ÙÔÕÓÔ' , ' 4 ' ] , [ ' 1 7 4 '   , ' ÐÖÕè' , ' 4 ' ] , [ ' 2 0 3 '   , ' ÐéÓÕÓ' , ' 4 ' ] , [ ' 2 0 4 '   , ' ÐéçÜÕß' , ' 4 ' ] , [ ' 3 6 0 '   , ' ÑÐèÕê  Ùæ×ç' , ' 4 ' ] , [ ' 2 0 6 '   , ' ÑÙê  ×èÕê' , ' 4 ' ] , [ ' 2 0 7 '   , ' ÑÙê  ÙàÐÙ' , ' 4 ' ] , [ ' 3 6 2 '   , ' ÑÙêß  ÐÔèÕß' , ' 4 ' ] , [ ' 1 7 5 '   , ' ÑàÙ  Ñèç' , ' 4 ' ] , [ ' 2 1 2 '   , ' ÑàÙÔ' , ' 4 ' ] , [ ' 3 2 9 '   , ' Ñè  ÒÙÕèÐ' , ' 4 ' ] , [ ' 1 7 6 '   , ' Ñê  ÙÝ' , ' 4 ' ] , [ ' 2 1 4 '   , ' ÒÑâê  Ñèàè' , ' 4 ' ] , [ ' 3 6 5 '   , ' ÒÑâê  ×ß' , ' 4 ' ] , [ ' 1 7 7 '   , ' ÒÑâêÙÙÝ' , ' 4 ' ] , [ ' 2 1 5 '   , ' ÒÓèÔ' , ' 4 ' ] , [ ' 1 7 8 '   , ' ÒàÙ  ÙÔÕÓÔ' , ' 4 ' ] , [ ' 1 7 9 '   , ' ÒàÙ  êçÕÕÔ' , ' 4 ' ] , [ ' 2 1 9 '   , ' Òâé' , ' 4 ' ] , [ ' 3 6 4 '   , ' Òê  èÙÞÕß' , ' 4 ' ] , [ ' 1 8 0 '   , ' ÔÕÓ  ÔéèÕß' , ' 4 ' ] , [ ' 1 8 1 '   , ' ÔèæÜÙÔ' , ' 4 ' ] , [ ' 3 6 8 '   , ' ×ÑæÜê  ÔéèÕß' , ' 4 ' ] , [ ' 1 8 2 '   , ' ×ÕÜÕß' , ' 4 ' ] , [ ' 2 2 2 '   , ' ÙÑàÔ' , ' 4 ' ] , [ ' 1 8 3 '   , ' ÙÔÕÓ' , ' 4 ' ] , [ ' 2 2 5 '   , ' ÙçÕÝ' , ' 4 ' ] , [ ' 3 7 6 '   , ' ÙèçÕàÔ' , ' 4 ' ] , [ ' 2 2 8 '   , ' Ûäè  Ôá' , ' 4 ' ] , [ ' 3 8 0 '   , ' Ûäè  ÕÙêçÙß' , ' 4 ' ] , [ ' 3 6 9 '   , ' Ûäè  ÙÕàÔ' , ' 4 ' ] , [ ' 1 8 5 '   , ' Ûäè  Þâé' , ' 4 ' ] , [ ' 3 5 7 '   , ' Ûäè  àÙß' , ' 4 ' ] , [ ' 1 8 6 '   , ' Ûäè  áÑÐ' , ' 4 ' ] , [ ' 2 3 3 '   , ' Ûäè  áÙÜÑè' , ' 4 ' ] , [ ' 2 3 4 '   , ' Ûäè  çÐáÝ' , ' 4 ' ] , [ ' 3 7 2 '   , ' Ûäè  éÞèÙÔÕ' , ' 4 ' ] , [ ' 2 3 5 '   , ' ÜÕÓ' , ' 4 ' ] , [ ' 3 3 5 '   , ' ÞÖÕè' , ' 4 ' ] , [ ' 2 3 7 '   , ' ÞÖÛèê  ÑêÙÔ' , ' 4 ' ] , [ ' 2 3 9 '   , ' ÞéÞè  ÔéèÕß' , ' 4 ' ] , [ ' 3 8 3 '   , ' à×ÜÙÝ' , ' 4 ' ] , [ ' 2 4 3 '   , ' àá  æÙÕàÔ' , ' 4 ' ] , [ ' 2 4 4 '   , ' àêàÙÔ' , ' 4 ' ] , [ ' 1 8 8 '   , ' áÑÙÕß' , ' 4 ' ] , [ ' 3 7 7 '   , ' áÒÕÜÔ' , ' 4 ' ] , [ ' 2 4 6 '   , ' âÙß  ÕèÓ' , ' 4 ' ] , [ ' 1 8 9 '   , ' âÙàê' , ' 4 ' ] , [ ' 3 4 9 '   , ' äèÓá  Ûå' , ' 4 ' ] , [ ' 1 9 0 '   , ' äê×  êçÕÕÔ' , ' 4 ' ] , [ ' 2 4 7 '   , ' æÕè  ÙÒÐÜ' , ' 4 ' ] , [ ' 2 4 8 '   , ' çÓÙÞÔ' , ' 4 ' ] , [ ' 2 5 9 '   , ' çÙÑÕå  éäÙÙÝ' , ' 4 ' ] , [ ' 1 9 1 '   , ' çèÙê  ÐÕàÕ' , ' 4 ' ] , [ ' 2 5 0 '   , ' çèÙê  ÞÜÐÛÙ' , ' 4 ' ] , [ ' 2 5 1 '   , ' èÐé  ÔâÙß' , ' 4 ' ] , [ ' 1 9 2 '   , ' èÐéÕß  ÜæÙÕß' , ' 4 ' ] , [ ' 2 5 3 '   , ' è×ÕÑÕê' , ' 4 ' ] , [ ' 3 6 1 '   , ' èÙàêÙÔ' , ' 4 ' ] , [ ' 2 5 4 '   , ' èÞÜÔ' , ' 4 ' ] , [ ' 1 9 4 '   , ' èÞê  Òß' , ' 4 ' ] , [ ' 1 9 5 '   , ' èÞê  ÔéèÕß' , ' 4 ' ] , [ ' 1 9 6 '   , ' èÞê  äàçá' , ' 4 ' ] , [ ' 1 9 7 '   , ' èâààÔ' , ' 4 ' ] , [ ' 1 9 8 '   , ' èéäÕß' , ' 4 ' ] , [ ' 2 5 7 '   , ' éÕÔÝ' , ' 4 ' ] , [ ' 2 6 0 '   , ' êÜ  ÞÕàÓ' , ' 4 ' ] ,  
     [ ' 0 ' , ' ÛÜ  ÔÙéÕÑÙÝ' , ' 5 ' ] , [ ' 2 9 5 ' , ' ÐÙÜê' , ' 5 ' ] , [ ' 2 9 6 ' , ' ÐéÜÙÝ' , ' 5 ' ] , [ ' 2 9 7 '   , ' ÑÐè  éÑâ' , ' 5 ' ] , [ ' 2 6 6 '   , ' ÑÙê  ÔâèÑÔ' , ' 5 ' ] , [ ' 3 5 5 '   , ' ÑàÙ  ÓèÕÝ' , ' 5 ' ] , [ ' 3 0 1 '   , ' ÓÙÞÕàÔ' , ' 5 ' ] , [ ' 3 7 0 '   , ' ×ÕÜÓÔ' , ' 5 ' ] , [ ' 3 0 3 '   , ' ×æèÙÝ' , ' 5 ' ] , [ ' 3 0 6 '   , ' ÛÙáÕäÙÝ' , ' 5 ' ] , [ ' 3 0 7 '   , ' Ûäè  âÖÔ' , ' 5 ' ] , [ ' 3 5 6 '   , ' ÞÙêè' , ' 5 ' ] , [ ' 3 0 8 '   , ' ÞæäÔ  èÞÕß' , ' 5 ' ] , [ ' 3 0 9 '   , ' àÐÕê  ÔÛÙÛè' , ' 5 ' ] , [ ' 3 1 0 '   , ' àÐÕê  áÞÓè' , ' 5 ' ] , [ ' 3 1 1 '   , ' àÑØÙÝ' , ' 5 ' ] , [ ' 3 1 4 '   , ' àêÙÑÕê' , ' 5 ' ] , [ ' 3 1 5 '   , ' áäÙè' , ' 5 ' ] , [ ' 3 1 6 '   , ' âÕÞè' , ' 5 ' ] , [ ' 3 1 7 '   , ' âÙß  ÑÕçç' , ' 5 ' ] , [ ' 3 1 8 '   , ' âÙß  ÒÓÙ' , ' 5 ' ] , [ ' 3 1 9 '   , ' âÙß  ×æÑÔ' , ' 5 ' ] , [ ' 3 2 0 '   , ' âÙß  ÙÔÑ' , ' 5 ' ] , [ ' 3 2 1 '   , ' âèÓ' , ' 5 ' ] , [ ' 3 2 3 '   , ' æÕäè' , ' 5 ' ] , [ ' 3 2 5 '   , ' èÕ×ÞÔ' , ' 5 ' ] , [ ' 3 2 6 '   , ' éÓÔ  ÑÕçè' , ' 5 ' ] , [ ' 3 2 7 '   , ' éÓèÕê' , ' 5 ' ] ,  
     [ ' 0 ' , ' ÛÜ  ÔÙéÕÑÙÝ' , ' 6 ' ] , [ ' 2 6 2 ' , ' ÐÑÕ  ÒÕé' , ' 6 ' ] , [ ' 2 6 5 '   , ' ÑÙê  ÒÕÑèÙß' , ' 6 ' ] , [ ' 2 6 8 '   , ' ÑÙê  éÞé' , ' 6 ' ] , [ ' 2 7 0 '   , ' ÕèÓ  ÙèÙ×Õ' , ' 6 ' ] , [ ' 2 7 1 '   , ' ØÜ  é×è' , ' 6 ' ] , [ ' 2 6 1 '   , ' ÙèÕéÜÙÝ' , ' 6 ' ] , [ ' 2 7 3 '   , ' Ûäè  èÕê' , ' 6 ' ] , [ ' 2 7 4 '   , ' ÜäÙÓ' , ' 6 ' ] , [ ' 2 7 5 '   , ' ÞÑéèê  æÙÕß' , ' 6 ' ] , [ ' 2 7 6 '   , ' ÞÕÓÙâÙß' , ' 6 ' ] , [ ' 2 7 7 '   , ' ÞÛÑÙÝ' , ' 6 ' ] , [ ' 2 7 8 '   , ' ÞâÜÔ  ÐÓÕÞÙÝ' , ' 6 ' ] , [ ' 3 7 8 '   , ' ÞæäÔ  ÞéÕÐÔ' , ' 6 ' ] , [ ' 2 7 9 '   , ' ÞéÞè  ÐÙÙÜÕß' , ' 6 ' ] , [ ' 2 8 0 '   , ' àÕÕÔ  ÐÙÜß' , ' 6 ' ] , [ ' 2 8 2 '   , ' àØã' , ' 6 ' ] , [ ' 2 8 5 '   , ' âÕäèÔ' , ' 6 ' ] , [ ' 2 8 6 '   , ' æÕÑÔ' , ' 6 ' ] , [ ' 2 8 8 '   , ' æèâÔ' , ' 6 ' ] , [ ' 2 9 0 '   , ' èÞê  èÖÙÐÜ' , ' 6 ' ] , [ ' 3 3 0 '   , ' èâÕê' , ' 6 ' ] , [ ' 2 9 2 '   , ' éÙÜê' , ' 6 ' ] ] ;  
  
 v a r   a r r R e s t F o o d T y p e   =   [  
 [ ' T a k e   A w a y ' , ' 8 3 ' ] ,  
 [ ' ÐÕÛÜ  ÑèÙÐÕê' , ' 8 2 ' ] ,  
 [ ' ÐÕÛÜ  ÕÜÙàÔ' , ' 8 4 ' ] ,  
 [ ' ÐÕèÙÙàØÜÙ' , ' 6 3 ' ] ,  
 [ ' ÐÙØÜÙÖ' , ' 1 2 5 ' ] ,  
 [ ' ÐÙØÜçÙ' , ' 1 ' ] ,  
 [ ' ÐÙèÕäÐÙ' , ' 8 7 ' ] ,  
 [ ' ÐÞèÙçÐÙ' , ' 2 ' ] ,  
 [ ' ÐèÒàØÙàÐÙ' , ' 3 ' ] ,  
 [ ' ÐèÕ×Õê  ÑÕçè' , ' 1 1 5 ' ] ,  
 [ ' ÑÕÜÒèÙ' , ' 5 ' ] ,  
 [ ' ÑÙàÜÐÕÞÙ' , ' 7 ' ] ,  
 [ ' ÑÙáØèÕ' , ' 8 ' ] ,  
 [ ' ÑÙê  áäè  ÜÑÙéÕÜ' , ' 7 8 ' ] ,  
 [ ' ÑÙê  çäÔ' , ' 9 ' ] ,  
 [ ' ÑÙêÙ' , ' 1 0 ' ] ,  
 [ ' ÑÜçàÙ' , ' 1 1 ' ] ,  
 [ ' Ñè' , ' 1 2 ' ] ,  
 [ ' Ñè  ÞÙæÙÝ' , ' 8 1 ' ] ,  
 [ ' ÑèÖÙÜÐÙ' , ' 1 3 ' ] ,  
 [ ' Ñè- ÙÙß' , ' 1 4 ' ] ,  
 [ ' Ñè- ÞáâÓÔ' , ' 1 5 ' ] ,  
 [ ' Ñè- áÜØ' , ' 8 8 ' ] ,  
 [ ' ÑéèÙÝ' , ' 1 6 ' ] ,  
 [ ' ÒÑÙàÕê' , ' 1 7 ' ] ,  
 [ ' ÒÕèÞÔ' , ' 1 8 ' ] ,  
 [ ' ÒÜÙÓÔ' , ' 5 7 ' ] ,  
 [ ' ÒàÙ  ÐÙèÕâÙÝ' , ' 8 9 ' ] ,  
 [ ' ÒèÕÖÙàÙ' , ' 9 0 ' ] ,  
 [ ' ÒèÙÜ' , ' 7 2 ' ] ,  
 [ ' ÓÒÙÝ' , ' 1 9 ' ] ,  
 [ ' Óè& # 3 2 ;   ÐÞèÙçÐÙ' , ' 5 2 ' ] ,  
 [ ' ÔÕÓÙ' , ' 2 1 ' ] ,  
 [ ' ÔÞÑÕèÒè' , ' 2 2 ' ] ,  
 [ ' ×ÕÞÕá' , ' 2 3 ' ] ,  
 [ ' ×ÜÑÙ' , ' 2 4 ' ] ,  
 [ ' ØÐäÐá  Ñè' , ' 9 3 ' ] ,  
 [ ' ØèÙäÕÜÙØÐÙ' , ' 2 6 ' ] ,  
 [ ' ÙÔÕÓÙ' , ' 7 5 ' ] ,  
 [ ' ÙÕÕàÙ' , ' 2 7 ' ] ,  
 [ ' ÙÝ  êÙÛÕàÙ' , ' 2 8 ' ] ,  
 [ ' ÙäàÙ' , ' 2 9 ' ] ,  
 [ ' ÙéèÐÜÙ' , ' 7 3 ' ] ,  
 [ ' ÛäèÙ' , ' 5 8 ' ] ,  
 [ ' ÜÑàÕàÙ' , ' 6 5 ' ] ,  
 [ ' ÞÐäÙÔ/ çÕàÓÙØÕèÙÔ' , ' 3 0 ' ] ,  
 [ ' ÞÑéÜê  ÑÙèÔ' , ' 9 6 ' ] ,  
 [ ' ÞÕâÓÕß' , ' 9 7 ' ] ,  
 [ ' ÞÖè×  ÐÙèÕäÐÙ' , ' 5 3 ' ] ,  
 [ ' ÞÖè×  è×Õç' , ' 9 8 ' ] ,  
 [ ' ÞÖè×Ù' , ' 3 2 ' ] ,  
 [ ' ÞØÑ×  ÑÙêÙ' , ' 9 9 ' ] ,  
 [ ' ÞáâÓê  éã' , ' 6 7 ' ] ,  
 [ ' ÞâÓàÙÕê' , ' 6 9 ' ] ,  
 [ ' ÞçáÙçàÙ' , ' 3 3 ' ] ,  
 [ ' ÞèÕçÐÙ' , ' 3 4 ' ] ,  
 [ ' ÞêÞ×Õê' , ' 1 0 1 ' ] ,  
 [ ' áÕéÙ' , ' 1 0 2 ' ] ,  
 [ ' áÙàÙ' , ' 3 5 ' ] ,  
 [ ' áàÓÕÙå& # 3 2 ;   Ñè' , ' 5 4 ' ] ,  
 [ ' áàØÔ  äÔ' , ' 1 4 1 ' ] ,  
 [ ' áäèÓÙ' , ' 3 6 ' ] ,  
 [ ' âÜ  ÔÐé' , ' 3 7 ' ] ,  
 [ ' âèÑÙ' , ' 3 8 ' ] ,  
 [ ' äÐÑ' , ' 3 9 ' ] ,  
 [ ' äÕàÓç  ÓèÛÙÝ' , ' 4 0 ' ] ,  
 [ ' äÙÕÖ& # 3 2 ; ß' , ' 6 1 ' ] ,  
 [ ' äÙæÔ' , ' 4 1 ' ] ,  
 [ ' äÙèÕê  ÙÝ' , ' 4 2 ' ] ,  
 [ ' äèáÙ' , ' 4 4 ' ] ,  
 [ ' æÞ×ÕàÙ/ ØÑâÕàÙ' , ' 4 5 ' ] ,  
 [ ' æèäêÙ' , ' 4 6 ' ] ,  
 [ ' çÙÙØèÙàÒ' , ' 7 0 ' ] ,  
 [ ' çäÔ  ÒÜèÙÔ' , ' 1 0 5 ' ] ,  
 [ ' èÕÞàÙ' , ' 4 7 ' ] ,  
 [ ' éÕÕÐèÞÔ' , ' 4 9 ' ] ,  
 [ ' éÙäÕÓÙÝ' , ' 1 0 7 ' ] ,  
 [ ' êÐÙÜàÓÙ' , ' 5 0 ' ] ,  
 [ ' êÑéÙÜÙÝ' , ' 7 4 ' ] ,  
 [ ' êÙÞàÙ' , ' 5 1 ' ] ] ;  
  
 f u n c t i o n   S e a r c h R e s t u r a n t ( )  
 {  
 	 v a r   s t r   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t e x t f i e l d " ) ;  
 	 w i n d o w . o p e n ( " R e d i r e c t s / E n c o d e r F o r m . a s p x ? E n c o d i n g = w i n d o w s - 1 2 5 5 & W o r d = "   +   s t r . v a l u e   +   " & E n g i n e = R e s t u r a n t " ) ;  
 }  
  
 f u n c t i o n   g e t C i t e i s I n R e g i o n ( )  
 {  
 	 v a r   p r o d _ r e g i o n 	 	 =   f r m R e s t u r a n t . t x t R e g i o n I D ;  
 	 v a r   r e g i o n I D   =   p r o d _ r e g i o n . v a l u e ;  
  
 	 v a r   p r o d _ c i t i e s 	 	 =   f r m R e s t u r a n t . t x t C i t y I D ;  
 	  
 	 p r o d _ c i t i e s . o p t i o n s . l e n g t h   =   0 ;  
 	 f o r ( i = 0 ; i < a r r R e s t C i t i e s . l e n g t h ; i + + )  
 	 {  
 	 	 i f ( a r r R e s t C i t i e s [ i ] [ 2 ] = = r e g i o n I D )  
 	 	 {  
 	 	 	 v a r   o O p t i o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " o p t i o n " ) ;  
 	 	 	 o O p t i o n . t e x t   =   a r r R e s t C i t i e s [ i ] [ 1 ] ;  
 	 	 	 o O p t i o n . v a l u e   =   a r r R e s t C i t i e s [ i ] [ 0 ] ;  
 	 	 	 p r o d _ c i t i e s . o p t i o n s . a d d ( o O p t i o n ) ;  
 	 	 }  
 	 }  
 }  
  
 f u n c t i o n   s u b m i t R e s t u r a n t S e a r c h ( r o u n d , c o l , s r c h )  
 {  
 	 v a r   f r m   =   f r m R e s t u r a n t ;  
 	 i f ( f r m   ! =   n u l l )  
 	 {  
 	 	 f r m . R o u n d . v a l u e   =   r o u n d ;  
 	 	 f r m . C o l . v a l u e   =   c o l ;  
 	 	 f r m . S R C H . v a l u e   =   s r c h ;  
 	 	 f r m . s u b m i t ( ) ;  
 	 }  
  
 }  
 f u n c t i o n   G e t M y C o l o r ( o b j , s t a t )  
   {  
       i f ( o b j . c l a s s N a m e . i n d e x O f ( ' s u b h e a d e r _ l i n k ' ) > - 1 )  
       {    
           o b j . d e m a n d C l a s s = o b j . d e m a n d C l a s s = = ' ' | | ! ( o b j . d e m a n d C l a s s ) ? o b j . c l a s s N a m e : o b j . d e m a n d C l a s s ;  
           i f ( o b j . c l a s s N a m e . i n d e x O f ( ' _ h i g h l i g h t ' ) < 0 )  
           o b j . c l a s s N a m e = o b j . d e m a n d C l a s s + s t a t ;  
         e l s e   i f ( o b j . d e m a n d C l a s s . i n d e x O f ( ' _ h i g h l i g h t ' ) < 0 )  
         {  
           o b j . c l a s s N a m e = o b j . d e m a n d C l a s s + s t a t ;  
         }  
       }  
        
   }  
     f u n c t i o n   R e p l a c e ( o b j )  
   {  
       w h i l e ( o b j . s r c . i n d e x O f ( ' & a m p ; ' ) > 0 )  
       {  
           o b j . s r c = o b j . s r c . r e p l a c e ( ' & a m p ; ' , ' & ' ) ;    
       }    
   } 
