var D1xnXmlHttp = false;
var returnId="";
try {
  D1xnXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    D1xnXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    D1xnXmlHttp = false;
  }
}

if (!D1xnXmlHttp && typeof XMLHttpRequest != 'undefined') {
  D1xnXmlHttp = new XMLHttpRequest();
}
//alert(xmlHttp);
function callServer(url,method,vars,debug,Id) {
 if(debug){alert(url);alert(vars);}

   D1xnXmlHttp.open(method, url, true);  
   D1xnXmlHttp.setRequestHeader("content-length",vars.length);//post提交设置项 
 
   D1xnXmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");//post提交设置
   returnId=Id;
  
  // Setup a function for the server to run when it's done
  D1xnXmlHttp.onreadystatechange = updatePage;

  // Send the request
  D1xnXmlHttp.send(vars);
}

function updatePage() {
  if (D1xnXmlHttp.readyState == 4) {
    var response = D1xnXmlHttp.responseText;
	//alert("back="+response);
	if(returnId!=""){
       document.getElementById(returnId).innerHTML =response;
	}
 
  }
}
/**/

