
// ******* Pale Stars Javascript Globals ******* //

function writeHtml() {
	document.getElementById('noflash').style.display="block";
	document.getElementById('flashcontent').style.display="none";
}

function checkForm(myForm) {
		
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(myForm.email.value)){
		document.getElementById('emailError').innerHTML="<p class=\"error\">Please enter your email</p>";
		document.getElementById('emailL').className="error";
		window.location.href="#top";
		return(false);
	}
	else {
		document.getElementById('emailError').innerHTML="";
		document.getElementById('emailL').className="text";
	}

	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('paleLeft').offsetHeight);
	var R=parseInt(document.getElementById('paleRight').offsetHeight);
	var maxHeight = Math.max(L,R);
	document.getElementById('paleLeft').style.height= maxHeight + "px";
    document.getElementById('paleRight').style.height= maxHeight + 10 + "px"; // Left has 10px Top padding...      	     
}


window.onload = matchHeight;
