disableButtons = false;

function wyslijDane(id)
{
  url = "http://localhost/dane.php?id=" + id;
  url = encodeURI(url);

  disableButtons = true;
  startGETRequest(url, onComplete, onEnd);
}

function onComplete(text, xml)
{
  var dataDiv = document.getElementById("dataDiv");
  dataDiv.innerHTML = text;
}

function onEnd()
{
  disableButtons = false;
}