function startRequest()
{
  tfDirText = document.getElementById('tfDir').value;
  var btnPobierz = document.getElementById('btnPobierz');
  btnPobierz.disabled = true;

  url = "http://localhost/dane.php?dir=" + tfDirText;
  url = encodeURI(url);

  startGETRequest(url, onComplete, onEnd);
}

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

function onEnd()
{
  var btnPobierz = document.getElementById('btnPobierz');
  btnPobierz.disabled = false;
}