function procesaAjax(strURL,datos,idObjeto) {
	var xmlHttpReq = false;
	var self = this;
	if (window.XMLHttpRequest) self.xmlHttpReq = new XMLHttpRequest();
	else if (window.ActiveXObject) self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	else return false;
	self.xmlHttpReq.onreadystatechange=function () {
		filtraDatos(self.xmlHttpReq,idObjeto);
	}
	if (datos) {
		self.xmlHttpReq.open('POST',strURL,true);
		self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		self.xmlHttpReq.send(datos);
	} else {
		self.xmlHttpReq.open('GET',strURL,true);
		self.xmlHttpReq.send(null);
	}
}
function filtraDatos(xmlHttpReq, idObjeto) {
	var objeto=document.getElementById(idObjeto);
	objeto.innerHTML="";
	if (xmlHttpReq.readyState==4) {
		if (xmlHttpReq.status==200) {
			if((xmlHttpReq.responseText=="valido")||(xmlHttpReq.responseText=="enviaCorreo")) {document.registro.submit();}
			else {objeto.innerHTML=xmlHttpReq.responseText;objeto.className="errMsg";}
		}
		else if (xmlHttpReq.status==404) xmlHttpReq.innerHTML='Lo siento, la información no está disponible.';
		else xmlHttpReq.innerHTML='Lo siento, ha ocurrido un error';
	}
	else return;
}


