function EffettoOver(i,s){
	if (s){
		document.getElementById(i).style.backgroundImage="url('img/bottone-chiaro.png')";
		document.getElementById(i).style.color='#ffffff';
	}
	else{
		document.getElementById(i).style.backgroundImage="url('img/bottone-verde.png')";
		document.getElementById(i).style.color='#ffffff';
	}
	return;
}
	
function EffettoOut(i,s){
	if (s){
		document.getElementById(i).style.backgroundImage="url('img/bottone-scuro.png')";
		document.getElementById(i).style.color='#cccccc';
	}
	else{
		document.getElementById(i).style.backgroundImage="url('img/bottone-verde.png')";
		document.getElementById(i).style.color='#ffffff';
	}
	return;
}

function EffettoClick(i,n){
	for(j=1;j<=n;j++){
		if (i==j){
			document.getElementById(j).style.backgroundImage="url('img/bottone-verde.png')";
			document.getElementById(j).style.color='#ffffff';
		}
		else{
			document.getElementById(j).style.backgroundImage="url('img/bottone-scuro.png')";
			document.getElementById(j).style.color='#cccccc';
		}
	}
	return;
}

function EffettoFrecciaOver(j){
	document.getElementById(j).src='img/freccia2.png';
}

function EffettoFrecciaOut(j){
	document.getElementById(j).src='img/freccia.png';
}

function openCentered(url,name,width,height){
 var WW = width;
 var HH = height;
 var TT = screen.height / 2 - HH / 2;
 var LL = screen.width / 2 - WW / 2;
 var opts = 'width='+WW+',height='+HH+',top='+TT+',left='+LL+',innerWidth='+WW+',innerHeight='+HH+',status=no,scrollbars=yes,resizable=no,menubar=no,copyhistory=no,toolbar=no,location=no,directories=no';
 var new_window = window.open(url,name,opts);
 new_window.focus();
 
 if( typeof( new_window.innerWidth ) == 'number' ) {
  new_window.innerWidth = WW;
  new_window.innerHeight = HH;
 } else if( new_window.document.documentElement && ( new_window.document.documentElement.clientWidth || new_window.document.documentElement.clientHeight ) ) {
  new_window.document.documentElement.clientWidth = WW;
  new_window.document.documentElement.clientHeight = HH;
 } else if( new_window.document.body && ( new_window.document.body.clientWidth || new_window.document.body.clientHeight ) ) {
  new_window.document.body.clientWidth = WW;
  new_window.document.body.clientHeight = HH;
 }
}
