ÿþ	  
  
  
 	 f u n c t i o n   I s C h e c k A l l ( o b j   , M s g   ,   T y e p )  
 	 {  
 	 	 i f ( T y e p   = =   " 0 " )  
 	 	 {  
 	 	 	 r e t u r n   I s E m p t y ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 1 " )  
 	 	 {  
 	 	 	 r e t u r n   I s A B C ( o b j   , M s g ) ;  
 	 	 } 	  
 	 	 i f ( T y e p   = =   " 2 " )  
 	 	 {  
 	 	 	 r e t u r n   I s C h i n a ( o b j   , M s g ) ;  
 	 	 }    
 	 	 i f ( T y e p   = =   " 3 " )  
 	 	 {  
 	 	 	 r e t u r n   i s I n t ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 4 " )  
 	 	 {  
 	 	 	 r e t u r n   I s D e c i m a l ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 5 " )  
 	 	 {  
 	 	 	 r e t u r n   I s E M a i l ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 6 " )  
 	 	 {  
 	 	 	 r e t u r n   I s D a t e C h i n a ( o b j   , M s g ) ;  
 	 	 } 	  
 	 	 i f ( T y e p   = =   " 7 " )  
 	 	 {  
 	 	 	 r e t u r n   I s D a t e T w ( o b j   , M s g ) ;  
 	 	 } 	 	 	 	 	 	  
 	 	 i f ( T y e p   = =   " 8 " )  
 	 	 {  
 	 	 	 r e t u r n   C h e c k I m a g e ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 9 " )  
 	 	 {  
 	 	 	 r e t u r n   C h e c k M u s i c ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 1 0 " )  
 	 	 {  
 	 	         / / a l e r t ( 1 0 ) ;  
 	 	 	 r e t u r n   C h e c k M o v i e ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 1 1 " )  
 	 	 {  
 	 	 	 r e t u r n   C h e c k T x t ( o b j   , M s g ) ;  
 	 	 }  
 	 	 i f ( T y e p   = =   " 1 2 " )  
 	 	 {  
 	 	 	 r e t u r n   C h e c k M o v i e F l v ( o b j   , M s g ) ;  
 	 	 } 	  
 	 	 i f ( T y e p   = =   " 1 3 " )  
 	 	 {  
 	 	 	 r e t u r n   C h e c k M u s i c M P 3 ( o b j   , M s g ) ;  
 	 	 } 	 	 	  
 	 	 i f ( T y e p   = =   " 1 4 " )  
 	 	 {  
 	 	 	 r e t u r n   C h e c k I m a g e J P G ( o b j   , M s g ) ;  
 	 	 } 	  
 	 	 i f ( T y e p = = " 1 5 " )  
 	 	 {  
 	 	     r e t u r n   C h e c k I m g ( o b j , M s g ) ;  
 	 	 } 	 	  
 	 	 r e t u r n   t r u e   ;  
 	 }  
 	 	  
 	 	 f u n c t i o n   S t r i n g L e n ( s t r )  
 	 	 { 	  
 	 	 	 v a r   R c   =   0    
 	 	 	 i f ( s t r   = =   " " )  
 	 	 	 {  
 	 	 	 	 r e t u r n   0   ;  
 	 	 	 }  
 	 	 	 v a r   r e g   =   / ^ [ \ u 4 E 0 0 - \ u 9 F A 5 ] * $ / ;  
 	 	 	 v a r   i   =   0   ;  
 	 	 	 ;    
 	 	 	 f o r ( i   =   0   ;   i   <   s t r . l e n g t h   ;   i + + )  
 	 	 	 {  
 	 	 	 	 i f ( r e g . t e s t ( s t r . s u b s t r i n g ( i , i + 1 ) ) )  
 	 	 	 	 {  
 	 	 	 	 	 R c   + =   1   ;  
 	 	 	 	 }  
 	 	 	 	 R c   + =   1   ;  
 	 	 	 }  
 	 	 	 r e t u r n   	 R c 	  
 	 	 } 	  
  
 	 	  
 	  
 	  
 	  
 	 	 f u n c t i o n   T r i m ( s t r )  
 	 	 {  
 	 	 	 v a r   s t r 0   =   " "   ;  
 	 	 	 s t r 0   =   S t r i n g ( s t r ) ;  
 	 	 	 v a r   r e g = / ^ \ s * / ; 	 	  
 	 	 	 v a r   s t r 1   =   " "   ;  
 	 	 	 s t r 1   =   s t r 0 . r e p l a c e ( r e g , " " ) ;  
 	 	 	 r e g = / \ s * $ / ; 	 	 	  
 	 	 	 v a r   s t r 2   =   " "  
 	 	 	 s t r 2   =   s t r 1 . r e p l a c e ( r e g , " " ) ;  
 	 	 	 r e t u r n   s t r 2 ;  
 	 	 }  
  
 	 	  
 	 	 f u n c t i o n   I s C h e c k ( o b j , M s g , r e g )  
 	 	 {  
 	 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 	 s t r   =   T r i m ( s t r ) ;  
 	 	 	 i f ( s t r   = =   " " )  
 	 	 	 {  
 	 	 	 	 r e t u r n   t r u e ;  
 	 	 	 }  
 	 	 	 i f ( ! r e g . t e s t ( s t r ) )  
 	 	 	 {  
 	 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 	 d o c u m e n t . a l l ( o b j ) . 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   I s A B C ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ [ a - z A - Z ] + $ / ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g )  
 	 	 }  
 	 	 	  
 	 	 f u n c t i o n   I s C h i n a ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ [ \ u 4 E 0 0 - \ u 9 F A 5 ] * $ / ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g )  
 	 	 }  
 	 	  
 	 	  
 	 	 f u n c t i o n   i s I n t ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ ( - | \ + ) ? \ d + $ / ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g )  
 	 	 }      
 	  
 	 	  
 	 	 f u n c t i o n   i s U I n t ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ \ d + $ / ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g )  
 	 	 	  
 	 	 }  
  
 	 	  
 	 	 f u n c t i o n   I s D e c i m a l ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ ( - | \ + ) ? \ d + ( \ . \ d + ) ? $ /   ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g ) 	 	  
 	 	 	  
 	 	 }  
 	 	 	  
 	 	 f u n c t i o n   I s U D e c i m a l ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ \ d + ( \ . \ d + ) ? $ /   ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g ) 	 	  
 	 	 	  
 	 	 } 	 	  
 	  
 	 	 f u n c t i o n   I s E M a i l ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g =   / ^ [ a - z A - Z 0 - 9 _ . - ] + @ [ a - z A - Z 0 - 9 _ - ] + ( \ . [ a - z A - Z 0 - 9 _ - ] + ) + $ / ;  
 	 	 	 / / v a r   r e g   =   / ^ ( [ a - z A - Z 0 - 9 _ . - ] ) + @ ( ( [ a - z A - Z 0 - 9 - ] ) + . ) + ( [ a - z A - Z 0 - 9 ] { 2 , 4 } ) + $ / ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g ) 	  
 	 	 }  
 	  
 	 	 f u n c t i o n   I s D a t e C h i n a ( o b j , M s g )  
 	 	 {  
 	 	 	 / / v a r   r e g   =   / ^ ( 1 9 | 2 0 ) \ d \ d \ / ( [ 1 - 9 ] | 0 [ 1 - 9 ] | 1 [ 0 1 2 ] ) \ / ( [ 1 - 9 ] | 0 [ 1 - 9 ] | [ 1 2 ] [ 0 - 9 ] | 3 [ 0 1 ] ) $ / ;  
 	 	 	 / / r e t u r n   I s C h e c k ( o b j , M s g , r e g ) 	  
 	 	 	 v a r   d a t e   =   d o c u m e n t . a l l ( o b j ) . v a l u e ;  
 	 	 	 v a r   r e g   =   / ^ ( \ d { 4 } ) ( [ \ / , - ] ) ( \ d { 1 , 2 } ) \ 2 ( \ d { 1 , 2 } ) $ / ;    
                         v a r   r   =   d a t e . m a t c h ( r e g ) ;    
                         i f ( r = = n u l l )    
                         {  
                                 a l e r t ( M s g ) ;  
                                 d o c u m e n t . a l l ( o b j ) . f o c u s ( ) ;  
                                 r e t u r n   f a l s e ;  
                         }        
                         v a r   d =   n e w   D a t e ( r [ 1 ] ,   r [ 3 ] - 1 , r [ 4 ] ) ;    
                         v a r   n e w S t r = d . g e t F u l l Y e a r ( ) + r [ 2 ] + ( d . g e t M o n t h ( ) + 1 ) + r [ 2 ] + d . g e t D a t e ( ) ;    
                         d a t e = r [ 1 ] + r [ 2 ] + ( ( r [ 3 ] - 1 ) + 1 ) + r [ 2 ] + ( ( r [ 4 ] - 1 ) + 1 ) ;    
                         i f ( n e w S t r ! = d a t e )  
                         {  
                                 a l e r t ( M s g ) ;  
                                 d o c u m e n t . a l l ( o b j ) . 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   I s D a t e T w ( o b j , M s g )  
 	 	 {  
 	 	 	 v a r   r e g   =   / ^ ( \ d \ d \ d ) \ / ( [ 1 - 9 ] | 0 [ 1 - 9 ] | 1 [ 0 1 2 ] ) \ / ( [ 1 - 9 ] | 0 [ 1 - 9 ] | [ 1 2 ] [ 0 - 9 ] | 3 [ 0 1 ] ) $ / ;  
 	 	 	 r e t u r n   I s C h e c k ( o b j , M s g , r e g ) 	  
 	 	 }  
 	  
 	 / / j p g 0G I F  0J P E G 0P N G  
 	 f u n c t i o n   C h e c k I m a g e ( o b j , M s g )  
 	 {  
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f ( T e m p F i l e ! = " g i f "   & &   T e m p F i l e ! = " j p g "   & &   T e m p F i l e ! = " j p e g "   & &   T e m p F i l e ! = " p n g "   & &   T e m p F i l e ! = " G I F "   & &   T e m p F i l e ! = " J P G "   & &   T e m p F i l e ! = " J P E G "   & &   T e m p F i l e ! = " P N G " )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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 ;  
 	 	 }  
 	 }  
 	 / / j p g 0G I F  0J P E G 0P N G  
 	 f u n c t i o n   C h e c k I m a g e J P G ( o b j , M s g )  
 	 {  
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f (   T e m p F i l e ! = " j p g "   & &   T e m p F i l e ! = " j p e g "     & &   T e m p F i l e ! = " J P G "   & &   T e m p F i l e ! = " J P E G " )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   C h e c k I m g ( o b j , M s g )  
 	 {  
 	     	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f (   T e m p F i l e ! = " j p g "   & &   T e m p F i l e ! = " g i g "     & &   T e m p F i l e ! = " p n g "   & &   T e m p F i l e ! = " b m p " )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   C h e c k M u s i c ( o b j , M s g )  
 	 {  
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	         a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f ( T e m p F i l e ! = " m p 3 "   & &   T e m p F i l e ! = " M P 3 "   & &   T e m p F i l e ! = " w m a "   & &   T e m p F i l e ! = " W M A "   )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   C h e c k M u s i c M P 3 ( o b j , M s g )  
 	 {  
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	         a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f ( T e m p F i l e ! = " m p 3 "   & &   T e m p F i l e ! = " M P 3 " ) 	 	  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   C h e c k M o v i e ( o b j , M s g )  
 	 {  
 	        
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	    
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	         a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	  
 	 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f ( T e m p F i l e ! = " s w f "   & &   T e m p F i l e ! = " S W F "   & &   T e m p F i l e ! = " w m v "   & &   T e m p F i l e ! = " W M V "   )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   C h e c k M o v i e F l v ( o b j , M s g )  
 	 {  
 	        
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	  
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	         a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	  
 	 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	  
 	 	 i f ( T e m p F i l e ! = " f l v "   & &   T e m p F i l e ! = " F L V " )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   C h e c k T x t ( o b j , M s g )  
 	 {  
 	        
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 v a r   L e n g t h   =   s t r . l e n g t h ;  
 	 	  
 	 	 v a r   T e m p   =   s t r . l a s t I n d e x O f ( " . " ) ;  
 	 	    
 	 	 i f ( T e m p   = =   - 1 )  
 	 	 {  
 	 	         a l e r t ( M s g ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 } 	  
 	 	 	  
 	 	 v a r   T e m p F i l e   =   s t r . s u b s t r i n g ( T e m p + 1 , L e n g t h ) ;  
 	 	 i f ( T e m p F i l e ! = " t x t "   & &   T e m p F i l e ! = " T X T "   )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 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   I s E m p t y ( o b j , M s g )  
 	 {  
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 s t r   =   T r i m ( s t r ) ;  
 	 	 i f ( s t r   = =   " " )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 d o c u m e n t . a l l ( o b j ) . 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   I s T W I D ( o b j , M s g )  
 	 {  
 	 	 v a r   s t r   =   d o c u m e n t . a l l ( o b j ) . v a l u e   ;  
 	 	 s t r   =   T r i m ( s t r ) ;  
 	 	 s t r   =   s t r . t o U p p e r C a s e ( ) ;  
 	 	  
 	 	  
 	 	 i f ( s t r   = =   " " )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 d o c u m e n t . a l l ( o b j ) . f o c u s ( ) ;  
         	 	 r e t u r n   f a l s e   ; 	  
 	 	 }  
 	 	  
 	 	 i f   ( s t r . l e n g t h   ! =   1 0 )  
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 d o c u m e n t . a l l ( o b j ) . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e   ; 	  
 	 	 }  
 	 	  
 	 	  
                     p a r t 1   =   s t r ;  
                     / / a l e r t ( p a r t 1 ) ;  
                     i f   ( ! ( p a r t 1 > = " A "   & &   p a r t 1 < = " Z " ) )  
                     {  
 	                 a l e r t ( M s g ) ;  
 	                 d o c u m e n t . a l l ( o b j ) . f o c u s ( ) ;  
 	                 r e t u r n   f a l s e ;  
                     }  
      
  
 	 	  
 	 	  
 	 	 v a r   p o s 2   =   s t r . c h a r A t ( 1 ) ;  
 	 	 i f (   p o s 2   ! = " 1 "   & &     p o s 2   ! = " 2 " )    
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 d o c u m e n t . a l l ( o b j ) . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e   ; 	  
 	 	 }  
  
 	 	  
               f o r ( i = 1 ; i < 1 0 ; i + + )  
               {  
                     i f ( i s N a N ( p a r s e F l o a t ( s t r . c h a r A t ( i ) ) ) )  
                     {    
             	           a l e r t ( M s g ) ;  
             	           d o c u m e n t . a l l ( o b j ) . f o c u s ( ) ;  
 	                   r e t u r n   f a l s e ;    
                   }  
               }    
 	 	  
 	 	  
 	 	 v a r   a l p h   =   n e w   A r r a y ( " A " , " B " , " C " , " D " , " E " , " F " , " G " , " H " , " J " , " K " , " L " , " M " , " N " , " P " , " Q " , " R " , " S " , " T " , " U " , " V " , " X " , " Y " , " W " , " Z " , " I " , " O " ) ;  
 	 	 v a r   n u m     =   n e w   A r r a y ( " 1 0 " , " 1 1 " , " 1 2 " , " 1 3 " , " 1 4 " , " 1 5 " , " 1 6 " , " 1 7 " , " 1 8 " , " 1 9 " , " 2 0 " , " 2 1 " , " 2 2 " , " 2 3 " , " 2 4 " , " 2 5 " , " 2 6 " , " 2 7 " , " 2 8 " , " 2 9 " , " 3 0 " , " 3 1 " , " 3 2 " , " 3 3 " , " 3 4 " , " 3 5 " ) ;  
 	 	 v a r   n = 0 ;  
 	 	 v a r   i ;  
 	 	 f o r ( i = 0 ; i < a l p h . l e n g t h ; i + + )  
 	 	 {  
 	 	 	 i f ( s t r . c h a r A t ( 0 ) = = a l p h [ i ] )  
 	 	 	 n = i ;  
 	 	 }  
 	 	 v a r   t o t 1   =   p a r s e F l o a t ( n u m [ n ] . c h a r A t ( 0 ) )   +   ( p a r s e F l o a t ( n u m [ n ] . c h a r A t ( 1 ) )   *   9 ) ;  
 	 	 v a r   t o t 2   =   0 ;  
 	 	        
 	 	 f o r ( i = 1 ; i < s t r . l e n g t h - 1 ; i + + )  
 	 	 	 	 t o t 2   =   t o t 2   +   p a r s e F l o a t ( s t r . c h a r A t ( i ) ) * ( 9 - i ) ;  
 	 	 v a r   t o t 3   =   p a r s e F l o a t ( s t r . c h a r A t ( 9 ) ) ;  
 	 	 v a r   t o t 4   =   t o t 1   +   t o t 2   +   t o t 3 ;  
 	 	 i f ( ( t o t 4   %   1 0 ) ! = 0 )    
 	 	 {  
 	 	 	 a l e r t ( M s g ) ;  
 	 	 	 d o c u m e n t . a l l ( o b j ) . 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   f n s m a l l T o d a y D a t e 1 ( s t r , s t r t y p e )  
 	 	 {  
 	 	 	  
 	 	 	 v a r   t o d a y   =   n e w   D a t e ( ) ;  
 	 	 	 v a r   n o w _ Y e a r   =   t o d a y . g e t F u l l Y e a r ( ) ;  
 	 	 	 v a r   n o w _ M o n t h   =   t o d a y . g e t M o n t h ( ) + 1 ;  
 	 	 	 v a r   n o w _ D a t e   =   t o d a y . g e t D a t e ( ) ;  
 	 	 	 i f ( n o w _ M o n t h   <   1 0 )  
 	 	 	 {  
 	 	 	 	 n o w _ M o n t h   =   " 0 "   +   n o w _ M o n t h   ;  
 	 	 	 }  
 	 	 	 i f ( n o w _ D a t e   <   1 0 )  
 	 	 	 {  
 	 	 	 	 n o w _ D a t e   =   " 0 "   +   n o w _ D a t e   ;  
 	 	 	 } 	 	 	  
 	 	 	 v a r   i n t N o w Y Y M M D D   =   n o w _ Y e a r + " / " + n o w _ M o n t h + " / " + n o w _ D a t e   ;  
 	 	 	  
 	 	 	 / / v a r   D T N o w d a t e   =   n e w   D a t e ( i n t N o w Y Y M M D D ) ;  
 	 	 	 / / a l e r t (   f n s m a l l T o d a y D a t e 2 ( s t r , i n t N o w Y Y M M D D , s t r t y p e ) ) ;  
 	 	 	 v a r   R C   =   f n s m a l l T o d a y D a t e 2 ( s t r , i n t N o w Y Y M M D D , s t r t y p e ) ;  
 	 	 	 r e t u r n   R C   ;  
 	 	 }  
  
 	 	  
 	 	 f u n c t i o n   f n s m a l l T o d a y D a t e 2 ( s t r 1 , s t r 2 , s t r t y p e )  
 	 	 {  
 	 	 	 	  
 	 	 	 v a r   s t r 1 _ D a t e   ;  
 	 	 	 v a r   s t r 2 _ D a t e   ;  
 	 	 	 v a r   R C   =   " "   ;  
 	 	 	 i f ( s t r 1   ! =   " "   & &   s t r 2   ! =   " "   )  
 	 	 	 {  
 	 	 	 	 v a r   s t r 1 _ Y Y M M D D   =   f n S u b s t r i n g ( s t r 1 , s t r t y p e )     ;  
 	 	 	 	 s t r 1 _ D a t e   =   n e w   D a t e ( s t r 1 _ Y Y M M D D ) ;  
 	 	 	 	 v a r   s t r 2 _ Y Y M M D D   =   f n S u b s t r i n g ( s t r 2 , s t r t y p e )      
 	 	 	 	 s t r 2 _ D a t e   =   n e w   D a t e ( s t r 2 _ Y Y M M D D ) ;  
 	 	 	 	 R C   =     D a t e . p a r s e ( s t r 1 _ D a t e )   -   D a t e . p a r s e ( s t r 2 _ D a t e )   < =   0 ;  
 	 	 	 }  
 	 	 	  
 	 	 	 r e t u r n   R C   ;  
 	 	 }  
 	 	  
 	 	 f u n c t i o n   f n S u b s t r i n g ( s t r , s t r t y p e )  
 	 	 {  
 	 	 	 i f ( s t r   = =   " "   )  
 	 	 	 {  
 	 	 	 	 r e t u r n   " "   ;  
 	 	 	 }  
 	 	 	 v a r   i   =   3   ;  
 	 	 	 v a r   R C   =   s t r   ;  
 	 	 	  
 	 	 	 i f ( s t r t y p e   = =   " 2 " )  
 	 	 	 {  
 	 	 	 	 / / R C   =   P a r s e I n t ( s t r . s u b s t r i n g ( 1 , i ) )   +   1 9 1 1   + " / " +   s t r . s u b s t r i n g ( i + 1 , i + 3 )   + " / " + s t r . s u b s t r i n g ( i + 4 , i + 6 ) ;  
 	 	 	 	 R C   =   e v a l ( s t r . s u b s t r i n g ( 1 , i ) )   +   1 9 1 1   + " / " +   s t r . s u b s t r i n g ( i + 1 , i + 3 )   + " / " + s t r . s u b s t r i n g ( i + 4 , i + 6 ) ;  
 	 	 	 }    
 	 	 	 i f ( s t r t y p e   = =   " 1 " )  
 	 	 	 {  
 	 	 	 	 i   + =   1   ;  
 	 	 	 	 / / a l e r t ( s t r )   ;  
 	 	 	 	 v a r   r e g   =   / [ / | - ] / g ;  
 	 	 	 	 R C   =   s t r . r e p l a c e ( r e g , " / " ) ;  
 	 	 	 	 / / R C   =   s t r . s u b s t r i n g ( 0 , 3 )   + " / " +   s t r . s u b s t r i n g ( 4 , 2 )   + " / " + s t r . s u b s t r i n g ( i + 3 , 2 ) ;  
 	 	 	 }  
 	 	 	  
 	 	 	 r e t u r n     R C ;  
 	 	 }  
 	 	  
 	 	 f u n c t i o n   F o r m a t D a t e ( s t r D a t e )  
 	 	 {  
 	 	 	 i f ( s t r D a t e . l e n g t h = = 0 )   r e t u r n   s t r D a t e ;  
 	 	 	 v a r   i L e n = s t r D a t e . i n d e x O f ( "   " ) ;  
 	 	 	 i f ( i L e n > 0 )  
 	 	 	 	 s t r D a t e = s t r D a t e . s u b s t r ( 0 , i L e n ) ;  
 	 	 	 s t r D a t e = s t r D a t e . r e p l a c e ( " - " , " / " )  
 	 	 	  
 	 	 	 v a r   d t D a t e = n e w   D a t e ( s t r D a t e ) ;  
 	 	 	 v a r   i T e m p = d t D a t e . g e t Y e a r ( ) ;  
 	 	 	 i f ( i T e m p < 1 0 0 )  
 	 	 	 	 s t r D a t e = " 1 9 " + i T e m p ;  
 	 	 	 e l s e  
 	 	 	 	 s t r D a t e = i T e m p ;  
 	 	 	 v a r   i T e m p = d t D a t e . g e t M o n t h ( ) + 1 ; 	  
 	 	 	 i f ( i T e m p < 1 0 )  
 	 	 	 	 s t r D a t e + = " - 0 " + i T e m p . t o S t r i n g ( ) ;  
 	 	 	 e l s e  
 	 	 	 	 s t r D a t e + = " - " + i T e m p . t o S t r i n g ( ) ;  
 	 	 	  
 	 	 	 v a r   i T e m p = d t D a t e . g e t D a t e ( ) ;  
 	 	 	 i f ( i T e m p < 1 0 )  
 	 	 	 	 s t r D a t e + = " - 0 " + i T e m p . t o S t r i n g ( ) ;  
 	 	 	 e l s e  
 	 	 	 	 s t r D a t e + = " - " + i T e m p . t o S t r i n g ( ) ;  
 	 	 	 r e t u r n   s t r D a t e ;  
 	 	 	  
 	 	 }  
 	  
 	 	 f u n c t i o n   c h k R a d i o ( t h i s O b j , s t r T e x t , d e f I n d e x )  
 	 	 {  
 	 	 	 i f ( t h i s O b j ! = n u l l   & &   t h i s O b j ! = u n d e f i n e d )    
 	 	 	 {  
 	 	 	 	 i f ( t h i s O b j . l e n g t h > 0 )  
 	 	 	 	 {  
 	 	 	 	 	 f o r ( m y C h k I n d e x 1 = 0 ; m y C h k I n d e x 1 < t h i s O b j . l e n g t h ; m y C h k I n d e x 1 + + )  
 	 	 	 	 	 {  
 	 	 	 	 	 	 i f ( t h i s O b j [ m y C h k I n d e x 1 ] . c h e c k e d )    
 	 	 	 	 	 	 {  
 	 	 	 	 	 	 	 i f ( d e f I n d e x = = n u l l   | |   d e f I n d e x = = u n d e f i n e d )   r e t u r n   t r u e ;  
 	 	 	 	 	 	 	 i f ( m y C h k I n d e x 1 ! = d e f I n d e x )   r e t u r n   t r u e ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 	 e l s e  
 	 	 	 	 {  
 	 	 	 	 	 i f ( t h i s O b j . c h e c k e d )    
 	 	 	 	 	 	 r e t u r n   t r u e ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 a l e r t ( s t r T e x t ) ;  
 	 	 	 i f ( t h i s O b j . l e n g t h > 0 )   t h i s O b j [ 0 ] . f o c u s ( ) ;  
 	 	 	 e l s e   t h i s O b j . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	  
 	 	 f u n c t i o n   c h k S e l e c t ( t h i s O b j , s t r T e x t , d e f I n d e x )  
 	 	 {  
 	 	 	 i f ( t h i s O b j ! = n u l l   & &   t h i s O b j ! = u n d e f i n e d )    
 	 	 	 {  
 	 	 	 	 f o r ( m y C h k I n d e x 2 = 0 ; m y C h k I n d e x 2 < t h i s O b j . o p t i o n s . l e n g t h ; m y C h k I n d e x 2 + + )  
 	 	 	 	 {  
 	 	 	 	 	 i f ( t h i s O b j . o p t i o n s [ m y C h k I n d e x 2 ] . s e l e c t e d )  
 	 	 	 	 	 {  
 	 	 	 	 	 	 i f ( d e f I n d e x = = n u l l   | |   d e f I n d e x = = u n d e f i n e d )   r e t u r n   t r u e ;  
 	 	 	 	 	 	 	 i f ( m y C h k I n d e x 2 ! = d e f I n d e x )   r e t u r n   t r u e ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 a l e r t ( s t r T e x t ) ;  
 	 	 	 t h i s O b j . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 	  
 	 	 f u n c t i o n   g e t E x p ( f i l e N a m e )  
 	 	 {  
 	 	         i f ( f i l e N a m e   ! =   " " )  
 	 	         {  
 	 	                 v a r   i t e m   =   f i l e N a m e . l a s t I n d e x O f ( " . " ) ;  
 	 	                 v a r   e x p   =   f i l e N a m e . s u b s t r i n g ( i t e m + 1 , f i l e N a m e . l e n g t h ) ;  
 	 	                 r e t u r n   e x p ;  
 	 	         }  
 	 	         r e t u r n   " " ;  
 	 	 }  
 	 	 f u n c t i o n   D r a w I m a g e ( I m g D , w i d t h _ s , h e i g h t _ s )  
                 {  
                         v a r   i m a g e = n e w   I m a g e ( ) ;  
                         i m a g e . s r c = I m g D . s r c ;  
                         i f ( i m a g e . w i d t h > 0   & &   i m a g e . h e i g h t > 0 )  
                         {  
                                 f l a g = t r u e ;  
                                 i f ( i m a g e . w i d t h / i m a g e . h e i g h t > = w i d t h _ s / h e i g h t _ s )  
                                 {  
                                         i f ( i m a g e . w i d t h > w i d t h _ s )  
                                         {  
                                                 I m g D . w i d t h = w i d t h _ s ;  
                                                 I m g D . h e i g h t = ( i m a g e . h e i g h t * w i d t h _ s ) / i m a g e . w i d t h ;  
                                         }  
                                         e l s e  
                                         {  
                                                 I m g D . w i d t h = i m a g e . w i d t h ;  
                                                 I m g D . h e i g h t = i m a g e . h e i g h t ;  
                                 }  
                         }  
                       e l s e {  
                                     i f ( i m a g e . h e i g h t > h e i g h t _ s )  
                                       {  
                                             I m g D . h e i g h t = h e i g h t _ s ;  
                                             I m g D . w i d t h = ( i m a g e . w i d t h * h e i g h t _ s ) / i m a g e . h e i g h t ;  
                                       }  
                                       e l s e  
                                       {  
                                             I m g D . w i d t h = i m a g e . w i d t h ;  
                                             I m g D . h e i g h t = i m a g e . h e i g h t ;  
                                       }  
                             }  
                         }  
                 }  
 
