function getXMLHttpRequest(){
	var xmlHttp;
	// Mozilla, Opera, Safari sowie Internet Explorer 7
	if (typeof XMLHttpRequest != 'undefined') {
    	xmlHttp = new XMLHttpRequest();
	}
	
	if (!xmlHttp) {
	    // Internet Explorer 6 und älter
	    try {
	        xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch(e) {
	        try {
	            xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
	        } catch(e) {
	            xmlHttp  = null;
	        }
	    }
	}
	
	return xmlHttp;
}
/**
readyState Status Codes:
	0 = uninitialized
	1 = loading
	2 = loaded
	3 = interactive
	4 = complete
*/
function ajaxGet(_url, _readyCallback){
	var
		req = getXMLHttpRequest();
	req.open('GET', _url, true);
	req.onreadystatechange = function () {
		_readyCallback(req);
	};
	req.send(null);
}

function ajaxPostURLEncoded(_url, _rawData, _readyCallback){
	var
		req = getXMLHttpRequest();
	req.open("POST", _url, true);
	if (_readyCallback){
		req.onreadystatechange = function () {
			_readyCallback(req);
		};
	}
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	req.send(_rawData);
}
