function popup(url, windowName, str_width, str_height) {
	var default_width 	= 788;
	var default_height 	= 569;

	try{
		if(str_width == undefined)	{ str_width = default_width; }
		if(str_height == undefined)	{ str_height = default_height; }
	}catch(e){
		str_width 	= default_width;
		str_height 	= default_height;
	}

	popupWin = open(url, windowName, "height="+str_height+", width="+str_width+", left=150, top=112, location=no, resizable=yes, directories=no, menubar=no, status=no, toolbar=no, scrollbars=1, scrollbars=yes");

	if(popupWin) popupWin.focus();
}
function popup2(url, windowName, str_width, str_height) {
	var default_width 	= 788;
	var default_height 	= 569;

	try{
		if(str_width == undefined)	{ str_width = default_width; }
		if(str_height == undefined)	{ str_height = default_height; }
	}catch(e){
		str_width 	= default_width;
		str_height 	= default_height;
	}

	popupWin = open(url, windowName, "height="+str_height+", width="+str_width+", left=150, top=112, location=yes, resizable=yes, directories=no, menubar=yes, status=yes, toolbar=yes, scrollbars=1, scrollbars=yes");

	if(popupWin) popupWin.focus();
}
function popupHttp(linkURL,windowName) {
	var myLinkName = "http://"  + window.location.hostname + getHttpPort() + linkURL;
	var breite = 800 - 12;
	var hoehe  = 600 - 31;
	popupWin = open(myLinkName, windowName, "height="     +hoehe+",width="     +breite+ ",left=150,top=112,location=no,resizable=yes,directories=no,menubar=no,status=no,toolbar=no,scrollbars=1,scrollbars=yes");
	if(popupWin)
		popupWin.focus();
}
function windowOpener(pfad,fensterName,breite,hoehe) {
	newWindow = window.open(pfad,fensterName,'width='+breite+',height='+hoehe+',screenX=0,screenY=0,top=0,left=0,scrollbars=no,locationbar=no,menubar=no,resizable=yes');
	if (newWindow)
		newWindow.focus();
}
function getHttpPort() {
  var port = window.location.port;
  if (!port) return port; // no port specified
  else if (window.location.protocol == "https:") port = parseInt(port) - 1; // httpPort = httpsPort - 1
  return (":" + port);
}