﻿// -------------------------------------------------------------------------------------
//  
//  Scripts/Hoehe.js
//  
//  Höhe von Navigation und Content abgleichen
//  
//  Stand:
//  12.02.2011  TR   Neu
//  
// -------------------------------------------------------------------------------------

function GleicheHoeheAb() {
    var iWindowHeight;
    if (window.innerHeight)
        iWindowHeight = window.innerHeight;
    else if (document.documentElement.clientHeight)
        iWindowHeight = document.documentElement.clientHeight;
    else if (document.body.clientHeight)
        iWindowHeight = document.body.clientHeight;

    var divContent = document.getElementById("divContent");
    if (iWindowHeight > divContent.offsetHeight)
        SetNavigationHeight(iWindowHeight);
    else
        SetNavigationHeight(divContent.offsetHeight + 120); // 120 = Header.Height (40) + Header.Padding (2*10) + divContent.marginTop (60)
}

// -------------------------------------------------------------------------------------
function SetNavigationHeight(iHeight) {
    var divNavigation = document.getElementById("divNavigation");
    divNavigation.style.height = (iHeight - 5) + "px"; // 5 = divNavigation.paddingTop
}

// -------------------------------------------------------------------------------------
