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