ÿþv a r   r e q R e p l y ;  
 f u n c t i o n   I n i t i a l i z e F B ( )  
 {  
 	 t r y  
 	 {  
 	 	 i f   ( w i n d o w . X M L H t t p R e q u e s t )   {   / /   M o z i l l a ,   S a f a r i ,   . . .  
  
 	 	 	 	 r e q R e p l y   =   n e w   X M L H t t p R e q u e s t ( ) ;  
 	 	 	 	  
 	 	 	 	 }   e l s e   i f   ( w i n d o w . A c t i v e X O b j e c t )   {   / /   I E  
 	 	 	 	  
 	 	 	 	 r e q R e p l y   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;  
 	 	 }  
 	 }  
 	 c a t c h ( e )  
 	 {  
 	 	 t r y  
 	 	 {  
 	 	 	 i f   ( w i n d o w . X M L H t t p R e q u e s t )   {   / /   M o z i l l a ,   S a f a r i ,   . . .  
  
 	 	 	 	 r e q R e p l y   =   n e w   X M L H t t p R e q u e s t ( ) ;  
 	 	 	 	  
 	 	 	 	 }   e l s e   i f   ( w i n d o w . A c t i v e X O b j e c t )   {   / /   I E  
 	 	 	 	  
 	 	 	 	 r e q R e p l y   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;  
 	 	 	 }  
 	 	 }  
 	 	 c a t c h ( o c )  
 	 	 {  
 	 	 	 r e q R e p l y   = n u l l ;  
 	 	 }  
 	 }  
  
 	 i f ( ! r e q R e p l y & & t y p e o f   X M L H t t p R e q u e s t ! = " u n d e f i n e d " )  
 	 {  
 	 	 r e q R e p l y = n e w   X M L H t t p R e q u e s t ( ) ;  
 	 }  
 	  
 }  
 f u n c t i o n   f i x C o n t e n t ( h t m l )   {  
 	 h t m l   =   h t m l . r e p l a c e ( /   / g , " % 2 0 " ) ;  
 	 h t m l   =   h t m l . r e p l a c e ( / \ n / g , " < b r > " ) ;  
 	 r e t u r n   h t m l ;  
 }  
 f u n c t i o n   s e n d F B ( h o t e n , e m a i l , n o i d u n g , a r t i d , a r t t i t l e , p c w t y p e )  
 {  
 	 i f   ( h o t e n   = =   ' ' ) {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   H Í  v à   t ê n . " ) ;  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " S e n d e r N a m e " ) . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 e l s e   i f ( ! i s E m a i l ( e m a i l ) ) {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   c h í n h   x á c   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 ( " S e n d e r E m a i l " ) . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ; 	  
 	 }  
 	 e l s e   i f ( n o i d u n g   = =   ' ' ) {  
 	 	 a l e r t ( " V u i   l ò n g   n h ­p   N Ùi   d u n g . " ) ;  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " c o n t e n t " ) . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }   e l s e { 	 	  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " r e v i e w _ r a t i n g " ) . i n n e r H T M L = " < c e n t e r > < i m g   b o r d e r = 0   s r c = ' / m u a / i m a g e s / l o a d i n g . g i f '   a l i g n = ' a b s b o t t o m ' >   a n g   g íi . . . < / c e n t e r > " ;  
 	 	 I n i t i a l i z e F B ( ) ;  
 	 	 v a r   u r l = " a j a x F e e d B a c k . a s p ? " ;  
 	 	 v a r   p a r a   =   " n o i d u n g = " +   f i x C o n t e n t ( n o i d u n g )   + " & h o t e n = " + h o t e n + " & e m a i l = " + e m a i l + " & a r t i d = " + a r t i d + " & a r t t i t l e = " + f i x C o n t e n t ( a r t t i t l e ) + " & p c w t y p e = " + p c w t y p e ; 	 	  
 	 	 i f ( r e q R e p l y ! = n u l l )  
 	 	 { 	 	 	  
 	 	 	 r e q R e p l y . o n r e a d y s t a t e c h a n g e   =   P r o c e s s C o m m e n t ;  
 	 	 	 r e q R e p l y . o p e n ( " P O S T " ,   u r l , t r u e ) ; 	 	  
 	 	         r e q R e p l y . s e t R e q u e s t H e a d e r ( " C o n t e n t - t y p e " ,   " a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d ; c h a r s e t = U T F - 8 " ) ; 	    
 	                 r e q R e p l y . s e n d ( p a r a ) ;                 	                  
 	 	 } 	  
 	 }  
 }  
  
 f u n c t i o n   P r o c e s s C o m m e n t ( )  
 {  
 	 i f   ( r e q R e p l y . r e a d y S t a t e   = =   4 )    
                 {    
 	 	 	 i f   ( r e q R e p l y . s t a t u s   = =   2 0 0 )    
 	 	 	 {  
 	 	 	 	  
 	 	 	 	 i f ( r e q R e p l y . r e s p o n s e T e x t = = " " )  
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " r e v i e w _ r a t i n g " ) . i n n e r H T M L   = " < f o n t   c o l o r = ' # 9 9 9 9 9 9 ' >   < / f o n t > " ; 	 	 	 	 	  
 	 	 	 	 e l s e  
 	 	 	 	 {  
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " r e v i e w _ r a t i n g " ) . i n n e r H T M L   =     r e q R e p l y . r e s p o n s e T e x t ; 	 	 	 	 	  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 e l s e    
 	 	 	 {  
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " r e v i e w _ r a t i n g " ) . i n n e r H T M L = " T h e r e   w a s   a   p r o b l e m   r e t r i e v i n g   d a t a : < b r > " + r e q R e p l y . s t a t u s T e x t ;  
 	 	 	 }  
 	 	 }  
 } 
