ÿþ 
 f u n c t i o n   e m a i l c h e c k ( s t r )    
 {  
 	 v a r   a t = " @ " ;  
 	 v a r   d o t = " . " ;  
 	 v a r   l a t = s t r . i n d e x O f ( a t ) ;  
 	 v a r   l s t r = s t r . l e n g t h ;  
 	 v a r   l d o t = s t r . i n d e x O f ( d o t ) ;  
 	 i f   ( s t r . i n d e x O f ( a t ) = = - 1 ) {  
 	       a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	       r e t u r n   f a l s e ;  
 	 }  
  
 	 i f   ( s t r . i n d e x O f ( a t ) = = - 1   | |   s t r . i n d e x O f ( a t ) = = 0   | |   s t r . i n d e x O f ( a t ) = = l s t r ) {  
 	       a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	       r e t u r n   f a l s e ;  
 	 }  
  
 	 i f   ( s t r . i n d e x O f ( d o t ) = = - 1   | |   s t r . i n d e x O f ( d o t ) = = 0   | |   s t r . i n d e x O f ( d o t ) = = l s t r ) {  
 	         a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	         r e t u r n   f a l s e ;  
 	 }  
  
 	   i f   ( s t r . i n d e x O f ( a t , ( l a t + 1 ) ) ! = - 1 ) {  
 	         a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	         r e t u r n   f a l s e ;  
 	   }  
  
 	   i f   ( s t r . s u b s t r i n g ( l a t - 1 , l a t ) = = d o t   | |   s t r . s u b s t r i n g ( l a t + 1 , l a t + 2 ) = = d o t ) {  
 	         a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	         r e t u r n   f a l s e ;  
 	   }  
  
 	   i f   ( s t r . i n d e x O f ( d o t , ( l a t + 2 ) ) = = - 1 ) {  
 	         a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	         r e t u r n   f a l s e ;  
 	   }  
 	  
 	   i f   ( s t r . i n d e x O f ( "   " ) ! = - 1 ) {  
 	         a l e r t ( " Ëa   c h É  e m a i l   k h ô n g   h ãp   l Ç. " ) ;  
 	         r e t u r n   f a l s e ;  
 	   }  
  
 	   r e t u r n   t r u e ; 	 	 	 	 	  
 }  
  
 f u n c t i o n   V a l i d a t e N e w s l e t t e r F o r m ( )  
 {  
         i f   ( ( d o c u m e n t . g e t E l e m e n t B y I d ( " t x t E m a i l " ) . v a l u e = = n u l l ) | | ( d o c u m e n t . g e t E l e m e n t B y I d ( " t x t E m a i l " ) . v a l u e = = " " ) ) {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   Ëa   c h É  e m a i l . " ) ;  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " t x t E m a i l " ) . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( e m a i l c h e c k ( d o c u m e n t . g e t E l e m e n t B y I d ( " t x t E m a i l " ) . v a l u e ) = = f a l s e ) {  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " t x t E m a i l " ) . v a l u e =   " " ;  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " t x t E m a i l " ) . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 r e t u r n   t r u e ;  
 }  
 
