function newpopup (url) {
 fenster = window.open(url,"fenster","width=450,height=500,status=yes,scrollbars=yes,resizable=yes");
 fenster.focus();
}

function newpopupwide (url) {
 fenster = window.open(url,"fenster","width=730,height=600,status=yes,scrollbars=yes,resizable=yes");
 fenster.focus();
}

function newpopuphelp (url) {
 fenster = window.open(url,"fenster","width=460,height=500,status=yes,scrollbars=yes,resizable=yes");
 fenster.focus();
}
 
function activateMenu(obj) {
    imgObj = obj.firstChild;
    imgObj.oldSrc = imgObj.src;
    imgObj.src = imgObj.src.substring(0, imgObj.src.lastIndexOf('.')-1)+'1.gif';
}
function deactivateMenu(obj) {
    imgObj = obj.firstChild;
    imgObj.src = imgObj.oldSrc;
}

var  KORREKTURFAKTOR = 30;

function calcWhiteBoxHeight() {
    if (document.getElementsByTagName('body')[0].className.indexOf('home') != -1) {
        boxMitte = document.getElementById('spalte_mitte');
        divList = boxMitte.getElementsByTagName('div');
        for (i=0; i<divList.length; i++)
            if (divList[i].className=='box_weiss') {
                whiteBox = divList[i];
                break;
            }
        teaserBox = document.getElementById('spalte_rechts');
        if (whiteBox.offsetHeight<teaserBox.offsetHeight + KORREKTURFAKTOR)
            whiteBox.style.height = teaserBox.offsetHeight - KORREKTURFAKTOR + 'px';
    }
}

window.onload = calcWhiteBoxHeight;

