function ocena(nazwa, ocena) {
	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('rating').innerHTML = xmlHttp.responseText;
		}
        else alert('Niestety wystąpił błąd!');
    }
	
	document.getElementById('rating').innerHTML = '<div class="loading"></div>';
    xmlHttp.open("GET", 'rating.php?n=' + nazwa + '&o=' + ocena + '&js=1', true);
    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttp.send(null);
}
