var oGlob_Window;

function ClosePopup() {
	if (oGlob_Window && oGlob_Window.open && !oGlob_Window.closed) {
		oGlob_Window.close();
	}
}

function MenuClick(sUrl) {
	location.href = sUrl;
}
	
function MenuHover(sDiv, bHover) {
	if (bHover) {
		document.getElementById(sDiv).className = "MenuItemHOVER";
	}else {
		document.getElementById(sDiv).className = "MenuItem";
	}
}

function OpenPopup(sUrl, nWidth, nHeight, nMenu, nResize, nScrollbars) {
	ClosePopup();
	var nLeft = parseInt((screen.width - nWidth) / 2, 10);
	var nTop = parseInt((screen.height - nHeight) / 2, 10);
	oGlob_Window = window.open(sUrl, "Popup", "width=" + nWidth.toString() + ",height=" + nHeight.toString() + ",alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=" + nMenu.toString() + ",resizable=" + nResize.toString() + ",scrollbars=" + nScrollbars.toString() + ",status=1,titlebar=1,toolbar=0,z-lock=0,left=" + nLeft.toString() + ",top=" + nTop.toString());
}
