//var frm;/*function init(frm) {//	protocol='https://';//	servername='members.nysna.org';	frm=window.document.forms[0];//	doc=window.document;	alert(frm.$regstep.value);	if (frm.$regstep.value == 'reg2') {		frm.fldIDNum.focus();}	else if (frm.$regstep.value == 'reg3') {		frm.fldEmailAddr.focus();	}	if (frm.errMsg.value == "err1") {		frm.fldErrorMsg.value = "";		return false;	}	return true;}*/function reg2Next() {	var errBadDataEntered = 'First item must be your six digit numeric member ID and the second item\n' +	'must be the last four numbers of your social security number. \nPlease try again.';	var idregx = /\b\d{6}/;	var l4regx = /\b\d{4}/;	var idnum= frm.fldIDNum.value.toString();	var l4ss = frm.fldL4SSNum.value.toString();	var nURL;//if (idnum.length != 6) {	if ( idnum.search(idregx) == -1 ) {		alert('Check your ID number - it should be a 6 digit number\n\n' + errBadDataEntered);//} else if (l4ss.length != 4) {	} else if ( l4ss.search(l4regx) == -1 ) {		alert('Check the last four digits of your social security number - it should be a 4 digit number\n\n' + errBadDataEntered);	} else {		//encode the idnumber and l4ss to pass along in the url string to the agent		var sStr = idnum + l4ss;		var tmpRN = Math.floor(Math.random() * 66) + 11;		var nStr = parseInt(sStr);		var mStr = (nStr * tmpRN).toString() + tmpRN.toString();		nURL = './register?openform&step=reg3&id=' + mStr;		window.location = nURL;	}}function reg3Next() {	var errEmail = 'This appears to be an invalid email address. Email addresses should have \n' +	'an "@" sign, no spaces, and a dot (period) followed by a valid letter extension \n' +	'such as com, edu, org or us.\n\n' +	'example: jane@company.com\n\nPlease check and try again.';	var errUN = 'This appears to be an invalid username. The username should be at least 5 characters \n' +	'long and have only letters and numbers, dash (-), or underscore (_). NO spaces \n' +	'or other special characters.\n' +	'example: janedoe\n\nPlease check and try again.';	var errPW = 'This appears to be an invalid password. The password should be at least 6 characters \n' +	'long and have only letters and numbers, NO spaces or other special characters.\n' +	'example: mycar1\n\nPlease check and try again.';	var errPWnm = 'Your passwords do not match. In order to ensure you have typed your password \n' +	'correctly, the password must match the value entered in the password verification field.\n' +	'\nPlease check and try again.';	var emailRx = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|ca|uk|um|us|pr))$/;	var email = frm.fldEmailAddr.value.toLowerCase();	var unRx = /^[A-Za-z0-9_-]{5,30}$/;	var un = frm.fldUserName.value;	var pwRx = /^[A-Za-z0-9]{6,30}$/;	var pw1 = frm.fldPass1.value;	var pw2 = frm.fldPass2.value;		if ( email.search(emailRx) == -1 ) {		frm.fldEmailAddr.focus();		alert('Check your email address!\n\n' + errEmail);	} else if ( un.search(unRx) == -1) {		frm.fldUserName.focus();		alert('Check your username!\n\n' + errUN);	} else if ( pw1.search(pwRx) == -1) {		frm.fldPass1.focus();		alert('Check your password!\n\n' + errPW);	} else if ( pw1 != pw2 ) {		frm.fldPass1.focus();		alert('Check your password!\n\n' + errPWnm);	} else {		frm.$regstep.value = 'reg4';		frm.submit();	}}