/* resizes top-margin of mainlayer depending on height of screen */
/* needs call of browser.js before for browser check! */

function resize_page()
{
    var s = new Object();
    if(typeof window.innerWidth != 'undefined')
    {
        s.width = window.innerWidth;
        s.height = window.innerHeight;
    }
    else
    {
         var obj = getBody(window);
         s.width = parseInt(obj.clientWidth);
         s.height = parseInt(obj.clientHeight);
    }
    
	
	if (s.height > 744)
	{
		this_margin = Math.floor((s.height - 744) / 3);
	}
	else
	{
		this_margin = 0;
	}
	
	document.getElementById("mainlayer").style.marginTop = this_margin+"px";
	
	/*alert(document.getElementById("mainlayer").style.marginTop+' '+s.height+' '+this_margin);*/
} 

function getBody(win)
{
    return (win.document.compatMode && win.document.compatMode == "CSS1Compat") ? win.document.documentElement : win.document.body || null;
}  