var xmlHttp
function checkAvailability()
{
	document.getElementById('un_avail').innerHTML="<img src='images/loading.gif' align='absbottom'> Checking Availability";
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	}
	var un=document.frmSignUp.username.value;
	if(un!="")
	{
		var url="includes/modules/checkavailability.php";
		url=url+"?un="+un;
		xmlHttp.onreadystatechange=show;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	else
	{
		document.getElementById("un_avail").innerHTML="";
	}
}
function show()
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("un_avail").innerHTML=xmlHttp.responseText;
	}
}
