ÿþf u n c t i o n   s h o w D a t e V N ( )  
 {  
 	 v a r   s t r d a t e ;  
 	 v a r   d t   =   n e w   D a t e ( ) ;  
                             v a r   s t r a r r D a y   =   n e w   A r r a y ( " C h ç  n h ­t " ,   " T h é  h a i " ,   " T h é  b a " ,   " T h é  t °" ,   " T h é  n m " ,   " T h é  s á u " ,   " T h é  b £y " ) ;    
                             v a r   s t r a r r M o n t h   =   n e w   A r r a y ( " 0 1 " , " 0 2 " , " 0 3 " , " 0 4 " , " 0 5 " , " 0 6 " , " 0 7 " , " 0 8 " , " 0 9 " , " 1 0 " , " 1 1 " , " 1 2 " ) ;    
                             v a r   s t r T h u   =   d t . g e t D a y ( ) ;  
                             s t r T h u   =   s t r a r r D a y [ s t r T h u ]   +   " ,   " ;  
                             v a r   s t r D a y = d t . g e t D a t e ( ) ;  
                             i f   ( s t r D a y < 1 0 )   s t r D a y = " 0 "   +   s t r D a y  
                             v a r   s t r M o n t h =   d t . g e t M o n t h ( ) ;  
                             s t r M o n t h =   s t r a r r M o n t h [ s t r M o n t h ]   ;  
                             v a r   s t r Y e a r s   =   d t . g e t Y e a r ( ) ;  
                             i f   ( s t r Y e a r s < 1 9 0 0 )   s t r Y e a r s   + =   1 9 0 0 ;  
                             s t r d a t e = s t r T h u   +   "   "   +   s t r D a y   +   " / "   +   s t r M o n t h   +   " / "   +   s t r Y e a r s  
                             w i n d o w . d o c u m e n t . w r i t e   ( s t r d a t e ) ;  
 }  
 f u n c t i o n   s h o w D a t e E N ( )  
 {  
 	 v a r   s t r d a t e ;  
 	 v a r   d t   =   n e w   D a t e ( ) ;  
                             v a r   s t r a r r D a y   =   n e w   A r r a y ( " S u n d a y " ,   " M o n d a y " ,   " T u e s d a y " ,   " W e d n e s d a y " ,   " T h u r s d a y " ,   " F r i d a y " ,   " S a t u r d a y " ) ;    
                             v a r   s t r a r r M o n t h   =   n e w   A r r a y ( " 0 1 " , " 0 2 " , " 0 3 " , " 0 4 " , " 0 5 " , " 0 6 " , " 0 7 " , " 0 8 " , " 0 9 " , " 1 0 " , " 1 1 " , " 1 2 " ) ;    
                             v a r   s t r T h u   =   d t . g e t D a y ( ) ;  
                             s t r T h u   =   s t r a r r D a y [ s t r T h u ]   +   " ,   " ;  
                             v a r   s t r D a y = d t . g e t D a t e ( ) ;  
                             i f   ( s t r D a y < 1 0 )   s t r D a y = " 0 "   +   s t r D a y  
                             v a r   s t r M o n t h =   d t . g e t M o n t h ( ) ;  
                             s t r M o n t h =   s t r a r r M o n t h [ s t r M o n t h ]   ;  
                             v a r   s t r Y e a r s   =   d t . g e t Y e a r ( ) ;  
                             i f   ( s t r Y e a r s < 1 9 0 0 )   s t r Y e a r s   + =   1 9 0 0 ;  
                             s t r d a t e = s t r T h u   +   "   "   +   s t r M o n t h   +   " / "   +   s t r D a y   +   " / "   +   s t r Y e a r s  
                             w i n d o w . d o c u m e n t . w r i t e   ( s t r d a t e ) ;  
 }  
 f u n c t i o n   s h o w D a t e C N ( )  
 {  
 	 v a r   s t r d a t e ;  
 	 v a r   d t   =   n e w   D a t e ( ) ;  
                             v a r   s t r a r r D a y   =   n e w   A r r a y ( " f  g  åe" ,   " f  g   N" ,   " f  g  ŒN" ,   " f  g  	N" ,   " f  g  ÛV" ,   " f  g  ”N" ,   " f  g  mQ" ) ;    
                             v a r   s t r a r r M o n t h   =   n e w   A r r a y ( " 0 1 " , " 0 2 " , " 0 3 " , " 0 4 " , " 0 5 " , " 0 6 " , " 0 7 " , " 0 8 " , " 0 9 " , " 1 0 " , " 1 1 " , " 1 2 " ) ;    
                             v a r   s t r T h u   =   d t . g e t D a y ( ) ;  
                             s t r T h u   =   s t r a r r D a y [ s t r T h u ]   +   " ,   " ;  
                             v a r   s t r D a y = d t . g e t D a t e ( ) ;  
                             i f   ( s t r D a y < 1 0 )   s t r D a y = " 0 "   +   s t r D a y  
                             v a r   s t r M o n t h =   d t . g e t M o n t h ( ) ;  
                             s t r M o n t h =   s t r a r r M o n t h [ s t r M o n t h ]   ;  
                             v a r   s t r Y e a r s   =   d t . g e t Y e a r ( ) ;  
                             i f   ( s t r Y e a r s < 1 9 0 0 )   s t r Y e a r s   + =   1 9 0 0 ;  
                             s t r d a t e = s t r T h u   +   "   "   +   s t r D a y   +   " / "   +   s t r M o n t h   +   " / "   +   s t r Y e a r s  
                             w i n d o w . d o c u m e n t . w r i t e   ( s t r d a t e ) ;  
 }  
 f u n c t i o n   o p e n p a g e ( p a g e u r l ,   p a g e n a m e ,   p a g e w i d t h ,   p a g e h e i g h t )    
 {                                                                                      
 	 v a r   a t t r ;                                                                                      
 	 a t t r = " w i d t h = " + p a g e w i d t h + " , h e i g h t = " + p a g e h e i g h t + " , s c r o l l b a r s = y e s , s t a t u s = n o , t i t l e = y e s , t o o l b a r s = y e s , r e s i z a b l e = n o " ;  
 	 w i n d o w . o p e n ( p a g e u r l ,   p a g e n a m e ,   a t t r ) ;                                                                                      
 }  
  
 f u n c t i o n   G e t P a g e ( C ,   P )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m W e b s i t e ;  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? c = "   +   C   +   " & p = "   +   P ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   G e t P a g e 1 ( P )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m W e b s i t e ;  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? s = 1 & s t = 1 & p = "   +   P ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   d o P a g e ( P a g e I n d e x , s t r K e y w o r d )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m W e b s i t e ;  
 	  
 	 i f   ( s t r K e y w o r d = = " " )  
 	 	 s t r K e y w o r d =   "   "  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? p = "   +   P a g e I n d e x   +   " & s = "   +   s t r K e y w o r d   ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   d o P a g e S e a r c h ( s ,   p )  
 {  
                         v a r   f r m S u b m i t = d o c u m e n t . f r m W e b s i t e ;  
                         f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? s = "   +   s   +   " & p = "   +   p   +   " & f s e a r c h = 1 & f s e a r c h n e w = 1 " ;  
                         f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   d o P a g i n g ( c ,   p )  
 {  
                         v a r   f r m S u b m i t = d o c u m e n t . f r m W e b s i t e ;  
                         f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? c = "   +   c   +   " & p = "   +   p   ;  
                         f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
  
 f u n c t i o n   d o P a g e 3 ( P a g e I n d e x )  
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m W e b s i t e ;  
 	 f r m S u b m i t . a c t i o n = " d e f a u l t . a s p x ? p = "   +   P a g e I n d e x   ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   d o A d v a n c e S e a r c h ( )  
 {  
 	 f r m W e b s i t e . a c t i o n = " d e f a u l t . a s p x ? s = 1 & s t = 1 " ;  
 	 f r m W e b s i t e . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   t r i m ( t e x t )  
 {  
 	 p o s 1 = 0 ;  
 	 p o s 2 = t e x t . l e n g t h - 1 ;  
 	 f o r ( i = 0 ; i < = t e x t . l e n g t h - 1 ; i + + )  
 	 	 i f ( t e x t . s u b s t r ( i , 1 ) = = "   " )   p o s 1 = i ;  
 	 	 e l s e   b r e a k ;  
 	 f o r ( i = l e n g t h - 1 ; i > = 0 ; i - - )  
 	 	 i f ( t e x t . s u b s t r ( i , 1 ) = = "   " )   p o s 2 = i ;  
 	 	 e l s e   b r e a k ;  
 	 i f   ( p o s 2 < p o s 1 )   r e t u r n   " " ;  
 	 r e t u r n   t e x t . s u b s t r ( p o s 1 , p o s 2 - p o s 1 ) ;  
 }  
  
 f u n c t i o n   t r i m s t r i n g ( s t r i n )  
 {    
 	 v a r   s t r t e m p ;  
 	 v a r   i ;    
 	 s t r t e m p = " " ;  
 	 i = 0 ;  
 	 i f   ( s t r i n . c h a r A t ( i ) ! = "   " ) { s t r t e m p = s t r t e m p + s t r i n . c h a r A t ( i ) ; }  
 	 f o r   ( v a r   i = 1 ; i < s t r i n . l e n g t h - 1 ; i + + ) {  
 	 	 i f   ( s t r i n . c h a r A t ( i ) = = "   " ) {  
 	 	 	 i f   ( s t r i n . c h a r A t ( i + 1 ) ! = "   " )   { s t r t e m p = s t r t e m p + s t r i n . c h a r A t ( i ) }  
 	 	 }  
 	 	 e l s e   { s t r t e m p = s t r t e m p + s t r i n . c h a r A t ( i ) }    
 	 }  
 	 i = s t r i n . l e n g t h ;  
 	 i f   ( s t r i n . c h a r A t ( i ) ! = "   " ) { s t r t e m p = s t r t e m p + s t r i n . c h a r A t ( i ) }  
 	 r e t u r n   s t r t e m p ;    
 }  
  
 f u n c t i o n   d o C l i c k ( c t r l N a m e ,   e )  
 {  
 	 v a r   k e y ;  
 	 i f   ( w i n d o w . e v e n t )  
 	 	 k e y = w i n d o w . e v e n t . k e y C o d e ;  
 	 e l s e  
 	 	 k e y = e . w h i c h ; 	 	 	 	 	  
 	  
 	 i f   ( k e y   = =   1 3 )  
 	 {  
 	 	 / / G e t   t h e   b u t t o n   t h e   u s e r   w a n t s   t o   h a v e   c l i c k e d  
 	 	 v a r   c t r l   =   d o c u m e n t . g e t E l e m e n t B y I d ( c t r l N a m e ) ;  
 	 	 i f   ( c t r l   ! =   n u l l )  
 	 	 {   / / I f   w e   f i n d   t h e   b u t t o n   c l i c k   i t  
 	 	 	 c t r l . f o c u s ( ) ;  
 	 	 	 e v e n t . k e y C o d e   =   0 ;  
 	 	 }  
 / / 	 	 	 	 v a r   c t r l E x i t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' U c _ H e a d e r 1 _ i m g b t n T h o a t ' ) ;  
 	 }  
 }  
 	 	  
 f u n c t i o n   d o S u b m i t ( b t n N a m e ,   e )  
 {  
 	 v a r   k e y ;  
 	 i f   ( w i n d o w . e v e n t )  
 	 	 k e y = w i n d o w . e v e n t . k e y C o d e ;  
 	 e l s e  
 	 	 k e y = e . w h i c h ;  
 	 	 i f   ( k e y   = =   1 3 )  
 	 {  
 	 	 / / G e t   t h e   b u t t o n   t h e   u s e r   w a n t s   t o   h a v e   c l i c k e d  
 	 	 v a r   b t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( b t n N a m e ) ;  
 	 	 i f   ( b t n   ! =   n u l l )  
 	 	 {   / / I f   w e   f i n d   t h e   b u t t o n   c l i c k   i t  
 	 	 	 b t n . c l i c k ( ) ;  
 	 	 	 e v e n t . k e y C o d e   =   0 ;  
 	 	 }  
 	 }  
 } 	 	 
