/*---------------------------------------------
 カテゴリの表示切替
---------------------------------------------*/
function showImage(hoge){
		document.getElementById('year' + hoge).style.visibility = "visible";
		document.getElementById('icon' + hoge).style.visibility = "visible";
		document.getElementById('thumb' + hoge).src = "images/thumb_img" + hoge + "_on.jpg";
		document.getElementById('year' + hoge).style.visibility = "visible";
		document.getElementById('title' + hoge).className = "title on";
}

function hideImage(hoge){
		document.getElementById('year' + hoge).style.visibility = "hidden";
		document.getElementById('icon' + hoge).style.visibility = "hidden";
		document.getElementById('thumb' + hoge).src = "images/thumb_img" + hoge + "_off.jpg";
		document.getElementById('year' + hoge).style.visibility = "hidden";
		document.getElementById('title' + hoge).className = "title";
}


function changeImage(hoge){
		document.getElementById('photo').src = "../images/" + hoge;
}

/*---------------------------------------------
 イメージロールオーバー
---------------------------------------------*/
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].src.match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.src.replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.src.replace("_on.", "_off."));
				}
			}
		}

		var inputs = document.getElementsByTagName("input");
		for(var i=0; i < inputs.length; i++) {
			if(inputs[i].src.match("_off."))
			{
				inputs[i].onmouseover = function() {
					this.setAttribute("src", this.src.replace("_off.", "_on."));
				}
				inputs[i].onmouseout = function() {
					this.setAttribute("src", this.src.replace("_on.", "_off."));
				}
			}
		}

	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}

