function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_normal|_focus"))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_normal", "_over"));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_over", "_normal"));
				}				
			}
		}
	}
	
	var fileName = location.pathname.split('/').reverse()[0].replace('.aspx', '').toLowerCase();	// index
	var selectedTabImg = document.getElementById( 'imgTab' + fileName );
	if( selectedTabImg ){		
		selectedTabImg.setAttribute('src', selectedTabImg.getAttribute("src").replace("_normal", "_focus"));
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
// <a><img id='imgTab[ファイル名]'>



