function ajaxSendPost(script, handlerfunction, args, content) {
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();
	} catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState==4) {
			args["response"] = xmlHttp.responseText;
			if (handlerfunction)
				handlerfunction.call(this, args, false);
		}
	}

	xmlHttp.open("POST", script, true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", content.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(content);
}

function ajaxSendGet(script, handlerfunction, args) {

	var xmlHttp;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	} catch (e) {
		// Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				// Kut browser
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState==4) {
			args["response"] = xmlHttp.responseText;
			if (handlerfunction)
				handlerfunction.call(this, args, false);
		}
	}

	xmlHttp.open("GET", script, true);
	xmlHttp.send(null);
}

function ajaxFill(params) {
	try {
		if (params["response"] && params["elementid"])
			document.getElementById(params["elementid"]).innerHTML = params["response"];
	} catch (e) { }
}
