ÿþf u n c t i o n   s h o w _ s u b m e n u ( i d )  
 {  
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " l y r " + i d ) . 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 ( " l y r " + i d ) . s t y l e . d i s p l a y = " b l o c k " ;  
 	 	 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 p n " + i d ) ! = 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 ( " s p n " + i d ) ! = 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 ( " s p n " + i d ) . i n n e r H T M L = " & n d a s h ; & n b s p ; " ;  
 	 }  
 	 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 ( " l y r " + i d ) . s t y l e . 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 p n " + i d ) ! = 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 ( " s p n " + i d ) ! = 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 ( " s p n " + i d ) . i n n e r H T M L = " + & n b s p ; " ;  
 	 }  
 }  
  
 f u n c t i o n   z e r o B a s k e t ( )  
 {  
 	 i f   ( i n b a s k e t . l e n g t h = = 0 )  
 	 {  
 	 	 a l e r t ( " y a a a " ) ;  
 	 	 r e t u r n ; 	  
 	 }  
 l o c a t i o n . h r e f = " ? a c t i o n = b a s k e t " ;  
 }  
  
 f u n c t i o n   F i n d T e x t ( )  
 {  
 	 p F o r m   =   d o c u m e n t . f i n d f o r m ;  
 	 i f   ( p F o r m . s e a r c h w o r d . v a l u e = = " " )  
 	 {  
 	 	 a l e r t ( ' EG1('FJ  HC“I  JH  …G  HDJCI  ' ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 p F o r m . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   m a x p i c ( p a t h , w i n w i d , w i n h e i , n a m e , t y p e )  
 {  
 	 t h i r d   =   " w i d t h = " + w i n w i d + "   h e i g h t = " + w i n h e i + "   r e s i z a b l e " ;  
 	 v a r   n e w W i n d o w   =   w i n d o w . o p e n ( " " , " " , t h i r d ) ;  
 	 i f   ( n e w W i n d o w ! = n u l l )  
 	 {  
 	 	 n e w W i n d o w . d o c u m e n t . w r i t e ( " < t i t l e > " + n a m e + " < / t i t l e > " ) ;  
 	 	 n e w W i n d o w . d o c u m e n t . w r i t e ( " < b o d y   l e f t m a r g i n = 0   t o p m a r g i n = 0   a l i g n = c e n t e r   o n c o n t e x t m e n u = ' r e t u r n   f a l s e ' > " ) ;  
 	 	 i f   ( t y p e = = 4 )  
 	 	 {  
 	 	 	 n e w W i n d o w . d o c u m e n t . w r i t e ( " < E M B E D   S R C = " + p a t h + "   q u a l i t y = h i g h   w i d t h = " + w i n w i d + "   h e i g h t = " + w i n h e i + "   T Y P E = a p p l i c a t i o n / x - s h o c k w a v e - f l a s h > < / E M B E D > " ) ;  
 	 	 }  
 	 	 	 e l s e   i f   ( t y p e = = 3 )  
 	 	 	 {  
 	 	 	 	 n e w W i n d o w . d o c u m e n t . w r i t e ( " < E M B E D   S R C = " + p a t h + "   w i d t h = " + w i n w i d + "   h e i g h t = " + w i n h e i + "   A U T O S T A R T = t r u e   R E P E A T = f a l s e > < / E M B E D > " ) ;  
 	 	 	 }  
 	 	 	 	 e l s e  
 	 	 	 	 {  
 	 	 	 	 	 n e w W i n d o w . d o c u m e n t . w r i t e ( " < I M G   S R C = " + p a t h + "   w i d t h = " + w i n w i d + "   h e i g h t = " + w i n h e i + "   o n C l i c k = ' w i n d o w . c l o s e ( ) ; '   o n m o u s e o v e r = ' t h i s . s t y l e . c u r s o r = \ " h a n d \ " ; '   a l t = ' Ä ë ÿ   ç à ê ð û ò è ÿ   -   í à æ ì è ò å ' > " ) ;  
 	 	 	 	 }  
 	 	 n e w W i n d o w . d o c u m e n t . w r i t e ( " < / b o d y > " ) ;  
 	 	 n e w W i n d o w . d o c u m e n t . c l o s e ( ) ;  
 	 	 n e w W i n d o w . d o c u m e n t . f o c u s ( ) ;  
 	 }  
 }  
  
 f u n c t i o n   O n C h e c k F i e l d ( N a m e F o r m , d e l o )  
 { 	  
 	 p F o r m   =     d o c u m e n t . f o r m s [ N a m e F o r m ] ;  
  
 	 i f ( p F o r m . n a m e . v a l u e = = " "   | |   p F o r m . p h o n e . v a l u e = = " " )  
 	 {  
 	 	 a l e r t ( " " ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } 	 	 	  
  
 	 i f   ( d e l o = = 3 )  
 	 {  
 	 	 o n A c t i o n ( d e l o ) ;  
 	 }  
 	 	 e l s e  
 	 	 {  
 	 	 	 i f   ( d e l o = = 1 )  
 	 	 	 {  
 	 	 	 	 p F o r m . s u b a c t . v a l u e = ' a ' ;  
 	 	 	 }  
 	 	 	 	 e l s e  
 	 	 	 	 {  
 	 	 	 	 	 p F o r m . s u b a c t . v a l u e = ' e ' ;  
 	 	 	 	 }  
 	 	 	   	 p F o r m . g o . d i s a b l e d   =   t r u e ;  
 	 	 	   	 p F o r m . s u b m i t ( ) ;  
 	 	 }  
 }  
  
 f u n c t i o n   o n A c t i o n ( d e l o )  
 {  
 p F o r m   =   d o c u m e n t . b a s k e t ;  
 v a r   m _ n C h e c k D e l   =   O n D e l e t e P o s ( ) ;  
 	 i f   ( d e l o = = 1   & &   m _ n C h e c k D e l = = 0 )  
 	 {  
 	 	 a l e r t ( ' ' ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 i f   ( d e l o = = 1 )  
 	 {  
 	 	 m _ b W a r n i n g   =   c o n f i r m ( '   ( ' + m _ n C h e c k D e l + '   ø ò . )   ' ) ;  
 	 	 i f   ( m _ b W a r n i n g = = f a l s e ) { r e t u r n   f a l s e ; }  
 	 	 	 	 	 	 p F o r m . s u b a c t . v a l u e = ' d ' ;  
 	 }  
  
 	 i f   ( d e l o = = 2 ) { p F o r m . s u b a c t . v a l u e = ' c ' ; }  
 	 i f   ( d e l o > = 3 ) { p F o r m . s u b a c t . v a l u e = ' o ' ; }  
  
 	 p F o r m . d e l e t . d i s a b l e d = t r u e ;  
 	 p F o r m . c h e c k . d i s a b l e d = t r u e ;  
 	 p F o r m . o r d e r . d i s a b l e d = t r u e ;  
 	 p F o r m . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   O n D e l e t e P o s ( )  
 {  
 v a r   m _ n E l e m e n t s         =   d o c u m e n t . b a s k e t . e l e m e n t s . l e n g t h ;  
 v a r   m _ n C h e c k e d           =   0 ;  
 	 f o r   ( v a r   n = 0 ;   n < m _ n E l e m e n t s ;   n + + )  
 	 {  
 	 	 i f ( d o c u m e n t . b a s k e t . e l e m e n t s [ n ] . n a m e . s u b s t r i n g ( 0 , 7 ) = = ' d e l l a r r '   & &   d o c u m e n t . b a s k e t . e l e m e n t s [ n ] . c h e c k e d   = =   t r u e )  
 	 	 { m _ n C h e c k e d + + ; }  
 	 }  
 r e t u r n   m _ n C h e c k e d ;  
 }  
  
 f u n c t i o n   s e n d I n B a s k e t ( s t r i n g , i d , s i d , p i d , c p , o f , t y p e )  
 {  
 	 i f   ( i n b a s k e t . l e n g t h ! = 0   & &   i n b a s k e t . i n d e x O f ( i d ) > = 0 )  
 	 {  
 	 	 a l e r t ( ' ' )  
 	 	 r e t u r n ;  
 	 }  
 	 s t r S e n d = ' ? a c t i o n = b a s k e t & s u b a c t = a ' + s t r i n g + ' & p i d = ' + p i d + ' & s i d = ' + s i d + ' & i d = ' + i d + ' & C u r r e n t P a g e = ' + c p + ' & O u t p u t F r o m = ' + o f + ' & t y p e = ' + t y p e ;  
 	 l o c a t i o n . h r e f = s t r S e n d ;  
 }  
  
 f u n c t i o n   O n C h e c k Z e r o ( N a m e F o r m , N a m e F i e l d , F i e l d )  
 { 	  
 	 p F o r m       =   d o c u m e n t . f o r m s [ N a m e F o r m ] ;  
 	 i f   ( p F o r m . e l e m e n t s [ N a m e F i e l d ] . v a l u e . r e p l a c e ( / ( ^ \ s * ) | ( \ s * $ ) / , " " ) = = " " )  
 	 {  
 	 	 a l e r t ( " " + F i e l d + " " ) ;  
 	 	 r e t u r n   f a l s e ; 	  
 	 }  
 p F o r m . s u b m i t ( ) ;  
 }  
  
 f u n c t i o n   C o p y G o o d ( p a t h , w i n w i d )  
 {  
 	 v a r   n e w W i n d o w   =   w i n d o w . o p e n ( p a t h , w i n w i d , " w i d t h = 4 1 8 , h e i g h t = 5 5 0 , s t a t u s = n o , t o o l b a r = n o , r e s i z a b l e = n o , m e n u b a r = n o , l o c a t i o n = n o , s c r o l l b a r s = y e s , t o p = 0 , l e f t = 0 " ) ;  
 	 i f   ( n e w W i n d o w ! = n u l l )  
 	 {  
 	 	 n e w W i n d o w . d o c u m e n t . c l o s e ( ) ;  
 	 	 n e w W i n d o w . d o c u m e n t . f o c u s ( ) ;  
 	 }  
 }  
  
 v a r   n e w W i n d = " " ;  
 f u n c t i o n   E d i t T e x t ( n a m e , b u t n a m e , t i t u l , w d t h , h g h t )  
 {  
   n e w W i n d   =   w i n d o w . o p e n ( " m _ E d i t o r / m _ M i n i E d i t o r . p h p ? t i t u l = " + t i t u l + " & n a m e = " + n a m e + " & b u t n a m e = " + b u t n a m e , " w i n e d t h t m l " , " w i d t h = " + w d t h + " , h e i g h t = " + h g h t + " , s t a t u s = n o , t o o l b a r = n o , m e n u b a r = n o , l o c a t i o n = n o , s c r o l l b a r s = a u t o , t o p = 2 0 , l e f t = 2 0 " )  
 }  
  
 f u n c t i o n   C l o s e E d i t W i n ( )  
 {  
 	 i f   ( n e w W i n d . c l o s e d = = f a l s e ) 	 n e w W i n d . c l o s e ( ) ;  
 }  
  
 f u n c t i o n   S o d e r F i e l d ( s t r i n g )  
 {  
 	 v a r   r e g e x p   =   / < . * ? > / g ;  
 	 v a r   C o n t r l S t r i n g   =   s t r i n g . r e p l a c e ( r e g e x p , " " ) ;  
 	 r e g e x p   =   / & n b s p ; / g ;  
 	 C o n t r l S t r i n g   =   C o n t r l S t r i n g . r e p l a c e ( r e g e x p , " " ) ;  
 	 r e g e x p   =   / ( ^ \ s * ) | ( \ s * $ ) / g ;  
 	 C o n t r l S t r i n g   =   C o n t r l S t r i n g . r e p l a c e ( r e g e x p , " " ) ;  
 	 r e t u r n   C o n t r l S t r i n g ;  
 }  
  
 f u n c t i o n   S e t I m g ( N a m e , I m g )  
 {  
 	 v a r   a c t P n t = a c t M e n u * 1 ;  
 	 v a r   c u r P n t = N a m e . s u b s t r i n g ( 3 , N a m e . l e n g t h ) * 1 ;  
 / / 	 a c t P n t = p a r s e I n t ( a c t M e n u ) ;  
 / / 	 c u r P n t = p a r s e I n t ( N a m e . s u b s t r ( 3 , 1 ) ) ;  
 	 i f   ( a c t P n t = = c u r P n t   & &   f i r s t S t a r t ! = 0 )  
 	 {  
 	   r e t u r n   f a l s e ; 	  
 	 }  
   d o c u m e n t . i m a g e s [ N a m e ] . s r c = e v a l ( I m g + ' . s r c ' ) ;  
 }  
  
 f u n c t i o n   a c t i v e T o p M e n u ( )  
 {  
 	 i f   ( a c t M e n u > 0   & &   a c t M e n u < 6 )  
 	 {  
 	 	 S e t I m g ( " P I C " + a c t M e n u , " I " + a c t M e n u + " _ 2 " ) ;  
 	 }  
 	 	 f i r s t S t a r t = 1 ;  
 }  
  
 f u n c t i o n   O p e n M e n u ( o p e n c o l o r )  
 {  
   i f   ( o p e n M e n u . l e n g t h ! = 0 )  
   {  
     f o r   ( i = 0 ; i < o p e n M e n u . l e n g t h ; i + + )  
     {  
       d o c u m e n t . g e t E l e m e n t B y I d ( " s b m " + o p e n M e n u [ i ] ) . s t y l e . d i s p l a y = " b l o c k " ;  
       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 p n " + o p e n M e n u [ i ] ) ! = 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 ( " s p n " + o p e n M e n u [ i ] ) ! = 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 ( " g r p " + o p e n M e n u [ i ] ) . s t y l e . c o l o r = o p e n c o l o r ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " s p n " + o p e n M e n u [ i ] ) . s t y l e . c o l o r = o p e n c o l o r ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " s p n " + o p e n M e n u [ i ] ) . i n n e r H T M L = " & n d a s h ; & n b s p ; " ;  
       }  
     }  
   }  
 }  
  
 f u n c t i o n   B u t U p D o w n ( u p d o w n , t o p , r i g h t , b o t t o m , l e f t , i d )  
 {  
   i f   ( u p d o w n = = 1 )  
   {  
     d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g T o p = t o p ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g R i g h t = r i g h t ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g B o t t o m = b o t t o m ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g L e f t = l e f 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 d ) . s t y l e . p a d d i n g T o p = t o p ;  
       d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g R i g h t = r i g h t ;  
       d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g B o t t o m = b o t t o m ;  
       d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . p a d d i n g L e f t = l e f t ;  
     }  
 }  
  
 v a r   s t e p R i g h t   =   0 ;  
 v a r   s t e p B o t t o m   =   0 ;  
 f u n c t i o n   v i e w F u l l G o o d ( s t r i n g , i d , w i d t h , n a m e w i n )  
 {  
   s t e p R i g h t     =   ( s t e p R i g h t = = 2 0 0 ) ? s t e p R i g h t : s t e p R i g h t + 1 0 ;  
   s t e p B o t t o m   =   ( s t e p B o t t o m = = 2 0 0 ) ? s t e p B o t t o m : s t e p B o t t o m + 1 0 ;  
 	 v a r   n e w W i n d o w   =   w i n d o w . o p e n ( s t r i n g + " & i d = " + i d , n a m e w i n + i d , " w i d t h = " + w i d t h + " , h e i g h t = 6 0 0 , s t a t u s = n o , t o o l b a r = n o , r e s i z a b l e = y e s , m e n u b a r = n o , l o c a t i o n = n o , s c r o l l b a r s = y e s , t o p = " + s t e p B o t t o m + " , l e f t = " + s t e p R i g h t ) ;  
 	 i f   ( n e w W i n d o w ! = n u l l )  
 	 {  
 	 	 n e w W i n d o w . d o c u m e n t . c l o s e ( ) ;  
 	 	 n e w W i n d o w . d o c u m e n t . f o c u s ( ) ;  
 	 }  
 }  
  
 v a r   L e f t O t s t u p   =   n e w   A r r a y   ( ' 0 ' ) ;  
 v a r   T o p O t s t u p     =   n e w   A r r a y   ( ' 0 ' ) ;  
 v a r   L i s t L a y e r s   =   " 1 " ;  
 f u n c t i o n   S h o w L a y e r s ( )  
 {  
 	 i f   ( L i s t L a y e r s . l e n g t h ! = 0 )  
 	 {  
 	     v a r   b o t t o m P a d     =   0 ;  
 	     v a r   w i n W i d t h       =   p a r s e I n t ( d o c u m e n t . g e t E l e m e n t B y I d ( " l y r 1 " ) . s t y l e . w i d t h ) ;  
 	     v a r   m a x H e i g h t     =   d o c u m e n t . b o d y . c l i e n t H e i g h t - b o t t o m P a d ;  
 	     v a r   l e f t O t s t u p   =   ( d o c u m e n t . b o d y . c l i e n t W i d t h < w i n W i d t h ) ? 0 : ( ( d o c u m e n t . b o d y . c l i e n t W i d t h / 2 ) - ( w i n W i d t h / 2 ) ) ;  
 	     f o r   ( i = 1 ; i < = L i s t L a y e r s . l e n g t h ; i + + )  
 	     {  
 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " l y r " + i ) )  
 	 	 	 {  
 	 	 	 	   w i t h   ( d o c u m e n t . g e t E l e m e n t B y I d ( " l y r " + i ) )  
 	 	 	 	   {  
 	 	 	 	 	 i f   ( L i s t L a y e r s . s u b s t r ( i - 1 , 1 ) ! = " 0 " )  
 	 	 	 	 	 {  
 	 	 	 	 	 	 s t y l e . t o p     =   p a r s e I n t ( T o p O t s t u p [ i - 1 ] ) ;  
 	 	 	 	 	 	 s t y l e . l e f t   =   ( l e f t O t s t u p   +   p a r s e I n t ( L e f t O t s t u p [ i - 1 ] ) ) ;  
 	 	 	 	 	 	 i f   ( i ! = 1 )  
 	 	 	 	 	 	 {  
 	 	 	 	 	 	 	 s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 	 	 	 c u r H e i g h t   =   p a r s e I n t ( T o p O t s t u p [ i - 1 ] )   +   c l i e n t H e i g h t ;  
 	 	 	 	 	 	 	 i f   ( c u r H e i g h t > m a x H e i g h t )   m a x H e i g h t = c u r H e i g h t ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }  
 	 	 	 	 	 e l s e  
 	 	 	 	 	 {  
 	 	 	 	 	 	 i f   ( s t y l e . d i s p l a y   = =   " b l o c k " )   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 ( " c o n t e n t " ) . s t y l e . h e i g h t = m a x H e i g h t + b o t t o m P a d ;  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " l y r 1 " ) . s t y l e . v i s i b i l i t y = " v i s i b l e " ;  
 	 }  
 }  
 
