disableButtons = false;

function changeButtonsState(id)
{
  var radio1 = document.getElementById('radio1');
  var radio2 = document.getElementById('radio2');
  var radio3 = document.getElementById('radio3');

  switch(id){
    case 1 : radio1.checked = true;break;
    case 2 : radio2.checked = true;break;
    case 3 : radio3.checked = true;break;
    default : return;
  }
}

function loadArticle(id)
{
  if(disableButtons) return;
  switch(id){
    case 1 : url = "http://localhost/art1.html";break;
    case 2 : url = "http://localhost/art2.html";break;
    case 3 : url = "http://localhost/art3.html";break;
    default : return;
  }

  changeButtonsState(id);

  disableButtons = true;
  startGETRequest(url, onComplete, onEnd);
}

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

function onEnd(text, xml)
{
  disableButtons = false;
}