/*====================================================================================================
//////////////////////////////////////////////////////////////////////////////////////////////////////
 画像のロールオーバーをするためのスクリプト
//////////////////////////////////////////////////////////////////////////////////////////////////////
====================================================================================================*/
var Rollover = {
	
	main : function() {
		var img = document.images;
		for (var i = 0; i <img.length; i++) {
			if ((img[i].src.match(/_n\./))||(img[i].style.filter)){
				img[i].onmouseover = Rollover.over;
				img[i].onmouseout  = Rollover.out;
			}
		}
	},

	over : function() {
		if((this.style.filter)&&(this.style.filter.match(/_n\.gif/))){//(IE5.5-6 && gif)
			this.style.filter = this.style.filter.replace('_n.gif', '_r.gif');
		}
		else{
			this.src = this.src.replace('_n.', '_r.');
		}
	},

	out : function(){
		if((this.style.filter)&&(this.style.filter.match(/_r\.gif/))){//(IE5.5-6 && gif)
			this.style.filter = this.style.filter.replace('_r.gif', '_n.gif');
		}
		else{
			this.src = this.src.replace('_r.', '_n.');
		}
	},

	addEvent : function(){
		try {
			window.addEventListener('load', Rollover.main, false);
		} catch (e) {
			window.attachEvent('onload', Rollover.main);
		}
	}
}

Rollover.addEvent();
