var ratingImageDir = 'http://www.gamesforpeople.eu/files/imgs';

function highlightRatingStar(item, value) {
	//	Replaces the star image when selected.
	for(var y=1; y <= value; y++) {
		document.getElementById('image_' + item + '_' + y).src = ratingImageDir + "/star3.gif";
	}
}

function normalRatingStar(item, value) {
	//	Replaces the star image when unselected.
	for(var y=1; y <= value; y++)	{
		document.getElementById('image_' + item + '_' + y).src = ratingImageDir + "/star1.gif";
	}
}
   function setItemRating(item, value, langica) {
      var xmlhttp = (window.XMLHttpRequest ? new XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false));
	    if (!xmlhttp) {
		  return false;
	    }
      xmlhttp.open('GET', '/saverating.php?item=' + item + '&value=' + value + '&lang='+langica, false);
	    xmlhttp.send('');
      document.getElementById('hodnotenie').innerHTML = xmlhttp.responseText;
   }