// JavaScript Document for AJAX

function idcheck(str)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
  xmlDoc=xmlhttp.responseXML;
  document.getElementById("idcheck").innerHTML=xmlhttp.responseText;
  }
}
xmlhttp.open("GET","ajax.php?action=idcheck"+"&id="+str,true);
xmlhttp.send(null);
}

function idcheck2(str)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
  xmlDoc=xmlhttp.responseXML;
  document.getElementById("idcheck2").innerHTML=xmlhttp.responseText;
  }
}
xmlhttp.open("GET","ajax.php?action=idcheck"+"&id="+str,true);
xmlhttp.send(null);
}

function emailcheck(str)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
  xmlDoc=xmlhttp.responseXML;
  document.getElementById("emailcheck").innerHTML=xmlhttp.responseText;
  }
}
xmlhttp.open("GET","ajax.php?action=emailcheck"+"&id="+str,true);
xmlhttp.send(null);
}