/* Clear input fields default value script */
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

/* if an empty string, returns true (treat a string with spaces as empty) */
function isEmpty(theField) {
    var valueString = String(theField.value)
	var x = 0;
    for (x=0; x < valueString.length; x++) {
        if(valueString.charAt(x) != ' ')
        return false;
    }
    return true;
}

/* Check for empty searches */
function validateSearchForm() {
	if (isEmpty(document.siteSearchForm.searchCriteria)) {
			alert('Please enter a word or phrase to search for.');
			document.siteSearchForm.searchCriteria.focus();
			return false;
		}
	}

