var xmlhttpPBU;
var idstr;
var PBUB;
function idSouboru(idcko){
idstr=idcko;
document.getElementById("hlaska").innerHTML="";
}

function showPBU()
{
xmlhttpPBU=GetXmlHttpObjectPBU();
if (xmlhttpPBU==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="progress.php";
url=url+"?id="+idstr;
url=url+"&sid="+Math.random();
xmlhttpPBU.onreadystatechange=stateChangedPBU;
xmlhttpPBU.open("GET",url,true);
xmlhttpPBU.send(null);
}

function stateChangedPBU()
{
if (xmlhttpPBU.readyState==4)
{
PBUB=xmlhttpPBU.responseText;
PBUB=PBUB*1.3;
document.getElementById("bar").width=PBUB;
document.getElementById("progress").innerHTML=xmlhttpPBU.responseText+"%";
setTimeout(showPBU,5000);
}
}

function GetXmlHttpObjectPBU()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

