function onComplete(text, xml)
{
  arr = text.split("\n");
  if(arr.length == 2){
    if(arr[0] != "error"){
      imgEl = document.getElementById("advImg");
      linkEl = document.getElementById("advLink");
      imgEl.src = arr[0];
      linkEl.href = arr[1];
    }
  }
}
