function makeHttpRequest(url, callback_function, loadingText, row, return_xml) {
	var http_request = false;

	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
			http_request.overrideMimeType('text/xml');
		}
	} else if (window.ActiveXObject) { // IE
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) { alert("There was a problem creating the request."); }
		}
	}

	if (!http_request) {
		alert('Unfortunatelly you browser doesn\'t support this feature.');
		return false;
	}
	http_request.onreadystatechange = function() {
		var cb_row = "checkboxImage_"+row;
		if (http_request.readyState == 1) { loader(loadingText); }
		if (http_request.readyState == 4) {
			killLoader();
			if (http_request.status == 200) {
				if (return_xml) {
					eval(callback_function + '(http_request.responseXML)');
				} else {
					eval(callback_function + '(http_request.responseText)');
				}
			} else {
				alert('There was a problem with the request.(Code: ' + http_request.status + ')');
			}
		}
	}
	http_request.open('GET', url, true);
	http_request.send(null);
}

function loader(loadingText) {
	if(!document.getElementById('loadingDiv')){
		if (!loadingText) { loadingText = 'Loading Data, please wait\u2026'; }
		var loader = document.createElement('div');
		loader.setAttribute("id", "loadingDiv");
		loader.style.zIndex = "1000";
		loader.style.position = 'absolute';
		loader.style.top = '50%';
		loader.style.left = '50%';
		loader.style.width = '300px';
		loader.style.lineHeight = '100px';
		loader.style.margin = '-50px 0 0 -150px';
		loader.style.textAlign = 'center';
		loader.style.border = '1px solid #870108';
		loader.style.background = '#fff';
		loader.appendChild(document.createTextNode(loadingText));
		document.body.appendChild(loader);
	}
}

function killLoader() {
	purge(document.getElementById('loadingDiv'));
	var mainObj = document.getElementById('loadingDiv');
	mainObj.parentNode.removeChild(mainObj);
}

function purge(d) {
    var a = d.attributes, i, l, n;
    if (a) {
        l = a.length;
        for (i = 0; i < l; i += 1) {
            n = a[i].name;
            if (typeof d[n] === 'function') {
                d[n] = null;
            }
        }
    }
    a = d.childNodes;
    if (a) {
        l = a.length;
        for (i = 0; i < l; i += 1) {
            purge(d.childNodes[i]);
        }
    }
}