ÿþ 
 f u n c t i o n   c h e c k S e a r c h ( M y F o r m )    
 {  
 	 v a r   k e y w o r d = t r i m s t r i n g ( M y F o r m . k e y w o r d . v a l u e ) ;  
 	 i f   ( k e y w o r d = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   t h o n g   t i n   d e   t i m   k i e m " ) ;    
 	 	 M y F o r m . k e y w o r d . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( ( k e y w o r d . s e a r c h ( " s c r i p " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " o b j e c " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " a p p l e " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " T h o n g   t i n   t i m   k i e m   k h o n g   h o p   l e . " ) ;  
 	 	 M y F o r m . k e y w o r d . 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 a r c h E N ( M y F o r m )    
 {  
 	 v a r   k e y w o r d = t r i m s t r i n g ( M y F o r m . k e y w o r d . v a l u e ) ;  
 	 i f   ( k e y w o r d = = " " )    
 	 {    
 	 	 a l e r t ( " P l e a s e   i n p u t   y o u r   k e y w o r d " ) ;    
 	 	 M y F o r m . k e y w o r d . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( ( k e y w o r d . s e a r c h ( " s c r i p " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " o b j e c " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " a p p l e " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " Y o u r   k e y w o r d   i s   n o t   v a l i d . " ) ;  
 	 	 M y F o r m . k e y w o r d . 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 a r c h _ D e t a i l ( M y F o r m )    
 {  
 	 v a r   k e y w o r d = t r i m s t r i n g ( M y F o r m . k e y w o r d . v a l u e ) ;  
 	  
 	 i f   ( ( k e y w o r d . s e a r c h ( " s c r i p " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " o b j e c " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " a p p l e " ) > = 0 ) | | ( k e y w o r d . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " T h o n g   t i n   t i m   k i e m   k h o n g   h o p   l e . " ) ;  
 	 	 M y F o r m . k e y w o r d . 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 M o u s e O v e r M e n u L e v e l 2 ( i t e m )  
 {  
 	 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 = ' # F C F 8 D 4 '  
 	 }  
 }  
 	  
 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   c h e c k F e e d b a c k F o r m ( f r m F o r m )  
 {  
 	 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 . 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 . 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 . 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 . 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 . 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 . 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 ( f r m F o r m )  
 {  
 	 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 . 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   f u l l n a m e . " ) ;  
 	 	 f r m F o r m . 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   f u l l n a m e   i s   n o t   v a l i d . " ) ;  
 	 	 f r m F o r m . 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 . 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 . 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   n o t   v a l i d . " ) ;  
 	 	 f r m F o r m . 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   S u b m i t _ o n c l i c k ( M y F o r m )  
 {    
 	 v a r   t x t f u l l n a m e _ s e n d e r = t r i m s t r i n g ( M y F o r m . f u l l n a m e _ s e n d e r . v a l u e ) ;  
 	 v a r   t x t e m a i l _ s e n d e r = t r i m f u l l s t r i n g ( M y F o r m . e m a i l _ s e n d e r . v a l u e ) ;    
 	 v a r   t x t f u l l n a m e _ r e c e i v e r = t r i m s t r i n g ( M y F o r m . f u l l n a m e _ r e c e i v e r . v a l u e ) ;    
 	 v a r   t x t e m a i l _ r e c e i v e r = t r i m f u l l s t r i n g ( M y F o r m . e m a i l _ r e c e i v e r . v a l u e ) ;    
 	 i f   ( t x t f u l l n a m e _ s e n d e r = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   h o   t e n   n g u o i   g u i . " ) ;    
 	 	 M y F o r m . f u l l n a m e _ s e n d e r . v a l u e = " " ;  
 	 	 M y F o r m . f u l l n a m e _ s e n d e r . 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 _ s e n d e r = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   e m a i l   c u a   n g u o i   g u i . " ) ;    
 	 	 M y F o r m . e m a i l _ s e n d e r . v a l u e = " " ;  
 	 	 M y F o r m . e m a i l _ s e n d e r . 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 _ s e n d e r ) )  
 	 {    
 	 	 a l e r t   ( " E m a i l   c u a   n g u o i   g u i   k h o n g   h o p   l e . " ) ;    
 	 	 M y F o r m . e m a i l _ s e n d e r . 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 _ r e c e i v e r = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   h o   t e n   n g u o i   n h a n . " ) ;    
 	 	 M y F o r m . f u l l n a m e _ r e c e i v e r . v a l u e = " " ;  
 	 	 M y F o r m . f u l l n a m e _ r e c e i v e r . 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 _ r e c e i v e r = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   e m a i l   c u a   n g u o i   n h a n . " ) ;    
 	 	 M y F o r m . e m a i l _ r e c e i v e r . v a l u e = " " ;  
 	 	 M y F o r m . e m a i l _ r e c e i v e r . 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 _ r e c e i v e r ) )  
 	 {      
 	 	 a l e r t   ( " E m a i l   c u a   n g u o i   n h a n   k h o n g   h o p   l e . " ) ;    
 	 	 M y F o r m . e m a i l _ r e c e i v e r . 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 V o t e ( )  
 {  
 	 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 . 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 ( ) ;  
 	 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 )  
 {  
 	 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   , ' i t e m v o t e ' , ' 5 2 0 ' , ' 3 1 0 ' ) ;  
 }  
  
 f u n c t i o n   c l o s e E r r o r ( e r r _ d i v )   { 
 	 v a r   d i v O b j = M M _ f i n d O b j ( e r r _ d i v ) ; 
 	 i f   ( d i v O b j ! = n u l l )   { 
 	 	 d i v O b j . s t y l e . v i s i b i l i t y = " h i d d e n " ; 
 	 } 
 	 i f   ( b r o w s e r . i s I E )   { 
 	 	 v a r   i f r a m e O b j   =   M M _ f i n d O b j ( e r r _ d i v + " I f r a m e " ) ; 
 	 	 i f   ( i f r a m e O b j ! = n u l l )   { 
 	 	 	 i f r a m e O b j . 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   v a l i d a t e S e a r c h L v 2 _ E n ( i d K e y w o r d ) 
 { 
 	 / / v a r   f o   =   f r m O b j ; 
 	 v a r   d = n e w   D a t e ( ) ; 
 	 m D a y = d . g e t D a t e ( ) ; 
 	 m M o n = d . g e t M o n t h ( ) + 1 ; 
 	 m Y e a r = d . g e t F u l l Y e a r ( ) ; 
 	 m T o d a y = m M o n   +   " / " +   m D a y   +   " / " +   m Y e a r ; 
 / * 
 	 i f   ( i s B l a n k ( f o . E n C o n t e n t 1 _ E n S e a r c h 1 _ t x t K e y w o r d . v a l u e ) )   { 
 	 	 s h o w E r r o r ( f o , " P l e a s e   i n p u t   y o u r   k e y w o r d   t o   s e a r c h " , " e r r o r " , f o . E n C o n t e n t 1 _ E n S e a r c h 1 _ t x t K e y w o r d ) ; 
 	 
   	 	 r e t u r n   f a l s e ; 
 	 } 
 	 	 r e t u r n   t r u e ; 
 * / 	 	 
 	 v a r   t x t K e y w o r d   =   d o c u m e n t . g e t E l e m e n t B y I d ( i d K e y w o r d ) ; 
 	 i f   ( i s B l a n k ( t x t K e y w o r d . v a l u e ) )   { 
 	 	 s h o w E r r o r ( " P l e a s e   i n p u t   y o u r   k e y w o r d   t o   s e a r c h " , " e r r o r " , t x t K e y w o r d ) ; 
   	 	 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   v a l i d a t e S e a r c h L v 2 _ V n ( i d K e y w o r d ) 
 { 
 / * 
 	 v a r   d = n e w   D a t e ( ) ; 
 	 m D a y = d . g e t D a t e ( ) ; 
 	 m M o n = d . g e t M o n t h ( ) + 1 ; 
 	 m Y e a r = d . g e t F u l l Y e a r ( ) ; 
 	 m T o d a y = m M o n   +   " / " +   m D a y   +   " / " +   m Y e a r ; 
 * / 
 	 v a r   t x t K e y w o r d   =   d o c u m e n t . g e t E l e m e n t B y I d ( i d K e y w o r d ) ; 
 	 i f   ( i s B l a n k ( t x t K e y w o r d . v a l u e ) )   { 
 	 	 s h o w E r r o r ( " V u i   l ò n g   n h ­p   t ë  k h o á   Ã  t h ñc   h i Çn   t ì m   k i ¿m " , " e r r o r " , t x t K e y w o r d ) ; 
   	 	 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   s h o w E r r o r ( e r r _ s t r , e r r _ d i v , i n p u t )   { 
 
 	 v a r   x   =   g e t P a g e O f f s e t L e f t ( i n p u t ) ; 
 	 v a r   y   =   g e t P a g e O f f s e t T o p ( i n p u t ) ; 
 	 
 	 v a r   o b j C o n   =   M M _ f i n d O b j ( e r r _ d i v + " C o n t e n t " ) ; 
 	 v a r   d i v O b j   =   M M _ f i n d O b j ( e r r _ d i v ) ; 
 	 	 	 
 	 i f   ( o b j C o n   ! =   n u l l )   { 
 	 	 o b j C o n . i n n e r H T M L = " < p > " + e r r _ s t r + " < / p > " ; 
 	 } 
 	 
 	 i f   ( d i v O b j   ! =   n u l l )   { 
 	 	 d i v O b j . s t y l e . l e f t   =   ( x + 4 ) + " p x " ; 
 	 	 d i v O b j . s t y l e . t o p   =   y + 2 0 + " p x " ; 
 	 	 d i v 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 " ; 
 	 } 
 	 
 
 	 i f   ( b r o w s e r . i s I E )   { 
 
 	 	 v a r   i f r a m e O b j   =   M M _ f i n d O b j ( e r r _ d i v + " I f r a m e " ) ; 
 	 	 i f   ( i f r a m e O b j   ! =   n u l l   & &   d i v O b j ! = n u l l )   { 
 	 	 	 i f r a m e O b j . s t y l e . w i d t h   =   d i v O b j . o f f s e t W i d t h + " p x " ; 
 	 	 	 i f r a m e O b j . s t y l e . h e i g h t   =   d i v O b j . o f f s e t H e i g h t + " p x " ; 
 	 	 	 i f r a m e O b j . s t y l e . l e f t   =   d i v O b j . s t y l e . l e f t ; 
 	 	 	 i f r a m e O b j . s t y l e . t o p   =   d i v O b j . s t y l e . t o p ; 
 	 	 	 i f r a m e 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 " ; 
 	 	 } 
 	 } 
 
 	 i n p u t . f o c u s ( ) ; 
 / / 	 i n p u t . s t y l e . b a c k g r o u n d C o l o r = " # e b e b e b " ; 
 	 r e t u r n   f a l s e ; 
 } 
 
 f u n c t i o n   M M _ f i n d O b j ( n ,   d )   { 
 	 / / v 4 . 0 1 
 	 v a r   p ,   i ,   x ; 
 	 i f   ( ! d )   { 
 	 	 d   =   d o c u m e n t ; 
 	 } 
 	 i f   ( ( p = n . i n d e x O f ( " ? " ) ) > 0   & &   p a r e n t . f r a m e s . l e n g t h )   { 
 	 	 d   =   p a r e n t . f r a m e s [ n . s u b s t r i n g ( p + 1 ) ] . d o c u m e n t ; 
 	 	 n   =   n . s u b s t r i n g ( 0 ,   p ) ; 
 	 } 
 	 i f   ( ! ( x = d [ n ] )   & &   d . a l l )   { 
 	 	 x   =   d . a l l [ n ] ; 
 	 } 
 	 f o r   ( i = 0 ;   ! x   & &   i < d . f o r m s . l e n g t h ;   i + + )   { 
 	 	 x   =   d . f o r m s [ i ] [ n ] ; 
 	 } 
 	 f o r   ( i = 0 ;   ! x   & &   d . l a y e r s   & &   i < d . l a y e r s . l e n g t h ;   i + + )   { 
 	 	 x   =   M M _ f i n d O b j ( n ,   d . l a y e r s [ i ] . d o c u m e n t ) ; 
 	 } 
 	 i f   ( ! x   & &   d . g e t E l e m e n t B y I d )   { 
 	 	 x   =   d . g e t E l e m e n t B y I d ( n ) ; 
 	 } 
 	 r e t u r n   x ; 
 } 
 
 f u n c t i o n   g e t P a g e O f f s e t L e f t ( e l )   { 
 
     v a r   x ; 
 
     / /   R e t u r n   t h e   x   c o o r d i n a t e   o f   a n   e l e m e n t   r e l a t i v e   t o   t h e   p a g e . 
     x   =   e l . o f f s e t L e f t ; 
     i f   ( e l . o f f s e t P a r e n t   ! =   n u l l ) 
         x   + =   g e t P a g e O f f s e t L e f t ( e l . o f f s e t P a r e n t ) ; 
 
     r e t u r n   x ; 
 } 
 
 f u n c t i o n   g e t P a g e O f f s e t T o p ( e l )   { 
 
     v a r   y ; 
 
     / /   R e t u r n   t h e   x   c o o r d i n a t e   o f   a n   e l e m e n t   r e l a t i v e   t o   t h e   p a g e . 
     y   =   e l . o f f s e t T o p ; 
     i f   ( e l . o f f s e t P a r e n t   ! =   n u l l ) 
         y   + =   g e t P a g e O f f s e t T o p ( e l . o f f s e t P a r e n t ) ; 
 
     r e t u r n   y ; 
 } 
 
 v a r   b r o w s e r   =   n e w   B r o w s e r ( ) ; 
 
 f u n c t i o n   B r o w s e r ( )   { 
 
     v a r   u a ,   s ,   i ; 
 
     t h i s . i s I E         =   f a l s e ;     / /   I n t e r n e t   E x p l o r e r 
     t h i s . i s O P         =   f a l s e ;     / /   O p e r a 
     t h i s . i s N S         =   f a l s e ;     / /   N e t s c a p e 
     t h i s . v e r s i o n   =   n u l l ; 
 
     u a   =   n a v i g a t o r . u s e r A g e n t ; 
 
     s   =   " O p e r a " ; 
     i f   ( ( i   =   u a . i n d e x O f ( s ) )   > =   0 )   { 
         t h i s . i s O P   =   t r u e ; 
         t h i s . v e r s i o n   =   p a r s e F l o a t ( u a . s u b s t r ( i   +   s . l e n g t h ) ) ; 
         r e t u r n ; 
     } 
 
     s   =   " N e t s c a p e 6 / " ; 
     i f   ( ( i   =   u a . i n d e x O f ( s ) )   > =   0 )   { 
         t h i s . i s N S   =   t r u e ; 
         t h i s . v e r s i o n   =   p a r s e F l o a t ( u a . s u b s t r ( i   +   s . l e n g t h ) ) ; 
         r e t u r n ; 
     } 
 
     / /   T r e a t   a n y   o t h e r   " G e c k o "   b r o w s e r   a s   N e t s c a p e   6 . 1 . 
 
     s   =   " G e c k o " ; 
     i f   ( ( i   =   u a . i n d e x O f ( s ) )   > =   0 )   { 
         t h i s . i s N S   =   t r u e ; 
         t h i s . v e r s i o n   =   6 . 1 ; 
         r e t u r n ; 
     } 
 
     s   =   " M S I E " ; 
     i f   ( ( i   =   u a . i n d e x O f ( s ) ) )   { 
         t h i s . i s I E   =   t r u e ; 
         t h i s . v e r s i o n   =   p a r s e F l o a t ( u a . s u b s t r ( i   +   s . l e n g t h ) ) ; 
         r e t u r n ; 
     } 
 } 
 
 f u n c t i o n   i s B l a n k ( s t r )   { 
 	 i f ( t r i m s t r i n g ( s t r )   = =   " "   )   
 	 	 r e t u r n   t r u e   ; 
 	 r e t u r n   f a l s 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 "  
 	 	  
 	 	 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  
 
