//【ここから】画像ロールオーバー
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		var imagesTmp = new Object();
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").indexOf("_off.")!=-1)
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
				imagesTmp[i] = new Image();
				imagesTmp[i].src = images[i].src.replace("_off.", "_on.");
			}
		}
		var input = document.getElementsByTagName("input");
		var inputTmp = new Object();
		for(var i=0; i < input.length; i++) {
			if(input[i].getAttribute("src") && input[i].getAttribute("src").indexOf("_off.")!=-1)
			{
				input[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				input[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
				inputTmp[i] = new Image();
				inputTmp[i].src = input[i].src.replace("_off.", "_on.");
			}
		}
	}
}
//【ここまで】画像ロールオーバー




//【ここから】イベントリスナーへ登録
if (window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
} else if (window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
//【ここまで】イベントリスナーへ登録