function ajaxFunction()
{
xmlHttp=GetXmlHttpObjectnew()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var qrystring = document.getElementById('uname').value;
var url="codes/checkusername.php"
url=url+"?username="+qrystring
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged233 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
// show user working status
document.getElementById("chkuser").innerHTML = 'Please wait..<br><img src="images/bigrotation2.gif" />';
}

function stateChanged233() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("chkuser").innerHTML=xmlHttp.responseText
 //document.getElementById("statusdiv").innerHTML=xmlHttp.responseText
 //this.status.innerHTML=xmlHttp.responseText;
 } 
}

function GetXmlHttpObjectnew()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}