// layout2.js
// Cross-Browser.com & SitePoint.com - Equal Column Height Demo (2 Column)

if (document.getElementById || document.all) { // minimum dhtml support required
  document.write("<"+"style type='text/css'>#foot{visibility:hidden;}#under_foot{visibility:hidden;}<"+"/style>");
  window.onload = winOnLoad;
}
function winOnLoad()
{
 var ele = xGetElementById('out_menu');
  if (ele && xDef(ele.style, ele.offsetHeight)) { // another compatibility check
    adjustLayout();
    xAddEventListener(window, 'resize', winOnResize, false);
  }
}
function winOnResize()
{
  adjustLayout();
}
function adjustLayout()
{
  // Get content heights
  var cHeight = xHeight('menu');
  var lHeight = xHeight('top_main');

  // Find the maximum height
  var maxHeight = Math.max(lHeight, cHeight);

  // Assign maximum height to all columns
  xHeight('out_menu', (maxHeight+30));
  xHeight('out_top_main', (maxHeight+30));
  xHeight('center', (maxHeight+125));
  xHeight('out_center', (maxHeight+175));


  // Show the footer
  xShow('foot');
  xShow('under_foot');
    

 //fixa nmenyn i IE
	if (document.all&&document.getElementById) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	
//fixa menyn i IE
}
