function adjustLayout()
		{
			var cHeight = xHeight("div4");
			var lHeight = xHeight("div5");
			var rHeight = xHeight("div6");
			//var rwidth = xWidth("top");
			var topspace=xHeight("topspacer");
			var theight = xHeight("top");
			var foheight = xHeight("footer")
			var fheight = xHeight("frame");
			var winheight=xClientHeight();
			//alert ("script Läuft");
			
			var maxHeight = Math.max(cHeight, Math.max(lHeight, rHeight));
            
            
                        // alert (maxHeight);
                         
                         if(maxHeight <winheight-(theight+foheight+topspace+25))
                        {
                        maxHeight=winheight-(theight+foheight+topspace+25);
                         }
                         
			//var newFrHeight= maxHeight+theight+foheight+20;
            //xHeight("frame", newFrHeight);
            //xHeight("center", newFrHeight-(theight+foheight+5));
           
            xHeight("div5", maxHeight);
			xHeight("div4", maxHeight);
			xHeight("div6", maxHeight);
			
			//xWidth("footer",rwidth);
			
			xVisibility("footer",true);
			e_menu=$('SlideInMenu');
			if(xVisibility(e_menu)==false)
			{
			xMoveTo(e_menu,50,39-xHeight(e_menu));
			xVisibility(e_menu,true);
			}
			
			//xShow("featureimg");
		}

function slideOut()
{
	//alert("slideIn");
	var e, x, y, uTime;
	e=$('SlideInMenu');
	x=xLeft(e);
	y=xTop(e)+xHeight(e)-40;
	
	document.images['SlidePic'].onclick=function(){slideIn();};
	xSlideTo(e, x, y, xHeight(e)*5.5);
	document.images['SlidePic'].src="pics/slideinPic.png";
	//xSlideTo(e, 330, 300, 10000);
	
	
	
	
	
}
function slideIn()
{
	//alert("slideIn");
	var e, x, y, uTime;
	e=$('SlideInMenu');
	x=xLeft(e);
	y=39-xHeight(e);
	
	document.images['SlidePic'].onclick=function(){slideOut();};
	//alert(document.images['SlidePic'].src);
	xSlideTo(e, x, y, xHeight(e)*5.5);
	document.images['SlidePic'].src="pics/slideoutPic.png";
	//xSlideTo(e, 330, 300, 10000);
	
	

	
	
}

		window.onload = function()
		{

                         xAddEventListener(window, "resize", adjustLayout, false);
			adjustLayout();
		}
