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