ÿþv a r   m e s s a g e = " C o p y r i g h t   © 2 0 1 1   D a v i d   K e b o .   A l l   r i g h t s   r e s e r v e d . \ n \ n I m a g e s   m a y   n o t   b e   u s e d   i n   a n y   w a y   o r   f o r m   w i t h o u t   w r i t t e n   p e r m i s s i o n   f r o m   t h e   p h o t o g r a p h e r . " ;  
  
  
  
 f u n c t i o n   c l i c k I E 4 ( ) {  
 i f   ( e v e n t . b u t t o n = = 2 ) {  
 a l e r t ( m e s s a g e ) ;  
 r e t u r n   f a l s e ;  
 }  
 }  
  
 f u n c t i o n   c l i c k N S 4 ( e ) {  
 i f   ( d o c u m e n t . l a y e r s | | 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 ) {  
 i f   ( e . w h i c h = = 2 | | e . w h i c h = = 3 ) {  
 a l e r t ( m e s s a g e ) ;  
 r e t u r n   f a l s e ;  
 }  
 }  
 }  
  
 i f   ( d o c u m e n t . l a y e r s ) {  
 d o c u m e n t . 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 ) ;  
 d o c u m e n t . o n m o u s e d o w n = c l i c k N S 4 ;  
 }  
 e l s e   i f   ( 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 ) {  
 d o c u m e n t . o n m o u s e d o w n = c l i c k I E 4 ;  
 }  
  
 d o c u m e n t . o n c o n t e x t m e n u = n e w   F u n c t i o n ( " a l e r t ( m e s s a g e ) ; r e t u r n   f a l s e " )  
  
  
  
  
  
  
  
  
  
  
  
  
  
 f u n c t i o n   s e t I m a g e ( i m g _ n a m e ,   i m g _ s r c )  
 {  
       d o c u m e n t [ i m g _ n a m e ] . s r c   =   i m g _ s r c ;  
 }  
 f u n c t i o n   t o g g l e E l e m e n t ( m )  
 {  
   e l e m   =   d o c u m e n t . g e t E l e m e n t B y I d ( m ) ;  
   i f   ( e l e m . s t y l e . d i s p l a y   ! =   ' n o n e ' )    
   	 e l e m . s t y l e . d i s p l a y   =   ' n o n e ' ;  
   e l s e  
   	 e l e m . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
    
 }  
  
 f u n c t i o n   h i d e E l e m e n t ( m )  
 {  
   e l e m   =   d o c u m e n t . g e t E l e m e n t B y I d ( m ) ;  
   e l e m . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 }  
  
 f u n c t i o n   s h o w E l e m e n t ( m )  
 {  
   e l e m   =   d o c u m e n t . g e t E l e m e n t B y I d ( m ) ;  
   e l e m . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
 }  
  
 f u n c t i o n   c a l c R a n d o m ( a ,   b )  
 {  
 	 r e t u r n   M a t h . r o u n d ( M a t h . r a n d o m ( )   *   ( b   -   1 ) )   +   a ;  
 }  
    
 f u n c t i o n   s w i t c h E l e m e n t s ( a ,   b )  
 {  
   	 t o g g l e E l e m e n t ( a ) ;  
   	 t o g g l e E l e m e n t ( b ) ;  
 }  
    
    
    
    
    
    
    
    
    
    
    
    
            
 
