<!--
//************************************************************
// Validate form fields - checks for blank fields only
// Written by Rory Lysaght (rory@gol.com)
// Called by wholesale.asp
//************************************************************
function submit_page(form1) {
form1 = document.forms[1];  // need this for Netscape
isErr = false;
msg1 = "Please fill in the ";
msg2 = " field. \n \n All fields marked with an asterix must be filled in.";

  // Check Form fields
  if(isBlank(form1.Company)) {alert(msg1 + "Company" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.CustomerName) == true) {alert(msg1 + "Contact Name" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.Address1) == true) {alert(msg1 + "Address1" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.City) == true) {alert(msg1 + "City" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.State) == true) {alert(msg1 + "State" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.ZIP) == true) {alert(msg1 + "Zip" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.Phone) == true) {alert(msg1 + "Phone" + msg2); isErr = true;}
  if(isErr == false && isBlank(form1.Email) == true) {alert(msg1 + "Email" + msg2); isErr = true;}

	if (isErr == false) {
		return true;
	}
	else {
		return false;
	}
}

// Check for a blank field
function isBlank(theField) {
    if(theField.value == "")
        return true;
    else
        return false;
}
// -->
