ÿþv a r   d r a g g e d _ e l e m e n t   =   n u l l ;  
 v a r   d r o p p e d _ i n t o _ c o l u m n   =   n u l l ;  
 v a r   d r o p p e d _ i n t o _ p o s i t i o n   =   n u l l ;  
 v a r   d r a g g e d _ f r o m _ c o l u m n   =   n u l l ;  
  
 v a r   i s S l i d i n g I m g   =   f a l s e ;  
 v a r   c h o o s e O n e   =   f a l s e ;  
 v a r   b o d y R T L   =   f a l s e ;  
 v a r   m y A r r ;  
 v a r   c h a r t C o u n t ;  
  
 v a r   l i n k O b j ;  
  
 $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   {  
         s e t W r a p p e r W i d t h s ( ) ;  
         / / i f   ( $ ( ' # c o l u m n - r i g h t   d i v . b a n n e r ' ) . c h i l d r e n ( ) . l e n g t h   >   0 )   {  
         / /         $ ( ' # c o l u m n - r i g h t   d i v . b a n n e r ' ) . h i d e ( )  
         / / }  
         $ ( ' # c o l u m n - r i g h t   d i v . b a n n e r ' ) . e a c h ( f u n c t i o n ( i n d e x )   {  
                 / / a l e r t ( $ ( t h i s ) . c h i l d r e n ( ) . l e n g t h ) ;  
                 i f   ( $ ( t h i s ) . c h i l d r e n ( ) . l e n g t h   <   1 )   {  
                         $ ( t h i s ) . h i d e ( ) ;  
                 }  
         } ) ;  
 } ) ;  
 f u n c t i o n   g e t I d ( e ,   u i )   {  
         d r o p p e d _ i n t o _ c o l u m n   =   $ ( t h i s ) . a t t r ( " i d " ) ;  
 }  
  
 f u n c t i o n   s t a r t D r a g ( e ,   u i )   {  
         d r a g g e d _ e l e m e n t   =   $ ( u i . h e l p e r ) . a t t r ( " i d " ) ;  
         d r a g g e d _ f r o m _ c o l u m n   =   $ ( t h i s ) . a t t r ( " i d " ) ;  
 }  
  
 f u n c t i o n   s t o p D r a g ( e ,   u i )   {  
  
         i f   ( d r o p p e d _ i n t o _ c o l u m n   ! =   n u l l )   {  
                 d r o p p e d _ i n t o _ p o s i t i o n   =   g e t _ p o s i t i o n ( d r a g g e d _ e l e m e n t ,   d r o p p e d _ i n t o _ c o l u m n ) ;  
         }   e l s e   {  
                 d r o p p e d _ i n t o _ p o s i t i o n   =   g e t _ p o s i t i o n ( d r a g g e d _ e l e m e n t ,   d r a g g e d _ f r o m _ c o l u m n ) ;  
                 d r o p p e d _ i n t o _ c o l u m n   =   d r a g g e d _ f r o m _ c o l u m n ;  
         }  
  
         B N R . S h a r e P o i n t . W i d g e t S e r v i c e . M o v e W i d g e t I n s t a n c e ( d r a g g e d _ e l e m e n t ,   G e t U r l ( ) ,   d r o p p e d _ i n t o _ p o s i t i o n ) ;  
 }  
 f u n c t i o n   c h a n g e P o s ( e ,   u i )   {  
         / / a l e r t ( ' j e e ' ) ;  
         / / a l e r t ( $ ( u i . h e l p e r ) . c s s ( " l e f t " ) ) ;  
         i f   ( b o d y R T L )   {  
                 v a r   s t r   =   $ ( u i . h e l p e r ) . c s s ( " l e f t " ) ;  
                 v a r   o f f s e t   =   N u m b e r ( s t r . s u b s t r i n g ( 0 ,   s t r . l e n g t h   -   2 ) ) ;  
                 / / a l e r t ( o f f s e t ) ;  
                 $ ( u i . i t e m ) . c s s ( " l e f t " ,   S t r i n g ( o f f s e t )   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - s t r i p e " ) . c s s ( " r i g h t " ,   S t r i n g ( o f f s e t   *   ( 2 2 4 0   /   6 4 0 ) )   -   2 0   -   2 2 4 0   +   9 5 0   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0   *   ( $ ( " d i v . p a g e " ) . w i d t h ( )   /   6 4 0 ) )   +   " p x " ) ;  
         }  
         e l s e   {  
                 v a r   s t r   =   $ ( u i . h e l p e r ) . c s s ( " l e f t " ) ;  
                 v a r   o f f s e t   =   N u m b e r ( s t r . s u b s t r i n g ( 0 ,   s t r . l e n g t h   -   2 ) ) ;  
                 / / a l e r t ( o f f s e t ) ;  
                 $ ( u i . i t e m ) . c s s ( " l e f t " ,   S t r i n g ( o f f s e t )   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - s t r i p e " ) . c s s ( " l e f t " ,   S t r i n g ( - o f f s e t   *   ( 2 2 4 0   /   6 4 0 ) )   -   1 0   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0   *   ( $ ( " d i v . p a g e " ) . w i d t h ( )   /   6 4 0 ) )   +   " p x " ) ;  
         }  
         / / $ ( u i . i t e m ) . c s s ( " b o r d e r " ,   " 2 p x   s o l i d   r e d " ) ;  
         / / u i . p o s i t i o n  
 }  
  
 f u n c t i o n   g e t _ p o s i t i o n ( e l e m e n t _ i d ,   c o l u m n _ i d )   {  
  
         v a r   t h e _ c o l u m n   =   d o c u m e n t . g e t E l e m e n t B y I d ( c o l u m n _ i d ) ;  
  
         v a r   a l l _ e l e m e n t s   =   t h e _ c o l u m n . g e t E l e m e n t s B y T a g N a m e ( " D I V " ) ;  
         v a r   e l e m e n t _ i d s   =   n e w   A r r a y ( ) ;  
         f o r   ( v a r   i   =   0 ;   i   <   a l l _ e l e m e n t s . l e n g t h ;   i + + )   {  
                 v a r   a n _ e l e m e n t   =   a l l _ e l e m e n t s [ i ] ;  
                 i f   ( a n _ e l e m e n t . c l a s s N a m e   = =   " w r a p p e r " )   {  
                         e l e m e n t _ i d s . p u s h ( a n _ e l e m e n t . i d ) ;  
                 }  
         }  
  
         f o r   ( v a r   j   =   0 ;   j   <   e l e m e n t _ i d s . l e n g t h ;   j + + )   {  
                 v a r   t h e _ e l e m e n t   =   e l e m e n t _ i d s [ j ] ;  
                 i f   ( t h e _ e l e m e n t   = =   e l e m e n t _ i d )   {  
                         r e t u r n   j ;  
                         b r e a k  
                 }  
         }  
 }  
  
 f u n c t i o n   a d d _ C S S _ c l a s s ( s e l e c t o r ,   c l a s s _ n a m e )   {  
         v a r   e l e m e n t s   =   c s s Q u e r y ( s e l e c t o r ) ;  
  
         f o r   ( v a r   e   =   0 ;   e   <   e l e m e n t s . l e n g t h ;   e + + )   {  
                 e l e m e n t s [ e ] . c l a s s N a m e   + =   "   "   +   c l a s s _ n a m e ;  
         }  
 }  
  
 f u n c t i o n   p a r s e D o c u m e n t ( )   {  
         / / s e t W r a p p e r W i d t h s ( ) ;  
         a d d _ C S S _ c l a s s ( " u l . n a v i g a t i o n   l i : f i r s t - c h i l d " ,   " f i r s t - c h i l d " ) ;  
         / / a d d _ C S S _ c l a s s ( " u l . n a v i g a t i o n   l i : l a s t - c h i l d " ,   " l a s t - c h i l d " ) ;  
         a d d _ C S S _ c l a s s ( " d i v . w r a p p e r   h 2 + h 3 " ,   " h 2 - s i b l i n g " ) ;  
         a d d _ C S S _ c l a s s ( " h 3 + h 3 " ,   " h 3 - s i b l i n g " ) ;  
         a d d _ C S S _ c l a s s ( " d i v . w e b s i t e - c o n t e n t s   d i v . w r a p p e r   d i v : n t h - c h i l d ( 2 ) " ,   " f i r s t - c h i l d " ) ;  
         a d d _ C S S _ c l a s s ( " d i v . w e b s i t e - c o n t e n t s   d i v . w r a p p e r   d i v : n t h - c h i l d ( 4 ) " ,   " l a s t - c h i l d " ) ;  
  
       / /   a d d _ C S S ( " d i v . e d i t " ,   " d i s p l a y :   n o n e ; " ) ;  
  
  
         v a r   l i n k 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 ( " A " ) ;  
         f o r   ( v a r   i   =   0 ;   i   <   l i n k s . l e n g t h ;   i + + )   {  
                 v a r   a _ l i n k   =   l i n k s [ i ] ;  
                 i f   ( / t r i g g e r / . t e s t ( a _ l i n k . c l a s s N a m e ) )   {  
                         v a r   t r i g g e r   =   a _ l i n k ;  
                         t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " t o g g l e ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                         t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                                 t o g g l e ( t h i s ) ;  
                                 r e t u r n   f a l s e ;  
                         }  
                 }  
                 i f   ( / a l t e r n a t e / . t e s t ( a _ l i n k . c l a s s N a m e ) )   {  
                         v a r   t r i g g e r   =   a _ l i n k ;  
                         t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " a l t e r n a t e ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                         t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                                 a l t e r n a t e ( t h i s ) ;  
                                 r e t u r n   f a l s e ;  
                         }  
                 }  
                 / * i f   ( / c l o s e - w r a p p e r / . t e s t ( a _ l i n k . c l a s s N a m e ) )   {  
                 v a r   t r i g g e r   =   a _ l i n k ;  
                 t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " c l o s e W ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                 t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                 c l o s e W ( t h i s ) ;  
                 r e t u r n   f a l s e ;  
                 }  
                 } * /  
                 i f   ( / s l i d e P r e v / . t e s t ( a _ l i n k . i d ) )   {  
                         v a r   t r i g g e r   =   a _ l i n k ;  
                         t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " g e t P r e v i o u s P i c t u r e O f T h e D a y ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                         t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                                 g e t P r e v i o u s P i c t u r e O f T h e D a y ( t h i s ) ;  
                                 r e t u r n   f a l s e ;  
                         }  
                 }  
  
                 i f   ( / s l i d e N e x t / . t e s t ( a _ l i n k . i d ) )   {  
                         v a r   t r i g g e r   =   a _ l i n k ;  
                         t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " g e t N e x t P i c t u r e O f T h e D a y ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                         t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                                 g e t N e x t P i c t u r e O f T h e D a y ( t h i s ) ;  
                                 r e t u r n   f a l s e ;  
                         }  
                 }  
         }  
         i f   ( w i n d o w . p a r e n t . d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) )   {  
                 w i n d o w . p a r e n t . i f r a m e H e i g h t ( ) ;  
         }  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " m e d i a - c o n t " ) )   {  
                 v a r   m y r e l   =   $ ( " d i v # m e d i a - c o n t   i m g " ) . a t t r ( " r e l " ) ;  
                 i f   ( ! m y r e l   | |   m y r e l   = =   " u n d e f i n e d "   | |   m y r e l   = =   " " )   {  
                         $ ( " a # s l i d e N e x t " ) . a d d C l a s s ( " l a s t " ) ;  
                 }  
         }  
  
         i f   ( $ ( " t a b l e . c h a r t " ) . l e n g t h   >   0 )   {  
                 c h a r t C h o o s e ( ) ;  
         }  
         e l s e   i f   ( $ ( " f i e l d s e t . v o t e - f o r m " ) . l e n g t h   >   0 )   {  
          
                 p o p u p _ i n i t _ i t e m ( ) ;  
         }  
  
         / / a l e r t ( d o c u m e n t . b o d y . c l a s s N a m e ) ;  
         i f   ( d o c u m e n t . b o d y . c l a s s N a m e   = =   " r t l " )   {  
                 / / b o d y R T L   =   t r u e ;  
                 $ ( " b o d y . r t l   d i v . c o l u m n - r i g h t   d i v . w r a p p e r   d i v . s l i d e r - c o n t   t a b l e " ) . w r a p ( " < d i v   s t y l e = ' w i d t h :   3 1 0 p x ; ' > < / d i v > " ) ;  
  
  
                 / / d o c u m e n t . b o d y . s t y l e . o v e r f l o w X   =   " h i d d e n " ;  
                 $ ( " h t m l " ) . c s s ( " o v e r f l o w " ,   " v i s i b l e " ) ;  
                 $ ( " h t m l " ) . c s s ( " o v e r f l o w X " ,   " a u t o " ) ;  
                 $ ( " h t m l " ) . c s s ( " o v e r f l o w Y " ,   " s c r o l l " ) ;  
  
                 $ ( " u l . t h e m e   l i " ) . c s s ( " p o s i t i o n " ,   " r e l a t i v e " ) ;  
                 / / $ ( " u l . t h e m e s " ) . c s s ( " p o s i t i o n " ,   " f i x e d " ) ;  
                 $ ( " u l . t h e m e s   l i " ) . c s s ( " p o s i t i o n " ,   " r e l a t i v e " ) ;  
         }  
  
         / * $ ( " a . s h o w - m o r e " ) . c l i c k ( f u n c t i o n   ( )   {  
         v a r   m y i m g   =   $ ( " d i v # m e d i a - c o n t   d i v . b a n n e r " ) . f i n d ( " i m g : f i r s t " ) . a t t r ( " r e l " ) ;  
         s h o w M o r e ( m y i m g ) ;  
         r e t u r n   f a l s e ;  
         } ) ; * /  
         $ ( " d i v . c o n t e n t - i m g - h o l d e r " ) . e a c h ( f u n c t i o n ( )   {                  
                 i f ( $ ( t h i s ) . f i n d ( " i m g " ) . w i d t h ( ) ! = 0 )   {                          
                         $ ( t h i s ) . w i d t h ( $ ( t h i s ) . f i n d ( " i m g " ) . w i d t h ( ) ) ;  
                 }  
         } ) ;  
  
         / / c l e a r C e l l s ( ) ;  
         t r a n s m i s s i o n T o g g l e ( ) ;  
         c r e a t e F r a m e L i n k s ( ) ;  
         c o n t a c t s T o g g l e ( ) ;  
         a r r a n g e L i s t s T o C o l ( " p r o g r a m - l a n g u a g e s " ) ;  
         a r r a n g e L i s t s T o C o l ( " r e g i o n a l - r a d i o s t a t i o n s " ) ;  
         i f   ( $ ( ' . l a n g u a g e s _ 2 c o l s ' ) . l e n g t h > 0 )   {  
                 a r r a n g e L i s t s T o C o l 2 ( " l a n g u a g e s _ 2 c o l s " ) ;  
         }  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " s c r o l l e r - c o n t r o l l e r " ) )   {  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0   *   ( $ ( w i n d o w ) . w i d t h ( )   /   6 4 0 ) )   +   " p x " ) ;  
                 s c r o l l D a y s ( ) ;  
                 $ ( " # s c r o l l e r - c o n t r o l l e r " ) . s o r t a b l e ( {  
                         / * c o n n e c t W i t h :   [ " # c o l u m n - c e n t e r " , " # c o l u m n - r i g h t " ] , * /  
                         / / h a n d l e :   $ ( t h i s ) ,    
                         i t e m s :   " d i v # s c r o l l e r - c a t c h e r " ,  
                         / / p l a c e h o l d e r :   " t a r g e t " ,    
                         z i n d e x :   3 0 1 ,  
                         r e v e r t :   t r u e ,  
                         / / s t a r t :   s t a r t D r a g ,  
                         / / s t o p :   s t o p D r a g ,    
                         / / r e c e i v e :   g e t I d ,  
                         s o r t :   c h a n g e P o s ,  
                         a x i s :   " x " ,  
                         c o n t a i n m e n t :   ' p a r e n t '  
                 } ) ;  
         }  
       / /   a r r a n g e W i d g e t s I n P a g e ( ) ;  
       l o a d X M L ( ) ;  
  
 }  
 f u n c t i o n   c r e a t e F r a m e L i n k s ( )   {  
         i f   ( p a r e n t . d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) )   {  
                 p a r e n t . d o c u m e n t . t i t l e   =   d o c u m e n t . t i t l e ;  
                 p a r e n t . w i n d o w . l o c a t i o n . h a s h   =   w i n d o w . l o c a t i o n ;  
         }  
 }  
 f u n c t i o n   a r r a n g e L i s t s T o C o l 2 ( c l a s s N )   {  
         / / a l e r t ( ' f g f g f g ' ) ;  
         $ ( " u l . "   +   c l a s s N   +   "   l i   a " ) . e a c h ( f u n c t i o n ( i n d e x )   {  
                 / / a l e r t ( i n d e x   +   ' :   '   +   $ ( t h i s ) . t e x t ( ) ) ;  
                 v a r   c o l s   =   2 ;  
                 $ ( t h i s ) . p a r e n t ( ) . a d d C l a s s ( " c o l - "   +   ( i n d e x   %   c o l s ) ) ;  
                 v a r   s t r i n g _ u r l L a n g   =   $ ( t h i s ) . a t t r ( ' h r e f ' ) ;  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / e n ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' e n _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / d e ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' d e _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / r u ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' r u _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / f r ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' f r _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / e s ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' e s _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / s r ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' s r _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / e l ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' e l _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / s q ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' s q _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / t r ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' t r _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / r a d i o b u l g a r i a ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' b g _ l a n g ' ) ;  
                 }  
                 i f   ( s t r i n g _ u r l L a n g . i n d e x O f ( ' / s i t e s / a r ' )   >   - 1 )   {  
                         $ ( t h i s ) . a d d C l a s s ( ' a r _ l a n g ' ) ;  
                 }  
         } ) ;              
                                
          
                                  
                                  
  
                  
  
         $ ( " u l . "   +   c l a s s N   +   "   l i . c o l - 1 " ) . e a c h ( f u n c t i o n ( )   {  
                                         $ ( t h i s ) . a f t e r ( " < l i   c l a s s = ' c l e a r '   s t y l e = ' f l o a t :   n o n e   ! i m p o r t a n t ;   f o n t - s i z e :   . 0 1 e m   ! i m p o r t a n t ; ' > < / l i > " ) ;  
         } ) ;  
        
  
 }  
 f u n c t i o n   t r a n s m i s s i o n T o g g l e ( )   {  
         $ ( " d i v # c o l u m n - r i g h t " ) . f i n d ( " u l . t r a n s m i s s i o n s " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
 }  
  
 v a r   c l o s e d _ t x t ;  
  
 f u n c t i o n   t o g g l e ( o )   {  
         v a r   e d i t   =   o . p a r e n t N o d e . n e x t S i b l i n g ;  
         w h i l e   ( e d i t . n o d e N a m e   ! =   " D I V "   & &   e d i t . c l a s s N a m e   ! =   " e d i t " )   {  
                 e d i t   =   e d i t . n e x t S i b l i n g ;  
         }  
         i f   ( e d i t . s t y l e . d i s p l a y   = =   " b l o c k " )   {  
                 e d i t . s t y l e . d i s p l a y   =   " n o n e " ;  
                 / / o . i n n e r H T M L   =   c l o s e d _ t x t ;  
                 $ ( o ) . t e x t ( c l o s e d _ t x t ) ;  
         }   e l s e   {  
                 c l o s e d _ t x t   =   o . i n n e r H T M L ;  
                 $ ( o ) . t e x t ( o . r e l ) ;  
                 e d i t . s t y l e . d i s p l a y   =   " b l o c k " ;  
         }  
  
         i f   ( / s e l e c t e d / . t e s t ( o . c l a s s N a m e ) )   {  
                 o . c l a s s N a m e   =   o . c l a s s N a m e . r e p l a c e ( " s e l e c t e d " ,   " " ) ;  
         }   e l s e   {  
                 o . c l a s s N a m e   + =   "   s e l e c t e d " ;  
         }  
 }  
 f u n c t i o n   a l t e r n a t e ( o )   {  
         v a r   e d i t   =   o . p a r e n t N o d e . p a r e n t N o d e ;  
         w h i l e   ( e d i t . n o d e N a m e   ! =   " D I V "   & &   e d i t . c l a s s N a m e   ! =   " w r a p p e r - c o n t e n t " )   {  
                 / / e d i t   =   e d i t . n e x t S i b l i n g ;  
         }  
         / / a l e r t ( $ ( e d i t ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) [ 0 ] . s t y l e . d i s p l a y ) ;  
         i f   ( $ ( e d i t ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) [ 0 ] )   {  
                 i f   ( $ ( e d i t ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) [ 0 ] . s t y l e . d i s p l a y   = =   " b l o c k "   | |   $ ( e d i t ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) [ 0 ] . s t y l e . d i s p l a y   = =   " " )   {  
                         $ ( e d i t ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
                 }   e l s e   {  
                         $ ( e d i t ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
                 }  
         }  
         e l s e   i f   ( $ ( e d i t ) . f i n d ( " u l . t r a n s m i s s i o n s " ) [ 0 ] )   {  
                 v a r   s i b l i n g U L ;  
                 i f   ( o . p a r e n t N o d e . n e x t S i b l i n g . c l a s s N a m e   = =   " t r a n s m i s s i o n s " )   {  
                         s i b l i n g U L   =   o . p a r e n t N o d e . n e x t S i b l i n g ;  
                 }  
                 e l s e   i f   ( o . p a r e n t N o d e . n e x t S i b l i n g . n e x t S i b l i n g . c l a s s N a m e   = =   " t r a n s m i s s i o n s " )   {  
                         s i b l i n g U L   =   o . p a r e n t N o d e . n e x t S i b l i n g . n e x t S i b l i n g ;  
                 }  
                 i f   ( s i b l i n g U L . s t y l e . d i s p l a y   = =   " n o n e " )   {  
                         s i b l i n g U L . s t y l e . d i s p l a y   =   " b l o c k " ;  
                 }  
                 e l s e   {  
                         / / t r a n s m i s s i o n T o g g l e ( ) ;  
                         s i b l i n g U L . s t y l e . d i s p l a y   =   " n o n e " ;  
                 }  
         }  
         e l s e   i f ( $ ( e d i t ) . f i n d ( " d i v . c o n t a c t s " ) [ 0 ] )   {  
 	 	 v a r   s i b l i n g D I V ;  
 	 	 i f ( o . p a r e n t N o d e . n e x t S i b l i n g . c l a s s N a m e   = =   " c o n t a c t s " )   {  
 	 	 	 s i b l i n g D I V   =   o . p a r e n t N o d e . n e x t S i b l i n g ;  
 	 	 }  
 	 	 e l s e   i f ( o . p a r e n t N o d e . n e x t S i b l i n g . n e x t S i b l i n g . c l a s s N a m e   = =   " c o n t a c t s " )   {  
 	 	 	 s i b l i n g D I V   =   o . p a r e n t N o d e . n e x t S i b l i n g . n e x t S i b l i n g ;  
 	 	 }  
 	 	 i f ( s i b l i n g D I V . s t y l e . d i s p l a y   = =   " n o n e " )   {  
 	 	 	 s i b l i n g D I V . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 }  
 	 	 e l s e   {  
 	 	 	 / / t r a n s m i s s i o n T o g g l e ( ) ;  
 	 	 	 s i b l i n g D I V . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 }  
 	 }  
         i f   ( $ ( e d i t ) . f i n d ( " d i v . a c c e n t " ) [ 0 ] )   {  
                 i f   ( $ ( e d i t ) . f i n d ( " d i v . a c c e n t " ) [ 0 ] . s t y l e . d i s p l a y   = =   " b l o c k "   | |   $ ( e d i t ) . f i n d ( " d i v . a c c e n t " ) [ 0 ] . s t y l e . d i s p l a y   = =   " " )   {  
                         $ ( e d i t ) . f i n d ( " d i v . a c c e n t " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
                         $ ( e d i t ) . f i n d ( " h 3 . a c c e n t " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
                 }   e l s e   {  
                         $ ( e d i t ) . f i n d ( " d i v . a c c e n t " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
                         $ ( e d i t ) . f i n d ( " h 3 . a c c e n t " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
                 }  
         }  
  
         i f   ( / s e l e c t e d / . t e s t ( o . c l a s s N a m e ) )   {  
                 o . c l a s s N a m e   =   o . c l a s s N a m e . r e p l a c e ( " s e l e c t e d " ,   " " ) ;  
         }   e l s e   {  
                 o . c l a s s N a m e   + =   "   s e l e c t e d " ;  
         }  
  
         s a v e A l t e r n a t e ( o ) ;  
 }  
 f u n c t i o n   c l o s e W ( o ,   s t r )   {  
         v a r   e d i t   =   o . p a r e n t N o d e . p a r e n t N o d e ;  
         v a r   c a t   =   $ ( e d i t ) . f i n d ( " h 2   a " ) [ 0 ] ;  
         / / v a r   a n s w e r   =   c o n f i r m ( S t r i n g . F o r m a t ( q u e _ H i d e C a t e g o r y ,   c a t . i n n e r H T M L ) ) ;  
         v a r   a n s w e r   =   c o n f i r m ( s t r ) ;  
         i f   ( a n s w e r )   {  
                 s a v e C l o s e W ( o ) ;  
                 $ ( e d i t ) . r e m o v e ( ) ;  
         }  
         e l s e   {  
         }  
 }  
  
 f u n c t i o n   r e m o v e I t e m ( o )   {  
  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d )   {  
                 v a r   m y _ c o n t e n t   =   o . p a r e n t N o d e . n e x t S i b l i n g ;  
                 w h i l e   ( m y _ c o n t e n t . n o d e N a m e   ! =   " U L " )   {  
                         m y _ c o n t e n t   =   m y _ c o n t e n t . n e x t S i b l i n g ;  
  
                 }  
                 v a r   i t e m s _ a r r a y   =   m y _ c o n t e n t . g e t E l e m e n t s B y T a g N a m e ( " L I " ) ;  
                 v a r   t o t a l _ i t e m s   =   i t e m s _ a r r a y . l e n g t h ;  
  
                 f o r   ( v a r   i   =   t o t a l _ i t e m s   -   1 ;   i   >   0 ;   i - - )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( ! / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 l i _ i t e m . c l a s s N a m e   + =   "   h i d d e n " ;  
                                 b r e a k  
                         }  
  
                 }  
  
                 v a r   c o n t e n t _ u l   =   m y _ c o n t e n t . i d ;  
                 v a r   c o n t e n t _ w r a p p e r   =   m y _ c o n t e n t . p a r e n t N o d e . p a r e n t N o d e . i d ;  
                 v a r   c o n t e n t _ c o u n t e r   =   0 ;  
                 f o r   ( v a r   i   =   0 ;   i   <   i t e m s _ a r r a y . l e n g t h ;   i + + )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( ! / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 c o n t e n t _ c o u n t e r + + ;  
                         }  
                 }  
  
                 v a r   s t a t e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' h S t a t e - '   +   c o n t e n t _ w r a p p e r ) . v a l u e ;  
                 v a r   s u b C a t e g o r y   =   s p l i t B y L a s t H y p h e n ( c o n t e n t _ u l ) ;  
                 B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t C o n t e n t I t e m C o u n t ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   s t a t e ,   s u b C a t e g o r y ,   c o n t e n t _ c o u n t e r ) ;  
         }  
 }  
  
 f u n c t i o n   r e m o v e I t e m S i n g l e ( o )   {  
  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d )   {  
                 v a r   m y _ c o n t e n t   =   o . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e ;  
                 w h i l e   ( m y _ c o n t e n t . n o d e N a m e   ! =   " D I V " )   {  
                         m y _ c o n t e n t   =   m y _ c o n t e n t . n e x t S i b l i n g ;  
  
                 }  
                 v a r   l i s t s   =   $ ( m y _ c o n t e n t ) . f i n d ( " u l . t h e m e " ) ;  
                 v a r   t h e l i s t   =   l i s t s [ 0 ] ;  
  
                 v a r   i t e m s _ a r r a y   =   t h e l i s t . g e t E l e m e n t s B y T a g N a m e ( " L I " ) ;  
                 v a r   t o t a l _ i t e m s   =   i t e m s _ a r r a y . l e n g t h ;  
  
                 f o r   ( v a r   i   =   t o t a l _ i t e m s   -   1 ;   i   >   0 ;   i - - )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( ! / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 l i _ i t e m . c l a s s N a m e   + =   "   h i d d e n " ;  
                                 b r e a k  
                         }  
  
                 }  
  
                 v a r   c o n t e n t _ u l   =   t h e l i s t . i d ;  
                 v a r   c o n t e n t _ w r a p p e r   =   t h e l i s t . p a r e n t N o d e . p a r e n t N o d e . i d ;  
                 v a r   c o n t e n t _ c o u n t e r   =   0 ;  
                 f o r   ( v a r   i   =   0 ;   i   <   i t e m s _ a r r a y . l e n g t h ;   i + + )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( ! / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 c o n t e n t _ c o u n t e r + + ;  
                         }  
                 }  
  
                 v a r   s t a t e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' h S t a t e - '   +   c o n t e n t _ w r a p p e r ) . v a l u e ;  
                 v a r   s u b C a t e g o r y   =   s p l i t B y L a s t H y p h e n ( c o n t e n t _ u l ) ;  
                 B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t C o n t e n t I t e m C o u n t ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   s t a t e ,   s u b C a t e g o r y ,   c o n t e n t _ c o u n t e r ) ;  
         }  
 }  
  
 f u n c t i o n   a d d I t e m ( o )   {  
  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d )   {  
  
                 v a r   m y _ c o n t e n t   =   o . p a r e n t N o d e . n e x t S i b l i n g ;  
                 w h i l e   ( m y _ c o n t e n t . n o d e N a m e   ! =   " U L " )   {  
                         m y _ c o n t e n t   =   m y _ c o n t e n t . n e x t S i b l i n g ;  
                 }  
  
                 v a r   i t e m s _ a r r a y   =   m y _ c o n t e n t . g e t E l e m e n t s B y T a g N a m e ( " L I " ) ;  
                 v a r   t o t a l _ i t e m s   =   i t e m s _ a r r a y . l e n g t h ;  
  
                 f o r   ( v a r   i   =   0 ;   i   <   t o t a l _ i t e m s ;   i + + )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 / * 	 	 	 	 i f ( l i _ i t e m = = i t e m s _ a r r a y [ t o t a l _ i t e m s - 1 ] )   {  
                                 o . s t y l e . c u r s o r   =   " a u t o " ;  
                                 } * /  
                                 l i _ i t e m . c l a s s N a m e   =   l i _ i t e m . c l a s s N a m e . r e p l a c e ( " h i d d e n " ,   " " ) ;  
                                 b r e a k  
                         }  
                 }  
  
                 v a r   c o n t e n t _ u l   =   m y _ c o n t e n t . i d ;  
                 v a r   c o n t e n t _ w r a p p e r   =   m y _ c o n t e n t . p a r e n t N o d e . p a r e n t N o d e . i d ;  
                 v a r   c o n t e n t _ c o u n t e r   =   0 ;  
                 f o r   ( v a r   i   =   0 ;   i   <   i t e m s _ a r r a y . l e n g t h ;   i + + )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( ! / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 c o n t e n t _ c o u n t e r + + ;  
                         }  
                 }  
                 v a r   s t a t e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' h S t a t e - '   +   c o n t e n t _ w r a p p e r ) . v a l u e ;  
                 v a r   s u b C a t e g o r y   =   s p l i t B y L a s t H y p h e n ( c o n t e n t _ u l ) ;  
                 B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t C o n t e n t I t e m C o u n t ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   s t a t e ,   s u b C a t e g o r y ,   c o n t e n t _ c o u n t e r ) ;  
         }  
 }  
 f u n c t i o n   a d d I t e m S i n g l e ( o )   {  
  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d )   {  
  
                 v a r   m y _ c o n t e n t   =   o . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e ;  
                 w h i l e   ( m y _ c o n t e n t . n o d e N a m e   ! =   " D I V " )   {  
                         m y _ c o n t e n t   =   m y _ c o n t e n t . n e x t S i b l i n g ;  
                 }  
  
                 v a r   l i s t s   =   $ ( m y _ c o n t e n t ) . f i n d ( " u l . t h e m e " ) ;  
                 v a r   t h e l i s t   =   l i s t s [ 0 ] ;  
  
                 v a r   i t e m s _ a r r a y   =   t h e l i s t . g e t E l e m e n t s B y T a g N a m e ( " L I " ) ;  
                 v a r   t o t a l _ i t e m s   =   i t e m s _ a r r a y . l e n g t h ;  
  
                 f o r   ( v a r   i   =   0 ;   i   <   t o t a l _ i t e m s ;   i + + )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 / * 	 	 	 	 i f ( l i _ i t e m = = i t e m s _ a r r a y [ t o t a l _ i t e m s - 1 ] )   {  
                                 o . s t y l e . c u r s o r   =   " a u t o " ;  
                                 } * /  
                                 l i _ i t e m . c l a s s N a m e   =   l i _ i t e m . c l a s s N a m e . r e p l a c e ( " h i d d e n " ,   " " ) ;  
                                 b r e a k  
                         }  
                 }  
  
                 v a r   c o n t e n t _ u l   =   t h e l i s t . i d ;  
                 v a r   c o n t e n t _ w r a p p e r   =   t h e l i s t . p a r e n t N o d e . p a r e n t N o d e . i d ;  
                 v a r   c o n t e n t _ c o u n t e r   =   0 ;  
                 f o r   ( v a r   i   =   0 ;   i   <   i t e m s _ a r r a y . l e n g t h ;   i + + )   {  
                         v a r   l i _ i t e m   =   i t e m s _ a r r a y [ i ] ;  
                         i f   ( ! / h i d d e n / . t e s t ( l i _ i t e m . c l a s s N a m e ) )   {  
                                 c o n t e n t _ c o u n t e r + + ;  
                         }  
                 }  
                 v a r   s t a t e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' h S t a t e - '   +   c o n t e n t _ w r a p p e r ) . v a l u e ;  
                 v a r   s u b C a t e g o r y   =   s p l i t B y L a s t H y p h e n ( c o n t e n t _ u l ) ;  
                 B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t C o n t e n t I t e m C o u n t ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   s t a t e ,   s u b C a t e g o r y ,   c o n t e n t _ c o u n t e r ) ;  
         }  
 }  
  
 f u n c t i o n   a d d _ C S S ( s e l e c t o r ,   d e c l a r a t i o n )   {  
  
         v a r   u a   =   n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ;  
         v a r   i s I E   =   ( / m s i e / . t e s t ( u a ) )   & &   ! ( / o p e r a / . t e s t ( u a ) )   & &   ( / w i n / . t e s t ( u a ) ) ;  
  
         v a r   s t y l e _ 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 ( " s t y l e " ) ;  
         s t y l e _ n o d e . s e t A t t r i b u t e ( " t y p e " ,   " t e x t / c s s " ) ;  
         s t y l e _ n o d e . s e t A t t r i b u t e ( " m e d i a " ,   " a l l " ) ;  
  
         i f   ( ! i s I E )   s t y l e _ n o d e . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( s e l e c t o r   +   "   { "   +   d e c l a r a t i o n   +   " } " ) ) ;  
  
         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 ] . a p p e n d C h i l d ( s t y l e _ n o d e ) ;  
  
         i f   ( i s I E   & &   d o c u m e n t . s t y l e S h e e t s   & &   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   >   0 )   {  
                 v a r   l a s t _ s t y l e _ n o d e   =   d o c u m e n t . s t y l e S h e e t s [ 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   -   1 ] ;  
                 i f   ( t y p e o f   ( l a s t _ s t y l e _ n o d e . a d d R u l e )   = =   " o b j e c t " )   l a s t _ s t y l e _ n o d e . a d d R u l e ( s e l e c t o r ,   d e c l a r a t i o n ) ;  
         }  
 } ;  
  
 f u n c t i o n   s a v e _ t h e m e s ( o )   {  
  
         v a r   f i e l d s e t   =   o . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e ;  
         v a r   c o n t e n t _ w r a p p e r   =   f i e l d s e t . p a r e n t N o d e . p a r e n t N o d e . i d ;  
  
  
         i f   ( f i e l d s e t . n o d e N a m e   = =   " F I E L D S E T " )   {  
  
                 i n p u t s   =   f i e l d s e t . 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   c h e c k b o x e s   =   n e w   A r r a y ( ) ;  
                 v a r   s e l e c t e d _ c h e c k b o x e s   =   n e w   A r r a y ( ) ;  
                 v a r   n o t s e l e c t e d _ c h e c k b o x e s   =   n e w   A r r a y ( ) ;  
                 v a r   s e l e c t e d S u b C a t e g o r i e s   =   n e w   A r r a y ( ) ;  
                 v a r   n o t s e l e c t e d S u b C a t e g o r i e s   =   n e w   A r r a y ( ) ;  
  
  
                 f o r   ( v a r   i   =   0 ;   i   <   i n p u t s . l e n g t h ;   i + + )   {  
                         v a r   m y _ i n p u t   =   i n p u t s [ i ] ;  
                         i f   ( m y _ i n p u t . t y p e   = =   " c h e c k b o x " )   {  
                                 c h e c k b o x e s . p u s h ( m y _ i n p u t ) ;  
                         }  
                 }  
  
                 f o r   ( v a r   i   =   0 ;   i   <   c h e c k b o x e s . l e n g t h ;   i + + )   {  
                         v a r   m y _ c h e c k b o x   =   c h e c k b o x e s [ i ] ;  
                         i f   ( m y _ c h e c k b o x . c h e c k e d   = =   " c h e c k e d "   | |   m y _ c h e c k b o x . c h e c k e d   = =   t r u e )   {  
                                 s e l e c t e d _ c h e c k b o x e s . p u s h ( m y _ c h e c k b o x . g e t A t t r i b u t e N o d e ( " r e l " ) . v a l u e ) ;  
                         }   e l s e   {  
                                 n o t s e l e c t e d _ c h e c k b o x e s . p u s h ( m y _ c h e c k b o x . g e t A t t r i b u t e N o d e ( " r e l " ) . v a l u e ) ;  
                         }  
                 }  
  
                 f o r   ( v a r   i   =   0 ;   i   <   n o t s e l e c t e d _ c h e c k b o x e s . l e n g t h ;   i + + )   {  
                         v a r   n o t s e l e c t e d _ c h e c k b o x   =   n o t s e l e c t e d _ c h e c k b o x e s [ i ] ;  
                         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( n o t s e l e c t e d _ c h e c k b o x ) )   {  
                                 v a r   c o n t e n t _ u l   =   d o c u m e n t . g e t E l e m e n t B y I d ( n o t s e l e c t e d _ c h e c k b o x ) ;  
                                 v a r   e d i t _ p   =   c o n t e n t _ u l ;  
                                 v a r   h 3   =   c o n t e n t _ u l ;  
  
                                 w h i l e   ( e d i t _ p . n o d e N a m e   ! =   " P " )   {  
                                         e d i t _ p   =   e d i t _ p . p r e v i o u s S i b l i n g ;  
                                 }  
                                 w h i l e   ( h 3 . n o d e N a m e   ! =   " H 3 " )   {  
                                         h 3   =   h 3 . p r e v i o u s S i b l i n g ;  
                                 }  
  
                                 h 3 . s t y l e . d i s p l a y   =   " n o n e " ;  
                                 e d i t _ p . s t y l e . d i s p l a y   =   " n o n e " ;  
                                 c o n t e n t _ u l . s t y l e . d i s p l a y   =   " n o n e " ;  
                         }  
  
                         n o t s e l e c t e d S u b C a t e g o r i e s . p u s h ( s p l i t B y L a s t H y p h e n ( n o t s e l e c t e d _ c h e c k b o x e s [ i ] ) ) ;  
                 }  
  
                 f o r   ( v a r   i   =   0 ;   i   <   s e l e c t e d _ c h e c k b o x e s . l e n g t h ;   i + + )   {  
                         v a r   s e l e c t e d _ c h e c k b o x   =   s e l e c t e d _ c h e c k b o x e s [ i ] ;  
                         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( s e l e c t e d _ c h e c k b o x ) )   {  
                                 v a r   c o n t e n t _ u l   =   d o c u m e n t . g e t E l e m e n t B y I d ( s e l e c t e d _ c h e c k b o x ) ;  
                                 v a r   e d i t _ p   =   c o n t e n t _ u l ;  
                                 v a r   h 3   =   c o n t e n t _ u l ;  
  
                                 w h i l e   ( e d i t _ p . n o d e N a m e   ! =   " P " )   {  
                                         e d i t _ p   =   e d i t _ p . p r e v i o u s S i b l i n g ;  
                                 }  
                                 w h i l e   ( h 3 . n o d e N a m e   ! =   " H 3 " )   {  
                                         h 3   =   h 3 . p r e v i o u s S i b l i n g ;  
                                 }  
  
                                 h 3 . s t y l e . d i s p l a y   =   " b l o c k " ;  
                                 e d i t _ p . s t y l e . d i s p l a y   =   " b l o c k " ;  
                                 c o n t e n t _ u l . s t y l e . d i s p l a y   =   " b l o c k " ;  
                         }  
  
                         s e l e c t e d S u b C a t e g o r i e s . p u s h ( s p l i t B y L a s t H y p h e n ( s e l e c t e d _ c h e c k b o x e s [ i ] ) ) ;  
  
                 }  
                 c l o s e _ e d i t ( o ) ;  
                 v a r   s t a t e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' h S t a t e - '   +   c o n t e n t _ w r a p p e r ) . v a l u e ;  
                 B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t S u b C a t e g o r y V i s i b i l i t y ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   s t a t e ,   s e l e c t e d S u b C a t e g o r i e s ,   n o t s e l e c t e d S u b C a t e g o r i e s ) ;  
         }  
  
 }  
  
 f u n c t i o n   c l o s e _ e d i t ( o )   {  
         v a r   c o n t a i n e r   =   o . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e ;  
  
         i f   ( c o n t a i n e r . n o d e N a m e   = =   " D I V " )   {  
                 v a r   l i n k s   =   c o n t a i n e r . g e t E l e m e n t s B y T a g N a m e ( " A " ) ;  
                 f o r   ( v a r   i   =   0 ;   i   <   l i n k s . l e n g t h ;   i + + )   {  
                         v a r   a _ l i n k   =   l i n k s [ i ] ;  
                         i f   ( / t r i g g e r / . t e s t ( a _ l i n k . c l a s s N a m e ) )   {  
                                 v a r   t r i g g e r   =   a _ l i n k ;  
                                 t o g g l e ( t r i g g e r ) ;  
                         }  
                 }  
         }  
 }  
  
 f u n c t i o n   c l o s e _ t h e m e s ( o )   {  
         v a r   c o n t a i n e r   =   o . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e ;  
         / / a l e r t ( c o n t a i n e r . c l a s s N a m e ) ;  
         i f   ( c o n t a i n e r . n o d e N a m e   = =   " D I V " )   {  
                 v a r   l i n k s   =   c o n t a i n e r . g e t E l e m e n t s B y T a g N a m e ( " A " ) ;  
                 f o r   ( v a r   i   =   0 ;   i   <   l i n k s . l e n g t h ;   i + + )   {  
                         v a r   a _ l i n k   =   l i n k s [ i ] ;  
                         i f   ( / t r i g g e r / . t e s t ( a _ l i n k . c l a s s N a m e ) )   {  
                                 v a r   t r i g g e r   =   a _ l i n k ;  
                                 t o g g l e ( t r i g g e r ) ;  
                         }  
                 }  
         }  
 }  
  
 $ ( w i n d o w ) . r e s i z e ( f u n c t i o n ( )   {  
         / / s e t W r a p p e r W i d t h s ( ) ;  
         i f   ( w i n d o w . p a r e n t . d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) )   {  
                 w i n d o w . p a r e n t . i f r a m e H e i g h t ( ) ;  
         }  
 } ) ;  
  
 f u n c t i o n   s e t W r a p p e r W i d t h s ( )   {  
         $ ( " d i v # c o l u m n - l e f t   d i v . w r a p p e r " ) . c s s ( " w i d t h " ,   $ ( " d i v # c o l u m n - l e f t " ) . w i d t h ( )   +   " p x " ) ;  
         / / $ ( " d i v # c o l u m n - l e f t   d i v . w r a p p e r " ) . c s s ( " w i d t h " ,   7 0 0   + " p x " ) ;  
 }  
 / / $ ( " d i v # c o l u m n - l e f t " ) . w i d t h ( )  
  
 / / t o d o   p e s h o ,   r e m o v e   p a r a m e t e r s   f r o m   u r l  
 f u n c t i o n   G e t U r l ( )   {  
         v a r   u r l N u m   =   S t r i n g ( d o c u m e n t . l o c a t i o n . h r e f ) ;  
         r e t u r n   u r l N u m ;  
 }  
  
 f u n c t i o n   s a v e C l o s e W ( o )   {  
         v a r   c o n t e n t _ w r a p p e r   =   o . p a r e n t N o d e . p a r e n t N o d e . i d ;  
         v a r   v i s i b l e   =   f a l s e ;  
         B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t W i d g e t V i s i b i l i t y ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   v i s i b l e ) ;  
 }  
  
 f u n c t i o n   s a v e A l t e r n a t e ( o )   {  
         v a r   c o n t e n t _ w r a p p e r   =   o . p a r e n t N o d e . p a r e n t N o d e . i d ;  
         v a r   e x p a n d e d ;  
         i f   ( o . c l a s s N a m e   = =   " a l t e r n a t e   s e l e c t e d " )   {  
                 e x p a n d e d   =   t r u e ;  
         }  
         e l s e   {  
                 e x p a n d e d   =   f a l s e ;  
         }  
         B N R . S h a r e P o i n t . W i d g e t S e r v i c e . S e t W i d g e t E x p a n s i b i l i t y ( c o n t e n t _ w r a p p e r ,   G e t U r l ( ) ,   e x p a n d e d ) ;  
 }  
 / / s p l i t   s t r i n g   b y   t h e   l a s t   h y p h e n  
 f u n c t i o n   s p l i t B y L a s t H y p h e n ( o )   {  
         o   =   S t r i n g ( o ) ;  
         v a r   m y A r r a y   =   o . s p l i t ( " _ " ) ;  
         r e t u r n   m y A r r a y [ m y A r r a y . l e n g t h   -   1 ] ;  
 }  
 f u n c t i o n   i f r a m e H e i g h t ( )   {  
         / / a l e r t ( d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) ) ;  
         / / a l e r t ( w i n d o w . p a r e n t . d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) ) ;  
         v a r   c o n t e n t h o l d e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) ;  
         c o n t e n t h o l d e r . s t y l e . h e i g h t   =   $ ( d o c u m e n t ) . h e i g h t ( )   -   3 3 ;  
 }  
 / / a r r a n g e   m a i n   s e c t i o n s   o n   h o m e p a g e   a t   p a g e   l o a d  
 f u n c t i o n   a r r a n g e S e c t i o n s ( )   {  
         v a r   s e c t i o n s   =   $ ( " d i v # c o l u m n - l e f t   d i v . w r a p p e r " ) ;  
         v a r   w i t h R e l   =   n e w   A r r a y ( ) ;  
         v a r   w i t h o u t R e l   =   n e w   A r r a y ( ) ;  
         v a r   n e w O r d e r   =   n e w   A r r a y ( ) ;  
  
         f o r   ( v a r   i   =   0 ;   i   <   s e c t i o n s . l e n g t h ;   i + + )   {  
                 v a r   a _ s e c t i o n   =   s e c t i o n s [ i ] ;  
                 i f   ( a _ s e c t i o n . g e t A t t r i b u t e ( " r e l " )   ! =   " " )   {  
                         w i t h R e l . p u s h ( a _ s e c t i o n ) ;  
                 }  
                 e l s e   {  
                         w i t h o u t R e l . p u s h ( a _ s e c t i o n ) ;  
                 }  
         }  
  
         f o r   ( v a r   j   =   0 ;   j   <   s e c t i o n s . l e n g t h ;   j + + )   {  
                 v a r   h a s F o u n d   =   f a l s e ;  
                 f o r   ( v a r   i   =   0 ;   i   <   s e c t i o n s . l e n g t h ;   i + + )   {  
                         v a r   a _ s e c t i o n   =   s e c t i o n s [ i ] ;  
                         i f   ( a _ s e c t i o n . g e t A t t r i b u t e ( " r e l " )   ! =   " "   & &   p a r s e I n t ( a _ s e c t i o n . g e t A t t r i b u t e ( " r e l " ) )   = =   j )   {  
                                 h a s F o u n d   =   t r u e ;  
                                 n e w O r d e r . p u s h ( a _ s e c t i o n ) ;  
                                 / / a l e r t ( a _ s e c t i o n . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . t a g N a m e ) ;  
                         }  
                         e l s e   {  
  
                         }  
                 }  
                 i f   ( ! h a s F o u n d )   {  
                         n e w O r d e r . p u s h ( w i t h o u t R e l . s h i f t ( ) ) ;  
                 }  
         }  
         f o r   ( v a r   k   =   1 ;   k   <   n e w O r d e r . l e n g t h ;   k + + )   {  
                 $ ( n e w O r d e r [ k ] ) . i n s e r t A f t e r ( n e w O r d e r [ k   -   1 ] ) ;  
         }  
 }  
  
  
 f u n c t i o n   g e t N e x t P i c t u r e O f T h e D a y ( o )   {  
         v a r   n e w O n e   =   $ ( " d i v . s l i d e r - c o n t " ) [ 0 ] ;  
         v a r   m y I m g   =   $ ( n e w O n e ) . f i n d ( " d i v . b a n n e r   i m g " ) [ 0 ] ;  
         v a r   r e l   =   $ ( m y I m g ) . a t t r ( " r e l " ) ;  
         l i n k O b j   =   o ;  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " s l i d e N e x t " ) . c l a s s N a m e   ! =   " s l i d e   l a s t " )   {  
                 B N R . S h a r e P o i n t . C o n t e n t S e r v i c e . G e t N e x t P i c t u r e O f T h e D a y ( r e l ,   G e t S P S i t e U r l ( ) ,   G e t S P W e b U r l ( ) ,   G e t S P L i s t N a m e ( ) ,   S e r v i c e M e t h o d N e x t _ S u c c e e d ,   S e r v i c e M e t h o d _ F a i l e d ,   n u l l ) ;  
         }  
 }  
  
 f u n c t i o n   g e t P r e v i o u s P i c t u r e O f T h e D a y ( o )   {  
         v a r   n e w O n e   =   $ ( " d i v . s l i d e r - c o n t " ) [ 0 ] ;  
         v a r   m y I m g   =   $ ( n e w O n e ) . f i n d ( " d i v . b a n n e r   i m g " ) [ 0 ] ;  
         v a r   r e l   =   $ ( m y I m g ) . a t t r ( " r e l " ) ;  
         l i n k O b j   =   o ;  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " s l i d e P r e v " ) . c l a s s N a m e   ! =   " s l i d e   f i r s t " )   {  
                 B N R . S h a r e P o i n t . C o n t e n t S e r v i c e . G e t P r e v i o u s P i c t u r e O f T h e D a y ( r e l ,   G e t S P S i t e U r l ( ) ,   G e t S P W e b U r l ( ) ,   G e t S P L i s t N a m e ( ) ,   S e r v i c e M e t h o d P r e v i o u s _ S u c c e e d ,   S e r v i c e M e t h o d _ F a i l e d ,   n u l l ) ;  
         }  
 }  
  
 / / C a l l B a c k s  
 f u n c t i o n   S e r v i c e M e t h o d _ F a i l e d ( e r r o r )   {  
         a l e r t ( e r r o r . _ m e s s a g e ) ;  
 }  
  
 f u n c t i o n   S e r v i c e M e t h o d N e x t _ S u c c e e d ( a r r N e w V a l u e s )   {  
         i f   ( a r r N e w V a l u e s )   {  
                 s l i d e N e x t ( l i n k O b j ,   a r r N e w V a l u e s ) ;  
         }  
 }  
  
 f u n c t i o n   S e r v i c e M e t h o d P r e v i o u s _ S u c c e e d ( a r r N e w V a l u e s )   {  
         i f   ( a r r N e w V a l u e s )   {  
                 s l i d e P r e v ( l i n k O b j ,   a r r N e w V a l u e s ) ;  
         }  
 }  
  
 f u n c t i o n   s l i d e P r e v ( o ,   a r r )   {  
  
         i f   ( ! i s S l i d i n g I m g   & &   d o c u m e n t . g e t E l e m e n t B y I d ( " s l i d e P r e v " ) . c l a s s N a m e   ! =   " s l i d e   f i r s t " )   {  
  
                 i s S l i d i n g I m g   =   t r u e ;  
                 v a r   o r i g i n a l   =   $ ( " d i v . s l i d e r - c o n t   d i v . b a n n e r " ) [ 0 ] ;  
                 v a r   o r i g i n a l W   =   $ ( o r i g i n a l ) . w i d t h ( ) ;  
                 $ ( " d i v # m e d i a - c o n t " ) . c s s ( " w i d t h " ,   2   *   $ ( o r i g i n a l ) . w i d t h ( )   +   1 0 0 ) ;  
                 $ ( " d i v . s l i d e r - c o n t   t a b l e " ) . c s s ( " w i d t h " ,   o r i g i n a l W ) ;  
  
  
                 v a r   n e w I m g S r c   =   a r r [ 1 ] ;  
                 v a r   n e w I m g I d   =   a r r [ 0 ] ;  
  
                 v a r   n e w D a t e   =   a r r [ 2 ] ;  
                 v a r   l i n k P o s   =   a r r [ 3 ] ;  
                 v a r   i m g U r l   =   a r r [ 4 ] ;  
                 v a r   i m g A l t   =   a r r [ 5 ] ;  
  
                 v a r   n e w H e a d i n g L i n k ;  
                 i f   ( a r r [ 6 ] )   {  
                         n e w H e a d i n g L i n k   =   a r r [ 6 ] ;  
                 }  
                 e l s e   {  
                         n e w H e a d i n g L i n k   =   " " ;  
                 }  
  
                 $ ( o r i g i n a l ) . c l o n e ( ) . i n s e r t A f t e r ( o r i g i n a l ) ;  
  
                 v a r   n e w O n e   =   $ ( " d i v . s l i d e r - c o n t " ) [ 0 ] ;  
                 / / $ ( n e w O n e ) . c s s ( " m a r g i n L e f t " ,   - $ ( " d i v . c o l u m n - r i g h t " ) . w i d t h ( ) ) ;  
                 v a r   m y I m g   =   $ ( n e w O n e ) . f i n d ( " d i v . b a n n e r   i m g " ) [ 1 ] ;  
                 v a r   m y H e a d i n g   =   $ ( n e w O n e ) . f i n d ( " t a b l e   t d   a " ) [ 0 ] ;  
                 v a r   m y H e a d i n g C o n t   =   $ ( n e w O n e ) . f i n d ( " t a b l e   t d   s p a n " ) [ 0 ] ;  
                 v a r   m y D a t e   =   $ ( n e w O n e ) . f i n d ( " t a b l e   t d   s p a n " ) [ 1 ] ;  
  
                 / / S e t t i n g   t h e   n e w   d a t a  
                  
                 $ ( m y I m g ) . a t t r ( ' s r c ' ,   n e w I m g S r c ) ;  
                 $ ( m y I m g ) . a t t r ( ' r e l ' ,   n e w I m g I d ) ;  
                 $ ( m y I m g ) . a t t r ( ' a l t ' ,   i m g A l t ) ;  
                 i f   ( m y H e a d i n g )   {  
                         $ ( m y H e a d i n g ) . r e p l a c e W i t h ( n e w H e a d i n g L i n k ) ;  
                 }  
                 e l s e   {  
                         i f   ( n e w H e a d i n g L i n k   ! =   " " )   {  
                                 $ ( m y H e a d i n g C o n t ) . h t m l ( n e w H e a d i n g L i n k ) ;  
                         }  
                         e l s e   {  
                                 $ ( m y H e a d i n g C o n t ) . h t m l ( " " ) ;  
                         }  
                 }  
                 $ ( m y D a t e ) . t e x t ( n e w D a t e ) ;  
  
                 v a r   i m g L i n k T o   =   $ ( " d i v . s l i d e r - c o n t   d i v . b a n n e r   a " ) [ 1 ] ;   ;  
                 i f   ( i m g U r l   & &   i m g U r l   ! =   " " )   {  
                         i m g L i n k T o . h r e f   =   i m g U r l ;  
                         i m g L i n k T o . s t y l e . c u r s o r   =   " h a n d " ;  
                         $ ( i m g L i n k T o ) . a d d C l a s s ( " t h i c k b o x " ) ;  
                 }  
                 e l s e   {  
                         i m g L i n k T o . h r e f   =   " # " ;  
                         i m g L i n k T o . s t y l e . c u r s o r   =   " d e f a u l t " ;  
                         $ ( i m g L i n k T o ) . r e m o v e C l a s s ( " t h i c k b o x " ) ;  
                 }  
  
                 i f   ( l i n k P o s   = =   " f i r s t " )   {  
                         $ ( " # s l i d e P r e v " ) . a d d C l a s s ( " f i r s t " ) ;  
                         $ ( " # s l i d e P r e v " ) . c l i c k ( f u n c t i o n ( )   {  
                                 r e t u r n   f a l s e ;  
                         } ) ;  
                 }  
                 e l s e   {  
                         $ ( " # s l i d e P r e v " ) . r e m o v e C l a s s ( " f i r s t " ) ;  
                 }  
                 $ ( " # s l i d e N e x t " ) . r e m o v e C l a s s ( " l a s t " ) ;  
  
                 i f   ( b o d y R T L )   {  
                         $ ( o r i g i n a l ) . a n i m a t e ( {  
                                 m a r g i n R i g h t :   - $ ( " d i v . c o l u m n - r i g h t " ) . w i d t h ( )  
                         } ,   5 0 0 ,   f u n c t i o n ( )   {  
                                 m o v e E n d e d ( t h i s ) ;  
                                 t b _ i n i t ( ' a . t h i c k b o x ,   a r e a . t h i c k b o x ,   i n p u t . t h i c k b o x ' ) ;  
                         } ) ;  
                 }  
                 e l s e   {  
                         $ ( o r i g i n a l ) . a n i m a t e ( {  
                                 m a r g i n L e f t :   - $ ( " d i v . c o l u m n - r i g h t " ) . w i d t h ( )  
                         } ,   5 0 0 ,   f u n c t i o n ( )   {  
                                 m o v e E n d e d ( t h i s ) ;  
                                 t b _ i n i t ( ' a . t h i c k b o x ,   a r e a . t h i c k b o x ,   i n p u t . t h i c k b o x ' ) ;  
                         } ) ;  
                 }  
         }  
 }  
 f u n c t i o n   s l i d e N e x t ( o ,   a r r )   {  
  
         i f   ( ! i s S l i d i n g I m g   & &   d o c u m e n t . g e t E l e m e n t B y I d ( " s l i d e N e x t " ) . c l a s s N a m e   ! =   " s l i d e   l a s t " )   {  
                 i s S l i d i n g I m g   =   t r u e ;  
                 v a r   o r i g i n a l   =   $ ( " d i v . s l i d e r - c o n t   d i v . b a n n e r " ) [ 0 ] ;  
                 v a r   o r i g i n a l W   =   $ ( o r i g i n a l ) . w i d t h ( ) ;  
                 $ ( o r i g i n a l ) . c s s ( " w i d t h " ,   o r i g i n a l W ) ;  
                 $ ( " d i v # m e d i a - c o n t " ) . c s s ( " w i d t h " ,   2   *   $ ( o r i g i n a l ) . w i d t h ( )   +   1 0 0 ) ;  
                 $ ( " d i v . s l i d e r - c o n t   t a b l e " ) . c s s ( " w i d t h " ,   o r i g i n a l W ) ;  
                 / / a l e r t ( o r i g i n a l . i n n e r H T M L ) ;  
  
                 v a r   n e w I m g S r c   =   a r r [ 1 ] ;  
                 v a r   n e w I m g I d   =   a r r [ 0 ] ;  
                 v a r   n e w D a t e   =   a r r [ 2 ] ;  
                 v a r   l i n k P o s   =   a r r [ 3 ] ;  
                 v a r   i m g U r l   =   a r r [ 4 ] ;  
                 v a r   i m g A l t   =   a r r [ 5 ] ;  
  
                 v a r   n e w H e a d i n g L i n k ;  
                 i f   ( a r r [ 6 ] )   {  
                         n e w H e a d i n g L i n k   =   a r r [ 6 ] ;  
                 }  
                 e l s e   {  
                         n e w H e a d i n g L i n k   =   " " ;  
                 }  
  
                 / / a l e r t ( " n e w I m g S r c :   " + n e w I m g S r c + " ,   n e w I m g I d :   " + n e w I m g I d + " ,   n e w H e a d i n g L i n k :   " + n e w H e a d i n g L i n k + " ,   n e w D a t e :   " + n e w D a t e + " ,   l i n k P o s :   " + l i n k P o s ) ;  
  
                 $ ( o r i g i n a l ) . c l o n e ( ) . i n s e r t B e f o r e ( o r i g i n a l ) ;  
  
                 v a r   n e w I m g   =   $ ( " d i v . s l i d e r - c o n t   d i v . b a n n e r " ) [ 0 ] ;  
  
                 i f   ( b o d y R T L )   {  
                         $ ( n e w I m g ) . c s s ( " m a r g i n R i g h t " ,   - $ ( " d i v . c o l u m n - r i g h t " ) . w i d t h ( ) ) ;  
                 }  
                 e l s e   {  
                         $ ( n e w I m g ) . c s s ( " m a r g i n L e f t " ,   - $ ( " d i v . c o l u m n - r i g h t " ) . w i d t h ( ) ) ;  
                 }  
  
                 v a r   n e w O n e   =   $ ( " d i v . s l i d e r - c o n t " ) [ 0 ] ;  
                 v a r   m y I m g   =   $ ( n e w O n e ) . f i n d ( " d i v . b a n n e r   i m g " ) [ 0 ] ;  
                 v a r   m y H e a d i n g   =   $ ( n e w O n e ) . f i n d ( " t a b l e   t d   a " ) [ 0 ] ;  
                 v a r   m y H e a d i n g C o n t   =   $ ( n e w O n e ) . f i n d ( " t a b l e   t d   s p a n " ) [ 0 ] ;  
                 v a r   m y D a t e   =   $ ( n e w O n e ) . f i n d ( " t a b l e   t d   s p a n " ) [ 1 ] ;  
  
                 / / S e t t i n g   t h e   n e w   d a t a  
                
                 $ ( m y I m g ) . a t t r ( ' s r c ' , n e w I m g S r c ) ;  
                 $ ( m y I m g ) . a t t r ( ' r e l ' , n e w I m g I d ) ;  
                 $ ( m y I m g ) . a t t r ( ' a l t ' , i m g A l t ) ;  
                 i f   ( m y H e a d i n g )   {  
                         $ ( m y H e a d i n g ) . r e p l a c e W i t h ( n e w H e a d i n g L i n k ) ;  
                 }  
                 e l s e   {  
                         i f   ( n e w H e a d i n g L i n k   ! =   " " )   {  
                                 $ ( m y H e a d i n g C o n t ) . h t m l ( n e w H e a d i n g L i n k ) ;  
                         }  
                         e l s e   {  
                                 $ ( m y H e a d i n g C o n t ) . h t m l ( " " ) ;  
                         }  
                 }  
                 $ ( m y D a t e ) . t e x t ( n e w D a t e ) ;  
  
                 v a r   i m g L i n k T o   =   $ ( " d i v . s l i d e r - c o n t   d i v . b a n n e r   a " ) [ 0 ] ;   ;  
                 i f   ( i m g U r l   & &   i m g U r l   ! =   " " )   {  
                         i m g L i n k T o . h r e f   =   i m g U r l ;  
                         i m g L i n k T o . s t y l e . c u r s o r   =   " h a n d " ;  
                         $ ( i m g L i n k T o ) . a d d C l a s s ( " t h i c k b o x " ) ;  
                 }  
                 e l s e   {  
                         i m g L i n k T o . h r e f   =   " # " ;  
                         i m g L i n k T o . s t y l e . c u r s o r   =   " d e f a u l t " ;  
                         $ ( i m g L i n k T o ) . r e m o v e C l a s s ( " t h i c k b o x " ) ;  
                 }  
  
                 i f   ( l i n k P o s   = =   " l a s t " )   {  
                         $ ( " # s l i d e N e x t " ) . a d d C l a s s ( " l a s t " ) ;  
                         $ ( " # s l i d e N e x t " ) . c l i c k ( f u n c t i o n ( )   {  
                                 r e t u r n   f a l s e ;  
                         } ) ;  
                 }  
                 e l s e   {  
                         $ ( " # s l i d e N e x t " ) . r e m o v e C l a s s ( " l a s t " ) ;  
                 }  
                 $ ( " # s l i d e P r e v " ) . r e m o v e C l a s s ( " f i r s t " ) ;  
  
                 i f   ( b o d y R T L )   {  
                         $ ( n e w I m g ) . a n i m a t e ( {  
                                 m a r g i n R i g h t :   0  
                         } ,   5 0 0 ,   f u n c t i o n ( )   {  
                                 m o v e E n d e d ( o r i g i n a l ) ;  
                                 t b _ i n i t ( ' a . t h i c k b o x ,   a r e a . t h i c k b o x ,   i n p u t . t h i c k b o x ' ) ;  
                         } ) ;  
                 }  
                 e l s e   {  
                         $ ( n e w I m g ) . a n i m a t e ( {  
                                 m a r g i n L e f t :   0  
                         } ,   5 0 0 ,   f u n c t i o n ( )   {  
                                 m o v e E n d e d ( o r i g i n a l ) ;  
                                 t b _ i n i t ( ' a . t h i c k b o x ,   a r e a . t h i c k b o x ,   i n p u t . t h i c k b o x ' ) ;  
                         } ) ;  
                 }  
         }  
 }  
 f u n c t i o n   m o v e E n d e d ( o )   {  
         $ ( o ) . r e m o v e ( ) ;  
         v a r   l i n k 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 ( " A " ) ;  
         f o r   ( v a r   i   =   0 ;   i   <   l i n k s . l e n g t h ;   i + + )   {  
                 v a r   a _ l i n k   =   l i n k s [ i ] ;  
                 i f   ( / s l i d e P r e v / . t e s t ( a _ l i n k . i d ) )   {  
                         v a r   t r i g g e r   =   a _ l i n k ;  
                         t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " g e t P r e v i o u s P i c t u r e O f T h e D a y ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                         t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                                 g e t P r e v i o u s P i c t u r e O f T h e D a y ( t h i s ) ;  
                                 r e t u r n   f a l s e ;  
                         }  
                 }  
                 i f   ( / s l i d e N e x t / . t e s t ( a _ l i n k . i d ) )   {  
                         v a r   t r i g g e r   =   a _ l i n k ;  
                         t r i g g e r . s e t A t t r i b u t e ( " o n c l i c k " ,   " g e t N e x t P i c t u r e O f T h e D a y ( t h i s ) ;   r e t u r n   f a l s e ; " ) ;  
                         t r i g g e r . o n c l i c k   =   f u n c t i o n ( )   {  
                                 g e t N e x t P i c t u r e O f T h e D a y ( t h i s ) ;  
                                 r e t u r n   f a l s e ;  
                         }  
                 }  
         }  
         i s S l i d i n g I m g   =   f a l s e ;  
  
         / * $ ( " a . s h o w - m o r e " ) . u n b i n d ( ' c l i c k ' ) ;  
         $ ( " a . s h o w - m o r e " ) . c l i c k ( f u n c t i o n   ( )   {  
         v a r   m y i m g   =   $ ( " d i v # m e d i a - c o n t   d i v . b a n n e r " ) . f i n d ( " i m g : f i r s t " ) . a t t r ( " r e l " ) ;  
         s h o w M o r e ( m y i m g ) ;  
         r e t u r n   f a l s e ;  
         } ) ; * /  
 }  
 f u n c t i o n   c o n f i r m a t i o n Q u e s t i o n ( q u e s t i o n )   {  
         r e t u r n   c o n f i r m ( q u e s t i o n ) ;  
 }  
  
 / / t o d o   p e s h o   r e v i s i o n   t h i s ! ! !  
 f u n c t i o n   G e t S P S i t e U r l ( )   {  
         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 ( ' h S i t e U r l ' ) . v a l u e ;  
 }  
  
 f u n c t i o n   G e t S P W e b U r l ( )   {  
         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 ( ' h W e b U r l ' ) . v a l u e ;  
 }  
  
 f u n c t i o n   G e t S P L i s t N a m e ( )   {  
         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 ( ' h L i s t N a m e ' ) . v a l u e ;  
 }  
  
 / *   I E   d e l e t i n g   u n n e c e s s a r y   c e l l s   * /  
 f u n c t i o n   c l e a r C e l l s ( )   {  
         v a r   c e l l 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 ( " t d " ) ;  
         f o r   ( v a r   i   =   0 ;   i   <   c e l l s . l e n g t h ;   i + + )   {  
                 i f   ( c e l l s [ i ] . i d . i n d e x O f ( " M S O Z o n e C e l l _ " )   ! =   - 1 )   {  
                         / * a l e r t ( c e l l s [ i ] . i n n e r H T M L ) ;  
                         c e l l s [ i ] . s t y l e . d i s p l a y   =   " n o n e " ; * /  
                 }  
         }  
 }  
 f u n c t i o n   G e t I m a g e P i c k e r H t m l ( k e y s t r ,   i m a g e t y p e s t r ,   i m a g e t y p e ,   c a s h K e y ,   p o s t b a c k B u t t o n N a m e ,   l a n g I d )   {  
  
         / / a l e r t ( w i n d o w . l o c a t i o n . h r e f ) ;  
         v a r   W i n S e t t i n g s D o c L i n k   =   " c e n t e r : y e s ; r e s i z a b l e : y e s ; d i a l o g H e i g h t : 4 5 0 p x ; d i a l o g W i d t h : 8 0 0 p x " ;  
         v a r   w i n d o w _ u r l   =   ' / _ l a y o u t s / B N R / I m a g e B o x P i c k e r . a s p x ? '   +   k e y s t r   +   ' = '   +   c a s h K e y   +   ' & '   +   i m a g e t y p e s t r   +   ' = '   +   i m a g e t y p e   +   ' & l a n g = '   +   l a n g I d ;  
         v a r   h t m l s   =   w i n d o w . s h o w M o d a l D i a l o g ( w i n d o w _ u r l ,   ' ' ,   W i n S e t t i n g s D o c L i n k ) ;  
         _ _ d o P o s t B a c k ( p o s t b a c k B u t t o n N a m e ,   h t m l s ) ;  
  
  
  
  
 }  
  
 f u n c t i o n   G e t F t p B r o w s e r S e l e c t e d F i l e ( w e b R e l a t i v e U r l )   {  
  
         v a r   W i n S e t t i n g s D o c L i n k   =   " c e n t e r : y e s ; r e s i z a b l e : y e s ; d i a l o g H e i g h t : 4 5 0 p x ; d i a l o g W i d t h : 8 0 0 p x " ;  
         v a r   w i n d o w _ u r l   =   w e b R e l a t i v e U r l   +   ' / _ l a y o u t s / B N R / F t p B r o w s e r . a s p x ' ;  
         v a r   s e l e c t e d F i l e   =   w i n d o w . s h o w M o d a l D i a l o g ( w i n d o w _ u r l ,   ' ' ,   W i n S e t t i n g s D o c L i n k ) ;  
         _ _ d o P o s t B a c k ( " b u t t o n B r o w s e " ,   s e l e c t e d F i l e ) ;  
 }  
  
  
 f u n c t i o n   c r e a t e F l a s h ( o ,   n )   {  
         / /     a l e r t ( o + "   a n d   " + n ) ;  
         $ ( ' # c o n t a i n e r ' ) . f l a s h (  
                 {   s r c :   ' / S t y l e % 2 0 L i b r a r y / B N R / f / f l v . s w f ' ,  
                         w i d t h :   ' 8 5 % ' ,  
                         h e i g h t :   ' 4 0 p x ' ,  
                         w m o d e :   ' t r a n s p a r e n t ' ,  
                         s c a l e m o d e :   ' n o s c a l e ' ,  
                         f l a s h v a r s :   {   s o u r c e F i l e :   o ,   s o u r c e N a m e :   n   }  
                 } ,  
                 {   v e r s i o n :   8   }  
         ) ;  
 }  
 f u n c t i o n   c r e a t e F r a m e L i n k s ( )   {  
         i f   ( p a r e n t . d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) )   {  
                 p a r e n t . d o c u m e n t . t i t l e   =   d o c u m e n t . t i t l e ;  
                 p a r e n t . w i n d o w . l o c a t i o n . h a s h   =   w i n d o w . l o c a t i o n ;  
         }  
 }  
 f u n c t i o n   a r r a n g e L i s t s T o C o l ( c l a s s N )   {  
         v a r   l i s t s   =   $ ( " u l . "   +   c l a s s N ) ;  
         i f   ( $ ( l i s t s ) . l e n g t h   >   0 )   {  
                 $ ( " u l . "   +   c l a s s N   +   "   l i   a [ h r e f * = ' / a r / ' ] " ) . c s s ( " f o n t S i z e " ,   " 1 . 1 5 e m " ) ;  
  
                 i f   ( l i s t s . l e n g t h   >   0 )   {  
                         f o r   ( v a r   i   =   0 ;   i   <   l i s t s . l e n g t h ;   i + + )   {  
                                 / / a l e r t ( l i s t s [ i ] . c l a s s N a m e ) ;  
                                 v a r   c u r r L i s t   =   l i s t s [ i ] ;  
                                 v a r   l i s   =   $ ( c u r r L i s t ) . f i n d ( " l i " ) ;  
                                 v a r   l i s t W   =   $ ( c u r r L i s t ) . w i d t h ( ) ;  
  
                                 / / c h e c k   h o w   m a n y   c o l s   t h e r e   c a n   b e  
                                 v a r   c o l s   =   3 ;  
  
  
                                 v a r   c o u n t   =   0 ;  
                                 f o r   ( v a r   j   =   0 ;   j   <   l i s . l e n g t h ;   j + + )   {  
  
                                         l i s [ j ] . c l a s s N a m e   =   " c o l - "   +   ( j   %   c o l s ) ;  
                                         / * i f ( c o u n t   = =   0 )   {  
                                         l i s [ j ] . c l a s s N a m e   =   " f i r s t C o l " ;  
                                         }  
                                         e l s e   i f ( c o u n t   = =   1 )   {  
                                         l i s [ j ] . c l a s s N a m e   =   " s e c o n d C o l " ;  
                                         }  
                                         e l s e   i f ( c o u n t   = =   2 )   {  
                                         l i s [ j ] . c l a s s N a m e   =   " t h i r d C o l " ;  
                                         c o u n t   =   0 ;  
                                         } * /  
                                 }  
                                 $ ( " u l   l i . c o l - 0 " ) . c s s ( " c l e a r " ,   " b o t h " ) ;  
  
                                 v a r   m a x 0   =   0 ;  
                                 $ ( " u l   l i . c o l - 0 " ) . e a c h ( f u n c t i o n ( )   {  
                                         / / a l e r t ( 0 ) ;  
                                         i f   ( $ ( t h i s ) . w i d t h ( )   >   m a x 0 )  
                                                 m a x 0   =   $ ( t h i s ) . w i d t h ( ) ;  
                                 } ) ;  
  
                                 v a r   m a x 1   =   0 ;  
                                 $ ( " u l   l i . c o l - 1 " ) . e a c h ( f u n c t i o n ( )   {  
                                         i f   ( $ ( t h i s ) . w i d t h ( )   >   m a x 1 )  
                                                 m a x 1   =   $ ( t h i s ) . w i d t h ( ) ;  
                                 } ) ;  
  
                                 v a r   m a x 2   =   0 ;  
                                 $ ( " u l   l i . c o l - 2 " ) . e a c h ( f u n c t i o n ( )   {  
                                         i f   ( $ ( t h i s ) . w i d t h ( )   >   m a x 2 )   m a x 2   =   $ ( t h i s ) . w i d t h ( ) ;  
                                 } ) ;  
  
                                 v a r   o n e T h i r d   =   ( l i s t W   -   ( m a x 0   +   m a x 1   +   m a x 2 )   -   3 3 )   /   3 ;  
                                 i f   ( o n e T h i r d   <   0 )   {  
                                         o n e T h i r d   =   0 ;  
                                 }  
  
                                 $ ( " u l . "   +   c l a s s N   +   "   l i . c o l - 0 " ) . w i d t h ( m a x 0 ) ;  
                                 $ ( " u l . "   +   c l a s s N   +   "   l i . c o l - 1 " ) . w i d t h ( m a x 1 ) ;  
                                 $ ( " u l . "   +   c l a s s N   +   "   l i . c o l - 2 " ) . w i d t h ( m a x 2 ) ;  
  
                                 $ ( " u l . "   +   c l a s s N   +   "   l i . c o l - 2 " ) . e a c h ( f u n c t i o n ( )   {  
                                         $ ( t h i s ) . a f t e r ( " < l i   c l a s s = ' c l e a r '   s t y l e = ' f l o a t :   n o n e   ! i m p o r t a n t ;   f o n t - s i z e :   . 0 1 e m   ! i m p o r t a n t ; ' > < / l i > " ) ;  
                                 } ) ;  
                         }  
                 }  
         }  
 }  
 f u n c t i o n   s c r o l l D a y s ( )   {  
         i f   ( b o d y R T L )   {  
                 / / S t a r t i n g   s c r o l l  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0   *   ( $ ( " d i v . p a g e " ) . w i d t h ( )   /   6 4 0 ) )   +   " p x " ) ;  
                 / / $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " l e f t " ,   $ ( " u l . w e e k - d a y s " ) . w i d t h ( )   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( )   +   " p x " ) ;  
                 / / $ ( " # s c r o l l e r - s t r i p e " ) . c s s ( " l e f t " ,   $ ( " d i v . p a g e " ) . w i d t h ( )   -   $ ( " # s c r o l l e r - s t r i p e " ) . w i d t h ( )   -   2 8   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . a n i m a t e ( {  
                         l e f t :   6 4 0   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( )   +   " p x "  
                 } ,   1 0 0 0 ) ;  
                 $ ( " # s c r o l l e r - s t r i p e " ) . a n i m a t e ( {  
                         r i g h t :   - 1 1   +   " p x "  
                 } ,   1 0 0 0 ) ;  
  
                 / / F i x x i n g   I E   f l o a t s   i n   t h e   p r o g r a m  
                 $ ( " d i v . w e e k - d a y   d l   d d " ) . a f t e r ( " < d d   c l a s s = ' c l e a r ' > < / d d > " ) ;  
  
                 / / A d d i n g   w e e k   d a y   l i n k s   b e h a v i o u r  
                 $ ( " u l . w e e k - d a y s   l i   a " ) . c l i c k ( f u n c t i o n ( )   {  
                         v a r   m y R e l   =   $ ( t h i s ) . a t t r ( " r e l " ) ;  
                         / / v a r   s t r   =   $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " l e f t " ) ;  
                         / / v a r   o f f s e t   =   N u m b e r ( s t r . s u b s t r i n g ( 0 , s t r . l e n g t h - 2 ) ) ;  
                         / / a l e r t ( o f f s e t ) ;  
                         / / $ ( u i . i t e m ) . c s s ( " l e f t " ,   S t r i n g ( o f f s e t ) + " p x " ) ;  
                         / / $ ( " # s c r o l l e r - s t r i p e " ) . c s s ( " l e f t " ,   S t r i n g ( - o f f s e t * ( 2 2 4 0 / 6 4 0 ) ) + " p x " ) ;  
                         / / $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0 * ( $ ( w i n d o w ) . w i d t h ( ) / 6 4 0 ) ) + " p x " ) ;  
  
                         v a r   m y O f f s e t   =   0 ;  
                         v a r   l i n k s   =   $ ( " u l . w e e k - d a y s   l i " ) ;  
                         f o r   ( v a r   j   =   0 ;   j   <   l i n k s . l e n g t h ;   j + + )   {  
                                 i f   ( j   <   m y R e l )   {  
                                         / / a l e r t ( $ ( l i n k s [ j ] ) . w i d t h ( ) ) ;  
                                         m y O f f s e t   + =   $ ( l i n k s [ j ] ) . w i d t h ( )   +   3 0 ;  
                                 }  
                         }  
  
                         / / R e s t r i c t i o n s  
                         i f   ( m y R e l   ! =   0 )   {  
                                 m y O f f s e t   - =   1 0 ;  
                         }  
                         v a r   u l W   =   $ ( " u l . w e e k - d a y s " ) . w i d t h ( ) ;  
                         i f   ( m y O f f s e t   >   u l W   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( ) )   {  
                                 m y O f f s e t   =   u l W   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( ) ;  
                         }  
  
                         v a r   c o n t O f f s e t   =   - m y R e l   *   3 2 0   -   1 5 ;  
                         i f   ( ( $ ( " # s c r o l l e r - s t r i p e " ) . w i d t h ( )   -   m y R e l   *   3 2 0 )   <   $ ( " d i v . p a g e " ) . w i d t h ( ) )   {  
                                 / / a l e r t ( ' t o o   l e f t . . . ' ) ;  
                                 c o n t O f f s e t   =   $ ( " d i v . p a g e " ) . w i d t h ( )   -   $ ( " # s c r o l l e r - s t r i p e " ) . w i d t h ( )   -   4 0 ;  
                         }  
  
                         $ ( " # s c r o l l e r - c a t c h e r " ) . a n i m a t e ( {  
                                 l e f t :   m y O f f s e t   +   6 4 0   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( )   +   " p x "  
                         } ,   1 0 0 0 ) ;  
                         $ ( " # s c r o l l e r - s t r i p e " ) . a n i m a t e ( {  
                                 r i g h t :   c o n t O f f s e t   +   " p x "  
                         } ,   1 0 0 0 ) ;  
                         r e t u r n   f a l s e ;  
                 } ) ;  
         }  
         e l s e   {  
                 / / S t a r t i n g   s c r o l l  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0   *   ( $ ( " d i v . p a g e " ) . w i d t h ( )   /   6 4 0 ) )   +   " p x " ) ;  
                 / / $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " l e f t " ,   $ ( " u l . w e e k - d a y s " ) . w i d t h ( )   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( )   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - s t r i p e " ) . c s s ( " l e f t " ,   $ ( " d i v . p a g e " ) . w i d t h ( )   -   $ ( " # s c r o l l e r - s t r i p e " ) . w i d t h ( )   -   2 8   +   " p x " ) ;  
                 $ ( " # s c r o l l e r - c a t c h e r " ) . a n i m a t e ( {  
                         l e f t :   0   +   " p x "  
                 } ,   1 0 0 0 ) ;  
                 $ ( " # s c r o l l e r - s t r i p e " ) . a n i m a t e ( {  
                         l e f t :   0   +   " p x "  
                 } ,   1 0 0 0 ) ;  
  
                 / / F i x x i n g   I E   f l o a t s   i n   t h e   p r o g r a m  
                 $ ( " d i v . w e e k - d a y   d l   d d " ) . a f t e r ( " < d d   c l a s s = ' c l e a r ' > < / d d > " ) ;  
  
                 / / A d d i n g   w e e k   d a y   l i n k s   b e h a v i o u r  
                 $ ( " u l . w e e k - d a y s   l i   a " ) . c l i c k ( f u n c t i o n ( )   {  
                         v a r   m y R e l   =   $ ( t h i s ) . a t t r ( " r e l " ) ;  
                         / / v a r   s t r   =   $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " l e f t " ) ;  
                         / / v a r   o f f s e t   =   N u m b e r ( s t r . s u b s t r i n g ( 0 , s t r . l e n g t h - 2 ) ) ;  
                         / / a l e r t ( o f f s e t ) ;  
                         / / $ ( u i . i t e m ) . c s s ( " l e f t " ,   S t r i n g ( o f f s e t ) + " p x " ) ;  
                         / / $ ( " # s c r o l l e r - s t r i p e " ) . c s s ( " l e f t " ,   S t r i n g ( - o f f s e t * ( 2 2 4 0 / 6 4 0 ) ) + " p x " ) ;  
                         / / $ ( " # s c r o l l e r - c a t c h e r " ) . c s s ( " w i d t h " ,   S t r i n g ( 1 8 0 * ( $ ( w i n d o w ) . w i d t h ( ) / 6 4 0 ) ) + " p x " ) ;  
  
                         v a r   m y O f f s e t   =   0 ;  
                         v a r   l i n k s   =   $ ( " u l . w e e k - d a y s   l i " ) ;  
                         f o r   ( v a r   j   =   0 ;   j   <   l i n k s . l e n g t h ;   j + + )   {  
                                 i f   ( j   <   m y R e l )   {  
                                         / / a l e r t ( $ ( l i n k s [ j ] ) . w i d t h ( ) ) ;  
                                         m y O f f s e t   + =   $ ( l i n k s [ j ] ) . w i d t h ( )   +   3 0 ;  
                                 }  
                         }  
  
                         / / R e s t r i c t i o n s  
                         i f   ( m y R e l   ! =   0 )   {  
                                 m y O f f s e t   - =   1 0 ;  
                         }  
                         v a r   u l W   =   $ ( " u l . w e e k - d a y s " ) . w i d t h ( ) ;  
                         i f   ( m y O f f s e t   >   u l W   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( ) )   {  
                                 m y O f f s e t   =   u l W   -   $ ( " # s c r o l l e r - c a t c h e r " ) . w i d t h ( ) ;  
                         }  
  
                         v a r   c o n t O f f s e t   =   - m y R e l   *   3 2 0 ;  
                         i f   ( ( $ ( " # s c r o l l e r - s t r i p e " ) . w i d t h ( )   -   m y R e l   *   3 2 0 )   <   $ ( " d i v . p a g e " ) . w i d t h ( ) )   {  
                                 / / a l e r t ( ' t o o   l e f t . . . ' ) ;  
                                 c o n t O f f s e t   =   $ ( " d i v . p a g e " ) . w i d t h ( )   -   $ ( " # s c r o l l e r - s t r i p e " ) . w i d t h ( )   -   2 8 ;  
                         }  
  
                         $ ( " # s c r o l l e r - c a t c h e r " ) . a n i m a t e ( {  
                                 l e f t :   m y O f f s e t   +   " p x "  
                         } ,   1 0 0 0 ) ;  
                         $ ( " # s c r o l l e r - s t r i p e " ) . a n i m a t e ( {  
                                 l e f t :   c o n t O f f s e t   +   " p x "  
                         } ,   1 0 0 0 ) ;  
                         r e t u r n   f a l s e ;  
                 } ) ;  
         }  
 }  
 f u n c t i o n   p o p u p _ i n i t _ i t e m ( )   {  
          
         / / l o a d   C S S   f i l e  
         l o a d j s c s s f i l e ( " / S t y l e % 2 0 L i b r a r y / B N R / c / t h i c k b o x . c s s " ,   " c s s " )   / / / / d y n a m i c a l l y   l o a d   a n d   a d d   t h i s   . c s s   f i l e  
         / / r e m o v e   o t h e r   t h i c k b o x   s t y l e s  
         v a r   p i c O f T h e D a y 2 ;  
         $ ( " l i n k [ r e l = ' s t y l e s h e e t ' ] " ) . e a c h ( f u n c t i o n ( )   {  
                 i f   ( t h i s . h r e f . i n d e x O f ( ' t h i c k b o x _ l o a d _ p i c ' )   ! =   - 1 )   {  
                         / / a l e r t ( t h i s . h r e f ) ;  
                         p i c O f T h e D a y 2   =   t h i s ;  
                 }  
         } ) ;  
         $ ( p i c O f T h e D a y 2 ) . r e m o v e ( ) ;  
  
 }  
 f u n c t i o n   c h a r t C h o o s e ( )   {  
         / / g e t   n u m b e r   o f   c h o i c e s   f r o m   h i d d e n   i n p u t  
         c h a r t C o u n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " c t l 0 0 _ P l a c e H o l d e r M a i n _ h i d d e n N u m b e r S o n g s " ) . v a l u e ;  
         c h a r t C o u n t   =   p a r s e I n t ( c h a r t C o u n t ) ;  
         / / a l e r t ( c h a r t C o u n t ) ;  
  
         / / l o a d   C S S   f i l e  
         l o a d j s c s s f i l e ( " / S t y l e % 2 0 L i b r a r y / B N R / c / t h i c k b o x . c s s " ,   " c s s " )   / / / / d y n a m i c a l l y   l o a d   a n d   a d d   t h i s   . c s s   f i l e  
  
         / / r e m o v e   o t h e r   t h i c k b o x   s t y l e s  
         v a r   p i c O f T h e D a y ;  
         $ ( " l i n k [ r e l = ' s t y l e s h e e t ' ] " ) . e a c h ( f u n c t i o n ( )   {  
                 i f   ( t h i s . h r e f . i n d e x O f ( ' t h i c k b o x _ l o a d _ p i c ' )   ! =   - 1 )   {  
                         / / a l e r t ( t h i s . h r e f ) ;  
                         p i c O f T h e D a y   =   t h i s ;  
                 }  
         } ) ;  
         / / a l e r t ( " S t y l e :   " + p i c O f T h e D a y ) ;  
         $ ( p i c O f T h e D a y ) . r e m o v e ( ) ;  
  
         v a r   i s A c t i v e   =   f a l s e ;  
         v a r   c h e c k e d A r r   =   0 ;  
         i f   ( ! c h a r t C o u n t )   {  
                 c h a r t C o u n t   =   1 ;  
         }  
  
         $ ( " t a b l e . c h a r t   i n p u t [ t y p e = ' c h e c k b o x ' ] " ) . e a c h ( f u n c t i o n ( )   {  
                 i f   ( $ ( t h i s ) . a t t r ( " c h e c k e d " )   = =   t r u e )   {  
                         c h e c k e d A r r + + ;  
                 }  
         } ) ;  
         i f   ( c h e c k e d A r r   < =   c h a r t C o u n t   & &   c h e c k e d A r r   >   0 )   {  
                 i s A c t i v e   =   t r u e ;  
         }  
  
         i f   ( i s A c t i v e )   {  
                 $ ( " s p a n . v o t e " ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
                 $ ( " a . v o t e " ) . c s s ( " d i s p l a y " ,   " i n l i n e - b l o c k " ) ;  
         }  
         e l s e   {  
                 $ ( " s p a n . v o t e " ) . c s s ( " d i s p l a y " ,   " i n l i n e - b l o c k " ) ;  
                 $ ( " a . v o t e " ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
         }  
  
  
  
 }  
 $ ( " t a b l e . c h a r t   i n p u t [ t y p e = ' c h e c k b o x ' ] " ) . c l i c k ( f u n c t i o n ( )   {  
  
 / / a l e r t ( c h a r t C o u n t ) ;  
         c h e c k e d A r r   =   0 ;  
         m y A r r   =   n e w   A r r a y ( ) ;  
         i s A c t i v e   =   f a l s e ;  
  
         $ ( " t a b l e . c h a r t   i n p u t [ t y p e = c h e c k b o x ] : c h e c k e d " ) . e a c h ( f u n c t i o n ( )   {  
                 / / a l e r t ( ' d f d f ' ) ;  
                 c h e c k e d A r r + + ;  
                 m y A r r . p u s h ( t h i s . i d ) ;  
         }  
 	 	 ) ;  
         / / a l e r t ( c h e c k e d A r r ) ;  
         / / a l e r t ( c h a r t C o u n t ) ;  
         i f   ( ( c h e c k e d A r r   <   ( c h a r t C o u n t + 1 ) )   & &   ( c h e c k e d A r r   >   0 ) )   {  
                 / / a l e r t ( ' t e s t ' ) ;  
                 i s A c t i v e   =   t r u e ;  
         }  
         i f   ( i s A c t i v e )   {  
                 $ ( " s p a n . v o t e " ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
                 $ ( " a . v o t e " ) . c s s ( " d i s p l a y " ,   " i n l i n e - b l o c k " ) ;  
         }  
         e l s e   {  
                 $ ( " s p a n . v o t e " ) . c s s ( " d i s p l a y " ,   " i n l i n e - b l o c k " ) ;  
                 $ ( " a . v o t e " ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
         }  
         / / a l e r t ( $ ( " t a b l e . c h a r t   i n p u t [ t y p e = ' c h e c k b o x ' ] " ) . a t t r ( " c h e c k e d " ) . l e n g t h ) ;  
 } ) ;  
 f u n c t i o n   l o a d j s c s s f i l e ( f i l e n a m e ,   f i l e t y p e )   {  
         i f   ( f i l e t y p e   = =   " j s " )   {   / / i f   f i l e n a m e   i s   a   e x t e r n a l   J a v a S c r i p t   f i l e  
                 v a r   f i l e r e f   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s c r i p t ' )  
                 f i l e r e f . s e t A t t r i b u t e ( " t y p e " ,   " t e x t / j a v a s c r i p t " )  
                 f i l e r e f . s e t A t t r i b u t e ( " s r c " ,   f i l e n a m e )  
         }  
         e l s e   i f   ( f i l e t y p e   = =   " c s s " )   {   / / i f   f i l e n a m e   i s   a n   e x t e r n a l   C S S   f i l e  
                 v a r   f i l e r e f   =   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 " )  
                 f i l e r e f . s e t A t t r i b u t e ( " r e l " ,   " s t y l e s h e e t " )  
                 f i l e r e f . s e t A t t r i b u t e ( " t y p e " ,   " t e x t / c s s " )  
                 f i l e r e f . s e t A t t r i b u t e ( " h r e f " ,   f i l e n a m e )  
         }  
         i f   ( t y p e o f   f i l e r e f   ! =   " u n d e f i n e 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 ] . a p p e n d C h i l d ( f i l e r e f )  
 }  
  
 f u n c t i o n   F i x I m a g e s ( )   {  
         i f   ( $ ( " d i v . c o n t e n t - i m g - h o l d e r " ) . l e n g t h   >   0 )  
                 $ ( " d i v . c o n t e n t - i m g - h o l d e r " ) . e a c h ( f u n c t i o n ( )   {  
                         $ ( t h i s ) . w i d t h ( $ ( t h i s ) . f i n d ( " i m g " ) . w i d t h ( ) ) ;  
                 } ) ;  
 }  
  
  
  
  
 f u n c t i o n   a r r a n g e W i d g e t s I n P a g e ( )   {  
         B N R . S h a r e P o i n t . W i d g e t S e r v i c e . G e t P a g e W i d g e t s ( G e t U r l ( ) ,   d o _ a r r a n g e W i d j e t s ) ;  
 }  
  
  
  
 / *   P e r s o n a l i z a t i o n   o f   t h e   h o m e p a g e   * /  
  
 f u n c t i o n   S t r i n g t o X M L ( t e x t ) {  
 	 i f   ( w i n d o w . A c t i v e X O b j e c t ) {  
 	     v a r   d o c = 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 D O M ' ) ;  
 	     d o c . a s y n c = ' f a l s e ' ;  
 	     d o c . l o a d X M L ( t e x t ) ;  
 	 }   e l s e   {  
 	     v a r   p a r s e r = n e w   D O M P a r s e r ( ) ;  
 	     v a r   d o c = p a r s e r . p a r s e F r o m S t r i n g ( t e x t , ' t e x t / x m l ' ) ;  
 	 }  
 	 r e t u r n   d o c ;  
 }  
  
 f u n c t i o n   l o a d X M L ( )  
 {  
         B N R . S h a r e P o i n t . W i d g e t S e r v i c e . G e t P a g e W i d g e t s ( G e t U r l ( ) ,   d o _ a r r a n g e W i d j e t s ) ;  
 }  
  
 f u n c t i o n   d o _ a r r a n g e W i d j e t s ( s t r W i d j e t s )   {  
         g e t m e s s a g e ( s t r W i d j e t s ) ;  
 }  
  
 f u n c t i o n   g e t m e s s a g e ( s t r W i d j e t s )  
 {  
         v a r   p r e f i x   =   S t r i n g t o X M L ( s t r W i d j e t s ) ;  
 	 v a r   n o d e s   =   p r e f i x . g e t E l e m e n t s B y T a g N a m e ( " C a t e g o r y " ) ;  
 	  
 	 i f ( n o d e s . l e n g t h   = =   0 )   {  
 	 	 r e t u r n ;  
 	 }  
 	  
 	 v a r   w i t h R e l   =   n e w   A r r a y ( ) ;  
 	 v a r   w i t h o u t R e l   =   n e w   A r r a y ( ) ;  
 	  
 	 / / g e t   e v e r y   w e b p a r t   f r o m   X M L   a s   n o d e  
 	 f o r   ( v a r   i   =   0 ;   i   <   n o d e s . l e n g t h ;   i + + )   {  
 	         v a r   w r a p p e r _ I d   =   S t r i n g ( n o d e s [ i ] . g e t A t t r i b u t e ( ' I d ' ) ) ;  
 	         v a r   w r a p p e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( w r a p p e r _ I d ) ;  
 	        
 	 	 / / c h e c k   h o w   m a n y   s u b c a t e g o r i e s   a r e   v i s i b l e  
 	 	 v a r   s u b c a t s   =   n o d e s [ i ] . g e t E l e m e n t s B y T a g N a m e ( " S u b C a t e g o r y " ) ;  
 	 	 f o r ( v a r   j = 0 ;   j < s u b c a t s . l e n g t h ;   j + + )   {  
 	 	         v a r   s u b c a t _ I d   =   S t r i n g ( s u b c a t s [ j ] . g e t A t t r i b u t e ( ' I d ' ) ) ;  
 	 	         v a r   s u b c a t _ I d _ r e a l   =   ' b _ '   +   w r a p p e r _ I d   +   ' _ '   +   s u b c a t _ I d ;  
 	 	          
 	 	         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( s u b c a t _ I d _ r e a l ) )   {  
 	  
 	 	                 v a r   s u b c a t   =   d o c u m e n t . g e t E l e m e n t B y I d ( s u b c a t _ I d _ r e a l ) ;  
 	 	 	 	 / / c h e c k   i f   s u b c a t e g o r y   i s   v i s i b l e   a n d   c o u n t s   t h e   i t e m s   i n   i t  
 	 	 	 	 v a r   s u b I s V i s i b l e   =   S t r i n g ( s u b c a t s [ j ] . g e t A t t r i b u t e ( ' V i s i b l e ' ) ) ;  
  
 	 	 	 	 i f ( s u b I s V i s i b l e   = =   " 1 " )   {  
 	 	 	 	 	 / / $ ( w r a p p e r ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
 	 	 	 	 	 v a r   l i s   =   $ ( s u b c a t ) . f i n d ( " l i " ) ;  
 	 	 	 	 	 $ ( l i s ) . a d d C l a s s ( " h i d d e n " ) ;  
 	 	 	 	 	  
 	 	 	 	 	 v a r   i t e m s   =   p a r s e I n t ( s u b c a t s [ j ] . g e t A t t r i b u t e ( ' I t e m C o u n t ' ) ) ;  
 	 	 	 	 	  
 	 	 	 	 	 f o r ( v a r   k = 0 ;   k < i t e m s ;   k + + )   {  
 	 	 	 	 	 	 / / v a r   c u r r   =   l i s [ k ] ;  
 	 	 	 	 	 	 / / a l e r t ( l i s [ k ] . i n n e r H T M L ) ;  
 	 	 	 	 	 	 $ ( l i s [ k ] ) . r e m o v e C l a s s ( " h i d d e n " ) ;  
 	 	 	 	 	 }  
 	 	 	 	 	  
 	 	 	 	 }  
 	 	 	 	 e l s e   {  
 	 	 	 	         i f   ( s u b c a t )   {  
 	 	 	 	 	 	 / / m a n a g e   c h e c k b o x e s  
 	 	 	 	 	         $ ( s u b c a t ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " f i e l d s e t . c o n t e n t - e d i t   i n p u t [ t y p e = ' c h e c k b o x ' ] " ) . e a c h ( f u n c t i o n ( )   {  
 	 	 	 	 	                 i f   ( $ ( t h i s ) . a t t r ( " r e l " )   = =   $ ( s u b c a t ) . a t t r ( " i d " ) )   {  
 	 	 	 	 	                         $ ( t h i s ) . a t t r ( " c h e c k e d " ,   f a l s e ) ;  
 	 	 	 	 	                 }  
 	 	 	 	 	         } ) ;  
 	 	 	 	 	 	  
 	 	 	 	 	 	 / / h i d e   U L   a n d   H 3  
 	 	 	 	 	         $ ( s u b c a t ) . p r e v ( ) . p r e v ( ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
 	 	 	 	 	         $ ( s u b c a t ) . p r e v ( ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
 	 	 	 	 	 	 $ ( s u b c a t ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 	  
 	 	 / / a r r a n g e   w e b p a r t s  
 	 	 v a r   o r d e r N o   =   S t r i n g ( n o d e s [ i ] . g e t A t t r i b u t e ( ' O r d e r N o ' ) ) ;  
 	 	 i f ( o r d e r N o   ! =   " " )   {  
 	 	 	 $ ( w r a p p e r ) . a t t r ( " r e l " ,   S t r i n g ( o r d e r N o ) ) ;  
 	 	 	 w i t h R e l . p u s h ( w r a p p e r ) ;  
 	 	 }  
 	 	 e l s e   {  
 	 	 	 / / $ ( w r a p p e r ) . a t t r ( " r e l " ,   " e m p t y " ) ;  
 	 	 	 w i t h o u t R e l . p u s h ( w r a p p e r ) ;  
 	 	 }  
 	 	  
 	 	 / / c h e c k   i f   w e b   p a r t   i s   e x p a n d e d  
 	 	 v a r   i s E x p a n d e d   =   S t r i n g ( n o d e s [ i ] . g e t A t t r i b u t e ( ' E x p a n d e d ' ) ) ;  
 	 	 i f ( i s E x p a n d e d   = =   " 0 " )   {  
 	 	 	 $ ( w r a p p e r ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
 	 	 	 $ ( w r a p p e r ) . f i n d ( " a . a l t e r n a t e " ) . r e m o v e C l a s s ( " s e l e c t e d " ) ;  
 	 	 	 $ ( w r a p p e r ) . f i n d ( " d i v . a c c e n t " ) . c s s ( " d i s p l a y " ,   " n o n e " ) ;  
 	 	 }  
 	 	 e l s e   {  
 	 	 	 $ ( w r a p p e r ) . f i n d ( " d i v . w r a p p e r - c o n t e n t " ) . c s s ( " d i s p l a y " ,   " b l o c k " ) ;  
 	 	 	 $ ( w r a p p e r ) . f i n d ( " a . a l t e r n a t e " ) . a d d C l a s s ( " s e l e c t e d " ) ;  
 	 	 	 $ ( w r a p p e r ) . f i n d ( " d i v . a c c e n t " ) . c s s ( " d i s p l a y " ,   " b l o c k " ) ;  
 	 	 }  
 	 	  
 	 	 / / c h e c k   i f   w e b   p a r t   i s   v i s i b l e  
 	 	 v a r   i s V i s i b l e   =   S t r i n g ( n o d e s [ i ] . g e t A t t r i b u t e ( ' V i s i b l e ' ) ) ;  
 	 	 i f   ( i s V i s i b l e   = =   " 0 " )   {  
 	 	         $ ( w r a p p e r ) . r e m o v e ( ) ;  
 	 	 }  
 	 }  
 	 a r r a n g e S e c t i o n s F r o m X M L ( w i t h R e l ,   w i t h o u t R e l ) ;  
  
 }  
 f u n c t i o n   a r r a n g e S e c t i o n s F r o m X M L ( w i t h R ,   w i t h o u t R )   {  
 	 v a r   s e c t i o n s   =   $ ( " d i v # c o l u m n - l e f t   d i v . w r a p p e r " ) ;  
 	 / * a l e r t ( $ ( s e c t i o n s [ 0 ] ) . a t t r ( ' r e l ' ) ) ; * /  
 	  
 	 v a r   w i t h R e l   =   w i t h R ;   / / n e w   A r r a y ( ) ;  
 	 v a r   w i t h o u t R e l   =   n e w   A r r a y ( ) ;  
 	 v a r   d i v s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c o l u m n - l e f t ' ) . g e t E l e m e n t s B y T a g N a m e ( ' d i v ' ) ;  
 	 / / $ ( " d i v # c o l u m n - l e f t   d i v . w r a p p e r [ r e l = ' e m p t y ' ] " ) ; / / w i t h o u t R ;   / / n e w   A r r a y ( ) ;  
 	 f o r ( v a r   i = 0 ;   i < d i v s . l e n g t h ;   i + + )   {  
 	 	 v a r   a _ l i n k   =   d i v s [ i ] ;  
 	 	 i f ( $ ( a _ l i n k ) . a t t r ( ' r e l ' )   = =   " e m p t y " )   {  
 	 	 	 	 w i t h o u t R e l . p u s h ( a _ l i n k ) ;  
 	 	 	 	 / / a l e r t ( a _ l i n k . i d ) ;  
 	 	 	 }  
 	 	 }  
  
 	 v a r   n e w O r d e r   =   n e w   A r r a y ( ) ;  
 	  
 	 / * w i t h R e l . s o r t ( f u n c t i o n ( a , b ) { r e t u r n   a   -   b } ) ; * /  
 	 f o r ( v a r   j = 0 ;   j < s e c t i o n s . l e n g t h ;   j + + )   {  
 	 	 v a r   h a s F o u n d   =   f a l s e ;  
 	 	 f o r ( v a r   i = 0 ;   i < s e c t i o n s . l e n g t h ;   i + + )   {  
 	 	 	 v a r   a _ s e c t i o n   =   s e c t i o n s [ i ] ;  
 	 	 	 i f ( a _ s e c t i o n . g e t A t t r i b u t e ( " r e l " )   ! =   n u l l   & &   p a r s e I n t ( a _ s e c t i o n . g e t A t t r i b u t e ( " r e l " ) )   = =   j )   {  
 	 	 	 	 / / a l e r t ( j ) ;  
 	 	 	 	 h a s F o u n d   =   t r u e ;  
 	 	 	 	 n e w O r d e r . p u s h ( a _ s e c t i o n ) ;  
 	 	 	 }  
 	 	 	 e l s e   {  
 	 	 	 	  
 	 	 	 }  
 	 	 }  
 	 	 i f ( ! h a s F o u n d )   {  
 	 	 	 / / a l e r t ( " n o r e l :   " + j ) ;  
 	 	 	 n e w O r d e r . p u s h ( w i t h o u t R e l . s h i f t ( ) ) ;  
 	 	 }  
 	 }  
 	  
 	 f o r ( v a r   k = 1 ;   k < n e w O r d e r . l e n g t h ;   k + + )   {  
 	 	 $ ( n e w O r d e r [ k ] ) . i n s e r t A f t e r ( n e w O r d e r [ k - 1 ] ) ;  
 	 }  
 }  
  
  
 $ ( w i n d o w ) . l o a d ( f u n c t i o n ( ) {  
         t r y {  
                 v a r   u l s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c t l 0 0 _ f o o t e r N a v i g a t i o n I d _ d i v H o l d e r ' ) . g e t E l e m e n t s B y T a g N a m e ( ' u l ' ) ;  
                 i f   ( u l s )  
                 {  
 	                 / / $ ( " d i v # c o l u m n - l e f t   d i v . w r a p p e r [ r e l = ' e m p t y ' ] " ) ; / / w i t h o u t R ;   / / n e w   A r r a y ( ) ;  
 	                 v a r   w i d t h _ l e f t   =   1 0 0   -   u l s . l e n g t h ;  
 	                 v a r   w i d t h _ x   =   p a r s e I n t ( w i d t h _ l e f t   /   u l s . l e n g t h ) ;  
                 	  
 	                 / / a l e r t ( w i d t h _ x ) ;  
                 	  
 	                 f o r ( v a r   i = 0 ;   i < u l s . l e n g t h ;   i + + )   {  
 	                         u l s [ i ] . s t y l e . w i d t h   =   w i d t h _ x   +   " % " ;  
 	                         u l s [ i ] . s t y l e . p a d d i n g R i g h t   =   0 . 9   +   " % " ;  
 	                 }  
 	         }  
 	 } c a t c h ( e )  
 	 {  
 	 }  
 } ) ;  
 f u n c t i o n   c o n t a c t s T o g g l e ( )   {  
 	 $ ( " d i v # c o l u m n - r i g h t " ) . f i n d ( " d i v . c o n t a c t s " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 }  
 f u n c t i o n   R S S _ t e x t _ c h a n g e ( )   {  
                                                 $ ( ' d i v . d e u t s c h e _ w e l l e   p ' ) . e a c h ( f u n c t i o n ( )   {  
 	 	 	 	 	 	          
 	 	 	 	 	 	         i f   ( $ ( t h i s ) . a t t r ( ' c l a s s ' )   ! =   " d a t e " )   {  
 	 	 	 	 	 	                  
 	 	 	 	 	 	                 v a r   t e x t _ b e f o r e   =   $ ( t h i s ) . h t m l ( ) ; 	 	 	 	 	 	                
 	 	 	 	 	 	                 i f   ( t e x t _ b e f o r e . i n d e x O f ( " ? " ) ! = - 1 )   {  
 	 	 	 	 	 	                         v a r   t e x t _ a f t e r   =   t e x t _ b e f o r e . s p l i t ( " ? " ) ;  
 	 	 	 	 	 	 	 	 	 v a r   t e x t _ a f t e r 1 1   =   t e x t _ a f t e r [ 0 ]   +   " ? " ;  
 	 	 	 	 	 	                         $ ( t h i s ) . h t m l ( t e x t _ a f t e r 1 1 ) ;  
 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 	 	 	 i f ( t e x t _ a f t e r 1 1 . i n d e x O f ( " . " ) ! = - 1 )   {  
 	 	 	 	 	 	                       	   	 v a r   t e x t _ a f t e r 2   =   t e x t _ a f t e r 1 1 . s p l i t ( " . " ) ;  
 	 	 	 	 	 	 	 	 	 	 v a r   t e x t _ a f t e r 2 2   =   t e x t _ a f t e r 2 [ 0 ]   +   ' . ' ;  
 	 	 	 	 	 	                         	 $ ( t h i s ) . h t m l ( t e x t _ a f t e r 2 2 ) ;    
 	 	 	 	 	 	                 	 }  
 	 	 	 	 	 	                 }  
 	 	 	 	 	 	                 e l s e   {  
 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	                         v a r   t e x t _ a f t e r   =   t e x t _ b e f o r e . s p l i t ( " . " ) ;  
 	 	 	 	 	 	 	 	 	 v a r   t e x t _ a f t e r 1 2   =   t e x t _ a f t e r [ 0 ]   +   " . " ;  
 	 	 	 	 	 	                         $ ( t h i s ) . h t m l ( t e x t _ a f t e r 1 2 ) ;    
 	 	 	 	 	 	                 }  
 	 	 	 	 	 	         }  
 	 	 	 	 	 	 } ) ;  
 	 	 }  
 / /   a u d i o   p o p u p  
 v a r   h t m l _ l i n k _ a t t r I D ;  
                 f u n c t i o n   A u d i o P o p U p ( a r r ,   t h i s _ l i n k 2 )   {  
                    
                         v a r   h t m l _ l i n k _ t e x t ;  
                         i f   ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . h a s C l a s s ( ' a c c e n t - i n f o ' ) )   {  
                                 h t m l _ l i n k _ t e x t   =   $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " h 2   a " ) . h t m l ( ) ;  
                                 h t m l _ l i n k _ a t t r I D   =   $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " h 2   a " ) . a t t r ( ' i d ' ) ;  
                                 i f   ( $ ( " . t r a n s m i s s i o n - a c c e n t   h 3 . t r a n s m i s s i o n " ) . l e n g t h   >   0 )   {  
                                         h t m l _ l i n k _ t e x t   =   $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " h 3   a " ) . h t m l ( ) ;  
                                         h t m l _ l i n k _ a t t r I D   =   $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " h 3   a " ) . a t t r ( ' i d ' ) ;  
                                 }  
                         }  
                         e l s e   {  
                                 h t m l _ l i n k _ t e x t   =   $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " p . h e a d i n g _ c a t e g o r y   a : l a s t " ) . h t m l ( ) ;  
                                 h t m l _ l i n k _ a t t r I D   =   $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " p . h e a d i n g _ c a t e g o r y   a : l a s t " ) . a t t r ( ' i d ' ) ;  
                         }  
                         / / a l e r t ( h t m l _ l i n k _ t e x t ) ;  
                          
                         / / $ ( t h i s _ l i n k 2 ) . h t m l ( " f g f d g d f g d f g d f g d g d g d f g " ) ;  
                         v a r   h t m l _ c o u n t e r _ t e x t   =   $ ( t h i s _ l i n k 2 ) . n e x t ( ) . h t m l ( ) ;  
                         / / a l e r t ( h t m l _ l i n k _ t e x t ) ;  
                         / / a l e r t ( $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . h t m l ( ) ) ;  
                         / *   h t m l   j q u e r y   t e m p l a t e   m a r k u p   * /  
                         v a r   m a r k u p   =   " < l i > < p   c l a s s = ' a u d i o - l i n k ' > < a   t a r g e t = ' _ p a r e n t '   o n c l i c k = ' S t a r t A u d i o 2 ( t h i s ) ; r e t u r n   f a l s e ; '   h r e f = ' $ { U r l } ' > $ { T i t l e } < / a > < / p > < / l i > " ;  
                         / / a l e r t ( m a r k u p ) ;  
                         / *   C o m p i l e   m a r k u p   s t r i n g   a s   a   n a m e d   t e m p l a t e   * /  
                         $ . t e m p l a t e ( " s u b m e n u T e m p l a t e " ,   m a r k u p ) ;  
  
  
  
                         / *   e m p t y   U L   l i s t   f r o m   o l d   n o d e s   * /  
                         $ ( " # s u b m e n u L i s t " ) . e m p t y ( ) ;  
  
                         / *   a d d i n g   n e w   n o d e s   i n s i d e   U L   u s i n g   j q u e r y   t e m p l a t e   * /  
                         $ . t m p l ( " s u b m e n u T e m p l a t e " ,   a r r ) . a p p e n d T o ( " # s u b m e n u L i s t " ) ;  
  
                         / * * /                    
                         $ ( ' . p o p u p _ a u d i o _ p o s i t i o n ' ) . s h o w ( ) ;  
                          
                         $ ( ' . p o p u p _ a u d i o _ i n s i d e   d i v . s c r o l l _ a u d i o ' ) . r e m o v e C l a s s ( ' g r e y _ z o n e ' ) ;  
                         i f   ( $ ( ' b o d y ' ) . h a s C l a s s ( ' r t l ' ) )   {  
                         }  
                         e l s e   {  
                                 i f   ( ( $ . b r o w s e r . m s i e )   & &   ( ( $ . b r o w s e r . v e r s i o n   = =   7 . 0 )   | |   ( $ . b r o w s e r . v e r s i o n   = =   6 . 0 ) ) )   {  
                                         i f   ( ! ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . h a s C l a s s ( ' a c c e n t - i n f o ' ) ) )   {  
                                                 $ ( ' u l . t h e m e ' ) . c s s ( ' p o s i t i o n ' ,   ' s t a t i c ' ) ;  
                                                 $ ( ' u l . t h e m e   l i ' ) . c s s ( ' p o s i t i o n ' ,   ' s t a t i c ' ) ;  
                                                 $ ( ' u l . t h e m e   l i   . m - b l o c k - l e f t ' ) . c s s ( ' p o s i t i o n ' ,   ' r e l a t i v e ' ) ;  
                                                 $ ( ' d i v . w r a p p e r   u l . t h e m e   l i   p . N e w s T y p e _ L a b e l ' ) . c s s ( ' t o p ' ,   ' 5 0 p x ' ) ;  
  
                                         }  
  
                                 }  
                         }  
                         $ ( ' . p o p u p _ a u d i o _ i n s i d e   d i v . t x t _ i n f o ' ) . t e x t ( h t m l _ l i n k _ t e x t ) ;  
                         $ ( ' . p o p u p _ a u d i o _ i n s i d e   d i v . a d d _ i n f o   . s m a l l _ c o u n t e r ' ) . t e x t ( h t m l _ c o u n t e r _ t e x t ) ;  
                         i f   ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . h a s C l a s s ( ' a c c e n t - i n f o ' ) )   {  
                                 i f   ( $ ( ' b o d y ' ) . h a s C l a s s ( ' r t l ' ) )   {  
                                         i f   ( ( $ . b r o w s e r . m s i e )   & &   ( ( $ . b r o w s e r . v e r s i o n   = =   7 . 0 )   | |   ( $ . b r o w s e r . v e r s i o n   = =   6 . 0 ) ) )   {  
  
  
                                                 $ ( ' d i v . w r a p p e r   u l . t h e m e   l i   p . h e a d i n g _ c a t e g o r y   i m g ' ) . c s s ( ' r i g h t ' ,   ' 0 p x ' ) ;  
                                                 v a r   p   =   $ ( t h i s _ l i n k 2 ) ;                                                  
                                                 v a r   p o s i t i o n   =   p . o f f s e t ( ) ;  
                                                 v a r   p o s i t i o n _ t o p   =   p o s i t i o n . t o p   -   2 0 ;                                                  
                                                
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' p o s i t i o n ' ,   ' a b s o l u t e ' ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' t o p ' ,   p o s i t i o n _ t o p ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' l e f t ' ,   ' a u t o ' ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' r i g h t ' ,   ' 1 2 % ' ) ;  
                                                  
                                         }  
                                         e l s e   {  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . p r e p e n d T o ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' l e f t ' ,   ' 1 0 0 p x ' )  
                                                                                           . c s s ( ' m a r g i n - t o p ' ,   ' - 1 5 p x ' ) ;  
                                         }  
                                 }  
                                 e l s e   {  
                                         i f   ( ( $ . b r o w s e r . m s i e )   & &   ( ( $ . b r o w s e r . v e r s i o n   = =   7 . 0 )   | |   ( $ . b r o w s e r . v e r s i o n   = =   6 . 0 ) ) )   {  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . a p p e n d T o ( ' b o d y ' ) ;  
                                                 v a r   p   =   $ ( t h i s _ l i n k 2 ) ;  
                                                 v a r   p o s i t i o n   =   p . o f f s e t ( ) ;  
                                                 v a r   p o s i t i o n _ t o p   =   p o s i t i o n . t o p   -   2 0 ;                                                  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' p o s i t i o n ' ,   ' a b s o l u t e ' ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' t o p ' ,   p o s i t i o n _ t o p ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' l e f t ' ,   ' 1 2 % ' ) ;                                        
                                                  
                                         }  
                                         e l s e   {  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . p r e p e n d T o ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' l e f t ' ,   ' 1 0 0 p x ' )  
                                                                                           . c s s ( ' m a r g i n - t o p ' ,   ' - 1 5 p x ' ) ;  
                                         }  
                                 }  
                         }  
                         e l s e   {                                
                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' l e f t ' ,   ' 0 p x ' ) ;  
                                 i f   ( $ ( ' b o d y ' ) . h a s C l a s s ( ' r t l ' ) )   {  
                                         i f   ( ( $ . b r o w s e r . m s i e )   & &   ( ( $ . b r o w s e r . v e r s i o n   = =   7 . 0 )   | |   ( $ . b r o w s e r . v e r s i o n   = =   6 . 0 ) ) )   {  
                                                 v a r   p   =   $ ( t h i s _ l i n k 2 ) ;                                                  
                                                 v a r   p o s i t i o n   =   p . o f f s e t ( ) ;  
                                                 v a r   p o s i t i o n _ t o p   =   p o s i t i o n . t o p   -   2 0 ;                                        
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . a p p e n d T o ( ' b o d y ' ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' p o s i t i o n ' ,   ' a b s o l u t e ' ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' t o p ' ,   p o s i t i o n _ t o p ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' l e f t ' ,   ' a u t o ' ) ;  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' r i g h t ' ,   ' 1 2 % ' ) ;  
                                                
                                         }  
                                         e l s e   {  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . p r e p e n d T o ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) ) ;  
                                         }  
                                 }  
                                 e l s e   {                                          
                                         i f   ( ( $ . b r o w s e r . m s i e )   & &   ( ( $ . b r o w s e r . v e r s i o n   = =   7 . 0 )   | |   ( $ . b r o w s e r . v e r s i o n   = =   6 . 0 ) ) )   {  
                                                  
                                                 $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' t o p ' ,   ' a u t o ' ) ;  
                                         }  
                                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . p r e p e n d T o ( $ ( t h i s _ l i n k 2 ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) ) ;  
                                 }  
                         }  
                          
                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' b a c k g r o u n d - c o l o r ' ,   ' # f f f ' ) ;  
                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' 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 ' ) ;  
                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . c s s ( ' w i d t h ' ,   ' 5 0 0 p x ' ) ;  
                        
                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . h i d e ( ) ;  
                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . s h o w ( ) ;                        
                         i f   ( ( $ ( ' . p o p u p _ a u d i o _ p o s i t i o n   u l # s u b m e n u L i s t ' ) . o u t e r H e i g h t ( ) )   >   ( 1 5 5 ) )   {  
                                 $ ( ' . p o p u p _ a u d i o _ i n s i d e   d i v . s c r o l l _ a u d i o ' ) . a d d C l a s s ( ' g r e y _ z o n e ' ) ;  
                         }                      
                 }  
                 f u n c t i o n   c l o s e _ a u d i o ( )   {  
                         $ ( ' d i v . p o p u p _ a u d i o _ p o s i t i o n ' ) . h i d e ( ) ;  
                         i f   ( $ ( ' b o d y ' ) . h a s C l a s s ( ' r t l ' ) )   {  
                         }  
                         e l s e   {  
                                 i f   ( ( $ . b r o w s e r . m s i e )   & &   ( ( $ . b r o w s e r . v e r s i o n   = =   7 . 0 )   | |   ( $ . b r o w s e r . v e r s i o n   = =   6 . 0 ) ) )   {  
                                         $ ( ' u l . t h e m e ' ) . c s s ( ' p o s i t i o n ' ,   ' r e l a t i v e ' ) ;  
                                         $ ( ' u l . t h e m e   l i ' ) . c s s ( ' p o s i t i o n ' ,   ' r e l a t i v e ' ) ;  
                                         $ ( ' u l . t h e m e   l i   . m - b l o c k - l e f t ' ) . c s s ( ' p o s i t i o n ' ,   ' ' ) ;  
                                         $ ( ' d i v . w r a p p e r   u l . t h e m e   l i   p . N e w s T y p e _ L a b e l ' ) . c s s ( ' t o p ' ,   ' 6 0 p x ' ) ;  
                                 }  
                         }  
                         / / $ ( ' d i v . w r a p p e r   u l . t h e m e   l i   p . N e w s T y p e _ L a b e l ' ) . c s s ( ' p o s i t i o n ' ,   ' a b s o l u t e ' ) ;  
                 }  
                 f u n c t i o n   S t a r t A u d i o 2 2 ( A u d i o F i l e F t p P a t h ,   A u d i o F i l e N a m e ,   A u d i o H o s t P a g e U r l ,   P o s t b a c k B u t t o n I D ,   A r g u m e n t S e p a r a t o r )   {  
                        
                         _ _ d o P o s t B a c k ( P o s t b a c k B u t t o n I D ,   A u d i o F i l e F t p P a t h   +   A r g u m e n t S e p a r a t o r   +   A u d i o F i l e N a m e   +   A r g u m e n t S e p a r a t o r   +   A u d i o H o s t P a g e U r l ) ;  
  
  
                 }  
                 f u n c t i o n   S t a r t A u d i o 2 ( t h i s _ l i n k )   {  
                         / / a l e r t ( $ ( t h i s _ l i n k ) . t e x t ( ) ) ;  
                         v a r   t e x t _ a u d i o _ l i n k   =   $ ( t h i s _ l i n k ) . t e x t ( ) ;  
                         / / a l e r t ( $ ( t h i s _ l i n k ) . a t t r ( ' h r e f ' ) ) ;  
                         v a r   u r l _ a u d i o _ l i n k   =   $ ( t h i s _ l i n k ) . a t t r ( ' h r e f ' ) ;  
                          
                         i f   ( p a r e n t . d o c u m e n t . g e t E l e m e n t B y I d ( ' c o n t e n t ' ) )   {  
                                 / / a l e r t ( ' y o u   h a v e   a l r e a d y   s t a r t e d   a   s o n g .   P l e a s e   c l o s e   t h e   o l d   o n e ' ) ;  
                                 $ ( w i n d o w . f r a m e E l e m e n t ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' d i v . a u d i o   e m b e d ' ) . r e m o v e ( ) ;  
                                 / / a l e r t ( ' p r e d i   g e n e r i r a n e   n a   n o v i a   e m b e d   t a g ' ) ;  
                                 $ ( w i n d o w . f r a m e E l e m e n t ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' # c o n t a i n e r ' ) . f l a s h (  
                                         {   s r c :   ' / S t y l e % 2 0 L i b r a r y / B N R / f / f l v . s w f ' ,  
                                                 w i d t h :   ' 8 5 % ' ,  
                                                 h e i g h t :   ' 4 0 p x ' ,  
                                                 w m o d e :   ' t r a n s p a r e n t ' ,  
                                                 s c a l e m o d e :   ' n o s c a l e ' ,  
                                                 f l a s h v a r s :   {   s o u r c e F i l e :   u r l _ a u d i o _ l i n k ,   s o u r c e N a m e :   t e x t _ a u d i o _ l i n k   }  
                                         } ,  
                                         {   v e r s i o n :   8   }  
         ) ;  
                                          
                         }  
                         e l s e   {  
                                
 / /                                 v a r   p a t h n a m e   =   w i n d o w . l o c a t i o n . p a t h n a m e ;  
 / /                                 v a r   u r l _ l o c a t i o n   =   p a t h n a m e . t o S t r i n g ( ) ;  
 / /                                 / / a l e r t ( t e s t 3 3 3 ) ;  
 / /                                 v a r   s t r i n g 2   =   u r l _ l o c a t i o n . s p l i t ( ' . b g / ' ) ;  
 / /                                 / / a l e r t ( s t r i n g 2 [ 0 ] ) ;  
 / /                                 / / a l e r t ( s t r i n g 2 [ 1 ] ) ;  
 / /                                 / / a l e r t ( s t r i n g 2 [ 2 ] ) ;  
 / /                                 / / s t r i n g 2 [ 0 ]   =   s t r i n g 2 [ 0 ]   +   " ; " ;  
 / /                                 / / a l e r t ( h t m l _ l i n k _ a t t r I D ) ;  
 / /                                 v a r   p o s t _ b a c k _ v a r _ w r a p   =   s t r i n g 2 [ 0 ]   +   " # "   +   h t m l _ l i n k _ a t t r I D ;  
 / /                                 / / a l e r t ( p o s t _ b a c k _ v a r _ w r a p ) ;  
 / /                                 S t a r t A u d i o 2 2 ( u r l _ a u d i o _ l i n k ,   t e x t _ a u d i o _ l i n k ,   p o s t _ b a c k _ v a r _ w r a p ,   ' f t p U r l L i n k B t n 0 ' ,   ' | s e m i c o l o n | ' ) ;  
                                 / /                                 / / r e t u r n   f a l s e ;  
  
                                 v a r   p a t h n a m e   =   w i n d o w . l o c a t i o n ;  
                                 v a r   u r l _ l o c a t i o n   =   p a t h n a m e . t o S t r i n g ( ) ;  
                                 v a r   s t r i n g 2   =   u r l _ l o c a t i o n . s p l i t ( ' # ' ) ;  
                                 / / a l e r t ( p a t h n a m e ) ;  
                                 / / a l e r t ( w i n d o w . l o c a t i o n . p a t h n a m e ) ;  
                                 / / v a r   u r l _ l o c a t i o n   =   p a t h n a m e . t o S t r i n g ( ) ;  
                                 / / a l e r t ( t e s t 3 3 3 ) ;  
                                 / / v a r   s t r i n g 2   =   u r l _ l o c a t i o n . s p l i t ( ' . b g / ' ) ;  
                                 / / a l e r t ( s t r i n g 2 [ 0 ] ) ;  
                                 / / a l e r t ( s t r i n g 2 [ 1 ] ) ;  
                                 / / a l e r t ( s t r i n g 2 [ 2 ] ) ;  
                                 / / s t r i n g 2 [ 0 ]   =   s t r i n g 2 [ 0 ]   +   " ; " ;  
                                 / / a l e r t ( h t m l _ l i n k _ a t t r I D ) ;  
                                 v a r   p o s t _ b a c k _ v a r _ w r a p   =   s t r i n g 2 [ 0 ]   +   " # "   +   h t m l _ l i n k _ a t t r I D ;  
                                 / / a l e r t ( p o s t _ b a c k _ v a r _ w r a p ) ;  
                                 S t a r t A u d i o 2 2 ( u r l _ a u d i o _ l i n k ,   t e x t _ a u d i o _ l i n k ,   p o s t _ b a c k _ v a r _ w r a p ,   ' f t p U r l L i n k B t n 0 ' ,   ' | s e m i c o l o n | ' ) ;  
                                 / / r e t u r n   f a l s e ;  
  
                         }  
                 }      
 
