function startRequest()
{
  tfDoText = document.getElementById('tfDo').value;
  tfTematText = document.getElementById('tfTemat').value;
  taTrescText = document.getElementById('taTresc').value;

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

  url = "http://localhost/mail.php?do=" + tfDoText;
  url += "&temat=" + tfTematText;
  url += "&tresc=" + taTrescText;
  url=encodeURI(url);

  startGETRequest(url, onComplete, onEnd);
}

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

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