function cautacerereajax(url,functieDupa) {
	var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp)
	alert("No AJAX support here");
else
{
 Modificare=new Date().valueOf();
 xmlhttp.open("GET", url + "&DataModificataPtNou=" + Modificare ,true);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   raspunsAjax=xmlhttp.responseText;
   eval(functieDupa);
  }
 }
 xmlhttp.send(null)
}
}

function search_finish(answer) {
	html_res=answer;
	document.getElementById("cautares").innerHTML=html_res;
}
function cautaloc(locnume, lang) {

              if (lang == 'ro'){
                  document.getElementById("cautares").innerHTML= "se incarca ...";
              } else {  if (lang = 'en') { document.getElementById("cautares").innerHTML= "loading ..."; } else {

              }
              }
		text_res="/search_loc.php?lang="+lang+"&search="+locnume;
		res_s=cautacerereajax(text_res,"search_finish(raspunsAjax)");	
}
