function saveDesc(imgName)
{
  tfDescTxt = document.getElementById('tfDesc').value;
  url = "http://localhost/galeria.php?desc=" + tfDescTxt;
  url += "&imgname=" + imgName;
  url = encodeURI(url);
  startGETRequest(url, onSDComplete, onEnd);
}

function onSDComplete(text, xml)
{
  if(text.substr(0, 5) == "error"){
    arr = text.split("\n");
    if(arr.length != 2){
      alert("Nieprawidłowa odpowied serwera.");
    }
    else{
      alert(arr[1]);
    }
  }
}
