// JavaScript Document

function checkForm() {

contact = document.getElementById("contact").value;
email = document.getElementById("email").value;
ddlist = document.getElementById("ddlist").selectedIndex;

    if (contact == "") {
  hideAllErrors();
document.getElementById("contactError").style.display = "inline";
document.getElementById("contact").select();
document.getElementById("contact").focus();
  return false;
  }
    if (email == "") {
  hideAllErrors();
document.getElementById("emailError").style.display = "inline";
document.getElementById("email").select();
document.getElementById("email").focus();
  return false;
  }
     if (ddlist == "Please select area of interest") {
  hideAllErrors();
document.getElementById("ddlistError").style.display = "inline";
document.getElementById("ddlist").select();
document.getElementById("ddlist").focus();
  return false;
  }
  return true;
  }
 
  function hideAllErrors() {
document.getElementById("contactError").style.display = "none"
document.getElementById("emailError").style.display = "none"
document.getElementById("ddlistError").style.display = "none"
  }