function isValidContactUsInfo() {
	var strTopic = document.contactUs.strTopic.options[document.contactUs.strTopic.selectedIndex].text
	var strName = document.contactUs.strName.value
	var strEmail = document.contactUs.strEmail.value
	var strPhone = document.contactUs.strPhone.value
	var strAddress = document.contactUs.strAddress.value
	var strResponseYesNo = document.contactUs.strResponseYesNo.checked
	if (strTopic == "Please select one ...") {
		alert("Please select a topic.")
		document.contactUs.strTopic.focus()
		return false
	} 
	if (isEmpty(strName)) {
		alert("Please enter your name.")
		document.contactUs.strName.focus()
		return false
	}
	if (strResponseYesNo && isEmpty(strEmail) && isEmpty(strPhone) && isEmpty(strAddress)) {
		alert("You have indicated that you would like a response.  Please provide us with a way to contact you: email, snail mail or phone.")
		document.contactUs.strEmail.focus()
		return false
	}
	return true
}

function isValidMembershipInfo() {
	var strName = document.membership.strName.value
	var strPosition = document.membership.strPosition.value
	var strUnit = document.membership.strUnit.value
	var strStreet = document.membership.strStreet.value
	var strCity = document.membership.strCity.value
	var strState = document.membership.strState.value
	var strZip = document.membership.strZip.value
	var strDOB = document.membership.strDOB.value
	if (isEmpty(strName)) {
		alert("Please enter your name.")
		document.membership.strName.focus()
		return false
	}
	if (isEmpty(strPosition) && isEmpty(strUnit)) {
		alert("Please provide us with a crew position or unit.")
		document.membership.strPosition.focus()
		return false
	}
	if (isEmpty(strStreet) && isEmpty(strCity) && isEmpty(strState) && isEmpty(strZip)) {
		alert("Please provide us with a mailing address.")
		document.membership.strStreet.focus()
		return false
	}
	if (isEmpty(strDOB)) {
		alert("Please enter your date of birth.")
		document.membership.strDOB.focus()
		return false
	}
	return true
}

function isValidUpdateInfo() {
	var strName = document.membership.strName.value
	var strStreet = document.membership.strStreet.value
	var strEmail = document.membership.strEmail.value
	var strPhone = document.membership.strPhone.value
	if (isEmpty(strName)) {
		alert("Please enter your name.")
		document.membership.strName.focus()
		return false
	}
	if (isEmpty(strStreet) && isEmpty(strEmail) && isEmpty(strPhone)) {
		alert("Please provide us with a way to contact you (email, snail mail OR phone) in case we have any questions.")
		document.membership.strEmail.focus()
		return false
	}
	return true
}

function isValidSearchInfo() {
	var strName = document.membersearch.strName.value
	var strEmail = document.membersearch.strEmail.value
	var strSearchName = document.membersearch.strSearchName.value
	if (isEmpty(strName)) {
		alert("Please enter your name.")
		document.membersearch.strName.focus()
		return false
	}
	if (isEmpty(strEmail)) {
		alert("Please enter your email address.")
		document.membersearch.strEmail.focus()
		return false
	}
	if (isEmpty(strSearchName)) {
		alert("Please enter the name of the person you are searching for.")
		document.membersearch.strSearchName.focus()
		return false
	}
	return true
}

function isEmpty(inputStr) {
	if (inputStr == "" || inputStr == null) {
		return true
	}
	return false
}
