/*

	default.js
	//JavaScriptライブラリ「funny.js」必須。

*/
window.onload = function(){
	menu();
}

/*--------------------------------------------
*	メニューの表示切替
*/
function menu(){
	var $menuBtn = funny.$("#menuBtn");
	var $menuBox = funny.$("#menuBox");
	
	$menuBtn.onclick = function(){
		if( $menuBox.style.display == "none" ){
			$menuBox.style.display = "block";
			$menuBtn.firstChild.style.background = "url(/images/static/faq/bg-menu-icon_on.gif) no-repeat 0 0";
			$menuBtn.firstChild.style.fontWeight = "bold";
		}else{
			$menuBox.style.display = "none";
			$menuBtn.firstChild.style.background = "url(/images/static/faq/bg-menu-icon.gif) no-repeat 0 0";
			$menuBtn.firstChild.style.fontWeight = "normal";
		}
	}
}


/*--------------------------------------------
*	メニューの表示切替（子階層）
*	アコーディオン動作あり（エフェクトなし）
*/
function menu_chiled_toggle(head,toggle){
	var toggleNode = funny.$(toggle);
	var headNode = funny.$(head);
	if(toggleNode.style.display == "none"){
		var getDiv = document.getElementsByTagName("ul");
		var mcu = new Array();
		for(i=0,L=getDiv.length; i<L; i++){
			var re = new RegExp("mcu_[0-9]");
			if(getDiv[i].id.match(re) == "mcu_" + i){
				funny.$("#mcu_" + i).style.display = "none";
				funny.$("#btn_" + i).style.fontWeight = "normal";
				funny.$("#btn_" + i).style.background = "url(/images/static/guidance/basic/bg-menu-icon_on.gif) no-repeat 0 0";
			}
		}
		toggleNode.style.display = "block";
		headNode.style.fontWeight = "bold";
		headNode.style.background = "url(/images/static/guidance/basic/bg-menu-icon.gif) no-repeat 0 0";
	}else{
		toggleNode.style.display = "none";
		headNode.style.fontWeight = "normal";
		headNode.style.background = "url(/images/static/guidance/basic/bg-menu-icon_on.gif) no-repeat 0 0";
	}
}