þÿ 	 	 	 	 f u n c t i o n   G e t X m l H t t p O b j e c t ( h a n d l e r )  
 	 	 	 	 {    
 	 	 	 	 	 v a r   o b j X m l H t t p = n u l l ;  
 	 	 	 	 	 i f   ( n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " M S I E " ) > = 0 ) 	 {    
 	 	 	 	 	 	 v a r   s t r N a m e = " M s x m l 2 . X M L H T T P " ;  
 	 	 	 	 	 	 i f   ( n a v i g a t o r . a p p V e r s i o n . i n d e x O f ( " M S I E   5 . 5 " ) > = 0 ) {  
 	 	 	 	 	 	 	 s t r N a m e = " M i c r o s o f t . X M L H T T P " ;  
 	 	 	 	 	 	 } t r y {    
 	 	 	 	 	 	 	 o b j X m l H t t p = n e w   A c t i v e X O b j e c t ( s t r N a m e ) ;  
 	 	 	 	 	 	 	 o b j X m l H t t p . o n r e a d y s t a t e c h a n g e = h a n d l e r ;  
 	 	 	 	 	 	 	 r e t u r n   o b j X m l H t t p ;  
 	 	 	 	 	 	 } c a t c h ( e ) {    
 	 	 	 	 	 	 	 a l e r t ( " E r r o r .   S c r i p t i n g   f o r   A c t i v e X   m i g h t   b e   d i s a b l e d " ) ;  
 	 	 	 	 	 	 r e t u r n ;  
 	 	 	 	 	 	 }    
 	 	 	 	 	 }    
 	 	 	 	 	 i f   ( n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " M o z i l l a " ) > = 0 ) {  
 	 	 	 	 	 	 o b j X m l H t t p = n e w   X M L H t t p R e q u e s t ( ) ;  
 	 	 	 	 	 	 o b j X m l H t t p . o n l o a d = h a n d l e r ;  
 	 	 	 	 	 	 o b j X m l H t t p . o n e r r o r = h a n d l e r ;  
 	 	 	 	 	 	 r e t u r n   o b j X m l H t t p ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 	 f u n c t i o n   g e t N e w s ( i d ) {    
 	 	 	 	 	 v a r   u r l = " g e t N e w s . a s p ? i d = "     +   i d   ;  
 	 	 	 	 	 x m l H t t p = G e t X m l H t t p O b j e c t ( s t a t e C h a n g e d ) ;  
 	 	 	 	 	 x m l H t t p . o p e n ( " G E T " ,   u r l   ,   t r u e ) ;  
 	 	 	 	 	 x m l H t t p . s e n d ( n u l l ) ;  
 	 	 	 	 }    
 	 	 	 	 f u n c t i o n   s t a t e C h a n g e d ( ) {    
 	 	 	 	 	 i f   ( x m l H t t p . r e a d y S t a t e = = 4   | |   x m l H t t p . r e a d y S t a t e = = " c o m p l e t e " ) {  
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' n w d e t a i l s ' ) . i n n e r H T M L = x m l H t t p . r e s p o n s e T e x t ;  
 	 	 	 	 	 }  
 	 	 	 	 }   	 	 	 	    
 	 	 	 	 f u n c t i o n   u p d a t e S e l e c t e d C o l o u r ( c o l o u r I d ,   c o l o u r N a m e ) {  
 	 	 	 	 	 / /   T h i s   o b j e c t   o n l y   e x i s t s   w h e n   t h e   u s e r   i s   l o g g e d   i n   b e c a u s e   t h e   a b i l i t y    
 	 	 	 	 	 / /   t o   a d d   t o   s h o p p i n g   c a r t   i s   f o r   a u t h e n t i c a t e d   u s e r s   o n l y .   T h e r e f o r e   m a k e    
 	 	 	 	 	 / /   s u r e   t h a t   t h e   o b j e c t   e x i s t s .  
 	 	 	 	 	  
 	 	 	 	 	 v a r   o b j   =   d o c u m e n t . g e t E l e m e n t B y I d ( " s e l e c t e d C o l o u r I d " ) ;  
 	 	 	 	 	 i f ( o b j ! = n u l l ) {  
 	 	 	 	 	 	 o b j . v a l u e   =   c o l o u r I d ;  
 	 	 	 	 	 }  
 	 	 	 	 	 v a r   o b j   =   d o c u m e n t . g e t E l e m e n t B y I d ( " s e l e c t e d C o l o u r N a m e " ) ;   / /   t h e   c o l o u r   d e s c r i p t i o n   s o   w e   d o n t   h a v e   t o   r e l o o k u p  
 	 	 	 	 	 i f ( o b j ! = n u l l ) {  
 	 	 	 	 	 	  
 	 	 	 	 	 	 o b j . v a l u e   =   c o l o u r N a m e ;  
 	 	 	 	 	 }  
 	 	 	 	 	  
 	 	 	 	 }  

