function GetCookie(NameOfCookie)
{
	var MyCookie;
	var end;
	if (document.cookie.length > 0)
		if (document.cookie.indexOf(NameOfCookie+"=")>=0)
		{
			MyCookie = document.cookie.indexOf(NameOfCookie+"=")+NameOfCookie.length+1;
			if (document.cookie.indexOf(";", MyCookie) < 0) // è l'ultimo Cookie
				end = document.cookie.length;
			else	
				end = document.cookie.indexOf(";", MyCookie);
			return (document.cookie.substring(MyCookie, end));
		}
	return null;
}

function SetCookie(NameOfCookie, value, expiredays)
{
	//Trovo la data di scadenza del Cookie
	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function DeleteCookie (NameOfCookie)
{
	if (GetCookie(NameOfCookie))
	{
		document.cookie = NameOfCookie + "="+"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

var NVisite = GetCookie('VENICEDOLLS');
if(NVisite == null) 
{
	SetCookie('VENICEDOLLS','0',30);
	NVisite =0;
}
else 
{
	var NVisiteAggiornato = parseInt(NVisite) + 1;
	DeleteCookie('VENICEDOLLS');
	SetCookie('VENICEDOLLS',NVisiteAggiornato,30);
	NVisite =NVisiteAggiornato;
}

var Immagine = "<br><br>Visitatori:<br><IMG BORDER=\"0\" SRC=\"http://88.51.109.2/CONTATORE/COUNT3.PHP?Cliente=VENICEDOLLS&New="+NVisite+"&R=255&G=217&B=245\" ALT=\"Numero di visitatori fino a questo momento\">";
