//Reload if resized
var currheight = document.documentElement.clientHeight;

//window.onresize = mainresized;

function mainresized() {
	if(currheight != document.documentElement.clientHeight)
	{
		self.location.reload();
		if(parent.side) parent.side.location.reload();
//		location.href=location.href;
	}
	currheight = document.documentElement.clientHeight;
}

function showPop(id) {
	document.getElementById(visibleID).style.display = "none";		//make last popup window invisible again before making this one visible

	var x = 0, y = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		x = window.innerWidth;
		y = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	document.getElementById(id).style.left = (x-document.getElementById(id).offsetWidth)/2+"px";
	document.getElementById(id).style.top = (y-document.getElementById(id).offsetHeight)/2+"px";
	document.getElementById(id).style.display = "block";

	visibleID=id;
}

function hidePop(id) {
	document.getElementById(id).style.display = "none";
}

