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