var reqasync=null;

function ahah_async(url) {
    document.body.style.cursor='wait';
	if(reqasync==null || reqasync.readyState==4){
    	if (window.XMLHttpRequest) {
        	reqasync = new XMLHttpRequest();
      	} 
      	else if (window.ActiveXObject) {
//			reqasync = new ActiveXObject("MSXML2.XMLHTTP.4.0");
			reqasync = new ActiveXObject("Microsoft.XMLHTTP");
      	}
    	if (reqasync != undefined) {
			try{
		    	reqasync.onreadystatechange=async_done_getlist;
			    reqasync.open("GET", url, true);
			    reqasync.send("null");
			    
			}
			catch(error){
    	    	reqasync.abort();
			}
    	}
  	}
	
}

function async_done_getlist(){
    if(reqasync && reqasync.readyState==4){
		if(reqasync.status==200){
	        document.body.style.cursor='default';				
			var result=reqasync.responseText;
			if (document.getElementById('information_box')){
				document.getElementById('information_box').innerHTML=result;
			}
			//result-al azt csinálsz amit akarsz, ebben van a php scriptkimenete
		    reqasync=null;
		}
    }
}

