ÿþ/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
 *   D r o p   D o w n /   O v e r l a p p i n g   C o n t e n t -   ©   D y n a m i c   D r i v e   ( 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   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  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
  
 f u n c t i o n   g e t p o s O f f s e t ( o v e r l a y ,   o f f s e t t y p e ) {  
 v a r   t o t a l o f f s e t = ( o f f s e t t y p e = = " l e f t " ) ?   o v e r l a y . o f f s e t L e f t   :   o v e r l a y . o f f s e t T o p ;  
 v a r   p a r e n t E l = o v e r l a y . o f f s e t P a r e n t ;  
 w h i l e   ( p a r e n t E l ! = n u l l ) {  
 t o t a l o f f s e t = ( o f f s e t t y p e = = " l e f t " ) ?   t o t a l o f f s e t + p a r e n t E l . o f f s e t L e f t   :   t o t a l o f f s e t + p a r e n t E l . o f f s e t T o p ;  
 p a r e n t E l = p a r e n t E l . o f f s e t P a r e n t ;  
 }  
 r e t u r n   t o t a l o f f s e t ;  
 }  
  
 f u n c t i o n   o v e r l a y ( c u r o b j ,   s u b o b j s t r ,   o p t _ p o s i t i o n ) {  
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ) {  
 v a r   s u b o b j = d o c u m e n t . g e t E l e m e n t B y I d ( s u b o b j s t r )  
 s u b o b j . s t y l e . d i s p l a y = ( s u b o b j . s t y l e . d i s p l a y ! = " b l o c k " ) ?   " b l o c k "   :   " n o n e "  
 v a r   x p o s = g e t p o s O f f s e t ( c u r o b j ,   " l e f t " ) + ( ( t y p e o f   o p t _ p o s i t i o n ! = " u n d e f i n e d "   & &   o p t _ p o s i t i o n . i n d e x O f ( " r i g h t " ) ! = - 1 ) ?   - ( s u b o b j . o f f s e t W i d t h - c u r o b j . o f f s e t W i d t h )   :   0 )    
 v a r   y p o s = g e t p o s O f f s e t ( c u r o b j ,   " t o p " ) + ( ( t y p e o f   o p t _ p o s i t i o n ! = " u n d e f i n e d "   & &   o p t _ p o s i t i o n . i n d e x O f ( " b o t t o m " ) ! = - 1 ) ?   c u r o b j . o f f s e t H e i g h t   :   0 )  
 s u b o b j . s t y l e . l e f t = x p o s + " p x "  
 s u b o b j . s t y l e . t o p = y p o s + " p x "  
 r e t u r n   f a l s e  
 }  
 e l s e  
 r e t u r n   t r u e  
 }  
  
 f u n c t i o n   o v e r l a y c l o s e ( s u b o b j ) {  
 d o c u m e n t . g e t E l e m e n t B y I d ( s u b o b j ) . s t y l e . d i s p l a y = " n o n e "  
 } 
