ÿþ/ / S e t   p o s   o f   a n   e l e m e n t   t o   o t h e r   e l e m e n t  
 f u n c t i o n   s e t O v e r E L 0 ( f r I d ,   t o I d ) {  
         v a r   s r c = $ ( ' # ' + t o I d ) ;  
         v a r   d e s t   =   $ ( ' # ' + f r I d ) ;  
          
         s r c . h e i g h t ( d e s t . h e i g h t ( ) ) ;  
         s r c . w i d t h ( d e s t . w i d t h ( ) ) ;          
         v a r   p   =   s r c . p o s i t i o n ( ) ;  
         d e s t . o f f s e t ( {   t o p :   p . t o p ,   l e f t :   p . l e f t   } ) ;  
 } 	  
 f u n c t i o n   s e t O v e r E L ( f r I d ,   t o I d ) {  
         v a r   s r c = $ ( ' # ' + t o I d ) ;  
         v a r   d e s t   =   $ ( ' # ' + f r I d ) ;  
          
         s r c . h e i g h t ( d e s t . h e i g h t ( ) ) ;  
         s r c . w i d t h ( d e s t . w i d t h ( ) ) ;          
         v a r   p   =   s r c . p o s i t i o n ( ) ;  
         d e s t . o f f s e t ( {   t o p :   p . t o p ,   l e f t :   p . l e f t   } ) ;  
          
 	 $ ( w i n d o w ) . r e s i z e ( f u n c t i o n ( )   {  
 	     s e t O v e r E L 0 ( f r I d ,   t o I d ) ;  
 	 } ) ;  
 }  
  
 f u n c t i o n   P a g e S c r o l l e r ( i d ,   p a g e s ,   h e i g h t ) 
 { 
 	 t h i s . i d   =   i d ; 
 	 t h i s . h e i g h t   =   h e i g h t ; 
 	 t h i s . p a g e s   =   [ ] ; 
 	 t h i s . c u r r e n t _ p a g e   =   0 ; 
 	 t h i s . a n i m a t i o n   =   n u l l ; 
 
 	 / /   s e t   u p   c o n t a i n e r 
 	 t h i s . c o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . i d ) ; 
 	 t h i s . c o n t a i n e r . s t y l e . o v e r f l o w   =   ' h i d d e n ' ; 
 	 t h i s . c o n t a i n e r . s t y l e . h e i g h t   =   t h i s . h e i g h t   +   ' p x ' ; 
 
 	 / /   s e t   u p   p r e v   l i n k 
 	 t h i s . p r e v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' a ' ) ; 
 	 t h i s . p r e v . h r e f   =   ' # ' ; 
 	 Y A H O O . u t i l . D o m . a d d C l a s s ( t h i s . p r e v ,   ' p r e v i o u s ' ) ; 
 	 t h i s . p r e v . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( ' P r e v i o u s ' ) ) ; 
 
 	 t h i s . p r e v _ i n s e n s i t i v e   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s p a n ' ) ; 
 	 Y A H O O . u t i l . D o m . a d d C l a s s ( t h i s . p r e v _ i n s e n s i t i v e ,   ' p r e v i o u s ' ) ; 
 	 t h i s . p r e v _ i n s e n s i t i v e . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( ' P r e v i o u s ' ) ) ; 
 
 	 Y A H O O . u t i l . E v e n t . a d d L i s t e n e r ( t h i s . p r e v ,   ' c l i c k ' , 
 	 	 f u n c t i o n   ( e ) 
 	 	 { 
 	 	 	 Y A H O O . u t i l . E v e n t . p r e v e n t D e f a u l t ( e ) ; 
 	 	 	 t h i s . p r e v P a g e ( ) ; 
 	 	 } , 
 	 	 t h i s ,   t r u e ) ; 
 
 
 	 / /   s e t   u p   n e x t   l i n k 
 	 t h i s . n e x t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' a ' ) ; 
 	 t h i s . n e x t . h r e f   =   ' # ' ; 
 	 Y A H O O . u t i l . D o m . a d d C l a s s ( t h i s . n e x t ,   ' n e x t ' ) ; 
 	 t h i s . n e x t . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( ' N e x t ' ) ) ; 
 
 	 t h i s . n e x t _ i n s e n s i t i v e   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s p a n ' ) ; 
 	 Y A H O O . u t i l . D o m . a d d C l a s s ( t h i s . n e x t _ i n s e n s i t i v e ,   ' n e x t ' ) ; 
 	 t h i s . n e x t _ i n s e n s i t i v e . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( ' N e x t ' ) ) ; 
 
 	 Y A H O O . u t i l . E v e n t . a d d L i s t e n e r ( t h i s . n e x t ,   ' c l i c k ' , 
 	 	 f u n c t i o n   ( e ) 
 	 	 { 
 	 	 	 Y A H O O . u t i l . E v e n t . p r e v e n t D e f a u l t ( e ) ; 
 	 	 	 t h i s . n e x t P a g e ( ) ; 
 	 	 } , 
 	 	 t h i s ,   t r u e ) ; 
 
 	 / /   a d d   p a g i n a t i o n   t o   p a g e 
 	 v a r   d i v i d e r   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s p a n ' ) ; 
 	 d i v i d e r . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( ' | ' ) ) ; 
 	 Y A H O O . u t i l . D o m . a d d C l a s s ( d i v i d e r ,   ' d i v i d e r ' ) ; 
 	 v a r   p a g i n a t i o n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p a g i n a t i o n ' ) ; 
 	 p a g i n a t i o n . a p p e n d C h i l d ( t h i s . p r e v ) ; 
 	 p a g i n a t i o n . a p p e n d C h i l d ( d i v i d e r ) ; 
 	 p a g i n a t i o n . a p p e n d C h i l d ( t h i s . n e x t ) ; 
 
 	 / /   a d d   p a g e s 
 	 f o r   ( v a r   i   =   0 ;   i   <   p a g e s . l e n g t h ;   i + + ) 
 	 	 t h i s . a d d P a g e ( n e w   P a g e ( p a g e s [ i ] ) ) ; 
 
 	 / /   i n i t i a l i z e   t o   f i r s t   p a g e 
 	 t h i s . s e t P a g e ( 0 ) ; 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . a d d P a g e   =   f u n c t i o n ( p a g e ) 
 { 
 	 v a r   p a g e _ n u m b e r   =   t h i s . p a g e s . l e n g t h ; 
 	 p a g e . s e t P a g e H e i g h t ( t h i s . h e i g h t ) ; 
 	 t h i s . p a g e s . p u s h ( p a g e ) ; 
 
 	 i f   ( p a g e . n a v )   { 
 	 	 Y A H O O . u t i l . E v e n t . a d d L i s t e n e r ( p a g e . n a v ,   ' c l i c k ' , 
 	 	 	 f u n c t i o n   ( e ) 
 	 	 	 { 
 	 	 	 	 Y A H O O . u t i l . E v e n t . p r e v e n t D e f a u l t ( e ) ; 
 	 	 	 	 t h i s . s e t P a g e ( p a g e _ n u m b e r ) ; 
 	 	 	 } , 
 	 	 	 t h i s ,   t r u e ) ; 
 	 } 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . p r e v P a g e   =   f u n c t i o n ( ) 
 { 
 	 t h i s . s e t P a g e ( t h i s . c u r r e n t _ p a g e   -   1 ) ; 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . n e x t P a g e   =   f u n c t i o n ( ) 
 { 
 	 t h i s . s e t P a g e ( t h i s . c u r r e n t _ p a g e   +   1 ) ; 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . s e t P a g e   =   f u n c t i o n ( p a g e _ n u m b e r ) 
 { 
 	 / /   d e s e l e c t   c u r r e n t   ( o l d )   p a g e 
 	 t h i s . p a g e s [ t h i s . c u r r e n t _ p a g e ] . s e t N a v H i g h l i g h t ( f a l s e ) ; 
 
 	 / /   w r a p   p a g e   n u m b e r 
 	 i f   ( p a g e _ n u m b e r   > =   t h i s . p a g e s . l e n g t h ) 
 	 	 t h i s . c u r r e n t _ p a g e   =   0 ; 
 	 e l s e   i f   ( p a g e _ n u m b e r   <   0 ) 
 	 	 t h i s . c u r r e n t _ p a g e   =   t h i s . p a g e s . l e n g t h   -   1 ; 
 	 e l s e 
 	 	 t h i s . c u r r e n t _ p a g e   =   p a g e _ n u m b e r ; 
 	 
 	 / /   s e l e c t   c u r r e n t   ( n e w )   p a g e 
 	 t h i s . p a g e s [ t h i s . c u r r e n t _ p a g e ] . s e t N a v H i g h l i g h t ( t r u e ) ; 
 
 	 / /   s e t   p r e v   l i n k   s e n s i t i v i t y 
 	 t h i s . s e t P r e v L i n k S e n s i t i v i t y ( t h i s . c u r r e n t _ p a g e   ! =   0 ) ; 
 
 	 / /   s e t   n e x t   l i n k   s e n s i t i v i t y 
 	 t h i s . s e t N e x t L i n k S e n s i t i v i t y ( t h i s . c u r r e n t _ p a g e   ! =   t h i s . p a g e s . l e n g t h   -   1 ) ; 
 
 	 / /   s c r o l l   t o   t h e   p a g e 
 	 t h i s . s c r o l l T o C u r r e n t P a g e ( ) ; 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . s e t P r e v L i n k S e n s i t i v i t y   =   f u n c t i o n ( s e n s i t i v e ) 
 { 
 	 i f   ( s e n s i t i v e )   { 
 	 	 i f   ( t h i s . p r e v _ i n s e n s i t i v e . p a r e n t N o d e )   { 
 	 	 	 t h i s . p r e v _ i n s e n s i t i v e . p a r e n t N o d e . r e p l a c e C h i l d ( 
 	 	 	 	 t h i s . p r e v ,   t h i s . p r e v _ i n s e n s i t i v e ) ; 
 	 	 } 
 	 }   e l s e   { 
 	 	 i f   ( t h i s . p r e v . p a r e n t N o d e )   { 
 	 	 	 t h i s . p r e v . p a r e n t N o d e . r e p l a c e C h i l d ( 
 	 	 	 	 t h i s . p r e v _ i n s e n s i t i v e ,   t h i s . p r e v ) ; 
 	 	 } 
 	 } 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . s e t N e x t L i n k S e n s i t i v i t y   =   f u n c t i o n ( s e n s i t i v e ) 
 { 
 	 i f   ( s e n s i t i v e )   { 
 	 	 i f   ( t h i s . n e x t _ i n s e n s i t i v e . p a r e n t N o d e )   { 
 	 	 	 t h i s . n e x t _ i n s e n s i t i v e . p a r e n t N o d e . r e p l a c e C h i l d ( 
 	 	 	 	 t h i s . n e x t ,   t h i s . n e x t _ i n s e n s i t i v e ) ; 
 	 	 } 
 	 }   e l s e   { 
 	 	 i f   ( t h i s . n e x t . p a r e n t N o d e )   { 
 	 	 	 t h i s . n e x t . p a r e n t N o d e . r e p l a c e C h i l d ( 
 	 	 	 	 t h i s . n e x t _ i n s e n s i t i v e ,   t h i s . n e x t ) ; 
 	 	 } 
 	 } 
 } 
 
 P a g e S c r o l l e r . p r o t o t y p e . s c r o l l T o C u r r e n t P a g e   =   f u n c t i o n ( ) 
 { 
 	 v a r   o l d _ s c r o l l _ p o s   =   t h i s . c o n t a i n e r . s c r o l l T o p ; 
 
 	 / /   w o r k s   b e c a u s e   a l l   p a g e s   a r e   t h e   s a m e   h e i g h t 
 	 v a r   n e w _ s c r o l l _ p o s   =   t h i s . h e i g h t   *   t h i s . c u r r e n t _ p a g e ; 
 
 	 i f   ( t h i s . a n i m a t i o n   & &   t h i s . a n i m a t i o n . i s A n i m a t e d ( ) ) 
 	 	 t h i s . a n i m a t i o n . s t o p ( ) ; 
 
 	 t h i s . a n i m a t i o n   =   n e w   Y A H O O . u t i l . S c r o l l ( t h i s . c o n t a i n e r , 
 	 	 {   s c r o l l :   {   f r o m :   [ 0 ,   o l d _ s c r o l l _ p o s ] ,   t o :   [ 0 ,   n e w _ s c r o l l _ p o s ]   }   } , 
 	 	 0 . 5 ,   Y A H O O . u t i l . E a s i n g . e a s e O u t ) ; 
 
 	 t h i s . a n i m a t i o n . a n i m a t e ( ) ; 
 } 
 
 / * * 
   *   P a g e 
   * / 
 f u n c t i o n   P a g e ( i d ) 
 { 
 	 t h i s . i d   =   i d ; 
 
 	 t h i s . n a v   =   n u l l ; 
 	 v a r   n a v _ e l e m e n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n a v - p a g e - '   +   t h i s . i d ) ; 
 	 f o r   ( v a r   i   =   0 ;   i   <   n a v _ e l e m e n t . c h i l d N o d e s . l e n g t h ;   i + + )   { 
 	 	 i f   ( n a v _ e l e m e n t . c h i l d N o d e s [ i ] . n o d e N a m e   = =   ' A ' )   { 
 	 	 	 t h i s . n a v   =   n a v _ e l e m e n t . c h i l d N o d e s [ i ] ; 
 	 	 	 b r e a k ; 
 	 	 } 
 	 } 
 
 	 t h i s . p a g e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p c - p a g e - '   +   t h i s . i d ) ; 
 	 t h i s . p a g e . s t y l e . o v e r f l o w   =   ' h i d d e n ' ; 
 } 
 
 P a g e . p r o t o t y p e . s e t P a g e H e i g h t   =   f u n c t i o n ( h e i g h t ) 
 { 
 	 t h i s . p a g e . s t y l e . h e i g h t   =   h e i g h t   +   ' p x ' ; 
 } 
 
 P a g e . p r o t o t y p e . s e t N a v H i g h l i g h t   =   f u n c t i o n ( h i g h l i g h t ) 
 { 
 	 i f   ( t h i s . n a v )   { 
 	 	 i f   ( h i g h l i g h t ) 
 	 	 	 Y A H O O . u t i l . D o m . a d d C l a s s ( t h i s . n a v ,   ' c u r r e n t ' ) ; 
 	 	 e l s e 
 	 	 	 Y A H O O . u t i l . D o m . r e m o v e C l a s s ( t h i s . n a v ,   ' c u r r e n t ' ) ; 
 	 } 
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 f u n c t i o n   o p e n P o p U p ( w i d t h , h e i g h t , u r l , t a r g e t ) {  
 	 	 w i n d o w . o p e n ( u r l , t a r g e t , ' t o o l b a r = 0 , l o c a t i o n = 0 ,   d i r e c t o r i e s = 0 ,   s t a t u s = 0 ,   m e n u b a r = 0 ,   s c r o l l b a r s = 1 ,   r e s i z a b l e = 0 ,   w i d t h = '   +   w i d t h   +   ' ,   h e i g h t = '   +   h e i g h t   +   ' ,   l e f t = '   +   ( s c r e e n . w i d t h   -   w i d t h ) / 2   +   ' ,   t o p = '   +   ( s c r e e n . h e i g h t - h e i g h t ) / 2   ) ;  
 }  
 f u n c t i o n   o p e n W i n ( w i d t h , h e i g h t , u r l , t a r g e t ) {  
 	 	 w i n d o w . o p e n ( u r l , t a r g e t , ' t o o l b a r = 0 , l o c a t i o n = 0 ,   d i r e c t o r i e s = 0 ,   s t a t u s = 0 ,   m e n u b a r = 0 ,   s c r o l l b a r s = 0 ,   r e s i z a b l e = 0 ,   w i d t h = '   +   w i d t h   +   ' ,   h e i g h t = '   +   h e i g h t   +   ' ,   l e f t = '   +   ( s c r e e n . w i d t h   -   w i d t h ) / 2   +   ' ,   t o p = '   +   ( s c r e e n . h e i g h t - h e i g h t ) / 2   ) ;  
 }  
 f u n c t i o n   p o p u p _ w i n ( ) {  
                 o p e n P o p U p ( 6 0 0 , 4 0 0 , ' a b o u t : b l a n k ' , ' _ p w i n ' ) ;  
 }  
 f u n c t i o n   o p _ m _ i ( u r l ) {  
         o p e n P o p U p ( 3 9 2 , 4 5 0 , ' a b o u t : b l a n k ' , ' _ p i m a g e ' ) ;  
 }  
 f u n c t i o n   t i m e _ p a r a m s ( ) {  
                         v a r   a   =   n e w   D a t e ( ) ;  
                         v a r   m s   =   a . g e t M i l l i s e c o n d s ( ) ;  
                         v a r   s   =   a . g e t S e c o n d s ( ) ;  
                         v a r   m n   =   a . g e t M i n u t e s ( ) ;  
                         v a r   h   =   a . g e t H o u r s ( ) ;  
                         v a r   d   =   a . g e t D a y ( ) ;  
                         v a r   m   =   a . g e t M o n t h ( ) ;  
                         v a r   y   =   a . g e t F u l l Y e a r ( ) ;  
                         v a r   t   =   y + ' . ' + m + ' . ' + d + ' - ' + h + ' : ' + m n + ' : ' + s + ' : ' + m s ;  
                         r e t u r n   t ;  
 }  
  
 f u n c t i o n   c o u n t e r ( i d ) {  
         i f ( t y p e o f ( d o c u m e n t . g e t E l e m e n t B y I d ( ' C o u n t G a m e P l a y ' ) ) = = ' u n d e f i n e d '   | |   d o c u m e n t . g e t E l e m e n t B y I d ( ' C o u n t G a m e P l a y ' ) = = n u l l ) {  
                 d o c u m e n t . w r i t e ( ' < i m g   i d = " C o u n t G a m e P l a y "   s r c = " / b a c k e n d / c l i e n t / C o u n t G a m e P l a y . a s p x ? g _ i d = ' + i d + ' & s i d = ' + t i m e _ p a r a m s ( ) + ' "   w i d t h = " 1 "   h e i g h t = " 1 "   b o r d e r = " 0 "   / > ' ) ;  
         }  
         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 ( ' C o u n t G a m e P l a y ' ) . s r c = ' / b a c k e n d / c l i e n t / C o u n t G a m e P l a y . a s p x ? g _ i d = ' + i d + ' & s i d = ' + t i m e _ p a r a m s ( ) ;  
         }  
         i f ( i d ! = ' '   & &   i d ! = n u l l )  
                 v a r   t = s e t T i m e o u t ( ' c o u n t e r ( " ' + i d + ' " ) ' , 3 0 0 0 0 0 ) ; / / l o a d   l a i   s a u   5   p h u t  
 }  
  
  
 A O   =   f u n c t i o n ( u r l , q u e r y )  
 {  
 	 t h i s . u r l   	 	 	 =   u r l ;  
 	 t h i s . q u e r y   	 	 	 =   q u e r y ;  
 	 t h i s . u r i 	 	 	 =   u r l   +   " ? "   +   q u e r y ;  
 	 t h i s . i n i t   	 	 	 =   f a l s e ;  
 	 t h i s . h t t p   	 	 	 =   f a l s e ;  
 	 t h i s . s e t u p ( ) ;  
 }  
 A O . p r o t o t y p e . d e b u g   =   f a l s e ;  
 A O . p r o t o t y p e . s e t u p   =   f u n c t i o n ( )  
 {  
 	 i f   ( w i n d o w . X M L H t t p R e q u e s t )  
 	 {  
 	 	 t h i s . h t t p   =   n e w   X M L H t t p R e q u e s t ( ) ;  
 	 }  
 	 i f   ( ! t h i s . h t t p   & &   w i n d o w . A c t i v e X O b j e c t )  
 	 {  
 	 	 t r y  
 	 	 {  
 	 	 	 t h i s . h t t p   =   n e w   A c t i v e X O b j e c t ( " M s x m l 2 . X M L H T T P " ) ;  
 	 	 }   c a t c h   ( e )   {  
 	 	 	 t r y  
 	 	 	 {  
 	 	 	 	 t h i s . h t t p   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;  
 	 	 	 }   c a t c h   ( e )   {   t h i s . h t t p   =   f a l s e ;   }  
 	 	 }  
 	 }  
 	 i f   ( t h i s . h t t p )   t h i s . i n i t   =   t r u e ;  
 	 i f   ( t h i s . d e b u g )   a l e r t ( t h i s . h t t p ) ;  
 }  
  
 A O . h a n d l e r   =   f u n c t i o n ( o )  
 {  
 	 v a r   o b j   =   o ;  
 	 i f   ( o b j . d e b u g )   a l e r t ( " r e a d y S t a t e :   "   +   o b j . h t t p . r e a d y S t a t e ) ;  
 	  
 	 i f   ( o b j . h t t p . r e a d y S t a t e   = =   4 )  
 	 {  
 	 	 / /   p r o p e r t i e s  
 	 	 o b j . t x t 	 	 	 	 =   o b j . h t t p . r e s p o n s e T e x t ;  
 	 	 o b j . x m l   	 	 	 =   o b j . h t t p . r e s p o n s e X M L ;  
 	 	 o b j . r e a d y S t a t e   	 	 =   o b j . h t t p . r e a d y S t a t e ;  
 	 	 o b j . s t a t u s 	   	 	 =   o b j . h t t p . s t a t u s ;  
 	 	 o b j . s t a t u s T e x t 	 	 =   o b j . h t t p . s t a t u s T e x t ;  
 	 	 o b j . h e a d e r s   	 	 =   o b j . h t t p . g e t A l l R e s p o n s e H e a d e r s ( ) ;  
 	 	  
 	 	 / /   m e t h o d s  
 	 	 o b j . g e t H e a d e r 	 	 =   f u n c t i o n ( a H e a d e r )   {   r e t u r n   o b j . h t t p . g e t R e s p o n s e H e a d e r ( a H e a d e r ) ;   }  
 	 	  
 	 	 / / i f   ( o b j . s t a t u s   ! =   2 0 0 )   o b j . i n i t   =   f a l s e ;  
 	 	  
 	 	 i f   ( o b j . d e b u g )   a l e r t ( " s t a t u s :   "   +   o b j . s t a t u s   +   " \ n c a l l i n g   o n l o a d ( ) " ) ;  
 	 	  
 	 	 o b j . o n l o a d ( ) ;  
 	 }  
 }  
  
 / /   e a r l y   u t i l i t y   m e t h o d   . . .   n e e d   t o   c o m e   u p   w i t h   b e t t e r   o n e s  
 A O . p r o t o t y p e . p u t H e r e   =   f u n c t i o n ( i t e m I D ,   w h a t )  
 {  
 	 i f   ( w h a t   ! =   n u l l )   d o c u m e n t . g e t E l e m e n t B y I d ( i t e m I D ) . i n n e r H T M L   =   w h a 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 ( i t e m I D ) . i n n e r H T M L   =   t h i s . t x t ;  
 }  
  
 A O . p r o t o t y p e . g o   =   f u n c t i o n ( v )  
 {  
 	 i f   ( ! t h i s . i n i t )   r e t u r n   f a l s e ;  
 	 v a r   m e   =   t h i s ;  
 	 t r y  
 	 {  
 	 	 t h i s . h t t p . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( )   {   A O . h a n d l e r ( m e ) ;   }  
 	 	  
 	 	 i f   ( v   = =   " G E T " )  
 	 	 {  
 	 	 	 i f   ( t h i s . d e b u g )   a l e r t ( " g e t t i n g :   "   +   t h i s . u r i ) ;  
 	 	 	 t h i s . h t t p . o p e n ( " G E T " ,   t h i s . u r i ,   t r u e ) ;  
 	 	 	 t h i s . h t t p . s e n d ( n u l l ) ;  
 	 	 }  
 	 	 e l s e   i f   ( v   = =   " P O S T " )  
 	 	 {  
 	 	 	 i f   ( t h i s . d e b u g )   a l e r t ( " p o s t i n g :   "   +   t h i s . u r l   +   " \ n p o s t   d a t a :   "   +   t h i s . q u e r y ) ;  
 	 	 	 t h i s . h t t p . o p e n ( " P O S T " ,   t h i s . u r l ,   t r u e ) ;  
 	 	 	 / /   t o d o :   s e t   t h i s   a s   a n   o p t i o n   s o   w e   c a n   a c t u a l l y   d o   a   w e b - s e r v i c e   t y p e   t h i n g  
 	 	 	 t h i s . h t t p . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " , " a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d " ) ;  
 	 	 	 t h i s . h t t p . s e n d ( t h i s . q u e r y ) ;  
 	 	 }  
 	 }  
 	 c a t c h ( e )  
 	 {  
 	 	 i f   ( t h i s . d e b u g )   a l e r t ( " f a i l e d   t o   c o n n e c t " ) ;  
 	 	 t h i s . i n i t   =   f a l s e ;  
 	 	 t h i s . o n l o a d ( ) ;  
 	 }  
 }  
  
 A O . p r o t o t y p e . g e t   =   f u n c t i o n ( )   {   t h i s . g o ( " G E T " ) ;   }  
 A O . p r o t o t y p e . p o s t   =   f u n c t i o n ( )   {   t h i s . g o ( " P O S T " ) ;   }  
 A O . p r o t o t y p e . o n l o a d   =   f u n c t i o n ( )   {   } ;  
  
  
 v a r   i f r a m e _ b o x ;  
 f u n c t i o n   Y U I _ i F r a m e B o x ( t i t l e ,   u r l ,   w i d t h ,   h e i g h t ) {  
         v a r   h a n d l e C l o s e   =   f u n c t i o n ( )   {  
                 t h i s . h i d e ( ) ;  
         } ;  
         v a r   h t m l   =   ' < i f r a m e   s r c = \ ' ' + u r l + ' \ '   w i d t h = ' + w i d t h + '   h e i g h t = ' + h e i g h t + '   m a r g i n w i d t h = " 0 "   m a r g i n h e i g h t = " 0 "   v s p a c e = " 0 "   h s p a c e = " 0 "   a l l o w t r a n s p a r e n c y = " t r u e "   b o r d e r w i d t h = 0   f r a m e b o r d e r = 0 > < / i f r a m e > ' ;  
         i f r a m e _ b o x   =   n e w   Y A H O O . w i d g e t . S i m p l e D i a l o g ( ' i f r a m e _ b o x ' ,    
         { w i d t h :   ( p a r s e I n t ( w i d t h )   +   2 0 )   +   ' p x ' ,  
         f i x e d c e n t e r :   t r u e ,  
         v i s i b l e :   f a l s e ,  
         d r a g g a b l e :   t r u e ,  
         c o n s t r a i n t o v i e w p o r t :   t r u e  
         }   ) ;  
         i f r a m e _ b o x . s e t H e a d e r ( t i t l e ) ;  
         i f r a m e _ b o x . s e t B o d y ( h t m l ) ;  
         i f r a m e _ b o x . r e n d e r ( ' y u i _ c o n t a i n e r ' ) ;    
         i f r a m e _ b o x . s h o w ( ) ;  
 }  
 / / H a m   h i e n   t h i   c u a   s o   c h u y e n   k h o a n  
 c h u y e n k h o a n   =   f u n c t i o n   ( t o , s o l u o n g , l y d o ) {  
         Y U I _ i F r a m e B o x ( " C h u y Ãn   k h o £n " ,   " / x e n g / c h u y e n k h o a n _ n h a n h . a s p x ? d e n = " + t o + " & s o l u o n g = " + s o l u o n g + " & l y d o = " + l y d o ,   7 0 0 ,   2 5 0 ) ;  
 }  
 s e n d P M   =   f u n c t i o n ( u s e r n a m e ) { 
         s e n d M a i l ( u s e r n a m e ) ; 
 } 
 s e n d X e n g   =   f u n c t i o n ( u s e r n a m e ) { 
         c h u y e n k h o a n ( u s e r n a m e , ' ' , ' ' ) ; 
 }  
 / / H a m   h i e n   t h i   m e n u   c u a   n g u o i   d u n g  
 v a r   _ u s e r _ m e n u _ c u r r e n t   =   " " ;  
 u s e r _ m e n u   =   f u n c t i o n ( e ,   u s e r n a m e ) { 
                 u s e r n a m e   =   u s e r n a m e . r e p l a c e ( " ' " , " \ ' " ) ; 
                 v a r   D o m   =   Y A H O O . u t i l . D o m ; 
 	         v a r   E v e n t   =   Y A H O O . u t i l . E v e n t ; 
 	         i f ( _ u s e r _ m e n u _ c u r r e n t ! = ' ' ) { 
 	                 v a r   p r e v   =   n e w   Y A H O O . w i d g e t . M e n u ( _ u s e r _ m e n u _ c u r r e n t ) ; 
 	                 p r e v . h i d e ( ) ; 
 	         } 
 	         _ u s e r _ m e n u _ c u r r e n t   =   " u s e r m e n u : " + u s e r n a m e 
                 v a r   o M e n u   =   n e w   Y A H O O . w i d g e t . M e n u ( _ u s e r _ m e n u _ c u r r e n t ,   {   f i x e d c e n t e r :   f a l s e   } ) ; 
                 v a r   i t e m s   =   o M e n u . g e t I t e m s ( ) ; 
                 i f ( i t e m s = = n u l l   | |   i t e m s . l e n g t h = = 0 ) { 
                         o M e n u . a d d I t e m ( {   t e x t :   ' G íi   t i n   n h ¯n ' , c l a s s n a m e : ' s e n d p m ' , u r l : ' j a v a s c r i p t : s e n d M a i l ( " ' + u s e r n a m e + ' " ) ; ' } , 0 ) ; 
                         o M e n u . a d d I t e m ( {   t e x t :   ' G íi   X È N G ' , c l a s s n a m e : ' s e n d x e n g ' , u r l : ' j a v a s c r i p t : s e n d X e n g ( " ' + u s e r n a m e + ' " ) ; ' } , 0 ) ; 
                         o M e n u . a d d I t e m ( {   t e x t :   ' T h ô n g   t i n   c á   n h â n ' , c l a s s n a m e : ' p r o f i l e ' ,   u r l :   ' / t h a n h v i e n / p r o f i l e . a s p x ? u s e r n a m e = ' +   u s e r n a m e   } , 1 ) ; 
                         o M e n u . a d d I t e m ( {   t e x t :   ' T r a n g   r i ê n g ' , c l a s s n a m e : ' m y p a g e ' ,   u r l :   ' h t t p : / / m y . g a m e v u i . c o m / ' +   u s e r n a m e   +   ' / d e f a u l t . a s p x '   } , 1 ) ; 
                         o M e n u . a d d I t e m ( {   t e x t :   ' T r a n g   b l o g ' ,   c l a s s n a m e : ' b l o g ' ,   u r l : ' h t t p : / / m y . g a m e v u i . c o m / ' + u s e r n a m e + ' / b l o g / d e f a u l t . a s p x '   } , 1 ) ; 
                         o M e n u . a d d I t e m ( {   t e x t :   ' K ¿t   b ¡n ' , c l a s s n a m e : ' a d d f r i e n d ' , u r l : ' / f r i e n d / a d d . a s p x ? u s e r n a m e = '   +   u s e r n a m e   } , 2 ) ; 
                         o M e n u . r e n d e r ( " y u i _ c o n t a i n e r " ) ; 
                 } 
 	         o M e n u . s h o w ( ) ; 
 	         D o m . s e t X Y ( o M e n u . e l e m e n t ,   E v e n t . g e t X Y ( e )     , t r u e ) ; 
 } 
 
 
