var xmlhttp;
var xmlDoc;

// Issue request to get document
// state_change() must be included within source file
function loadXMLDoc(url) {
    // code for Mozilla, etc.
    if (window.XMLHttpRequest) {
        xmlhttp=new XMLHttpRequest();
        xmlhttp.onreadystatechange=state_Change;
        xmlhttp.open("GET",url,true);
        xmlhttp.send(null);
    // code for IE
    } else {
        if (window.ActiveXObject) {
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
            if (xmlhttp) {
                xmlhttp.onreadystatechange=state_Change;
                xmlhttp.open("GET",url,true);
                xmlhttp.send(null);
            }
        }
    }
}

// Load XML file
function loadXML(doc) {
    // code for IE
    if (window.ActiveXObject) {
//        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
//        xmlDoc.async=false;
//        xmlDoc.load(doc);
//        getmessage();
        xmlDoc=doc;
        processResult();
    // code for Mozilla, etc.
    } else if (document.implementation &&
               document.implementation.createDocument) {
//                xmlDoc= document.implementation.createDocument("","",null);
//                xmlDoc.load(doc);
                xmlDoc=doc;
                processResult();
//                xmlDoc.onload=processResult;
           } else {
                alert('Your browser cannot handle this script');
    }
}

