<!--
function ListMenu(lName) {
	var lMenu = document.getElementById(lName).style;
	if(lMenu.display == 'none') {
		lMenu.display = "block";
		setCookie( lName, "1", cday );
	} else {
		lMenu.display = "none";
		setCookie( lName, "0", cday );
	}
}
function chgMenubg(lName) {
	var lMenu = document.getElementById(lName).style;
	if(lMenu.display == 'none') {
		lMenu.display = "block";
	} else {
		lMenu.display = "none";
	}
}
function chimg(img, n) {
	if(navigator.appVersion.charAt(0) >= 3) {document.images[n].src = img;}
}
function setCookie(key,val,day){
	epx = new Date();
	epx.setTime(epx.getTime()+(day*24*60*60*1000));
	buff = "@" + key + "=" + escape(val) + ";";
	expires = "expires="+epx.toGMTString();
	document.cookie =  buff + expires;
}
function getCookie(key){
	key = "@" + key + "=";
	val = null;
	str = document.cookie + ";" ;
	offset = str.indexOf(key);
	if(offset != -1){
		ss = offset + key.length;
		ee   = str.indexOf(";" , ss);
		val = unescape(str.substring(ss,ee));
	}
	return val;
}
function initDisp(){
	var menucount = menu.length;
	for( n=0; n<menucount; n++ ){
		buff = getCookie( "List" + n );
		if( buff == "0" ){
			disp[n] = false;
		}
		else if( buff == "1" ){
			disp[n] = true;
		}
	}
}

if (navigator.appVersion.charAt(0) >= 3) {
	// default disp flag
	var disp = new Array( true, true, true, true, true );
	var cday = 3;
	
	// 固・E瓮縫紂・
	var staticmenu = new Array(
		"image/menu/top.gif",	//ヘッダー画像
		"",				//トップ
		"トップページ",			
		"image/menu/bottom.gif"	//フッター画像
	);
	
	var menu = new Array();
		// news
	menu[0] = new Array(
		"image/menu/b_info.gif",
		"image/menu/b_info_on.gif",
		"",
		"news/wis/?mode=m_list",
		"サーバー・メンテナンス情報",
		"",
		"news/wis/?mode=i_list",
		"最新情報",
		""

	);
	// about
	menu[1] = new Array(
		"image/menu/b_about.gif",
		"image/menu/b_about_on.gif",
		"",
		"about/",
		"プレミア版サービス概要",
		"",
		"about/rule.html",
		"参加規約",
		""
	);
	// play
	menu[2] = new Array(
		"image/menu/b_play.gif",
		"image/menu/b_play_on.gif",
		"",
		"playguide/",
		"基本操作方法に関して",
		"",
		"playguide/network_flow.html",
		"ネットワークモードの流れ",
		"",
		"playguide/myroom.html",
		"マイルーム",
		"",
		"playguide/city.html",
		"シティ",
		"",
		"playguide/mission.html",
		"ミッション",
		""
	);
	// support
	menu[3] = new Array(
		"image/menu/b_support.gif",
		"image/menu/b_support_on.gif",
		"",
		"support/",
		"FAQ",
		"",
		"support/connection.html",
		"接続できない時は",
		""
	);
	
	initDisp();
}

function menu_preloadImages(){
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,menucount = menu.length;
	for(i=0; i<menucount; i++)
    if (menu[i][1].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=menu[i][1];}}
}


function mkmenu( path, me1, me2, me3, imgno_org )
{
	var menucount = menu.length;
	
	document.write( "<div id=\"MenuWrapper\"><div id=\"MenuMouseTrap\">" );
	document.write( "<span onMouseOver=\"javascript:hideMe('MenuWrapper');hideMenu();\"><!--<img src=\"" + path + "image/dot.gif\" width=\"490\" height=\"200\" alt=\"\" border=\"0\">--></span>" );
	document.write( "</div></div>" );
	
	document.write( "<div id=\"MenuHeader\"><img src=\"" + path + staticmenu[0] + "\" alt=\"\" width=\"190\" height=\"7\" border=\"0\"></div>" );
	if( me1 == -1 && me2 == -1 ){
		document.write( "<span class=\"nonemenu\">" + staticmenu[2] + "</span>" );
	}
	else{
		document.write( "<a href=\"" + path + staticmenu[1] + "\" class=\"menu\">" + staticmenu[2] + "</a>" );
	}
	imgno_org+=2;
	submenu_img=0;
	
	for( n=0; n<menucount; n++ ){
		document.write("<div class=\"menuFrame\">");
		document.write("<div class=\"menuFrameHeader\"><img src=\"" + path + "image/menu/frame_top.gif\" alt=\"\" width=\"180\" height=\"2\" border=\"0\"></div>\n");
		document.write("<div class=\"menuFrameButton\">");
		
		if( menu[n][2] == "" ){
			document.write("<a href=\"javaScript:ListMenu('List" + n + "')\" ");
		} else {
			re = new RegExp("http:", "i");
			if( menu[n][2].match(re) ){
				document.write("<a href=\"" + menu[n][2] + "\" ");
			} else {
				document.write("<a href=\"" + path + menu[n][2] + "\" ");
			}
		}
		imgno = imgno_org + n * 5 + 1 + submenu_img;
		document.write("onMouseOut=\"chimg('" + path + menu[n][0] + "'," + imgno + ")\" ");
		document.write("onMouseOver=\"chimg('" + path + menu[n][1] + "'," + imgno + ")\">");
		
		//表示チェック 
		if( disp[n] || me1 == n ){
			document.write("<img src=\""+ path + menu[n][0] + "\" width=\"176\" height=\"24\" border=\"0\"></a></div>"); 
			document.write("<div id=\"List" + n + "\" style=\"display:display;\"><img src=\""+path+"image/dot.gif\" width=\"1\" height=\"3\">");
		} else {
			document.write("<img src=\""+ path + menu[n][0] + "\" width=\"176\" height=\"24\" border=\"0\"></a></div>"); 
			document.write("<div id=\"List" + n + "\" style=\"display:none;\"><img src=\""+path+"image/dot.gif\" width=\"1\" height=\"3\">");
		}
		
		len = menu[n].length;
		for( i=3; i<len; i+=3 ){
			c = "menu";
			if( me1 == n && me2*3 == i-3 && me3 == -1 ){
				c = "onmenu";
			}
			if(menu[n][i+2]){
				document.write("<p class=\"menuarrow\"><a href=\"" + path + menu[n][i] + "\" class=\"" + c + "\" id=\"" + menu[n][i+2][0] + "Main\" onMouseOver=\"javascript:showMe('" + menu[n][i+2][0] + "');\">" + menu[n][i+1] + "</a></p>");
				
				// サブメニュー
				document.write( "<div class=\"submenuWrapper\" id=\"" + menu[n][i+2][0] + "\">" );
				document.write( "<div style=\"position: absolute;left:5px;top:-21px;z-index:102;\"><a href=\"" + path + menu[n][i] + "\"><img src=\"" + path + "image/dot.gif\" width=\"180\" height=\"21\" border=\"0\"></a></div>" );
				document.write( "<div style=\"position: absolute;left:" + menu[n][i+2][1] + "px; top:-14px;\"><img src=\"" + path + "image/common/icon_submenu.gif\"></div>" );
				document.write( "<div class=\"submenuFrame\" style=\"left:" + (menu[n][i+2][1]+10) + "px; top:" + menu[n][i+2][2] + "px; width: " + menu[n][i+2][3] + "px; height: " + menu[n][i+2][4] + "px;\">" );
				slen = menu[n][i+2].length;
				for( j=5; j<slen; j+=2 ){
					if( me1 == n && me2*3 == i-3 && me3*2 == j-5 )
						document.write( "<p class=\"submenuarrow\"><a href=\"" + path + menu[n][i+2][j] + "\" class=\"onsubmenu\">" + menu[n][i+2][j+1] + "</a></p>" );
					else
						document.write( "<p class=\"submenuarrow\"><a href=\"" + path + menu[n][i+2][j] + "\" class=\"submenu\">" + menu[n][i+2][j+1] + "</a></p>" );
				}
				document.write( "</div>" );
				document.write( "<div class=\"submenuBackground\" style=\"left:" + (menu[n][i+2][1]+10) + "px; top:" + menu[n][i+2][2] + "px; width: " + menu[n][i+2][3] + "px; height: " + menu[n][i+2][4] + "px;\"></div>" );
				document.write( "</div>" );
				
				submenu_img+=2;
			}
			else{
				if( menu[n][i] ){
					re = new RegExp("http:", "i");
					if( menu[n][i].match(re) ){
						document.write("<p class=\"menuarrow\"><a href=\"" + menu[n][i] + "\" class=\"" + c + "\">" + menu[n][i+1] + "</a></p>");
					} else {
						document.write("<p class=\"menuarrow\"><a href=\"" + path + menu[n][i] + "\" class=\"" + c + "\">" + menu[n][i+1] + "</a></p>");
					}
				}
				else{
					document.write("<p class=\"menuarrow\"><span class=\"nonemenu\">" + menu[n][i+1] + "</span>");
				}

			}
		}
		document.write("<img src=\""+path+"image/dot.gif\" width=\"1\" height=\"2\"></div>");
		document.write("<div class=\"menuFrameFooter\"><img src=\"" + path + "image/menu/frame_bottom.gif\" alt=\"\" width=\"180\" height=\"2\" border=\"0\"></div></div>");
	}
	
	document.write( "<div id=\"MenuFooter\"><img src=\"" + path + staticmenu[3] + "\" alt=\"\" width=\"190\" height=\"9\" border=\"0\"></div>" );
}

delete menu;

-->