function checkForm() {
  entity_name = document.getElementById("Entity_Name").value;
  type_of_entity = document.getElementById("Type_of_Entity").value;
  state_entity_formed_in = document.getElementById("State_Entity_Formed_In").value;
  primary_business_address = document.getElementById("Entity_Notification_Address").value;
  notification_email = document.getElementById("Notification_Email_1").value;
  entity_phone_number = document.getElementById("Entity_Phone_Number").value;
  entity_control_number = document.getElementById("Entity_Control_Number").value;
  entity_primary_contact_person = document.getElementById("Entity_Primary_Contact_Person").value;
  entity_primary_contact_address = document.getElementById("Entity_Primary_Contact_Address").value;
  entity_primary_contact_email = document.getElementById("Entity_Primary_Contact_Email").value;
  individual_name = document.getElementById("Individual_Name").value;
  individual_entity = document.getElementById("Individual_Entity").value;
  your_name = document.getElementById("Your_Name").value;
  your_signature = document.getElementById("Your_Signature").value;
  today_date = document.getElementById("Today_Date").value;
 
  if (entity_name == "") {
    hideAllErrors();
    document.getElementById("Entity_Name_Error").style.display = "inline";
    document.getElementById("Entity_Name").select();
    document.getElementById("Entity_Name").focus();
    return false;
  } else if (type_of_entity == "") {
    hideAllErrors();
    document.getElementById("Type_of_Entity_Error").style.display = "inline";
    document.getElementById("Type_of_Entity").select();
    document.getElementById("Type_of_Entity").focus();
    return false;
  } else if (state_entity_formed_in == "") {
    hideAllErrors();
    document.getElementById("State_Entity_Formed_In_Error").style.display = "inline";
    document.getElementById("State_Entity_Formed_In").select();
    document.getElementById("State_Entity_Formed_In").focus();
    return false;
  } else if (primary_business_address == "") {
    hideAllErrors();
    document.getElementById("Entity_Notification_Address_Error").style.display = "inline";
    document.getElementById("Entity_Notification_Address").select();
    document.getElementById("Entity_Notification_Address").focus();
    return false;
  } else if (notification_email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {
    hideAllErrors();
    document.getElementById("Notification_Email_1_Error").style.display = "inline";
    document.getElementById("Notification_Email_1").select();
    document.getElementById("Notification_Email_1").focus();
    return false;
  } else if (entity_phone_number == "") {
    hideAllErrors();
    document.getElementById("Entity_Phone_Number_Error").style.display = "inline";
    document.getElementById("Entity_Phone_Number").select();
    document.getElementById("Entity_Phone_Number").focus();
    return false;
  } else if (entity_control_number == "") {
    hideAllErrors();
    document.getElementById("Entity_Control_Number_Error").style.display = "inline";
    document.getElementById("Entity_Control_Number").select();
    document.getElementById("Entity_Control_Number").focus();
    return false;
  } else if (entity_primary_contact_person == "") {
    hideAllErrors();
    document.getElementById("Entity_Primary_Contact_Person_Error").style.display = "inline";
    document.getElementById("Entity_Primary_Contact_Person").select();
    document.getElementById("Entity_Primary_Contact_Person").focus();
    return false;
  } else if (entity_primary_contact_address == "") {
    hideAllErrors();
    document.getElementById("Entity_Primary_Contact_Address_Error").style.display = "inline";
    document.getElementById("Entity_Primary_Contact_Address").select();
    document.getElementById("Entity_Primary_Contact_Address").focus();
    return false;
  } else if (entity_primary_contact_email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {
    hideAllErrors();
    document.getElementById("Entity_Primary_Contact_Email_Error").style.display = "inline";
    document.getElementById("Entity_Primary_Contact_Email").select();
    document.getElementById("Entity_Primary_Contact_Email").focus();
    return false;
  } else if (individual_name == "") {
    hideAllErrors();
    document.getElementById("Individual_Name_Error").style.display = "inline";
    document.getElementById("Individual_Name").select();
    document.getElementById("Individual_Name").focus();
    return false;
  } else if (individual_entity == "") {
    hideAllErrors();
    document.getElementById("Individual_Entity_Error").style.display = "inline";
    document.getElementById("Individual_Entity").select();
    document.getElementById("Individual_Entity").focus();
    return false;
  } else if (your_name == "") {
    hideAllErrors();
    document.getElementById("Your_Name_Error").style.display = "inline";
    document.getElementById("Your_Name").select();
    document.getElementById("Your_Name").focus();
    return false;
  } else if (your_signature == "") {
    hideAllErrors();
    document.getElementById("Your_Signature_Error").style.display = "inline";
    document.getElementById("Your_Signature").select();
    document.getElementById("Your_Signature").focus();
    return false;
  } else if (today_date == "") {
    hideAllErrors();
    document.getElementById("Today_Date_Error").style.display = "inline";
    document.getElementById("Today_Date").select();
    document.getElementById("Today_Date").focus();
    return false;
  } else 
  return true;
}
 
function hideAllErrors() {
  document.getElementById("Entity_Name_Error").style.display = "none"
  document.getElementById("Type_of_Entity_Error").style.display = "none"
  document.getElementById("State_Entity_Formed_In_Error").style.display = "none"
  document.getElementById("Entity_Notification_Address_Error").style.display = "none"
  document.getElementById("Notification_Email_1_Error").style.display = "none"
  document.getElementById("Entity_Phone_Number_Error").style.display = "none"
  document.getElementById("Entity_Control_Number_Error").style.display = "none"
  document.getElementById("Entity_Primary_Contact_Person_Error").style.display = "none"
  document.getElementById("Entity_Primary_Contact_Address_Error").style.display = "none"
  document.getElementById("Entity_Primary_Contact_Email_Error").style.display = "none"
  document.getElementById("Individual_Name_Error").style.display = "none"
  document.getElementById("Individual_Entity_Error").style.display = "none"
  document.getElementById("Your_Name_Error").style.display = "none"
  document.getElementById("Your_Signature_Error").style.display = "none"
  document.getElementById("Today_Date_Error").style.display = "none"
}
