function rollon(a) 
{
	a.style.backgroundColor='#1D1D2F';
	a.style.borderStyle="none"
}

function rolloff(a) 
{
	a.style.backgroundColor='#003466';
	a.style.borderStyle="none"	
}
	
function ApriFinestra (earl,name,opzioni,larghezza,altezza) 
{
	//even Raf.
	var winl = (screen.width - larghezza) / 2;
	var wint = (screen.height - larghezza) / 2;
		
	opzioni += ',height='+altezza+',width='+larghezza+',top='+wint+',left='+winl;
	nuovaFinestra = window.open (earl,name,opzioni);	
	nuovaFinestra.focus();
} 

function CtrlCheck(NomeCheck, AltroCampo, Inverti)
{
	if (NomeCheck.checked==true)
	{
		if (Inverti)
			AltroCampo.disabled=true;
		else
			AltroCampo.disabled=false;
	}
	else
	{
		if (Inverti)
			AltroCampo.disabled=false;
		else
			AltroCampo.disabled=true;
	}
}

function MM_findObj(n, d)
{
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayersHELP() 
{
	if(parent.menu.document.help.FlagHelp.value==1)
	{
	var i,p,v,obj,args=MM_showHideLayersHELP.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) 
	{ 
		obj=obj.style; 
		v=(v=='show')?'visible':(v='hide')?'hidden':v;
	}
	obj.visibility=v;
	obj.top = window.event.y + 5;
	obj.left = window.event.x;  
	}
	}
}

function preload() 
{
	if (!document.images) return;
	var wl = new Array();
	var arguments = preload.arguments;
	for (var i = 0; i < arguments.length; i++) 
	{
		wl[i] = new Image();
		wl[i].src = arguments[i];
	}
}

var FlagCommenti=true
function ChiudiCommenti()
{
	if (FlagCommenti)
	{
		Commenti.style.display = 'none';
		FlagCommenti=false;
		document.ApriChiudiCommenti.src='<%=Root()%>/image/espandi.gif';
	}
	else
	{
		Commenti.style.display = '';
		FlagCommenti=true;
		document.ApriChiudiCommenti.src='<%=Root()%>/image/riduci.gif';
	}
}
