/* 创建一个新的XMLHttpRequest */
//alert("sdfdsfds");
var xmlHttp = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}

@end @*/
/*

//针对不同的浏览器建立XMLHttpRequest对像 
if(window.XMLHttpRequest){ 
//针对非IE7.0以下的多款浏览器 
xmlhttp=new XMLHttpRequest(); 
//此if语句主要针对部分版本的Mozillar浏览器的xml bug 
if(xmlhttp.overrideMimetype){ 
xmlHttp.overrideMimeType("text/xml"); 
} 
} 
else if(window.ActiveXObject){ 
//针对IE6.0及以下的IE浏览器 
var MSXML=['MSXML2.XMLHTTP.6.0','MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP']; 
//for语句检测与MSXML列表对应的系统MSXML版本 
for(var n = 0; n < MSXML.length; n ++){ 
try{//如果找到则创建该对象 
xmlhttp = new ActiveXObject(MSXML[n]); 
break; 
}catch(e){} 
} 
} 
*/


if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}

//调用ajax
function callServer(url) {
  // Open a connection to the server
  xmlHttp.open("GET", url, true);
  // Setup a function for the server to run when it's done
  xmlHttp.onreadystatechange = serverResponse;
  // Send the request
  xmlHttp.send(null);
}

function callMobileServer(url) {
  // Open a connection to the server
  xmlHttp.open("GET", url, true);
  // Setup a function for the server to run when it's done
  xmlHttp.onreadystatechange = serverMobileResponse;
  // Send the request
  xmlHttp.send(null);
}
//检查提交的验证码以及用户密码是否正确，手机是否已在使用
function callSumbitServer(url) {
  // Open a connection to the server
  xmlHttp.open("GET", url, true);
  // Setup a function for the server to run when it's done
  xmlHttp.onreadystatechange = serverSumbitResponse;
  // Send the request
  xmlHttp.send(null);
}