function validateJoinList() {
	
	var answered = false;
	var multiAnswer = 0;
	
	if ((document.SurveyForm1.joinName.value == '') || (document.SurveyForm1.joinName.value == 'Name')) {
		alert('Please enter your Name.');
		document.SurveyForm1.joinName.focus();
		return false;
	}
	if ((document.SurveyForm1.joinEmail.value == '') || (document.SurveyForm1.joinEmail.value == 'E-mail')) {
		alert('Please enter your E-mail Address.');
		document.SurveyForm1.joinEmail.focus();
		return false;
	}
	if ((document.SurveyForm1.joinIBEWNumber.value == '') || (document.SurveyForm1.joinIBEWNumber.value == 'IBEW #')) {
		alert('Please enter your IBEW Number.');
		document.SurveyForm1.joinIBEWNumber.focus();
		return false;
	}
}
function validateMembership() {
	
	var answered = false;
	var multiAnswer = 0;
	
	if (document.SurveyForm.memberName.value == '') {
		alert('Name is a required field.');
		document.SurveyForm.memberName.focus();
		return false;
	}
	if (document.SurveyForm.email.value == '') {
		alert('Email is a required field.');
		document.SurveyForm.email.focus();
		return false;
	}
}

function validateEvents() {
	
	var answered = false;
	var multiAnswer = 0;
	
	//customer information
	if (document.SurveyForm.title.value == '') {
		alert('Event Title is a required field.');
		document.SurveyForm.title.focus();
		return false;
	}
	if (document.SurveyForm.date1.value == '') {
		alert('Event Date is a required field.');
		document.SurveyForm.date1.focus();
		return false;
	}
}

function validateFeatured() {
	
	var answered = false;
	var multiAnswer = 0;
	
	//customer information
	if (document.SurveyForm.description.value == '') {
		alert('Description is a required field.');
		document.SurveyForm.description.focus();
		return false;
	}
}

function validateResign() {
	
	var answered = false;
	var multiAnswer = 0;
	
	//customer information
	if (document.SurveyForm.resignName.value == '') {
		alert('Name is a required field.');
		document.SurveyForm.resignName.focus();
		return false;
	}
	if (document.SurveyForm.local.value == '') {
		alert('Home Local Number is a required field.');
		document.SurveyForm.local.focus();
		return false;
	}
	if (document.SurveyForm.cardNumber.value == '') {
		alert('IBEW Card # is a required field.');
		document.SurveyForm.cardNumber.focus();
		return false;
	}
	if (document.SurveyForm.email.value == '') {
		alert('E-mail is a required field.');
		document.SurveyForm.email.focus();
		return false;
	}
	if (document.SurveyForm.phone.value == '') {
		alert('Phone is a required field.');
		document.SurveyForm.phone.focus();
		return false;
	}
	if (document.SurveyForm.origDate.value == '') {
		alert('Original Sign in Date is a required field.');
		document.SurveyForm.origDate.focus();
		return false;
	}
	if (document.SurveyForm.resignMonth.value == '') {
		alert('Month Resigning For is a required field.');
		document.SurveyForm.resignMonth.focus();
		return false;
	}
}

function validateProduct() {
	
	var answered = false;
	var multiAnswer = 0;
	
	//customer information
	if (document.SurveyForm.cat.value == '') {
		alert('You must select a product category.');
		document.SurveyForm.cat.focus();
		return false;
	}
	if (document.SurveyForm.beauty.value == '') {
		alert('You must select a beauty image to upload.');
		document.SurveyForm.beauty.focus();
		return false;
	}
	if (document.SurveyForm.thumbnail.value == '') {
		alert('You must select a thumbnail image to upload.');
		document.SurveyForm.thumbnail.focus();
		return false;
	}
	if (document.SurveyForm.type.value == '') {
		alert('Product Type is a required field.');
		document.SurveyForm.type.focus();
		return false;
	}
}

function validateDairyman() {
	
	var answered = false;
	var multiAnswer = 0;
	
	//customer information
	if (document.SurveyForm.selectedYear.value == '') {
		alert('You must select a year.');
		document.SurveyForm.selectedYear.focus();
		return false;
	}
	if (document.SurveyForm.selectedMonth.value == '') {
		alert('You must select a Month.');
		document.SurveyForm.selectedMonth.focus();
		return false;
	}
	if (document.SurveyForm.dairymanImage.value == '') {
		alert('You must select an image to upload.');
		document.SurveyForm.dairymanImage.focus();
		return false;
	}
	if (document.SurveyForm.dairymanPDF.value == '') {
		alert('You must select a PDF to upload.');
		document.SurveyForm.dairymanPDF.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;
}

