ÿþ< ! - -    
 / /   K e y s   t o   b e   d i s a b l e d   c a n   b e   a d d e d   t o   t h e   l i s t s   b e l o w .  
 / /   T h e   n u m b e r   i s   t h e   k e y   c o d e   f o r   t h e   p a r t i c u l a r   k e  
 / /   a n d   t h e   t e x t   i s   t h e   d e s c r i p t i o n   d i s p l a y e d   i n   t h e  
 / /   s t a t u s   w i n d o w   i f   t h e   k e y   [ c o m b i n a t i o n ]   i s   p r e s s e d .  
 v a r   b a d K e y s   =   n e w   O b j e c t ( ) ;  
 b a d K e y s . s i n g l e   =   n e w   O b j e c t ( ) ;  
 b a d K e y s . s i n g l e [ ' 8 ' ]   =   ' B a c k s p a c e   o u t s i d e   t e x t   f i e l d s ' ;  
 b a d K e y s . s i n g l e [ ' 1 3 ' ]   =   ' E n t e r   o u t s i d e   a n d   i n s i d e   t e x t   f i e l d s ' ;  
 b a d K e y s . a l t   =   n e w   O b j e c t ( ) ;  
 b a d K e y s . a l t [ ' 3 7 ' ]   =   ' A l t + L e f t   C u r s o r ' ;  
 b a d K e y s . a l t [ ' 3 9 ' ]   =   ' A l t + R i g h t   C u r s o r ' ;  
 b a d K e y s . c t r l   =   n e w   O b j e c t ( ) ;  
 b a d K e y s . c t r l [ ' 7 8 ' ]   =   ' C t r l + N ' ;  
 b a d K e y s . c t r l [ ' 7 9 ' ]   =   ' C t r l + O ' ;  
 f u n c t i o n   c h e c k K e y C o d e ( t y p e ,   c o d e )   {  
 i f   ( b a d K e y s [ t y p e ] [ c o d e ] )   {  
 r e t u r n   t r u e ;  
 }   e l s e   {  
 r e t u r n   f a l s e ;  
 }  
 }  
 f u n c t i o n   g e t K e y T e x t ( t y p e ,   c o d e )   {  
 r e t u r n   b a d K e y s [ t y p e ] [ c o d e ] ;  
 }  
 v a r   i e = d o c u m e n t . a l l ;  
 v a r   w 3 c = 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 ;  
 f u n c t i o n   k e y E v e n t H a n d l e r ( e v t )   {  
 t h i s . t a r g e t   =   e v t . t a r g e t   | |   e v t . s r c E l e m e n t ;  
 t h i s . k e y C o d e   =   e v t . k e y C o d e   | |   e v t . w h i c h ;  
 v a r   t a r g t y p e   =   t h i s . t a r g e t . t y p e ;  
 i f   ( w 3 c )   {  
 i f   ( d o c u m e n t . l a y e r s )   {  
 t h i s . a l t K e y   =   ( ( e v t . m o d i f i e r s   &   E v e n t . A L T _ M A S K )   >   0 ) ;  
 t h i s . c t r l K e y   =   ( ( e v t . m o d i f i e r s   &   E v e n t . C O N T R O L _ M A S K )   >   0 ) ;  
 t h i s . s h i f t K e y   =   ( ( e v t . m o d i f i e r s   &   E v e n t . S H I F T _ M A S K )   >   0 ) ;  
 }   e l s e   {  
 t h i s . a l t K e y   =   e v t . a l t K e y ;  
 t h i s . c t r l K e y   =   e v t . c t r l K e y ;  
 }  
 / /   I n t e r n e t   E x p l o r e r  
 }   e l s e   {  
 t h i s . a l t K e y   =   e v t . a l t K e y ;  
 t h i s . c t r l K e y   =   e v t . c t r l K e y ;  
 }  
 / /   F i n d   o u t   i f   w e   n e e d   t o   d i s a b l e   t h i s   k e y   c o m b i n a t i o n  
 v a r   b a d K e y T y p e   =   ' s i n g l e ' ;  
 i f   ( t h i s . c t r l K e y ) {  
 b a d K e y T y p e   =   ' c t r l ' ;  
 }   e l s e   i f   ( t h i s . a l t K e y )   {  
 b a d K e y T y p e   =   ' a l t ' ;  
 }  
 i f   ( c h e c k K e y C o d e ( b a d K e y T y p e ,   t h i s . k e y C o d e ) )   {  
 r e t u r n   c a n c e l K e y ( e v t ,   t h i s . k e y C o d e ,   t h i s . t a r g e t ,   g e t K e y T e x t ( b a d K e y T y p e ,   t h i s . k e y C o d e ) ) ;  
 }  
 }  
 f u n c t i o n   c a n c e l K e y ( e v t ,   k e y C o d e ,   t a r g e t ,   k e y T e x t )   {  
 i f   ( k e y C o d e = = 8   | |   k e y C o d e = = 1 3 )   {  
 i f   ( k e y C o d e = = 1 3   & &   t a r g e t . t y p e   = =   ' t e x t a r e a ' )   {  
 w i n d o w . s t a t u s   =   ' ' ;  
 r e t u r n   t r u e ;  
 }  
 / /   D o n ' t   w a n t   t o   d i s a b l e   B a c k s p a c e   i n   t e x t   f i e l d s  
 i f   (   k e y C o d e = = 8   & &   ( t a r g e t . t y p e   = =   ' t e x t a r e a '   | |   t a r g e t . t y p e   = =   ' t e x t '   | |   t a r g e t . t y p e   = =   ' p a s s w o r d ' ) )     {  
 w i n d o w . s t a t u s   =   ' ' ;  
 r e t u r n   t r u e ;  
 }  
 }  
 i f   ( e v t . p r e v e n t D e f a u l t )   {  
 e v t . p r e v e n t D e f a u l t ( ) ;  
 e v t . s t o p P r o p a g a t i o n ( ) ;  
 }   e l s e   {  
 e v t . k e y C o d e   =   0 ;  
 e v t . r e t u r n V a l u e   =   f a l s e ;  
 }  
 w i n d o w . s t a t u s   =   k e y T e x t + '   i s   d i s a b l e d ' ;  
 r e t u r n   f a l s e ;  
 }  
 f u n c t i o n   a d d E v e n t ( o b j ,   e v T y p e ,   f n ,   u s e C a p t u r e )   {  
 / /   G e n e r a l   f u n c t i o n   f o r   a d d i n g   a n   e v e n t   l i s t e n e r  
 i f   ( o b j . a d d E v e n t L i s t e n e r )   {  
 o b j . a d d E v e n t L i s t e n e r ( e v T y p e ,   f n ,   u s e C a p t u r e ) ;  
 r e t u r n   t r u e ;  
 }   e l s e   i f   ( o b j . a t t a c h E v e n t )   {  
 v a r   r   =   o b j . a t t a c h E v e n t ( ' o n '   +   e v T y p e ,   f n ) ;  
 r e t u r n   r ;  
 }   e l s e   {  
 a l e r t ( e v T y p e + '   h a n d l e r   c o u l d   n o t   b e   a t t a c h e d ' ) ;  
 }  
 }  
 f u n c t i o n   a d d K e y E v e n t ( )   {  
 / /   S p e c i f i c   f u n c t i o n   f o r   t h i s   p a r t i c u l a r   b r o w s e r  
 v a r   e   =   ( d o c u m e n t . a d d E v e n t L i s t e n e r )   ?   ' k e y p r e s s '   :   ' k e y d o w n ' ;  
 a d d E v e n t ( d o c u m e n t , e , k e y E v e n t H a n d l e r , f a l s e ) ;  
 }  
 a d d K e y E v e n t ( ) ;  
  
 / / - - > 
