//获取XmlHttpRequest对象并返回 
function createXmlhttp() {
	var Xmlhttp = false;
	try {
		Xmlhttp = new ActiveXObject("MsXml2.XmlHTTP");
	}
	catch (e) {
		try {
			Xmlhttp = new ActiveXObject("Microsoft.XmlHTTP");
		}
		catch (e) {
			Xmlhttp = false;
		}
	}
	if (!Xmlhttp && typeof XMLHttpRequest != "undefined") {
		Xmlhttp = new XMLHttpRequest();
		if (Xmlhttp.overrideMimeType) {//设置MiME类别 
			Xmlhttp.overrideMimeType("text/Xml");
		}
	}
	return Xmlhttp;
}
function showAsyncContent(element, url) {
	//window.document.getElementById(element).innerHTML = "\u6b63\u5728\u52a0\u8f7d...";
	var xmlHttp;
	xmlHttp = createXmlhttp();
	xmlHttp.onreadystatechange = function () {
		if (xmlHttp.readyState == 4) {
			if (xmlHttp.status != "200") {
				window.document.getElementById(element).style.display = "none";
				//window.document.getElementById(element).innerHTML = "\u52a0\u8f7d\u5931\u8d25!";
			} else {
				xml = xmlHttp.responseText;
				//空项检查
				if ( xml.replace(/(^\s*)|(\s*$)/g, "") == ""){
					window.document.getElementById(element).style.display = "none";
				}else{
					window.document.getElementById(element).style.display = "";
					window.document.getElementById(element).innerHTML = xml;
				}
			}
		}
	};
	xmlHttp.open("POST", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlHttp.send("");
}

