function view(param)
{
	window.open('view.php?id='+param,'Dettaglio'+param,'scrollbars=yes,resizable=no,width=600,height=550,status=no,location=no,toolbar=no');
}
function foto_admin(param)
{
	window.open('../foto.php?id='+param,'FotoAdmin'+param,'scrollbars=yes,resizable=yes,width=600,height=550,status=no,location=no,toolbar=no');
}
function foto(param)
{
	window.open('foto.php?id='+param,'Foto'+param,'scrollbars=yes,resizable=yes,width=600,height=550,status=no,location=no,toolbar=no');
}
function foto_home(param)
{
	window.open('/foto.php?id='+param,'FotoHome'+param,'scrollbars=yes,resizable=yes,width=680,height=680,status=no,location=no,toolbar=no');
}
function valid_form(form)
{
	nome = form.nome.value;
	msg = form.msg.value;
	email = form.email.value;
	
	if (nome=='' || msg =='' || email =='')
		{
			alert('Attenzione, dati mancanti nella compilazione!');
			return false;
		}
}
window.onresize = function()
{
	document.getElementById("td_home").className = document.getElementById("td_home").className;
}
function apri(cat,num) {
	
	for (i= 1; i < num; i++) 
	{
	/*	alert(document.getElementById('tr_'+i).style.visibility);
		if (document.getElementById('tr_'+cat +'_'+i).style.visibility == "visible")
		{
			document.getElementById('tr_'+cat +'_'+i).style.visibility = "hidden";
			document.getElementById('tr_'+cat +'_'+i).style.position = "absolute";	
		}
		else
		{
			document.getElementById('tr_'+cat +'_'+i).style.visibility = "visible";
			document.getElementById('tr_'+cat +'_'+i).style.position = "relative";
		}
		*/
		if(document.getElementById('tr_'+cat +'_'+i).className == "bott_vis")
			document.getElementById('tr_'+cat +'_'+i).className ="bott_nasc";
		else
			document.getElementById('tr_'+cat +'_'+i).className ="bott_vis";
		
	}
//	alert(" vis "+document.getElementById('td_'+cat).className);
	/*
	if(document.getElementById('td_'+cat).className == "bottone_2")
	{
		document.getElementById('td_'+cat).className = "bottone_3";
	}
	else
	{
		document.getElementById('td_'+cat).className = "bottone_2";	
	}*/
}