	function validateJobForm() {
		var alertMsgHeader = "We could not complete your sumission for the following reasons: \n\n";
		var alertMsg = "";
		var isValidFile = verifyFileType(true);
		var isValidEmail = verifyEmail();
		
		if ( document.submitResume.FirstName.value == "" ) {
			alertMsg += "Please enter your first name.\n";
		}
		if ( document.submitResume.LastName.value == "" ) {
			alertMsg += "Please enter your last name.\n";
		}
		if ( document.submitResume.Position.value == "" ) {
			alertMsg += "Please enter the position you're applying for.\n";
		}
		if ( !isValidFile ) {
			alertMsg += "Please upload files of type: .rtf .txt, .html, .doc (word), .pdf (acrobat).\n";
		}
		if ( !isValidEmail ) {
			alertMsg += "Please enter a valid email address.\n";
		}
	
		if(alertMsg.length) {
			alert(alertMsgHeader+alertMsg);
			return false;
		} else {
			document.submitResume.submit();
			return true;
		}
	}
	
	function verifyEmail() {
		var checkEmail = document.submitResume.EmailAddress.value;
		if ( checkEmail != "" )	{
			if ( (checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')) ) {
				return false;
			} else {
				var iChars = "*|,\":<>[]{}`\';()&$##% ";	// invalid chars (don't forget a space char)
				for (var i = 0; i < checkEmail.length; i++)	{
					if ( iChars.indexOf(checkEmail.charAt(i)) != -1 ) {
						return false;
					}
				}
				return true;	// place after the end 'for loop' bracket
			}
		}
	}
	
	function verifyFileType(isFromMainValidate) {
		if (document.submitResume.Resume.value != "") {
			var regExp=/\.rtf|.txt|.pdf|.html|.doc$/;
			if (!regExp.test(document.submitResume.Resume.value)) {
				if(!isFromMainValidate) {	
					alert('Invalid file type! \r\nPlease upload files of type: .rtf .txt, .html, .doc (word), .pdf (acrobat).');
				}
				return false;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
