/* contact_form_validation.js */
/* =================================================================================================================================== */
function validateContactForm(theForm) {
var reason = "";

  reason += validateEmpty(theForm.name,"Name cannot be blank.");
  reason += validateEmail(theForm.email);
  reason += validateEmpty(theForm.subject,"Subject cannot  be blank.");
  reason += validateEmpty(theForm.message,"Message cannot be blank.");
      
  if (reason != "") {
    alert("Some fields need correction:\n\n" + reason + "\n");
    return false;
  }
  return true;
}
/* =================================================================================================================================== */
function submitContactForm(formId) {
	if (validateContactForm($(formId))) {
		submitForm(formId);
	}
}
function resetContactForm(formId) {
	theForm = $(formId);
	theForm.name.style.background = normal_bg;
	theForm.email.style.background = normal_bg;
	theForm.subject.style.background = normal_bg;
	theForm.message.style.background = normal_bg;
	resetForm(formId);
}
/* =================================================================================================================================== */
/* eof */
