var http;
var Ajax = function(type, url, params, onrsc)
{
	http = null;
	/*@cc_on
	@if (@_jscript_version >= 5)
		try {
			http = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				http = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (E) {
				http = false;
			}
		}
	@else
		xmlhttp = http;
	@end @*/
	if (!http && typeof(XMLHttpRequest) != "undefined")
	{
		try {
			http = new XMLHttpRequest();
		}
		catch (e) {
			http = false;
		}
	}
	http.open(type, url + (type == "GET" && params != "" ? '?' + params : ""), true);
	http.onreadystatechange = onrsc;
	if (type != "GET")
	{
		http.setRequestHeader("Connection", "close");
		http.setRequestHeader("Content-Length", params.length);
		http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	}
	http.send(type == "GET" ? null : params);
};