var imagesDir = "/SakaTsukuOnline/menu/images";

var snsUrl = "http://"+snsServer+"/"+snsApplication+"/index.do";
var indexActionUrl = "http://"+snsServer+"/"+snsApplication+"/index.do";
var newsListActionUrl = "http://"+snsServer+"/"+snsApplication+"/newsList.do";
var loginCheckUrl = "http://"+snsServer+"/"+snsApplication+"/loginCheck.do";
var loginFormUrl = "http://"+snsServer+"/"+snsApplication+"/loginForm.do";
var logoutActionUrl = "http://"+snsServer+"/"+snsApplication+"/logout.do";

var clubActionUrl = "http://"+snsServer+"/"+snsApplication+"/clubSearchForm.do";
var userActionUrl = "http://"+snsServer+"/"+snsApplication+"/userSearchForm.do";
var diaryActionUrl = "http://"+snsServer+"/"+snsApplication+"/diarySearchForm.do";
var allianceActionUrl = "http://"+snsServer+"/"+snsApplication+"/allianceSearchForm.do";
var playerActionUrl = "http://"+snsServer+"/"+snsApplication+"/playerSearchForm.do";
var communityActionUrl = "http://"+snsServer+"/"+snsApplication+"/communitySearchForm.do";
var marketActionUrl = "http://"+snsServer+"/"+snsApplication+"/auctionTop.do";
var rankingActionUrl = "http://"+snsServer+"/"+snsApplication+"/ranking.do";
var worldTrendActionUrl = "http://"+snsServer+"/"+snsApplication+"/worldTrend.do";
var searchActionUrl = "http://"+snsServer+"/"+snsApplication+"/search.do";

var loginLogoutImageName = 'bbt9';
var myPageActionUrl = loginFormUrl;
var loginLogoutActionUrl = loginFormUrl;
var loginLogoutAlt = 'ログイン';
if(isLogined) {
	loginLogoutImageName = "bbt10";
	myPageActionUrl = indexActionUrl;
	loginLogoutActionUrl = logoutActionUrl;
	loginLogoutAlt = 'ログアウト';
}

var img_nm	=	new Array(13);
var img_on	=	new Array(13);
var img_off	=	new Array(13);

for (i=0;i<13;i++){
	img_on[i]	=	new Image();
	img_off[i]	=	new Image();
}

function setMenuImages() {
	img_nm[0]	=	"bbt1";
	img_nm[1]	=	"bbt2";
	img_nm[2]	=	"bbt3";
	img_nm[3]	=	"bbt5";
	img_nm[4]	=	"bbt12";
	img_nm[5]	=	"bbt11";
	img_nm[6]	=	"bbt4";
	img_nm[7]	=	"bbt13";
	img_nm[8]	=	"bbt6";
	img_nm[9]	=	"bbt7";
	img_nm[10]	=	"bbt8";
	img_nm[11]	=	loginLogoutImageName;
	img_nm[12]	=	"bbt9";

	img_off[0].src	=	imagesDir+"/bbt1.gif";
	img_off[1].src	=	imagesDir+"/bbt2.gif";
	img_off[2].src	=	imagesDir+"/bbt3.gif";
	img_off[3].src	=	imagesDir+"/bbt5.gif";
	img_off[4].src	=	imagesDir+"/bbt12.gif";
	img_off[5].src	=	imagesDir+"/bbt11.gif";
	img_off[6].src	=	imagesDir+"/bbt4.gif";
	img_off[7].src	=	imagesDir+"/bbt13.gif";
	img_off[8].src	=	imagesDir+"/bbt6.gif";
	img_off[9].src	=	imagesDir+"/bbt7.gif";
	img_off[10].src	=	imagesDir+"/bbt8.gif";
	img_off[11].src	=	imagesDir+"/"+loginLogoutImageName+".gif";
	img_off[12].src	=	imagesDir+"/bbt9.gif";

	img_on[0].src	=	imagesDir+"/bbt1_on.gif";
	img_on[1].src	=	imagesDir+"/bbt2_on.gif";
	img_on[2].src	=	imagesDir+"/bbt3_on.gif";
	img_on[3].src	=	imagesDir+"/bbt5_on.gif";
	img_on[4].src	=	imagesDir+"/bbt12_on.gif";
	img_on[5].src	=	imagesDir+"/bbt11_on.gif";
	img_on[6].src	=	imagesDir+"/bbt4_on.gif";
	img_on[7].src	=	imagesDir+"/bbt13_on.gif";
	img_on[8].src	=	imagesDir+"/bbt6_on.gif";
	img_on[9].src	=	imagesDir+"/bbt7_on.gif";
	img_on[10].src	=	imagesDir+"/bbt8_on.gif";
	img_on[11].src	=	imagesDir+"/"+loginLogoutImageName+"_on.gif";
	img_on[12].src	=	imagesDir+"/bbt9_on.gif";
}

function changeImages(idx,flg){
	if (flg){
		document.images[img_nm[idx]].src	=	img_on[idx].src;
	}
	else{
		document.images[img_nm[idx]].src	=	img_off[idx].src;
	}
}

function newXMLHttp() {
	if(window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if(window.ActivXObject) {
		try {
			return new ActiveXObject("MXSML2.XMLHTTP");
		} catch(e) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
			}
		}
	}
	return null;
}

function loginCheck() {
	xmlHttp = newXMLHttp();
	if(xmlHttp == null) {
		alert("XMLHttp error");
		return;
	}

	xmlHttp.open("GET", loginCheckUrl, false);
//	xmlHttp.open("GET", "test1.json", false);

	xmlHttp.onreadystatechange = function() {

		if(xmlHttp.readyState == 4 && xmlHttp.status == 200) {
			var tempArray = eval(xmlHttp.responseText);

			if(tempArray.length > 0) {
				if(tempArray[0].login) {
					loginLogoutImageName = "bbt10";
					myPageActionUrl = indexActionUrl;
					loginLogoutActionUrl = logoutActionUrl;
				}
			}
		}
	}

	xmlHttp.send("");
}


//ロールオーバー
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//ポップアップウィンドウ
function wpop(popupURL,wNAME,wSIZE){
	var name = navigator.appName;
	if (name == "Microsoft Internet Explorer"){
	// open the popup window Internet Explorer
	var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=yes,location=0,directories=0,status=no,menubar=yes,scrollbars=yes,resizable=yes');
	}
	else {
	// open the popup window Netscape
	var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=yes,location=0,directories=0,status=no,menubar=yes,scrollbars=yes,resizable=yes');
	}
}
function wpop2(popupURL,wNAME,wSIZE){
	var name = navigator.appName;
	if (name == "Microsoft Internet Explorer"){
	// open the popup window Internet Explorer
	var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
	else {
	// open the popup window Netscape
	var popup = window.open(popupURL,wNAME,wSIZE+',toolbar=no,location=0,directories=0,status=yes,menubar=no,scrollbars=yes,resizable=no');
	}
}


//ブラウザバージョン判定
var IEversion = 0;
var NNversion = 0;
if(navigator.appName.indexOf("Microsoft") >= 0){
        if(navigator.appVersion.charAt (0)==4 ){
                if(navigator.appVersion.indexOf ("MSIE 5") != -1){
                        IEversion = 5;
                }else{
                        IEversion = 4;
                }
        }
} else {
        if(navigator.appName.indexOf("Netscape") >= 0){
                if(navigator.appVersion.charAt(0) ==4){
                        NNversion = 4;
                }else if(navigator.appVersion.charAt(0) ==5){
                        NNversion = 6;
                }
        }
}


//レイヤー数設定
var Layer_name     = new Array('Layer1','Layer2','Layer3','Layer4','Layer5');	
var Layer_timerID = new Array();
var Layer_sw         = new Array();
for(var i=0;i<Layer_name.length;i++){
        Layer_sw[i] = 'hidden';
}


//レイヤー変更設定
function Layer_Control() {      
        LC_Args = Layer_Control.arguments;
        for(var i=0;i<LC_Args.length;i++){
                if(LC_Args[i] && Layer_sw[i] != LC_Args[i]){
                        if(LC_Args[i] == 'timer_hidden'){
                                Layer_timerID[i] = setTimeout("Layer_Change('" + Layer_name[i] + "','hidden')", 0);
                        }else{
                                clearTimeout(Layer_timerID[i]);
                                Layer_Change(Layer_name[i],LC_Args[i]);
                        }
                        Layer_sw[i] = LC_Args[i];
                }
        }
}


//レイヤー変更
function Layer_Change(DIVid,visStr) {   
        var theObj;
        if(NNversion == 4 && document.layers != null){  //NN4
                if(visStr == 'visible') visStr = 'show';
                if(visStr == 'hidden') visStr = 'hide';
                theObj = 'document.layers["' + DIVid + '"]';

        }else if((IEversion == 4 || IEversion == 5) && document.all != null){   //IE4,IE5
                theObj = 'document.all["' + DIVid + '"].style';

        }else if(NNversion == 6 && document.getElementById != null){    //nn6
                theObj = 'document.getElementById("' + DIVid + '").style';
        }

        if(theObj){
                theObj = eval(theObj);
                theObj.visibility = visStr;
        }
}


//インクルード
function writeMenus(){
	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR>');
	document.write('<TD WIDTH="245"><A HREF="/home.html"><IMG SRC="'+imagesDir+'/header.jpg" WIDTH="245" HEIGHT="71" BORDER="0" ALT="プロサッカークラブをつくろう！ONLINE 2"></A></TD>');
	document.write('<TD WIDTH="510" HEIGHT="71" BACKGROUND="'+imagesDir+'/header_img.jpg" NOWRAP>&nbsp;</TD>');
	document.write('</TR>');
	document.write('</TABLE>');


	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR>');

	document.write('<TD WIDTH="150"><a href="javascript:void(0);" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'btn01\',\'\',\''+imagesDir+'/btn01_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><IMG SRC="'+imagesDir+'/btn01.gif" WIDTH="150" HEIGHT="29" BORDER="0" NAME="btn01" ALT="最新情報"></a></TD>');

	document.write('<TD WIDTH="153"><a href="javascript:void(0);" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'timer_hidden\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'btn02\',\'\',\''+imagesDir+'/btn02_on.gif\',1);Layer_Control(\'hidden\',\'visible\',\'hidden\',\'hidden\',\'hidden\')"><IMG SRC="'+imagesDir+'/btn02.gif" WIDTH="153" HEIGHT="29" BORDER="0" NAME="btn02" ALT="サカつくONLINEとは"></a></TD>');

	document.write('<TD WIDTH="149"><a href="javascript:void(0);" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'timer_hidden\',\'\',\'\')" onMouseOver="MM_swapImage(\'btn03\',\'\',\''+imagesDir+'/btn03_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'visible\',\'hidden\',\'hidden\')"><IMG SRC="'+imagesDir+'/btn03.gif" WIDTH="149" HEIGHT="29" BORDER="0" NAME="btn03" ALT="スタートガイド"></a></TD>');

	document.write('<TD WIDTH="149"><a href="javascript:void(0);" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'timer_hidden\',\'\')" onMouseOver="MM_swapImage(\'btn04\',\'\',\''+imagesDir+'/btn04_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'visible\',\'hidden\')"><IMG SRC="'+imagesDir+'/btn04.gif" WIDTH="149" HEIGHT="29" BORDER="0" NAME="btn04" ALT="プレイガイド"></a></TD>');

	document.write('<TD WIDTH="149"><a href="JavaScript:void(0);" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'btn05\',\'\',\''+imagesDir+'/btn05_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><IMG SRC="'+imagesDir+'/btn05.gif" WIDTH="149" HEIGHT="29" BORDER="0" NAME="btn05" ALT="サポート"></A></TD>');

	document.write('<TD WIDTH="5"><IMG SRC="'+imagesDir+'/shadow_right.gif" WIDTH="5" HEIGHT="29"></TD>');
	document.write('</TR></TABLE>');
	document.write('<IMG SRC="'+imagesDir+'/shadow_btm.gif" WIDTH="755" HEIGHT="8"><BR>');

	//レイヤー1
	document.write('<div ID="Layer1" STYLE="position:absolute; left:0px; top:100px; width:100%; height:126px; z-index:1; visibility: hidden;" align="center">');
	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR><TD>');
	document.write('<a href="'+newsListActionUrl+'" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu1_1\',\'\',\''+imagesDir+'/btn01_menu01_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn01_menu01.gif" width="149" height="21" alt="すべて表示" border="0" name="menu1_1"></a><br>');
	document.write('<a href="'+newsListActionUrl+'?category=IMPORTANT" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu1_2\',\'\',\''+imagesDir+'/btn01_menu02_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn01_menu02.gif" width="149" height="21" alt="重要なお知らせ" border="0" name="menu1_2"></a><br>');
	document.write('<a href="'+newsListActionUrl+'?category=TOPICS" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu1_3\',\'\',\''+imagesDir+'/btn01_menu03_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn01_menu03.gif" width="149" height="21" alt="トピックス" border="0" name="menu1_3"></a><br>');
	document.write('<a href="'+newsListActionUrl+'?category=UPDATE" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu1_4\',\'\',\''+imagesDir+'/btn01_menu04_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn01_menu04.gif" width="149" height="21" alt="アップデート情報" border="0" name="menu1_4"></a><br>');
	document.write('<a href="'+newsListActionUrl+'?category=MAINTENANCE" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu1_5\',\'\',\''+imagesDir+'/btn01_menu05_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn01_menu05.gif" width="149" height="21" alt="メンテナンス情報" border="0" name="menu1_5"></a><br>');
	document.write('<a href="'+newsListActionUrl+'?category=TROUBLE" onMouseOut="MM_swapImgRestore();Layer_Control(\'timer_hidden\',\'\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu1_6\',\'\',\''+imagesDir+'/btn01_menu06_on.gif\',1);Layer_Control(\'visible\',\'hidden\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn01_menu06.gif" width="149" height="21" alt="障害情報" border="0" name="menu1_6"></a>');
	document.write('</TD></TR></TABLE>');
	document.write('</div>');

	//レイヤー2
	document.write('<div ID="Layer2" STYLE="position:absolute; left:0px; top:100px; width:100%; height:147px; z-index:2; visibility: hidden;" align="center">');
	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR><TD WIDTH="150"><IMG SRC="'+imagesDir+'/spacer.gif" WIDTH="150" HEIGHT="1"></TD>');
	document.write('<TD WIDTH="605">');
	document.write('<a href="/about/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'timer_hidden\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu2_1\',\'\',\''+imagesDir+'/btn02_menu01_on.gif\',1);Layer_Control(\'hidden\',\'visible\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn02_menu01.gif" width="152" height="21" alt="サカつくONLINEとは" border="0" name="menu2_1"></a><br>');
	document.write('<a href="/about/lecture/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'timer_hidden\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu2_10\',\'\',\''+imagesDir+'/btn02_menu10_on.gif\',1);Layer_Control(\'hidden\',\'visible\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn02_menu10.gif" width="152" height="21" alt="はじめてのサカつく！" border="0" name="menu2_10"></a><br>');
	document.write('<a href="/about/tour/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'timer_hidden\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu2_2\',\'\',\''+imagesDir+'/btn02_menu02_on.gif\',1);Layer_Control(\'hidden\',\'visible\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn02_menu02.gif" width="152" height="21" alt="サカつくONLINE熱闘ツアー" border="0" name="menu2_2"></a><br>');
	document.write('<a href="/about/style/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'timer_hidden\',\'\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu2_3\',\'\',\''+imagesDir+'/btn02_menu03_on.gif\',1);Layer_Control(\'hidden\',\'visible\',\'hidden\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn02_menu03.gif" width="152" height="21" alt="サカつくONLINEスタイル" border="0" name="menu2_3"></a>');
	document.write('</TD></TR></TABLE>');
	document.write('</div>');

	//レイヤー3
	document.write('<div ID="Layer3" STYLE="position:absolute; left:0px; top:100px; width:100%; height:84px; z-index:3; visibility: hidden;" align="center">');
	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR><TD WIDTH="303"><IMG SRC="'+imagesDir+'/spacer.gif" WIDTH="303" HEIGHT="1"></TD>');
	document.write('<TD WIDTH="452">');
	document.write('<a href="/startguide/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'timer_hidden\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu3_1\',\'\',\''+imagesDir+'/btn03_menu01_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'visible\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn03_menu01.gif" width="148" height="21" alt="スタート手順" border="0" name="menu3_1"></a><br>');
	document.write('<a href="/startguide/spec.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'timer_hidden\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu3_2\',\'\',\''+imagesDir+'/btn03_menu02_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'visible\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn03_menu02.gif" width="148" height="21" alt="必須/推奨動作環境" border="0" name="menu3_2"></a><br>');
	document.write('<a href="/startguide/download.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'timer_hidden\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu3_3\',\'\',\''+imagesDir+'/btn03_menu03_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'visible\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn03_menu03.gif" width="148" height="21" alt="クライアントダウンロード" border="0" name="menu3_3"></a><br>');
	document.write('<a href="/startguide/install.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'timer_hidden\',\'\',\'\')" onMouseOver="MM_swapImage(\'menu3_4\',\'\',\''+imagesDir+'/btn03_menu04_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'visible\',\'hidden\',\'hidden\')"><img src="'+imagesDir+'/btn03_menu04.gif" width="148" height="21" alt="インストール" border="0" name="menu3_4"></a>');
	document.write('</TD></TR></TABLE>');
	document.write('</div>');

	//レイヤー4
	document.write('<div ID="Layer4" STYLE="position:absolute; left:0px; top:100px; width:100%; height:21px; z-index:4; visibility: hidden;" align="center">');
	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR><TD WIDTH="452"><IMG SRC="'+imagesDir+'/spacer.gif" WIDTH="452" HEIGHT="1"></TD>');
	document.write('<TD WIDTH="303">');
	document.write('<a href="/clienthelp/index.html" target="_blank" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'timer_hidden\',\'\')" onMouseOver="MM_swapImage(\'menu4_1\',\'\',\''+imagesDir+'/btn04_menu01_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'visible\',\'hidden\')"><img src="'+imagesDir+'/btn04_menu01.gif" width="148" height="21" alt="ゲームチュートリアル" border="0" name="menu4_1"></a><br>');
	document.write('<a href="/communityabout/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'timer_hidden\',\'\')" onMouseOver="MM_swapImage(\'menu4_2\',\'\',\''+imagesDir+'/btn04_menu02_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'visible\',\'hidden\')"><img src="'+imagesDir+'/btn04_menu02.gif" width="148" height="21" alt="サカつくコミュニティとは" border="0" name="menu4_2"></a><br>');
	document.write('<a href="/optionservice/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'timer_hidden\',\'\')" onMouseOver="MM_swapImage(\'menu4_3\',\'\',\''+imagesDir+'/btn04_menu03_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'visible\',\'hidden\')"><img src="'+imagesDir+'/btn04_menu03.gif" width="148" height="21" alt="オプションサービスとは" border="0" name="menu4_3"></a>');
	document.write('</TD></TR></TABLE>');
	document.write('</div>');

	//レイヤー5
	document.write('<div ID="Layer5" STYLE="position:absolute; left:0px; top:100px; width:100%; height:189px; z-index:5; visibility: hidden;" align="center">');
	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR><TD WIDTH="750" ALIGN="RIGHT">');
	document.write('<a href="/support/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_1\',\'\',\''+imagesDir+'/btn05_menu01_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu01.gif" width="149" height="21" alt="サポート" border="0" name="menu5_1"></a><br>');
	document.write('<a href="/faq/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_2\',\'\',\''+imagesDir+'/btn05_menu02_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu02.gif" width="149" height="21" alt="FAQ" border="0" name="menu5_2"></a><br>');
	document.write('<a href="/contact/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_3\',\'\',\''+imagesDir+'/btn05_menu03_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu03.gif" width="149" height="21" alt="お問い合わせ" border="0" name="menu5_3"></a><br>');
	document.write('<a href="/communityhelp/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_6\',\'\',\''+imagesDir+'/btn05_menu06_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu06.gif" width="149" height="21" alt="コミュニティヘルプ" border="0" name="menu5_6"></a><br>');
	document.write('<a href="/health/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_10\',\'\',\''+imagesDir+'/btn05_menu10_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu10.gif" width="149" height="21" alt="健康上の注意" border="0" name="menu5_10"></a><br>');
	document.write('<a href="/attention/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_11\',\'\',\''+imagesDir+'/btn05_menu11_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu11.gif" width="149" height="21" alt="注意/禁止事項" border="0" name="menu5_11"></a><br>');
	document.write('<a href="/rule/index.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_7\',\'\',\''+imagesDir+'/btn05_menu07_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu07.gif" width="149" height="21" alt="利用規約" border="0" name="menu5_7"></a><br>');
	document.write('<a href="/rule/isao.html" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_12\',\'\',\''+imagesDir+'/btn05_menu12_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu12.gif" width="149" height="21" alt="ISAO課金利用規約" border="0" name="menu5_12"></a><br>');
	document.write('<a href="http://sega.jp/privacypolicy/" target="_blank" onMouseOut="MM_swapImgRestore();Layer_Control(\'\',\'\',\'\',\'\',\'timer_hidden\')" onMouseOver="MM_swapImage(\'menu5_9\',\'\',\''+imagesDir+'/btn05_menu09_on.gif\',1);Layer_Control(\'hidden\',\'hidden\',\'hidden\',\'hidden\',\'visible\')"><img src="'+imagesDir+'/btn05_menu09.gif" width="149" height="21" alt="プライバシーポリシー" border="0" name="menu5_9"></a>');
	document.write('</TD>');
	document.write('<TD WIDTH="5"><IMG SRC="'+imagesDir+'/spacer.gif" WIDTH="5" HEIGHT="1"></TD>');
	document.write('</TR></TABLE>');
	document.write('</div>');

	document.write('<TABLE WIDTH="755" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
	document.write('<TR>');
	document.write('<TD>');
	document.write('<A HREF="'+myPageActionUrl+'" onMouseOver="changeImages(0,1)" onMouseOut="changeImages(0,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt1.gif" name="bbt1" width="66" height="27" border="0" alt="マイページ">');
	document.write('</A>');
	document.write('<A HREF="'+clubActionUrl+'" onMouseOver="changeImages(1,1)" onMouseOut="changeImages(1,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt2.gif" name="bbt2" width="65" height="27" border="0" alt="クラブ">');
	document.write('</A>');
	document.write('<A HREF="'+userActionUrl+'" onMouseOver="changeImages(2,1)" onMouseOut="changeImages(2,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt3.gif" name="bbt3" width="66" height="27" border="0" alt="プレイヤー">');
	document.write('</A>');
	document.write('<A HREF="'+diaryActionUrl+'" onMouseOver="changeImages(3,1)" onMouseOut="changeImages(3,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt5.gif" name="bbt5" width="65" height="27" border="0" alt="日記">');
	document.write('</A>');
	document.write('<A HREF="'+allianceActionUrl+'" onMouseOver="changeImages(4,1)" onMouseOut="changeImages(4,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt12.gif" name="bbt12" width="65" height="27" border="0" alt="同盟">');
	document.write('</A>');
	document.write('<A HREF="'+playerActionUrl+'" onMouseOver="changeImages(5,1)" onMouseOut="changeImages(5,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt11.gif" name="bbt11" width="66" height="27" border="0" alt="選手コミュニティ">');
	document.write('</A>');
	document.write('<A HREF="'+communityActionUrl+'" onMouseOver="changeImages(6,1)" onMouseOut="changeImages(6,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt4.gif" name="bbt4" width="66" height="27" border="0" alt="コミュニティ">');
	document.write('</A>');
	document.write('<A HREF="'+marketActionUrl+'" onMouseOver="changeImages(7,1)" onMouseOut="changeImages(7,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt13.gif" name="bbt13" width="65" height="27" border="0" alt="ワールドマーケット">');
	document.write('</A>');
	document.write('<A HREF="'+rankingActionUrl+'" onMouseOver="changeImages(8,1)" onMouseOut="changeImages(8,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt6.gif" name="bbt6" width="66" height="27" border="0" alt="ランキング">');
	document.write('</A>');
	document.write('<A HREF="'+worldTrendActionUrl+'" onMouseOver="changeImages(9,1)" onMouseOut="changeImages(9,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt7.gif" name="bbt7" width="65" height="27" border="0" alt="ワールドトレンド">');
	document.write('</A>');
	document.write('<A HREF="'+searchActionUrl+'" onMouseOver="changeImages(10,1)" onMouseOut="changeImages(10,0)">');
	document.write('<IMG SRC="'+imagesDir+'/bbt8.gif" name="bbt8" width="48" height="27" border="0" alt="検索">');
	document.write('</A>');
	document.write('<A HREF="'+loginLogoutActionUrl+'" onMouseOver="changeImages(11,1)" onMouseOut="changeImages(11,0)">');
	document.write('<IMG SRC="'+imagesDir+'/'+loginLogoutImageName+'.gif" WIDTH="52" HEIGHT="27" BORDER="0" ALT="'+loginLogoutAlt+'" NAME="'+loginLogoutImageName+'">');
	document.write('</A>');
	document.write('</TD>');
	document.write('</TR>');
	document.write('<TR>');
	document.write('<TD><IMG SRC="'+imagesDir+'/bbt_sp.gif" WIDTH="755" HEIGHT="5"></TD>');
	document.write('</TR>');
	document.write('<TR>');
	document.write('<TD><IMG SRC="'+imagesDir+'/com_sp.gif" WIDTH="755" HEIGHT="7"></TD>');
	document.write('</TR>');
	document.write('</TABLE>');
}

function menus() {
	setMenuImages();
	writeMenus();
}
