<!--

function checkform(){

  var applytype = getradiovalue(document.getElementsByName("applytype"),"applytype");
  var companyname = document.getElementById("companyname");
  var shopurl = document.getElementById("shopurl");
  var product = document.getElementById("product");
  var websitestatus = getradiovalue(document.getElementsByName("websitestatus"),"websitestatus");
  var shoppingflow = getradiovalue(document.getElementsByName("shoppingflow"),"shoppingflow");
  var applyservicetype = getradiovalue(document.getElementsByName("applyservicetype"),"applyservicetype");
  var contactname = document.getElementById("contactname");
  var contactemail = document.getElementById("contactemail");
  var contactphone = document.getElementById("contactphone");
  var otherrequest = document.getElementById("otherrequest");
  var errorCounter = 0;
  if (applytype == 0) {
    errorCounter++;
    document.getElementById("applytypeERROR").innerHTML = "請點選類別";
  }else { document.getElementById("applytypeERROR").innerHTML = " "; }
  if (product.value == null || product.value.length == 0 ) {
    errorCounter++;
    document.getElementById("productERROR").innerHTML = "請輸入內容";
  }else { document.getElementById("productERROR").innerHTML = " "; }
  if (contactname.value == null || contactname.value.length == 0 ) {
    errorCounter++;
    document.getElementById("contactnameERROR").innerHTML = "請填入姓名";
  }else { document.getElementById("contactnameERROR").innerHTML = " "; }
  if (contactemail.value == null || contactemail.value.length == 0 ) {
    errorCounter++;
    document.getElementById("contactemailERROR").innerHTML = "請填入 E-mail";
  }
  else if (!doEmailFormatCheck(contactemail.value)) {
    errorCounter++;
    document.getElementById("contactemailERROR").innerHTML = "電子郵件格式有誤";
  }
  else { document.getElementById("contactemailERROR").innerHTML = " "; }
  if (contactphone.value == null || contactphone.value.length == 0 ) {
    errorCounter++;
    document.getElementById("contactphoneERROR").innerHTML = "請填入聯絡電話";
  }else { document.getElementById("contactphoneERROR").innerHTML = " "; }

  if(errorCounter==0) {
    document.getElementById("submitbtn").disabled = true;
    document.getElementById("resetbtn").disabled = true;

    document.getElementById("netshopform").action = "http://"+submitHOST+"/ezPayforms/netshop.jsp";
    document.getElementById("netshopform").method = "POST";
    document.getElementById("netshopform").submit();
  }
}

function resetform(){

  document.getElementById("applytypeERROR").innerHTML = " ";
  document.getElementById("productERROR").innerHTML = " ";
  document.getElementById("contactnameERROR").innerHTML = " ";
  document.getElementById("contactemailERROR").innerHTML = " ";
  document.getElementById("contactphoneERROR").innerHTML = " ";
  document.getElementById("netshopform").reset();
}

-->
