


//to use these put call loadXMLDoc(url) where url is the url of your serverside script
//in the server side script return the javascript function call that hadles the output
//example 
//loadXMLDoc(checkName.asp?email=tulips@tufts.edu)
//returns checkName(tulips@tufts.edu,1)  



function processReqChange() 
{
    // only if req shows "complete"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
            // ...processing statements go here...
			response = req.responseText
			eval(response);
        } else {
            alert("There was a problem retrieving the XML data:\n" + req.statusText);
        }
    }
}


function loadXMLDoc(url) 
{
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("POST", url, true);
            req.send();
        }
    }
}