// JavaScript Document
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(reg) {
	if (reg.first.value == "") {
		alert("Please enter your First Name.")
		reg.first.focus()
		return false
	}
	if (reg.last.value == "") {
		alert("Please enter your Last Name.")
		reg.last.focus()
		return false
	}
	if (!validEmail(reg.email.value)) {
		alert("Please enter a valid e-mail address for your self (like name@domain.com).")
		reg.email.focus()
		reg.email.select()
		return false
	}
	if (reg.uploaded_file.value == "") {
		alert("Please select your resume location by clicking on the Browse button.")
		reg.uploaded_file.focus()
		return false
	}
	return true
}