ÿþl o a d s t a t u s t e x t   =   ' < b > a n g   T £i   - -   L o a d i n g < / b > < b r > < i m g   s r c = \ " i m a g e s / w a i t . g i f \ " > ' ;    
     f u n c t i o n   m a k e P O S T A d d R e q u e s t ( u r l ,   p a r a m e t e r s )   {    
           h t t p _ r e q u e s t   =   f a l s e ;    
           f u n c t i o n   a j a x O b j e c t ( )    
               {    
               i f ( w i n d o w . X M L H t t p R e q u e s t   | |   w i n d o w . A c t i v e X O b j e c t )    
                     {    
                         r e t u r n   ( w i n d o w . X M L H t t p R e q u e s t ) ? n e w   X M L H t t p R e q u e s t ( ) : n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;    
                     }    
               r e t u r n   f a l s e ;    
               }    
           h t t p _ r e q u e s t   =   a j a x O b j e c t ( )   ;  
           i f   ( ! h t t p _ r e q u e s t )   {    
                   a l e r t ( ' C a n n o t   c r e a t e   X M L H T T P   i n s t a n c e ' ) ;    
                   r e t u r n   f a l s e ;    
           }    
           h t t p _ r e q u e s t . o n r e a d y s t a t e c h a n g e   =   a l e r t A d d ;    
           h t t p _ r e q u e s t . o p e n ( ' G E T ' ,   u r l ,   t r u e ) ;    
           h t t p _ r e q u e s t . s e t R e q u e s t H e a d e r ( " C o n t e n t - t y p e " ,   " a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d " ) ;    
           h t t p _ r e q u e s t . s e t R e q u e s t H e a d e r ( " C o n t e n t - l e n g t h " ,   p a r a m e t e r s . l e n g t h ) ;    
           h t t p _ r e q u e s t . s e t R e q u e s t H e a d e r ( " C o n n e c t i o n " ,   " c l o s e " ) ;    
           h t t p _ r e q u e s t . s e n d ( p a r a m e t e r s ) ;    
       }    
       f u n c t i o n   a l e r t A d d ( )   {    
               d o c u m e n t . g e t E l e m e n t B y I d ( ' c h a n n e l s ' ) . i n n e r H T M L   =   l o a d s t a t u s t e x t ;    
           i f   ( h t t p _ r e q u e s t . r e a d y S t a t e   = =   4 )   {    
                   i f   ( h t t p _ r e q u e s t . s t a t u s   = =   2 0 0 )   {    
                       / / a l e r t ( h t t p _ r e q u e s t . r e s p o n s e T e x t ) ;    
                       r e s u l t   =   h t t p _ r e q u e s t . r e s p o n s e 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 ( ' c h a n n e l s ' ) . i n n e r H T M L   =   ' & n b s p ; ' ;    
                       d o c u m e n t . g e t E l e m e n t B y I d ( ' c h a n n e l s ' ) . i n n e r H T M L   =   r e s u l t ;                          
                   }   e l s e   {    
                       a l e r t ( ' C ó   L ×i ! ' ) ;    
                   }    
           }    
       }    
 f u n c t i o n   s h o w t a b ( i d )   {    
           v a r   p o s t s t r   = " ? t a b = " + i d ;  
 	   / / a l e r t ( p o s t s t r ) ;  
           m a k e P O S T A d d R e q u e s t ( ' s h o w . p h p ' + p o s t s t r ,   p o s t s t r ) ;    
 	   s c r o l l ( ' c h a n n e l s ' , ' 4 0 0 ' ) ;  
       }  
 f u n c t i o n   s h o w l a n g ( i d )   {    
           v a r   p o s t s t r   = " ? l n g = " + i d ;  
 	   / / a l e r t ( p o s t s t r ) ;  
           m a k e P O S T A d d R e q u e s t ( ' s h o w . p h p ' + p o s t s t r ,   p o s t s t r ) ;    
 	   s c r o l l ( ' c h a n n e l s ' , ' 7 0 0 ' ) ;  
       }    
 f u n c t i o n   s h o w c h a n n e l ( i d )   {    
           v a r   p o s t s t r   = " ? c h = " + i d ;  
 	   / / a l e r t ( p o s t s t r ) ;  
           m a k e P O S T A d d R e q u e s t ( ' s h o w . p h p ' + p o s t s t r ,   p o s t s t r ) ;    
 	   s c r o l l ( ' c h a n n e l s ' , ' 7 0 0 ' ) ;  
       }    
  
  
 f u n c t i o n   k g t t a b t v ( i d ) {  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . c l a s s N a m e = " s u b m e n u s e l e c t " ;  
 }  
 f u n c t i o n   n e w w i n d o w ( i d , t a b , c h ) {  
 i f   ( i d = = " a d d " ) {  
 	 w i n d o w . o p e n ( ' t o o l . p h p ? a c t = a d d ' , ' ' , ' s c r o l l b a r s = 1 , m e n u b a r = 0 , s t a t u s = 1 , w i d t h = 3 0 0 , h e i g h t = 2 0 0 , l e f t = 2 0 0 , t o p = 1 1 0 ' )  
 	 }  
 	 e l s e   i f   ( i d = = " h e l p " ) {  
 	 	 w i n d o w . o p e n ( ' t o o l . p h p ? a c t = h e l p ' , ' p ' , ' s c r o l l b a r s = 1 , m e n u b a r = 0 , s t a t u s = 1 , w i d t h = 7 0 0 , h e i g h t = 3 5 0 , l e f t = 5 0 , t o p = 1 1 0 ' ) ;  
 	 }  
 	 e l s e   i f   ( i d = = " l i c h p h a t s o n g " ) {  
 	 	 w i n d o w . o p e n ( ' t o o l . p h p ? a c t = l i c h p h a t s o n g ' , ' p ' , ' s c r o l l b a r s = 0 , m e n u b a r = 0 , s t a t u s = 0 , w i d t h = 4 0 0 , h e i g h t = 5 0 0 , l e f t = 0 , t o p = 0 ' ) ;  
 	 }  
 	 e l s e   i f   ( i d = = " e r r o r " ) {  
 	 	 w i n d o w . o p e n ( ' t o o l . p h p ? a c t = e r r o r & c h a n n e l = t a b - ' + t a b + ' , x e m - ' + c h , ' ' , ' s c r o l l b a r s = 1 , m e n u b a r = 0 , s t a t u s = 1 , w i d t h = 7 0 0 , h e i g h t = 2 5 0 , l e f t = 5 0 , t o p = 1 1 0 ' ) ;  
 	 }  
 	 e l s e   i f   ( i d = = " n e w " ) {  
 	 	 w i n d o w . o p e n ( ' n e w w i n d o w . p h p ? t a b = ' + t a b + ' & x e m = ' + c h + ' & t y p e = 2 ' , ' ' , ' s c r o l l b a r s = 1 , m e n u b a r = 0 , s t a t u s = 0 , w i d t h = 7 0 0 , h e i g h t = 5 0 0 , l e f t = 1 0 0 , t o p = 0 ' ) ;  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' M P l a y e r ' ) . i n n e r H T M L = " " ;  
 	 }  
 }  
 f u n c t i o n   a d d F a v o r i t e ( )  
 {  
 	 v a r   u r l = w i n d o w . l o c a t i o n ; i f ( d o c u m e n t . a l l )  
 	 w i n d o w . e x t e r n a l . A d d F a v o r i t e ( u r l , ' X é  N g h Ç!   T i v i ' ) ; e l s e   i f ( w i n d o w . s i d e b a r )  
 	 w i n d o w . s i d e b a r . a d d P a n e l ( ' X é  N g h Ç!   T i v i ' , u r l , " " )  
 }  
  
 f u n c t i o n   s e t H o m e p a g e ( o b j , u r l )  
 {  
         o b j . s t y l e . b e h a v i o r = ' u r l ( # d e f a u l t # h o m e p a g e ) ' ;  
         i f   ( d o c u m e n t . a l l )  
         {  
                 o b j . s e t H o m e P a g e ( u r l ) ;  
         }  
         e l s e  
         {  
                 a l e r t ( " K é o   L o g o   c ça   s i t e   c h ú n g   t ô i   v à o   n ú t   H o m e   Ã  ·t   s i t e   c h ú n g   t ô i   l à m   t r a n g   c h ç" ) ;  
         }  
 } 
