function tempo()
{
   var tempo = new Date();
   return tempo.getTime();
}
function ScriviStatistiche(t,p)
{
  if (document['images'] != null && id_statistiche!='')
  {
   var x =new Image();
   var tm=stattempo1-stattempo0;
   x.src='http://www.statistiche.cc/Open.php?file='+statnome
  +'&username='+statutente
  +'&referer='+escape(statriferimento)
  +'&Tload='+tm
  +'&Tuser='+t
  +'&ID='+id_statistiche
  +'&Browser='+escape(window.navigator.appName)
  +'&Width='+window_width
  +'&Height='+window_height
  +'&Color='+depth
  +'&Origine='+escape(document.URL)
  +'&start='+p;
  }
}
function loadfun()
{
   stattempo1 = tempo();
   ScriviStatistiche(0,'load');
}
function unloadfun()
{
   if (stattempo1 != '')
   {
      var tm = 0;
      tm = tempo() - stattempo1;
      ScriviStatistiche(tm,'unload');
   }
}
function StatLnk(w)
{
   if (StatLnk.arguments.length>1)
      file=StatLnk.arguments[1];
   else
      file=w.href;

   file=escape(file);

   var x=new Image();
   x.src='http://www.statistiche.cc/Open.php'
        +'?username='+statutente
        +'&file='+file
        +'&start=inizio'
        +'&redir='+statnome
        +'&referer='+statriferimento;
   return true;
}
