þÿ  
   < ! - -  
  
  
 f u n c t i o n   f o c u s ( )  
 {  
  
 d o c u m e n t . l o g i n . u s e r n a m e . f o c u s ( ) ;  
  
 }  
  
  
  
 f u n c t i o n   a u t o _ c o m p l ( )  
 {  
 v a r   u s e r n a m e   =   d o c u m e n t . l o g i n . u s e r n a m e . v a l u e ;  
  
   i f   ( u s e r n a m e . i n d e x O f ( ' @ ' )   = =   - 1 )  
 	 {  
 	 	 d o c u m e n t . l o g i n . u s e r n a m e . v a l u e   =   d o c u m e n t . l o g i n . u s e r n a m e . v a l u e   +   " @ v i v i s a n l o r e n z o . i t " ;  
 	 } ; d o c u m e n t . l o g i n . p a s s w o r d . s e l e c t ( ) ;  
 }  
  
  
  
     f u n c t i o n   a g g i u n g i ( )   {  
           / /   V a r i a b i l i   a s s o c i a t e   a i   c a m p i   d e l   m o d u l o  
           v a r   u s e r n a m e   =   d o c u m e n t . l o g i n . u s e r n a m e . v a l u e ;  
           v a r   p a s s w o r d   =   d o c u m e n t . l o g i n . p a s s w o r d . v a l u e ;  
           v a r   c o n f e r m a   =   d o c u m e n t . l o g i n . c o n f e r m a . v a l u e ;  
  
  
           / /   E s p r e s s i o n e   r e g o l a r e   d e l l ' e m a i l  
                   v a r   u s e r n a m e _ r e g _ e x p   =   / ^ ( [ a - z A - Z 0 - 9 _ \ . ] ) + \ @ ( ( [ v i v i s a n l o r e n z o ] { 2 , } ) + \ . ) + ( [ i t ] { 2 , } ) + $ / ;  
  
  
               	  
 	 i f   ( ! u s e r n a m e _ r e g _ e x p . t e s t ( u s e r n a m e )   | |   ( u s e r n a m e   = =   " " )   | |   ( u s e r n a m e   = =   " u n d e f i n e d " ) )   {  
                       a l e r t ( " U s e r n a m e   n o n   c o r r e t t o .   R i c o r d i a m o   c h e   n o n   s o n o   c o n s e n t i t i   c a r a t t e r i   s p e c i a l i   e   a c c e n t a t i ,   t r a t t i n i   o     s i m b o l i . " ) ;  
                       d o c u m e n t . l o g i n . u s e r n a m e . s e l e c t ( ) ;  
                       r e t u r n   f a l s e ;  
                 }  
 	  
  
   / / E f f e t t u a   i l   c o n t r o l l o   s u l   c a m p o   P a s s w o r d  
                 e l s e   i f   ( ( u s e r n a m e . l e n g t h < 3 )   | |   ( u s e r n a m e . l e n g t h > 4 0 ) )   {  
                       a l e r t ( " I l   c a m p o   U s e r n a m e   p u o '   c o n t e n e r e   M a x   2 2   c a r a t t e r i   e   M i n   3 . " ) ;  
                       d o c u m e n t . l o g i n . p a s s w o r d . s e l e c t ( ) ;  
                       r e t u r n   f a l s e ;  
                 }  
  
  
                 / / E f f e t t u a   i l   c o n t r o l l o   s u l   c a m p o   P a s s w o r d  
                 e l s e   i f   ( ( p a s s w o r d   = =   " " )   | |   ( p a s s w o r d   = =   " u n d e f i n e d " ) )   {  
                       a l e r t ( " I l   c a m p o   p a s s w o r d   è   o b b l i g a t o r i o . " ) ;  
                       d o c u m e n t . l o g i n . p a s s w o r d . s e l e c t ( ) ;  
                       r e t u r n   f a l s e ;  
                 }  
  
 	   / / E f f e t t u a   i l   c o n t r o l l o   d i   c o r r e t t e z z a   P a s s w o r d  
 	 i f   ( p a s s w o r d   ! =   c o n f e r m a )   {  
       	 a l e r t ( " L a   p a s s w o r d   c o n f e r m a t a   è   d i v e r s a   d a   q u e l l a   s c e l t a ,   c o n t r o l l a r e . " ) ;  
       	 d o c u m e n t . l o g i n . c o n f e r m a . v a l u e   =   " " ;  
       	 d o c u m e n t . l o g i n . c o n f e r m a . s e l e c t ( ) ;  
       	 r e t u r n   f a l s e ;  
 	 }  
  
  
 i f   ( u s e r n a m e . l e n g t h < 2   | |   u s e r n a m e . l e n g t h > 4 0 )   e r r o r e   =   2 ;  
 	  
  
  
  
  
  
  
  
  
               	  
 	                              
                 / / I N V I A   I L   M O D U L O  
                 e l s e   {  
                       d o c u m e n t . l o g i n . a c t i o n   =   " v e r i f i c a _ u s e r n a m e . a s p " ;  
                       d o c u m e n t . l o g i n . s u b m i t ( ) ;  
                 }  
     }  
    
  
 	  
 	  
  
  
  
  
  
 / / - - >
