// ======================================================================= UPDATE RATING SCORE
function highlight(highlighted,rating,count) {			
    var i = 0;
	var ratingScore = count - 1;
	var hiddenScore = document.getElementById(rating);
	
	while(i < count) 	{
		document.getElementById(highlighted + i).src = "/en/recipes/lib/img/recipes/rating-commenting-lightbox/star-on.gif";
		i++;
    }
	i = count;
	while (i < 5) {
        document.getElementById(highlighted + i).src = "/en/recipes/lib/img/recipes/rating-commenting-lightbox/star-off.gif";
        i++;
	}
	hiddenScore.value = ratingScore;
}
// ======================================================================= Validate Rating Form
function validateRating(CurrentForm){
	 if (CurrentForm.hdScore.value == '') {
	  	alert("Please select the number of stars you'd like to rate this recipe.");
		return false;
	 }
	 if (CurrentForm.terms.checked == false) {
	  	alert("You must agree to the Legal Info and Privacy Policy.");
		return false;
	 }
return true;	
}