ÿþv a r   l o a d h t m l = ' < i m g   s r c = " h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / l o a d i n g - s p i n n e r . g i f "   / > ' ;  
 i s I E = d o c u m e n t . a l l ;  
 i s N N = ! 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 ;  
 i s N 4 = d o c u m e n t . l a y e r s ;  
 i s H o t = f a l s e ;  
 v a r   j a i e z e _ V i s i b l e = f a l s e ;  
  
 f u n c t i o n   d d I n i t ( e ) {  
     t o p D o g = i s I E   ?   " B O D Y "   :   " H T M L " ;  
     w h i c h D o g = i s I E   ?   d o c u m e n t . a l l . t h e L a y 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 e L a y e r " ) ;      
     h o t D o g = i s I E   ?   e v e n t . s r c E l e m e n t   :   e . t a r g e t ;      
     w h i l e   ( h o t D o g . i d ! = " t i t l e B a r " & & h o t D o g . t a g N a m e ! = t o p D o g ) {  
         h o t D o g = i s I E   ?   h o t D o g . p a r e n t E l e m e n t   :   h o t D o g . p a r e n t N o d e ;  
     }      
     i f   ( h o t D o g . i d = = " t i t l e B a r " ) {  
         o f f s e t x = i s I E   ?   e v e n t . c l i e n t X   :   e . c l i e n t X ;  
         o f f s e t y = i s I E   ?   e v e n t . c l i e n t Y   :   e . c l i e n t Y ;  
         n o w X = p a r s e I n t ( w h i c h D o g . s t y l e . l e f t ) ;  
         n o w Y = p a r s e I n t ( w h i c h D o g . s t y l e . t o p ) ;  
         d d E n a b l e d = t r u e ;  
         d o c u m e n t . o n m o u s e m o v e = d d ;  
         r e t u r n   f a l s e ;  
     }  
 }  
  
 f u n c t i o n   d d ( e ) {  
     i f   ( ! d d E n a b l e d )   r e t u r n ;  
     w h i c h D o g . s t y l e . l e f t = i s I E   ?   n o w X + e v e n t . c l i e n t X - o f f s e t x   :   n o w X + e . c l i e n t X - o f f s e t x ;    
     w h i c h D o g . s t y l e . t o p = i s I E   ?   n o w Y + e v e n t . c l i e n t Y - o f f s e t y   :   n o w Y + e . c l i e n t Y - o f f s e t y ;  
     r e t u r n   f a l s e ;      
 }  
  
 f u n c t i o n   d d N 4 ( w h a t D o g ) {  
     i f   ( ! i s N 4 )   r e t u r n ;  
     N 4 = e v a l ( w h a t D o g ) ;  
     N 4 . c a p t u r e E v e n t s ( E v e n t . M O U S E D O W N | E v e n t . M O U S E U P ) ;  
     N 4 . o n m o u s e d o w n = f u n c t i o n ( e ) {  
         N 4 . c a p t u r e E v e n t s ( E v e n t . M O U S E M O V E ) ;  
         N 4 x = e . x ;  
         N 4 y = e . y ;  
     }  
     N 4 . o n m o u s e m o v e = f u n c t i o n ( e ) {  
         i f   ( i s H o t ) {  
             N 4 . m o v e B y ( e . x - N 4 x , e . y - N 4 y ) ;  
             r e t u r n   f a l s e ;  
         }  
     }  
     N 4 . o n m o u s e u p = f u n c t i o n ( ) {  
         N 4 . r e l e a s e E v e n t s ( E v e n t . M O U S E M O V E ) ;  
     }  
 }  
  
 f u n c t i o n   h i d e M e ( ) {  
     i f   ( i s I E | | i s N N )   w h i c h D o g . s t y l e . v i s i b i l i t y = " h i d d e n " ;  
     e l s e   i f   ( i s N 4 )   d o c u m e n t . t h e L a y e r . v i s i b i l i t y = " h i d e " ;  
     i f   ( j a i e z e _ V i s i b l e )   S h o w J a y e z e ( ) ;  
 }  
  
 f u n c t i o n   s h o w M e ( ) {  
     i f   ( i s I E | | i s N N )   w h i c h D o g . s t y l e . v i s i b i l i t y = " v i s i b l e " ;  
     e l s e   i f   ( i s N 4 )   d o c u m e n t . t h e L a y e r . v i s i b i l i t y = " s h o w " ;  
 }  
  
 d o c u m e n t . o n m o u s e d o w n = d d I n i t ;  
 d o c u m e n t . o n m o u s e u p = F u n c t i o n ( " d d E n a b l e d = f a l s e " ) ;  
  
 f u n c t i o n   m s g b o x ( m s g b o d y , b t n V a l u e , b t n A c t i o n , m s g _ t i t l e , i m g p a t h , _ l e f t , _ t o p , b t n V a l u e 2 , b t n A c t i o n 2 )  
 {  
 t r y  
 {  
         v a r   s t r H t m l = ' < d i v   i d = " t h e L a y e r "   s t y l e = " p o s i t i o n : a b s o l u t e ; l e f t : '   +   ( _ l e f t = = ' ' | | _ l e f t = = u n d e f i n e d ? ' 1 0 0 p x ' : _ l e f t )   +   ' ; t o p : '   +   ( _ t o p = = ' ' | | _ t o p = = u n d e f i n e d ? ' 1 0 0 p x ' : _ t o p )   +   ' ; v i s i b i l i t y : v i s i b l e " > ' ;  
         s t r H t m l   + =   ' < t a b l e   b o r d e r = " 0 "   c e l l p a d d i n g = " 0 "   c e l l s p a c i n g = " 0 "   d i r = " r t l "   s t y l e = " l e f t :   3 5 % ;   p o s i t i o n :   a b s o l u t e ;   t o p :   4 0 % ;     c o l o r :   # 3 b 5 a 8 2 ; " > ' ;  
         s t r H t m l   + =   ' < t r > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " w i d t h :   6 p x ;   h e i g h t :   3 0 p x ;   b a c k g r o u n d - i m a g e :   u r l ( h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / m s g T R i g h t . p n g ) ; b a c k g r o u n d - r e p e a t : n o - r e p e a t " > & n b s p ; ' ;  
         s t r H t m l   + =   ' < / t d > ' ;  
         s t r H t m l   + =   ' < t d   i d = " t i t l e B a r "   s t y l e = " f o n t - s i z e :   1 0 p t ;   f o n t - f a m i l y :   t a h o m a ; c u r s o r : m o v e ;   h e i g h t :   3 0 p x ;   b a c k g r o u n d - i m a g e :   u r l ( h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / m s g T M i d . p n g ) ; " > ' ;  
         s t r H t m l   + =   ' < i m g   o n c l i c k = " h i d e M e ( ) "   s t y l e = " c u r s o r : h a n d ; f l o a t : l e f t "   s r c = " h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / c l o s e 2 . g i f "   a l t = " (3*F" > < i l a y e r   w i d t h = " 1 0 0 % "   o n S e l e c t S t a r t = " r e t u r n   f a l s e " > ' ;  
         s t r H t m l   + =   ' < l a y e r   w i d t h = " 1 0 0 % "   o n M o u s e o v e r = " i s H o t = t r u e ; i f   ( i s N 4 )   d d N 4 ( t h e L a y e r ) "   o n M o u s e o u t = " i s H o t = f a l s e " > ' ;  
         s t r H t m l   + =   ' < s p a n   i d = " m s g t i t l e " > ' ;  
         s t r H t m l   + =   ( m s g _ t i t l e = = ' ' | | m s g _ t i t l e = = u n d e f i n e d ? ' ' : m s g _ t i t l e ) ;  
         s t r H t m l   + =   ' < / s p a n > < / l a y e r > ' ;  
         s t r H t m l   + =   ' < / i l a y e r > ' ;  
         s t r H t m l   + =   ' < / t d > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " w i d t h :   6 p x ;   h e i g h t :   3 0 p x ;   b a c k g r o u n d - i m a g e :   u r l ( h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / m s g T L e f t . p n g ) ; b a c k g r o u n d - r e p e a t : n o - r e p e a t " > & n b s p ; ' ;  
         s t r H t m l   + =   ' < / t d > ' ;  
         s t r H t m l   + =   ' < / t r > ' ;  
         s t r H t m l   + =   ' < t r > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " w i d t h :   5 p x ;   b o r d e r - r i g h t :   # 3 b 5 a 8 2   1 p x   s o l i d ;   b o r d e r - b o t t o m - w i d t h :   1 p x ;   b o r d e r - b o t t o m - c o l o r :   # 3 b 5 a 8 2 ;   b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 ' + ( b t n V a l u e = = ' ' | | b t n V a l u e = = u n d e f i n e d ? ' ; b o r d e r - b o t t o m :   # 3 b 5 a 8 2   1 p x   s o l i d ' : ' ' ) + ' " > ' ;  
         s t r H t m l   + =   ' & n b s p ; < / t d > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " w i d t h :   2 8 8 p x ;   b o r d e r - t o p - w i d t h :   1 p x ;   b o r d e r - l e f t - w i d t h :   1 p x ;   b o r d e r - l e f t - c o l o r :   # 3 b 5 a 8 2 ;   b o r d e r - b o t t o m - w i d t h :   1 p x ;   b o r d e r - b o t t o m - c o l o r :   # 3 b 5 a 8 2 ;   b o r d e r - t o p - c o l o r :   # 3 b 5 a 8 2 ;   b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 ; ' ;  
         s t r H t m l   + =   ' b o r d e r - r i g h t - w i d t h :   1 p x ;   b o r d e r - r i g h t - c o l o r :   # 3 b 5 a 8 2 ' + ( b t n V a l u e = = ' ' | | b t n V a l u e = = u n d e f i n e d ? ' ; b o r d e r - b o t t o m :   # 3 b 5 a 8 2   1 p x   s o l i d ' : ' ' ) + ' " > ' ;  
         s t r H t m l   + =   ' & n b s p ; < t a b l e   b o r d e r = " 0 "   c e l l p a d d i n g = " 0 "   c e l l s p a c i n g = " 0 "   s t y l e = " w i d t h :   2 8 8 p x " > ' ;  
         s t r H t m l   + =   ' < t r > ' ;  
         s t r H t m l   + =   ' < t d   i d = " m s g b o d y "   > ' ;  
         s t r H t m l   + =   ( m s g b o d y = = ' ' | | m s g b o d y = = u n d e f i n e d ? ' ' : m s g b o d y ) ;  
         s t r H t m l   + =   ' < / t d > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " w i d t h :   6 1 p x " > ' ;  
 s w i t c h ( i m g p a t h )  
 {  
 c a s e   ' ' :  
 i m g p a t h = ' h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / I n f o . p n g ' ;  
 b r e a k ;  
 c a s e   u n d e f i n e d :  
 i m g p a t h = ' h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / I n f o . p n g ' ;  
 b r e a k ;  
 c a s e   ' n o i m a g e ' :  
 i m g p a t h = ' h t t p : / / w w w . a m o u z e s h . i n f o / i m a g e / N o t h i n g . g i f ' ;  
 b r e a k ;  
 }  
         s t r H t m l   + =   ' < i m g   a l t = " I n f o "   s r c = " '   +   i m g p a t h   +   ' "   / > < / t d > ' ;  
         s t r H t m l   + =   ' < / t r > ' ;  
         s t r H t m l   + =   ' < / t a b l e > ' ;  
         s t r H t m l   + =   ' < / t d > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " w i d t h :   5 p x ;   h e i g h t :   1 3 9 p x ;   b o r d e r - b o t t o m - w i d t h :   1 p x ;   b o r d e r - b o t t o m - c o l o r :   # 3 b 5 a 8 2 ;   b o r d e r - l e f t :   # 3 b 5 a 8 2   1 p x   s o l i d ;   b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 ' + ( b t n V a l u e = = ' ' | | b t n V a l u e = = u n d e f i n e d ? ' ; b o r d e r - b o t t o m :   # 3 b 5 a 8 2   1 p x   s o l i d ' : ' ' ) + ' " > ' ;  
         s t r H t m l   + =   ' & n b s p ; < / t d > ' ;  
         s t r H t m l   + =   ' < / t r > ' ;  
         i f   ( b t n V a l u e ! = ' ' & & b t n V a l u e ! = u n d e f i n e d )  
 {  
         s t r H t m l   + =   ' < t r > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " b o r d e r - r i g h t :   # 3 b 5 a 8 2   1 p x   s o l i d ;   w i d t h :   5 p x ;   b o r d e r - b o t t o m :   # 3 b 5 a 8 2   1 p x   s o l i d ; ' ;  
         s t r H t m l   + =   ' h e i g h t :   2 9 p x ;   b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 " > ' ;  
         s t r H t m l   + =   ' & n b s p ; < / t d > ' ;  
         s t r H t m l   + =   ' < t d   a l i g n = " c e n t e r "   s t y l e = " b o r d e r - t o p - w i d t h :   1 p x ;   b o r d e r - l e f t - w i d t h :   1 p x ;   b o r d e r - l e f t - c o l o r :   # 3 b 5 a 8 2 ; ' ;  
         s t r H t m l   + =   ' w i d t h :   2 8 8 p x ;   b o r d e r - t o p - c o l o r :   # 3 b 5 a 8 2 ;   b o r d e r - b o t t o m :   # 3 b 5 a 8 2   1 p x   s o l i d ;   h e i g h t :   2 9 p x ; ' ;  
         s t r H t m l   + =   ' b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 ;   b o r d e r - r i g h t - w i d t h :   1 p x ;   b o r d e r - r i g h t - c o l o r :   # 3 b 5 a 8 2 " > ' ;  
          
         / / s t r H t m l   + =   ' < i n p u t   i d = " B u t t o n 1 "   s t y l e = " f o n t - s i z e :   1 0 p t ;   c o l o r :   # 3 b 5 a 8 2 ;   f o n t - f a m i l y :   t a h o m a ; b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 "   t y p e = " b u t t o n "   v a l u e = " (3*F"   o n c l i c k = " h i d e M e ( ) " / > ' ;  
  
         s t r H t m l   + =   ( b t n V a l u e = = ' ' | | b t n V a l u e = = u n d e f i n e d ? ' ' : ' < s p a n   i d = " b t n 2 p l a c e " > < i n p u t   i d = " b t n 2 "   s t y l e = " f o n t - s i z e :   1 0 p t ;   c o l o r :   # 3 b 5 a 8 2 ;   f o n t - f a m i l y :   t a h o m a ; ' ) ;  
         s t r H t m l   + =   ( b t n V a l u e = = ' ' | | b t n V a l u e = = u n d e f i n e d ? ' ' : ' b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 "   t y p e = " b u t t o n "   v a l u e = " '   +   b t n V a l u e   +   ' "   o n c l i c k = " '   +   b t n A c t i o n     +   ' " / > < / s p a n > ' ) ;  
  
         s t r H t m l   + =   ( b t n V a l u e 2 = = ' ' | | b t n V a l u e 2 = = u n d e f i n e d ? ' ' : ' < s p a n   i d = " b t n 2 p l a c e " > < i n p u t   i d = " b t n 3 "   s t y l e = " f o n t - s i z e :   1 0 p t ;   c o l o r :   # 3 b 5 a 8 2 ;   f o n t - f a m i l y :   t a h o m a ; ' ) ;  
         s t r H t m l   + =   ( b t n V a l u e 2 = = ' ' | | b t n V a l u e 2 = = u n d e f i n e d ? ' ' : ' b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 "   t y p e = " b u t t o n "   v a l u e = " '   +   b t n V a l u e 2   +   ' "   o n c l i c k = " '   +   b t n A c t i o n 2     +   ' " / > < / s p a n > ' ) ;  
                  
         s t r H t m l   + =   ' & n b s p ; < / t d > ' ;  
         s t r H t m l   + =   ' < t d   s t y l e = " b o r d e r - l e f t :   # 3 b 5 a 8 2   1 p x   s o l i d ;   w i d t h :   5 p x ;   b o r d e r - b o t t o m :   # 3 b 5 a 8 2   1 p x   s o l i d ; ' ;  
         s t r H t m l   + =   ' h e i g h t :   2 9 p x ;   b a c k g r o u n d - c o l o r :   # c 2 d 9 f 7 " > ' ;  
         s t r H t m l   + =   ' & n b s p ; < / t d > ' ;  
         s t r H t m l   + =   ' < / t r > ' ;  
         }  
         s t r H t m l   + =   ' < / t a b l e > ' ;  
         s t r H t m l   + =   ' < / d i v > ' ;  
         $ ( ' # m s g p l a c e ' ) . h t m l ( s t r H t m l ) ;  
 }  
 c a t c h ( e ) { }  
 }  
  
 f u n c t i o n   S h o w J a y e z e ( )  
 {  
 t r y  
 {  
 j a i e z e _ V i s i b l e = t r u e ;  
 v a r   s t r H t m l = ' < d i v   i d = " t h e L a y e r "   s t y l e = " p o s i t i o n : a b s o l u t e ; l e f t : 4 0 0 p x ; t o p : 3 0 0 p x ; v i s i b i l i t y : v i s i b l e " > ' ;  
         s t r H t m l   + =   ' < d i v   i d = " t i t l e B a r "   s t y l e = " c u r s o r : m o v e ; w i d t h :   1 0 0 p x ;   h e i g h t :   6 3 p x ;   b a c k g r o u n d - i m a g e :   u r l ( . . / i m a g e / j a i e z e . p n g ) ; " > ' ;  
         s t r H t m l   + =   ' < i l a y e r   w i d t h = " 1 0 0 % "   o n S e l e c t S t a r t = " r e t u r n   f a l s e " > ' ;  
         s t r H t m l   + =   ' < l a y e r   w i d t h = " 1 0 0 % "   o n M o u s e o v e r = " i s H o t = t r u e ; i f   ( i s N 4 )   d d N 4 ( t h e L a y e r ) "   o n M o u s e o u t = " i s H o t = f a l s e " > ' ;  
         s t r H t m l   + =   ' < / l a y e r > ' ;  
         s t r H t m l   + =   ' < / i l a y e r > ' ;  
         s t r H t m l   + =   ' < / d i v > < a   o n c l i c k = " S h o w J a y e z e D e t a i l ( ) ; "   s t y l e = " c u r s o r : h a n d ; c o l o r :   # e c c c 1 c ; f o n t - s i z e :   1 0 p t ;   f o n t - f a m i l y :   t a h o m a " > Ì©  3H'D  Ì©  ,'Ì2G< / a > ' ;  
         s t r H t m l   + =   ' < / d i v > ' ;  
   d i s p l a y ( s t r H t m l , ' m s g p l a c e ' ) ;  
 }  
 c a t c h ( e ) { }  
 }  
 f u n c t i o n   S h o w J a y e z e D e t a i l ( )  
 {  
 t r y  
 {  
 j a i e z e _ V i s i b l e = f a l s e ;  
 v a r   t i t l = ' Ì©  3H'D  Ì©  ,'Ì2G' ;  
 v a r   a c t = ' S e n d A n s w a r e ( ) ' ;  
 v a r   b t n = ' '13'D  ,H'('  
 m s g b o x ( ' ' , b t n   , a c t , t i t l , ' . . / i m a g e / j a i e z e . p n g ' ) ;  
 g e t D a t a ( ' j a i e z e . a s p x ' , ' m s g b o d y ' ) ;  
 }  
 c a t c h ( e ) { }  
 }  
  
 f u n c t i o n   s e l e c t c h c k ( i d )  
 {  
 t r y  
 {  
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c h k _ 1 ' ) . c h e c k 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 h k _ 2 ' ) . c h e c k 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 h k _ 3 ' ) . c h e c k 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 h k _ 4 ' ) . c h e c k e d = " " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . c h e c k e d = " c h e c k e d " ;  
 }  
 c a t c h ( e ) { }  
 }  
 f u n c t i o n   S e n d A n s w a r e ( )  
 {  
 t r y  
 {  
         v a r   y A n s = 0 ;  
         v a r   s a l t = ( d o c u m e n t . g e t E l e m e n t B y I d ( ' s a l t ' ) . v a l u e * 1 ) + 1 ;  
         y A n s = d o c u m e n t . g e t E l e m e n t B y I d ( ' c h k _ 1 ' ) . c h e c k e d = = t r u e ? 1 : y A n s ;  
         y A n s = d o c u m e n t . g e t E l e m e n t B y I d ( ' c h k _ 2 ' ) . c h e c k e d = = t r u e ? 2 : y A n s ;  
         y A n s = d o c u m e n t . g e t E l e m e n t B y I d ( ' c h k _ 3 ' ) . c h e c k e d = = t r u e ? 3 : y A n s ;  
         y A n s = d o c u m e n t . g e t E l e m e n t B y I d ( ' c h k _ 4 ' ) . c h e c k e d = = t r u e ? 4 : y A n s ;  
         v a r   a n s t r u e = f a l s e ;  
         a n s t r u e = ( ( d o c u m e n t . g e t E l e m e n t B y I d ( ' c h k _ 1 ' ) . v a l u e * 1 ) ^ s a l t + + ) = = y A n s ? t r u e : f a l s e ;  
         g e t D a t a ( ' j a i e z e D e t a i l . a s p x ? u s e r A n s = ' + a n s t r u e , ' m s g b o d y ' ) ;  
         d i s p l a y ( ' ' , ' b t n 2 p l a c e ' ) ;  
 }  
 c a t c h ( e ) { }  
 } 
