function CambiaSfondo(Riga,Colore)
	{ Riga.style.backgroundColor=Colore; }

function LiberaTesto(campo,testo)
	{ if (campo.value==testo) campo.value="" }
		
function RicreaTesto(campo,testo)
	{ if (campo.value=="") campo.value=testo }

function NewCenteredWindow(mypage, myname, w, h, windowOptions) 
{
	var winl = (screen.width - w) / 2;
	var wint = (window.height - h) / 2;
	var winprops = windowOptions;
	if (winprops.length > 0) winprops += ",";
	
	winprops += 'height='+h+',width='+w+',top='+wint+',left='+winl;
	win = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
    
function NewWindowMenu(page) 
{
	opt='toolbar=no,scrollbars=no,resizable=no,directories=no,menubar=no,status=no';
	NewCenteredWindow(page, "MenuWindow", 500, 500, opt);
}

function ApriFinestraFull(mypage, myname) 
{
	var winprops = 'toolbar=no,scrollbars=no,resizable=yes,directories=no,menubar=no,status=no,';
	winprops += 'height='+ (screen.height-60) +',width='+ (screen.width-10) +',top=0,left=0';
	win = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function Goto(Action)
{
	if (document.frm != null) 
	{
		document.frm.action = Action
		document.frm.submit ()
	}  
	else 
		document.location.href = Action
}
