<!--
	var expdate = new Date();
	var visit;
	var vrf = document.referrer;
	expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); 

function getCookieVal (offset) 
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) 
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) 
	{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) 
		break; 
	}
	return null;
}

function SetCookie (name, value) 
{
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (2 < argc) ? argv[2] : null;
	var path = (3 < argc) ? argv[3] : null;
	var domain = (4 < argc) ? argv[4] : null;
	var secure = (5 < argc) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}


   function CodCasuale() 
   { 
      var codice = ''; 
	  // 4 lettere
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  // 2 numeri
	  codice += String.fromCharCode(Math.round(Math.random()*9+48));
	  codice += String.fromCharCode(Math.round(Math.random()*9+48));
	  // 1 lettera
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  // 1 numero
	  codice += String.fromCharCode(Math.round(Math.random()*9+48));
	  // 2 lettere
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  codice += String.fromCharCode(Math.round(Math.random()*25+97));
	  return codice;
//	  alert(codice);
   } 

	var n_ck = GetCookie (usr);
	if (n_ck == null)
	{
	    var codcok = CodCasuale(); 
		SetCookie(usr, codcok, expdate , "/", null, false);
		n_ck = GetCookie (usr);
	}

// Controllo se provengo da delle campagne o meno
    var c_px = ''; // Campagna
	var new_vrf = String(this.location);
	var inizio = new_vrf.lastIndexOf("?")+1;
	if (inizio != 0) // ho almeno un dato passato in input
	{
	  var par_pas = new_vrf.substring(inizio,inizio+30);
	  if (par_pas.substring(0,4) == 'imcp') // è una mia campagna
	  {
	    par_pas = par_pas.substring(5,30)
		var vettore = par_pas.split("&");
		c_px = vettore[0];
	  }
	}
document.write('<img src="http://www.appalti-pubblici.it/I-Marketing/track.asp?imcl='+usr+'&impg='+pgpg+'&imcp='+c_px+'&cok='+n_ck+'&imrf='+vrf+'" width=1 height=1>');
//-->
