ÿþ                v a r   E d i t i o n D a t e = n u l l ;                  
                 v a r   P a r a m s = l o c a t i o n . h r e f . m a t c h ( / \ / p a g e ( \ d { 1 , 2 } ) . * / ) ;  
                 v a r   a p p P a t h   =   G e t A p p l i c a t i o n P a t h F o r I m a g e s ( ) ;  
                 v a r   M o n t h N a m e s = [ " J a n " ,   " F e b " ,   " M a r " ,   " A p r " ,   " M a y " ,   " J u n " ,   " J u l " ,   " A u g " ,   " S e p " ,   " O c t " ,   " N o v " ,   " D e c " ] ;  
                 v a r   U R L = l o c a t i o n . h r e f . m a t c h ( / ^ ( . * ) \ / ( \ d { 1 , 2 } ) ( . { 3 } ) ( \ d { 4 } ) \ / ( . * ) $ / ) ;  
                 v a r   I s F u l l S c r e e n   =   f a l s e ;  
                  
                 v a r   P M _ O B J _ E d i t i o n s   = [ ] ;  
                 v a r   P M _ O B J _ S u p p l e m e n t s   = [ ] ;  
                 v a r   P M _ O B J _ S e c t i o n s = [ ] ;  
                 v a r   P M _ O B J _ S e c t i o n P a g e M a p p i n g s = [ ] ;                  
                 v a r   P M _ O B J _ M a x C o u n t = 0 ;                  
                 v a r   E d i t i o n S t r i p C o d e = " " ;  
                
                 i f ( U R L )  
                 {  
                         v a r   M o n t h I n d e x = 0 ;  
                         f o r ( M o n t h I n d e x = 0 ;   M o n t h I n d e x < M o n t h N a m e s . l e n g t h ;   M o n t h I n d e x + + )  
                         {  
                                 i f ( M o n t h N a m e s [ M o n t h I n d e x ]   = =   U R L [ 3 ] )  
                                 {  
                                         b r e a k ;  
                                 }  
                         }  
                         E d i t i o n D a t e = n e w   D a t e ( ) ;  
                         t r y  
                         {  
                                 E d i t i o n D a t e . s e t F u l l Y e a r ( U R L [ 4 ] , M o n t h I n d e x , U R L [ 2 ] ) ;  
                         }  
                         c a t c h ( e )  
                         {  
                                 E d i t i o n D a t e = n u l l ;  
                         }                          
                         i f ( l o c a t i o n . h r e f . i n d e x O f ( ' F u l l S c r e e n ' ) ! = - 1 )   I s F u l l S c r e e n   =   t r u e ;  
                 }  
                  
 	   f u n c t i o n   G e t B r o w s e r ( )   {  
 	 	 i f   (   d o c u m e n t . a l l   & &   d o c u m e n t . g e t E l e m e n t B y I d   & &   ! w i n d o w . o p e r a   )   {  
 	 	         r e t u r n   " I E " ;  
 	 	 }  
  
 	 	 i f   (   ! d o c u m e n t . a l l   & &   d o c u m e n t . g e t E l e m e n t B y I d   & &   ! w i n d o w . o p e r a   )   {  
 	 	         r e t u r n   " F F " ;  
 	 	 }  
  
 	 	 i f   (   d o c u m e n t . a l l   & &   d o c u m e n t . g e t E l e m e n t B y I d   & &   w i n d o w . o p e r a   )   {  
 	 	         r e t u r n   " O p e r a " ;  
 	 	 }  
 	 	 r e t u r n   " " ;  
 	 }  
  
         v a r   B r o w s e r T y p e = G e t B r o w s e r ( ) ;  
  
 f u n c t i o n   H a n d l e D o c C l i c k   ( )  
 {  
 	 H i d e P a g e T h u m b s ( ) ; 	  
 }  
  
 f u n c t i o n   H a n d l e B o d y L o a d   ( )  
 {  
 	 t r y  
 	 {  
 	 	 d o c u m e n t . t i t l e = O b j S e t t i n g s . P u b l i c a t i o n N a m e ;  
 	 	 v a r   O b j P i n C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P i n C o n t a i n e r ' ) ;  
 	 	 i f ( ! O b j P i n C o n t a i n e r )   r e t u r n ; 	  
 	 	 f o r ( v a r   i = 0 ; i < O b j P i n C o n t a i n e r . c h i l d N o d e s . l e n g t h ; i + + )  
 	 	 {  
 	 	 	 i f ( O b j P i n C o n t a i n e r . c h i l d N o d e s [ i ] . c l a s s N a m e = = " P i n C l a s s " )  
 	 	 	 { 	 	  
 	 	 	 	 O b j P i n C o n t a i n e r . c h i l d N o d e s [ i ] . s t y l e . t o p   =   p a r s e F l o a t ( O b j P i n C o n t a i n e r . c h i l d N o d e s [ i ] . s t y l e . t o p ) +   O b j S e t t i n g s . T o p B a r H e i g h t ;  
 	 	 	 }  
 	 	 }  
 	 	 O b j P i n C o n t a i n e r . s t y l e . d i s p l a y   = " b l o c k " ;  
 	 }  
 	 c a t c h   ( e )   { }  
 }        
 d o c u m e n t . b o d y . o n c l i c k   =   H a n d l e D o c C l i c k ;  
 w i n d o w . o n l o a d   =   H a n d l e B o d y L o a d ;  
  
 / /   T i g r a   C a l e n d a r   v 4 . 0 . 2   ( 0 1 / 1 2 / 2 0 0 9 )   A m e r i c a n   ( m m / d d / y y y y )  
 / /   h t t p : / / w w w . s o f t c o m p l e x . c o m / p r o d u c t s / t i g r a _ c a l e n d a r /  
 / /   P u b l i c   D o m a i n   S o f t w a r e . . .   Y o u ' r e   w e l c o m e .  
 / /   d e f a u l t   s e t t i n s  
  
 / / v a r   i m g p a t h   =    
 v a r   A _ T C A L D E F   =   {  
 	 ' m o n t h s '   :   [ ' J a n u a r y ' ,   ' F e b r u a r y ' ,   ' M a r c h ' ,   ' A p r i l ' ,   ' M a y ' ,   ' J u n e ' ,   ' J u l y ' ,   ' A u g u s t ' ,   ' S e p t e m b e r ' ,   ' O c t o b e r ' ,   ' N o v e m b e r ' ,   ' D e c e m b e r ' ] ,  
 	 ' w e e k d a y s '   :   [ ' S u ' ,   ' M o ' ,   ' T u ' ,   ' W e ' ,   ' T h ' ,   ' F r ' ,   ' S a ' ] ,  
 	 ' y e a r s c r o l l ' :   t r u e ,   / /   s h o w   y e a r   s c r o l l e r  
 	 ' w e e k s t a r t ' :   0 ,   / /   f i r s t   d a y   o f   w e e k :   0 - S u   o r   1 - M o  
 	 ' c e n t y e a r '     :   7 0 ,   / /   2   d i g i t   y e a r s   l e s s   t h a n   ' c e n t y e a r '   a r e   i n   2 0 x x ,   o t h e w i s e   i n   1 9 x x .  
 	 ' i m g p a t h '   :   a p p P a t h   + ' i m g / '   / /   d i r e c t o r y   w i t h   c a l e n d a r   i m a g e s  
 }  
 / /   d a t e   p a r s i n g   f u n c t i o n  
 f u n c t i o n   f _ t c a l P a r s e D a t e   ( s _ d a t e )   {  
  
 	 v a r   r e _ d a t e   =   / ^ \ s * ( \ d { 1 , 2 } ) \ / ( \ d { 1 , 2 } ) \ / ( \ d { 2 , 4 } ) \ s * $ / ;  
 	 i f   ( ! r e _ d a t e . e x e c ( s _ d a t e ) )  
 	 	 r e t u r n   a l e r t   ( " I n v a l i d   d a t e :   ' "   +   s _ d a t e   +   " ' . \ n A c c e p t e d   f o r m a t   i s   m m / d d / y y y y . " )  
 	 v a r   n _ d a y   =   N u m b e r ( R e g E x p . $ 2 ) ,  
 	 	 n _ m o n t h   =   N u m b e r ( R e g E x p . $ 1 ) ,  
 	 	 n _ y e a r   =   N u m b e r ( R e g E x p . $ 3 ) ;  
 	  
 	 i f   ( n _ y e a r   <   1 0 0 )  
 	 	 n _ y e a r   + =   ( n _ y e a r   <   t h i s . a _ t p l . c e n t y e a r   ?   2 0 0 0   :   1 9 0 0 ) ;  
 	 i f   ( n _ m o n t h   <   1   | |   n _ m o n t h   >   1 2 )  
 	 	 r e t u r n   a l e r t   ( " I n v a l i d   m o n t h   v a l u e :   ' "   +   n _ m o n t h   +   " ' . \ n A l l o w e d   r a n g e   i s   0 1 - 1 2 . " ) ;  
 	 v a r   d _ n u m d a y s   =   n e w   D a t e ( n _ y e a r ,   n _ m o n t h ,   0 ) ;  
 	 i f   ( n _ d a y   >   d _ n u m d a y s . g e t D a t e ( ) )  
 	 	 r e t u r n   a l e r t ( " I n v a l i d   d a y   o f   m o n t h   v a l u e :   ' "   +   n _ d a y   +   " ' . \ n A l l o w e d   r a n g e   f o r   s e l e c t e d   m o n t h   i s   0 1   -   "   +   d _ n u m d a y s . g e t D a t e ( )   +   " . " ) ;  
  
 	 r e t u r n   n e w   D a t e   ( n _ y e a r ,   n _ m o n t h   -   1 ,   n _ d a y ) ;  
 }  
 / /   d a t e   g e n e r a t i n g   f u n c t i o n  
 f u n c t i o n   f _ t c a l G e n e r D a t e   ( d _ d a t e )   {  
 	 r e t u r n   (  
 	 	   ( d _ d a t e . g e t M o n t h ( )   <   9   ?   ' 0 '   :   ' ' )   +   ( d _ d a t e . g e t M o n t h ( )   +   1 )   +   " / "  
 	 	 +   ( d _ d a t e . g e t D a t e ( )   <   1 0   ?   ' 0 '   :   ' ' )   +   d _ d a t e . g e t D a t e ( )   +   " / "  
 	 	 +   d _ d a t e . g e t F u l l Y e a r ( )  
 	 ) ;  
 }  
  
 / /   i m p l e m e n t a t i o n  
 f u n c t i o n   t c a l   ( a _ c f g ,   a _ t p l )   {  
  
 	 / /   a p p l y   d e f a u l t   t e m p l a t e   i f   n o t   s p e c i f i e d  
 	 i f   ( ! a _ t p l )  
 	 {  
 	 	 a _ t p l   =   A _ T C A L D E F ;  
 }  
 	 / /   r e g i s t e r   i n   g l o b a l   c o l l e c t i o n s  
 	 i f   ( ! w i n d o w . A _ T C A L S )  
 	 	 w i n d o w . A _ T C A L S   =   [ ] ;  
 	 i f   ( ! w i n d o w . A _ T C A L S I D X )  
 	 	 w i n d o w . A _ T C A L S I D X   =   [ ] ;  
 	  
 	 t h i s . s _ i d   =   a _ c f g . i d   ?   a _ c f g . i d   :   A _ T C A L S . l e n g t h ;  
 	 w i n d o w . A _ T C A L S [ t h i s . s _ i d ]   =   t h i s ;  
 	 w i n d o w . A _ T C A L S I D X [ w i n d o w . A _ T C A L S I D X . l e n g t h ]   =   t h i s ;  
 	  
 	 / /   a s s i g n   m e t h o d s  
 	 t h i s . f _ s h o w   =   f _ t c a l S h o w ;  
 	 t h i s . f _ h i d e   =   f _ t c a l H i d e ;  
 	 t h i s . f _ t o g g l e   =   f _ t c a l T o g g l e ;  
 	 t h i s . f _ u p d a t e   =   f _ t c a l U p d a t e ;  
 	 t h i s . f _ r e l D a t e   =   f _ t c a l R e l D a t e ;  
 	 t h i s . f _ p a r s e D a t e   =   f _ t c a l P a r s e D a t e ;  
 	 t h i s . f _ g e n e r D a t e   =   f _ t c a l G e n e r D a t e ;  
 	 / /   c r e a t e   c a l e n d a r   i c o n  
 	 t h i s . s _ i c o n I d   =   ' t c a l i c o _ '   +   t h i s . s _ i d ;  
 	 t h i s . e _ i c o n   =   f _ g e t E l e m e n t ( t h i s . s _ i c o n I d ) ;  
 	 i f   ( ! t h i s . e _ i c o n )   {  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s p n C a l e n d e r ' ) . i n n e r H T M L = ' < i m g   s r c = " '   +   a _ t p l . i m g p a t h   +   ' c a l . g i f "   i d = " '   +   t h i s . s _ i c o n I d   +   ' "   o n c l i c k = " A _ T C A L S [ \ ' '   +   t h i s . s _ i d   +   ' \ ' ] . f _ t o g g l e ( ) "   c l a s s = " t c a l I c o n "   a l t = " "   / > ' ;  
 	 	 t h i s . e _ i c o n   =   f _ g e t E l e m e n t ( t h i s . s _ i c o n I d ) ;  
 	 }  
 	 / /   s a v e   r e c e i v e d   p a r a m e t e r s  
 	 t h i s . a _ c f g   =   a _ c f g ;  
 	 t h i s . a _ t p l   =   a _ t p l ;  
 }  
  
 f u n c t i o n   f _ t c a l S h o w   ( d _ d a t e )   {  
  
 	 / /   f i n d   i n p u t   f i e l d  
 	 i f   ( ! t h i s . a _ c f g . c o n t r o l n a m e )  
 	 	 t h r o w ( " T C :   c o n t r o l   n a m e   i s   n o t   s p e c i f i e d " ) ;  
 	 i f   ( t h i s . a _ c f g . f o r m n a m e )   {  
 	 	 v a r   e _ f o r m   =   d o c u m e n t . f o r m s [ t h i s . a _ c f g . f o r m n a m e ] ;  
 	 	 i f   ( ! e _ f o r m )  
 	 	 	 t h r o w ( " T C :   f o r m   ' "   +   t h i s . a _ c f g . f o r m n a m e   +   " '   c a n   n o t   b e   f o u n d " ) ;  
 	 	 t h i s . e _ i n p u t   =   e _ f o r m . e l e m e n t s [ t h i s . a _ c f g . c o n t r o l n a m e ] ;  
 	 }  
 	 e l s e  
 	 	 t h i s . e _ i n p u t   =   f _ g e t E l e m e n t ( t h i s . a _ c f g . c o n t r o l n a m e ) ;  
  
 	 i f   ( ! t h i s . e _ i n p u t   | |   ! t h i s . e _ i n p u t . t a g N a m e   | |   t h i s . e _ i n p u t . t a g N a m e   ! =   ' I N P U T ' )  
 	 	 t h r o w ( " T C :   e l e m e n t   ' "   +   t h i s . a _ c f g . c o n t r o l n a m e   +   " '   d o e s   n o t   e x i s t   i n   "  
 	 	 	 +   ( t h i s . a _ c f g . f o r m n a m e   ?   " f o r m   ' "   +   t h i s . a _ c f g . c o n t r o l n a m e   +   " ' "   :   ' t h i s   d o c u m e n t ' ) ) ;  
  
 	 / /   d y n a m i c a l l y   c r e a t e   H T M L   e l e m e n t s   i f   n e e d e d  
 	 t h i s . e _ d i v   =   f _ g e t E l e m e n t ( ' t c a l ' ) ;  
 	 i f   ( ! t h i s . e _ d i v )   {  
 	 	 t h i s . e _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 	 t h i s . e _ d i v . i d   =   ' t c a l ' ;  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( t h i s . e _ d i v ) ;  
 	 }  
 	 t h i s . e _ s h a d e   =   f _ g e t E l e m e n t ( ' t c a l S h a d e ' ) ;  
 	 i f   ( ! t h i s . e _ s h a d e )   {  
 	 	 t h i s . e _ s h a d e   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 	 t h i s . e _ s h a d e . i d   =   ' t c a l S h a d e ' ;  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( t h i s . e _ s h a d e ) ;  
 	 }  
 	 t h i s . e _ i f r a m e   =     f _ g e t E l e m e n t ( ' t c a l I F ' )  
 	 i f   ( b _ i e F i x   & &   ! t h i s . e _ i f r a m e )   {  
 	 	 t h i s . e _ i f r a m e   =   d o c u m e n t . c r e a t e E l e m e n t ( " I F R A M E " ) ;  
 	 	 t h i s . e _ i f r a m e . s t y l e . f i l t e r   =   ' a l p h a ( o p a c i t y = 0 ) ' ;  
 	 	 t h i s . e _ i f r a m e . i d   =   ' t c a l I F ' ;  
 	 	 t h i s . e _ i f r a m e . s r c   =   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f ' ;  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( t h i s . e _ i f r a m e ) ;  
 	 }  
 	  
 	 / /   h i d e   a l l   c a l e n d a r s  
 	 f _ t c a l H i d e A l l ( ) ;  
  
 	 / /   g e n e r a t e   H T M L   a n d   s h o w   c a l e n d a r  
 	 t h i s . e _ i c o n   =   f _ g e t E l e m e n t ( t h i s . s _ i c o n I d ) ;  
 	 i f   ( ! t h i s . f _ u p d a t e ( ) )  
 	 	 r e t u r n ;  
  
 	 t h i s . e _ d i v . s t y l e . v i s i b i l i t y   =   ' v i s i b l e ' ;  
 	 t h i s . e _ s h a d e . s t y l e . v i s i b i l i t y   =   ' v i s i b l e ' ;  
 	 i f   ( t h i s . e _ i f r a m e )  
 	 	 t h i s . e _ i f r a m e . s t y l e . v i s i b i l i t y   =   ' v i s i b l e ' ;  
  
 	 / /   c h a n g e   i c o n   a n d   s t a t u s  
 	 t h i s . e _ i c o n . s r c   =   t h i s . a _ t p l . i m g p a t h   +   ' n o _ c a l . g i f ' ;  
 	 t h i s . e _ i c o n . t i t l e   =   ' C l o s e   C a l e n d a r ' ;  
 	 t h i s . b _ v i s i b l e   =   t r u e ;  
 }  
  
 f u n c t i o n   f _ t c a l H i d e   ( n _ d a t e )   {  
 	 i f   ( n _ d a t e )  
 	 {  
 	 	 t h i s . e _ i n p u t . v a l u e   =   t h i s . f _ g e n e r D a t e ( n e w   D a t e ( n _ d a t e ) ) ;  
 	 	 C h e c k E d i t i o n ( t h i s . e _ i n p u t . v a l u e ) ;  
 	 }  
  
 	 / /   n o   a c t i o n   i f   n o t   v i s i b l e  
 	 i f   ( ! t h i s . b _ v i s i b l e )  
 	 	 r e t u r n ;  
  
 	 / /   h i d e   e l e m e n t s  
 	 i f   ( t h i s . e _ i f r a m e )  
 	 	 t h i s . e _ i f r a m e . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;  
 	 i f   ( t h i s . e _ s h a d e )  
 	 	 t h i s . e _ s h a d e . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;  
 	 t h i s . e _ d i v . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;  
 	  
 	 / /   c h a n g e   i c o n   a n d   s t a t u s  
 	 t h i s . e _ i c o n   =   f _ g e t E l e m e n t ( t h i s . s _ i c o n I d ) ;  
 	 t h i s . e _ i c o n . s r c   =   t h i s . a _ t p l . i m g p a t h   +   ' c a l . g i f ' ;  
 	 t h i s . e _ i c o n . t i t l e   =   ' O p e n   C a l e n d a r ' ;  
 	 t h i s . b _ v i s i b l e   =   f a l s e ;  
 }  
  
 f u n c t i o n   f _ t c a l T o g g l e   ( )   {  
 	 r e t u r n   t h i s . b _ v i s i b l e   ?   t h i s . f _ h i d e ( )   :   t h i s . f _ s h o w ( ) ;  
 }  
  
 f u n c t i o n   f _ t c a l U p d a t e   ( d _ d a t e )   {  
 	  
 	 v a r   d _ c l i e n t   =   n e w   D a t e ( ) ;  
 	 d _ c l i e n t . s e t H o u r s ( 0 ) ;  
 	 d _ c l i e n t . s e t M i n u t e s ( 0 ) ;  
 	 d _ c l i e n t . s e t S e c o n d s ( 0 ) ;  
 	 d _ c l i e n t . s e t M i l l i s e c o n d s ( 0 ) ;  
 	  
 	 v a r   d _ t o d a y   =   t h i s . a _ c f g . t o d a y   ?   t h i s . f _ p a r s e D a t e ( t h i s . a _ c f g . t o d a y )   :   d _ c l i e n t ;  
 	 v a r   d _ s e l e c t e d   =   t h i s . e _ i n p u t . v a l u e   = =   ' '  
 	 	 ?   ( t h i s . a _ c f g . s e l e c t e d   ?   t h i s . f _ p a r s e D a t e ( t h i s . a _ c f g . s e l e c t e d )   :   d _ t o d a y )  
 	 	 :   t h i s . f _ p a r s e D a t e ( t h i s . e _ i n p u t . v a l u e ) ;  
  
 	 / /   f i g u r e   o u t   d a t e   t o   d i s p l a y  
 	 i f   ( ! d _ d a t e )  
 	 	 / /   s e l e c t e d   b y   d e f a u l t  
 	 	 d _ d a t e   =   d _ s e l e c t e d ;  
 	 e l s e   i f   ( t y p e o f ( d _ d a t e )   = =   ' n u m b e r ' )  
 	 	 / /   g e t   f r o m   n u m b e r  
 	 	 d _ d a t e   =   n e w   D a t e ( d _ d a t e ) ;  
 	 e l s e   i f   ( t y p e o f ( d _ d a t e )   = =   ' s t r i n g ' )  
 	 	 / /   p a r s e   f r o m   s t r i n g  
 	 	 t h i s . f _ p a r s e D a t e ( d _ d a t e ) ;  
 	 	  
 	 i f   ( ! d _ d a t e )   r e t u r n   f a l s e ;  
  
 	 / /   f i r s t   d a t e   t o   d i s p l a y  
 	 v a r   d _ f i r s t d a y   =   n e w   D a t e ( d _ d a t e ) ;  
 	 d _ f i r s t d a y . s e t D a t e ( 1 ) ;  
 	 d _ f i r s t d a y . s e t D a t e ( 1   -   ( 7   +   d _ f i r s t d a y . g e t D a y ( )   -   t h i s . a _ t p l . w e e k s t a r t )   %   7 ) ;  
 	  
 	 v a r   a _ c l a s s ,   s _ h t m l   =   ' < t a b l e   c l a s s = " c t r l " > < t b o d y > < t r > '  
 	 	 +   ( t h i s . a _ t p l . y e a r s c r o l l   ?   ' < t d '   +   t h i s . f _ r e l D a t e ( d _ d a t e ,   - 1 ,   ' y ' )   +   '   t i t l e = " P r e v i o u s   Y e a r " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p r e v _ y e a r . g i f "   / > < / t d > '   :   ' ' )  
 	 	 +   ' < t d '   +   t h i s . f _ r e l D a t e ( d _ d a t e ,   - 1 )   +   '   t i t l e = " P r e v i o u s   M o n t h " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p r e v _ m o n . g i f "   / > < / t d > < t h > '  
 	 	 +   t h i s . a _ t p l . m o n t h s [ d _ d a t e . g e t M o n t h ( ) ]   +   '   '   +   d _ d a t e . g e t F u l l Y e a r ( )  
 	 	 	 +   ' < / t h > < t d '   +   t h i s . f _ r e l D a t e ( d _ d a t e ,   1 )   +   '   t i t l e = " N e x t   M o n t h " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' n e x t _ m o n . g i f "   / > < / t d > '  
 	 	 +   ( t h i s . a _ t p l . y e a r s c r o l l   ?   ' < t d '   +   t h i s . f _ r e l D a t e ( d _ d a t e ,   1 ,   ' y ' )   +   '   t i t l e = " N e x t   Y e a r " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' n e x t _ y e a r . g i f "   / > < / t d > < / t d > '   :   ' ' )  
 	 	 +   ' < / t r > < / t b o d y > < / t a b l e > < t a b l e > < t b o d y > < t r   c l a s s = " w d " > ' ;  
  
 	 / /   p r i n t   w e e k d a y s   t i t l e s  
 	 f o r   ( v a r   i   =   0 ;   i   <   7 ;   i + + )  
 	 	 s _ h t m l   + =   ' < t h > '   +   t h i s . a _ t p l . w e e k d a y s [ ( t h i s . a _ t p l . w e e k s t a r t   +   i )   %   7 ]   +   ' < / t h > ' ;  
 	 s _ h t m l   + =   ' < / t r > '   ;  
  
 	 / /   p r i n t   c a l e n d a r   t a b l e  
 	 v a r   d _ c u r r e n t   =   n e w   D a t e ( d _ f i r s t d a y ) ;  
 	 w h i l e   ( d _ c u r r e n t . g e t M o n t h ( )   = =   d _ d a t e . g e t M o n t h ( )   | |  
 	 	 d _ c u r r e n t . g e t M o n t h ( )   = =   d _ f i r s t d a y . g e t M o n t h ( ) )   {  
 	  
 	 	 / /   p r i n t   r o w   h e d e r  
 	 	 s _ h t m l   + = ' < t r > ' ;  
 	 	 f o r   ( v a r   n _ w d a y   =   0 ;   n _ w d a y   <   7 ;   n _ w d a y + + )   {  
  
 	 	 	 a _ c l a s s   =   [ ] ;  
 	 	 	 / /   o t h e r   m o n t h  
 	 	 	 i f   ( d _ c u r r e n t . g e t M o n t h ( )   ! =   d _ d a t e . g e t M o n t h ( ) )  
 	 	 	 	 a _ c l a s s [ a _ c l a s s . l e n g t h ]   =   ' o t h e r m o n t h ' ;  
 	 	 	 / /   w e e k e n d  
 	 	 	 i f   ( d _ c u r r e n t . g e t D a y ( )   = =   0   | |   d _ c u r r e n t . g e t D a y ( )   = =   6 )  
 	 	 	 	 a _ c l a s s [ a _ c l a s s . l e n g t h ]   =   ' w e e k e n d ' ;  
 	 	 	 / /   t o d a y  
 	 	 	 i f   ( d _ c u r r e n t . v a l u e O f ( )   = =   d _ t o d a y . v a l u e O f ( ) )  
 	 	 	 	 a _ c l a s s [ a _ c l a s s . l e n g t h ]   =   ' t o d a y ' ;  
 	 	 	 / /   s e l e c t e d  
 	 	 	 i f   ( d _ c u r r e n t . v a l u e O f ( )   = =   d _ s e l e c t e d . v a l u e O f ( ) )  
 	 	 	 	 a _ c l a s s [ a _ c l a s s . l e n g t h ]   =   ' s e l e c t e d ' ;  
  
 	 	 	 s _ h t m l   + =   ' < t d   o n c l i c k = " A _ T C A L S [ \ ' '   +   t h i s . s _ i d   +   ' \ ' ] . f _ h i d e ( '   +   d _ c u r r e n t . v a l u e O f ( )   +   ' ) " '   +   ( a _ c l a s s . l e n g t h   ?   '   c l a s s = " '   +   a _ c l a s s . j o i n ( '   ' )   +   ' " > '   :   ' > ' )   +   d _ c u r r e n t . g e t D a t e ( )   +   ' < / t d > '  
 	 	 	 d _ c u r r e n t . s e t D a t e ( d _ c u r r e n t . g e t D a t e ( )   +   1 ) ;  
 	 	 }  
 	 	 / /   p r i n t   r o w   f o o t e r  
 	 	 s _ h t m l   + = ' < / t r > ' ;  
 	 }  
 	 s _ h t m l   + = ' < / t b o d y > < / t a b l e > ' ;  
 	  
 	 / /   u p d a t e   H T M L ,   p o s i t i o n s   a n d   s i z e s  
 	 t h i s . e _ d i v . i n n e r H T M L   =   s _ h t m l ;  
  
 	 v a r   n _ w i d t h     =   t h i s . e _ d i v . o f f s e t W i d t h ;  
 	 v a r   n _ h e i g h t   =   t h i s . e _ d i v . o f f s e t H e i g h t ;  
 	 v a r   n _ t o p     =   f _ g e t P o s i t i o n   ( t h i s . e _ i c o n ,   ' T o p ' )   +   t h i s . e _ i c o n . o f f s e t H e i g h t ;  
 	 v a r   n _ l e f t   =   f _ g e t P o s i t i o n   ( t h i s . e _ i c o n ,   ' L e f t ' )   -   n _ w i d t h   +   t h i s . e _ i c o n . o f f s e t W i d t h ;  
 	 i f   ( n _ l e f t   <   0 )   n _ l e f t   =   0 ;  
 	  
 	 t h i s . e _ d i v . s t y l e . l e f t   =   n _ l e f t   +   ' p x ' ;  
 	 t h i s . e _ d i v . s t y l e . t o p     =   n _ t o p   +   ' p x ' ;  
  
 	 t h i s . e _ s h a d e . s t y l e . w i d t h   =   ( n _ w i d t h   +   8 )   +   ' p x ' ;  
 	 t h i s . e _ s h a d e . s t y l e . l e f t   =   ( n _ l e f t   -   1 )   +   ' p x ' ;  
 	 t h i s . e _ s h a d e . s t y l e . t o p   =   ( n _ t o p   -   1 )   +   ' p x ' ;  
 	 t h i s . e _ s h a d e . i n n e r H T M L   =   b _ i e F i x  
 	 	 ?   ' < t a b l e > < t b o d y > < t r > < t d   r o w s p a n = " 2 "   c o l s p a n = " 2 "   w i d t h = " 6 " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < t d   w i d t h = " 7 "   h e i g h t = " 7 "   s t y l e = " f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ t r . p n g \ ' ,   s i z i n g M e t h o d = \ ' s c a l e \ ' ) ; " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < / t r > < t r > < t d   h e i g h t = " '   +   ( n _ h e i g h t   -   7 )   +   ' "   s t y l e = " f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ m r . p n g \ ' ,   s i z i n g M e t h o d = \ ' s c a l e \ ' ) ; " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < / t r > < t r > < t d   w i d t h = " 7 "   s t y l e = " f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ b l . p n g \ ' ,   s i z i n g M e t h o d = \ ' s c a l e \ ' ) ; " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < t d   s t y l e = " f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ b m . p n g \ ' ,   s i z i n g M e t h o d = \ ' s c a l e \ ' ) ; "   h e i g h t = " 7 "   a l i g n = " l e f t " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < t d   s t y l e = " f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ b r . p n g \ ' ,   s i z i n g M e t h o d = \ ' s c a l e \ ' ) ; " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < / t r > < t b o d y > < / t a b l e > '  
 	 	 :   ' < t a b l e > < t b o d y > < t r > < t d   r o w s p a n = " 2 "   w i d t h = " 6 " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < t d   r o w s p a n = " 2 " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < t d   w i d t h = " 7 "   h e i g h t = " 7 " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ t r . p n g " > < / t d > < / t r > < t r > < t d   b a c k g r o u n d = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ m r . p n g "   h e i g h t = " '   +   ( n _ h e i g h t   -   7 )   +   ' " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < / t r > < t r > < t d > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ b l . p n g " > < / t d > < t d   b a c k g r o u n d = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ b m . p n g "   h e i g h t = " 7 "   a l i g n = " l e f t " > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' p i x e l . g i f " > < / t d > < t d > < i m g   s r c = " '   +   t h i s . a _ t p l . i m g p a t h   +   ' s h a d e _ b r . p n g " > < / t d > < / t r > < t b o d y > < / t a b l e > ' ;  
 	  
 	 i f   ( t h i s . e _ i f r a m e )   {  
 	 	 t h i s . e _ i f r a m e . s t y l e . l e f t   =   n _ l e f t   +   ' p x ' ;  
 	 	 t h i s . e _ i f r a m e . s t y l e . t o p     =   n _ t o p   +   ' p x ' ;  
 	 	 t h i s . e _ i f r a m e . s t y l e . w i d t h   =   ( n _ w i d t h   +   6 )   +   ' p x ' ;  
 	 	 t h i s . e _ i f r a m e . s t y l e . h e i g h t   =   ( n _ h e i g h t   +   6 )   + ' p x ' ;  
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   f _ g e t P o s i t i o n   ( e _ e l e m R e f ,   s _ c o o r d )   {  
 	 v a r   n _ p o s   =   0 ,   n _ o f f s e t ,  
 	 	 e _ e l e m   =   e _ e l e m R e f ;  
  
 	 w h i l e   ( e _ e l e m )   {  
 	 	 n _ o f f s e t   =   e _ e l e m [ " o f f s e t "   +   s _ c o o r d ] ;  
 	 	 n _ p o s   + =   n _ o f f s e t ;  
 	 	 e _ e l e m   =   e _ e l e m . o f f s e t P a r e n t ;  
 	 }  
 	 / /   m a r g i n   c o r r e c t i o n   i n   s o m e   b r o w s e r s  
 	 i f   ( b _ i e M a c )  
 	 	 n _ p o s   + =   p a r s e I n t ( d o c u m e n t . b o d y [ s _ c o o r d . t o L o w e r C a s e ( )   +   ' M a r g i n ' ] ) ;  
 	 e l s e   i f   ( b _ s a f a r i )  
 	 	 n _ p o s   - =   n _ o f f s e t ;  
 	  
 	 e _ e l e m   =   e _ e l e m R e f ;  
 	 w h i l e   ( e _ e l e m   ! =   d o c u m e n t . b o d y )   {  
 	 	 n _ o f f s e t   =   e _ e l e m [ " s c r o l l "   +   s _ c o o r d ] ;  
 	 	 i f   ( n _ o f f s e t   & &   e _ e l e m . s t y l e . o v e r f l o w   = =   ' s c r o l l ' )  
 	 	 	 n _ p o s   - =   n _ o f f s e t ;  
 	 	 e _ e l e m   =   e _ e l e m . p a r e n t N o d e ;  
 	 }  
 	 r e t u r n   n _ p o s ;  
 }  
  
 f u n c t i o n   f _ t c a l R e l D a t e   ( d _ d a t e ,   d _ d i f f ,   s _ u n i t s )   {  
 	 v a r   s _ u n i t s   =   ( s _ u n i t s   = =   ' y '   ?   ' F u l l Y e a r '   :   ' M o n t h ' ) ;  
 	 v a r   d _ r e s u l t   =   n e w   D a t e ( d _ d a t e ) ;  
 	 d _ r e s u l t [ ' s e t '   +   s _ u n i t s ] ( d _ d a t e [ ' g e t '   +   s _ u n i t s ] ( )   +   d _ d i f f ) ;  
 	 i f   ( d _ r e s u l t . g e t D a t e ( )   ! =   d _ d a t e . g e t D a t e ( ) )  
 	 	 d _ r e s u l t . s e t D a t e ( 0 ) ;  
 	 r e t u r n   '   o n c l i c k = " A _ T C A L S [ \ ' '   +   t h i s . s _ i d   +   ' \ ' ] . f _ u p d a t e ( '   +   d _ r e s u l t . v a l u e O f ( )   +   ' ) " ' ;  
 }  
  
 f u n c t i o n   f _ t c a l H i d e A l l   ( )   {  
 	 i f ( t y p e o f ( w i n d o w . A _ T C A L S I D X )   ! =   ' u n d e f i n e d ' )  
 	 {  
 	 	 f o r   ( v a r   i   =   0 ;   i   <   w i n d o w . A _ T C A L S I D X . l e n g t h ;   i + + )  
 	 	 	 w i n d o w . A _ T C A L S I D X [ i ] . f _ h i d e ( ) ;  
 	 }  
 } 	  
  
 f _ g e t E l e m e n t   =   d o c u m e n t . a l l   ?  
 	 f u n c t i o n   ( s _ i d )   {   r e t u r n   d o c u m e n t . a l l [ s _ i d ]   }   :  
 	 f u n c t i o n   ( s _ i d )   {   r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( s _ i d )   } ;  
  
 i f   ( d o c u m e n t . a d d E v e n t L i s t e n e r )  
 	 w i n d o w . a d d E v e n t L i s t e n e r ( ' s c r o l l ' ,   f _ t c a l H i d e A l l ,   f a l s e ) ;  
 i f   ( w i n d o w . a t t a c h E v e n t )  
 	 w i n d o w . a t t a c h E v e n t ( ' o n s c r o l l ' ,   f _ t c a l H i d e A l l ) ;  
 	  
 / /   g l o b a l   v a r i a b l e s  
 v a r   s _ u s e r A g e n t   =   n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ,  
 	 r e _ w e b k i t   =   / W e b K i t \ / ( \ d + ) / i ;  
 v a r   b _ m a c   =   s _ u s e r A g e n t . i n d e x O f ( ' m a c ' )   ! =   - 1 ,  
 	 b _ i e 5   =   s _ u s e r A g e n t . i n d e x O f ( ' m s i e   5 ' )   ! =   - 1 ,  
 	 b _ i e 6   =   s _ u s e r A g e n t . i n d e x O f ( ' m s i e   6 ' )   ! =   - 1   & &   s _ u s e r A g e n t . i n d e x O f ( ' o p e r a ' )   = =   - 1 ;  
 v a r   b _ i e F i x   =   b _ i e 5   | |   b _ i e 6 ,  
 	 b _ i e M a c     =   b _ m a c   & &   b _ i e 5 ,  
 	 b _ s a f a r i   =   b _ m a c   & &   r e _ w e b k i t . e x e c ( s _ u s e r A g e n t )   & &   N u m b e r ( R e g E x p . $ 1 )   <   5 0 0 ;  
  
  
  
 f u n c t i o n   O p e n M V P a g e ( K e y , L i s t T y p e )  
 {  
 	 t r y  
 	 {  
 	 	 v a r   N u g g e t N a m e = " " ;  
 	 	 v a r   E v e n t I d = ' 0 ' ;  
 	 	 s w i t c h ( p a r s e I n t ( L i s t T y p e ) )  
 	 	 {  
 	 	 	  
 	 	 	 c a s e   0 : / * P r o d u c t K e y * /  
 	 	 	 	 N u g g e t N a m e = " M y P l a c e P o s t i n g " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 0 4 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   1 : / * D a t i n g * /  
 	 	 	 	 N u g g e t N a m e = " D a t i n g P r o f i l e V i e w " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 2 3 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   3 : / * R e a l E s t a t e * /  
 	 	 	 	 N u g g e t N a m e = " M y P l a c e P o s t i n g " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 3 0 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   4 : / * T h e a t r e * /  
 	 	 	 	 N u g g e t N a m e = " T h e a t r e " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 3 1 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   5 : / * J o b s * /  
 	 	 	 	 N u g g e t N a m e = " J o b V i e w " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 2 6 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   6 : / * S u d o k u * /  
 	 	 	 	 N u g g e t N a m e = " S u d o k u " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 3 2 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   7 : / * C r o s s w o r d * /  
 	 	 	 	 N u g g e t N a m e = " C r o s s w o r d " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 2 2 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   8 : / * K a k u r o * /  
 	 	 	 	 N u g g e t N a m e = " K a k u r o " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 2 7 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   1 3 : / * C a r t o o n * /  
 	 	 	 	 N u g g e t N a m e = " C a r t o o n G a l l e r y " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 0 0 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   1 4 : / * T e n d e r * /  
 	 	 	 	 N u g g e t N a m e = " T e n d e r " ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 3 3 ' ;  
 	 	 	 	 b r e a k ;  
 	 	 }  
 	 	 i f ( p a r s e I n t ( L i s t T y p e ) = = 3   | |   p a r s e I n t ( L i s t T y p e ) = = 0 )  
 	 	 {  
 	 	         w i n d o w . o p e n ( ' h t t p : / / w w w . m y v i s h w a . c o m / P u b l i c . h t m ? N u g g e t N a m e = ' + N u g g e t N a m e + ' & P u b l i c K e y = ' + K e y ) ;  
 	 	 }  
 	 	 e l s e  
 	 	 {  
 	 	         w i n d o w . o p e n ( O b j S e t t i n g s . D o m a i n U R L + ' P u b l i c . h t m ? N u g g e t N a m e = ' + N u g g e t N a m e + ' & P u b l i c K e y = ' + K e y ) ; 	 	  
 	 	 }  
 	 	 I n s e r t A u d i t L o g ( L i s t T y p e , E v e n t I d ) ; 	 	  
 	 }  
 	 c a t c h ( e )  
 	 {  
 	 	 / * D o   n o t h i n g * /  
 	 }  
 }  
  
 f u n c t i o n   C h a n g e E d i t i o n ( E d i t i o n N a m e )  
 {  
         v a r   U R L   =   " # " ;  
         v a r   S u p p l e m e n t s   =   [ ] ;  
         v a r   U R L = l o c a t i o n . h r e f . m a t c h ( / ^ ( . * ) \ / ( \ d { 1 , 2 } ) ( . { 3 } ) ( \ d { 4 } ) \ / ( . * ) $ / ) ;  
         v a r   R o o t U R L   =   U R L [ 1 ] + " / " + U R L [ 2 ] + U R L [ 3 ] + U R L [ 4 ] + " / " + O b j P a g e I n f o . z ;  
  
         f o r ( v a r   X = 0 ; X < P M _ S t r u c t u r e I n f o . l e n g t h ; X + + )  
         {  
                 i f ( P M _ S t r u c t u r e I n f o [ X ] . E d i t i o n N a m e = = E d i t i o n N a m e )  
                 {  
                         i f ( P M _ S t r u c t u r e I n f o [ X ] . P a g e s . l e n g t h > 0 )  
                         {  
                                 R o o t U R L + = " / " + E d i t i o n N a m e + " / i n d e x . h t m "  
                         }  
                         e l s e  
                         {  
                                 S u p p l e m e n t s   =   P M _ S t r u c t u r e I n f o [ X ] . S u p p l e m e n t s ;          
                                 i f ( S u p p l e m e n t s . l e n g t h > 0 )  
                                 {  
                                         R o o t U R L + = " / " + E d i t i o n N a m e + " / " + S u p p l e m e n t s [ 0 ] . S u p p l e m e n t N a m e + " / i n d e x . h t m " ;                                  
                                         b r e a k ;                                  
                                 }  
                         }  
                 }  
         }  
         l o c a t i o n . h r e f = R o o t U R L ;  
 }  
  
 f u n c t i o n   C h a n g e S u p p l e m e n t ( S u p p l e m e n t )  
 {  
         i f ( S u p p l e m e n t = = ' - - ' )  
 	 {  
 	 	 r e t u r n ( f a l s e ) ;  
 	 }  
         v a r   U R L = l o c a t i o n . h r e f . m a t c h ( / ^ ( . * ) \ / ( \ d { 1 , 2 } ) ( . { 3 } ) ( \ d { 4 } ) \ / ( . * ) $ / ) ;  
         v a r   R o o t U R L   =   U R L [ 1 ] + " / " + U R L [ 2 ] + U R L [ 3 ] + U R L [ 4 ] + " / " + O b j P a g e I n f o . z ;  
         i f ( O b j P a g e I n f o . e ! = " " )   R o o t U R L + = " / " + O b j P a g e I n f o . e  
         R o o t U R L + = " / " + S u p p l e m e n t + " / i n d e x . h t m "  
         l o c a t i o n . h r e f = R o o t U R L ;  
 }  
  
 f u n c t i o n   S e a r c h N e w s ( )  
 {  
 	 i f ( O b j S e t t i n g s . P u b l i c a t i o n I d )  
 	 {  
 	 	 v a r   S e a r c h T x t = d o c u m e n t . g e t E l e m e n t B y I d ( ' t x t S e a r c h N e w s ' ) . v a l u e ;  
 	 	 w i n d o w . o p e n ( O b j S e t t i n g s . D o m a i n U R L + " S e a r c h R e s u l t s . a s p x ? P u b l i c a t i o n I d = " + O b j S e t t i n g s . P u b l i c a t i o n I d + " & K e y w o r d s = " + S e a r c h T x t ) ;  
 	 	 I n s e r t A u d i t L o g ( - 1 , ' 4 4 0 5 2 ' , S e a r c h T x t ) ;  
 	 }  
 }  
  
  
 f u n c t i o n   C r e a t e T o p M e n u L i n k s ( )  
 {  
         t r y  
         {  
  
                 v a r   T o p C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ T o p ' ) ;  
 	 	 T m p U R L = l o c a t i o n . h r e f ;    
                 i f ( ! T o p C o n t a i n e r )  
                 {  
                         r e t u r n ;  
                 }  
                 v a r   B o t t o m C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ B o t t o m ' ) ;  
                 i f ( ! B o t t o m C o n t a i n e r )  
                 {  
                         r e t u r n ;  
                 }  
                  
                         v a r   M a i n P a g e T o p T e m p l a t e = ' < d i v   c l a s s = " T o p B a r C l a s s "   s t y l e = " t e x t - a l i g n : l e f t ; " > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = '       < t a b l e   c e l l s p a c i n g = " 0 "   c l a s s = " T o p B a r C l a s s "   c e l l p a d d i n g = " 0 "   b o r d e r = " 0 " > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = ' 	     < t r > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = ' 	           < t d   r o w s p a n = " 3 "   w i d t h = " 2 2 9 " > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	 < d i v   c l a s s = " L o g o C l a s s "   o n c l i c k = " l o c a t i o n . h r e f = \ ' ' + a p p P a t h + ' i n d e x . h t m \ ' ; " > & n b s p ; < / d i v > ' ; 	  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	     < / t d > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = ' 	             < t d   c o l s p a n = " 2 "   s t y l e = " p a d d i n g - t o p : 3 p x ; " > ' ;  
                         i f ( t y p e o f ( O b j S e t t i n g s . H a s M a i n N e w s ) = = ' u n d e f i n e d '   | |   ! O b j S e t t i n g s . H a s M a i n N e w s )  
                         {  
 	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	 < d i v   c l a s s = " H e a d i n g T e x t "   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 5 p x ; " > ' ; 	 	          
 	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	 	 A r c h i v e : ' ; 	  
 	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	 < / d i v > ' ;  
 	 	         }  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	 < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 7 p x ; p a d d i n g - t o p : 2 p x ; " > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = ' 	                                 < i f r a m e   n a m e = " i f r m R e s u l t "   i d = " i f r m R e s u l t "   s t y l e = " d i s p l a y : n o n e ; " > < / i f r a m e > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = '                                     < f o r m   n a m e = " f r m C a l e n d e r "   i d = " f r m C a l e n d e r "   a c t i o n = " ' + a p p P a t h + ' C h e c k E d i t i o n . a s p x "   m e t h o d = " p o s t "   t a r g e t = " i f r m R e s u l t "   s t y l e = " d i s p l a y : i n l i n e ; " > ' ;  
                          
                         i f ( l o c a t i o n . h r e f . i n d e x O f ( ' / N o r m a l / ' ) = = - 1 )  
                         {  
                                 M a i n P a g e T o p T e m p l a t e + = '                                               < i n p u t   t y p e = " h i d d e n "   n a m e = " h i d C u r r e n t V i e w T y p e "   i d = " h i d C u r r e n t V i e w T y p e "   v a l u e = " E n l a r g e " / > ' ;  
                         }  
                         e l s e  
                         {  
                                 M a i n P a g e T o p T e m p l a t e + = '                                               < i n p u t   t y p e = " h i d d e n "   n a m e = " h i d C u r r e n t V i e w T y p e "   i d = " h i d C u r r e n t V i e w T y p e "   v a l u e = " N o r m a l " / > ' ;  
                         }  
                          
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	               < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 3 p x ; " > ' ;  
 	                 M a i n P a g e T o p T e m p l a t e + = '                                                     < i n p u t   t y p e = " t e x t "   n a m e = " t x t C a l e n d e r "   i d = " t x t C a l e n d e r "   c l a s s = " C a l e n d e r T e x t B o x " / > ' ;  
 	                 M a i n P a g e T o p T e m p l a t e + = '                                           < / d i v > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = ' 	                                       < d i v   s t y l e = " p a d d i n g - t o p : 1 p x ; f l o a t : l e f t ; "   i d = " s p n C a l e n d e r " > ' ;  
 	                 M a i n P a g e T o p T e m p l a t e + = '                                           < / d i v > ' ;  
                         M a i n P a g e T o p T e m p l a t e + = '                                   < / f o r m > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 	 < / d i v > ' ;  
 	 	          
  
 	 	          
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                   < d i v   s t y l e = ' f l o a t : l e f t ; p a d d i n g - t o p : 3 p x ; ' > " ;  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                           < d i v   s t y l e = ' f l o a t : l e f t ; ' > " ;  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                                   < i n p u t   t y p e = ' t e x t '   c l a s s = ' I n p u t B o x '   i d = ' t x t S e a r c h N e w s '   s t y l e = ' w i d t h : 1 2 0 p x ; ' > " ; 	 	 	 	 	 	 	  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                           < / d i v > " ;  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                           < d i v   s t y l e = ' f l o a t : l e f t ; p a d d i n g - l e f t : 4 p x ; ' > " ;  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                                   < i n p u t   t y p e = ' b u t t o n '   c l a s s = ' S e a r c h B u t t o n C l a s s '   o n c l i c k = ' S e a r c h N e w s ( ) ; '   v a l u e = ' ' > " ; 	 	 	 	 	 	 	  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                           < / d i v > " ;  
 	 	 	 M a i n P a g e T o p T e m p l a t e + = "                                   < / d i v > " ; 	  
 	 	 	  
 	 	 	 i f ( t y p e o f ( O b j S e t t i n g s . H a s M a i n N e w s ) ! = ' u n d e f i n e d '   & &   O b j S e t t i n g s . H a s M a i n N e w s )  
 	 	 	 {  
 	 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - t o p : 3 p x ; l i n e - h e i g h t : 1 3 p x ; p a d d i n g - l e f t : 7 p x ; " > ' ;  
 	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < a   h r e f = " j a v a s c r i p t : O p e n I n N e w W i n ( \ ' ' +   O b j S e t t i n g s . M a i n N e w s L i n k   + ' \ ' ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 9 \ ' ) ; "   c l a s s = " L i n k B o l d " > ' +   O b j S e t t i n g s . M a i n N e w s T e x t   + ' < / a > ' ;  
   	 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	                 < / d i v > ' ;  
   	 	 	 }  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - t o p : 3 p x ; p a d d i n g - l e f t : 1 0 p x ; " > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < a   h r e f = " j a v a s c r i p t : O p e n I n S a m e W i n ( \ ' ' + a p p P a t h + ' L e t t e r T o E d i t o r . a s p x \ ' ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 9 \ ' ) ; "   c l a s s = " L i n k " > L e t t e r   T o   E d i t o r < / a > ' ;  
   	 	 	 M a i n P a g e T o p T e m p l a t e + = ' 	                 < / d i v > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - t o p : 3 p x ; p a d d i n g - l e f t : 1 0 p x ; " > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < a   h r e f = " j a v a s c r i p t : O p e n I n N e w W i n ( \ ' h t t p : / / w w w . m y v i s h w a . c o m / P u b l i c . h t m ? N u g g e t N a m e = P r e s s R e l e a s e L i s t & P u b I d = ' + O b j S e t t i n g s . P u b l i c a t i o n I d + ' & l r \ ' ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 5 0 \ ' ) ; "   c l a s s = " L i n k " > P o s t   N e w s < / a > ' ;  
   	 	 	 M a i n P a g e T o p T e m p l a t e + = ' 	                 	 < / d i v > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - t o p : 3 p x ; p a d d i n g - l e f t : 1 0 p x ; p a d d i n g - r i g h t : 1 0 p x ; " > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < a   h r e f = " j a v a s c r i p t : C r e a t e _ B o o k M a r k ( ) ; "   c l a s s = " L i n k " > B o o k m a r k < / a > & n b s p ; & n b s p ; ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < a   h r e f = " ' + O b j S e t t i n g s . D o m a i n U R L + ' T e l l a F r i e n d . a s p x ? u l i n k = ' + O b j S e t t i n g s . D o m a i n U R L + ' "   c l a s s = " L i n k " > T e l l   a   f r i e n d < / a > & n b s p ; & n b s p ; ' ; 	 	          
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < a   h r e f = " j a v a s c r i p t : O p e n I n S a m e W i n ( \ ' ' + a p p P a t h + ' i n d e x . h t m \ ' ) ; "   c l a s s = " L i n k " > L o g i n < / a > ' ;  
   	 	 	 M a i n P a g e T o p T e m p l a t e + = ' 	                 	 < / d i v > ' ;  
   	 	 	 M a i n P a g e T o p T e m p l a t e + = ' 	                 < b r   s t y l e = " c l e a r : b o t h ; " > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	         < / t d > ' ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	         < / t r > ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	         < t r > ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 < t d   a l i g n = " l e f t "   s t y l e = " p a d d i n g - t o p : 4 p x ; " > ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	         	 < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / H o m e . g i f "   t i t l e = " H o m e "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " l o c a t i o n . h r e f = \ ' ' + a p p P a t h + ' i n d e x . h t m \ ' ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 5 3 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / r e a d o f f l i n e . g i f "   t i t l e = " R e a d   O f f l i n e "   s t y l e = " d i s p l a y : n o n e ; b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " l o c a t i o n . h r e f = \ ' ' + a p p P a t h + ' R e a d O f f l i n e . h t m \ ' ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 2 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / t h u m b n a i l s . g i f "   t i t l e = " T h u m b n a i l s "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   i d = " d i v P a g e T h u m b s L i n k C o n t a i n e r "   o n m o u s e o v e r = " S h o w P a g e T h u m b s ( t h i s ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / s i n g l e _ v i e w . g i f "   t i t l e = " S i n g l e   V i e w "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " C h a n g e V i e w S t a t e ( 1 ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 5 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / d o u b l e _ v i e w . g i f "   t i t l e = " D o u b l e   V i e w "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " C h a n g e V i e w S t a t e ( 2 ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 4 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / z o o m i n . g i f "   t i t l e = " Z o o m I n "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " Z o o m I n ( ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 6 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / z o o m o u t . g i f "   t i t l e = " Z o o m   O u t "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " Z o o m O u t ( ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 7 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;   	 	          
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / f u l l _ v i e w . g i f "   t i t l e = " F u l l   V i e w "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " S h o w F u l l V i e w ( ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 8 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / b a c k . g i f "   n a m e = " i m g B a c k B u t t o n "   t i t l e = " ' + O b j S e t t i n g s . P r e v i o u s P a g e T e x t + ' "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " P r e v P a g e ( ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / n e x t . g i f "   n a m e = " i m g N e x t B u t t o n "   t i t l e = " ' + O b j S e t t i n g s . N e x t P a g e T e x t + ' "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " N e x t P a g e ( ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	                 < / t d > ' ;   	  
 	 	         / * C r e a t i n g   P a g e   N a v i g a t i o n   S t a r t s   H e r e * / 	 	          
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 	 < t d   a l i g n = " r i g h t "   c l a s s = " H e a d i n g T e x t "   s t y l e = " p a d d i n g - r i g h t : 5 p x ; " > ' ;    
 	 	         v a r   O b j P a g e s   =   [ ] ;  
 	 	         O b j P a g e s   =   G e t P a g e A r r a y A c c o r d i n g T o S e t t i n g V a l u e s ( ) ;  
                         M a i n P a g e T o p T e m p l a t e   + =   C r e a t e P a g e N a v i g a t i o n   ( O b j P a g e s ) ;  
 	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	         < / t d > ' ;  
 	 	         / * C r e a t i n g   P a g e   N a v i g a t i o n   E n d s   H e r e * / 	 	         	 	          
   	 	         M a i n P a g e T o p T e m p l a t e + = ' 	 	 < / t r > ' ; 	  
   	 	          
   	 	         i f ( O b j S e t t i n g s . H a s S e r v i c e s S t r i p   | |   O b j S e t t i n g s . H a s R e a l E s t a t e L i n k   | |   O b j S e t t i n g s . H a s J o b s L i n k   | |   O b j S e t t i n g s . H a s M a t r i m o n y L i n k   | |   O b j S e t t i n g s . H a s B l o g s L i n k   | |   O b j S e t t i n g s . H a s C l a s s i f i e d s L i n k )  
   	 	         {  
   	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	 < t r > ' ; 	           	 	          
 	 	                 / * M a i n P a g e T o p T e m p l a t e + = ' 	 	         < t d   c l a s s = " S e r v i c e s L i n k s S e p r a t o r "   a l i g n = " r i g h t "   c o l s p a n = " 2 " > ' ; * /  
 	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	         < t d   c l a s s = " S e r v i c e s L i n k s S e p r a t o r "   a l i g n = " r i g h t "   c o l s p a n = " 2 " > ' ; 	 	                  
 	 	                 i f ( O b j S e t t i n g s . H a s R e a l E s t a t e L i n k )  
 	 	                 {  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < a   h r e f = " h t t p : / / w w w . m y v i s h w a . c o m / P u b l i c . h t m ? N u g g e t N a m e = R e a l E s t a t e L a n d i n g & P u b l i c K e y = ' + O b j S e t t i n g s . R e a l E s t a t e P u b l i c K e y + ' "   t a r g e t = " _ b l a n k "   c l a s s = " S e r v i c e s L i n k s " > R e a l   E s t a t e < / a > ' ;  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 & n b s p ; | & n b s p ; ' ; 	 	 	                 	 	                 	 	                          
 	 	                 }  
 	 	                 i f ( O b j S e t t i n g s . H a s S e r v i c e s S t r i p )  
 	 	                 { 	 	                  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < a   h r e f = " h t t p : / / w w w . m y v i s h w a . c o m / P u b l i c . h t m ? N u g g e t N a m e = P r o d u c t s S e r v i c e s & p k = 0 "   t a r g e t = " _ b l a n k "     c l a s s = " S e r v i c e s L i n k s " > S e r v i c e < / a > ' ;  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 & n b s p ; | & n b s p ; ' ; 	 	 	                          
                                 } 	 	                  
 	 	                 i f ( O b j S e t t i n g s . H a s J o b s L i n k )  
 	 	                 { 	 	                 	 	                  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < a   h r e f = " h t t p : / / w w w . j o b s i n c i r c l e . c o m / "   t a r g e t = " _ b l a n k "     c l a s s = " S e r v i c e s L i n k s " > J o b s < / a > ' ;  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 & n b s p ; | & n b s p ; ' ; 	 	 	                          
 	 	                 }  
 	 	                 i f ( O b j S e t t i n g s . H a s M a t r i m o n y L i n k )  
 	 	                 { 	 	                  
                                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < a   h r e f = " h t t p : / / w w w . m y v i s h w a . c o m / P u b l i c . h t m ? N u g g e t N a m e = D a t i n g & p k = 0 "   t a r g e t = " _ b l a n k "     c l a s s = " S e r v i c e s L i n k s " > M a t r i m o n y < / a > ' ;  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 & n b s p ; | & n b s p ; ' ;                                                                          
                                 }  
 	 	                 i f ( O b j S e t t i n g s . H a s B l o g s L i n k )  
 	 	                 { 	 	                                                
                                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < a   h r e f = " "   c l a s s = " S e r v i c e s L i n k s "   t a r g e t = " _ b l a n k " > B l o g s < / a > ' ; 	 	                  
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 & n b s p ; | & n b s p ; ' ;                                                                          
 	 	                 }  
 	 	                 i f ( O b j S e t t i n g s . H a s C l a s s i f i e d s L i n k )  
 	 	                 { 	 	                                                
                                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 < a   h r e f = " ' + O b j S e t t i n g s . C l a s s i f i e d s L i n k + ' "   c l a s s = " C l a s s i f i e d s L i n k s "   t a r g e t = " _ b l a n k " > ' + O b j S e t t i n g s . C l a s s i f i e d s L i n k T e x t + ' < / a > ' ;                                                                
 	 	                         M a i n P a g e T o p T e m p l a t e + = ' 	 	                 & n b s p ; | & n b s p ; ' ;  
 	 	                 }  
 	 	                 M a i n P a g e T o p T e m p l a t e   =   M a i n P a g e T o p T e m p l a t e . s u b s t r i n g ( 0 , M a i n P a g e T o p T e m p l a t e . l e n g t h - 7 ) ;  
 	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	         < / t d > ' ;  
   	 	                 M a i n P a g e T o p T e m p l a t e + = ' 	 	 < / t r > ' ;     	  
 	 	         } 	          
          
   	 	         M a i n P a g e T o p T e m p l a t e + = ' < / t a b l e > < / d i v > ' ;  
 	 	          
 	 	         / * B o t t o m   C o d e   f o r   O p t i o n s   S t a r t s   H e r e * / 	 	          
   	 	         v a r   M a i n P a g e B o t t o m T e m p l a t e = ' < d i v > ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	 < d i v   i d = " d i v A d s e n s e "   s t y l e = " t e x t - a l i g n : c e n t e r ; "   > ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	                 & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	 < / d i v > ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 < t a b l e   a l i g n = " c e n t e r " > ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	         < t r > ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	 < t d   a l i g n = " l e f t " > ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	                 < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / s i n g l e _ v i e w . g i f "   t i t l e = " S i n g l e   V i e w "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " C h a n g e V i e w S t a t e ( 1 ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 5 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / d o u b l e _ v i e w . g i f "   t i t l e = " D o u b l e   V i e w "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " C h a n g e V i e w S t a t e ( 2 ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 4 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / z o o m i n . g i f "   t i t l e = " Z o o m I n "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " Z o o m I n ( ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 6 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / z o o m o u t . g i f "   t i t l e = " Z o o m   O u t "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " Z o o m O u t ( ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 7 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;   	 	          
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / f u l l _ v i e w . g i f "   t i t l e = " F u l l   V i e w "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " S h o w F u l l V i e w ( ) ; I n s e r t A u d i t L o g ( - 1 , \ ' 4 4 0 4 8 \ ' ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / b a c k . g i f "   n a m e = " i m g B a c k B u t t o n "   t i t l e = " ' + O b j S e t t i n g s . P r e v i o u s P a g e T e x t + ' "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " P r e v P a g e ( ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / n e x t . g i f "   n a m e = " i m g N e x t B u t t o n "   t i t l e = " ' + O b j S e t t i n g s . N e x t P a g e T e x t + ' "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " N e x t P a g e ( ) ; " / > & n b s p ; & n b s p ; ' ;  
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	 < / t d > ' ;  
 	 	         / * C o m m o n   C o d e   f o r   O p t i o n s   E n d s   H e r e * / 	 	           	 	       	 	          
 	 	          
 	 	         / * C r e a t i n g   P a g e   N a v i g a t i o n   F o r   B o t t o m   S t a r t s   H e r e * / 	 	          
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 	 < t d   a l i g n = " r i g h t "   c l a s s = " H e a d i n g T e x t "   s t y l e = " p a d d i n g - r i g h t : 5 p x ; " > ' ;    
 	 	         v a r   O b j P a g e s   =   [ ] ;  
 	 	         O b j P a g e s   =   G e t P a g e A r r a y A c c o r d i n g T o S e t t i n g V a l u e s ( ) ;  
                         M a i n P a g e B o t t o m T e m p l a t e   + =   C r e a t e P a g e N a v i g a t i o n   ( O b j P a g e s ) ;  
 	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	         < / t d > ' ;  
 	 	         / * C r e a t i n g   P a g e   N a v i g a t i o n   F o r   B o t t o m   E n d s   H e r e * / 	 	         	 	          
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' 	 	 < / t r > ' ; 	          
   	 	         M a i n P a g e B o t t o m T e m p l a t e + = ' < / t a b l e > < / d i v > ' ;  
   	 	          
 	 	         / * F i l l i n g   E d i t i o n s   i n   S e l e c t   B o x   S t a r t   H e r e * /  
 	 	         v a r   E d i t i o n C o d e = " " ; 	 	          
 	 	         P M _ O B J _ E d i t i o n s   =   P M _ O b j D a t a . O b j E d i t i o n s ;  
 	 	         i f ( O b j S e t t i n g s . H a s E d i t i o n s )  
 	 	         {  
 	 	                 P M _ O B J _ E d i t i o n s   =   P M _ O b j D a t a . O b j E d i t i o n s ;  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 < d i v   c l a s s = " H e a d i n g T e x t "   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 1 5 p x ; " > ' ;  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 	 & n b s p ; ' ;  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 	 < s e l e c t   i d = " s e l E d i t i o n s "   c l a s s = " E d i t i o n s S e l e c t B o x "   o n c h a n g e = " C h a n g e E d i t i o n ( t h i s . v a l u e ) ; " > ' ;  
 	 	                 i f ( t y p e o f ( P M _ O B J _ E d i t i o n s )   ! =   ' u n d e f i n e d ' )  
 	 	                 {  
 	 	         	         i f   ( P M _ O B J _ E d i t i o n s . l e n g t h   >   0 )  
 	 	         	         {  
                                                 	 v a r   O b j E d i t i o n = n u l l ;  
 	 	 	                         f o r ( v a r   I n d e x = 0 ;   I n d e x < P M _ O B J _ E d i t i o n s . l e n g t h ;   I n d e x + + )  
 	 	 	                         {  
 	 	 	                                 O b j E d i t i o n = P M _ O B J _ E d i t i o n s [ I n d e x ] ;  
 	 	 	                                 i f ( I s E d i t i o n E x i s t s ( O b j E d i t i o n . E d i t i o n F o l d e r N a m e ) )  
 	 	 	                                 {  
 	 	 	                                         i f ( O b j P a g e I n f o . e   = =   O b j E d i t i o n . E d i t i o n F o l d e r N a m e )  
 	 	 	                                         {  
 	 	 	                                         	 E d i t i o n S t r i p C o d e   + = '                       < d i v   s t y l e = " f l o a t : l e f t ; "   c l a s s = " S u p p l e m e n t s C l a s s A c t i v e " > ' ;  
 	 	 	 	                                         E d i t i o n C o d e + = ' ; 	 	 	 	 < o p t i o n   S E L E C T E D   v a l u e = " ' + O b j E d i t i o n . E d i t i o n F o l d e r N a m e + ' "   > ' + O b j E d i t i o n . E d i t i o n N a m e + ' < / o p t i o n > ' ;  
 	 	 	                                         }  
 	 	 	                                         e l s e  
 	 	 	                                         {  
 	 	 	                                         	 E d i t i o n S t r i p C o d e   + = '                       < d i v   s t y l e = " f l o a t : l e f t ; "   c l a s s = " S u p p l e m e n t s C S S C l a s s "   o n m o u s e o v e r = " C h a n g e T o H o v e r C l a s s ( t h i s ) ; "   o n m o u s e o u t = " C h a n g e T o N o r m a l C l a s s ( t h i s ) ; "   o n c l i c k = " C h a n g e E d i t i o n ( \ ' ' + O b j E d i t i o n . E d i t i o n F o l d e r N a m e + ' \ ' ) ; " > ' ;  
 	 	 	 	                                         E d i t i o n C o d e + = ' ; 	 	 	 	 < o p t i o n   v a l u e = " ' + O b j E d i t i o n . E d i t i o n F o l d e r N a m e + ' "   > ' + O b j E d i t i o n . E d i t i o n N a m e + ' < / o p t i o n > ' ;  
 	 	 	                                         }  
 	 	 	                                         E d i t i o n S t r i p C o d e + = O b j E d i t i o n . E d i t i o n N a m e ;  
 	 	 	                                         E d i t i o n S t r i p C o d e + = ' < / d i v > ' ;  
 	 	 	                                 }  
 	 	 	                         }  
 	 	 	                 }  
 	 	                 }  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 	 < / s e l e c t > ' ;  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 < / d i v > ' ; 	    
 	 	         }  
 	 	         e l s e  
 	 	         {  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 < d i v   c l a s s = " H e a d i n g T e x t "   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 1 5 p x ; " > ' ;  
 	 	                 E d i t i o n C o d e + = ' 	 	 	 	 & n b s p ; < / d i v > ' ; 	   	 	                 	 	          
 	 	         }  
  
 	 	         / * F i l l i n g   E d i t i o n s   i n   S e l e c t   B o x   E n d s   H e r e * /  
 	 	         / * C r e a t i n g   S u p p l e m e n t   S t r i p   S t a r t s   H e r e * /  
 	 	         v a r   M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e = ' ' ;  
 	 	         i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
 	 	         { 	 	                  
 	 	                 P M _ O B J _ S u p p l e m e n t s   =   G e t E n g l i s h S u p p l e m e n t s ( ) ;  
                                 v a r   O b j S u p p l e m e n t   =   n u l l ;  
 	 	                 i f ( t y p e o f ( P M _ O B J _ S u p p l e m e n t s )   ! =   ' u n d e f i n e d ' )  
 	 	                 {  
 	 	         	         i f   ( P M _ O B J _ S u p p l e m e n t s . l e n g t h   >   0 )  
 	 	         	         {  
 	 	 	 	                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < d i v   c l a s s = " S u p p l e m e n t s B G " > ' ;  
                                                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = E d i t i o n C o d e ;  
                                                 i f ( O b j S e t t i n g s . S h o w E d i t i o n s O n S t r i p )  
                                                 {  
                                                 	 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = E d i t i o n S t r i p C o d e ;  
                                                 	 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = ' < / d i v > ' ;  
 	 	 	 	 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < d i v   c l a s s = " S u p p l e m e n t s B G " > ' ; 	 	                  
 	 	 	 }  
 	 	 	 	                  
                                                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = G e t M a i n P a g e O p t i o n ( ) ; 	 	 	                  
 	 	 	 	                 f o r   ( v a r   i = 0 ; i < P M _ O B J _ S u p p l e m e n t s . l e n g t h ; i + + )  
 	 	 	 	                 {  
 	 	 	 	                         O b j S u p p l e m e n t = P M _ O B J _ S u p p l e m e n t s [ i ] ;  
 	 	 	 	                         i f   ( O b j P a g e I n f o . s   = =   O b j S u p p l e m e n t . S u p p l e m e n t F o l d e r N a m e )  
 	 	 	 	                         {  
 	 	 	 	 	                         M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '                       < d i v   s t y l e = " f l o a t : l e f t ; "   c l a s s = " S u p p l e m e n t s C l a s s A c t i v e " > ' ; 	 	 	 	 	 	 	  
 	 	 	 	                         }  
 	 	 	 	                         e l s e  
 	 	 	 	                         {  
 	 	 	 	 	                         M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '                       < d i v   s t y l e = " f l o a t : l e f t ; "   c l a s s = " S u p p l e m e n t s C S S C l a s s "   o n m o u s e o v e r = " C h a n g e T o H o v e r C l a s s ( t h i s ) ; "   o n m o u s e o u t = " C h a n g e T o N o r m a l C l a s s ( t h i s ) ; "   o n c l i c k = " C h a n g e S u p p l e m e n t ( \ ' ' +   O b j S u p p l e m e n t . S u p p l e m e n t F o l d e r N a m e   + ' \ ' ) ; " > ' ;  
 	 	 	 	                         }  
 	 	 	 	                         M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + =   O b j S u p p l e m e n t . S u p p l e m e n t N a m e ; 	  
 	 	 	 	                         M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = "                       < / d i v > " ;  
 	 	 	 	                 }  
 	 	 	 	                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < b r   s t y l e = " c l e a r : b o t h ; " / > ' ;  
 	 	 	 	                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < / d i v > ' ;  
 	 	 	                 }  
 	 	 	                 e l s e  
 	 	 	                 {  
 	 	 	 	                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < d i v   c l a s s = " S u p p l e m e n t s B G " > ' ;  
                                                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = E d i t i o n C o d e ;  
 	 	 	 	                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < b r   s t y l e = " c l e a r : b o t h ; " / > ' ;                                                  
                                                 M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e + = '             < / d i v > ' ; 	 	 	                  
 	 	 	                 }  
 	 	                 }  
 	 	         }  
 	 	         e l s e  
 	 	         {  
 	 	                 i f ( O b j S e t t i n g s . H a s E d i t i o n s )  
 	 	                 { 	 	          
 	 	 	 	                 M a i n P a g e T o p T e m p l a t e + = '             < d i v   c l a s s = " S u p p l e m e n t s B G " > ' ;  
                                                 M a i n P a g e T o p T e m p l a t e + = E d i t i o n C o d e ;  
 	 	 	 	                 M a i n P a g e T o p T e m p l a t e + = '             < / d i v > ' ;    
 	 	 	 	 }                                               	 	          
 	 	         }  
 	 	         / * C r e a t i n g   S u p p l e m e n t   S t r i p   E n d s   H e r e * / 	 	          
 	 	         	 	          
 	 	         v a r   P a g e B o t t o m B a r C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' M V B o t t o m B a r C o n t a i n e r ' ) ;  
 	 	         v a r   M a i n P a g e B o t t o m B a r = ' < d i v   c l a s s = " B o t t o m B a r C l a s s " > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                               < d i v   c l a s s = " T e x t "   s t y l e = " f l o a t : l e f t ; l i n e - h e i g h t : 3 5 p x ; p a d d i n g - r i g h t : 5 0 p x ; " > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                                     & c o p y ;   C o p y r i g h t s   2 0 1 1   ' + O b j S e t t i n g s . P u b l i c a t i o n N a m e + '   -   A l l   r i g h t s   r e s e r v e d . ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < / d i v > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                               < d i v   c l a s s = " T e x t "   s t y l e = " f l o a t : l e f t ; p a d d i n g - t o p : 4 p x ; " > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                                     < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / p i n . j p g " / > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < / d i v > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                               < d i v   c l a s s = " T e x t "   s t y l e = " f l o a t : l e f t ; l i n e - h e i g h t : 3 5 p x ; " > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                                     C l i c k   o n   p i n   t o   v i e w   m o r e   o p t i o n s . ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < / d i v > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < d i v   c l a s s = " M V P o w e r e d B y "   o n c l i c k = " w i n d o w . o p e n ( \ ' h t t p : / / w w w . m y v i s h w a . c o m \ ' ) ; "   s t y l e = " f l o a t : r i g h t ; " > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                                   o f ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < / d i v > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < d i v   c l a s s = " P o w e r e d B y "   o n c l i c k = " w i n d o w . o p e n ( \ ' h t t p : / / w w w . e p a p e r g a l l e r y . c o m \ ' ) ; "   s t y l e = " f l o a t : r i g h t ; " > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                                   P o w e r e d   B y : ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < / d i v > ' ;  
                         M a i n P a g e B o t t o m B a r + = '                             < b r   s t y l e = " c l e a r :   b o t h ; "   / > ' ;  
                         M a i n P a g e B o t t o m B a r + = '         < / d i v > ' ;  
                          
                         i f ( P M _ O B J _ E d i t i o n s . l e n g t h > 0   | |   P M _ O B J _ S u p p l e m e n t s . l e n g t h > 0 )  
                         {  
   	 	                 T o p C o n t a i n e r . i n n e r H T M L = M a i n P a g e T o p T e m p l a t e + M a i n P a g e S u p p l e m e n t s T o p T e m p l a t e ;  
   	 	         }  
   	 	         e l s e  
   	 	         {  
   	 	                 T o p C o n t a i n e r . i n n e r H T M L = M a i n P a g e T o p T e m p l a t e ;   	 	          
   	 	         }  
   	 	         B o t t o m C o n t a i n e r . i n n e r H T M L = M a i n P a g e B o t t o m T e m p l a t e ;   	  
   	 	         P a g e B o t t o m B a r C o n t a i n e r . i n n e r H T M L = M a i n P a g e B o t t o m B a r ;    
   	 	           	 	                
                         v a r   o = n e w   t c a l   ( { " f o r m n a m e " :   " f r m C a l e n d e r " , " c o n t r o l n a m e " :   " t x t C a l e n d e r " } ) ;  
                         i f ( E d i t i o n D 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 ( ' t x t C a l e n d e r ' ) . v a l u e = ( ( ( E d i t i o n D a t e . g e t M o n t h ( ) + 1 ) . l e n g t h   = =   1 ) ?   ( ' 0 ' + ( E d i t i o n D a t e . g e t M o n t h ( ) + 1 ) . t o S t r i n g ( ) ) : ( E d i t i o n D a t e . g e t M o n t h ( ) + 1 ) ) . t o S t r i n g ( )   + ' / ' +   ( ( E d i t i o n D a t e . g e t D a t e ( ) . l e n g t h = = 1 ) ? ( ' 0 ' + E d i t i o n D a t e . g e t D a t e ( ) . t o S t r i n g ( ) ) : ( E d i t i o n D a t e . g e t D a t e ( ) ) ) . t o S t r i n g ( )   + ' / ' +   E d i t i o n D a t e . g e t F u l l Y e a r ( ) ;  
                         }  
   	 	  
  
 	 	 / * C o d e   t o   c r e a t e   t h e   s e c t i o n s   S t a r t s   H e r e * /  
 	         v a r   S e c t i o n C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ S e c t i o n s ' ) ;  
 	 	 v a r   S e c t i o n S t r i p = " " ;  
 	 	 v a r   P g N u m b e r = 0 ;  
 	 	 v a r   P a g e N a m e = " " ;  
  
 	         i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
 	         {  
 	                 i f ( O b j P a g e I n f o . s ! = " " )  
 	                 {  
                                 f o r ( v a r   K = 0 ; K < P M _ O B J _ S u p p l e m e n t s . l e n g t h ; K + + )  
                                 {  
                                         i f ( P M _ O B J _ S u p p l e m e n t s [ K ] . S u p p l e m e n t F o l d e r N a m e = = O b j P a g e I n f o . s )  
                                         {  
                                               P M _ O B J _ S e c t i o n s   =   P M _ O B J _ S u p p l e m e n t s [ K ] . O b j S e c t i o n s ;  
                                               P M _ O B J _ S e c t i o n P a g e M a p p i n g s   =   P M _ O B J _ S u p p l e m e n t s [ K ] . O b j S e c t i o n P a g e M a p p i n g s ;  
                                         }  
                                 }  
                         }  
                         e l s e  
                         {  
                                 f o r ( v a r   K = 0 ; K < P M _ O B J _ E d i t i o n s . l e n g t h ; K + + )  
                                 {  
                                         i f ( P M _ O B J _ E d i t i o n s [ K ] . E d i t i o n F o l d e r N a m e = = O b j P a g e I n f o . e )  
                                         {  
                                               P M _ O B J _ S e c t i o n s   =   P M _ O B J _ E d i t i o n s [ K ] . O b j S e c t i o n s ;  
                                               P M _ O B J _ S e c t i o n P a g e M a p p i n g s   =   P M _ O B J _ E d i t i o n s [ K ] . O b j S e c t i o n P a g e M a p p i n g s ;  
                                         }  
                                 }  
                                 i f ( P M _ O B J _ S e c t i o n s . l e n g t h < = 0 )  
                                 {  
                                               P M _ O B J _ S e c t i o n s   =   P M _ O b j D a t a . O b j S e c t i o n s ;  
                                               P M _ O B J _ S e c t i o n P a g e M a p p i n g s   =   P M _ O b j D a t a . O b j S e c t i o n P a g e M a p p i n g s ;                                  
                                 }  
                         }  
 	         }  
 	         e l s e   i f ( O b j S e t t i n g s . H a s E d i t i o n s )  
 	         {  
                         f o r ( v a r   K = 0 ; K < P M _ O B J _ E d i t i o n s . l e n g t h ; K + + )  
                         {  
                                 i f ( P M _ O B J _ E d i t i o n s [ K ] . E d i t i o n F o l d e r N a m e = = O b j P a g e I n f o . e )  
                                 {  
                                       P M _ O B J _ S e c t i o n s   =   P M _ O B J _ E d i t i o n s [ K ] . O b j S e c t i o n s ;  
                                       P M _ O B J _ S e c t i o n P a g e M a p p i n g s   =   P M _ O B J _ E d i t i o n s [ K ] . O b j S e c t i o n P a g e M a p p i n g s ;  
                                 }  
                         } 	                  
 	         }  
 	         e l s e  
 	         {  
                       P M _ O B J _ S e c t i o n s   =   P M _ O b j D a t a . O b j S e c t i o n s ;  
                       P M _ O B J _ S e c t i o n P a g e M a p p i n g s   =   P M _ O b j D a t a . O b j S e c t i o n P a g e M a p p i n g s ; 	                  
 	         } 	          
                 S e c t i o n S t r i p = " " ; 	 	                                                  
 	         f o r ( v a r   Y = 0 ; Y < P M _ O B J _ S e c t i o n s . l e n g t h ; Y + + )  
 	         { 	 	 	  
 	 	         P g N u m b e r = G e t D e f a u l t P a g e ( P M _ O B J _ S e c t i o n s [ Y ] . S e c t i o n N a m e , P M _ O B J _ S e c t i o n P a g e M a p p i n g s ) ;  
  
 	 	         i f ( P g N u m b e r ! = - 1 )  
 	 	         {  
 	                         T m p S e c t i o n N a m e = G e t S e c t i o n N a m e B y P a g e N u m b e r ( ) ; 	 	 	          
 	 	 	         S e c t i o n S t r i p + = " < d i v   s t y l e = ' f l o a t : l e f t ; ' > " ; 	 	 	          
 	 	 	         i f ( T m p S e c t i o n N a m e = = P M _ O B J _ S e c t i o n s [ Y ] . E S e c t i o n N a m e )  
 	 	 	         {  
 	 	 	                 S e c t i o n S t r i p + = " < a   c l a s s = ' S e c t i o n S e l e c t e d C S S C l a s s '   h r e f = ' " + G e t H r e f V a l u e I f P a g e E x i s t s ( P g N u m b e r , O b j P a g e s ) + " ' > " + P M _ O B J _ S e c t i o n s [ Y ] . S e c t i o n N a m e + " < / a > " ;  
 	 	 	         }  
 	 	 	         e l s e  
 	 	 	         {  
 	 	 	                 S e c t i o n S t r i p + = " < a   c l a s s = ' S e c t i o n C S S C l a s s '   h r e f = ' " + G e t H r e f V a l u e I f P a g e E x i s t s ( P g N u m b e r , O b j P a g e s ) + " ' > " + P M _ O B J _ S e c t i o n s [ Y ] . S e c t i o n N a m e + " < / a > " ; 	 	 	          
 	 	 	         }  
 	 	          
 	 	 	         S e c t i o n S t r i p + = " < / d i v > " ;  
 	 	 	         S e c t i o n S t r i p + = " < d i v   s t y l e = ' f l o a t : l e f t ; w i d t h : 1 5 p x ; ' > & n b s p ; " ;  
 	 	 	         S e c t i o n S t r i p + = " < / d i v > " ;  
 	 	         }  
 	         }  
  
 	         v a r   B r e a k i n g N e w s = ' ' ;  
 	 	 i f ( O b j S e t t i n g s . H a s B r e a k i n g N e w s )  
 	 	 {  
 	 	         B r e a k i n g N e w s = ' < d i v   c l a s s = " B r e a k i n g N e w s C S S B G " > ' ;  
 	 	         B r e a k i n g N e w s + = '           < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 5 p x ; " > ' ;  
 	 	         B r e a k i n g N e w s + = '                   < a   h r e f = " ' + a p p P a t h + ' N e w s . a s p x "   c l a s s = " L i n k B o l d "   s t y l e = " f o n t - s i z e : 1 4 p x ; c o l o r : # 9 5 3 B 0 D ; " > ' + O b j S e t t i n g s . B r e a k i n g N e w s T e x t + ' < / a >   ' ;  
 	 	         B r e a k i n g N e w s + = '           < / d i v > ' ;  
 	 	         B r e a k i n g N e w s + = '           < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - r i g h t : 1 0 p x ; " > ' ;  
 	 	         B r e a k i n g N e w s + = '                   < i f r a m e   f r a m e b o r d e r = " 0 "   s c r o l l i n g = " n o "   i d = " I f r m B r e a k i n g N e w s "   n a m e = " I f r m B r e a k i n g N e w s "   w i d t h = " 7 0 0 "   h e i g h t = " 2 5 "   s r c = " ' + a p p P a t h + ' B r e a k i n g N e w s . h t m " > < / i f r a m e > ' ;  
 	 	         B r e a k i n g N e w s + = '           < / d i v > ' ;  
 	 	         B r e a k i n g N e w s + = '           < d i v   s t y l e = " f l o a t : l e f t ; p a d d i n g - t o p : 5 p x ; " > ' ;  
 	 	         B r e a k i n g N e w s + = '                   < s p a n   c l a s s = " T e x t B o l d "   s t y l e = " f o n t - s i z e : 1 2 p x ; c o l o r : # 9 9 9 9 9 9 ; " > U p d a t e d   1 H r   1 5 m i n   a g o < / s p a n > ' ;  
 	 	         B r e a k i n g N e w s + = '           < / d i v > ' ;  
 	 	         B r e a k i n g N e w s + = '           < b r   s t y l e = " c l e a r : b o t h ; " / > ' ;  
 	 	         B r e a k i n g N e w s + = ' < / d i v > ' ;  
 	 	 }  
 	 	   i f ( O b j S e t t i n g s . S h o w S e c t i o n s )  
 	 	   {  
 	 	         S e c t i o n C o n t a i n e r . i n n e r H T M L = ' < d i v   c l a s s = " S e c t i o n s C S S B G " > ' + S e c t i o n S t r i p + ' < b r   s t y l e = " c l e a r : b o t h ; " / > < / d i v > ' ;  
 	 	   }  
 	 	   S e c t i o n C o n t a i n e r . i n n e r H T M L   + = B r e a k i n g N e w s ;  
 	 	 i f ( ! O b j S e t t i n g s . H a s B r e a k i n g N e w s   & &   ! O b j S e t t i n g s . S h o w S e c t i o n s )  
 	 	 {  
 	 	 	 S e c t i o n C o n t a i n e r . s t y l e . d i s p l a y = ' n o n e ' ;  
 	 	 }  
 	 	 i f ( B r e a k i n g N e w s . l e n g t h = = 0   & &   S e c t i o n S t r i p . l e n g t h = = 0 )  
 	 	 {  
 	 	 	 S e c t i o n C o n t a i n e r . s t y l e . d i s p l a y = ' n o n e ' ; 	 	  
 	 	 }  
 	 	  
 	 	 / * C L I E N T   S P E C I F I C   C H A G E S * /  
 	 	                 v a r   I f r a m e = d o c u m e n t . c r e a t e E l e m e n t ( ' I F R A M E ' ) ;  
  
                                 I f r a m e . s r c =   a p p P a t h   +   " A d s e n s e . h t m " ;  
 	 	 	          
 	 	 	         I f r a m e . s t y l e . w i d t h = ' 8 1 0 p x ' ;  
 	 	 	         I f r a m e . s t y l e . h e i g h t = ' 1 2 0 p x ' ; 	 	 	          
 	 	 	         I f r a m e . s t y l e . t e x t A l i g n = ' c e n t e r ' ;  
 	 	 	         I f r a m e . s t y l e . d i s p l a y = ' i n l i n e ' ;  
 	 	 	         I f r a m e . f r a m e B o r d e r = ' 0 ' ;  
 	 	 	         d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v A d s e n s e ' ) . a p p e n d C h i l d ( I f r a m e ) ;    
 	 	  
 	 	 / * C L I E N T   S P E C I F I C   C H A G E S * / 	  
         }  
         c a t c h ( e )  
         {  
                 / * a l e r t ( e ) ; * /  
         }  
 }  
 C r e a t e T o p M e n u L i n k s ( ) ;  
 f u n c t i o n   g e t S u p p l e m e n t W i t h S p a c e B y N a m e ( S u p p N a m e )  
 {  
         i f ( t y p e o f ( P M _ O B J _ S u p p l e m e n t s ) = = ' u n d e f i n e d ' )   r e t u r n   " " ;          
         f o r ( v a r   x = 0 ; x < P M _ O B J _ S u p p l e m e n t s . l e n g t h ; x + + )  
         {  
                 i f ( P M _ O B J _ S u p p l e m e n t s [ x ] . S u p p l e m e n t F o l d e r N a m e = = S u p p N a m e )  
                 {  
                         r e t u r n   P M _ O B J _ S u p p l e m e n t s [ x ] . E S u p p l e m e n t N a m e ;  
                 }  
         }  
         r e t u r n   " " ;  
 }  
 f u n c t i o n   g e t E d i t i o n W i t h S p a c e B y N a m e ( E d i t i o n N a m e )  
 {  
         i f ( t y p e o f ( P M _ O B J _ E d i t i o n s ) = = ' u n d e f i n e d ' )   r e t u r n   " " ;          
         f o r ( v a r   x = 0 ; x < P M _ O B J _ E d i t i o n s . l e n g t h ; x + + )  
         {  
                 i f ( P M _ O B J _ E d i t i o n s [ x ] . E d i t i o n F o l d e r N a m e = = E d i t i o n N a m e )  
                 {  
                         r e t u r n   P M _ O B J _ E d i t i o n s [ x ] . E E d i t i o n N a m e ;  
                 }  
         }  
         r e t u r n   " " ;  
 }  
 f u n c t i o n   C h a n g e T o H o v e r C l a s s ( C o n t r o l )  
 {  
 	 C o n t r o l . c l a s s N a m e = ' S u p p l e m e n t s C l a s s H o v e r ' ;  
 }  
 f u n c t i o n   C h a n g e T o N o r m a l C l a s s ( C o n t r o l )  
 {  
 	 C o n t r o l . c l a s s N a m e = ' S u p p l e m e n t s C S S C l a s s ' ;  
 }  
  
 f u n c t i o n   C h e c k E d i t i o n ( S o u r c e V a l u e )  
 {  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' f r m C a l e n d e r ' ) . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   S h o w E d i t i o n N o t A v a i l a b l e M e s s a g e ( )  
 {  
         a l e r t ( ' S o r r y . . .   \ n   T h i s   e d i t i o n   i s   n o t   a v a i l a b l e   r i g h t   n o w . ' ) ;  
                         i f ( E d i t i o n D 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 ( ' t x t C a l e n d e r ' ) . v a l u e = ( ( ( E d i t i o n D a t e . g e t M o n t h ( ) + 1 ) . l e n g t h   = =   1 ) ?   ( ' 0 ' + ( E d i t i o n D a t e . g e t M o n t h ( ) + 1 ) . t o S t r i n g ( ) ) : ( E d i t i o n D a t e . g e t M o n t h ( ) + 1 ) ) . t o S t r i n g ( )   + ' / ' +   ( ( E d i t i o n D a t e . g e t D a t e ( ) . l e n g t h = = 1 ) ? ( ' 0 ' + E d i t i o n D a t e . g e t D a t e ( ) . t o S t r i n g ( ) ) : ( E d i t i o n D a t e . g e t D a t e ( ) ) ) . t o S t r i n g ( )   + ' / ' +   E d i t i o n D a t e . g e t F u l l Y e a r ( ) ;  
                         }  
 }  
  
 f u n c t i o n   H i d e P a g e T h u m b s ( ) {  
 	 v a r   P a g e T h u m b n a i l s C o n t a i n e r = d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P a g e T h u m b n a i l s ' ) ;  
 	 i f ( P a g e T h u m b n a i l s C o n t a i n e r )  
 	 {  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r . s t y l e . d i s p l a y = ' n o n e ' ;  
 	 }  
 }  
 v a r   I s M o u s e O n T h u m b   =   f a l s e ;  
 f u n c t i o n   C h e c k M o u s e P o s   ( )  
 { 	  
 	 i f ( ! I s M o u s e O n T h u m b )  
 	 {  
 	 	 H i d e P a g e T h u m b s   ( ) ;  
 	 }  
 }  
 f u n c t i o n   S h o w P a g e T h u m b s ( O b j S o u r c e D i v )  
 {  
 	  
 	 v a r   P a g e T h u m b n a i l s C o n t a i n e r = d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P a g e T h u m b n a i l s ' ) ; 	  
 	 i f ( ! P a g e T h u m b n a i l s C o n t a i n e r )  
 	 {  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r = d o c u m e n t . c r e a t e E l e m e n t ( ' D I V ' ) ;  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r . i d = ' d i v P a g e T h u m b n a i l s ' ;  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r . c l a s s N a m e = ' P a g e T h u m b n a i l s C o n t a i n e r ' ;  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( P a g e T h u m b n a i l s C o n t a i n e r ) ;  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r . o n m o u s e o v e r   =   f u n c t i o n   ( )  
 	 	 {  
 	 	 	 I s M o u s e O n T h u m b   =   t r u e ; 	 	 	  
 	 	 } ;  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r . o n m o u s e o u t   =   f u n c t i o n   ( )  
 	 	 {  
 	 	 	 I s M o u s e O n T h u m b   =   f a l s e ; 	  
 	 	 	 s e t T i m e o u t   ( C h e c k M o u s e P o s , 5 0 0 ) ;  
 	 	 } ;  
 	 	  
 	 	 v a r   s t r u c t u r e = ' ' ;  
 	 	 v a r   S e c t i o n N a m e = ' ' ;  
 	 	 v a r   C u r r e n t S u p p l N a m e   =   " " ;  
 	 	 i f   ( t y p e o f ( O b j P a g e I n f o . s ) ! = ' u n d e f i n e d ' ) 	   C u r r e n t S u p p l N a m e =   O b j P a g e I n f o . s ;  
 	 	 / * i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
 	 	 { * /  
 	 	 	 	 f o r ( v a r   i = 1 ;   i < = P M _ O B J _ M a x C o u n t ;   i + + )  
 	 	 	 	 { 	  
 	 	 	 	 	 v a r   P a g e D e t a i l s = G e t P a g e D e t a i l s B y P a g e N a m e ( i ) ;  
                                         v a r   P g N u m b e r = 0 ;  
 	 	 	 	 	         S e c t i o n N a m e = ' ' ;  
 	 	 	 	 	         i f ( P a g e D e t a i l s )  
 	 	 	 	 	         {                                                 	 	 	 	 	                  
                                                         P g N u m b e r = G e t D e f a u l t P a g e ( P a g e D e t a i l s . S e c t i o n N a m e , P M _ O B J _ S e c t i o n P a g e M a p p i n g s ) ;  
 	 	 	                                 i f ( P g N u m b e r = = 1 )  
 	 	 	                                 {  
 	 	 	 	                                 P a g e N a m e = " i n d e x . h t m " ; 	 	 	 	  
 	 	 	                                 }  
 	 	 	                                 e l s e  
 	 	 	                                 {  
 	 	 	 	                                 P a g e N a m e = " p a g e " + P g N u m b e r + " . h t m " ;  
 	 	 	                                 }                                                         	 	 	 	 	         	 	          
 	 	 	 	 	                 S e c t i o n N a m e = ' < b r / > < a   h r e f = ' + P a g e N a m e + '   c l a s s = " S e c t i o n C S S C l a s s "   s t y l e = " f o n t - s i z e : 1 1 p x ; " > ' + P a g e D e t a i l s . S e c t i o n N a m e + ' < / a > ' ;  
 	 	 	 	 	         }  
 	 	 	 	 	         v a r   T e m p V a l   = " " ;  
 	 	 	 	 	          
                                                 v a r   U R L = l o c a t i o n . h r e f . m a t c h ( / ^ ( . * ) \ / ( \ d { 1 , 2 } ) ( . { 3 } ) ( \ d { 4 } ) \ / ( . * ) $ / ) ;  
                                                 v a r   R o o t U R L   =   U R L [ 1 ] + " / " + U R L [ 2 ] + U R L [ 3 ] + U R L [ 4 ] ;  
                                                 i f ( O b j P a g e I n f o . e ! = " " )    
                                                 {  
                                                         R o o t U R L + = " / P a g e T h u m b s / " + O b j P a g e I n f o . e ;  
                                                 }  
                                                 e l s e  
                                                 {  
                                                         R o o t U R L + = " / P a g e T h u m b s "                                                  
                                                 }  
                                                          
 	 	 	 	 	         i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s   & &   C u r r e n t S u p p l N a m e ! = " " )  
 	 	 	 	 	         {  
                                                         R o o t U R L + = " / " + C u r r e n t S u p p l N a m e ;  
 	 	 	 	 	         } 	 	 	         	 	 	 	 	          
 	 	 	 	 	          
 	 	 	 	                 i f ( i = = 1 )  
 	 	 	 	                 {  
 	 	 	 	 	                 s t r u c t u r e + = ' < d i v   c l a s s = " P a g e T h u m b n a i l C o n t a i n e r " > < a   t i t l e = " i n d e x . h t m "   h r e f = " i n d e x . h t m " > < i m g   s t y l e = " b o r d e r : 0 p x ; "   s r c = " ' + R o o t U R L + ' / i n d e x . j p g " > < / a > < b r / > < a   c l a s s = " L i n k "   s t y l e = " c o l o r : # 0 0 0 0 0 0 ; "   h r e f = " i n d e x . h t m " > P a g e   1 < / a > ' + S e c t i o n N a m e + ' < / d i v > ' ;  
 	 	 	 	                 }  
 	 	 	 	                 e l s e  
 	 	 	 	                 {  
 	 	 	 	 	                 s t r u c t u r e + = ' < d i v   c l a s s = " P a g e T h u m b n a i l C o n t a i n e r " > < a   t i t l e = " p a g e ' + i + ' . h t m "   h r e f = " p a g e ' + i + ' . h t m " > < i m g   s t y l e = " b o r d e r : 0 p x ; "   s r c = " ' + R o o t U R L + ' / p a g e ' + i + ' . j p g " > < / a > < b r / > < a   c l a s s = " L i n k "   s t y l e = " c o l o r : # 0 0 0 0 0 0 ; "   h r e f = " p a g e ' + i + ' . h t m " > P a g e   ' + i + ' < / a > ' + S e c t i o n N a m e + ' < / d i v > ' ;  
 	 	 	 	                 }  
 	 	 	 	 }  
                 / * }  
 	 	 e l s e  
 	 	 {  
 	 	 	 f o r ( v a r   i = 1 ;   i < = P M _ O B J _ M a x C o u n t ;   i + + )  
 	 	 	 { 	  
 	 	 	 	  
 	 	 	 	 S e c t i o n N a m e = ' ' ; 	 	 	 	  
 	 	 	 	 v a r   T e m p V a l   = " " ;  
 	 	 	 	 i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
 	 	 	 	 {  
 	 	 	 	         T e m p V a l   =   ' . . / . . / P a g e T h u m b s / ' + s t r S u p p l e m e n t N a m e ;  
 	 	 	 	 }  
 	 	 	 	 e l s e  
 	 	 	 	 {  
 	 	 	 	         T e m p V a l   =   ' . . / P a g e T h u m b s ' ;  
 	 	 	 	 }  
 	 	 	 	         i f ( i = = 1 )  
 	 	 	 	         {  
  
 	 	 	 	 	         s t r u c t u r e + = ' < d i v   c l a s s = " P a g e T h u m b n a i l C o n t a i n e r " > < a   t i t l e = " i n d e x . h t m "   h r e f = " i n d e x . h t m " > < i m g   s t y l e = " b o r d e r : 0 p x ; "   s r c = " ' + T e m p V a l + ' / i n d e x . j p g " > < / a > < b r / > < a   c l a s s = " L i n k "   s t y l e = " c o l o r : # 0 0 0 0 0 0 ; "   h r e f = " i n d e x . h t m " > P a g e   1 < / a > ' + S e c t i o n N a m e + ' < / d i v > ' ;  
 	 	 	 	         }  
 	 	 	 	         e l s e  
 	 	 	 	         {  
 	 	 	 	 	         s t r u c t u r e + = ' < d i v   c l a s s = " P a g e T h u m b n a i l C o n t a i n e r " > < a   t i t l e = " p a g e ' + i + ' . h t m "   h r e f = " p a g e ' + i + ' . h t m " > < i m g   s t y l e = " b o r d e r : 0 p x ; "   s r c = " ' + T e m p V a l + ' / p a g e ' + i + ' . j p g " > < / a > < b r / > < a   c l a s s = " L i n k "   s t y l e = " c o l o r : # 0 0 0 0 0 0 ; "   h r e f = " p a g e ' + i + ' . h t m " > P a g e   ' + i + ' < / a > ' + S e c t i o n N a m e + ' < / d i v > ' ;  
 	 	 	 	         }  
 	 	 	 }  
 	 	 } * /  
 	 	 P a g e T h u m b n a i l s C o n t a i n e r . i n n e r H T M L = s t r u c t u r e ;  
 	 }  
 	 A d j u s t T h u m b n a i l T o p L e f t ( O b j S o u r c e D i v , P a g e T h u m b n a i l s C o n t a i n e r ) ;  
 	 P a g e T h u m b n a i l s C o n t a i n e r . s t y l e . d i s p l a y = ' b l o c k ' ;  
 } ;  
  
 f u n c t i o n   A d j u s t T h u m b n a i l T o p L e f t ( O b j S o u r c e D i v , P a g e T h u m b n a i l s C o n t a i n e r ) {  
         i f ( O b j S o u r c e D i v )  
         {  
 	         v a r   x ,   y   =   0 ;  
 	         x   =   O b j S o u r c e D i v . o f f s e t L e f t ;  
 	         y   =   O b j S o u r c e D i v . o f f s e t T o p   +   2 0 ;  
 	         O b j S o u r c e D i v   =   O b j S o u r c e D i v . o f f s e t P a r e n t ;  
 	         w h i l e ( O b j S o u r c e D i v   ! =   n u l l )  
 	         {  
 	 	         x   =   p a r s e I n t ( x )   +   p a r s e I n t ( O b j S o u r c e D i v . o f f s e t L e f t ) ;  
 	 	         y   =   p a r s e I n t ( y )   +   p a r s e I n t ( O b j S o u r c e D i v . o f f s e t T o p ) ;  
 	 	         O b j S o u r c e D i v   =   O b j S o u r c e D i v . o f f s e t P a r e n t ;  
 	         }  
 	         y + = 1 0 ;  
 	         i f ( ! P a g e T h u m b n a i l s C o n t a i n e r )  
 	         {  
 	                 P a g e T h u m b n a i l s C o n t a i n e r = d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P a g e T h u m b n a i l s ' ) ;  
 	         }  
 	         i f ( P a g e T h u m b n a i l s C o n t a i n e r )  
 	         {  
 	                 i f ( d o c u m e n t . a l l )  
 	                 {  
 	                         P a g e T h u m b n a i l s C o n t a i n e r . s t y l e . t o p = p a r s e I n t ( y ) + ' p x ' ;  
 	                         P a g e T h u m b n a i l s C o n t a i n e r . s t y l e . l e f t = p a r s e I n t ( x ) + ' p x ' ;  
 	                 }  
 	                 e l s e  
 	                 {  
 	                         P a g e T h u m b n a i l s C o n t a i n e r . s t y l e . t o p = p a r s e I n t ( y ) + p a r s e I n t ( d o c u m e n t . b o d y . s c r o l l T o p ) + ' p x ' ;  
 	                         P a g e T h u m b n a i l s C o n t a i n e r . s t y l e . l e f t = p a r s e I n t ( x ) + p a r s e I n t ( d o c u m e n t . b o d y . s c r o l l L e f t ) + ' p x ' ;  
 	                 }  
 	         }  
         }  
 }  
 w i n d o w . o n s c r o l l = f u n c t i o n ( ) {  
         A d j u s t T h u m b n a i l T o p L e f t ( d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P a g e T h u m b s L i n k C o n t a i n e r ' ) ) ;  
 } ;  
  
  
 f u n c t i o n   N e x t P a g e   ( )  
 {          
         i f   ( O b j P a g e I n f o . p   < P M _ O B J _ M a x C o u n t )  
         {  
                 O b j P a g e I n f o . p + + ;                  
                 i f ( O b j P a g e I n f o . v = = 1 )  
                 {  
                 	 l o c a t i o n . h r e f = " p a g e " + O b j P a g e I n f o . p + " . h t m " + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                 }  
                 e l s e  
                 {  
                           O b j P a g e I n f o . p + + ;  
                           i f   ( O b j P a g e I n f o . p   = = P M _ O B J _ M a x C o u n t )   l o c a t i o n . h r e f = " p a g e " + O b j P a g e I n f o . p + " . h t m " + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                           e l s e  
                                 l o c a t i o n . h r e f = G e t P a i r e d P a g e N a m e ( ) + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                 }  
         }  
         e l s e  
         {  
                 i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
                 {  
                                 S u p p l e m e n t I n d e x   =   G e t S u p p l e m e n t I n d e x B y N a m e ( ) ;  
                                 v a r   T m p S u p p l e m e n t N a m e = " " ;  
                                 v a r   O b j S u p p l e m e n t s   =   G e t S t r u c t u r e S u p p l e m e n t s A c c o r d i n g T o S e t t i n g V a l u e s ( ) ;  
                                 i f ( S u p p l e m e n t I n d e x = = - 1 )  
                                 {  
                                         i f ( O b j S u p p l e m e n t s . l e n g t h > 0 )  
                                         {  
                                                 T m p S u p p l e m e n t N a m e = O b j S u p p l e m e n t s [ 0 ] . S u p p l e m e n t N a m e  
                                                 C h a n g e S u p p l e m e n t ( T m p S u p p l e m e n t N a m e ) ;  
                                         }        
                                 }  
                                 e l s e  
                                 {  
                                         i f ( S u p p l e m e n t I n d e x < O b j S u p p l e m e n t s . l e n g t h - 1 )  
                                         {  
                                                 T m p S u p p l e m e n t N a m e = O b j S u p p l e m e n t s [ S u p p l e m e n t I n d e x + 1 ] . S u p p l e m e n t N a m e  
                                                 C h a n g e S u p p l e m e n t ( T m p S u p p l e m e n t N a m e ) ;  
                                         }                                  
                                 }                                                                      
                 }  
         }  
 }  
  
 f u n c t i o n   P r e v P a g e   ( )  
 {  
         i f   ( O b j P a g e I n f o . p   >   1 )  
         {  
                 O b j P a g e I n f o . p - - ;  
                 i f   ( O b j P a g e I n f o . p >   1 )  
                 {  
                         i f ( O b j P a g e I n f o . v = = 1 )  
                         {  
                                 l o c a t i o n . h r e f = " p a g e " + O b j P a g e I n f o . p + " . h t m " + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                         }  
                         e l s e  
                         {        
                                   O b j P a g e I n f o . p - - ;  
                                 i f   ( O b j P a g e I n f o . p >   1 )  
                                         l o c a t i o n . h r e f = G e t P a i r e d P a g e N a m e ( ) + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                                 e l s e  
                                         l o c a t i o n . h r e f = " i n d e x . h t m " + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                         }  
                 }  
                 e l s e  
                 {  
                         l o c a t i o n . h r e f = " i n d e x . h t m " + ( ( I s F u l l S c r e e n ) ? " ? F u l l S c r e e n " : " " ) ;  
                   }  
         }  
         e l s e  
         {  
                 i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
                 {  
                                 S u p p l e m e n t I n d e x   =   G e t S u p p l e m e n t I n d e x B y N a m e ( ) ;  
                                 v a r   T m p S u p p l e m e n t N a m e = " " ;  
                                 v a r   O b j S u p p l e m e n t s   =   G e t S t r u c t u r e S u p p l e m e n t s A c c o r d i n g T o S e t t i n g V a l u e s ( ) ;  
                                 i f ( S u p p l e m e n t I n d e x > 0 )  
                                 {  
                                         i f ( O b j S u p p l e m e n t s . l e n g t h > 0 )  
                                         {  
                                                 T m p S u p p l e m e n t N a m e = O b j S u p p l e m e n t s [ S u p p l e m e n t I n d e x - 1 ] . S u p p l e m e n t N a m e  
                                                 C h a n g e S u p p l e m e n t ( T m p S u p p l e m e n t N a m e ) ;  
                                         }        
                                 }  
                                 e l s e  
                                 {  
                                         B a c k T o M a i n ( ) ;  
                                 }                                                          
                 }          
         }  
 }  
 f u n c t i o n   G e t P a i r e d P a g e N a m e   ( )  
 {          
         v a r   P a g e N a m e   =   " p a g e " ;        
         i f   ( O b j P a g e I n f o . p % 2 = = 0 )  
         {                  
                   P a g e N a m e   + =   O b j P a g e I n f o . p + " _ " +   ( O b j P a g e I n f o . p + 1 ) ;  
         }  
         e l s e  
         {  
                 P a g e N a m e   + =   ( O b j P a g e I n f o . p - 1 ) + " _ " +   ( O b j P a g e I n f o . p ) ;  
         }  
         r e t u r n   P a g e N a m e + " . h t m " ;  
 }  
 f u n c t i o n   C h a n g e V i e w S t a t e   ( V i e w S t a t e )  
 {  
         i f   ( O b j P a g e I n f o . v ! = V i e w S t a t e   & &   O b j P a g e I n f o . p > 1   & &   O b j P a g e I n f o . p <   P M _ O B J _ M a x C o u n t )  
         {  
                 i f ( V i e w S t a t e = = 1 )  
                 {  
                         l o c a t i o n . h r e f = " p a g e " + O b j P a g e I n f o . p + " . h t m " ;  
                 }  
                 e l s e  
                 {                          
                         l o c a t i o n . h r e f = G e t P a i r e d P a g e N a m e ( ) ;  
                 }  
                  
         }  
         e l s e   i f   ( V i e w S t a t e = = 2   & &   O b j P a g e I n f o . p = = 1 )  
         {  
         	 O b j P a g e I n f o . p + + ;  
         	 l o c a t i o n . h r e f = G e t P a i r e d P a g e N a m e ( ) ;  
         }  
         e l s e   i f   ( V i e w S t a t e = = 2   & &   O b j P a g e I n f o . p = = P M _ O B J _ M a x C o u n t )  
         {  
               	 O b j P a g e I n f o . p - - ;  
               	 l o c a t i o n . h r e f = G e t P a i r e d P a g e N a m e ( ) ;  
         }  
 }  
  
  
 f u n c t i o n   S w i t c h Z o o m S t a t e ( Z o o m S t a t e )  
 {  
         i f   ( O b j P a g e I n f o . z = = Z o o m S t a t e )   r e t u r n ;  
         i f ( Z o o m S t a t e   = =   ' N o r m a l ' )  
         {  
                 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' N o r m a l ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
         }  
         e l s e   i f   ( Z o o m S t a t e   = =   ' E n l a r g e ' )  
         {  
                 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' E n l a r g e ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
         }  
         e l s e  
         {  
                 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' S m a l l ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
         }  
 }  
 f u n c t i o n   Z o o m I n   ( )  
 {  
 	 i f   ( O b j P a g e I n f o . z = = " E n l a r g e " )   r e t u r n ;  
 	 i f ( O b j P a g e I n f o . z   = =   ' N o r m a l ' )  
 	 {  
 	 	 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' E n l a r g e ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
 	 }  
 	 e l s e   i f   ( O b j P a g e I n f o . z   = =   ' S m a l l ' )  
 	 {  
 	 	 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' N o r m a l ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
 	 }  
 	        
 }  
 f u n c t i o n   Z o o m O u t   ( )  
 {  
 	 i f   ( O b j P a g e I n f o . z = = " S m a l l " )   r e t u r n ;  
 	 i f ( O b j P a g e I n f o . z   = =   ' N o r m a l ' )  
 	 {  
 	 	 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' S m a l l ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
 	 }  
 	 e l s e   i f   ( O b j P a g e I n f o . z   = =   ' E n l a r g e ' )  
 	 {  
 	 	 l o c a t i o n . h r e f = ( l o c a t i o n . h r e f . r e p l a c e ( O b j P a g e I n f o . z , ' N o r m a l ' ) ) . r e p l a c e ( " ? F u l l S c r e e n " , " " ) ;  
 	 }  
 	        
 }  
 f u n c t i o n   o p e n p a g e ( U R L , D e p t h , I s i n t e r n a l , E v e n t T y p e )  
 {  
         v a r   S u f f i x = " " ;  
         f o r ( x = 0 ; x < D e p t h ; x + + )  
         {  
                 S u f f i x + = " . . / "  
         }  
          
          
         	 v a r   E v e n t I d = ' 0 ' ;          
 	 v a r   L i s t T y p e   = 0 ;  
 	 i f ( I s i n t e r n a l )  
 	 { 	  
 	 	 l o c a t i o n . h r e f = S u f f i x + U R L ;  
 	 	 L i s t T y p e   = 1 0 ;  
 	 	 E v e n t I d = ' 4 4 0 2 8 ' ;  
 	 }  
 	 e l s e  
 	 {  
 	 	 i f ( O b j S e t t i n g s . I s O f f l i n e V i e w   & &   U R L . i n d e x O f ( " h t t p : / / " ) = = - 1 )  
 	 	 {  
 	 	 	 S u f f i x = O b j S e t t i n g s . D o m a i n U R L ;  
 	 	 }  
 	 	 v a r   w i n   =   w i n d o w . o p e n ( S u f f i x + U R L , ' M y V i s h w a P o p u p ' + ( M a t h . r o u n d ( ( M a t h . r a n d o m ( ) * 9 ) + 1 ) ) . t o S t r i n g ( ) , ' m e n u b a r = n o , l o c a t i o n = n o , r e s i z a b l e = y e s , s c r o l l b a r s = y e s , s t a t u s = y e s , t o o l b a r = n o , w i d t h = ' + s c r e e n . w i d t h + ' , h e i g h t = ' + s c r e e n . h e i g h t + ' , t o p = 0 , l e f t = 0 , c e n t e r s c r e e n = y e s ' ) ;  
 	 	 i f ( U R L . i n d e x O f ( ' o p e n i m a g e . h t m ' ) ! = - 1   | |   U R L . i n d e x O f ( ' O p e n I m a g e . h t m ' ) ! = - 1 )  
 	 	 {  
 	 	 	 L i s t T y p e   = 2 ;  
 	 	 	 E v e n t I d = ' 4 4 0 1 1 ' ;  
 	 	 }  
 	 	 e l s e  
 	 	 {  
 	 	 	 L i s t T y p e   = 9 ;  
 	 	 	 E v e n t I d = ' 4 4 0 2 5 ' ;  
 	 	 }  
 	 }  
 	 i f ( E v e n t T y p e )  
 	 {  
 	 	 s w i t c h ( p a r s e I n t ( E v e n t T y p e ) )  
 	 	 {  
 	 	 	 c a s e   1 6 :  
 	 	 	 	 L i s t T y p e   = 1 6 ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 5 5 ' ; 	 	 	 	  
 	 	 	 b r e a k ;  
 	 	 }  
 	 }  
 	 I n s e r t A u d i t L o g ( L i s t T y p e , E v e n t I d ) ;  
 }  
 f u n c t i o n   O p e n P a g e ( U R L , D e p t h , I s i n t e r n a l , E v e n t T y p e )  
 {  
         v a r   S u f f i x = " " ;  
         f o r ( x = 0 ; x < D e p t h ; x + + )  
         {  
                 S u f f i x + = " . . / "  
         }  
            
         	 v a r   E v e n t I d = ' 0 ' ;                  
 	 v a r   L i s t T y p e   = 0 ;  
 	 i f ( I s i n t e r n a l )  
 	 { 	  
 	 	 l o c a t i o n . h r e f = S u f f i x + U R L ;  
 	 	 L i s t T y p e   = 1 0 ;  
 	 	 E v e n t I d = ' 4 4 0 2 8 ' ; 	  
 	 }  
 	 e l s e  
 	 {  
 	 	 i f ( O b j S e t t i n g s . I s O f f l i n e V i e w   & &   U R L . i n d e x O f ( " h t t p : / / " ) = = - 1 )  
 	 	 {  
 	 	 	 S u f f i x = O b j S e t t i n g s . D o m a i n U R L ;  
 	 	 }  
 	 	 v a r   w i n   =   w i n d o w . o p e n ( S u f f i x + U R L , ' M y V i s h w a P o p u p ' + ( M a t h . r o u n d ( ( M a t h . r a n d o m ( ) * 9 ) + 1 ) ) . t o S t r i n g ( ) , ' m e n u b a r = n o , l o c a t i o n = n o , r e s i z a b l e = y e s , s c r o l l b a r s = y e s , s t a t u s = y e s , t o o l b a r = n o , w i d t h = ' + s c r e e n . w i d t h + ' , h e i g h t = ' + s c r e e n . h e i g h t + ' , t o p = 0 , l e f t = 0 , c e n t e r s c r e e n = y e s ' ) ;  
 	 	 i f ( U R L . i n d e x O f ( ' o p e n i m a g e . h t m ' ) ! = - 1   | |   U R L . i n d e x O f ( ' O p e n I m a g e . h t m ' ) ! = - 1 )  
 	 	 {  
 	 	 	 L i s t T y p e   = 2 ;  
 	 	 	 E v e n t I d = ' 4 4 0 1 1 ' ;  
 	 	 }  
 	 	 e l s e  
 	 	 { 	 	 	  
 	 	 	 L i s t T y p e   = 9 ;  
 	 	 	 E v e n t I d = ' 4 4 0 2 5 ' ;  
 	 	 }  
 	 }  
 	 i f ( E v e n t T y p e )  
 	 {  
 	 	 s w i t c h ( p a r s e I n t ( E v e n t T y p e ) )  
 	 	 {  
 	 	 	 c a s e   1 6 :  
 	 	 	 	 L i s t T y p e   = 1 6 ;  
 	 	 	 	 E v e n t I d = ' 4 4 0 5 5 ' ; 	 	 	 	  
 	 	 	 b r e a k ;  
 	 	 }  
 	 } 	  
 	 I n s e r t A u d i t L o g ( L i s t T y p e , E v e n t I d ) ;  
 }  
 f u n c t i o n   G e t P a g e D e t a i l s B y P a g e N a m e ( P g e N u m b e r )  
 {  
         f o r ( v a r   x = 0 ; x < P M _ O B J _ S e c t i o n P a g e M a p p i n g s . l e n g t h ; x + + )  
         {  
                 i f ( P g e N u m b e r = = P M _ O B J _ S e c t i o n P a g e M a p p i n g s [ x ] . P a g e N u m b e r )  
                 {  
                         r e t u r n   P M _ O B J _ S e c t i o n P a g e M a p p i n g s [ x ] ;  
                 }  
         }  
         r e t u r n   n u l l ;  
 }  
 f u n c t i o n   S h o w N e w s   ( N e w s I n d e x , S h o w P o p )  
 { 	  
 	 v a r   O b j N e w s   =   w i n d o w . f r a m e s [ ' I f r m B r e a k i n g N e w s ' ] . O b j H a n d l e r . G e t A l l N e w s ( ) ;  
 	 i f ( ! O b j N e w s   | |   O b j N e w s . l e n g t h = = 0 )   r e t u r n ; 	  
 	 S h o w B r e a k i n g N e w s   ( O b j N e w s [ N e w s I n d e x ] . N e w s T i t l e , O b j N e w s [ N e w s I n d e x ] . D e s c r i p t i o n , O b j N e w s [ N e w s I n d e x ] . I m a g e U R L , O b j N e w s [ N e w s I n d e x ] . U T C N e w s D a t e , { ' S h o w P o p ' : f a l s e } ) ;  
 }  
 f u n c t i o n   S h o w B r e a k i n g N e w s   ( T i t l e , D e s c r i p t i o n , I m a g e U R L , D a t e U p d a t e d , S e t t i n g s )  
 {  
 	 t r y  
 	 {  
 	 	 v a r   B e a k i n g P o p u p   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v B e a k i n g P o p u p ' ) ; 	 	  
 	 	 v a r   S h o w P o p   =   t r u e ; 	 	 	  
 	 	 i f   ( S e t t i n g s )   S h o w P o p   =   S e t t i n g s . S h o w P o p ; 	 	  
 	 	 i f   ( ! B e a k i n g P o p u p )  
 	 	 {  
  
 	 	 	 B e a k i n g P o p u p   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 	 	 B e a k i n g P o p u p . i d   =   " d i v B e a k i n g P o p u p " ;  
 	 	 	 B e a k i n g P o p u p . s t y l e . w i d t h = " 7 0 0 " ;  
 	 	 	 B e a k i n g P o p u p . s t y l e . m i n H e i g h t = " 5 0 0 " ;  
 	 	 	 B e a k i n g P o p u p . s t y l e . t o p = " 1 0 0 " ;  
 	 	 	 B e a k i n g P o p u p . c l a s s N a m e   =   " B r e a k i n g N e w s D i v C l a s s " ; 	 	 	 	 	 	  
 	 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( B e a k i n g P o p u p ) ; 	 	 	  
 	 	 }  
 	 	  
 	 	 v a r   S t r u c t u r e = ' < d i v   s t y l e = " w i d t h : 1 0 0 % ; "   > < t a b l e   c e l l p a d d i n g = " 2 "   c e l l s p a c i n g = " 2 "   w i d t h = " 1 0 0 % " > < t r > ' ; 	 	  
 	 	 i f ( T i t l e   & &   T i t l e   ! = " " )  
 	 	 {  
 	 	 	 S t r u c t u r e + = ' < t d   s t y l e = " t e x t - a l i g n : r i g h t ; "   c l a s s = " M a i n P a g e T e x t "   > < a   h r e f = " j a v a s c r i p t : S h o w B r e a k i n g N e w s ( n u l l , n u l l , n u l l , n u l l , { \ ' S h o w P o p \ ' : f a l s e } ) ; "   c l a s s = " T e x t L i n k B o l d " > < s p a n   c l a s s = " B a c k _ B u t t o n " > V i e w   A l l   N e w s < / s p a n > < / a > & n b s p ; | & n b s p ; < a   h r e f = " j a v a s c r i p t : M P J S . H i d e P o p u p ( ) ; "   c l a s s = " T e x t L i n k B o l d " > < s p a n   c l a s s = " B a c k _ B u t t o n " > C l o s e < / s p a n > < / a > < / t d > < / t r > ' ; 	 	 	  
 	 	 	 S t r u c t u r e + = ' < t r > < t d   s t y l e = " b o r d e r - b o t t o m : d a s h e d   1 p x   # c 6 c 6 c 6 ; h e i g h t : 3 5 p x ; " > < d i v > < h 1   c l a s s = " H e a d i n g "   i d = " N e w s H e a d i n g "   s t y l e = " d i s p l a y : i n l i n e ; " > ' + T i t l e + ' < / h 1 > < / d i v > < d i v   s t y l e = " t e x t - a l i g n : r i g h t ; p a d d i n g - r i g h t : 1 0 p x ; "   c l a s s = " F o r m T e x t "   i d = " N e w s D a t e " > ' + D a t e U p d a t e d + ' < / d i v > < / t d > < / t r > ' ;  
 	 	 	 S t r u c t u r e + = ' < t r > < t d   s t y l e = " "   c l a s s = " M a i n P a g e T e x t "     > < d i v   i d = " N e w s C o n t e n t "   > ' ;  
 	 	 	 i f ( I m a g e U R L   & &   I m a g e U R L ! = ' ' )  
 	 	 	 {  
 	 	 	 	 S t r u c t u r e + = ' < i m g   s r c = " ' + a p p P a t h + I m a g e U R L + ' "   / > < b r / > ' ;  
 	 	 	 }  
 	 	 	 S t r u c t u r e + = D e s c r i p t i o n + ' < / d i v > < / t d > ' ;  
 	 	 	  
 	 	 }  
 	 	 e l s e  
 	 	 {  
 	 	 	 S t r u c t u r e + = ' < t d   s t y l e = " t e x t - a l i g n : r i g h t ; "   c l a s s = " M a i n P a g e T e x t "   > < a   h r e f = " j a v a s c r i p t : M P J S . H i d e P o p u p ( ) ; "   c l a s s = " T e x t L i n k B o l d " > < s p a n   c l a s s = " B a c k _ B u t t o n " > C l o s e < / s p a n > < / a > < / t d > < / t r > < t r > ' ; 	 	 	  
 	 	 	 S t r u c t u r e   + = ' < t d   v a l i g n = " t o p "   s t y l e = " b o r d e r - t o p :   0 p x   n o n e ;   b o r d e r - b o t t o m :   0 p x   n o n e ;   p a d d i n g :   1 5 p x ;   b a c k g r o u n d - c o l o r :   r g b ( 2 5 5 ,   2 5 5 ,   2 5 5 ) ; "   c o l s p a n = " 2 " > < d i v   s t y l e = " p a d d i n g - b o t t o m :   1 0 p x ;   p a d d i n g - t o p :   5 p x ; "   c l a s s = " H e a d i n g " > N e w s < / d i v > < t a b l e   c e l l s p a c i n g = " 0 "   c e l l p a d d i n g = " 0 "   b o r d e r = " 0 "   w i d t h = " 6 0 0 " > < t b o d y > < t r > < t d   w i d t h = " 5 8 0 " > ' ;  
 	 	 	 v a r   O b j N e w s   =   w i n d o w . f r a m e s [ ' I f r m B r e a k i n g N e w s ' ] . O b j H a n d l e r . G e t A l l N e w s ( ) ;  
 	 	 	 i f ( ! O b j N e w s   | |   O b j N e w s . l e n g t h = = 0 )   r e t u r n ;  
 	 	 	 f o r ( v a r   i = 0 ; i < O b j N e w s . l e n g t h ; i + + )  
 	 	 	 {  
 	 	 	 	 T i t l e   =   O b j N e w s [ i ] . N e w s T i t l e ;  
 	 	 	 	 D e s c r i p t i o n   =   O b j N e w s [ i ] . D e s c r i p t i o n ;  
 	 	 	 	 I m a g e U R L   =   O b j N e w s [ i ] . I m a g e U R L ;  
 	 	 	 	 D a t e U p d a t e d   =   O b j N e w s [ i ] . U T C N e w s D a t e ;  
 	 	 	 	  
 	 	 	 	 S t r u c t u r e + = ' < t a b l e   c e l l s p a c i n g = " 0 "   c e l l p a d d i n g = " 5 "   b o r d e r = " 0 "   w i d t h = " 1 0 0 % " > < t b o d y > < t r > < t d   s t y l e = " p a d d i n g - t o p :   1 0 p x ; "   c l a s s = " B o r d e r B o t t o m " > ' ;  
 	 	 	 	 S t r u c t u r e + = ' < a   c l a s s = " N e w s H e a d i n g "   h r e f = " j a v a s c r i p t : S h o w N e w s ( ' +   i   + ' ) ; " > ' +   T i t l e   + ' < / a > < / t d > ' ;  
 	 	 	 	 S t r u c t u r e + = ' < t d   a l i g n = " r i g h t "   s t y l e = " p a d d i n g - t o p :   1 5 p x ;   w i d t h :   2 5 0 p x ; "   c l a s s = " B o r d e r B o t t o m   T e x t " > ( ' +   D a t e U p d a t e d   +   ' ) < / t d > ' ;  
 	 	 	 	 S t r u c t u r e + = ' < / t r > < t r > < t d   c o l s p a n = " 2 " > < d i v   c l a s s = " T e x t " > '   +   ( ( D e s c r i p t i o n . l e n g t h   >   2 0 0 ) ? D e s c r i p t i o n . s u b s t r ( 0 , 2 0 0 ) : D e s c r i p t i o n )   + '   < / d i v > < / t d > < / t r > < / t b o d y > < / t a b l e > ' ;  
 	 	 	 }  
 	 	 	 S t r u c t u r e   + = ' < / t d > < / t r > < / t b o d y > < / t a b l e > < / d i v > < / t d > ' ;  
 	 	 }  
 	 	 S t r u c t u r e + = ' < / t r > < / t a b l e > < / d i v > ' ; 	 	  
 	 	 B e a k i n g P o p u p . i n n e r H T M L = S t r u c t u r e ;  
 	 	 d o c u m e n t . b o d y . s c r o l l T o p = 0 ;  
 	 	  
 	 	 i f ( S h o w P o p )  
 	 	 { 	 	 	  
 	 	 	 M P J S . S h o w P o p u p ( ' d i v B e a k i n g P o p u p ' ) ;  
 	 	 }  
 	 }  
 	 c a t c h   ( e )  
 	 {  
 	 }  
 }  
  
 / *   P a g e   H e i g h t   H a n d l i n g   * /  
 f u n c t i o n   H a n d l e P a g e H e i g h t ( )  
 {  
 	 t r y  
 	 {  
 	 	 i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ T o p ' ) )   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 ( ' d i v N a v i g a t i o n _ T o p ' ) . p a r e n t N o d e . s t y l e . w i d t h   =   p a r s e F l o a t ( s c r e e n . a v a i l W i d t h ) - 2 2 ;  
 	                  
 	                 i f   ( O b j P a g e I n f o . p = = 1 )  
 	                 {  
 	                 	 v a r   O b j B u t   =   n u l l ;  
 	                 	 i f   ( I s F u l l S c r e e n )  
 	                 	 {  
 	                 	 	 O b j B u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " i m g f u l l B a c k B u t t o n " ) ;  
 	                 	 	 i f ( O b j B u t )   O b j B u t . s r c =   a p p P a t h + " i m a g e s / b l a n k . g i f " ;  
 	                 	 }  
 	                 	 e l s e  
 	                 	 {  
 	                 	 	 / * O b j B u t   =   d o c u m e n t . g e t E l e m e n t s B y N a m e ( " i m g B a c k B u t t o n " ) ;  
 	                 	 	 i f ( O b j B u t   & &   O b j B u t . l e n g t h   > 0 )    
 	                 	 	 {  
 	                 	 	 	 O b j B u t [ 0 ] . s r c =   a p p P a t h + " i m a g e s / b l a n k . g i f " ;  
 	                 	 	 	 O b j B u t [ 0 ] . s t y l e . d i s p l a y = ' n o n e ' ;  
 	                 	 	 	 O b j B u t [ 1 ] . s r c =   a p p P a t h + " i m a g e s / b l a n k . g i f " ;  
 	                 	 	 	 O b j B u t [ 1 ] . s t y l e . d i s p l a y = ' n o n e ' ;  
 	                 	 	 } * /  
 	                 	 }  
 	                 	  
 	                 }  
 	                 i f   ( O b j P a g e I n f o . p = = P M _ O B J _ M a x C o u n t )  
 	 	 {  
 	 	 	 v a r   O b j B u t   =   n u l l ;  
 	 	 	 i f   ( I s F u l l S c r e e n )  
 	 	 	 {  
 	 	 	 	 O b j B u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " i m g f u l l N e x t B u t t o n " ) ;  
 	 	 	 	 i f ( O b j B u t )   O b j B u t . s r c =   a p p P a t h + " i m a g e s / b l a n k . g i f " ;  
 	 	 	 }  
 	 	 	 e l s e  
 	 	 	 {  
 	 	 	 	 / * O b j B u t   =   d o c u m e n t . g e t E l e m e n t s B y N a m e ( " i m g N e x t B u t t o n " ) ;  
 	 	 	 	 i f ( O b j B u t   & &   O b j B u t . l e n g t h   > 0 )    
 	 	 	 	 {  
 	 	 	 	 	 O b j B u t [ 0 ] . s r c =   a p p P a t h + " i m a g e s / b l a n k . g i f " ;  
 	 	 	 	 	 O b j B u t [ 0 ] . s t y l e . d i s p l a y = ' n o n e ' ;  
 	 	 	 	 	 O b j B u t [ 1 ] . s r c =   a p p P a t h + " i m a g e s / b l a n k . g i f " ;  
 	 	 	 	 	 O b j B u t [ 1 ] . s t y l e . d i s p l a y = ' n o n e ' ; 	 	 	 	 	  
 	                 	 	 } * /  
 	 	 	 }  
 	 	 	  
 	                 }  
 	                 i f ( I s F u l l S c r e e n )  
 	                 {  
 	                 	 S h o w F u l l V i e w   ( ) ;  
 	                 	 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 ( ' d i v N a v i g a t i o n _ T o p ' ) . p a r e n t N o d e . s t y l e . d i s p l a y = " b l o c k " ;  
 	                 / * d o c u m e n t . g e t E l e m e n t B y I d ( ' M V B o t t o m B a r C o n t a i n e r ' ) . s t y l e . w i d t h   =   p a r s e F l o a t ( s c r e e n . a v a i l W i d t h ) - 2 2 ; * /  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' t b l M a i n ' ) . p a r e n t N o d e . s t y l e . p a d d i n g T o p   =   p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ T o p ' ) . p a r e n t N o d e . o f f s e t H e i g h t ) ;  
 	 	 / * d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ B o t t o m ' ) . s t y l e . p a d d i n g B o t t o m   =   p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( ' M V B o t t o m B a r C o n t a i n e r ' ) . o f f s e t H e i g h t ) ; 	 	 * /  
 	 }  
 	 c a t c h ( e )  
 	 {  
 	         / * a l e r t ( e ) ; * /  
 	 }  
 } ;  
 H a n d l e P a g e H e i g h t ( ) ;  
 / *   P a g e   H e i g h t   H a n d l i n g   * /  
  
 f u n c t i o n   O p e n I n N e w W i n ( U R L )  
 {  
         v a r   w i n   =   w i n d o w . o p e n ( U R L , ' M y V i s h w a P o p u p ' + ( M a t h . r o u n d ( ( M a t h . r a n d o m ( ) * 9 ) + 1 ) ) . t o S t r i n g ( ) , ' m e n u b a r = n o , l o c a t i o n = n o , r e s i z a b l e = y e s , s c r o l l b a r s = y e s , s t a t u s = y e s , t o o l b a r = n o , w i d t h = ' + s c r e e n . w i d t h + ' , h e i g h t = ' + s c r e e n . h e i g h t + ' , t o p = 0 , l e f t = 0 , c e n t e r s c r e e n = y e s ' ) ; 	  
 }  
 f u n c t i o n   O p e n I n S a m e W i n ( U R L )  
 {  
         l o c a t i o n . h r e f = U R L ;  
 }  
 f u n c t i o n   S h o w P i n ( P i n I d ,   P i n R e f )  
 {  
 	 v a r   O b j P i n   =   G e t P i n I n f o   ( P i n I d ) ;  
 	 i f   ( ! O b j P i n )   r e t u r n ;  
 	 i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P i n P o p u p ' ) )  
 	 { 	  
 	 	 C r e a t e P i n P o p u p ( ) ;  
 	 }  
 	 v a r   O b j P i n P o p   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P i n P o p u p ' ) ;  
 	 O b j P i n P o p . s t y l e . l e f t   =   p a r s e F l o a t ( O b j P i n . L e f t ) + 2 8 + p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( ' t b l M a i n ' ) . o f f s e t L e f t ) ;  
 	 O b j P i n P o p . s t y l e . t o p   =   p a r s e F l o a t ( O b j P i n . T o p ) - 8 0 + O b j S e t t i n g s . T o p B a r H e i g h t ;  
 	 / * i f ( P i n R e f )  
 	 {  
 	 	 v a r   C o o r d s   =   M P J S . C o o r d i n a t e s H a n d l e r . G e t C o o r d s B y C o n t r o l I D ( P i n R e f , " R i g h t B o t t o m " , t r u e ) ;  
 	 	 O b j P i n P o p . s t y l e . l e f t   =   C o o r d s . X + p a r s e F l o a t ( P i n R e f . s t y l e . m a r g i n L e f t ) ;  
 	 	 O b j P i n P o p . s t y l e . t o p   =   C o o r d s . Y + p a r s e F l o a t ( P i n R e f . s t y l e . m a r g i n T o p ) - O b j S e t t i n g s . T o p B a r H e i g h t ;  
 	 }  
 	 e l s e  
 	 {  
 	 	  
 	 } * /  
 	 O b j P i n P o p . s t y l e . d i s p l a y   = " b l o c k " ;  
 	  
 	 v a r   t x t L i n k s   = ' < d i v   c l a s s = " C l o s e D i v C l a s s "   o n c l i c k = " H i d e P i n P o p u p ( ) ; " > X < / d i v > ' ;  
 	 v a r   I n c r e a s e H e i g h t   = 0 ;  
 	 v a r   U R L i n k   = " " ;  
 	 f o r   ( v a r   i = 0 ; i < O b j P i n . P i n O p t i o n s . l e n g t h ; i + + )  
 	 {  
 	 	 U R L i n k   = " " ;  
 	 	 i f ( O b j P i n . P i n O p t i o n s [ i ] [ 0 ] = = 0 )  
 	 	 {  
 	 	 	 U R L i n k   =   a p p P a t h + ' P i n A l b u m . a s p x ? P u b l i c a t i o n P i n I d = ' + P i n I d ;  
 	 	 	 i f   ( O b j S e t t i n g s . I s O f f l i n e V i e w )   U R L i n k   =   O b j S e t t i n g s . D o m a i n U R L + ' P i n A l b u m . a s p x ? P u b l i c a t i o n P i n I d = ' + P i n I d ;  
 	 	 	 t x t L i n k s   + = ' < a   h r e f = " j a v a s c r i p t : O p e n I n N e w W i n ( \ ' ' +   U R L i n k   + ' \ ' ) ; "   c l a s s = " P i n L i n k C l a s s " > P h o t o   A l b u m   < / a > < b r   / > ' ;  
 	 	 }  
 	 	  
 	 	 i f ( O b j P i n . P i n O p t i o n s [ i ] [ 0 ] = = 1 )  
 	 	 {  
 	 	 	 U R L i n k   =   a p p P a t h + ' P i n V i d e o s . a s p x ? P u b l i c a t i o n P i n I d = ' + P i n I d ;  
 	 	 	 i f   ( O b j S e t t i n g s . I s O f f l i n e V i e w )   U R L i n k   =   O b j S e t t i n g s . D o m a i n U R L + ' P i n V i d e o s . a s p x ? P u b l i c a t i o n P i n I d = ' + P i n I d ;  
 	 	 	 t x t L i n k s   + = ' < a   h r e f = " j a v a s c r i p t : O p e n I n N e w W i n ( \ ' ' +   U R L i n k   + ' \ ' ) ; "   c l a s s = " P i n L i n k C l a s s " > V i d e o   A l b u m   < / a > < b r   / > ' ;  
 	 	 }  
 	 	 i f ( O b j P i n . P i n O p t i o n s [ i ] [ 0 ] = = 2 )  
 	 	 {  
 	 	 	 U R L i n k   =   O b j P i n . P i n O p t i o n s [ i ] [ 2 ] ;  
 	 	 	 t x t L i n k s   + = ' < a   h r e f = " j a v a s c r i p t : O p e n I n N e w W i n ( \ ' ' +   U R L i n k   + ' \ ' ) ; "   c l a s s = " P i n L i n k C l a s s " > ' +   O b j P i n . P i n O p t i o n s [ i ] [ 1 ]   + ' < / a > < b r   / > ' ;  
 	 	 }  
 	 }  
 	 s w i t c h   ( p a r s e I n t ( O b j P i n . M a p p i n g T y p e ) )  
 	 {  
 	 	 c a s e   2 : 	 	 	 	  
 	 	 	 t x t L i n k s   + = ' < a   h r e f = " j a v a s c r i p t : ' +   O b j P i n . A d d i t i o n a l S t r i n g   + ' "   c l a s s = " P i n L i n k C l a s s " > N e w s   C o m m e n t s < / a > < b r   / > ' ;  
 	 	 b r e a k ;  
 	 }  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P i n P o p u p C o n t e n t s ' ) . i n n e r H T M L   =   t x t L i n k s ;  
 }  
 f u n c t i o n   H i d e P i n P o p u p   ( )  
 {  
  
 	 v a r   O b j P i n P o p   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v P i n P o p u p ' ) ; 	  
 	 i f ( ! O b j P i n P o p )   r e t u r n ;  
 	 	  
 	 O b j P i n P o p . 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 P i n I n f o   ( P i n I d )  
 {  
 	 f o r   ( v a r   i = 0 ; i < O b j P i n I n f o . l e n g t h ; i + + )  
 	 {  
 	 	 i f   ( O b j P i n I n f o [ i ] . P i n I d = = P i n I d )  
 	 	 {  
 	 	 	 r e t u r n   O b j P i n I n f o [ i ] ;  
 	 	 }  
 	 }  
 	 r e t u r n   n u l l ;  
 }  
 f u n c t i o n   C r e a t e P i n P o p u p   ( )  
 {  
 	 v a r   O b j M a i n D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 O b j M a i n D i v . i d = " d i v P i n P o p u p " ;  
 	 O b j M a i n D i v . c l a s s N a m e = " P i n P o p u p C l a s s " ;  
 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( O b j M a i n D i v ) ;  
 	  
 	 v a r   O b j T o p D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 O b j T o p D i v . c l a s s N a m e   = " T o p P i n B G " ;  
 	 O b j M a i n D i v . a p p e n d C h i l d ( O b j T o p D i v ) ;  
 	  
 	 v a r   O b j M i d D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 O b j M i d D i v . i d   =   " d i v P i n P o p u p C o n t e n t s " ;  
 	 O b j M i d D i v . c l a s s N a m e   = " M i d P i n B G " ;  
 	 O b j M a i n D i v . a p p e n d C h i l d ( O b j M i d D i v ) ; 	  
  
 	 v a r   O b j B o t D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 O b j B o t D i v . c l a s s N a m e   = " B o t P i n B G " ;  
 	 O b j M a i n D i v . a p p e n d C h i l d ( O b j B o t D i v ) ; 	 	  
 }  
 f u n c t i o n   S h o w F u l l V i e w   ( )  
 {  
 	 I s F u l l S c r e e n   =   t r u e ;  
 	 i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ T o p ' ) )   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 ( ' d i v N a v i g a t i o n _ T o p ' ) . p a r e n t N o d e . s t y l e . d i s p l a y   =   " n o n e " ; 	  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ B o t t o m ' ) . s t y l e . d i s p l a y = " n o n e " ;  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' t b l M a i n ' ) . p a r e n t N o d e . s t y l e . p a d d i n g T o p   =   0 ;  
 	 v a r   O b j M a i n D i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v F u l l V i e w N a v i g a t i o n ' ) ;  
 	 i f ( ! O b j M a i n D i v )  
 	 {  
 	 	 O b j M a i n D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 	 O b j M a i n D i v . i d   =   " d i v F u l l V i e w N a v i g a t i o n " ;  
 	 	 O b j M a i n D i v . c l a s s N a m e   =   " F u l l V i e w N a v C l a s s " ;  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( O b j M a i n D i v ) ;  
 	 	 v a r   T e m p T x t   =   ' ' ;  
 	 	 T e m p T x t + = ' 	 	 	 < t a b l e   c e l l p a d d i n g = " 5 "   c e l l s p a c i n g = " 0 "   a l i g n = " c e n t e r "   c l a s s = " F u l l V i e w N a v T b l " > < t r > ' ;  
 	 	 T e m p T x t + = ' 	 	 	 < t d   a l i g n = " l e f t " > ' ;  
 	 	 T e m p T x t + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / f u l l v i e w _ b a c k . g i f "   i d = " i m g f u l l B a c k B u t t o n "   t i t l e = " ' + O b j S e t t i n g s . P r e v i o u s P a g e T e x t + ' "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " P r e v P a g e ( ) ; " / > & n b s p ; & n b s p ; ' ;  
 	 	 T e m p T x t + = ' 	 	 	 < / t d > < t d   c l a s s = " F u l l V i e w T e x t " > ' + O b j P a g e I n f o . p + ' & n b s p ; / & n b s p ; ' + P M _ O B J _ M a x C o u n t ;  
 	 	 T e m p T x t + = ' 	 	 	 < / t d > < t d > ' ;  
 	 	 T e m p T x t + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / f u l l v i e w _ n e x t . g i f "   i d = " i m g f u l l N e x t B u t t o n "     t i t l e = " ' + O b j S e t t i n g s . N e x t P a g e T e x t + ' "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " N e x t P a g e ( ) ; " / > & n b s p ; & n b s p ; ' ;  
 	 	 T e m p T x t + = ' 	 	 	 < / t d > < t d > ' ;  
 	 	 T e m p T x t + = ' 	 	 	         < i m g   s r c = " ' + a p p P a t h + ' i m a g e s / f u l l v i e w _ c l o s e . g i f "   t i t l e = " C l o s e "   s t y l e = " b o r d e r : 0 p x ; c u r s o r : p o i n t e r ; "   o n c l i c k = " C l o s e F u l l V i e w ( ) ; " / > & n b s p ; & n b s p ; ' ; 	 	  
 	 	 T e m p T x t + = ' 	 	 	 < / t d > ' ;  
 	 	 T e m p T x t + = ' 	 	 	 < / t r > < / t a b l e > ' ; 	 	  
 	 	 O b j M a i n D i v . i n n e r H T M L   = T e m p T x t ;  
 	 }  
 	 O b j M a i n D i v . s t y l e . d i s p l a y = " b l o c k " ; 	  
 }  
  
 f u n c t i o n   C l o s e F u l l V i e w   ( )  
 {  
 	 I s F u l l S c r e e n   =   f a l s e ;  
 	 i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ T o p ' ) )   r e t u r n ;  
 	 v a r   O b j M a i n D i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v F u l l V i e w N a v i g a t i o n ' ) ;  
 	 i f ( ! O b j M a i n D i v )   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 ( ' d i v N a v i g a t i o n _ T o p ' ) . p a r e n t N o d e . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ B o t t o m ' ) . s t y l e . d i s p l a y = " b l o c k " ;  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' t b l M a i n ' ) . p a r e n t N o d e . s t y l e . p a d d i n g T o p   =   p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v N a v i g a t i o n _ T o p ' ) . p a r e n t N o d e . o f f s e t H e i g h t ) ;  
 	 O b j M a i n D i v . s t y l e . d i s p l a y = " n o n e " ;  
 }  
 f u n c t i o n   I n s e r t A u d i t L o g ( M a p p i n g T y p e , E v e n t I d , A d d i t i o n a l S t r i n g )  
 {  
 	 v a r   O b j I f r a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' i f r m L o g g e r ' ) ;  
 	 i f   ( ! O b j I f r a m e )   r e t u r n ;  
 	 v a r   S e c t i o n N a m e = " " ;  
 	 v a r   S u p p l e m e n t N a m e   =   " " ;  
 	 v a r   E d i t i o n N a m e = " " ;  
 	 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 d i t i o n s ' ) )  
 	 {  
 	 	 E d i t i o n N a m e = 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 d i t i o n s ' ) . v a l u e ; 	 	  
 	 }  
 	 e l s e  
 	 {  
 	         E d i t i o n N a m e = O b j P a g e I n f o . e ;  
 	 }  
 	 f o r ( v a r   X = 0 ; X < P M _ O B J _ E d i t i o n s . l e n g t h ; X + + )  
 	 {  
 	         i f ( P M _ O B J _ E d i t i o n s [ X ] . E d i t i o n F o l d e r N a m e = = E d i t i o n N a m e )  
 	         {  
 	                 E d i t i o n N a m e = P M _ O B J _ E d i t i o n s [ X ] . E E d i t i o n N a m e ;  
 	         }  
 	 } 	  
 	 S u p p l e m e n t N a m e   =   G e t E n g l i s h S u p p l e m e n t N a m e ( O b j P a g e I n f o . s ) ;  
 	 i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s   & &   S u p p l e m e n t N a m e = = " " )  
 	 {  
 	         S u p p l e m e n t N a m e = " " ;  
 	 }  
 	 S e c t i o n N a m e = G e t S e c t i o n N a m e B y P a g e N u m b e r ( ) ;  
 	 v a r   O b j A d d i t i o n a l S t r i n g = " " ;  
 	 i f ( A d d i t i o n a l S t r i n g )  
 	 {  
 	 	 O b j A d d i t i o n a l S t r i n g = A d d i t i o n a l S t r i n g  
 	 }  
 	 O b j I f r a m e . s r c = O b j S e t t i n g s . L o g g e r U R L + " ? S u p p l e m e n t N a m e = " + S u p p l e m e n t N a m e + " & S e c t i o n N a m e = " + S e c t i o n N a m e + " & E v e n t I d = " + E v e n t I d + " & P u b l i c a t i o n I d = " + O b j S e t t i n g s . P u b l i c a t i o n I d + " & M a p p i n g T y p e = " + M a p p i n g T y p e + " & A d d i t i o n a l S t r i n g = " + O b j A d d i t i o n a l S t r i n g + " & p = " +   O b j P a g e I n f o . p + " & E d i t i o n N a m e = " +   E d i t i o n N a m e + " & I s O f f l i n e = " +   ( ( O b j S e t t i n g s . I s O f f l i n e V i e w ) ? 1 : 0 ) ;  
 }  
 f u n c t i o n   G e t E n g l i s h S u p p l e m e n t N a m e   ( S u p p l e m e n t N a m e )  
 {  
 	 t r y  
 	 {  
 	 	 f o r   ( v a r   i = 0 ; i < P M _ O B J _ S u p p l e m e n t s . l e n g t h ; i + + )  
 	 	 {  
 	 	 	 i f ( P M _ O B J _ S u p p l e m e n t s [ i ] . S u p p l e m e n t F o l d e r N a m e = = S u p p l e m e n t N a m e )   r e t u r n   P M _ O B J _ S u p p l e m e n t s [ i ] . E S u p p l e m e n t N a m e ;  
 	 	 }  
 	 	 r e t u r n   " " ;  
 	 }  
 	 c a t c h   ( e )   {   r e t u r n   " " ; }  
 	  
 }  
 f u n c t i o n   G e t S e c t i o n N a m e B y P a g e N u m b e r ( )  
 {  
 	 f o r ( v a r   y = 0 ; y < P M _ O B J _ S e c t i o n P a g e M a p p i n g s . l e n g t h ; y + + )  
 	 {  
 	 	 i f ( P M _ O B J _ S e c t i o n P a g e M a p p i n g s [ y ] . P a g e N u m b e r = = O b j P a g e I n f o . p )  
 	 	 {  
 	 	         f o r ( v a r   X = 0 ; X < P M _ O B J _ S e c t i o n s . l e n g t h ; X + + )  
 	 	         {  
 	 	 	         i f ( P M _ O B J _ S e c t i o n s [ X ] . S e c t i o n N a m e = = P M _ O B J _ S e c t i o n P a g e M a p p i n g s [ y ] . S e c t i o n N a m e )  
 	 	 	         {  
 	 	 	                 r e t u r n   P M _ O B J _ S e c t i o n s [ X ] . E S e c t i o n N a m e ;  
 	 	 	         }  
 	 	 	 }  
 	 	 }  
         }  
 	 r e t u r n   " " ;  
 }  
 P r e L o a d P a g e T h u m b s ( ) ;  
 I n s e r t A u d i t L o g ( - 1 , ' 4 4 0 0 3 ' ) ;  
  
 / *   F u n c t i o n s   C r e a t e d   f o r   N e w   C h a n g e   o f   E d i t i o n s   S t a r t s   H e r e   * /  
 f u n c t i o n   G e t E n g l i s h S u p p l e m e n t s ( )  
 {  
         v a r   O b j S u p p l e m e n t s = [ ] ;  
         v a r   R e t u r n S u p p l e m e n t s   =   [ ] ;  
         i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s   & &   O b j S e t t i n g s . H a s E d i t i o n s )  
         {  
                 f o r ( v a r   X = 0 ; X < P M _ O b j D a t a . O b j E d i t i o n s . l e n g t h ; X + + )  
                 {                 	  
                         i f ( P M _ O b j D a t a . O b j E d i t i o n s [ X ] . E d i t i o n F o l d e r N a m e = = O b j P a g e I n f o . e )  
                         {  
                                 O b j S u p p l e m e n t s   =   P M _ O b j D a t a . O b j E d i t i o n s [ X ] . O b j S u p p l e m e n t s ;  
                         }  
                 }  
         }  
         e l s e  
         {  
                 O b j S u p p l e m e n t s   =   P M _ O b j D a t a . O b j S u p p l e m e n t s ;  
         }  
         / * G e t   t h e s e   s u p p l e m e n t s   t o   c r o s s c h e c k   a l l   s u p p l e m e n t s   w i t h   P h y s i c a l l y   e x i s t i n g   s u p p l e m e n t s * /  
         v a r   S t r u c t u r e S u p p l e m e n t s   =   G e t S t r u c t u r e S u p p l e m e n t s A c c o r d i n g T o S e t t i n g V a l u e s ( ) ;  
         f o r ( v a r   Y = 0 ; Y < O b j S u p p l e m e n t s . l e n g t h ; Y + + )  
         {  
                 f o r ( v a r   K = 0 ; K < S t r u c t u r e S u p p l e m e n t s . l e n g t h ; K + + )  
                 {  
  
                         i f ( O b j S u p p l e m e n t s [ Y ] . S u p p l e m e n t F o l d e r N a m e = = S t r u c t u r e S u p p l e m e n t s [ K ] . S u p p l e m e n t N a m e )  
                         {  
                                 R e t u r n S u p p l e m e n t s [ R e t u r n S u p p l e m e n t s . l e n g t h ] = O b j S u p p l e m e n t s [ Y ] ;  
                         }  
                 }  
         }  
         r e t u r n   R e t u r n S u p p l e m e n t s ;  
 }  
  
 f u n c t i o n   I s E d i t i o n E x i s t s ( E d i t i o n N a m e )  
 {  
         i f ( O b j S e t t i n g s . H a s E d i t i o n s )  
         {  
                 f o r ( v a r   X = 0 ; X < P M _ S t r u c t u r e I n f o . l e n g t h ; X + + )  
                 {  
                         i f ( P M _ S t r u c t u r e I n f o [ X ] . E d i t i o n N a m e = = E d i t i o n N a m e )  
                         {  
                                 r e t u r n   t r u e ;  
                         }  
                 }  
                 r e t u r n   f a l s e ;  
         }          
 }  
  
 f u n c t i o n   G e t E d i t i o n I n d e x B y N a m e ( )  
 {  
         i f ( O b j S e t t i n g s . H a s E d i t i o n s )  
         {  
                 f o r ( v a r   X = 0 ; X < P M _ S t r u c t u r e I n f o . l e n g t h ; X + + )  
                 {        
                         i f ( P M _ S t r u c t u r e I n f o [ X ] . E d i t i o n N a m e = = O b j P a g e I n f o . e )  
                         {  
                                 r e t u r n   X ;  
                         }  
                 }  
         }  
         r e t u r n   - 1 ;          
 }  
  
 f u n c t i o n   G e t S u p p l e m e n t I n d e x B y N a m e ( )  
 {  
                 i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s )  
                 {  
                         v a r   O b j S u p p l e m e n t s   =   G e t S t r u c t u r e S u p p l e m e n t s A c c o r d i n g T o S e t t i n g V a l u e s ( ) ;  
                         f o r ( v a r   X = 0 ; X < O b j S u p p l e m e n t s . l e n g t h ; X + + )  
                         {  
                                 i f ( O b j S u p p l e m e n t s [ X ] . S u p p l e m e n t N a m e = = O b j P a g e I n f o . s )  
                                 {                                          
                                         r e t u r n   X ;  
                                 }  
                         }      
                 }    
                 r e t u r n   - 1 ;                  
 }  
  
 f u n c t i o n   G e t S t r u c t u r e S u p p l e m e n t s A c c o r d i n g T o S e t t i n g V a l u e s ( )  
 {  
         E d i t i o n I n d e x   =   G e t E d i t i o n I n d e x B y N a m e ( ) ;  
         i f ( ! O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                         r e t u r n   P M _ S t r u c t u r e I n f o . S u p p l e m e n t s ;  
         }  
         e l s e ( O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                         r e t u r n   P M _ S t r u c t u r e I n f o [ E d i t i o n I n d e x ] . S u p p l e m e n t s ;                  
         }          
 }  
  
 f u n c t i o n   G e t P a g e A r r a y A c c o r d i n g T o S e t t i n g V a l u e s ( )  
 {  
  
         E d i t i o n I n d e x   =   G e t E d i t i o n I n d e x B y N a m e ( ) ;  
         S u p p l e m e n t I n d e x   =   G e t S u p p l e m e n t I n d e x B y N a m e ( ) ;  
  
         i f ( ! O b j S e t t i n g s . H a s E d i t i o n s   & &   ! O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 r e t u r n   P M _ S t r u c t u r e I n f o ;  
         }  
         e l s e   i f ( ! O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 i f ( S u p p l e m e n t I n d e x < 0 )  
                 {  
                         r e t u r n   P M _ S t r u c t u r e I n f o . P a g e s ;  
                 }  
                 e l s e          
                 {  
                         r e t u r n   P M _ S t r u c t u r e I n f o . S u p p l e m e n t s [ S u p p l e m e n t I n d e x ] . P a g e s ;                  
                 }  
         }  
         e l s e   i f ( O b j S e t t i n g s . H a s E d i t i o n s   & &   ! O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                   r e t u r n   P M _ S t r u c t u r e I n f o [ E d i t i o n I n d e x ] . P a g e s ;                              
         }  
         e l s e   i f ( O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 i f ( S u p p l e m e n t I n d e x < 0 )  
                 {  
                         r e t u r n   P M _ S t r u c t u r e I n f o [ E d i t i o n I n d e x ] . P a g e s ;  
                 }  
                 e l s e          
                 {  
                         r e t u r n   P M _ S t r u c t u r e I n f o [ E d i t i o n I n d e x ] . S u p p l e m e n t s [ S u p p l e m e n t I n d e x ] . P a g e s ;                  
                 }                          
         }          
 }  
  
 f u n c t i o n   G e t M a x P a g e C o u n t ( O b j P a g e s )  
 {  
         v a r   M a x = 0 ;  
         f o r ( v a r   X = 0 ; X < O b j P a g e s . l e n g t h ; X + + )        
         {          
                 i f ( O b j P a g e s [ X ] > M a x )  
                 {  
                         M a x = O b j P a g e s [ X ] ;  
                 }  
         }  
         r e t u r n   M a x ;  
          
 }  
 f u n c t i o n   G e t H r e f V a l u e I f P a g e E x i s t s ( P a g e N u m b e r , O b j P a g e s )  
 {  
         f o r ( v a r   X = 0 ; X < O b j P a g e s . l e n g t h ; X + + )  
         {  
                 i f ( P a g e N u m b e r = = O b j P a g e s [ X ] )  
                 {  
                         i f ( P a g e N u m b e r = = 1 )  
                         {  
                                 r e t u r n   " i n d e x . h t m " ;  
                         }  
                         e l s e  
                         {  
                                 r e t u r n   " p a g e " + P a g e N u m b e r + " . h t m " ;  
                         }  
                 }  
         }  
         r e t u r n   " # " ;          
 }  
  
 f u n c t i o n   C r e a t e P a g e N a v i g a t i o n ( O b j P a g e s )  
 {  
         v a r   O u t p u t = " " ;  
                         / * I n   c a s e   o f   M a g a z i n e * /  
                         i f ( O b j S e t t i n g s . M a g a z i n e F i r s t P a g e   & &   O b j S e t t i n g s . M a g a z i n e F i r s t P a g e ! = " " )  
                         {  
                                 O u t p u t + = ' 	 	 	         < a   h r e f = " p a g e ' + O b j S e t t i n g s . M a g a z i n e F i r s t P a g e + ' . h t m "     c l a s s = " L i n k B o l d " > ' + O b j S e t t i n g s . M a g a z i n e F i r s t P a g e L i n k T e x t + ' < / a > & n b s p ; & n b s p ; ' ;  
                         }  
          
 	 	           v a r   T e m p F r o m   =   2 ;  
 	 	           v a r   T e m p T o   =   G e t M a x P a g e C o u n t ( O b j P a g e s ) ;  
 	 	           v a r   T o t a l P a g e C o u n t   =   T e m p T o ;  
                           P M _ O B J _ M a x C o u n t = T o t a l P a g e C o u n t ;  
 	                   i f ( O b j P a g e I n f o . p   > = 1 2 )  
 	                   {  
 	 	                 T e m p F r o m   =   O b j P a g e I n f o . p - 5 ;  
 	                   }  
 	                   e l s e  
 	                   { 	 	          
                                 v a r   T m p U R L   =   G e t H r e f V a l u e I f P a g e E x i s t s ( 1 , O b j P a g e s ) ;                                                        
 	 	                 i f ( O b j P a g e I n f o . p   = =   1 )  
 	 	                 { 	 	            
 	 	 	                 O u t p u t + = ' 	 	 	         < a   h r e f = " ' + T m p U R L + ' "     c l a s s = " P a g e C l a s s A c t i v e " > 1 < / a > & n b s p ; ' ;  
 	 	                 }  
 	 	                 e l s e  
 	 	                 {  
 	 	 	                 O u t p u t + = ' 	 	 	         < a   h r e f = " ' + T m p U R L + ' "     c l a s s = " P a g e C l a s s " > 1 < / a > & n b s p ; ' ;  
 	 	                 }  
 	                   } 	  
  
 	 	         i f ( T o t a l P a g e C o u n t   > =   T e m p F r o m + 1 0 )   T e m p T o   =   T e m p F r o m + 1 0 ;  
 	 	          
 	 	 	 f o r ( v a r   i = T e m p F r o m ;   i < = T e m p T o ;   i + + )  
 	 	 	 {  
 	 	 	         i f ( O b j P a g e I n f o . p   = =   i )  
 	 	 	         {  
 	 	 	                 O u t p u t + = ' 	 	 	 < a   h r e f = " ' + G e t H r e f V a l u e I f P a g e E x i s t s ( i , O b j P a g e s ) + ' "     c l a s s = " P a g e C l a s s A c t i v e " > ' + i + ' < / a > & n b s p ; ' ;  
 	 	 	         }  
 	 	 	         e l s e  
 	 	 	         {  
 	 	 	                 O u t p u t + = ' 	 	 	 < a   h r e f = " ' + G e t H r e f V a l u e I f P a g e E x i s t s ( i , O b j P a g e s ) + ' "     c l a s s = " P a g e C l a s s " > ' + i + ' < / a > & n b s p ; ' ;  
 	 	 	         }  
 	 	 	 }  
  
 	 	 	 i f   ( T o t a l P a g e C o u n t   > =   1 2 )  
 	 	 	 {  
 	 	 	         O u t p u t + = ' < s e l e c t   c l a s s = " P a g e N u m C l a s s "   o n c h a n g e = " l o c a t i o n . h r e f = t h i s . v a l u e " > ' ;  
 	 	 	         O u t p u t + = ' < o p t i o n   v a l u e = " i n d e x . h t m " > G o   T o < / o p t i o n > ' ;         	 	 	          
 	 	 	         O u t p u t + = ' < o p t i o n   v a l u e = " i n d e x . h t m " > 1 < / o p t i o n > ' ;         	 	 	          
 	 	 	         f o r   ( v a r   i = 2 ; i < = T o t a l P a g e C o u n t ; i + + )  
 	 	 	         {        
                                         O u t p u t + = ' < o p t i o n   v a l u e = " ' + G e t H r e f V a l u e I f P a g e E x i s t s ( i , O b j P a g e s ) + ' " > ' + i + ' < / o p t i o n > ' ;          
 	 	 	         }  
 	 	 	         O u t p u t + = ' < / s e l e c t > ' ;  
 	 	 	 }  
         r e t u r n   O u t p u t ;  
 }  
  
  
 f u n c t i o n   G e t D e f a u l t P a g e ( S e c t i o n N a m e , P a g e s )  
 {  
 	 v a r   T m p V a r = [ ] ;  
 	 f o r ( v a r   x = 0 ; x < P a g e s . l e n g t h ; x + + )        
 	 {  
 	 	 i f ( P a g e s [ x ] . S e c t i o n N a m e = = S e c t i o n N a m e ) 	 	  
 	 	 {  
 	 	 	 T m p V a r [ T m p V a r . l e n g t h ] = P a g e s [ x ] . P a g e N u m b e r ;  
 	 	 	 i f ( P a g e s [ x ] . I s D e f a u l t = = " t r u e " )  
 	 	 	 {  
 	 	 	 	 r e t u r n   P a g e s [ x ] . P a g e N u m b e r ;  
 	 	 	 }  
 	 	 }  
 	 	  
 	 }  
 	 i f ( T m p V a r . l e n g t h < = 0 )  
 	 {  
 	 	 r e t u r n   - 1 ;  
 	 }  
 	 e l s e  
 	 {  
 	 	 r e t u r n   T m p V a r [ 0 ] ;  
 	 }  
 }  
 f u n c t i o n   G e t M a i n P a g e O p t i o n ( )  
 {  
         v a r   P a g e s   =   [ ] ;  
         i f ( ! O b j S e t t i n g s . H a s E d i t i o n s )  
         {                  
                 P a g e s   =   P M _ S t r u c t u r e I n f o . P a g e s  
         }  
         e l s e  
         {  
                 f o r ( v a r   X = 0 ; X < P M _ S t r u c t u r e I n f o . l e n g t h ; X + + )  
                 {  
                         i f ( P M _ S t r u c t u r e I n f o [ X ] . E d i t i o n N a m e = = O b j P a g e I n f o . e )  
                         {  
                                 P a g e s   =   P M _ S t r u c t u r e I n f o [ X ] . P a g e s ;                          
                         }  
                 }  
         }  
  
         i f ( P a g e s . l e n g t h > 0 )  
         {  
                 i f ( O b j P a g e I n f o . s = = " " )  
                 {  
                         r e t u r n   ' < d i v   s t y l e = " f l o a t : l e f t ; "   c l a s s = " S u p p l e m e n t s C l a s s A c t i v e "   o n m o u s e o v e r = " C h a n g e T o H o v e r C l a s s ( t h i s ) ; "   o n m o u s e o u t = " C h a n g e T o N o r m a l C l a s s ( t h i s ) ; "   o n c l i c k = " B a c k T o M a i n ( ) ; " > ' + O b j S e t t i n g s . B a c k T o E d i t i o n L i n k T e x t + ' < / d i v > ' ;                          
                 }  
                 e l s e  
                 {  
                         r e t u r n   ' < d i v   s t y l e = " f l o a t : l e f t ; "   c l a s s = " S u p p l e m e n t s C S S C l a s s "   o n m o u s e o v e r = " C h a n g e T o H o v e r C l a s s ( t h i s ) ; "   o n m o u s e o u t = " C h a n g e T o N o r m a l C l a s s ( t h i s ) ; "   o n c l i c k = " B a c k T o M a i n ( ) ; " > ' + O b j S e t t i n g s . B a c k T o E d i t i o n L i n k T e x t + ' < / d i v > ' ;                          
                 }          
         }  
         r e t u r n   " " ;          
 }  
  
 f u n c t i o n   B a c k T o M a i n ( )  
 {          
         v a r   U R L = l o c a t i o n . h r e f . m a t c h ( / ^ ( . * ) \ / ( \ d { 1 , 2 } ) ( . { 3 } ) ( \ d { 4 } ) \ / ( . * ) $ / ) ;  
         v a r   R o o t U R L   =   U R L [ 1 ] + " / " + U R L [ 2 ] + U R L [ 3 ] + U R L [ 4 ] + " / " + O b j P a g e I n f o . z ;  
         i f ( O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 i f ( O b j P a g e I n f o . e ! = " " )  
                 {  
                         R o o t U R L   + =   " / "   +   O b j P a g e I n f o . e ;  
                 }  
         }    
         R o o t U R L   + = " / i n d e x . h t m " ;  
         l o c a t i o n . h r e f = R o o t U R L ;  
 }  
 f u n c t i o n   G e t A p p l i c a t i o n P a t h F o r I m a g e s ( )  
 {  
         v a r   a p p P a t h = " " ;  
         i f ( O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                  
                 i f ( O b j P a g e I n f o . s = = " " )  
                 {  
                         a p p P a t h   =   ' . . / . . / . . / ' ;  
                 }  
                 e l s e  
                 {  
                         a p p P a t h   =   ' . . / . . / . . / . . / ' ;                          
                 }  
         }  
         e l s e   i f ( ! O b j S e t t i n g s . H a s E d i t i o n s   & &   O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 i f ( O b j P a g e I n f o . s = = " " )  
                 {                  
                         a p p P a t h   =   ' . . / . . / ' ;  
                 }  
                 e l s e  
                 {  
                         a p p P a t h   =   ' . . / . . / . . / ' ;  
                 }  
         }  
         e l s e   i f ( O b j S e t t i n g s . H a s E d i t i o n s   & &   ! O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 i f ( O b j P a g e I n f o . e = = " " )  
                 {            
                         a p p P a t h   =   ' . . / . . / ' ;  
                 }  
                 e l s e  
                 {  
                         a p p P a t h   =   ' . . / . . / . . / ' ;                  
                 }  
         }    
         e l s e   i f ( ! O b j S e t t i n g s . H a s E d i t i o n s   & &   ! O b j S e t t i n g s . H a s S u p p l e m e n t s )  
         {  
                 a p p P a t h   =   ' . . / . . / ' ;  
         }            
         r e t u r n   a p p P a t h ;            
 }  
 f u n c t i o n   P r e L o a d P a g e T h u m b s ( )  
 {  
                 v a r   C u r r e n t S u p p l N a m e   =   " " ;  
                 i f   ( t y p e o f ( O b j P a g e I n f o . s ) ! = ' u n d e f i n e d ' ) 	   C u r r e n t S u p p l N a m e =   O b j P a g e I n f o . s ;  
 	 	 f o r ( v a r   i = 1 ;   i < = P M _ O B J _ M a x C o u n t ;   i + + )  
 	 	 { 	  
                                 v a r   U R L = l o c a t i o n . h r e f . m a t c h ( / ^ ( . * ) \ / ( \ d { 1 , 2 } ) ( . { 3 } ) ( \ d { 4 } ) \ / ( . * ) $ / ) ;  
                                 v a r   R o o t U R L   =   U R L [ 1 ] + " / " + U R L [ 2 ] + U R L [ 3 ] + U R L [ 4 ] ;  
                                 i f ( O b j P a g e I n f o . e ! = " " )    
                                 {  
                                         R o o t U R L + = " / P a g e T h u m b s / " + O b j P a g e I n f o . e ;  
                                 }  
                                 e l s e  
                                 {  
                                         R o o t U R L + = " / P a g e T h u m b s "                                                  
                                 }  
                                          
 	 	 	         i f ( O b j S e t t i n g s . H a s S u p p l e m e n t s   & &   C u r r e n t S u p p l N a m e ! = " " )  
 	 	 	         {  
                                         R o o t U R L + = " / " + C u r r e n t S u p p l N a m e ;  
 	 	 	         } 	 	 	         	 	 	 	 	          
 	 	                 O b j I m a g e   =   n e w   I m a g e ( ) ;  
 	 	                 i f ( i = = 1 )  
 	 	                 {  
 	 	                         O b j I m a g e . s r c = R o o t U R L + ' / i n d e x . j p g ' ; 	 	 	 	 	         	 	 	 	                  
 	 	                 }  
 	 	                 e l s e  
 	 	                 {  
 	 	                         O b j I m a g e . s r c = R o o t U R L + ' / p a g e ' + i + ' . j p g ' ; 	 	 	 	 	         	 	 	 	                 	 	 	 	                  
 	 	                 }  
 	 	 }  
 }  
 f u n c t i o n   O p e n J o b s P a g e ( C o u n t r y I d , J o b P o s t i n g I d )  
 {  
         O p e n P a g e ( O b j S e t t i n g s . J o b U R L + " ? J o b P o s t i n g I d = " + J o b P o s t i n g I d + " & C o u n t r y I d = " + C o u n t r y I d , 0 , f a l s e ) ;  
 }  
  
 f u n c t i o n   C r e a t e _ B o o k M a r k ( )  
 {  
         i f ( B r o w s e r T y p e = = " I E " )  
         {  
                 w i n d o w . e x t e r n a l . A d d F a v o r i t e ( l o c a t i o n . h r e f , " " ) ;  
         }  
         e l s e   i f ( B r o w s e r T y p e = = " F F " )  
         {  
             w i n d o w . s i d e b a r . a d d P a n e l ( " " , l o c a t i o n . h r e f , " " ) ;      
         }  
         e l s e   i f ( B r o w s e r T y p e = = " O p e r a "   | |   B r o w s e r T y p e = = " " )  
         {  
                 a l e r t ( " P r e s s   C T R L - D   ( N e t s c a p e )   o r   C T R L - T   ( O p e r a )   t o   b o o k m a r k " ) ;        
         }  
 }  
  
 d o c u m e n t . o n k e y u p   =   K e y C h e c k ;  
 f u n c t i o n   K e y C h e c k ( e )  
 {  
       v a r   K e y I D   =   ( w i n d o w . e v e n t )   ?   e v e n t . k e y C o d e   :   e . k e y C o d e ;  
       s w i t c h ( K e y I D )  
       {  
             c a s e   3 7 :  
                 P r e v P a g e ( ) ;  
             b r e a k ;  
             c a s e   3 9 :  
                 N e x t P a g e ( ) ;  
             b r e a k ;  
       }  
       / *  
             c a s e   1 6 :  
             " S h i f t "  
  
             c a s e   1 7 :  
             " C t r l "  
  
             c a s e   1 8 :  
             " A l t "  
  
             c a s e   1 9 :  
             " P a u s e "  
  
             c a s e   3 7 :  
             " A r r o w   L e f t "  
  
             c a s e   3 8 :  
             " A r r o w   U p "  
  
             c a s e   3 9 :  
             " A r r o w   R i g h t "  
  
             c a s e   4 0 :  
             " A r r o w   D o w n "        
       * /  
  
 }  
  
  
 / *   F u n c t i o n s   C r e a t e d   f o r   N e w   C h a n g e   o f   E d i t i o n s   E n d s   H e r e   * /  
 
