ÿþ/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / /  
 / /   S o l u t i o n   P a r t n e r ' s   A S P . N E T   H i e r a r c h i c a l   M e n u   C o n t r o l   / /  
 / /   C o p y r i g h t   ( c )   2 0 0 2 - 2 0 0 6                                                             / /  
 / /   J o n   H e n n i n g   -   S o l u t i o n   P a r t n e r ' s   I n c                                   / /      
 / /   j h e n n i n g @ s o l p a r t . c o m       -       h t t p : / / w w w . s o l p a r t . c o m         / /  
 / /   C o m p a t i b l e   M e n u   V e r s i o n :     < M i n :   1 4 0 0 >                           / /  
 / /                                                       < M a x :   1 . 6 . 1 . 0 >                           / /  
 / /   < S c r i p t   V e r s i o n :   1 6 1 1 >                                                               / /  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / /  
 v a r   m _ o S o l p a r t M e n u ;  
 i f   ( m _ o S o l p a r t M e n u   = =   n u l l )  
 	 m _ o S o l p a r t M e n u   =   n e w   A r r a y ( ) ;   / / s t o r e s   a l l   m e n u   o b j e c t s   ( S o l p a r t M e n u )   i n   a r r a y    
 v a r   m _ s p m _ s B r o w s e r ;  
 v a r   m _ s p m _ s V e r s i o n ;  
 f u n c t i o n   s p m _ i n i t M y M e n u ( o X M L ,   o C t l )       / / C r e a t e s   S o l p a r t M e n u   o b j e c t   a n d   c a l l s   g e n e r a t e   m e t h o d  
 {  
         m _ o S o l p a r t M e n u [ o C t l . i d ]   =   n e w   S o l p a r t M e n u ( o C t l ) ;  
         m _ o S o l p a r t M e n u [ o C t l . i d ] . G e n e r a t e M e n u H T M L ( o X M L ) ;  
 }  
      
 / / - - - - - - -   C o n s t r u c t o r   - - - - - - - / /  
 f u n c t i o n   S o l p a r t M e n u ( o )  
 {  
     / / 0   l à   s p a m   c h éa   m e n u  
     _ _ d b ( o . i d   +   '   -   c o n s t r u c t o r ' ) ;  
     / /     v a r   m e   =   t h i s ;     / / a l l o w   a t t a c h e d   e v e n t s   t o   r e f e r e n c e   t h i s  
     / / - - -   D a t a   P r o p e r t i e s   - - - / /  
     t h i s . s y s t e m I m a g e s P a t h = s p m _ g e t A t t r ( o ,   ' S y s I m g P a t h ' ,   ' ' ) ;  
     t h i s . i c o n I m a g e s P a t h = s p m _ g e t A t t r ( o ,   ' I c o n I m g P a t h ' ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
      
     t h i s . x m l   =   s p m _ g e t A t t r ( o ,   ' X M L ' ,   ' ' ) ;  
      
     t h i s . x m l F i l e N a m e   =   s p m _ g e t A t t r ( o ,   ' X M L F i l e N a m e ' ,   ' ' ) ;  
      
     / / - - -   A p p e a r a n c e   P r o p e r t i e s   - - - / /  
     t h i s . f o n t S t y l e = s p m _ g e t A t t r ( o ,   ' F o n t S t y l e ' ,   ' f o n t - f a m i l y :   a r i a l ; ' ) ;  
     t h i s . b a c k C o l o r = s p m _ g e t A t t r ( o ,   ' B a c k C o l o r ' ) ;      
     t h i s . f o r e C o l o r = s p m _ g e t A t t r ( o ,   ' F o r e C o l o r ' ) ;  
     t h i s . i c o n B a c k C o l o r = s p m _ g e t A t t r ( o ,   ' I c o n B a c k C o l o r ' ) ;  
     t h i s . h l C o l o r = s p m _ g e t A t t r ( o ,   ' H l C o l o r ' ,   ' ' ) ;  
     t h i s . s h C o l o r = s p m _ g e t A t t r ( o ,   ' S h C o l o r ' ,   ' ' ) ;    
     t h i s . s e l C o l o r = s p m _ g e t A t t r ( o ,   ' S e l C o l o r ' ) ;  
     t h i s . s e l F o r e C o l o r = s p m _ g e t A t t r ( o ,   ' S e l F o r e C o l o r ' ) ;  
     t h i s . s e l B o r d e r C o l o r = s p m _ g e t A t t r ( o ,   ' S e l B o r d e r C o l o r ' ) ;  
     t h i s . m e n u A l i g n m e n t   =   s p m _ g e t A t t r ( o ,   ' M e n u A l i g n m e n t ' ,   ' L e f t ' ) ;  
     t h i s . d i s p l a y = s p m _ g e t A t t r ( o ,   ' D i s p l a y ' ,   ' h o r i z o n t a l ' ) ;  
     t h i s . M B L e f t H T M L = s p m _ g e t A t t r ( o ,   ' M B L H T M L ' ,   ' ' ) ;  
     t h i s . M B R i g h t H T M L = s p m _ g e t A t t r ( o ,   ' M B R H T M L ' ,   ' ' ) ;  
  
     t h i s . r o o t A r r o w   =   s p m _ g e t A t t r ( o ,   ' R o o t A r r o w ' ,   ' 0 ' ) ;  
     t h i s . r o o t A r r o w I m a g e   =   s p m _ g e t A t t r ( o ,   ' R o o t A r r o w I m a g e ' ,   ' ' ) ;  
     t h i s . a r r o w I m a g e   =   s p m _ g e t A t t r ( o ,   ' A r r o w I m a g e ' ,   ' ' ) ;  
     t h i s . b a c k I m a g e = s p m _ g e t A t t r ( o ,   ' B a c k I m a g e ' ,   ' ' ) ;  
  
 	 t h i s . s u p p o r t s T r a n s i t i o n s   =   s p m _ g e t A t t r ( o ,   ' S u p p o r t s T r a n s ' ,   ' 0 ' ) ;  
  
     / / - - -   T r a n s i t i o n   P r o p e r t e i s   - - - / /  
     / / t h i s . m e n u E f f e c t s S t y l e = s p m _ g e t A t t r ( o ,   ' M e n u E f f e c t s S t y l e ' ,   ' ' ) ;  
     t h i s . m e n u T r a n s i t i o n L e n g t h = s p m _ g e t A t t r ( o ,   ' M e n u T r a n s i t i o n L e n g t h ' ,   . 3 ) ;  
     t h i s . m e n u T r a n s i t i o n = s p m _ g e t A t t r ( o ,   ' M e n u T r a n s i t i o n ' ,   ' N o n e ' ) ;  
     t h i s . m e n u T r a n s i t i o n S t y l e = s p m _ g e t A t t r ( o ,   ' M e n u T r a n s i t i o n S t y l e ' ,   ' ' ) ;  
     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t   =   n e w   S o l p a r t M e n u T r a n s i t i o n O b j e c t ( ) ;  
      
     / / - - -   B e h a v i o r   P r o p e r t e i s   - - - / /  
     t h i s . m o v e a b l e   =   s p m _ g e t A t t r ( o ,   ' M o v e a b l e ' ,   ' 0 ' ) ;  
     t h i s . m o D i s p l a y = s p m _ g e t A t t r ( o ,   ' M O D i s p l a y ' ,   ' H i g h L i g h t ' ) ;  
     t h i s . m o E x p a n d = s p m _ g e t A t t r ( o ,   ' M O E x p a n d ' ,   " - 1 " ) ;  
     t h i s . m o u t D e l a y = s p m _ g e t A t t r ( o ,   ' M O u t D e l a y ' ,   " 0 " ) ;  
     t h i s . m i n D e l a y = s p m _ g e t A t t r ( o ,   ' M I n D e l a y ' ,   " 0 " ) ;  
     t h i s . m i n D e l a y T y p e = n u l l ;  
 	 t h i s . m i n D e l a y T i m e r = n u l l ;  
 	 t h i s . m i n D e l a y O b j = n u l l ;  
 	      
     i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i ' ) 	 / / s a f a r i   h a s   i s s u e s   w i t h   m o u s e o u t d e l a y . . .  
 	 	 t h i s . m o u t D e l a y   =   5 0 0 0 ;  
 	 	  
     t h i s . t a r g e t = s p m _ g e t A t t r ( o ,   ' t a r g e t ' ,   " " ) ;  
     t h i s . m o S c r o l l = s p m _ g e t A t t r ( o ,   ' M O S c r o l l ' ,   " - 1 " ) ;  
  
     / / - - -   S i z i n g   P r o p e r t i e s   - - - / /  
     t h i s . m e n u B a r H e i g h t = s p m _ f i x U n i t ( s p m _ g e t A t t r ( o ,   ' M e n u B a r H e i g h t ' ,   ' 0 ' ) ) ;  
     t h i s . m e n u I t e m H e i g h t = s p m _ f i x U n i t ( s p m _ g e t A t t r ( o ,   ' M e n u I t e m H e i g h t ' ,   ' 0 ' ) ) ;  
     t h i s . i c o n W i d t h = s p m _ f i x U n i t ( s p m _ g e t A t t r ( o ,   ' I c o n W i d t h ' ,   ' 0 ' ) ) ;  
     t h i s . b o r d e r W i d t h = s p m _ g e t A t t r ( o ,   ' B o r d e r W i d t h ' ,   ' 1 ' ) ;  
  
     / / - - -   C S S   P r o p e r t i e s   - - - / /  
     t h i s . c s s M e n u C o n t a i n e r = s p m _ g e t A t t r ( o ,   ' C S S M e n u C o n t a i n e r ' ,   ' ' ) ;  
     t h i s . c s s M e n u B a r = s p m _ g e t A t t r ( o ,   ' C S S M e n u B a r ' ,   ' ' ) ;  
     t h i s . c s s M e n u I t e m = s p m _ g e t A t t r ( o ,   ' C S S M e n u I t e m ' ,   ' ' ) ;  
     t h i s . c s s M e n u I c o n = s p m _ g e t A t t r ( o ,   ' C S S M e n u I c o n ' ,   ' ' ) ;  
     t h i s . c s s S u b M e n u = s p m _ g e t A t t r ( o ,   ' C S S S u b M e n u ' ,   ' ' ) ;  
     t h i s . c s s M e n u B r e a k = s p m _ g e t A t t r ( o ,   ' C S S M e n u B r e a k ' ,   ' ' ) ;  
     t h i s . c s s M e n u I t e m S e l = s p m _ g e t A t t r ( o ,   ' C S S M e n u I t e m S e l ' ,   ' ' ) ;  
     t h i s . c s s M e n u A r r o w = s p m _ g e t A t t r ( o ,   ' C S S M e n u A r r o w ' ,   ' ' ) ;  
     t h i s . c s s M e n u R o o t A r r o w = s p m _ g e t A t t r ( o ,   ' C S S R o o t M e n u A r w ' ,   ' ' ) ;  
     t h i s . c s s M e n u S c r o l l I t e m = s p m _ g e t A t t r ( o ,   ' C S S S c r o l l I t e m ' ,   ' ' ) ;  
  
 	 / / f o r   r i g h t   t o   l e f t   ( r t l )   m e n u s  
 	 t h i s . d i r e c t i o n   =   s p m _ g e t C u r r e n t S t y l e ( d o c u m e n t . b o d y ,   ' d i r e c t i o n ' ) ;  
  
 	 t h i s . u s e I F r a m e s = ( s p m _ g e t A t t r ( o ,   ' u s e I F r a m e s ' ,   ' 1 ' )   ! =   ' 0 '   & &   s p m _ s u p p o r t s I F r a m e T r i c k ( ) ) ; 	  
 	  
 	 t h i s . d e l a y S u b m e n u L o a d = ( s p m _ g e t A t t r ( o ,   ' d e l a y S u b m e n u L o a d ' ,   ' 0 ' )   ! =   ' 0 '   & &   s p m _ n e e d s S u b M e n u D e l a y ( ) ) ; 	  
 	  
      
     / / - - - -   m e t h o d s   - - - / /  
     / / t h i s . G e n e r a t e M e n u H T M L = _ _ G e n e r a t e M e n u H T M L ;  
  
     / / - - - - -   p r i v a t e   - - - - / /  
     t h i s . _ m _ s N S p a c e   =   o . i d ;                               / / s t o r e s   n a m e s p a c e   f o r   m e n u  
     t h i s . _ m _ s O u t e r T a b l e s   =   ' ' ;                         / / s t o r e s   H T M L   f o r   s u b   m e n u s  
     t h i s . _ m _ o D O M ;                                                   / / s t o r e s   X M L   D O M   o b j e c t  
 	 t h i s . _ m _ o M e n u   =   o ;                                         / / s t o r e s   c o n t a i n e r  
     t h i s . _ m _ o M e n u M o v e ;                                         / / s t o r e s   c o n t r o l   t h a t   i s   u s e d   f o r   m o v i n g   m e n u  
      
     t h i s . _ m _ o T b l M e n u B a r ;                                     / / s t o r e s   m e n u   c o n t a i n e r  
 	 t h i s . _ m _ a O p e n M e n u I D   =   n e w   A r r a y ( ) ; 	     / / s t o r e s   l i s t   o f   m e n u s   t h a t   a r e   c u r r e n t l y   d i s p l a y e d  
 	 t h i s . _ m _ b M o v i n g = f a l s e ;                                 / / f l a g   t o   d e t e r m i n e   m e n u   i s   b e i n g   d r a g g e d  
     t h i s . _ m _ d H i d e T i m e r   =   n u l l ;                         / / u s e d   t o   t i m e   w h e n   m o u s e   o u t   o c c u r e d   t o   a u t o   h i d e   m e n u   b a s e d   o n   m o u s e o u t d e l a y  
     t h i s . _ m _ o S c r o l l i n g M e n u   =   n u l l ; 	 	 	 	 / / u s e d   i n   s c r o l l i n g   m e n u   o n   m o u s e   o v e r  
  
 _ _ d b ( t h i s . _ m _ o M e n u . i d   +   '   -   c o n s t r u c t o r   e n d ' ) ;  
  
 }  
  
 / / - - -   D e s t r o y s   i n t e r r n a l   o b j e c t   r e f e r e n c e s   - - - / /  
 S o l p a r t M e n u . p r o t o t y p e . d e s t r o y   =   f u n c t i o n   ( )  
 {  
     t h i s . s y s t e m I m a g e s P a t h   =   n u l l ;  
     t h i s . i c o n I m a g e s P a t h   =   n u l l ;  
     t h i s . x m l   =   n u l l ;  
     t h i s . x m l F i l e N a m e   =   n u l l ;  
  
     / / - - -   A p p e a r a n c e   P r o p e r t i e s   - - - / /  
     t h i s . f o n t S t y l e   =   n u l l ;  
     t h i s . b a c k C o l o r   =   n u l l ;      
     t h i s . f o r e C o l o r   =   n u l l ;  
     t h i s . i c o n B a c k C o l o r   =   n u l l ;  
     t h i s . h l C o l o r   =   n u l l ;  
     t h i s . s h C o l o r   =   n u l l ;    
     t h i s . s e l C o l o r   =   n u l l ;  
     t h i s . s e l F o r e C o l o r   =   n u l l ;  
     t h i s . s e l B o r d e r C o l o r   =   n u l l ;  
     t h i s . m e n u A l i g n m e n t   =   n u l l ;  
     t h i s . d i s p l a y   =   n u l l ;  
  
     t h i s . r o o t A r r o w   =   n u l l ;  
     t h i s . r o o t A r r o w I m a g e   =   n u l l ;  
     t h i s . a r r o w I m a g e   =   n u l l ;  
     t h i s . b a c k I m a g e   =   n u l l ;  
  
     / / - - -   T r a n s i t i o n   P r o p e r t e i s   - - - / /  
     / / t h i s . m e n u E f f e c t s S t y l e   =   n u l l ;  
     t h i s . m e n u T r a n s i t i o n L e n g t h   =   n u l l ;  
     t h i s . m e n u T r a n s i t i o n   =   n u l l ;  
     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t   =   n u l l ;  
      
     / / - - -   B e h a v i o r   P r o p e r t e i s   - - - / /  
     t h i s . m o v e a b l e   =   n u l l ;  
     t h i s . m o D i s p l a y   =   n u l l ;  
     t h i s . m o E x p a n d   =   n u l l ;  
     t h i s . m o u t D e l a y   =   n u l l ;  
  
     / / - - -   S i z i n g   P r o p e r t i e s   - - - / /  
     t h i s . m e n u B a r H e i g h t   =   n u l l ;  
     t h i s . m e n u I t e m H e i g h t   =   n u l l ;  
     t h i s . i c o n W i d t h   =   n u l l ;  
     t h i s . b o r d e r W i d t h   =   n u l l ;  
  
     / / - - -   C S S   P r o p e r t i e s   - - - / /  
     t h i s . c s s M e n u C o n t a i n e r   =   n u l l ;  
     t h i s . c s s M e n u B a r   =   n u l l ;  
     t h i s . c s s M e n u I t e m   =   n u l l ;  
     t h i s . c s s M e n u I c o n   =   n u l l ;  
     t h i s . c s s S u b M e n u   =   n u l l ;  
     t h i s . c s s M e n u B r e a k   =   n u l l ;  
     t h i s . c s s M e n u I t e m S e l   =   n u l l ;  
     t h i s . c s s M e n u A r r o w   =   n u l l ;  
     t h i s . c s s M e n u R o o t A r r o w   =   n u l l ;  
      
     / / - - - -   m e t h o d s   - - - / /  
  
     / / - - - - -   p r i v a t e   - - - - / /  
     m _ o S o l p a r t M e n u [ t h i s . _ m _ s N S p a c e ]   =   n u l l ;  
  
     t h i s . _ m _ s N S p a c e   =   n u l l ;                                   / / s t o r e s   n a m e s p a c e   f o r   m e n u  
     t h i s . _ m _ s O u t e r T a b l e s   =   n u l l ;                         / / s t o r e s   H T M L   f o r   s u b   m e n u s  
     t h i s . _ m _ o D O M   =   n u l l ;                                         / / s t o r e s   X M L   D O M   o b j e c t  
 	 t h i s . _ m _ o M e n u   =   n u l l ;                                       / / s t o r e s   c o n t a i n e r  
     t h i s . _ m _ o M e n u M o v e   =   n u l l ;                               / / s t o r e s   c o n t r o l   t h a t   i s   u s e d   f o r   m o v i n g   m e n u  
      
     t h i s . _ m _ o T b l M e n u B a r   =   n u l l ;                           / / s t o r e s   m e n u   c o n t a i n e r  
 	 t h i s . _ m _ a O p e n M e n u I D   =   n u l l ; 	                         / / s t o r e s   l i s t   o f   m e n u s   t h a t   a r e   c u r r e n t l y   d i s p l a y e d  
 	 t h i s . _ m _ b M o v i n g   =   n u l l ;                                   / / f l a g   t o   d e t e r m i n e   m e n u   i s   b e i n g   d r a g g e d  
     t h i s . _ m _ d H i d e T i m e r   =   n u l l ;                             / / u s e d   t o   t i m e   w h e n   m o u s e   o u t   o c c u r e d   t o   a u t o   h i d e   m e n u   b a s e d   o n   m o u s e o u t d e l a y  
     t h i s . _ m _ o S c r o l l i n g M e n u   =   n u l l ; 	 	 	 	 	 / / u s e d   i n   s c r o l l i n g   m e n u   o n   m o u s e   o v e r  
      
 }  
  
 / / - - -   x m l   d o c u m e n t   l o a d e d   ( n o n - d a t a i s l a n d )   - - - / /  
 S o l p a r t M e n u . p r o t o t y p e . o n X M L L o a d   =   f u n c t i o n   ( )  
 {  
     t h i s . G e n e r a t e M e n u H T M L ( t h i s . _ m _ o D O M ) ;  
 }  
  
 / / - - -   G e n e r a t e s   m e n u   H T M L   t h r o u g h   p a s s e d   i n   X M L   D O M   - - - / /  
 S o l p a r t M e n u . p r o t o t y p e . G e n e r a t e M e n u H T M L   =   f u n c t i o n   ( o X M L )  
 {        
          
         _ _ d b ( t h i s . _ m _ o M e n u . i d   +   '   -   G e n e r a t e M e n u H T M L ' ) ;  
         / / ' G e n e r a t e s   t h e   m a i n   m e n u   b a r  
         v a r   s H T M L   =   ' ' ;  
         t h i s . _ m _ s O u t e r T a b l e s   =   ' ' ;  
  
 	 i f   ( o X M L   = =   n u l l )  
 	 {  
 	     i f   ( t h i s . _ m _ o D O M   = =   n u l l )  
 	     {  
 	         o X M L   =   s p m _ c r e a t e D O M D o c ( ) ;  
 	         t h i s . _ m _ o D O M   =   o X M L ;  
                 	      
 	         i f   ( t h i s . x m l . l e n g t h )  
 	             o X M L . l o a d X M L ( t h i s . x m l ) ;  
     	      
 	         i f   ( t h i s . x m l F i l e N a m e . l e n g t h )  
 	         {  
 	             o X M L . o n l o a d   =   e v a l ( ' o n x m l l o a d '   +   t h i s . _ m _ s N S p a c e ) ;  
 	             o X M L . l o a d ( t h i s . x m l F i l e N a m e ) ;  
 	             / / a l e r t ( o X M L ) ;  
 	             r e t u r n ;   / / a s y n c   l o a d  
 	         }  
             }  
 	 }  
 	 e l s e  
 	     t h i s . _ m _ o D O M   =   o X M L ;  
  
     i f   ( t h i s . d i s p l a y   = =   " v e r t i c a l " )  
     {  
             s H T M L   + =   ' < t a b l e   I D = " t b l '   +   t h i s . _ m _ s N S p a c e   +   ' M e n u B a r "   C E L L P A D D I N G = \ ' 0 \ '   C E L L S P A C I N G = \ ' 0 \ '   B O R D E R = " 0 "   C E L L P A D D I N G = \ ' 0 \ '   C E L L S P A C I N G = \ ' 0 \ '   C L A S S = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b c t r ' )   +   t h i s . c s s M e n u C o n t a i n e r )   +   ' "   H E I G H T = " 1 0 0 % "   S T Y L E = " v e r t i c a l - a l i g n :   c e n t e r ; " > \ n ' ; 	 / / r e m o v e d   p o s i t i o n :   r e l a t i v e ;     f o r   I E   a n d   d i s p l a y :   b l o c k ;   f o r   O p e r a  
             s H T M L   + =   M y I I f ( t h i s . M B L e f t H T M L . l e n g t h ,   ' < t r > \ n               < t d > '   +   t h i s . M B L e f t H T M L   +   ' < / t d > \ n < / t r > \ n ' ,   ' ' ) ;  
             s H T M L   + =   M y I I f ( N u m b e r ( t h i s . m o v e a b l e ) ,   ' < t r > \ n               < t d   I D = " t d '   +   t h i s . _ m _ s N S p a c e   +   ' M e n u M o v e "   h e i g h t = \ ' 3 p x \ '   s t y l e = \ ' c u r s o r :   m o v e ;   '   +   s p m _ g e t M e n u B o r d e r S t y l e ( t h i s )   +   ' \ ' > '   +   s p m _ g e t S p a c e r ( t h i s )   +   ' < / t d > \ n < / t r > \ n ' ,   ' ' ) ;  
             s H T M L   + =                   t h i s . G e t M e n u I t e m s ( t h i s . _ m _ o D O M . d o c u m e n t E l e m e n t ) ;  
             s H T M L   + =   '               < t r > < t d   H E I G H T = " 1 0 0 % " > '   +   s p m _ g e t S p a c e r ( t h i s )   +   ' < / t d > \ n '   ;  
             s H T M L   + =   '       < / t r > \ n ' ;  
             s H T M L   + =   M y I I f ( t h i s . M B R i g h t H T M L . l e n g t h ,   ' < t r > \ n               < t d > '   +   t h i s . M B R i g h t H T M L   +   ' < / t d > \ n < / t r > \ n ' ,   ' ' ) ;  
             s H T M L   + =   ' < / t a b l e > \ n ' ;  
             / / a l e r t ( s H T M L ) ;  
     }  
     e l s e  
     {  
             s H T M L   + =   ' < t a b l e   I D = " t b l '   +   t h i s . _ m _ s N S p a c e   +   ' M e n u B a r "   C E L L P A D D I N G = \ ' 0 \ '   C E L L S P A C I N G = \ ' 0 \ '   B O R D E R = " 0 "   C L A S S = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b c t r ' )   +   t h i s . c s s M e n u C o n t a i n e r )   +   ' "   W I D T H = " 1 0 0 % "   S T Y L E = " v e r t i c a l - a l i g n :   c e n t e r ;   " > \ n ' ; 	 / / r e m o v e d   p o s i t i o n :   r e l a t i v e ;     f o r   I E   a n d   d i s p l a y :   b l o c k ;   f o r   O p e r a  
             s H T M L   + =   ' 	 < t r > \ n ' ;  
             s H T M L   + =   M y I I f ( t h i s . M B L e f t H T M L . l e n g t h ,   ' < t d > '   +   t h i s . M B L e f t H T M L   +   ' < / t d > \ n ' ,   ' ' ) ;  
             s H T M L   + =   M y I I f ( N u m b e r ( t h i s . m o v e a b l e ) ,   '               < t d   I D = " t d '   +   t h i s . _ m _ s N S p a c e   +   ' M e n u M o v e "   w i d t h = \ ' 3 p x \ '   s t y l e = \ ' c u r s o r :   m o v e ;   '   +   s p m _ g e t M e n u B o r d e r S t y l e ( t h i s )   +   ' \ ' > '   +   s p m _ g e t S p a c e r ( t h i s )   +   ' < / t d > \ n ' ,   ' ' ) ;  
             s H T M L   + =   s p m _ g e t M e n u S p a c i n g I m a g e ( ' l e f t ' ,   t h i s ) ;  
             s H T M L   + =                   t h i s . G e t M e n u I t e m s ( t h i s . _ m _ o D O M . d o c u m e n t E l e m e n t ) ;  
             s H T M L   + =   s p m _ g e t M e n u S p a c i n g I m a g e ( ' r i g h t ' ,   t h i s ) ;  
             s H T M L   + =   M y I I f ( t h i s . M B R i g h t H T M L . l e n g t h ,   ' < t d > '   +   t h i s . M B R i g h t H T M L   +   ' < / t d > \ n ' ,   ' ' ) ;  
             s H T M L   + =   '       < / t r > \ n ' ;  
             s H T M L   + =   ' < / t a b l e > \ n ' ;  
             / / a l e r t ( s H T M L ) ;  
     }  
 	  
 	 t h i s . _ m _ o M e n u . i n n e r H T M L   =   s H T M L ;  
  
 	 t h i s . G e n e r a t e S u b M e n u s ( ) ;  
  
 	  
     t h i s . _ m _ o M e n u M o v e   =   s p m _ g e t B y I d ( ' t d '   +   t h i s . _ m _ s N S p a c e   +   ' M e n u M o v e ' ) ;  
  
     s p m _ g e t T a g s ( " B O D Y " ) [ 0 ] . o n c l i c k   =   s p m _ a p p e n d F u n c t i o n ( s p m _ g e t T a g s ( " B O D Y " ) [ 0 ] . o n c l i c k ,   ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . b o d y c l i c k ( ) ; ' ) ;   / / d o c u m e n t . b o d y . o n c l i c k   =   t h i s . b o d y c l i c k ;  
  
     t h i s . _ m _ o T b l M e n u B a r   =   s p m _ g e t B y I d ( ' t b l '   +   t h i s . _ m _ s N S p a c e   +   ' M e n u B a r ' ) ;    
      
     t h i s . f i r e E v e n t ( ' o n M e n u C o m p l e t e ' ) ;  
  
     _ _ d b ( t h i s . _ m _ o M e n u . i d   +   '   -   G e n e r a t e M e n u H T M L   e n d ' ) ;          
 }  
  
 / / t ¡o   c o d e   h t m l   c h o   c á c   m e n u   c o n  
 S o l p a r t M e n u . p r o t o t y p e . G e n e r a t e S u b M e n u s   =   f u n c t i o n   ( o X M L )    
 {  
 	 i f   ( t h i s . _ m _ s O u t e r T a b l e s . l e n g t h   >   0 )  
 	 {  
 	 	 	 v a r   o D i v   =   s p m _ g e t B y I d ( t h i s . _ m _ s N S p a c e   +   ' _ d i v O u t e r T a b l e s ' ) ;  
 	 	 	 i f   ( o D i v   = =   n u l l )  
 	 	 	 {  
 	 	 	 	 a l e r t ( ' I t   a p p e a r s   t h a t   y o u r   m e n u   d l l   i s   o u t   o f   s y n c   w i t h   y o u r   s c r i p t   f i l e . ' ) ;  
 	 	 	 	 r e t u r n ;  
 	 	 	 }  
 	 	 	  
 	 	 	 i f   ( t h i s . d e l a y S u b m e n u L o a d   ! =   ' 0 '   & &   d o c u m e n t . r e a d y S t a t e   ! =   ' c o m p l e t e ' )  
 	 	 	 	 r e t u r n ;  
 	 	 	 	 	 	 	  
 	 	         o D i v . i n n e r H T M L   =   t h i s . _ m _ s O u t e r T a b l e s ;  
 	 }  
 	 t h i s . _ m _ s O u t e r T a b l e s   =   ' ' ;  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u B a r E v e n t s ( s C t l )  
 {  
     r e t u r n   ' o n m o u s e o v e r = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B M O ( t h i s ) ; "   o n m o u s e o u t = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B M O U T ( t h i s ) ; "   o n c l i c k = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B C ( t h i s ,   e v e n t ) ; "   o n m o u s e d o w n = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B M D ( t h i s ) ; "   o n m o u s e u p = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B M U ( t h i s ) ; " ' ;  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u I t e m E v e n t s ( s C t l )  
 {  
     r e t u r n   ' o n m o u s e o v e r = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B I M O ( t h i s ) ; "   o n m o u s e o u t = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B I M O U T ( t h i s ) ; "   o n c l i c k = " m _ o S o l p a r t M e n u [ \ ' '   +   s C t l   +   ' \ ' ] . o n M B I C ( t h i s ,   e v e n t ) ; " ' ;  
 }  
  
 / / - - -   R e t u r n s   H T M L   f o r   m e n u   i t e m s   ( r e c u r s i v e   f u n c t i o n )   - - - / /  
 S o l p a r t M e n u . p r o t o t y p e . G e t M e n u I t e m s   =   f u n c t i o n   ( o P a r e n t )  
 {  
     v a r   o N o d e ;  
     v a r   s H T M L   =   ' ' ;  
     v a r   s I D ;  
     v a r   s P a r e n t I D ;  
     v a r   s C l i c k A c t i o n ;  
      
 	 f o r   ( v a r   i   =   0 ;   i   <   o P a r e n t . c h i l d N o d e s . l e n g t h ;   i + + )  
 	 {  
 	 	 o N o d e   =   o P a r e n t . c h i l d N o d e s [ i ] ;  
  
 	 	 i f   ( o N o d e . n o d e T y p e   ! =   3   & &   o N o d e . n o d e T y p e   ! =   8 )     / / e x c l u d e   n o d e T y p e   o f   T e x t   ( N e t s c a p e / M o z i l l a )   i s s u e !  
 	 	 {  
 	 	     / / ' d e t e r m i n e   i f   r o o t   l e v e l   i t e m   a n d   s e t   p a r e n t   i d   a c c o r d i n g l y  
 	 	     i f   ( o N o d e . p a r e n t N o d e . n o d e N a m e   ! =   " m e n u i t e m " )  
 	 	 	     s P a r e n t I D   =   " - 1 " ;  
 	 	     e l s e  
 	 	 	     s P a r e n t I D   =   o N o d e . p a r e n t N o d e . g e t A t t r i b u t e ( " i d " ) ;  
  
 	 	     i f   ( o N o d e . n o d e N a m e   = =   " m e n u i t e m " )  
 	 	 	     s I D   =   o N o d e . g e t A t t r i b u t e ( " i d " ) ;  
 	 	     e l s e  
 	 	 	     s I D   =   " " ;  
  
  
                 _ _ d b ( s I D   +   '   g e t m e n u i t e m s ' ) ;  
 	 	 	 s C l i c k A c t i o n   =   s p m _ g e t M e n u C l i c k A c t i o n ( o N o d e ,   t h i s ) ;  
  
                     i f   ( s P a r e n t I D   = =   " - 1 " ) 	 / / ' i f   t o p   l e v e l   m e n u   i t e m  
 	 	     {  
 	 	  
 	 	 	     i f   ( t h i s . d i s p l a y   = =   " v e r t i c a l " )  
 	 	 	 	     s H T M L   + =   " < t r > \ n " ;   / / ' i f   v e r t i c a l   d i s p l a y   t h e n   a d d   r o w s   f o r   e a c h   t o p   m e n u i t e m  
     	 	 	  
     	 	 	     i f   ( o N o d e . n o d e N a m e   = =   ' m e n u b r e a k ' )  
     	 	 	     {  
 	 	 	 	 	 i f   ( t h i s . d i s p l a y   = =   " v e r t i c a l " )  
 	 	 	 	 	 	 s H T M L   + =   " < t r > \ n " ;   / / ' i f   v e r t i c a l   d i s p l a y   t h e n   a d d   r o w s   f o r   e a c h   t o p   m e n u i t e m  
  
   	 	 	 	 	 v a r   s B r e a k H T M L   =   s p m _ g e t A t t r ( o N o d e ,   ' l e f t h t m l ' ,   ' ' )   +   s p m _ g e t A t t r ( o N o d e ,   ' r i g h t h t m l ' ,   ' ' ) ;  
   	 	 	 	 	 i f   ( s B r e a k H T M L . l e n g t h   >   0 )  
   	 	 	 	 	 {  
   	 	 	 	 	 	 s H T M L   + =   '       < t d   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b r k ' )   +   t h i s . c s s M e n u B r e a k )   +   ' " > '   +   s B r e a k H T M L   +   ' < / t d > \ n ' ;  
   	 	 	 	         }  
   	 	 	 	 	 e l s e  
   	 	 	 	 	 {  
   	 	 	 	 	 	 s H T M L   + =   '       < t d   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b r k ' )   +   t h i s . c s s M e n u B r e a k )   +   ' " > '   +   s p m _ g e t M e n u I m a g e ( ' s p a c e r . g i f ' ,   t h i s ,   t r u e ,   '   ' )   +   ' < / t d > \ n ' ;  
   	 	 	 	 	 }  
  
 	 	 	 	 	 i f   ( t h i s . d i s p l a y   = =   " v e r t i c a l " )  
 	 	 	 	 	 	 s H T M L   + =   " < / t r > \ n " ;  
     	 	 	     }  
     	 	 	     e l s e  
     	 	 	     {  
 	 	 	 	 	 s H T M L   + =   ' < t d > \ n < t a b l e   w i d t h = " 1 0 0 % "   C E L L P A D D I N G = " 0 "   C E L L S P A C I N G = " 0 "   b o r d e r = " 0 " > \ n < t r   i d = " t d '   +   t h i s . _ m _ s N S p a c e   +   s I D   +   ' "   '   +   s p m _ g e t M e n u B a r E v e n t s ( t h i s . _ m _ s N S p a c e )   +   '     c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b a r   s p m i t m ' )   +   t h i s . c s s M e n u B a r   +   '   '   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t M e n u I t e m C S S ( o N o d e ) )   +   ' "   s a v e c s s = " '   +   s p m _ g e t M e n u I t e m C S S ( o N o d e )   +   ' "   s a v e s e l c s s = " '   +   s p m _ g e t M e n u I t e m S e l C S S ( o N o d e )   +   ' "   m e n u c l i c k = " '   +   s C l i c k A c t i o n   +   ' "   s t y l e = " '   +   s p m _ g e t M e n u I t e m S t y l e ( ' i t e m ' ,   o N o d e )   +   ' " > \ n ' ;  
 	 	 	 	 	 v a r   s A l i g n   =   t h i s . d i s p l a y = = ' v e r t i c a l '   ?   ' a l i g n = " '   +   t h i s . m e n u A l i g n m e n t   +   ' " '   :   ' ' ;  
 	 	 	 	 	 s H T M L   + =   ' < t d   u n s e l e c t a b l e = " o n "   N O W R A P = " N O W R A P "   '   +   s A l i g n   +   '   T I T L E = " '   +   s p m _ g e t A t t r ( o N o d e ,   ' t o o l t i p ' ,   ' ' )   +   ' " > '   +   s p m _ g e t I m a g e ( o N o d e ,   t h i s )   +   s p m _ g e t I t e m H T M L ( o N o d e ,   ' l e f t ' ,   ' & n b s p ; ' )   +   s p m _ g e t A t t r ( o N o d e ,   ' t i t l e ' ,   ' ' )   +   s p m _ g e t I t e m H T M L ( o N o d e ,   ' r i g h t ' )   +   M y I I f ( N u m b e r ( t h i s . r o o t A r r o w )   & &   s p m _ n o d e H a s C h i l d r e n ( o N o d e ) ,   ' < / t d > \ n < t d   a l i g n = " r i g h t "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m r a r w ' )   +   t h i s . c s s M e n u R o o t A r r o w )   +   ' " > '   +   s p m _ g e t A r r o w ( t h i s . r o o t A r r o w I m a g e ,   t h i s )   +   " " ,   ' & n b s p ; ' )   +   ' \ n < / t d > \ n < / t r > \ n < / t a b l e > \ n < / t d > \ n ' ;  
 	 	 	     }  
 	 	 	     i f   ( t h i s . d i s p l a y   = =   " v e r t i c a l " )  
 	 	 	 	     s H T M L   + =   " < / t r > \ n " ;  
 	 	    
 	 	     }  
 	 	     e l s e                                                 / / ' s u b m e n u   -   n o t   t o p   l e v e l   m e n u   i t e m  
 	 	     {  
 	 	 	     s w i t c h ( o N o d e . n o d e N a m e )  
 	 	 	     {  
 	 	 	 	     c a s e   " m e n u i t e m " :  
 	 	 	 	     {  
 	 	 	 	 	     s H T M L   + = 	 	 '       < t r   I D = " t r '   +   t h i s . _ m _ s N S p a c e   +   s I D   +   ' "   '   +   s p m _ g e t M e n u I t e m E v e n t s ( t h i s . _ m _ s N S p a c e )   +   '   p a r e n t I D = " '   +   s P a r e n t I D   +   ' "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m ' )   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t M e n u I t e m C S S ( o N o d e ) )   +   ' "   s a v e c s s = " '   +   s p m _ g e t M e n u I t e m C S S ( o N o d e )   +   ' "   s a v e s e l c s s = " '   +   s p m _ g e t M e n u I t e m S e l C S S ( o N o d e )   +   ' "   m e n u c l i c k = " '   +   s C l i c k A c t i o n   +   ' "   s t y l e = " '   +   s p m _ g e t M e n u I t e m S t y l e ( ' i t e m ' ,   o N o d e )   +   ' " > \ n ' ;  
 	 	 	 	 	     s H T M L   + = 	 	 '               < t d   u n s e l e c t a b l e = " o n "   i d = " i c o n '   +   t h i s . _ m _ s N S p a c e   +   s I D   +   ' "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i c n ' )   +   t h i s . c s s M e n u I c o n )   +   ' "   s t y l e = " '   +   s p m _ g e t M e n u I t e m S t y l e ( ' i m a g e ' ,   o N o d e )   +   ' ;   '   +   s p m _ g e t M e n u I t e m S t y l e ( ' i t e m ' ,   o N o d e )   +   ' " > '   +   s p m _ g e t I m a g e ( o N o d e ,   t h i s )   +   ' < / t d > \ n ' ;  
 	 	 	 	 	     s H T M L   + = 	 	 '               < t d   u n s e l e c t a b l e = " o n "   i d = " t d '   +   t h i s . _ m _ s N S p a c e   +   s I D   +   ' "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m ' )   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t M e n u I t e m C S S ( o N o d e ) )   +   ' "   s a v e c s s = " '   +   s p m _ g e t M e n u I t e m C S S ( o N o d e )   +   ' "   N O W R A P = " N O W R A P "   T I T L E = " '   +   s p m _ g e t A t t r ( o N o d e ,   ' t o o l t i p ' ,   ' ' )   +   ' "   s t y l e = " '   +   s p m _ g e t M e n u I t e m S t y l e ( ' i t e m ' ,   o N o d e )   +   ' " > '   +   s p m _ g e t I t e m H T M L ( o N o d e ,   ' l e f t ' ,   ' ' )   +   s p m _ g e t A t t r ( o N o d e ,   ' t i t l e ' ,   ' ' )   +   s p m _ g e t I t e m H T M L ( o N o d e ,   ' r i g h t ' ,   ' ' )   +   ' < / t d > \ n ' ;  
 	 	 	 	 	     s H T M L   + = 	 	 '               < t d   u n s e l e c t a b l e = " o n "   i d = " a r r o w '   +   t h i s . _ m _ s N S p a c e   +   s I D   +   ' "   w i d t h = " 1 5 p x "   C L A S S = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m a r w ' )   +   t h i s . c s s M e n u A r r o w )   +   ' "   s t y l e = " '   +   s p m _ g e t M e n u I t e m S t y l e ( ' i t e m ' ,   o N o d e )   +   ' " > '   +   M y I I f ( s p m _ n o d e H a s C h i l d r e n ( o N o d e ) ,   s p m _ g e t A r r o w ( t h i s . a r r o w I m a g e ,   t h i s ) ,   s p m _ g e t S p a c e r ( t h i s ) )   +   ' < / t d > \ n ' ;  
 	 	 	 	 	     s H T M L   + = 	 	 '       < / t r > \ n ' ;  
 	 	 	 	 	     b r e a k ;  
 	 	 	 	     }  
 	 	 	 	     c a s e   " m e n u b r e a k " :  
 	 	 	 	     {  
   	 	 	 	 	 	 v a r   s B r e a k H T M L   =   s p m _ g e t A t t r ( o N o d e ,   ' l e f t h t m l ' ,   ' ' )   +   s p m _ g e t A t t r ( o N o d e ,   ' r i g h t h t m l ' ,   ' ' ) ;  
   	 	 	 	 	 	 i f   ( s B r e a k H T M L . l e n g t h   >   0 )  
 	 	 	 	 	 	 	 s H T M L   + =   '       < t r > < t d   c o l s p a n = " 3 "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b r k ' )   +   t h i s . c s s M e n u B r e a k )   +   ' " > '   +   s B r e a k H T M L   +   ' < / t d > \ n < / t r > \ n ' ;  
   	 	 	 	 	 	 e l s e  
 	 	 	 	 	 	 	 s H T M L   + =   '       < t r > \ n < t d   s t y l e = " h e i g h t :   1 p x "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i c n ' )   +   t h i s . c s s M e n u I c o n )   +   ' " > '   +   s p m _ g e t M e n u I m a g e ( ' s p a c e r . g i f ' ,   t h i s ,   t r u e ,   '   ' )   +   ' < / t d > \ n < t d   c o l s p a n = " 2 "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b r k ' )   +   t h i s . c s s M e n u B r e a k )   +   ' " > '   +   s p m _ g e t M e n u I m a g e ( ' s p a c e r . g i f ' ,   t h i s ,   t r u e ,   '   ' )   +   ' < / t d > \ n < / t r > \ n ' ;  
  
 	 	 	 	 	     b r e a k ;  
 	 	 	 	     }  
 	 	 	     }  
 	 	     }  
  
 	 	     / / ' G e n e r a t e   s u b   m e n u   -   n o t e :   w e   a r e   r e c u r s i v e l y   c a l l i n g   o u r s e l f  
 	 	     / / ' n e t s c a p e   r e n d e r s   t a b l e s   w i t h   d i s p l a y :   b l o c k   a s   h a v i n g   c e l l p a d d i n g ! ! !   t h e r e f o r e   u s i n g   d i v   o u t s i d e   t a b l e   -   L A M E !  
 	 	     i f   ( o N o d e . c h i l d N o d e s . l e n g t h   >   0 )  
 	 	     {  
 	 	 	 	 v a r   s T a g   =   ' D I V ' ;  
 	 	 	 	 v a r   s S t y l e   =   ' ' ;  
  
 	 	 	 	 i f   ( s p m _ i s M a c ( ' i e ' ) )  
 	 	 	 	 {  
 	 	 	 	 	 s T a g   =   ' P ' ;  
 	 	 	 	 	 s S t y l e   =   ' m a r g i n - t o p : 0 p x ;   m a r g i n - l e f t : 0 p x ; '  
 	 	 	 	 }  
 	 	 	     t h i s . _ m _ s O u t e r T a b l e s   =   ' \ n < '   +   s T a g   +   '   I D = " t b l '   +   t h i s . _ m _ s N S p a c e   +   s I D   +   ' "   C L A S S = " '   +   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m s u b ' )   +   t h i s . c s s S u b M e n u )   +   ' "   S T Y L E = " d i s p l a y : n o n e ;   p o s i t i o n :   a b s o l u t e ; '   +   s S t y l e   +   t h i s . m e n u T r a n s i t i o n S t y l e   +   ' " > \ n < t a b l e   C E L L P A D D I N G = " 0 "   C E L L S P A C I N G = " 0 "   B O R D E R = " 0 " > \ n '   +   t h i s . G e t M e n u I t e m s ( o N o d e )   +   ' \ n < / t a b l e > \ n < / '   +   s T a g   +   ' > \ n '   +   t h i s . _ m _ s O u t e r T a b l e s ;  
 	 	 	 }  
                 }  
 	 }  
 	 / / a l e r t ( s H T M L ) ;  
 	 r e t u r n   s H T M L ;  
 }  
  
 	 / / - - - - - - - - - - - - - - -   E v e n t   F u n c t i o n s   - - - - - - - - - - - - - - - / /  
     / / - - -   m e n u b a r   c l i c k   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B C   =   f u n c t i o n   ( e ,   e v t )  
 	 {  
 	 	 t h i s . G e n e r a t e S u b M e n u s ( ) ;  
  
 	 	 v a r   o C e l l   =   e ;   / / e v e n t . s r c E l e m e n t ;  
 	 	 v a r   s I D   =   o C e l l . i d . s u b s t r ( 2 ) ;  
  
 	 	 v a r   o M e n u   =   s p m _ g e t B y I d ( " t b l "   +   s I D ) ;  
 	 	  
 	 	 i f   ( o M e n u   ! =   n u l l )  
 	 	 {  
 	 	 	 t h i s . h i d e A l l M e n u s ( ) ; 	 	 / / m i n d e l a y   m o d  
 	 	 	 i f   ( o M e n u . s t y l e . d i s p l a y   = =   ' ' )  
 	 	 	 {  
 	 	 	 	 t h i s . h i d e A l l M e n u s ( ) ; 	 	  
 	 	 	 	 i f   ( t h i s . u s e I F r a m e s )  
 	 	 	 	 	 s p m _ i F r a m e I n d e x ( o M e n u ,   f a l s e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
 	 	 	 	 e l s e  
 	 	 	 	 	 s p m _ s h o w E l e m e n t ( " S E L E C T | O B J E C T " ) ;  
 	 	 	 }  
 	 	 	 e l s e  
 	 	 	 {  
 	 	 	 	 s p m _ p o s i t i o n M e n u ( t h i s ,   o M e n u ,   o C e l l ) ;  
 	 	 	 	  
 	 	 	 	 t h i s . d o T r a n s i t i o n ( o M e n u ) ;  
 	 	 	 	 o M e n u . s t y l e . d i s p l a y   =   " " ;  
 	 	 	 	 t h i s . _ m _ a O p e n M e n u I D [ 0 ]   =   s I D ;  
 	 	 	 	 i f   ( t h i s . u s e I F r a m e s )  
 	 	 	 	 	 s p m _ i F r a m e I n d e x ( o M e n u ,   t r u e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
 	 	 	 	 e l s e  
 	 	 	 	 	 s p m _ h i d e E l e m e n t ( " S E L E C T | O B J E C T " , o M e n u ) ;  
 	 	 	 }  
 	 	 }  
 	 	  
         t h i s . f i r e E v e n t ( ' o n M e n u B a r C l i c k ' ,   o C e l l ) ;  
          
         o M e n u   =   s p m _ g e t B y I d ( " t d "   +   s I D ) ;  
         i f   ( s p m _ g e t A t t r ( o M e n u ,   " m e n u c l i c k " ,   ' ' ) . l e n g t h )  
         {  
             e v a l ( s p m _ g e t A t t r ( o M e n u ,   " m e n u c l i c k " ,   ' ' ) ) ;  
             t h i s . h i d e A l l M e n u s ( ) ;  
         }  
 	 	 s p m _ s t o p E v e n t B u b b l i n g ( e v t ) ;  
 	 }  
 	  
     / / - - -   m e n u b a r   m o u s e d o w n   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B M D   =   f u n c t i o n   ( e )  
 	 {  
 	 	 v a r   o C e l l   =   e ;   / / e v e n t . s r c E l e m e n t ;  
 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   t h i s . s h C o l o r ,   t h i s . h l C o l o r ) ;  
 	 }  
      
     / / - - -   m e n u b a r   m o u s e u p   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B M U   =   f u n c t i o n   ( e )  
 	 {  
 	 	 v a r   o C e l l   =   e ;   / / e v e n t . s r c E l e m e n t ;  
 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   t h i s . h l C o l o r ,   t h i s . s h C o l o r ) ;  
 	 }  
 / / = = = = = = = = = = =   M y   r e g i o n   h e r e   O R   M y   c o d e   h e r e = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = / /  
     f u n c t i o n   t r i m ( s )    
     {  
         i f ( s )  
         {  
 	         r e t u r n   s . r e p l a c e ( / ^ \ s + | \ s + $ / g , " " ) ;  
 	 }  
 	 r e t u r n   " " ;  
     }  
     / / h à m   t ì m   c á c   Ñi   t °ãn g   l à   t a g   o T a g N a m e   t r o n g   m Ùt   o j e c t   n o d e  
     f u n c t i o n   f i n d O b j e c t s I n O b j e c t ( n o d e ,   a r r a y O b j e c t ,   o T a g N a m e )  
     {  
         i f ( n o d e   ! =   n u l l )  
         {        
                 f o r ( v a r   i   =   0 ;   i   <   n o d e . c h i l d N o d e s . l e n g t h ;   i + + )  
                 {  
                         i f ( t r i m ( n o d e . c h i l d N o d e s [ i ] . t a g N a m e )   = =   o T a g N a m e )  
                         {        
                                 a r r a y O b j e c t [ a r r a y O b j e c t . l e n g t h ]   =   n o d e . c h i l d N o d e s [ i ] ;  
                         }  
                         f i n d O b j e c t s I n O b j e c t ( n o d e . c h i l d N o d e s [ i ] ,   a r r a y O b j e c t ,   o T a g N a m e )  
                 }  
         }  
     }  
     / / h à m   t ¡o   c o d e   c h o   m e n u   t ë  c á c   ' T R '   t r o n g   m y L i s t  
     f u n c t i o n   c r e a t e H T M L C o d e M e n u V e r t i c a l ( m y L i s t )  
     {  
         v a r   o T a b l e R e s u l t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;  
         o T a b l e R e s u l t . s t y l e . b o r d e r   =   " 0 " ;  
         o T a b l e R e s u l t . s t y l e . c e l l s p a c i n g   =   " 0 " ;  
         o T a b l e R e s u l t . s t y l e . c e l l p a d d i n g   =   " 0 " ;  
          
         v a r   o T a b l e   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;  
         o T a b l e . s t y l e . b o r d e r   =   " 0 " ;  
         o T a b l e . c e l l S p a c i n g   =   " 0 " ;  
         o T a b l e . c e l l P a d d i n g   =   " 0 " ;  
          
         v a r   o T r   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ;  
         v a r   m a x I t e m A L i n e   =   7 ;  
         f o r ( v a r   i   =   1 ;   i   < =   m y L i s t . l e n g t h ;   i + + )  
         {  
                 v a r   o T d   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ;  
                 v a r   o C h i l d T a b l e   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;  
                 o C h i l d T a b l e . s t y l e . b o r d e r   =   " 0 " ;  
                 o C h i l d T a b l e . c e l l S p a c i n g   =   " 0 " ;  
                 o C h i l d T a b l e . c e l l P a d d i n g   =   " 0 " ;  
                  
                 m y L i s t [ i   -   1 ] . s t y l e . d i s p l a y   =   " " ;  
                  
                 o C h i l d T a b l e . a p p e n d C h i l d ( m y L i s t [ i   -   1 ] . c l o n e N o d e ( t r u e ) ) ;  
                  
                 o T d . a p p e n d C h i l d ( o C h i l d T a b l e ) ;  
                 o T r . a p p e n d C h i l d ( o T d ) ;  
                 i f ( i % m a x I t e m A L i n e   = =   0 )  
                 {  
                         o T a b l e . a p p e n d C h i l d ( o T r . c l o n e N o d e ( t r u e ) ) ;  
                         v a r   o   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t d S h o w M e n u C h i l d " ) ;  
                         o T r   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ;  
                         o T a b l e R e s u l t . a p p e n d C h i l d ( o T a b l e . c l o n e N o d e ( t r u e ) ) ;  
                         o T a b l e   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;  
                         o T a b l e . s t y l e . b o r d e r   =   " 0 " ;  
                         o T a b l e . c e l l S p a c i n g   =   " 0 " ;  
                         o T a b l e . c e l l P a d d i n g   =   " 0 " ;  
                 }  
         }  
         o T a b l e . a p p e n d C h i l d ( o T r ) ;  
         o T a b l e R e s u l t . a p p e n d C h i l d ( o T a b l e ) ;  
         r e t u r n   o T a b l e R e s u l t ;  
     }      
     / / h à m   r e m o v e   a l l   n o d e   o f   a   p a r e n t   n o d e  
     f u n c t i o n   r e m o v e C h i l d r e n F r o m N o d e ( n o d e )  
     {  
               v a r   l e n   =   n o d e . c h i l d N o d e s . l e n g t h ;  
               f o r ( v a r   i   =   0 ;   i   <   l e n ;   i + + )  
               {  
                     n o d e . r e m o v e C h i l d ( n o d e . c h i l d N o d e s [ i ] ) ;  
               }  
     }  
     / / = = = = = = = = = = =   E n d   m y   r e g i o n   O R   E n d   m y   c o d e   h e r e = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = / /  
      
     / / - - -   m e n u b a r   m o u s e o v e r   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B M O   =   f u n c t i o n   ( e ,   b B y p a s s D e l a y )  
 	 {  
 	         / / h à m   t ¡o   m e n u   c ¥p   2   ( s a u   r o o t )  
 	 	 t h i s . G e n e r a t e S u b M e n u s ( ) ;  
 	 	 v a r   o C e l l   =   e ;   / / e v e n t . s r c E l e m e n t ;  
 	 	  
 	 	 i f   ( o C e l l . i d . l e n g t h   = =   0 )   / / c a n c e l B u b b l e  
 	 	     r e t u r n ;  
 	 	 v a r   s I D   =   o C e l l . i d . s u b s t r ( 2 ) ;  
 	 	 v a r   o M e n u   =   s p m _ g e t B y I d ( " t b l "   +   s I D ) ;  
 	 	  
 	 	 / /  
 	 	 i f ( s I D . i n d e x O f ( " _ d n n A C T I O N S _ " ) <   0 )  
 	 	 {  
 	                 v a r   o b i e c t S h o w 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 d S h o w M e n u C h i l d " ) ;  
 	                 i f ( o b i e c t S h o w M e n u )  
 	                 {  
 	                         v a r   m y L i s t   =   n e w   A r r a y ( ) ;  
 	 	                 f i n d O b j e c t s I n O b j e c t ( o M e n u ,   m y L i s t ,   " T R " ) ;  
 	                         o b i e c t S h o w M e n u . i n n e r H T M L   =   c r e a t e H T M L C o d e M e n u V e r t i c a l ( m y L i s t ) . i n n e r H T M L ;  
 	                         / / o b i e c t S h o w M e n u . a p p e n d C h i l d ( c r e a t e H T M L C o d e M e n u V e r t i c a l ( m y L i s t ) ) ;  
 	                 }  
 	                 / /  
 	                 i f   ( t h i s . _ m _ a O p e n M e n u I D . l e n g t h   | |   t h i s . m o E x p a n d   ! =   ' 0 ' )  
         	 	 {  
         	 	 	 i f   ( t h i s . m i n D e l a y   ! =   0   & &   b B y p a s s D e l a y   ! =   t r u e )  
         	 	 	 {  
         	 	 	          
         	 	 	 	 i f   ( t h i s . m i n D e l a y T i m e r   ! =   n u l l )  
         	 	 	 	 	 w i n d o w . c l e a r T i m e o u t ( t h i s . m i n D e l a y T i m e r ) ;  
         	 	 	 	 t h i s . m i n D e l a y T y p e   =   ' r o o t ' ;  
         	 	 	 	 t h i s . m i n D e l a y O b j   =   e ;  
         	 	 	 	 t h i s . m i n D e l a y T i m e r   =   s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . m o u s e I n D e l a y H a n d l e r ( ) ' ,   t h i s . m i n D e l a y ) ;  
         	 	 	 }  
         	 	 	 e l s e  
         	 	 	 {  
         	 	 	 	 / / - - -   i f   m e n u   i s   s h o w n   t h e n   m o u s e o v e r   t r i g g e r s   t h e   s h o w i n g   o f   a l l   m e n u s   - - - / /  
         	 	 	 	 t h i s . h i d e A l l M e n u s ( ) ;  
                                        
         	 	 	 	 i f   ( o M e n u   ! =   n u l l )  
         	 	 	 	 {  
         	 	 	 	 	 s p m _ p o s i t i o n M e n u ( t h i s ,   o M e n u ,   o C e l l ) ;  
         	 	 	 	 	 t h i s . d o T r a n s i t i o n ( o M e n u ) ;  
         	 	 	 	 	 i f ( ! o b i e c t S h o w M e n u )  
 	                                         {  
         	 	 	 	 	         o M e n u . s t y l e . d i s p l a y   =   " " ;  
         	 	 	 	 	 }  
         	 	 	 	 	 t h i s . _ m _ a O p e n M e n u I D [ 0 ]   =   s I D ;  
         	 	 	 	 	 i f   ( t h i s . u s e I F r a m e s )  
         	 	 	 	 	 	 s p m _ i F r a m e I n d e x ( o M e n u ,   t r u e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
         	 	 	 	 	 e l s e  
         	 	 	 	 	 	 s p m _ h i d e E l e m e n t ( " S E L E C T | O B J E C T " , o M e n u ) ;  
         	 	 	 	 }  
         	 	 	 }  
         	 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   t h i s . s h C o l o r ,   t h i s . h l C o l o r ) ;  
         	 	 }  
         	 	 e l s e  
         	 	 {  
         	 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   t h i s . h l C o l o r ,   t h i s . s h C o l o r ) ;  
         	 	 }  
  
         	 	 o C e l l . c l a s s N a m e   =     s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l   s p m b a r ' )   +   t h i s . c s s M e n u B a r   +   '   '   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o C e l l ,   ' s a v e s e l c s s ' ,   ' ' )   +   '   '   +   s p m _ g e t A t t r ( o C e l l ,   ' s a v e c s s ' ,   ' ' ) ) ;  
 	 	         / / 0 C e l l   l à   m u n e   I t e m   r o o t  
 	 	         t h i s . _ m _ d H i d e T i m e r   =   n u l l ;  
 	                 / /  
 	         }  
 	         e l s e  
 	         {  
                         / /  
         	 	 i f   ( t h i s . _ m _ a O p e n M e n u I D . l e n g t h   | |   t h i s . m o E x p a n d   ! =   ' 0 ' )  
         	 	 {  
         	 	 	 i f   ( t h i s . m i n D e l a y   ! =   0   & &   b B y p a s s D e l a y   ! =   t r u e )  
         	 	 	 {  
         	 	 	          
         	 	 	 	 i f   ( t h i s . m i n D e l a y T i m e r   ! =   n u l l )  
         	 	 	 	 	 w i n d o w . c l e a r T i m e o u t ( t h i s . m i n D e l a y T i m e r ) ;  
         	 	 	 	 t h i s . m i n D e l a y T y p e   =   ' r o o t ' ;  
         	 	 	 	 t h i s . m i n D e l a y O b j   =   e ;  
         	 	 	 	 t h i s . m i n D e l a y T i m e r   =   s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . m o u s e I n D e l a y H a n d l e r ( ) ' ,   t h i s . m i n D e l a y ) ;  
         	 	 	 }  
         	 	 	 e l s e  
         	 	 	 {  
         	 	 	 	 / / - - -   i f   m e n u   i s   s h o w n   t h e n   m o u s e o v e r   t r i g g e r s   t h e   s h o w i n g   o f   a l l   m e n u s   - - - / /  
         	 	 	 	 t h i s . h i d e A l l M e n u s ( ) ;  
                                        
         	 	 	 	 i f   ( o M e n u   ! =   n u l l )  
         	 	 	 	 {  
         	 	 	 	 	 s p m _ p o s i t i o n M e n u ( t h i s ,   o M e n u ,   o C e l l ) ;  
         	 	 	 	 	 t h i s . d o T r a n s i t i o n ( o M e n u ) ;  
         	 	 	 	 	 o M e n u . s t y l e . d i s p l a y   =   " " ;  
         	 	 	 	 	 t h i s . _ m _ a O p e n M e n u I D [ 0 ]   =   s I D ;  
         	 	 	 	 	 i f   ( t h i s . u s e I F r a m e s )  
         	 	 	 	 	 	 s p m _ i F r a m e I n d e x ( o M e n u ,   t r u e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
         	 	 	 	 	 e l s e  
         	 	 	 	 	 	 s p m _ h i d e E l e m e n t ( " S E L E C T | O B J E C T " , o M e n u ) ;  
         	 	 	 	 }  
         	 	 	 }  
         	 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   t h i s . s h C o l o r ,   t h i s . h l C o l o r ) ;  
         	 	 }  
         	 	 e l s e  
         	 	 {  
         	 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   t h i s . h l C o l o r ,   t h i s . s h C o l o r ) ;  
         	 	 }  
  
         	 	 o C e l l . c l a s s N a m e   =     s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l   s p m b a r ' )   +   t h i s . c s s M e n u B a r   +   '   '   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o C e l l ,   ' s a v e s e l c s s ' ,   ' ' )   +   '   '   +   s p m _ g e t A t t r ( o C e l l ,   ' s a v e c s s ' ,   ' ' ) ) ;  
 	 	         / / 0 C e l l   l à   m u n e   I t e m   r o o t  
 	 	         t h i s . _ m _ d H i d e T i m e r   =   n u l l ;  
 	 	 }  
 	 	 / / t h i s . f i r e E v e n t ( ' o n M e n u B a r M o u s e O v e r ' ,   o C e l l ) ;  
 	 }  
     / / - - -   m e n u b a r   m o u s e o u t   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B M O U T   =   f u n c t i o n   ( e )  
 	 {  
 	 	 v a r   o C e l l   =   e ;   / / e v e n t . s r c E l e m e n t ;  
 	 	 v a r   s I D   =   o C e l l . i d . s u b s t r ( 2 ) ;  
 	 	 t h i s . a p p l y B o r d e r ( o C e l l ,   1 ,   s p m _ g e t C e l l B a c k C o l o r ( o C e l l ) ,   s p m _ g e t C e l l B a c k C o l o r ( o C e l l ) ,   " n o n e " ) ; 	  
 	 	 t h i s . _ m _ d H i d e T i m e r   =   n e w   D a t e ( ) ;  
  
 	 	 i f   ( t h i s . m o u t D e l a y   ! =   0 )  
 	 	     s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . h i d e M e n u T i m e ( ) ' ,   t h i s . m o u t D e l a y ) ;  
 	 	      
         o C e l l . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b a r   s p m i t m ' )   +   t h i s . c s s M e n u B a r   +   '   '   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t A t t r ( e ,   ' s a v e c s s ' ,   ' ' ) ) ;  
         t h i s . s t o p T r a n s i t i o n ( ) ;  
         t h i s . m i n D e l a y T y p e   =   n u l l ;  
         t h i s . f i r e E v e n t ( ' o n M e n u B a r M o u s e O u t ' ,   o C e l l ) ;  
 	 }  
 	  
     / / - - -   m e n u i t e m   c l i c k   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B I C   =   f u n c t i o n   ( e ,   e v t )  
 	 {  
 	 	 v a r   o R o w   =   s p m _ g e t S o u r c e T R ( e ,   t h i s . _ m _ s N S p a c e ) ;     / / e v e n t . s r c E l e m e n t  
 	 	 v a r   s I D   =   o R o w . i d . s u b s t r ( 2 ) ;  
 	 	 i f   ( s p m _ i t e m H a s C h i l d r e n ( s I D ,   t h i s . _ m _ s N S p a c e )   = =   f a l s e )  
 	 	 	 t h i s . h i d e A l l M e n u s ( ) ;  
  
 	 	 t h i s . f i r e E v e n t ( ' o n M e n u I t e m C l i c k ' ,   o R o w ) ;  
  
         i f   ( s p m _ g e t A t t r ( o R o w ,   " m e n u c l i c k " ,   ' ' ) . l e n g t h )  
         {  
             e v a l ( s p m _ g e t A t t r ( o R o w ,   " m e n u c l i c k " ,   ' ' ) ) ;  
             t h i s . h i d e A l l M e n u s ( ) ;  
 	 	 }  
 	 	 s p m _ s t o p E v e n t B u b b l i n g ( e v t ) ;  
 	 	  
 	 	 t h i s . h a n d l e m b i _ m o ( o R o w ,   t r u e ) ;  
 	 }  
  
     / / - - -   m e n u i t e m   m o u s e o v e r   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B I M O   =   f u n c t i o n   ( e )  
 	 {  
 	 	 t h i s . h a n d l e m b i _ m o ( s p m _ g e t S o u r c e T R ( e ,   t h i s . _ m _ s N S p a c e ) ) ;   / / e v e n t . s r c E l e m e n t  
                 / / a l e r t ( " H e r e " ) ;  
 	 	 t h i s . _ m _ d H i d e T i m e r   =   n u l l ;  
 	 }  
     / / - - -   m e n u i t e m   m o u s e o u t   e v e n t   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . o n M B I M O U T   =   f u n c t i o n   ( e )  
 	 { 	  
 	 	 t h i s . h a n d l e m b i _ m o u t ( s p m _ g e t S o u r c e T R ( e ,   t h i s . _ m _ s N S p a c e ) ) ;     / / e v e n t . s r c E l e m e n t  
 	 	 t h i s . _ m _ d H i d e T i m e r   =   n e w   D a t e ;  
 	 	 / / s e t T i m e o u t ( t h i s . h i d e M e n u T i m e ,   t h i s . m o u t D e l a y ) ;  
 	 	 i f   ( t h i s . m o u t D e l a y   ! =   0 )  
 	 	     s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . h i d e M e n u T i m e ( ) ' ,   t h i s . m o u t D e l a y ) ;  
 	 	    
 	 	 t h i s . m i n D e l a y T y p e   =   n u l l ;  
 	 }  
  
 	 S o l p a r t M e n u . p r o t o t y p e . b o d y c l i c k   =   f u n c t i o n ( )  
 	 {  
 	 	 t h i s . h i d e A l l M e n u s ( ) ;  
 	 }  
  
     / / - - -   h a n d l e s   d i s p l a y   o f   n e w l y   o p e n e d   m e n u   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . h a n d l e N e w I t e m S e l e c t   =   f u n c t i o n   ( s I D )  
 	 {  
 	 	 v a r   i ;  
 	 	 v a r   i N e w L e n g t h = - 1 ;  
 	 	 v a r   b D e l e t e R e s t = f a l s e ;    
 	 	 f o r   ( i = 0 ;   i < t h i s . _ m _ a O p e n M e n u I D . l e n g t h ;   i + + )  
 	 	 { 	 	  
 	 	 	 i f   ( b D e l e t e R e s t )  
 	 	 	 {  
 	 	 	 	 s p m _ g e t B y I d ( " t b l "   +   t h i s . _ m _ a O p e n M e n u I D [ i ] ) . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 i f   ( t h i s . u s e I F r a m e s )  
 	 	 	 	 	 s p m _ i F r a m e I n d e x ( s p m _ g e t B y I d ( " t b l "   +   t h i s . _ m _ a O p e n M e n u I D [ i ] ) ,   f a l s e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
 	 	 	 }  
 	 	 	 i f   ( t h i s . _ m _ a O p e n M e n u I D [ i ]   = =   t h i s . _ m _ s N S p a c e   +   s I D )  
 	 	 	 {  
 	 	 	 	 b D e l e t e R e s t = t r u e ;  
 	 	 	 	 i N e w L e n g t h   =   i ;  
 	 	 	 } 	 	 	 	  
 	 	 }  
 	 	 i f   ( i N e w L e n g t h   ! =   - 1 )  
 	 	 	 t h i s . _ m _ a O p e n M e n u I D . l e n g t h   =   i N e w L e n g t h + 1 ;  
 	 }  
 	  
     / / - - -   h i d e s   a l l   m e n u s   t h a t   a r e   c u r r e n t l y   d i s p l a y e d   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . h i d e A l l M e n u s   =   f u n c t i o n   ( )  
 	 {  
 	 	 v a r   i ;  
 	 	 v a r   o M e n u ;  
 	 	 f o r   ( i = 0 ;   i < t h i s . _ m _ a O p e n M e n u I D . l e n g t h ;   i + + )  
 	 	 { 	 	  
 	 	 	 o M e n u   =   s p m _ g e t B y I d ( " t b l "   +   t h i s . _ m _ a O p e n M e n u I D [ i ] ) ;  
 	 	 	 o M e n u . s t y l e . d i s p l a y   =   " n o n e " ;  
  
 	 	 	 i f   ( t h i s . u s e I F r a m e s )  
 	 	 	 	 s p m _ i F r a m e I n d e x ( o M e n u ,   f a l s e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
 	 	 }  
 	 	 i f   ( t h i s . u s e I F r a m e s   ! =   t r u e )  
 	 	 	 s p m _ s h o w E l e m e n t ( " S E L E C T | O B J E C T " ) ;  
  
 	 	 t h i s . _ m _ a O p e n M e n u I D . l e n g t h   =   0 ;  
 	 } 	 	  
      
      
     f u n c t i o n   S o l p a r t M e n u T r a n s i t i o n O b j e c t ( )  
     {  
         t h i s . i d = n u l l ;  
         t h i s . s t o p   =   f a l s e ;  
     }    
  
     / / - - -   s t o p s   m e n u   t r a n s i t i o n   e f f e c t   - - - / /  
     S o l p a r t M e n u . p r o t o t y p e . s t o p T r a n s i t i o n   =   f u n c t i o n   ( )  
     {  
         t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . s t o p   =   t r u e ;  
         t h i s . d o F i l t e r ( ) ;  
         t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t   =   n e w   S o l p a r t M e n u T r a n s i t i o n O b j e c t ( ) ;  
     }  
      
     / / - - -   s t a r t s   m e n u   t r a n s i t i o n   e f f e c t   - - - / /  
     S o l p a r t M e n u . p r o t o t y p e . d o T r a n s i t i o n   =   f u n c t i o n   ( o M e n u )  
     {  
         i f   ( t h i s . m e n u T r a n s i t i o n   = =   ' N o n e '   | |   t h i s . s u p p o r t s T r a n s i t i o n s   = =   ' 0 ' )  
             r e t u r n ;  
  
         v a r   s I D   =   t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d ;  
          
         s w i t c h   ( t h i s . m e n u T r a n s i t i o n )  
         {  
             c a s e   ' A l p h a F a d e ' :  
             {  
                 i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d   ! =   o M e n u . i d )    
                 {  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d   =   o M e n u . i d ;  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . o p a c i t y   =   0 ;  
                     t h i s . d o F i l t e r ( ) ;  
                 }  
                 b r e a k ;  
             }  
             c a s e   ' W a v e ' :  
             {  
                 i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d   ! =   o M e n u . i d )    
                 {                  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d   =   o M e n u . i d ;  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . p h a s e   =   0 ;  
                     t h i s . d o F i l t e r ( ) ;  
                 }  
                 b r e a k ;  
             }  
             c a s e   ' C o n s t a n t W a v e ' :  
             {  
                 i f   ( s I D   ! =   o M e n u . i d )    
                 {                  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d   =   o M e n u . i d ;  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . p h a s e   =   0 ;  
                     t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . c o n s t a n t = t r u e ;  
                     t h i s . d o F i l t e r ( ) ;  
                 }  
                 b r e a k ;  
             }  
             c a s e   ' I n s e t ' :   c a s e   ' R a d i a l W i p e ' :   c a s e   ' S l i d e ' :   c a s e   ' S p i r a l ' :   c a s e   ' S t r e t c h ' :   c a s e   ' S t r i p s ' :   c a s e   ' W h e e l ' :   c a s e   ' G r a d i e n t W i p e ' :   c a s e   ' Z i g z a g ' :   c a s e   ' B a r n ' :   c a s e   ' B l i n d s ' :   c a s e   ' C h e c k e r b o a r d ' :   c a s e   ' F a d e ' :   c a s e   ' I r i s ' :   c a s e   ' R a n d o m B a r s ' :  
             {  
                 o M e n u . f i l t e r s ( ' D X I m a g e T r a n s f o r m . M i c r o s o f t . '   +   t h i s . m e n u T r a n s i t i o n ) . a p p l y ( ) ;  
                 o M e n u . f i l t e r s ( ' D X I m a g e T r a n s f o r m . M i c r o s o f t . '   +   t h i s . m e n u T r a n s i t i o n ) . d u r a t i o n   =   t h i s . m e n u T r a n s i t i o n L e n g t h ;  
                 o M e n u . f i l t e r s ( ' D X I m a g e T r a n s f o r m . M i c r o s o f t . '   +   t h i s . m e n u T r a n s i t i o n ) . p l a y ( ) ;  
                 b r e a k ;  
             }  
         }  
     }  
  
     / / - - -   a p p l y s   t r a n s i t i o n   f i l t e r   - - - / /  
     S o l p a r t M e n u . p r o t o t y p e . d o F i l t e r   =   f u n c t i o n   ( b S t o p )    
     {              
         i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d   = =   n u l l )  
             r e t u r n ;  
              
         v a r   o   =   s p m _ g e t B y I d ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . i d ) ;  
         w i n d o w . s t a t u s   =   n e w   D a t e ( ) ;  
         s w i t c h   ( t h i s . m e n u T r a n s i t i o n )  
         {  
             c a s e   ' A l p h a F a d e ' :  
             {  
                 i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . s t o p )  
                 {  
                     o . f i l t e r s ( ' D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ' ) . o p a c i t y   =   1 0 0 ;  
                 }  
                 e l s e  
                 {  
                     o . f i l t e r s ( ' D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ' ) . o p a c i t y   =   t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . o p a c i t y ;  
                     i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . o p a c i t y   <   1 0 0 )  
                     {  
                         s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . d o F i l t e r ( ) ' ,   5 0 ) ;  
                         t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . o p a c i t y   + =   ( 1 0 0 / 2 0 *   t h i s . m e n u T r a n s i t i o n L e n g t h ) ;  
                     }  
                 }  
                 b r e a k ;  
             }  
             c a s e   ' W a v e ' :   c a s e   ' C o n s t a n t W a v e ' :  
             {  
                 i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . s t o p )  
                 {  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . f r e q   =   0 ;  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . l i g h t s t r e n g t h   =   0 ;  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . s t r e n g t h   =   0 ;  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . p h a s e   =   0 ;  
                 }  
                 e l s e  
                 {  
                     o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . f r e q   =   1 ;  
                     o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . l i g h t s t r e n g t h   =   2 0 ;  
                     o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . s t r e n g t h   =   5 ;  
                     o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . p h a s e   =   t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . p h a s e ;  
  
                     i f   ( t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . p h a s e   <   1 0 0   *   t h i s . m e n u T r a n s i t i o n L e n g t h   | |   t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . c o n s t a n t   = =   t r u e )  
                     {  
                         s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . d o F i l t e r ( ) ' ,   5 0 ) ;  
                         t h i s . S o l p a r t M e n u T r a n s i t i o n O b j e c t . p h a s e   + =   5 ;  
                     }  
                     e l s e  
                     {  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . f r e q   =   0 ;  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . l i g h t s t r e n g t h   =   0 ;  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . s t r e n g t h   =   0 ;  
                         o . f i l t e r s ( " D X I m a g e T r a n s f o r m . M i c r o s o f t . W a v e " ) . p h a s e   =   0 ;  
                     }  
                 }  
                 b r e a k ;  
             }  
         }  
     }                      
  
     / / - - -   h a n d l e s   m o u s e o v e r   f o r   m e n u   i t e m   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . h a n d l e m b i _ m o   =   f u n c t i o n   ( o R o w ,   b B y p a s s D e l a y )  
 	 {  
 	 	 v a r   s I D   =   o R o w . i d . s u b s t r ( 2 ) ;  
 	 	  
 	 	 i f ( s I D . i n d e x O f ( " _ d n n A C T I O N S _ " ) <   0 )  
 	 	 {  
 	 	         s p m _ g e t B y I d ( " i c o n "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l   s p m i c n ' )   +   t h i s . c s s M e n u I c o n   +   '   '   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
 	 	         s p m _ g e t B y I d ( " t d "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l ' )   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
 	 	         s p m _ g e t B y I d ( " a r r o w "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l   s p m a r w ' )   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   t h i s . c s s M e n u A r r o w   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
         	 	  
 	 	         s p m _ a p p l y R o w B o r d e r ( o R o w ,   1 ,   t h i s . s e l B o r d e r C o l o r ,   t r u e ) ;  
  
 	 	         i f   ( t h i s . m i n D e l a y   ! =   0   & &   b B y p a s s D e l a y   ! =   t r u e )  
 	 	         {  
 	 	 	         i f   ( t h i s . m i n D e l a y T i m e r   ! =   n u l l )  
 	 	 	 	         w i n d o w . c l e a r T i m e o u t ( t h i s . m i n D e l a y T i m e r ) ;  
 	 	 	         t h i s . m i n D e l a y T y p e   =   ' s u b ' ;  
 	 	 	         t h i s . m i n D e l a y O b j   =   o R o w ;  
 	 	 	         t h i s . m i n D e l a y T i m e r   =   s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . m o u s e I n D e l a y H a n d l e r ( ) ' ,   t h i s . m i n D e l a y ) ;  
 	 	 	         r e t u r n ;  
 	 	         }  
         	          
 	 	         i f   ( t h i s . _ m _ a O p e n M e n u I D [ t h i s . _ m _ a O p e n M e n u I D . l e n g t h   -   1 ]   ! =   o R o w . i d . r e p l a c e ( ' t r ' ,   ' ' ) )  
 	 	         {  
 	 	 	         t h i s . h a n d l e N e w I t e m S e l e c t ( s p m _ g e t A t t r ( o R o w ,   " p a r e n t I D " ,   " " ) ) ;  
         	 	  
 	 	 	         i f   ( s p m _ g e t B y I d ( " t b l "   +   s I D )   ! =   n u l l )  
 	 	 	         {  
 	 	 	 	         v a r   i W i d t h ;  
 	 	 	 	         o M e n u   =   s p m _ g e t B y I d ( " t b l "   +   s I D ) ;  
  
 	 	 	 	         v a r   o P D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o R o w ) ;  
 	 	 	 	         v a r   o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
         	 	 	 	  
         	 	 	 	 o M e n u . s t y l e . d i s p l a y   =   " " ;  
         	 	 	 	  
         	 	 	 	 / / m y   c o d e  
         	 	 	 	 i f ( t r i m ( o R o w . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . s t y l e . p o s i t i o n )   ! =   " a b s o l u t e " )  
         	 	 	 	 {  
 	 	 	 	                 o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( o P D i m s . t   +   o R o w . c l i e n t H e i g h t   -   1 ) ;  
 	 	 	 	         }  
 	 	 	 	         e l s e  
 	 	 	 	         {  
 	 	 	 	                 o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( o P D i m s . t ) ;  
 	 	 	 	         }  
         	 	 	 	 / / e n d   m y   c o d e  
         	 	 	 	  
 	 	 	 	         s p m _ r e s e t S c r o l l ( o M e n u ) ;  
  
 	 	 	 	         t h i s . d o T r a n s i t i o n ( o M e n u ) ;  
  
 	 	 	 	         o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ; 	 / / n o w   t h a t   w e   m o v e d   n e e d   t o   r e g e t   d i m s  
  
 	 	 	                 i f   ( o M D i m s . t   -   s p m _ g e t B o d y S c r o l l T o p ( )   +   o M D i m s . h   >   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	                 {  
 	 	 	 	                     i f   ( o M D i m s . h   <   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	 	                     {  
 	 	 	 	 	 	             o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( s p m _ g e t V i e w P o r t H e i g h t ( )   +   s p m _ g e t B o d y S c r o l l T o p ( )   -   o M D i m s . h ) ;  
 	 	 	 	                     }  
 	 	 	                             e l s e  
 	 	 	 	 	             {  
 	 	 	 	 	 	             s p m _ h a n d l e S c r o l l M e n u ( t h i s ,   o M e n u ) ;  
 	 	 	 	 	 	             o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ; 	 / / n o w   t h a t   w e   m o v e d   n e e d   t o   r e g e t   d i m s  
 	 	 	 	 	             }  
 	 	 	                 }  
  
                                         / / m y   c o d e  
         	 	 	 	 i f ( t r i m ( o R o w . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e . s t y l e . p o s i t i o n )   ! =   " a b s o l u t e " )  
         	 	 	 	 {  
 	 	 	 	                 i f   ( t h i s . d i r e c t i o n   = =   ' r t l ' )  
 	 	 	 	 	                 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	                 e l s e  
 	 	 	 	 	                 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	 	 }  
 	 	 	 	 	 e l s e  
 	 	 	 	 	 {  
 	 	 	 	 	         i f   ( t h i s . d i r e c t i o n   = =   ' r t l ' )  
 	 	 	 	 	                 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   o M D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	                 e l s e  
 	 	 	 	 	                 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   +   o P D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	 	 }  
 	 	 	 	 	 / / e n d   m y   c o d e  
  
 	 	 	 	         i f   ( t h i s . d i r e c t i o n   = =   ' r t l ' )  
 	 	 	 	         {  
 	 	 	 	 	         i f   ( o M D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( )   <   0 )  
 	 	 	 	 	 	         o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   +   o P D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	         }  
 	 	 	 	         e l s e      
 	 	 	 	         {  
 	 	 	 	 	         i f   ( o P D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( )   +   o P D i m s . w   +   o M D i m s . w   >   s p m _ g e t V i e w P o r t W i d t h ( ) )  
 	 	 	 	 	 	         o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   o M D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	         }  
         	 	 	 	 	  
 	 	 	 	         t h i s . _ m _ a O p e n M e n u I D [ t h i s . _ m _ a O p e n M e n u I D . l e n g t h ]   =   s I D ;  
 	 	 	 	         i f   ( t h i s . u s e I F r a m e s )  
 	 	 	 	 	         s p m _ i F r a m e I n d e x ( o M e n u ,   t r u e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
 	 	 	 	         e l s e  
 	 	 	 	 	         s p m _ h i d e E l e m e n t ( " S E L E C T | O B J E C T " , o M e n u ) ;  
  
 	 	 	         }  
 	 	         }  
 	 	         t h i s . f i r e E v e n t ( ' o n M e n u I t e m M o u s e O v e r ' ,   o R o w ) ;  
 	 	 }  
 	 	 e l s e  
 	 	 {  
 	 	         s p m _ g e t B y I d ( " i c o n "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l   s p m i c n ' )   +   t h i s . c s s M e n u I c o n   +   '   '   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
 	 	         s p m _ g e t B y I d ( " t d "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l ' )   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
 	 	         s p m _ g e t B y I d ( " a r r o w "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m s e l   s p m a r w ' )   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   t h i s . c s s M e n u A r r o w   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
         	 	  
 	 	         s p m _ a p p l y R o w B o r d e r ( o R o w ,   1 ,   t h i s . s e l B o r d e r C o l o r ,   t r u e ) ;  
  
 	 	         i f   ( t h i s . m i n D e l a y   ! =   0   & &   b B y p a s s D e l a y   ! =   t r u e )  
 	 	         {  
 	 	 	         i f   ( t h i s . m i n D e l a y T i m e r   ! =   n u l l )  
 	 	 	 	         w i n d o w . c l e a r T i m e o u t ( t h i s . m i n D e l a y T i m e r ) ;  
 	 	 	         t h i s . m i n D e l a y T y p e   =   ' s u b ' ;  
 	 	 	         t h i s . m i n D e l a y O b j   =   o R o w ;  
 	 	 	         t h i s . m i n D e l a y T i m e r   =   s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . m o u s e I n D e l a y H a n d l e r ( ) ' ,   t h i s . m i n D e l a y ) ;  
 	 	 	         r e t u r n ;  
 	 	         }  
         	          
 	 	         i f   ( t h i s . _ m _ a O p e n M e n u I D [ t h i s . _ m _ a O p e n M e n u I D . l e n g t h   -   1 ]   ! =   o R o w . i d . r e p l a c e ( ' t r ' ,   ' ' ) )  
 	 	         {  
 	 	 	         t h i s . h a n d l e N e w I t e m S e l e c t ( s p m _ g e t A t t r ( o R o w ,   " p a r e n t I D " ,   " " ) ) ;  
         	 	  
 	 	 	         i f   ( s p m _ g e t B y I d ( " t b l "   +   s I D )   ! =   n u l l )  
 	 	 	         {  
 	 	 	 	         v a r   i W i d t h ;  
 	 	 	 	         o M e n u   =   s p m _ g e t B y I d ( " t b l "   +   s I D ) ;  
  
 	 	 	 	         v a r   o P D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o R o w ) ;  
 	 	 	 	         v a r   o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
         	 	 	 	                 	 	 	  
 	 	 	 	         o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( o P D i m s . t ) ;  
         	 	 	 	  
 	 	 	 	         s p m _ r e s e t S c r o l l ( o M e n u ) ;  
  
 	 	 	 	         t h i s . d o T r a n s i t i o n ( o M e n u ) ;  
  
 	 	 	 	         o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ; 	 / / n o w   t h a t   w e   m o v e d   n e e d   t o   r e g e t   d i m s  
 	 	 	 	         o M e n u . s t y l e . d i s p l a y   =   " " ;  
  
 	 	 	             i f   ( o M D i m s . t   -   s p m _ g e t B o d y S c r o l l T o p ( )   +   o M D i m s . h   >   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	             {  
 	 	 	 	                 i f   ( o M D i m s . h   <   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	 	                 {  
 	 	 	 	 	 	         o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( s p m _ g e t V i e w P o r t H e i g h t ( )   +   s p m _ g e t B o d y S c r o l l T o p ( )   -   o M D i m s . h ) ;  
 	 	 	 	                 }  
 	 	 	                         e l s e  
 	 	 	 	 	         {  
         	 	 	 	 	          
 	 	 	 	 	 	         s p m _ h a n d l e S c r o l l M e n u ( t h i s ,   o M e n u ) ;  
         	 	 	 	 	 	  
 	 	 	 	 	 	         o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ; 	 / / n o w   t h a t   w e   m o v e d   n e e d   t o   r e g e t   d i m s  
 	 	 	 	 	         }  
 	 	 	             }  
  
 	 	 	 	         i f   ( t h i s . d i r e c t i o n   = =   ' r t l ' )  
 	 	 	 	 	         o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   o M D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	         e l s e  
 	 	 	 	 	         o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   +   o P D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
  
 	 	 	 	         i f   ( t h i s . d i r e c t i o n   = =   ' r t l ' )  
 	 	 	 	         {  
 	 	 	 	 	         i f   ( o M D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( )   <   0 )  
 	 	 	 	 	 	         o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   +   o P D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	         }  
 	 	 	 	         e l s e      
 	 	 	 	         {  
 	 	 	 	 	         i f   ( o P D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( )   +   o P D i m s . w   +   o M D i m s . w   >   s p m _ g e t V i e w P o r t W i d t h ( ) )  
 	 	 	 	 	 	         o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   o M D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	         }  
         	 	 	 	 	  
 	 	 	 	         t h i s . _ m _ a O p e n M e n u I D [ t h i s . _ m _ a O p e n M e n u I D . l e n g t h ]   =   s I D ;  
 	 	 	 	         i f   ( t h i s . u s e I F r a m e s )  
 	 	 	 	 	         s p m _ i F r a m e I n d e x ( o M e n u ,   t r u e ,   t h i s . s y s t e m I m a g e s P a t h ) ;  
 	 	 	 	         e l s e  
 	 	 	 	 	         s p m _ h i d e E l e m e n t ( " S E L E C T | O B J E C T " , o M e n u ) ;  
  
 	 	 	         }  
 	 	         }  
 	 	         t h i s . f i r e E v e n t ( ' o n M e n u I t e m M o u s e O v e r ' ,   o R o w ) ;  
 	 	 }  
 	 	  
 	 }  
 	  
     / / - - -   h a n d l e s   m o u s e o u t   f o r   m e n u   i t e m   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . h a n d l e m b i _ m o u t   =   f u n c t i o n   ( o R o w )  
 	 {  
 	 	 	 v a r   s I D   =   o R o w . i d . s u b s t r ( 2 ) ;  
  
 	 	 	 o R o w . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m ' )   +   '   '   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e c s s ' ,   ' ' ) ) ;  
 	 	     s p m _ g e t B y I d ( " i c o n "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i c n ' )   +   t h i s . c s s M e n u I c o n ) ;  
 	 	     s p m _ g e t B y I d ( " t d "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m i t m ' )   +   '   '   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t A t t r ( o R o w ,   ' s a v e c s s ' ,   ' ' ) ) ;  
 	 	     s p m _ g e t B y I d ( " a r r o w "   +   s I D ) . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m a r w ' )   +   t h i s . c s s M e n u A r r o w ) ;  
 	 	 	  
 	 	 	 s p m _ a p p l y R o w B o r d e r ( o R o w ,   1 ,   " " ,   f a l s e ) ;  
  
             t h i s . s t o p T r a n s i t i o n ( ) ;  
 	 }  
  
     / / u s e d   f o r   r a i s i n g   e v e n t s   t o   c l i e n t   j a v a s c r i p t  
     S o l p a r t M e n u . p r o t o t y p e . f i r e E v e n t   =   f u n c t i o n   ( s E v e n t ,   s r c )    
     {  
          
 	 	 r e t u r n ;   / / d i s a b l e d   f o r   n o w  
         i f   ( e v a l ( ' t h i s . '   +   s E v e n t   +   '   ! =   n u l l ' ) )  
 	 	 {  
 	 	 	 v a r   e   =   n e w   O b j e c t ( ) ;  
 	 	 	 i f   ( s r c   ! =   n u l l )  
 	 	 	 	 e . s r c E l e m e n t   =   s r c ;  
 	 	 	 e l s e  
 	 	 	 	 e . s r c E l e m e n t   =   t h i s . _ m _ o M e n u ;  
 	 	 	 	  
 	 	 	 	 e v a l ( ' t h i s . '   +   s E v e n t   +   ' ( e ) ' ) ;  
 	 	 }  
     }  
  
 	 / / - - -   c a l l e d   b y   s e t T i m e O u t   t o   c h e c k   m o u s e o u t   h i d e   d e l a y   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . h i d e M e n u T i m e   =   f u n c t i o n   ( )  
     {  
         i f   ( t h i s . _ m _ d H i d e T i m e r   ! =   n u l l   & &   t h i s . m o u t D e l a y   >   0 )  
         {  
             i f   ( n e w   D a t e ( )   -   t h i s . _ m _ d H i d e T i m e r   > =   t h i s . m o u t D e l a y )  
             {  
                 t h i s . h i d e A l l M e n u s ( ) ;  
                 t h i s . _ m _ d H i d e T i m e r   =   n u l l ;  
             }  
             e l s e  
                 s e t T i m e o u t ( t h i s . h i d e M e n u T i m e ,   t h i s . m o u t D e l a y ) ;  
         }  
     }  
  
 	 S o l p a r t M e n u . p r o t o t y p e . m o u s e I n D e l a y H a n d l e r   =   f u n c t i o n   ( )  
 	 {  
 	 	 i f   ( t h i s . m i n D e l a y T y p e   = =   ' r o o t ' )  
 	 	 	 t h i s . o n M B M O ( t h i s . m i n D e l a y O b j ,   t r u e ) ;  
 	 	 e l s e   i f   ( t h i s . m i n D e l a y T y p e   = =   ' s u b ' )  
 	 	 	 t h i s . h a n d l e m b i _ m o ( t h i s . m i n D e l a y O b j ,   t r u e ) ;  
 	 	 t h i s . m i n D e l a y T i m e r   =   n u l l ;  
 	 	 t h i s . m i n D e l a y O b j   =   n u l l ;  
 	 }  
  
 	 / / - - -   c a l l e d   b y   s e t T i m e O u t   t o   c h e c k   m o u s e o u t   h i d e   d e l a y   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . s c r o l l M e n u   =   f u n c t i o n   ( )  
     {  
 	 	 i f   ( t h i s . _ m _ o S c r o l l i n g M e n u   ! =   n u l l )  
 	 	 {  
 	 	 	 i f   ( s p m _ S c r o l l M e n u C l i c k ( t h i s . _ m _ o S c r o l l i n g M e n u )   = =   f a l s e )  
 	 	 	 	 s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   t h i s . _ m _ s N S p a c e   +   ' " ] . s c r o l l M e n u ( ) ' ,   5 0 0 ) ;  
 	 	 	 e l s e  
 	 	 	 	 t h i s . _ m _ o S c r o l l i n g M e n u   =   n u l l ;  
 	 	 }  
     }  
  
 / / g l o b a l  
 	 f u n c t i o n   s p m _ i F r a m e I n d e x ( e M e n u ,   b S h o w ,   s y s I m g P a t h )  
 	 {  
 	 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' o p ' )  
 	 	 	 r e t u r n ; 	 / / n o t   n e e d e d  
 	 	  
 	 	 i f   ( d o c u m e n t . r e a d y S t a t e   ! =   ' c o m p l e t e ' )  
 	 	 	 r e t u r n ; 	 / / a v o i d   o p e r a t i o n   a b o r t e d  
 	 	  
 	 	 i f   ( b S h o w )  
 	 	 {  
 	 	 	 v a r   o I F R = s p m _ g e t B y I d ( ' i f r '   +   e M e n u . i d ) ;  
 	 	 	 i f   ( o I F R   = =   n u l l )  
 	 	 	 {  
 	 	 	 	 v a r   o I F R   =   d o c u m e n t . c r e a t e E l e m e n t ( ' i f r a m e ' ) ;  
 	 	 	 	 o I F R . i d   =   ' i f r '   +   e M e n u . i d ;  
 	 	 	 	 / / o I F R . s r c   =   ' j a v a s c r i p t :   v o i d ( 0 ) ; ' ;  
 	 	 	 	 o I F R . s r c   =   s y s I m g P a t h   +   ' s p a c e r . g i f ' ;  
 	 	 	 	 o I F R . s t y l e . t o p   =   s p m _ g e t C o o r d ( 0 ) ;  
 	 	 	 	 o I F R . s t y l e . l e f t   =   s p m _ g e t C o o r d ( 0 ) ;  
 	 	 	 	 o I F R . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ( o p a c i t y = 0 ) " ;  
 	 	 	 	 o I F R . s c r o l l i n g   =   ' n o ' ;  
 	 	 	 	 o I F R . f r a m e B o r d e r   =   ' n o ' ;  
 	 	 	 	 o I F R . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 	 	 o I F R . s t y l e . p o s i t i o n   =   ' s t a t i c ' ;  
 	 	 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( o I F R ) ;  
 	 	 	 }  
 	 	 	 v a r   o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( e M e n u ) ;  
 	 	 	  
 	 	 	 o I F R . s t y l e . w i d t h = o M D i m s . w ;  
 	 	 	 o I F R . s t y l e . h e i g h t = o M D i m s . h ;  
 	 	 	 o I F R . s t y l e . t o p = s p m _ g e t C o o r d ( o M D i m s . t ) ;  
 	 	 	 o I F R . s t y l e . l e f t = s p m _ g e t C o o r d ( o M D i m s . l ) ;  
 	 	 	  
 	 	 	 v a r   i I n d e x   =   s p m _ g e t C u r r e n t S t y l e ( e M e n u ,   ' z I n d e x ' ) ; 	 / / e M e n u . s t y l e . z I n d e x ;  
 	 	 	 i f   ( i I n d e x   = =   n u l l   | |   i I n d e x   = =   0 )  
 	 	 	 	 e M e n u . s t y l e . z I n d e x   =   1 ;  
 	 	 	 o I F R . s t y l e . z I n d e x = i I n d e x - 1 ;  
 	 	 	 o I F R . s t y l e . d i s p l a y = " b l o c k " ;  
 	 	 }  
 	 	 e l s e   i f   ( s p m _ g e t B y I d ( ' i f r '   +   e M e n u . i d )   ! =   n u l l )  
 	 	 {  
 	 	 	 s p m _ g e t B y I d ( ' i f r '   +   e M e n u . i d ) . s t y l e . d i s p l a y = ' n o n e ' ;  
 	 	 }  
 	 }  
  
 	 f u n c t i o n   s p m _ s h o w E l e m e n t ( e l m I D )  
 	 {  
 	 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' o p ' )  
 	 	 	 r e t u r n ; 	 / / n o t   n e e d e d  
  
 	 	 / /   D i s p l a y   a n y   e l e m e n t   t h a t   w a s   h i d d e n  
 	 	 v a r   s T a g s   =   e l m I D . s p l i t ( ' | ' ) ;  
 	 	 f o r   ( v a r   x = 0 ;   x < s T a g s . l e n g t h ;   x + + )  
 	 	 {  
 	 	 	 e l m I D   =   s T a g s [ x ] ;  
 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   s p m _ g e t T a g s ( e l m I D ) . l e n g t h ;   i + + )  
 	 	 	 {  
 	 	 	 	 o b j   =   s p m _ g e t T a g s ( e l m I D ) [ i ] ;  
 	 	 	 	 i f   ( !   o b j   | |   !   o b j . o f f s e t P a r e n t )  
 	 	 	 	 	 c o n t i n u e ;  
 	 	 	 	 o b j . s t y l e . v i s i b i l i t y   =   " " ;  
 	 	 	 }  
 	 	 }  
 	 }  
  
 	 f u n c t i o n   s p m _ h i d e E l e m e n t ( e l m I D ,   e M e n u )  
 	 {  
 	 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' o p ' )  
 	 	 	 r e t u r n ; 	 / / n o t   n e e d e d  
  
 	 	 v a r   o b j ;  
 	 	 / /   H i d e   a n y   e l e m e n t   t h a t   o v e r l a p s   w i t h   t h e   d r o p d o w n   m e n u  
 	 	 v a r   s T a g s   =   e l m I D . s p l i t ( ' | ' ) ;  
 	 	  
 	 	 v a r   o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( e M e n u ) ;  
 	 	  
 	 	 f o r   ( v a r   x = 0 ;   x < s T a g s . l e n g t h ;   x + + )  
 	 	 {  
 	 	 	 e l m I D   =   s T a g s [ x ] ;  
 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   s p m _ g e t T a g s ( e l m I D ) . l e n g t h ;   i + + )  
 	 	 	 {  
 	 	 	 	 o b j   =   s p m _ g e t T a g s ( e l m I D ) [ i ] ;  
 	 	 	 	 v a r   o O D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o b j ) ;  
 	 	 	 	  
 	 	 	 	 i f   ( o O D i m s . t   >   o M D i m s . t   +   o M D i m s . h )  
 	 	 	 	 {  
 	 	 	 	 	 / / i f   e l e m e n t   i s   b e l o w   b o t t o m   o f   m e n u   t h e n   d o   n o t h i n g  
 	 	 	 	 }  
 	 	 	 	 e l s e   i f   ( o O D i m s . l   >   o M D i m s . l   +   o M D i m s . w )  
 	 	 	 	 {  
 	 	 	 	 	 / / i f   e l e m e n t   i s   t o   t h e   r i g h t   o f   m e n u   t h e n   d o   n o t h i n g  
 	 	 	 	 }  
 	 	 	 	 e l s e   i f   ( o O D i m s . l   +   o O D i m s . w   <   o M D i m s . l )  
 	 	 	 	 {  
 	 	 	 	 	 / / i f   e l e m e n t   i s   t o   t h e   l e f t   o f   m e n u   t h e n   d o   n o t h i n g  
 	 	 	 	 }  
 	 	 	 	 e l s e   i f   ( o O D i m s . t   +   o O D i m s . h   <   o M D i m s . t )  
 	 	 	 	 {  
 	 	 	 	 	 / / i f   e l e m e n t   i s   t o   t h e   t o p   o f   m e n u   t h e n   d o   n o t h i n g  
 	 	 	 	 }  
 	 	 	 	 e l s 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   s p m _ p o s i t i o n M e n u ( m e ,   o M e n u ,   o C e l l )  
 	 {  
  
 	 	 s p m _ r e s e t S c r o l l ( o M e n u ) ;  
  
 	 	 v a r   o P D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o C e l l ,   f a l s e ,   m e ) ;  
 	 	  
 	 	 i f   ( m e . d i s p l a y   = =   ' v e r t i c a l ' )  
 	 	 {  
 	 	 	 o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( o P D i m s . t ) ;  
 	 	 	 v a r   o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
  
 	 	 	 i f   ( o M D i m s . t   -   s p m _ g e t B o d y S c r o l l T o p ( )   +   o M D i m s . h   > =   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	 {  
 	 	 	 	 i f   ( o M D i m s . h   <   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	 	 	 o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( s p m _ g e t V i e w P o r t H e i g h t ( )   -   o M D i m s . h   +   s p m _ g e t B o d y S c r o l l T o p ( ) ) ; 	  
 	 	 	 	 e l s e  
 	 	 	 	 	 s p m _ h a n d l e S c r o l l M e n u ( m e ,   o M e n u ) ;  
 	 	 	 }  
 	 	 	  
 	 	 	 v a r   o O r i g M D i m s ;  
 	 	 	  
 	 	 	 i f   ( s p m _ b r o w s e r T y p e ( )   ! =   ' i e ' )   / / s i n c e   m o z i l l a   d o e s n ' t   s e t   w i d t h   g r e a t e r   t h a n   w i n d o w   s i z e   w e   n e e d   t o   s t o r e   i t   h e r e  
 	 	 	 	   o O r i g M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
 	 	 	  
 	 	 	 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   +   o P D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
 	 	 	 i f   ( o O r i g M D i m s   = =   n u l l )  
 	 	 	 	 o O r i g M D i m s   =   o M D i m s ;  
 	 	 	  
 	 	 	 i f   ( o M D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( t r u e )   +   o O r i g M D i m s . w   >   s p m _ g e t V i e w P o r t W i d t h ( ) )  
 	 	 	 {  
 	 	 	     i f   ( s p m _ g e t V i e w P o r t W i d t h ( )   -   o O r i g M D i m s . w   >   0 )     / / o n l y   d o   t h i s   i f   i t   f i t s  
 	 	 	 	     o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   o O r i g M D i m s . w   -   s p m _ g e t B o d y S c r o l l L e f t ( t r u e ) ) ;  
 	 	 	 }  
  
 	 	 	 / / o M e n u . s t y l e . d i s p l a y   =   " " ;  
 	 	 }  
 	 	 e l s e  
 	 	 {  
 	 	 	 i f   ( m e . d i r e c t i o n   = =   ' r t l ' ) 	 	 	  
 	 	 	 {  
 	 	 	 	 v a r   o M D i m s 2   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
 	 	 	 	 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( ( o P D i m s . l   +   o P D i m s . w )   -   o M D i m s 2 . w   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 }  
 	 	 	 e l s e 	 	 	  
 	 	 	 	 o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( o P D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( ) ) ;  
 	 	 	 	  
 	 	 	 o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( o P D i m s . t   +   o P D i m s . h ) ;  
 	 	 	 v a r   o M D i m s   =   n e w   s p m _ e l e m e n t D i m s ( o M e n u ) ;  
 	 	 	  
 	 	 	 i f   ( o M D i m s . l   -   s p m _ g e t B o d y S c r o l l L e f t ( t r u e )   +   o M D i m s . w   >   s p m _ g e t V i e w P o r t W i d t h ( ) )  
 	 	 	 {  
 	 	 	     i f   ( s p m _ g e t V i e w P o r t W i d t h ( )   -   o M D i m s . w   >   0 )     / / o n l y   d o   t h i s   i f   i t   f i t s  
 	 	 	 	     o M e n u . s t y l e . l e f t   =   s p m _ g e t C o o r d ( s p m _ g e t V i e w P o r t W i d t h ( )   -   o M D i m s . w   +   s p m _ g e t B o d y S c r o l l L e f t ( t r u e ) ) ;  
 	 	 	 }  
 	 	 	  
 	 	 	 i f   ( o M D i m s . t   -   s p m _ g e t B o d y S c r o l l T o p ( )   +   o M D i m s . h   >   s p m _ g e t V i e w P o r t H e i g h t ( ) )  
 	 	 	 {  
 	 	 	     i f   ( o P D i m s . t   -   o M D i m s . h   -   s p m _ g e t B o d y S c r o l l T o p ( )   >   0 )   / / o n l y   d o   t h i s   i f   i t   f i t s  
 	 	 	 	     o M e n u . s t y l e . t o p   =   s p m _ g e t C o o r d ( o P D i m s . t   -   o M D i m s . h ) ; 	 / / p l a c e   a b o v e   m e n u   b a r  
 	 	 	 	 e l s e  
 	 	 	 	 	 s p m _ h a n d l e S c r o l l M e n u ( m e ,   o M e n u ) ;  
 	 	 	 }  
 	 	 	 / / o M e n u . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 }  
 	 }  
  
 	 / / - - - - - - - - -   I n t e r n a l   ( p r i v a t e )   F u n c t i o n s   - - - - - - - - / /  
 	 / / - - -   A p p l i e s   b o r d e r   t o   c e l l   - - - / /  
 	 S o l p a r t M e n u . p r o t o t y p e . a p p l y B o r d e r   =   f u n c t i o n   ( o C e l l ,   i S i z e ,   s T o p L e f t C o l o r ,   s B o t t o m R i g h t C o l o r ,   s S t y l e )  
 	 {  
 	 	 i f   ( t h i s . m o D i s p l a y   = =   ' O u t s e t ' )  
 	 	 {  
 	 	 	 i f   ( s S t y l e   = =   n u l l )  
 	 	 	 	 s S t y l e   =   " s o l i d " ;  
  
 	 	 	 i f   ( s T o p L e f t C o l o r . l e n g t h   >   0   & &   s B o t t o m R i g h t C o l o r . l e n g t h   >   0 )  
 	 	 	 {  
 	 	 	 	 i f   ( o C e l l . t a g N a m e   = =   ' T R ' )  
 	 	 	 	 	 o C e l l   =   o C e l l . c h i l d N o d e s ( 0 ) ;  
 	 	 	 	  
 	 	 	 	 o C e l l . s t y l e . b o r d e r T o p   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s T o p L e f t C o l o r ;  
 	 	 	 	 o C e l l . s t y l e . b o r d e r L e f t   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s T o p L e f t C o l o r ;  
 	 	 	 	 o C e l l . s t y l e . b o r d e r R i g h t   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s B o t t o m R i g h t C o l o r ;  
 	 	 	 	 o C e l l . s t y l e . b o r d e r B o t t o m   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s B o t t o m R i g h t C o l o r ; 	  
 	 	 	 	  
 	 	 	 }  
 	 	 }  
 	 	 i f   ( t h i s . m o D i s p l a y   = =   ' H i g h L i g h t ' )  
 	 	 {  
 	 	 	 i f   ( s T o p L e f t C o l o r   = =   t h i s . b a c k C o l o r )  
 	 	 	 {  
                 o C e l l . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b a r   s p m i t m ' )   +   '   '   +   t h i s . c s s M e n u I t e m   +   '   '   +   s p m _ g e t A t t r ( o C e l l ,   ' s a v e c s s ' ,   ' ' ) ) ;  
 	 	 	 }  
 	 	 	 e l s e  
 	 	 	 {  
                 o C e l l . c l a s s N a m e   =   s p m _ f i x C S S F o r M a c ( t h i s . g e t I n t C S S N a m e ( ' s p m b a r   s p m i t m s e l ' )   +   '   '   +   t h i s . c s s M e n u I t e m S e l   +   '   '   +   s p m _ g e t A t t r ( o C e l l ,   ' s a v e s e l c s s ' ,   ' ' ) ) ;  
 	 	 	 }  
 	 	 } 	 	  
 	 }  
  
 	 f u n c t i o n   s p m _ a p p l y R o w B o r d e r ( o R o w ,   i S i z e ,   s C o l o r ,   b S e l e c t e d ,   s S t y l e )  
 	 {  
 	 	 i f   ( o R o w . c e l l s . l e n g t h   = =   0 )   / / ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i ' )  
 	 	 	 r e t u r n ; 	 / / s a f a r i   h a s   i s s u e s   w i t h   a c c e s s i n g   c e l l  
 	 	  
 	 	 v a r   s C o l o r 2 = s C o l o r ;  
 	 	 i f   ( s S t y l e   = =   n u l l )  
 	 	 	 s S t y l e   =   " s o l i d " ;  
  
 	 	 i f   ( s C o l o r   = =   " " )  
 	 	 {  
 	 	 	 	 s C o l o r 2   =   s p m _ g e t C u r r e n t S t y l e ( o R o w . c e l l s [ 0 ] ,   ' b a c k g r o u n d - C o l o r ' ) ;  
 	 	 	 	 i f   ( ( s C o l o r 2   = =   n u l l   | |   s C o l o r 2   = =   ' ' )   & &   s p m _ b r o w s e r T y p e ( )   ! =   ' i e ' )  
 	 	 	 	 	 s C o l o r 2   =   ' t r a n s p a r e n t ' ;  
 	 	 }  
  
 	 	 s p m _ a p p l y B o r d e r s ( o R o w . c e l l s [ 0 ] ,   s S t y l e ,   i S i z e ,   s C o l o r 2 ,   t r u e ,   t r u e ,   f a l s e ,   t r u e ) ;  
  
 	 	 i f   ( s C o l o r   = =   " "   & &   b S e l e c t e d   = =   f a l s e )  
         {  
             s C o l o r 2   =   s p m _ g e t C e l l B a c k C o l o r ( o R o w . c e l l s [ 1 ] ) ;  
             i f   ( s C o l o r 2   = =   n u l l   | |   s C o l o r 2   = =   ' ' )  
 	 	 	 	 s C o l o r 2   =   ' t r a n s p a r e n t ' ;  
         }  
        
         / / i f   ( s C o l o r 2   ! =   ' t r a n s p a r e n t ' )  
         / / {  
 	 	 	 s p m _ a p p l y B o r d e r s ( o R o w . c e l l s [ 1 ] ,   s S t y l e ,   i S i z e ,   s C o l o r 2 ,   t r u e ,   f a l s e ,   f a l s e ,   t r u e ) ;  
 	 	 	 s p m _ a p p l y B o r d e r s ( o R o w . c e l l s [ 2 ] ,   s S t y l e ,   i S i z e ,   s C o l o r 2 ,   t r u e ,   f a l s e ,   t r u e ,   t r u e ) ;  
 	 	 / / }  
 	 }  
 	  
 	 f u n c t i o n   s p m _ g e t C e l l B a c k C o l o r ( o )  
 	 {  
 	 	 v a r   s C o l o r   =   s p m _ g e t C u r r e n t S t y l e ( o ,   ' b a c k g r o u n d - C o l o r ' ) ;      
         i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
         {  
             / / - - -   f i x   I E   t r a n s p a r e n t   b o r d e r   i s s u e   - - - / /  
             w h i l e   ( s C o l o r   = =   ' t r a n s p a r e n t ' )  
             {  
                 s C o l o r   =   s p m _ g e t C u r r e n t S t y l e ( o ,   ' b a c k g r o u n d - C o l o r ' ) ;      
                 o   =   o . p a r e n t E l e m e n t ;  
                 i f   ( o . i d . i n d e x O f ( ' d i v O u t e r T a b l e s ' )   ! =   - 1 ) 	 / / i f   w e   a r e   o u t s i d e   t h e   r e a l m   o f   t h e   m e n u   t h e n   u s e   t r a n s p a r e n c y  
 	 	 	 	 	 b r e a k ;  
             }  
         }  
         r e t u r n   s C o l o r ;  
 	 }  
 	  
 	 f u n c t i o n   s p m _ a p p l y B o r d e r s ( o ,   s S t y l e ,   i S i z e ,   s C o l o r ,   t ,   l ,   r ,   b )  
 	 {  
  
 	 	 i f   ( t )   o . s t y l e . b o r d e r T o p   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s C o l o r ;  
 	 	 i f   ( b )   o . s t y l e . b o r d e r B o t t o m   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s C o l o r ;  
 	 	 i f   ( r )   o . s t y l e . b o r d e r R i g h t   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s C o l o r ;  
 	 	 i f   ( l )   o . s t y l e . b o r d e r L e f t   =   s S t y l e   +   "   "   +   i S i z e   +   " p x   "   +   s C o l o r ;  
  
 	 }  
  
 	 f u n c t i o n   s p m _ r e s e t S c r o l l ( o M e n u )  
 	 {  
 	  
 	 	 i f   ( o M e n u . s c r o l l I t e m s   ! =   n u l l )  
 	 	 {  
 	 	 	 o M e n u . s c r o l l P o s   =   1 ;  
 	 	 	 o M e n u . s c r o l l I t e m s   =   9 9 9 9 ;  
 	 	 	 s p m _ s h o w S c r o l l e d I t e m s ( o M e n u ) ;  
 	 	 } 	  
 	 }  
 	  
 	  
 	 f u n c t i o n   s p m _ h a n d l e S c r o l l M e n u ( m e ,   o M e n u )  
 	 {  
 	 	 v a r   o T b l   =   s p m _ g e t T a g s ( ' t a b l e ' ,   o M e n u ) [ 0 ] ;   / / o M e n u . c h i l d N o d e s [ 1 ] ; 	  
 	 	 o M e n u . s t y l e . d i s p l a y   =   ' ' ;  
 	 	 i f   ( o M e n u . s c r o l l P o s   = =   n u l l )  
 	 	 {  
 	 	 	 o M e n u . s c r o l l P o s   =   1 ; 	 	 	  
 	 	 	 	 	 	  
 	 	 	 v a r   o R o w   =   s p m _ i n s e r t T a b l e R o w ( o T b l ) ;  
 	 	 	 v a r   o C e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( ' T D ' ) ; 	 	  
 	 	 	 o C e l l . i d   =   ' d n '   +   o M e n u . i d . s u b s t r i n g ( 3 ) ;  
 	 	 	 o C e l l . c o l S p a n   =   3 ;  
 	 	 	 o C e l l . a l i g n   =   ' c e n t e r ' ;  
 	 	 	 o C e l l . s t y l e . b a c k g r o u n d C o l o r   =   ' g r a y ' ; 	 / / c a n   b e   o v e r r i d d e n   b y   M e n u S c r o l l   s t y l e  
 	 	 	 o C e l l . i n n e r H T M L = ' < d i v   i d = " d n '   +   o M e n u . i d . s u b s t r ( 3 )   +   ' "   o n c l i c k = " r e t u r n   s p m _ S c r o l l M e n u C l i c k ( t h i s ,   e v e n t ) ; "   o n m o u s e o v e r = " s p m _ S c r o l l M e n u M O ( t h i s ,   m _ o S o l p a r t M e n u [ \ ' '   +   m e . _ m _ s N S p a c e   +   ' \ ' ] ) ; "   o n m o u s e o u t = " s p m _ S c r o l l M e n u M O U T ( m _ o S o l p a r t M e n u [ \ ' '   +   m e . _ m _ s N S p a c e   +   ' \ ' ] ) ; "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( m e . g e t I n t C S S N a m e ( ' s p m i t m s c r ' ) )   +   '   '   +   m e . c s s M e n u S c r o l l I t e m   +   ' "   s t y l e = " w i d t h :   1 0 0 % ;   f o n t - s i z e :   6 p t ; " > . . . < / d i v > ' ;  
 	 	 	 o R o w . a p p e n d C h i l d ( o C e l l ) ;  
  
 	 	 	 o R o w   =   s p m _ i n s e r t T a b l e R o w ( o T b l ,   0 ) ;  
 	 	 	 o C e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( ' T D ' ) ; 	 	  
 	 	 	 o C e l l . i d   =   ' u p '   +   o M e n u . i d . s u b s t r i n g ( 3 ) ;  
 	 	 	 o C e l l . c o l S p a n   =   3 ;  
 	 	 	 o C e l l . a l i g n   =   ' c e n t e r ' ;  
 	 	 	 o C e l l . s t y l e . b a c k g r o u n d C o l o r   =   ' g r a y ' ; 	 / / c a n   b e   o v e r r i d d e n   b y   M e n u S c r o l l   s t y l e  
 	 	 	 o C e l l . i n n e r H T M L = ' < d i v   i d = " u p '   +   o M e n u . i d . s u b s t r ( 3 )   +   ' "   o n c l i c k = " r e t u r n   s p m _ S c r o l l M e n u C l i c k ( t h i s ,   e v e n t ) ; "   o n m o u s e o v e r = " s p m _ S c r o l l M e n u M O ( t h i s ,   m _ o S o l p a r t M e n u [ \ ' '   +   m e . _ m _ s N S p a c e   +   ' \ ' ] ) ; "   o n m o u s e o u t = " s p m _ S c r o l l M e n u M O U T ( m _ o S o l p a r t M e n u [ \ ' '   +   m e . _ m _ s N S p a c e   +   ' \ ' ] ) ; "   c l a s s = " '   +   s p m _ f i x C S S F o r M a c ( m e . g e t I n t C S S N a m e ( ' s p m i t m s c r ' ) )   +   '   '   +   m e . c s s M e n u S c r o l l I t e m   +   ' "   s t y l e = " w i d t h :   1 0 0 % ;   f o n t - s i z e :   6 p t ; " > . . . < / d i v > ' ;  
 	 	 	 o R o w . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 	 o R o w . a p p e n d C h i l d ( o C e l l ) ;  
 	 	 } 	  
  
 	 	 i f   ( o M e n u . S c r o l l R o w H e i g h t   = =   n u l l )  
 	 	 {  
 	 	 	 s p m _ g e t T a g s ( ' t r ' ,   o T b l ) [ 0 ] . s t y l e . d i s p l a y   =   ' ' ;  
 	 	 	 o M e n u . S c r o l l I t e m H e i g h t   =   ( s p m _ g e t E l e m e n t H e i g h t ( s p m _ g e t T a g s ( ' t r ' ,   o T b l ) [ 0 ] )   *   2 ) ;  
 	 	 	 s p m _ g e t T a g s ( ' t r ' ,   o T b l ) [ 0 ] . s t y l e . d i s p l a y   =   ' n o n e ' ;  
  
 	 	 	 o M e n u . S c r o l l R o w H e i g h t   =   s p m _ g e t E l e m e n t H e i g h t ( s p m _ g e t T a g s ( ' t r ' ,   o T b l ) [ 1 ] ) ;  
 	 	 }  
  
 	 	 o M e n u . s c r o l l I t e m s   =   p a r s e I n t ( ( s p m _ g e t V i e w P o r t H e i g h t ( )   -   s p m _ e l e m e n t T o p ( o M e n u )   +   s p m _ g e t B o d y S c r o l l T o p ( )   -   o M e n u . S c r o l l I t e m H e i g h t )   /   ( o M e n u . S c r o l l R o w H e i g h t   +   1 ) ) ;  
 	 	 s p m _ s h o w S c r o l l e d I t e m s ( o M e n u ) ;  
  
 	 }  
 	 	  
 	 f u n c t i o n   s p m _ S c r o l l M e n u M O ( e ,   m e )  
 	 {  
 	 	 m e . _ m _ d H i d e T i m e r   =   n u l l ;  
 	 	 m e . _ m _ o S c r o l l i n g M e n u   =   e ;  
 	 	 i f   ( N u m b e r ( m e . m o S c r o l l ) )  
 	 	 	 s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   m e . _ m _ s N S p a c e   +   ' " ] . s c r o l l M e n u ( ) ' ,   5 0 0 ) ;  
  
 	 }  
 	  
 	 f u n c t i o n   s p m _ S c r o l l M e n u M O U T ( m e )  
 	 {  
 	 	 m e . _ m _ o S c r o l l i n g M e n u   =   n u l l ;  
  
 	 	 m e . _ m _ d H i d e T i m e r   =   n e w   D a t e ( ) ;  
 	 	 i f   ( m e . m o u t D e l a y   ! =   0 )  
 	 	     s e t T i m e o u t ( ' m _ o S o l p a r t M e n u [ " '   +   m e . _ m _ s N S p a c e   +   ' " ] . h i d e M e n u T i m e ( ) ' ,   m e . m o u t D e l a y ) ;  
 	 	  
  
 	 }  
 	  
 	 f u n c t i o n   s p m _ S c r o l l M e n u C l i c k ( e ,   e v t )  
 	 { 	 	  
 	 	 i f   ( e   ! =   n u l l )  
 	 	 { 	  
 	 	 	 v a r   o C e l l   =   e . p a r e n t N o d e ;  
 	 	 	 v a r   o T b l   =   o C e l l . p a r e n t N o d e . p a r e n t N o d e . p a r e n t N o d e ;  
 	 	 	 v a r   o M e n u   =   o T b l . p a r e n t N o d e ;  
  
 	 	 	 i f   ( o C e l l . i d   = =   ' u p '   +   o M e n u . i d . s u b s t r i n g ( 3 ) )  
 	 	 	 {  
 	 	 	 	 i f   ( o M e n u . s c r o l l P o s   >   1 )  
 	 	 	 	 	 o M e n u . s c r o l l P o s - - ; 	 	 	 	 	  
 	 	 	 	 e l s e  
 	 	 	 	 	 r e t u r n   t r u e ;  
 	 	 	 }  
 	 	 	 e l s e    
 	 	 	 {  
 	 	 	 	 i f   ( o M e n u . s c r o l l P o s   +   o M e n u . s c r o l l I t e m s   <   o T b l . r o w s . l e n g t h   -   1 )  
 	 	 	 	 	 o M e n u . s c r o l l P o s + + ;  
 	 	 	 	 e l s e  
 	 	 	 	 	 r e t u r n   t r u e ;  
 	 	 	 }  
 	 	 	 	  
 	 	 	 s p m _ s h o w S c r o l l e d I t e m s ( o M e n u ) ;  
 	 	 	 i f   ( e v t   ! =   n u l l )  
 	 	 	 	 s p m _ s t o p E v e n t B u b b l i n g ( e v t ) ;  
 	 	 }  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 f u n c t i o n   s p m _ s h o w S c r o l l e d I t e m s ( o M e n u )  
 	 {  
 	 	 v a r   o T b l   =   s p m _ g e t T a g s ( ' t a b l e ' ,   o M e n u ) [ 0 ] ;  
 	 	 v a r   o R o w s   =   s p m _ g e t T a g s ( ' t r ' ,   o T b l ) ; 	 / / o T b l . r o w s . l e n g t h  
 	 	  
 	 	 f o r   ( v a r   i = 1 ;   i   <   o R o w s . l e n g t h ;   i + + ) 	  
 	 	 {  
 	 	 	 / / i f   r o w   i s   n o t   w i t h i n   d i s p l a y   " w i n d o w "   t h e n   d o n ' t   d i s p l a y   i t  
 	 	 	 i f   ( i   <   o M e n u . s c r o l l P o s   | |   i   > =   o M e n u . s c r o l l P o s   +   o M e n u . s c r o l l I t e m s )  
 	 	 	 	 o R o w s [ i ] . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 	 e l s e  
 	 	 	 	 o R o w s [ i ] . s t y l e . d i s p l a y   =   ' ' ; 	 	 	  
 	 	 }  
 	 	  
 	 	 / /   i f   w e   a r e   s c r o l l e d   d o w n   a t   l e a s t   o n e   t h e n   d i s p l a y   u p   s c r o l l   i t e m  
 	 	 i f   ( o M e n u . s c r o l l P o s   >   1 )  
 	 	 	 o R o w s [ 0 ] . s t y l e . d i s p l a y   =   ' ' ;  
 	 	 e l s e  
 	 	 	 o R o w s [ 0 ] . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	  
 	 	  
 	 	 / /   i f   t h e r e   i s   a t   l e a s t   o n e   i t e m   n o t   d i s p l a y e d   t h e n   s h o w   d o w n   i t e m  
 	 	 i f   ( o M e n u . s c r o l l P o s   +   o M e n u . s c r o l l I t e m s   <   o T b l . r o w s . l e n g t h   -   1 )  
 	 	 	 o R o w s [ o R o w s . l e n g t h - 1 ] . s t y l e . d i s p l a y   =   ' ' ;  
 	 	 e l s e  
 	 	 	 o R o w s [ o R o w s . l e n g t h - 1 ] . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 	  
 	 }  
  
 	 f u n c t i o n   s p m _ i n s e r t T a b l e R o w ( t b l ,   i P o s )  
 	 {  
 	 	 v a r   o R o w ;  
 	 	 v a r   o T B ;  
 	 	 o R o w   =   d o c u m e n t . c r e a t e E l e m e n t ( ' T R ' ) ;  
 	 	 i f   ( t b l . g e t E l e m e n t s B y T a g N a m e ( ' T B O D Y ' ) . l e n g t h   = =   0 )  
 	 	 {  
 	 	 	 o T B   =   d o c u m e n t . c r e a t e E l e m e n t ( ' T B O D Y ' ) ;  
 	 	 	 t b l . a p p e n d C h i l d ( o T B ) ;  
 	 	 }  
 	 	 e l s e  
 	 	 	 o T B   =   t b l . g e t E l e m e n t s B y T a g N a m e ( ' T B O D Y ' ) [ 0 ] ;  
  
 	 	 i f   ( i P o s   = =   n u l l )  
 	 	 	 o T B . a p p e n d C h i l d ( o R o w ) ;  
 	 	 e l s e  
 	 	 	 o T B . i n s e r t B e f o r e ( o R o w ,   t b l . r o w s [ i P o s ] ) ;  
 	 	 r e t u r n   o R o w ;  
 	  
 	 }  
  
 	 f u n c t i o n   s p m _ g e t E l e m e n t H e i g h t ( o )  
 	 { 	  
 	 	 i f   ( o . o f f s e t H e i g h t   = =   n u l l   | |   o . o f f s e t H e i g h t   = =   0 )  
 	 	 {  
 	 	 	 i f   ( o . o f f s e t P a r e n t . o f f s e t H e i g h t   = =   n u l l   | |   o . o f f s e t P a r e n t . o f f s e t H e i g h t   = =   0 )  
 	 	 	 {  
 	 	 	 	 i f   ( o . o f f s e t P a r e n t . o f f s e t P a r e n t   ! =   n u l l )  
 	 	 	 	 	 r e t u r n   o . o f f s e t P a r e n t . o f f s e t P a r e n t . o f f s e t H e i g h t ;   / / n e e d e d   f o r   K o n q u e r o r  
 	 	 	 	 e l s e  
 	 	 	 	 	 r e t u r n   0 ;  
 	 	 	 }  
 	 	 	 e l s e  
 	 	 	 	 r e t u r n   o . o f f s e t P a r e n t . o f f s e t H e i g h t ;  
 	 	 }  
 	 	 e l s e  
 	 	 	 r e t u r n   o . o f f s e t H e i g h t ;  
 	 }  
  
 	 f u n c t i o n   s p m _ g e t E l e m e n t W i d t h ( o )  
 	 {  
 	 	 i f   ( o . o f f s e t W i d t h   = =   n u l l   | |   o . o f f s e t W i d t h   = =   0 )  
 	 	 {  
 	 	 	 i f   ( o . o f f s e t P a r e n t . o f f s e t W i d t h   = =   n u l l   | |   o . o f f s e t P a r e n t . o f f s e t W i d t h   = =   0 )  
 	 	 	 {  
 	 	 	 	 i f   ( o . o f f s e t P a r e n t . o f f s e t P a r e n t   ! =   n u l l )  
 	 	 	 	 	 r e t u r n   o . o f f s e t P a r e n t . o f f s e t P a r e n t . o f f s e t W i d t h ;   / / n e e d e d   f o r   K o n q u e r o r  
 	 	 	 	 e l s e  
 	 	 	 	 	 r e t u r n   0 ;  
 	 	 	 }  
 	 	 	 e l s e  
 	 	 	 	 r e t u r n   o . o f f s e t P a r e n t . o f f s e t W i d t h  
  
 	 	 }  
 	 	 e l s e  
 	 	 	 r e t u r n   o . o f f s e t W i d t h ;  
 	 }  
 	  
 	 / / v i e w p o r t   l o g i c   t a k e n   f r o m   h t t p : / / d h t m l k i t c h e n . c o m / j s / m e a s u r e m e n t s / i n d e x . j s p  
 	 f u n c t i o n   s p m _ g e t V i e w P o r t W i d t h ( )  
 	 {  
 	 	 / /   s u p p o r t e d   i n   M o z i l l a ,   O p e r a ,   a n d   S a f a r i  
         i f ( w i n d o w . i n n e r W i d t h )  
 	 	 	 r e t u r n   w i n d o w . i n n e r W i d t h ;  
         / /   s u p p o r t e d   i n   s t a n d a r d s   m o d e   o f   I E ,   b u t   n o t   i n   a n y   o t h e r   m o d e  
         i f ( w i n d o w . d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h )  
 	 	 	 r e t u r n   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ;  
 	  
         / /   s u p p o r t e d   i n   q u i r k s   m o d e ,   o l d e r   v e r s i o n s   o f   I E ,   a n d   m a c   I E   ( a n y t h i n g   e l s e ) .  
         r e t u r n   w i n d o w . d o c u m e n t . b o d y . c l i e n t W i d t h ;  
 	 }  
 	  
 	 f u n c t i o n   s p m _ g e t B o d y S c r o l l T o p ( )  
 	 {  
 	 	 i f   ( ' | i e | o p | m o | n s | ' . i n d e x O f ( ' | '   +   s p m _ b r o w s e r T y p e ( )   +   ' | ' )   ! =   - 1 )  
 	 	 {  
 	 	 	 i f   ( d o c u m e n t . b o d y . s c r o l l T o p   ! =   n u l l )  
 	 	 	 	 r e t u r n   d o c u m e n t . b o d y . s c r o l l T o p ;  
 	 	 }  
 	 	 r e t u r n   0 ;  
 	 }  
  
 	 f u n c t i o n   s p m _ g e t B o d y S c r o l l L e f t ( b O v e r r i d e )  
 	 {  
 	 	 i f   ( ' | o p | ' . i n d e x O f ( ' | '   +   s p m _ b r o w s e r T y p e ( )   +   ' | ' )   ! =   - 1   | |   b O v e r r i d e   = =   t r u e )  
 	 	 {  
 	 	 	 i f   ( d o c u m e n t . b o d y . s c r o l l L e f t   ! =   n u l l )  
 	 	 	 {  
 	 	 	 	 r e t u r n   d o c u m e n t . b o d y . s c r o l l L e f t ;  
 	 	 	 }  
 	 	 }  
 	 	 r e t u r n   0 ;  
 	 }  
 	  
 	 f u n c t i o n   s p m _ g e t V i e w P o r t H e i g h t ( )  
 	 {  
 	 	 / /   s u p p o r t e d   i n   M o z i l l a ,   O p e r a ,   a n d   S a f a r i  
         i f ( w i n d o w . i n n e r H e i g h t )  
 	 	 	 r e t u r n   w i n d o w . i n n e r H e i g h t ;  
         / /   s u p p o r t e d   i n   s t a n d a r d s   m o d e   o f   I E ,   b u t   n o t   i n   a n y   o t h e r   m o d e  
         i f ( w i n d o w . d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t )  
 	 	 	 r e t u r n   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ;  
 	  
         / /   s u p p o r t e d   i n   q u i r k s   m o d e ,   o l d e r   v e r s i o n s   o f   I E ,   a n d   m a c   I E   ( a n y t h i n g   e l s e ) .  
         r e t u r n   w i n d o w . d o c u m e n t . b o d y . c l i e n t H e i g h t ;  
 	 }  
 	 	  
 	 f u n c t i o n   s p m _ e l e m e n t T o p ( e S r c ,   i n c l u d e B o d y )  
 	 {  
 	 	  
 	 	 v a r   i T o p   =   0 ;  
 	 	 v a r   e P a r e n t ;  
 	 	 e P a r e n t   =   e S r c ;  
  
 	 	 w h i l e   ( e P a r e n t . t a g N a m e . t o U p p e r C a s e ( )   ! =   " B O D Y " )  
 	 	 {  
  
 	 	 	 / / S a f a r i   i n c o r r e c t l y   c a l c u l a t e s   t h e   T R   t a g   t o   b e   a t   t h e   t o p   o f   t h e   t a b l e ,   s o   t r y   a n d   g e t   c h i l d   T D   t a g   t o   u s e   f o r   m e a s u r e m e n t  
 	 	 	 / / i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i '   & &   e P a r e n t . t a g N a m e . t o U p p e r C a s e ( )   = =   ' T R '   & &   s p m _ g e t T a g s ( ' T D ' ,   e P a r e n t ) . l e n g t h )  
 	 	 	 / / 	 e P a r e n t   =   s p m _ g e t T a g s ( ' T D ' ,   e P a r e n t ) [ 0 ] ;  
  
 	 	 	 i T o p   + =   e P a r e n t . o f f s e t T o p ;  
 	 	 	  
 	 	 	 e P a r e n t   =   e P a r e n t . o f f s e t P a r e n t ;  
 	 	 	 i f   ( e P a r e n t   = =   n u l l )  
 	 	 	 	 b r e a k ;  
 	 	 }  
 	 	 i f   ( i n c l u d e B o d y   ! =   n u l l   & &   e P a r e n t   ! =   n u l l   & &   ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i '   | |   s p m _ b r o w s e r T y p e ( )   = =   ' k q ' ) )    
 	 	 	 i T o p   + =   e P a r e n t . o f f s e t T o p ;  
 	 	  
 	 	 r e t u r n   i T o p ;  
 	 }  
  
  
 	 f u n c t i o n   s p m _ e l e m e n t L e f t ( e S r c ,   i n c l u d e B o d y )  
 	 { 	  
 	 	 v a r   i L e f t   =   0 ;  
 	 	 v a r   e P a r e n t ;  
 	 	 e P a r e n t   =   e S r c ;  
 	 	 w h i l e   ( e P a r e n t . t a g N a m e . t o U p p e r C a s e ( )   ! =   " B O D Y " )  
 	 	 {  
  
 	 	 	 i L e f t   + =   e P a r e n t . o f f s e t L e f t ;  
 	 	 	 	  
 	 	 	 e P a r e n t   =   e P a r e n t . o f f s e t P a r e n t ;  
 	 	 	 i f   ( e P a r e n t   = =   n u l l )  
 	 	 	 	 b r e a k ;  
 	 	 }  
 	 	 i f   ( i n c l u d e B o d y   ! =   n u l l   & &   e P a r e n t   ! =   n u l l   & &   ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i '   | |   s p m _ b r o w s e r T y p e ( )   = =   ' k q ' ) )  
 	 	 	 i L e f t   + =   e P a r e n t . o f f s e t L e f t ;  
  
 	 	  
 	 	 r e t u r n   i L e f t ;  
 	 }  
 	  
 	 f u n c t i o n   s p m _ g e t E l e m e n t ( e ,   s I D )    
 	 {  
 	 	 v a r   o = e ;  
 	 	 v a r   i = 0 ;  
 	 	 w h i l e   ( o . i d   ! =   s I D )  
 	 	 {  
 	 	 	 o = o . p a r e n t N o d e ;  
 	 	 	 i + + ;  
 	 	 }  
 	 	 r e t u r n   o ;  
 	 }  
  
 	 f u n c t i o n   s p m _ g e t S o u r c e T R ( e ,   n s )  
 	 {  
 	 	 w h i l e   ( e . i d   = =   " " )  
 	 	 {  
 	 	 	 e =   e . p a r e n t E l e m e n t ;  
 	 	 }  
 	 	 i f   ( e . i d . i n d e x O f ( " a r r o w " )   ! =   - 1 )  
 	 	 {  
 	 	 	 v a r   s I D   =   e . i d . s u b s t r ( 5 ) ;  
 	 	 	 r e t u r n   s p m _ g e t B y I d ( " t r "   +   s I D ) ;  
 	 	 }  
 	 	 e l s e   i f   ( e . i d . i n d e x O f ( " t d " )   ! =   - 1 )  
 	 	 {  
 	 	 	 v a r   s I D   =   e . i d . s u b s t r ( 2 ) ;  
 	 	 	 r e t u r n   s p m _ g e t B y I d ( " t r "   +   s I D ) ;  
 	 	 } 	  
 	 	 e l s e   i f   ( e . i d . i n d e x O f ( " i c o n " )   ! =   - 1 )  
 	 	 {  
 	 	 	 v a r   s I D   =   e . i d . s u b s t r ( 4 ) ;  
 	 	 	 r e t u r n   s p m _ g e t B y I d ( " t r "   +   s I D ) ;  
 	 	 } 	  
 	 	 e l s e   i f   ( e . i d . i n d e x O f ( " i m g " )   ! =   - 1 )  
 	 	 {  
 	 	 	 v a r   s I D   =   e . i d . s u b s t r ( 3 ) ;  
 	 	 	 r e t u r n   s p m _ g e t B y I d ( " t r "   +   s I D ) ;  
 	 	 } 	  
 	 	 e l s e  
 	 	 {  
 	 	 	 r e t u r n   e ;  
 	 	 }  
 	 }  
  
 	 f u n c t i o n   s p m _ i t e m H a s C h i l d r e n ( s I D ,   n s )  
 	 {  
 	 	 o b j T a b l e   =   s p m _ g e t B y I d ( n s   +   " t b l "   +   s I D ) ;  
 	 	 i f   ( o b j T a b l e   ! =   n u l l )  
 	 	 {  
 	 	 	 i f   ( o b j T a b l e . r o w s   ! =   n u l l )  
 	 	 	 {  
 	 	 	 	 i f   ( o b j T a b l e . r o w s . l e n g t h   >   0 )  
 	 	 	 	 	 r e t u r n   t r u e ;  
 	 	 	 	 e l s e  
 	 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 } 	 	  
 	 	 }  
 	 }  
  
 f u n c t i o n   s p m _ g e t M e n u I t e m S t y l e ( s T y p e ,   o N o d e )  
 {  
     r e t u r n   s p m _ g e t A t t r ( o N o d e ,   s T y p e   +   " s t y l e " ,   ' ' ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u I t e m C S S ( o N o d e )  
 {  
     r e t u r n   s p m _ g e t A t t r ( o N o d e ,   " c s s " ,   ' ' ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u I t e m S e l C S S ( o N o d e )  
 {  
     r e t u r n   s p m _ g e t A t t r ( o N o d e ,   " s e l c s s " ,   ' ' ) ;  
 }  
  
 S o l p a r t M e n u . p r o t o t y p e . g e t I n t C S S N a m e   =     f u n c t i o n ( s C l a s s )  
 {  
     v a r   a r y   =   s C l a s s . s p l i t ( '   ' ) ;  
     v a r   s = ' ' ;  
     f o r   ( v a r   i = 0 ;   i < a r y . l e n g t h ;   i + + )  
         s   + =   t h i s . _ m _ s N S p a c e . t o L o w e r C a s e ( )   +   ' _ '   +   a r y [ i ]   +   '   ' ;  
      
     r e t u r n   s ;  
 }  
  
 f u n c t i o n   s p m _ f i x C S S F o r M a c ( s )  
 {  
 	 v a r   a r y   =   s . s p l i t ( '   ' ) ;  
 	 v a r   s R e t = ' ' ;  
 	 f o r   ( v a r   i = 0 ;   i < a r y . l e n g t h ;   i + + )  
 	 {  
 	 	 i f   ( a r y [ i ] . r t r i m ( ) . l e n g t h   >   0 )  
 	 	 {  
 	 	 	 i f   ( s R e t . l e n g t h )  
 	 	 	 	 s R e t   + =   '   '   +   a r y [ i ] ;  
 	 	 	 e l s e  
 	 	 	 	 s R e t   =   a r y [ i ] ;  
 	 	 }  
 	 }  
 	 r e t u r n   s R e t ;  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u C l i c k A c t i o n ( o N o d e ,   m e )  
 {  
     / / ' f u n c t i o n   t o   d e t e r m i n e   i f   m e n u   i t e m   h a s   a c t i o n   a s s o c i a t e d   ( U R L )  
     v a r   s N a m e   =   s p m _ g e t A t t r ( m e . _ m _ o M e n u ,   ' n a m e ' ,   m e . _ m _ o M e n u . n a m e ) ;  
  
     i f   ( s N a m e   = =   n u l l   | |   s N a m e . l e n g t h   = =   0 ) 	 / / o p e r a   f i x   f o r   g e t t i n g   n a m e  
 	 	 s N a m e   =   s p m _ g e t A t t r ( m e . _ m _ o M e n u ,   ' p b n a m e ' ,   m e . _ m _ o M e n u . p b n a m e ) ;  
 	  
     i f   ( s p m _ g e t A t t r ( o N o d e ,   " r u n a t " ,   ' ' ) . l e n g t h )  
         r e t u r n   " _ _ d o P o s t B a c k ( ' "   +   s N a m e   +   " ' ,   ' "   +   s p m _ g e t A t t r ( o N o d e ,   " i d " ,   " " )   +   " ' ) ; " ;  
     i f   ( s p m _ g e t A t t r ( o N o d e ,   " s e r v e r " ,   ' ' ) . l e n g t h )  
         r e t u r n   " _ _ d o P o s t B a c k ( ' "   +   s N a m e   +   " ' ,   ' "   +   s p m _ g e t A t t r ( o N o d e ,   " i d " ,   " " )   +   " ' ) ; " ;  
     v a r   s U R L   =   s p m _ g e t A t t r ( o N o d e ,   " u r l " ,   " " ) ;  
     i f   ( s U R L . l e n g t h )  
 	 {  
 	 	 i f   ( s U R L . t o L o w e r C a s e ( ) . s u b s t r ( 0 ,   " j a v a s c r i p t : " . l e n g t h )   = =   " j a v a s c r i p t : " )  
 	 	 	 r e t u r n   s U R L . s u b s t r ( " j a v a s c r i p t : " . l e n g t h )   +   " ; " ;  
 	 	 e l s e  
 	 	 {  
 	 	 	 i f   ( m e . t a r g e t . l e n g t h   >   0   & &   d o c u m e n t . f r a m e s [ m e . t a r g e t ]   ! =   n u l l )  
 	 	 	 	 r e t u r n   " d o c u m e n t . f r a m e s [ ' "   +   m e . t a r g e t   +   " ' ] . l o c a t i o n . h r e f = ' "   +   s U R L   +   " ' ; " ;  
 	 	 	 e l s e  
 	 	 	 	 r e t u r n   " d o c u m e n t . l o c a t i o n . h r e f = ' "   +   s U R L   +   " ' ; " ;  
 	 	 }  
 	 }  
 	 r e t u r n   ' ' ;  
 	  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u S p a c i n g I m a g e ( s P o s ,   m e )  
 {  
     v a r   s A l i g n   =   m e . m e n u A l i g n m e n t . t o L o w e r C a s e ( ) ;  
  
     i f   ( ( s P o s   = =   ' l e f t '   & &   s A l i g n   = =   ' r i g h t ' )   | |   ( s P o s   = =   ' r i g h t '   & &   s A l i g n   = =   ' l e f t ' ) )  
 	 	 r e t u r n   "               < t d   w i d t h = \ " 1 0 0 % \ " > "   +   s p m _ g e t S p a c e r ( m e )   +   " < / t d > " ;  
  
     i f   ( ( s P o s   = =   ' r i g h t '   & &   s A l i g n   = =   ' l e f t ' )   | |   ( s P o s   = =   ' l e f t '   & &   s A l i g n   = =   ' r i g h t ' ) )  
 	 	 r e t u r n   "               < t d   w i d t h = \ " 3 p x \ " > "   +   s p m _ g e t S p a c e r ( m e )   +   " < / t d > " ;  
  
 	 i f   ( s A l i g n   = =   ' C e n t e r ' )  
 	 	 r e t u r n   "               < t d   w i d t h = \ " 3 3 % \ " > "   +   s p m _ g e t S p a c e r ( m e )   +   " < / t d > " ;  
 	  
 	 r e t u r n   ' ' ;        
 }  
  
 f u n c t i o n   s p m _ g e t S p a c e r ( m e )    
 {  
     r e t u r n   s p m _ g e t M e n u I m a g e ( ' s p a c e r . g i f ' ,   m e ,   f a l s e ,   '   ' ) ;  
         / / r e t u r n   ' & n b s p ; ' ;   / / " < I M G   S R C = \ " "   +   m e . s y s t e m I m a g e s P a t h   +   " s p a c e r . g i f \ " > " ;  
 }  
  
 f u n c t i o n   s p m _ g e t I m a g e ( o A t t r ,   m e )  
 {  
     / / ' r e t r i e v e s   a n   i m a g e   f o r   a   p a s s e d   i n   X M L A t t r i b u t e  
     v a r   s I m a g e   =   s p m _ g e t A t t r ( o A t t r ,   ' i m a g e ' ,   ' ' ) ;  
  
     i f   ( s I m a g e . l e n g t h )  
     {  
         r e t u r n   s p m _ g e t H T M L I m a g e ( s I m a g e ,   s p m _ g e t A t t r ( o A t t r ,   ' i m a g e p a t h ' ,   m e . i c o n I m a g e s P a t h ) ,   n u l l ,   s p m _ g e t A t t r ( o A t t r ,   ' t i t l e ' ,   ' ' ) ) ;  
     }  
     e l s e  
         r e t u r n   s p m _ g e t M e n u I m a g e ( ' s p a c e r . g i f ' ,   m e ,   n u l l ,   '   ' ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t I t e m H T M L ( o N o d e ,   s S i d e ,   s D e f )  
 {  
     i f   ( s D e f   = =   n u l l )   s D e f   =   ' ' ;  
     r e t u r n   s p m _ g e t A t t r ( o N o d e ,   s S i d e   +   " h t m l " ,   s D e f ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u I m a g e ( s I m a g e ,   m e ,   b F o r c e ,   s A l t )  
 {  
         / / ' g e n e r a t e s   h t m l   f o r   i m a g e   u s i n g   t h e   S y s t e m I m a g e s P a t h   p r o p e r t y  
         r e t u r n   s p m _ g e t H T M L I m a g e ( s I m a g e ,   m e . s y s t e m I m a g e s P a t h ,   b F o r c e ,   s A l t ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t H T M L I m a g e ( s I m a g e ,   s P a t h ,   b F o r c e ,   s A l t )  
 {  
         / / ' g e n e r a t e s   h t m l   f o r   i m a g e   u s i n g   t h e   S y s t e m I m a g e s P a t h   p r o p e r t y  
         i f   ( s p m _ b r o w s e r N e e d s S p a c e r ( )   = =   f a l s e   & &   s I m a g e   = =   ' s p a c e r . g i f '   & &   b F o r c e   ! =   t r u e )  
                 r e t u r n   ' & n b s p ; ' ;    
         e l s e  
                 r e t u r n   " < I M G   S R C = \ " "   +   s P a t h   +   s I m a g e   +   " \ "   "   +   s p m _ g e t A l t ( s A l t )   +   " > " ;  
 }  
  
 f u n c t i o n   s p m _ g e t A l t ( s A l t )  
 {  
 	 i f   ( s A l t   ! =   n u l l   & &   s A l t . r t r i m ( ) . l e n g t h   >   0 )  
 	 	 r e t u r n   '   A L T = " '   +   s A l t   +   ' "   ' ;  
 	 e l s e  
 	 	 r e t u r n   ' ' ;  
 }  
  
 f u n c t i o n   s p m _ b r o w s e r N e e d s S p a c e r ( )  
 {  
 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
 	 	 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   M y I I f ( b F l a g ,   s T r u e ,   s F a l s e )    
 {  
         i f   ( b F l a g )  
 	 	 r e t u r n   s T r u e ;  
 	 e l s e  
 	 	 r e t u r n   s F a l s e ;  
 }  
  
 f u n c t i o n   s p m _ g e t A r r o w ( s I m g ,   m e )    
 {  
     / / F I X  
         i f   ( s I m g . l e n g t h )  
                 r e t u r n   s p m _ g e t M e n u I m a g e ( s I m g ,   m e ,   n u l l ,   ' > ' ) ;  
         e l s e  
         {  
             i f   ( m e . d i r e c t i o n   = =   ' r t l ' )  
 	 	 	 	 r e t u r n   " 3 " ;    
             e l s e  
 	 	 	 	 r e t u r n   " 4 " ;   / / ' d e f a u l t s   t o   u s i n g   w i n g d i n g s   f o n t   ( 4   =   a r r o w )  
         }  
 }  
  
 f u n c t i o n   s p m _ g e t M e n u B o r d e r S t y l e ( m e ,   s h C o l o r ,   h l C o l o r ,   w i d t h )  
 {  
     i f   ( s h C o l o r   = =   n u l l )   s h C o l o r   =   m e . s h C o l o r ;  
     i f   ( h l C o l o r   = =   n u l l )   h l C o l o r   =   m e . h l C o l o r ;  
     i f   ( w i d t h   = =   n u l l )   w i d t h   =   m e . b o r d e r W i d t h ;  
      
     / / b o r d e r - b o t t o m :   G r a y   1 p x   s o l i d ;   b o r d e r - l e f t :   W h i t e   1 p x   s o l i d ;   b o r d e r - t o p :   W h i t e   1 p x   s o l i d ;   b o r d e r - r i g h t :   G r a y   1 p x   s o l i d ;  
     / / r e t u r n   ' b o r d e r - b o t t o m :   '   +   s h C o l o r   +   '   '   +   w i d t h   +   ' p x   s o l i d ;   b o r d e r - l e f t :   '   +   h l C o l o r   +   '   '   +   w i d t h   +   ' p x   s o l i d ;     b o r d e r - t o p :   '   +   h l C o l o r   +   '   '   +   w i d t h   +   ' p x   s o l i d ;   b o r d e r - r i g h t :   '   +   s h C o l o r   +   '   '   +   w i d t h   +   ' p x   s o l i d ; ' ;  
     r e t u r n   g e t B o r d e r S t y l e ( ' b o r d e r - b o t t o m ' ,   s h C o l o r ,   w i d t h )   +   g e t B o r d e r S t y l e ( ' b o r d e r - l e f t ' ,   h l C o l o r ,   w i d t h )   +   g e t B o r d e r S t y l e ( ' b o r d e r - t o p ' ,   h l C o l o r ,   w i d t h )   +   g e t B o r d e r S t y l e ( ' b o r d e r - r i g h t ' ,   s h C o l o r ,   w i d t h ) ;  
 }  
  
 f u n c t i o n   g e t B o r d e r S t y l e ( t y p e ,   c o l o r ,   w i d t h )  
 {      
     r e t u r n   t y p e   +   ' :   '   +   c o l o r   +   '   '   +   w i d t h   +   ' p x   s o l i d ;   ' ;  
 }  
  
  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - - / /  
 S t r i n g . p r o t o t y p e . l t r i m   =   f u n c t i o n   ( )   {   r e t u r n   t h i s . r e p l a c e ( / ^ \ s * / ,   " " ) ; }  
 S t r i n g . p r o t o t y p e . r t r i m   =   f u n c t i o n   ( )   {   r e t u r n   t h i s . r e p l a c e ( / \ s * $ / ,   " " ) ; }  
 S t r i n g . p r o t o t y p e . t r i m     =   f u n c t i o n   ( )   {   r e t u r n   t h i s . l t r i m ( ) . r t r i m ( ) ;   }  
  
 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i ' ) 	 / / S a f a r i   H a c k  
 	 v a r   D o c u m e n t   =   n u l l ;  
 	  
 i f   ( s p m _ b r o w s e r T y p e ( )   ! =   ' i e '   & &   s p m _ b r o w s e r T y p e ( )   ! =   ' o p '   & &   D o c u m e n t   ! =   n u l l )  
 {  
     D o c u m e n t . p r o t o t y p e . l o a d X M L   =   f u n c t i o n   ( s )    
         {  
          
             / /   p a r s e   t h e   s t r i n g   t o   a   n e w   d o c  
             v a r   d o c 2   =   ( n e w   D O M P a r s e r ( ) ) . p a r s e F r o m S t r i n g ( s ,   " t e x t / x m l " ) ;  
  
             / /   r e m o v e   a l l   i n i t i a l   c h i l d r e n  
             w h i l e   ( t h i s . h a s C h i l d N o d e s ( ) )  
             t h i s . r e m o v e C h i l d ( t h i s . l a s t C h i l d ) ;  
  
             / /   i n s e r t   a n d   i m p o r t   n o d e s  
             f o r   ( v a r   i   =   0 ;   i   <   d o c 2 . c h i l d N o d e s . l e n g t h ;   i + + )    
             {  
             t h i s . a p p e n d C h i l d ( t h i s . i m p o r t N o d e ( d o c 2 . c h i l d N o d e s [ i ] ,   t r u e ) ) ;  
             }  
         }  
  
         f u n c t i o n   _ N o d e _ g e t X M L ( )    
         {  
             / / c r e a t e   a   n e w   X M L S e r i a l i z e r  
             v a r   o b j X M L S e r i a l i z e r   =   n e w   X M L S e r i a l i z e r ;  
              
             / / g e t   t h e   X M L   s t r i n g  
             v a r   s t r X M L   =   o b j X M L S e r i a l i z e r . s e r i a l i z e T o S t r i n g ( t h i s ) ;  
              
             / / r e t u r n   t h e   X M L   s t r i n g  
             r e t u r n   s t r X M L ;  
         }  
         N o d e . p r o t o t y p e . _ _ d e f i n e G e t t e r _ _ ( " x m l " ,   _ N o d e _ g e t X M L ) ;  
 }  
  
 f u n c t i o n   s p m _ c r e a t e D O M D o c ( )  
 {  
 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
 	 {  
 	 	 v a r   o   =   n e w   A c t i v e X O b j e c t ( ' M S X M L . D O M D o c u m e n t ' ) ;  
 	 	 o . a s y n c   =   f a l s e ;  
 	 	 r e t u r n   o ;  
 	 }  
 	 e l s e  
 	 	 r e t u r n   d o c u m e n t . i m p l e m e n t a t i o n . c r e a t e D o c u m e n t ( " " ,   " " ,   n u l l ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t B y I d ( s I D )  
 {  
     i f   ( d o c u m e n t . a l l   = =   n u l l )  
         r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( s I D ) ;  
     e l s e  
         r e t u r n   d o c u m e n t . a l l ( s I D ) ;  
 }  
  
 f u n c t i o n   s p m _ g e t T a g s ( s T a g ,   o C t l )  
 {  
 	 i f   ( o C t l   = =   n u l l )  
 	 	 o C t l   =   d o c u m e n t ;  
 	  
 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
         r e t u r n   o C t l . a l l . t a g s ( s T a g ) ;  
     e l s e  
         r e t u r n   o C t l . g e t E l e m e n t s B y T a g N a m e ( s T a g ) ;  
 }  
  
 f u n c t i o n   s p m _ b r o w s e r T y p e ( )  
 {  
 	 i f   ( m _ s p m _ s B r o w s e r   = =   n u l l )  
 	 {  
 	 	 v a r   a g t = n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ;  
  
 	 	 i f   ( a g t . t o L o w e r C a s e ( ) . i n d e x O f ( ' k o n q u e r o r ' )   ! =   - 1 )    
 	 	 	 m _ s p m _ s B r o w s e r   =   ' k q ' ;  
 	 	 e l s e   i f   ( a g t . t o L o w e r C a s e ( ) . i n d e x O f ( ' o p e r a ' )   ! =   - 1 )    
 	 	 	 m _ s p m _ s B r o w s e r   =   ' o p ' ;  
 	 	 e l s e   i f   ( a g t . t o L o w e r C a s e ( ) . i n d e x O f ( ' n e t s c a p e ' )   ! =   - 1 )    
 	 	 	 m _ s p m _ s B r o w s e r   =   ' n s ' ;  
 	 	 e l s e   i f   ( a g t . t o L o w e r C a s e ( ) . i n d e x O f ( ' m s i e ' )   ! =   - 1 )  
 	 	 	 m _ s p m _ s B r o w s e r   =   ' i e ' ;  
 	 	 e l s e   i f   ( a g t . t o L o w e r C a s e ( ) . i n d e x O f ( ' s a f a r i ' )   ! =   - 1 )  
 	 	 	 m _ s p m _ s B r o w s e r   =   ' s a f a r i ' ;  
 	      
 	 	 i f   ( m _ s p m _ s B r o w s e r   = =   n u l l )  
 	 	 	 m _ s p m _ s B r o w s e r   =   ' m o ' ;      
 	 }  
 	 / / w i n d o w . s t a t u s   =   m _ s p m _ s B r o w s e r ;  
 	 r e t u r n   m _ s p m _ s B r o w s e r ;  
 }  
  
 f u n c t i o n   s p m _ b r o w s e r V e r s i o n ( )  
 {  
 	 / / P l e a s e   o f f e r   a   b e t t e r   s o l u t i o n   i f   y o u   h a v e   o n e !  
 	 v a r   s T y p e   =   s p m _ b r o w s e r T y p e ( ) ;  
 	 v a r   i V e r s i o n   =   p a r s e F l o a t ( n a v i g a t o r . a p p V e r s i o n ) ;  
 	 v a r   s A g e n t   =   n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ;  
 	 i f   ( s T y p e   = =   ' i e ' )  
 	 {  
 	 	 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 " ) ;  
 	 	 i V e r s i o n = p a r s e F l o a t ( t e m p [ 1 ] ) ;  
 	 }  
 	 i f   ( s T y p e   = =   ' n s ' )  
 	 {  
 	 	 v a r   t e m p = s A g e n t . s p l i t ( " n e t s c a p e " ) ;  
 	 	 i V e r s i o n = p a r s e F l o a t ( t e m p [ 1 ] . s p l i t ( " / " ) [ 1 ] ) ; 	  
 	 }  
 	 r e t u r n   i V e r s i o n ;  
 }  
  
 f u n c t i o n   s p m _ n e e d s S u b M e n u D e l a y ( )  
 {  
 	 i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
 	 	 r e t u r n   t r u e ;  
 	 e l s e  
 	 	 r e t u r n   f a l s e ;  
  
 }  
  
 f u n c t i o n   s p m _ s u p p o r t s I F r a m e T r i c k ( )  
 {  
 	 v a r   s T y p e   =   s p m _ b r o w s e r T y p e ( ) ;  
 	 v a r   s V e r s i o n   =   s p m _ b r o w s e r V e r s i o n ( ) ;  
 	  
 	 i f   ( ( s T y p e   = =   ' i e '   & &   s V e r s i o n   <   5 . 5 )   | |   ( s T y p e   = =   ' n s '   & &   s V e r s i o n   <   7 )   | |   ( s p m _ b r o w s e r T y p e ( )   = =   ' s a f a r i ' )   | |   s p m _ i s M a c ( ' i e ' ) )  
 	 {  
 	 	 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 p m _ i s M a c ( s T y p e )  
 {  
 / / r e t u r n   t r u e ;  
     v a r   a g t = n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ;  
     i f   ( a g t . i n d e x O f ( ' m a c ' )   ! =   - 1 )    
     {  
 	 	 i f   ( s T y p e   = =   n u l l   | |   s p m _ b r o w s e r T y p e ( )   = =   s T y p e )  
 	 	 	 r e t u r n   t r u e ;  
     }  
     e l s e  
         r e t u r n   f a l s e ;  
      
 }  
  
 / / t a k e n   f r o m   h t t p : / / g r o u p s . g o o g l e . c o m / g r o u p s ? h l = e n & l r = & i e = U T F - 8 & o e = U T F - 8 & s a f e = o f f & t h r e a d m = b 4 2 q j 3 % 2 4 r 8 s 1 % 4 0 r i p l e y . n e t s c a p e . c o m & r n u m = 1 & p r e v = / g r o u p s % 3 F q % 3 D m o z i l l a % 2 B % 2 5 2 2 c u r r e n t s t y l e % 2 5 2 2 % 2 6 h l % 3 D e n % 2 6 l r % 3 D % 2 6 i e % 3 D U T F - 8 % 2 6 o e % 3 D U T F - 8 % 2 6 s a f e % 3 D o f f % 2 6 s c o r i n g % 3 D d    
 f u n c t i o n   s p m _ g e t C u r r e n t S t y l e ( e l ,   p r o p e r t y )   {  
     i f   ( d o c u m e n t . d e f a u l t V i e w )    
     {  
       / /   G e t   c o m p u t e d   s t y l e   i n f o r m a t i o n :  
  
         i f   ( e l . n o d e T y p e   ! =   e l . E L E M E N T _ N O D E )   r e t u r n   n u l l ;  
         r e t u r n   d o c u m e n t . d e f a u l t V i e w . g e t C o m p u t e d S t y l e ( e l , ' ' ) . g e t P r o p e r t y V a l u e ( p r o p e r t y . s p l i t ( ' - ' ) . j o i n ( ' ' ) ) ;  
     }  
     i f   ( e l . c u r r e n t S t y l e )    
     {  
         / /   G e t   e l . c u r r e n t S t y l e   p r o p e r t y   v a l u e :  
         r e t u r n   e l . c u r r e n t S t y l e [ p r o p e r t y . s p l i t ( ' - ' ) . j o i n ( ' ' ) ] ;  
         / / r e t u r n   e l . c u r r e n t S t y l e . g e t A t t r i b u t e ( p r o p e r t y . s p l i t ( ' - ' ) . j o i n ( ' ' ) ) ;     / / W e   n e e d   t o   g e t   r i d   o f   s l a s h e s  
     }  
     i f   ( e l . s t y l e )    
     {  
         / /   G e t   e l . s t y l e   p r o p e r t y   v a l u e :  
         r e t u r n   e l . s t y l e . g e t A t t r i b u t e ( p r o p e r t y . s p l i t ( ' - ' ) . j o i n ( ' ' ) ) ;     / /   W e   n e e d   t o   g e t   r i d   o f   s l a s h e s  
     }   r e t u r n     n u l l ;  
 }  
  
 f u n c t i o n   s p m _ g e t A t t r ( o ,   s A t t r ,   s D e f )  
 {  
     i f   ( s D e f   = =   n u l l )  
         s D e f   =   ' ' ;  
     v a r   s   =   o . g e t A t t r i b u t e ( s A t t r ) ;  
     i f   ( s   ! =   n u l l   & &   s . l e n g t h   >   0 )  
         r e t u r n   o . g e t A t t r i b u t e ( s A t t r ) ;  
     e l s e  
         r e t u r n   s D e f ;  
 }  
  
 f u n c t i o n   s p m _ s e t A t t r ( o ,   s A t t r ,   s V a l )  
 {  
 	 i f   ( s V a l . l e n g t h   >   0 )  
 	 	 o . s e t A t t r i b u t e ( s A t t r ,   s V a l ) ;  
 	 e l s e  
 	 	 o . r e m o v e A t t r i b u t e ( s A t t r ) ;  
 }  
  
  
 f u n c t i o n   s p m _ f i x U n i t ( s )  
 {  
     i f   ( s . l e n g t h   & &   i s N a N ( s )   = =   f a l s e )  
         r e t u r n   s   +   ' p x ' ;  
  
 }  
  
 f u n c t i o n   s p m _ n o d e H a s C h i l d r e n ( n o d e )  
 {  
     i f   ( t y p e o f ( n o d e . s e l e c t S i n g l e N o d e )   ! =   ' u n d e f i n e d ' )   / / ( n o d e . s e l e c t S i n g l e N o d e   ! =   n u l l )   / / ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
         r e t u r n   n o d e . s e l e c t S i n g l e N o d e ( ' . / m e n u i t e m ' )   ! =   n u l l ;  
     e l s e  
     {  
         i f   ( n o d e . c h i l d N o d e s . l e n g t h   >   0 )  
         {  
             / / N e t s c a p e / M o z i l l a   c o u n t s   a n   e m p t y   < m e n u i t e m   i d > < / m e n u i t e m >   a s   h a v i n g   a   c h i l d . . .  
             f o r   ( v a r   i = 0 ;   i <   n o d e . c h i l d N o d e s . l e n g t h ;   i + + )  
             {  
                 i f   ( n o d e . c h i l d N o d e s [ i ] . n o d e N a m e   = =   ' m e n u i t e m ' )  
                         r e t u r n   t r u e ;  
             }  
         }  
     }  
     r e t u r n   f a l s e ;      
 }  
  
 f u n c t i o n   s p m _ f i n d N o d e ( o P a r e n t ,   s I D )  
 {  
 	 f o r   ( v a r   i   =   0 ;   i   <   o P a r e n t . c h i l d N o d e s . l e n g t h ;   i + + )  
 	 {  
 	 	 o N o d e   =   o P a r e n t . c h i l d N o d e s [ i ] ;  
  
 	 	 i f   ( o N o d e . n o d e T y p e   ! =   3 )     / / e x c l u d e   n o d e T y p e   o f   T e x t   ( N e t s c a p e / M o z i l l a )   i s s u e !  
 	 	 {  
  
 	 	 	 i f   ( ( o N o d e . n o d e N a m e   = =   " m e n u i t e m "   | |   o N o d e . n o d e N a m e   = =   " m e n u b r e a k " )   & &   o N o d e . g e t A t t r i b u t e ( " i d " )   = =   s I D )  
 	 	 	 	 r e t u r n   o N o d e ;  
  
 	 	 	 i f   ( o N o d e . c h i l d N o d e s . l e n g t h   >   0 )  
 	 	 	 {  
 	 	 	 	 v a r   o   =   s p m _ f i n d N o d e ( o N o d e ,   s I D ) ;  
 	 	 	 	 i f   ( o   ! =   n u l l )  
 	 	 	 	 	 r e t u r n   o ;  
 	 	 	 }  
 	 	 }  
 	 }  
 }  
  
 f u n c t i o n   s p m _ g e t S i b l i n g ( o N o d e ,   i O f f s e t )  
 {  
 	 v a r   s I D   =   s p m _ g e t A t t r ( o N o d e ,   ' i d ' ) ;  
 	 v a r   o ;  
 	 f o r   ( v a r   i = 0 ;   i < o N o d e . p a r e n t N o d e . c h i l d N o d e s . l e n g t h ;   i + + )  
 	 {  
 	 	 o   =   o N o d e . p a r e n t N o d e . c h i l d N o d e s [ i ] ;  
 	 	 i f   ( o . n o d e T y p e   ! =   3 )  
 	 	 {  
 	 	 	 i f   ( s p m _ g e t A t t r ( o ,   ' i d ' )   = =   s I D )  
 	 	 	 	 r e t u r n   g e t O f f s e t N o d e ( o . p a r e n t N o d e ,   i ,   i O f f s e t ) ;  
 	 	 }  
 	 }  
 }  
  
 f u n c t i o n   s p m _ s t o p E v e n t B u b b l i n g ( e )  
 {  
         i f   ( s p m _ b r o w s e r T y p e ( )   = =   ' i e ' )  
 	 	 	 w i n d o w . e v e n t . c a n c e l B u b b l e   =   t r u e ;  
 	 	 e l s e  
 	 	 	 e . s t o p P r o p a g a t i o n ( ) ;  
 }  
  
 / / - - -   i f   y o u   h a v e   a   b e t t e r   s o l u t i o n   s e n d   m e   a n   e m a i l   -   j h e n n i n g @ s o l p a r t . c o m   - - - / /  
 f u n c t i o n   s p m _ a p p e n d F u n c t i o n ( f r o m _ f u n c ,   t o _ f u n c )  
 {  
     i f   ( f r o m _ f u n c   = =   n u l l )  
         r e t u r n   n e w   F u n c t i o n   (   t o _ f u n c   ) ;    
     r e t u r n   n e w   F u n c t i o n   (   s p m _ p a r s e F u n c t i o n C o n t e n t s ( f r o m _ f u n c )   +   ' \ n '   +   s p m _ p a r s e F u n c t i o n C o n t e n t s ( t o _ f u n c )   ) ;  
 }  
 f u n c t i o n   s p m _ p a r s e F u n c t i o n C o n t e n t s ( f n c )  
 {  
     v a r   s   = S t r i n g ( f n c ) . t r i m ( ) ;  
     i f   ( s . i n d e x O f ( ' { ' )   >   - 1 )  
 	 	 s   =   s . s u b s t r i n g ( s . i n d e x O f ( ' { ' )   +   1 ,   s . l e n g t h   -   1 ) ;  
     r e t u r n   s ;  
 }  
  
 / / - - -   F o r   J S   D O M   - - - / /  
 f u n c t i o n   S P J S X M L N o d e ( s N o d e N a m e ,   s I D ,   o P a r e n t ,   s T i t l e ,   s U R L ,   s I m a g e ,   s I m a g e P a t h ,   s R i g h t H T M L ,   s L e f t H T M L ,   s R u n A t S e r v e r ,   s I t e m S t y l e ,   s I m a g e S t y l e ,   s T o o l T i p ,   s I t e m C S S ,   s I t e m S e l C S S )    
 {    
     t h i s . n o d e N a m e   =   s N o d e N a m e ;  
     t h i s . i d = s I D ;  
     t h i s . c h i l d N o d e s   =   n e w   A r r a y ( ) ;  
     / / t h i s . n o d e T y p e   =   3 ;  
      
      
     t h i s . p a r e n t N o d e   =   o P a r e n t ;                          
     i f   ( o P a r e n t   ! =   n u l l )  
     {  
         o P a r e n t . c h i l d N o d e s [ o P a r e n t . c h i l d N o d e s . l e n g t h ]   =   t h i s ;  
          
         i f   ( o P a r e n t . d o c u m e n t E l e m e n t   = =   n u l l )  
             t h i s . d o c u m e n t E l e m e n t   =   o P a r e n t ;  
         e l s e  
             t h i s . d o c u m e n t E l e m e n t   =   o P a r e n t . d o c u m e n t E l e m e n t ;  
     }  
     e l s e  
         t h i s . d o c u m e n t E l e m e n t   =   t h i s ;  
          
     t h i s . t i t l e   =   s T i t l e ;  
     t h i s . u r l   =   s U R L ;  
     t h i s . i m a g e   =   s I m a g e ;  
     t h i s . i m a g e p a t h   =   s I m a g e P a t h ;  
     t h i s . r i g h t h t m l   =   s R i g h t H T M L ;  
     t h i s . l e f t h t m l   =   s L e f t H T M L ;  
     t h i s . s e r v e r   =   s R u n A t S e r v e r ;  
     t h i s . i t e m s t y l e   =   s I t e m S t y l e ;  
     t h i s . i m a g e s t y l e   =   s I m a g e S t y l e ;  
     t h i s . t o o l t i p   =   s T o o l T i p ;  
     t h i s . c s s   =   s I t e m C S S ;  
     t h i s . s e l c s s   =   s I t e m S e l C S S ;  
 }              
  
 S P J S X M L N o d e . p r o t o t y p e . g e t A t t r i b u t e   =   f u n c t i o n ( s )  
 {  
     r e t u r n   t h i s [ s ] ;  
 }  
  
  
     v a r   m _ i S P T i m e r ;  
     v a r   m _ i S P T o t a l T i m e r = 0 ;  
     v a r   m _ s S P D e b u g T e x t ;  
     v a r   m _ o S P D e b u g C t l ;  
     v a r   m _ b S P D e b u g   =   f a l s e ;  
      
     f u n c t i o n   _ _ d b ( s )  
     {  
         i f   ( s p m _ b r o w s e r T y p e ( )   ! =   ' i e '   | |   m _ b S P D e b u g   = =   f a l s e )  
             r e t u r n ;  
            
         v a r   s T   =   n e w   D a t e ( )   -   m _ i S P T i m e r ;  
         i f   ( s T   >   1 2 0 0 0 0 )  
         {  
             s T   =   ' ' ;  
             m _ o S P D e b u g C t l . v a l u e   =   ' - - - r e s e t - - - ' ;  
             m _ i S P T o t a l T i m e r = 0 ;  
         }  
         e l s e   i f   ( s T   >   1 0 0 )  
         {  
             m _ i S P T o t a l T i m e r + =   s T ;  
             s T   =   '   * * *   [ '   +   s T   +   ' ]   * * *   ' ;  
         }  
         e l s e   i f   ( s T   >   0 )  
         {  
             m _ i S P T o t a l T i m e r + =   s T ;  
             s T   =   '   [ '   +   s T   +   ' ] ' ;  
         }  
         e l s e  
             s T   =   ' ' ;  
              
         i f   ( d o c u m e n t . f o r m s . l e n g t h   >   0   & &   m _ o S P D e b u g C t l   = =   n u l l )  
         {              
             d o c u m e n t . f o r m s ( 0 ) . 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 ' ,   ' < b r > < T E X T A R E A   I D = " m y _ _ D e b u g "   S T Y L E = " W I D T H :   1 0 0 % ;   H E I G H T :   1 0 0 p x " > < / T E X T A R E A > ' ) ;  
             m _ o S P D e b u g C t l   =   d o c u m e n t . a l l ( ' m y _ _ D e b u g ' ) ;  
         }  
  
         i f   ( m _ o S P D e b u g C t l   ! =   n u l l )  
             m _ o S P D e b u g C t l . v a l u e   + =   ' [ '   +   m _ i S P T o t a l T i m e r   +   ' ]   '   +   s   +   s T   +   ' \ n ' ;  
         e l s e  
             m _ s S P D e b u g T e x t   + =   ' [ '   +   m _ i S P T o t a l T i m e r   +   ' ]   '   +   s   +   s T   +   ' \ n ' ;    
              
         m _ i S P T i m e r   =   n e w   D a t e ( ) ;  
     }  
  
 	 i f   ( w i n d o w . _ _ s m a r t N a v   ! =   n u l l )  
 	 	 w i n d o w . s e t T i m e o u t ( s p m _ f i x S m a r t N a v ,   1 0 0 0 ) ;  
 	 f u n c t i o n   s p m _ f i x S m a r t N a v ( )  
 	 {  
 	 	 i f   ( w i n d o w . _ _ s m a r t N a v   ! =   n u l l )  
 	 	 {  
 	 	 	 i f   ( d o c u m e n t . r e a d y S t a t e   = =   ' c o m p l e t e ' )  
 	 	 	 {  
 	 	 	 	 v a r   o   =   s p m _ g e t B y I d ( ' S o l p a r t M e n u D I ' ) ;  
 	 	 	 	 i f   ( o   ! =   n u l l )  
 	 	 	 	 {  
 	 	 	 	 	 i f   ( o . l e n g t h   = =   n u l l )  
 	 	 	 	 	 {  
 	 	 	 	 	 	 	 i f   ( o . x m l   ! =   n u l l )  
 	 	 	 	 	 	 	 	 s p m _ i n i t M y M e n u ( o ,   o . p a r e n t E l e m e n t ) ;  
 	 	 	 	 	 }  
 	 	 	 	 	 e l s e  
 	 	 	 	 	 {  
 	 	 	 	 	 	 f o r   ( v a r   i = 0 ;   i < o . l e n g t h ;   i + + )  
 	 	 	 	 	 	 {  
 	 	 	 	 	 	 	 i f   ( o [ i ] . x m l   ! =   n u l l )  
 	 	 	 	 	 	 	 	 s p m _ i n i t M y M e n u ( o [ i ] ,   o . p a r e n t E l e m e n t ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 e l s e  
 	 	 	 	 w i n d o w . s e t T i m e o u t ( s p m _ f i x S m a r t N a v ,   1 0 0 0 ) ;  
 	 	 }  
 	 }  
  
 	 f u n c t i o n   s p m _ e l e m e n t D i m s ( o ,   b I n c l u d e B o d y ,   m e )  
 	 {  
 	 	 v a r   b H i d d e n   =   ( o . s t y l e . d i s p l a y   = =   ' n o n e ' ) ;  
 	 	  
 	 	 i f   ( b H i d d e n )  
 	 	 	 o . s t y l e . d i s p l a y   =   " " ;  
 	 	 t h i s . t   =   s p m _ e l e m e n t T o p ( o ,   b I n c l u d e B o d y ) ;  
 	 	 t h i s . l   =   s p m _ e l e m e n t L e f t ( o ,   b I n c l u d e B o d y ) ;  
 	 	 i f   ( ! s p m _ i s M a c ( ' i e ' ) )  
 	 	 {  
 	 	 	 o . s t y l e . t o p   =   s p m _ g e t C o o r d ( 0 ) ;  
 	 	 	 o . s t y l e . l e f t   =   s p m _ g e t C o o r d ( 0 ) ;  
 	 	 }  
 	 	 t h i s . w   =   s p m _ g e t E l e m e n t W i d t h ( o ) ;  
 	 	 t h i s . h   =   s p m _ g e t E l e m e n t H e i g h t ( o ) ;  
 	 	 i f   ( ! s p m _ i s M a c ( ' i e ' ) )  
 	 	 {  
 	 	 	 o . s t y l e . t o p   =   s p m _ g e t C o o r d ( t h i s . t ) ;  
 	 	 	 o . s t y l e . l e f t   =   s p m _ g e t C o o r d ( t h i s . l ) ;  
 	 	 }  
 	 	 i f   ( b H i d d e n )  
 	 	 	 o . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 }  
  
 f u n c t i o n   s p m _ g e t C o o r d ( i )  
 {  
 	 r e t u r n   i   +   ' p x ' ;  
 }  
 / / D u n g   t h e m  
 f u n c t i o n   o p e n N e w W i n ( u r l )  
 {  
         w i n d o w . o p e n ( u r l , ' c h i l d W i n ' , ' w i d t h = 8 0 0 , h e i g h t = 6 0 0 , t o o l b a r = y e s ,   l o c a t i o n = y e s , d i r e c t o r i e s = y e s , s t a t u s = y e s , m e n u b a r = y e s , s c r o l l b a r s = y e s , c o p y h i s t o r y = y e s , r e s i z a b l e = y e s ' ) ;  
 } 
