//GLOBAL POPUP
var objChildWindow;
function doChildWindow(strURL, objWin, strOptions) {
	//check for open windows and close them
	if (objChildWindow && objChildWindow.closed == false) {
		objChildWindow.close();

		objChildWindow = window.open(strURL, objWin, strOptions);
		objChildWindow.focus();
	}
	else {
		objChildWindow = window.open(strURL, objWin, strOptions);
		objChildWindow.focus();
	}
}

function openNewWin(strURL, intWidth, intHeight) {
	var strOptions;
	//check for parameters and set defaults
	if ((intWidth == '') || (intHeight == '')) {
		strOptions = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=50,top=50,width=615,height=345";
	}
	else {
		intWidth += 45;
		intHeight += 45;
		strOptions = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=50,top=50,width=" + intWidth + ",height=" + intHeight;
	}
	doChildWindow(strURL, 'child_window', strOptions);
	objChildWindow.focus();
}