var req;

function loadXMLDoc(url,xmlPost) {
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        
        req.open("POST", url, true);
        req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; Charset=utf-8");
        req.send(xmlPost);
        

    // 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.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; Charset=utf-8");
          req.send(xmlPost);
         	
    		}
    	}
}

function processReqChange() {
	
    // only if req shows "complete"
    if (req.readyState == 4) {
        // only if "OK"
		
        if (req.status == 200) {
            //set message and points
            
						var message;
				
						if (req.responseText){
            	message = req.responseText;
            }
			
						updateText(message);
			
        } else {
            alert("There was a problem retrieving the XML data:\n" + req.statusText);
        }
    }
}