//	by coderlee.gmail.com
//	2006.5.17

	function Create_XMLHTTP(){	
		//var arrXML = ["MSXML3.XMLHTTP","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]; //按如此顺序创建XMLHttpRequest对象		
		if(window.ActiveXObject){ //IE browser
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			return xmlhttp;
		}
		if (window.XMLHttpRequest){ //other browser
			xmlhttp = new XMLHttpRequest();
			return xmlhttp;
		}
		return false;
	}; 		//XMLHttpRequest Object
	
	
	function echo(tag,strValue){
		document.getElementById(tag).innerHTML = strValue;
	}
	
	function Load_Page(tag,url){
		//加载某页面到标记 函数
		//传入参数：(1)obj 某标记的id
		//			(2)url 所要加载的页面的路径
		var xmlhttp = Create_XMLHTTP();
		xmlhttp.onreadystatechange = function(){
			if (xmlhttp.readystate == 4 && xmlhttp.status==200){
				echo(tag,xmlhttp.ResponseText);
			}
		};
		xmlhttp.open("GET",url,true);
		xmlhttp.send();
	}
	
	function Post_Data(tag,url,strData){
	//以POST方式向某url（参数2 url）发送数据（参数3 strData）并以将信息返回到指定ID的标记中(参数1 Tag_ID)
		var xmlhttp = Create_XMLHTTP();
		xmlhttp.onreadystatechange = function(){
			if (xmlhttp.readystate == 4 && xmlhttp.status == 200){
				echo(tag,xmlhttp.ResponseText);
			}
		};
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
		xmlhttp.send(strData);
	}	
