﻿var etUtil = {
	
	Confirm : function (msg, ok, cancel) {
		var s = msg + '\n\n' + 'OK - ' + ok + '\nCancel - ' + cancel;
		return confirm(s);
	}

}

//Date in every page
function ShowHide(idoggetto) {
	if($(idoggetto).visible())
	{
		$(idoggetto).hide();
	}
	else
	{
		$(idoggetto).show();
	}
}

function ShowHideAll() {
/*
viene trovato il rel=debug negli oggetti div
 rel=""debug"" class=""boxtesto"" style=""display:none""

*/	
	action='';
	var divsdebug = $$('div[rel="debug"]');

	if(divsdebug.length>0)
	{
		var item = divsdebug[0];
		if (item.visible())
		{action='hide';}
		else
		{action='show';}
		for (var index = 0; index < divsdebug.length; ++index) {
			var item = divsdebug[index];
			if (action=='show')
			{
				item.show();
			}
			else
			{
				item.hide();
			}
		}		
	}
}

/*
function SetCookie(sName, sValue, oExpires, sPath, sDomain, bSecure) {
	var sCookie = sName + "=" + encodeURIComponent(sValue) + "; ";
	if (oExpires) {sCookie += "expires=" + oExpires.toGMTString() + "; ";}
	if (sPath) {sCookie += "path=" + sPath + "; ";}
	if (sDomain) {sCookie += "domain=" + sDomain + "; ";}
	if (bSecure) {sCookie += "secure" + ";";}
	document.cookie = sCookie;
}

function DeleteCookie(sName, sValue, sPath, sDomain) {
	alert(document.cookie);
	SetCookie(sName, "", new Date(0), sPath, sDomain);
	return true;
}

*/


