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