function getModels(x,node_id,sel_name,class_name){
 plik = "http://"+location.host+"/scripts/common/get_news_models.php?q="+x;
 el = document.getElementById(node_id);
 xml = null;
 
 try{ 
   xml = new ActiveXObject("Microsoft.XMLHTTP"); // IE
 }catch(e){
  try {
   xml = new XMLHttpRequest(); // Mozilla/FireFox/Opera
  }catch(e){
   xml = null;
  }
 }
 if(xml != null){
  xml.onreadystatechange = function(){
   if(xml.readyState==4){
	  el.innerHTML = "";
		dis="";
		if(!xml.responseText.length) dis = "disabled=\"1\"";
    el.innerHTML = "<select name=\""+sel_name+"\" "+dis+" class=\""+class_name+"\"><option value=\"-1\">wybierz model</option>"+xml.responseText+"</select>";
   }
  }
  xml.open("GET", plik, true);
  xml.send(null);
 }
 return false;
 }
