function buttonHovers(img) {
	$$("img").each(function(g) {
		if (g.readAttribute("src").split("_off")[0] == img) {
			var file = g.readAttribute("src").split("_off");
			g.observe("mouseover", function() {
				this.writeAttribute({
					src: file[0] + "_on" + file[1]
				})
			});
			g.observe("mouseout", function() {
				this.writeAttribute({
					src: file[0] + "_off" + file[1]
				})
			});
		}
	});
}

function setButtonHovers() {
	if (browser != "ie6") {
		buttons.each(function(b) {
			buttonHovers(b);
		});
	}
}