// put focus on form
//function formFocus(){document.search_form.term.focus();}

// submit form based on criteria below
function form_onSubmit(oForm, sFieldName) {

	// if blank form submitted, don't do anything
	if (isBlank(oForm[sFieldName].value)) {
		return false;
	}

	return true;
	
}	//function


// return true if the given string is not defined, is blank, or contains only spaces
function isBlank(string) {
	if (string == null) {
	  return true;
	}
	if (string == "") {
	  return true;
	}
	for (var i=0; i< string.length; i++) {
	  if (string.charAt(i) != ' ') return false;
	}
	return true;
}


// submit poll vote if item selected
function pollSubmit(theForm) {
	var rVal = true;
	if (theForm.id.value == "none") {
	  rVal = false;
	}
	return rVal;
}
