var timeout = 5;

function startRequest(param)
{
  id = (new Date()).getTime();
  url = "http://localhost/adv.php?id" + id;
  startGETRequest(url, onComplete, onEnd);
}

function onEnd()
{
}

function onComplete(text, xml)
{
  var advBox = document.getElementById("advBox");
  advBox.innerHTML = text;
  setTimeout("startRequest()", timeout * 1000);
}