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