// JScript File



    function onBodyLoad()
    {
      document.body.setInitialFocusElt = function(v)
      {
        if (document.body.initialFocusElt = v)
        {
          var h = document.submitForm 
            ? document.submitForm[document.body.initialFocusElt] : 0;
          if (!h) h = document.getElementById(document.body.initialFocusElt);
          if (h) h.focus()
        }
      };
      resizeMe();
      document.body.setInitialFocusElt(document.body.initialFocusElt)
    }
    
    
    function attachEvent()
    {
        if(document.body)
        {
            document.body.onload=onBodyLoad;
            document.body.onresize=resizeMe;

            window.onresize=resizeMe; 
            
            if(document.body.attachEvent) 
            {
              document.body.attachEvent('load',onBodyLoad);
              document.body.attachEvent('resize',resizeMe);
            }
            resizeMe();
        }
        else
        {
            setTimeout(attachEvent,50);
        }
    }
    
    
    function resizeMe()
    {
        var mainDiv=document.getElementById('mainDiv');
        var menuDiv=document.getElementById('menuDiv');
        var contentDiv=document.getElementById('contentDiv');
        var contentDiv2=document.getElementById('contentDiv2');
        var lagereContentDiv=document.getElementById('lagereContentDiv');
        var windowHeight = parseInt(getWindowHeight());
        
	    	if(windowHeight>725) windowHeight = 725;

        if(menuDiv) menuDiv.style.height=Math.max(0,windowHeight-140) + 'px';
        if(contentDiv2) contentDiv2.style.height=Math.max(0,windowHeight-190) + 'px';
        if(contentDiv) contentDiv.style.height=Math.max(0,windowHeight-230) + 'px';
        if(contentDiv2) contentDiv2.style.top = (12+46-menuDiv.offsetHeight) + 'px';
        if(lagereContentDiv) lagereContentDiv.style.height = Math.max(0,windowHeight-228) + 'px';
        if(mainDiv) mainDiv.style.height = Math.max(0,windowHeight-2)+'px';
    }
    
function getWindowHeight()
{
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
	    h = document.documentElement.clientHeight;
	}
	//w3c
	else
	{
		h = window.innerHeight;
	}
	return h;
}

attachEvent();




