
function resetForm(){
	//this is required to clear the form, since it has initial values once submitted
	aForm = document.contactForm;
	aForm.first_name.value = '';
	aForm.last_name.value = '';
	aForm.email.value = '';
	aForm.
	aForm.phone.value = '';
	aForm.fax.value = '';
	aForm.note.value = '';
	aForm.contactType.email.checked = true;
}

requiredFields = new Array("name", "email", "phone", "orgName" );

function checkForm(thisForm) {
	allValid = true;
	for(i=0; i < requiredFields.length; i++) {
		thisItem = thisForm.elements[requiredFields[i]];
		if(thisItem) {
			if(thisItem.type == "radio" || thisItem.type == "checkbox") {
				if(!thisItem.checked) {
					allValid = false;
				}
			} else if(thisItem.type == "select-one" || thisItem.type == "select-multiple") {
				if(!thisItem.value || thisItem.value == "null") {
					allValid = false;
				}
			} else {
				if(thisItem.value == thisItem.defaultValue ) {
					allValid = false;
				}
			}
		}
	}
	return allValid;
}

function validateValues(thisForm) {
	valid = checkForm(thisForm);
	if(valid) {
		return true;
	} else {
		alert("Please go back and fill in all neccessary fields");
		return false;
	}
}