ÿþf u n c t i o n   g r i d _ t d _ m o u s e _ o v e r ( m y i d )  
 {  
     d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 3 4 c 0 a ' ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . c o l o r = ' w h i t e ' ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . f o n t W e i g h t = ' b o l d ' ;  
 }  
 f u n c t i o n   g r i d _ t d _ m o u s e _ o u t ( m y i d )  
 {  
     d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . c o l o r = ' b l a c k ' ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . f o n t W e i g h t = ' n o r m a l ' ;  
 }  
 / / - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ n e x t _ p a g e ( n e x t _ p a g e _ s t a r t )  
 {  
     d o c u m e n t . g r i d _ p a g g i n g _ f o r m . s t a r t _ p a g e . v a l u e = n e x t _ p a g e _ s t a r t ;  
     d o c u m e n t . g r i d _ p a g g i n g _ f o r m . m e t h o d = ' P O S T ' ;  
     d o c u m e n t . g r i d _ p a g g i n g _ f o r m . s u b m i t ( ) ;  
 }  
 / / - - - - - - - - - - - - - - -  
 f u n c t i o n   c h e c k _ g r i d _ r e c o r d ( m y i d )  
 {  
 c h n a m e = " c h "   +   m y i d ;  
 / / r o w _ a r r a y = n e w   A r r a y ( ) ;  
 i n d e x = - 1 ;  
 e n d a r r a y = - 1 ;  
 t r n a m e = " t r "   +   m y i d ;  
 r o w _ i d s = n e w   S t r i n g ( d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e ) ;  
 c h e c k s t a t = d o c u m e n t . g e t E l e m e n t B y I d ( c h n a m e ) . c h e c k e d ;  
 i f   ( c h e c k s t a t = = 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 ( t r n a m e ) . s t y l e . b a c k g r o u n d C o l o r = ' # e 6 a b d c ' ;  
   r o w _ i d s   + = m y i d     +   " , " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e  
 }  
 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 ( t r n a m e ) . s t y l e . b a c k g r o u n d C o l o r = " # e 2 d 9 d 5 " ;  
   r o w _ a r r a y = r o w _ i d s . s p l i t ( " , " ) ;  
   r o w _ a r r a y . p o p ( ) ;  
   r o w _ i d s = " " ;  
   f o r ( i = 0 ; i < r o w _ a r r a y . l e n g t h ; i + + )  
   {  
       i f   ( m y i d = = r o w _ a r r a y [ i ] )  
       {  
           i n d e x = i ;  
           b r e a k ;  
       }  
   }  
           e n d a r r a y = r o w _ a r r a y . l e n g t h - 1 ;  
           r o w _ a r r a y [ i n d e x ] = r o w _ a r r a y [ e n d a r r a y ] ;  
           r o w _ a r r a y . p o p ( ) ;    
           n e w _ l e n = r o w _ a r r a y . l e n g t h ;  
           f o r ( i = 0 ; i < n e w _ l e n ; i + + )  
           {  
           r o w _ i d s   + = r o w _ a r r a y [ i ]   +   " , " ;  
           }  
            
 }  
 d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e = r o w _ i d s ;  
 } / / e n d   f u n c t i o n  
 / / - - - - - - - - - - - - - - -  
 f u n c t i o n   d e l e t e _ g r i d _ r o w ( )  
 {  
 i f   ( d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e = = " " )  
 {  
     a l e r t ( " GÌ†  1/ÌAÌ  'F*.'(  F4/G  '3*" ) ;  
     r e t u r n ;  
 }  
 i f   ( w i n d o w . c o n f i r m ( " "Ì'  E7E&F  (G  -0A  G3*Ì/" ) )  
 {  
 d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " d e l e t e " ;  
 d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
 d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
 }  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ c h a n g e _ s h o w _ t y p e ( m y v a l u e )  
 {  
 i f   ( m y v a l u e = = " - 1 " )  
 {  
 r e t u r n ;  
 }  
   i f   ( d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e = = " " )  
 {  
     a l e r t ( " GÌ†  1/ÌAÌ  'F*.'(  F4/G  '3*" ) ;  
     r e t u r n ;  
 }  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " c h a n g e s h o w t y p e " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = m y v a l u e ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
 }  
 / / - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ c h a n g e _ n u m _ s t a r s ( m y v a l u e )  
 {  
 i f   ( m y v a l u e = = " - 1 " )  
 {  
 r e t u r n ;  
 }  
   i f   ( d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e = = " " )  
 {  
     a l e r t ( " GÌ†  1/ÌAÌ  'F*.'(  F4/G  '3*" ) ;  
     r e t u r n ;  
 }  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " c h a n g e n u m s t a r s " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = m y v a l u e ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ s h o w _ c o n t a c t ( m y v a l u e )  
 {  
 i f   ( m y v a l u e = = " - 1 " )  
 {  
 r e t u r n ;  
 }  
   i f   ( d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e = = " " )  
 {  
     a l e r t ( " GÌ†  1/ÌAÌ  'F*.'(  F4/G  '3*" ) ;  
     r e t u r n ;  
 }  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " s h o w c o n t a c t " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = m y v a l u e ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
 }  
 / / - - - - - - - - - - - - - - - - -  
 f u n c t i o n   a c t i v e _ g r i d _ s e t t i n g _ e l e m e n t ( t y p e )  
 {  
     s w i t c h ( t y p e )  
     {  
     c a s e   0   :  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ d a t e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ r e g d a t e 1 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ r e g d a t e 2 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . d a t e b t n 1 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . d a t e b t n 2 . d i s a b l e d = f a 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 ( ' g r i d _ d a t e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ r e g d a t e 1 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ r e g d a t e 2 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . d a t e b t n 1 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . d a t e b t n 2 . d i s a b l e d = 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 ( ' g r i d _ d a t e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   1   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ a d d t y p e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ a d d t y p e _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ a d d t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ a d d t y p e _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ a d d t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   2   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ m e l k t y p e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ m e l k t y p e _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ m e l k t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ m e l k t y p e _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ m e l k t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   3   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s h o w t y p e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ s h o w t y p e _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ s h o w t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ s h o w t y p e _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ s h o w t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   4   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s t a r s _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ s t a r s _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ s t a r s _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ s t a r s _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ s t a r s _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
       c a s e   5   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ o s t a n _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ o s t a n _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ o s t a n _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ o s t a n _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ o s t a n _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
       c a s e   6   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ p e r y o d _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ p e r y o d _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ p e r y o d _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ p e r y o d _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ p e r y o d _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
             c a s e   7   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ c i t y _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ c i t y _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ c i t y _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ c i t y _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ c i t y _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   8   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ b a z d i d _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ b a z d i d _ s e l e c t e d . d i s a b l e d = f a l s e ;  
               d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ b a z d i d _ t x t . d i s a b l e d = f a 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 ( ' g r i d _ b a z d i d _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ b a z d i d _ s e l e c t e d . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ b a z d i d _ t x t . d i s a b l e d = 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 ( ' g r i d _ b a z d i d _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
               c a s e   9   :  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ u s e r n a m e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
               d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ u s e r n a m e _ t x t . d i s a b l e d = f a 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 ( ' g r i d _ u s e r n a m e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ u s e r n a m e _ t x t . d i s a b l e d = 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 ( ' g r i d _ u s e r n a m e d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   1 0   :  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ e x p d a t e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ e x p d a t e 1 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ e x p d a t e 2 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . e x p d a t e b t n 1 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . e x p d a t e b t n 2 . d i s a b l e d = f a 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 ( ' g r i d _ e x p d a t e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ e x p d a t e 1 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ e x p d a t e 2 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . e x p d a t e b t n 1 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . e x p d a t e b t n 2 . d i s a b l e d = 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 ( ' g r i d _ e x p d a t e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
           c a s e   1 1   :  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ k o l l p r i c e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ k o l l p r i c e 1 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ k o l l p r i c e 2 . d i s a b l e d = f a 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 ( ' g r i d _ k o l l p r i c e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ k o l l p r i c e 1 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ k o l l p r i c e 2 . d i s a b l e d = 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 ( ' g r i d _ k o l l p r i c e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
                         c a s e   1 2   :  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ m a s a _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ m a s a 1 . d i s a b l e d = f a l s e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ m a s a 2 . d i s a b l e d = f a 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 ( ' g r i d _ m a s a _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ m a s a 1 . d i s a b l e d = t r u e ;  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . a d d _ m a s a 2 . d i s a b l e d = 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 ( ' g r i d _ m a s a _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
         c a s e   1 3 :  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ m o a m e l e t y p e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ m o a m e l e t y p e _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ m o a m e l e t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ m o a m e l e t y p e _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ m o a m e l e t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
               c a s e   1 4 :  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s a n a d t y p e _ s e t t i n g ' ) . c h e c k e d = = t r u e )  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ s a n a d t y p e _ s e l e c t e d . d i s a b l e d = f a 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 ( ' g r i d _ s a n a d t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' # f 2 f 0 c 1 ' ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g r i d _ s e t t i n g _ f o r m . g r i d _ s a n a d t y p e _ s e l e c t e d . d i s a b l e d = 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 ( ' g r i d _ s a n a d t y p e _ d i v ' ) . s t y l e . b a c k g r o u n d C o l o r = ' ' ;  
         }  
         b r e a k ;  
     } / / e n d   s w i t c h  
 } / / e n d   f u n c t i o n  
 / / - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d s e t t i n g _ a p p l y ( )  
 {  
   d o c u m e n t . g r i d _ s e t t i n g _ f o r m . m e t h o d = ' P O S T ' ;  
   d o c u m e n t . g r i d _ s e t t i n g _ f o r m . s u b m i t ( ) ;  
 }  
 f u n c t i o n   g r i d _ s o r t _ t y p e _ c l i c k ( s r t _ m o d e )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s o r t _ t y p e ' ) . v a l u e = s r t _ m o d e ;  
 d o c u m e n t . g r i d _ s o r t _ t y p e _ f o r m . m e t h o d = " P O S T " ;  
 d o c u m e n t . g r i d _ s o r t _ t y p e _ f o r m . s u b m i t ( ) ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ a c t i o n s ( m y v a l u e , a d d _ p a t h )  
 {  
 i f   ( m y v a l u e = = " - 1 " )  
 r e t u r n ;  
   i f   ( d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e = = " " )  
 {  
     a l e r t ( " GÌ†  1/ÌAÌ  'F*.'(  F4/G  '3*" ) ;  
     r e t u r n ;  
 }  
 s w i t c h ( m y v a l u e )  
 {  
     c a s e   " 1 " :  
     d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " g r i d e d i t i m a g e " ;  
       g r i d _ i d = d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e ;  
       g r i d _ i d _ a r r a y = g r i d _ i d . s p l i t ( " , " ) ;  
       g r i d _ i d _ a r r a y . p o p ( ) ;  
       i f ( g r i d _ i d _ a r r a y . l e n g t h   > 1 )  
       {  
       a l e r t ( " (1'Ì  HÌ1'Ì4  AB7  Ì©  1/ÌA  1'  'F*.'(  ©FÌ/" ) ;  
       r e t u r n ;  
       }  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = g r i d _ i d _ a r r a y [ 0 ] ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . a c t i o n = " ? "   +   a d d _ p a t h   +   " & i t e m = p r o f i l e & p r o f i l e _ i t e m = e d i t a d d " ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
     b r e a k ;  
     c a s e   " 2 " :  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " g r i d e d i t i m a g e " ;  
       g r i d _ i d = d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e ;  
       g r i d _ i d _ a r r a y = g r i d _ i d . s p l i t ( " , " ) ;  
       g r i d _ i d _ a r r a y . p o p ( ) ;  
       i f ( g r i d _ i d _ a r r a y . l e n g t h   > 1 )  
       {  
       a l e r t ( " (1'Ì  HÌ1'Ì4  9©3  AB7  Ì©  1/ÌA  1'  'F*.'(  ©FÌ/" ) ;  
       r e t u r n ;  
       }  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = g r i d _ i d _ a r r a y [ 0 ] ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . a c t i o n = " ? "   +   a d d _ p a t h   +   " & i t e m = p r o f i l e & p r o f i l e _ i t e m = g r i d e d i t i m a g e " ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
     b r e a k ;  
     c a s e   " 3 " :  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " g r i d e d i t i m a g e " ;  
       g r i d _ i d = d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ r o w _ i d . v a l u e ;  
       g r i d _ i d _ a r r a y = g r i d _ i d . s p l i t ( " , " ) ;  
       g r i d _ i d _ a r r a y . p o p ( ) ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = g r i d _ i d _ a r r a y ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " u p t o d a t e _ a d d " ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
       d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
     b r e a k ;  
 } / / e n d   s w i t c h  
 }  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ s e r c h ( )  
 {  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ a c t i o n . v a l u e = " s e a r c h g r i d " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . g r i d _ p a r a m s . v a l u e = d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . v a l u e ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . m e t h o d = " P O S T " ;  
   d o c u m e n t . g r i d _ s e l e c t e d _ f o r m . s u b m i t ( ) ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   s e a r c h _ t x t _ f o c u s ( )  
 {  
   d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . v a l u e = ' ' ;  
   d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . s t y l e . c o l o r = " b l a c k " ;  
   d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . s t y l e . f o n t S t y l e = " n o r m a l " ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   s e a r c h _ t x t _ b l u r ( )  
 {  
     i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . v a l u e = = " " )  
     {  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . v a l u e = " ,3*,H. . . "  
     d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . s t y l e . c o l o r = " # a 6 a 4 a 2 " ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( ' g r i d _ s e a r c h _ t x t ' ) . s t y l e . f o n t S t y l e = " i t a l i c " ;  
     }  
 }  
 / / - - - - - - - - - -  
 f u n c t i o n   g r i d _ t r _ o v e r ( m y i d )  
 {  
         t r = d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) ;  
         v a r   t r s t y l e = t r . s t y l e ;  
         v a r   t r c o l o r = t r s t y l e . b a c k g r o u n d C o l o r ;  
         v a r   s r = n e w   S t r i n g ( t r c o l o r ) ;  
     i f   ( s r ! = " # e 6 a b d c " )  
         {  
             d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . b a c k g r o u n d C o l o r = ' # d d e d c 8 ' ;  
             d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . c u r s o r = ' p o i n t e r ' ;  
         }  
  
 }  
 / / - - - - - - - - - - - - - - - -  
 f u n c t i o n   g r i d _ t r _ o u t ( m y i d )  
 {  
           t r = d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) ;  
         v a r   t r s t y l e = t r . s t y l e ;  
         v a r   t r c o l o r = t r s t y l e . b a c k g r o u n d C o l o r ;  
         v a r   s r = n e w   S t r i n g ( t r c o l o r ) ;  
     i f   ( s r ! = " # e 6 a b d c " )  
         {  
         d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . b a c k g r o u n d C o l o r = ' # e 2 d 9 d 5 ' ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( m y i d ) . s t y l e . c u r s o r = ' d e f a u l t ' ;  
       }  
 } 
