		
	function openFullWin(html, name) {
		window.open(html, name, 'directories=yes,location=yes,resizable=yes,menubar=yes,toolbar=yes,scrollbars=yes,status=yes');
	}

	function openPrivacyPolicyWin(url,name,height,width) {
	   popupWin = window.open(url, name, "width=470,height=420,status=no,menubar=no,scrollbars=yes,resizable=yes");
	   if (window.focus) {
		   popupWin.focus();
	   }
	}
	
	function hilite_error(id) {
		//document.getElementById(id).style.backgroundColor = "#c00";
   		document.getElementById(id).style.color = "#c00";
	}

	function remove_hilite_error(id, fg, bg) {
		//document.getElementById(id).style.backgroundColor = bg;
	    document.getElementById(id).style.color = fg;
	}

	function KillEnter(e) {
		var thekeycode = (navigator.appName == 'Netscape') ? e.which : e.keyCode
		if (thekeycode == 13) {
			return false;
		}
		return true;
	}

	function checkFields() {
		var myerror = "false";
		var pwmissing = "false";
		var pwerror = "false";
		var pwformerror = "false";
		var emailerror = "false";
		var pperror = "false";

		if (document.reg.user_email.value == "") {
			hilite_error('email');
			myerror = 'true';
		} else {
   			if (isValidEmail(document.reg.user_email.value)) {
      			remove_hilite_error('email', '#000', '#dddddd');
				emailerror = 'false';
   			} else {
      			hilite_error('email');
      			emailerror = 'true';
   			}
		}

		if (document.reg.password.value == "") {
			hilite_error('password1');
			pwmissing = 'true';
		} else if (!(document.reg.password.value).match(/\S{6,}/)) {
			hilite_error('password1');
			pwformerror = 'true';
		} else {
   			remove_hilite_error('password1', '#000', '#eeeeee');
		}

		if (document.reg.passwordconfirm.value == "") {
			hilite_error('password2');
			pwmissing = 'true';
		} else if (!(document.reg.passwordconfirm.value).match(/\S{6,}/)) {
			hilite_error('password2');
			pwformerror = 'true';
		} else {
   			remove_hilite_error('password2', '#000', '#eeeeee');
		}
		
		// Don't check for match unless passwords are not missing and there are no formatting errors
		if("false" == pwformerror && "false" == pwmissing) {
			if (document.reg.passwordconfirm.value != document.reg.password.value) {
				hilite_error('password1');
				hilite_error('password2');
		    	pwerror = 'true';
			} else {
   				remove_hilite_error('password1', '#000', '#eeeeee');
   				remove_hilite_error('password2', '#000', '#eeeeee');
		    	pwerror = 'false';
			}	
		}

		if (!document.reg.privacyVersion.checked) {
			alert("You must agree to the terms of the privacy policy before registering.");
			pperror = 'true';
		}

		if (myerror == "true" || pwmissing == "true") {
   			document.getElementById("newerror").innerHTML="<font color=#c00000>Some required fields are missing</font><br><font size=-1>Please complete the fields highlighted in red and sign in at the bottom of the page</font>";
	   		document.getElementById("newerror").style.visibility="visible";
		} else {
			document.getElementById("newerror").innerHTML="";
			document.getElementById("newerror").style.visibility="hidden";
		}
		
		if(pwformerror == "true") {
   			document.getElementById("newpwformerror").innerHTML="<font color=#c00000>Passwords must be 6 -10 characters and may not contain spaces</font><br><font size=-1>Please re-enter the fields highlighted in red and sign in at the bottom of the page</font>";
	   		document.getElementById("newpwformerror").style.visibility="visible";
		} else {
			document.getElementById("newpwformerror").innerHTML="";
			document.getElementById("newpwformerror").style.visibility="hidden";
		}

		if (pwerror == "true") {
   			document.getElementById("newpwerror").innerHTML="<font color=#c00000>Passwords do not match</font><br><font size=-1>Please re-enter the fields highlighted in red and sign in at the bottom of the page</font>";
	   		document.getElementById("newpwerror").style.visibility="visible";
		} else {
			document.getElementById("newpwerror").innerHTML="";
			document.getElementById("newpwerror").style.visibility="hidden";
		}
	
		if (emailerror == "true") {
   			document.getElementById("newemailerror").innerHTML="<font color=#c00000>Invalid e-mail address</font><br><font size=-1>Please enter enter a valid e-mail address and sign in at the bottom of the page</font>";
	   		document.getElementById("newemailerror").style.visibility="visible";
		} else {
			document.getElementById("newemailerror").innerHTML="";
			document.getElementById("newemailerror").style.visibility="hidden";
		}
	
		if (pperror == 'false' && myerror == "false" && pwmissing == "false" && pwformerror == "false" && pwerror == "false" && emailerror == "false") {
			return true;
		}
	
		return false;
	}