function startRequest()
{
  tfURLText = document.getElementById('tfURL').value;
  var btnSprawdz = document.getElementById('btnSprawdz');
  btnSprawdz.disabled = true;

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

  div = document.getElementById('dataDiv');
  div.innerHTML = "...";

  startGETRequest(url, onComplete, onEnd);
}

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

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