ÿþf u n c t i o n   o p e n P o p U p ( w i d t h , h e i g h t , u r l , t a r g e t ) {  
 	 	 r e t u r n   w i n d o w . o p e n ( u r l , t a r g e t , ' t o o l b a r = 0 , l o c a t i o n = 0 ,   d i r e c t o r i e s = 0 ,   s t a t u s = 0 ,   m e n u b a r = 0 ,   s c r o l l b a r s = 1 ,   r e s i z a b l e = 0 ,   w i d t h = '   +   w i d t h   +   ' ,   h e i g h t = '   +   h e i g h t   +   ' ,   l e f t = '   +   ( s c r e e n . w i d t h   -   w i d t h ) / 2   +   ' ,   t o p = '   +   ( s c r e e n . h e i g h t - h e i g h t ) / 2   ) ;  
 }  
 f u n c t i o n   o p e n P o p U p 2 ( w i d t h , h e i g h t , u r l , t a r g e t ) {  
 	 	 r e t u r n   w i n d o w . o p e n ( u r l , t a r g e t , ' t o o l b a r = 0 , l o c a t i o n = 0 ,   d i r e c t o r i e s = 0 ,   s t a t u s = 0 ,   m e n u b a r = 0 ,   s c r o l l b a r s = 0 ,   r e s i z a b l e = 0 ,   w i d t h = '   +   w i d t h   +   ' ,   h e i g h t = '   +   h e i g h t   +   ' ,   l e f t = '   +   ( s c r e e n . w i d t h   -   w i d t h ) / 2   +   ' ,   t o p = '   +   ( s c r e e n . h e i g h t - h e i g h t ) / 2   ) ;  
 }  
 f u n c t i o n   p o p W i n ( ) {  
                 r e t u r n   o p e n P o p U p ( 5 5 0 , 4 0 0 , ' a b o u t : b l a n k ' , ' _ _ p o p W i n ' ) ;  
 }  
 f u n c t i o n   p o p P r i n t ( ) {  
                 v a r   w i d t h = 5 5 0 ; v a r   h e i g h t = 4 0 0 ;  
                 r e t u r n   w i n d o w . o p e n ( " a b o u t : b l a n k " , ' _ _ p o p P r i n t ' , ' t o o l b a r = 0 , l o c a t i o n = 0 ,   d i r e c t o r i e s = 0 ,   s t a t u s = 0 ,   m e n u b a r = 0 ,   s c r o l l b a r s = 0 ,   r e s i z a b l e = 0 ,   w i d t h = '   +   w i d t h   +   ' ,   h e i g h t = '   +   h e i g h t   +   ' ,   l e f t = '   +   ( s c r e e n . w i d t h   -   w i d t h ) / 2   +   ' ,   t o p = '   +   ( s c r e e n . h e i g h t - h e i g h t ) / 2   ) ;  
                  
 }  
 f u n c t i o n   o p _ m _ i ( u r l ) {  
         o p e n P o p U p ( 3 9 2 , 4 5 0 , ' a b o u t : b l a n k ' , ' _ p i m a g e ' ) ;  
 }  
 f u n c t i o n   p r i n t O ( o b j ) {  
         o b j . f o c u s ( ) ;  
         o b j . p r i n t ( ) ;  
 }  
  
 f u n c t i o n   c o m m e n t _ w i n d o w ( ) {  
         o p e n P o p U p ( 5 5 0 , 5 3 0 , ' a b o u t : b l a n k ' , ' _ c o m m e n t ' )  
 }  
 f u n c t i o n   r a t e o v e r ( o ,   r ) {  
         v a r   i d   =   p a r s e I n t ( o . i d . r e p l a c e ( ' d o r a t e ' , ' ' ) ) ;    
         f o r ( v a r   i = 1 ;   i < = i d ; i + + ) {  
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d o r a t e ' + i ) . s r c = ' / i m a g e s / r a t e / r a . g i f ' ;  
         }  
 }  
 f u n c t i o n   r a t e o u t ( o ,   r ) {  
         f o r ( v a r   i = 1 ;   i < = 5 ; i + + ) {  
                 i f ( i < = r )  
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' d o r a t e ' + i ) . s r c = ' / i m a g e s / r a t e / r 1 . g i f ' ;  
                 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 ( ' d o r a t e ' + i ) . s r c = ' / i m a g e s / r a t e / r 0 . g i f '  
         }  
 }  
  
 f u n c t i o n   a j a x _ p a g e ( u r l ,   c o n t a i n e r i d ) {  
         v a r   p a g e _ r e q u e s t   =   f a l s e  
         i f   ( w i n d o w . X M L H t t p R e q u e s t )   / /   i f   M o z i l l a ,   S a f a r i   e t c  
                 p a g e _ r e q u e s t   =   n e w   X M L H t t p R e q u e s t ( )  
         e l s e   i f   ( w i n d o w . A c t i v e X O b j e c t ) {   / /   i f   I E  
                 t r y   {  
                         p a g e _ r e q u e s t   =   n e w   A c t i v e X O b j e c t ( " M s x m l 2 . X M L H T T P " )  
                 }    
                 c a t c h   ( e ) {  
                         t r y {  
                                 p a g e _ 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 " )  
                         }  
                         c a t c h   ( e ) { }  
                 }  
         }  
         e l s e  
                 r e t u r n   f a 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 ( c o n t a i n e r i d ) . i n n e r H T M L = ' < i m g   s r c = " / i m a g e s / l o a d i n g 1 4 . g i f "   a l i g n = " a b s m i d d l e " / > ' / / l o a d i n g . .   t e x t  
         p a g e _ 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 = f u n c t i o n ( ) {  
                 l o a d _ p a g e ( p a g e _ r e q u e s t ,   c o n t a i n e r i d )  
         }  
          
         v a r   c a c h e _ c l e a r _ p a r a m = ( u r l . i n d e x O f ( " ? " ) ! = - 1 ) ?   " & " + n e w   D a t e ( ) . g e t T i m e ( )   :   " ? " + n e w   D a t e ( ) . g e t T i m e ( ) ;  
         p a g e _ r e q u e s t . o p e n ( ' G E T ' ,   u r l + c a c h e _ c l e a r _ p a r a m ,   t r u e ) ;  
         p a g e _ r e q u e s t . s e n d ( n u l l ) ;  
          
 }  
  
 f u n c t i o n   l o a d _ p a g e ( p a g e _ r e q u e s t ,   c o n t a i n e r i d ) {  
         i f   ( p a g e _ r e q u e s t . r e a d y S t a t e   = =   4   & &   ( p a g e _ r e q u e s t . s t a t u s = = 2 0 0   | |   w i n d o w . l o c a t i o n . h r e f . i n d e x O f ( " h t t p " ) = = - 1 ) )  
         d o c u m e n t . g e t E l e m e n t B y I d ( c o n t a i n e r i d ) . i n n e r H T M L = p a g e _ r e q u e s t . r e s p o n s e T e x t  
         / / w i n d o w . l o c a t i o n . h r e f . i n d e x O f ( " h t t p " ) = = - 1   :   N o t   r e m o t e   s i t e  
 }  
  
 f u n c t i o n   d o r a t e ( i d , p o i n t , s i d ) {  
         a j a x _ p a g e ( ' / b a c k e n d / r a t i n g . a s p x ? n e w s _ i d = ' + i d + " & p o i n t = " + p o i n t + " & s i d = " + s i d , ' r a t i n g _ p a d ' ) ;  
 }  
 f u n c t i o n   b a d R e p o r t ( i d ) {  
         a j a x _ p a g e ( ' / b a c k e n d / C o m m e n t B a d R e p o r t . a s p x ? i d = ' + i d , ' c m t _ b a d _ ' + i d ) ;  
         a l e r t ( ' C £m   ¡n   b ¡n   ã   t h ô n g   b á o   c h o   c h ú n g   t ô i ' ) ;  
 }  
 f u n c t i o n   t i m e _ p a r a m s ( ) {  
         v a r   a   =   n e w   D a t e ( ) ;  
         v a r   m s   =   a . g e t M i l l i s e c o n d s ( ) ;  
         v a r   s   =   a . g e t S e c o n d s ( ) ;  
         v a r   m n   =   a . g e t M i n u t e s ( ) ;  
         v a r   h   =   a . g e t H o u r s ( ) ;  
         v a r   d   =   a . g e t D a y ( ) ;  
         v a r   m   =   a . g e t M o n t h ( ) ;  
         v a r   y   =   a . g e t F u l l Y e a r ( ) ;  
         v a r   t   =   y + ' _ ' + m + ' _ ' + d + ' _ ' + h + ' _ ' + m n + ' _ ' + s + ' _ ' + m s ;  
         r e t u r n   t ;  
 }  
  
 f u n c t i o n   c o u n t e r ( i d ) {  
         d o c u m e n t . w r i t e ( ' < i m g   s r c = " / b a c k e n d / c o u n t e r . a s h x ? n e w s _ i d = ' + i d + ' & s i d = ' + t i m e _ p a r a m s ( ) + ' "   w i d t h = " 1 "   h e i g h t = " 1 "   b o r d e r = " 0 "   / > ' ) ;  
 }  
  
 f u n c t i o n   s e t C o o k i e ( c _ n a m e , v a l u e , e x p i r e d a y s )  
 {  
 	 v a r   e x d a t e = n e w   D a t e ( )  
 	 e x d a t e . s e t D a t e ( e x d a t e . g e t D a t e ( ) + e x p i r e d a y s )  
 	 d o c u m e n t . c o o k i e = c _ n a m e +   " = "   + e s c a p e ( v a l u e ) + ( ( e x p i r e d a y s = = n u l l )   ?   " "   :   " ; e x p i r e s = " + e x d a t e )  
 }    
  
 f u n c t i o n   g e t C o o k i e ( c _ n a m e )  
 {  
 i f   ( d o c u m e n t . c o o k i e . l e n g t h > 0 )  
     {  
     c _ s t a r t = d o c u m e n t . c o o k i e . i n d e x O f ( c _ n a m e   +   " = " )  
     i f   ( c _ s t a r t ! = - 1 )  
         {    
         c _ s t a r t = c _ s t a r t   +   c _ n a m e . l e n g t h + 1    
         c _ e n d = d o c u m e n t . c o o k i e . i n d e x O f ( " ; " , c _ s t a r t )  
         i f   ( c _ e n d = = - 1 )   c _ e n d = d o c u m e n t . c o o k i e . l e n g t h  
         r e t u r n   u n e s c a p e ( d o c u m e n t . c o o k i e . s u b s t r i n g ( c _ s t a r t , c _ e n d ) )  
         }    
     }  
 r e t u r n   n u l l  
 }  
  
 f u n c t i o n   c h e c k C o o k i e ( )  
 {  
 u s e r n a m e = g e t C o o k i e ( ' u s e r n a m e ' )  
 i f   ( u s e r n a m e ! = n u l l )  
     { a l e r t ( ' W e l c o m e   a g a i n   ' + u s e r n a m e + ' ! ' ) }  
 e l s e    
     {  
     u s e r n a m e = p r o m p t ( ' P l e a s e   e n t e r   y o u r   n a m e : ' , " " )  
     i f   ( u s e r n a m e ! = n u l l   & &   u s e r n a m e ! = " " )  
         {  
         s e t C o o k i e ( ' u s e r n a m e ' , u s e r n a m e , 3 6 5 )  
         }  
     }  
 }  
  
 f u n c t i o n   a d d f a v ( )  
 {  
         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 ( d o c u m e n t . t i t l e ,   l o c a t i o n . h r e f , " " ) ;  
         }   e l s e   i f (   w i n d o w . e x t e r n a l   )   {   / /   I E   F a v o r i t e  
                 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 ( l o c a t i o n . h r e f , d o c u m e n t . t i t l e ) ;   }  
         e l s e   i f ( w i n d o w . o p e r a   & &   w i n d o w . p r i n t )   {  
                 r e t u r n   t r u e ;   }  
         e l s e   {  
                 a l e r t ( " C h éc   n n g   n à y   k h ô n g   °ãc   h ×  t r ã  c h o   t r ì n h   d u y Çt   b ¡n   a n g   s í  d ån g ! " ) ;  
         }  
        
 }  
  
 f u n c t i o n   g o t o R e f ( u r l ) {  
         v a r   _ r e f   =   " r e t u r n U r l = "   +   e s c a p e ( l o c a t i o n . h r e f ) ;  
         _ r e f   =   ( u r l . i n d e x O f ( " ? " ) ! = - 1 )   ?   " & "   +   _ r e f   :   " ? "   +   _ r e f ;  
         l o c a t i o n . h r e f   =   u r l   +   _ r e f ;  
 }  
  
 / / G e t   p o s i t i o n   { t o p , l e f t }   o f   h t m l   e l e m e n t  
 f u n c t i o n   g e t O f f s e t ( e l )   {  
         v a r   _ x   =   0 ;  
         v a r   _ y   =   0 ;  
         w h i l e (   e l   & &   ! i s N a N (   e l . o f f s e t L e f t   )   & &   ! i s N a N (   e l . o f f s e t T o p   )   )   {  
                 _ x   + =   e l . o f f s e t L e f t   -   e l . s c r o l l L e f t ;  
                 _ y   + =   e l . o f f s e t T o p   -   e l . s c r o l l T o p ;  
                 e l   =   e l . o f f s e t P a r e n t ;  
         }  
         r e t u r n   {   t o p :   _ y ,   l e f t :   _ x   } ;  
 }  
 / / S e t   p o s   o f   a n   e l e m e n t   t o   o t h e r   e l e m e n t  
 f u n c t i o n   s e t O v e r E L 0 ( f r I d ,   t o I d ) {  
         v a r   s r c = $ ( ' # ' + t o I d ) ;  
         v a r   d e s t   =   $ ( ' # ' + f r I d ) ;  
          
         s r c . h e i g h t ( d e s t . h e i g h t ( ) ) ;  
         s r c . w i d t h ( d e s t . w i d t h ( ) ) ;          
         v a r   p   =   s r c . p o s i t i o n ( ) ;  
         d e s t . o f f s e t ( {   t o p :   p . t o p ,   l e f t :   p . l e f t   } ) ;  
 } 	  
 f u n c t i o n   s e t O v e r E L ( f r I d ,   t o I d ) {  
         v a r   s r c = $ ( ' # ' + t o I d ) ;  
         v a r   d e s t   =   $ ( ' # ' + f r I d ) ;  
          
         s r c . h e i g h t ( d e s t . h e i g h t ( ) ) ;  
         s r c . w i d t h ( d e s t . w i d t h ( ) ) ;          
         v a r   p   =   s r c . p o s i t i o n ( ) ;  
         d e s t . o f f s e t ( {   t o p :   p . t o p ,   l e f t :   p . l e f t   } ) ;  
          
 	 $ ( w i n d o w ) . r e s i z e ( f u n c t i o n ( )   {  
 	     s e t O v e r E L 0 ( f r I d ,   t o I d ) ;  
 	 } ) ;  
 } 
