ÿþ   
 f u n c t i o n   n u m c h a r ( s t r ,   x )  
 {  
   v a r   c o u n t ;  
   c o u n t = 0 ;  
       f o r ( i = 0 ;   i < = ( s t r . l e n g t h   - 1 ) ;   i + + )  
           {  
               i f   ( s t r . c h a r A t ( i ) = = x )  
               {  
                   c o u n t + + ;  
               }  
             }  
                 r e t u r n   c o u n t ;  
 }  
  
 f u n c t i o n   e m a i l O K ( )  
 {  
   	 i f   (   ( d o c u m e n t . l f o r m . e m a i l . v a l u e . l e n g t h < 5 )   | |   ( n u m c h a r ( d o c u m e n t . l f o r m . e m a i l . v a l u e , "   " )   > 0 )   | |   ( n u m c h a r ( d o c u m e n t . l f o r m . e m a i l . v a l u e ,   " @ " ) ! = 1 ) | | ( n u m c h a r ( d o c u m e n t . l f o r m . e m a i l . v a l u e ,   " . " ) = = 0 )   )  
       	 {  
           	 	 r e t u r n   t r u e ;       / / w r o n g   e m a i l   a d d r e s s  
     	 }   e l s e    
           	 {    
             	 	   r e t u r n   f a l s e ;  
             	 }  
 }  
    
  
    
  
 f u n c t i o n   e m a i l O K 1 ( )  
 {  
   	 i f   (   ( d o c u m e n t . r f o r m . e m a i l . v a l u e . l e n g t h < 5 )   | |   ( n u m c h a r ( d o c u m e n t . r f o r m . e m a i l . v a l u e , "   " )   > 0 )   | |   ( n u m c h a r ( d o c u m e n t . r f o r m . e m a i l . v a l u e ,   " @ " ) ! = 1 ) | | ( n u m c h a r ( d o c u m e n t . r f o r m . e m a i l . v a l u e ,   " . " ) = = 0 )   )  
       	 {  
           	 	 r e t u r n   t r u e ;       / / w r o n g   e m a i l   a d d r e s s  
     	 }   e l s e    
           	 {    
             	 	   r e t u r n   f a l s e ;  
             	 }  
   }  
        
            
    
  
  
    
  
        
 f u n c t i o n   s u b m i t _ f o r m ( )  
 {  
     m i s s i n g i n f o   =   " " ;  
  
     i f   ( e m a i l O K ( ) )  
     {  
 	  
 	   m i s s i n g i n f o   + =   " \ n       -     W r o n g   e m a i l   a d d r e s s .   P l e a s e   s p e c i f y   e m a i l " ;  
  
     }  
  
       i f ( d o c u m e n t . l f o r m . p a s s w o r d . v a l u e . l e n g t h < 5   )  
       {  
           m i s s i n g i n f o   + =   " \ n       -     L o g i n   P a s s w o r d   m u s t   b e   5   -   1 0 " ;  
          
       }  
  
  
        
 i f   ( m i s s i n g i n f o   ! =   " " )   {  
 m i s s i n g i n f o   = " _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ n "   +  
 " Y o u   f a i l e d   t o   c o r r e c t l y   f i l l   i n   y o u r : \ n "   +  
 m i s s i n g i n f o   +   " \ n _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "   +  
 " \ n P l e a s e   r e - e n t e r   a n d   s u b m i t   a g a i n ! " ;  
 a l e r t ( m i s s i n g i n f o ) ;  
 r e t u r n   f a l s e ;  
 }  
 e l s e  
 {  
   r e t u r n   t r u e ;  
 }    
        
        
 }    
  
  
  
  
 f u n c t i o n   s u b m i t _ f o r m 1 ( )  
 {  
     m i s s i n g i n f o   =   " " ;  
  
     i f   ( e m a i l O K 1 ( ) )  
     {  
 	  
 	   m i s s i n g i n f o   + =   " \ n       -     W r o n g   e m a i l   a d d r e s s .   P l e a s e   s p e c i f y   e m a i l " ;  
  
     }  
  
       i f (   d o c u m e n t . r f o r m . p a s s w o r d . v a l u e . l e n g t h < 5   )  
       {  
           m i s s i n g i n f o   + =   " \ n       -     L o g i n   P a s s w o r d   m u s t   b e   5   -   1 0 " ;  
          
       }  
  
          
    
       i f ( d o c u m e n t . r f o r m . p a s s w o r d . v a l u e . l e n g t h < 5   )  
       {  
           m i s s i n g i n f o   + =   " \ n       -     P a s s w o r d   m u s t   b e   5   -   1 0 " ;  
          
       }  
          
  
       i f ( d o c u m e n t . r f o r m . p a s s w o r d . v a l u e   ! =   r f o r m . p a s s w o r d 1 . v a l u e )  
         {  
           	 m i s s i n g i n f o   + =   " \ n       -     P a s s w o r d s   m u s t   b e   t h e   s a m e " ;  
          
           }    
        
 i f   ( m i s s i n g i n f o   ! =   " " )   {  
 m i s s i n g i n f o   = " _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ n "   +  
 " Y o u   f a i l e d   t o   c o r r e c t l y   f i l l   i n   y o u r : \ n "   +  
 m i s s i n g i n f o   +   " \ n _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "   +  
 " \ n P l e a s e   r e - e n t e r   a n d   s u b m i t   a g a i n ! " ;  
 a l e r t ( m i s s i n g i n f o ) ;  
 r e t u r n   f a l s e ;  
 }  
 e l s e  
 {  
   r e t u r n   t r u e ;  
 }    
        
        
 }    
  
 
