﻿var WindowObjectReferenceOfRequestedPopup;

function pop(strUrl, strTarget)
{
var windowWidth, windowHeight, windowLeft, windowTop;
	windowWidth = 550;
	windowHeight = 740;
if (WindowObjectReferenceOfRequestedPopup == null || WindowObjectReferenceOfRequestedPopup.closed)
	{
	WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",resizable,scrollbars");
	}
else
	{
	WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",resizable,scrollbars");
	WindowObjectReferenceOfRequestedPopup.focus();	};
}

function newwin(strUrl, strTarget) {
	var windowWidth, windowHeight, windowLeft, windowTop;
	if(typeof window.screenX == "number" && typeof window.innerWidth == "number")
		{
		windowWidth = window.innerWidth * 1.8;
		windowHeight = window.innerHeight * .85;
/*		windowLeft = window.screenX + window.innerWidth * .16;
		windowTop = window.screenY + window.innerHeight * .01;
*/		
		}
	else if(typeof window.screenTop == "number" && typeof document.documentElement.offsetHeight == "number")
		{
		windowWidth = document.documentElement.offsetWidth * 1.8;
		windowHeight = document.documentElement.offsetHeight * .85;
/*		windowLeft = window.screenLeft + document.documentElement.offsetWidth * .16;
		windowTop = window.screenTop - 50;
*/
		}
	else
		{
		windowWidth = 1000;
		windowHeight = 650;
		};
	if (WindowObjectReferenceOfRequestedPopup == null || WindowObjectReferenceOfRequestedPopup.closed)
		{
		WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,toolbar,location,resizable,scrollbars,status");
		}
	else
		{
		WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,toolbar,location,resizable,scrollbars,status");
		WindowObjectReferenceOfRequestedPopup.focus();	};
}
function close_win() {
	window.close();
	}

