function trim(s) {
		if (s)
			return s.replace(/\s+$|^\s*/g, '')
		else
			return ''
		}
	function register(frm) {
		var fn = frm.contact$first_name.value
		if(fn == "") {
			alert("Please enter your first and last names")
			frm.contact$first_name.focus()
			return
			}
		var ln = frm.contact$last_name.value
		if(ln == "") {
			alert("Please enter your first and last names")
			frm.contact$last_name.focus()
			return
			}
		var em = trim(frm.contact$email.value)
		if(em == "") {
			alert("Please enter your e-mail address so we can notify you")
			frm.contact$email.focus()
			return
			}
		var regex = /^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$/
		//var regex = /^(([^<>;()[\]\\.,;:@"]+(\.[^<>()[\]\\.,;:@"]+)*)|(".+"))@((([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))\.)*(([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))$/ // supposed to confirm to RFC 821
		if (! regex.test(em)) {
			alert("Please enter a valid e-mail address")
			frm.contact$email.focus()
			return
			}
		var temp = document.createElement("INPUT");
		temp.type = "hidden";
		temp.value = new Date(new Date().getYear(), new Date().getMonth(), new Date().getDate(), 0, 0, 0).getTime();
		temp.name = "midnight";
		frm.appendChild(temp);
		frm.submit()
		}