
function ajax2(inp,pp) {
 c=document.getElementById("modsel").value;
 htp=pp+ '&modok=' + c
 ajax(inp,htp);
}


function ajax3(inp,pp) {
 c = document.getElementById("ujtag").value;
 htp = pp + '&ujtag=' + c
 ajax(inp,htp);
}

function ajax4(inp,pp,id) {
 c = document.getElementById(id).value;
 htp = pp + '&' + id + '=' + c
 ajax(inp,htp);
}

function ajax(inp,pp) {
 var http_request=false;
 if (window.XMLHttpRequest) {
  http_request=new XMLHttpRequest();
  if (http_request.overrideMimeType) {
   http_request.overrideMimeType('text/html');
  }
 }
 else if (window.ActiveXObject) {
  try {
   http_request=new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch (e) {
   try {
    http_request=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch (e) {}
  }
 }

 if (!http_request) {
  alert("Feladtam :( Nem tudok XMLHTTP példányt létrehozni");
  return true;
 }
 http_request.onreadystatechange=function () { showContents(http_request,inp); };
 htp=pp+ '&' + Math.random();
 http_request.open("GET",htp,true);
 http_request.send(null);
 return false;
}

function showContents(http_request,inp) {
 if (http_request.readyState==4) {
  if (http_request.status==200) {
     if (http_request.responseText!='nope')
          document.getElementById(inp).innerHTML=http_request.responseText;
  }
  else {
   alert("Valami gond van a kéréssel. ("+http_request.status+")");
  }
 }
}

