<!--

function isBlank(elm) {
  if (elm.value == "" || elm.value == null) 
    return true;
    else return false;
}

function isSelected(fee) {
    	if (fee.selectedIndex == 0)
    	return false;
    	else return true;
}

function verify(f) {
	compute();

  f.x_company.optional=false;
  f.x_company.label="Company Name";
  
  f.x_address.optional=false;
  f.x_address.label="Address";
  
  f.x_city.optional=false;
  f.x_city.label="City";

  f.x_state.optional=false;
  f.x_state.label="State";

  f.x_zip.optional=false;
  f.x_zip.label="Zip";
  
  f.x_first_name.optional=false;
  f.x_first_name.label="First Name";
  
  f.x_last_name.optional=false;
  f.x_last_name.label="Last Name";

  f.x_email.optional=false;
  f.x_email.label="Email Address";
  
  f.x_phone.optional=false;
  f.x_phone.label="Business Phone";
  
  var msg;
  var empty_fields = "";
  var errors = "";

  for (var i = 0; i < f.length ; i++ )  {
    var e = f.elements[i];

    if ((e.optional==false) && ((e.type == "select-one") || (e.type == "select-multiple"))) {
      if (!isSelected(e)) {
	    empty_fields += " " + e.label + "\n";
		continue;
	  }
    }

	if ((e.optional==false) && ((e.type == "text") || (e.type == "textarea"))) {
	  if ((e.value == null) || (e.value == ""))	{
	    empty_fields += " " + e.label + "\n";
		continue;
	  }
      
	  if (e.highlength != null) {
	    var str = e.value + "";
		if (str.length > e.highlength) {
		  errors += "- The field " + e.label + " must be shorter than " + e.highlength + " characters. It is currently " + str.length + " characters long.\n";
        continue;
		}
	  }
	  
    }
  }


  if ((!empty_fields) && (!errors)) {
    return true;
  }

  msg  = "";

  if (empty_fields) {
    msg += "You have not filled in the following required field(s):\n" + empty_fields + "\n";
  }
  if (errors) {
    msg += errors + "\n";
  }
  msg += "Please fill in these fields and resubmit.\n";
  msg += "\n\n";

  alert (msg);
  return false;
}

//-->