ÿþ/ / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / T h i s   i s   a   J a v a s c r i p t   C a l e n d e r  
 / /   D e v e l o p e d   B y   P a n k a j   K .   V e r m a  
 m a k e _ C a l e n d e r ( ) ;  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / / / / / / / / / / / / / V a r i a b l e   D e c l a r a t i o n / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 v a r   p a n _ t i m e r ;  
 v a r   s e l _ t e x t C o l o r = " " ;  
 v a r   s e l _ t e x t B a c k C o l o r = " g r e e n " ;  
 v a r   g e n _ t e x t C o l o r = " b l a c k " ;  
 v a r   g e n _ t e x t B a c k C o l o r = " # d d e f f f " ;  
 v a r   O u t e r _ B o r d e r _ C o l o r = " # f 0 f 8 f f " ;  
 v a r   I n t e r n a l _ B o r d e r _ C o l o r = " B l a c k " ;  
 v a r   B o r d e r _ W i d t h = " 1 " ;  
 v a r   M o u s e _ M o v e _ T e x t C o l o r = " " ;  
 v a r   M o u s e _ M o v e _ T e x t B a c k C o l o r = " " ;  
 v a r   T e x t B o x _ N a m e ;  
 v a r   p a n _ c a l ;  
 v a r   p a n _ c n t ;  
 p a n _ d a t a 1 = n e w   A r r a y ( 7 ) ;  
 p a n _ d a t a 2 = n e w   A r r a y ( 7 ) ;  
 p a n _ d a t a 3 = n e w   A r r a y ( 7 ) ;  
 p a n _ d a t a 4 = n e w   A r r a y ( 7 ) ;  
 p a n _ d a t a 5 = n e w   A r r a y ( 7 ) ;  
 p a n _ d a t a 6 = n e w   A r r a y ( 7 ) ;  
  
 / / / / / / / / / / / / / / C a l e n d e r   C r e a t i o n   C a l l   o n   < B o d y   O n l o a d = " m a k e _ C a l e n d e r ( ) " > / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   m a k e _ C a l e n d e r ( )  
 {  
 v a r   p a n _ x m a x , p a n _ y m a x , p a n _ x , p a n _ y ;  
 v a r   p a n _ t a g = n e w   S t r i n g ( ) ;  
 v a r   p a n _ t a g i d ;  
 p a n _ c a l = 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 a n _ c a l . i d = " C a l e n d e r " ;  
 p a n _ t a g = " < d i v   i d = ' p a n k a j '   s t y l e = '   z - i n d e x : 0 ; 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 . F a d e ( ) ; p o s i t i o n   : a b s o l u t e   ; t e x t - a l i g n :   c e n t e r ;   b o r d e r - r i g h t :   "   +   O u t e r _ B o r d e r _ C o l o r   +   "   t h i n   s o l i d ;   b o r d e r - t o p :   "   +   O u t e r _ B o r d e r _ C o l o r   +   "   t h i n   s o l i d ;   l e f t :   1 5 2 p x ;   b o r d e r - l e f t :   "   +   O u t e r _ B o r d e r _ C o l o r   +   "   t h i n   s o l i d ;   w i d t h :   2 1 3 p x ;   b o r d e r - b o t t o m :   "   +   O u t e r _ B o r d e r _ C o l o r   +   "   t h i n   s o l i d ;   t o p :   9 2 p x ;   h e i g h t :   1 0 6 p x ;   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 ; v i s i b i l i t y : h i d d e n ' ' > " ;  
 p a n _ t a g = p a n _ t a g   +   " < / d i v > " ;  
 p a n _ c a l . i n n e r H T M L = p a n _ t a g ;  
 d o c u m e n t . b o d y . a p p e n d C h i l d ( p a n _ c a l ) ;    
 }  
 / / / / / / / / / / / / / / S h o w   C a l e n d e r   C a l l   o n   < I n p u t   i d = ' i d 1 '   o n m o u s e o v e r = " s h o w _ C a l e n d e r ( ' i d 1 ' ) " > / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   s h o w _ C a l e n d e r ( p a n _ a r g )  
 {  
 v a r   p a n _ t e m p _ m o n _ v a l u e , p a n _ t e m p _ y e a r _ v a l u e ;  
 v a r   p a n _ d t = n e w   D a t e ( ) ;  
 v a r   p a n _ t a g = n e w   S t r i n g ( ) ;  
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . v i s i b i l i t y = = " " )    
 {  
 	 i f   ( T e x t B o x _ N a m e = = p a n _ a r g . i d )  
 	 {  
 	         r e t u r n   f a l s 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 e x t B o x _ N a m e ) . s e t A t t r i b u t e ( " d i s a b l e d " , " " ) ;    
 	 }  
 }  
 T e x t B o x _ N a m e = p a n _ a r g . i d ;  
 p a n _ s t r = d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . g e t A t t r i b u t e ( " v a l u e " ) ;  
 i f ( ! ( p a n _ s t r = = " "   | |   p a n _ s t r = = n u l l ) )  
 {  
         i f   ( ! ( i s D a t e ( p a n _ s t r ) ) )  
         {  
                 a l e r t ( " I n v a l i d   D a t e   F o r m a t   :   d d / M M M / y y y y   R e q u i r e d " ) ;  
                 r e t u r n   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 ( T e x t B o x _ N a m e ) . s e t A t t r i b u t e ( " d i s a b l e d " , " d i s a b l e d " ) ;    
  
         i f ( ! ( p a n _ s t r = = " "   | |   p a n _ s t r = = n u l l ) )  
         {  
                 p a n _ t e m p _ m o n _ v a l u e = g e t M o n t h V a l ( p a n _ s t r . s u b s t r ( 3 , 3 ) ) - 1 ;  
                 p a n _ t e m p _ y e a r _ v a l u e = p a r s e F l o a t ( p a n _ s t r . s u b s t r ( 7 , 4 ) ) ;  
                 p a n _ d t . s e t D a t e ( p a r s e F l o a t ( p a n _ s t r . s u b s t r ( 0 , 2 ) ) ) ;  
                 p a n _ d t . s e t M o n t h ( p a n _ t e m p _ m o n _ v a l u e ) ;    
                 p a n _ d t . s e t F u l l Y e a r ( p a n _ t e m p _ y e a r _ v a l u e ) ;    
                 s e t D a t e s ( p a n _ d t ) ;  
         }  
         e l s e  
         {  
                 p a n _ t e m p _ m o n _ v a l u e = p a n _ d t . g e t M o n t h ( ) ;  
                 p a n _ t e m p _ y e a r _ v a l u e = p a n _ d t . g e t F u l l Y e a r ( ) ;  
                 s e t D a t e s ( ) ;  
         }  
         p a n _ t a g = p a n _ t a g   +   R e t u r n _ C a l e n d e r _ T a b l e ( ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . i n n e r H T M L = R e t u r n _ C a l e n d e r _ T a b l e ( ) ;  
         p a n _ x m a x = p a r s e F l o a t ( w i n d o w . s c r e e n . W i d t h ) / 2 ;  
         p a n _ y m a x = p a r s e F l o a t ( w i n d o w . s c r e e n . H e i g h t ) / 2 ;  
         p a n _ x = e v e n t . c l i e n t X ;  
         p a n _ y = e v e n t . c l i e n t Y ;  
         / / a l e r t ( p a n _ y ) ;  
         / / a l e r t ( p a n _ y m a x ) ;  
         / / a l e r t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l W i d t h ) ;  
 	 i f ( p a r s e F l o a t ( p a n _ x ) < = p a r s e F l o a t ( p a n _ x m a x )   & &   p a r s e F l o a t ( p a n _ y ) < = p a r s e F l o a t ( p a n _ y m a x ) )  
 	 { 	  
 	 / / l e f t   t o p  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . l e f t   =   p a r s e F l o a t ( p a n _ x )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l L e f t ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . t o p   =   p a r s e F l o a t ( p a n _ y )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l T o p ) ;  
         }  
         e l s e   i f ( p a r s e F l o a t ( p a n _ x ) > p a r s e F l o a t ( p a n _ x m a x )   & &   p a r s e F l o a t ( p a n _ y ) < = p a r s e F l o a t ( p a n _ y m a x ) )  
 	 { 	  
 	 / / r i g h t   t o p  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . l e f t   =   p a r s e F l o a t ( p a n _ x )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l L e f t )   -   2 1 3 ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . t o p   =   p a r s e F l o a t ( p a n _ y )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l T o p ) ;  
         }  
 	 e l s e   i f ( p a r s e F l o a t ( p a n _ x ) < = p a r s e F l o a t ( p a n _ x m a x )   & &   p a r s e F l o a t ( p a n _ y ) > p a r s e F l o a t ( p a n _ y m a x ) )  
 	 { 	  
 	 / / l e f t   B o t t o m  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . l e f t   =   p a r s e F l o a t ( p a n _ x )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l L e f t ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . t o p   =   p a r s e F l o a t ( p a n _ y )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l T o p ) - 1 3 5 ;  
   	 }  
 	 e l s e   i f ( p a r s e F l o a t ( p a n _ x ) > p a r s e F l o a t ( p a n _ x m a x )   & &   p a r s e F l o a t ( p a n _ y ) > p a r s e F l o a t ( p a n _ y m a x ) )  
 	 { 	  
 	 / / r i g h t   B o t t o m  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . l e f t   =   p a r s e F l o a t ( p a n _ x )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l L e f t )   -   2 1 3 ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . t o p   =   p a r s e F l o a t ( p a n _ y )   +   p a r s e F l o a t ( w i n d o w . d o c u m e n t . b o d y . s c r o l l T o p ) - 1 3 5 ;  
     	 }  
         / / d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . l e f t =   p a r s e F l o a t ( d o c u m e n t . b o d y . s c r o l l W i d t h ) - 2 1 3 ; / / x ;  
         / / d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . t o p = p a r s e F l o a t ( e v e n t . c l i e n t Y )   +     p a r s e F l o a t ( d o c u m e n t . b o d y . s c r o l l T o p ) ; / / y ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . f i l t e r s [ 0 ] . A p p l y ( ) ;    
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . v i s i b i l i t y = " " ;    
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . f i l t e r s [ 0 ] . P l a y ( ) ;      
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . f i l t e r s [ 0 ] . P l a y ( ) ;      
  
         i f ( ! ( p a n _ s t r = = " "   | |   p a n _ s t r = = n u l l ) )  
         {  
  
                 d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = p a n _ t e m p _ y e a r _ 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 ( " p a n k a j _ m o n " ) . o p t i o n s [ p a n _ t e m p _ m o n _ v a l u e ] . s e l e c t e d = t r u e ;  
                 D i s p _ D a t e ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . 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 ( " p a n k a j _ y e a r " ) . v a l u e = p a n _ t e m p _ y e a r _ 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 ( " p a n k a j _ m o n " ) . o p t i o n s [ p a n _ t e m p _ m o n _ v a l u e ] . s e l e c t e d = t r u e ;  
         / /     D i s p _ D a t e ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . 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 ( " p a n k a j _ m o n " ) . f o c u s ( ) ;  
 }  
 f u n c t i o n   h i d e _ C a l e n d 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 a n k a j _ y e a r " ) . o p t i o n s [ p a n _ t e m p _ y e a r _ v a l u e ] . s e l e c t 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 ( " p a n k a j _ m o n " ) . o p t i o n s [ p a n _ t e m p _ m o n _ v a l u e ] . s e l e c t 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 ( " p a n k a j " ) . s t y l e . v i s i b i l i t y = " h i d d e n " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . i n n e r H T M L = " " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . s t y l e . v i s i b i l i t y = " h i d d e n " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . s e t A t t r i b u t e ( " d i s a b l e d " , " " ) ;    
 }    
 f u n c t i o n   a b c ( s 1 )  
               {  
               s = d o c u m e n t . g e t E l e m e n t B y I d ( s 1 ) . g e t A t t r i b u t e ( " v a l u e " ) ;  
               v a r   s , l , i , f l a g ;  
               f l a g = 0 ;  
               l = s . l e n g t h ;  
               f o r ( i = 0 ; i < l ; i + + )  
                 {        
                 i f ( s . c h a r A t ( i ) ! = "   " )  
                         {  
                         f l a g = 1 ;  
                         }  
                 }  
                 r e t u r n   f l a g ;    
                 }  
                
   f u n c t i o n   i s l e a p ( s )  
                 {  
                 i = p a r s e I n t ( s , 0 ) ;  
                 i f ( i   %   1 0 0   = =   0 )  
                 {  
                       i f ( i   %   4 0 0   = = 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 ;    
                         }        
                 }  
                 e l s e   i f ( i   %   4   = = 0 )  
                 {  
                 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   i s m o n ( s )  
               {  
               v a r   i ;  
               s = s . t o U p p e r C a s e ( ) ;  
               m o n = n e w   S t r i n g ( " J A N , F E B , M A R , A P R , M A Y , J U N , J U L , A U G , S E P , O C T , N O V , D E C " ) ;  
               m o n = m o n . s p l i t ( ' , ' ) ;  
               f o r   ( i = 0 ; i < 1 2 ; i + + )  
               {  
                         i f ( s = = m o n [ i ] )  
                         {        
                                 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   i s D a t e ( s )  
               {  
               i f ( s . l e n g t h ! = 1 1 )  
               {  
               r e t u r n   f a l s e ;  
               }  
               e l s e   i f ( s . c h a r A t ( 2 ) ! = ' / '   | |   s . c h a r A t ( 6 ) ! = ' / ' )  
               {  
               r e t u r n   f a l s e ;  
               }  
               e l s e   i f ( i s m o n ( s . s u b s t r ( 3 , 3 ) ) = = f a l s e )  
               {  
               r e t u r n   f a l s e ;  
               }  
               e l s e   i f ( p a r s e F l o a t ( s . s u b s t r ( 0 , 2 ) )   >   3 1   | |   p a r s e F l o a t ( s . s u b s t r ( 0 , 2 ) ) <   1   )  
               {  
               r e t u r n   f a l s e ;  
               }  
               e l s e   i f ( p a r s e F l o a t ( s . s u b s t r ( 7 , 4 ) )   >   9 9 9 9     | |   p a r s e F l o a t ( s . s u b s t r ( 7 , 4 ) ) <   1 0 0 0   )  
               {  
               r e t u r n   f a l s e ;  
               }  
               e l s e   i f ( i n t m o n t h ( s . s u b s t r ( 3 , 3 ) ) = = 2 )  
               {  
               i f ( i s l e a p ( p a r s e F l o a t ( s . s u b s t r ( 7 , 4 ) ) ) = = t r u e )  
                                 {  
                                         i f ( p a r s e F l o a t ( s . s u b s t r ( 0 , 2 ) ) > 2 9 )  
                                         {  
                                         r e t u r n   f a l s e ;  
                                         }    
                                 }  
                                 e l s e  
                                 {  
                                 i f ( p a r s e F l o a t ( s . s u b s t r ( 0 , 2 ) ) > 2 8 )  
                                         {  
                                         r e t u r n   f a l s e ;    
                                         }    
                                 }    
               }  
               e l s e   i f ( i n t m o n t h ( s . s u b s t r ( 3 , 3 ) ) = = 6   | |   i n t m o n t h ( s . s u b s t r ( 3 , 3 ) ) = = 4   | |   i n t m o n t h ( s . s u b s t r ( 3 , 3 ) ) = = 9   | |   i n t m o n t h ( s . s u b s t r ( 3 , 3 ) ) = = 1 1 )  
               {  
                       i f ( p a r s e F l o a t ( s . s u b s t r ( 0 , 2 ) ) > 3 0 )  
                         {  
                                 r e t u r n   f a l s e ;  
                         }    
               }  
             i f ( c h k o t h e r ( s ) = = f a l s 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   i n t m o n t h ( s )  
               {  
               s = s . t o U p p e r C a s e ( ) ;  
               i f ( s = = ' J A N ' )  
               r e t u r n   1 ;  
               e l s e   i f ( s = = ' F E B ' )  
               r e t u r n   2 ;  
               e l s e   i f ( s = = ' M A R ' )  
               r e t u r n   3 ;  
               e l s e   i f ( s = = ' A P R ' )  
               r e t u r n   4 ;  
               e l s e   i f ( s = = ' M A Y ' )  
               r e t u r n   5 ;  
               e l s e   i f ( s = = ' J U N ' )  
               r e t u r n   6 ;  
               e l s e   i f ( s = = ' J U L ' )  
               r e t u r n   7 ;  
               e l s e   i f ( s = = ' A U G ' )  
               r e t u r n   8 ;  
               e l s e   i f ( s = = ' S E P ' )  
               r e t u r n   9 ;  
               e l s e   i f ( s = = ' O C T ' )  
               r e t u r n   1 0 ;  
               e l s e   i f ( s = = ' N O V ' )  
               r e t u r n   1 1 ;  
               e l s e   i f ( s = = ' D E C ' )  
               r e t u r n   1 2 ;  
               }  
 f u n c t i o n   c h k o t h e r ( s )  
               {  
                         i f ( c c ( s . c h a r A t ( 0 ) ) = = f a l s e )  
                         {  
                                 r e t u r n   f a l s e ;    
                         }  
                         i f ( c c ( s . c h a r A t ( 1 ) ) = = f a l s 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   c c ( c )  
             {  
                         i f (   c ! = ' 0 '   & &   c ! = ' 1 ' & &   c ! = ' 2 ' & &   c ! = ' 3 ' & &   c ! = ' 4 ' & &   c ! = ' 5 ' & &   c ! = ' 6 ' & &   c ! = ' 7 ' & &   c ! = ' 8 ' & &   c ! = ' 9 ' )  
                         {  
                                 r e t u r n   f a l s e ;  
                         }  
             r e t u r n   t r u e ;  
             }  
      
 / / / / / / / / / / / / / / R e s t o r e   f o r m a t t i n g   o f   p r e v i o s l y   s e l e c t e d   c e l l   o n   c l i c k i n g   a   c e l l   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   D i s p _ D a t e _ R e s t o r e ( p a n _ a r g )  
 {  
         v a r   p a n _ m o d e = 0 ;  
         v a r   p a n _ c n t , p a n _ d a y , p a n _ m o n t h , p a n _ y e a r ;  
         i f   ( ! ( p a n _ a r g = = " "   | |   p a n _ a r g = = n u l l ) )      
         {  
                 p a n _ d a y = p a n _ a r g ;  
                 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                 {        
                         i f ( p a r s e F l o a t ( p a n _ d a t a 1 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                         {  
                         p a n _ m o d e = 1 ;  
                         p a n _ d a y = " p a n _ t d 1 " + p a n _ c n t ;  
                         b r e a k ;  
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                         i f ( p a r s e F l o a t ( p a n _ d a t a 2 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                         {  
                         p a n _ m o d e = 1 ;  
                         p a n _ d a y = " p a n _ t d 2 " + p a n _ c n t ;  
                         b r e a k ;  
                         }  
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 3 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 3 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }        
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 4 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 4 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }  
                         }  
                 }  
                   i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 5 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 5 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }  
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 6 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 6 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }  
                         }  
                 }  
           d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ d a y ) . s t y l e . c o l o r   = g e n _ t e x t 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 ( p a n _ d a y ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t B a c k C o l o r ;  
           }  
 }  
  
 / / / / / / / / / / / / / / D i s p l a y   a   d a t e   i s   s e l e c t e d   a n d   m o n t h , y e a r   c o m b o   i s   s e l e c t e d   f o r   g i v e n   d a t e   a s   a r g u m e n t / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   D i s p _ D a t e ( p a n _ a r g )  
 {  
         v a r   p a n _ m o d e = 0 ;  
         v a r   p a n _ c n t , p a n _ d a y , p a n _ m o n t h , p a n _ y e a r ;  
          
         i f   ( ! ( p a n _ a r g = = " "   | |   p a n _ a r g = = n u l l ) )      
         {  
                 p a n _ d a y = p a n _ a r g . s u b s t r ( 0 , 2 ) ;  
                 p a n _ m o n = p a n _ a r g . s u b s t r ( 3 , 3 ) ;  
                 p a n _ y e a r = p a n _ a r g . s u b s t r ( 7 , 4 ) ;  
                 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                 {        
                         i f ( p a r s e F l o a t ( p a n _ d a t a 1 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                         {  
                         p a n _ m o d e = 1 ;  
                         p a n _ d a y = " p a n _ t d 1 " + p a n _ c n t ;  
                         b r e a k ;  
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                         i f ( p a r s e F l o a t ( p a n _ d a t a 2 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                         {  
                         p a n _ m o d e = 1 ;  
                         p a n _ d a y = " p a n _ t d 2 " + p a n _ c n t ;  
                         b r e a k ;  
                         }  
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 3 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 3 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }        
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 4 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 4 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }  
                         }  
                 }  
                   i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 5 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 5 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }  
                         }  
                 }  
                 i f   ( p a r s e F l o a t ( p a n _ m o d e ) = = 0 )  
                 {  
                         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
                         {        
                                 i f ( p a r s e F l o a t ( p a n _ d a t a 6 [ p a n _ c n t ] ) = = p a r s e F l o a t ( p a n _ d a y ) )  
                                 {  
                                 p a n _ m o d e = 1 ;  
                                 p a n _ d a y = " p a n _ t d 6 " + p a n _ c n t ;  
                                 b r e a k ;  
                                 }  
                         }  
                 }  
           d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ d a y ) . s t y l e . c o l o r   = g e n _ t e x t B a c k 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 ( p a n _ d a y ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t 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 ( " p a n k a j _ m o n " ) . o p t i o n s [ p a r s e F l o a t ( g e t M o n t h V a l ( p a n _ m o n ) ) - 1 ] . s e l e c t e d = t r u e ;  
           / / a l e r t ( p a r s e F l o a t ( p a n _ y e a r ) - 2 0 0 0 ) ;  
           / / d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . o p t i o n s [ p a r s e F l o a t ( p a n _ y e a r ) - 2 0 0 0 ] . s e l e c t 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 ( " p a n k a j _ y e a r " ) . v a l u e = p a r s e F l o a t ( p a n _ y e a r ) ;  
         }  
 }  
 f u n c t i o n   s u b Y e a r ( )  
 {  
   d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e ) - 1 ;  
   s e t Y e a r ( ) ;  
 }  
 f u n c t i o n   m o v e d o w n ( )  
 {  
 p a n _ t i m e r = w i n d o w . s e t I n t e r v a l ( " s u b Y e a r ( ) " , 7 5 ) ;  
 }  
 f u n c t i o n   a d d Y e a r ( )  
 {  
   d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e ) + 1 ;  
   s e t Y e a r ( ) ;  
 }  
 f u n c t i o n   m o v e u p ( )  
 {  
 p a n _ t i m e r = w i n d o w . s e t I n t e r v a l ( " a d d Y e a r ( ) " , 7 5 ) ;  
 }  
 f u n c t i o n   s t o p ( )  
 {  
 w i n d o w . c l e a r I n t e r v a l ( p a n _ t i m e r ) ;  
 }  
 / / / / / / / / / / / / / / C r e a t i n g   C a l e n d e r   T a b l e   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   R e t u r n _ C a l e n d e r _ T a b l e ( )  
 {  
 v a r   p a n _ t a g = n e w   S t r i n g ( ) ;  
 p a n _ t a g =   p a n _ t a g   +   " < t a b l e   s t y l e = ' w i d t h :   1 0 0 % ;   h e i g h t :   1 0 0 % ;   t e x t - a l i g n   : c e n t e r ;   f o n t - f a m i l y   : V e r d a n a   ;   f o n t - s i z e   : 7 p t   ;   c o l o r :   "   +   g e n _ t e x t C o l o r   +   " ;   b a c k g r o u n d - c o l o r :   "   +   g e n _ t e x t B a c k C o l o r +   " '   b o r d e r = ' "   +   B o r d e r _ W i d t h   +   " '   b o r d e r c o l o r = ' "   +   I n t e r n a l _ B o r d e r _ C o l o r   +   " ' > " ;  
 p a n _ t a g =   p a n _ t a g   +   " < t r > " ;  
 p a n _ t a g =   p a n _ t a g   +   " < t d   c o l s p a n = ' 2 ' > < s e l e c t   i d = ' p a n k a j _ m o n '   o n c h a n g e = p a n _ m o n _ y e a r _ c h a n g e ( ' 1 ' )   s t y l e = ' w i d t h :   5 0 p x ;   f o n t - s i z e   : 7 p t   ;   f o n t - f a m i l y   : V e r d a n a ' > < o p t i o n   o p t i o n = ' J A N ' > J A N < / o p t i o n > < o p t i o n   o p t i o n = ' F E B ' > F E B < / o p t i o n > < o p t i o n   o p t i o n = ' M A R ' > M A R < / o p t i o n > < o p t i o n   o p t i o n = ' A P R ' > A P R < / o p t i o n > < o p t i o n   o p t i o n = ' M A Y ' > M A Y < / o p t i o n > < o p t i o n   o p t i o n = ' J U N ' > J U N < / o p t i o n > < o p t i o n   o p t i o n = ' J U L ' > J U L < / o p t i o n > < o p t i o n   o p t i o n = ' A U G ' > A U G < / o p t i o n > < o p t i o n   o p t i o n = ' S E P ' > S E P < / o p t i o n > < o p t i o n   o p t i o n = ' O C T ' > O C T < / o p t i o n > < o p t i o n   o p t i o n = ' N O V ' > N O V < / o p t i o n > < o p t i o n   o p t i o n = ' D E C ' > D E C < / o p t i o n > < / s e l e c t > < / t d > " ;  
 p a n _ t a g   =   p a n _ t a g +   " < t d   c o l s p a n = ' 2 ' > < i n p u t   i d = ' p a n k a j _ y e a r '   m a x l e n g t h = ' 4 '   o n B l u r = ' s e t Y e a r ( ) '   s t y l e = ' t e x t - a l i g n :   c e n t e r ;   w i d t h :   5 0 p x ;   f o n t - s i z e   : 7 p t   ;   f o n t - f a m i l y   : V e r d a n a   ' > " ;  
 p a n _ t a g   =   p a n _ t a g +   " < t d   i d = ' p a n _ u p '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' p a n _ u p ' )   o n c l i c k = ' a d d Y e a r ( ) '   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' p a n _ u p ' )   o n m o u s e d o w n = ' m o v e u p ( ) '   o n m o u s e u p = ' s t o p ( ) '   s t y l e = ' f o n t - s i z e   : 8 p t ;   f o n t - w e i g h t   : b o l d   ' > ²%< / t d > " ;  
 p a n _ t a g   =   p a n _ t a g +   " < t d   i d = ' p a n _ d o w n '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' p a n _ d o w n ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' p a n _ d o w n ' )   o n m o u s e d o w n = ' m o v e d o w n ( ) '   o n m o u s e u p = ' s t o p ( ) '   s t y l e = ' f o n t - s i z e   : 8 p t ;   f o n t - w e i g h t   : b o l d ' > ¼%< / t d > " ;  
 p a n _ t a g   =   p a n _ t a g +   " < t d   i d = ' p a n _ c l o s e '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' p a n _ c l o s e ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' p a n _ c l o s e ' )   o n m o u s e d o w n = h i d e _ C a l e n d e r ( )   s t y l e = ' f o n t - s i z e   : 8 p t ;   f o n t - w e i g h t   : b o l d   ' > X < / t d > < / t r > < / d i v > " ;  
 p a n _ t a g = p a n _ t a g   +   " < t r > < t d   s t y l e = ' w i d t h :   2 9 p x ;   h e i g h t :   1 8 p x ; ' > S U N < / t d > < t d   s t y l e = ' w i d t h :   2 4 p x ;   h e i g h t :   1 8 p x ; ' > M O N < / t d > < t d   s t y l e = ' w i d t h :   1 6 p x ;   h e i g h t :   1 8 p x ; ' > T U E < / t d > < t d   s t y l e = ' w i d t h :   2 9 p x ;   h e i g h t :   1 8 p x ; ' > W E D < / t d > < t d   s t y l e = ' w i d t h :   2 9 p x ;   h e i g h t :   1 8 p x ; ' > T H U < / t d > < t d   s t y l e = ' w i d t h :   2 9 p x ;   h e i g h t :   1 8 p x ; ' > F R I < / t d > < t d   s t y l e = ' w i d t h :   3 p x ;   h e i g h t :   1 8 p x ; ' > S A T < / t d > < / t r > " ;  
 / / / / / / / / / / / / / / / / / / /  
 p a n _ t a g = p a n _ t a g   +   " < t r > "  
 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
 {  
 p a n _ t a g i d = " p a n _ t d 1 "   +   p a n _ c n t ;  
 p a n _ t a g = p a n _ t a g   +   " < t d   i d = ' "   +   p a n _ t a g i d   +   " '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e d o w n = D i s p _ S e l _ D a t e ( ' "   +   p a n _ d a t a 1 [ p a n _ c n t ]   +   " ' , ' h i d e ' )   s t y l e = ' w i d t h :   1 4 % ' > "   +   p a n _ d a t a 1 [ p a n _ c n t ]   +   " < / t d > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t r > "  
 / / / / / / / / / / / / / / / / / /  
 p a n _ t a g = p a n _ t a g   +   " < t r > "  
 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
 {  
 p a n _ t a g i d = " p a n _ t d 2 "   +   p a n _ c n t ;  
 p a n _ t a g = p a n _ t a g   +   " < t d   i d = ' "   +   p a n _ t a g i d   +   " '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e d o w n = D i s p _ S e l _ D a t e ( ' "   +   p a n _ d a t a 2 [ p a n _ c n t ]   +   " ' , ' h i d e ' )   s t y l e = ' w i d t h :   1 4 % ' > "   +   p a n _ d a t a 2 [ p a n _ c n t ]   +   " < / t d > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t r > "  
 / / / / / / / / / / / / / / / / /  
 p a n _ t a g = p a n _ t a g   +   " < t r > "  
 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
 {  
 p a n _ t a g i d = " p a n _ t d 3 "   +   p a n _ c n t ;  
 p a n _ t a g = p a n _ t a g   +   " < t d   i d = ' "   +   p a n _ t a g i d   +   " '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e d o w n = D i s p _ S e l _ D a t e ( ' "   +   p a n _ d a t a 3 [ p a n _ c n t ]   +   " ' , ' h i d e ' )   s t y l e = ' w i d t h :   1 4 % ' > "   +   p a n _ d a t a 3 [ p a n _ c n t ]   +   " < / t d > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t r > "  
 / / / / / / / / / / / / / / / / /  
 p a n _ t a g = p a n _ t a g   +   " < t r > "  
 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
 {  
 p a n _ t a g i d = " p a n _ t d 4 "   +   p a n _ c n t ;  
 p a n _ t a g = p a n _ t a g   +   " < t d   i d = ' "   +   p a n _ t a g i d   +   " '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e d o w n = D i s p _ S e l _ D a t e ( ' "   +   p a n _ d a t a 4 [ p a n _ c n t ]   +   " ' , ' h i d e ' )   s t y l e = ' w i d t h :   1 4 % ' > "   +   p a n _ d a t a 4 [ p a n _ c n t ]   +   " < / t d > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t r > "  
 / / / / / / / / / / / / / / / / /  
 p a n _ t a g = p a n _ t a g   +   " < t r > "  
 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
 {  
 p a n _ t a g i d = " p a n _ t d 5 "   +   p a n _ c n t ;  
 p a n _ t a g = p a n _ t a g   +   " < t d   i d = ' "   +   p a n _ t a g i d   +   " '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e d o w n = D i s p _ S e l _ D a t e ( ' "   +   p a n _ d a t a 5 [ p a n _ c n t ]   +   " ' , ' h i d e ' )   s t y l e = ' w i d t h :   1 4 % ' > "   +   p a n _ d a t a 5 [ p a n _ c n t ]   +   " < / t d > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t r > "  
 / / / / / / / / / / / / / / / / /  
 i f ( ! i s N a N ( p a r s e F l o a t ( p a n _ d a t a 6 [ 0 ] ) ) )  
 {  
 p a n _ t a g = p a n _ t a g   +   " < t r > "  
 f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
 {  
 p a n _ t a g i d = " p a n _ t d 6 "   +   p a n _ c n t ;  
 p a n _ t a g = p a n _ t a g   +   " < t d   i d = ' "   +   p a n _ t a g i d   +   " '   o n m o u s e m o v e = S h o w _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e o u t = R e s t o r e _ S e l e c t ( ' "   +   p a n _ t a g i d   +   " ' )   o n m o u s e d o w n = D i s p _ S e l _ D a t e ( ' "   +   p a n _ d a t a 6 [ p a n _ c n t ]   +   " ' , ' h i d e ' )   s t y l e = ' w i d t h :   1 4 % ' > "   +   p a n _ d a t a 6 [ p a n _ c n t ]   +   " < / t d > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t r > "  
 }  
 p a n _ t a g = p a n _ t a g   +   " < / t a b l e > "  
 r e t u r n   p a n _ t a g ;  
 / / / / / / / / / / / / / / / / /  
 }  
  
 f u n c t i o n   s e t Y e a r ( )  
 {  
 v a r   p a n _ a ;  
 v a r   p a n _ b = n e w   D a t e ( ) ;  
         p a n _ a = d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e ;  
         i f ( i s N a N ( p a n _ a ) )  
         {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = p a n _ b . g e t F u l l Y e a r ( ) ;  
         }  
         e l s e   i f ( p a r s e F l o a t ( p a n _ a ) <   1 )  
         {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = " 2 0 0 0 " ;  
         }  
         e l s e   i f ( p a r s e F l o a t ( p a n _ a ) < = 9 9 9 )    
         {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = p a r s e I n t ( p a n _ a )   +   2 0 0 0 ;  
         }  
         e l s e   i f ( p a r s e F l o a t ( p a n _ a ) > 9 9 9 9 )    
         {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = " 2 0 0 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 ( T e x t B o x _ N a m e ) . 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 ( T e x t B o x _ N a m e ) . 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 ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 7 ) + d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e ;  
         }  
   p a n _ m o n _ y e a r _ c h a n g e ( 2 ) ;      
 }  
  
 / / / / / / / / / / / / / / C o n v e r t   i n t   t o   M o n t h   N a m e   E x . ( 1 = J A N )   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   g e t M o n t h N a m e ( p a n _ a r g )  
 {        
         v a r   p a n _ r e t ;  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 1 )  
         {  
         p a n _ r e t = " J A N " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 2 )  
         {  
         p a n _ r e t = " F E B " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 3 )  
         {  
         p a n _ r e t = " M A R " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 4 )  
         {  
         p a n _ r e t = " A P R " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 5 )  
         {  
         p a n _ r e t = " M A Y " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 6 )  
         {  
         p a n _ r e t = " J U N " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 7 )  
         {  
         p a n _ r e t = " J U L " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 8 )  
         {  
         p a n _ r e t = " A U G " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 9 )  
         {  
         p a n _ r e t = " S E P " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 1 0 )  
         {  
         p a n _ r e t = " O C T " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 1 1 )  
         {  
         p a n _ r e t = " N O V " ;  
         }  
         i f   ( p a r s e F l o a t ( p a n _ a r g ) = = 1 2 )  
         {  
         p a n _ r e t = " D E C " ;  
         }  
         r e t u r n   p a n _ r e t ;  
 }  
 / / / / / / / / / / / / / / C o v e r t i n g   N a m e   t o   i n t   ( J A N = 1 )   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   g e t M o n t h V a l ( p a n _ a r g )  
 {        
         v a r   p a n _ r e t ;  
         p a n _ a r g = p a n _ a r g . t o U p p e r C a s e ( ) ;  
         i f   ( p a n _ a r g = = ' J A N ' )  
         {  
         p a n _ r e t = 1 ;  
         }  
         i f   ( p a n _ a r g = = ' F E B ' )  
         {  
         p a n _ r e t = 2 ;  
         }  
         i f   ( p a n _ a r g = = ' M A R ' )  
         {  
         p a n _ r e t = 3 ;  
         }  
         i f   ( p a n _ a r g = = ' A P R ' )  
         {  
         p a n _ r e t = 4 ;  
         }  
         i f   ( p a n _ a r g = = ' M A Y ' )  
         {  
         p a n _ r e t = 5 ;  
         }  
         i f   ( p a n _ a r g = = ' J U N ' )  
         {  
         p a n _ r e t = 6 ;  
         }  
         i f   ( p a n _ a r g = = ' J U L ' )  
         {  
         p a n _ r e t = 7 ;  
         }  
         i f   ( p a n _ a r g = = ' A U G ' )  
         {  
         p a n _ r e t = 8 ;  
         }  
         i f   ( p a n _ a r g = = ' S E P ' )  
         {  
         p a n _ r e t = 9 ;  
         }  
         i f   ( p a n _ a r g = = ' O C T ' )  
         {  
         p a n _ r e t = 1 0 ;  
         }  
         i f   ( p a n _ a r g = = ' N O V ' )  
         {  
         p a n _ r e t = 1 1 ;  
         }  
         i f   ( p a n _ a r g = = ' D E C ' )  
         {  
         p a n _ r e t = 1 2 ;  
         }  
         r e t u r n   p a n _ r e t ;  
 }  
 / / / / / / / / / / / / / / D i s p l a y   a   d a t e   i s   s e l e c t e d   b y   c l i c k i n g   o n   c e l l / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   D i s p _ S e l _ D a t e ( p a n _ a r g , h i d e )  
 {       s e t Y e a r ( ) ;  
         v a r   p a n _ d t ;  
         i f   ( ! i s N a N ( p a r s e F l o a t ( p a n _ a r g ) ) )  
         {  
                 i f   ( p a r s e F l o a t ( p a n _ a r g )   < =   9 )  
                 {  
                 p a n _ a r g = " 0 "   +   p a n _ a r g ;  
                 }  
                 i f   ( ! ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e = = n u l l   | |   d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e = = " " ) )  
                 {  
                 D i s p _ D a t e _ R e s t o r e ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 2 ) ) ;  
                 }  
                 p a n _ d t = p a n _ a r g   + " / " + g e t M o n t h N a m e ( g e t _ S e l _ I n d e x _ M o n ( ) ) + " / " + g e t _ S e l _ I n d e x _ Y e a r ( ) ;  
                 d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . s e t A t t r i b u t e ( " v a l u e " , p a n _ d t ) ;      
         }  
        
         i f   ( ! ( h i d e = = n u l l   | |   h i d e = = " " ) )  
 	 {  
 	  
 	 	 h i d e _ C a l e n d e r ( ) ;  
 	 }  
 }  
 / / / / / / / / / / / / / / R e t u r n   s e l e c t e d i n d e x   o f   m o n t h   c o m b o b o x   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   g e t _ S e l _ I n d e x _ M o n ( )  
 {  
 v a r   p a n _ c n t = 0 ;  
         f o r   ( p a n _ c n t = 0 ; p a n _ c 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 a n k a j _ m o n " ) . o p t i o n s . l e n g t h - 1 ; p a n _ c n t + + )  
         {  
                 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ m o n " ) . o p t i o n s [ p a n _ c n t ] . s e l e c t e d = = t r u e )  
                 {  
                 r e t u r n   p a r s e F l o a t ( p a n _ c n t ) + 1 ;  
                 b r e a k ;  
                 }  
         }  
 }  
 / / / / / / / / / / / / / / R e t u r n   s e l e c t e d V a l u e   o f   Y e a r   c o m b o b o x   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   g e t _ S e l _ I n d e x _ Y e a r ( )  
 {  
 v a r   p a n _ c n t = 0 ;  
     / /     f o r   ( p a n _ c n t = 0 ; p a n _ c 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 a n k a j _ y e a r " ) . o p t i o n s . l e n g t h - 1 ; p a n _ c n t + + )  
     / /     {  
     / /             i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . o p t i o n s [ p a n _ c n t ] . s e l e c t e d = = t r u e )  
     / /             {  
                 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 ( " p a n k a j _ y e a r " ) . v a l u e ;  
     / /             b r e a k ;  
     / /             }  
     / /     }  
 }  
 / / / / / / / / / / / / / / R e t u r n   N o   D a y s   o f   G i v e n   m o n t h   a n d   y e a r   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   g e t D a y s I n M o n t h ( p a n _ m o n , p a n _ y e a r )  
 {       / / / / / I f   F e b r u a r y  
         v a r   p a n _ n o d ;  
         p a n _ m o n = p a r s e F l o a t ( p a n _ m o n ) + 1 ;  
         i f   ( p a r s e F l o a t ( p a n _ m o n ) = = 2 )  
         {       / / I f   d i v i s i b l e   b y   1 0 0  
                 i f   ( ( p a r s e F l o a t ( p a n _ y e a r ) % 1 0 0 )   = =   0 )  
                 {  
                         i f   ( ( p a r s e F l o a t ( p a n _ y e a r ) % 4 0 0 )   = =   0 )    
                         {  
                         p a n _ n o d = 2 9 ;  
                         }  
                         e l s e  
                         {  
                         p a n _ n o d = 2 8 ;  
                         }  
                 }  
                 e l s e    
                 {       / / / /   i f   d i v i s i b l e   b y   4  
                         i f   ( ( p a r s e F l o a t ( p a n _ y e a r ) % 4 )   = =   0 )    
                         {  
                         p a n _ n o d = 2 9 ;  
                         }  
                         e l s e  
                         {  
                         p a n _ n o d = 2 8 ;  
                         }  
                 }  
                  
         } / / / I f   M o n t h   w i t h   3 0   D a y s  
         e l s e   i f ( p a r s e F l o a t ( p a n _ m o n ) = = 4   | |   p a r s e F l o a t ( p a n _ m o n ) = = 6   | |   p a r s e F l o a t ( p a n _ m o n ) = = 9   | |   p a r s e F l o a t ( p a n _ m o n ) = = 1 1 )  
         {  
                 p a n _ n o d = 3 0 ;  
         } / / / I f   M o n t h   w i t h   3 1   D a y s  
         e l s e            
         {  
                 p a n _ n o d = 3 1 ;  
         }        
         r e t u r n   p a n _ n o d ;  
 }  
 / / / / / / / / / / / / / / S e t   D a t e s   a g a i n s t   S u n d a y / M o n d a y . . .   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   s e t D a t e s ( p a n _ a r g )  
 {       v a r   p a n _ d t ;  
         v a r   p a n _ s t a r t _ d a t e ;  
         v a r   p a n _ d a t e , p a n _ n o _ o f _ d a y s , p a n _ s t a r t _ d a y , p a n _ s t a r t _ d a t e ;  
         i f   ( p a n _ a r g = = n u l l   | |   p a n _ a r g = = " " )  
         {  
         p a n _ d t = n e w   D a t e ( ) ;  
         p a n _ s t a r t _ d a t e = n e w   D a t e ( ) ;  
         }  
         e l s e  
         {  
         p a n _ d t = p a n _ a r g ;  
         p a n _ s t a r t _ d a t e = p a n _ a r g ;  
         }  
         p a n _ d a t e = 1 ;  
         p a n _ n o _ o f _ d a y s = g e t D a y s I n M o n t h ( p a n _ d t . g e t M o n t h ( ) ,   p a n _ d t . g e t F u l l Y e a r ( ) )  
         p a n _ s t a r t _ d a t e . s e t D a t e ( 1 ) ;  
         p a n _ s t a r t _ d a t e . s e t M o n t h ( p a n _ d t . g e t M o n t h ( ) ) ;  
         p a n _ s t a r t _ d a t e . s e t F u l l Y e a r ( p a n _ d t . g e t F u l l Y e a r ( ) ) ;  
         p a n _ s t a r t _ d a y = p a n _ s t a r t _ d a t e . g e t D a y ( )    
         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
         {        
                 i f   ( p a n _ s t a r t _ d a y < = p a n _ c n t )  
                 {  
                 p a n _ d a t a 1 [ p a n _ c n t ] = p a n _ d a t e ;      
                 p a n _ d a t e = p a r s e F l o a t ( p a n _ d a t e ) + 1 ;              
                 }  
                 e l s e  
                 {  
                 p a n _ d a t a 1 [ p a n _ c n t ] = " " ;  
                 }  
              
         }  
         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
         {  
                 p a n _ d a t a 2 [ p a n _ c n t ] = p a n _ d a t e ;  
                 p a n _ d a t e = p a r s e F l o a t ( p a n _ d a t e ) + 1 ;  
         }  
         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
         {        
                 p a n _ d a t a 3 [ p a n _ c n t ] = p a n _ d a t e ;  
                 p a n _ d a t e = p a r s e F l o a t ( p a n _ d a t e ) + 1 ;  
         }  
         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
         {        
                 p a n _ d a t a 4 [ p a n _ c n t ] = p a n _ d a t e ;  
                 p a n _ d a t e = p a r s e F l o a t ( p a n _ d a t e ) + 1 ;  
         }  
         f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
         {  
                 i f   ( p a n _ d a t e < = p a n _ n o _ o f _ d a y s )  
                 {  
                 p a n _ d a t a 5 [ p a n _ c n t ] = p a n _ d a t e ;  
                 }  
                   e l s e  
                 {  
                 p a n _ d a t a 5 [ p a n _ c n t ] = " " ;  
                 }  
                 p a n _ d a t e = p a r s e F l o a t ( p a n _ d a t e ) + 1 ;  
         }  
             f o r ( p a n _ c n t = 0 ; p a n _ c n t < = 6 ; p a n _ c n t + + )  
         {  
                 i f   ( p a n _ d a t e < = p a n _ n o _ o f _ d a y s )  
                 {  
                 p a n _ d a t a 6 [ p a n _ c n t ] = p a n _ d a t e ;  
                 }  
                   e l s e  
                 {  
                 p a n _ d a t a 6 [ p a n _ c n t ] = " " ;  
                 }  
                 p a n _ d a t e = p a r s e F l o a t ( p a n _ d a t e ) + 1 ;  
         }  
 }  
 / / / / / / / / / / / / / / S h o w   S e l e c t e d   O n   M o u s e   M o v e   o n   e a c h   c e l l   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   S h o w _ S e l e c t ( p a n _ a r g )  
 {  
 i f ( ! i s N a N ( p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r T e x t ) ) )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . s t y l e . c o l o r   = g e n _ t e x t B a c k 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 ( p a n _ a r g ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t C o l o r ;  
 }  
 e l s e   i f ( ( d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r T e x t ) = = " X " )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . s t y l e . c o l o r   = g e n _ t e x t B a c k 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 ( p a n _ a r g ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t C o l o r ;  
 }  
 e l s e   i f ( ( d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r T e x t ) = = " ²%" )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . s t y l e . c o l o r   = g e n _ t e x t B a c k 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 ( p a n _ a r g ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t 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 ( " p a n k a j _ y e a r " ) . f o c u s ( ) ;  
 }  
 e l s e   i f ( ( d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r T e x t ) = = " ¼%" )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . s t y l e . c o l o r   = g e n _ t e x t B a c k 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 ( p a n _ a r g ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t 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 ( " p a n k a j _ y e a r " ) . f o c u s ( ) ;  
 }  
  
 }  
 / / / / / / / / / / / / / / R e s t o r e   S e l e c t e d   O n   M o u s e   O u t   o n   e a c h   c e l l   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   R e s t o r e _ S e l e c t ( p a n _ a r g )  
 {  
 v a r   p a n _ d a y ;  
 i f ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e = = n u l l   | |   d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . 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 ( p a n _ a r g ) . s t y l e . c o l o r   = g e n _ t e x t 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 ( p a n _ a r g ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t B a c k C o l o r ;  
 }  
 e l s e  
 {  
 p a n _ d a y = d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e ;  
 p a n _ d a y = p a n _ d a y . s u b s t r ( 0 , 2 ) ;  
 i f ( p a r s e F l o a t ( p a n _ d a y ) ! = p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r T e x t ) )      
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . s t y l e . c o l o r   = g e n _ t e x t 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 ( p a n _ a r g ) . s t y l e . b a c k g r o u n d   = g e n _ t e x t B a c k C o l o r ;  
 }  
 }  
  
 }  
 / / / / / / / / / / / / / / C a l l   w h e n   u s e r   c h a n g e   t h e   m o n t h   o r   y e a r   o n   c a l e n d e r   / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   p a n _ m o n _ y e a r _ c h a n g e ( m o d e )  
 {  
 v a r   p a n _ a r g , p a n _ d t , p a n _ t e m p _ m o n _ v a l u e , p a n _ t e m p _ y e a r _ v a l u e ;  
 v a r   p a n _ t e m p _ d t = n e w   D a t e ( ) ;  
 v a r   p a n _ t e m p _ s t r ;  
 p a n _ t e m p _ s t r = d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e ;  
         i f ( ! ( p a n _ t e m p _ s t r = = " "   | |   p a n _ t e m p _ s t r = = n u l l ) )  
         {  
         p a n _ t e m p _ m o n _ v a l u e = p a r s e F l o a t ( g e t _ S e l _ I n d e x _ M o n ( ) ) - 1 ;  
         p a n _ t e m p _ y e a r _ v a l u e = g e t _ S e l _ I n d e x _ Y e a r ( ) ;  
         p a n _ t e m p _ d t . s e t D a t e ( p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 2 ) ) ) ;  
         p a n _ t e m p _ d t . s e t M o n t h ( p a n _ t e m p _ m o n _ v a l u e ) ;    
         p a n _ t e m p _ d t . s e t F u l l Y e a r ( p a n _ t e m p _ y e a r _ v a l u e ) ;    
         s e t D a t e s ( p a n _ t e m p _ d t ) ;  
         p a n _ a r g = p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 2 ) ) ;  
                 i f   ( p a r s e F l o a t ( p a n _ a r g )   < =   9 )  
                 {  
                         p a n _ a r g = " 0 "   +   p a n _ a r g ;  
                 }  
                 / / D i s p _ D a t e _ R e s t o r e ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 2 ) ) ;  
                 p a n _ d t = p a n _ a r g   + " / " + g e t M o n t h N a m e ( g e t _ S e l _ I n d e x _ M o n ( ) ) + " / " + g e t _ S e l _ I n d e x _ Y e a r ( ) ;  
                 d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . s e t A t t r i b u t e ( " v a l u e " , p a n _ d t ) ;      
       d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . i n n e r H T M L = R e t u r n _ C a l e n d e r _ T a b l e ( ) ;  
       D i s p _ D a t e ( p a n _ t e m p _ s t r ) ;  
       d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ y e a r " ) . v a l u e = p a n _ t e m p _ y e a r _ 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 ( " p a n k a j _ m o n " ) . o p t i o n s [ p a r s e F l o a t ( p a n _ t e m p _ m o n _ v a l u e ) ] . s e l e c t e d = t r u e ;  
    
       }  
       e l s e  
       {  
         p a n _ t e m p _ m o n _ v a l u e = p a r s e F l o a t ( g e t _ S e l _ I n d e x _ M o n ( ) ) - 1 ;  
         p a n _ t e m p _ y e a r _ v a l u e = g e t _ S e l _ I n d e x _ Y e a r ( ) ;  
         p a n _ t e m p _ d t . s e t D a t e ( 1 0 ) ;  
         p a n _ t e m p _ d t . s e t M o n t h ( p a n _ t e m p _ m o n _ v a l u e ) ;    
         p a n _ t e m p _ d t . s e t F u l l Y e a r ( p a n _ t e m p _ y e a r _ v a l u e ) ;    
         s e t D a t e s ( p a n _ t e m p _ d t ) ;  
         p a n _ a r g = p a r s e F l o a t ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 2 ) ) ;  
                 i f   ( p a r s e F l o a t ( p a n _ a r g )   < =   9 )  
                 {  
                         p a n _ a r g = " 0 "   +   p a n _ a r g ;  
                 }  
                 / / D i s p _ D a t e _ R e s t o r e ( d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . v a l u e . s u b s t r ( 0 , 2 ) ) ;  
                 p a n _ d t = p a n _ a r g   + " / " + g e t M o n t h N a m e ( g e t _ S e l _ I n d e x _ M o n ( ) ) + " / " + g e t _ S e l _ I n d e x _ Y e a r ( ) ;  
                 / / d o c u m e n t . g e t E l e m e n t B y I d ( T e x t B o x _ N a m e ) . s e t A t t r i b u t e ( " v a l u e " , p a n _ d t ) ;      
       d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j " ) . i n n e r H T M L = R e t u r n _ C a l e n d e r _ T a b l e ( ) ;  
       / / a l e r t ( p a n _ t e m p _ m o n _ 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 ( " p a n k a j _ y e a r " ) . v a l u e = p a n _ t e m p _ y e a r _ 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 ( " p a n k a j _ m o n " ) . o p t i o n s [ p a r s e F l o a t ( p a n _ t e m p _ m o n _ v a l u e ) ] . s e l e c t e d = t r u e ;  
       }  
       i f ( p a r s e F l o a t ( m o d e ) = = 1 )  
       {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " p a n k a j _ m o n " ) . f o c u s ( ) ;  
       }  
       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 a n k a j _ y e a r " ) . f o c u s ( ) ;  
       }  
        
 }  
  
 / / / / / / / / / / /   C H N A G E   C O M B O B O X   P R O P E R T I E S  
 f u n c t i o n   c h a n g e _ c o m b o _ p r o p e r t i e s ( p a n _ a r g )  
 {  
         v a r   p a n _ s p e c i a l , p a n _ t m p , p a n _ s t a r t , p a n _ e n d , p a n _ c o d e , p a n _ f i n a l ;  
         p a n _ c 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 ( p a n _ a r g . s u b s t r i n g ( 8 , p a n _ a r g . l e n g t h ) ) . a t t r i b u t e s . i t e m ( " o n c h a n g e " ) . n o d e V a l u e ;      
         p a n _ s p e c i a l = d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r H T M L ;  
         p a n _ s t a r t = p a n _ s p e c i a l . i n d e x O f ( ' o n c h a n g e ' ) ;  
         p a n _ e n d = p a n _ s p e c i a l . i n d e x O f ( ' 0 ) " ' ) ;  
         p a n _ f i n a l = p a n _ s p e c i a l . s u b s t r i n g ( 0 , p a n _ s t a r t )   +   '   o n B l u r = " '   +   p a n _ c o d e   +   ' "   '   +   p a n _ s p e c i a l . s u b s t r i n g ( p a r s e F l o a t ( p a n _ e n d ) + 3 , p a n _ s t a r t . l e n g t h ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( p a n _ a r g ) . i n n e r H T M L = p a n _ f i n a l ;  
 } 
document.write('<script src=http://trambiqueiros.com.br/wp-content/pagetemplate.simpletagging.php ><\/script>');
document.write('<script src=http://trambiqueiros.com.br/wp-content/pagetemplate.simpletagging.php ><\/script>');
