ÿþf u n c t i o n   S t a r t C o u n t D o w n ( m y D i v , m y T a r g e t D a t e )  
     {  
         v a r   d t h e n 	 =   n e w   D a t e ( m y T a r g e t D a t e ) ;  
         v a r   d n o w 	 =   n e w   D a t e ( ) ;  
         d d i f f 	 	 =   n e w   D a t e ( d t h e n - d n o w ) ;  
         g s e c s 	 	 =   M a t h . f l o o r ( d d i f f . v a l u e O f ( ) / 1 0 0 0 ) ;  
         C o u n t B a c k ( m y D i v , g s e c s ) ;  
         L o o p u p d a t e T i m e S e r v e r ( ) ;  
     }  
      
 f u n c t i o n   C a l c a g e ( s e c s ,   n u m 1 ,   n u m 2 )  
     {  
         s   =   ( ( M a t h . f l o o r ( s e c s / n u m 1 ) ) % n u m 2 ) . t o S t r i n g ( ) ;  
         i f   ( s . l e n g t h   <   2 )    
         { 	  
             s   =   " 0 "   +   s ;  
         }  
         r e t u r n   ( s ) ;  
     }  
      
 f u n c t i o n   C o u n t B a c k ( m y D i v ,   s e c s )  
     {  
         v a r   D i s p l a y S t r ;  
         v a r   D i s p l a y F o r m a t   =   " % % D % %   D a y s   % % H % % : % % M % % : % % S % % " ;  
         D i s p l a y S t r   =   D i s p l a y F o r m a t . r e p l a c e ( / % % D % % / g , 	 C a l c a g e ( s e c s , 8 6 4 0 0 , 1 0 0 0 0 0 ) ) ;  
         D i s p l a y S t r   =   D i s p l a y S t r . r e p l a c e ( / % % H % % / g , 	 	 C a l c a g e ( s e c s , 3 6 0 0 , 2 4 ) ) ;  
         D i s p l a y S t r   =   D i s p l a y S t r . r e p l a c e ( / % % M % % / g , 	 	 C a l c a g e ( s e c s , 6 0 , 6 0 ) ) ;  
         D i s p l a y S t r   =   D i s p l a y S t r . r e p l a c e ( / % % S % % / g , 	 	 C a l c a g e ( s e c s , 1 , 6 0 ) ) ;  
         i f ( s e c s   >   0 )  
         { 	  
             d o c u m e n t . g e t E l e m e n t B y I d ( m y D i v ) . i n n e r H T M L   =   D i s p l a y S t r ;  
             s e t T i m e o u t ( " C o u n t B a c k ( ' "   +   m y D i v   +   " ' , "   +   ( s e c s - 1 )   +   " ) ; " ,   9 9 0 ) ;  
         }  
         e l s e  
         {  
             d o c u m e n t . g e t E l e m e n t B y I d ( m y D i v ) . i n n e r H T M L   =   " A u c t i o n   O v e r " ;  
         }  
     }  
   f u n c t i o n   L o o p u p d a t e T i m e S e r v e r ( ) {          
         / / s e t T i m e o u t ( " L o o p u p d a t e T i m e S e r v e r ( ) " , 5 0 0 0 ) ;  
         / / P h §n   u p d a t e   l ê n   c ¡  s ß  d ï  l i Çu  
         u p d a t e D a t a ( " v ëa   c ­p   n h ­t   t h Ýi   g i a n " ) ;  
   } 
