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