// xmlHttp( 回调函数, <GET/POST>, 地址, [POST数据], <text/xml>)
var xmlHttp_v1 = function( callback_fun, method, url, params, text_xml){
	var http = createHttp();
	if (http)
	{
		http.onreadystatechange = function(){
			if (4 == http.readyState){
				if( 'text' == String(text_xml).toLowerCase()) callback_fun( http.responseText);
				else callback_fun( http.responseXML);
			}
		}
		if( method == "GET"){
			http.open( method, url, true);
			http.send( null);
		}
		else{
			http.open( method, url, true);
			http.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded');
			http.send( params);
		}
	}
}
var createHttp = function(){
	var http = false;
	if (window.XMLHttpRequest){ // code for Mozilla, etc.
		http = new XMLHttpRequest();
	}
	else if (window.ActiveXObject){ // code for IE
		http = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else{
		http = new ActiveXObject("Msxml2.XMLHTTP");
	}
	return http;
}
