function handleHttpResponse() 
{
	if (http.readyState == 4) 
		{
		if (http.status == 200) 
			{
			if (http.responseText.indexOf('invalid') == -1) 
				{
				// Armamos un array, usando la coma para separar elementos
				//results = http.responseText.split(",");
				//document.getElementById("campoMensaje").innerHTML = results[0];
				enProceso = false;
				}
			}
		}
}

/*function verificaUsuario() {
if (!enProceso && http) {
var valor = escape(document.getElementById(”emailUsuario”).value);
var url = “consulta.asp?emailUsuario=”+ valor;
http.open(”GET”, url, true);
http.onreadystatechange = handleHttpResponse;
enProceso = true;
http.send(null);
}
}*/

/*function getHTTPObject() 
	{
	var xmlhttp;
	if (!xmlhttp && typeof(XMLHttpRequest)!= 'undefined') 
		{
		try 
			{
			xmlhttp = new XMLHttpRequest();
			}
		catch (e) { xmlhttp = false; }
		}
	return xmlhttp;
}*/


function getHTTPObject()
{
    
    // Probamos con IE
    try
    {
        // Funcionará para JavaScript 5.0
        xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e)
    {
        try
        {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(oc)
        {   
            xmlHttp = null;
        }
    }

    // Si no se trataba de un IE, probamos con esto
    if(!xmlHttp && typeof XMLHttpRequest != "undefined")
    {
        xmlHttp = new XMLHttpRequest();
    }

    return xmlHttp;
}

var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest





