function ajax_get(url, returnID, method){var ajax = new ajax_obj(url, ajax_return, method, returnID);ajax.init();ajax.run('txt');}function ajax_return(json, returnID){try{if(json != null){$(returnID).innerHTML = json;}else{$(returnID).innerHTML = "无法正确跟服务器进行通讯，请重试";}}catch(e){alert(e);}}function ajax_obj(url,reFunc,method,returnID){this.ajaxObj    = false;this.url = url;this.reFunc = reFunc;this.returnID = returnID;if(null == method){method = 'GET';}method = method.toUpperCase();this.method = method;this.init = _ajax_obj_init;this.run = ajaxOpen;this.json = ajaxJson;this.txt = ajaxTxt;}function _ajax_obj_init(){ this.ajaxObj=false;  var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP']; for(var i=0; i<versions.length; i++) { try { this.ajaxObj = new ActiveXObject(versions[i]); if(this.ajaxObj) { return this.ajaxObj; } } catch(e) {} } if (!this.ajaxObj && typeof XMLHttpRequest!='undefined') {this.ajaxObj = new XMLHttpRequest();}} function ajaxJson(){this.run('json');} function ajaxTxt(){this.run('txt');}function ajaxOpen(reType){var ajax = this.ajaxObj;var reFunc = this.reFunc;var returnID = this.returnID;ajax.onreadystatechange = function(){if (ajax.readyState == 4){if (ajax.status == 200){if(reType == "json"){txt = ajax.responseText;json = eval('(' + txt + ')');reFunc(json,txt);}else if(reType =='txt'){txt = ajax.responseText;reFunc(txt,returnID);}else{responseXml = window.DOMParser ? new DOMParser().parseFromString(ajax.responseText, "text/xml") : ajax.responseXML;reFunc(responseXml,ajax.responseText);}}else{alert(ajax.status+"网络状态不好，请重试");}}}
if('GET' == this.method){ajax.open(this.method, this.url, true);ajax.setRequestHeader("text","text");ajax.send(null);}else{var urlPos = this.url.indexOf("?");var len = 0;if(-1 != urlPos){var url_prefix = this.url.substr(0,urlPos);var postData = this.url.substr((urlPos+1),this.url.length);len = postData.length;}else{var url_prefix = this.url;var postData = null;}ajax.open('POST',url_prefix, true);ajax.setRequestHeader("text","text");ajax.setRequestHeader("Content-Length",len);ajax.setRequestHeader("Content-Type", 'application/x-www-form-urlencoded');ajax.send(postData);}}var isIE;var requestObj;var backFuncs;var returnXml=false;function loadPage(url,backFunc,isXml,method){try{if(0==url.length){return false}backFuncs=backFunc;returnXml=isXml;if(null==method){method='GET'}method=method.toUpperCase();if(window.XMLHttpRequest){requestObj=new XMLHttpRequest();requestObj.onreadystatechange=inceptLoadPage;if('GET'==method){requestObj.open(method,url,true);requestObj.setRequestHeader("text","text");requestObj.send(null)}else{var urlPos=url.indexOf("?");if(-1!=urlPos){var url_prefix=url.substr(0,urlPos);var postData=url.substr((urlPos+1),url.length)}else{var url_prefix=url;var postData=NULL}requestObj.open('POST',url_prefix,true);requestObj.setRequestHeader("text","text");requestObj.setRequestHeader("Content-Length",postData.length);requestObj.setRequestHeader("Content-Type",'application/x-www-form-urlencoded');requestObj.send(postData)}}else if(window.ActiveXObject){isIE=true;requestObj=new ActiveXObject("Microsoft.XMLHTTP");requestObj.onreadystatechange=inceptLoadPage;if(requestObj){if('GET'==method){requestObj.open(method,url,true);requestObj.setRequestHeader("text","text");requestObj.send()}else{var urlPos=url.indexOf("?");if(-1!=urlPos){var url_prefix=url.substr(0,urlPos);var postData=url.substr((urlPos+1),url.length)}else{var url_prefix=url;var postData=null}requestObj.open('POST',url_prefix,true);requestObj.setRequestHeader("text","text");requestObj.setRequestHeader("Content-Length",postData.length);requestObj.setRequestHeader("Content-Type",'application/x-www-form-urlencoded');requestObj.send(postData)}}}return true}catch(e){}}var responseXml='';function inceptLoadPage(){try{if(requestObj.readyState==4){if(requestObj.status==200){responseXml=window.DOMParser?new DOMParser().parseFromString(requestObj.responseText,"text/xml"):requestObj.responseXML;if(typeof backFuncs=="string"){eval(backFuncs)}else{backFuncs(responseXml,requestObj.responseText)}}else{alert(requestObj.status+"网络状态不好，请重试")}}}catch(e){}}