var http = createRequestObject(); var URLBanner; function createRequestObject() { var xmlhttp; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(f) { xmlhttp = null; } } if (!xmlhttp && typeof XMLHttpRequest != "undefined") { xmlhttp = new XMLHttpRequest(); } return xmlhttp; } function trackViewClick(idview, uri) { url = 'http://' + document.domain + '/global_banners/scripts/bannerTracker.php?idview=' + idview + '&ms=' + new Date().getTime(); try { http.open('GET', url, true); http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); if (uri != null) { URLBanner = uri; http.onreadystatechange = handleResponse; } http.send(null); } catch(e) { } } function handleResponse() { try { if ((http.readyState == 4) && (http.status == 200)) { document.location = URLBanner; } else { } } catch(e) { } }