    // funzione per assegnare l'oggetto XMLHttpRequest
	// compatibile con i browsers più recenti e diffusi
	var ajaxpossible=false;
	
	function assegnaXMLHttpRequest(){
		// lista delle variabili locali
		var
		
		 ajax,
		 // variabile di ritorno, nulla di default
		 XHR = null,
		 
		 // informazioni sul nome del browser
		 browserUtente = navigator.userAgent.toUpperCase();
		
		 // browser standard con supporto nativo
		 // non importa il tipo di browser
		 if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object")
		  XHR = new XMLHttpRequest();
		
		 // browser Internet Explorer
		 // è necessario filtrare la versione 4
		 else if(
		  window.ActiveXObject &&
		  browserUtente.indexOf("MSIE 4") < 0
		 ) {
		 
		  // la versione 6 di IE ha un nome differente
		  // per il tipo di oggetto ActiveX
		  if(browserUtente.indexOf("MSIE 5") < 0)
		   XHR = new ActiveXObject("Msxml2.XMLHTTP");
		
		  // le versioni 5 e 5.5 invece sfruttano lo stesso nome
		  else
		   XHR = new ActiveXObject("Microsoft.XMLHTTP");
		 }
		 return XHR; 
	} 
	onload = function(){
		  ajax = assegnaXMLHttpRequest();
		  if(ajax) {
			 ajaxpossible=true;
		 }
		
	} 
		function sendajax(mytesto){			 
			ajax.open("post", "countc.asp", true);
			// imposto il giusto header
			ajax.setRequestHeader("content-type", "application/x-www-form-urlencoded");
			// effettuo la richiesta inviando la variabile leggi con contenuto Dante
			ajax.send("testo=" + escape(mytesto)); 
			ajax.onreadystatechange = function() {
				if(ajax.readyState === 4){
					//alert(ajax.responseText);	
				}
			}
			ajax.setRequestHeader("connection", "close");
		}
		
		function  countc(myobj){
			if (ajaxpossible==true){
				sendajax(myobj.href);
			}
		} 
