function validateContest() {
	
	var answered = false;
	var multiAnswer = 0;
	
	//imprint validation
	if (document.SurveyForm.firstName.value == '') {
		alert('First Name is a required field.');
		document.SurveyForm.firstName.focus();
		return false;
	}
	if (document.SurveyForm.lastName.value == '') {
		alert('Last Name is a required field.');
		document.SurveyForm.lastName.focus();
		return false;
	}
	if (document.SurveyForm.daytimePhone.value == '') {
		alert('Daytime Phone is a required field.');
		document.SurveyForm.daytimePhone.focus();
		return false;
	}
	if (document.SurveyForm.contactEmail.value == '') {
		alert('E-mail is a required field.');
		document.SurveyForm.contactEmail.focus();
		return false;
	}
	if (document.SurveyForm.contactEmail.value != ''){
		if (checkEmail(document.SurveyForm.contactEmail)){
		alert('The email address you entered is invalid.');
		document.SurveyForm.contactEmail.focus();
		return false;
		}
	}
	if (document.SurveyForm.description.value == '') {
		alert('Brief description is a required field.');
		document.SurveyForm.description.focus();
		return false;
	}
	if (document.SurveyForm.calendarPic.value == '') {
		alert('You must select at least one image to upload.');
		document.SurveyForm.address.focus();
		return false;
	}
	if (document.SurveyForm.yes_enterme.checked != true) {
		alert('You must confirm that you understand the rules of the contest and would like to be entered. Please check the appropriate box to continue.');
		document.SurveyForm.yes_enterme.focus();
		return false;
	}
}

function checkAlpha(field) {
	string = field.value;
	var Chars = "0123456789";

    for (var i = 0; i < string.length; i++) {
       if (Chars.indexOf(string.charAt(i)) == -1){
			return true;          
       }
    }
    return false;
}
function checkEmail(field) {
	string = field.value;
 	if (string.indexOf(' ')==-1 
      	&& 0<string.indexOf('@')
      	&& string.indexOf('@')+1 < string.length){
			return false;
	}
 	return true;
}
