<!--

function checkform(){

  var companyname = document.getElementById("companyname");
  var companyaddress = document.getElementById("companyaddress");
  var uniturl = document.getElementById("uniturl");
  var businesstype = getradiovalue(document.getElementsByName("businesstype"),"businesstype");
  var businessinput = document.getElementById("businessinput");
  var business = document.getElementById("business");
  var contactname = document.getElementById("contactname");
  var contactemail = document.getElementById("contactemail");
  var contactphone = document.getElementById("contactphone");
  var errorCounter = 0;
  if (companyname.value == null || companyname.value.length == 0 ) {
    errorCounter++;
    document.getElementById("companynameERROR").innerHTML = "請輸入單位名稱";
  }else { document.getElementById("companynameERROR").innerHTML = " "; }
  if (businesstype == 0) {
    if (!(business.value == null || business.value.length == 0 )) {
      businesstype = 6 ;
      document.getElementById("businesstype6").checked = 'true';
      document.getElementById("businesstypeERROR").innerHTML = " ";
    }else {
      errorCounter++;
      document.getElementById("businesstypeERROR").innerHTML = "請點選業別";
    }
  }else { document.getElementById("businesstypeERROR").innerHTML = " "; }
  if (contactname.value == null || contactname.value.length == 0 ) {
    errorCounter++;
    document.getElementById("contactnameERROR").innerHTML = "請填入姓名";
  }else { document.getElementById("contactnameERROR").innerHTML = " "; }
  if (contactphone.value == null || contactphone.value.length == 0 ) {
    errorCounter++;
    document.getElementById("contactphoneERROR").innerHTML = "請填入電話";
  }else { document.getElementById("contactphoneERROR").innerHTML = " "; }
  if (!(contactemail.value == null || contactemail.value.length == 0 )) {
    if (!doEmailFormatCheck(contactemail.value)) {
      errorCounter++;
      document.getElementById("contactemailERROR").innerHTML = "電子郵件格式有誤";
    }
    else { document.getElementById("contactemailERROR").innerHTML = " "; }
  }else { document.getElementById("contactemailERROR").innerHTML = " "; }
  if (businesstype == 6) {
    if (businessinput.value == null || businessinput.value.length == 0 ) {
      errorCounter++;
      document.getElementById("businessinputERROR").innerHTML = "請填入業別的資訊";
    }else { document.getElementById("businessinputERROR").innerHTML = " "; }
  }else { document.getElementById("businessinputERROR").innerHTML = " "; }

  if(errorCounter==0) {
    document.getElementById("submitbtn").disabled = true;
    document.getElementById("resetbtn").disabled = true;

    document.getElementById("not-for-profitform").action = "http://"+submitHOST+"/ezPayforms/not-for-profit.jsp";
    document.getElementById("not-for-profitform").method = "POST";
    document.getElementById("not-for-profitform").submit();
  }
}

function resetform(){

  document.getElementById("companynameERROR").innerHTML = " ";
  document.getElementById("businesstypeERROR").innerHTML = " ";
  document.getElementById("contactnameERROR").innerHTML = " ";
  document.getElementById("contactphoneERROR").innerHTML = " ";
  document.getElementById("businessinputERROR").innerHTML = " ";
  document.getElementById("contactemailERROR").innerHTML = " ";
  document.getElementById("not-for-profitform").reset();
}

-->
