

var contatoreUp = 100;
var container = null;
var totscorr = 0;
var up = 0;
var FileString = "";
var intervallID1 = null;


/*---fine inizializzazione----*/

function nomefile(){
	miaData = new Date();
	ora=miaData.getHours();
	giorno=miaData.getDate();
	minuti=Math.round(miaData.getMinutes()/2);
	pippo = 1+ ((ora+giorno)*30+minuti)%300;
	numFile= Math.round(pippo);
	FileString = "..\\..\\html\\85\\"+ numFile + ".html";
	return FileString;
	}
	


function init(){
	if (ie5 && !isMac){
	container = document.all["Layer1"].style;
	document.all["layerframe"].src = nomefile();
	}
	if (net4){
	container = document.layers["Layer2"].document.layers["Layer3"];
	document.layers["Layer2"].document.layers["Layer3"].document.layers["Layer4"].src = nomefile();
	}
scrollUp();
}

function scrollUp(){
	if ((ie5 && !isMac) || net4){
		if (up >= -19){
		up = up -1;
		contatoreUp = contatoreUp - 5;
		container.top = contatoreUp;
		intervallID1 = setTimeout("scrollUp()",10);
		}else {
		totscorr = totscorr + 1;
		up = 0;
			if (totscorr == 10) {contatoreUp = 100;
			totscorr = 0;
			primo = true;
			}
		intervallID1 = setTimeout("scrollUp()", 4000);
		}
	}  
}

function scrollStop(){
clearTimeout(intervallID1);
}

window.onload = init;
