//funcion encarga de crear el objeto
function objetoajax() {
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
            xmlhttp = false;
        }
    }
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp
}


function descargas_num(mac, nombre, ciudad, pais)
{
    _hora=new Date();
	_ajax=objetoajax();
	if(mac==0){
    _URL_="secciones/descarga_resultados.php?nombre="+nombre+"&ciudad="+ciudad+"&pais="+pais+"&cache=" + _hora.getTime()
	} else {
	_URL_="secciones/descarga_resultados.php?nombre="+nombre+"&ciudad="+ciudad+"&pais="+pais+"&cache=" + _hora.getTime()
	}
    _ajax.open("GET",_URL_,true);
    _ajax.onreadystatechange=function() {
        if (_ajax.readyState==4)
        {
			 if(_ajax.status==200)
			 {
			 document.getElementById('resultados_descarga').innerHTML=_ajax.responseText;
			 }
        }
    }
    _ajax.send(null);
    return
}
