// neues Fenster
function popupWindow(url, width, height, name)
{
  var screenwidth = screen.availWidth;
  var screenheight = screen.availHeight;

  // wird bei Breite oder Hoehe der String "max" uebergeben, wird das Fenster
  // mit maximaler Breite bzw. Hoehe geoeffnet.
  if (width  == 'max') width = screenwidth-40;
  if (height == 'max') height = screenheight-40;

  if (!width) width = 350;
  if (!height) height = 200;
  if (!name) name = "newWindow";

  showMenubar = 'no';
  showScrollbars = 'no';
  showLocationbar = 'no';
  showToolbar = 'no';
  showStatus = 'no';
  showPersonalbar = 'no';

  if (width > screenwidth) width = screenwidth;
  if (height > screenheight) height = screenheight;

  var options =  "scrollbars="+showScrollbars+",resizable=yes,menubar="+showMenubar+",toolbar="+showToolbar+",location="+showLocationbar+",status="+showStatus+",personalbar="+showPersonalbar+",width=" + width + ",height=" + height + ",left=" + (screenwidth - width)/2  + ",top=" + (screenheight - height)/2 ;

  extWin = open(url, name, options);

  if(extWin && extWin.type && (extWin.type != 'undefined') && !document.layers) {
    ExtWin.resizeTo(width,height);
  }
  
}
