var xmlHttp

function showUserlogin(ccc,ddd)
{ 
/*alert(ccc);
alert(ddd);*/
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var url="getuser.php"
url=url+"?ccc="+ccc
url=url+"&ddd="+ddd
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
	 var resText =xmlHttp.responseText;
	 //alert(resText);
		if(parseInt(resText)==4)
		{
		//document.getElementById("txtUsr").innerHTML="No Records Found";
		//document.getElementById("u").innerHTML=resText;
		document.getElementById("tuid").value="";
		document.getElementById("tupass").value="";
		document.getElementById("tuid").focus();
		changeheight();
		document.getElementById("errText").innerHTML = "Invalid Login Information";
		}
 		else
		{
		top.location.replace("add_user.php");
		}
 } 
}

function GetXmlHttpObject()
{
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;
}