/* utilities to work with HTTP request */

function xmlhttpGet(url, callback) {
    /* GETs an XMLHttpRequest, return response object */

    var xmlHttpReq = false;
    if (window.XMLHttpRequest) {
            xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
            xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    } 
    xmlHttpReq.open('GET', url, true);
	
    xmlHttpReq.onreadystatechange = function() {
        if (xmlHttpReq.readyState == 4) {
			switch (xmlHttpReq.status) {
                case 200:
                    callback(xmlHttpReq)
                    break
                default:
                    break;
            }
        }
    }
	xmlHttpReq.send('') //must be?!
}
