if(document.referrer){
var f=document.referrer;
}else{
var f=top.document.referrer;
}
f=escape(f);
f=f.replace(/&/g,'%A7%A7');
if((f=='null') || (f=='unknown') || (f=='undefined')) f='';
var w=screen.width;
var h=screen.height;
var rand=Math.round(100000*Math.random());
var browser=navigator.appName;
var t=escape(document.title);
var NS_url="";
if(browser!="Netscape") c=screen.colorDepth; else c=screen.pixelDepth;
NS_url=document.URL;
NS_url=escape(NS_url);
NS_url=NS_url.replace(/&/g,'%A7%A7');
function getCookie(Name) {
var search = Name + '=';
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = document.cookie.indexOf(';', offset);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(offset, end));
}
}
return '0';
}
var rettime = getCookie('ps_rettime');
var returns = getCookie('ps_returns');
rettime = parseInt(rettime); // Converte stringa in intero
returns = parseInt(returns);
var mytime = new Date().getTime();
mytime = Math.floor(mytime / 1000);
mytime = parseInt(mytime);
var newret = 0;
if (rettime==0 || returns==0) // Prima visita
{
rettime = mytime;
returns = 1;
}
else
{
if (rettime && ((mytime-rettime) > 14400))
{
newret = 1; // Nuovo ritorno: va incrementato il contatore giornaliero
returns=returns+1;
}
}
var exdate = new Date();
exdate.setDate(exdate.getDate() + 30);
document.cookie = "ps_rettime="+mytime+";path=/;expires="+exdate.toUTCString();
document.cookie = "ps_returns="+returns+";path=/;expires="+exdate.toUTCString();
var sc1="";
document.write(sc1);