ÿþf u n c t i o n   V a l ( t h e F o r m )  
 {  
  
     i f   ( t h e F o r m . k e n n z i f f e r s u c h e . v a l u e   = =   " " )  
     {  
         a l e r t ( " G e b e n   S i e   b i t t e   e i n e   K e n n z i f f e r   i n   d a s   S u c h f e l d   e i n . " ) ;  
         t h e F o r m . k e n n z i f f e r s u c h e . f o c u s ( ) ;  
         r e t u r n   ( f a l s e ) ;  
 }  
  
     v a r   c h e c k O K   =   "   0 1 2 3 4 5 6 7 8 9 , . " ;  
     v a r   c h e c k S t r   =   t h e F o r m . k e n n z i f f e r s u c h e . v a l u e ;  
     v a r   a l l V a l i d   =   t r u e ;  
     v a r   d e c P o i n t s   =   0 ;  
     v a r   a l l N u m   =   " " ;  
     f o r   ( i   =   0 ;     i   <   c h e c k S t r . l e n g t h ;     i + + )  
     {  
         c h   =   c h e c k S t r . c h a r A t ( i ) ;  
         f o r   ( j   =   0 ;     j   <   c h e c k O K . l e n g t h ;     j + + )  
             i f   ( c h   = =   c h e c k O K . c h a r A t ( j ) )  
                 b r e a k ;  
         i f   ( j   = =   c h e c k O K . l e n g t h )  
         {  
             a l l V a l i d   =   f a l s e ;  
             b r e a k ;  
         }  
         a l l N u m   + =   c h ;  
     }  
     i f   ( ! a l l V a l i d   & &   c h e c k S t r   ! =   " n i c h t   b e r ü c k s i c h t i g e n " )  
     {  
         a l e r t ( " G e b e n   S i e   b i t t e   n u r   Z a h l e n   i n   d a s   S u c h f e l d   e i n . " ) ;  
         t h e F o r m . k e n n z i f f e r s u c h e . f o c u s ( ) ;  
         r e t u r n   ( f a l s e ) ;  
     }  
      
     r e t u r n   ( t r u e ) ;  
 } 
