var pngElements = Array(
	'*.PNG'
);

if (typeof(document.documentElement.style.maxHeight) == 'undefined') {
	DD_belatedPNG.fix(pngElements.join(','));
}

//【ここから】画像ロールオーバー
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("_out.")!=-1)
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_out.", "_over."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_over.", "_out."));
				}
				imagesTmp[i] = new Image();
				imagesTmp[i].src = images[i].src.replace("_out.", "_over.");
			}
		}
		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("_out.")!=-1)
			{
				input[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_out.", "_over."));
				}
				input[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_over.", "_out."));
				}
				inputTmp[i] = new Image();
				inputTmp[i].src = input[i].src.replace("_out.", "_over.");
			}
		}
	}
}
//【ここまで】画像ロールオーバー


// 【ここから】ページの高さ調整
var contentsHeight = 0;

function sizeAdjust() {
	if (contentsHeight == 0) {
		contentsHeight = Element.getHeight($("OUTER"));
	}

	var viewHeight = document.viewport.getDimensions().height;
	var htmlHeight = Element.getHeight($$("html")[0]);
	var bodyHeight = Element.getHeight($$("body")[0]);
	var outerHeight = Element.getHeight($("OUTER"));

	if (viewHeight > contentsHeight) {
		$$("html")[0].style.height = viewHeight + "px";
		$$("body")[0].style.height = viewHeight + "px";
		$("OUTER").style.height = viewHeight + "px";
	} else {
		$$("html")[0].style.height = contentsHeight + "px";
		$$("body")[0].style.height = contentsHeight + "px";
		$("OUTER").style.height = contentsHeight + "px";
	}
}
// 【ここまで】ページの高さ調整


//【ここから】製品写真ポップアップ
function itemPhotoPopUp() {
	$$("a.largePhotoLink").each( function(item) {
		item.onclick = function() {
			window.open(this.href, "photo", "width=610,height=680,status=1,locaton=1,resizable=1,menubar=0,scrollbars=1");
			return false;
		}
	} );
}
//【ここまで】製品写真ポップアップ


//【ここから】イベントリスナーへ登録
if (window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
} else if (window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}

Event.observe(window, "load", sizeAdjust, false);
Event.observe(window, "load", itemPhotoPopUp, false);
Event.observe(window, "resize", sizeAdjust, false);
//【ここまで】イベントリスナーへ登録
