function roll(a){
	document.getElementById("menu_princ").getElementsByTagName("A").item(a).style.color="#333333";
	}
function aroll(b){
	document.getElementById("menu_princ").getElementsByTagName("A").item(b).style.color="#FFFFFF";
	}

function TimeOutfunc() {
if (document.getElementById("dv")!=null){
	document.getElementById("tempo").removeChild(div);
}
	timeout = window.setTimeout("TimeOutfunc()", 1000);
	var today = new Date();
	var modo = today.toLocaleString();
	ora = document.createTextNode(modo);
	div = document.createElement("div");
	div.setAttribute("id","dv");
	div.className="tempo";
	div.appendChild(ora);
	document.getElementById("tempo").appendChild(div);
}

function credits(){
var alt = 194;
var lar = 400;
var top = (screen.height-alt)/2;
var left = (screen.width-lar)/2;
fin = window.open("credits.html","","scrollbar=no,resizable=no,titlebar=no,top="+top+",left="+left+",width="+lar+",height="+alt+"");
}

function riservata(){
if (document.privat.username.value==""){
	if(this.tes)
	document.getElementById("avvisorosso_priv").removeChild(tes);
	if(this.tes2)
	document.getElementById("avvirosso_priv").removeChild(tes2);
	tes = document.createTextNode("Attenzione, non è stata inserita la username");
	document.getElementById("avvisorosso_priv").appendChild(tes);
	document.privat.username.focus();
	return false;
}

if (document.privat.codice.value==""){
	if(this.tes2)
	document.getElementById("avvisorosso_priv").removeChild(tes2);
	if(this.tes)
	document.getElementById("avvisorosso_priv").removeChild(tes);
	tes2 = document.createTextNode("Attenzione, non è stata inserita la password");
	document.getElementById("avvisorosso_priv").appendChild(tes2);
	document.privat.codice.focus();
	return false;
}
	document.privat.submit();
}

function ingr(foto,larg,alte){
	alto = (screen.height -alte)/2;
	sinistra =(screen.width-larg)/2;
	fin = window.open('','fotografia','width='+larg+',height='+alte+',top='+alto+',left='+sinistra+',noresize=yes,toolbars=no,scrollbars=no');
	fin.document.write('<title>Ingrandimento fotografia</title><body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0><img src='+foto+'></body>');
}
