function getXMLHTTPRequest() {
	try {req = new XMLHttpRequest();} 
		catch(err1) {  try {req = new ActiveXObject("Msxml2.XMLHTTP");} 
		catch (err2) { try {req = new ActiveXObject("Microsoft.XMLHTTP");} 
		catch (err3) {req = false;}
	  }
	}
	return req;
}

var Ajax = {
	getActiveXObject : function () {
		try {req = new XMLHttpRequest();} 
			catch(err1) {  try {req = new ActiveXObject("Msxml2.XMLHTTP");} 
			catch (err2) { try {req = new ActiveXObject("Microsoft.XMLHTTP");} 
			catch (err3) {req = false;}
		  }
		}
		return req;
	},

	request : function (url, param, func){
		var http = Ajax.getActiveXObject();
		Ajax.response (http, url, param, func);
	},

	response : function (http, url, param, func) { 
		http.onreadystatechange = function (){func (http);};
		http.open("POST", url, true);
		http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		http.send(param);
	} 
};

function $(str){return document.getElementById(str);}