function Trim(s) {				
		if (typeof(s) != "string")
			return null;
		
		return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
	}
				
	function validateSearch(form) {
		form.search.value = Trim(form.search.value);
		if ( form.search.value.length < 2 ) {
			alert("Search keyword must 2 or more characters long.");
			form.search.focus();
			form.search.select();
			return false;
		}
		
		return true;
	}