// variabele blnNS4 is true as de browser Netscape 4+ is, anders false
  var blnNS4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4));


  var objWSDPopupWin; // popupscherm


function openPopup(strUrl, intWidth, intHeight) {
  var intStartBarheight, intLeft, intTop, strAttrib;
 

  if (objWSDPopupWin != null) {
    if (!objWSDPopupWin.closed) {
      objWSDPopupWin.window.close();
    }
  }
  
  // Windows Startbalk + titelbalk is 58 px; breedte randen en scrollbar breedte 10 px
  intStartBarHeight = 58;
  intBordersWidth = 10;

  if (intWidth > screen.width - intBordersWidth ) intWidth = screen.width - intBordersWidth;
  
  if (intHeight > (screen.height - intStartBarHeight)) intHeight = screen.height - intStartBarHeight;

  intLeft = (screen.width - intWidth) / 2;
  if (intLeft < intBordersWidth) intLeft = 0;

  intTop = (screen.height - intHeight) / 2;
  if (intTop < intStartBarHeight) intTop = 0;

  
  // Genereer een string die de Attribibuten bevat.
  if (blnNS4) {
    strAttrib = "screenX=" + intLeft + ",screenY=" + intTop + ",resizable=yes,scrollbars=yes,width=" + intWidth + ",height=" + intHeight;
  }
  else {
    strAttrib = "left=" + intLeft + ",top=" + intTop + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + intWidth + ",height=" + intHeight;
  }
  
  objWSDPopupWin = window.open(strUrl, "wsdpopup", strAttrib);
}