function ValidateApplication(theForm)
{
  if (theForm.MilitaryAffiliation.value == "") {
    alert("Please select your military affiliation. If you have no military affiliation, select \"Not Applicable\".");
    theForm.MilitaryAffiliation.focus();
    return (false);
  }

  if (theForm.MilitaryBranch.value == "") {
    alert("Please select your military branch. If you are/were in no branch of the military, select \"Not Applicable\".");
    theForm.MilitaryBranch.focus();
    return (false);
  }

  if (theForm.txtCampus[0].checked == false && theForm.txtCampus[1].checked == false) {
    alert("Please check a campus name to indicate where you plan to attend classes.");
    theForm.txtCampus[0].focus();
    return (false);
  }

  if (theForm.txtCampus[0].checked == true && theForm.txtDegreeAtlanta.value == "") {
    alert("Please select a degree.");
    theForm.txtDegreeAtlanta.focus();
    return (false);
  }

  if (theForm.txtCampus[1].checked == true && theForm.txtDegreeJackson[0].checked == false && theForm.txtDegreeJackson[1].checked == false && theForm.txtDegreeJackson[2].checked == false && theForm.txtDegreeJackson[3].checked == false && theForm.txtDegreeJackson[4].checked == false && theForm.txtDegreeJackson[5].checked == false && theForm.txtDegreeJackson[6].checked == false && theForm.txtDegreeJackson[7].checked == false && theForm.txtDegreeJackson[8].checked == false && theForm.txtDegreeJackson[9].checked == false && theForm.txtDegreeJackson[10].checked == false && theForm.txtDegreeJackson[11].checked == false && theForm.txtDegreeJackson[12].checked == false && theForm.txtDegreeJackson[13].checked == false && theForm.txtDegreeJackson[14].checked == false && theForm.txtDegreeJackson[15].checked == false && theForm.txtDegreeJackson[16].checked == false && theForm.txtDegreeJackson[17].checked == false && theForm.txtDegreeJackson[18].checked == false && theForm.txtDegreeJackson[19].checked == false && theForm.txtDegreeJackson[20].checked == false && theForm.txtDegreeJackson[21].checked == false) {
    alert("Please select a degree.");
    theForm.txtDegreeJackson[0].focus();
    return (false);
  }

  if (theForm.txtCampus[1].checked == true && (theForm.txtDegreeJackson[15].checked == true || theForm.txtDegreeJackson[16].checked == true || theForm.txtDegreeJackson[17].checked == true || theForm.txtDegreeJackson[18].checked == true || theForm.txtDegreeJackson[19].checked == true || theForm.txtDegreeJackson[20].checked == true || theForm.txtDegreeJackson[21].checked == true) && theForm.PraxisI[0].checked == false && theForm.PraxisI[1].checked == false) {
    alert("Please indicate whether you have taken the Praxis I.");
    theForm.PraxisI[0].focus();
    return (false);
  }

  if (theForm.txtCampus[1].checked == true && (theForm.txtDegreeJackson[15].checked == true || theForm.txtDegreeJackson[16].checked == true || theForm.txtDegreeJackson[17].checked == true || theForm.txtDegreeJackson[18].checked == true || theForm.txtDegreeJackson[19].checked == true || theForm.txtDegreeJackson[20].checked == true || theForm.txtDegreeJackson[21].checked == true) && theForm.PraxisII[0].checked == false && theForm.PraxisII[1].checked == false) {
    alert("Please indicate whether you have taken the Praxis II.");
    theForm.PraxisII[0].focus();
    return (false);
  }

  if (theForm.VeteranStatus.value == "") {
    alert("Please select your veteran status. If you are not a veteran, select \"Not Applicable\".");
    theForm.VeteranStatus.focus();
    return (false);
  }

  if (theForm.txtSignature.value == "") {
    alert("Please enter your full name as an electronic signature.");
    theForm.txtSignature.focus();
    return (false);
  }

  if (theForm.txtSignatureDate.value == "") {
    alert("Please enter today's date.");
    theForm.txtSignatureDate.focus();
    return (false);
  }

  if (theForm.rgSignatureValid[0].checked || theForm.rgSignatureValid[1].checked) {
    } else {
    alert("Please indicate your agreement that the electronic signature acts as your signature.");
    theForm.rgSignatureValid[0].focus();
    return (false);
  }
}

function showDivArea1(areas_show, areas_hide){
for (var i = 0; i < areas_show.length; i++){
  ge = document.getElementById(areas_show[i]);
  ge.style.display = "block";
 }
for (var i = 0; i < areas_hide.length; i++){
  document.getElementById(areas_hide[i]).style.display = 'none';
 }
}

function showDivArea2(areas_show){
  for (var i = 0; i < areas_show.length; i++){
    ge = document.getElementById(areas_show[i]);
    ge.style.display = "block";
  }
}

function showPraxis(areas_show){
  for (var i = 0; i < areas_show.length; i++){
    ge = document.getElementById(areas_show[i]);
    ge.style.display = "block";
  }
}

function hidePraxis(areas_hide){
  for (var i = 0; i < areas_hide.length; i++){
    document.getElementById(areas_hide[i]).style.display = 'none';
  }
}

