
var xmlHttp;

function creatXMLHttpRequest() {
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	}
}

function get(str) {
	creatXMLHttpRequest();
	xmlHttp.onreadystatechange = handleStateChange;
	xmlHttp.open("GET","checkuser.asp?user="+str,true);
	xmlHttp.send(null);
	document.getElementById("username").value=document.getElementById("username").value.replace(/[\W]/g,''); 
}
function handleStateChange() {
	if (xmlHttp.readyState == 4) {
		if (xmlHttp.status == 200) {
                 document.getElementById("usercheck").innerHTML=xmlHttp.responseText;  
                 }		
	}
}