ÿþv a r   $ j   =   j Q u e r y . n o C o n f l i c t ( ) ;  
 v a r   $   =   { } ;  
 v a r   w i n d o w F o c u s   =   t r u e ;  
 v a r   u s e r n a m e ;  
 v a r   u s e r i d ;  
 v a r   c h a t H e a r t b e a t C o u n t   =   0 ;  
 v a r   m i n C h a t H e a r t b e a t   =   1 0 0 0 ;  
 v a r   m a x C h a t H e a r t b e a t   =   3 3 0 0 0 ;  
 v a r   c h a t H e a r t b e a t T i m e   =   m i n C h a t H e a r t b e a t ;  
 v a r   o r i g i n a l T i t l e   =   " EHB9  'D'ED  |   a l a m l . c o . i l " ;  
 v a r   b l i n k O r d e r   =   0 ;  
 v a r   m y s t a t u s   =   0 ;  
 v a r   i s r e f r e s h   =   f a l s e ;  
  
 v a r   c h a t b o t t o m w i d t h = 1 6 0 ;  
  
 v a r   c h a t b o x F o c u s   =   n e w   A r r a y ( ) ;  
 v a r   n e w M e s s a g e s   =   n e w   A r r a y ( ) ;  
 v a r   n e w M e s s a g e s W i n   =   n e w   A r r a y ( ) ;  
 v a r   o p e n e d C h a t B o x e s   =   n e w   A r r a y ( ) ;  
 v a r   c h a t B o x e s   =   n e w   A r r a y ( ) ;  
 v a r   s m i l e y _ a r r a y   =   [ ' ( Y ) ' ,   ' ( N ) ' ,   ' ( B ) ' ,   ' ( D ) ' ,   ' ( X ) ' ,   ' ( Z ) ' ,   ' : - [ ' ,   ' ( } ) ' ,   ' ( { ) ' ,   ' : - ) ' ,   ' : D ' ,   ' : O ' ,   ' : P ' ,   ' ; ) ' ,   ' : ) ' ,   ' : S ' ,   ' : | ' ,   ' : ` ( ' ,   ' : ( ' ,   ' : $ ' ,   ' ( H ) ' ,   ' : @ ' ,   ' ( A ) ' ,   ' ( 6 ) ' ,   ' ( L ) ' ,   ' ( U ) ' ,   ' ( K ) ' ,   ' ( G ) ' ,   ' ( F ) ' ,   ' ( W ) ' ,   ' ( P ) ' ,   ' ( ~ ) ' ,   ' ( T ) ' ,   ' ( @ ) ' ,   ' ( & ) ' ,   ' ( C ) ' ,   ' ( I ) ' ,   ' ( S ) ' ,   ' ( 8 ) ' ,   ' ( O E ) ' ,   ' ( ^ ) ' ,   ' ( O ) ' ,   ' ( R ) ' ,   ' ( # ) ' ,   ' ( ? ) ' ,   ' ( % ) ' ,   ' ( E ) ' ,   ' ( P I ) ' ,   ' ( S O ) ' ,   ' ( M O ) ' ,   ' ( I P ) ' ,   ' ( A P ) ' ,   ' ( A U ) ' ,   ' ( M P ) ' ,   ' ( B A H ) ' ,   ' ×××' ,   ' ÔÐ6 ' ,   ' : : : ' ,   ' â4 ' ,   ' 5 æ×Õç' ,   ' Öé' , ' Ó3 Ó' , ' Õâ2 ' , ' 1 àâá' , ' 1 àÕÝ' , ' 1 ÑÙÙ' , ' ÜÐ1 ' , ' Ó7 8 7 8 ' ] ;  
 v a r   s m i l e y _ x h t m l   =   [ ' t h u m b s _ u p ' ,   ' t h u m b s _ d o w n ' ,   ' b e e r _ y u m ' ,   ' m a r t i n i _ s h a k e n ' ,   ' g i r l _ h a n d s a c r o s s a m e r i c a ' ,   ' g u y _ h a n d s a c r o s s a m e r i c a ' ,   ' b a t ' ,   ' g i r l _ h u g ' ,   ' d u d e _ h u g ' ,   ' r e g u l a r _ s m i l e ' ,   ' t e e t h _ s m i l e ' ,   ' o m g _ s m i l e ' ,   ' t o u n g e _ s m i l e ' ,   ' w i n k _ s m i l e ' ,   ' s a d _ s m i l e ' ,   ' c o n f u s e d _ s m i l e ' ,   ' w h a t c h u t a l k i n g a b o u t _ s m i l e ' ,   ' c r y _ s m i l e ' ,   ' c r y _ s m i l e ' ,   ' e m b a r e s s e d _ s m i l e ' ,   ' s h a d e s _ s m i l e ' ,   ' a n g r y _ s m i l e ' ,   ' a n g e l _ s m i l e ' ,   ' d e v i l _ s m i l e ' ,   ' h e a r t ' ,   ' b r o k e n _ h e a r t ' ,   ' k i s s ' ,   ' p r e s e n t ' ,   ' r o s e ' ,   ' w i l t e d _ r o s e ' ,   ' c a m e r a ' ,   ' f i l m ' ,   ' p h o n e ' ,   ' k i t t y k a y ' ,   ' b o w w o w ' ,   ' c o f f e e ' ,   ' l i g h t b u l b ' ,   ' m o o n ' ,   ' m u s i c a l _ n o t e ' ,   ' e n v e l o p e _ o p e n ' ,   ' c a k e ' ,   ' c l o c k ' ,   ' r a i n b o w ' ,   ' s u n ' ,   ' q u e s t i o n m a r k ' ,   ' h s ' ,   ' e n v e l o p e ' ,   ' p i z z a ' ,   ' s o c c e r _ b a l l ' ,   ' m o n e y ' ,   ' i s l a n d ' ,   ' p l a n e ' ,   ' a u t o ' ,   ' m o b i l e _ p h o n e ' ,   ' s h e e p ' ,   ' l o l 1 ' ,   ' h a 6 ' ,   ' j u m p 1 ' ,   ' j u m p 2 ' ,   ' l o l 5 ' , ' n s a p 1 ' , ' n s a p 2 ' , ' w o w 1 ' , ' s l e e p 1 ' , ' s l e e p 2 ' , ' b y e 1 ' , ' 2 3 2 3 ' , ' s m o k e 1 ' ] ;  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 $ j ( d o c u m e n t ) . r e a d y ( f u n c t i o n   ( )   {  
         D i s a b l e C h a t ( ) ;  
         s t a r t C h a t S e s s i o n ( ) ;  
         $ j ( w i n d o w ) . b i n d ( " f o c u s " ,   f u n c t i o n   ( e v e n t )   {  
                 w i n d o w F o c u s   =   t r u e ;  
                 w i n d o w . f o c u s ( ) ;  
         } ) . b i n d ( " b l u r " ,   f u n c t i o n   ( e v e n t )   {  
  
                 w i n d o w F o c u s   =   f a l s e ;  
         } ) ;  
         $ j ( d o c u m e n t ) . c l i c k ( f u n c t i o n   ( )   {  
                 w i n d o w F o c u s   =   t r u e ;  
         } ) ;  
  
         $ j ( w i n d o w ) . r e s i z e ( f u n c t i o n   ( )   {  
                 r e s i z e b o t t o m c o n t a i n e r ( ) ;  
                 r e s t r u c t u r e C h a t B o x e s ( ) ;  
         } ) ;  
 } ) ;  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   r e s t r u c t u r e C h a t B o x e s ( )   {  
 	 a l i g n   =   0 ;  
 	 f o r   ( x   i n   c h a t B o x e s )   {  
 	 	 c h a t b o x t i t l e   =   c h a t B o x e s [ x ] ;  
 	 	 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
 	 	         i f   ( a l i g n   = =   0 )   {  
 	 	                 i f   ( B r o w s e r . V e r s i o n ( )   < =   7 )    
 	 	                         {  
 	 	                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 9 0 ) ;  
 	 	                         }  
 	 	                         e l s e  
 	 	                         {  
 	 	                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 7 2 ) ;  
 	 	                         }  
 	 	         }   e l s e   {  
 	 	                 i f   ( B r o w s e r . V e r s i o n ( )   < =   7 )   {  
 	 	                         w i d t h   =   ( a l i g n )   *   ( c h a t b o t t o m w i d t h   +   7 )   +   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 9 0 ;  
 	 	                 }  
 	 	                 e l s e   {  
 	 	                         w i d t h   =   ( a l i g n )   *   ( c h a t b o t t o m w i d t h   +   7 )   +   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 7 2 ;  
 	 	                 }  
  
 	 	                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   w i d t h   +   ' p x ' ) ;  
 	 	         }  
 	 	         a l i g n + + ;  
 	 	 }  
 	 	 $ j ( " # c h a t b o x b o t t o m _ "   +   c h a t b o x t i t l e ) . c s s ( ' w i d t h ' ,   c h a t b o t t o m w i d t h - 2 0 ) ;  
 	 }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c h a t W i t h ( c h a t u s e r , n a m e )   {  
 	 c r e a t e C h a t B o x ( c h a t u s e r , n a m e ) ;  
 	 $ j ( " # c h a t b o x _ "   +   c h a t u s e r   +   "   . c h a t b o x t e x t a r e a " ) . f o c u s ( ) ;  
 	 S h o w U s e r s L i s t ( ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c r e a t e C h a t B o x ( c h a t b o x t i t l e , u c n a m e , m i n i m i z e C h a t B o x )   {  
 	 i f   ( $ j ( " # c h a t b o x _ " + c h a t b o x t i t l e ) . l e n g t h   >   0 )   {  
 	         i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' )   = =   ' n o n e '   | |   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' )   = =   ' ' )   {  
 	                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
 	                 i f   ( ! i s r e f r e s h )   {  
 	                         o p e n e d C h a t B o x e s . p u s h ( c h a t b o x t i t l e ) ;  
 	                         s e t o p e n c o o k i e ( ) ;  
 	                 } 	                  
 	                 m i n i m i z e A l l C h a t B o x ( c h a t b o x t i t l e ) ;  
 	                 r e s i z e b o t t o m c o n t a i n e r ( ) ;  
                         r e s t r u c t u r e C h a t B o x e s ( ) ;  
 	 	 }  
 	 	 $ j ( " # c h a t b o x _ " + c h a t b o x t i t l e + "   . c h a t b o x t e x t a r e a " ) . f o c u s ( ) ;  
 	 	 G e t U s e r s D e t ( c h a t b o x t i t l e ) ;  
 	 	 r e t u r n ;  
 	 }  
 $ j ( "   < d i v   / > " ) . a t t r ( " i d " ,   " c h a t b o x _ "   +   c h a t b o x t i t l e )  
 	 . a d d C l a s s ( " c h a t b o x " )  
 	 . h t m l ( ' < d i v   c l a s s = " c h a t b o x h e a d " > < t a b l e   c e l l s p a c i n g = " 0 "   c e l l p a d d i n g = " 0 "   b o r d e r = " 0 "   d i r = " r t l "   w i d t h = " 2 2 3 p x " > < t r > < t d   w i d t h = " 7 p x " > & n b s p ; < / t d > < t d   r o w s p a n = " 2 "   a l i g n = " r i g t h "   v a l i g n = " t o p "   s t y l e = " b a c k g r o u n d - c o l o r : # E C E F F 5 ; " > < i m g   o n c l i c k = " S h o w U s e r D e t ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) ; "   c l a s s = " u c p i c "   s r c = " M a k e T h u m b n a i l 1 . a s p x ? f i l e = V I R A R T I C L E S / c u i p i c s / c u n o p i c . p n g & w i d t h = 4 0 & h e i g h t = 4 0 " > < / t d > < t d   v a l i g n = " m i d d l e "   a l i g n = " r i g h t "   w i d t h = " 1 8 0 p x "   o n c l i c k = " j a v a s c r i p t : t o g g l e C h a t B o x G r o w t h ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) ; "   s t y l e = " c u r s o r : p o i n t e r ; " > < d i v   c l a s s = " c h a t b o x t i t l e " > '   +   u c n a m e   +   ' < / d i v > < / t d > < t d   a l i g n = " l e f t "   v a l i g n = " t o p "   w i d t h = " 3 0 p x "   s t y l e = " p a d d i n g - l e f t : 7 p x ; p a d d i n g - t o p : 7 p x ; " > < d i v   c l a s s = " c h a t b o x o p t i o n s " > < a   s t y l e = " t e x t - d e c o r a t i o n : n o n e ; "   h r e f = " j a v a s c r i p t : v o i d ( 0 ) "   o n m o u s e o v e r = " t h i s . s t y l e . c o l o r = \ ' # 3 3 6 6 9 9 \ ' ; "   o n m o u s e o u t = " t h i s . s t y l e . c o l o r = \ ' w h i t e \ ' ; "   o n c l i c k = " j a v a s c r i p t : t o g g l e C h a t B o x G r o w t h ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) " > - < / a >   < a   s t y l e = " t e x t - d e c o r a t i o n : n o n e ; "   h r e f = " j a v a s c r i p t : v o i d ( 0 ) "   o n m o u s e o v e r = " t h i s . s t y l e . c o l o r = \ ' # 3 3 6 6 9 9 \ ' ; "   o n m o u s e o u t = " t h i s . s t y l e . c o l o r = \ ' w h i t e \ ' ; "   o n c l i c k = " j a v a s c r i p t : c l o s e C h a t B o x ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) " > X < / a > < / d i v > < / t d > < / t r > < t r   s t y l e = " b a c k g r o u n d - c o l o r : # E C E F F 5 ; " > < t d   w i d t h = " 7 p x " > & n b s p ; < / t d > < t d   c o l s p a n = " 2 "   v a l i g n = " t o p " > < d i v   c l a s s = " a b o u t t x t " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " o p t i o n s d i v " > < a   c l a s s = " o p t i o n s "   h r e f = " j a v a s c r i p t : s h o w o p t i o n s ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) " > 'EC'FJ'*< / a > < a   c l a s s = " o p t i o n s "   h r e f = " j a v a s c r i p t : S h o w U s e r D e t ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) " > *A'5JD  '8'AJ)< / a > < / d i v > < b r   c l e a r = " a l l "   / > < / t d > < / t r > < / t a b l e > < / d i v > < d i v   c l a s s = " c h a t b o x c o n t e n t " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " c h a t b o x s t s " > < i m g   o n c l i c k = " s e n d n u d g e ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) ; "   s t y l e = " c u r s o r : p o i n t e r ; f l o a t : l e f t ; "   t i t l e = " '13'D  '4'1)  *F(JG"   a l t = " '13'D  '4'1)  *F(JG"   s r c = " i m a g e s / n u d g e . p n g "   o n m o u s e o v e r = " t h i s . s r c = \ ' i m a g e s / n u d g e . g i f \ ' ; "   o n m o u s e o u t = " t h i s . s r c = \ ' i m a g e s / n u d g e . p n g \ ' ; " > < i m g   o n c l i c k = " l o a d s m i l e y s ( '   +   c h a t b o x t i t l e   +   ' ) ; "   s t y l e = " c u r s o r : p o i n t e r ; f l o a t : l e f t ; "   t i t l e = " '13'D  'JBHF)"   a l t = " '13'D  'JBHF)"   s r c = " i m a g e s / r e g u l a r _ s m i l e . g i f "   o n m o u s e o v e r = " t h i s . s r c = \ ' i m a g e s / t e e t h _ s m i l e . g i f \ ' ; "   o n m o u s e o u t = " t h i s . s r c = \ ' i m a g e s / r e g u l a r _ s m i l e . g i f \ ' ; " > < i m g   s r c = " i m a g e s / u s e r s t a t u s / 1 . p n g "   c l a s s = " i m g s t s " > < i m g   s r c = " i m a g e s / u s e r s t a t u s / w r i t e m e s s a g e . g i f "   c l a s s = " w r i t e m e s s a g e " > '   +  
 	 ' < a   i d = " S h o w S e n d W a i t L o a d e r t "   c l a s s = " S h o w S e n d W a i t L o a d e r t " > JBHE  ('13'D  'D13'D)< / a > < i m g   i d = " S h o w S e n d W a i t L o a d e r "   c l a s s = " S h o w S e n d W a i t L o a d e r "   s r c = " i m a g e s / g l o a d e r . g i f "   b o r d e r = " 0 "   / > '   +  
 	 ' < / d i v > < d i v   c l a s s = " c h a t b o x i n p u t " > < t e x t a r e a   c l a s s = " c h a t b o x t e x t a r e a "   o n f o c u s = " w i n d o w F o c u s   =   t r u e ; d o c u m e n t . t i t l e   =   o r i g i n a l T i t l e ; "   o n k e y d o w n = " j a v a s c r i p t : r e t u r n   c h e c k C h a t B o x I n p u t K e y ( e v e n t , t h i s , \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) ; " > < / t e x t a r e a > < / d i v > '   +  
 	 ' < d i v   c l a s s = " c h a t b o x b o t t o m "   i d = " c h a t b o x b o t t o m _ '   +   c h a t b o x t i t l e   +   ' "   t i t l e = " '   +   u c n a m e   +   ' " > < d i v   c l a s s = " c h a t b o x t i t l e "   s t y l e = " t e x t - a l i g n : r i g h t ; "   o n c l i c k = " j a v a s c r i p t : t o g g l e C h a t B o x G r o w t h ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) ; " > '   +   u c n a m e   +   ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " c h a t b o x o p t i o n s b o t t o m " > < a   s t y l e = " t e x t - d e c o r a t i o n : n o n e ; "   h r e f = " j a v a s c r i p t : v o i d ( 0 ) "   o n m o u s e o v e r = " t h i s . s t y l e . c o l o r = \ ' o r a n g e \ ' ; "   o n m o u s e o u t = " t h i s . s t y l e . c o l o r = \ ' w h i t e \ ' ; "   o n c l i c k = " j a v a s c r i p t : c l o s e C h a t B o x ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) " > X < / a >   < a   s t y l e = " t e x t - d e c o r a t i o n : n o n e ; "   h r e f = " j a v a s c r i p t : v o i d ( 0 ) "   o n m o u s e o v e r = " t h i s . s t y l e . c o l o r = \ ' o r a n g e \ ' ; "   o n m o u s e o u t = " t h i s . s t y l e . c o l o r = \ ' w h i t e \ ' ; "   o n c l i c k = " j a v a s c r i p t : t o g g l e C h a t B o x G r o w t h ( \ ' '   +   c h a t b o x t i t l e   +   ' \ ' ) " > - < / a > < i m g   s r c = " i m a g e s / u s e r s t a t u s / w r i t e m e s s a g e . g i f "   c l a s s = " w r i t e m e s s a g e " > < / d i v > ' )  
 	 . a p p e n d T o ( $ j ( " b o d y " ) ) ;  
 	 	 	        
 	 $ j ( " # c h a t b o x _ " + c h a t b o x t i t l e ) . c s s ( ' b o t t o m ' ,   ' 0 p x ' ) ;  
 	  
 	 c h a t B o x e s l e n g t h   =   0 ;  
 	 $ j ( ' # c h a t b o x b o t t o m _ '   +   c h a t b o x t i t l e ) . t i p s y ( { g r a v i t y :   ' s ' } ) ;  
 	 f o r   ( x   i n   c h a t B o x e s )   {  
 	 	 i f   ( $ j ( " # c h a t b o x _ " + c h a t B o x e s [ x ] ) . c s s ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
 	 	 	 c h a t B o x e s l e n g t h + + ;  
 	 	 }  
 }  
 	 i f   ( c h a t B o x e s l e n g t h   = =   0 )    
 	 {  
 	                 i f   ( B r o w s e r . V e r s i o n ( )   < =   7 )  
 	                 {  
 	                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 9 0 ) ;  
 	                         / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   p a r s e I n t ( $ j ( " # u s e r l i s t " ) . c s s ( ' r i g h t ' ) )   +   2 0 6 ) ;  
 	                 }  
 	                 e l s e  
 	                 {  
 	                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 7 2 ) ;  
 	                 }  
         }    
         e l s e    
         {  
         	         i f   ( B r o w s e r . V e r s i o n ( )   < =   7 )    
         	         {  
 	                         w i d t h   =   ( a l i g n )   *   ( c h a t b o t t o m w i d t h   +   7 )   +   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 9 0 ;  
 	                 }  
 	                 e l s e  
 	                 {  
 	                         w i d t h   =   ( a l i g n )   *   ( c h a t b o t t o m w i d t h   +   7 )   +   C o n v e r t F r o m P e r c e n t T o P i x s ( ' 4 ' )   +   1 7 2 ;  
 	                 }  
 	 	 $ j ( " # c h a t b o x _ " + c h a t b o x t i t l e ) . c s s ( ' r i g h t ' ,   w i d t h + ' p x ' ) ;  
 	 }  
 	 G e t U s e r s D e t ( c h a t b o x t i t l e ) ;  
 	 c h a t B o x e s . p u s h ( c h a t b o x t i t l e ) ;  
 	 i f   ( m i n i m i z e C h a t B o x   = =   1 )   {  
 	 	 m i n i m i z e d C h a t B o x e s   =   n e w   A r r a y ( ) ;  
  
 	 	 i f   ( $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) )   {  
 	 	 	 m i n i m i z e d C h a t B o x e s   =   $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) . s p l i t ( / \ | / ) ;  
 	 	 }  
 	 	 m i n i m i z e   =   0 ;  
 	 	 f o r   ( j = 0 ; j < m i n i m i z e d C h a t B o x e s . l e n g t h ; j + + )   {  
 	 	 	 i f   ( m i n i m i z e d C h a t B o x e s [ j ]   = =   c h a t b o x t i t l e )   {  
 	 	 	 	 m i n i m i z e   =   1 ;  
 	 	 	 }  
 	 	 }  
  
 	 	 i f   ( m i n i m i z e   = =   1 )   {  
 	 	         $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x c o n t e n t ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	         $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x i n p u t ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 }  
 	 }  
  
 	 c h a t b o x F o c u s [ c h a t b o x t i t l e ]   =   f a l s e ;  
 	 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . b l u r ( f u n c t i o n ( )   {  
 	         c h a t b o x F o c u s [ c h a t b o x t i t l e ]   =   f a l s e ;  
 	         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . r e m o v e C l a s s ( ' c h a t b o x t e x t a r e a s e l e c t e d ' ) ;  
 	 } ) . f o c u s ( f u n c t i o n ( )   {  
 	         c h a t b o x F o c u s [ c h a t b o x t i t l e ]   =   t r u e ;  
 	         n e w M e s s a g e s [ c h a t b o x t i t l e ]   =   f a l s e ;  
 	         $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x h e a d ' ) . r e m o v e C l a s s ( ' c h a t b o x b l i n k ' ) ;  
 	         $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x b o t t o m ' ) . r e m o v e C l a s s ( ' c h a t b o x b l i n k ' ) ;  
 	         $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . u c p i c ' ) . c s s ( ' b a c k g r o u n d - c o l o r ' ,   ' # 6 2 6 2 6 2 ' ) ;  
 	         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . a d d C l a s s ( ' c h a t b o x t e x t a r e a s e l e c t e d ' ) ;  
 	 } ) ;  
 	 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c l i c k ( f u n c t i o n ( )   {  
 	 i f   ( $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x c o n t e n t ' ) . c s s ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
 	         i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . c s s ( ' d i s p l a y ' )   = =   ' n o n e '   | |   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . c s s ( ' d i s p l a y ' )   = =   ' '   | |   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . c s s ( ' d i s p l a y ' )   = =   n u l l )  
 	                 {  
 	                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . f o c u s ( ) ;  
 	                 }  
 	         }  
 	 } ) ;  
  
 	 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
 	 i f   ( ! i s r e f r e s h )   {  
 	         o p e n e d C h a t B o x e s . p u s h ( c h a t b o x t i t l e ) ;  
 	         s e t o p e n c o o k i e ( ) ;  
 	 }  
 	 m i n i m i z e A l l C h a t B o x ( c h a t b o x t i t l e ) ;  
         r e s i z e b o t t o m c o n t a i n e r ( ) ;  
         r e s t r u c t u r e C h a t B o x e s ( ) ; 	  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   m i n i m i z e A l l C h a t B o x ( c h a t b o x t i t l e )   {  
         f o r   ( x   i n   c h a t B o x e s )   {  
                 c b   =   c h a t B o x e s [ x ] ;  
                 i f   ( c b   ! =   c h a t b o x t i t l e )   {  
                         i f   ( $ j ( " # c h a t b o x _ "   +   c b ) . c s s ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
                                 / / t o g g l e C h a t B o x G r o w t h ( c b ) ;  
                                 m i n i m i z e o n e ( c b ) ;  
                         }  
                 }  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   m i n i m i z e o n e ( c h a t b o x t i t l e )  
 {  
 	 	 v a r   n e w C o o k i e   =   c h a t b o x t i t l e ;  
  
 	 	 i f   ( $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) )   {  
 	 	 	 n e w C o o k i e   + =   ' | ' + $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) ;  
 	 	 }  
  
  
 	 	 $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ,   n e w C o o k i e ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x c o n t e n t ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x i n p u t ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x s t s ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x h e a d ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   G e t U s e r s D e t ( c h a t b o x t i t l e )   {  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = G e t U s e r s D e t " ,   {   i d :   c h a t b o x t i t l e } ,   f u n c t i o n ( d a t a )   {  
         $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n ( i ,   i t e m )   {  
                 i f   ( i t e m )   {  
                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . u c p i c " ) . a t t r ( ' s r c ' ,   ' M a k e T h u m b n a i l 1 . a s p x ? f i l e = '   +   i t e m . p t h   +   ' & w i d t h = 4 0 & h e i g h t = 4 0 ' ) ;  
                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . a b o u t t x t " ) . t e x t ( i t e m . a b o u t ) ;  
                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . i m g s t s " ) . a t t r ( ' s r c ' ,   ' i m a g e s / u s e r s t a t u s / '   +   i t e m . s t a t e   +   ' . p n g ' ) ;  
                 }  
         } ) ;  
         } , " j s o n " )  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   G e t U s e r s C o u n t ( )   {  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = G e t C h a t U s e r s N u m " ,   c a c h e :   f a l s e ,   d a t a T y p e :   " j s o n " ,   s u c c e s s :   f u n c t i o n ( d a t a )   {  
         i f   ( d o c u m e n t . a l l )   {  
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' u s e r c o u n t ' ) . i n n e r T e x t   =   " ( "   +   d a t a . c o u n t   +   " ) " ;  
         }   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 ( ' u s e r c o u n t ' ) . t e x t C o n t e n t   =   " ( "   +   d a t a . c o u n t   +   " ) " ;  
         }  
 }    
 } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   G e t C h a t U s e r s ( )   {  
         $ j . a j a x ( {  
                 u r l :   " c h a t . a s p x ? a c t i o n = G e t C h a t U s e r s " ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   " j s o n " ,  
                 b e f o r e S e n d :   f u n c t i o n   ( )   {   } ,  
                 s u c c e s s :   f u n c t i o n   ( d a t a )   {  
                         $ j ( " # u s e r l i s t " ) . e m p t y ( ) ;  
                         $ j ( " # u s e r l i s t " ) . a p p e n d ( " < d i v   c l a s s = \ " c h a t b o x h e a d c c \ " > < t a b l e   c e l l p a d d i n g = \ " 0 \ "   c e l l s p a c i n g = \ " 0 \ "   b o r d e r = \ " 0 \ "   w i d t h = \ " 1 0 0 % \ " > < t r > "   +  
                         " < t d   a l i g n = \ " r i g h t \ " > < d i v   i d = \ " m y s t a t u s \ " > < a   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " s h o w m y s t a t u s ( ) ; \ "   o n m o u s e o v e r = \ " m y s t a t u s i . s r c = ' i m a g e s / c h u a r r d o w n o n o v e r . p n g ' ; \ "   o n m o u s e o u t = \ " m y s t a t u s i . s r c = ' i m a g e s / c h u a r r d o w n o o u t . p n g ' ; \ " > < i m g   i d = \ " m y s t a t u s i m a g e \ "   b o r d e r = \ " 0 \ "   s r c = \ " i m a g e s / u s e r s t a t u s / 1 . p n g \ "   a l t = \ " H69\ "   / > < i m g   b o r d e r = \ " 0 \ "   i d = \ " m y s t a t u s i \ "   s r c = \ " i m a g e s / c h u a r r d o w n o o u t . p n g \ "   / > < / a > < / d i v > < / t d > "   +  
                         " < t d   d i r = \ " r t l \ " > < t a b l e   c e l l p a d d i n g = \ " 0 \ "   c e l l s p a c i n g = \ " 0 \ "   b o r d e r = \ " 0 \ "   w i d t h = \ " 1 0 0 % \ " > < t r > < t d   w i d t h = \ " 1 0 5 p x \ " > < s p a n   s t y l e = \ " f o n t - f a m i l y : t a h o m a ; f o n t - s i z e : 8 p t ; f o n t - w e i g h t : b o l d ; \ "   c l a s s = \ " c h a t b o x t i t l e \ "   o n c l i c k = \ " S h o w U s e r s L i s t ( ) ; \ " > D'&-)  '5/B'!< / s p a n > < / t d > "   +  
                         " < t d   s t y l e = \ " p a d d i n g - l e f t : 7 p x ; \ " > < s p a n   c l a s s = \ " c h a t b o x o p t i o n s \ " > < a   h r e f = \ " j a v a s c r i p t : v o i d ( 0 ) \ "   o n m o u s e o v e r = \ " t h i s . s t y l e . c o l o r = ' # 3 3 6 6 9 9 ' ; \ "   o n m o u s e o u t = \ " t h i s . s t y l e . c o l o r = ' w h i t e ' ; \ "   o n c l i c k = \ " j a v a s c r i p t : S h o w U s e r s L i s t ( ) ; \ "   s t y l e = \ " p a d d i n g - l e f t : 7 p x ; t e x t - d e c o r a t i o n : n o n e ; \ " > X < / a > < / s p a n > < / t d > < / t r > < / t a b l e > < / t d > < / t r > < t r > < t d   h e i g h t = \ " 3 p x \ " > < / t d > < / t r > < t r > < t d > < d i v   i d = \ " o n l i n e u s e r s l i s t \ "   c l a s s = \ " u s e r l i s t \ " > < / d i v > < / t d > < / t r > < / t a b l e > < / d i v > " ) ;  
                         v a r   l l   =   ' ' ;  
                         i f   ( d a t a . i t e m s . l e n g t h   >   1 3 )   {   l l   =   ' 1 6 0 p x ' ;   }   e l s e   {   l l   =   ' 1 8 0 p x ' ;   }  
                         $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n   ( i ,   i t e m )   {  
                                 i f   ( i t e m )   {   / /   f i x   s t r a n g e   i e   b u g  
                                         $ j ( " # u s e r l i s t " ) . a p p e n d ( " < a   h r e f = ' j a v a s c r i p t : '   o n c l i c k = \ " c h a t W i t h ( ' "   +   i t e m . i d   +   " ' , ' "   +   i t e m . n a m e   +   " ' ) ; \ "   c l a s s = ' o n l i n e u s e r s ' > < t a b l e   b o r d e r = ' 0 '   c e l l s p a c i n g = ' 2 '   c e l l p a d d i n g = ' 2 '   s t y l e = ' w i d t h : "   +   l l   +   " ; ' > < t r > < t d   a l i g n = ' r i g h t ' > < i m g   s r c = ' "   +   i t e m . p t h   +   " '   c l a s s = ' u s e r s l i s t i m a g e s ' > < / t d > < t d   s t y l e = ' p a d d i n g - r i g h t : 5 p x ; '   a l i g n = ' r i g h t '   w i d t h = ' 9 0 % '   v a l i g n = ' m i d d l e ' > "   +   i t e m . n a m e   +   " < / t d > < t d   a l i g n = ' l e f t '   v a l i g n = ' m i d d l e ' > < i m g   b o r d e r = ' 0 p x '   s r c = ' i m a g e s / u s e r s t a t u s / "   +   i t e m . s t a t u s   +   " . p n g ' > < / t d > < / t r > < / t a b l e > < / a > < d i v   c l a s s = ' s e p ' > < / d i v > " ) ;  
                                 }  
                         } ) ;  
                 }  
         } ) ;  
 }  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   C o n v e r t F r o m P e r c e n t T o P i x s ( x )   {  
         v a r   d o c w i d t h   =   d o c u m e n t . b o d y . c l i e n t W i d t h ;  
         r e t u r n   ( d o c w i d t h   *   x )   /   1 0 0 ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c h a t H e a r t b e a t ( )   {  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r l i s t " ) . s t y l e . d i s p l a y   ! =   ' '   | |   d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r l i s t " ) . s t y l e . d i s p l a y   ! =   ' n o n e ' )   {  
                 G e t C h a t U s e r s ( )  
         }  
         i f   ( m y s t a t u s   < 2 )   {  
                 i f   ( w i n d o w F o c u s )   {  
                         s e t U s e r S t a t u s ( 1 ) ;  
                 }  
                 e l s e   {  
                         s e t U s e r S t a t u s ( 2 ) ;  
                 }  
         }  
  
         G e t U s e r s C o u n t ( ) ;  
         s e t s t a t u s A l l ( ) ;  
          
         v a r   i t e m s f o u n d   =   0 ;  
 	 i f   ( w i n d o w F o c u s   = =   f a l s e )   {  
 	 	 v a r   b l i n k N u m b e r   =   0 ;  
 	 	 v a r   t i t l e C h a n g e d   =   0 ;  
 	 	 f o r   ( x   i n   n e w M e s s a g e s W i n )   {  
 	 	 	 i f   ( n e w M e s s a g e s W i n [ x ]   = =   t r u e )   {  
 	 	 	         + + b l i n k N u m b e r ;  
 	 	 	 	 i f   ( b l i n k N u m b e r   > =   b l i n k O r d e r )   {  
 	 	 	 	         / / d o c u m e n t . t i t l e   =   x   + '   ÛÕêÑ  . . .   ' ;  
 	 	 	 	         d o c u m e n t . t i t l e   =   ' 13'D)  ,/J/)' ;  
 	 	 	 	 	 t i t l e C h a n g e d   =   1 ;  
 	 	 	 	 	 b r e a k ; 	  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 	  
 	 	 i f   ( t i t l e C h a n g e d   = =   0 )   {  
 	 	 	 d o c u m e n t . t i t l e   =   o r i g i n a l T i t l e ;  
 	 	 	 b l i n k O r d e r   =   0 ;  
 	 	 }   e l s e   {  
 	 	 	 + + b l i n k O r d e r ;  
 	 	 }  
  
 	 }   e l s e   {  
 	 	 f o r   ( x   i n   n e w M e s s a g e s W i n )   {  
 	 	 	 n e w M e s s a g e s W i n [ x ]   =   f a l s e ;  
 	 	 }  
 	 }  
  
 	 f o r   ( x   i n   n e w M e s s a g e s )   {  
 	 	 i f   ( n e w M e s s a g e s [ x ]   = =   t r u e )   {  
 	 	 	 i f   ( c h a t b o x F o c u s [ x ]   = =   f a l s e )   {  
 	 	 	 	 / / F I X M E :   a d d   t o g g l e   a l l   o r   n o n e   p o l i c y ,   o t h e r w i s e   i t   l o o k s   f u n n y  
 	 	 	         $ j ( ' # c h a t b o x _ '   +   x   +   '   . c h a t b o x h e a d ' ) . t o g g l e C l a s s ( ' c h a t b o x b l i n k ' ) ;  
 	 	 	         $ j ( ' # c h a t b o x _ '   +   x   +   '   . c h a t b o x b o t t o m ' ) . t o g g l e C l a s s ( ' c h a t b o x b l i n k ' ) ;  
 	 	 	         i f   ( $ j ( ' # c h a t b o x _ '   +   x   +   '   . u c p i c ' ) . c s s ( ' b a c k g r o u n d - c o l o r ' )   = =   ' # 1 2 1 2 1 2 ' )   {  
 	 	 	                 $ j ( ' # c h a t b o x _ '   +   x   +   '   . u c p i c ' ) . c s s ( ' b a c k g r o u n d - c o l o r ' ,   ' # 6 2 6 2 6 2 ' ) ;  
 	 	 	         }  
 	 	 	         e l s e   {  
 	 	 	                 $ j ( ' # c h a t b o x _ '   +   x   +   '   . u c p i c ' ) . c s s ( ' b a c k g r o u n d - c o l o r ' ,   ' # 1 2 1 2 1 2 ' ) ;  
 	 	 	         }  
 	 	 	 }  
 	 	 }  
 }  
 $ j . a j a x ( {  
         u r l :   " c h a t . a s p x ? a c t i o n = c h a t h e a r t b e a t " ,  
         c a c h e :   f a l s e ,  
         d a t a T y p e :   " j s o n " ,  
         s u c c e s s :   f u n c t i o n   ( d a t a )   {  
                 $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n   ( i ,   i t e m )   {  
                         i f   ( i t e m )   {   / /   f i x   s t r a n g e   i e   b u g  
                                 c h a t b o x t i t l e   =   i t e m . z ;  
                                 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . l e n g t h   < =   0 )   {  
                                         c r e a t e C h a t B o x ( c h a t b o x t i t l e ,   i t e m . f ) ;  
                                         p l a y S o u n d ( ) ;  
                                 }  
                                 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' )   = =   ' n o n e '   | |   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' )   = =   ' ' )   {  
                                         / / c r e a t e C h a t B o x ( c h a t b o x t i t l e ,   i t e m . f ) ;  
                                         / / p l a y S o u n d ( ) ;  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
                                         r e s t r u c t u r e C h a t B o x e s ( ) ;  
                                         G e t U s e r s D e t ( c h a t b o x t i t l e ) ;  
                                 }  
  
                                 i f   ( i t e m . s   = =   1 )   {  
                                         i t e m . f   =   u s e r n a m e ;  
                                 }  
                                 v a r   c u r D a t e T i m e   =   n e w   D a t e ( ) ;  
                                 v a r   c u r H o u r   =   c u r D a t e T i m e . g e t H o u r s ( ) ;   v a r   c u r M i n   =   c u r D a t e T i m e . g e t M i n u t e s ( ) ;  
                                 v a r   c u r T i m e   =   ( ( c u r H o u r   <   1 0 )   ?   " 0 "   :   " " )   +   c u r H o u r   +   " : "   +   ( ( c u r M i n   <   1 0 )   ?   " 0 "   :   " " )   +   c u r M i n ;  
                                 c h a t b o x t i t l e   =   i t e m . z ;  
                                 i f   ( i t e m . s   = =   2 )   {  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x i n f o " > '   +   i t e m . m   +   ' < / s p a n > < / d i v > ' ) ;  
                                 }   e l s e   {  
                                         n e w M e s s a g e s [ c h a t b o x t i t l e ]   =   t r u e ;  
                                         n e w M e s s a g e s W i n [ c h a t b o x t i t l e ]   =   t r u e ;  
                                         / / n e w M e s s a g e s W i n T [ c h a t b o x t i t l e ]   =   t r u e ;  
                                         v a r   t t   =   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . c h i l d r e n ( " d i v . c h a t b o x m e s s a g e " ) . c h i l d r e n ( " s p a n . c h a t b o x m e s s a g e f r o m : l a s t " ) . t e x t ( ) ;  
                                         i f   ( t t . l e n g t h   >   1 )   {  
                                                 t t   =   t t . s u b s t r i n g ( 0 ,   t t . l e n g t h   -   1 ) ;  
                                         }  
                                         v a r   t t e x t   =   c l e a n t e x t ( s m i l e y ( l i n k i f y _ p l a i n ( i t e m . m . r e p l a c e ( / & a m p ; a m p ; s h ; / g ,   " \ \ " ) ) ) ) ;  
                                         i f   ( t t   = =   i t e m . f )   {  
                                                 i f   ( i t e m . m   = =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " )   {  
                                                         p l a y n u d g e ( c h a t b o x t i t l e ) ;  
                                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D  'DJC  '4'1)  *F(JG< / s p a n > < / d i v > ' ) ;  
                                                 }  
                                                 e l s e   {  
                                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   t t e x t   +   ' < / s p a n > < / d i v > ' ) ;  
                                                 }  
                                         }  
                                         e l s e   {  
                                                 i f   ( t t   = =   ' ' )   {  
                                                         i f   ( i t e m . m   = =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " )   {  
                                                                 p l a y n u d g e ( c h a t b o x t i t l e ) ;  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D  'DJC  '4'1)  *F(JG< / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                         e l s e   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   t t e x t   +   ' < / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                 }  
                                                 e l s e   {  
                                                         i f   ( i t e m . m   = =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " )   {  
                                                                 p l a y n u d g e ( c h a t b o x t i t l e ) ;  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D  'DJC  '4'1)  *F(JG< / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                         e l s e   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   t t e x t   +   ' < / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                 }  
                                         }  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . w r i t e m e s s a g e " ) . c s s ( ' v i s i b i l i t y ' ,   ' h i d d e n ' ) ;  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x o p t i o n s b o t t o m "   +   "   . w r i t e m e s s a g e " ) . c s s ( ' v i s i b i l i t y ' ,   ' h i d d e n ' ) ;  
                                 }  
                                 / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . s c r o l l T o p ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t ) ;  
                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   ' f a s t ' ) ;  
                                 i t e m s f o u n d   + =   1 ;  
                         }  
                         i f   ( w i n d o w F o c u s   = =   f a l s e )   {   p l a y S o u n d ( ) ;   }  
                 } ) ;  
  
                 c h a t H e a r t b e a t C o u n t + + ;  
                 i f   ( i t e m s f o u n d   >   0 )   {  
                         c h a t H e a r t b e a t T i m e   =   m i n C h a t H e a r t b e a t ;  
                         c h a t H e a r t b e a t C o u n t   =   1 ;  
                 }   e l s e   i f   ( c h a t H e a r t b e a t C o u n t   > =   1 0 )   {  
                         c h a t H e a r t b e a t T i m e   * =   2 ;  
                         c h a t H e a r t b e a t C o u n t   =   1 ;  
                         i f   ( c h a t H e a r t b e a t T i m e   >   m a x C h a t H e a r t b e a t )   {  
                                 c h a t H e a r t b e a t T i m e   =   m a x C h a t H e a r t b e a t ;  
                         }  
                 }  
                 s e t T i m e o u t ( ' c h a t H e a r t b e a t ( ) ; ' ,   c h a t H e a r t b e a t T i m e ) ;  
         }  
 } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c l o s e C h a t B o x ( c h a t b o x t i t l e )   {  
         $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e ) . f a d e O u t ( ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
 	 $ j . p o s t ( " c h a t . a s p x ? a c t i o n = c l o s e c h a t " ,   {   c h a t b o x :   c h a t b o x t i t l e   } ,   f u n c t i o n ( d a t a )   {  
 	         R e m o v e F r o m A r r a y ( c h a t b o x t i t l e ) ;  
 	         r e s i z e b o t t o m c o n t a i n e r ( ) ;  
                 r e s t r u c t u r e C h a t B o x e s ( ) ; 	 	  
 	 } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   t o g g l e C h a t B o x G r o w t h ( c h a t b o x t i t l e )   {  
 	 i f   ( $ j ( ' # c h a t b o x _ ' + c h a t b o x t i t l e + '   . c h a t b o x c o n t e n t ' ) . c s s ( ' d i s p l a y ' )   = =   ' n o n e ' )   {      
 	 	  
 	 	 v a r   m i n i m i z e d C h a t B o x e s   =   n e w   A r r a y ( ) ;  
 	 	  
 	 	 i f   ( $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) )   {  
 	 	 	 m i n i m i z e d C h a t B o x e s   =   $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) . s p l i t ( / \ | / ) ;  
 	 	 }  
  
 	 	 v a r   n e w C o o k i e   =   ' ' ;  
  
 	 	 f o r   ( i = 0 ; i < m i n i m i z e d C h a t B o x e s . l e n g t h ; i + + )   {  
 	 	 	 i f   ( m i n i m i z e d C h a t B o x e s [ i ]   ! =   c h a t b o x t i t l e )   {  
 	 	 	 	 n e w C o o k i e   + =   c h a t b o x t i t l e + ' | ' ;  
 	 	 	 }  
 	 	 }  
  
 	 	 n e w C o o k i e   =   n e w C o o k i e . s l i c e ( 0 ,   - 1 )  
  
 	 	 $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ,   n e w C o o k i e ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x c o n t e n t ' ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x i n p u t ' ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x s t s ' ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x h e a d ' ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
 	 	 m i n i m i z e A l l C h a t B o x ( c h a t b o x t i t l e ) ;  
 	 	 / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . s c r o l l T o p ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t ) ;  
 	 	 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   ' f a s t ' ) ;  
 	 	  
 	 }   e l s e   {  
 	 	  
 	 	 v a r   n e w C o o k i e   =   c h a t b o x t i t l e ;  
  
 	 	 i f   ( $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) )   {  
 	 	 	 n e w C o o k i e   + =   ' | ' + $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ) ;  
 	 	 }  
  
  
 	 	 $ j . c o o k i e ( ' c h a t b o x _ m i n i m i z e d ' ,   n e w C o o k i e ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x c o n t e n t ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x i n p u t ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x s t s ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 	 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x h e a d ' ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 	 }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c h e c k C h a t B o x I n p u t K e y ( e v e n t ,   c h a t b o x t e x t a r e a ,   c h a t b o x t i t l e )   {  
         m e s s a g e g   =   $ j ( c h a t b o x t e x t a r e a ) . v a l ( ) ;  
         m e s s a g e   =   $ j ( c h a t b o x t e x t a r e a ) . v a l ( ) ;  
                 i f ( m e s s a g e . l e n g t h = = 1 ) {  
                         $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " ,   " " ) ;  
                         R e m o v e W r i t e M e s s a g e ( c h a t b o x t i t l e ) ;  
                 }  
                 e l s e {  
                         i f   ( $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " )   = =   n u l l   | |   $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " )   = =   " " )   {  
                                 i f   ( m e s s a g e   ! =   ' ' )   {  
                                         $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " ,   " '13'D  'D13'D)" ) ;  
                                         S e n d W r i t e M e s s a g e ( c h a t b o x t i t l e ) ;  
                                 }  
                                 e l s e   {  
                                         $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " ,   " " ) ;  
                                         R e m o v e W r i t e M e s s a g e ( c h a t b o x t i t l e ) ;  
                                 }  
                         }  
                         e l s e   {  
                                 i f   ( m e s s a g e   = =   ' ' )   {  
                                         $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " ,   " " ) ;  
                                         R e m o v e W r i t e M e s s a g e ( c h a t b o x t i t l e ) ;  
                                 }  
                         }  
                 }  
         i f   ( e v e n t . k e y C o d e   = =   1 3   & &   e v e n t . s h i f t K e y   = =   0 )   {  
 	         m e s s a g e   = m e s s a g e g =   m e s s a g e . r e p l a c e ( / ^ \ s + | \ s + $ / g ,   " " ) ;  
 	 	 $ j ( c h a t b o x t e x t a r e a ) . v a l ( ' ' ) ;  
 	 	 $ j ( c h a t b o x t e x t a r e a ) . f o c u s ( ) ;  
 	 	 $ j ( c h a t b o x t e x t a r e a ) . c s s ( ' h e i g h t ' ,   ' 1 6 p x ' ) ;  
 	 	 v a r   c u r D a t e T i m e   =   n e w   D a t e ( )  
 	 	 v a r   c u r H o u r   =   c u r D a t e T i m e . g e t H o u r s ( ) ; v a r   c u r M i n   =   c u r D a t e T i m e . g e t M i n u t e s ( ) ;  
 	 	 v a r   c u r T i m e   = ( ( c u r H o u r   <   1 0 )   ?   " 0 "   :   " " )   +   c u r H o u r   +   " : "   +   ( ( c u r M i n   <   1 0 )   ?   " 0 "   :   " " )   +   c u r M i n ;  
 	 	 i f   ( m e s s a g e   ! =   ' ' )   {  
 	 	         R e m o v e W r i t e M e s s a g e ( c h a t b o x t i t l e ) ;  
 	 	         c h a t H e a r t b e a t T i m e   =   m i n C h a t H e a r t b e a t ;  
 	 	         c h a t H e a r t b e a t C o u n t   =   1 ;  
 	 	                 m e s s a g e   =   m e s s a g e . r e p l a c e ( " / < / g ' & l t ; " ) . r e p l a c e ( " / > / g ' & g t ; " ) . r e p l a c e ( " / \ " / g ' & q u o t ; " ) ;  
 	 	                 m e s s a g e   =   s m i l e y ( l i n k i f y _ p l a i n ( m e s s a g e ) ) ;  
 	 	                 v a r   t t   =   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . c h i l d r e n ( " d i v . c h a t b o x m e s s a g e " ) . c h i l d r e n ( " s p a n . c h a t b o x m e s s a g e f r o m : l a s t " ) . t e x t ( ) ;  
 	 	                 i f   ( t t . l e n g t h   >   1 )   {  
 	 	                         t t   =   t t . s u b s t r i n g ( 0 ,   t t . l e n g t h   -   1 ) ;  
 	 	                 }  
 	 	                 i f   ( t t   = =   u s e r n a m e )   {  
 	 	                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
 	 	                 }  
 	 	                 e l s e   {  
 	 	                         i f   ( t t   = =   ' ' )   {  
 	 	                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e = " c o l o r : # 7 7 7 7 7 7 ; " > '   +   u s e r n a m e   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
 	 	                         }  
 	 	                         e l s e   {  
 	 	                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e = " c o l o r : # 7 7 7 7 7 7 ; " > '   +   u s e r n a m e   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
 	 	                         }  
 	 	                 }  
 	 	                 / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . s c r o l l T o p ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t ) ;  
 	 	                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   ' f a s t ' ) ;  
 	 	                 $ j ( c h a t b o x t e x t a r e a ) . a t t r ( " t i t l e " ,   " " ) ;  
 	 	                 	 	  
 	 	 $ j . a j a x ( {   t y p e :   " p o s t " ,   u r l :   " c h a t . a s p x ? a c t i o n = s e n d c h a t "   ,   d a t a T y p e :   " t e x t " ,   d a t a :   {   t o :   c h a t b o x t i t l e ,   m e s s a g e :   m e s s a g e g . r e p l a c e ( / \ \ / g ,   " & s h ; " ) } ,    
 	 	 b e f o r e S e n d :   f u n c t i o n ( )   { S h o w S e n d W a i t ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s " , 1 ) ;   } ,  
 	 	 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n ( r e q u e s t , e r r o r )   {     a l e r t ( e r r o r ) ; S h o w S e n d W a i t ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s " , 0 ) ;   } ,      
 	 	 s u c c e s s :   f u n c t i o n ( d a t a )   {  
 	 	                 S h o w S e n d W a i t ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s " , 0 ) ;  
  
 	 	 }  
 	 	 } ) ;  
 	 	 }  
 	 	 R e m o v e W r i t e M e s s a g e ( c h a t b o x t i t l e ) ;  
 	 	 c h a t H e a r t b e a t T i m e   =   m i n C h a t H e a r t b e a t ;  
 	 	 c h a t H e a r t b e a t C o u n t   =   1 ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 v a r   a d j u s t e d H e i g h t   =   c h a t b o x t e x t a r e a . c l i e n t H e i g h t ;  
 	 v a r   m a x H e i g h t   =   9 4 ;  
  
 	 i f   ( m a x H e i g h t   >   a d j u s t e d H e i g h t )   {  
 	 	 a d j u s t e d H e i g h t   =   M a t h . m a x ( c h a t b o x t e x t a r e a . s c r o l l H e i g h t ,   a d j u s t e d H e i g h t ) ;  
 	 	 i f   ( m a x H e i g h t )  
 	 	 	 a d j u s t e d H e i g h t   =   M a t h . m i n ( m a x H e i g h t ,   a d j u s t e d H e i g h t ) ;  
 	 	 i f   ( a d j u s t e d H e i g h t   >   c h a t b o x t e x t a r e a . c l i e n t H e i g h t )  
 	 	 	 $ j ( c h a t b o x t e x t a r e a ) . c s s ( ' h e i g h t ' , a d j u s t e d H e i g h t + 8   + ' p x ' ) ;  
 	 }   e l s e   {  
 	 	 $ j ( c h a t b o x t e x t a r e a ) . c s s ( ' o v e r f l o w ' , ' a u t o ' ) ;  
 	 }  
  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w S e n d W a i t ( x , y ) {  
         i f ( y = = 0 ) {  
                 $ j ( x +   "   . S h o w S e n d W a i t L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
                 $ j ( x +   "   . S h o w S e n d W a i t L o a d e r t " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         }  
         i f ( y = = 1 ) {  
                 $ j ( x +   "   . S h o w S e n d W a i t L o a d e r " ) . c s s ( ' d i s p l a y ' , ' i n l i n e - b l o c k ' ) ;  
                 $ j ( x +   "   . S h o w S e n d W a i t L o a d e r t " ) . c s s ( ' d i s p l a y ' , ' i n l i n e - b l o c k ' ) ;  
                 }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s e n d n u d g e ( c h a t b o x t i t l e )   {  
         v a r   c u r D a t e T i m e   =   n e w   D a t e ( )  
         v a r   c u r H o u r   =   c u r D a t e T i m e . g e t H o u r s ( ) ;   v a r   c u r M i n   =   c u r D a t e T i m e . g e t M i n u t e s ( ) ;  
         v a r   c u r T i m e   =   ( ( c u r H o u r   <   1 0 )   ?   " 0 "   :   " " )   +   c u r H o u r   +   " : "   +   ( ( c u r M i n   <   1 0 )   ?   " 0 "   :   " " )   +   c u r M i n ;  
         v a r   m e s s a g e   =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " ;  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = s e n d c h a t " ,   {   t o :   c h a t b o x t i t l e ,   m e s s a g e :   m e s s a g e   } ,   f u n c t i o n   ( d a t a )   {  
                 v a r   t t   =   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . c h i l d r e n ( " d i v . c h a t b o x m e s s a g e " ) . c h i l d r e n ( " s p a n . c h a t b o x m e s s a g e f r o m : l a s t " ) . t e x t ( ) ;  
                 i f   ( t t . l e n g t h   >   1 )   {  
                         t t   =   t t . s u b s t r i n g ( 0 ,   t t . l e n g t h   -   1 ) ;  
                 }  
                 i f   ( t t   = =   u s e r n a m e )   {  
                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D*  '4'1)  *F(JG< / s p a n > < / d i v > ' ) ;  
                         p l a y n u d g e ( c h a t b o x t i t l e ) ;  
                 }  
                 e l s e   {  
                         i f   ( t t   = =   ' ' )   {  
                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e = " c o l o r : # 7 7 7 7 7 7 ; " > '   +   u s e r n a m e   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D*  '4'1)  *F(JG< / s p a n > < / d i v > ' ) ;  
                                 p l a y n u d g e ( c h a t b o x t i t l e ) ;  
                         }  
                         e l s e   {  
                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e = " c o l o r : # 7 7 7 7 7 7 ; " > '   +   u s e r n a m e   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   c u r T i m e   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D*  '4'1)  *F(JG< / s p a n > < / d i v > ' ) ;  
                                 p l a y n u d g e ( c h a t b o x t i t l e ) ;  
                         }  
                 }  
                 / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . s c r o l l T o p ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t ) ;  
                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   ' f a s t ' ) ;  
         } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w U s e r s L i s t ( )   {  
         i f ( $ j ( " # f r i e n d r e q u e s t n o t i f y i d " ) . c s s ( ' d i s p l a y ' ) = = ' b l o c k ' ) { $ j ( " # f r i e n d r e q u e s t n o t i f y i d " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ; }  
         G e t U s e r s C o u n t ( ) ;  
         G e t C h a t U s e r s ( ) ;  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r l i s t " ) . s t y l e . d i s p l a y   = =   ' n o n e '   | |   d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r l i s t " ) . s t y l e . d i s p l a y   = =   ' '   | |   $ j ( ' # u s e r l i s t ' ) . c s s ( ' h e i g h t ' )   = =   ' 0 p x ' )   {  
                 s h o w s e t t i n g s c l o s e ( ) ;  
                 s h o w f r i e n d r e q u e s t c l o s e ( ) ;  
                 m i n i m i z e A l l C h a t B o x ( ) ;  
                 / / $ j ( ' # u s e r l i s t ' ) . a n i m a t e ( {   h e i g h t :   ' 3 0 0 p x '   } )  
                 $ j ( ' # u s e r l i s t ' ) . c s s ( " d i s p l a y " , " b l o c k " ) ;  
                 $ j . c o o k i e ( ' u s e r l i s t _ m i n i m i z e ' ,   u s e r i d   +   " | 1 " ) ;  
         }  
         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 ( " u s e r l i s t " ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                 / / $ j ( ' # u s e r l i s t ' ) . a n i m a t e ( {   h e i g h t :   " 0 p x "   } ,   ' s l o w ' ) ;  
                 $ j . c o o k i e ( ' u s e r l i s t _ m i n i m i z e ' ,   u s e r i d   +   " | 0 " ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s h o w s e t t i n g s ( )   {  
         i f ( $ j ( " # f r i e n d r e q u e s t n o t i f y i d " ) . c s s ( ' d i s p l a y ' ) = = ' b l o c k ' ) { $ j ( " # f r i e n d r e q u e s t n o t i f y i d " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ; }  
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " s e t t i n g l i s t " ) . s t y l e . d i s p l a y   = =   ' n o n e '   | |   d o c u m e n t . g e t E l e m e n t B y I d ( " s e t t i n g l i s t " ) . s t y l e . d i s p l a y   = =   ' '   | |   $ j ( ' # s e t t i n g l i s t ' ) . c s s ( ' h e i g h t ' )   = =   ' 0 p x ' )   {  
                 s h o w f r i e n d r e q u e s t c l o s e ( ) ;  
                 S h o w U s e r s L i s t c l o s e ( ) ;  
                 m i n i m i z e A l l C h a t B o x ( ) ;  
                 $ j ( ' # s e t t i n g l i s t ' ) . a n i m a t e ( {   h e i g h t :   ' 1 7 5 p x '   } )  
                  
         }  
         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 ( " s e t t i n g l i s t " ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                 / / $ j ( ' # s e t t i n g l i s t ' ) . a n i m a t e ( {   h e i g h t :   " 0 p x "   } ,   ' s l o w ' ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s h o w f r i e n d r e q u e s t ( )   {  
          
         $ j ( " # f r i e n d r e q u e s t n o t i f y i d " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
          
         i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " f r i e n d r e q u e s t " ) . s t y l e . d i s p l a y   = =   ' n o n e '   | |   d o c u m e n t . g e t E l e m e n t B y I d ( " f r i e n d r e q u e s t " ) . s t y l e . d i s p l a y   = =   ' '   | |   $ j ( ' # f r i e n d r e q u e s t ' ) . c s s ( ' h e i g h t ' )   = =   ' 0 p x ' )   {  
                 s h o w s e t t i n g s c l o s e ( ) ;  
                 S h o w U s e r s L i s t c l o s e ( ) ;  
                 m i n i m i z e A l l C h a t B o x ( ) ;  
                 L o a d N o t i f y D e t ( ) ;  
                 / / $ j ( ' # f r i e n d r e q u e s t ' ) . a n i m a t e ( {   h e i g h t :   ' 1 0 0 p x '   } )  
                 $ j ( ' # f r i e n d r e q u e s t ' ) . c s s ( " 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 ( " f r i e n d r e q u e s t " ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w U s e r s L i s t c l o s e ( )   {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r l i s t " ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s h o w s e t t i n g s c l o s e ( )   {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " s e t t i n g l i s t " ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s h o w f r i e n d r e q u e s t c l o s e ( )   {  
         d o c u m e n t . g e t E l e m e n t B y I d ( " f r i e n d r e q u e s t " ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s t a r t C h a t S e s s i o n ( )   {  
 $ j . a j a x ( {  
                 u r l :   " c h a t . a s p x ? a c t i o n = s t a r t c h a t s e s s i o n " ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   " j s o n " ,  
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         u s e r n a m e   =   d a t a . u s e r n a m e ;  
                         u s e r i d   =   d a t a . u s e r i d ;  
                         $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n ( i ,   i t e m )   {  
                                 i f   ( i t e m )   {   / /   f i x   s t r a n g e   i e   b u g  
  
                                         c h a t b o x t i t l e   =   i t e m . f ;  
  
                                         i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . l e n g t h   < =   0 )   {  
                                                 c r e a t e C h a t B o x ( c h a t b o x t i t l e ,   1 ) ;  
                                         }  
  
                                         i f   ( i t e m . s   = =   1 )   {  
                                                 i t e m . f   =   u s e r n a m e ;  
                                         }  
  
                                         i f   ( i t e m . s   = =   2 )   {  
                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x i n f o " > '   +   i t e m . m   +   ' < / s p a n > < / d i v > ' ) ;  
                                         }   e l s e   {  
                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : & n b s p ; & n b s p ; < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   i t e m . m   +   ' < / s p a n > < / d i v > ' ) ;  
                                         }  
                                 }  
                         } ) ;  
  
                         f o r   ( i   =   0 ;   i   <   c h a t B o x e s . l e n g t h ;   i + + )   {  
                                 c h a t b o x t i t l e   =   c h a t B o x e s [ i ] ;  
                                 / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . s c r o l l T o p ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t ) ;  
                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   ' f a s t ' ) ;  
                                 / / s e t T i m e o u t ( ' $ j ( " # c h a t b o x _ " + c h a t b o x t i t l e + "   . c h a t b o x c o n t e n t " ) . s c r o l l T o p ( $ j ( " # c h a t b o x _ " + c h a t b o x t i t l e + "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t ) ; ' ,   1 0 0 ) ;   / /   y e t   a n o t h e r   s t r a n g e   i e   b u g  
                                 s e t T i m e o u t ( ' $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   \ ' f a s t \ ' ) ; ' ,   1 0 0 ) ;   / /   y e t   a n o t h e r   s t r a n g e   i e   b u g  
                         }  
                         L o a d N o t i f y ( ) ;  
                         L o a d C o o k i e s ( ) ;  
                         E n a b l e C h a t ( ) ;  
                         s e t T i m e o u t ( ' c h a t H e a r t b e a t ( ) ; ' ,   c h a t H e a r t b e a t T i m e ) ;  
                 }  
         } ) ;  
 }  
 v a r   B r o w s e r   =   {   V e r s i o n :   f u n c t i o n ( )   {          
         v a r   v e r s i o n   =   9 9 9 ;  
         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 " )   ! =   - 1 )  
                 v e r s i o n   =   p a r s e F l o a t ( n a v i g a t o r . a p p V e r s i o n . s p l i t ( " M S I E " ) [ 1 ] ) ;  
                 r e t u r n   v e r s i o n ;  
         }    
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   p l a y S o u n d ( )   {   s o u n d M a n a g e r . p l a y ( ' b e e p ' ) ;   }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   p l a y n u d g e ( c h a t b o x t i t l e )   {  
         / / $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . a n i m a t e ( {   r i g h t :   " + = 1 0 p x "   } ) . a n i m a t e ( {   r i g h t :   " - 5 0 p x "   } ) ;  
         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . a n i m a t e ( {   r i g h t :   " + = 5 p x "   } ,   4 0 ) . a n i m a t e ( {   b o t t o m :   " + = 5 p x "   } ,   4 0 )  
                                                 . a n i m a t e ( {   b o t t o m :   " - = 1 0 p x "   } ,   4 0 ) . a n i m a t e ( {   r i g h t :   " - = 1 0 p x "   } ,   4 0 )  
                                                 . a n i m a t e ( {   b o t t o m :   " + = 5 p x "   } ,   4 0 ) . a n i m a t e ( {   r i g h t :   " + = 5 p x "   } ,   4 0 )  
                                                 . a n i m a t e ( {   r i g h t :   " + = 5 p x "   } ,   4 0 ) . a n i m a t e ( {   b o t t o m :   " + = 5 p x "   } ,   4 0 )  
                                                 . a n i m a t e ( {   b o t t o m :   " - = 1 0 p x "   } ,   4 0 ) . a n i m a t e ( {   r i g h t :   " - = 1 0 p x "   } ,   4 0 )  
                                                 . a n i m a t e ( {   b o t t o m :   " + = 5 p x "   } ,   4 0 ) . a n i m a t e ( {   r i g h t :   " + = 5 p x "   } ,   4 0 ) ;  
         s o u n d M a n a g e r . p l a y ( ' n u d g e ' ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 j Q u e r y . c o o k i e   =   f u n c t i o n ( n a m e ,   v a l u e ,   o p t i o n s )   {  
         i f   ( t y p e o f   v a l u e   ! =   ' u n d e f i n e d ' )   {   / /   n a m e   a n d   v a l u e   g i v e n ,   s e t   c o o k i e  
                 o p t i o n s   =   o p t i o n s   | |   { } ;  
                 i f   ( v a l u e   = = =   n u l l )   {  
                         v a l u e   =   ' ' ;  
                         o p t i o n s . e x p i r e s   =   - 1 ;  
                 }  
                 v a r   e x p i r e s   =   ' ' ;  
                 i f   ( o p t i o n s . e x p i r e s   & &   ( t y p e o f   o p t i o n s . e x p i r e s   = =   ' n u m b e r '   | |   o p t i o n s . e x p i r e s . t o U T C S t r i n g ) )   {  
                         v a r   d a t e ;  
                         i f   ( t y p e o f   o p t i o n s . e x p i r e s   = =   ' n u m b e r ' )   {  
                                 d a t e   =   n e w   D a t e ( ) ;  
                                 d a t e . s e t T i m e ( d a t e . g e t T i m e ( )   +   ( o p t i o n s . e x p i r e s   *   2 4   *   6 0   *   6 0   *   1 0 0 0 ) ) ;  
                         }   e l s e   {  
                                 d a t e   =   o p t i o n s . e x p i r e s ;  
                         }  
                         e x p i r e s   =   ' ;   e x p i r e s = '   +   d a t e . t o U T C S t r i n g ( ) ;  
                 }  
                 v a r   p a t h   =   o p t i o n s . p a t h   ?   ' ;   p a t h = '   +   ( o p t i o n s . p a t h )   :   ' ' ;  
                 v a r   d o m a i n   =   o p t i o n s . d o m a i n   ?   ' ;   d o m a i n = '   +   ( o p t i o n s . d o m a i n )   :   ' ' ;  
                 v a r   s e c u r e   =   o p t i o n s . s e c u r e   ?   ' ;   s e c u r e '   :   ' ' ;  
                 d o c u m e n t . c o o k i e   =   [ n a m e ,   ' = ' ,   e n c o d e U R I C o m p o n e n t ( v a l u e ) ,   e x p i r e s ,   p a t h ,   d o m a i n ,   s e c u r e ] . j o i n ( ' ' ) ;  
         }   e l s e   {  
                 v a r   c o o k i e V a l u e   =   n u l l ;  
                 i f   ( d o c u m e n t . c o o k i e   & &   d o c u m e n t . c o o k i e   ! =   ' ' )   {  
                         v a r   c o o k i e s   =   d o c u m e n t . c o o k i e . s p l i t ( ' ; ' ) ;  
                         f o r   ( v a r   i   =   0 ;   i   <   c o o k i e s . l e n g t h ;   i + + )   {  
                                 v a r   c o o k i e   =   j Q u e r y . t r i m ( c o o k i e s [ i ] ) ;  
                                 i f   ( c o o k i e . s u b s t r i n g ( 0 ,   n a m e . l e n g t h   +   1 )   = =   ( n a m e   +   ' = ' ) )   {  
                                         c o o k i e V a l u e   =   d e c o d e U R I C o m p o n e n t ( c o o k i e . s u b s t r i n g ( n a m e . l e n g t h   +   1 ) ) ;  
                                         b r e a k ;  
                                 }  
                         }  
                 }  
                 r e t u r n   c o o k i e V a l u e ;  
         }  
 } ;  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   p a g e l o a d ( h a s h )   {  
         $ j ( " # p r o g b a r " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
         i f   ( h a s h )    
         {  
                 $ j ( " # m i n i p a n e l l " ) . l o a d ( h a s h ) . f a d e I n ( ' s l o w ' ) ;  
                 / / $ j ( " # m i n i p a n e l l " ) . l o a d ( h a s h ) ;  
                 / / $ j . a j a x ( { u r l   :   h a s h , s u c c e s s   :   f u n c t i o n   ( d a t a )   { $ j ( " # m i n i p a n e l l " ) . h t m l ( d a t a ) ; $ j ( " # p r o g b a r " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ; } } ) ;  
         }    
         e l s e   {  
                 $ j ( " # m i n i p a n e l l " ) . l o a d ( ' m a i n . a s p x ' ) . f a d e I n ( ' s l o w ' ) ;  
                 / / $ j . a j a x ( { u r l   :   " m a i n . a s p x " , t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n ( r e q u e s t , e r r o r ) { a l e r t ( e r r o r ) ; } , s u c c e s s   :   f u n c t i o n   ( d a t a )   { $ j ( " # m i n i p a n e l l " ) . h t m l ( d a t a ) ; $ j ( " # p r o g b a r " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ; } } ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   l i n k i f y _ p l a i n ( t e x t )   {  
         i f   ( ! t e x t )   r e t u r n   t e x t ;  
  
         t e x t   =   t e x t . r e p l a c e ( / ( ( h t t p s ? \ : \ / \ / | f t p \ : \ / \ / ) | ( w w w \ . ) ) ( \ S + ) ( \ w { 2 , 4 } ) ( : [ 0 - 9 ] + ) ? ( \ / | \ / ( [ \ w # ! : . ? + = & % @ ! \ - \ / ] ) ) ? / g i ,   f u n c t i o n ( u r l )   {  
                 n i c e   =   u r l ;  
                 i f   ( u r l . m a t c h ( ' ^ h t t p s ? : \ / \ / ' ) )   {  
                         n i c e   =   n i c e . r e p l a c e ( / ^ h t t p s ? : \ / \ / / i ,   ' ' )  
                 }  
                 e l s e  
                         u r l   =   ' h t t p : / / '   +   u r l ;  
  
  
                 r e t u r n   ' < a   t a r g e t = " _ b l a n k "   r e l = " n o f o l l o w "   h r e f = " '   +   u r l   +   ' " > '   +   n i c e . r e p l a c e ( / ^ w w w . / i ,   ' ' )   +   ' < / a > ' ;  
         } ) ;  
  
         r e t u r n   t e x t ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c l e a n t e x t ( t e x t )   {  
         i f   ( ! t e x t )   r e t u r n   t e x t ;  
         t e x t   =   t e x t . r e p l a c e ( / & a m p ; q u o t ; / g ,   " \ " " ) . r e p l a c e ( / & a m p ; a m p ; / g ,   " & " ) ;  
         r e t u r n   t e x t ;  
 }  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s h o w o p t i o n s ( c h a t b o x t i t l e )   {  
         i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v "   +   "   . c o n t e x t M e n u " ) . c s s ( ' d i s p l a y ' )   = =   n u l l )   {  
                 s t r   =   " < u l   o n B l u r = \ " c l o s e o p t i o n s ( ' "   +   c h a t b o x t i t l e   +   " ' ) ; \ "   c l a s s = \ " c o n t e x t M e n u \ " > < l i   c l a s s = \ " b l o c k \ " > < a   s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ; \ "   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " B l o c k U s e r ( ' "   +   c h a t b o x t i t l e   +   " ' ) \ " > -61< / a > < / l i > < l i   c l a s s = \ " r e m o v e   s e p a r a t o r \ " > < a   s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ; \ "   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " D e l e t e F r i e n d ( ' "   +   c h a t b o x t i t l e   +   " ' ) \ " > -0A  E3*./E< / a > < / l i > < l i   c l a s s = \ " a d d   s e p a r a t o r \ " > < a   i d = ' A d d u s e r c o n t e x t m e n u "   +   c h a t b o x t i t l e   +   " '     s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ; \ "   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " A d d F r i e n d T o M y L i s t ( ' "   +   c h a t b o x t i t l e   +   " ' , ' A d d u s e r c o n t e x t m e n u "   +   c h a t b o x t i t l e   +   " ' ) ; \ " > '6'A)  E3*./E< / a > < / l i > < / u l > "  
                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v " ) . a p p e n d ( s t r ) ;  
                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v "   +   "   . c o n t e x t M e n u " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) . f o c u s ( ) ;  
         }  
         e l s e   {  
                 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v "   +   "   . c o n t e x t M e n u " ) . c s s ( ' d i s p l a y ' )   = =   ' n o n e '   | |   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v "   +   "   . c o n t e x t M e n u " ) . c s s ( ' d i s p l a y ' )   = =   ' ' )   {  
                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v "   +   "   . c o n t e x t M e n u " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) . f o c u s ( ) ;  
                 }  
                 e l s e   {  
                         c l o s e o p t i o n s ( c h a t b o x t i t l e ) ;  
                 }  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c l o s e o p t i o n s ( c h a t b o x t i t l e )   {  
         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . o p t i o n s d i v "   +   "   . c o n t e x t M e n u " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . f o c u s ( ) ;  
 }  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s e t s t a t u s A l l ( )   {  
         f o r   ( x   i n   c h a t B o x e s )   {  
                 c h a t b o x t i t l e   =   c h a t B o x e s [ x ] ;  
                 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e ) . c s s ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
                         G e t U s e r s D e t S t s ( c h a t b o x t i t l e ) ;  
                 }  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s e t U s e r S t a t u s ( k )   {  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = S e t U s e r S t a t u s " ,   {   k i n d :   k   } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   G e t U s e r s D e t S t s ( c h a t b o x t i t l e )   {  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = G e t U s e r s D e t S t s " ,   {   i d :   c h a t b o x t i t l e   } ,   f u n c t i o n ( d a t a )   {  
                 $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n ( i ,   i t e m )   {  
                         i f   ( i t e m )   {  
                                 i f   ( i t e m . s t a t e   ! =   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . i m g s t s " ) . a t t r ( ' i d ' ) )   {  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . i m g s t s " ) . a t t r ( ' s r c ' ,   ' i m a g e s / u s e r s t a t u s / '   +   i t e m . s t a t e   +   ' . p n g ' ) ;  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . i m g s t s " ) . a t t r ( ' i d ' ,   i t e m . s t a t e ) ;  
                                 }  
                                 i f   ( i t e m . i s w r i t e   = =   " 1 "   & &   i t e m . s t a t e   ! =   " 4 " )   {  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . w r i t e m e s s a g e " ) . c s s ( ' v i s i b i l i t y ' ,   ' v i s i b l e ' ) ;  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x o p t i o n s b o t t o m "   +   "   . w r i t e m e s s a g e " ) . c s s ( ' v i s i b i l i t y ' ,   ' v i s i b l e ' ) ;  
                                 }  
                                 e l s e   {  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . w r i t e m e s s a g e " ) . c s s ( ' v i s i b i l i t y ' ,   ' h i d d e n ' ) ;  
                                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x o p t i o n s b o t t o m "   +   "   . w r i t e m e s s a g e " ) . c s s ( ' v i s i b i l i t y ' ,   ' h i d d e n ' ) ;  
                                 }  
                         }  
                 } ) ;  
         } ,   " j s o n " )  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S e n d W r i t e M e s s a g e ( c h a t b o x t i t l e )   {  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = A d d W r i t e M e s s a g e T o U s e r " ,   {   i d :   c h a t b o x t i t l e   } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   R e m o v e W r i t e M e s s a g e ( c h a t b o x t i t l e )   {  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = R e m o v e W r i t e M e s s a g e T o U s e r " ,   {   i d :   c h a t b o x t i t l e   } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s h o w m y s t a t u s ( )   {  
         i f   ( $ j ( " # m y s t a t u s l i s t " ) . c s s ( ' d i s p l a y ' )   = =   n u l l   | |   $ j ( " # m y s t a t u s l i s t " ) . c s s ( ' d i s p l a y ' )   = =   " n o n e " )   {  
                 s t r   =   " < u l   i d = ' m y s t a t u s l i s t '   o n B l u r = \ " h i d e m y s t a t u s ( ) ; \ "   c l a s s = \ " c o n t e x t M e n u \ "   s t y l e = ' w i d t h : 8 0 p x ; ' > < l i   c l a s s = \ " o n l i n e \ " > < a   s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ; \ "   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " c h a n g e m y s t a t u s ( 1 ) ; \ " > E*5D< / a > < / l i > < l i   c l a s s = \ " a w a y   s e p a r a t o r \ " > < a   s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ; \ "   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " c h a n g e m y s t a t u s ( 2 ) ; \ " > :J1  EH,H/< / a > < / l i > < l i   c l a s s = \ " b u s y   s e p a r a t o r \ " > < a   s t y l e = \ " t e x t - d e c o r a t i o n : n o n e ; \ "   h r e f = \ " j a v a s c r i p t : \ "   o n c l i c k = \ " c h a n g e m y s t a t u s ( 3 ) ; \ " > E4:HD< / a > < / l i > < / u l > " ;  
                 $ j ( " # m y s t a t u s " ) . a p p e n d ( s t r ) ;  
                 $ j ( " # m y s t a t u s l i s t " ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) . f o c u s ( ) ;  
         }  
         e l s e   {  
                 h i d e m y s t a t u s ( ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   h i d e m y s t a t u s ( )   {  
         $ j ( " # m y s t a t u s l i s t " ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c h a n g e m y s t a t u s ( x )   {  
         m y s t a t u s   =   x ;  
         s e t U s e r S t a t u s ( x ) ;  
         $ j ( " # m y s t a t u s i m a g e " ) . a t t r ( ' s r c ' ,   ' i m a g e s / u s e r s t a t u s / '   +   x   +   ' . p n g ' ) ;  
         h i d e m y s t a t u s ( ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   L o a d C o o k i e s ( )   {  
         o p e n e d c h a t u s e r   =   n e w   A r r a y ( ) ;  
         i f   ( $ j . c o o k i e ( ' u s e r l i s t _ m i n i m i z e ' ) )   {  
                 o p e n e d c h a t u s e r =   $ j . c o o k i e ( ' u s e r l i s t _ m i n i m i z e ' ) . s p l i t ( / \ | / ) ;  
                 i f   ( o p e n e d c h a t u s e r . l e n g t h   >   1   & &   o p e n e d c h a t u s e r [ 0 ]   = =   u s e r i d   & &   o p e n e d c h a t u s e r [ 1 ]   = =   " 1 " )   {  
                         S h o w U s e r s L i s t ( ) ;  
                 }  
                  
         }  
         i f   ( $ j . c o o k i e ( ' m y i d ' ) )   {  
                 i f   ( $ j . c o o k i e ( ' m y i d ' )   = =   u s e r i d )   {  
                         o p e n e d C h a t B o x e s   =   n e w   A r r a y ( ) ;  
                         i f   ( $ j . c o o k i e ( ' c h a t b o x _ o p e n e d ' ) )   {  
                                 o p e n e d C h a t B o x e s   =   $ j . c o o k i e ( ' c h a t b o x _ o p e n e d ' ) . s p l i t ( / \ | / ) ;  
                                 f o r   ( i   =   0 ;   i   <   o p e n e d C h a t B o x e s . l e n g t h ;   i + + )   {  
                                         i s r e f r e s h   =   t r u e ;  
                                         c r e a t e C h a t B o x ( o p e n e d C h a t B o x e s [ i ] ,   " " ,   f a l s e ) ;  
                                         G e t U s e r L a s t C o n v e r s a t i o n ( o p e n e d C h a t B o x e s [ i ] ) ;  
                                 }  
                                 i s r e f r e s h   =   f a l s e ;  
                         }  
                 }  
         }  
         r e s i z e b o t t o m c o n t a i n e r ( ) ;  
         r e s t r u c t u r e C h a t B o x e s ( ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   R e m o v e F r o m A r r a y ( r e m o v e I t e m )   {  
         o p e n e d C h a t B o x e s   =   $ j . g r e p ( o p e n e d C h a t B o x e s ,   f u n c t i o n ( v a l u e )   {  
                 r e t u r n   v a l u e   ! =   r e m o v e I t e m ;  
         } ) ;  
         s e t o p e n c o o k i e ( ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s e t o p e n c o o k i e ( )   {  
         $ j . c o o k i e ( ' m y i d ' ,   u s e r i d ) ;  
         v a r   n e w C o o k i e   = ' ' ;  
         f o r   ( i   =   0 ;   i   <   o p e n e d C h a t B o x e s . l e n g t h ;   i + + )   {  
                 n e w C o o k i e   + =   o p e n e d C h a t B o x e s [ i ]   +   ' | ' ;  
         }  
         n e w C o o k i e   =   n e w C o o k i e . s l i c e ( 0 ,   - 1 ) ;  
         $ j . c o o k i e ( ' c h a t b o x _ o p e n e d ' ,   n e w C o o k i e ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   G e t U s e r L a s t C o n v e r s a t i o n ( c h a t b o x t i t l e )   {  
         $ j . p o s t ( " c h a t . a s p x ? a c t i o n = G e t U s e r L a s t C o n v e r s a t i o n " ,   {   i d :   c h a t b o x t i t l e   } ,   f u n c t i o n   ( d a t a )   {  
                 $ j ( ' # c h a t b o x _ '   +   c h a t b o x t i t l e   +   '   . c h a t b o x t i t l e ' ) . h t m l ( d a t a . u s e r n a m e ) ;  
                 $ j ( ' # c h a t b o x b o t t o m _ '   +   c h a t b o x t i t l e ) . a t t r ( {   t i t l e :   d a t a . u s e r n a m e   } ) ;  
                 $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n   ( i ,   i t e m )   {  
                         i f   ( i t e m )   {   / /   f i x   s t r a n g e   i e   b u g  
                                 v a r   m e s s a g e   =   c l e a n t e x t ( s m i l e y ( l i n k i f y _ p l a i n ( i t e m . m . r e p l a c e ( / & a m p ; a m p ; s h ; / g ,   " \ \ " ) ) ) ) ;  
                                 v a r   t t   =   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . c h i l d r e n ( " d i v . c h a t b o x m e s s a g e " ) . c h i l d r e n ( " s p a n . c h a t b o x m e s s a g e f r o m : l a s t " ) . t e x t ( ) ;  
                                 i f   ( t t . l e n g t h   >   1 )   {  
                                         t t   =   t t . s u b s t r i n g ( 0 ,   t t . l e n g t h   -   1 ) ;  
                                 }  
                                 i f   ( t t   = =   i t e m . f )   {  
                                         i f   ( i t e m . m   = =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " )   {  
                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D*  *F(J)< / s p a n > < / d i v > ' ) ;  
                                         }  
                                         e l s e   {  
                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
                                         }  
                                 }  
                                 e l s e   {  
                                         i f   ( t t   = =   ' ' )   {  
                                                 i f   ( i t e m . m   = =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " )   {  
                                                         i f   ( i t e m . s   = =   1 )   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e = " c o l o r : # 7 7 7 7 7 7 ; " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D*  *F(J)< / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                         e l s e   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > '13D*  *F(J)< / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                 }  
                                                 e l s e   {  
                                                         i f   ( i t e m . s   = =   1 )   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e = " c o l o r : # 7 7 7 7 7 7 ; " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                         e l s e   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                 }  
                                         }  
                                         e l s e   {  
                                                 i f   ( i t e m . m   = =   " $ $ $ $ * * * * | n u d g e | * * * * $ $ $ $ " )   {  
                                                         i f   ( i t e m . s   = =   1 )   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e   =   " c o l o r : # 7 7 7 7 7 7 ; " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > H5DC  *F(J)< / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                         e l s e   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > < i m g   s r c = " i m a g e s / n u d g e . p n g " > H5DC  *F(J)< / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                 }  
                                                 e l s e   {  
                                                         i f   ( i t e m . s   = =   1 )   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m "   s t y l e   =   " c o l o r : # 7 7 7 7 7 7 ; " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                         e l s e   {  
                                                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a p p e n d ( ' < h r   c l a s s = " h r t h i n f u l l " > < d i v   c l a s s = " c h a t b o x m e s s a g e " > < s p a n   c l a s s = " c h a t b o x m e s s a g e f r o m " > '   +   i t e m . f   +   ' : < / s p a n > < s p a n   c l a s s = " c h a t b o x m e s s a g e T i m e " > '   +   i t e m . d   +   ' < / s p a n > < b r > < s p a n   c l a s s = " c h a t b o x m e s s a g e c o n t e n t " > '   +   m e s s a g e   +   ' < / s p a n > < / d i v > ' ) ;  
                                                         }  
                                                 }  
                                         }  
                                 }  
                                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) . a n i m a t e ( {   s c r o l l T o p :   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x c o n t e n t " ) [ 0 ] . s c r o l l H e i g h t   } ,   ' 2 0 ' ) ;  
                         }  
                 } ) ;  
         } ,   " j s o n " )  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   r e s i z e b o t t o m c o n t a i n e r ( )  
 {  
 	 i f ( o p e n e d C h a t B o x e s . l e n g t h > 0 ) {  
 	         v a r   c o n t a i n e r w i d t h = C o n v e r t F r o m P e r c e n t T o P i x s ( p a r s e I n t ( $ j ( " # b o t t o m c o n t a i n e r " ) . c s s ( ' w i d t h ' ) ) ) - 3 0 0 ;  
 	         v a r   d d d = c o n t a i n e r w i d t h / o p e n e d C h a t B o x e s . l e n g t h ;  
 	         i f ( d d d < 1 6 0 )  
 	         {  
 	                 c h a t b o t t o m w i d t h = d d d ;  
 	         }  
 	         e l s e {  
 	                 c h a t b o t t o m w i d t h = 1 6 0 ;  
 	         }  
 	 }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s e t C o o k i e ( c _ n a m e , v a l u e , e x p i r e d a y s )  
 {  
         v a r   e x d a t e = n e w   D a t e ( ) ;  
         e x d a t e . s e t D a t e ( e x d a t e . g e t D a t e ( ) + e x p i r e d a y s ) ;  
         d o c u m e n t . c o o k i e = c _ n a m e +   " = "   + e s c a p e ( v a l u e ) +  
         ( ( e x p i r e d a y s = = n u l l )   ?   " "   :   " ; e x p i r e s = " + e x d a t e . t o G M T S t r i n g ( ) ) ;  
 }  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   L o a d N o t i f y ( ) {  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = U s e r M e s s a g e s G e t N o t i f y C o u n t " ,   c a c h e :   f a l s e ,   d a t a T y p e :   " j s o n " ,   s u c c e s s :   f u n c t i o n ( d a t a )   {  
                 i f   ( d o c u m e n t . a l l )    
                 {  
                         i f ( d a t a . c o u n t ! = ' 0 ' ) {  
                                 $ j ( " # n o t i f y " ) . a p p e n d ( ' < d i v   i d = " f r i e n d r e q u e s t n o t i f y i d "   c l a s s = " f r i e n d r e q u e s t n o t i f y " > '   +   d a t a . c o u n t   +   ' < / d i v > ' ) ;  
                                 }  
                 }    
                 e l s e    
                 {  
                         $ j ( " # f r i e n d r e q u e s t n o t i f y i d " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
                 }  
         }    
 } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w L o a d e r ( x , y ) {  
         i f ( y = = 0 ) {  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         }  
         i f ( y = = 1 ) {  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
                 v a r   s t r r =   " < i m g   i d = ' G l o b a l L o a d e r '   c l a s s = ' G l o b a l L o a d e r '   s r c = \ " i m a g e s / g l o a d e r . g i f \ "   b o r d e r = ' 0 '   / > " ;  
                 $ j ( " # "   +   x ) . a p p e n d ( s t r r ) ;  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' i n l i n e - b l o c k ' ) ;  
                 }  
          
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w L o a d e r S m a l l ( x , y ) {  
         i f ( y = = 0 ) {  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         }  
         i f ( y = = 1 ) {  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
                 v a r   s t r r =   " < i m g   i d = ' G l o b a l L o a d e r '   c l a s s = ' G l o b a l L o a d e r '   s r c = \ " i m a g e s / g l o a d e r . g i f \ "   b o r d e r = ' 0 '   w i d t h = ' 1 2 p x '   h e i g h t = ' 1 2 p x '   / > " ;  
                 $ j ( " # "   +   x ) . a p p e n d ( s t r r ) ;  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' i n l i n e - b l o c k ' ) ;  
                 }  
          
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w L o a d e r S m a l l t h i s ( x , y ) {  
         i f ( y = = 0 ) {  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         }  
         i f ( y = = 1 ) {  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
                 v a r   s t r r =   " < i m g   i d = ' G l o b a l L o a d e r '   c l a s s = ' G l o b a l L o a d e r '   s r c = \ " i m a g e s / g l o a d e r . g i f \ "   b o r d e r = ' 0 '   w i d t h = ' 1 2 p x '   h e i g h t = ' 1 2 p x '   / > " ;  
                 $ j ( " # "   +   x ) . a p p e n d ( s t r r ) ;  
                 $ j ( " # G l o b a l L o a d e r " ) . c s s ( ' d i s p l a y ' , ' i n l i n e - b l o c k ' ) ;  
                 }  
          
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   U s e r M e s s a g e s S h o w M e s s a g e ( M e s s a g e I d ) {  
         S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 1 ) ;  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = U s e r M e s s a g e s S h o w M e s s a g e " ,   c a c h e :   f a l s e ,    
         d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
         d a t a :   { m i d : M e s s a g e I d   } , b e f o r e S e n d :   f u n c t i o n ( )   { S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 1 ) ;   } ,  
         t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' 97D  AJ  '8G'1  13'D)  ,   -'HD  E1)  '.1I' ) ;   S h o w L o a d e r ( " u s e r m e s s a g e s d i v " ,   0 ) ;   r e t u r n ;   } ,    
         s u c c e s s :   f u n c t i o n ( d a t a )   {  
                 i f ( d a t a . s t s = = 0 )  
                 {  
                         M e s s a g e F r o m . i n n e r T e x t = d a t a . M e s s a g e f r o m ;  
                         M e s s a g e D e t . i n n e r H T M L = d a t a . M e s s a g e d e t ;  
                         M e s s a g e D a t e A d d . i n n e r H T M L = d a t a . M e s s a g e d a t e a d d ;  
                         $ f i n d ( ' m d l s e n d m e s s a g e t o u s e r ' ) . s h o w ( ) ;  
                         S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 0 ) ;  
                         r e t u r n ;  
                 }  
                 i f ( d a t a . s t s = = 1 )  
                 {  
                         a l e r t ( ' 97D  AJ  '8G'1  13'D)  ,   -'HD  E1)  '.1I' ) ;  
                         S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 0 ) ;  
                         r e t u r n ;  
                 }  
         }  
         } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   U s e r M e s s a g e s D e l M e s s a g e ( M e s s a g e I d ) {  
         i f   ( c o n f i r m ( " GD  'F*  E*#C/" ) )  
         {  
                 $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = U s e r M e s a g e s D e l e t e M e s s a g e " ,   c a c h e :   f a l s e ,    
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   { m i d : M e s s a g e I d   } , b e f o r e S e n d :   f u n c t i o n ( )   { S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 1 ) ;   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' 97D  /   .7#  AJ  E-H  13'D),   -'HD  E1)  '.1I' ) ;   S h o w L o a d e r ( " u s e r m e s s a g e s d i v " ,   0 ) ;   r e t u r n ;   } ,    
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         i f ( d a t a . s t s = = 0 )  
                         {  
                                 L o a d N o t i f y D e t ( ) ;  
                                 S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 0 ) ;  
                                 r e t u r n ;  
                         }  
                         i f ( d a t a . s t s = = 1 )  
                         {  
                                 a l e r t ( ' 97D  /   .7#  AJ  E-H  13'D),   -'HD  E1)  '.1I' ) ;  
                                 S h o w L o a d e r ( " u s e r m e s s a g e s d i v " , 0 ) ;  
                                 r e t u r n ;  
                         }  
 	         }  
 	         } ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   U s e r D e l F r i e n d s h i p ( f i d ) {  
         i f   ( c o n f i r m ( " GD  'F*  E*#C/" ) )  
         {  
                 $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = U s e r D e l F r i e n d s h i p " ,   c a c h e :   f a l s e ,    
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   { f i d : f i d } , b e f o r e S e n d :   f u n c t i o n ( )   { S h o w L o a d e r ( " u s e r m e s s a g e s d i v f r " , 1 ) ;   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' 97D  AJ  'D:'!  7D(  5/'B)  ,   -'HD  E1)  '.1I' ) ;   S h o w L o a d e r ( " u s e r m e s s a g e s d i v f r " ,   0 ) ;   r e t u r n ;   } ,    
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         i f ( d a t a . s t s = = 0 )  
                         {  
                                 L o a d N o t i f y D e t ( ) ;  
                                 S h o w L o a d e r ( " u s e r m e s s a g e s d i v f r " , 0 ) ;  
                                 r e t u r n ;  
                         }  
                         i f ( d a t a . s t s = = 1 )  
                         {  
                                 a l e r t ( ' 97D  AJ  'D:'!  7D(  5/'B)  ,   -'HD  E1)  '.1I' ) ;  
                                 S h o w L o a d e r ( " u s e r m e s s a g e s d i v f r " , 0 ) ;  
                                 r e t u r n ;  
                         }  
 	         }  
 	         } ) ;  
         }  
 }  
  
 ( f u n c t i o n   ( $ j )   {  
         $ j . f n . b l i n k   =   f u n c t i o n   ( o p t i o n s )   {  
  
                 v a r   d e f a u l t s   =   {  
                         h i g h l i g h t C l a s s :   " h i g h l i g h t " ,  
                         b l i n k C o u n t :   3 ,  
                         f a d e D o w n S p e e d :   " s l o w " ,  
                         f a d e U p S p e e d :   " f a s t " ,  
                         f a d e T o O p a c i t y :   0 . 3 3  
                 } ;  
                 v a r   o p t i o n s   =   $ j . e x t e n d ( d e f a u l t s ,   o p t i o n s ) ;  
  
                 r e t u r n   t h i s . e a c h ( f u n c t i o n   ( )   {  
                         v a r   o b j   =   $ j ( t h i s ) ;  
                         v a r   b l i n k C o u n t   =   0 ;  
  
                         o b j . a d d C l a s s ( o p t i o n s . h i g h l i g h t C l a s s ) ;  
                         d o B l i n k ( ) ;  
  
                         f u n c t i o n   d o B l i n k ( )   {  
                                 i f   ( b l i n k C o u n t   <   o p t i o n s . b l i n k C o u n t )   {  
                                         o b j . f a d e T o ( o p t i o n s . f a d e D o w n S p e e d ,   o p t i o n s . f a d e T o O p a c i t y ,   f u n c t i o n   ( )   {  
                                                 o b j . f a d e T o ( o p t i o n s . f a d e U p S p e e d ,   1 . 0 ,   d o B l i n k ) ;  
                                         } ) ;  
                                 }   e l s e   {  
                                         o b j . r e m o v e C l a s s ( o p t i o n s . h i g h l i g h t C l a s s ) ;  
                                 }  
                                 b l i n k C o u n t + + ;  
                         }  
                 } ) ;  
  
         } ;  
 } ) ( j Q u e r y ) ;  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * R e g i s t e r * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   C o n n e c t U s e r ( u n a m e , u p a s s w o r d , u r e m m b e r m e )  
 {  
         v a r   u n a m e = u n a m e . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         v a r   u p a s s w o r d = u p a s s w o r d . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         i f   ( u n a m e . l e n g t h   = =   0   | |   u p a s s w o r d . l e n g t h   = =   0 )   {  
                 $ j ( " # m d l c o n n e c t a l e r t " ) . h t m l ( " 9DJC  '/.'D  '3E  E3*./E  HCDE)  E1H1" ) . a d d C l a s s ( ' a l e r t m s g ' ) . c s s ( " d i s p l a y " ,   " b l o c k " ) . b l i n k ( {   b l i n k C o u n t :   5   } ) ;  
                 r e t u r n ;  
         }  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = U s e r C o n n e c t " ,   c a c h e :   f a l s e ,  
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   {   u n a m e e :   u n a m e ,   u p a s s w o r d d :   u p a s s w o r d   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( e r r o r )   } ,  
                 s u c c e s s :   f u n c t i o n   ( d a t a )   {  
                         i f   ( d a t a . s t s   = =   0 )   {  
                                 i f   ( u r e m m b e r m e   = =   t r u e )   {  
                                         s e t C o o k i e ( ' s e t o r m ' ,   u n a m e   +   " | "   +   u p a s s w o r d ,   6 0 ) ;  
                                         / / $ j . c o o k i e ( ' s e t o r m ' ,   u n a m e   +   " | "   +   u p a s s w o r d ) ;  
                                 }  
                                 i f   ( $ f i n d ( ' m d l c o n n e c t ' )   ! =   n u l l )   $ f i n d ( ' m d l c o n n e c t ' ) . h i d e ( ) ;  
                                 s t a r t C h a t S e s s i o n ( ) ;  
                                 / / d o c u m e n t . l o c a t i o n   =   " D e f a u l t . a s p x " ;  
                         }  
                         i f   ( d a t a . s t s   = =   1 )   {  
                                 $ j ( " # m d l c o n n e c t a l e r t " ) . h t m l ( " '3E  'DE3*./E  /   CDE)  'DE1H1  .7#,   -'HD  E1)  '.1I" ) . a d d C l a s s ( ' a l e r t m s g ' ) . c s s ( " d i s p l a y " ,   " b l o c k " ) . b l i n k ( {   b l i n k C o u n t :   5   } ) ;  
                                 r e t u r n ;  
                         }  
                         i f   ( d a t a . s t s   = =   2 )   {  
                                 $ j ( " # m d l c o n n e c t a l e r t " ) . h t m l ( " -3'(C  E:DB  BE  ('D#*5'D  E9  '/'1)  'D/1/4)  DA-5  'DEH6H9" ) . a d d C l a s s ( ' a l e r t m s g ' ) . c s s ( " d i s p l a y " ,   " b l o c k " ) . b l i n k ( {   b l i n k C o u n t :   5   } ) ;  
                                 r e t u r n ;  
                         }  
                         i f   ( d a t a . s t s   = =   3 )   {  
                                 $ j ( " # m d l c o n n e c t a l e r t " ) . h t m l ( " .7#  ('D'*5'D  ,   -'HD  E1)  '.1I" ) . a d d C l a s s ( ' a l e r t m s g ' ) . c s s ( " d i s p l a y " ,   " b l o c k " ) . b l i n k ( {   b l i n k C o u n t :   5   } ) ;  
                                 r e t u r n ;  
                         }  
                 }  
         } ) ;  
 }  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   C h e c k U s e r N a m e A v i l a b l e f n ( u n a m e e r )  
 {  
         v a r   l o a d e r r = d o c u m e n t . g e t E l e m e n t B y I d ( " c h e c k v a l l o a d e r " ) ;  
         l o a d e r r . s t y l e . v i s i b i l i t y = ' v i s i b l e ' ;  
         v a r   u n = d o c u m e n t . g e t E l e m e n t B y I d ( " u n a m e s t s " ) ;  
         u n . s t y l e . v i s i b i l i t y = ' v i s i b l e ' ;  
         u n . i n n e r T e x t = ' ' ;  
         v a r   u n a m e = u n a m e e r . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         i f ( u n a m e e r ! = u n a m e )  
         {  
                 u n . s t y l e . c o l o r = ' r e d ' ;  
                 u n . i n n e r T e x t   =   ' DB(  :J1  B'FHFJ' ;  
                 l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                 r e t u r n ;  
         }  
         i f ( u n a m e . l e n g t h < 3 )  
         {  
                 u n . s t y l e . c o l o r = ' p u r p l e ' ;  
                 u n . i n n e r T e x t   =   ' ',('1J  '/.'D  DB(  J-HJ  'C+1  EF  -1AJF' ;  
                 l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                 r e t u r n ;  
         }  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = C h e c k U s e r N a m e A v i l a b l e " ,   c a c h e :   f a l s e ,    
         d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
         d a t a :   {   u n a m e e :   u n a m e } ,  
         t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   u n . s t y l e . c o l o r   =   ' r e d ' ;   u n . i n n e r T e x t   =   ' DB(  :J1  B'FHFJ' ;   l o a d e r r . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;   r e t u r n ;   } ,    
         s u c c e s s :   f u n c t i o n ( d a t a )   {  
                 i f ( d a t a . s t s = = 0 )  
                 {  
                         u n . s t y l e . c o l o r = ' b l u e ' ;  
                         u n . i n n e r T e x t   =   ' DB(  E*HA1' ;  
                         l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                 }  
                 i f ( d a t a . s t s = = 1 )  
                 {  
                         u n . s t y l e . c o l o r = ' r e d ' ;  
                         u n . i n n e r T e x t   =   ' DB(  E3*9ED' ;  
                         l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                 }  
 	 }  
 	 } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c h e c k p a s s w o r d l e n g t h ( x x ) {  
         v a r   y y = x x . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         i f ( y y ! = x x )   r e t u r n   - 1  
         v a r   s t r e n g t h   =   0 ;  
         i f ( x x . l e n g t h   > =   5 )    
         {                                                                  
         s t r e n g t h + + ;                                                  
         }                                                  
         i f ( x x . m a t c h ( / [ a - z ] + / ) )    
         {                                                                  
                 s t r e n g t h + + ;  
         }  
         i f ( x x . m a t c h ( / [ 0 - 9 ] + / ) )    
         {                                                                  
                 s t r e n g t h + + ;  
         }                                                  
         i f ( x x . m a t c h ( / [ A - Z ] + / ) )    
         {                                                                  
                 s t r e n g t h + + ;                                                  
         }  
         r e t u r n   s t r e n g t h ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   C h e c k U n a m e ( )  
 {  
         u n a m e = d o c u m e n t . g e t E l e m e n t B y I d ( " T e x t B o x 9 " ) . v a l u e ;  
         C h e c k U s e r N a m e A v i l a b l e f n ( u n a m e ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /          
 f u n c t i o n   C h e c k P a s s ( x x )  
 {  
         v a r   y y = c h e c k p a s s w o r d l e n g t h ( x x ) ;  
         v a r   u n = d o c u m e n t . g e t E l e m e n t B y I d ( " u p a s s s t s " ) ;  
         s w i t c h   ( y y )   {  
                 c a s e   - 1 :  
                         u n . s t y l e . c o l o r   =   ' r e d ' ;  
                         u n . i n n e r T e x t   =   ' CDE)  E1H1  :J1  B'FHFJ)' ;  
                         b r e a k ;  
                 c a s e   0 :  
                         u n . s t y l e . c o l o r   =   ' r e d ' ;  
                         u n . i n n e r T e x t   =   ' CDE)  E1H1  3GD)  ,/'K' ;  
                         b r e a k ;  
                 c a s e   1 :  
                         u n . s t y l e . c o l o r   =   ' r e d ' ;  
                         u n . i n n e r T e x t   =   ' CDE)  E1H1  3GD)' ;  
                         b r e a k ;  
                 c a s e   2 :  
                         u n . s t y l e . c o l o r   =   ' g r e e n ' ;  
                         u n . i n n e r T e x t   =   ' CDE)  E1H1  E*H37)  9'/J)' ;  
                         b r e a k ;  
                 c a s e   3 :  
                         u n . s t y l e . c o l o r   =   ' # 3 3 6 6 9 9 ' ;  
                         u n . i n n e r T e x t   =   ' CDE)  E1H1  31J)  BHJ)' ;  
                         b r e a k ;  
                 c a s e   4 :  
                         u n . s t y l e . c o l o r   =   ' # 3 3 6 6 9 9 ' ;  
                         u n . i n n e r T e x t   =   ' CDE)  E1H1  31J)  BHJ)  ,/'K' ;  
                         b r e a k ;  
         }  
         u n . s t y l e . v i s i b i l i t y = ' v i s i b l e ' ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   G o R e g i s t e r ( u f n a m e , u l n a m e , u b d a y , u b m o n t h , u b y e a r , u s e x , u v i l l a g e , u e m a i l , u u n a m e , u p a s s w o r d ) {  
         v a r   l o a d e r r = d o c u m e n t . g e t E l e m e n t B y I d ( " c h e c k v a l l o a d e r " ) ;  
         u f n a m e = u f n a m e . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         u l n a m e = u l n a m e . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         u e m a i l = u e m a i l . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         u u n a m e = u u n a m e . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
         u p a s s w o r d = u p a s s w o r d . r e p l a c e ( / < \ / ? [ ^ > ] + > / g i ,   ' ' ) ;  
          
         l o a d e r r . s t y l e . v i s i b i l i t y = ' v i s i b l e ' ;  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = R e g i s e r U s e r " ,   c a c h e :   f a l s e ,    
         d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
         d a t a :   {   f n a m e : u f n a m e , l n a m e : u l n a m e , b d a y : u b d a y , b m o n t h : u b m o n t h , b y e a r : u b y e a r , s e x : u s e x , v i l l a g e : u v i l l a g e , e m a i l : u e m a i l , u n a m e : u u n a m e , p a s s w o r d : u p a s s w o r d } ,  
         t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' 'D*3,JD  DE  J*E  ('DF,'-  ,   -'HD  E1)  #.1I' ) ;   l o a d e r r . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;   r e t u r n ;   } ,    
         s u c c e s s :   f u n c t i o n ( d a t a )   {  
                 i f ( d a t a . s t s = = 0 )  
                 {  
                         a l e r t ( ' E1-('  '   +   u l n a m e   +   ' ,   '   +   u f n a m e   +   '   'F*GI  *3,JDC  AJ  ./E)  /1/4)  'D'ED  (F,'-  ' ) ;  
                         l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                         $ f i n d ( ' m d l c o n n e c t ' ) . s h o w ( ) ; $ f i n d ( ' m d l R e g i s t e r ' ) . h i d e ( ) ; f o c u s c o n n e c t ( ) ;   r e t u r n   f a l s e ;  
                 }  
                 i f ( d a t a . s t s = = 1 )  
                 {  
                         a l e r t ( ' 'D*3,JD  DE  J*E  (F,'-    J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                         l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                         r e t u r n ;  
                 }  
                 i f ( d a t a . s t s = = 2 )  
                 {  
                         a l e r t ( ' 'D*3,JD  DE  J*E  (F,'-    J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                         l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                         r e t u r n ;  
                 }  
                 i f ( d a t a . s t s = = 3 )  
                 {  
                         a l e r t ( ' '3E  'DE3*./E  'D0J  '.*1*G  E3*9ED  EF  B(D  E3*./E  '.1  'D1,'!  '.*J'1  '3E  E.*DA' ) ;  
                         l o a d e r r . s t y l e . v i s i b i l i t y = ' h i d d e n ' ;  
                         r e t u r n ;  
                 }                  
 	 }  
 	 } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * S M I L E Y S * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   l o a d s m i l e y s ( c h a t b o x t i t l e )   {  
         i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . c s s ( ' d i s p l a y ' )   = =   n u l l )   {  
                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . b l u r ( ) ;  
                 v a r   s t r   =   " < d i v   c l a s s = \ " s m i l e y \ "   o n B l u r = \ " c l o s e s m i l e y w i n d o w ( ' "   +   c h a t b o x t i t l e   +   " ' ) ; \ " > " ;  
                 v a r   c o u n t   =   0 ;  
                 f o r   ( v a r   j   =   0 ;   j   <   8 ;   j + + )   {  
                         f o r   ( v a r   x   =   0 ;   x   <   9 ;   x + + )   {  
                                 i f   ( c o u n t   >   s m i l e y _ a r r a y . l e n g t h - 1 )   b r e a k ;  
                                 s t r   + =   " < i m g   o n c l i c k = \ " s e t s m i l e y ( ' "   +   c h a t b o x t i t l e   +   " ' , ' "   +   s m i l e y _ a r r a y [ c o u n t ]   +   " ' ) ; c l o s e s m i l e y w i n d o w ( ' "   +   c h a t b o x t i t l e   +   " ' ) ; \ "   c l a s s = ' s m i m g '   o n c l i c k = ' '   s r c = ' i m a g e s / s m i l e y / "   +   s m i l e y _ x h t m l [ c o u n t ]   +   " . g i f '   t i t l e = ' "   +   s m i l e y _ a r r a y [ c o u n t ]   +   " '   a l t = ' "   +   s m i l e y _ a r r a y [ c o u n t + + ]   +   " ' > " ;  
                         }  
                         s t r   + =   " < b r > "  
                 }  
                 s t r   + =   " < / d i v > "  
                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s " ) . a p p e n d ( s t r ) ;  
                 $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . f a d e I n ( ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) . f o c u s ( ) ;  
                 / / $ j ( " # m y s m i l e y s " ) . f a d e I n ( ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) . f o c u s ( ) ;  
         }  
         e l s e   {  
                 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . c s s ( ' d i s p l a y ' )   = =   ' n o n e '   | |   $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . c s s ( ' d i s p l a y ' )   = =   ' ' )   {  
                         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . f a d e I n ( ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) . f o c u s ( ) ;  
                 }  
                 e l s e   {  
                         c l o s e s m i l e y w i n d o w ( c h a t b o x t i t l e ) ;  
                 }  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s e t s m i l e y ( c h a t b o x t i t l e , x )   {  
         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . v a l ( $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . v a l ( ) + x ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   c l o s e s m i l e y w i n d o w ( c h a t b o x t i t l e )   {  
         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x s t s "   +   "   . s m i l e y " ) . f a d e O u t ( ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
         $ j ( " # c h a t b o x _ "   +   c h a t b o x t i t l e   +   "   . c h a t b o x t e x t a r e a " ) . f o c u s ( ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   s m i l e y ( t e x t )  
 {  
   f o r   ( v a r   i   =   0 ;   i <   s m i l e y _ a r r a y . l e n g t h ;   i + + )  
   {  
     v a r   s m i l e y _ i m g   =   ' < i m g   a l t = " S m i l e y "   s r c = " i m a g e s / s m i l e y / '   +   s m i l e y _ x h t m l [ i ]   +   ' . g i f "   / > ' ;  
     v a r   i n t I n d e x O f M a t c h   =   t e x t . i n d e x O f ( s m i l e y _ a r r a y [ i ] ) ;  
    
     w h i l e   ( i n t I n d e x O f M a t c h   ! =   - 1 )  
     {  
       t e x t   =   t e x t . r e p l a c e ( s m i l e y _ a r r a y [ i ] , s m i l e y _ i m g )   ;  
       i n t I n d e x O f M a t c h   =   t e x t . i n d e x O f ( s m i l e y _ a r r a y [ i ] ) ;  
     }  
   }  
   r e t u r n   t e x t ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * U S E R   M A I N T A I N * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   S h o w U s e r D e t ( f i d ) {  
         S h o w L o a d e r ( " u s e r m e s s a g e s d i v f r " , 1 ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " c h a t u s e r d e t a i l s f r m " ) . s r c = " c h a t u s e r d e t a i l s f r m . a s p x ? f i d = "   +   f i d ;  
         $ f i n d ( " m d l S h o w U s e r D e t " ) . s h o w ( ) ;  
         S h o w L o a d e r ( " u s e r m e s s a g e s d i v f r " , 0 ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   a p p r o v e f r i n d s h i p r e q u e s t ( f i d ) {  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = U s e r A d d F r i e n d s h i p R e q u e s t " ,   c a c h e :   f a l s e ,    
         d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
         d a t a :   { f i d : f i d } , b e f o r e S e n d :   f u n c t i o n ( )   { S h o w L o a d e r S m a l l ( " f r i e n d s h i p r e q u e s t l i s t f "   +   f i d , 1 ) ;   } ,  
         t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' E4CD)  AJ  '6'A)  7D(  'D96HJ),   J1,I  'DE-'HD)  E1)  '.1I' ) ;   S h o w L o a d e r S m a l l ( " f r i e n d s h i p r e q u e s t l i s t f "   +   f i d ,   0 ) ;   r e t u r n ;   } ,    
         s u c c e s s :   f u n c t i o n ( d a t a )   {  
                 i f ( d a t a . s t s = = 0 )  
                 {  
                         L o a d N o t i f y D e t ( ) ;  
                         S h o w L o a d e r S m a l l ( " f r i e n d s h i p r e q u e s t l i s t f "   +   f i d ,   0 ) ;  
                         r e t u r n ;  
                 }  
                 i f ( d a t a . s t s = = 1 )  
                 {  
                         a l e r t ( ' E4CD)  AJ  '6'A)  7D(  'D96HJ),   J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                         S h o w L o a d e r S m a l l ( " f r i e n d s h i p r e q u e s t l i s t f "   +   f i d , 0 ) ;  
                         r e t u r n ;  
                 }  
         }  
         } ) ;  
         S h o w L o a d e r S m a l l ( " u s e r m e s s a g e s d i v f r " , 0 ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   d i s c o n n e c t u s e r F ( )  
 {  
                 $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = D i s c o n n e c t U s e r " ,   c a c h e :   f a l s e ,    
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   {   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   / * a l e r t ( ' êçÜÔ  ÑàÙêÕç,   ÐàÐ  àáÔ  éÙàÙê' ) ; * / r e t u r n ;   } ,    
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         i f ( d a t a . s t s = = 0 )  
                         {  
                                 D i s a b l e C h a t ( ) ;  
                                 r e t u r n ;  
                         }  
                         i f ( d a t a . s t s = = 1 )  
                         {  
                                 / / a l e r t ( ' êçÜÔ  ÑàÙêÕç,   ÐàÐ  àáÔ  éÙàÙê' ) ;  
                                 r e t u r n ;  
                         }  
 	         }  
 	         } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   d i s c o n n e c t u s e r ( )  
 {  
         i f   ( c o n f i r m ( " GD  'F*  E*'C/" ) )  
         {  
                 $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = D i s c o n n e c t U s e r " ,   c a c h e :   f a l s e ,    
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   {   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' E4CD)  AJ  'D.1H,,   J1,I  'DE-'HD)  E1)  '.1I' ) ;   r e t u r n ;   } ,    
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         i f ( d a t a . s t s = = 0 )  
                         {  
                                 d o c u m e n t . c o o k i e   =   ' s e t o r m '   +   ' = ;   e x p i r e s = T h u ,   0 1 - J a n - 7 0   0 0 : 0 0 : 0 1   G M T ; ' ;  
                                 D i s a b l e C h a t ( ) ;  
                                 r e t u r n ;  
                         }  
                         i f ( d a t a . s t s = = 1 )  
                         {  
                                 a l e r t ( ' E4CD)  AJ  'D.1H,,   J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                                 r e t u r n ;  
                         }  
 	         }  
 	         } ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   D i s a b l e C h a t ( )  
 {  
         $ j ( " # u s e r l i s t " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # s e t t i n g l i s t " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # f r i e n d r e q u e s t " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # o p t i o n s " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # n o t i f y " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # f l i s t " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # f r e g " ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
         $ j ( " # f c o n n " ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
         f o r   ( x   i n   c h a t B o x e s )   {  
                 i f   ( $ j ( " # c h a t b o x _ "   +   c h a t B o x e s [ x ] ) . c s s ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
                         c l o s e C h a t B o x ( c h a t B o x e s [ x ] ) ;  
                 }  
         }          
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   E n a b l e C h a t ( )  
 {  
         $ j ( " # o p t i o n s " ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
         $ j ( " # n o t i f y " ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
         $ j ( " # f l i s t " ) . c s s ( ' d i s p l a y ' , ' b l o c k ' ) ;  
         $ j ( " # f r e g " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
         $ j ( " # f c o n n " ) . c s s ( ' d i s p l a y ' , ' n o n e ' ) ;  
 }  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   L o a d N o t i f y D e t ( )   {  
         $ j . a j a x ( {  
                 u r l :   " c h a t . a s p x ? a c t i o n = G e t U s e r N e w M e s s a g e s " ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   " j s o n " ,  
                 b e f o r e S e n d :   f u n c t i o n ( )   {   } ,  
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         $ j ( " # f r i e n d r e q u e s t " ) . e m p t y ( ) ;  
                         v a r   s t r r   =   " < d i v   c l a s s = \ " f r i e n d r e q u e s t h e a d \ " > < t a b l e   c e l l p a d d i n g = \ " 0 \ "   c e l l s p a c i n g = \ " 0 \ "   b o r d e r = \ " 0 \ "   w i d t h = \ " 1 6 0 p x \ " > < t r > < t d   d i r = \ " r t l \ " > < t a b l e   c e l l p a d d i n g = \ " 0 \ "   c e l l s p a c i n g = \ " 0 \ "   b o r d e r = \ " 0 \ "   w i d t h = \ " 1 6 0 p x \ " > < t r > < t d   a l i g n = \ " r i g h t \ "   v a l i g n = \ " t o p \ "   s t y l e = \ " p a d d i n g - r i g h t : 0 p x ; \ " > < i m g   s r c = \ " i m a g e s / f r i e n d r e q u e s t 0 . p n g \ "   w i d t h = \ " 1 8 p x \ "   h e i g h t = \ " 1 8 p x \ "   / > < / t d > < t d   v a l i g n = \ " t o p \ "   a l i g n = \ " r i g h t \ "   w i d t h = \ " 1 6 0 p x \ " > < s p a n   s t y l e = \ " f o n t - f a m i l y : t a h o m a ; f o n t - s i z e : 8 p t ; f o n t - w e i g h t : b o l d ; \ "   c l a s s = \ " c h a t b o x t i t l e \ "   o n c l i c k = \ " s h o w s e t t i n g s ( ) ; \ " > 7D(  5/'B)  H13'&D< / s p a n > < / t d > < t d   s t y l e = \ " p a d d i n g - r i g h t : 7 p x ; \ "   v a l i g n = \ " t o p \ " > < s p a n   c l a s s = \ " c h a t b o x o p t i o n s \ " > < a   h r e f = \ " j a v a s c r i p t : v o i d ( 0 ) \ "   o n m o u s e o v e r = \ " t h i s . s t y l e . c o l o r = ' # 3 3 6 6 9 9 ' ; \ "   o n m o u s e o u t = \ " t h i s . s t y l e . c o l o r = ' w h i t e ' ; \ "   o n c l i c k = \ " j a v a s c r i p t : s h o w f r i e n d r e q u e s t ( ) ; \ "   s t y l e = \ " p a d d i n g - r i g h t : 7 p x ; t e x t - d e c o r a t i o n : n o n e ; \ " > X < / a > < / s p a n > < / t d > < / t r > < t r > < t d   h e i g h t = \ " 3 p x \ " > < / t d > < / t r > < / t a b l e > < / t d > < / t r > < / t a b l e > < / d i v > "   +  
                         " < d i v   s t y l e = ' d i r e c t i o n : r t l ; p a d d i n g - r i g h t : 5 p x ; w i d t h : 1 2 0 p x ; ' > < a   i d = ' u s e r m e s s a g e s d i v '   c l a s s = ' u s e r m e s s a g e s d i v ' > 13'&D: < / a > < / d i v > " ;  
                         $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n ( i ,   i t e m )   {  
                                 i f   ( i t e m )   {   / /   f i x   s t r a n g e   i e   b u g  
                                         s t r r   + = " < a   c l a s s = ' o n l i n e u s e r s f r ' > "   +  
                                         " < t a b l e   b o r d e r = ' 0 '   c e l l s p a c i n g = ' 2 '   c e l l p a d d i n g = ' 2 '   s t y l e = ' w i d t h : 1 0 0 % ; ' > "   +  
                                         " < t r > < t d   a l i g n = ' r i g h t '   w i d t h = ' 1 0 p x '   r o w s p a n = ' 3 ' > < a   o n c l i c k = \ " U s e r M e s s a g e s D e l M e s s a g e ( ' "   +   i t e m . i d   +   " ' ) ; \ "   c l a s s = ' u s e r m e s s a g e s h i d e '   t i t l e = ' -0A  13'D)' > x < / a > < / t d > "   +    
                                         " < t d   s t y l e = ' p a d d i n g - r i g h t : 5 p x ; '   a l i g n = ' r i g h t '   w i d t h = ' 4 0 p x '   v a l i g n = ' m i d d l e ' > < a   h r e f = ' j a v a s c r i p t : '   o n c l i c k = \ " U s e r M e s s a g e s S h o w M e s s a g e ( ' "   +   i t e m . i d   +   " ' ) ; \ "   c l a s s = ' u s e r m e s s a g e f r o m ' > "   +   i t e m . f r o m   +   " < / a > < / t d > < / t r > "   +  
                                         " < t r > < t d   a l i g n = ' r i g h t '   v a l i g n = ' t o p '   s t y l e = ' p a d d i n g - r i g h t : 5 p x ; ' > < a   c l a s s = ' u s e r m e s s a g e d a t e a d d '   o n c l i c k = \ " U s e r M e s s a g e s S h o w M e s s a g e ( ' "   +   i t e m . i d   +   " ' ) ; \ " > "   +   i t e m . d a t e a d d   +   " < / a > < / t d > < / t r > "   +  
                                         " < t r > < t d   s t y l e = ' p a d d i n g - r i g h t : 5 p x ; '   a l i g n = ' r i g h t '   w i d t h = ' 1 0 0 % '   v a l i g n = ' m i d d l e '   c o l s p a n = ' 2 ' > < a   c l a s s = ' u s e r m e s s a g e m d e t '   o n c l i c k = \ " U s e r M e s s a g e s S h o w M e s s a g e ( ' "   +   i t e m . i d   +   " ' ) ; \ " > "   +   i t e m . m m d e t   +   " < / a > < / t d > < t d   a l i g n = ' l e f t '   s t y l e = ' f l o a t : l e f t ; '   v a l i g n = ' m i d d l e ' > < / t d > < / t r > "   +  
                                         " < / t a b l e > < / a > < d i v   c l a s s = ' s e p ' > < / d i v > " ;  
                                 }  
                         } ) ;  
                         $ j ( " # f r i e n d r e q u e s t " ) . a p p e n d ( s t r r ) ;  
                 }  
         } ) ;  
         $ j . a j a x ( {  
                 u r l :   " c h a t . a s p x ? a c t i o n = G e t F r i e n d s h i p R e q u e s t s " ,  
                 c a c h e :   f a l s e ,  
                 d a t a T y p e :   " j s o n " ,  
                 b e f o r e S e n d :   f u n c t i o n ( )   {   } ,  
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         v a r   s t r r   =   " " ;  
                         i f ( d a t a . i t e m s . l e n g t h > 1 ) {  
                                 s t r r   =   " < d i v   s t y l e = ' d i r e c t i o n : r t l ; p a d d i n g - r i g h t : 5 p x ; w i d t h : 1 2 0 p x ; ' > < a   i d = ' u s e r m e s s a g e s d i v f r '   c l a s s = ' u s e r m e s s a g e s d i v f r ' > 7D(  5/'B): < / a > < / d i v > " ;  
                                 }  
                         $ j . e a c h ( d a t a . i t e m s ,   f u n c t i o n ( i ,   i t e m )   {  
                                 i f   ( i t e m )   {   / /   f i x   s t r a n g e   i e   b u g  
                                         s t r r   + = " < a   c l a s s = ' o n l i n e u s e r s f r ' > "   +  
                                         " < t a b l e   b o r d e r = ' 0 '   c e l l s p a c i n g = ' 2 '   c e l l p a d d i n g = ' 2 '   s t y l e = ' w i d t h : 1 0 0 % ; ' > "   +  
                                         " < t r > < t d   a l i g n = ' r i g h t '   w i d t h = ' 1 0 p x ' > < a   o n c l i c k = \ " U s e r D e l F r i e n d s h i p ( ' "   +   i t e m . i d   +   " ' ) ; \ "   c l a s s = ' u s e r m e s s a g e s h i d e '   t i t l e = ' 1A6  'D96HJ)' > x < / a > < / t d > "   +  
                                         " < t d   s t y l e = ' p a d d i n g - r i g h t : 5 p x ; '   a l i g n = ' r i g h t '   w i d t h = ' 1 4 0 p x '   v a l i g n = ' m i d d l e ' > < a   h r e f = ' j a v a s c r i p t : '   o n c l i c k = \ " S h o w U s e r D e t ( ' "   +   i t e m . i d   +   " ' ) ; \ "   c l a s s = ' u s e r m e s s a g e f r o m '   i d = ' f r i e n d s h i p r e q u e s t l i s t f "   +   i t e m . i d   +   " ' > "   +   i t e m . f r o m   +   " < / a > < / t d > < t d   a l i g n = ' l e f t '   s t y l e = \ " p a d d i n g - l e f t : 7 p x ; \ " > < a   h r e f = \ " j a v a s c r i p t : a p p r o v e f r i n d s h i p r e q u e s t ( "   +   i t e m . i d   +   " ) ; \ "   c l a s s = ' a p p r o v e f r i n d s h i p r e q u e s t ' > ( B(HD) < / a > < / t d > < / t r > < / t a b l e > < / a > "   +  
                                         " < d i v   c l a s s = ' s e p ' > < / d i v > " ;  
                                 }  
                         } ) ;  
                         $ j ( " # f r i e n d r e q u e s t " ) . a p p e n d ( s t r r ) ;  
                 }  
         } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   B l o c k U s e r ( x )  
 {  
         i f   ( c o n f i r m ( " GD  'F*  E*#C/" ) )  
         {  
                 $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = B l o c k U s e r " ,   c a c h e :   f a l s e ,    
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   {   f i d :   x   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' E4CD)  AJ  -61  'D96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;   r e t u r n   f a l s e ;   } ,    
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         i f   ( d a t a . s t s   = =   0 )   {  
                                 a l e r t ( ' *E  -61  'D96H  (F,'-' ) ;  
                                 r e t u r n ;  
                         }  
                         i f   ( d a t a . s t s   = =   1 )   {  
                                 a l e r t ( ' E4CD)  AJ  -61  'D96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                                 r e t u r n ;  
                         }  
 	         }  
 	         } ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   R e m o v e B l o c k F r o m U s e r ( x )   {  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = R e m o v e B l o c k F r o m U s e r " ,   c a c h e :   f a l s e ,  
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   {   f i d :   x   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' E4CD)  AJ  '2'D)  -61  'D96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;   r e t u r n ;   } ,  
                 s u c c e s s :   f u n c t i o n   ( d a t a )   {  
                         i f   ( d a t a . s t s   = =   0 )   {  
                                 a l e r t ( ' *E  '2'D)  -61  'D96H  (F,'-' ) ;  
                                 r e t u r n ;  
                         }  
                         i f   ( d a t a . s t s   = =   1 )   {  
                                 a l e r t ( ' E4CD)  AJ  '2'D)  -61  'D96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                                 r e t u r n ;  
                         }  
                 }  
         } ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   D e l e t e F r i e n d ( x )  
 {  
         i f   ( c o n f i r m ( " GD  'F*  E*#C/" ) )  
         {  
                 $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = D e l e t e F r i e n d " ,   c a c h e :   f a l s e ,    
                 d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
                 d a t a :   {   f i d :   x   } ,  
                 t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' E4CD)  AJ  -0A  'D96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;   r e t u r n   f a l s e ;   } ,    
                 s u c c e s s :   f u n c t i o n ( d a t a )   {  
                         i f   ( d a t a . s t s   = =   0 )   {  
                                 a l e r t ( ' *E  -0A  'D96H  (F,'-' ) ;  
                                 r e t u r n ;  
                         }  
                         i f   ( d a t a . s t s   = =   1 )   {  
                                 a l e r t ( ' E4CD)  AJ  -0A  'D96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                                 r e t u r n ;  
                         }  
                 }  
                 } ) ;  
         }  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   R e m o v e U s e r ( c h a t b o x t i t l e )   {  
         a l e r t ( c h a t b o x t i t l e ) ;  
         c l o s e o p t i o n s ( c h a t b o x t i t l e ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   A l e r t M e s s a g e ( t x t )   {  
         $ f i n d ( ' m d l m s g b o x ' ) . s h o w ( ) ;  
 }  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   A d d F r i e n d T o M y L i s t ( c h a t b o x t i t l e , l o a d e r r )   {  
         $ j . a j a x ( {   u r l :   " c h a t . a s p x ? a c t i o n = A d d U s e r T o M y F r i e n d s L i s t " ,   c a c h e :   f a l s e ,    
         d a t a T y p e :   " j s o n " ,   t y p e :   " p o s t " ,  
         d a t a :   { f i d : c h a t b o x t i t l e   } , b e f o r e S e n d :   f u n c t i o n ( )   { S h o w L o a d e r S m a l l ( l o a d e r r , 1 ) ;   } ,  
         t i m e o u t :   1 0 0 0 0 ,   e r r o r :   f u n c t i o n   ( r e q u e s t ,   e r r o r )   {   a l e r t ( ' E4CD)  AJ  '6'A)  96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;   S h o w L o a d e r S m a l l ( l o a d e r r ,   0 ) ;   r e t u r n ;   } ,    
         s u c c e s s :   f u n c t i o n ( d a t a )   {  
                 i f ( d a t a . s t s = = 0 )  
                 {  
                         a l e r t ( " '6'A)  'D5/JB  *E*  (F,'-    'D1,'!  'D'F*8'1  DD-5HD  9DI  'DEH'AB)  DD96HJ)" ) ;  
                         S h o w L o a d e r S m a l l ( l o a d e r r , 0 ) ;  
                         s h o w o p t i o n s ( c h a t b o x t i t l e ) ;  
                         / / d o c u m e n t . l o c a t i o n = " c h a t s e a r c h c . a s p x " ;  
                 }  
                 i f ( d a t a . s t s = = 1 )  
                 {  
                         a l e r t ( ' E4CD)  AJ  '6'A)  96H,   J1,I  'DE-'HD)  E1)  '.1I' ) ;  
                         S h o w L o a d e r S m a l l ( l o a d e r r , 0 ) ;  
                         s h o w o p t i o n s ( c h a t b o x t i t l e ) ;  
                         r e t u r n ;  
                 }  
         }  
         } ) ;  
 } 
