// Popup-Funktion

var popup_width = 700;
var popup_height = 575;
var popup_cnt = 0;
// Allgemeine Popup-Funktion:
// im Link für Std-Größe/Name/Resizable/Scrolling: onclick="popup(this.href);return false;"
// im Link für speziellere Angaben z.B.: onclick="popup(this.href, 'name', 200, 300, 'no', 'yes');return false;"
function popup (url, name, w, h, resizable, scroll, statusbar) {
 if (statusbar == null || statusbar == '')
   statusbar = 'no';
 if (scroll == null || scroll == '')
   scroll = 'yes';
 if (resizable == null || resizable == '')
   resizable = 'yes';
 if (h == null || h == '')
   h = popup_height;
 if (w == null || w == '')
   w = popup_width;
 if (name == null || name == '')
   name = 'popup_' + (new Date().getTime());
 var winl = (screen.width - w) / 2;
 //winl += popup_cnt * 20; // immer um 10px versetzt
 var wint = (screen.height - h) / 2;
 //wint += popup_cnt * 20; // immer um 10px versetzt
 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable;
 winprops += ',status='+statusbar;
 win = window.open(url, name, winprops);
 if (parseInt(navigator.appVersion) >= 4) { 
   win.window.focus();
 }
 popup_cnt++;
 return win;
}

// Non-Resizable Popup, sonst wie oben
function popup_nr (url, name, w, h, scroll) {
 return popup(url, name, w, h, 'no', scroll, 'yes');
}

// Ende Popup-Funktion