function checkForm() {
	firstname = document.getElementById("first").value;
  lastname = document.getElementById("last").value;
  email = document.getElementById("email").value;
  failure = 0;
	highlightColor = "#FF0000";
  resetAllErrors();

  
  if (email == "") {
	document.getElementById("emailLabel").style.color = highlightColor;
    document.getElementById("email").select();
    document.getElementById("email").focus();
    failure = 1;
  } 

  if (lastname == "") {
	document.getElementById("lastLabel").style.color = highlightColor;
    document.getElementById("last").select();
    document.getElementById("last").focus();
    failure = 1;
  }   
  if (firstname == "") {
	document.getElementById("firstLabel").style.color = highlightColor;
    document.getElementById("first").select();
    document.getElementById("first").focus();
    failure = 1;
  }  
  
  if (failure == 1) {
    document.getElementById("error").style.display = "inline";
	return false;
  } else {
    return true;
  }
}
 
function resetAllErrors() {
  document.getElementById("firstLabel").style.color = "white";
  document.getElementById("lastLabel").style.color = "white";
  document.getElementById("emailLabel").style.color = "white";
}
