But see, there is a problem with yours, right off the bat:
function vote(rating, categoryId)
votesDone[categoryId-1] = rating;
// Draw the stars
for(var i = 0; i<rating; i++) setFullStar(categoryId, i);
Say the user clicks on a rating of 5.
Then say the user changes his/her mind and gives a rating of 3.
The first time he/she votes, you will set all 5 stars to "full".
The second time, you will set 3 of the stars to "full" (redundantly) but you won't change the other two stars, so it will *STILL* show a rating of 5 stars!
The code is just fundamentally flawed. It needs a full re-write, anyway.