﻿//var strUrl = "http://www.mieiviaggi.it/clickimg.php";
var strUrl = "http://www.mieiviaggi.it/click.php";
//var strUrl = "http://www.mieiviaggi.it/openx/www/delivery/avw.php?zoneid=3&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a06debef";
var rndNumber = Math.floor(Math.random()*99999999999)
//var strUrl = "http://www.mieiviaggi.it/openx/www/delivery/ck.php?n=a232d769&amp;cb=" + rndNumber;
//var strUrl = "http://www.mieiviaggi.it/openx/www/delivery/avw.php?zoneid=3&amp;cb=" + rndNumber + "&amp;n=a06debef";

function DetectClick3() {

    objHTTP = getXMLHttp();
    objHTTP.onreadystatechange = function() { elaboraRisposta(objHTTP) }
    objHTTP.open("GET", strUrl, true);
    objHTTP.send(null);

}

function DetectClick() {
	var iframe;
	if (document.createElement && (iframe =document.createElement('iframe'))) {
		iframe.name = iframe.id = "ban1";
		iframe.width = 1;
		iframe.height = 1;
		iframe.src = strUrl;
		document.body.appendChild(iframe);
	}

}




function elaboraRisposta(pobjHTTP) {
    if (pobjHTTP.readyState == 4) {
        var strResponse = pobjHTTP.responseText;
        //location.href = "http://www.appalti.org/common/logindenied.aspx?cod="+Codipfax;
        //alert(pobjHTTP.responseText);

    }
}



function getXMLHttp() {
    var xmlhttp = null;
    if (window.ActiveXObject) {
        if (navigator.userAgent.toLowerCase().indexOf("msie 5") != -1) {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } else {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
    }
    if (!xmlhttp && typeof (XMLHttpRequest) != 'undefined') {
        xmlhttp = new XMLHttpRequest()
    }
    return xmlhttp
}


