function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function preload_img() {
nomi=new Array();
nomi[0]="club";
nomi[1]="servizi";
nomi[2]="area";
nomi[3]="chi";
nomi[4]="annunci";
nomi[5]="home";
nomi[6]="network";
nomi[7]="eventi";
pre_img=new Array();
for (j=0; j<nomi.length; j++) {
pre_img[j]=new Image();
pre_img[j].src="img/menu_"+nomi[j]+"_on.gif";
}
}

function roll(quale,come) {
diff=(come)?"_on":"";
img="img/menu_"+quale+diff+".gif";
document.images[quale].src=img;
}

function pop() {
window.open("comuni/credits.html","crdt","width=250,height=250");
}

//livelli


var aperto=false;
var tempo=0;

function apri(menu) {
/*se c'e' un menu' aperto, chiama chiudi() 
e prosegue*/
if (aperto) {
chiudi(aperto);
}
	document.getElementById(menu).style.visibility='visible';
	document.getElementById('principale').style.overflow='visible';
	aperto=menu;
}

function chiudi(aperto) {
	document.getElementById(aperto).style.visibility='hidden';
	document.getElementById('principale').style.overflow='hidden';
	clear_countdown();
}

function start_countdown(aperto) {
tempo=self.setTimeout("chiudi('"+aperto+"')",1000);
}

function clear_countdown() {
	if(tempo){
	self.clearTimeout(tempo);
	}
}

//-->
