ÿþ/ / m y C o l o r   i s   c r e a t e   b y   Y a n g h a n , J m r b . c o m  
 / /   w r i t e C o o k i e  
 f u n c t i o n   w r i t e C o o k i e ( n a m e ,   v a l u e ,   e x p i r e s )  
 {  
     v a r   e x p i r e   =   " " ;  
     i f ( e x p i r e s   ! =   n u l l )  
     {  
         e x p i r e   =   n e w   D a t e ( ( n e w   D a t e ( ) ) . g e t T i m e ( )   +   e x p i r e s   *   3 6 0 0 0 0 0 ) ;  
         e x p i r e   =   " ;   e x p i r e s = "   +   e x p i r e . t o G M T S t r i n g ( ) ;  
     }  
     d o c u m e n t . c o o k i e   =   n a m e   +   " = "   +   e s c a p e ( v a l u e )   +   e x p i r e ;  
 }  
  
 / / r e a d C o o k i e  
 f u n c t i o n   r e a d C o o k i e ( n a m e )  
 {  
     v a r   c o o k i e V a l u e   =   " " ;  
     v a r   s e a r c h   =   n a m e   +   " = " ;  
     i f ( d o c u m e n t . c o o k i e . l e n g t h   >   0 )  
     {  
         o f f s e t   =   d o c u m e n t . c o o k i e . i n d e x O f ( s e a r c h ) ;  
         i f   ( o f f s e t   ! =   - 1 )  
         {  
             o f f s e t   + =   s e a r c h . l e n g t h ;  
             e n d   =   d o c u m e n t . c o o k i e . i n d e x O f ( " ; " ,   o f f s e t ) ;  
             i f   ( e n d   = =   - 1 )   e n d   =   d o c u m e n t . c o o k i e . l e n g t h ;  
             c o o k i e V a l u e   =   u n e s c a p e ( d o c u m e n t . c o o k i e . s u b s t r i n g ( o f f s e t ,   e n d ) )  
         }  
     }  
     r e t u r n   c o o k i e V a l u e ;  
 }  
  
 / / s e t C o l o r  
 f u n c t i o n   s e t C o l o r ( c o l o r _ v a l )   {  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m y T a b l e ' ) . s t y l e . b a c k g r o u n d C o l o r   =   c o l o r _ v a l ;  
         w r i t e C o o k i e ( " b g C o l o r _ c o o k i e " ,   c o l o r _ v a l ,   2 4 )  
 }  
  
 / / g e t C o l o r  
 f u n c t i o n   g e t C o l o r ( )   {  
     m y T a b l e . s t y l e . b a c k g r o u n d C o l o r   =   " # F F F F F F " ;  
 	 v a r   b g _ c o l o r   =   r e a d C o o k i e ( " b g C o l o r _ c o o k i e " ) ;  
 	 i f   ( b g _ c o l o r   ! =   n u l l )   {  
         	 m y T a b l e . s t y l e . b a c k g r o u n d C o l o r   =   b g _ c o l o r  
 	 	 / / a l e r t ( b g _ c o l o r ) ;  
 	 }  
 }  
  
 / / s e t F o n t S i z e  
 f u n c t i o n   s e t F o n t ( s i z e _ v a l )   {  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m y F o n t ' ) . s t y l e . f o n t S i z e   =   s i z e _ v a l + " p x " ;  
 	 w r i t e C o o k i e ( " f o n t S i z e _ c o o k i s " ,   s i z e _ v a l ,   2 4 )  
 }  
  
 / / g e t F o n t S i z e  
 f u n c t i o n   g e t F o n t S i z e ( )   {  
 	 m y F o n t . s t y l e . f o n t S i z e   =   " 1 4 p x " ;  
     v a r   s i z e   =   r e a d C o o k i e ( " f o n t S i z e _ c o o k i s " ) ;  
 	 / / a l e r t ( s i z e ) ;  
 	 i f   ( s i z e   ! =   " " )   {  
 	 	 m y F o n t . s t y l e . f o n t S i z e   =   s i z e + " p x " ;  
 	 	 }  
 }  
 
