function CheckForm () {

	//Check for words to search, modify "(), [], +" for Perl program where these are reserved marks
                // if enter a pair of (),..., it is considered as two blanfs (may be separate). If only one ( or ), it
                // causes crash.
	if (document.Search.terms.value==""){
		alert("Please enter at least one keyword to search");
		document.Search.terms.focus();
		return false;
	}
	tempStr = document.Search.terms.value		// this is for cgi search. For asp, keep search word as it is. No modification needed

//	tempStr =replaceSubstring(tempStr, "(", "\\\(");
//	tempStr =replaceSubstring(tempStr, ")", "\\\)");
//	tempStr =replaceSubstring(tempStr, "[", "\\\[");
//	tempStr =replaceSubstring(tempStr, "]", "\\\]");
//	tempStr =replaceSubstring(tempStr, "+", "\\\+");
//	tempStr =replaceSubstring(tempStr, "#", "\\\#");
//	tempStr =replaceSubstring(tempStr, "*", "\\\*");

	// for keeping the entered keywords remain as not-modified, use another variable to transfer to Perl
	document.Search.newWords.value = tempStr;
	return true
}
function ClearForm () {
	//Clear search box to avoid see modified keyword
	document.Search.terms.value="";

	return true
}

