ÿþ/ / J a v a   S c r i p t   L i b r a r y   f o r   S e a G a m e s   2 2   O f f i c i a l   W e b   S i t e  
 / / W r i t t e n   b y   T r a n   V i n h   -   F P T   C o m m u n i c a t i o n s  
 / / E m a i l 	 	 :   v i n h t r a n @ f p t . v n  
 / / D a t e 	 	 :   J u n   0 2   2 0 0 3  
 / / L a n g u a g e 	 :   V i e t n a m e s e  
  
 v a r   i s I E   =   ( d o c u m e n t . g e t E l e m e n t B y I d   & &   d o c u m e n t . a l l ) ;  
  
 v a r   s u b j e c t d e s c t e x t   =   n e w   A r r a y ( ' & # 2 7 2 ; i & # 7 8 7 3 ; n   k i n h ' ,  
 ' T h & # 7 8 7 5 ;   t h a o   d & # 4 3 2 ; & # 7 8 9 9 ; i   n & # 4 3 2 ; & # 7 8 9 9 ; c ' , ' B & # 7 8 5 5 ; n   c u n g ' , ' C & # 7 8 4 7 ; u   l & # 2 4 4 ; n g ' , ' B & # 2 4 3 ; n g   r & # 7 8 9 3 ; ' , ' Q u y & # 7 8 7 3 ; n   a n h ' , ' C a n o e i n g ' ,  
 ' X e   & # 2 7 3 ; & # 7 8 4 1 ; p ' , ' & # 2 7 2 ; & # 7 8 4 5 ; u   k i & # 7 8 7 1 ; m ' , ' B & # 2 4 3 ; n g   & # 2 7 3 ; & # 2 2 5 ; ' , ' T h & # 7 8 7 5 ;   d & # 7 9 0 9 ; c ' ,  
 ' B & # 2 4 3 ; n g   n & # 2 3 3 ; m ' , ' J u d o ' , ' K a r a t e d o ' , ' C h & # 2 3 2 ; o   t h u y & # 7 8 7 3 ; n ' , ' C & # 7 8 4 7 ; u   m & # 2 2 6 ; y ' , ' B & # 7 8 5 5 ; n   s & # 2 5 0 ; n g ' , ' B & # 2 4 3 ; n g   b & # 2 2 4 ; n ' ,  
 ' T a e k w o n d o ' , ' Q u & # 7 8 4 7 ; n   v & # 7 9 0 7 ; t ' , ' B & # 2 4 3 ; n g   c h u y & # 7 8 7 3 ; n ' , ' C & # 7 9 1 7 ;   t & # 7 8 4 1 ; ' , ' V & # 7 8 5 3 ; t ' , ' W u s h u ' , ' B i l l a r d s   &   S n o o k e r ' ,  
 ' T h & # 7 8 7 5 ;   d & # 7 9 0 9 ; c   t h & # 7 8 7 5 ;   h & # 2 3 6 ; n h ' , ' C & # 7 9 0 1 ;   v u a ' , ' L & # 7 8 6 3 ; n ' , ' P e n c a k   S i l a t ' , ' B i   s & # 7 8 5 5 ; t ' , ' & # 2 7 2 ; & # 2 2 5 ;   c & # 7 8 4 7 ; u ' ,  
 ' & # 2 7 2 ; u a   t h u y & # 7 8 7 3 ; n   t r u y & # 7 8 7 3 ; n   t h & # 7 8 8 9 ; n g ' ) ;  
  
 f u n c t i o n   D r a w L a y e r ( ) {  
 	 i f   ( i s I E ) {  
 	 	 d o c u m e n t . w r i t e ( ' < d i v   i d = " s u b j e c t d e s c " > < / d i v > ' ) ;  
 	 }   e l s e  
 	 	 d o c u m e n t . w r i t e ( ' & n b s p ; ' ) ;  
 }  
  
 f u n c t i o n   m o u s e O v e r ( l O b j e c t ,   s _ i d )  
 {  
 	 i f   ( i s I E ) {  
 	 	 e v a l ( ' d o c u m e n t . '   +   l O b j e c t   +   ' . f i l t e r s . a l p h a . o p a c i t y = 1 0 0 ' ) ;  
 	 	 s u b j e c t d e s c . i n n e r H T M L   =   ' < p   a l i g n = " r i g h t " > < f o n t   s t y l e = " f o n t - f a m i l y : A r i a l ; 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 o l o r : # f f f f f f " > & # 1 8 7 ; & n b s p ; '   +   s u b j e c t d e s c t e x t [ s _ i d - 1 ]   +   ' & n b s p ; & n b s p ; < / f o n t > < / p > ' ;  
 	 } 	  
  
 	 d o c u m e n t . m a s c o t . s r c =   ' / i m a g e s / m a s c o t / '   +   l O b j e c t   +   ' . g i f ' ;  
 }  
  
 f u n c t i o n   m o u s e O u t ( l O b j e c t ) {  
 	 i f   ( i s I E ) {  
 	 	 e v a l ( ' d o c u m e n t . '   +   l O b j e c t   +   ' . f i l t e r s . a l p h a . o p a c i t y = 9 0 ' ) ;  
 	 	 s u b j e c t d e s c . i n n e r H T M L   =   ' ' ;  
 	 }  
  
 	 d o c u m e n t . m a s c o t . s r c =   ' / i m a g e s / m a s c o t / m a s c o t . g i f ' ;  
 }  
  
 f u n c t i o n   E n ( ) {  
 v a r   u r l   =   d o c u m e n t . U R L ;        
 s   =   u r l . s p l i t ( ' / ' ) ;  
  
 	 d o c u m e n t . w r i t e ( ' < a   h r e f = \ ' h t t p : / / e n g l i s h . s e a g a m e s 2 2 . c o m . v n / ' ) ;  
 	 f o r   ( v a r   i = 0 ;   i   < =   s . l e n g t h   -   1 ;   i + + ) {  
 	 	 i f   ( i > 2 ) {  
 	 	 	 d o c u m e n t . w r i t e ( s [ i ] ) ;  
 	 	 	 i f   ( i ! = ( s . l e n g t h - 1 ) )  
 	 	 	 	 d o c u m e n t . w r i t e ( ' / ' ) ;  
 	 	 }  
 	 }  
 	 d o c u m e n t . w r i t e ( ' \ ' > < f o n t   s t y l e = " f o n t - f a m i l y : V e r d a n a ; f o n t - s i z e : 8 p t ; f o n t - w e i g h t : n o r m a l ; " > & # 1 8 7 ; & n b s p ; E n g l i s h < / f o n t > < / a > & n b s p ; & n b s p ; & n b s p ; ' ) ;  
  
 }  
  
 f u n c t i o n   o p e n I m a g e ( v L i n k ,   v W i d t h ,   v H e i g h t )  
 {  
 	 v a r   s L i n k   =   ( t y p e o f ( v L i n k . h r e f )   = =   ' u n d e f i n e d ' )   ?   v L i n k   :   v L i n k . h r e f ;  
  
 	 i f   ( s L i n k   = =   ' ' )  
 	 {  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 w i n D e f   =   ' s t a t u s = y e s , r e s i z a b l e = y e s , s c r o l l b a r s = n o , t o o l b a r = n o , l o c a t i o n = n o , f u l l s c r e e n = n o , t i t l e b a r = y e s , h e i g h t = ' . c o n c a t ( v H e i g h t ) . c o n c a t ( ' , ' ) . c o n c a t ( ' w i d t h = ' ) . c o n c a t ( v W i d t h ) . c o n c a t ( ' , ' ) ;  
 	 w i n D e f   =   w i n D e f . c o n c a t ( ' t o p = ' ) . c o n c a t ( ( s c r e e n . h e i g h t   -   v H e i g h t ) / 2 ) . c o n c a t ( ' , ' ) ;  
 	 w i n D e f   =   w i n D e f . c o n c a t ( ' l e f t = ' ) . c o n c a t ( ( s c r e e n . w i d t h   -   v W i d t h ) / 2 ) ;  
 	 n e w w i n   =   o p e n ( ' ' ,   ' _ b l a n k ' ,   w i n D e f ) ;  
         n e w w i n . d o c u m e n t . w r i t e l n ( ' < t i t l e > C ô n g   T y   c Õ  p h §n   c h u y Ãn   p h á t   n h a n h   b °u   i Çn   < / t i t l e > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < b o d y   t o p m a r g i n = " 0 "   l e f t m a r g i n = " 0 "   m a r g i n h e i g h t = " 0 "   m a r g i n w i d t h = " 0 " > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < t a b l e   w i d t h = " 1 0 0 % "   a l i g n = " c e n t e r "   b o r d e r = " 0 " > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < t r   > < t d   w i d t h = " 1 0 0 % "   a l i g n = " c e n t e r "   > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < a   h r e f = " "   o n C l i c k = " w i n d o w . c l o s e ( ) ;   r e t u r n   f a l s e ; " > < i m g   s r c = " ' ,   s L i n k ,   ' "   a l t = " ' ,   ( i s I E )   ?   ' ó n g   L ¡i '   :   ' D o n g   l a i ' ,   ' "   b o r d e r = 1   a l i g n = c e n t e r   > < / a > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < / t d > < / t r > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < / t a b l e > ' ) ;  
 	 n e w w i n . d o c u m e n t . w r i t e l n ( ' < / b o d y > ' ) ;  
  
 	 i f   ( t y p e o f ( v L i n k . h r e f )   ! =   ' u n d e f i n e d ' )  
 	 {  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 }  
  
 f u n c t i o n   d r a w _ s e a r c h _ b o x ( ) {  
 	 i f   ( i s I E ) {  
 	 	 d o c u m e n t . w r i t e ( ' < i n p u t   t y p e = " t e x t "   n a m e = " q "   s i z e = " 1 2 "   c l a s s = " i i n p u t "   m a x l e n g t h = " 2 0 " > ' ) ;  
 	 }   e l s e  
 	 	 d o c u m e n t . w r i t e ( ' < i n p u t   t y p e = " t e x t "   n a m e = " q "   s i z e = " 6 "   c l a s s = " i i n p u t "   m a x l e n g t h = " 2 0 " > ' ) ;  
 }  
  
 f u n c t i o n   o p e n W i n d o w ( v L i n k ,   v W i d t h ,   v H e i g h t )  
 {  
 	 v a r   s L i n k   =   ( t y p e o f ( v L i n k . h r e f )   = =   ' u n d e f i n e d ' )   ?   v L i n k   :   v L i n k . h r e f ;  
  
 	 i f   ( s L i n k   = =   ' ' )  
 	 {  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 w i n D e f   =   ' s t a t u s = n o , r e s i z a b l e = n o , s c r o l l b a r s = y e s , t o o l b a r = n o , l o c a t i o n = n o , f u l l s c r e e n = n o , t i t l e b a r = y e s , h e i g h t = ' . c o n c a t ( v H e i g h t ) . c o n c a t ( ' , ' ) . c o n c a t ( ' w i d t h = ' ) . c o n c a t ( v W i d t h ) . c o n c a t ( ' , ' ) ;  
 	 w i n D e f   =   w i n D e f . c o n c a t ( ' t o p = ' ) . c o n c a t ( ( s c r e e n . h e i g h t   -   v H e i g h t ) / 2 ) . c o n c a t ( ' , ' ) ;  
 	 w i n D e f   =   w i n D e f . c o n c a t ( ' l e f t = ' ) . c o n c a t ( ( s c r e e n . w i d t h   -   v W i d t h ) / 2 ) ;  
 	 w i n d o w . o p e n ( s L i n k ,   ' p r n ' ,   w i n D e f ) ;  
  
 	 i f   ( t y p e o f ( v L i n k . h r e f )   ! =   ' u n d e f i n e d ' )  
 	 {  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 } 
