ÿþ< ! - -   B e g i n  
 v a r   i s N N   =   ( n a v i g a t o r . a p p N a m e . i n d e x O f ( " N e t s c a p e " ) ! = - 1 ) ;  
  
 f u n c t i o n   a u t o T a b ( i n p u t K e y E n t e r , l e n ,   e ,   s e l )   {  
 v a r   s e l I t e m   =   s e l ;  
 v a r   k e y C o d e   =   ( i s N N )   ?   e . w h i c h   :   e . k e y C o d e ;    
 v a r   f i l t e r   =   ( i s N N )   ?   [ 0 , 8 , 9 ]   :   [ 0 , 8 , 9 , 1 6 , 1 7 , 1 8 , 3 7 , 3 8 , 3 9 , 4 0 , 4 6 ] ;  
 i f ( i n p u t K e y E n t e r . v a l u e . l e n g t h   > =   l e n   & &   ! c o n t a i n s E l e m e n t ( f i l t e r , k e y C o d e ) )   {  
 i n p u t K e y E n t e r . v a l u e   =   i n p u t K e y E n t e r . v a l u e . s l i c e ( 0 ,   l e n ) ;  
  
 t i p o F o c u s   =   i n p u t K e y E n t e r . f o r m [ ( g e t I n d e x E n t e r ( i n p u t K e y E n t e r ) + 1 )   %   i n p u t K e y E n t e r . f o r m . l e n g t h ] . t y p e ;  
   i f ( ( t i p o F o c u s   = =   ' t e x t ' )   | |   ( t i p o F o c u s   = =   ' t e x t a r e a ' )   | |   ( t i p o F o c u s   = =   ' s e l e c t - o n e ' )   | |   ( t i p o F o c u s   = =   ' c h e c k b o x ' )   | |   ( t i p o F o c u s   = =   ' b u t t o n ' ) )   {  
  
 t r y   {    
  
     i n p u t K e y E n t e r . f o r m [ ( g e t I n d e x E n t e r ( i n p u t K e y E n t e r ) + 1 )   %   i n p u t K e y E n t e r . f o r m . l e n g t h ] . f o c u s ( ) ;  
     i f ( s e l I t e m   = =   t r u e )   {  
     i n p u t K e y E n t e r . f o r m [ ( g e t I n d e x E n t e r ( i n p u t K e y E n t e r ) + 1 )   %   i n p u t K e y E n t e r . f o r m . l e n g t h ] . s e l e c t ( ) ;  
     }  
 r e t u r n   f a l s e ;   }   c a t c h ( e r r )   { }  
 } }  
 }  
  
  
 f u n c t i o n   e n t e r T a b ( i n p u t K e y E n t e r ,   e E n t e r ,   s e l )   {  
 v a r   k e y C o d e E n t e r   =   ( i s N N )   ?   e E n t e r . w h i c h   :   e E n t e r . k e y C o d e ;    
 v a r   s e l I t e m   =   s e l ;  
 i f ( k e y C o d e E n t e r   = =   1 3 )   {  
 t i p o F o c u s   =   i n p u t K e y E n t e r . f o r m [ ( g e t I n d e x E n t e r ( i n p u t K e y E n t e r ) + 1 )   %   i n p u t K e y E n t e r . f o r m . l e n g t h ] . t y p e ;  
   i f ( ( t i p o F o c u s   = =   ' t e x t ' )   | |   ( t i p o F o c u s   = =   ' t e x t a r e a ' )   | |   ( t i p o F o c u s   = =   ' s e l e c t - o n e ' )   | |   ( t i p o F o c u s   = =   ' c h e c k b o x ' )   | |   ( t i p o F o c u s   = =   ' b u t t o n ' ) )   {  
  
 t r y   {    
  
     i n p u t K e y E n t e r . f o r m [ ( g e t I n d e x E n t e r ( i n p u t K e y E n t e r ) + 1 )   %   i n p u t K e y E n t e r . f o r m . l e n g t h ] . f o c u s ( ) ;  
     i f ( s e l I t e m   = =   t r u e )   {  
     i n p u t K e y E n t e r . f o r m [ ( g e t I n d e x E n t e r ( i n p u t K e y E n t e r ) + 1 )   %   i n p u t K e y E n t e r . f o r m . l e n g t h ] . s e l e c t ( ) ;  
     }  
 r e t u r n   f a l s e ;   }   c a t c h ( e r r )   { }  
 } }  
 }  
  
  
  
 f u n c t i o n   c o n t a i n s E l e m e n t ( a r r ,   e l e )   {  
 v a r   f o u n d   =   f a l s e ,   i n d e x   =   0 ;  
 w h i l e ( ! f o u n d   & &   i n d e x   <   a r r . l e n g t h )  
 i f ( a r r [ i n d e x ]   = =   e l e )  
 f o u n d   =   t r u e ;  
 e l s e  
 i n d e x + + ;  
 r e t u r n   f o u n d ;  
 }  
  
 f u n c t i o n   g e t I n d e x E n t e r ( i n p u t K e y E n t e r )   {  
 v a r   i n d e x E n t e r   =   - 1 ,   i   =   0 ,   f o u n d   =   f a l s e ;  
 w h i l e   ( i   <   i n p u t K e y E n t e r . f o r m . l e n g t h   & &   i n d e x E n t e r   = =   - 1 )  
 i f   ( i n p u t K e y E n t e r . f o r m [ i ]   = =   i n p u t K e y E n t e r ) i n d e x E n t e r   =   i ;  
 e l s e   i + + ;  
 r e t u r n   i n d e x E n t e r ;  
 }  
  
  
 f u n c t i o n   c h e c k _ p r e s s ( A l f a N u m , O t h e r C o n d , a c a o )   {  
  
 v a r   c h e c k C h a r   =   f a l s e ;  
  
     i f   ( ( e v e n t . k e y C o d e   ! =   3 4 )   & &   ( e v e n t . k e y C o d e   ! =   3 9 ) )   {  
  
     O t h e r C o n d A r r a y   =   O t h e r C o n d . s p l i t ( " , " ) ;  
  
         i f   ( A l f a N u m   = =   0 )   {  
             i f   ( ( e v e n t . k e y C o d e   <   4 8 )   | |   ( e v e n t . k e y C o d e   >   5 7 ) )   {  
 	 c h e c k C h a r   =   f a l s e ;  
             }   e l s e   {  
 	 c h e c k C h a r   =   t r u e ;  
             }  
  
             f o r   ( x   i n   O t h e r C o n d A r r a y )   {  
 	 i f   ( e v e n t . k e y C o d e   = =   p a r s e I n t ( O t h e r C o n d A r r a y [ x ] ) )   {  
 	     i f   ( a c a o   = =   0 )   {  
 	         c h e c k C h a r   =   f a l s e ;  
 	     }   e l s e   {  
 	         c h e c k C h a r   =   t r u e ;  
 	     }  
 	 }  
             }  
         }  
  
         i f   ( A l f a N u m   = =   1 )   {  
             i f   ( ( ( e v e n t . k e y C o d e   > =   4 8 )   & &   ( e v e n t . k e y C o d e   < =   5 7 ) )   | |   ( ( e v e n t . k e y C o d e   > =   6 5 )   & &   ( e v e n t . k e y C o d e   < =   9 0 ) )     | |   ( ( e v e n t . k e y C o d e   > =   9 7 )   & &   ( e v e n t . k e y C o d e   < =   1 2 2 ) ) )   {  
 	 c h e c k C h a r   =   t r u e ;  
             }   e l s e   {  
 	 c h e c k C h a r   =   f a l s e ;  
             }  
  
             f o r   ( x   i n   O t h e r C o n d A r r a y )   {  
 	 i f   ( e v e n t . k e y C o d e   = =   p a r s e I n t ( O t h e r C o n d A r r a y [ x ] ) )   {  
 	     i f   ( a c a o   = =   0 )   {  
 	         c h e c k C h a r   =   f a l s e ;  
 	     }   e l s e   {  
 	         c h e c k C h a r   =   t r u e ;  
 	     }  
 	 }  
             }  
         }  
  
         i f   ( A l f a N u m   = =   2 )   {  
             c h e c k C h a r   =   t r u e ;  
             f o r   ( x   i n   O t h e r C o n d A r r a y )   {  
 	 i f   ( e v e n t . k e y C o d e   = =   p a r s e I n t ( O t h e r C o n d A r r a y [ x ] ) )   {  
 	     i f   ( a c a o   = =   0 )   {  
 	         c h e c k C h a r   =   f a l s e ;  
 	     }   e l s e   {  
 	         c h e c k C h a r   =   t r u e ;  
 	     }  
 	 }  
             }  
         }  
  
     }  
  
     i f   ( c h e c k C h a r   = =   f a l s e )   {  
         e v e n t . r e t u r n V a l u e   =   f a l s e ;  
     }  
 }  
  
  
 f u n c t i o n   c h e c k _ t e x t ( I t N a m e )   {  
 v a r   t h e W o r d   =   ' ' ;  
 o u t 1   =   ' " ' ;    
 o u t 2   =   " ' " ;  
 a d d   =   " " ;  
  
 i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
 t e m p   =   " "   +   I t N a m e . v a l u e ;  
  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 }  
  
 w h i l e   ( t e m p . i n d e x O f ( o u t 2 ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 2 ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 2 . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 }  
  
 t h e W o r d s T e x t   =   ' [   ' + o u t 1 + '   ]     [   ' + o u t 2 + '   ] '  
 I t N a m e . v a l u e   =   t e m p ;  
 	 i f   ( t h e W o r d   ! =   ' ' )  
 	 {  
 	 a l e r t ( ' E s t e   c a m p o   n ã o   a c e i t a   o   s e g u i n t e s   c a r a c t e r e s :   \ n ' +   t h e W o r d s T e x t   + '   ! ' )  
 	 }  
 }  
 }  
  
  
  
  
 f u n c t i o n   c h e c k _ t e x t _ p u r ( I t N a m e )   {  
 v a r   t h e W o r d   =   ' ' ;  
  
 i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
 t e m p   =   " "   +   I t N a m e . v a l u e ;  
  
 v a r   o u t 1   =   n e w   A r r a y ( ' à ' , ' á ' , ' ã ' , ' â ' , ' ä ' , ' å ' )  
 a d d 1   =   " a " ;  
  
 v a r   o u t 2   =   n e w   A r r a y ( ' À ' , ' Á ' , ' Ã ' , ' Â ' , ' Ä ' , ' ú' )  
 a d d 2   =   " A " ;  
  
 v a r   o u t 3   =   n e w   A r r a y ( ' è ' , ' é ' , ' ê ' , ' ë ' )  
 a d d 3   =   " e " ;  
  
 v a r   o u t 4   =   n e w   A r r a y ( ' È ' , ' É ' , ' Ê ' , ' Ë ' )  
 a d d 4   =   " E " ;  
  
 v a r   o u t 5   =   n e w   A r r a y ( ' ì ' , ' í ' , ' î ' , ' ï ' )  
 a d d 5   =   " i " ;  
  
 v a r   o u t 6   =   n e w   A r r a y ( ' Ì ' , ' Í ' , ' Î ' , ' Ï ' )  
 a d d 6   =   " I " ;  
  
 v a r   o u t 7   =   n e w   A r r a y ( ' ò ' , ' ó ' , ' ô ' , ' õ ' , ' ö ' )  
 a d d 7   =   " o " ;  
  
 v a r   o u t 8   =   n e w   A r r a y ( ' Ò ' , ' Ó ' , ' Ô ' , ' Õ ' , ' Ö ' )  
 a d d 8   =   " O " ;  
  
 v a r   o u t 9   =   n e w   A r r a y ( ' ù ' , ' ú ' , ' û ' , ' ü ' )  
 a d d 9   =   " u " ;  
  
 v a r   o u t 1 0   =   n e w   A r r a y ( ' Ù ' , ' Ú ' , ' Û ' , ' Ü ' )  
 a d d 1 0   =   " U " ;  
  
 v a r   o u t 1 1   =   n e w   A r r a y ( ' ç ' )  
 a d d 1 1   =   " c " ;  
  
 v a r   o u t 1 2   =   n e w   A r r a y ( ' Ç ' )  
 a d d 1 2   =   " C " ;  
  
 v a r   o u t 1 3   =   n e w   A r r a y ( ' ñ ' )  
 a d d 1 3   =   " n " ;  
  
 v a r   o u t 1 4   =   n e w   A r r a y ( ' Ñ ' )  
 a d d 1 4   =   " N " ;  
  
 v a r   o u t 1 5   =   n e w   A r r a y ( ' ~ ' , ' ^ ' , " ' " , ' ´ ' , ' ` ' , ' : ' , ' ; ' , ' " ' )  
 a d d 1 5   =   " " ;  
  
 f o r   ( x   i n   o u t 1 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 2 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 2 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 2 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 2   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 2 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
  
 f o r   ( x   i n   o u t 3 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 3 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 3 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 3   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 3 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 4 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 4 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 4 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 4   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 4 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 5 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 5 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 5 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 5   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 5 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 6 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 6 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 6 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 6   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 6 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 7 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 7 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 7 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 7   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 7 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 8 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 8 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 8 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 8   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 8 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 9 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 9 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 9 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 9   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 9 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 1 0 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 0 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 0 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1 0   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 0 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 1 1 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 1 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 1 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1 1   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 1 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 1 2 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 2 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 2 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1 2   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 2 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 1 3 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 3 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 3 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1 3   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 3 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 1 4 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 4 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 4 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1 4   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 4 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 f o r   ( x   i n   o u t 1 5 )   {  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 5 [ x ] ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 5 [ x ] ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d 1 5   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 5 [ x ] . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 t h e W o r d   =   ' o k ' ;  
 } }  
  
 I t N a m e . v a l u e   =   t e m p ;  
 	 i f   ( t h e W o r d   ! =   ' ' )   {  
 	 a l e r t ( ' E s t e   c a m p o   n ã o   a c e i t a   a c e n t u a ç õ e s   ! ' )  
 	 }  
 }  
 }  
  
  
  
 f u n c t i o n   c h e c k _ n u m b e r ( I t N a m e )   {  
  
 o u t   =   " . " ;    
 o u t 1   =   " - " ;  
 o u t 2   =   "   " ;  
 a d d   =   " " ;  
  
 i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
 t e m p   =   " "   +   I t N a m e . v a l u e ;  
  
 w h i l e   ( t e m p . i n d e x O f ( o u t ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 }  
  
 w h i l e   ( t e m p . i n d e x O f ( o u t 1 ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 1 ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 1 . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 }  
  
 w h i l e   ( t e m p . i n d e x O f ( o u t 2 ) > - 1 )   {  
 p o s =   t e m p . i n d e x O f ( o u t 2 ) ;  
 t e m p   =   " "   +   ( t e m p . s u b s t r i n g ( 0 ,   p o s )   +   a d d   +    
 t e m p . s u b s t r i n g ( ( p o s   +   o u t 2 . l e n g t h ) ,   t e m p . l e n g t h ) ) ;  
 }  
  
 I t N a m e . v a l u e   =   t e m p ;  
  
 	 i f   ( i s N a N ( I t N a m e . v a l u e )   = =   t r u e )   {  
 	 a l e r t ( ' E s t e   c a m p o   a c e i t a   a p e n a s   N u m e r o s   I n t e i r o s ! ' ) ; 	  
 	 I t N a m e . v a l u e   =   ' ' ;  
 	 I t N a m e . f o c u s ( ) ;  
 	 I t N a m e . s e l e c t ( ) ;  
 	 }  
 }  
 }  
  
  
 f u n c t i o n   c h e c k _ n u m b e r S i m p l e s ( I t N a m e )   {  
  
 i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
 t e m p   =   " "   +   I t N a m e . v a l u e ;  
 n u m   =   t e m p . t o S t r i n g ( ) . r e p l a c e ( / \ , | \ , / g , ' ' ) ;  
  
 	 i f   ( i s N a N ( n u m )   = =   t r u e )   {  
 	 a l e r t ( ' E s t e   c a m p o   a c e i t a   a p e n a s   n u m e r o ! ' ) ; 	  
 	 I t N a m e . v a l u e   =   ' ' ;  
 	 I t N a m e . f o c u s ( ) ;  
 	 I t N a m e . s e l e c t ( ) ;  
 	 t e m p   =   ' ' ;  
 	 }  
 	 n u m   =   t e m p . t o S t r i n g ( ) . r e p l a c e ( / \ . | \ . / g , ' , ' ) ;  
 	 I t N a m e . v a l u e   =   n u m ;  
 }  
 }  
  
  
  
 f u n c t i o n   c h e c k _ n u m b e r M o e d a ( I t N a m e , n )   {  
  
 i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
 t e m p   =   " "   +   I t N a m e . v a l u e ;  
 n u m   =   t e m p . t o S t r i n g ( ) . r e p l a c e ( / \ . | \ . / g , ' ' ) ;  
 n u m   =   n u m . t o S t r i n g ( ) . r e p l a c e ( / \ , | \ , / g , ' . ' ) ;  
  
 	 i f   ( i s N a N ( n u m )   = =   t r u e )   {  
 	 a l e r t ( ' E s t e   c a m p o   a c e i t a   a p e n a s   F o r m a t o   M o e d a ! ' ) ; 	  
 	 I t N a m e . v a l u e   =   ' ' ;  
 	 I t N a m e . f o c u s ( ) ;  
 	 I t N a m e . s e l e c t ( ) ;  
 	 }   e l s e   {  
 	     i f ( n )   {  
 	     n u m F o r m a t   =   p a r s e F l o a t ( n u m ) . t o F i x e d ( n ) ;  
 	     }   e l s e   {    
 	     n u m F o r m a t   =   p a r s e F l o a t ( n u m ) ;  
 	     }  
 	 I t N a m e . v a l u e   =   n u m F o r m a t . t o S t r i n g ( ) . r e p l a c e ( / \ . | \ . / g , ' , ' ) ;  
 	 }  
 }  
 }  
  
  
  
 f u n c t i o n   c h e c k _ c e p ( o b j e t o ,   k e y p r e s s )   {  
  
 c a m p o   =   e v a l ( o b j e t o ) ;  
  
   i f   ( c a m p o ! = ' ' )   {  
 	 c a r a c t e r e s   =   ' 0 1 2 3 4 5 6 7 8 9 0 - ' ;  
 	 s e p a r a c o e s   =   1 ;  
 	 s e p a r a c a o 1   =   ' - ' ;  
 	 c o n j u n t o s   =   2 ;  
 	 c o n j u n t o 1   =   5 ;  
 	 c o n j u n t o 2   =   3 ;  
  
     i f   ( ( c a r a c t e r e s . s e a r c h ( S t r i n g . f r o m C h a r C o d e   ( k e y p r e s s ) ) ! = - 1 )   & &   c a m p o . v a l u e . l e n g t h   <   ( c o n j u n t o 1   +   c o n j u n t o 2   +   1 ) )   {  
         i f   ( c a m p o . v a l u e . l e n g t h   = =   c o n j u n t o 1 )   {  
 	 c a m p o . v a l u e   =   c a m p o . v a l u e   +   s e p a r a c a o 1 ;  
         }  
     }   e l s e   {  
         e v e n t . r e t u r n V a l u e   =   f a l s e ;  
     }  
   }  
 }  
  
  
  
  
 f u n c t i o n   c h e c k _ e m a i l ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " @ " )   = =   - 1   | |   I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 ) )   {  
 	 	 a l e r t ( ' E s t e   é   u m   e - m a i l   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
  
 f u n c t i o n   c h e c k _ u r l ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 )   {  
 	 	 a l e r t ( ' E s t e   é   u m   e n d e r e ç o   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
  
 f u n c t i o n   c h e c k _ u r l _ d o m ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " w w w " )   = =   0   | |   I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 ) )   {  
 	 	 a l e r t ( ' E s t e   é   u m   e n d e r e ç o   i n v á l i d o \ n N ã o   u t i l i z e   w w w ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
 f u n c t i o n   c h e c k _ u r l _ s u b ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " w w w " )   = =   - 1   | |   I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 ) )   {  
 	 	 a l e r t ( ' E s t e   é   u m   e n d e r e ç o   i n v á l i d o \ n U t i l i z e   w w w ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
  
 f u n c t i o n   c h e c k _ i p ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 )   | |   ( I t N a m e . v a l u e . l e n g t h   <   7 )   | |   ( I t N a m e . v a l u e . l e n g t h   >   1 5 ) )   {  
 	 	 a l e r t ( ' E s t e   é   u m   I P   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
  
 f u n c t i o n   c h e c k _ m a s c ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 )   | |   ( I t N a m e . v a l u e . l e n g t h   <   7 )   | |   ( I t N a m e . v a l u e . l e n g t h   >   1 5 ) )   {  
 	 	 a l e r t ( ' E s t e   é   u m   M á s c a r a   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
  
 f u n c t i o n   c h e c k _ g a t ( I t N a m e )   {  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 )   | |   ( I t N a m e . v a l u e . l e n g t h   <   7 )   | |   ( I t N a m e . v a l u e . l e n g t h   >   1 5 ) )   {  
 	 	 a l e r t ( ' E s t e   é   u m   G a t e w a y   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
  
 f u n c t i o n   c h e c k _ c n p j ( I t N a m e )   {  
  
     i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
   s t r i n g   =   I t N a m e . v a l u e   | |   ' ' ;  
     s t r i n g   =   s t r i n g   +   " " ;  
     s t r i n g   =   s t r i n g . t o U p p e r C a s e ( ) ;  
     c h a r s   =   ' 0 1 2 3 4 5 6 7 8 9 . - / ' ;  
     o u t       =   ' ' ;  
  
     f o r   ( i = 0 ;   i < s t r i n g . l e n g t h ;   i + + )   {  
         s c h a r   =   s t r i n g . c h a r A t ( i ) ;  
         i f   ( c h a r s . i n d e x O f ( s c h a r )   ! =   - 1 )   {   o u t   + =   s c h a r ;   }  
     }  
          
     I t N a m e . v a l u e   =   o u t ;  
  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( ( I t N a m e . v a l u e . l e n g t h   ! =   1 8   & &   I t N a m e . v a l u e . l e n g t h   ! =   1 9 )   | |   I t N a m e . v a l u e . s e a r c h ( " / " )   = =   - 1   | |   I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1   | |   I t N a m e . v a l u e . s e a r c h ( " - " )   = =   - 1 ) )   {  
 	 	 a l e r t ( ' F a v o r   p r e e n c h a   c o r r e t a m e n t e   o   C N P J . \ n   e x .       0 0 . 0 0 0 . 0 0 0 / 0 0 0 0 - 0 0   \ n   o u   \ n   e x .   0 0 0 . 0 0 0 . 0 0 0 / 0 0 0 0 - 0 0 ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
           	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
  
  
       i f ( ! i s C P F C N P J ( I t N a m e . v a l u e , 2 ) )   {  
             a l e r t ( " P o r   f a v o r   i n f o r m e   u m   C N P J   v á l i d o " ) ;  
             I t N a m e . v a l u e   =   ' ' ;  
             I t N a m e . 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 ;  
     }  
 }  
  
 f u n c t i o n   c h e c k _ c p f ( I t N a m e )   {  
  
     i f ( I t N a m e . v a l u e   ! =   ' ' )   {  
     s t r i n g   =   I t N a m e . v a l u e   | |   ' ' ;  
     s t r i n g   =   s t r i n g   +   " " ;  
     s t r i n g   =   s t r i n g . t o U p p e r C a s e ( ) ;  
     c h a r s   =   ' 0 1 2 3 4 5 6 7 8 9 . - ' ;  
     o u t       =   ' ' ;  
  
     f o r   ( i = 0 ;   i < s t r i n g . l e n g t h ;   i + + )   {  
         s c h a r   =   s t r i n g . c h a r A t ( i ) ;  
         i f   ( c h a r s . i n d e x O f ( s c h a r )   ! =   - 1 )   {   o u t   + =   s c h a r ;   }  
     }  
  
     I t N a m e . v a l u e   =   o u t ;  
  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( ( I t N a m e . v a l u e . l e n g t h   ! =   1 4   | |   I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1   | |   I t N a m e . v a l u e . s e a r c h ( " - " )   = =   - 1 ) )   {  
 	 	 a l e r t ( ' F a v o r   p r e e n c h a   c o r r e t a m e n t e   o   C P F . \ n   e x .   0 0 0 . 0 0 0 . 0 0 0 - 0 0 ' ) ; 	 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
           	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
  
  
       i f ( ! i s C P F C N P J ( I t N a m e . v a l u e , 1 ) )   {  
             a l e r t ( " P o r   f a v o r   i n f o r m e   u m   C P F   v á l i d o " ) ;  
             I t N a m e . v a l u e   =   ' ' ;  
             I t N a m e . 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 ;  
     }  
 }  
  
  
 f u n c t i o n   c h e c k _ i e ( I t N a m e )   {  
  
     s t r i n g   =   I t N a m e . v a l u e   | |   ' ' ;  
     s t r i n g   =   s t r i n g   +   " " ;  
     s t r i n g   =   s t r i n g . t o U p p e r C a s e ( ) ;  
     c h a r s   =   ' 0 1 2 3 4 5 6 7 8 9 . I S E N T O ' ;  
     o u t       =   ' ' ;  
  
     f o r   ( i = 0 ;   i < s t r i n g . l e n g t h ;   i + + )   {  
         s c h a r   =   s t r i n g . c h a r A t ( i ) ;  
         i f   ( c h a r s . i n d e x O f ( s c h a r )   ! =   - 1 )   {   o u t   + =   s c h a r ;   }  
     }  
          
     I t N a m e . v a l u e   =   o u t ;  
  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
  
 	 	 i f   ( ( I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 )   & &   ( I t N a m e . v a l u e   ! =   ' I S E N T O ' ) )   	 {  
 	 	 a l e r t ( ' E s t e   é   u m   I . E .   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
 f u n c t i o n   c h e c k _ r g ( I t N a m e )   {  
  
     s t r i n g   =   I t N a m e . v a l u e   | |   ' ' ;  
     s t r i n g   =   s t r i n g   +   " " ;  
     s t r i n g   =   s t r i n g . t o U p p e r C a s e ( ) ;  
     c h a r s   =   ' 0 1 2 3 4 5 6 7 8 9 . - ' ;  
     o u t       =   ' ' ;  
  
     f o r   ( i = 0 ;   i < s t r i n g . l e n g t h ;   i + + )   {  
         s c h a r   =   s t r i n g . c h a r A t ( i ) ;  
         i f   ( c h a r s . i n d e x O f ( s c h a r )   ! =   - 1 )   {   o u t   + =   s c h a r ;   }  
     }  
          
     I t N a m e . v a l u e   =   o u t ;  
  
 	 i f   ( I t N a m e . v a l u e   ! =   ' ' )   {  
 	 	 i f   ( I t N a m e . v a l u e . s e a r c h ( " [ . * ] " )   = =   - 1 )   {  
 	 	 a l e r t ( ' E s t e   é   u m   R G   i n v á l i d o ' ) ; 	  
 	 	 I t N a m e . v a l u e   =   ' ' ;  
 	 	 I t N a m e . f o c u s ( ) ;  
 	 	 I t N a m e . s e l e c t ( ) ;  
 	 	 }  
 	 }  
 }  
  
 f u n c t i o n   c h e c k _ n c m ( I t N a m e )   {  
  
     v a r   s t r S e p e r a t o r P   =   ' . ' ;  
  
     s t r i n g   =   I t N a m e . v a l u e   | |   ' ' ;  
     s t r i n g   =   s t r i n g   +   " " ;  
     s t r i n g   =   s t r i n g . t o U p p e r C a s e ( ) ;  
     c h a r s   =   ' 0 1 2 3 4 5 6 7 8 9 . ' ;  
     o u t       =   ' ' ;  
  
     f o r   ( i = 0 ;   i < s t r i n g . l e n g t h ;   i + + )   {  
         s c h a r   =   s t r i n g . c h a r A t ( i ) ;  
         i f   ( c h a r s . i n d e x O f ( s c h a r )   ! =   - 1 )   {   o u t   + =   s c h a r ;   }  
       I t N a m e . v a l u e   =   o u t ;  
     }  
  
 i f   ( s t r i n g . l e n g t h   = =   4 )   {  
 	 I t N a m e . v a l u e   =   o u t + s t r S e p e r a t o r P ;  
 }  
  
 i f   ( s t r i n g . l e n g t h   = =   7 )   {  
 	 I t N a m e . v a l u e   =   o u t + s t r S e p e r a t o r P ;  
 }  
 }  
  
 / /     E n d   - - > 
