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