function validEmail(email) {
	invalidChars = " /:,;"
	if (email == "") {
		return false
	}
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) > -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)
	if (atPos == -1) {
		return false
	}
	if (email.indexOf("@",atPos+1) != -1) {
		return false
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {
		return false
	}
	if (periodPos+3 > email.length)	{
		return false
	}
	return true
}
	
function validForm(jobs) {
	if (jobs.name.value == "") {
		alert("Please enter your name.")
		jobs.name.focus()
		return false
	}
	if (!validEmail(jobs.email.value)) {
		alert("Please enter a valid e-mail address for your self (like name@domain.com).")
		jobs.email.focus()
		jobs.email.select()
		return false
	}
	if (jobs.phone.value == "") {
		alert("Please enter your phone number.")
		jobs.phone.focus()
		return false
	}
	if (jobs.job.value == "") {
		alert("Please indicate what job you are interested in.")
		jobs.job.focus()
		return false
	}
	return true
}

function validContactForm(contact) {
	if (contact.fname.value == "") {
		alert("Please enter your first name.")
		contact.fname.focus()
		return false
	}
	if (contact.lname.value == "") {
		alert("Please enter your last name.")
		contact.lname.focus()
		return false
	}
	if (!validEmail(contact.email.value)) {
		alert("Please enter a valid e-mail address for your self (like name@domain.com).")
		contact.email.focus()
		contact.email.select()
		return false
	}
	if (contact.phone.value == "") {
		alert("Please enter your phone number.")
		contact.phone.focus()
		return false
	}
	if (contact.address.value == "") {
		alert("Please enter your address.")
		contact.address.focus()
		return false
	}
	if (contact.city.value == "") {
		alert("Please enter your city.")
		contact.city.focus()
		return false
	}
	state = contact.state.selectedIndex
	if (contact.state.options[state].value == "") {
		alert("Please select yours state.")
		contact.state.focus()
		return false
	}
	if (contact.zip.value == "") {
		alert("Please enter your zip code.")
		contact.zip.focus()
		return false
	}
	if (contact.comments.value == "") {
		alert("Please enter a comment.")
		contact.comments.focus()
		return false
	}
	return true
}
