ÿþf u n c t i o n   S h o w W e a t h e r B o x ( v I d ) {  
 	 v a r   s L i n k   =   ' ' ;  
 	 s L i n k   =   ' / T h o i t i e t / ' ;  
 	 s w i t c h   ( p a r s e I n t ( v I d ) ) { 	         	  
 	 	 c a s e   1 :   s L i n k   =   s L i n k . c o n c a t ( ' S o n l a . x m l ' ) ; b r e a k ;  
 	 	 c a s e   2 :   s L i n k   =   s L i n k . c o n c a t ( ' V i e t t r i . x m l ' ) ; b r e a k ;  
 	 	 c a s e   3 :   s L i n k   =   s L i n k . c o n c a t ( ' H a i p h o n g . x m l ' ) ; b r e a k ;  
 	 	 c a s e   4 :   s L i n k   =   s L i n k . c o n c a t ( ' H a n o i . x m l ' ) ; b r e a k ;  
 	 	 c a s e   5 :   s L i n k   =   s L i n k . c o n c a t ( ' V i n h . x m l ' ) ; b r e a k ;  
 	 	 c a s e   6 :   s L i n k   =   s L i n k . c o n c a t ( ' D a n a n g . x m l ' ) ; b r e a k ;  
 	 	 c a s e   7 :   s L i n k   =   s L i n k . c o n c a t ( ' N h a t r a n g . x m l ' ) ; b r e a k ;  
 	 	 c a s e   8 :   s L i n k   =   s L i n k . c o n c a t ( ' P l e i c u . x m l ' ) ; b r e a k ; 	 	  
 	 	 c a s e   9 :   s L i n k   =   s L i n k . c o n c a t ( ' H C M . x m l ' ) ; b r e a k ; 	  
 	 	 d e f a u l t :   s L i n k   =   s L i n k . c o n c a t ( ' H a n o i . x m l ' ) ; b r e a k ;  
 	 } 	  
 	 A j a x R e q u e s t . g e t (  
 	 	 {  
 	 	 	 ' u r l ' : s L i n k  
 	 	 	 , ' o n S u c c e s s ' : f u n c t i o n ( r e q ) {  
 	 	 	 	 v a r   v A d I m g ,   v A d I m g 1 ,   v A d I m g 2 ,   v A d I m g 3 ,   v A d I m g 4 ,   v A d I m g 5 ,   v W e a t h e r ;  
 	 	 	 	  
 	 	 	 	 v A d I m g   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 v A d I m g 1   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 1 ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 i f ( r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 2 ' ) . i t e m ( 0 ) . f i r s t C h i l d   ! =   n u l l )  
 	 	 	 	 	 v A d I m g 2   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 2 ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 i f ( r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 3 ' ) . i t e m ( 0 ) . f i r s t C h i l d   ! =   n u l l )  
 	 	 	 	 	 v A d I m g 3   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 3 ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 i f ( r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 4 ' ) . i t e m ( 0 ) . f i r s t C h i l d   ! =   n u l l )  
 	 	 	 	 	 v A d I m g 4   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 4 ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 i f ( r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 5 ' ) . i t e m ( 0 ) . f i r s t C h i l d   ! =   n u l l )  
 	 	 	 	 	 v A d I m g 5   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' A d I m g 5 ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 v W e a t h e r   =   r e q . r e s p o n s e X M L . g e t E l e m e n t s B y T a g N a m e ( ' W e a t h e r ' ) . i t e m ( 0 ) . f i r s t C h i l d . n o d e V a l u e ;  
 	 	 	 	 G e t W e a t h e r B o x ( v A d I m g ,   v A d I m g 1 ,   v A d I m g 2 ,   v A d I m g 3 ,   v A d I m g 4 ,   v A d I m g 5 ,   v W e a t h e r ) ; 	 	 	 	  
 	 	 	 	 }  
 	 	 	 , ' o n E r r o r ' : f u n c t i o n ( r e q ) { }  
 	 	 }  
 	 )  
 }  
  
 f u n c t i o n   G e t W e a t h e r B o x ( v I m g ,   v I m g 1 ,   v I m g 2 ,   v I m g 3 ,   v I m g 4 ,   v I m g 5 ,   v W e a t h e r ) {  
 	 v a r   s H T M L   =   ' ' ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / ' ) . c o n c a t ( v I m g ) . c o n c a t ( ' "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > & n b s p ; ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / ' ) . c o n c a t ( v I m g 1 ) . c o n c a t ( ' "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > ' ) ;  
 	 i f ( v I m g 2 ! = n u l l )   s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / ' ) . c o n c a t ( v I m g 2 ) . c o n c a t ( ' "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > ' ) ;  
 	 i f ( v I m g 3 ! = n u l l )   s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / ' ) . c o n c a t ( v I m g 3 ) . c o n c a t ( ' "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > ' ) ;  
 	 i f ( v I m g 4 ! = n u l l )   s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / ' ) . c o n c a t ( v I m g 4 ) . c o n c a t ( ' "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > ' ) ;  
 	 i f ( v I m g 5 ! = n u l l )   s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / ' ) . c o n c a t ( v I m g 5 ) . c o n c a t ( ' "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < i m g   s r c = " h t t p : / / v n e x p r e s s . n e t / I m a g e s / W e a t h e r / c . g i f "   c l a s s = " i m g - w e a t h e r "   a l t = " "   / > ' ) ;  
 	  
 	 g m o b j ( ' i m g - D o ' ) . i n n e r H T M L   =   s H T M L ;  
 	 g m o b j ( ' t x t - W e a t h e r ' ) . i n n e r H T M L   =   v W e a t h e r ;  
 }  
  
 f u n c t i o n   S h o w G o l d P r i c e ( ) {  
 	 v a r   s H T M L   =   ' ' ; 	  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < d i v   s t y l e = " t e x t - a l i g n : r i g h t ; c o l o r : # 8 A 0 0 0 0 ; f o n t : b o l d   1 0 p x   a r i a l ; " > V T :   t r . & # 2 7 3 ; / l & # 4 3 2 ; & # 7 9 0 7 ; n g < / d i v > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < t a b l e   b o r d e r = " 0 p x "   c e l l p a d d i n g = " 2 p x "   c e l l s p a c i n g = " 1 p x "   c l a s s = " t b l - g o l d p r i c e " > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < t r > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - t i t l e "   s t y l e = " f o n t - s i z e : 1 0 p x ; w i d t h : 3 0 % ; " > L o & # 7 8 4 1 ; i < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - t i t l e "   s t y l e = " t e x t - a l i g n : c e n t e r ; f o n t - s i z e : 1 0 p x ; w i d t h : 3 5 % ; " > M u a < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - t i t l e "   s t y l e = " t e x t - a l i g n : c e n t e r ; f o n t - s i z e : 1 0 p x ; w i d t h : 3 5 % ; " > B & # 2 2 5 ; n < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < / t r > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < t r > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - t i t l e " > S B J < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - d a t a   t x t r " > ' ) . c o n c a t ( v G o l d S b j B u y ) . c o n c a t ( ' < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - d a t a   t x t r " > ' ) . c o n c a t ( v G o l d S b j S e l l ) . c o n c a t ( ' < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < / t r > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < t r > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - t i t l e " > S J C < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - d a t a   t x t r " > ' ) . c o n c a t ( v G o l d S j c B u y ) . c o n c a t ( ' < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - d a t a   t x t r " > ' ) . c o n c a t ( v G o l d S j c S e l l ) . c o n c a t ( ' < / t d > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < / t r > ' ) ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < / t a b l e > ' ) ;  
 	 g m o b j ( ' e G o l d ' ) . i n n e r H T M L   =   s H T M L ;  
 }  
  
 f u n c t i o n   S h o w F o r e x R a t e ( ) {  
 	 v a r   s H T M L   =   ' ' ;  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < t a b l e   b o r d e r = " 0 p x "   c e l l p a d d i n g = " 2 p x "   c e l l s p a c i n g = " 1 p x "   c l a s s = " t b l - w e a t h e r " > ' ) ;  
 	 f o r ( v a r   i = 0 ; i < v F o r e x s . l e n g t h ; i + + ) {  
 	 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < t r > ' ) ;  
 	 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - t i t l e " > ' ) . c o n c a t ( v F o r e x s [ i ] ) . c o n c a t ( ' < / t d > ' ) ;  
 	 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 	 < t d   c l a s s = " t d - w e a t h e r - d a t a   t x t r " > ' ) . c o n c a t ( v C o s t s [ i ] ) . c o n c a t ( ' < / t d > ' ) ;  
 	 	 s H T M L   =   s H T M L . c o n c a t ( ' 	 < / t r > ' ) ;  
 	 }  
 	 s H T M L   =   s H T M L . c o n c a t ( ' < / t a b l e > ' ) ;  
 	 g m o b j ( ' e F o r e x ' ) . i n n e r H T M L   =   s H T M L ;  
 }  
  
 f u n c t i o n   S h o w T a b ( W h o i s )  
 {  
 	 v a r   s t t   =   W h o i s . s u b s t r i n g ( 3 , 4 ) ;  
 	 S h o w ( s t t ) ; 	 	 	  
 	  
 } ;  
 	 	 	  
 	 	 	 	 	  
 f u n c t i o n   S h o w ( s t t )  
 {  
         f o r   ( v a r   i = 1 ; i < 4 ; i + + )  
 	 {  
 	         i f   ( i   = =   s t t )  
 	         {  
 	                 d o c u m e n t . g e t E l e m e n t B y I d ( ' l e f t '   +   s t t ) . s r c   =   " i m a g e s / B l u e L e f t . g i f " ;  
 	 	         d o c u m e n t . g e t E l e m e n t B y I d ( ' t a b '   +   s t t ) . c l a s s N a m e   =   " s e l e c t e d t a b " ;  
 	 	         d o c u m e n t . g e t E l e m e n t B y I d ( ' r i g h t '   +   s t t ) . s r c   =   " i m a g e s / B l u e R i g h t . g 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 v '   +   s t t ) . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	          
 	         }  
 	         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 ( ' l e f t ' +   i ) . s r c   =   " i m a g e s / G r a y L e f t . g i f " ;  
 	 	         d o c u m e n t . g e t E l e m e n t B y I d ( ' t a b ' +   i ) . c l a s s N a m e   =   " n o t s e l e c t e d t a b " ;  
 	 	         d o c u m e n t . g e t E l e m e n t B y I d ( ' r i g h t '   +   i ) . s r c   =   " i m a g e s / G r a y R i g h t . g 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 v '   +   i ) . s t y l e . d i s p l a y   =   " n o n e " ; 	 	  
 	         }  
 	 }  
 }  
 
