function requestServidor(url, post, funcion)
{
	XMLHttp = function() {
		try { return new XMLHttpRequest(); } catch (e) {
			try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch(e) {
				try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch(e) {
					try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {
						try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {
							alert("Error, your browser does not support XMLHttp");
						}
					}
				}
			}
		}
	};
	var ajax = XMLHttp();
	
	ajax.onreadystatechange = function() {
		if (ajax.readyState == 4)	//llega la respuesta y se llama a "funcion"
			eval(funcion+"(ajax.responseText, ajax.responseXML)");
	};
	if (post == null)
		ajax.open("GET", url, true);
	else {
		ajax.open("POST", url, true);
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	}
	ajax.send(post);
}