function popupCentered(url, name, w, h) {
    var windowprops = "scrollbars,width=" + w + ",height=" + h;
    if (window.screen) {
        var xPos = (screen.width - w) / 2;
        var yPos = (screen.height - h) / 2;
        windowprops = "scrollbars,left=" + xPos + ",top="
          + yPos + ",width=" + w + ",height=" + h;
    }

    popupWin = window.open(url,name,windowprops);
    if (popupWin) {
      popupWin.focus();
    }
}

        
function swap(button, progressStyle) {
    button.value = 'bitte warten...';
    button.disabled = true;
    button.className = progressStyle;
}
