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