function adjustLayout()
		{

               var topHeight=xHeight("top");
               var footHeight=xHeight("footer");
          	var cHeight = xHeight("div5");
			var lHeight = xHeight("div4");
			var navHeight = xHeight("mainnav");
			var leftHeight= lHeight+navHeight+0;
			var rHeight = xHeight("div6");
			var maxHeight = Math.max(cHeight, Math.max(leftHeight, rHeight));
               var frameWidth= xWidth("frame");

			//alert ("Max height: " + maxHeight + " lHeight: " + lHeight + " rHeight: " + rHeight + " cheight: " + cHeight + " NavHeight: " + navHeight);


			if((maxHeight+topHeight+footHeight)<xClientHeight()){
//alert ("Max height: " + maxHeight + " lHeight: " + lHeight + " rHeight: " + rHeight + " cheight: " + cHeight + " NavHeight: " + navHeight + "Top " + topHeight + " Foot " + footHeight +  " Client: " + xClientHeight()  );
                    maxHeight=xClientHeight()-topHeight-footHeight;
				

			}


               xHide("div14");
               xMoveTo("div14", 0,0);
			xHeight("div5", maxHeight);
			xHeight("div4", maxHeight-navHeight-0);
			xHeight("div6", maxHeight-30);
			xShow("footer");
			xShow("div4");
               ds = xDocSize();

	          var div14height= xHeight("div14");
			var div14width= xWidth("div14");


               if(frameWidth<xClientWidth())
			{
			xMoveTo("div14", xClientWidth()-57,ds.h-57);
			}
			else
			{
			xMoveTo("div14", frameWidth-50,ds.h-55);

			}


			xShow("div14");



     	}

		window.onload = function()
		{
			xAddEventListener(window, "resize", adjustLayout, false);
			adjustLayout();
		}

function navhover(a) {

 a.style.cursor = 'pointer';
}
