function startRequest()
{
  var tfDomain = document.getElementById('tfDomain');
  tfDomainText = tfDomain.value;
  tfDomain.disabled = true;

  var btnSprawdz = document.getElementById('btnSprawdz');
  btnSprawdz.disabled = true;
  
  url = "http://localhost/dane.php?domain=" + tfDomainText;
  url = encodeURI(url);
  startGETRequest(url, onComplete, onEnd);
}

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

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