function verifyMentorForm() {

	return true;

}

function verifySpanishForm() {

	if(document.spanishapplicationForm.app_last.value.length<1) {
		alert("Apellido del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_first.value.length<1) {
		alert("Nombre del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_social.value.length<1) {
		alert("No de Seguro Social del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_dateofbirth.value.length<1) {
		alert("Fecha de Nacimiento del Aspirante se requiere");
		return false;
	}
		
	if(document.spanishapplicationForm.app_address.value.length<1) {
		alert("Domicilio del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_city.value.length<1) {
		alert("Cuidad del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_county.value.length<1) {
		alert("Condado del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_state.value.length<1) {
		alert("Estado del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.app_zipcode.value.length<1) {
		alert("Código Postal del Aspirante se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.parent_first.value.length<1) {
		alert("Nombre del Padre/Tutor se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.parent_last.value.length<1) {
		alert("Apellido del Padre/Tutor se requiere");
		return false;
	}
	
	if(document.spanishapplicationForm.parent_home_phone.value.length<1) {
		alert("No del Teléfono (casa) de Padre/Tutor se requiere");
		return false;
	}
		
	if(document.spanishapplicationForm.parent_address.value.length<1) {
		alert("Domicilio del Padre/Tutor se requiere");
		return false;
	}
	
	return true;

}

function verifyEnglishForm() {

	if(document.englishapplicationForm.app_last.value.length<1) {
		alert("Applicant Last Name is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_first.value.length<1) {
		alert("Applicant First Name is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_social.value.length<1) {
		alert("Social Security Number is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_dateofbirth.value.length<1) {
		alert("Date of Birth is required");
		return false;
	}
		
	if(document.englishapplicationForm.app_address.value.length<1) {
		alert("Street is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_city.value.length<1) {
		alert("City is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_state.value.length<1) {
		alert("State is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_county.value.length<1) {
		alert("County is required");
		return false;
	}
	
	if(document.englishapplicationForm.app_zipcode.value.length<1) {
		alert("Zip Code is required");
		return false;
	}
	
	if(document.englishapplicationForm.parent_first.value.length<1) {
		alert("Parent/Guardian First Name is required");
		return false;
	}
	
	if(document.englishapplicationForm.parent_last.value.length<1) {
		alert("Parent/Guardian Last Name is required");
		return false;
	}
	
	if(document.englishapplicationForm.parent_home_phone.value.length<1) {
		alert("Parent/Guardian Home Phone is required");
		return false;
	}
	
	if(document.englishapplicationForm.parent_address.value.length<1) {
		alert("Parent/Guardian Address is required");
		return false;
	}
	

	return true;

}

function sendForm(frm) {
	
	switch(frm.name) {
		case 'mentorapplicationForm':
		   if(verifyMentorForm()) {
			frm.action='process_form.php';
			frm.submit();
		   }
		   break;
		case 'spanishapplicationForm':
		   if(verifySpanishForm()) {
			//printWindow(frm);
			frm.action='email_pdf.php'
			frm.submit();
		   }
		   break;
		case 'englishapplicationForm':
		   if(verifyEnglishForm()) {
			//printWindow(frm);
			frm.action='email_pdf.php'
			frm.submit();
		   }
		   break;   
	}
}


function printForm(frm) {

	printWindow(frm);
	frm.action='display_pdf.php'
	frm.submit();

}


function printWindow(frm) {

	var windowname = 'printapp';

	if (!window.focus) return true;

	window.open('', windowname, 'height=500,width=650,scrollbars=yes,menubar=no,titlebar=no,resizable=yes');

	frm.target=windowname;

	return true;

}

//-->

