<!--
function check_permesso() 
{
	var permesso = document.permesso.pname.value;
  	if ((permesso == "") || (permesso == "undefined")) 
	{
		alert("Valorizzare il nome del permesso.");
		return false;
	}
	else
	{
		if (confirm("Confermi la creazione del nuovo permesso?"))
			return true;
		else
			return false;
	}
   return true;	
 
}

function conferma()
{
	if (confirm("Vuoi confermare l'operazione?"))
		return true;
	else
		return false;
}
function openWindow(page, nome, width, height, sb) 
{
	if (document.all) 
	{ 
		var x = window.screenLeft; 
		var y = window.screenTop; 
		var w = window.document.body.offsetWidth; 
		var h = window.document.body.offsetHeight; 
	} 
	else 
	{ 
		var x = window.screenX; 
		var y = window.screenY; 
		var w = window.outerWidth; 
		var h = window.outerHeight; 
	} 
	var cntx = x + Math.round((w - width) / 2); 
	var cnty = y + Math.round((h - height) / 2); 
	
	window.open(page, nome, 'left=' + cntx + ',top=' + cnty + ',width='+width+', height='+height+', location=0,menubar=0,resizable=0,scrollbars='+sb+',status=0,titlebar=0,toolbar=0');
	return false;
}

function changeColorRow(highlightcolor){
	source=event.srcElement
	
	while(source.tagName!="TR")
	source=source.parentElement
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
		source.style.backgroundColor=highlightcolor
}

function confDeleteMenu(cdMenu2)
{
	if (conferma())
	{
		openWindow('private/Content/menu_sql.php?tipo_op=D&cdMenu='+cdMenu2, 'menu', 400, 160, 0);			
	}
	else
	{
		return false;
	}
}
//-->