ÿþv a r   s e l e c t _ p o l l   =   0 ;  
 v a r   s e a r c h S t r i n g   =   " " ;  
  
 f u n c t i o n   c h a n g e _ v i d e o ( i d ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ v i d e o & i d = " + i d ,          
         / / d a t a T y p e :   " j s o n " ,  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 $ ( " # e m o V i d e o " ) . h t m l ( a r r R e s [ 0 ] ) ; 	 	 	 	  
 	 	 	 $ ( " # l i s t E m o " ) . h t m l ( a r r R e s [ 3 ] ) ; 	  
 	 	 	 $ ( " # p a s t _ i d " ) . v a l ( a r r R e s [ 2 ] ) ;  
                         i f   ( a r r R e s [ 1 ]   ! =   " " )  
                         {  
 	 	 	 	 / / $ ( ' . f e a t u r e _ f l a s h P l a y e r ' ) . h t m l ( ' < d i v   i d = " f e a t u r e _ f l a s h P l a y e r " > < / d i v > ' ) ;  
 	 	 	         / * v a r   m a i n V i d e o _ f l a s h v a r s   =   {   v i d e o _ u r l : " . . / "   +   a r r R e s [ 1 ] ,   a u t o _ p l a y : " 1 "   } ;  
 	 	 	 	 s w f o b j e c t . e m b e d S W F ( " s w f / V i d e o P l a y e r _ v 0 3 . s w f " ,   " f e a t u r e _ f l a s h P l a y e r " ,   " 4 8 0 " ,   " 3 1 2 " ,   " 9 . 0 . 0 " , " s w f / e x p r e s s I n s t a l l . s w f " ,   m a i n V i d e o _ f l a s h v a r s ,   m a i n V i d e o _ p a r a m s ,   m a i n V i d e o _ a t t r i b u t e s ) ; 	 * /  
 	 	 	 	 $ ( ' # f l a s h P l a y e r _ m o e m e n t ' ) . h t m l ( ' < o b j e c t   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 " > < p a r a m   n a m e = " m o v i e "   v a l u e = " s w f / V i d e o P l a y e r _ v 0 3 . s w f " > < / p a r a m > < p a r a m   n a m e = " a l l o w F u l l S c r e e n "   v a l u e = " t r u e " > < / p a r a m > < p a r a m   n a m e = " a l l o w s c r i p t a c c e s s "   v a l u e = " a l w a y s " > < / p a r a m > < p a r a m   n a m e = " a u t o _ p l a y "   v a l u e = " 1 " > < / p a r a m > < p a r a m   n a m e = " f l a s h v a r s "   v a l u e = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' "   / > < e m b e d   s r c = " s w f / V i d e o P l a y e r _ v 0 3 . s w f "   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 "   a l l o w s c r i p t a c c e s s = " a l w a y s "   a l l o w f u l l s c r e e n = " t r u e "   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 "   f l a s h v a r s = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' & a m p ; a u t o _ p l a y = 1 " > < / e m b e d > < / o b j e c t > ' ) ;  
 	 	 	 	 $ ( " # e m o L i n k " ) . a t t r ( " h r e f " ,   " v i d e o - d e t a i l . a s p x ? i d = " + a r r R e s [ 2 ] ) ;  
 	 	 	 }  
 	 	 	 C u f o n . r e p l a c e ( ' h 2 ,   . f o n t ' ) ;  
         }          
     } ) ; 	 	 	  
 	  
 }  
  
 f u n c t i o n   c h a n g e _ l i s t _ e m o _ v i d e o ( t y p e ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ l i s t _ e m o _ v i d e o & t y p e = " + t y p e ,          
         / / d a t a T y p e :   " j s o n " ,  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 $ ( " # e m o V i d e o " ) . h t m l ( a r r R e s [ 0 ] ) ; 	 	 	 	  
 	 	 	 $ ( " # l i s t E m o " ) . h t m l ( a r r R e s [ 3 ] ) ; 	  
 	 	 	 $ ( " # p a s t _ i d " ) . v a l ( a r r R e s [ 2 ] ) ;  
                         i f   ( a r r R e s [ 1 ]   ! =   " " )  
                         { 	 	 	 	  
 	 	 	 	 $ ( ' # f l a s h P l a y e r _ m o e m e n t ' ) . h t m l ( ' < o b j e c t   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 " > < p a r a m   n a m e = " m o v i e "   v a l u e = " s w f / V i d e o P l a y e r _ v 0 3 . s w f " > < / p a r a m > < p a r a m   n a m e = " a l l o w F u l l S c r e e n "   v a l u e = " t r u e " > < / p a r a m > < p a r a m   n a m e = " a l l o w s c r i p t a c c e s s "   v a l u e = " a l w a y s " > < / p a r a m > < p a r a m   n a m e = " a u t o _ p l a y "   v a l u e = " 1 " > < / p a r a m > < p a r a m   n a m e = " f l a s h v a r s "   v a l u e = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' "   / > < e m b e d   s r c = " s w f / V i d e o P l a y e r _ v 0 3 . s w f "   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 "   a l l o w s c r i p t a c c e s s = " a l w a y s "   a l l o w f u l l s c r e e n = " t r u e "   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 "   f l a s h v a r s = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' & a m p ; a u t o _ p l a y = 1 " > < / e m b e d > < / o b j e c t > ' ) ;  
 	 	 	 	 $ ( " # e m o L i n k " ) . a t t r ( " h r e f " ,   " v i d e o - d e t a i l . a s p x ? i d = " + a r r R e s [ 2 ] ) ;  
 	 	 	 }  
 	 	 	 C u f o n . r e p l a c e ( ' h 2 ,   . f o n t ' ) ;  
         }          
     } ) ; 	 	 	  
 	  
 }  
  
 f u n c t i o n   c h a n g e _ f u n _ v i d e o ( i d ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ f u n _ v i d e o & i d = " + i d ,          
         / / d a t a T y p e :   " j s o n " ,  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 $ ( " # f u n V i d e o " ) . h t m l ( a r r R e s [ 0 ] ) ;  
 	 	 	 $ ( " # l i s t F u n " ) . h t m l ( a r r R e s [ 3 ] ) ; 	  
 	 	 	 $ ( " # s p o t _ i d " ) . v a l ( a r r R e s [ 2 ] ) ; 	 	 	 	  
                         i f   ( a r r R e s [ 1 ]   ! =   " " )  
                         { 	 	 	 	  
 	 	 	 	 $ ( ' # f l a s h P l a y e r _ p s m o e m e n t ' ) . h t m l ( ' < o b j e c t   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 " > < p a r a m   n a m e = " m o v i e "   v a l u e = " s w f / V i d e o P l a y e r _ v 0 3 . s w f " > < / p a r a m > < p a r a m   n a m e = " a l l o w F u l l S c r e e n "   v a l u e = " t r u e " > < / p a r a m > < p a r a m   n a m e = " a l l o w s c r i p t a c c e s s "   v a l u e = " a l w a y s " > < / p a r a m > < p a r a m   n a m e = " a u t o _ p l a y "   v a l u e = " 1 " > < / p a r a m > < p a r a m   n a m e = " f l a s h v a r s "   v a l u e = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' "   / > < e m b e d   s r c = " s w f / V i d e o P l a y e r _ v 0 3 . s w f "   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 "   a l l o w s c r i p t a c c e s s = " a l w a y s "   a l l o w f u l l s c r e e n = " t r u e "   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 "   f l a s h v a r s = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' & a m p ; a u t o _ p l a y = 1 " > < / e m b e d > < / o b j e c t > ' ) ;  
 	 	 	 	 $ ( " # p s L i n k " ) . a t t r ( " h r e f " ,   " v i d e o - d e t a i l . a s p x ? i d = " + a r r R e s [ 2 ] ) ;  
 	 	 	 }  
 	 	 	 C u f o n . r e p l a c e ( ' h 2 ,   . f o n t ' ) ;  
         }          
     } ) ; 	 	 	  
 	  
 }  
  
 f u n c t i o n   c h a n g e _ l i s t _ f u n _ v i d e o ( t y p e ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ l i s t _ f u n _ v i d e o & t y p e = " + t y p e ,                  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 $ ( " # f u n V i d e o " ) . h t m l ( a r r R e s [ 0 ] ) ;  
 	 	 	 $ ( " # l i s t F u n " ) . h t m l ( a r r R e s [ 3 ] ) ; 	  
 	 	 	 $ ( " # s p o t _ i d " ) . v a l ( a r r R e s [ 2 ] ) ; 	 	 	 	 	  
                         i f   ( a r r R e s [ 1 ]   ! =   " " )  
                         { 	 	 	 	  
 	 	 	 	 $ ( ' # f l a s h P l a y e r _ p s m o e m e n t ' ) . h t m l ( ' < o b j e c t   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 " > < p a r a m   n a m e = " m o v i e "   v a l u e = " s w f / V i d e o P l a y e r _ v 0 3 . s w f " > < / p a r a m > < p a r a m   n a m e = " a l l o w F u l l S c r e e n "   v a l u e = " t r u e " > < / p a r a m > < p a r a m   n a m e = " a l l o w s c r i p t a c c e s s "   v a l u e = " a l w a y s " > < / p a r a m > < p a r a m   n a m e = " a u t o _ p l a y "   v a l u e = " 1 " > < / p a r a m > < p a r a m   n a m e = " f l a s h v a r s "   v a l u e = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' "   / > < e m b e d   s r c = " s w f / V i d e o P l a y e r _ v 0 3 . s w f "   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 "   a l l o w s c r i p t a c c e s s = " a l w a y s "   a l l o w f u l l s c r e e n = " t r u e "   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 "   f l a s h v a r s = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' & a m p ; a u t o _ p l a y = 1 " > < / e m b e d > < / o b j e c t > ' ) ;  
 	 	 	 	 $ ( " # p s L i n k " ) . a t t r ( " h r e f " ,   " v i d e o - d e t a i l . a s p x ? i d = " + a r r R e s [ 2 ] ) ;  
 	 	 	 }  
 	 	 	 C u f o n . r e p l a c e ( ' h 2 ,   . f o n t ' ) ;  
         }          
     } ) ; 	 	 	  
 	  
 }  
  
 f u n c t i o n   c h a n g e _ l i s t _ f u n _ v i d e o _ b e h i n d ( t y p e ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ l i s t _ f u n _ v i d e o & t y p e = " + t y p e ,                  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 $ ( " # f u n V i d e o " ) . h t m l ( a r r R e s [ 0 ] ) ;  
 	 	 	 $ ( " # l i s t F u n " ) . h t m l ( a r r R e s [ 3 ] ) ; 	  
 	 	 	 $ ( " # s p o t _ i d " ) . v a l ( a r r R e s [ 2 ] ) ; 	 	 	 	 	  
                         i f   ( a r r R e s [ 1 ]   ! =   " " )  
                         { 	 	 	 	  
 	 	 	 	 $ ( ' # f l a s h P l a y e r _ p s m o e m e n t ' ) . h t m l ( ' < o b j e c t   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 " > < p a r a m   n a m e = " m o v i e "   v a l u e = " s w f / V i d e o P l a y e r _ v 0 3 . s w f " > < / p a r a m > < p a r a m   n a m e = " a l l o w F u l l S c r e e n "   v a l u e = " t r u e " > < / p a r a m > < p a r a m   n a m e = " a l l o w s c r i p t a c c e s s "   v a l u e = " a l w a y s " > < / p a r a m > < p a r a m   n a m e = " a u t o _ p l a y "   v a l u e = " 0 " > < / p a r a m > < p a r a m   n a m e = " f l a s h v a r s "   v a l u e = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' "   / > < e m b e d   s r c = " s w f / V i d e o P l a y e r _ v 0 3 . s w f "   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 "   a l l o w s c r i p t a c c e s s = " a l w a y s "   a l l o w f u l l s c r e e n = " t r u e "   w i d t h = " 3 5 6 "   h e i g h t = " 2 6 7 "   f l a s h v a r s = " v i d e o _ u r l = . . / ' +   a r r R e s [ 1 ]   + ' & a m p ; a u t o _ p l a y = 0 " > < / e m b e d > < / o b j e c t > ' ) ;  
 	 	 	 	 $ ( " # p s L i n k " ) . a t t r ( " h r e f " ,   " v i d e o - d e t a i l . a s p x ? i d = " + a r r R e s [ 2 ] ) ;  
 	 	 	 }  
 	 	 	 C u f o n . r e p l a c e ( ' h 2 ,   . f o n t ' ) ;  
         }          
     } ) ; 	 	 	  
 	  
 }  
  
 f u n c t i o n   c h a n g e _ l i s t _ a r t i c l e ( t y p e ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ l i s t _ a r t i c l e & t y p e = " + t y p e ,                  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 $ ( " # a r t c i l e D e t a i l " ) . h t m l ( a r r R e s [ 0 ] ) ;  
 	 	 	 $ ( " # l i s t A r t i c l e " ) . h t m l ( a r r R e s [ 1 ] ) ; 	 	 	 	 	  
                         $ ( " # a r t i c l e _ i d " ) . v a l ( a r r R e s [ 2 ] ) ;  
 	 	 	 / / C u f o n . r e p l a c e ( ' h 2 ,   . f o n t ' ) ;  
         }          
     } ) ; 	 	 	  
 	  
 }  
  
 f u n c t i o n   p o s t P a s t C o m m e n t ( )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   $ ( " # p a s t _ i d " ) . v a l ( ) ,   " n a m e " :   $ ( " # p a s t _ n a m e " ) . v a l ( ) ,   " e m a i l " :   $ ( " # p a s t _ e m a i l " ) . v a l ( ) , " c o m m e n t " :   $ ( " # p a s t _ c o m m e n t " ) . v a l ( ) ,   " a c t " :   " p o s t C o m m e n t " ,   " t y p e " : " e m o t i o n _ m o m e n t " } ,  
                         f u n c t i o n ( d a t a )   {  
                                 $ ( " # p a s t _ n a m e " ) . v a l ( " " ) ;  
                                 $ ( " # p a s t _ e m a i l " ) . v a l ( " ( s ½  k h ô n g   h i Ãn   t h Ë) " ) ;  
                                 $ ( " # p a s t _ c o m m e n t " ) . v a l ( " V i ¿t   ý   k i ¿n   c ça   b ¡n   t ¡i   â y " ) ;  
                                 / / $ ( " # p a s t _ c o m m e n t " ) . h t m l ( ' ' ) ;  
                                 $ ( " # m o m e n t _ c m _ s c r o l l " ) . h t m l ( d a t a ) ;  
 	 	 	 	 m o m e n t _ c a l l b a c k ( ) ;  
                         } ) ;  
 	  
 }  
  
 f u n c t i o n   p o s t S p o t C o m m e n t ( )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   $ ( " # s p o t _ i d " ) . v a l ( ) ,   " n a m e " :   $ ( " # s p o t _ n a m e " ) . v a l ( ) ,   " e m a i l " :   $ ( " # s p o t _ e m a i l " ) . v a l ( ) , " c o m m e n t " :   $ ( " # s p o t _ c o m m e n t " ) . v a l ( ) ,   " a c t " :   " p o s t C o m m e n t " ,   " t y p e " : " f u n " } ,  
                         f u n c t i o n ( d a t a )   {                                  
                                 $ ( " # s p o t _ n a m e " ) . v a l ( " " ) ;  
                                 $ ( " # s p o t _ e m a i l " ) . v a l ( " ( s ½  k h ô n g   h i Ãn   t h Ë) " ) ;  
                                 $ ( " # s p o t _ c o m m e n t " ) . v a l ( ' V i ¿t   ý   k i ¿n   c ça   b ¡n   t ¡i   â y ' ) ;  
                                 $ ( " # p s m o m e n t _ c m _ s c r o l l " ) . h t m l ( d a t a ) ;  
 	 	 	 	 p s m o m e n t _ c a l l b a c k ( ) ;  
                         } ) ;  
 	  
 }  
  
 f u n c t i o n   p o s t J u d g e C o m m e n t ( )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   $ ( " # a r t i c l e _ i d " ) . v a l ( ) ,   " n a m e " :   $ ( " # j u d g e _ n a m e " ) . v a l ( ) ,   " e m a i l " :   $ ( " # j u d g e _ e m a i l " ) . v a l ( ) , " c o m m e n t " :   $ ( " # j u d g e _ c o m m e n t " ) . v a l ( ) ,   " a c t " :   " p o s t C o m m e n t " ,   " t y p e " : " s p o t l i g h t " } ,  
                         f u n c t i o n ( d a t a )   {                              
                                 $ ( " # j u d g e _ n a m e " ) . v a l ( " " ) ;  
                                 $ ( " # j u d g e _ e m a i l " ) . v a l ( " ( s ½  k h ô n g   h i Ãn   t h Ë) " ) ;  
                                 $ ( " # j u d g e _ c o m m e n t " ) . v a l ( ' V i ¿t   ý   k i ¿n   c ça   b ¡n   t ¡i   â y ' ) ;      
                                 / / $ ( " # j u d g e _ c o m m e n t " ) . h t m l ( ' ' ) ;                  
                                 $ ( " # h o t s t a r _ c m _ s c r o l l " ) . h t m l ( d a t a ) ;                  
 	 	 	 	 h o t s t a r _ c a l l b a c k ( ) ;  
                         } ) ;      
 	  
 }  
  
 f u n c t i o n   c h a n g e _ p a s t _ v i d e o ( i d ) { 	  
       $ . a j a x ( {  
         t y p e :   " P O S T " ,  
         u r l :   " p o s t _ d a t a . a s p x ? a c t = c h a n g e _ p a s t _ v i d e o & i d = " + i d ,          
         / / d a t a T y p e :   " j s o n " ,  
         s u c c e s s :   f u n c t i o n ( r e s , s t a t u s )   {          
                         v a r   t m p   =   r e s ;  
                         v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
                         $ ( " . m o m e n t _ d e s " ) . h t m l ( a r r R e s [ 0 ] ) ; 	 	 	  
                         $ ( " # p a s t _ i d " ) . v a l ( a r r R e s [ 2 ] ) ;  
                         i f   ( a r r R e s [ 1 ]   ! =   " " )  
                         {  
 	 	 	 	 / / $ ( ' . f l a s h P l a y e r _ m o m e n t ' ) . h t m l ( ' < d i v   i d = " f l a s h P l a y e r _ m o m e n t " > < / d i v > ' ) ;  
 	                         / * v a r   s u b V i d e o _ f l a s h v a r s   =   {   v i d e o _ u r l : " . . / "   +   a r r R e s [ 1 ] ,   a u t o _ p l a y : " 1 "   } ;  
 	                         s w f o b j e c t . e m b e d S W F ( " s w f / V i d e o P l a y e r _ v 0 3 . s w f " ,   " f l a s h P l a y e r _ m o m e n t " ,   " 3 4 3 " ,   " 2 5 7 " ,   " 9 . 0 . 0 " , " s w f / e x p r e s s I n s t a l l . s w f " ,   s u b V i d e o _ f l a s h v a r s ,   s u b V i d e o _ p a r a m s ,   s u b V i d e o _ a t t r i b u t e s ) ; * /    
 	 	 	 	  
 	 	 	 	 $ ( ' # f l a s h P l a y e r _ m o m e n t ' ) . h t m l ( ' < e m b e d   w i d t h = " 3 4 3 "   h e i g h t = " 2 5 7 "   a l i g n = " t o p "   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 "   s a l i g n = " t "   a l l o w s c r i p t a c c e s s = " s a m e D o m a i n "   a l l o w f u l l s c r e e n = " t r u e "   m e n u = " f a l s e "   n a m e = " m a i n "   b g c o l o r = " # 0 0 0 0 0 0 "   d e v i c e f o n t = " f a l s e "   w m o d e = " o p a q u e "   s c a l e = " n o s c a l e "   l o o p = " t r u e "   p l a y = " t r u e "   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 "   q u a l i t y = " h i g h "   f l a s h v a r s = " v i d e o _ u r l = . . / ' + a r r R e s [ 1 ] + ' & a m p ; a u t o _ p l a y = 1 "   s r c = " s w f / V i d e o P l a y e r _ v 0 3 . s w f " > ' ) ;  
 	 	 	 	 $ ( " # p a s t L i n k " ) . a t t r ( " h r e f " ,   " v i d e o - d e t a i l . a s p x ? i d = " + a r r R e s [ 2 ] )  
                         }                 	  
         }                
     } ) ;  
 	 	 	 	  
 }  
  
 f u n c t i o n   v o t e ( i d )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   i d ,   " a c t " :   " v o t e " } ,  
                         f u n c t i o n ( d a t a )   {                                  
                                 i f   ( d a t a   = =   ' 0 ' )  
                                         a l e r t ( ' B ¡n   ã   b ì n h   c h Ín   c h o   b à i   h á t   n à y   r Ói . ' ) ;  
                                 e l s e   i f   ( d a t a   = =   ' - 1 ' )  
                                         c a o b o x . s h o w ( ' l o g i n . h t m l ' ) ;  
                                 e l s e  
                                 {  
                                         v a r   s t r V o t e   =   $ ( " # o l v " + i d ) . h t m l ( ) ;  
                                         s t r V o t e   =   s t r V o t e . r e p l a c e ( "   b §u   c h Ín " ,   " " ) ;  
                                          
                                         v a r   v o t e   =   p a r s e I n t ( s t r V o t e )   +   1 ;  
                                         $ ( " # o l v " + i d ) . h t m l ( v o t e + '     b §u   c h Ín ' ) ;  
                                         a l e r t ( ' C á m   ¡n   b ¡n   ã   b ì n h   c h Ín   c h o   b à i   h á t   n à y . ' ) ;  
                                 }  
                         } ) ;      
 }  
  
 f u n c t i o n   v o t e _ r e p o r t e r ( i d )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   i d ,   " a c t " :   " v o t e _ r e p o r t e r " } ,  
                         f u n c t i o n ( d a t a )   {                                  
                                 i f   ( d a t a   = =   ' 0 ' )  
                                         a l e r t ( ' B ¡n   ã   b ì n h   c h Ín   c h o   b à i   n à y   r Ói . ' ) ;  
                                 e l s e   i f   ( d a t a   = =   ' - 1 ' )  
                                         c a o b o x . s h o w ( ' l o g i n . h t m l ' ) ;  
                                 e l s e  
                                 {  
                                         v a r   s t r V o t e   =   $ ( " # o l v " + i d ) . h t m l ( ) ;  
                                         s t r V o t e   =   s t r V o t e . r e p l a c e ( "   b §u   c h Ín " ,   " " ) ;  
                                          
                                         v a r   v o t e   =   p a r s e I n t ( s t r V o t e )   +   1 ;  
                                         $ ( " # o l v " + i d ) . h t m l ( v o t e + '     b §u   c h Ín ' ) ;  
                                         a l e r t ( ' C á m   ¡n   b ¡n   ã   b ì n h   c h Ín   c h o   b à i   n à y . ' ) ;  
                                 }  
                         } ) ;      
 }  
  
 f u n c t i o n   l i k e ( i d )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   i d ,   " a c t " :   " l i k e " } ,  
                         f u n c t i o n ( d a t a )   {                                  
                                 i f   ( d a t a   = =   ' 1 ' )  
                                 {  
                                         v a r   s t r V o t e   =   $ ( " # o l v " + i d ) . h t m l ( ) ;                    
                                          
                                         v a r   v o t e   =   p a r s e I n t ( s t r V o t e )   +   1 ;  
                                         $ ( " # o l v " + i d ) . h t m l ( v o t e ) ;                                          
                                 }  
                         } ) ;      
 }  
  
 f u n c t i o n   s e a r c h ( )   {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " k e y w o r d " :   $ ( " # k e y S e a r c h " ) . v a l ( ) ,   " a c t " :   " s e a r c h "   } ,  
                         f u n c t i o n   ( d a t a )   {  
                                 $ ( " k e y S e a r c h " ) . v a l ( " " ) ;  
                                 w i n d o w . l o c a t i o n   =   " s e a r c h . a s p x " ;  
                         } ) ;  
 }  
  
 f u n c t i o n   g u p ( n a m e )  
 {  
     n a m e   =   n a m e . r e p l a c e ( / [ \ [ ] / , " \ \ \ [ " ) . r e p l a c e ( / [ \ ] ] / , " \ \ \ ] " ) ;  
     v a r   r e g e x S   =   " [ \ \ ? & ] " + n a m e + " = ( [ ^ & # ] * ) " ;  
     v a r   r e g e x   =   n e w   R e g E x p (   r e g e x S   ) ;  
     v a r   r e s u l t s   =   r e g e x . e x e c (   w i n d o w . l o c a t i o n . h r e f   ) ;  
     i f (   r e s u l t s   = =   n u l l   )  
         r e t u r n   " " ;  
     e l s e  
         r e t u r n   r e s u l t s [ 1 ] ;  
 }  
  
 f u n c t i o n   i s E m a i l ( s ) {  
  
 	 i f   ( s . s e a r c h ( / ^ \ w + ( ( - \ w + ) | ( \ . \ w + ) ) * \ @ [ A - Z a - z 0 - 9 ] + ( ( \ . | - ) [ A - Z a - z 0 - 9 ] + ) * \ . [ A - Z a - z 0 - 9 ] { 2 , 4 } $ / )   ! =   - 1 )  
 	 	 r e t u r n   t r u e   ;  
 	 	  
 	 r e t u r n   f a l s e   ;  
  
 }  
  
 f u n c t i o n   t r i m ( s t r )   {  
 	 r e t u r n   s t r . r e p l a c e ( / ^ \ s + / g ,   ' ' ) . r e p l a c e ( / \ s + $ / g ,   ' ' ) ;  
 }  
  
  
 f u n c t i o n   s e n d T o F r i e n d ( )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " n a m e " :   $ ( " # s e n d R e c e i v e r " ) . v a l ( ) ,   " e m a i l " :   $ ( " # s e n d E m a i l " ) . v a l ( ) , " s e n d e r " :   $ ( " # s e n d Y o u r N a m e " ) . v a l ( ) ,   " a c t " :   " s e n d t o f r i e n d " } ,  
                         f u n c t i o n ( d a t a )   {  
                                 c a o b o x . h i d e ( ) ;  
                         } ) ;          
 }  
  
 f u n c t i o n   s e n d P o l l ( o b j ) { 	  
 	 i f   ( s e l e c t _ p o l l   = =   0 )  
 	 {  
 	 	 a l e r t ( ' X i n   v u i   l ò n g   c h Ín   m Ùt   t h í   s i n h . ' ) ;  
 	 }  
 	 e l s e  
 	 {  
 	         / / o b j . d i s a b l e d   =   t r u e ;  
 	 	 / / $ ( ' # p o l l _ c o v e r ' ) . h t m l ( ' < i m g   s r c = \ ' i m a g e s / b . g i f \ '   w i d t h = \ ' 2 3 5 \ '   h e i g h t = \ ' 8 7 \ '   i d = \ ' l o a d i n g \ '   / > ' ) ;  
 	 	 $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " a n s w e r _ i d " :   s e l e c t _ p o l l ,   " a c t "   :   " p o l l " } ,   f u n c t i o n ( d a t a )   {    
 	 	 	 	 	 	 	 	 	 	 	 	     $ ( " # p o l l " ) . h t m l ( d a t a ) ;  
 	 	 	 	 	 	 	 	 	 	 	 } ) ;  
 	 }  
 }  
  
 f u n c t i o n   g o C o m m e n t P a g e ( i d ,   t y p e ,   p a g e ) { 	  
 	  
 	 $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   i d ,   " p a g e "   :   p a g e ,   " o b j _ t y p e "   :   t y p e ,   " a c t "   :   " g o _ c o m m e n t " } ,   f u n c t i o n ( d a t a )   {    
 	 	 	 	 	 	 	 	 	 	 	     $ ( " # l i s t _ " + i d ) . h t m l ( d a t a ) ;  
 	 	 	 	 	 	 	 	 	 	 } ) ; 	  
 }  
  
 f u n c t i o n   g o T a l k ( n i c k n a m e ,   p a g e ) { 	  
 	  
 	 $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " n i c k n a m e " :   n i c k n a m e ,   " p a g e "   :   p a g e ,   " a c t "   :   " g o _ t a l k " } ,   f u n c t i o n ( d a t a )   {    
 	                                                                                     v a r   t m p   =   d a t a ;  
                                                                                             v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 	 	 	 	 	 	 	 	     $ ( " # t a l k " ) . a p p e n d ( a r r R e s [ 0 ] ) ;  
 	 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 	 	 	 	 	     i f   ( a r r R e s [ 1 ]   ! =   " 0 " )  
 	 	 	 	 	 	 	 	 	 	 	     {  
 	 	 	 	 	 	 	 	 	 	 	             v a r   g o P a g e   =   ' < a   h r e f = " "   i d = " h r e f _ n e x t "   o n c l i c k = " g o T a l k ( '   +   " ' "   +   n i c k n a m e   +   " ' , "   +   a r r R e s [ 1 ]   +   ' ) ; r e t u r n   f a l s e ; " > C á c   t i n   c i  h ¡n < / a > ' ;  
                                                                                                     $ ( " # l i n k _ n e x t _ p a g e " ) . h t m l ( g o P a g e ) ;  
 	 	 	 	 	 	 	 	 	 	 	     }  
 	 	 	 	 	 	 	 	 	 	 	     e l s e  
 	 	 	 	 	 	 	 	 	 	 	     {  
 	 	 	 	 	 	 	 	 	 	 	             $ ( " # l i n k _ n e x t _ p a g e " ) . h i d e ( ) ;  
                                                                                             }  
 	 	 	 	 	 	 	 	 	 	 } ) ; 	  
 }  
  
 f u n c t i o n   p o s t T a l k C o m m e n t ( c o m m e n t _ i d )  
 {  
         v a r   i d   =   $ ( " # s p o t _ i d _ " + c o m m e n t _ i d ) . v a l ( ) ;          
         v a r   c o m m e n t   =   $ ( " # s p o t _ c o m m e n t _ " + c o m m e n t _ i d ) . v a l ( ) ;  
         v a r   t y p e   =   $ ( " # o b j t y p e _ " + c o m m e n t _ i d ) . v a l ( ) ;      
         v a r   f u l l n a m e   =   $ ( " # s p o t _ n a m e _ " + c o m m e n t _ i d ) . v a l ( ) ;            
         v a r   e m a i l   =   $ ( " # s p o t _ e m a i l _ " + c o m m e n t _ i d ) . v a l ( ) ;      
         i f   ( f u l l n a m e = = " "   | |   e m a i l = = " "   | |   c o m m e n t = = " " )        
         {  
                 $ ( " # m s g p o s t _ s u c c e s s _ " + c o m m e n t _ i d ) . h t m l ( " < s p a n   s t y l e = \ " c o l o r : R e d \ " > V u i   l ò n g   n h ­p   §y   ç  t h ô n g   t i n < / s p a n > " ) . s h o w ( ) . f a d e I n ( ) ;  
                 r e t u r n ;  
         }  
         i f   ( f u l l n a m e . l e n g t h   >   5 0 ) {  
                 $ ( " # m s g p o s t _ s u c c e s s _ " + c o m m e n t _ i d ) . h t m l ( " < s p a n   s t y l e = \ " c o l o r : R e d \ " > H Í  v à   t ê n   c ça   b ¡n   q u á   d à i < / s p a n > " ) . s h o w ( ) . f a d e I n ( ) ;  
                 r e t u r n ;  
         }  
         i f   ( f u l l n a m e . l e n g t h   >   1 6 0 ) {  
                 $ ( " # m s g p o s t _ s u c c e s s _ " + c o m m e n t _ i d ) . h t m l ( " < s p a n   s t y l e = \ " c o l o r : R e d \ " > T h ô n g   d i Çp   c ça   b ¡n   q u á   d à i < / s p a n > " ) . s h o w ( ) . f a d e I n ( ) ;  
                 r e t u r n ;  
         }  
         i f   ( c o m m e n t . l e n g t h > = 3   & &   c o m m e n t . l e n g t h   < = 1 6 0   & &   t y p e . l e n g t h   > 0   & &   f u l l n a m e . l e n g t h   > 0   & &   e m a i l . l e n g t h   > 0 )  
         {  
                 $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   i d , " n a m e " : f u l l n a m e ,   " e m a i l " : e m a i l ,   " c o m m e n t " :   c o m m e n t , " a c t " :   " p o s t T a l k C o m m e n t " ,   " t y p e " : t y p e ,   " p a r e n t i d " : c o m m e n t _ i d } ,  
                         f u n c t i o n ( d a t a )   {    
                                 i f   ( d a t a = = " - 1 " ) {  
                                         $ ( " # m s g p o s t _ s u c c e s s _ " + c o m m e n t _ i d ) . h t m l ( " < s p a n   s t y l e = \ " c o l o r : R e d \ " > V u i   l ò n g   n g   n h ­p   t r °Ûc < / s p a n > " ) . s h o w ( ) . f a d e I n ( ) ;                                        
                                 }  
                                 i f   ( d a t a = = " 0 " ) {  
                                       $ ( " # m s g p o s t _ s u c c e s s _ " + c o m m e n t _ i d ) . h t m l ( " < s p a n   s t y l e = \ " c o l o r : R e d \ " > T h a o   t á c   b ¡n   q u á   n h a n h < / s p a n > " ) . s h o w ( ) . f a d e I n ( ) ;                                        
                                 }  
                                 e l s e   i f   ( d a t a ! = " " ) {  
                                         $ ( " # s p o t _ c o m m e n t _ " + c o m m e n t _ i d ) . v a l ( " " ) ;  
                                         $ ( " # s p o t _ n a m e _ " + c o m m e n t _ i d ) . v a l ( " " ) ;      
                                         $ ( " # s p o t _ e m a i l _ " + c o m m e n t _ i d ) . v a l ( " " ) ;            
                                         $ ( " # l i s t _ " + i d ) . h t m l ( d a t a ) ;                                                    
                                         / / $ ( " # m s g p o s t _ s u c c e s s _ " + c o m m e n t _ i d ) . h t m l ( " < h 4 > Ý   k i ¿n   c ça   b ¡n   ã   °ãc   g íi   i .   C £m   ¡n   s ñ  ó n g   g ó p   c ça   b ¡n . < / h 4 > " ) . s h o w ( ) . f a d e I n ( ) ;  
                                         $ ( ' . c o n t e s t a n t C o m m e n t F o r m ' ) . f a d e O u t ( ) ;  
                                 }  
                         } ) ;          
         }          
 }  
  
 f u n c t i o n   p o s t S i d e C o m m e n t ( t y p e )  
 {  
         $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   $ ( " # c o n t e s t a n t s _ i d " ) . v a l ( ) ,   " n a m e " :   $ ( " # j u d g e _ n a m e " ) . v a l ( ) ,   " e m a i l " :   $ ( " # j u d g e _ e m a i l " ) . v a l ( ) , " c o m m e n t " :   $ ( " # j u d g e _ c o m m e n t " ) . v a l ( ) ,   " a c t " :   " p o s t C o m m e n t " ,   " t y p e " : " c o m m e n t _ s i d e b a r " } ,  
                         f u n c t i o n ( d a t a )   {                              
                                 $ ( " # j u d g e _ n a m e " ) . v a l ( " " ) ;  
                                 $ ( " # j u d g e _ e m a i l " ) . v a l ( " " ) ;  
                                 $ ( " # j u d g e _ c o m m e n t " ) . v a l ( ' ' ) ;      
                                 $ ( " # c o m m e n t _ s i d e b a r " ) . h t m l ( d a t a ) ;                  
                         } ) ;      
 	  
 }  
  
 f u n c t i o n   g o S i d e C o m m e n t ( i d ,   p a g e ) { 	  
 	  
 	 $ . p o s t ( ' p o s t _ d a t a . a s p x ' ,   {   " i d " :   i d ,   " p a g e "   :   p a g e ,   " a c t "   :   " g o _ s i d e b a r " } ,   f u n c t i o n ( d a t a )   {    
 	                                                                                     v a r   t m p   =   d a t a ;  
                                                                                             v a r   a r r R e s   =   t m p . s p l i t ( ' - - - - ' ) ;  
 	 	 	 	 	 	 	 	 	 	 	     $ ( " # c o m m e n t _ s i d e b a r " ) . a p p e n d ( a r r R e s [ 0 ] ) ;  
 	 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 	 	 	 	 	     i f   ( a r r R e s [ 1 ]   ! =   " 0 " )  
 	 	 	 	 	 	 	 	 	 	 	     {  
 	 	 	 	 	 	 	 	 	 	 	             v a r   g o P a g e   =   ' < a   h r e f = " "   i d = " h r e f _ s i d e b a r "   o n c l i c k = " g o S i d e C o m m e n t ( '   +   i d   +   " , "   +   a r r R e s [ 1 ]   +   ' ) ; r e t u r n   f a l s e ; " > Íc   T i ¿p < / a > ' ;  
                                                                                                     $ ( " # p a g i n g _ s i d e b a r " ) . h t m l ( g o P a g e ) ;  
 	 	 	 	 	 	 	 	 	 	 	     }  
 	 	 	 	 	 	 	 	 	 	 	     e l s e  
 	 	 	 	 	 	 	 	 	 	 	     {  
 	 	 	 	 	 	 	 	 	 	 	             $ ( " # p a g i n g _ s i d e b a r " ) . h i d e ( ) ;  
                                                                                             }  
 	 	 	 	 	 	 	 	 	 	 } ) ; 	  
  
 } 	 	 	 	 	 	 	 	 	 	 
