function startRequest()
{
  taTrescText = document.getElementById('taTresc').value;

  var btnWyslij = document.getElementById('btnWyslij');
  btnWyslij.disabled = true;

  url = "http://localhost/mail.php?tresc=" + taTrescText;
  url = encodeURI(url);

  startGETRequest(url, onComplete, onEnd);
}

function onComplete(text, xml)
{
  alert(text);
}

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