/**
 * Funktionen zur Popupverwaltung
 *
 * @author     Tobias Kivelip <tobi@kivelip.net>
 * @copyright  Copyright (c) 2008, Tobias Kivelip
 * @version    1.0
 */
/**
 * Zentriertes Popup
 */
function centeredPopup (url, width, height, scrollbars) {

    // Defaultwerte, falls keine ?bergeben wurden
    if (width == undefined) {
        width = 450;
    }
    if (height == undefined) {
        height = 600;
    }
    if (scrollbars == undefined || scrollbars != "yes") {
    	scrollbars = "no";
    }

    // Position auf der X-Achse berechnen
    var x_size = window.screen.width;
    x_size = x_size - width;
    x_size = x_size / 2;
    x_size = Math.round(x_size);

    // Position auf der Y-Achse berechnen
    var y_size = window.screen.height;
    y_size = y_size - height;
    y_size = y_size / 2;
    // 5% h?her als die mitte
    y_size -= height * 0.05;
    y_size = Math.round(y_size);

	//var browser = navigator.userAgent.toLowerCase();


/*
	if(browser.indexOf("msie") != -1) {
		fenster=window.open(url, "_blank", "width=520,height=500,status=yes,");
		fenster.focus();
	} else {
*/
//	}

    var window_options = "status=no,scrollbars=" + scrollbars + ",width=" + width + ",height=" + height + ",left=" + x_size + ",top=" + y_size;
    var popupwindow = window.open(url, "_blank", window_options);
    //popupwindow.focus();

	return false;
}