/*
	This JS page contains common elements needed to validate a KWLP form.
	Please include the following JS library before-hand:
		http://images.military.com/Military/javascripts/newFormValidations.js
*/

function validate_form() {
	with (document.entryform) {
	if(service.selectedIndex <= 0 ) {
			alert("Please select your Service");
			return false;
		}
		if(status.selectedIndex <= 0 ) {
			alert("Please select your Status");
			return false;
		}	
		if (!validZipcode(zipcode, "Zip Code", "US", true)) {
			return false;
		}
		if (!checkMail(email, "Email", true)) {
			return false;
		}		
		if (agreement.checked == false) {
			alert("We're sorry: in order to submit the form, you must review and agree to the Military.com Service Agreement");
			return false;
		}
	//set the tracking code values		
	formsource.value = GetCookie("SRCT"); 
	document.getElementById('btn-submit-form-reg').disabled = true;
	}//end with
	return true;
}
