var xmlHttp;
function createXMLHttpRequest() {
    if (window.XMLHttpRequest) { // 判定浏览器类型为Mozilla, Safari,...
		xmlHttp = new XMLHttpRequest();//有些版本的 Mozilla 浏览器在伺服器送回的资料未含 XML mime-type 档头（header）时会出错。为了避免这个问题，你可以用下列方法覆写伺服器传回的档头，以免传回的不是 text/xml。
		if (xmlHttp.overrideMimeType) {//如果服务器的响应没有XML mime-type header，
			xmlHttp.overrideMimeType('text/xml');//修改header
		}
	} else if (window.ActiveXObject) { // 判定浏览器是 IE
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (e) {}
		}
	}
}

function startRequest() {
    createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange;
    xmlHttp.open("post", "/template/login_ajax_en.asp", true);
    xmlHttp.send(null);
}

function handleStateChange() {
    ///请求的状态，有5个值：0=未初始化，1=正在加载，2=已加载，3=交互中，4=完成
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            document.getElementById("ajax_login").innerHTML = xmlHttp.responseText;
			
        }
    }
}
