
function navMenu(pag)
{
	document.getElementById("m"+pag).style.color = "#FFCC00";
	//document.getElementById("td-m"+pag).style.fontWeight = "bold";
}


function navSubMenu(pag)
{
	document.getElementById("m-c"+pag).style.color = "#FFCC00";
	document.getElementById("m-c"+pag).style.fontWeight = "bold";
}



function showNews(obj, val, id)
{
	if(obj == "")
	{
		for(i=1;i<=val;i++)
		{
			document.getElementById("news"+i).style.display = "none";
		}
	}
	else
	{
		if(document.getElementById(obj).style.display == "none")
		{
			document.getElementById(obj).style.display = '';
		}
		else
		{
			document.getElementById(obj).style.display = "none";
		}
	}
	
	if(id != "")

	{

		for(i=1;i<=val;i++)

		{

			if(document.getElementById("news"+i).getAttribute("title") == id)

			{

				document.getElementById("news"+i).style.display = "";

			}

		}

	}
	
}



function openPhoto(IdArt, Foto, Larghezza, Altezza, Livelli)
{
	var X = ((screen.width/2)-(Larghezza/2)); 
	var Y = ((screen.height/2)-(Altezza/2));
	var W = (parseInt(Larghezza) + 50);
	var H = (parseInt(Altezza) + 50);
	window.open(Livelli+'file/prodotti/'+IdArt+'/'+Foto,'','toolbar=no, scrollbar=no, width='+W+', height='+H+', top='+Y+', left='+X+'');
}



function setAnchor(val)
{
	if(val != '0')
	{
		document.getElementById('ancoraggio').focus();
	}
}



function openMap()
{
	var x = ((screen.width/2)-350); 
	var y = ((screen.height/2)-250); 
	window.open("mappa-sede.php", "", "toolbar=yes, scrollbars=yes, width=700, height=500, top="+y+", left="+x+"");
}


