// メニューの部分の画像を読み込む
var ButtonImageA = new Array();
ButtonImageA[1] = new Image();
ButtonImageA[1].src = "./img/home/b11.gif";
ButtonImageA[2] = new Image();
ButtonImageA[2].src = "./img/home/b1.gif";
ButtonImageA[3] = new Image();
ButtonImageA[3].src = "./img/home/b22.gif";
ButtonImageA[4] = new Image();
ButtonImageA[4].src = "./img/home/b2.gif";
ButtonImageA[5] = new Image();
ButtonImageA[5].src = "./img/home/b33.gif";
ButtonImageA[6] = new Image();
ButtonImageA[6].src = "./img/home/b3.gif";
ButtonImageA[7] = new Image();
ButtonImageA[7].src = "./img/home/b44.gif";
ButtonImageA[8] = new Image();
ButtonImageA[8].src = "./img/home/b4.gif";
ButtonImageA[9] = new Image();
ButtonImageA[9].src = "./img/home/b55.gif";
ButtonImageA[10] = new Image();
ButtonImageA[10].src = "./img/home/b5.gif";
ButtonImageA[11] = new Image();
ButtonImageA[11].src = "./img/home/b66.gif";
ButtonImageA[12] = new Image();
ButtonImageA[12].src = "./img/home/b6.gif";
ButtonImageA[13] = new Image();
ButtonImageA[13].src = "./img/home/b77.gif";
ButtonImageA[14] = new Image();
ButtonImageA[14].src = "./img/home/b7.gif";
ButtonImageA[15] = new Image();
ButtonImageA[15].src = "./img/home/b88.gif";
ButtonImageA[16] = new Image();
ButtonImageA[16].src = "./img/home/b8.gif";
ButtonImageA[21] = new Image();
ButtonImageA[21].src = "./img/home/b99.gif";
ButtonImageA[22] = new Image();
ButtonImageA[22].src = "./img/home/b9.gif";

ButtonImageA[17] = new Image();
ButtonImageA[17].src = "./img/live/shousai22.gif";
ButtonImageA[18] = new Image();
ButtonImageA[18].src = "./img/live/shousai11.gif";

ButtonImageA[19] = new Image();
ButtonImageA[19].src = "../../img/common/back2.gif";
ButtonImageA[20] = new Image();
ButtonImageA[20].src = "../../img/common/back1.gif";

//メニュー部分の画像を書き換える
function SetImgA(imageID, ImgNum)  {
	document.images[imageID].src = ButtonImageA[ImgNum].src ;
}

//PPポップアップ
function Window(url_name) {
	window.open(url_name,"_blank","TOOLBAR=0,SCROLLBARS=1,RESIZABLE=yes,HEIGHT=600,WIDTH=680");
}

//会社概観ポップアップ
function Window2(url_name) {
	window.open(url_name,"_blank","TOOLBAR=0,SCROLLBARS=0,RESIZABLE=yes,HEIGHT=640,WIDTH=700");
}

//メンテナンスポップアップ
function W01(url_name) {
	window.open(url_name,"information","TOOLBAR=0,HEIGHT=320,WIDTH=380");
}

//汎用ポップアップ
function WindowCommon(url_name,wwidth,wheight) {
	param = '"TOOLBAR=0,SCROLLBARS=1,RESIZABLE=yes,' + 'WIDTH=' + wwidth + ',HEIGHT=' + wheight + '"';
	window.open(url_name,"_blank",param);
}



//ロールオーバー
function smartRollover() {
	if(document.getElementsByTagName) {

		var chacheImage = new Array();
		var ci = 0;

		function imageSet( img ){
			if(img.getAttribute("src").match("_off."))
			{
				img.onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				img.onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}

				//キャッシュする
				chacheImage[ ci ] = new Image();
				chacheImage[ ci ].src = img.getAttribute("src").replace("_off.", "_on.");
				ci++;
			}
		}


		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) 
			imageSet( images[i] );


		var inputs = document.getElementsByTagName("input");

		for( var i=0; i<inputs.length; i++ ){
			if( inputs[i].type == "image" )
				imageSet( inputs[i] );
		}


	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
} else {
	window.onload = smartRollover;
}





