function logged(stato) {
	var cookieValue_L=getCookieValue('LauAuthCookie');
	var result=false;
	//alert('stato: '+stato+' valore cookie: '+cookieValue_L);
	cookieValue_L=cookieValue_L.replace(/^\s+$/,'');
	if (cookieValue_L != '')	{
		if (stato)	{
			if (cookieValue_L.indexOf("STATO="+stato+'&')!='-1')
			{
				//alert('stato fa match');
				result=true;
			}
			else
			{
				//alert('stato nn fa match');
				result=false;
			}
		}
		else
		{
			//alert('stato nn inviato');
			result=true;
		}
	}
	else
	{
		result=false;
	}
	
	return (result);
}

function logged_ATO()	{
	return (logged('ATO'))
}

function logout() {
	document.location.href="/cgi-bin/lau/termina_sessione?C478_TERMINA_LEFT=1";
}

function login() {
	document.location.href="/lau/";
}


