ÿþf u n c t i o n   t o o l t i p _ f i n d P o s X ( o b j )    
 {  
     v a r   c u r l e f t   =   0 ;  
     i f   ( o b j . o f f s e t P a r e n t )    
     {  
         w h i l e   ( o b j . o f f s e t P a r e n t )    
                 {  
                         c u r l e f t   + =   o b j . o f f s e t L e f t  
                         o b j   =   o b j . o f f s e t P a r e n t ;  
                 }  
         }  
         e l s e   i f   ( o b j . x )  
                 c u r l e f t   + =   o b j . x ;  
         r e t u r n   c u r l e f t ;  
 }  
  
 f u n c t i o n   t o o l t i p _ f i n d P o s Y ( o b j )    
 {  
         v a r   c u r t o p   =   0 ;  
         i f   ( o b j . o f f s e t P a r e n t )    
         {  
                 w h i l e   ( o b j . o f f s e t P a r e n t )    
                 {  
                         c u r t o p   + =   o b j . o f f s e t T o p  
                         o b j   =   o b j . o f f s e t P a r e n t ;  
                 }  
         }  
         e l s e   i f   ( o b j . y )  
                 c u r t o p   + =   o b j . y ;  
         r e t u r n   c u r t o p ;  
 }  
  
 f u n c t i o n   t o o l t i p _ s h o w ( t o o l t i p I d ,   p a r e n t I d ,   p o s X ,   p o s Y )  
 {  
         i t   =   d o c u m e n t . g e t E l e m e n t B y I d ( t o o l t i p I d ) ;  
          
         i f   ( ( i t . s t y l e . t o p   = =   ' '   | |   i t . s t y l e . t o p   = =   0 )    
                 & &   ( i t . s t y l e . l e f t   = =   ' '   | |   i t . s t y l e . l e f t   = =   0 ) )  
         {  
                 / /   n e e d   t o   f i x a t e   d e f a u l t   s i z e   ( M S I E   p r o b l e m )  
                 i t . s t y l e . w i d t h   =   i t . o f f s e t W i d t h ;  
                 i t . s t y l e . h e i g h t   =   i t . o f f s e t H e i g h t ;  
                  
                 i m g   =   d o c u m e n t . g e t E l e m e n t B y I d ( p a r e n t I d ) ;    
          
                 / /   i f   t o o l t i p   i s   t o o   w i d e ,   s h i f t   l e f t   t o   b e   w i t h i n   p a r e n t    
                 / / i f   ( p o s X   +   i t . o f f s e t W i d t h   >   i m g . o f f s e t W i d t h )   p o s X   =   i m g . o f f s e t W i d t h   -   i t . o f f s e t W i d t h ;  
                 / / i f   ( p o s X   <   0   )   p o s X   =   0 ;    
                  
                 x   =   t o o l t i p _ f i n d P o s X ( i m g )   +   p o s X ;  
                 y   =   t o o l t i p _ f i n d P o s Y ( i m g )   +   p o s Y ;  
                  
                 i t . s t y l e . t o p   =   y ;  
                 i t . s t y l e . l e f t   =   x ;  
         }  
          
         i t . s t y l e . v i s i b i l i t y   =   ' v i s i b l e ' ;    
 }  
  
 f u n c t i o n   t o o l t i p _ h i d e ( i d )  
 {  
         i t   =   d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ;    
         i t . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;    
 }  
 
