function makeRequest(url,div) {

document.getElementById(div).style.display='inline';
//document.getElementById(div).innerHTML='<p class=details>Az adatok töltődnek, kérjük várjon...</p>';

 var http_request = false;
  if (window.XMLHttpRequest) { // Mozilla, Safari,...
   http_request = new XMLHttpRequest();
   if (http_request.overrideMimeType) {
    http_request.overrideMimeType('text/xml');
      // See note below about this line
   }
  } else if (window.ActiveXObject) { // IE
   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 false;
   }
    http_request.onreadystatechange = function() { displayContents(http_request,div,url); };
    http_request.open('GET', url, true);
    http_request.send(null);
}

function displayContents(http_request,div,url) {
	if (http_request.readyState == 4) {
		if (http_request.status == 200) {
			//document.write(http_request.responseText);
			document.getElementById(div).innerHTML=http_request.responseText;
            jsInclude('http://connect.facebook.net/hu_HU/all.js#xfbml=1', 'fblike_cell');

            if (document.getElementById('addthis_cell')) {
                if (window.addthis) {
                    window.addthis = null;
                    window._ate = null;
                }
                jsInclude('http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4cd0481012d3bb5d', 'addthis_cell');
                jQuery.getScript("http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4cd0481012d3bb5d&async=1", function(){
                    addthis.init();
                });
            }

			//alert(http_request.responseText);
		}
		else {
			//alert('Valami gond van a kéréssel.');
			document.getElementById(div).innerHTML='<br>error.<br> status:'+http_request.status+': '+url;
		}
	}
}


function changeVisibility(div){
		if (document.getElementById(div).style.visibility=='visible'){
				document.getElementById(div).style.visibility='hidden';
				document.getElementById(div).style.display='none';
		}
		else {
				document.getElementById(div).style.visibility='visible';
				document.getElementById(div).style.display='inline';
		}
}

//var noteArray = new Array();
function jsInclude(url, id) {
 
    var cell = document.getElementById(id);
    if (cell) {
        var js = document.createElement('script');
        js.setAttribute('language', 'javascript');
        js.setAttribute('type', 'text/javascript');
        js.setAttribute('src', url);
        cell.appendChild(js);
    }

}











