//サブメニューの表示を動作させる個数は以下の7という数字
//for (i=1; i<=5; i++) {
//ここを変更することにより増減できる
//サブメニューの表示を動作する個数を変えたときは上記の部分を変更

//forSubMenu

function SubMenu(n) {
	d = document;
	ID = "SubMenu" + n;
	SG = "SMBG" + n;
	BG = "BgBtn" + n;
	PL = "Pls" + n;
	d.getElementById(ID).style.display = 'block';
	d.getElementById('forSubMenu').style.display = 'inline';
	d.getElementById(SG).style.display = 'block';
	d.getElementById(BG).width = 210;
	d.getElementById(BG).height = 24;
	if(document.body.clientWidth)d.getElementById('HideBtn').width = document.body.clientWidth - 20;
	else d.getElementById('HideBtn').width = innerWidth - 20;
//	d.getElementById('HideBtn').height = document.body.clientWidth - 70;
	d.getElementById('HideBtn').height = 600;
	d.getElementById(PL).style.backgroundColor = '#5b7fa9';
//	d.getElementById(PL).style.backgroundImage = 'url("/common_img/mw.gif")';
}

function Hide(n) {
	d = document;
	for (i=1; i<=5; i++) {
		ID = "SubMenu0" + i;
		SG = "SMBG0" + i;
		BG = "BgBtn0" + i;
		PL = "Pls0" + i;
		if(d.getElementById(ID).style.display) {
			d.getElementById(ID).style.display = 'none';
			d.getElementById(SG).style.display = 'none';
			d.getElementById(BG).width = 1;
			d.getElementById(BG).height = 1;
			d.getElementById(PL).style.backgroundColor = '#355E8C';
//			d.getElementById(PL).style.backgroundImage = 'url("/common_img/m01p.gif")';
		}
	}
	if (n != '') {
		PLN = "Pls" + n;
		d.getElementById(PLN).style.backgroundColor = '#133c6a';
	}
	d.getElementById('HideBtn').width = 1;
	d.getElementById('HideBtn').height = 1;
	d.getElementById('forSubMenu').style.display = 'none';
}

function WOpen(URL) {
	window.open(URL,'_blank','toolbar=0,location=0,directiories=0,scrollbars=1,resizable=1,width=670,height=600,status=0,menubar=0');
}

function change(num) {
	document.getElementById("img" + num).src = "/top/img/top_" + num + ".gif";
}

function change_hover(num) {
	document.getElementById("img" + num).src = "/top/img/top_" + num + "hover.gif";
}



