
// ******* Towson Mediation Javascript Globals ******* //

var myForm_ = "contact";
	function checkForm(myForm) {

// WE NEED JUST THE EMAIL ADDRESS

		if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(myForm.email.value)){
			alert("Please provide a valid email address.");
			return(false);
		}

		return(true);
	}

// --------> popWin - for images in Flash
function popWin() {
     myWin = window.open('','myWindow','scrollbars=no,directories=no,status=no,resizable=no,toolbar=no,copyhistory=no,location=no,menubar=no,width=275,height=325,scrollbars=no,top=10,left=10')
     myWin.location.href = fileName;
}

// --------> matchHeight - make sure the content body matches the nav's height

function matchHeight() {  

	var L=parseInt(document.getElementById('myBody').offsetHeight);
	var R=parseInt(document.getElementById('myBody_content').offsetHeight);
	var maxHeight = Math.max(L,R);
	//alert(maxHeight);
	if (maxHeight > 400) {	
		document.getElementById('myBody').style.height= maxHeight + "px";
    	//document.getElementById('myBody_content').style.height= maxHeight + 10 + "px"; // Left has 10px Top padding... 
	}
}


window.onload = matchHeight;
