function usercheck(username){
	if(username.length == 0){
		document.getElementById("userresult").innerHTML = "";
		return false;
	}
	xmlHttp = getXmlHttp();
	if(xmlHttp == null) return false;
	var url = "commander.php?mode=checkuser&user="+username+"&sid="+Math.random();
	area_id = "userresult";
	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET", encodeURI(encodeURI(url)), true);
	xmlHttp.send(null);
}

function stateChanged(){
	if(xmlHttp.readyState == 4){
		document.getElementById(area_id).innerHTML = xmlHttp.responseText;
	}
}