
var xmlHttp;

function ajax_hint(q) {

    // ha 2-nel rovidebb a kereso string, akkor nem keres
    if (q.length < 2) {
	document.getElementById("hint").innerHTML = '';
	return;
    }

    xmlHttp=GetXmlHttpObject();
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4) {
	document.getElementById("hint").innerHTML= xmlHttp.responseText;
      }
      }
    q = encodeURIComponent(q);
    xmlHttp.open("GET","ajax.php?q="+q ,true);
    xmlHttp.send(null);
}

