// Resize the page on load and resize //
function PageResize()
{
	var resizeVal = document.body.clientHeight - 32;

	if(resizeVal > 1)
		document.getElementById('imgSizer').height = resizeVal;
	else
		document.getElementById('imgSizer').height = 1;
}

window.onresize = PageResize;

function OpenPopUp(url, nameWindow, width, height)
{
	mywin=window.open(url,nameWindow,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height);
}

function toggleRegion(regionid)
{
	if(document.getElementById("region_" + activeRegion) != null)
		document.getElementById("region_" + activeRegion).style.display = "none";
	if(document.getElementById("regionArrow_" + activeRegion) != null)
		document.getElementById("regionArrow_" + activeRegion).src = "images/menu/menuLeft_off_arrow.gif";
	
	document.getElementById("region_" + regionid).style.display = "";
	document.getElementById("regionArrow_" + regionid).src = "images/menuLeft_on_arrow.gif";
	activeRegion = regionid;
}

function descrampleEmail(tmpStr)
{
	re = /!/ig;
	var str = tmpStr.replace(re,".");
	strArr = str.split(",");
	return strArr[0] + "@" + strArr[1];
}

function sendEmail(email)
{
	location.href = "mailto:" + descrampleEmail(email);
}

