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