if(typeof KAJONA.portal.rating=="undefined"){KAJONA.portal.rating={}}KAJONA.portal.rating.rate=function(c,h,e){KAJONA.portal.tooltip.hide();var b=document.getElementById("kajona_rating_"+c);var d=b.getElementsByTagName("li");for(var f=e;f>=1;f--){b.removeChild(d[f])}var a=KAJONA_WEBPATH+"/xml.php?module=rating&action=saveRating";var g={systemid:c,rating:h};$.post(a,g,function(j,l){var k=j.documentElement.firstChild.nodeValue;d[0].style.width=k/e*100+"%";$("#kajona_rating_rating_"+c).html(k);var i=document.getElementById("kajona_rating_hits_"+c);i.innerHTML=parseInt(i.innerHTML)+1},"xml")};