function GotoURL(url) {
    window.location.href = url;
}

function setThema(id) {
    var tx1 = document.getElementById("bwtop");
    var sName = 'icon'+id;
    //if (id != 9999) {
        document.getElementById("bwtop_starttext").style.display = 'none';
        if (tx1.style.display = 'none') {
            tx1.style.display = 'block';
        }
        document.getElementById('vorschau_bild').src = ThemenDat[id]['bild'];
        document.getElementById('bw_thema').innerHTML = ThemenDat[id]['name'];
        document.getElementById('bw_slogan').innerHTML = ThemenDat[id]['slogan'];
    //}
    document.getElementById(sName).src = ThemenDat[id]['icon'];
}

function releasePicThema(id) {
    var sName = 'icon'+id;
    document.getElementById(sName).src = ThemenDat[id]['icon_off'];
}

function PopupWin( url, windowname, width, height, scrollbars ) {
    F1 = window.open(url, windowname, 'width='+width+', height='+height+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars='+scrollbars);
    F1.focus();
}

function ShowPlaid(url) {
    F1 = window.open(url, 'Plaid', 'width=500, height=580,toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=0');
    F1.focus();
}

function adjust_popup() {
    var w, h, fixedW, fixedH, diffW, diffH;
    if (document.all) {
        fixedW = document.body.clientWidth;
        fixedH = document.body.clientHeight;
        window.resizeTo(fixedW, fixedH);
        diffW = fixedW - document.body.clientWidth;
        diffH = fixedH - document.body.clientHeight;
    } else {
        fixedW = window.innerWidth;
        fixedH = window.innerHeight;
        window.resizeTo(fixedW, fixedH);
        diffW = fixedW - window.innerWidth;
        diffH = fixedH - window.innerHeight;
    }
    w = fixedW + diffW;
    h = fixedH + diffH;
    if (h >= screen.availHeight) w += 16;
    if (w >= screen.availWidth)  h += 16;
    w = Math.min(w,screen.availWidth);
    h = Math.min(h,screen.availHeight);
    window.resizeTo(w,h);
    window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}

