ÿþ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   d o P a g e ( C a t _ i d ,   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 ? c a t _ i d = "   +   C a t _ i d   +   " & P a g e I n d e x = "   +   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 P a g e L i s t ( C a t _ i d ,   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 ? c a t _ i d = "   +   C a t _ i d   +   " & P a g e I n d e x = "   +   P a g e I n d e x   +   " & t a b = 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 e S e a r c h L i s t ( 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 ? f s e a r c h = 1 "   +   " & P a g e I n d e x = "   +   P a g e I n d e x   +   " # l i s t " ;  
 	 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 S e a r c h ( )  
 {   	  
 	 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 . m e t h o d = " p o s t " ;  
 	 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 ? f s e a r c h = 1 # l i s t " ;  
 	 f r m S u b m i t . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   c h e c k C o n t a c t F o r m ( )  
 {  
 	 v a r   f r m F o r m = d o c u m e n t . f r m C o n t a c t ;  
 	 v a r   f u l l n a m e ;  
 	 v a r   c o n t e n t ;  
 	  
 	 f u l l n a m e = t r i m s t r i n g ( f r m F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 i f   ( f u l l n a m e = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l o n g   n h a p   h o   t e n . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( f u l l n a m e . s e a r c h ( " s c r i p " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " o b j e c " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " a p p l e " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " H o   t e n   k h o n g   h o p   l e . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	  
 	 c o n t e n t = t r i m s t r i n g ( f r m F o r m . t x t C o n t e n t . v a l u e ) ;  
 	 i f   ( c o n t e n t = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l o n g   n h a p   n o i   d u n g . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( c o n t e n t . s e a r c h ( " s c r i p " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " o b j e c " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " a p p l e " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " N o i   d u n g   k h o n g   h o p   l e . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 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 h e c k F e e d b a c k F o r m ( )  
 {  
 	 v a r   f r m F o r m = d o c u m e n t . f r m F e e d b a c k ;  
 	 v a r   f u l l n a m e ;  
 	 v a r   c o n t e n t ;  
 	  
 	 f u l l n a m e = t r i m s t r i n g ( f r m F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 i f   ( f u l l n a m e = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l o n g   n h a p   h o   t e n . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( f u l l n a m e . s e a r c h ( " s c r i p " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " o b j e c " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " a p p l e " ) > = 0 ) | | ( f u l l n a m e . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " H o   t e n   k h o n g   h o p   l e . " ) ;  
 	 	 f r m F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	  
 	 c o n t e n t = t r i m s t r i n g ( f r m F o r m . t x t C o n t e n t . v a l u e ) ;  
 	 i f   ( c o n t e n t = = " " )    
 	 {  
 	 	 a l e r t ( " V u i   l o n g   n h a p   n o i   d u n g . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 i f   ( ( c o n t e n t . s e a r c h ( " s c r i p " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " o b j e c " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " a p p l e " ) > = 0 ) | | ( c o n t e n t . s e a r c h ( " e m b e " ) > = 0 ) )  
 	 {  
 	 	 a l e r t ( " N o i   d u n g   k h o n g   h o p   l e . " ) ;  
 	 	 f r m F o r m . t x t C o n t e n t . f o c u s ( ) ;  
 	 	 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 h e c k S e n d e m a i l F o r m ( M y F o r m )  
 {    
 	 v a r   t x t F u l l n a m e = t r i m s t r i n g ( M y F o r m . t x t F u l l n a m e . v a l u e ) ;  
 	 v a r   t x t E m a i l = t r i m f u l l s t r i n g ( M y F o r m . t x t E m a i l . v a l u e ) ;    
 	 v a r   t x t F u l l n a m e 1 = t r i m s t r i n g ( M y F o r m . t x t F u l l n a m e 1 . v a l u e ) ;  
 	 v a r   t x t E m a i l 1 = t r i m f u l l s t r i n g ( M y F o r m . t x t E m a i l 1 . v a l u e ) ;    
 	  
 	 i f   ( t x t F u l l n a m e = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   h o   t e n   n g u o i   g u i . " ) ;    
 	 	 M y F o r m . t x t F u l l n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t E m a i l = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   e m a i l   c u a   n g u o i   g u i . " ) ;    
 	 	 M y F o r m . t x t E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( ! i s E m a i l ( t x t E m a i l ) )  
 	 {    
 	 	 a l e r t   ( " E m a i l   c u a   n g u o i   g u i   k h o n g   h o p   l e . " ) ;    
 	 	 M y F o r m . t x t E m a i l . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( t x t F u l l n a m e 1 = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   h o   t e n   n g u o i   n h a n . " ) ;    
 	 	 M y F o r m . t x t F u l l n a m e 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( t x t E m a i l 1 = = " " )    
 	 {    
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   e m a i l   c u a   n g u o i   n h a n . " ) ;    
 	 	 M y F o r m . t x t E m a i l 1 . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }    
 	 i f   ( ! i s E m a i l ( t x t E m a i l 1 ) )  
 	 {      
 	 	 a l e r t   ( " E m a i l   c u a   n g u o i   n h a n   k h o n g   h o p   l e . " ) ;    
 	 	 M y F o r m . t x t E m a i l 1 . f o c u s ( ) ;    
 	 	 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   d o L o g i n ( )  
 {   	  
 	 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 ;  
 	 v a r   t x t U N = t r i m s t r i n g ( f r m S u b m i t . t x t U N . v a l u e ) ;  
 	 v a r   t x t P W = t r i m f u l l s t r i n g ( f r m S u b m i t . t x t P W . v a l u e ) ;    
  
 	 i f   ( t x t U N = = " " )  
 	 {  
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   t e n   t r u y   c a p . " ) ;    
 	 	 f r m S u b m i t . t x t U N . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 } 	  
 	 i f   ( t x t P W = = " " )  
 	 {  
 	 	 a l e r t   ( " V u i   l o n g   c u n g   c a p   m a t   k h a u . " ) ;    
 	 	 f r m S u b m i t . t x t P W . f o c u s ( ) ;    
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	  
 	 f r m S u b m i t . m e t h o d = " p o s t " ;  
 	 f r m S u b m i t . a c t i o n = " l o g i n . a s p x " ;  
 	 f r m S u b m i t . s u b m i t ( ) ;    
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   c h e c k C h a n g e P W F o r m ( )    
 {  
 	 v a r   f r m S u b m i t = d o c u m e n t . f r m C h a n g e U s e r I n f o ;  
 	 v a r   t x t O l d P W = t r i m s t r i n g ( f r m S u b m i t . t x t O l d P W . v a l u e ) ;  
 	 v a r   t x t N e w P W = t r i m s t r i n g ( f r m S u b m i t . t x t N e w P W . v a l u e ) ;  
 	 v a r   t x t R e N e w P W = t r i m s t r i n g ( f r m S u b m i t . t x t R e N e w P W . v a l u e ) ;  
  
 	 i f   ( t x t O l d P W = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   m a t   k h a u   c u . " ) ;    
 	 	 f r m S u b m i t . t x t O l d P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t N e w P W = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   m a t   k h a u   m o i . " ) ;    
 	 	 f r m S u b m i t . t x t N e w P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t R e N e w P W = = " " )    
 	 {    
 	 	 a l e r t ( " V u i   l o n g   n h a p   l a i   m a t   k h a u   m o i . " ) ;    
 	 	 f r m S u b m i t . t x t R e N e w P W . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;    
 	 }  
 	 i f   ( t x t N e w P W ! = t x t R e N e w P W )  
 	 {  
 	 	 a l e r t ( " M a t   k h a u   n h a p   l a i   k h o n g   c h i n h   x a c . " ) ;  
 	 	 f r m S u b m i t . t x t R e N e w P W . f o c u s ( ) ;  
 	 	 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   w i n d o w _ i n i t ( )  
 {  
 	 w i n d o w . r e s i z e T o ( w i n d o w . s c r e e n . w i d t h ,   w i n d o w . s c r e e n . h e i g h t ) ;  
 	 w i n d o w . s c r e e n L e f t = = 0 ;  
 	 w i n d o w . s c r e e n T o p = = 0  
 	 w i n d o w . f o c u s ( ) ;  
 }  
  
 f u n c t i o n   d o M o u s e O v e r M e n u L e v e l 2 ( i t e m , s t r B g c o l o r )  
 {  
 	 f o r ( i = 0 ; i < i t e m . c h i l d r e n . l e n g t h ; i + + )    
 	 {  
 	 	 i t e m . c h i l d r e n ( i ) . s t y l e . c u r s o r = ' h a n d ' ;    
 	 	 i t e m . c h i l d r e n ( i ) . s t y l e . b a c k g r o u n d C o l o r = s t r B g c o l o r  
 	 }  
 }  
 	  
 f u n c t i o n   d o M o u s e O u t M e n u L e v e l 2 ( i t e m , s t r B g c o l o r )  
 {  
 	 f o r ( i = 0 ; i < i t e m . c h i l d r e n . l e n g t h ; i + + )    
 	 	 i t e m . c h i l d r e n ( i ) . s t y l e . b a c k g r o u n d C o l o r = s t r B g c o l o r  
 }  
 	  
 f u n c t i o n   d o M o u s e C l i c k ( i t e m )  
 {  
 	 i t e m . f i r s t C h i l d . f i r s t C h i l d . c l i c k ( ) ;  
 }  
  
 f u n c t i o n   d o V o t e ( )  
 {  
 	 a l e r t ( " C h a n   t h a n h   c a m   o n   b a n   d a   q u a n   t a m " ) ;  
 	 / / w i n d o w . d o c u m e n t . f r m V o t e D e t a i l . a c t i o n = " v o t e _ d e t a i l . a s p x ? a c t i o n = 1 " ;  
 	 w i n d o w . d o c u m e n t . f r m V o t e D e t a i l . s u b m i t ( ) ;  
 	 w i n d o w . c l o s e ( ) ;  
 	 r e t u r n   t r u e ;  
 }  
  
 f u n c t i o n   s u b m i t V o t e ( i n t V o t e _ i d )  
 {  
 	 v a r   s t r I t e m L i s t ;  
 	 w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e   =   ' ' ;  
 	 f o r   ( i = 0 ;   i   <   f r m w e b s i t e . e l e m e n t s . l e n g t h   -   1 ;   i + + )  
 	 {  
 	 	 i f   ( f r m w e b s i t e . e l e m e n t s [ i ] . c h e c k e d )  
 	 	 	 w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e = w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e   +   ' , '   +   f r m w e b s i t e . e l e m e n t s [ i ] . v a l u e ;  
 	 }  
 	 o p e n p a g e _ n o r e s i z e ( ' . . / t i n t u c / v o t e _ d e t a i l . a s p x ? v o t e _ i d = '   +   i n t V o t e _ i d   +   ' & a c t i o n = 1 '   +   ' & i t e m l i s t = '   +   w i n d o w . d o c u m e n t . f r m w e b s i t e . V o t e I t e m . v a l u e   , ' i t e m v o t e ' , ' 5 2 0 ' , ' 3 1 0 ' ) ;  
 }  
 
