//common ajax
function getAjaxRes(url,params,ResRetFun){
	var http = new GetXmlHttpObject();
	http.open("POST", url, true);
	//Send the proper header information along with the request
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.setRequestHeader("Content-length", params.length);
	http.setRequestHeader("Connection", "close");

	http.onreadystatechange = function() {
		if(http.readyState == 4 && http.status == 200)
			ResRetFun(http.responseText);	
	}
	http.send(params);
}
function GetXmlHttpObject(){
	var xmlHttp=null;
	try{ xmlHttp=new XMLHttpRequest();}
	catch (e){// Internet Explorer
		try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
		catch (e){ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
	}
	return xmlHttp;
}
