var str = "left=0,screenX=0,top=0,screenY=0";

if (window.screen) {
  var ah = 440;
  var aw = 500;
  str += ",height=" + ah;
  str += ",innerHeight=" + ah;
  str += ",width=" + aw;
  str += ",innerWidth=" + aw;
  str += ",scrollbars=yes";
} else {
  str += ",resizable"; // so the user can resize the window manually
}

function launch(newURL, newName, newFeatures, orgName) {
	var PopWin = open(newURL, newName, newFeatures);
	if (PopWin.opener == null) // if something went wrong
		PopWin.opener = window;
		PopWin.opener.name = orgName;
	return PopWin;
}
function launchPop(url) {
	if (!window.myPop || window.myPop.closed) {
		myPop = launch(url, "Popchild", str, "PopParent");
		myPop.focus();
	}
	else {
		myPop.focus();
	}
}