// JavaScirpt Document
// verifyApplication.js

function checkSimpleQuestions(){

		var stillContinue = true; 					// default bool to true to see if we should continue to next page
		var outputText = "<span class='bold1'> ";					// default output text to just style with no text

		var outputSpan = document.getElementById("errorSpan");				// span to output error messages to

		var simpleForm = document.getElementById("simpleQuestions");
		
		var ofAge = document.getElementById("ofAge");
		var experience = document.getElementById("experience");
		var legal = document.getElementById("legal");
		

/*		alert("age - " + simpleForm.elements[1].value);
		alert("age - " + ofAge.checked);
		alert("experience - " + experience.checked);
		alert("legal - " + legal.checked);
*/

		if(!ofAge.checked){
			stillContinue = false;
			outputText += "*You must be at least 21 years of age. <br /> ";
		}
		
		if(!experience.checked){
			stillContinue = false;
			outputText += "*You must have at least one current year of related work experience. <br/>";
		}
		
		if(!legal.checked){
			stillContinue = false;
			outputText += "*You must be a US citizen or have legal work status. <br />";
		
		}


		if(!stillContinue){
			outputText += "</span>";
			outputSpan.innerHTML = outputText;
		} else {
		
			outputSpan.innerHTML = "";
			simpleForm.submit();
		
		}



}