// JavaScript Document

function switchNewsTab(id)
{
	for (i=0;i<3;i++)
	{
		dest_obj = document.getElementById("cont_tab_notizia_"+i);
		
		if (dest_obj!=null)
		{
			dest_obj.style.display = "none";
		}
		
		dest_obj = document.getElementById("tab_notizie_"+i);
		
		if (dest_obj!=null)
		{
			dest_obj.style.background = "url(img/tab_news_home_off.gif)";
			dest_obj.style.paddingTop = "15px";
			dest_obj.style.height = "22px";
		}
	}
	
	dest_obj = document.getElementById("tab_notizie_"+id);
	
	if (dest_obj!=null)
	{
		dest_obj.style.display = "block";
		dest_obj.style.background = "url(img/tab_news_home_on.gif) right";
		dest_obj.style.paddingTop = "10px";
		dest_obj.style.height = "27px";			
	}
	
	dest_obj = document.getElementById("cont_tab_notizia_"+id);
	
	if (dest_obj!=null)
	{
		dest_obj.style.display = "block";
	}		
	
}

function cinqueterreedintorni_addToBookmark(url,titolo, netscape_txt)
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
	{
		window.external.AddFavorite(url,titolo);
	}
	else
	{
		if(navigator.appName == "Netscape") alert(netscape_txt + " (CTRL-D)");
	}
}

onLoad_fnc_array = new Array();

onLoadFnc_add = function(fnc)
{
	onLoad_fnc_array.push(fnc);
}

onloadFnc_exec = function()
{
	for (i=0;i<onLoad_fnc_array.length;i++)
	{
		fnc = onLoad_fnc_array[i];
		fnc();
	}
}

window.onload = function(){ onloadFnc_exec();};
