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