var WindowObject;

function PopGallery(strUrl, strTarget, strName) {
	var windowWidth, windowHeight, windowLeft, windowTop;
	if(typeof window.screenX == "number" && typeof screen.width == "number") {
		windowWidth = screen.width * .95;
		windowHeight = screen.height * .95;
		windowLeft = 0; windowTop = 0;
	}
	else if(typeof window.screenTop == "number" && typeof document.documentElement.offsetHeight == "number") {
		windowWidth = document.documentElement.offsetWidth * .95;
		windowHeight = document.documentElement.offsetHeight * .95;
		windowLeft = 0; windowTop = 0;
	}
	else { windowWidth = 500; windowHeight = 250; windowLeft = 0; windowTop = 0; };
	if (WindowObject == null || WindowObject.closed) {
		WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar=no,toolbar=no,location=no,resizable,scrollbars,status=no");
	}
	else {
		if(WindowObjectReferenceOfRequestedPopup.focus) { WindowObjectReferenceOfRequestedPopup.focus(); };
	};
}
