
function adjustLayout() {
	
	var Height1 = xHeight("box-test");
	var Height2 = xHeight("box-verofalso");
	var Height3 = xHeight("box-glossario");
	var Height4 = xHeight("box-news-int");
	var Height5 = xHeight("box-speciale");
	
	var maxHeight = Math.max(Math.max(Math.max(Height1, Math.max(Height2, Height3)), Height4), Height5);
	
	xHeight("box-test", maxHeight);
	xHeight("box-verofalso", maxHeight);
	xHeight("box-glossario", maxHeight);
	xHeight("box-news-int", maxHeight);
	xHeight("box-speciale", maxHeight);
	
	var Height1 = xHeight("box-article1");
	var Height2 = xHeight("box-article2");
	var Height3 = xHeight("box-article0");
	
	var maxHeight = Math.max(Height1, Math.max(Height2, Height3));
	
	xHeight("box-article1", maxHeight);
	xHeight("box-article2", maxHeight);
	xHeight("box-article0", maxHeight);
	
	var elems = document.getElementsByTagName("a");
	
	for (var i=0; i<elems.length; i++) {
		node = elems[i].childNodes;	
		if (node[0]) {
			if (node[0].nodeName == "IMG" && node[0].getAttribute("id") != "vitamine_bambini"&& node[0].getAttribute("id") != "banner-concorso") {
				node[0].style.position = 'absolute';
				node[0].style.bottom = '3px';
				node[0].style.right = '3px';
				node[0].style.display = 'inline';
				node[0].style.margin = '0';
			}
		}
	}
	
	if (document.getElementById("link-feed")) document.getElementById("link-feed").style.display = 'inline';
	if (document.getElementById("feed")) document.getElementById("feed").style.position = 'static';
	
	if (document.getElementById("link-feed-home")) {
		var elem = document.getElementById("link-feed-home");
		elem.style.position = 'absolute';
		elem.style.margin = '0 0 0 7px';
		elem.childNodes[0].style.position = 'static';
	}
}

function startList() {
	if (document.all&&document.getElementById) {
	navRoot = document.getElementById("menu-main");
		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", "");
		}
	}
	}
	}	
}

window.onload = function() {
	xAddEventListener(window, "resize", adjustLayout, false);
	adjustLayout();
	//startList();
}