//===validate forms before submission
function fValidate(vThisForm){
	if (vThisForm == "frmContact") {
		if (document[vThisForm].name.value == "") {
			alert("The field Full Name cannot be left blank.")
			document[vThisForm].name.focus()
			return(false)			
		}
		if (document[vThisForm].cname.value == "") {
			alert("The field Company Name cannot be left blank.")
			document[vThisForm].cname.focus()
			return(false)			
		}
		var vThisEmail = new String(document[vThisForm].email.value)
		if (document[vThisForm].email.value == "" || vThisEmail.search("@") == -1) {
			alert("The field -email- cannot be left blank and must be properly formatted.")
			document[vThisForm].email.focus()
			return(false)
		}
	}
	
	if (vThisForm == "frmEmployment") {
		if (document[vThisForm].position.value == "") {
			alert("The field Position Applying For cannot be left blank.")
			document[vThisForm].position.focus()
			return(false)			
		}
		if (document[vThisForm].name.value == "") {
			alert("The field Full Name cannot be left blank.")
			document[vThisForm].name.focus()
			return(false)			
		}
		if (document[vThisForm].street.value == "") {
			alert("The field Street Address cannot be left blank.")
			document[vThisForm].street.focus()
			return(false)			
		}
		if (document[vThisForm].location.value == "") {
			alert("The field City,State,Zip cannot be left blank.")
			document[vThisForm].location.focus()
			return(false)			
		}
		var vThisEmail = new String(document[vThisForm].email.value)
		if (document[vThisForm].email.value == "" || vThisEmail.search("@") == -1) {
			alert("The field -email- cannot be left blank and must be properly formatted.")
			return(false)
		}
		if (document[vThisForm].degree.value == "") {
			alert("The field Degree cannot be left blank.")
			document[vThisForm].degree.focus()
			return(false)			
		}
		if (document[vThisForm].institution.value == "") {
			alert("The field Institution cannot be left blank.")
			document[vThisForm].institution.focus()
			return(false)			
		}
		if (document[vThisForm].resume.value == "") {
			alert("The field Resume Text cannot be left blank.")
			document[vThisForm].resume.focus()
			return(false)			
		}		
	}	
	
	if (vThisForm == "frmQuote") {
		if (document[vThisForm].name.value == "") {
			alert("The field Full Name cannot be left blank.")
			document[vThisForm].name.focus()
			return(false)			
		}
		if (document[vThisForm].cname.value == "") {
			alert("The field Company Name cannot be left blank.")
			document[vThisForm].cname.focus()
			return(false)			
		}
		var vThisEmail = new String(document[vThisForm].email.value)
		if (document[vThisForm].email.value == "" || vThisEmail.search("@") == -1) {
			alert("The field -email- cannot be left blank and must be properly formatted.")
			document[vThisForm].email.focus()
			return(false)
		}
		//if (document[vThisForm].service.selectedIndex < 1) {
		//alert("The field -Service- cannot be left blank.")
		//document[vThisForm].service.focus()
		//return(false)
		//}
		if (document[vThisForm].project.value == "") {
			alert("The field Project Information cannot be left blank.")
			document[vThisForm].project.focus()
			return(false)			
		}
		
	}	
}
