

function bildpop(url, popupname, y, x) {
  if (window.popup) {
    if (!(popup.closed)) {
      popup.close();
    }
    openwin(url, popupname, y, x);
  }
  else {
    openwin(url, popupname, y, x);
  }
}

function openwin(url, popupname, y, _x) {
  
  var x = ((_x != "") && (_x != null))? _x : 610;
  popup = window.open(url, popupname,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=" + x + ",height=" + y);
  if (navigator.appName == "Microsoft Internet Explorer") {
    popup.resizeTo((parseInt(x)+10),(parseInt(y)+50));
  }
  else {
    popup.resizeTo(x,y);
    if (navigator.userAgent.indexOf("Mozilla/3.0") != -1  || navigator.userAgent.indexOf("Mozilla/4.0") != -1) {
      popup.focus();
    }
  }
}

