//var xmlhttp = false;
//try{
//	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
//	//alert("Internet Explorer");
//	
//}catch(e){
//	try{
//		xmlhttp = new ActivXObject("Microsoft.XMLHTTP");
//		//alert("Internet Explorer");
//	}catch(E){
//		xmlhttp = false;
//	}
//}
//
//if(!xmlhttp && typeof XMLHttpRequest != 'undefined'){
//	xmlhttp = new XMLHttpRequest();
//	//alert("Nu se foloseste IE");
//}
//
//function makeRequest(id){
//	var obj = document.getElementById(id);
//	serverPage = "get.php?id=" + id;
//	xmlhttp.open("GET",serverPage);
//	xmlhttp.onreadystatechange = function(){
//		if(xmlhttp.readyState == 4 && xmlhttp.status == 400){
//			obj.innerHtml = xmlhttp.responseText;
//		}
//	}
//	xmlhttp.send(null);
//}

//function getword (theelement){
//	//If there is nothing in the box, run Ajax to populate it.
//	if (document.getElementById(theelement).innerHTML.length == 0){
//		serverPage = "get.php";
//		var obj = document.getElementById(theelement);
//		xmlhttp.open("GET", serverPage);
//		xmlhttp.onreadystatechange = function() {
//		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//		obj.innerHTML = xmlhttp.responseText;
//		}
//	}
//	xmlhttp.send(null);
//	} else {
//	//If the box is already populated, clear it.
//	document.getElementById(theelement).innerHTML = "";
//	}
//}

var xmlHttp

function showUser(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="get.php"
url=url+"?q="+str
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")
 { 
 document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
 } 
}

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;
}