


/* ----- var applet	----*/
var contatoreUp = 100;
var container = null;
var totscorr = 0;
var up = 0;
var FileString = "";
var intervallID1 = null;


/*-----funzioni applet -----*/
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 = "http:\\\\www.waymovil.net\\\\html\\155\\"+ numFile + ".html";
	return FileString;
	}
	


function init(){
if (ie5 && !isMac){
container = document.all["Layer1"].style;
document.all["layerframe"].src = nomefile();
scrollUp();
}
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);
}

/*----fine funzioni applet ----*/


// var layer
var popactivein = null;
var popactiveout = null;
var flaglink = false;
var startup = false;
var valoredihide = 235;	


if (net4){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = mouseverifymove;


// funzioni di visualizzazione layer

function setvisible(popinid, popoutid) {
	if (popactivein != null){
		nascondi();
	}	
	if (dom && startup) {document.getElementById(popinid).style.visibility = "visible"};
	if(net4 && startup) {document.layers[popoutid].document.layers[popinid].visibility = "show"};	 
	popactiveout = popoutid;
	popactivein = popinid;
} 

function nascondi() {
cont = popactiveout; 
	if (popactivein != null) {
		if (dom && startup) {document.getElementById(popactivein).style.visibility = "hidden"};
		if (net4 && startup) {document.layers[cont].document.layers[popactivein].visibility = "hide"};	
	}
}

function setflag(){

	flaglink = !flaglink
}

function mouseverifymove(e){
   	var Yscreen,Ylayer
		if (ie5 || ie4){
			Yscreen = event.x;
		}
		if (net4 || net6){
			Yscreen = e.pageX;
		}
		if (Yscreen >= valoredihide) {
			nascondi();
		} 
/*implementazione estranea a questo script serve per un'animazione di pagina*/
if ((ie4 || ie5) && startup) {
	document.all["home"].style.top = event.y +20;
	document.all["home"].style.left = event.x -75;

	if (event.x <= 75){
	document.all["home"].style.top = event.y +20;
	document.all["home"].style.left = event.x +30; 
	}
  }
 /*fine implementazione estranea */
}

/*----- fine funzioni layer --*/
/*---- lancio applicazione ---*/

function initstart(){
init();
startup = true;
}
window.onload=initstart