function popup(url, width, height){
    var w = 566;
    var h = 400;
    if (width != null){
        w = parseInt(width);
    }
    if(height != null){
        h = parseInt(height);
    }
    // make sure we have sane values (e.g. when parseInt fails)
    if (!w) w = 566;
    if (!h) h = 400;
    var l = (screen.availWidth-10 - w) / 2;
    var t = (screen.availHeight-20 - h) / 2;
    // append a '/popup' to url if it starts with a '/'
    // which most likely means that it points
    // to an internal document
    if (url.charAt(0) == '/') {
        url = url + '/popup';
    }
    var features = "width="+w+",height="+h+",";
    var name = "popup";
    name += String(Math.round(Math.random()*10000));
    features += "left="+l+",top="+t+",screenX="+l+",screenY="+l+",";
    features += "scrollbars=no,resizable=yes";
    popwin = window.open(url,name,features);
    popwin.focus();
}

function popupInfotour(){
    var w = 791;
    var h = 573;
    var l = (screen.availWidth-10 - w) / 2;
    var t = (screen.availHeight-20 - h) / 2;
    var features = "width="+w+",height="+h+",";
    features += "left="+l+",top="+t+",screenX="+l+",screenY="+l+",";
    features += "scrollbars=no";
    popwin = window.open('http://www.dvag.com/infotour','popupInfotour',features);
    popwin.focus();
}
function popupMagazin(){
    var w = 800;
    var h = 600;
    var l = (screen.availWidth-10 - w) / 2;
    var t = (screen.availHeight-20 - h) / 2;
    var features = "width="+w+",height="+h+",";
    features += "left=0,top=0,screenX=0,screenY=0,";
    features += "scrollbars=yes,location=yes,menubar=yes,status=yes";
    popwin = window.open('http://www.dvag.com/berater/index.html','VBMagazin',features);
    popwin.focus();
}

