// JavaScript Document

function checkterms(){
	if($('input#termscheck').attr('checked')){
		$('form#EmploymentQuestionnaire').submit();					   
	} else {
		alert("You must accept the terms and conditions before continuing!");
	}
}

function trim(str){
	 return str.replace(/^\s*|\s(?=\s)|\s*$/g, "");
}
function validateForm(theform, reqArray){
	var theval="";
	var validform = true;
	for(var i in reqArray){
		theval = eval("theform."+reqArray[i]+".value");
		if(trim(theval) == ""){
			validform = false;
		}
	}
	if(validform){
		theform.submit();
	} else {
		alert("You must enter all the required fields!");
	}
}


