(function() { function handleHttpResponse() { if (http.readyState == 4) { if (http.status == 200) { if (http.responseText.indexOf('invalid') == -1) { if(http.responseText!='') { document.getElementById("BannerInterstitial").innerHTML = http.responseText; document.getElementById("ElBody").style.display = 'none'; document.getElementById("BannerInterstitial").style.display = 'block'; } enProceso = false; } } } } 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 enProceso = false; // lo usamos para ver si hay un proceso activo var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest if (!enProceso && http) { var f = new Date(); var url = "http://www.tucasa.com" + "/asp/publicidadintestitial.asp?" url += "zs=" + ZonaSegmentacion url += "&f=" + f.getTime(); http.open("GET", url, true); http.setRequestHeader( "charset", "iso-8859-1" ); http.onreadystatechange = handleHttpResponse; enProceso = true; http.send(null); } } )()