ÿþ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   ( L e a d i n g Z e r o   & &   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 ( s e c s )   {  
       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 ( " c n t d w n " ) . i n n e r H T M L   =   F i n i s h M e s s a g e ;  
       r e t u r n ;       }  
       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 ) ) ;  
       d o c u m e n t . g e t E l e m e n t B y I d ( " c n t d w n " ) . i n n e r H T M L   =   D i s p l a y S t r ;  
       i f   ( C o u n t A c t i v e )           s e t T i m e o u t ( " C o u n t B a c k ( "   +   ( s e c s + C o u n t S t e p p e r )   +   " ) " ,   S e t T i m e O u t P e r i o d ) ;  
       }  
  
       f u n c t i o n   p u t s p a n ( b a c k c o l o r ,   f o r e c o l o r )   {    
       d o c u m e n t . w r i t e ( " < s p a n   i d   =   ' c n t d w n ' > < / s p a n > " ) ;  
       }     i f   ( t y p e o f ( B a c k C o l o r ) = = " u n d e f i n e d " )       B a c k C o l o r   =   " w h i t e " ;  
       i f   ( t y p e o f ( F o r e C o l o r ) = = " u n d e f i n e d " )       F o r e C o l o r =   " b l a c k " ;  
       i f   ( t y p e o f ( T a r g e t D a t e ) = = " u n d e f i n e d " )       T a r g e t D a t e   =   " 1 2 / 2 0 / 2 0 2 0   5 : 0 0   P M " ;  
       i f   ( t y p e o f ( D i s p l a y F o r m a t ) = = " u n d e f i n e d " )       D i s p l a y F o r m a t   =   " < c e n t e r > < b > >AB020B: < / b > < b r > < b >   % % D % %   4=8,   % % H % % : % % M % % : % % S % %   < / b > < / c e n t e r > " ;  
       i f   ( t y p e o f ( C o u n t A c t i v e ) = = " u n d e f i n e d " )       C o u n t A c t i v e   =   t r u e ;  
       i f   ( t y p e o f ( F i n i s h M e s s a g e ) = = " u n d e f i n e d " )       F i n i s h M e s s a g e   =   " " ;  
       i f   ( t y p e o f ( C o u n t S t e p p e r ) ! = " n u m b e r " )       C o u n t S t e p p e r   =   - 1 ;  
       i f   ( t y p e o f ( L e a d i n g Z e r o ) = = " u n d e f i n e d " )       L e a d i n g Z e r o   =   t r u e ;  
       C o u n t S t e p p e r   =   M a t h . c e i l ( C o u n t S t e p p e r ) ;  
       i f   ( C o u n t S t e p p e r   = =   0 )       C o u n t A c t i v e   =   f a l s e ;    
       v a r   S e t T i m e O u t P e r i o d   =   ( M a t h . a b s ( C o u n t S t e p p e r ) - 1 ) * 1 0 0 0   +   9 9 0 ;   p u t s p a n ( B a c k C o l o r ,   F o r e C o l o r ) ;  
       v a r   d t h e n   =   n e w   D a t e ( T a r g e t D a t e ) ;   v a r   d n o w   =   n e w   D a t e ( ) ;  
       i f ( C o u n t S t e p p e r > 0 )       d d i f f   =   n e w   D a t e ( d n o w - d t h e n ) ;  
 	 e l s 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 ( g s e c s ) ; 
