ÿþ/ / ·ƒÖSh t t p ù[aŒ 
 f u n c t i o n   G e t X m l H t t p O b j e c t ( )   {  
         v a r   x m l H t t p   =   n u l l ;  
         t r y   {  
                 / /   F i r e f o x ,   O p e r a   8 . 0 + ,   S a f a r i  
                 x m l H t t p   =   n e w   X M L H t t p R e q u e s t ( ) ;  
         }  
         c a t c h   ( e )   {  
                 / /   I n t e r n e t   E x p l o r e r  
                 t r y   {  
                         x m l H t t p   =   n e w   A c t i v e X O b j e c t ( " M s x m l 2 . X M L H T T P " ) ;  
                 }  
                 c a t c h   ( e )   {  
                         x m l H t t p   =   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 " ) ;  
                 }  
         }  
         r e t u r n   x m l H t t p ;  
 }  
  
  
  
 f u n c t i o n   g e t I n f o ( a a )  
 {  
   x m l H t t p 1   =   G e t X m l H t t p O b j e c t ( ) ;  
                 i f   ( x m l H t t p 1   = =   n u l l )   {  
                         a l e r t ( " Y o u r   b r o w s e r   d o e s   n o t   s u p p o r t   A J A X ! " ) ;  
                         r e t u r n ;  
                 }  
                 v a r   u r l   =   " / S K Y W / g e t B o o k T y p e . a s p x " ;  
                 u r l   + =   " ? i d = " + a a + " & r a d o m = "   +   M a t h . r a n d o m ( ) ;  
                 x m l H t t p 1 . o n r e a d y s t a t e c h a n g e   =   g e t I n f o S t a t e C h a n g e d ;  
  
                 x m l H t t p 1 . o p e n ( " G E T " ,   u r l ,   t r u e ) ;  
                 x m l H t t p 1 . s e t R e q u e s t H e a d e r ( " C a c h e - C o n t r o l " ,   " n o - c a c h e " ) ;  
                 x m l H t t p 1 . s e n d ( n u l l ) ;  
 }  
  
 f u n c t i o n   g e t I n f o S t a t e C h a n g e d ( )   {  
         i f   ( x m l H t t p 1 . r e a d y S t a t e   = =   4 )   {  
                 v a r   r e s p o n e T e x t   =   x m l H t t p 1 . r e s p o n s e T e x t ;  
                 / /                 a l e r t ( r e s p o n e T e x t ) ;  
                 i f   ( r e s p o n 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 ( " b o o k T y p e " ) . i n n e r H T M L   =   " " ;  
  
                 }  
                 e l s e   {  
                         / / a l e r t ( r e s p o n 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 ( " b o o k T y p e " ) . i n n e r H T M L   =   r e s p o n e T e x t ;  
  
                 }  
         }  
 }  
  
  
  
  
  
 
