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