//---menu.js
//TOOLBAR
var eOpenMenu = null;

// 最終更新日
function date_mf(){
var d = document.lastModified;
if(document.all){
	document.write("Update:"+d.substring(6,10)+"/"+d.substring(0,2) +"/"+ d.substring(3,5));
}else if(document.getElementById){
	update = new Date(document.lastModified)
	theMonth = update.getMonth() + 1
	theDate = update.getDate()
	theYear = update.getYear()
	if (navigator.appName == "Netscape") {
		theYear = theYear + 1900
	}
	document.writeln("Update:" + theYear + "/" + theMonth + "/" + theDate)
	}
}

function go00(all_no){
         if(all_no>1) {
          	fb.style.backgroundColor = "#EFF1E7";
		fb.style.border = "solid 2 #CDD0B3";
		fb.style.color = "#5E0000";
	}
	if( all_no<10 ) all_no = "0"+ all_no;
	document.all.item("button"+ all_no ).style.display="";
}

// ボタン内容表示
var btn_num = 0;	// 前回表示ボタン番号初期値
function go(no){
if( btn_num > 0 ){
if( btn_num < 10 ) btn_num = "0"+ btn_num;
idName = "button" + btn_num ;
if(document.all){
   document.all(idName).style.display = "none";			//未表示にする
}else if(document.getElementById){
   document.getElementById(idName).style.display = "none";	//未表示にする
}
}
btn_num = no; // 前回表示ボタン番号を保存
/*
//全てを他を非表示にする
for (var i = 1; i <= btns; i++){
if( i<10 ) i = "0"+ i;
idName = "button" + i ;
if(document.all){
   document.all(idName).style.display = "none";	//未表示にする
}else if(document.getElementById){
   document.getElementById(idName).style.display = "none";	//未表示にする
}
}
*/
if( no<10 ) no = "0"+ no;
id_name = "button" + no;
if(document.all || document.getElementById){	//IE4,N6以降
	if(document.all){
		fb.style.backgroundColor = "#EFF1E7";
		fb.style.border = "solid 2 #CDD0B3";
		fb.style.color = "#5E0000";
		obj = document.all(id_name).style;
	}else if(document.getElementById){
		obj = document.getElementById(id_name).style;
	}
	if(obj.display == "block"){
		obj.display = "none";		//未表示にする
	}else if(obj.display == "none"){
		obj.display = "block";		//表示にする
	}
}
}

var btns=0;
function button_down(eButton)
	{
		//for(var i=1; i<btns+1; i++){
		for(var i=1; i<btns+4; i++){
			if( i<10 ) i = "0"+ i;
			document.all.item("button"+ i ).style.display="none";
		}
		eButton.style.borderColor = sDownBorderColor;
	}

function m_select(){
mySelect = document.goForm.goMenu.selectedIndex;
location.href = document.goForm.goMenu.options[mySelect].value;
}

//----_b2

//最初に開かれた時のボタン選択
function on_load()
	{
	fb.style.backgroundColor = "#983636";//#804040
	fb.style.border = "solid 2 #CDD0B3";
	fb.style.color = "#80FFFF";
	}

/*////メニューバー2//////////////////////////////////////////////*/
//onMouseOut
var sOffBackColor = "#EFF1E7"; 
var sOffTextColor = "#5E0000";//menutext
var sOffBorderColor = "#CCCCCC";
var sOffPadding = "ridge 1px 1px 1px 1px";

//onMouseOver
var sOverBackColor = "#983636";//#804040#BB9488lightskyblue#CDC8BA 
var sOverTextColor = "#EDF3CB";//#5E0000#80FFFFmenutext
var sOverBorderColor = "threedhighlight threedshadow threedshadow threedhighlight";
var sOverPadding = "1px 1px 1px 1px";

//onMouseDown	maroon#B34040
var sDownBackColor = "#983636";//#BB9488lightskybluepaleturquoise
var sDownTextColor = "#80FFFF";//menutext
var sDownBorderColor = "threedshadow threedhighlight threedhighlight threedshadow";
var sDownPadding = "1px 1px 1px 1px";
	
var eActiveButton = null;
	
function button_over(eButton)
{
     if (window.event && eButton.contains(window.event.fromElement)) return false;
     eButton.style.backgroundColor = sOverBackColor;
     eButton.style.color = sOverTextColor;
     if (eActiveButton != eButton)
        eButton.style.borderColor = sOverBorderColor;
}

function button_out(eButton)
{
  if (window.event && eButton.contains(window.event.toElement)) return false;
		if (eActiveButton != eButton)
		{
		         eButton.style.backgroundColor = sOffBackColor;
			eButton.style.borderColor = sOffBorderColor;
			eButton.style.color = sOffTextColor;
		}
		else
		{
			eButton.style.backgroundColor = sDownBackColor;
			//eButton.style.backgroundColor = sDownBackColor;
			eButton.style.border = "solid 2 #CDD0B3";
			//eButton.style.borderColor = sDownBorderColor;
			eButton.style.color = sDownTextColor;
		}
	}

function button_up(eButton)
	{
		if (null != eActiveButton && eButton != eActiveButton)
		{
			eActiveButton.style.backgroundColor = sOffBackColor;
			eActiveButton.style.borderColor = sOffBorderColor;
			eActiveButton.style.color = sOffTextColor;
		  	eActiveButton = null; 

			// insert code here for button hiding 
			window.status = window.defaultStatus;
		}

		if (eButton != eActiveButton)  
		{
			eActiveButton = eButton;
			eActiveButton.style.borderColor =sDownBorderColor;
			eActiveButton.style.color = sDownTextColor;
			// insert code here for button showing 
		}

}

