function validateUpdate() {
	var validUpd = "yes";
	if (document.MemberForm.iam.selectedIndex > 6	
	&& document.MemberForm.iam.selectedIndex < 10) {
		isCouple = "yes";
	} else { 
		isCouple="no";
	}
	if (isWhitespace (document.MemberForm.membername.value)) {
		alert("Please enter your first name or nickname.");
		document.MemberForm.membername.focus();
		document.MemberForm.membername.select();
		validUpd = "no";
	}
	if (isWhitespace (document.MemberForm.partnername.value)
	&& isCouple == "yes") {
		alert("Please enter partner's first name or nickname.");
		document.MemberForm.partnername.focus();
		document.MemberForm.partnername.select();
		validUpd = "no";
	}
	
	if (isWhitespace (document.MemberForm.headline.value)) {
		alert("Please enter your headline.");
		document.MemberForm.headline.focus();
		document.MemberForm.headline.select();
		validUpd = "no";
	}
	if (isWhitespace (document.MemberForm.city.value)) {
		alert("Please enter your city.");
		document.MemberForm.city.focus();
		document.MemberForm.city.select();
		validUpd = "no";
	}
	if ( (document.MemberForm.country.selectedIndex == 0 
		|| document.MemberForm.country.selectedIndex == 1  )
		&& (isWhitespace (document.MemberForm.areacode.value) 
		|| !isaNum (document.MemberForm.areacode.value))) {
		alert("Numeric Area Code must be entered for United States and Canada.");
		document.MemberForm.areacode.focus();
		document.MemberForm.areacode.select();
		validUpd = "no";
	}
	if ( (document.MemberForm.country.selectedIndex == 0 
		|| document.MemberForm.country.selectedIndex == 1  )
		&& isaNum (document.MemberForm.areacode.value) 
		&& (document.MemberForm.areacode.value < 100
		|| document.MemberForm.areacode.value > 999 )) {
		alert("3-digit Area Code must be entered for United States and Canada.");
		document.MemberForm.areacode.focus();
		document.MemberForm.areacode.select();
		validUpd = "no";
	}
	if ( !(document.MemberForm.country.selectedIndex == 0 
		|| document.MemberForm.country.selectedIndex == 1 )
		&& (!isWhitespace (document.MemberForm.areacode.value))) {
		alert("Area Code must be left blank if not in United States or Canada.");
		document.MemberForm.areacode.focus();
		document.MemberForm.areacode.select();
		validUpd = "no";
	}

	if ( document.MemberForm.country.selectedIndex == 0
		&& (isWhitespace (document.MemberForm.searchzip.value) 
		|| !isaNum (document.MemberForm.searchzip.value))) {
		alert("Numeric Zip Code must be entered for United States.");
		document.MemberForm.searchzip.focus();
		document.MemberForm.searchzip.select();
		validUpd = "no";
	}

	if ( document.MemberForm.country.selectedIndex == 0 
		&& isaNum (document.MemberForm.searchzip.value)
		&& (document.MemberForm.searchzip.value.length != 5)) {
		alert("5-digit Zip Code must be entered for United States and Canada.");
		document.MemberForm.searchzip.focus();
		document.MemberForm.searchzip.select();
		validUpd = "no";
	}

	if ( document.MemberForm.country.selectedIndex != 0 
		&& !isWhitespace (document.MemberForm.searchzip.value)) {
		alert("Zip Code must be left blank if not in United States.");
		document.MemberForm.searchzip.focus();
		document.MemberForm.searchzip.select();
		validUpd = "no";
	}	 

	if ((document.MemberForm.country.selectedIndex == 0  )
		&& (document.MemberForm.state.selectedIndex < 1 
		|| document.MemberForm.state.selectedIndex > 51) ) { 
		alert("Please choose valid US State");
		document.MemberForm.state.focus();
		validUpd = "no";
	}	 

	if ((document.MemberForm.country.selectedIndex == 1  )
		&& document.MemberForm.state.selectedIndex < 52 ) { 
		alert("Please choose valid Canadian Province");
		document.MemberForm.state.focus();
		validUpd = "no";
	}	 

	if ((document.MemberForm.country.selectedIndex > 1  )
		&& document.MemberForm.state.selectedIndex != 0 ) { 
		alert("If Country is not US or Canada, State must be Not Applicable");
		document.MemberForm.state.options[0].selected = true;
		document.MemberForm.state.focus();
		validUpd = "no";
	}	 

	if (isWhitespace (document.MemberForm.occupation.value)) {
		alert("Please enter your occupation.");
		document.MemberForm.occupation.focus();
		validUpd = "no";
	}
	if (document.MemberForm.occupation.value.length > 255) {
		alert("Occupation must not be greater than 255 characters.");
		document.MemberForm.occupation.focus();
		validUpd = "no";
	}
	if (isWhitespace (document.MemberForm.partneroccupation.value)   
	&& isCouple == "yes") {
		alert("Please enter your partner's occupation.");
		document.MemberForm.partneroccupation.focus();
		validUpd = "no";
	}
	if (document.MemberForm.partneroccupation.value.length > 255   
	&& isCouple == "yes") {
		alert("Partner's Occupation must not be greater than 255 characters.");
		document.MemberForm.partneroccupation.focus();
		validUpd = "no";
	}

	if (validUpd == "yes") {  
	document.MemberForm.submit()

	}
}

