//######################################################// ***                                           funzioni per cookies                                               ****function setCookie(cookieName, cookieValue, cookiePath, days){	cookieValue = escape(cookieValue);		if (days) {		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = "; expires="+date.toGMTString();	}	else var expires = "";	/*	if (cookieExpires == "")	{		var nowDate = new Date();		nowDate.setMonth(nowDate.getMonth() + 6);		cookieExpires = nowDate.toGMTString();		var expires = "; expires="+nowDate.toGMTString();	}else {		var expires = "; expires="+nowDate.toGMTString();	}	*/	if (cookiePath != "")	{		cookiePath = ";Path=" + cookiePath;		}	document.cookie = cookieName + "=" + cookieValue + expires+ cookiePath;}// -----------------------------------------------function getCookieValue (cookieName){	var cookieValue = document.cookie;	var cookieStartsAt = cookieValue.indexOf( " " + cookieValue + "=");		if (cookieStartsAt == -1)	{		cookieStartsAt = cookieValue.indexOf(cookieName + "=");	}		if (cookieStartsAt == -1)	{		cookieValue = null;	}	else	{		cookieStartsAt = cookieValue.indexOf ( "=", cookieStartsAt) +1;		var cookieEndsAt = cookieValue.indexOf ( ";", cookieStartsAt);		if (cookieEndsAt == -1)		{			cookieEndsAt = cookieValue.length;		}		cookieValue = unescape ( cookieValue.substring (cookieStartsAt, cookieEndsAt)); 	}	return cookieValue;	}	// -----------------------------------------------//######################################################