var Lst;

function CngClass(obj,url){
 // alert(obj.className);
 load(url);
 if (Lst) Lst.className='';
 obj.className='current';
 Lst=obj;
 
}

function ahah(url) {
  document.getElementById("transbox").innerHTML = ' Adatok betöltése...';
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ahahDone(url) {
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById("transbox").innerHTML = req.responseText;
    } else {
      document.getElementById("transbox").innerHTML=" Hiba:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function load(url) {
	ahah(url);
	return false;
}

