ÿþ/ /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 / /   T a t   c a   c a c   J S     v t c n e w s    
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 v a r   p a g e U R L   =   ' h t t p : / / v t c . v n / ' ;  
 f u n c t i o n   S e a r c h O n F o c u s ( f i e l d )   {  
         i f   ( f i e l d . v a l u e   = =   ' T ë  k h ó a   t ì m   k i ¿m ' )   {   f i e l d . v a l u e   =   ' ' ;   }  
 }  
  
 f u n c t i o n   S e a r c h O n B l u r ( f i e l d )   {  
         i f   ( f i e l d . v a l u e   = =   ' ' )   {   f i e l d . v a l u e   =   ' T ë  k h ó a   t ì m   k i ¿m ' ;   }  
 }  
  
 f u n c t i o n   k e y C a t c h ( e ,   u r l ,   t x t )   {  
         i f   ( w i n d o w . e v e n t   & &   w i n d o w . e v e n t . k e y C o d e   = =   " 1 3 " )  
                 g o S e a r c h ( u r l ,   t x t ) ;  
         e l s e   i f   ( e . w h i c h )   {  
                 i f   ( e . w h i c h   = =   1 3 )  
                         g o S e a r c h ( u r l ,   t x t ) ;  
         }  
 }  
 f u n c t i o n   g o S e a r c h ( u r l ,   t x t )   {  
         v a r   t e x t s e a r c h   =   d o c u m e n t . g e t E l e m e n t B y I d ( t x t ) . v a l u e ;  
         w i n d o w . l o c a t i o n . h r e f   =   u r l   +   t e x t s e a r c h   +   ' / i n d e x . h t m ' ;  
 }  
  
 f u n c t i o n   w r i t e L a y e r ( l a y e r I D ,   t x t )   {  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d )   {  
                 d o c u m e n t . g e t E l e m e n t B y I d ( l a y e r I D ) . i n n e r H T M L   =   t x t ;  
         }   e l s e   i f   ( d o c u m e n t . a l l )   {  
                 d o c u m e n t . a l l [ l a y e r I D ] . i n n e r H T M L   =   t x t ;  
         }   e l s e   i f   ( d o c u m e n t . l a y e r s )   {  
                 w i t h   ( d o c u m e n t . l a y e r s [ l a y e r I D ] . d o c u m e n t )   {  
                         o p e n ( ) ;  
                         w r i t e ( t x t ) ;  
                         c l o s e ( ) ;  
                 }  
         }  
 }  
  
 f u n c t i o n   g e t L a y e r ( l a y e r I D )   {  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d )   {  
                 r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( l a y e r I D ) . i n n e r H T M L ;  
         }   e l s e   i f   ( d o c u m e n t . a l l )   {  
                 r e t u r n   d o c u m e n t . a l l [ l a y e r I D ] . i n n e r H T M L   =   t x t ;  
         }  
 }  
  
 f u n c t i o n   m a k e B i g e r F o n t ( l a y e r I D )   {  
         v a r   t m p S t r   =   " " ;  
         t m p S t r   =   g e t L a y e r ( l a y e r I D ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / s i z e = \ " 2 \ " / g ,   " s i z e = 3 " ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / s i z e = 2 / g ,   " s i z e = 3 " ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / F O N T - S I Z E :   1 0 p t / g ,   " F O N T - S I Z E :   1 2 p t " ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / f o n t - s i z e :   1 0 p t / g ,   " f o n t - s i z e :   1 2 p t " ) ;  
         w r i t e L a y e r ( l a y e r I D ,   t m p S t r ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( l a y e r I D ) . s t y l e . f o n t S i z e   =   " 1 2 p t " ;  
 }  
  
 f u n c t i o n   s e t B i g e r F o n t ( l a y e r I D )   {  
         m a k e B i g e r F o n t ( l a y e r I D ) ;  
         c r e a t e C o o k i e ( " f o n t S i z e " ,   3 ,   3 0 ) ;  
 }  
 f u n c t i o n   m a k e S m a l l e r F o n t ( l a y e r I D )   {  
         v a r   t m p S t r   =   " " ;  
         t m p S t r   =   g e t L a y e r ( l a y e r I D ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / s i z e = \ " 3 \ " / g ,   " s i z e = 2 " ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / s i z e = 3 / g ,   " s i z e = 2 " ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / F O N T - S I Z E :   1 2 p t / g ,   " F O N T - S I Z E :   1 0 p t " ) ;  
         t m p S t r   =   t m p S t r . r e p l a c e ( / f o n t - s i z e :   1 2 p t / g ,   " f o n t - s i z e :   1 0 p t " ) ;  
         w r i t e L a y e r ( l a y e r I D ,   t m p S t r ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( l a y e r I D ) . s t y l e . f o n t S i z e   =   " 1 0 p t " ;  
 }  
 f u n c t i o n   s e t S m a l l e r F o n t ( l a y e r I D )   {  
         m a k e S m a l l e r F o n t ( l a y e r I D ) ;  
         c r e a t e C o o k i e ( " f o n t S i z e " ,   2 ,   3 0 ) ;  
 }  
  
 f u n c t i o n   c r e a t e C o o k i e ( n a m e ,   v a l u e ,   d a y s )   {  
         i f   ( d a y s )   {  
                 v a r   d a t e   =   n e w   D a t e ( ) ;  
                 d a t e . s e t T i m e ( d a t e . g e t T i m e ( )   +   ( d a y s   *   2 4   *   6 0   *   6 0   *   1 0 0 0 ) ) ;  
                 v a r   e x p i r e s   =   " ;   e x p i r e s = "   +   d a t e . t o G M T S t r i n g ( ) ;  
         }  
         e l s e   v a r   e x p i r e s   =   " " ;  
         d o c u m e n t . c o o k i e   =   n a m e   +   " = "   +   v a l u e   +   e x p i r e s   +   " ; d o m a i n = . v t c . v n ;   p a t h = / " ;  
 }  
  
 f u n c t i o n   r e a d C o o k i e ( n a m e )   {  
         v a r   n a m e E Q   =   n a m e   +   " = " ;  
         v a r   c a   =   d o c u m e n t . c o o k i e . s p l i t ( ' ; ' ) ;  
         f o r   ( v a r   i   =   0 ;   i   <   c a . l e n g t h ;   i + + )   {  
                 v a r   c   =   c a [ i ] ;  
                 w h i l e   ( c . c h a r A t ( 0 )   = =   '   ' )   c   =   c . s u b s t r i n g ( 1 ,   c . l e n g t h ) ;  
                 i f   ( c . i n d e x O f ( n a m e E Q )   = =   0 )   r e t u r n   c . s u b s t r i n g ( n a m e E Q . l e n g t h ,   c . l e n g t h ) ;  
         }  
         r e t u r n   n u l l ;  
 }  
  
 f u n c t i o n   e r a s e C o o k i e ( n a m e )   {  
         c r e a t e C o o k i e ( n a m e ,   " " ,   - 1 ) ;  
 }  
  
 / / a d v  
 f u n c t i o n   s e t A d v ( i m g O b j ,   l i n k O b j ,   i m g A d v ,   l i n k A d v )   {  
         d o c u m e n t . g e t E l e m e n t B y I d ( i m g O b j ) . s r c   =   i m g A d v ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( l i n k O b j ) . h r e f   =   l i n k A d v ;  
 }  
  
 f u n c t i o n   s h a r e A d v ( i m g O b j ,   l i n k O b j ,   a r r a y A d v ,   m a x S t e p ,   c u r r )   {  
         i f   ( c u r r   = =   m a x S t e p )   {   c u r r   =   0 ;   }  
         c u r r   =   c u r r   +   1 ;  
         s e t A d v ( i m g O b j ,   l i n k O b j ,   a r r a y A d v [ c u r r ] [ 1 ] ,   a r r a y A d v [ c u r r ] [ 0 ] ) ;  
  
         / / s e t T i m e o u t ( " s h a r e A d v ( ' " + i m g O b j + " ' , ' " + l i n k O b j + " ' , a r r a y A d v , m a x S t e p , c u r r ) " , 3 6 0 0 ) ;  
 }  
  
 / /   L o a d   a l l   c a t e s   f o r   H o m e P a g e  
 f u n c t i o n   l o a d C a t e H o m e P a g e ( c a t e H o m e U r l )   {  
         $ . a j a x ( {  
                 u r l :   c a t e H o m e U r l ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   5 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   c a t e N a m e   =   ' c a t e X M L ' ;  
                                 v a r   c a t e I D   =   $ ( t h i s ) . f i n d ( ' C a t e I D ' ) . t e x t ( ) ;  
                                 c a t e N a m e   + =   c a t e I D ;  
  
                                 v a r   c a t e T i t l e   =   $ ( t h i s ) . f i n d ( ' C a t e T i l e ' ) . t e x t ( ) ;  
                                 v a r   c a t e L i n k   =   $ ( t h i s ) . f i n d ( ' C a t e L i n k ' ) . t e x t ( ) ;  
  
                                 v a r   c o n t e n t C a t e ;  
                                 c o n t e n t C a t e   =   ' < d i v   c l a s s = " c a t e T i t l e D i v " > < a   h r e f = " '   +   c a t e L i n k   +   ' "   c l a s s = " t i t l e b a i " > '   +   c a t e T i t l e   +   ' < / a > < / d i v > '  
  
                                 / /   S u b   c a t e  
                                 v a r   s u b C a t e C o n t e n t   =   ' < d i v   c l a s s = " s u p _ m n n h o   c a t e S u b " > ' ;  
                                 v a r   l e n S u b C a t e s   =   $ ( t h i s ) . f i n d ( ' C h i l d C a t e ' ) . s i z e ( ) ;  
                                 v a r   i n d e x   =   0 ;  
  
                                 $ ( t h i s ) . f i n d ( ' C h i l d C a t e ' ) . e a c h ( f u n c t i o n ( )   {  
                                         i n d e x + + ;  
                                         v a r   s u b C a t e N a m e   =   $ ( t h i s ) . f i n d ( ' C h i l d C a t e T i t l e ' ) . t e x t ( ) ;  
                                         v a r   s u b C a t e L i n k   =   $ ( t h i s ) . f i n d ( ' C h i l d C a t e L i n k ' ) . t e x t ( ) ;  
  
                                         s u b C a t e C o n t e n t   + =   ' < a   h r e f = " '   +   s u b C a t e L i n k   +   ' "   c l a s s = " s u p _ m n n h o " > '   +   s u b C a t e N a m e   +   ' < / a > ' ;  
                                         i f   ( i n d e x   <   l e n S u b C a t e s )   {  
                                                 s u b C a t e C o n t e n t   + =   ' & n b s p ; | & n b s p ; ' ;  
                                         }  
                                 } ) ;  
  
                                 s u b C a t e C o n t e n t   + =   ' < / d i v > ' ;  
  
                                 / /   A d d   s u b c a t e s   c o n t e n t  
                                 c o n t e n t C a t e   + =   s u b C a t e C o n t e n t ;  
  
                                 / /   T o p   n e w s   o f   C a t e  
                                 v a r   t o p C a t e C o n t e n t   =   ' < d i v > ' ;  
  
                                 v a r   i m g U r l   =   $ ( t h i s ) . f i n d ( ' I m a g e U r l ' ) . t e x t ( ) ;  
                                 v a r   a r t i c l e L i n k   =   $ ( t h i s ) . f i n d ( ' L i n k ' ) . t e x t ( ) ;  
                                 v a r   a r t i c l e T i t l e   =   $ ( t h i s ) . f i n d ( ' T i t l e ' ) . t e x t ( ) ;  
                                 v a r   a r t i c l e M o b i l e C o n t e n t   =   $ ( t h i s ) . f i n d ( ' M o b i l e C o n t e n t ' ) . t e x t ( ) ;  
  
                                 i f   ( $ . t r i m ( i m g U r l ) . l e n g t h   >   0 )   {  
                                         i f   ( ( c a t e I D   = =   4 3 2 )   | |   ( c a t e I D   = =   4 3 3 ) )   {  
                                                 t o p C a t e C o n t e n t   + =   ' < a   h r e f = " '   +   a r t i c l e L i n k   +   ' " > < i m g   c l a s s = " c a t e I m g T T 2 4 h "   s r c = " '   +   i m g U r l   +   ' " > < / a > ' ;  
                                         }  
                                         e l s e   {  
                                                 t o p C a t e C o n t e n t   + =   ' < a   h r e f = " '   +   a r t i c l e L i n k   +   ' " > < i m g   c l a s s = " c a t e I m g "   s r c = " '   +   i m g U r l   +   ' " > < / a > ' ;  
                                         }  
                                 }  
                                 t o p C a t e C o n t e n t   + =   ' < p   s t y l e = " m a r g i n - b o t t o m : 1 0 p x ; m a r g i n - t o p : 0 p x ; " > < a   h r e f = " '   +   a r t i c l e L i n k   +   ' "   c l a s s = " t i t l e _ n h o " > '   +   a r t i c l e T i t l e   +   ' < / a > < / p > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < s p a n   c l a s s = " t e x t " > '   +   a r t i c l e M o b i l e C o n t e n t   +   ' < / s p a n > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < / d i v > ' ;  
  
                                 / /   A d d   t o p   n e w s   o f   C a t e  
                                 c o n t e n t C a t e   + =   t o p C a t e C o n t e n t ;  
  
                                 / /   O t h e r   n e w s   o f   C a t e  
                                 v a r   o t h e r N e w s C o n t e n t   =   ' < d i v   s t y l e = " w i d t h : 1 0 0 % ;   f l o a t : l e f t ;   p a d d i n g - t o p : 5 p x ; " > ' ;  
  
                                 $ ( t h i s ) . f i n d ( ' O t h e r N e w ' ) . e a c h ( f u n c t i o n ( )   {  
                                         v a r   o t h e r I D   =   $ ( t h i s ) . f i n d ( ' O t h e r I D ' ) . t e x t ( ) ;  
                                         v a r   o t h e r L i n k   =   $ ( t h i s ) . f i n d ( ' O t h e r L i n k ' ) . t e x t ( ) ;  
                                         v a r   o t h e r T i t l e   =   $ ( t h i s ) . f i n d ( ' O t h e r T i t l e ' ) . t e x t ( ) ;  
                                         v a r   o t h e r I m g U r l   =   $ ( t h i s ) . f i n d ( ' O t h e r I m a g e U r l ' ) . t e x t ( ) ;  
                                         v a r   o t h e r L e a d   =   $ ( t h i s ) . f i n d ( ' O t h e r L e a d ' ) . t e x t ( ) ;  
  
                                         o t h e r N e w s C o n t e n t   + =   ' < d i v   c l a s s = " c a t e O t h e r s " > < a   i d = " # c a t e '   +   o t h e r I D   +   ' "   h r e f = " '   +   o t h e r L i n k   +   ' "   c l a s s = " d a d u a " > '   +   o t h e r T i t l e   +   ' < / a > < / d i v > ' ;  
                                         o t h e r N e w s C o n t e n t   + =   ' < d i v   i d = " c a t e '   +   o t h e r I D   +   ' "   s t y l e = " d i s p l a y : n o n e ; " > < i m g   s r c = " '   +   o t h e r I m g U r l   +   ' "   s t y l e = " f l o a t : l e f t ; w i d t h : 1 0 0 p x ;   b o r d e r : 1 p x   s o l i d   # 0 0 0 ;   m a r g i n - r i g h t : 5 p x ; " / > '   +   o t h e r L e a d   +   ' < / d i v > ' ;  
                                 } ) ;  
                                 o t h e r N e w s C o n t e n t   + =   ' < / d i v > ' ;  
  
                                 / /   A d d   o t h e r   n e w s  
                                 c o n t e n t C a t e   + =   o t h e r N e w s C o n t e n t ;  
  
                                 / /   A d d   a l l   o f   c o n t e n t  
                                 $ ( ' # '   +   c a t e N a m e ) . a p p e n d ( c o n t e n t C a t e ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 / /   L o a d   a l l   c a t e s   f o r   H o m e P a g e  
 f u n c t i o n   l o a d G a m e C a t e H o m e P a g e ( c a t e H o m e U r l )   {  
         $ . a j a x ( {  
                 u r l :   c a t e H o m e U r l ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   5 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   c a t e N a m e   =   ' c a t e X M L ' ;  
                                 v a r   c a t e I D   =   $ ( t h i s ) . f i n d ( ' C a t e I D ' ) . t e x t ( ) ;  
                                 c a t e N a m e   + =   c a t e I D ;  
  
                                 v a r   c a t e T i t l e   =   $ ( t h i s ) . f i n d ( ' C a t e T i l e ' ) . t e x t ( ) ;  
                                 v a r   c a t e L i n k   =   $ ( t h i s ) . f i n d ( ' C a t e L i n k ' ) . t e x t ( ) ;  
  
                                 v a r   c o n t e n t C a t e ;  
  
  
                                 c o n t e n t C a t e   =   ' < d i v   s t y l e = " c l e a r :   b o t h ;   b a c k g r o u n d - c o l o r :   r g b ( 3 3 ,   3 2 ,   3 3 ) ;   p a d d i n g - b o t t o m :   1 0 p x ; " > < d i v   s t y l e = " b a c k g r o u n d : u r l ( / i m a g e s / g a m e / b g _ c a t e . j p g )   n o - r e p e a t ;   w i d t h : 1 4 9 p x ; h e i g h t : 2 9 p x ;   f l o a t : l e f t ;   p a d d i n g - b o t t o m : 1 0 p x ; " > < d i v   c l a s s = " t e x t c a t e   t e x t c a t e _ p a d " > < a   h r e f = " '   +   c a t e L i n k   +   ' " > '   +   c a t e T i t l e   +   ' < / a > < / d i v > < / d i v > '  
  
                                 / /   S u b   c a t e  
                                 v a r   s u b C a t e C o n t e n t   =   ' < d i v   c l a s s = " b g S u b " > < / d i v > < a   h r e f = " '   +   c a t e L i n k   +   ' " > < i m g   s r c = " / i m a g e s / g a m e / x e m t i e p . j p g "   s t y l e = " f l o a t : r i g h t ; " / > < / a > ' ;  
                                 / /                                   v a r   l e n S u b C a t e s   =   $ ( t h i s ) . f i n d ( ' C h i l d C a t e ' ) . s i z e ( ) ;  
                                 / /                                   v a r   i n d e x   =   0 ;  
                                 / /                                    
                                 / /                                   $ ( t h i s ) . f i n d ( ' C h i l d C a t e ' ) . e a c h ( f u n c t i o n ( ) {  
                                 / /                                         i n d e x   + + ;  
                                 / /                                         v a r   s u b C a t e N a m e   =   $ ( t h i s ) . f i n d ( ' C h i l d C a t e T i t l e ' ) . t e x t ( ) ;  
                                 / /                                         v a r   s u b C a t e L i n k   =   $ ( t h i s ) . f i n d ( ' C h i l d C a t e L i n k ' ) . t e x t ( ) ;  
                                 / /                                          
                                 / /                                         s u b C a t e C o n t e n t   + =   ' < a   h r e f = " '   +   s u b C a t e L i n k   +   ' " > '   +   s u b C a t e N a m e   +   ' < / a > ' ;  
                                 / /                                         i f   ( i n d e x   <   l e n S u b C a t e s )  
                                 / /                                         {  
                                 / /                                                 s u b C a t e C o n t e n t   + =   ' & n b s p ; | & n b s p ; ' ;  
                                 / /                                         }  
                                 / /                                   } ) ;  
  
                                 / /                                   s u b C a t e C o n t e n t   + =   ' < / d i v > ' ;  
  
                                 / /   A d d   s u b c a t e s   c o n t e n t  
                                 c o n t e n t C a t e   + =   s u b C a t e C o n t e n t ;  
  
                                 / /   T o p   n e w s   o f   C a t e  
                                 v a r   t o p C a t e C o n t e n t   =   ' ' ;  
  
                                 v a r   i m g U r l   =   $ ( t h i s ) . f i n d ( ' I m a g e U r l ' ) . t e x t ( ) ;  
                                 v a r   a r t i c l e L i n k   =   $ ( t h i s ) . f i n d ( ' L i n k ' ) . t e x t ( ) ;  
                                 v a r   a r t i c l e T i t l e   =   $ ( t h i s ) . f i n d ( ' T i t l e ' ) . t e x t ( ) ;  
                                 v a r   a r t i c l e M o b i l e C o n t e n t   =   $ ( t h i s ) . f i n d ( ' M o b i l e C o n t e n t ' ) . t e x t ( ) ;  
  
                                 t o p C a t e C o n t e n t   + =   ' < d i v   s t y l e = " p a d d i n g : 0 p x   1 2 p x ;   c l e a r : b o t h ; " > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < a   h r e f = " '   +   a r t i c l e L i n k   +   ' " > < i m g   s r c = " '   +   i m g U r l   +   ' "   c l a s s = " i m g t i n h o t "   h e i g h t = " 1 0 0 p x "   s t y l e = " f l o a t : l e f t ; " > < / a > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < d i v   c l a s s = " t e x t x a n h "   s t y l e = " f l o a t : l e f t ;   m a r g i n - l e f t : 2 0 p x ;   w i d t h : 5 0 0 p x ; " > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < a   h r e f = " '   +   a r t i c l e L i n k   +   ' " > '   +   a r t i c l e T i t l e   +   ' < / a > < / p > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < p   c l a s s = " t e x t n d " > '   +   a r t i c l e M o b i l e C o n t e n t   +   ' < / p > ' ;  
                                 t o p C a t e C o n t e n t   + =   ' < / d i v > < / d i v > ' ;  
  
                                 / /   A d d   t o p   n e w s   o f   C a t e  
                                 c o n t e n t C a t e   + =   t o p C a t e C o n t e n t ;  
  
                                 / /   O t h e r   n e w s   o f   C a t e  
                                 v a r   o t h e r N e w s C o n t e n t   =   ' < d i v   s t y l e = " c l e a r : b o t h ; " > < d i v     c l a s s = " t i n k h a c " > < u l > ' ;  
  
                                 $ ( t h i s ) . f i n d ( ' O t h e r N e w ' ) . e a c h ( f u n c t i o n ( )   {  
                                         v a r   o t h e r I D   =   $ ( t h i s ) . f i n d ( ' O t h e r I D ' ) . t e x t ( ) ;  
                                         v a r   o t h e r L i n k   =   $ ( t h i s ) . f i n d ( ' O t h e r L i n k ' ) . t e x t ( ) ;  
                                         v a r   o t h e r T i t l e   =   $ ( t h i s ) . f i n d ( ' O t h e r T i t l e ' ) . t e x t ( ) ;  
                                         v a r   o t h e r I m g U r l   =   $ ( t h i s ) . f i n d ( ' O t h e r I m a g e U r l ' ) . t e x t ( ) ;  
                                         v a r   o t h e r L e a d   =   $ ( t h i s ) . f i n d ( ' O t h e r L e a d ' ) . t e x t ( ) ;  
  
                                         o t h e r N e w s C o n t e n t   + =   ' < l i > < a   h r e f = " '   +   o t h e r L i n k   +   ' " > '   +   o t h e r T i t l e   +   ' < / a > < / l i > ' ;  
                                 } ) ;  
                                 o t h e r N e w s C o n t e n t   + =   ' < / u l > < / d i v > < / d i v > ' ;  
  
                                 / /   A d d   o t h e r   n e w s  
                                 c o n t e n t C a t e   + =   o t h e r N e w s C o n t e n t ;  
  
  
                                 / /   A d d   a l l   o f   c o n t e n t  
                                 $ ( ' # '   +   c a t e N a m e ) . a p p e n d ( c o n t e n t C a t e ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 / / l o a d   A j a x  
 f u n c t i o n   l o a d T o p 3 ( )   {  
         $ . a j a x ( {  
                 u r l :   ' / X M L F i l e / f o c u s n e w s . x m l ' ,  
                 t y p e :   ' G E T ' ,  
                 d a t a T y p e :   ' x m l ' ,  
                 c a c h e :   f a l s e ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         v a r   i   =   0 ;  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 i + + ;  
                                 / /   C h i   h i e n   t h i   3   N e w s T o p   d a u  
                                 i f   ( i   <   4 )   {  
                                         v a r   l i n k   =   $ ( t h i s ) . f i n d ( ' L i n k ' ) . t e x t ( ) ;  
                                         v a r   l e a d   =   $ ( t h i s ) . f i n d ( ' L e a d ' ) . t e x t ( ) ;  
                                         v a r   t i t l e   =   $ ( t h i s ) . f i n d ( ' T i t l e ' ) . t e x t ( ) ;  
                                         v a r   i m a g e U r l   =   $ ( t h i s ) . f i n d ( ' I m a g e U r l ' ) . t e x t ( ) ;  
  
                                         v a r   c o n t e n t   =   ' ' ;  
                                         c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : l e f t ;   w i d t h : 1 0 0 % ;   m a r g i n - b o t t o m :   5 p x ; "   a l i g n = " l e f t " > < a   h r e f = " '   +   l i n k   +   ' "   c l a s s = " t i t l e _ n h o _ t o p 3 " > '   +   t i t l e   +   ' < / a > < / d i v > ' ;  
                                         c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : l e f t ;   w i d t h :   1 0 0 % ; " > ' ;  
                                         c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : l e f t ;   w i d t h : 6 2 % ; "   c l a s s = " t e x t " > '   +   l e a d   +   ' < / d i v > ' ;  
                                         c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : r i g h t ;   w i d t h : 3 4 % ; " > < a   h r e f = " '   +   l i n k   +   ' " > < i m g   s r c = " '   +   i m a g e U r l   +   ' "   c l a s s = " i m g T o p 4 " > < / a > < / d i v > ' ;  
                                         c o n t e n t   + =   ' < / d i v > ' ;  
  
                                         $ ( ' < d i v   s t y l e = " w i d t h :   1 0 0 % ; "   a l i g n = " l e f t " > < / d i v > ' )  
                                                   . h t m l ( c o n t e n t )  
                                                   . a p p e n d T o ( ' # t o p 3 ' ) ;  
  
                                         $ ( ' < d i v   s t y l e = " f l o a t : l e f t ; w i d t h : 1 0 0 % ; " > < / d i v > ' )  
                                                 . h t m l ( ' < h r   s i z e = " 1 "   c o l o r = " # c c c c c c " / > ' )  
                                                 . a p p e n d T o ( ' # t o p 3 ' ) ;  
                                 }  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d T o p 4 ( )   {  
         $ . a j a x ( {  
                 u r l :   ' / X M L F i l e / f o c u s n e w s . x m l ' ,  
                 t y p e :   ' G E T ' ,  
                 d a t a T y p e :   ' x m l ' ,  
                 c a c h e :   f a l s e ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   l i n k   =   $ ( t h i s ) . f i n d ( ' L i n k ' ) . t e x t ( ) ;  
                                 v a r   l e a d   =   $ ( t h i s ) . f i n d ( ' L e a d ' ) . t e x t ( ) ;  
                                 v a r   t i t l e   =   $ ( t h i s ) . f i n d ( ' T i t l e ' ) . t e x t ( ) ;  
                                 v a r   i m a g e U r l   =   $ ( t h i s ) . f i n d ( ' I m a g e U r l ' ) . t e x t ( ) ;  
  
                                 v a r   c o n t e n t   =   ' ' ;  
                                 c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : l e f t ;   w i d t h : 1 0 0 % ;   m a r g i n - b o t t o m :   5 p x ; "   a l i g n = " l e f t " > < a   h r e f = " '   +   l i n k   +   ' "   c l a s s = " t i t l e _ n h o " > '   +   t i t l e   +   ' < / a > < / d i v > ' ;  
                                 c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : l e f t ;   w i d t h :   1 0 0 % ; " > ' ;  
                                 c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : l e f t ;   w i d t h : 6 2 % ; "   c l a s s = " t e x t " > '   +   l e a d   +   ' < / d i v > ' ;  
                                 c o n t e n t   + =   ' < d i v   s t y l e = " f l o a t : r i g h t ;   w i d t h : 3 4 % ; " > < a   h r e f = " '   +   l i n k   +   ' " > < i m g   s r c = " '   +   i m a g e U r l   +   ' "   c l a s s = " i m g T o p 4 " > < / a > < / d i v > ' ;  
                                 c o n t e n t   + =   ' < / d i v > ' ;  
  
                                 $ ( ' < d i v   s t y l e = " w i d t h :   1 0 0 % ; "   a l i g n = " l e f t " > < / d i v > ' )  
                                           . h t m l ( c o n t e n t )  
                                           . a p p e n d T o ( ' # t o p 4 ' ) ;  
  
                                 $ ( ' < d i v   s t y l e = " f l o a t : l e f t ; w i d t h : 1 0 0 % ; " > < / d i v > ' )  
                                         . h t m l ( ' < h r   s i z e = " 1 "   c o l o r = " # c c c c c c " / > ' )  
                                         . a p p e n d T o ( ' # t o p 4 ' ) ;  
  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d H o t N e w s ( )   {  
         $ . a j a x ( {  
                 u r l :   ' / X M L F i l e / h o t n e w s . x m l ' ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   l i n k   =   $ ( t h i s ) . f i n d ( ' L i n k ' ) . t e x t ( ) ;  
                                 v a r   l e a d   =   $ ( t h i s ) . f i n d ( ' L e a d ' ) . t e x t ( ) ;  
                                 v a r   t i t l e   =   $ ( t h i s ) . f i n d ( ' T i t l e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < l i > < / l i > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   l i n k   +   ' "   t i t l e = " '   +   l e a d   +   ' "   c l a s s = " t i n n o n g " > '   +   t i t l e   +   ' < / a > ' )  
                                           . a p p e n d T o ( ' . l i s t H o t N e w   u l ' ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d L e f t A d v ( )   {  
         $ . a j a x ( {  
                 u r l :   ' / X M L F i l e / a d v l e f t . x m l ' ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < l i > < / l i > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " 1 3 9 "   c l a s s = " l e f t A d v I m g " > < / a > ' )  
                                           . a p p e n d T o ( ' # A d v L e f t   d i v   u l ' ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d R i g h t A d v ( )   {  
         $ . a j a x ( {  
                 u r l :   ' / X M L F i l e / a d v r i g h t . x m l ' ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < l i > < / l i > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " 2 4 7 "   c l a s s = " r i g h t A d v I m g " > < / a > ' )  
                                           . a p p e n d T o ( ' # A d v R i g h t   d i v   u l ' ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
  
 f u n c t i o n   l o a d R i g h t A d v T o p ( )   {  
         $ . a j a x ( {  
                 u r l :   ' / X M L F i l e / a d v r i g h t t o p . x m l ' ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < d i v   s t y l e = " p a d d i n g - b o t t o m : 4 p x "   v a l i g n = " t o p " > < / d i v > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " 2 4 7 "   c l a s s = " r i g h t A d v I m g " > < / a > ' )  
                                           . a p p e n d T o ( ' # A d v R i g h t T o p ' ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d S i d e A d v ( l o a d e r ,   x m l U r l ,   i m g W i d t h )   {  
         $ . a j a x ( {  
                 u r l :   x m l U r l ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < l i > < / l i > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " '   +   i m g W i d t h   +   ' "   c l a s s = " r i g h t A d v I m g " > < / a > ' )  
                                           . a p p e n d T o ( l o a d e r ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d M a i n A d v ( x m l U r l ,   d i v C o n t e n t )   {  
  
         $ . a j a x ( {  
                 u r l :   x m l U r l ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
                                 v a r   a d v T y p e   =   $ ( t h i s ) . f i n d ( ' a d v T y p e ' ) . t e x t ( ) ;  
                                 i f   ( a d v T y p e   = =   ' i m a g e ' )   {  
                                         $ ( ' < d i v > < / d i v > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " 7 1 0 "   h e i g h t = " 7 5 "   c l a s s = " r i g h t A d v I m g " > < / a > ' )  
                                           . a p p e n d T o ( d i v C o n t e n t ) ;  
                                 }  
                                 e l s e   {  
                                         v a r   f W i d t h   =   $ ( t h i s ) . f i n d ( ' a d v W i d t h ' ) . t e x t ( ) ;  
                                         v a r   f H e i g h t   =   $ ( t h i s ) . f i n d ( ' a d v H e i g h t ' ) . t e x t ( ) ;  
                                         $ ( ' < d i v > < / d i v > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < e m b e d   s r c = " '   +   a d v U r l   +   ' "   p l u g i n s p a g e = " h t t p : / / w w w . m a c r o m e d i a . c o m / g o / g e t f l a s h p l a y e r "   t y p e = " a p p l i c a t i o n / x - s h o c k w a v e - f l a s h "   w i d t h = " '   +   f W i d t h   +   ' "   h e i g h t = " '   +   f H e i g h t   +   ' "   q u a l i t y = " H i g h "   w m o d e = " t r a n s p a r e n t "   / > < / a > ' )  
                                           . a p p e n d T o ( d i v C o n t e n t ) ;  
                                 }  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d T o p M a i n A d v ( x m l U r l ,   d i v C o n t e n t )   {  
         $ . a j a x ( {  
                 u r l :   x m l U r l ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         v a r   i n d e x   =   0 ;  
                         v a r   d i v T o p C o n t e n t I n d e x ;  
  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 i n d e x   + =   1 ;  
                                 d i v T o p C o n t e n t I n d e x   =   d i v C o n t e n t   +   i n d e x . t o S t r i n g ( ) ;  
  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < d i v > < / d i v > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " 2 3 0 "   h e i g h t = " 6 0 "   c l a s s = " r i g h t A d v I m g " > < / a > ' )  
                                           . a p p e n d T o ( d i v T o p C o n t e n t I n d e x ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   l o a d A d v ( x m l U r l ,   d i v C o n t e n t ,   i m g W i d t h ,   i m g H e i g h t )   {  
         $ . a j a x ( {  
                 u r l :   x m l U r l ,  
                 t y p e :   ' G E T ' ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   ' x m l ' ,  
                 t i m e o u t :   3 0 0 0 ,  
                 s u c c e s s :   f u n c t i o n ( x m l )   {  
                         $ ( x m l ) . f i n d ( ' T a b l e ' ) . e a c h ( f u n c t i o n ( )   {  
                                 v a r   a d v U r l   =   $ ( t h i s ) . f i n d ( ' A d v U r l ' ) . t e x t ( ) ;  
                                 v a r   l o g o F i l e N a m e   =   $ ( t h i s ) . f i n d ( ' L o g o F i l e N a m e ' ) . t e x t ( ) ;  
  
                                 $ ( ' < d i v > < / d i v > ' )  
                                           . h t m l ( ' < a   h r e f = " '   +   a d v U r l   +   ' "   t a r g e t = " _ b l a n k " > < i m g   s r c = " '   +   l o g o F i l e N a m e   +   ' "   w i d t h = " '   +   i m g W i d t h   +   ' "   h e i g h t = " '   +   i m g H e i g h t   +   ' " > < / a > ' )  
                                           . a p p e n d T o ( d i v C o n t e n t ) ;  
                         } ) ;   / / c l o s e   e a c h (  
                 }  
         } ) ;  
 }  
  
 f u n c t i o n   m o v e D i v M a i n ( m o v e r ,   n u m ,   m o v e r H e i g h ,   m o v e T i m e r )   {  
         $ ( m o v e r ) . a n i m a t e ( {  
                 t o p :   ' + = '   +   m o v e r H e i g h  
         } ,   m o v e T i m e r ) ;  
         i f   ( $ ( m o v e r ) . p o s i t i o n ( ) . t o p   = =   - m o v e r H e i g h   *   ( n u m   -   1 ) )   {  
                 $ ( m o v e r ) . a n i m a t e ( {  
                         t o p :   ' + = '   +   m o v e r H e i g h  
                 } ,   m o v e T i m e r ) ;  
                 $ ( m o v e r ) . c s s ( " t o p " ,   - m o v e r H e i g h   *   ( 2   *   n u m   -   1 )   +   " p x " ) ;  
                 $ ( m o v e r ) . s t o p ( ) ;  
         }  
 }  
  
 f u n c t i o n   a n i m a t e D i v M a i n ( m o v e r ,   x m l U r l ,   m o v e r H e i g h t ,   m o v e T i m e ,   t o t a l D e l a y )   {  
         v a r   n u m   =   $ ( m o v e r   +   "   d i v " ) . l e n g t h ;  
         i f   ( n u m   >   1 )   {  
                 l o a d M a i n A d v ( x m l U r l ,   m o v e r ) ;  
                 $ ( m o v e r ) . c s s ( " t o p " ,   - m o v e r H e i g h t   *   ( 2   *   n u m   -   1 )   +   " p x " ) ;  
                 s e t I n t e r v a l ( " m o v e D i v M a i n ( ' "   +   m o v e r   +   " ' , "   +   n u m   +   " , "   +   m o v e r H e i g h t   +   " , "   +   m o v e T i m e   +   " ) " ,   t o t a l D e l a y ) ;  
         }  
 }  
  
 f u n c t i o n   a n i m a t e D i v ( m o v e r ,   x m l U r l ,   m o v e r H e i g h t ,   m o v e r W i d t h ,   m o v e T i m e ,   t o t a l D e l a y )   {  
         v a r   n u m   =   $ ( m o v e r   +   "   d i v " ) . l e n g t h ;  
         i f   ( n u m   >   1 )   {  
                 l o a d A d v ( x m l U r l ,   m o v e r ,   m o v e r W i d t h ,   m o v e r H e i g h t ) ;  
                 $ ( m o v e r ) . c s s ( " t o p " ,   - m o v e r H e i g h t   *   ( 2   *   n u m   -   1 )   +   " p x " ) ;  
                 s e t I n t e r v a l ( " m o v e D i v M a i n ( ' "   +   m o v e r   +   " ' , "   +   n u m   +   " , "   +   m o v e r H e i g h t   +   " , "   +   m o v e T i m e   +   " ) " ,   t o t a l D e l a y ) ;  
         }  
 }  
  
 f u n c t i o n   s l i d e S h o w P o p u p ( c a t n a m e ,   a r t i c l e i d ,   c u r r P a g e )   {  
  
         v a r   p o p W   =   8 0 0 ,   p o p H   =   8 0 0 ;  
  
         v a r   l e f t P o s   =   ( w i n d o w . s c r e e n . w i d t h   -   p o p W )   /   2 ,   t o p P o s   =   ( w i n d o w . s c r e e n . h e i g h t   -   p o p H )   /   2 ;  
         w i n d o w . o p e n ( c a t n a m e   +   ' / s l i d e - s h o w / '   +   a r t i c l e i d   +   ' / '   +   c u r r P a g e   +   ' / i n d e x . h t m ' ,   ' s l i d e s h o w p o p u p ' ,   ' w i d t h = '   +   p o p W   +   ' , h e i g h t = '   +   p o p H   +   ' , t o p = '   +   t o p P o s   +   ' , l e f t = '   +   l e f t P o s   +   ' , t o o l b a r = n o ' ) ;  
 }  
  
 f u n c t i o n   s h o w D i a l o g ( v L i n k ,   v W i d t h ,   v H e i g h t )   {  
         r e t u r n   s h o w W i n d o w ( v L i n k ,   f a l s e ,   t r u e ,   t r u e ,   f a l s e ,   f a l s e ,   f a l s e ,   f a l s e ,   t r u e ,   t r u e ,   v W i d t h ,   v H e i g h t ,   0 ,   0 ) ;  
 }  
 f u n c t i o n   s h o w M o d a l D i a l o g ( v L i n k ,   v W i d t h ,   v H e i g h t )   {  
         r e t u r n   s h o w W i n d o w ( v L i n k ,   f a l s e ,   f a l s e ,   f a l s e ,   f a l s e ,   f a l s e ,   f a l s e ,   f a l s e ,   t r u e ,   t r u e ,   v W i d t h ,   v H e i g h t ,   0 ,   0 ) ;  
 }  
  
 f u n c t i o n   s h o w W i n d o w ( v L i n k ,   v S t a t u s ,   v R e s i z e a b l e ,   v S c r o l l b a r s ,   v M e n u b a r ,   v T o o l b a r ,   v L o c a t i o n ,   v F u l l s c r e e n ,   v T i t l e b a r ,   v C e n t e r e d ,   v W i d t h ,   v H e i g h t ,   v T o p ,   v L e f t )   {  
         v a r   s L i n k   =   ( t y p e o f   ( v L i n k . h r e f )   = =   ' u n d e f i n e d ' )   ?   v L i n k   :   v L i n k . h r e f ;  
  
         w i n D e f   =   ' ' ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' s t a t u s = ' ) . c o n c a t ( ( v S t a t u s )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' r e s i z a b l e = ' ) . c o n c a t ( ( v R e s i z e a b l e )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' m e n u b a r = ' ) . c o n c a t ( ( v M e n u b a r )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' s c r o l l b a r s = ' ) . c o n c a t ( ( v S c r o l l b a r s )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' t o o l b a r = ' ) . c o n c a t ( ( v T o o l b a r )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' l o c a t i o n = ' ) . c o n c a t ( ( v L o c a t i o n )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' f u l l s c r e e n = ' ) . c o n c a t ( ( v F u l l s c r e e n )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' t i t l e b a r = ' ) . c o n c a t ( ( v T i t l e b a r )   ?   ' y e s '   :   ' n o ' ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' h e i g h t = ' ) . c o n c a t ( v H e i g h t ) . c o n c a t ( ' , ' ) ;  
         w i n D e f   =   w i n D e f . c o n c a t ( ' w i d t h = ' ) . c o n c a t ( v W i d t h ) . c o n c a t ( ' , ' ) ;  
  
         i f   ( v C e n t e r e d )   {  
                 w i n D e f   =   w i n D e f . c o n c a t ( ' t o p = ' ) . c o n c a t ( ( s c r e e n . h e i g h t   -   v H e i g h t )   /   2 ) . c o n c a t ( ' , ' ) ;  
                 w i n D e f   =   w i n D e f . c o n c a t ( ' l e f t = ' ) . c o n c a t ( ( s c r e e n . w i d t h   -   v W i d t h )   /   2 ) ;  
         }  
         e l s e   {  
                 w i n D e f   =   w i n D e f . c o n c a t ( ' t o p = ' ) . c o n c a t ( v T o p ) . c o n c a t ( ' , ' ) ;  
                 w i n D e f   =   w i n D e f . c o n c a t ( ' l e f t = ' ) . c o n c a t ( v L e f t ) ;  
         }  
  
         o p e n ( s L i n k ,   ' _ b l a n k ' ,   w i n D e f ) ;  
  
         i f   ( t y p e o f   ( v L i n k . h r e f )   ! =   ' u n d e f i n e d ' )   {  
                 r e t u r n   f a l s e ;  
         }  
 }  
 f u n c t i o n   s h a r e _ g o v n ( )   {   u   =   l o c a t i o n . h r e f ;   w i n d o w . o p e n ( " h t t p : / / m y . g o o n l i n e . v n / s h a r e . a s p x ? u r l = "   +   e n c o d e U R I C o m p o n e n t ( u ) ) ;   }  
 f u n c t i o n   s h a r e _ t w i t t e r ( )   {   u   =   l o c a t i o n . h r e f ;   t   =   d o c u m e n t . t i t l e ;   w i n d o w . o p e n ( " h t t p : / / t w i t t e r . c o m / h o m e ? s t a t u s = "   +   e n c o d e U R I C o m p o n e n t ( u ) ) ;   }  
 f u n c t i o n   s h a r e _ f a c e b o o k ( )   {   u   =   l o c a t i o n . h r e f ;   t   =   d o c u m e n t . t i t l e ;   w i n d o w . o p e n ( " h t t p : / / w w w . f a c e b o o k . c o m / s h a r e . p h p ? u = "   +   e n c o d e U R I C o m p o n e n t ( u )   +   " & t = "   +   e n c o d e U R I C o m p o n e n t ( t ) ) ;   }  
 f u n c t i o n   s h a r e _ g o o g l e ( )   {   u   =   l o c a t i o n . h r e f ;   t   =   d o c u m e n t . t i t l e ;   w i n d o w . o p e n ( " h t t p : / / w w w . g o o g l e . c o m / b o o k m a r k s / m a r k ? o p = e d i t & b k m k = "   +   e n c o d e U R I C o m p o n e n t ( u )   +   " & t i t l e = "   +   t   +   " & a n n o t a t i o n = "   +   t ) ;   }  
 f u n c t i o n   s h a r e _ b u z z ( )   {   u   =   l o c a t i o n . h r e f ;   t   =   d o c u m e n t . t i t l e ;   w i n d o w . o p e n ( " h t t p : / / b u z z . y a h o o . c o m / b u z z ? p u b l i s h e r u r n = D a n T r i & t a r g e t U r l = "   +   e n c o d e U R I C o m p o n e n t ( u ) ) ;   }  
  
 f u n c t i o n   I n p u t F o c u s ( t e x t d e f a u l t ,   c o n t r o l )   {  
         t e x t   =   c o n t r o l . v a l u e ;  
         i f   ( t e x t   = =   t e x t d e f a u l t )   c o n t r o l . v a l u e   =   " " ;  
 }  
 f u n c t i o n   I n p u t B l u r ( t e x t d e f a u l t ,   c o n t r o l )   {  
         t e x t   =   c o n t r o l . v a l u e ;  
         i f   ( t e x t   = =   " " )   c o n t r o l . v a l u e   =   t e x t d e f a u l t ;  
 }  
  
 f u n c t i o n   s h o w h i d e C o m m e n t ( )   {  
         $ ( ' # b o x C o m m e n t ' ) . t o g g l e ( ) ;  
 }  
  
 f u n c t i o n   c l e a r i t ( )   {  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t T i t l e ' ) . v a l u e   =   " T i ê u   Á" ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t N a m e ' ) . v a l u e   =   " H Í  t ê n " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t E m a i l ' ) . v a l u e   =   " E m a i 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 l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t A d d r e s s ' ) . v a l u e   =   " Ëa   c h É" ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t P h o n e ' ) . v a l u e   =   " i Çn   t h o ¡i " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t C o n t e n t ' ) . v a l u e   =   " N Ùi   d u n g " ;  
 }  
  
 f u n c t i o n   v a l i d a t e ( )   {  
         v a r   t 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 t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t T i t l e ' ) ;  
         v a r   i   =   0 ;  
  
         i f   ( t x t . v a l u e   = =   ' '   | |   t x t . v a l u e   = =   ' T i ê u   Á' )   {  
                 a l e r t ( " B ¡n   c h °a   n h ­p   t i ê u   Á" ) ;  
                 r e t u r n   f a l s e ;  
         }  
  
         t 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 t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t N a m e ' ) ;  
         i f   ( t x t . v a l u e   = =   ' '   | |   t x t . v a l u e   = =   ' H Í  t ê n ' )   {  
                 a l e r t ( " B ¡n   c h °a   n h ­p   h Í  t ê n " ) ;  
                 r e t u r n   f a l s e ;  
         }  
  
         t 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 t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t E m a i l ' ) ;  
         i f   ( t x t . v a l u e   ! =   ' '   & &   t x t . v a l u e   ! =   ' E m a i l ' )   {  
                 i f   ( ! e c h e c k ( t x t . v a l u e ) )   {  
                         a l e r t ( " E m a i l   b ¡n   n h ­p   c h °a   c h í n h   x á c " ) ;  
                         r e t u r n   f a l s e ;  
                 }  
         }  
  
         t 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 t l 0 0 _ c t l 0 0 _ C o n t e n t P l a c e H o l d e r 1 _ C o n t e n t P l a c e H o l d e r 1 _ t x t C o n t e n t ' ) ;  
         i f   ( t x t . v a l u e   = =   ' '   | |   t x t . v a l u e   = =   ' N Ùi   d u n g ' )   {  
                 a l e r t ( " B ¡n   c h °a   n h ­p   n Ùi   d u n g " ) ;  
                 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   e c h e c k ( s t r )   {  
  
         v a r   a t   =   " @ "  
         v a r   d o t   =   " . "  
         v a r   l a t   =   s t r . i n d e x O f ( a t )  
         v a r   l s t r   =   s t r . l e n g t h  
         v a r   l d o t   =   s t r . i n d e x O f ( d o t )  
         i f   ( s t r . i n d e x O f ( a t )   = =   - 1 )   {  
                 / / 	 	       a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         i f   ( s t r . i n d e x O f ( a t )   = =   - 1   | |   s t r . i n d e x O f ( a t )   = =   0   | |   s t r . i n d e x O f ( a t )   = =   l s t r )   {  
                 / / 	 	       a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         i f   ( s t r . i n d e x O f ( d o t )   = =   - 1   | |   s t r . i n d e x O f ( d o t )   = =   0   | |   s t r . i n d e x O f ( d o t )   = =   l s t r )   {  
                 / / 	 	         a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         i f   ( s t r . i n d e x O f ( a t ,   ( l a t   +   1 ) )   ! =   - 1 )   {  
                 / / 	 	         a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         i f   ( s t r . s u b s t r i n g ( l a t   -   1 ,   l a t )   = =   d o t   | |   s t r . s u b s t r i n g ( l a t   +   1 ,   l a t   +   2 )   = =   d o t )   {  
                 / / 	 	         a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         i f   ( s t r . i n d e x O f ( d o t ,   ( l a t   +   2 ) )   = =   - 1 )   {  
                 / / 	 	         a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         i f   ( s t r . i n d e x O f ( "   " )   ! =   - 1 )   {  
                 / / 	 	         a l e r t ( " I n v a l i d   E - m a i l   I D " )  
                 r e t u r n   f a l s e  
         }  
  
         r e t u r n   t r u e  
 } 
