function eqLev(){
	a = document.getElementById('nav');
	b = document.getElementById('bod');
	
	y = a.offsetHeight;
	z = b.offsetHeight;
	
	if(y>z){
		b.style.height = (y-30) + "px";
	}
	if(z>y){
		a.style.height = (z-30) + "px";
	}
}

regex1 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
regex2 = /^(\w+[ ]*[\[\]\/\.\-\?\(\)\&\,\!\'\:\;\þ]*\s*\n*\r*[ ]*)+$/
regex3 = /^([A-z]+)$/
regex4 = /^(\d+)$/

function checkMsg(maxchar) {
	if (document.requestForm.Comments.value.length > maxchar) {
	alert("Please keep your message to under " + maxchar + " characters");
	document.requestForm.Comments.select();
	document.requestForm.Comments.focus();
	return false;
	}
	sendForm();
}

function sendForm() {
	var okSofar=true;

	if(document.requestForm.Comments.value.length > 0){
		if (!regex2.test(document.requestForm.Comments.value)){
		alert("What you typed is not going to work. The acceptable characters are . - ? ( ) & , ! ';:.");
		document.requestForm.Comments.select();
		document.requestForm.Comments.focus();
		okSofar=false;
		}
	}

	if(!regex1.test(document.requestForm.Email.value)){
	alert("Please enter a correct email address.");
	document.requestForm.Email.select();
	document.requestForm.Email.focus();
	okSofar=false;
	}

	if(document.requestForm.Name.value.length < 1){
	alert("Please enter your name.");
	document.requestForm.Name.select();
	document.requestForm.Name.focus();
	okSofar=false;
	}

	if(okSofar == true) document.requestForm.submit();
}

function opWin(src,w,h,sc){
	var feat = 'width='+w+',height='+h;
	if(sc == 'y') feat+= ',scrollbars=yes';
	nWinn = window.open(src,'pwin',feat);
	nWinn.focus();
}