/* 最后更新 2010-04-15 by 56770.Kingdge
'* Copyright www.56770.com */  

var xmlHttp = false;
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}

function Check_user_id() {
  var user_id = document.getElementById("user_id").value;
  if ((user_id == null) || (user_id == "")) return;
  var url = "Ajax_reg.asp?do=user_id&user_id=" + escape(user_id);
//  location.href= url;
//  return false;
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_id_page;
  xmlHttp.send(null);  
}

function Check_user_id_page() {
  if (xmlHttp.readyState < 4) {
	C_user_id.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_id.innerHTML=response;
  }
}

function Check_user_ps1() {
  var ps1 = document.getElementById("ps1").value;
  if ((ps1 == null) || (ps1 == "")) return;
  var url = "Ajax_reg.asp?do=ps1&ps1=" + escape(ps1);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_ps1_page;
  xmlHttp.send(null);  
}

function Check_user_ps1_page() {
  if (xmlHttp.readyState < 4) {
	C_user_ps1.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_ps1.innerHTML=response;
  }
}

function Check_user_pass() {
  var ps1 = document.getElementById("ps1").value;
  var ps2 = document.getElementById("ps2").value;
  if ((ps2 == null) || (ps2 == "")) return;
  var url = "Ajax_reg.asp?do=pass&ps1=" + escape(ps1) +"&ps2=" + escape(ps2);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_pass_page;
  xmlHttp.send(null);  
}

function Check_user_pass_page() {
  if (xmlHttp.readyState < 4) {
	C_user_ps2.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_ps2.innerHTML=response;
  }
}

function Check_user_name() {
  var user_name = document.getElementById("user_name").value;
  if ((user_name == null) || (user_name == "")) return;
  var url = "Ajax_reg.asp?do=user_name&user_name=" + escape(user_name);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_name_page;
  xmlHttp.send(null);  
}

function Check_user_name_page() {
  if (xmlHttp.readyState < 4) {
	C_user_name.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_name.innerHTML=response;
  }
}

function Check_user_mail() {
  var user_mail = document.getElementById("user_mail").value;
  if ((user_mail == null) || (user_mail == "")) return;
  var url = "Ajax_reg.asp?do=user_mail&user_mail=" + escape(user_mail);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_mail_page;
  xmlHttp.send(null);  
}

function Check_user_mail_page() {
  if (xmlHttp.readyState < 4) {
	C_user_mail.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_mail.innerHTML=response;
  }
}

function Check_user_tel() {
  var user_tel = document.getElementById("user_tel").value;
  if ((user_tel == null) || (user_tel == "")) return;
  var url = "Ajax_reg.asp?do=user_tel&user_tel=" + escape(user_tel);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_tel_page;
  xmlHttp.send(null);  
}

function Check_user_tel_page() {
  if (xmlHttp.readyState < 4) {
	C_user_tel.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_tel.innerHTML=response;
  }
}

function Check_user_postalcode() {
  var user_postalcode = document.getElementById("user_postalcode").value;
  if ((user_postalcode == null) || (user_postalcode == "")) return;
  var url = "Ajax_reg.asp?do=user_postalcode&user_postalcode=" + escape(user_postalcode);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_postalcode_page;
  xmlHttp.send(null);  
}

function Check_user_postalcode_page() {
  if (xmlHttp.readyState < 4) {
	C_user_postalcode.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_postalcode.innerHTML=response;
  }
}

function Check_user_adds() {
  var user_adds = document.getElementById("user_adds").value;
  if ((user_adds == null) || (user_adds == "")) return;
  var url = "Ajax_reg.asp?do=user_adds&user_adds=" + escape(user_adds);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_user_adds_page;
  xmlHttp.send(null);  
}

function Check_user_adds_page() {
  if (xmlHttp.readyState < 4) {
	C_user_adds.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_adds.innerHTML=response;
  }
}
/******** 验证码 2008-5-14 *****************/
function Check_verifycode() {
  var verifycode = document.getElementById("verifycode").value;
  if ((verifycode == null) || (verifycode == "")) return;
  var url = "Ajax_reg.asp?do=ck_verifycode&ck_verifycode=" + escape(verifycode);
  xmlHttp.open("GET", url+"&t="+Math.random(), true);
  xmlHttp.onreadystatechange = Check_verifycode_page;
  xmlHttp.send(null);  
}

function Check_verifycode_page() {
  if (xmlHttp.readyState < 4) {
	C_user_vcode.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
	C_user_vcode.innerHTML=response;
  }
}