ÿþ< ! - -  
  
  
  
 r e   =   / \ w { 1 , } / ;               / / f o r   t e s t   f u n c t i o n  
  
  
 / * * * * * * * * * * * * * * * * * * * * * * *  
 t h i s   f u n c t i o n   t r i m m i n g   s t r i n g s  
 * * * * * * * * * * * * * * * * * * * * * * * /  
 f u n c t i o n   r t r i m ( s t r )  
 	 {  
 	 r e t u r n   s t r . r e p l a c e (   / \ s * $ / ,   " "   ) ;  
 	 }  
 f u n c t i o n   t r i m ( s t r )  
 	 {  
 	 r e t u r n (   ( " " + s t r ) . r e p l a c e ( / ^ \ s * ( [ \ s \ S ] * \ S + ) \ s * $ | ^ \ s * $ / , ' $ 1 ' )   ) ;  
 	 }  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - -  
 / /   v a l i d a t e s   s e a r c h   s t r i n g  
 / / - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   v a l i d a t e S e a r c h F o r m ( s e a r c h _ s t r i n g ,   s e a r c h _ c a t e g o r y )  
 	 {  
 	 e r r m s g = " "  
 	 e r r n o = 0  
  
 	 s e a r c h _ s t r i n g . v a l u e = t r i m ( s e a r c h _ s t r i n g . v a l u e )  
  
  
 	 i f (   s e a r c h _ s t r i n g . v a l u e   = = " "   )  
 	 	 {  
 	 	 e r r n o + +  
 	 	 e r r m s g = e r r m s g + e r r n o + "   -   CDE'*  'D(-+< b r > "  
 	 	 i f   ( e r r n o = = 1 )  
 	 	 	 s e a r c h _ s t r i n g . f o c u s ( )  
 	 	 }  
 	 i f (   s e a r c h _ c a t e g o r y . v a l u e   = = " "   )  
 	 	 {  
 	 	 e r r n o + +  
 	 	 e r r m s g = e r r m s g + e r r n o + "   -   'D.'F)< b r > < b r > "  
 	 	 i f   ( e r r n o = = 1 )  
 	 	 	 s e a r c h _ c a t e g o r y . f o c u s ( )  
 	 	 }  
  
 	 i f   ( e r r n o ! = 0 )  
 	 	 {  
 	 	 p o p u p E r r o r ( e r r m s g , 3 0 0 , 1 5 0 )  
 	 	 r e t u r n   f a l s e  
 	 	 }  
 	  
 	 r e t u r n   t r u e ;  
  
 	 }  
  
  
  
 / / - - >  
 
