function dodajocene(ocenka, id){
         if (window.XMLHttpRequest)xmlHttp = new XMLHttpRequest();
    else if (window.ActiveXObject)xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    if (xmlHttp == null){alert("Nie udało się zainicjować obiektu xmlHttpRequest!");return;}
    xmlHttp.onreadystatechange = function (){
        if (xmlHttp.readyState == 4 || xmlHttp.status == 200){
			document.getElementById('unit_long'+id).innerHTML = xmlHttp.responseText;
        }
        else alert('Niestety wystąpił błąd!');
    }
	document.getElementById("thanks").innerHTML = '<img src="../images/working.gif" />';
    xmlHttp.open("POST", location.href, true);
    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttp.send('ocena=' + ocenka);
}
