window.onload = function(){
	if (document.getElementById)
	{
		// modifica target
		var pageLinks = document.getElementsByTagName("a");
		var pageForms = document.getElementsByTagName("form");
		for (var k = 0; k < pageLinks.length; k++)
		{
			if (pageLinks[k].className.indexOf('t_blank') != -1) {

				pageLinks[k].setAttribute('target', '_blank');
			 }


		}
		for (var k = 0; k < pageForms.length; k++)
		{
			if (pageForms[k].className.indexOf('t_blank') != -1)
			{
				pageForms[k].setAttribute("target", "_blank");
			}

		}

		// aggiustamento layout
		var colSxHeight = getElementHeight("colSx");
		var bodyHeight = getElementHeight("body");
		if (bodyHeight > colSxHeight)
		{
			var fillerHeight = getElementHeight("filler");
			fillerHeight += bodyHeight - colSxHeight;
			document.getElementById("filler").style.height = fillerHeight + "px";
		}
		/*var pathHeight = getElementHeight("path");
		var ricercaHeight = getElementHeight("ricercaSito");
		colSxHeight = getElementHeight("colSx");
		document.getElementById("content").style.height = parseInt(colSxHeight - pathHeight) + "px";*/
	}
}

/**
 * Restituisce l'altezza dell'elemento in px
 **/
function getElementHeight(p_elm){
	var elm;
	if(typeof(p_elm) == "object"){
		elm = p_elm;
	} else {
		elm = document.getElementById(p_elm);
	}
	return parseInt(elm.offsetHeight);
}

/** solo per retrocompatibilità, che vergogna... */
function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}

function sendComment()
{
	document.getElementById("writeComment").style.display = "none";
	document.getElementById("sendComment").style.display = "block";
}