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