function emailalert() {
	txt1="Please make sure the email address you enter is valid.\n";
	txt2="We will send an email with your password to this address,\n";
	txt3="and your account will not be activated until you login with your new password.\n";
	txt4="If you do not receive this email, please contact us.\n";
	txt5="Thank you."
	alert(txt1 + txt2 + txt3 + txt4 + txt5);
}

function validate() {
	if (isWhitespace (document.MemberForm.membername.value)) {
		alert("Please enter your first name or nickname.");
		document.MemberForm.membername.focus();
		document.MemberForm.membername.select();
		return false;
	}
	if (isWhitespace (document.MemberForm.headline.value)) {
		alert("Please enter your headline.");
		document.MemberForm.headline.focus();
		document.MemberForm.headline.select();
		return false;
	}
	document.MemberForm.email.value=stripWhitespace(document.MemberForm.email.value);	
	if (isWhitespace (document.MemberForm.email.value)) {
		alert("Please enter your email address.");
		document.MemberForm.email.focus();
		document.MemberForm.email.select();
		return false;
	}
	if (!isEmail(document.MemberForm.email.value)) {
		alert("Email address is invalid.")
		document.MemberForm.email.focus();
		document.MemberForm.email.select();
		return false;
	}
	if (document.MemberForm.pw.value.length < 4 
	|| document.MemberForm.pw.value.length > 30) {
		alert("Password must be between 4 and 30 characters.");
		document.MemberForm.pw.focus();
		document.MemberForm.pw.select();
		return false;
	}
	if (document.MemberForm.gender.selectedIndex == 0 ) { 
		alert("Please choose from My Gender options");
		document.MemberForm.gender.focus();
		return false;
	}	 
	if (document.MemberForm.seeking.selectedIndex == 0 ) { 
		alert("Please choose from I am Seeking options");
		document.MemberForm.seeking.focus();
		return false;
	}	 
	if (document.MemberForm.purpose.selectedIndex == 0 ) { 
		alert("Please choose from For options");
		document.MemberForm.purpose.focus();
		return false;
	}	 
	if (document.MemberForm.bodytype.selectedIndex == 0 ) { 
		alert("Please choose from My Body Type options");
		document.MemberForm.bodytype.focus();
		return false;
	}	 
	if (document.MemberForm.height.selectedIndex == 0 ) { 
		alert("Please choose from My Height options");
		document.MemberForm.height.focus();
		return false;
	}	 
	if (document.MemberForm.dobYear.value < 1800 ) {
		alert ("Year must be greater than 1799.")
		document.MemberForm.dobYear.focus();
		document.MemberForm.dobYear.select();
		return false;
	}
//	var curDate = new Date()
//	var curYear = curDate.getFullYear()
<CFOUTPUT>#yearcode#</cfoutput>
	if (curYear - document.MemberForm.dobYear.value < 18 ) {
		alert ("Age less than 18a.")
		document.MemberForm.dobYear.focus();
		document.MemberForm.dobYear.select();
		return false;
	}
//	var curMonth = curDate.getMonth()
<CFOUTPUT>#monthcode#</cfoutput>
	ind = document.MemberForm.dobMonth.selectedIndex
	brthMonth = document.MemberForm.dobMonth.options[ind].value
	if (curYear - document.MemberForm.dobYear.value == 18 
	&& brthMonth > curMonth + 1) {
		alert ("Age less than 18b.")
		document.MemberForm.dobYear.focus();
		document.MemberForm.dobYear.select();
		return false;
	}
//	var curDt = curDate.getDate()
	brthDate = document.MemberForm.dobDay.selectedIndex
	diff = curDt - brthDate
	if (curYear - document.MemberForm.dobYear.value == 18 
	&& brthMonth == curMonth + 1
	&& brthDate > curDt ) {
		alert ("Age less than 18c.")
		document.MemberForm.dobYear.focus();
		document.MemberForm.dobYear.select();
		return false;
	}
	var MaxDayArray = new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
	indDay = document.MemberForm.dobDay.selectedIndex
	indMonth = document.MemberForm.dobMonth.selectedIndex
	dayNum = indDay + 1;
	monthNum = indMonth + 1;
	if (dayNum > MaxDayArray[monthNum - 1] ) {
		alert("Please enter a valid date1.");
		document.MemberForm.dobDay.focus();
		return false;
	}
	if (monthNum == 2 && dayNum == 29
	&& document.MemberForm.dobYear.value % 4 != 0) {
		alert("Please enter a valid date2.");
		document.MemberForm.dobDay.focus();
		return false;
	}
	if (monthNum == 2 && dayNum == 29
	&& document.MemberForm.dobYear.value % 100 == 0 && document.MemberForm.dobYear.value % 400 != 0) {
		alert("Please enter a valid date3.");
		document.MemberForm.dobDay.focus();
		return false;
	}
	if (document.MemberForm.desireageFrom.selectedIndex == 0 ) { 
		alert("Please choose from Desired Age Range From options");
		document.MemberForm.desireageFrom.focus();
		return false;
	}	 
	if (document.MemberForm.desireageTo.selectedIndex == 0 ) { 
		alert("Please choose from Desired Age Range To options");
		document.MemberForm.desireageTo.focus();
		return false;
	}	 	
	if (document.MemberForm.desireageFrom.selectedIndex > document.MemberForm.desireageTo.selectedIndex ) { 
		alert("Please choose Valid Age Range");
		document.MemberForm.desireageTo.focus();
		return false;
	}	 	
		if (document.MemberForm.marstatus.selectedIndex == 0 ) { 
		alert("Please choose from Current Relationship Status options");
		document.MemberForm.marstatus.focus();
		return false;
	}	  
	if (document.MemberForm.ethnicgroup.selectedIndex == 0 ) { 
		alert("Please choose from My Ethnic Group options");
		document.MemberForm.ethnicgroup.focus();
		return false;
	}	 
	if (document.MemberForm.religobservlvl.selectedIndex == 0 ) { 
		alert("Please choose from My Religious Observance Level options");
		document.MemberForm.religobservlvl.focus();
		return false;
	}	 
	if (document.MemberForm.gotosynagogue.selectedIndex == 0 ) { 
		alert("Please choose from I Go To Synagogue... options");
		document.MemberForm.gotosynagogue.focus();
		return false;
	}	 
	if (document.MemberForm.keepkosher.selectedIndex == 0 ) { 
		alert("Please choose from I Keep Kosher ... options");
		document.MemberForm.keepkosher.focus();
		return false;
	}	 
	if (isWhitespace (document.MemberForm.city.value)) {
		alert("Please enter your city.");
		document.MemberForm.city.focus();
		document.MemberForm.city.select();
		return false;
	}

	if (document.MemberForm.state.selectedIndex == 0 ) { 
		alert("Please choose from State or Province options");
		document.MemberForm.state.focus();
		return false;
	}	 
	if ((document.MemberForm.country.selectedIndex == 1  )
		&& (document.MemberForm.state.selectedIndex < 2 
		|| document.MemberForm.state.selectedIndex > 52) ) { 
		alert("Please choose valid US State");
		document.MemberForm.state.focus();
		return false;
	}	 
	if ((document.MemberForm.country.selectedIndex == 2  )
		&& document.MemberForm.state.selectedIndex < 53 ) { 
		alert("Please choose valid Canadian Province");
		document.MemberForm.state.focus();
		return false;
	}	 
	if ((document.MemberForm.country.selectedIndex > 2  )
		&& document.MemberForm.state.selectedIndex != 1 ) { 
		alert("If Country is not US or Canada, State must be Not Applicable");
		document.MemberForm.state.options[1].selected = true;
		document.MemberForm.state.focus();
		return false;
	}	 
	if (document.MemberForm.country.selectedIndex == 0 ) { 
		alert("Please choose from Country options");
		document.MemberForm.country.focus();
		return false;
	}	 
	if ( (document.MemberForm.country.selectedIndex == 1 
		|| document.MemberForm.country.selectedIndex == 2  )
		&& (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();
		return false;
	}
	if ( (document.MemberForm.country.selectedIndex == 1 
		|| document.MemberForm.country.selectedIndex == 2  )
		&& 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();
		return false;
	}
	if ( !(document.MemberForm.country.selectedIndex == 1 
		|| document.MemberForm.country.selectedIndex == 2 )
		&& (!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();
		return false;
	}
	if (document.MemberForm.agree.checked != true) { 
		alert("Please read SpiritJewishSingles.com's Terms and Conditions of Service and Privacy Statement.  Check the box to signify that you agree");
		return false;
	}	 
	return true;	
}