
function ValidateWaiver() {
	var bTrue = false;
	if (document.JOIN.Waiver.checked == true) {
		bTrue = true;
	} else {
		alert("\n\nPlease check the box indicating that you\nhave read and accept the responsibilities.\n\n");
	}
	return bTrue;
}

function ValidateList(form,fields) {
	var blank=0;
	var blankfields="";
	var brequired = true;
	var bformat = true;
	
	var arrNames= new Array();
	var arrRequiredFields = new Array();
	arrRequiredFields = fields.split("#");
	for (i=0; i<arrRequiredFields.length; i++) {
		arrNames = arrRequiredFields[i].split("|");
		for (j=0; j<form.length; j++) {
			if (form.elements[j].name == arrNames[0]) {
				x = form.elements[j].value;
				if (x == "") {
					blankfields = blankfields + "\t" + arrNames[1] + "\n";
					blank = 1;
				}

			}
			if (form.elements[j].name == arrNames[0]) {
				var str = form.elements[j].name.toUpperCase();
				var isemail = str.indexOf("EMAIL");
				if (isemail >= 0) {
					var filter = /^.+@.+\..{2,3}$/;
					//if (filter.test(document.subscribe.Email.value)) {
					if (filter.test(form.elements[j].value)) {
						bformat = true;
					} else {
						blankfields = blankfields + "\t" + "Please enter a valid email address!" + "\n";
						//alert("\nPlease input a valid email address!\n\n(user\@domain.com)\n");
						//alert(document.subscribe.Email.value);
						bformat = false;
					}
				}
			}
		}
	}
	if ((blank) || (!bformat)) {
		alert ("Please be sure to fill in the following fields:       \n\n" + blankfields + "\n\nThanks!");
		brequired = false;
	}

	if ((brequired) && (bformat)) {
		return true;
	} else {
		return false;
	}

}


function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

