var xmlHttp; 
function createXMLHttpRequest() 
{ 
if (window.ActiveXObject) 
{ 
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
} 
else if (window.XMLHttpRequest) 
{ 
xmlHttp = new XMLHttpRequest; 
} 
}
function checkUser() 
{ 
createXMLHttpRequest(); 
xmlHttp.onreadystatechange = showMessage; 
var url = "xycx.php?uid="+document.getElementById("uid").value; 
xmlHttp.open("GET",url,true); 
xmlHttp.send(null); 
} 
function showMessage()
{
if (xmlHttp.readyState>4){
msg.innerHTML="loading..."	
}
if (xmlHttp.readyState == 4) 
{ 
if (xmlHttp.status == 200) 
{ 
msg.innerHTML = xmlHttp.responseText; 
} 
} 
}
