
/*function swapimg_on(imgobj) {
	imgobj.src = imgobj.src.replace(/_off\./i, '_on.');
}
function swapimg_out(imgobj) {
	imgobj.src = imgobj.src.replace(/_on\./i, '_off.');
}*/
function setRollOver() {
	var loadedImg = new Array();
	var ovrImgList = document.getElementsByTagName('img');
	for (var i = 0; i < ovrImgList.length; i++) {
		if (ovrImgList[i].className == "rollover") {
			loadedImg[i] = new Image();
			loadedImg[i].src = ovrImgList[i].src.replace(/_off\./i, '_on.');
			if (ovrImgList[i].src.match(/_off\./i)) {
				loadedImg[i] = new Image();
				loadedImg[i].src = ovrImgList[i].src.replace(/_off\./i, '_on.');
				ovrImgList[i].onmouseover = function() { // マウスオーバー
					this.src = this.src.replace(/_off\./i, '_on.');
				}
				ovrImgList[i].onmouseout = function() { // マウスアウト
					this.src = this.src.replace(/_on\./i, '_off.');
				}
				if (navigator.userAgent.indexOf('MSIE') < 0) ovrImgList[i].onmouseup = function() { // クE奪後の充Eーバー解E
					this.src = this.src.replace(/_on\./i, '_off.');
				}
			}
		}
	}
	
/*	$("homeimg").onmouseover = function() { 
		this.src = this.src.replace(/_off\./i, '_on.');
	}
	$("homeimg").onmouseout = function() {
		this.src = this.src.replace(/_on\./i, '_off.');
	}*/

	/*	var loadedImg = new Array();
	if (!document.getElementsByTagName) return false;
	var ovrImgList = document.getElementsByTagName('img');
	for (var i = 0; i < ovrImgList.length; i++) {
		if (ovrImgList[i].src.match(/_off\./i)) {
			loadedImg[i] = new Image();
			loadedImg[i].src = ovrImgList[i].src.replace(/_off\./i, '_on.');
			ovrImgList[i].onmouseover = function() { // マウスオーバー
				this.src = this.src.replace(/_off\./i, '_on.');
			}
			ovrImgList[i].onmouseout = function() { // マウスアウト
				this.src = this.src.replace(/_on\./i, '_off.');
			}
			if (navigator.userAgent.indexOf('MSIE') < 0) ovrImgList[i].onmouseup = function() { // クE奪後の充Eーバー解E
				this.src = this.src.replace(/_on\./i, '_off.');
			}
		}
	}
*/	return true;
}
if (window.addEventListener) window.addEventListener('load', setRollOver, false);
if (window.attachEvent) window.attachEvent('onload', setRollOver);
