var lockAjax = new Array();


function ajaxuj(ident)
{
  if(lockAjax.indexOf(ident) != -1)
    return;

  lockAjax.push(ident);

  if (window.XMLHttpRequest)
  {
  	xhttp=new XMLHttpRequest();
  }
   else // Internet Explorer 5/6
  {
  	xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  
  xhttp.open("GET","hodnoceni_rpc.php?id="+ident,true);
  xhttp.send(null);
  
  xhttp.onreadystatechange = function () 
    {
        prislaOdpoved(xhttp); 
    }
}
  
  
function prislaOdpoved(xhttp)
{
  if (xhttp.readyState == 4)
  {
  	xmlDoc=xhttp.responseXML;
	ident = xmlDoc.getElementsByTagName("hodnoceni")[0].getAttribute('id');
  	hodnota = xmlDoc.getElementsByTagName("hodnoceni")[0].firstChild.nodeValue;
  	document.getElementById("hod_" + ident).innerHTML=hodnota;
	
	document.getElementById("srd_" + ident).style.color="white";
    delete lockAjax[lockAjax.indexOf(ident)];
  }
 
}









