function startRequest(param)
{
  var btnGlosuj = document.getElementById("btnGlosuj");
  btnGlosuj.disabled = true;

  var radioGroup = document.forms[0].vote;
  
  for(i = 0; i < radioGroup.length; i++){
    if(radioGroup[i].checked == true){
      url = "http://localhost/vote.php?vote=";
      url += radioGroup[i].value;
      startGETRequest(url, onComplete, onEnd);
      return;
    }
  }
  alert("Proszę zaznaczyć jedną z opcji.");
}

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

function onEnd()
{
}
