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