ÿþ/ / d i s p l a y   m e n u   t w o   m o d e  
 v a r   M e n u H a n d l e r   =   f u n c t i o n ( )   {  
 	 t h i s . m e n u   =   d o c u m e n t . g e t E l e m e n t B y I d ( " T w o M o d e M e n u " ) ;  
 	 t h i s . T r a i n i n g M e n u   =   d o c u m e n t . g e t E l e m e n t B y I d ( " L i s t e n C h e c k " ) ;  
 	 t h i s . I n f o r M e n u   =   d o c u m e n t . g e t E l e m e n t B y I d ( " L i s t e n S c r i p t " ) ;  
 	 t h i s . I s D i s p l a y   =   f a l s e ;  
 	 t h i s . t i m e I D   =   n u l l ;  
 	 t h i s . C l o s e T i m e   =   5 0 0 ;    
 	 t h i s . e f f e c t 1   =   n u l l ;  
 	 t h i s . e f f e c t 2   =   n u l l ;  
 } ;  
  
 M e n u H a n d l e r . p r o t o t y p e . c l e a r T i m e O u t   =   f u n c t i o n ( )   {  
 	 i f ( t h i s . t i m e I D   ! =   n u l l )   {  
 	 	 c l e a r T i m e o u t ( t h i s . t i m e I D ) ;  
 	 }  
 } ;  
  
 f u n c t i o n   S y n c H e i g h t ( )   {  
 	 i f   ( m e n u H a n d l e r   & &   m e n u H a n d l e r . m e n u )   {  
 	 	 m e n u H a n d l e r . m e n u . s t y l e . h e i g h t   =   5 1 ;  
 	 }  
 }  
  
 M e n u H a n d l e r . p r o t o t y p e . d i s p l a y   =   f u n c t i o n   ( i t e m ,   e ,   u r l )   {  
         i f   ( t h i s . m e n u )   {  
                 t h i s . c l e a r T i m e O u t ( ) ;  
  
                 v a r   l i n k   =   i t e m . h r e f ;  
                 i f   ( u r l   ! =   n u l l )   {  
                         l i n k   =   u r l ;  
                 }  
  
                 i f   ( t h i s . T r a i n i n g M e n u )   {  
                         t h i s . T r a i n i n g M e n u . h r e f   =   l i n k . r e p l a c e ( ' / L i s t e n - w i t h - S c r i p t s / ' ,   ' / L i s t e n - a n d - C h e c k / ' ) ;  
                 }  
  
                 i f   ( t h i s . I n f o r M e n u )   {  
                         t h i s . I n f o r M e n u . h r e f   =   l i n k . r e p l a c e ( ' / L i s t e n - a n d - C h e c k / ' ,   ' / L i s t e n - w i t h - S c r i p t s / ' ) ;  
                 }  
                 / / d e b u g g e r  
                 v a r   P o s   =   P o s U t i l . g e t P o s i t i o n ( e ) ;  
                 t h i s . m e n u . s t y l e . l e f t   =   P o s . X   -   6 0 ;  
                 t h i s . m e n u . s t y l e . t o p   =   P o s . Y   +   3 ;  
  
                 i f   ( t h i s . e f f e c t 2 )   {  
                         t h i s . e f f e c t 2 . c a n c e l ( ) ;  
                 }  
  
                 i f   ( t h i s . e f f e c t 1 )   {  
                         t h i s . e f f e c t 1 . c a n c e l ( ) ;  
                 }  
                 t h i s . e f f e c t 1   =   n e w   E f f e c t . S l i d e D o w n ( t h i s . m e n u . i d ,   {   d u r a t i o n :   0 . 3 ,   a f t e r F i n i s h :   S y n c H e i g h t   } ) ;  
         }  
 } ;  
  
 M e n u H a n d l e r . p r o t o t y p e . m o v e   =   f u n c t i o n ( i t e m , e )   {  
 	 i f   ( t h i s . m e n u )   {  
 	 	 v a r   P o s   =   P o s U t i l . g e t P o s i t i o n ( e ) ;  
 	 	 t h i s . m e n u . s t y l e . l e f t   =   P o s . X   -   6 0 ;  
 	 	 t h i s . m e n u . s t y l e . t o p   =   P o s . Y   +   3 ;  
 	 }  
 } ;  
  
 M e n u H a n d l e r . p r o t o t y p e . S l i d e U p   =   f u n c t i o n ( )   {  
 	 i f   ( t h i s . m e n u )   {  
 	 	 t h i s . m e n u . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 t h i s . e f f e c t 2   =   n e w   E f f e c t . S l i d e U p ( t h i s . m e n u . i d , {   d u r a t i o n :   0 . 1   } ) ;  
 	 	 t h i s . t i m e I D   =   n u l l ;  
 	 }  
 } ;  
 	  
 M e n u H a n d l e r . p r o t o t y p e . h i d e   =   f u n c t i o n ( i t e m )   {  
 	 t h i s . t i m e I D   =   s e t T i m e o u t ( " m e n u H a n d l e r . S l i d e U p ( ) " , t h i s . C l o s e T i m e ) ;  
 } ;  
  
 M e n u H a n d l e r . p r o t o t y p e . i n i t   =   f u n c t i o n ( )   {  
 	 i f   ( t h i s . m e n u )   {  
 	 	 t h i s . m e n u . o n m o u s e o v e r   =   f u n c t i o n ( )   {   m e n u H a n d l e r . c l e a r T i m e O u t ( ) } ;  
 	 	 t h i s . m e n u . o n m o u s e m o v e   =   f u n c t i o n ( )   {   m e n u H a n d l e r . c l e a r T i m e O u t ( ) } ;  
 	 	 t h i s . m e n u . o n m o u s e o u t   =   f u n c t i o n ( )   { m e n u H a n d l e r . h i d e ( ) } ;  
 	 }  
 	  
 	 i f   ( t h i s . T r a i n i n g M e n u )   {  
 	 	 t h i s . T r a i n i n g M e n u . o n m o u s e o v e r   =   f u n c t i o n ( )   {   m e n u H a n d l e r . c l e a r T i m e O u t ( ) } ;  
 	 	 t h i s . T r a i n i n g M e n u . o n m o u s e m o v e   =   f u n c t i o n ( )   {   m e n u H a n d l e r . c l e a r T i m e O u t ( ) } ;  
 	 }  
 	  
 	 i f   ( t h i s . I n f o r M e n u )   {  
 	 	 t h i s . I n f o r M e n u . o n m o u s e o v e r   =   f u n c t i o n ( )   { m e n u H a n d l e r . c l e a r T i m e O u t ( ) } ;  
 	 	 t h i s . I n f o r M e n u . o n m o u s e m o v e   =   f u n c t i o n ( )   { m e n u H a n d l e r . c l e a r T i m e O u t ( ) } ; 	  
 	 }  
 } ;  
  
 v a r   m e n u H a n d l e r   =   n e w   M e n u H a n d l e r ( ) ;  
 m e n u H a n d l e r . i n i t ( ) ;  
  
 v a r   P o s U t i l   =   n e w   f u n c t i o n ( )   {  
 	 t h i s . g e t P o s i t i o n   =   f u n c t i o n ( e ) {  
 	 	 v a r   c u r X = ( n s 6 ) ? e . p a g e X   :   e v e n t . c l i e n t X + i e t r u e b o d y ( ) . s c r o l l L e f t ;  
 	 	 v a r   c u r Y = ( n s 6 ) ? e . p a g e Y   :   e v e n t . c l i e n t Y + i e t r u e b o d y ( ) . s c r o l l T o p ; 	 	 	  
 	 	 r e t u r n   { " X " : c u r X , " Y " : c u r Y } ;  
 	 }    
 }  
  
 v a r   M S G _ I N P U T N A M E   =   " P l e a s e   i n p u t   y o u r   n a m e . " ;  
 v a r   M S G _ I N P U T C O N T E N T   =   " P l e a s e   i n p u t   m e s s a g e . " ;  
 v a r   M S G _ I N P U T N A M E _ S E N D T O F R I E N D   =   " P l e a s e   i n p u t   y o u r   n a m e . " ;  
 v a r   M S G _ I N P U T P H O N E   =   " P l e a s e   i n p u t   y o u r   p h o n e . " ;  
 v a r   M S G _ E M A I L _ S E N D T O F R I E N D   =   " P l e a s e   i n p u t   y o u r   e m a i l . " ;  
 v a r   M S G _ I N V A L I D _ E M A I L   =   " P l e a s e   i n p u t   v a l i d   e m a i l . " ;  
 v a r   M S G _ R E C E I V E R _ I N P U T N A M E _ S E N D T O F R I E N D   =   " P l e a s e   i n p u t   r e c e i v e r   n a m e . " ;  
 v a r   M S G _ R E C E I V E R _ E M A I L _ S E N D T O F R I E N D   =   " P l e a s e   i n p u t   r e c e i v e r   e m a i l . " ;  
  
 f u n c t i o n   d o S u b m i t C a l l M e N o w ( c u r f o r m )  
 {  
 	  
 	 v a r   n a m e   =   c u r f o r m . t x t F u l l N a m e ;  
 	 v a r   p h o n e   =   c u r f o r m . t x t P h o n e 1 ;  
 	 / *  
 	 v a r   c i t y   =   c u r f o r m . s e l C i t y . o p t i o n s [ c u r f o r m . s e l C i t y . s e l e c t e d I n d e x ] . t e x t ;  
 	 v a r   p h o n e   =   c u r f o r m . t x t C o d e . v a l u e   +   "   "   +   c u r f o r m . t x t P h o n e 1 . v a l u e   +   "   -   "   +   c u r f o r m . t x t P h o n e 2 . v a l u e ;  
 	 v a r   t i m e   =   c u r f o r m . s e l T i m e . o p t i o n s [ c u r f o r m . s e l T i m e . s e l e c t e d I n d e x ] . t e x t ;  
 	 v a r   s k y p e   =   c u r f o r m . t x t S k y p e . v a l u e ;  
 	 * /  
 	  
 	 i f ( n a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ I N P U T N A M E ) ;  
 	 	 n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f ( p h o n e . v a l u e   = =   " " )  
 	 {  
 	         a l e r t ( M S G _ I N P U T P H O N E ) ;  
 	 	 p h o n e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	  
 	 }  
  
 	 n e w   A j a x . R e q u e s t ( ' . . / v n / H a n d l e A j a x R e q u e s t . a s p x ? d o A c t i o n = 4 ' ,  
 	 {    
 	 	   p a r a m e t e r s :   $ ( c u r f o r m ) . s e r i a l i z e ( t r u e ) ,  
 	 	   o n S u c c e s s :   f u n c t i o n ( t r a n s p o r t )  
 	 	   {  
 	 	 	   / / a l e r t ( " x o n g " ) ;  
 	 	 	      
 	 	 	     / / d e b u g g e r  
 	 	         v a r   r e s p o n s e   =   t r a n s p o r t . r e s p o n s e T e x t   | |   " n o   r e s p o n s e   t e x t " ;    
 	 	 	 v a r   f i n i s h e d   =     d o c u m e n t . g e t E l e m e n t B y I d ( " f i n i s h e d " ) ;  
 	 	 	 v a r   t b l C o n t a c t   =     d o c u m e n t . g e t E l e m e n t B y I d ( " d v C a l l M e N o w " ) ;  
 	 	 	 v a r   t b l E r r o r   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l E r r o r " ) ;  
 	 	 	 i f   ( f i n i s h e d   ! =   n u l l   & &   t b l C o n t a c t   ! =   n u l l   & &   t b l E r r o r   ! =   n u l l )     {  
 	 	 	 	 i f ( r e s p o n s e   = =   " o k " )   {  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	  
 	 	     } ,  
 	 	     o n F a i l u r e :   f u n c t i o n ( ) {   a l e r t ( ' S o m e t h i n g   w e n t   w r o n g . . . ' )   }     	    
 	 } ) ;    
 }  
  
 f u n c t i o n   d o S u b m i t F e e d B a c k ( c u r f o r m )  
 {  
         v a r   p r o c e s s i n g   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d v P r o c e s s i n g " ) ;  
         p r o c e s s i n g . s t y l e . d i s p l a y   =   " b l o c k " ;  
         v a r   t b l C o n t a c t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t b l F e e d b a c k " ) ;  
         t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
          
 	 v a r   n a m e   =   c u r f o r m . t x t F u l l n a m e ;  
 	 v a r   c o n t e n t   =   c u r f o r m . t x t C o n t e n t ;  
 	  
 	 i f ( n a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ I N P U T N A M E ) ;  
 	 	 n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f ( c o n t e n t . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ I N P U T C O N T E N T ) ;  
 	 	 c o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 n e w   A j a x . R e q u e s t ( ' . . / v n / H a n d l e A j a x R e q u e s t . a s p x ? d o A c t i o n = 1 ' ,  
 	 {    
 	 	   p a r a m e t e r s :   $ ( c u r f o r m ) . s e r i a l i z e ( t r u e ) ,  
 	 	   o n S u c c e s s :   f u n c t i o n ( t r a n s p o r t )  
 	 	   {  
 	 	           / / d e b u g g e r  
 	 	                 v a r   p r o c e s s i n g   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d v P r o c e s s i n g " ) ;  
 	 	                 p r o c e s s i n g . s t y l e . d i s p l a y   =   " n o n e " ; 	 	 	      
 	 	             v a r   r e s p o n s e   =   t r a n s p o r t . r e s p o n s e T e x t   | |   " n o   r e s p o n s e   t e x t " ;    
 	 	 	     v a r   f i n i s h e d   =     d o c u m e n t . g e t E l e m e n t B y I d ( " f i n i s h e d " ) ;  
 	 	 	     v a r   t b l C o n t a c t   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l F e e d b a c k " ) ;  
 	 	 	     v a r   t b l E r r o r   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l E r r o r " ) ;  
 	 	 	 i f   ( f i n i s h e d   ! =   n u l l   & &   t b l C o n t a c t   ! =   n u l l   & &   t b l E r r o r   ! =   n u l l )     {  
 	 	 	 	 i f ( r e s p o n s e   = =   " o k " )   {  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	     } ,  
 	 	     o n F a i l u r e :   f u n c t i o n ( ) {   a l e r t ( ' S o m e t h i n g   w e n t   w r o n g . . . ' )   }     	    
 	 } ) ;    
 }  
  
 f u n c t i o n   d o S u b m i t S e n d T o F r i e n d ( c u r f o r m )  
 {  
 	 v a r   s N a m e   =   c u r f o r m . t x t S N a m e ;  
 	 v a r   s E m a i l   =   c u r f o r m . t x t S E m a i l ;  
 	 v a r   r N a m e   =   c u r f o r m . t x t R N a m e ;  
 	 v a r   r E m a i l   =   c u r f o r m . t x t R E m a i l ;  
 	  
 	 i f ( s N a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ I N P U T N A M E _ S E N D T O F R I E N D ) ;  
 	 	 s N a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f ( s E m a i l . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ E M A I L _ S E N D T O F R I E N D ) ;  
 	 	 s E m a i l . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }   e l s e   i f   ( ! i s E m a i l ( s E m a i l . v a l u e ) )  
 	 {    
 	 	 a l e r t ( M S G _ I N V A L I D _ E M A I L ) ;    
 	 	 s E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
  
 	 i f ( r N a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ R E C E I V E R _ I N P U T N A M E _ S E N D T O F R I E N D ) ;  
 	 	 r N a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f ( r E m a i l . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ R E C E I V E R _ E M A I L _ S E N D T O F R I E N D ) ;  
 	 	 r E m a i l . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } e l s e   i f   ( ! i s E m a i l ( r E m a i l . v a l u e ) )  
 	 {    
 	 	 a l e r t   ( M S G _ I N V A L I D _ E M A I L ) ;    
 	 	 r E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	  
 	 n e w   A j a x . R e q u e s t ( ' . . / v n / H a n d l e A j a x R e q u e s t . a s p x ? d o A c t i o n = 2 ' ,  
 	 {    
 	 	   p a r a m e t e r s :   $ ( c u r f o r m ) . s e r i a l i z e ( t r u e ) ,  
 	 	   o n S u c c e s s :   f u n c t i o n ( t r a n s p o r t )  
 	 	   {  
 	 	 	     / / d e b u g g e r  
 	 	             v a r   r e s p o n s e   =   t r a n s p o r t . r e s p o n s e T e x t   | |   " n o   r e s p o n s e   t e x t " ;    
 	 	 	     v a r   f o r m I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " f o r m I n p u t " ) ;  
 	 	 	     v a r   f i n i s h e d   =     d o c u m e n t . g e t E l e m e n t B y I d ( " f i n i s h e d " ) ;  
 	 	 	     v a r   t b l C o n t a c t   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l C o n t a c t " ) ;  
 	 	 	     v a r   t b l E r r o r   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l E r r o r " ) ;  
 	 	 	 i f   ( f o r m I n p u t   ! =   n u l l   & &   f i n i s h e d   ! =   n u l l   & &   t b l C o n t a c t   ! =   n u l l   & &   t b l E r r o r   ! =   n u l l )     {  
 	 	 	 	 i f ( r e s p o n s e   = =   " o k " )   {  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f o r m I n p u t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 f o r m I n p u t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	     } ,  
 	 	     o n F a i l u r e :   f u n c t i o n ( ) {   a l e r t ( ' S o m e t h i n g   w e n t   w r o n g . . . ' )   }     	    
 	 } ) ;    
 }  
  
  
 f u n c t i o n   d o S u b m i t C o n t a c t ( f o r m C o n t a c t )  
 {  
 	 v a r   n a m e   =   f o r m C o n t a c t . t x t F u l l n a m e ;  
 	 v a r   c o n t e n t   =   f o r m C o n t a c t . t x t C o n t e n t ;  
 	 v a r   r E m a i l   =   f o r m C o n t a c t . t x t E m a i l ;  
 	  
 	 i f ( n a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ I N P U T N A M E ) ;  
 	 	 n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 i f   ( r E m a i l . v a l u e   = =   " " )   {  
 	         a l e r t ( M S G _ E M A I L _ S E N D T O F R I E N D ) ;  
 	         r E m a i l . f o c u s ( ) ;  
 	         r e t u r n   f a l s e ;  
 	 }   e l s e   i f   ( ! i s E m a i l ( r E m a i l . v a l u e ) )   {  
 	         a l e r t ( M S G _ I N V A L I D _ E M A I L ) ;  
 	         r E m a i l . f o c u s ( ) ;  
 	         r e t u r n   f a l s e ;  
 	 }    
 	  
 	 i f ( c o n t e n t . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( M S G _ I N P U T C O N T E N T ) ;  
 	 	 c o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 n e w   A j a x . R e q u e s t ( ' . . / v n / H a n d l e A j a x R e q u e s t . a s p x ? d o A c t i o n = 3 ' ,  
 	 {    
 	 	   p a r a m e t e r s :   $ ( f o r m C o n t a c t ) . s e r i a l i z e ( t r u e ) ,  
 	 	   o n S u c c e s s :   f u n c t i o n ( t r a n s p o r t )  
 	 	   {  
 	 	 	 / /     d e b u g g e r  
 	 	         v a r   r e s p o n s e   =   t r a n s p o r t . r e s p o n s e T e x t   | |   " n o   r e s p o n s e   t e x t " ;    
 	 	 	 v a r   f o r m I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " f o r m I n p u t " ) ;  
 	 	 	 v a r   f i n i s h e d   =     d o c u m e n t . g e t E l e m e n t B y I d ( " f i n i s h e d " ) ;  
 	 	 	 v a r   t b l C o n t a c t   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l C o n t a c t " ) ;  
 	 	 	 v a r   t b l E r r o r   =     d o c u m e n t . g e t E l e m e n t B y I d ( " t b l E r r o r " ) ;  
 	 	 	 i f   ( f o r m I n p u t   ! =   n u l l   & &   f i n i s h e d   ! =   n u l l   & &   t b l C o n t a c t   ! =   n u l l   & &   t b l E r r o r   ! =   n u l l )     {  
 	 	 	 	 i f ( r e s p o n s e   = =   " o k " )   {  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f o r m I n p u t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 f o r m I n p u t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l C o n t a c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 f i n i s h e d . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 t b l E r r o r . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	     } ,  
 	 	     o n F a i l u r e :   f u n c t i o n ( ) {   a l e r t ( ' S o m e t h i n g   w e n t   w r o n g . . . ' )   }     	     	    
 	 } ) ;    
 }  
  
 f u n c t i o n   d o P a g e ( P a g e I n d e x )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m w e b s i t e ;  
 	 / / f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? C a t I d = "   +   C a t _ i d   +   " & P a g e I n d e x = "   +   P a g e I n d e x ;  
 	 v a r   u r l   =   d o c u m e n t . U R L . s p l i t ( ' ? ' ) ;  
 	 f r m S u b m i t . a c t i o n   =   u r l [ 0 ]   +   " ? P a g e I n d e x = "   +   P a g e I n d e x ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   d o P a g e L i s t ( C a t _ i d ,   P a g e I n d e x )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m w e b s i t e ;  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? C a t I d = "   +   C a t _ i d   +   " & P a g e I n d e x = "   +   P a g e I n d e x   +   " & t a b = 1 " ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   d o P a g e S e a r c h L i s t ( P a g e I n d e x )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m w e b s i t e ;  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? f s e a r c h = 1 "   +   " & P a g e I n d e x = "   +   P a g e I n d e x   +   " # l i s t " ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
 	    
 f u n c t i o n   d o S e a r c h ( )  
 {   	  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m w e b s i t e ;  
 	 f r m S u b m i t . m e t h o d = " p o s t " ;  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? f s e a r c h = 1 # l i s t " ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   c h e c k C o n t a c t F o r m ( )  
 {  
 	 v a r   f r m F o r m = d o c u m e n t . f r m C o n t a c t ;  
 	 v a r   f u l l n a m e ;  
 	 v a r   c o n t e n t ;  
 	  
 	 f u l l n a m e = t r i m s t r i n g ( f r m F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 i f   ( f u l l n a m e = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l o n g   n h a p   h o   t e n . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( f u l l n a m e . s e a r c h ( " s c r i p " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " o b j e c " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " a p p l e " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " H o   t e n   k h o n g   h o p   l e . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	  
 	 c o n t e n t = t r i m s t r i n g ( f r m F o r m . t x t C o n t e n t . v a l u e ) ;  
 	 i f   ( c o n t e n t = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l o n g   n h a p   n o i   d u n g . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( c o n t e n t . s e a r c h ( " s c r i p " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " o b j e c " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " a p p l e " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " N o i   d u n g   k h o n g   h o p   l e . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k F e e d b a c k F o r m ( )  
 {  
 	 v a r   f r m F o r m = d o c u m e n t . f r m F e e d b a c k ;  
 	 v a r   f u l l n a m e ;  
 	 v a r   c o n t e n t ;  
 	  
 	 f u l l n a m e = t r i m s t r i n g ( f r m F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 i f   ( f u l l n a m e = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   h Í  t ê n . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( f u l l n a m e . s e a r c h ( " s c r i p " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " o b j e c " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " a p p l e " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " H Í  t ê n   k h ô n g   h ãp   l Ç. " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	  
 	 c o n t e n t = t r i m s t r i n g ( f r m F o r m . t x t C o n t e n t . v a l u e ) ;  
 	 i f   ( c o n t e n t = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   n Ùi   d u n g . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( c o n t e n t . s e a r c h ( " s c r i p " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " o b j e c " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " a p p l e " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " N Ùi   d u n g   k h ô n g   h ãp   l Ç. " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k F e e d b a c k F o r m E n ( )  
 {  
 	 v a r   f r m F o r m = d o c u m e n t . f r m F e e d b a c k ;  
 	 v a r   f u l l n a m e ;  
 	 v a r   c o n t e n t ;  
 	  
 	 f u l l n a m e = t r i m s t r i n g ( f r m F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 i f   ( f u l l n a m e = = " " )    
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   y o u r   n a m e . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( f u l l n a m e . s e a r c h ( " s c r i p " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " o b j e c " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " a p p l e " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " y o u r   n a m e   i s   i n v a l i d . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	  
 	 c o n t e n t = t r i m s t r i n g ( f r m F o r m . t x t C o n t e n t . v a l u e ) ;  
 	 i f   ( c o n t e n t = = " " )    
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   y o u r   c o n t e n t . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( c o n t e n t . s e a r c h ( " s c r i p " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " o b j e c " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " a p p l e " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " Y o u r   c o n t e n t   i s   i n v a l i d . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k S e n d e m a i l F o r m ( M y F o r m )  
 {    
 	 v a r   t x t F u l l n a m e = t r i m s t r i n g ( M y F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 v a r   t x t E m a i l = t r i m f u l l s t r i n g ( M y F o r m . t x t E m a i l . v a l u e ) ;    
 	 v a r   t x t F u l l n a m e 1 = t r i m s t r i n g ( M y F o r m . t x t F u l l n a m e 1 . v a l u e ) ;  
 	 v a r   t x t E m a i l 1 = t r i m f u l l s t r i n g ( M y F o r m . t x t E m a i l 1 . v a l u e ) ;    
 	  
 	 i f   ( t x t F u l l n a m e = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l ò n g   c u n g   c ¥p   h Í  t ê n . " ) ;    
 	 	 M y F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t E m a i l = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l ò n g   c u n g   c ¥p   e m a i l . " ) ;    
 	 	 M y F o r m . t x t E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( ! i s E m a i l ( t x t E m a i l ) )  
 	 {    
 	 	 a l e r t   ( " V u i   l ò n g   c u n g   c ¥p   e m a i l   h ãp   l Ç. " ) ;    
 	 	 M y F o r m . t x t E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( t x t F u l l n a m e 1 = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l ò n g   c u n g   c ¥p   h Í  t ê n   n g °Ýi   n h ­n . " ) ;    
 	 	 M y F o r m . t x t F u l l n a m e 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( t x t E m a i l 1 = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l ò n g   c u n g   c ¥p   e m a i l   n g °Ýi   n h ­n . " ) ;    
 	 	 M y F o r m . t x t E m a i l 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( ! i s E m a i l ( t x t E m a i l 1 ) )  
 	 {      
 	 	 a l e r t   ( " E m a i l   c ça   n g °Ýi   n h ­n   k h ô n g   h ãp   l Ç. " ) ;    
 	 	 M y F o r m . t x t E m a i l 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 r e t u r n   t r u e ;    
 }    
  
 f u n c t i o n   c h e c k S e n d e m a i l F o r m _ E n g ( M y F o r m )  
 {    
 	 v a r   t x t F u l l n a m e = t r i m s t r i n g ( M y F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 v a r   t x t E m a i l = t r i m f u l l s t r i n g ( M y F o r m . t x t E m a i l . v a l u e ) ;    
 	 v a r   t x t F u l l n a m e 1 = t r i m s t r i n g ( M y F o r m . t x t F u l l n a m e 1 . v a l u e ) ;  
 	 v a r   t x t E m a i l 1 = t r i m f u l l s t r i n g ( M y F o r m . t x t E m a i l 1 . v a l u e ) ;    
 	  
 	 i f   ( t x t F u l l n a m e = = " " )    
 	 {    
 	 	 a l e r t   ( " P l e a s e   i n p u t   s e n d e r   f u l l n a m e . " ) ;    
 	 	 M y F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t E m a i l = = " " )    
 	 {    
 	 	 a l e r t   ( " P l e a s e   i n p u t   s e n d e r   e m a i l . " ) ;    
 	 	 M y F o r m . t x t E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( ! i s E m a i l ( t x t E m a i l ) )  
 	 {    
 	 	 a l e r t   ( " S e n d e r   e m a i l   i s   i n v a l i d . " ) ;    
 	 	 M y F o r m . t x t E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( t x t F u l l n a m e 1 = = " " )    
 	 {    
 	 	 a l e r t   ( " P l e a s e   i n p u t   r e c e i v e r   f u l l n a m e . " ) ;    
 	 	 M y F o r m . t x t F u l l n a m e 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( t x t E m a i l 1 = = " " )    
 	 {    
 	 	 a l e r t   ( " P l e a s e   i n p u t   r e c e i v e r   e m a i l . " ) ;    
 	 	 M y F o r m . t x t E m a i l 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( ! i s E m a i l ( t x t E m a i l 1 ) )  
 	 {      
 	 	 a l e r t   ( " R e c e i v e r   e m a i l   i s   i n v a l i d . " ) ;    
 	 	 M y F o r m . t x t E m a i l 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 r e t u r n   t r u e ;    
 }    
  
  
 f u n c t i o n   d o L o g i n ( )  
 {   	  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m w e b s i t e ;  
 	 v a r   t x t U N = t r i m s t r i n g ( f r m S u b m i t . t x t U N . v a l u e ) ;  
 	 v a r   t x t P W = t r i m f u l l s t r i n g ( f r m S u b m i t . t x t P W . v a l u e ) ;    
  
 	 i f   ( t x t U N = = " " )  
 	 {  
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   t e n   t r u y   c a p . " ) ;    
 	 	 f r m S u b m i t . t x t U N . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	 i f   ( t x t P W = = " " )  
 	 {  
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   m a t   k h a u . " ) ;    
 	 	 f r m S u b m i t . t x t P W . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	  
 	 f r m S u b m i t . m e t h o d = " p o s t " ;  
 	 f r m S u b m i t . a c t i o n = " l o g i n . a s p x " ;  
 	 f r m S u b m i t . s u b m i t ( ) ;    
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k C h a n g e P W F o r m ( )    
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m C h a n g e U s e r I n f o ;  
 	 v a r   t x t O l d P W = t r i m s t r i n g ( f r m S u b m i t . t x t O l d P W . v a l u e ) ;  
 	 v a r   t x t N e w P W = t r i m s t r i n g ( f r m S u b m i t . t x t N e w P W . v a l u e ) ;  
 	 v a r   t x t R e N e w P W = t r i m s t r i n g ( f r m S u b m i t . t x t R e N e w P W . v a l u e ) ;  
  
 	 i f   ( t x t O l d P W = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   m a t   k h a u   c u . " ) ;    
 	 	 f r m S u b m i t . t x t O l d P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t N e w P W = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   m a t   k h a u   m o i . " ) ;    
 	 	 f r m S u b m i t . t x t N e w P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t R e N e w P W = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   l a i   m a t   k h a u   m o i . " ) ;    
 	 	 f r m S u b m i t . t x t R e N e w P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t N e w P W ! = t x t R e N e w P W )  
 	 {  
 	 	 a l e r t ( " M a t   k h a u   n h a p   l a i   k h o n g   c h i n h   x a c . " ) ;  
 	 	 f r m S u b m i t . t x t R e N e w P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   w i n d o w _ i n i t ( )  
 {  
 	 w i n d o w . r e s i z e T o ( w i n d o w . s c r e e n . w i d t h ,   w i n d o w . s c r e e n . h e i g h t ) ;  
 	 w i n d o w . s c r e e n L e f t = = 0 ;  
 	 w i n d o w . s c r e e n T o p = = 0  
 	 w i n d o w . f o c u s ( ) ;  
 }  
  
 f u n c t i o n   d o M o u s e O v e r M e n u L e v e l 2 ( i t e m , s t r B g c o l o r )  
 {  
 	 f o r ( i = 0 ; i < i t e m . c h i l d r e n . l e n g t h ; i + + )    
 	 {  
 	 	 i t e m . c h i l d r e n ( i ) . s t y l e . c u r s o r = ' h a n d ' ;    
 	 	 i t e m . c h i l d r e n ( i ) . s t y l e . b a c k g r o u n d C o l o r = s t r B g c o l o r  
 	 }  
 }  
 	  
 f u n c t i o n   d o M o u s e O u t M e n u L e v e l 2 ( i t e m , s t r B g c o l o r )  
 {  
 	 f o r ( i = 0 ; i < i t e m . c h i l d r e n . l e n g t h ; i + + )    
 	 	 i t e m . c h i l d r e n ( i ) . s t y l e . b a c k g r o u n d C o l o r = s t r B g c o l o r  
 }  
 	  
 f u n c t i o n   d o M o u s e C l i c k ( i t e m )  
 {  
 	 i t e m . f i r s t C h i l d . f i r s t C h i l d . c l i c k ( ) ;  
 }  
  
 f u n c t i o n   d o V o t e ( )  
 {  
 	 / / w i n d o w . d o c u m e n t . f r m V o t e D e t a i l . s u b m i t ( ) ;  
 	 / / a l e r t ( " C h a n   t h a n h   c a m   o n   b a n   d a   q u a n   t a m " ) ;  
 	 / / w i n d o w . d o c u m e n t . f r m V o t e D e t a i l . a c t i o n = " v o t e _ d e t a i l . a s p x ? a c t i o n = 1 " ; 	 	 	 	  
 	 w i n d o w . c l o s e ( ) ;  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   s u b m i t V o t e ( i n t V o t e _ i d ,   i n t S h o w R e s u l t )  
 {  
 	 v a r   s t r I t e m L i s t ;  
 	 w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e   =   ' ' ;  
 	 f o r   ( i = 0 ;   i   <   f r m w e b s i t e . e l e m e n t s . l e n g t h   -   1 ;   i + + )  
 	 {  
 	 	 i f   ( f r m w e b s i t e . e l e m e n t s [ i ] . c h e c k e d )  
 	 	 	 w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e = w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e   +   ' , '   +   f r m w e b s i t e . e l e m e n t s [ i ] . v a l u e ;  
 	 }  
 	 o p e n p a g e _ n o r e s i z e ( ' . . / v n / v o t e _ d e t a i l . a s p x ? v o t e _ i d = '   +   i n t V o t e _ i d   +   ' & a c t i o n = 1 '   +   ' & i t e m l i s t = '   +   w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e   +   ' & g _ i n t S h o w R e s u l t = '   +   i n t S h o w R e s u l t , ' i t e m v o t e ' , ' 5 2 0 ' , ' 3 1 0 ' ) ;  
 }  
  
 f u n c t i o n   c h e c k B u d g e t R e g ( )  
 {  
 	 v a r   t x t T e n D V ;  
 	 v a r   t x t L o a i H i n h 1 ;  
 	 v a r   t x t C a p N S ;  
 	 v a r   t x t C h u o n g N S ; 	 	 	 	 	  
 	 v a r   t x t C a p D T ;  
 	 	  
 	 t x t T e n D V   =   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 T e n D V ' ) ;  
 	 t x t L o a i H i n h 1   =   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 L o a i H i n h 1 ' ) ;  
 	 t x t C a p N S   =   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 C a p N S ' ) ;  
 	 t x t C h u o n g N S   =   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 C h u o n g N S ' ) ;  
 	 t x t C a p D T   =   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 C a p D T ' ) ;  
 	  
 	 i f   ( t x t T e n D V . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   t ê n   ¡n   v Ë. " ) ;  
 	 	 t x t T e n D V . v a l u e = " " ;  
 	 	 t x t T e n D V . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t L o a i H i n h 1 . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   l o ¡i   h ì n h   ¡n   v Ë. " ) ;  
 	 	 t x t L o a i H i n h 1 . v a l u e = " " ;  
 	 	 t x t L o a i H i n h 1 . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t C a p N S . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   c ¥p   n g â n   s á c h . " ) ;  
 	 	 t x t C a p N S . v a l u e = " " ;  
 	 	 t x t C a p N S . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t C h u o n g N S . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   c h °¡n g   n g â n   s á c h . " ) ;  
 	 	 t x t C h u o n g N S . v a l u e = " " ;  
 	 	 t x t C h u o n g N S . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t C a p D T . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   c ¥p   d ñ  t o á n . " ) ;  
 	 	 t x t C a p D T . v a l u e = " " ;  
 	 	 t x t C a p D T . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k A c c o u n t ( )  
 {  
 	 v a r   t x t N a m e ;  
 	 v a r   t x t E m a i l ;  
 	 v a r   t x t U s e r ;  
 	 v a r   t x t P a s s ;  
 	 v a r   t x t P a s s 2 ; 	 	 	 	 	  
 	 v a r   t x t V e r i f y ;  
 	 	  
 	 t x t N a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' V N C o n t e n t 1 _ _ c t l 0 _ t x t N a m e ' ) ;  
 	 t x t E m a i l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' V N C o n t e n t 1 _ _ c t l 0 _ t x t E m a i l ' ) ;  
 	 t x t U s e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' V N C o n t e n t 1 _ _ c t l 0 _ t x t U s e r n a m e ' ) ;  
 	 t x t P a s s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' V N C o n t e n t 1 _ _ c t l 0 _ t x t P a s s w o r d ' ) ;  
 	 t x t P a s s 2   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' V N C o n t e n t 1 _ _ c t l 0 _ t x t P a s s w o r d 2 ' ) ;  
 	 t x t V e r i f y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' V N C o n t e n t 1 _ _ c t l 0 _ t x t V e r i f y C o d e ' ) ;  
 	  
 	 i f   ( t x t N a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   h Í  v à   t ê n . " ) ;  
 	 	 t x t N a m e . v a l u e = " " ;  
 	 	 t x t N a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t E m a i l . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   Ëa   c h É  e m a i l . " ) ;  
 	 	 t x t E m a i l . v a l u e = " " ;  
 	 	 t x t E m a i l . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } e l s e  
 	 {  
 	 	 i f ( ! i s E m a i l ( t x t E m a i l . v a l u e   ) )  
 	 	 {  
 	 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   Ëa   c h É  e m a i l   h ãp   l Ç. " ) ;  
 	 	 	 t x t E m a i l . v a l u e = " " ;  
 	 	 	 t x t E m a i l . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
 	  
 	  
 	 i f   ( t x t U s e r . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   t ê n   n g   n h ­p . " ) ;  
 	 	 t x t U s e r . v a l u e = " " ;  
 	 	 t x t U s e r . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t P a s s . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   v à o   m ­t   k h ©u . " ) ;  
 	 	 t x t P a s s . v a l u e = " " ;  
 	 	 t x t P a s s . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t P a s s 2 . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   x á c   n h ­n   m ­t   k h ©u . " ) ;  
 	 	 t x t P a s s 2 . v a l u e = " " ;  
 	 	 t x t P a s s 2 . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f ( t x t P a s s . v a l u e   ! =   t x t P a s s 2 . v a l u e   & &   t x t P a s s . v a l u e   ! =   " "   & &   t x t P a s s 2 . v a l u e   ! =   " " )  
 	 {  
 	 	 a l e r t ( " H a i   m ­t   k h ©u   k h ô n g   t r ù n g   n h a u . V u i   l ò n g   k i Ãm   t r a   l ¡i . " ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	  
 	 i f   ( t x t V e r i f y . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   m ã   x á c   n h ­n . " ) ;  
 	 	 t x t V e r i f y . v a l u e = " " ;  
 	 	 t x t V e r i f y . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k A c c o u n t E n ( )  
 {  
 	  
 	 v a r   t x t N a m e ;  
 	 v a r   t x t E m a i l ;  
 	 v a r   t x t U s e r ;  
 	 v a r   t x t P a s s ;  
 	 v a r   t x t P a s s 2 ; 	 	 	 	 	  
 	 v a r   t x t V e r i f y ;  
 	 	  
 	 t x t N a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' E n C o n t e n t 1 _ _ c t l 0 _ t x t N a m e ' ) ;  
 	 t x t E m a i l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' E N C o n t e n t 1 _ _ c t l 0 _ t x t E m a i l ' ) ;  
 	 t x t U s e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' E N C o n t e n t 1 _ _ c t l 0 _ t x t U s e r n a m e ' ) ;  
 	 t x t P a s s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' E N C o n t e n t 1 _ _ c t l 0 _ t x t P a s s w o r d ' ) ;  
 	 t x t P a s s 2   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' E N C o n t e n t 1 _ _ c t l 0 _ t x t P a s s w o r d 2 ' ) ;  
 	 t x t V e r i f y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' E N C o n t e n t 1 _ _ c t l 0 _ t x t V e r i f y C o d e ' ) ;  
 	  
 	 i f   ( t x t N a m e . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   y o u r   n a m e . " ) ;  
 	 	 t x t N a m e . v a l u e = " " ;  
 	 	 t x t N a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t E m a i l . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   y o u r   E m a i l . " ) ;  
 	 	 t x t E m a i l . v a l u e = " " ;  
 	 	 t x t E m a i l . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } e l s e  
 	 {  
 	 	 i f ( ! i s E m a i l ( t x t E m a i l . v a l u e   ) )  
 	 	 {  
 	 	 	 a l e r t ( " P l e a s e   i n p u t   a   v a l i d   E m a i l . " ) ;  
 	 	 	 t x t E m a i l . v a l u e = " " ;  
 	 	 	 t x t E m a i l . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
 	  
 	  
 	 i f   ( t x t U s e r . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   U s e r   N a m e . " ) ;  
 	 	 t x t U s e r . v a l u e = " " ;  
 	 	 t x t U s e r . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t P a s s . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   y o u r   p a s s w o r d . " ) ;  
 	 	 t x t P a s s . v a l u e = " " ;  
 	 	 t x t P a s s . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f   ( t x t P a s s 2 . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " P l e a s e   v e r i f y   p a s s w o r d . " ) ;  
 	 	 t x t P a s s 2 . v a l u e = " " ;  
 	 	 t x t P a s s 2 . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 i f ( t x t P a s s . v a l u e   ! =   t x t P a s s 2 . v a l u e   & &   t x t P a s s . v a l u e   ! =   " "   & &   t x t P a s s 2 . v a l u e   ! =   " " )  
 	 {  
 	 	 a l e r t ( " T w o   p a s s   d o n ' t   m a t c h . P l e a s e   c h e c k   a g a i n . " ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	  
 	 i f   ( t x t V e r i f y . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " P l e a s e   i n p u t   V e r i f i c a t i o n   C o d e . " ) ;  
 	 	 t x t V e r i f y . v a l u e = " " ;  
 	 	 t x t V e r i f y . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k R e P a s s ( )  
 {  
 	 v a r   t x t E m a i l ;  
 	 	  
 	 t x t E m a i l   =   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 E m a i l ' ) ;  
 	 i f   ( t x t E m a i l . v a l u e   = =   " " )  
 	 {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   E m a i l . " ) ;  
 	 	 t x t E m a i l . v a l u e = " " ;  
 	 	 t x t E m a i l . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } e l s e  
 	 {  
 	 	 i f ( ! i s E m a i l ( t x t E m a i l . v a l u e   ) )  
 	 	 {  
 	 	 	 a l e r t ( " V u i   l ò n g   n h ­p   E m a i l   h ãp   l Ç. " ) ;  
 	 	 	 t x t E m a i l . v a l u e = " " ;  
 	 	 	 t x t E m a i l . f o c u s ( ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
  
 	 r e t u r n   t r u e ;  
 }  
  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
 *   C o o l   D H T M L   t o o l t i p   s c r i p t -   ©   D y n a m i c   D r i v e   D H T M L   c o d e   l i b r a r y   ( w w w . d y n a m i c d r i v e . c o m )  
 *   T h i s   n o t i c e   M U S T   s t a y   i n t a c t   f o r   l e g a l   u s e  
 *   V i s i t   D y n a m i c   D r i v e   a t   h t t p : / / w w w . d y n a m i c d r i v e . c o m /   f o r   f u l l   s o u r c e   c o d e  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
  
 / /   R e t u r n   t r u e   i f   t h e   b r o w s e r   r e q u i r e s   t h e   v a r i o u s   r e n d e r i n g   w o r k a r o u n d s  
 / /   f o r   I E 5 . 5 / 6   ( e g   i f r a m e   s h i m s   u n d e r   p o p u p s ,  
 f u n c t i o n   B r o w s e r N e e d s I E 6 W o r k a r o u n d s ( )  
 {  
 	 / / d e b u g g e r  
 	 v a r   w o r k a r o u n d s N e e d e d   =   f a l s e ;  
 	 i f   ( n a v i g a t o r . a p p V e r s i o n . i n d e x O f ( " M S I E " ) ! = - 1 )  
 	 {  
 	 	 v a r   v e r s i o n = 0 ;  
 	 	 v a r   t e m p = n a v i g a t o r . a p p V e r s i o n . s p l i t ( " M S I E " ) ;  
 	 	 v a r   v e r s i o n = p a r s e F l o a t ( t e m p [ 1 ] )  
 	 	 i f   ( v e r s i o n   < =   6 . 0 )  
 	 	 	 w o r k a r o u n d s N e e d e d   =   t r u e ; 	  
 	 }  
 	 r e t u r n   w o r k a r o u n d s N e e d e d ;  
 }  
  
 / /   H a c k   t o   a d d   a n   i f r a m e   u n d e r   t h e   p o p u p   w h i c h   s h o u l d   h i d e   t h e   s e l e c t s .  
 / /   T h i s   i s   n e c e s s a r y   w i t h   I E 5 . 5 / 6   a s   i t   i n c o r r e c t l y   g i v e s   s e l e c t  
 / /   e l e m e n t s   a n   i n f i n i t e   Z - o r d e r   s h o w i n g   t h e m   i n   f r o n t   o f   j u s t   a b o u t  
 / /   a n y t h i n g   e l s e .   T h i s   m e t h o d   f o r c e s   t h e   Z - o r d e r   o f   t h e   i n p u t   o b j e c t  
 / /   t o   b e   2   i f   i t   i s   l e s s   t h a n   2   o n   e n t r y   t o   t h e   m e t h o d .  
 f u n c t i o n   S h o w I F r a m e H a c k ( o b j )  
 {  
 	 i f   ( o b j . s t y l e . z I n d e x   <   2 )  
 	 {  
 	 	 o b j . s t y l e . z I n d e x = 9 9 9 9 9 9 ;  
 	 }  
 	 S h o w I F r a m e H a c k W i t h o u t F o r c e Z I n d e x ( o b j ) ;  
 }  
  
 / /   H a c k   t o   a d d   a n   i f r a m e   u n d e r   t h e   p o p u p   w h i c h   s h o u l d   h i d e   t h e   s e l e c t s .  
 / /   T h i s   i s   n e c e s s a r y   w i t h   I E 5 . 5 / 6   a s   i t   i n c o r r e c t l y   g i v e s   s e l e c t  
 / /   e l e m e n t s   a n   i n f i n i t e   Z - o r d e r   s h o w i n g   t h e m   i n   f r o n t   o f   j u s t   a b o u t  
 / /   a n y t h i n g   e l s e .   T h i s   m e t h o d   d o e s   N O T   f o r c e   t h e   z - o r d e r   o f   t h e   i n p u t  
 / /   e l e m e n t   t o   b e   a n y t h i n g   i n   p a r t i c u l a r .  
 f u n c t i o n   S h o w I F r a m e H a c k W i t h o u t F o r c e Z I n d e x ( o b j )  
 {  
 	 / / d e b u g g e r  
 	 v a r   i f r a m e S h i m   =   d o c u m e n t . g e t E l e m e n t B y I d ( o b j . i d   +   " _ h v r S h m " ) ;  
 	 i f   ( i f r a m e S h i m   ! =   n u l l )  
 	 {  
 	 	 i f r a m e S h i m . s t y l e . v i s i b i l i t y   =   ' v i s i b l e ' ;  
 	 }  
 	 e l s e  
 	 {  
 	 	 o b j . i n s e r t A d j a c e n t H T M L ( " a f t e r E n d " , ' < 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 ; z - i n d e x : 1 ; " ' +  
 	 	 '   s r c = " j a v a s c r i p t : \ ' < h t m l > < / h t m l > \ ' ; "   f r a m e B o r d e r = " 0 "   s c r o l l i n g = " n o " '   +  
 	 	 '   i d = " '   +   o b j . i d   +   ' _ h v r S h m "   / > ' ) ;  
  
 	 	 i f r a m e S h i m   =   d o c u m e n t . g e t E l e m e n t B y I d ( o b j . i d   +   " _ h v r S h m " ) ;  
 	 }  
 	 i f r a m e S h i m . s t y l e . t o p   =   o b j . s t y l e . t o p ;  
 	 i f r a m e S h i m . s t y l e . l e f t   =   o b j . s t y l e . l e f t ;  
 	 i f r a m e S h i m . s t y l e . w i d t h   =   o b j . o f f s e t W i d t h   +   ' p x ' ;  
 	 i f r a m e S h i m . s t y l e . h e i g h t   =   o b j . o f f s e t H e i g h t   +   ' p x ' ;  
 	 i f r a m e S h i m . s t y l e . z I n d e x   =   o b j . s t y l e . z I n d e x - 1 ;   / /   F o r c e   t h e   i F r a m e   b e h i n d / u n d e r   t h e   p o p u p  
 }  
  
 / /   H i d e   t h e   i F r a m e   " s h i m "   t h a t   m i g h t   h a v e   b e e n   p u t   u n d e r n e a t h   t h e   i n p u t   o b j e c t  
 / /   ( t o   w o r k   a r o u n d   I E 5 . 5 / 6   Z O r d e r   i s s u e s   w i t h   S E L E C T   e l e m e n t s ) .  
 f u n c t i o n   H i d e I F r a m e H a c k ( o b j )  
 {  
 	 / / f i n d   a n d   r e m o v e   t h e   i f r a m e :  
 	 v a r   i f r a m e S h i m   =   d o c u m e n t . g e t E l e m e n t B y I d ( o b j . i d   +   " _ h v r S h m " ) ;  
 	 i f   ( i f r a m e S h i m   ! =   n u l l )  
 	 {  
 	 	 i f r a m e S h i m . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;  
 	 }  
 }  
  
  
 v a r   o f f s e t x p o i n t = - 6 0   / / C u s t o m i z e   x   o f f s e t   o f   t o o l t i p  
 v a r   o f f s e t y p o i n t = 2 0   / / C u s t o m i z e   y   o f f s e t   o f   t o o l t i p  
 v a r   i e = d o c u m e n t . a l l  
 v a r   n s 6 = 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 . a l l  
 v a r   e n a b l e t i p = f a l s e  
 i f   ( i e | | n s 6 )  
 v a r   t i p o b j = d o c u m e n t . a l l ?   d o c u m e n t . a l l [ " d h t m l t o o l t i p " ]   :   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 . g e t E l e m e n t B y I d ( " d h t m l t o o l t i p " )   :   " "  
  
 f u n c t i o n   i e t r u e b o d y ( ) {  
 r e t u r n   ( d o c u m e n t . c o m p a t M o d e   & &   d o c u m e n t . c o m p a t M o d e ! = " B a c k C o m p a t " ) ?   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 . b o d y  
 }  
  
 f u n c t i o n   d d r i v e t i p ( t h e t e x t ,   t h e c o l o r ,   t h e w i d t h ) {  
 	 i f   ( n s 6 | | i e ) {  
 	 	 i f   ( t y p e o f   t h e w i d t h ! = " u n d e f i n e d " )   t i p o b j . s t y l e . w i d t h = t h e w i d t h + " p x "  
 	 	 i f   ( t y p e o f   t h e c o l o r ! = " u n d e f i n e d "   & &   t h e c o l o r ! = " " )   t i p o b j . s t y l e . b a c k g r o u n d C o l o r = t h e c o l o r  
 	 	 t i p o b j . i n n e r H T M L = d e c o d e H T M L ( t h e t e x t )  
 	 	  
 	 	  
 	 	 e n a b l e t i p = t r u e  
 	 	 r e t u r n   f a l s e  
 	 }  
 }  
  
 f u n c t i o n   d e c o d e H T M L ( t e x t )  
 {  
 	 i f ( t e x t   ! =   n u l l )   {  
 	 	 t e x t   =   t e x t . r e p l a c e ( " & # 3 4 ; " , " \ " " ) ;  
 	 	 t e x t   =   t e x t . r e p l a c e ( " & # 3 9 ; " , " ' " ) ;  
 	 }  
 	 r e t u r n   t e x t ;  
 }  
  
 f u n c t i o n   p o s i t i o n t i p ( e ) {  
 	 i f   ( e n a b l e t i p ) {  
 	 	 v a r   c u r X = ( n s 6 ) ? e . p a g e X   :   e v e n t . c l i e n t X + i e t r u e b o d y ( ) . s c r o l l L e f t ;  
 	 	 v a r   c u r Y = ( n s 6 ) ? e . p a g e Y   :   e v e n t . c l i e n t Y + i e t r u e b o d y ( ) . s c r o l l T o p ;  
 	 	 / / F i n d   o u t   h o w   c l o s e   t h e   m o u s e   i s   t o   t h e   c o r n e r   o f   t h e   w i n d o w  
 	 	 v a r   r i g h t e d g e = i e & & ! w i n d o w . o p e r a ?   i e t r u e b o d y ( ) . c l i e n t W i d t h - e v e n t . c l i e n t X - o f f s e t x p o i n t   :   w i n d o w . i n n e r W i d t h - e . c l i e n t X - o f f s e t x p o i n t - 2 0  
 	 	 v a r   b o t t o m e d g e = i e & & ! w i n d o w . o p e r a ?   i e t r u e b o d y ( ) . c l i e n t H e i g h t - e v e n t . c l i e n t Y - o f f s e t y p o i n t   :   w i n d o w . i n n e r H e i g h t - e . c l i e n t Y - o f f s e t y p o i n t - 2 0  
 	 	 v a r   l e f t e d g e = ( o f f s e t x p o i n t < 0 ) ?   o f f s e t x p o i n t * ( - 1 )   :   - 1 0 0 0  
  
 	 	 / / i f   t h e   h o r i z o n t a l   d i s t a n c e   i s n ' t   e n o u g h   t o   a c c o m o d a t e   t h e   w i d t h   o f   t h e   c o n t e x t   m e n u  
 	 	 i f   ( r i g h t e d g e < t i p o b j . o f f s e t W i d t h )  
 	 	 / / m o v e   t h e   h o r i z o n t a l   p o s i t i o n   o f   t h e   m e n u   t o   t h e   l e f t   b y   i t ' s   w i d t h  
 	 	 	 t i p o b j . s t y l e . l e f t = i e ?   i e t r u e b o d y ( ) . s c r o l l L e f t + e v e n t . c l i e n t X - t i p o b j . o f f s e t W i d t h + " p x "   :   w i n d o w . p a g e X O f f s e t + e . c l i e n t X - t i p o b j . o f f s e t W i d t h + " p x "  
 	 	 e l s e   i f   ( c u r X < l e f t e d g e )  
 	 	 	 t i p o b j . s t y l e . l e f t = " 5 p x "  
 	 	 e l s e  
 	 	 / / p o s i t i o n   t h e   h o r i z o n t a l   p o s i t i o n   o f   t h e   m e n u   w h e r e   t h e   m o u s e   i s   p o s i t i o n e d  
 	 	 	 t i p o b j . s t y l e . l e f t = c u r X + o f f s e t x p o i n t + " p x "  
  
 	 	 / / s a m e   c o n c e p t   w i t h   t h e   v e r t i c a l   p o s i t i o n  
 	 	 i f   ( b o t t o m e d g e < t i p o b j . o f f s e t H e i g h t )  
 	 	 	 t i p o b j . s t y l e . t o p = i e ?   i e t r u e b o d y ( ) . s c r o l l T o p + e v e n t . c l i e n t Y - t i p o b j . o f f s e t H e i g h t - o f f s e t y p o i n t + " p x "   :   w i n d o w . p a g e Y O f f s e t + e . c l i e n t Y - t i p o b j . o f f s e t H e i g h t - o f f s e t y p o i n t + " p x "  
 	 	 e l s e  
 	 	 	 t i p o b j . s t y l e . t o p = c u r Y + o f f s e t y p o i n t + " p x "  
 	 	 t i p 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 "  
 	 	  
 	 	 s t o p P l a y e r ( ) ;  
 	 	  
 	 	 i f   ( B r o w s e r N e e d s I E 6 W o r k a r o u n d s ( ) )  
 	 	 	 S h o w I F r a m e H a c k ( t i p o b j ) ;  
 	 }  
 }  
  
 f u n c t i o n   h i d e d d r i v e t i p ( ) {  
 	 i f   ( n s 6 | | i e ) {  
 	 	 i f   ( B r o w s e r N e e d s I E 6 W o r k a r o u n d s ( ) )  
 	 	 	 H i d e I F r a m e H a c k ( t i p o b j ) ;  
 	 	 e n a b l e t i p = f a l s e  
 	 	 t i p o b j . s t y l e . v i s i b i l i t y = " h i d d e n "  
 	 	 t i p o b j . s t y l e . l e f t = " - 1 0 0 0 p x "  
 	 	 t i p o b j . s t y l e . b a c k g r o u n d C o l o r = ' '  
 	 	 t i p o b j . s t y l e . w i d t h = ' '  
 	 }  
 }  
  
 d o c u m e n t . o n m o u s e m o v e = p o s i t i o n t i p  
  
 f u n c t i o n   s t o p P l a y e r ( )  
 {  
 	 v a r   p l a y e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( " w i n M e d i a P l a y e r " ) ;  
 	 / / d o c u m e n t . w i n M e d i a P l a y e r . a u d i o . S t o p ( )  
 }  
  
 f u n c t i o n   r e s e t P l a y e r ( )  
 {  
 	 v a r   p l a y e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( " M e d i a P l a y e r " ) ;  
 	  
 	 i f ( p l a y e r   ! =   n u l l )   {  
 	 	 s t o p P l a y e r ( ) ;  
 	 	 p l a y e r . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 	 }  
 }  
  
  
 f u n c t i o n   d o S u b m i t ( b t n I D )  
 {  
 	 v a r   o B u t t o n   =   d o c u m e n t . g e t E l e m e n t B y I d ( b t n I D ) ;  
 	 v a r   k e y c o d e ;  
 	 i f   ( w i n d o w . e v e n t )    
 	 	 k e y c o d e   =   w i n d o w . e v e n t . k e y C o d e ;  
 	 e l s e    
 	 	 i f   ( e )   k e y c o d e   =   e . w h i c h ;  
 	 i f   ( k e y c o d e   = =   1 3 ) {  
 	 	 i f ( o B u t t o n   ! =   n u l l )   {  
 	 	 	 o B u t t o n . f o r m . s u b m i t ( ) ;  
 	 	 }  
 	 }  
 } 
