// <div id="str1" class="norm"><a href="#" id="star1" class="norm" onclick="set_vote(1);" onmouseover="swap_stars(1);" onmouseout="clr_stars(1);">
						
					
						
						
						
						
function swap_stars(star){
	for(i=5;i<6;i--){
		var elem = 'star'+i; if (i==0) break;
		if(i>star){
			var curEl = document.getElementById(elem);
			curEl.setAttribute("class", "nostar");
			curEl.setAttribute("className", "nostar"); 
		}else{
			var curEl = document.getElementById(elem);
			curEl.setAttribute("class", "act");
			curEl.setAttribute("className", "act"); 
		}
	}
	return;
}

function clr_stars(star){
	for(i=5;i<6;i--){
		var elem = 'star'+i; 
		if (i==0) break;
			var curEl = document.getElementById(elem);
			curEl.setAttribute("class", "norm");
			curEl.setAttribute("className", "norm"); 
	}
	return;
}


function set_vote(star){
	for(i=5;i<6;i--){
		var elem = 'str'+i;
		if (i==0) break;
		if(i>star){
			var curEl = document.getElementById(elem);
			curEl.setAttribute("class", "norm");
			curEl.setAttribute("className", "norm"); 
		}else{
			var curEl = document.getElementById(elem);
			curEl.setAttribute("class", "act");
			curEl.setAttribute("className", "act"); 
		}
	}
	var hiddenField = document.getElementById('jsrating');
	hiddenField.value = star;
return;
}

function showStars(star){
	document.write('<div id="stars">');
	document.write('<div id="str1" class="norm"><a href="#" id="star1" class="norm" onclick="set_vote(1); return false;" onmouseover="swap_stars(1);" onmouseout="clr_stars(1);"><span class="alttext">1 star</span></a></div>');
	document.write('<div id="str2" class="norm"><a href="#" id="star2" class="norm" onclick="set_vote(2); return false;" onmouseover="swap_stars(2);" onmouseout="clr_stars(2);"><span class="alttext">2 stars</span></a></div>');
	document.write('<div id="str3" class="norm"><a href="#" id="star3" class="norm" onclick="set_vote(3); return false;" onmouseover="swap_stars(3);" onmouseout="clr_stars(3);"><span class="alttext">3 stars</span></a></div>');
	document.write('<div id="str4" class="norm"><a href="#" id="star4" class="norm" onclick="set_vote(4); return false;" onmouseover="swap_stars(4);" onmouseout="clr_stars(4);"><span class="alttext">4 stars</span></a></div>');
	document.write('<div id="str5" class="norm"><a href="#" id="star5" class="norm" onclick="set_vote(5); return false;" onmouseover="swap_stars(5);" onmouseout="clr_stars(5);"><span class="alttext">5 stars</span></a></div>');
	document.write('</div>');
	if (typeof star=="undefined") star=0;
	if (star!=0) set_vote(star);
}						