function getCookie(name)
{
		var nameOfCookie = name + "=";
		var x = 0;
		while ( x <= document.cookie.length )
		{
				var y = (x+nameOfCookie.length);
				if ( document.cookie.substring( x, y ) == nameOfCookie ) {
						if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
								endOfCookie = document.cookie.length;
						return unescape( document.cookie.substring( y, endOfCookie ) );
				}
				x = document.cookie.indexOf( " ", x ) + 1;
				if ( x == 0 )
						break;
		}
		return "";
}


US_ID = getCookie('US%5FID');
PS_ID = getCookie('PS%5FID');

show_layer('menu03','122','137');
show_layer('menu04','156','110');
show_layer('menu05','122','110');
show_layer('menu06','109','191');
show_layer('menu07','109','191');


function show_layer(moduleID,iwidth,iheight) {
document.writeln("<DIV ID=sub_layer_"+moduleID+"  ONMOUSEOVER=\"javascript:move('"+moduleID+"')\" ONMOUSEOUT=\"javascript:hide('"+moduleID+"')\" STYLE=\"position:absolute; display:none; z-index:99\"><script>menu_list('"+moduleID+"')</script></DIV>");
}

function move(moduleID) {
    var tg = document.all("sub_layer_"+moduleID);
    var link = document.all("main_bt_"+moduleID);
		tg.style.posTop = link.offsetTop + link.offsetHeight + 0;
		tg.style.posLeft = link.offsetLeft;
		tg.style.display = "inline";
}
function hide(moduleID) {
    var tg = document.all("sub_layer_" + moduleID);
		tg.style.display = "none";
}


function menu_list(arg){
var SERVER_NAME = "/";

if (arg == "menu03"){

document.writeln("<table width='120' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#cccccc'>");
document.writeln("  <tr>");
document.writeln("    <td bgcolor='#FFFFFF'><table width='120' border='0' align='center' cellpadding='0' cellspacing='0'>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/topics/list.asp' class='BB'>お知らせ</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/topics/list2.asp' class='BB'>メンテナンス</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/static/chargemenu/CmIntroduction.asp' class='BB'>会員メニュー紹介</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/static/faq/faq_list.asp' class='BB'>よくある質問</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/static/management/MngManners.asp' class='BB'>運営方針</a></td>");
document.writeln("      </tr>");
document.writeln("    </table>");
document.writeln("    <table width='120' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("          <tr>");
document.writeln("            <td height='1' bgcolor='#F4F4F4'></td>");
document.writeln("          </tr>");
document.writeln("      </table></td>");
document.writeln("  </tr>");
document.writeln("</table>");

}else if (arg == "menu04"){

document.writeln("<table width='154' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#cccccc'>");
document.writeln("  <tr>");
document.writeln("    <td bgcolor='#FFFFFF'><table width='154' border='0' align='center' cellpadding='0' cellspacing='0'>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/mypage/ranking_w.asp' class='BB'>世界上位100</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/ranking_j.asp' class='BB'>日本上位100</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/privateScore.asp' class='BB'>個人成績</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/kiryokuScore.asp' class='BB'>棋力分布</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/WR_RatingTable.asp' class='BB'>レーティング基準表</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/WR_AboutRating.asp' class='BB'>レーティング規定</a></td>");
document.writeln("      </tr>");
document.writeln("    </table>");
document.writeln("    <table width='154' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("          <tr>");
document.writeln("            <td height='1' bgcolor='#F4F4F4'></td>");
document.writeln("          </tr>");
document.writeln("      </table></td>");
document.writeln("  </tr>");
document.writeln("</table>");

}else if (arg == "menu05"){

document.writeln("<table width='120' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#cccccc'>");
document.writeln("  <tr>");
document.writeln("    <td bgcolor='#FFFFFF'><table width='120' border='0' align='center' cellpadding='0' cellspacing='0'>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/live/scheduleList.asp' class='BB'>中継スケジュール</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("    </table>");
document.writeln("    <table width='120' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("          <tr>");
document.writeln("            <td height='1' bgcolor='#F4F4F4'></td>");
document.writeln("          </tr>");
document.writeln("      </table></td>");
document.writeln("  </tr>");
document.writeln("</table>");

}else if (arg == "menu07"){

document.writeln("<table width='120' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#cccccc'>");
document.writeln("  <tr>");
document.writeln("    <td bgcolor='#FFFFFF'><table width='120' border='0' align='center' cellpadding='0' cellspacing='0'>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/instruction/list.asp' class='BB'>スケジュール</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/instruction/player_profile/index.asp' class='BB'>指導棋士紹介</a></td>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/static/guide/taikyoku_n07.asp' class='BB'>申込方法</a></td>");
document.writeln("    </table>");
document.writeln("    <table width='120' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("          <tr>");
document.writeln("            <td height='1' bgcolor='#F4F4F4'></td>");
document.writeln("          </tr>");
document.writeln("      </table></td>");
document.writeln("  </tr>");
document.writeln("</table>");

}else if (arg == "menu06"){

document.writeln("<table width='107' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#cccccc'>");
document.writeln("  <tr>");
document.writeln("    <td bgcolor='#FFFFFF'><table width='107' border='0' align='center' cellpadding='0' cellspacing='0'>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/mypage/privateScore.asp' class='BB'>個人成績</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><a HREF='http://u-gen.nihonkiin.or.jp/mypage/pro/list.asp' class='BB'>プロに聞く履歴</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''><img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/instruction/history.asp' class='BB'>指導碁履歴</a></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='1' bgcolor='#F2F2F2'></td>");
document.writeln("      </tr>");
document.writeln("      <tr>");
document.writeln("        <td height='26' onMouseOver=this.style.backgroundColor='#F7F7F7' onMouseOut=this.style.backgroundColor=''>");
if (US_ID == "8" && (PS_ID=="2000" || PS_ID=="3000"))
{
document.writeln("        <img src='/images/arrow.gif'><A HREF='http://u-gen.nihonkiin.or.jp/mypage/modify_0612.asp' class='BB'>会員情報変更</a>");
}
else document.writeln("        <img src='/images/arrow.gif'><A HREF='https://u-gen.nihonkiin.or.jp/mypage/modify.asp' class='BB'>会員情報変更</a>");
document.writeln("        </td>");
document.writeln("      </tr>");
document.writeln("    </table>");
document.writeln("    <table width='107' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("          <tr>");
document.writeln("            <td height='1' bgcolor='#F4F4F4'</td>");
document.writeln("          </tr>");
document.writeln("      </table></td>");
document.writeln("  </tr>");
document.writeln("</table>");
}
}
