gHover = function() {
	var sfEls = document.getElementById("grapes").getElementsByTagName("LABEL");
	for (var i=0; i<sfEls.length; i++) {
	
		sfEls[i].onmouseover=function() {
			var pattern = new RegExp("(na|one|two|three|four|five)\\b");
	  		pattern.test(this.className);
	  		var clsName = RegExp.lastMatch;
			
			this.className+=" " + clsName + "-hover";
		}
		sfEls[i].onmouseout=function() {
			var pattern = new RegExp("(na|one|two|three|four|five)");
	  		pattern.test(this.className);
	  		var clsName = RegExp.lastMatch;
			
			this.className=this.className.replace(new RegExp(" " + clsName + "-hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", gHover);

function grapeSet(name, rating) {
	var spans = document.getElementById(name).getElementsByTagName("span");
	
	spans[spans.length-1].className="score "+rating;
}

