
	function trim(stringToTrim) {
		return stringToTrim.replace(/^\s+|\s+$/g,"");
	}
	
	function validate_required(field,alerttxt){
		with (field){
			if (value==null||value==""){
				alert(alerttxt);return false}
			else {return true}
		}
	}

	function validate_search(thisform){
		with (thisform){					
			if (validate_required(srctxt,"Please enter some text for the search and try again.")==false){
				srctxt.focus();return false;
			}

			if (srctxt.value.length<4){
				alert("Sorry, but your search term needs to be at least 4 characters long.");
				srctxt.focus();
				return false;
			}
		}
	}
