var astar = new Array();
var pointover = '';
var pointnear = '';
var ratepoints = '';
var stutter;

function rateIt(){
var ratebox = $("ratebox");
var r_id = ratebox.getA('r');
var f = ratebox.getA('f');
var fi = ratebox.firstChild.innerHTML;
if(fi.isNumeric()){ f = fi;ratebox.firstChild.innerHTML = ratebox.getA('prw') + fi;ratebox.setA('prw','');}
factor = (f/5);


var curr = crtDiv('currate','currate');
ratebox.append(curr);
curr.style.width = ((getSizeImg(uTu + 'icons/star_rating.png')[0] * 5) * factor) + 'px';
if(ratebox.getA('prw') != ""){oEvent.Add(curr,"mouseover",function(){this.style.display = 'none';});



for(var y=1;y<6;y++){
astar[y] = crtDiv('rate' + y,'starrate');


if(ratebox.getA('prw') != "") {
astar[y].nr = y;
oEvent.Add(astar[y],"mouseover",function(){$('currate').style.display = 'none';Star(this.nr,'on');});
oEvent.Add(astar[y],"mouseout",function(){$('currate').style.display = 'block';Star(this.nr,'off');});

oEvent.Add(ratebox,"mousedown",function(){
	if(stutter == 'on'){
	rateIt.nF("jkj");
	fireReq("ratebox||jkj", uUu + 'rate' + uLu +'/r/l/' + r_id + '/' + ratepoints);stutter = 'off';
	}
	});
}
ratebox.append(astar[y]);
}
}
}

function Star(nr,button){
if (stutter != button){
for(var z=nr;z>0;z--){
	
if(button == 'on'){ $("rate" + z).style.backgroundPosition = 'center center';}
else $("rate" + z).style.backgroundPosition = 'center top';
}
stutter = button;
}
ratepoints = nr;
}




rateIt.startup();