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} } function myXMLHttpRequest () { var xmlhttplocal; try { xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")} catch (e) { try { xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")} catch (E) { xmlhttplocal = false; } } if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') { try { var xmlhttplocal = new XMLHttpRequest (); } catch (e) { var xmlhttplocal = false; } } return (xmlhttplocal); } function include_once(file_path){ var sc = document.getElementsByTagName("script"); for (var x in sc) if (sc[x].src != null && sc[x].src.indexOf(file_path) != -1) return; include(file_path); } function include(file_path){ var j = document.createElement("script"); j.type = "text/javascript"; j.src = file_path; document.body.appendChild(j); } function obtener(pais,tipo){ var contenido=document.getElementById('contenido'); ajax=myXMLHttpRequest(); ajaxToken = "kh012axntdwds4o"; ajax.open("GET","result-ajax-query.php?pais=" + pais + "&tipo=" + tipo + "&token=" + ajaxToken,true); ajax.setRequestHeader("AJAX-Token", ajaxToken); ajax.onreadystatechange=function(){ if(ajax.readyState==1){ contenido.innerHTML='Cargando...
'; }else if(ajax.readyState==4){ if(ajax.status==200){ contenido.innerHTML=ajax.responseText; }else if(ajax.status==404){ alert("Estamos realizandole mantenimiento\n, reintenta en cinco minutos."); }else{ alert("Estamos realizandole mantenimiento\n, reintenta en cinco minutos."); } } } ajax.send(null); }