function jLogNav(tag) { LogTag("NV", tag); return true; } function jLogServicio(tag) { LogTag("G", tag); return true; } function jregistrousuario(ref) { if (ref.length > 0) { LogTag("CURE", ref); return true; } } function jvalidez(ref) { if (ref.length > 0) { LogTag("CUCV", ref); return true; } } function jinformacion(ref) { if (ref.length > 0) { LogTag("CUCI", ref); return true; } } function jenviacupon(ref,prov,cat,subcat) { if (ref.length > 0) { LogTag3("CUSE", ref,prov,cat,subcat); return true; } } function ocultarDescarga(ref,prov,cat,subcat){ //window.parent.document.getElementById('ctl00_CPH_aDescarga').style.display = 'none'; if (ref.length > 0) { LogTag3("CUDE", ref,prov,cat,subcat); return true; } } function jvercupon(ref){ if (ref.length > 0) { LogTag("CUC", ref); return true; } } function jprovincia(prov, cat, subcat){ LogTag3("NV", "", prov,cat,subcat,""); return true; } function LogTag2(type, ref, lang) { if (type != null && type.length > 0) { peticion_http = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... peticion_http = new XMLHttpRequest(); if (peticion_http.overrideMimeType) { peticion_http.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { peticion_http = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { peticion_http = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!peticion_http) { alert ("Se ha producido un error al mostrar la página, seleccionela de nuevo"); } // Preparar la funcion de respuesta var url; if (document.domain.indexOf("localhost") != -1) { url = "http://www.qdq.com/cupones/Anuncio.aspx?Lang=" + lang + "&p=Q&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000); } else { url = "http://" + document.domain + "/Cupones/Anuncio.aspx?Lang=" + lang + "&p=Q&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000); } peticion_http.open("GET", url, true); peticion_http.send(null); function muestraContenido() { if(peticion_http.readyState == 4) { if(peticion_http.status == 200) { } } return false; } } } function LogTag(type, ref) { var url; if (document.domain.indexOf("localhost") != -1) { url = "http://www.qdq.com/cupones/Anuncio.aspx?Lang=es&p=C&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000); } else { url = "http://" + document.domain + "/Cupones/Anuncio.aspx?Lang=es&p=C&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000); } $.get(url); } function LogTag3(type, ref, prov, cat, subcat, origen) { var url; if (subcat == null) subcat = ""; if (document.domain.indexOf("localhost") != -1) { if (subcat.length > 0 ) { url = "http://www.qdq.com/cupones/Anuncio.aspx?Lang=es&p=C&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000) + "&AC="+subcat+"&PR="+prov+"&OR="+origen; } else { url = "http://www.qdq.com/cupones/Anuncio.aspx?Lang=es&p=C&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000) + "&AC="+cat+"&PR="+prov+"&OR="+origen; } } else { if (subcat.length > 0 ) { url = "http://" + document.domain + "/Cupones/Anuncio.aspx?Lang=es&p=C&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000) + "&AC="+subcat+"&PR="+prov+"&OR="+origen; } else { url = "http://" + document.domain + "/Cupones/Anuncio.aspx?Lang=es&p=C&t=" + type + "&r=" + ref + "&d="+(Math.random()*100000) + "&AC="+cat+"&PR="+prov+"&OR="+origen; } } $.get(url); } function replaceAll( text, str1, str2 ) { var command = "text.replace(/"+str1+"/g,\""+str2+"\")"; return eval(command); } function jlimpacampo(strin) { var strin=strin.toUpperCase(); var str1conv='ÁÀÃÂÄÉÈÊËÌÍÎÏÒÓÔÕÖÙÚÜÛÇÑ,;:.\\"[](){}<>!&^%$#`\'?/-\t\c'; var str2conv='AAAAAEEEEIIIIOOOOOUUUUCN '; var strout=''; for (i=0; i < strin.length; i++) { j=str1conv.indexOf(strin.charAt(i)); if (j==-1) { strout=strout+strin.charAt(i); } else { strout=strout+str2conv.charAt(j); } } return (strout.toLowerCase()); }