//window.onload = SetDiv;
window.onresize = SetDiv;

function SetDiv()
{
   var wh = 0;
   var nwh = 0;
    
    // Get required div height
    if (typeof(window.innerHeight) == 'number')
   {
        wh = getWindowHeight() - 158;
        if(navigator.appName=='Microsoft Internet Explorer')
	nwh = getWindowHeight() + 128;
        else
	nwh = getWindowHeight() +58;
   }
    else
   {
        wh = getWindowHeight() - 174;
        if(navigator.appName=='Microsoft Internet Explorer')
	nwh = getWindowHeight() + 104;
        else
	nwh = getWindowHeight() +34;
   }

    var d = document.getElementById('faq_dataframe');
    if(d != null)
        d.style.height = nwh +'px';

    var e = document.getElementById('browse_dataframe'); // Get div element
    if(e != null)
        e.style.height =wh + 'px'; // Set div height to window height
}

function getWindowHeight()
{
    var windowHeight = 0;
    
    if (typeof(window.innerHeight) == 'number')
        windowHeight = window.innerHeight;
    else
    {
        if (document.documentElement && document.documentElement.clientHeight)
            windowHeight = document.documentElement.clientHeight;
        else
        {
            if (document.body && document.body.clientHeight)
                windowHeight = document.body.clientHeight;
        }
    }
    		
    return windowHeight;
}
