function ExecuteScript(url, destination, complete)
//url - adres wykonywanego skryptu;
//destination - div na którym operuję
//complete - co wyświetlić już po
{
  if(window.XMLHttpRequest)
    xmlhttp=new XMLHttpRequest();
  else
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

  xmlhttp.onreadystatechange=function()
  {
    if(xmlhttp.readyState=="4")
    {
      if (window.XMLHttpRequest)
        xmlhttpComplete=new XMLHttpRequest();
      else
        xmlhttpComplete=new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttpComplete.open("GET",complete,false);
      xmlhttpComplete.send();
      document.getElementById(destination).innerHTML=xmlhttpComplete.responseText;;
    }
    else
    {
      if (window.XMLHttpRequest)
        xmlhttpWaiting=new XMLHttpRequest();
      else
        xmlhttpWaiting=new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttpWaiting.open("GET","/ladowanie.php",false);
      xmlhttpWaiting.send();
      document.getElementById(destination).innerHTML=xmlhttpWaiting.responseText;;
    }
  }
  xmlhttp.open("GET",url,true);
  xmlhttp.send();
}
