	var http_request = false;		
    
	function handleHttpResponse() {	
		if (http.readyState == 4) 
		{		
			enProces = false;	
			//alert('ok');
		}
	}
	function estadistiques(Pag,Idi,Ext) {
    if (!enProces && http) { 
	   var Pagina = Pag;
	   var Idioma = Idi;
	   var Extra = Ext;    
	   var ResolucioX = screen.width;
	   var ResolucioY = screen.height;	   
       var url = "/estadistiques/estadistic.aspx?Pag="+Pag+"&Idi="+Idi+"&Ext="+Ext+"&Resolucio_X="+ResolucioX+"&Resolucio_Y="+ResolucioY+"&URL=none";	  
	   //alert(url);
       http.open("POST", url, true);
       http.onreadystatechange = handleHttpResponse;
       enProces = true;
       http.send(null);	   
    }
	}
	function estadistiques(Pag,Idi,Ext,Dire) {
    if (!enProces && http) { 
	   var Pagina = Pag;
	   var Idioma = Idi;
	   var Extra = Ext; 
	   var Direccio = Dire;
	   var ResolucioX;
	   var ResolucioY;	
	   
	   try 
	   {
		  ResolucioX = screen.width;
		  ResolucioY = screen.height;	
       } 
	   catch (e) 
	   {
			ResolucioX = "1";
	        ResolucioY = "1";	
	   }

	   var url = "/estadistiques/estadistic.aspx?Pag="+Pag+"&Idi="+Idi+"&Ext="+Ext+"&Resolucio_X="+ResolucioX+"&Resolucio_Y="+ResolucioY+"&URL="+Direccio;	  
	   //alert("GRAN "+url);	
	   //http.setRequestHeader('Content-type','application/x-www-form-urlencoded'); 
	   if (document.all)
	   {
	       http.open("POST", url, true);
 		   http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	   	   //http.setRequestHeader('Content-type','application/x-www-form-urlencoded'); 
	   }
	   else
	   {
	        http.open("GET", url, true);
			http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
   			//http.setRequestHeader('Content-type','application/x-www-form-urlencoded'); 
	   }
       http.onreadystatechange = handleHttpResponse;
       enProces = true;
       http.send(null);	   
    }
	}
	function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
	   @if (@_jscript_version >= 5)
       try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) { xmlhttp = false; }
       }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
       try {
          xmlhttp = new XMLHttpRequest();
       } catch (e) { xmlhttp = false; }
    }
    return xmlhttp;
	}

	var enProces = false; // lo usamos para ver si hay un proceso activo
	var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest