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