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