function smartRollover() {
	if(document.getElementsByTagName) {
		var image = ["img","input"];
		for(var i=0; i < image.length; i++) {
			var images = document.getElementsByTagName(image[i]);
			for(var j=0; j < images.length; j++) {
				if(images[j].src.match("_of.")) {
					images[j].onmouseover = function() {
						this.setAttribute("src", this.src.replace("_of.", "_on."));
					}
					images[j].onmouseout = function() {
						if(this.className != "none"){
							this.setAttribute("src", this.src.replace("_on.", "_of."));
						}
					}
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
} else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
} else {
	window.onload = smartRollover;
}
