function addfirst() {
document.getElementById('addapplicant-btn').style.display='none';
document.getElementById('addapplicant-btn2').style.display='block';
document.getElementById('app2').style.display='block';
}
function addsecond() {
document.getElementById('addapplicant-btn2').style.display='none';
document.getElementById('addapplicant-btn3').style.display='block';
document.getElementById('app3').style.display='block';
}
function addthird() {
document.getElementById('addapplicant-btn3').style.display='none';
document.getElementById('app4').style.display='block';
}


function validar() {

// Array con todos los elementos del formulario
camposTexto = formul.elements;

if (camposTexto[0].value == 0) {
	alert("Please, select a Coverage Area");
	return false;
}


if (camposTexto[1].value == 0 | camposTexto[2].value == 0 | camposTexto[3].value == 0) {
	alert("Please, check the date of birth of the 1st. applicant.");
	return false;
}

if (camposTexto[5].value != 0 | camposTexto[6].value != 0 | camposTexto[7].value != 0) {
	if (camposTexto[5].value == 0 | camposTexto[6].value == 0 | camposTexto[7].value == 0) {
	alert("Please, check the date of birth of the 2nd. applicant.");
	return false;
}
}

if (camposTexto[9].value != 0 | camposTexto[10].value != 0 | camposTexto[11].value != 0) {
	if (camposTexto[9].value == 0 | camposTexto[10].value == 0 | camposTexto[11].value == 0) {
	alert("Please, check the date of birth of the 3rd. applicant.");
	return false;
}
}

if (camposTexto[13].value != 0 | camposTexto[14].value != 0 | camposTexto[15].value != 0) {
	if (camposTexto[13].value == 0 | camposTexto[14].value == 0 | camposTexto[15].value == 0) {
	alert("Please, check the date of birth of the 4th. applicant.");
	return false;
}
}

return true;

}
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=400,screenX=150,screenY=150,top=150,left=150')
}
