function trimString(str) {
	var ret="";
	
	if (str!=null) {
		str=str.replace(/^\s*/,'');
		ret=str.replace(/\s*$/,'');
	}
	
	return ret;
}

function isAlphaNumeric(str) {
		
		return (str.match(/\w+/)!=null);
}

function isValidSearch() {
	
	if (document.frmKeywords!=null) {
		if (isAlphaNumeric(trimString(document.frmKeywords.txtKeywords.value))) {
			return true;
		} else {
			alert("Please enter valid keywords for your search.");
			return false;
		}
	} else {
		alert("The keyword search is not functioning.  Please use the Advanced Search page instead.");
		return false;
	}
}
