function tombstonePopUp(newLocation) {
  var w = 820;
  var h = 482;
  	
  var popUpWindow = window.open(newLocation, 'popup', 'dependent=yes, resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
  popUpWindow.resizeTo(w, h);
  popUpWindow.focus();
}

function sendPopUp(newLocation) {
  var w = 636;
  var h = 510;
  
  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+20;
	
  var popUpWindow = window.open(newLocation, 'popup', 'dependent=yes, resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
  popUpWindow.resizeTo(w, h);
  popUpWindow.focus();
}

function printPopUp(newLocation) {
  var w = 668;
  var h = 500;
  var popUpWindow = window.open(newLocation, 'popup', 'dependent=yes, resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
  popUpWindow.resizeTo(w, h);
  popUpWindow.focus();
}

function glossaryPopUp(newLocation) {
  var w = 550;
  var h = 380;

  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+20;

  var popUpWindow = window.open(newLocation, 'glossary', 'dependent=yes, resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
  popUpWindow.resizeTo(w, h);
  popUpWindow.focus();  
}


function PopUp(URL, Height, Width, Resizable, Toolbar, Scrollbars, id)
{
	var szWndOptions = "";
	var szToolbar = (Toolbar=="ja")?"yes":"no";	
	var szScrollbars = (Scrollbars=="ja")?"yes":"no";
	var szResizable = (Resizable=="ja")?"yes":"no";
	var oPopup;

  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (Height && navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    Height = Height+20;


	szWndOptions += "height=" + Height;
	szWndOptions += ",width=" + Width;
	szWndOptions += ",resizable=" + szResizable;
	szWndOptions += ",scrollbars=" + szScrollbars;
	szWndOptions += ",toolbar=" + szToolbar;
	szWndOptions += ",menubar=" + szToolbar;
	szWndOptions += ",status=" + szToolbar;
	szWndOptions += ",directories=no";
	szWndOptions += ",copyhistory=no";
	szWndOptions += ",location=no";
        szWndOptions += ",dependent=yes";
	//alert(szWndOptions);
	oPopup = window.open(URL, id, szWndOptions);
	oPopup.focus();
	//PopUp('www.google.com.php', '400', '200', '100', '100', 'nein', 'nein');
	return(oPopup);
}



function tablePopUp(newLocation, preferedWidth, preferedHeight) {

  if (!newLocation) return;
  newLocation = String(newLocation);

  var w = (preferedWidth && !isNaN(preferedWidth))? preferedWidth : 755;
  var h = (preferedHeight && !isNaN(preferedHeight))? preferedHeight : 550;

  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
      h = h+20;


  if (!newLocation.match(/[&?]w=/))
  {
      newLocation += (newLocation.match(/\?/) ? "&" : "?") + "w=" + w;
  }

  // increase size because of scroll bars
  // new size depends on popup layout
  w += 60;
  var popUpWindow = window.open(newLocation, 'tablePopUp', 'dependent=yes, scrollbars,resizable=yes,location=no,status=no,toolbar=no,width='+w+', height='+h);

  // get the first image in the new popup
  popUpWindow.resizeTo(w, h);
  popUpWindow.focus();
}

function imagePopUp(newLocation, w, h) {
  h += 21;
  w += 15;

/* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+20;

  var popUpWindow = window.open(newLocation, 'imagePopUp', 'dependent=yes, resizable=yes,scrollbars,location=no,status=no,toolbar=no,width='+w+', height='+h);

  // get the first image in the new popup
  popUpWindow.resizeTo(w, h);
  popUpWindow.focus();
}

