function GetAjaxXMLHttpRequest(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else {if(window.Ajax_Request){return new ActiveXObject(window.Ajax_Request);}else {var a=["Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(var i=0;i<a.length;i++){try{var x=new ActiveXObject(a[i]);window.Ajax_Request=a[i];return x;}catch(e){}}}};return ;};function AjaxCallBack(type,id,method,args,callback,url){var loading=document.getElementById('ajaxLoading');if(loading==undefined){loading=document.createElement("div");loading.innerText="载入中...";loading.id="ajaxLoading";document.body.appendChild(loading);};loading.style.cssText="display:block;right:0px; top:0px; position:fixed; _position:absolute; _top:expression(eval(document.body.scrollTop+document.documentElement.scrollTop));z-index:10000;background:#FFFFCC;padding:3px;";if(!url){url=window.location.href;url=url.replace(/\#.*$/,'');if(url.indexOf('?')>-1){url+="&AjaxCallBack=true";}else {if(url.substr(url.length-1,1)=="/"){url+="default.aspx";};url+="?AjaxCallBack=true";}};var x=GetAjaxXMLHttpRequest();var r=null;if(!x){r={"value":null,"error":"NOXMLHTTP"};if(callback){callback(r);};return r;};x.open("POST",url,callback?true:false);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");if(callback){x.onreadystatechange=function (){var r=null;if(x.readyState!=4){return ;};try{r=eval("("+x.responseText+")");if(r.error){alert("error: "+r.error);}}catch(err){if(x&&x.responseText){r=new Object();r.error='AJAX发生错误，响应失败';}};if(r)callback(r);loading.style.display='none';}};var d="AjaxType="+type;if(id){d+="&AjaxID="+id.split("$").join(":");};d+="&AjaxMethod="+method;if(args){for(var i in args){d+="&AjaxArgs"+i+"="+encodeURIComponent(args[i]);}};x.send(d);if(!callback){r=eval("("+x.responseText+")");if(r.error){alert("error: "+r.error);};loading.style.display='none';};delete x;return r;};