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 newpopupwide2 (url) {
 fenster = window.open(url,"fenster","width=819,height=755,status=yes,scrollbars=no,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;
}

function toggleFoldList(obj) {
    foldListEntry = obj.parentNode;
    foldListHeader = obj;
    foldListHeaderLink = obj.getElementsByTagName('a')[0];
    foldListContent = foldListEntry.getElementsByTagName('div')[1];
    if (foldListContent.style.display == 'none') { // einblenden
        foldListHeader.className = 'foldlist_header foldlist_header_big';
        //foldListHeaderLink.innerHTML = 'ausblenden';
//        Effect.BlindDown(foldListContent, { duration: 0.5 });
        foldListContent.style.display = 'block';
        if (navigator.appVersion.split('MSIE 6').length != 1) {
                try {
                    document.getElementById('foldlist_separator').style.zIndex += 1;
                } catch(e) {}
        }
    }
    else { // ausblenden
        foldListHeader.className = 'foldlist_header foldlist_header_sml';
        //foldListHeaderLink.innerHTML = 'anzeigen';
//        Effect.BlindUp(foldListContent, { duration: 0.5 });
        foldListContent.style.display = 'none';
    }
}

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 (boxMitte.offsetHeight<teaserBox.offsetHeight)
            whiteBox.style.height = teaserBox.offsetHeight - KORREKTURFAKTOR + 'px';
    }
    else{
        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;
            }
            if (divList[i].className=='content') {
                contentBox = divList[i];
  //              break;
            }
        }
        teaserBox = document.getElementById('spalte_rechts');
        if (whiteBox.offsetHeight<teaserBox.offsetHeight + KORREKTURFAKTOR)
            contentBox.style.height = teaserBox.offsetHeight - 177 + 'px';
    }
   
}

window.onload = calcWhiteBoxHeight;
 
