/**
 * @package WPR-star-rating
 * @access public
 * @author wpreviewpro.com
 * @since 07-17-09
 */
//when over on
function star_overon(num, fornum) {
	var num = num.id.replace(fornum + "_", '');
	for (i = 1; i <6; i++ ){		
		if(i>num){
			document.getElementById(fornum + "_" + i).className = "";
		}else{
			document.getElementById(fornum + "_" + i).className = "on";
		}
	}
}
//when over off
function star_overoff(fornum) {
	var getvalue = document.getElementById(fornum + "_rating").value;
	for (i = 1; i <6; i++) {
		if(i>getvalue){
			document.getElementById(fornum + "_" + i).className = "";
		}else{
			document.getElementById(fornum + "_" + i).className = "on";
		}
	}
}
//when click on
function star_on(onjec, fornum){
	var num = onjec.id.replace(fornum + "_", '');
	star_overoff(fornum);
	document.getElementById(fornum + "_rating").value = num;	
}