/*
'==============================================================================
' 各ページのヘッダ部の書き出し
'==============================================================================
*/
function DrawHead (flg) {
	var wMark;
	var wLayerS;
	var wLayerE;

	//------------------------------------------------------------
	//マークのタグ編集
	//------------------------------------------------------------
	wMark = "<IMG src=\"/dmr/images/ico_mark.gif\" width=\"9\" height=\"9\" hspace=\"2\">";
	
	//------------------------------------------------------------
	//レイヤータグ編集
	//------------------------------------------------------------
	if (flag == "wns") {
		
		//Netscapeの場合
		wLayerS = "<LAYER id=\"header\" pagex=\"190px\" pagey=\"0px\" width=\"610px\" height=\"62px\" z-index=\"2\">"
		wLayerE = "</LAYER>"
		
	} else {
		
		//Internet Explorerの場合
		wLayerS = "<DIV id=\"header\" style=\"position:absolute; left:190px; top:0px; width:610px; height:62px; z-index:2;\">"
		wLayerE = "</DIV>"

	}

	//------------------------------------------------------------
	//書き出し
	//------------------------------------------------------------
	document.write(wLayerS);
	document.write("<TABLE width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"navigation\">");
	document.write("<TR valign=\"top\">");
	document.write("<TD width=\"10\" height=\"50\">&nbsp;</TD>");
	document.write("<TD width=\"590\" height=\"50\" align=\"right\" valign=\"bottom\">");
	
	document.write("<IMG src=\"/dmr/images/cut_ikiiki.gif\" alt=\"生き活きこうちの森\"><BR>");
	
	document.write(wMark + "<A href=\"/\">デジ森トップへ　</A>　");
	document.write(wMark + "<A href=\"/dmr/zei.htm\">森林環境税について　</A>　");
	document.write(wMark + "<A href=\"/modules/liaise/\">ご意見・ご要望　</A>　");
	document.write(wMark + "<A href=\"/dmr/sitemap.htm\">サイトマップ</A>　");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR valign=\"top\">");
	document.write("<TD height=\"6\" width=\"10\" bgcolor=\"#CCCC99\"><IMG src=\"/dmr/images/ttl_03.gif\" width=\"1\" height=\"1\"></TD>");
	document.write("<TD height=\"6\" bgcolor=\"#CCCC99\"><IMG src=\"/dmr/images/ttl_03.gif\" width=\"1\" height=\"1\"></TD>");
	document.write("</TR>");
	document.write("<TR valign=\"top\">");
	document.write("<TD height=\"6\"><IMG src=\"/dmr/images/ttl_03.gif\" width=\"1\" height=\"1\"></TD>");
	document.write("<TD height=\"6\"><IMG src=\"/dmr/images/ttl_03.gif\" width=\"1\" height=\"1\"></TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	document.write(wLayerE);
		
}

/*
'==============================================================================
' 各ページのメニュー部の書き出し
'==============================================================================
*/
function DrawMenu (flg) {
	var wButtonTypeA;
	var wBannerTypeA;
	var wLayerS;
	var wLayerE;
	
	wButtonTypeA = " width=\"162\" height=\"27\" border=\"0\"";
	wBannerTypeA = " width=\"150\" height=\"37\" border=\"0\" vspace=\"2\"";

	//------------------------------------------------------------
	//レイヤータグ編集
	//------------------------------------------------------------
	if (flag == "wns") {
		
		//Netscapeの場合
		wLayerS = "<LAYER id=\"memu\" pagex=\"10\" pagey=\"0\" width=\"180\" height=\"100\" z-index=\"1\">"
		wLayerE = "</LAYER>"

	} else {
		
		//Internet Explorerの場合
		wLayerS = "<DIV id=\"memu\" style=\"position:absolute; left:10px; top:0px; width:180px; height:100%; z-index:1\";>"
		wLayerE = "</DIV>"

	}
	
	//------------------------------------------------------------
	//書き出し
	//------------------------------------------------------------
//	document.write("<DIV id=\"memu\" style=\"position:absolute; left:8px; top:0px; width:182px; height:100px; z-index:1\">");
//	document.write("<DIV id=\"memu\" style=\"position:absolute; left:8px; top:0px; width:182px; height:100%; z-index:1\" background-color: #E7FB7B; layer-background-color: #E7FB7B;>");
	document.write(wLayerS);
	//デジ森ロゴ部分
	document.write("<A href=\"/\"><IMG src=\"/dmr/images/ttl_digimori.gif\" width=\"180\" height=\"56\" border=\"0\"></A><BR>");
	document.write("<TABLE width=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
//	document.write("<TABLE width=\"180\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#009900\">");
	document.write("<TR>");
//	document.write("<TD align=\"center\"><IMG src=\"/dmr/images/cut_login.gif\" width=\"182\" height=\"100\"></TD>");
	//デジ森会員ログイン部分
	document.write("<TD>");
	document.write("<FORM name=\"form\" action=\"/user.php\" method=\"post\">");
	document.write("<TABLE width=\"154\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"navigation\">");
	document.write("<TR>");
	document.write("<TD colspan=\"2\" nowrap><IMG src=\"/dmr/images/ttl_login.gif\" width=\"154\" height=\"26\" alt=\"デジ森会員ログイン\" border=\"0\"></TD>");
	document.write("</TR>");
	document.write("<TR>");
	document.write("<TD align=\"right\" nowrap>会員番号</TD>");
	document.write("<TD><INPUT type=\"text\" name=\"uname\" size=\"12\" value=\"\" maxlength=\"25\" /></TD>");
	document.write("</TR>");
	document.write("<TR>");
	document.write("<TD align=\"right\" nowrap class=\"main\">パスワード</TD>");
	document.write("<TD><INPUT type=\"password\" name=\"pass\" size=\"12\" maxlength=\"32\" />");
	document.write("    <INPUT type=\"hidden\" name=\"xoops_redirect\" value=\"/\" />");
	document.write("    <INPUT type=\"hidden\" name=\"op\" value=\"login\" />");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR>");
	document.write("<TD>&nbsp;</TD>");
	document.write("<TD><INPUT type=\"submit\" value=\"ログイン\" /></TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	document.write("</FORM>");
	
	document.write("<TABLE width=\"154\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"navigation\">");
	document.write("<TR>");
	document.write("<TD colspan=\"2\" align=\"center\"><a href=\"/user.php#lost\">パスワード紛失</a></TD>");
	document.write("</TR>");
	document.write("<TR>");
	document.write("<TD colspan=\"2\" align=\"center\"><a href=\"/register.php\"><IMG src=\"/dmr/images/btn_entry.gif\" width=\"80\" height=\"21\" alt=\"会員登録\" border=\"0\"></a></TD>");
	document.write("</TR>");
	document.write("</TABLE>");

	document.write("<HR align=\"left\" width=\"154\" size=\"1\">");
	document.write("</TD>");
	//森ログ
	document.write("<TR>");
	document.write("<TD><A href=\"/modules/popnupblog/\"><IMG src=\"/dmr/images/men_morilog.gif\" width=\"162\" height=\"61\" border=\"0\" alt=\"デジ森会員プチホームページ『森ログ』\"></A></TD>");
	document.write("</TR>");
	//イベント情報
	document.write("<TR>");
	document.write("<TD><A href=\"/modules/piCal/\"><IMG src=\"/dmr/images/men_event.gif\"" + wButtonTypeA + " alt=\"イベント情報\"></A></TD>");
	document.write("</TR>");
	//おらんく情報Now
	document.write("<TR>");
	document.write("<TD><A href=\"/modules/myalbum/\"><IMG src=\"/dmr/images/men_oranku.gif\"" + wButtonTypeA + " alt=\"おらんく情報Now\"></A></TD>");
	document.write("</TR>");
	//デジ森のお知らせ
	document.write("<TR>");
	document.write("<TD><A href=\"/modules/news/\"><IMG src=\"/dmr/images/men_oshirase.gif\"" + wButtonTypeA + " alt=\"デジ森のお知らせ\"></A></TD>");
	document.write("</TR>");
	//特集
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/feature/index.html\"><IMG src=\"/dmr/images/men_feature.gif\"" + wButtonTypeA + " alt=\"特集\"></A></TD>");
	document.write("</TR>");
	//森のくちコミ情報
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/kuchikomi/index.html\"><IMG src=\"/dmr/images/men_kuchikomi.gif\"" + wButtonTypeA + " alt=\"森のくちコミ情報\"></A></TD>");
	document.write("</TR>");
	//こどもの森
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/kids/index.html\"><IMG src=\"/dmr/images/men_kids.gif\"" + wButtonTypeA + " alt=\"こどもの森\"></A></TD>");
	document.write("</TR>");
	//こうちの森や山（森林浴含む）
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/moriyama/index.html\"><IMG src=\"/dmr/images/men_moriyama.gif\"" + wButtonTypeA + " alt=\"こうちの森や山\"></A></TD>");
	document.write("</TR>");
	//山のしごと
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/work/index.html\"><IMG src=\"/dmr/images/men_work.gif\"" + wButtonTypeA + " alt=\"山のしごと\"></A></TD>");
	document.write("</TR>");
	//森の応援団
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/ouendan/index.html\"><IMG src=\"/dmr/images/men_ouendan.gif\"" + wButtonTypeA + " alt=\"森の応援団\"></A></TD>");
	document.write("</TR>");
	//バーチャル学習館
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/virtual/index.html\"><IMG src=\"/dmr/images/men_virtual.gif\"" + wButtonTypeA + " alt=\"バーチャル学習館\"></A></TD>");
	document.write("</TR>");
	//山の学習
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/study/h18/index.html\"><IMG src=\"/dmr/images/men_school.gif\"" + wButtonTypeA + " alt=\"山の学習\"></A></TD>");
	document.write("</TR>");
	//森と山の匠たち
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/takumi/index.html\"><IMG src=\"/dmr/images/men_takumi.gif\"" + wButtonTypeA + " alt=\"森と山の匠たち\"></A></TD>");
	document.write("</TR>");
	//森と木の工作室
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/craft/index.html\"><IMG src=\"/dmr/images/men_craft.gif\"" + wButtonTypeA + " alt=\"森と木の工作室\"></A></TD>");
	document.write("</TR>");
	//あったか木の家
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/hous/index.html\"><IMG src=\"/dmr/images/men_hous.gif\"" + wButtonTypeA + " alt=\"あったか木の家\"></A></TD>");
	document.write("</TR>");
	//グリーン購入
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/green/index.html\"><IMG src=\"/dmr/images/men_green.gif\"" + wButtonTypeA + " alt=\"グリーン購入\"></A></TD>");
	document.write("</TR>");
	//もーり娘が行く！
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/musume/index.html\"><IMG src=\"/dmr/images/men_musume.gif\"" + wButtonTypeA + " alt=\"もーり娘が行く！\"></A></TD>");
	document.write("</TR>");
	//相談窓口
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/soudan/index.html\"><IMG src=\"/dmr/images/men_soudan.gif\"" + wButtonTypeA + " alt=\"相談窓口\"></A></TD>");
	document.write("</TR>");
	//リンク集
	document.write("<TR>");
	document.write("<TD><A href=\"/dmr/link.htm\"><IMG src=\"/dmr/images/men_link.gif\"" + wButtonTypeA + " alt=\"リンク集\"></A></TD>");
	document.write("</TR>");
	//協賛企業
	document.write("<TR>");
	document.write("<TD><BR><BR><SMALL>【協賛企業】</SMALL><BR>");
	document.write("<A href=\"/dmr/banner/rep_ncb.htm\"><IMG src=\"/dmr/banner/ban_ncb.gif\"" + wBannerTypeA + "></A><BR>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	document.write(wLayerE);
	
	//------------------------------------------------------------
	//本文部分のレイヤータグ（開始）編集
	//------------------------------------------------------------
	if (flag == "wns") {
		
		//Netscapeの場合
		if (window.location == "http://www.digi-mori.com/") {
			document.write("<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><TR><TD width=\"200\">&nbsp;</TD><TD width=\"590\">");
		} else {
			document.write("<LAYER id=\"main\" pagex=\"200\" pagey=\"62\" width=\"590\" height=\"100\"  z-index=\"3\">");
		}
	} else {
		
		//Internet Explorerの場合
		document.write("<DIV id=\"main\" style=\"position:absolute; left:200px; top:62px; width:590px; height:100; z-index:3\">");

	}

}

/*
'==============================================================================
' 各ページフッダ部の書き出し
'==============================================================================
*/
function DrawFoot (prev,flg) {
	var wInfoArray;
	var mainColor;
	var subColor;

	//------------------------------------------------------------
	//書き出し
	//------------------------------------------------------------
	document.write("<BR>");
	document.write("<BR>");
	document.write("<TABLE width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<TR>");
	if (flg == 1) {		//ページがタテに長い場合はflgに1を設定し[トップページに戻る]ボタンを表示
			document.write("<TD align=\"right\"><FONT size=\"-1\">［ <A href=\"#top\">このページのトップへ↑</A> ］</FONT></TD>");
	} else {
			document.write("<TD></TD>");
	}
	document.write("</TR>");
	document.write("</TABLE>");
	document.write("<HR align=\"left\" width=\"600\" size=\"1\" noshade>");
	DrawCopyright();
	
	//------------------------------------------------------------
	//本文部分のレイヤータグ（終了）編集
	//------------------------------------------------------------
	if (flag == "wns") {
		
		//Netscapeの場合
		if (window.location == "http://www.digi-mori.com/") {
			document.write("</TD></TR></TABLE>");
		} else {
			document.write("</LAYER>");
		}
		
	} else {
		
		//Internet Explorerの場合
		document.write("</DIV>");

	}
	
}

/*
'==============================================================================
' コピーライト部の書き出し(例：見出し、記事、写真の無断転載を禁じます)
'==============================================================================
*/

function DrawCopyright () {
    //書き出し
    document.write("<TABLE width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
    document.write("<TR valign=\"bottom\" align=\"right\">");
    document.write("<TD colspan=\"2\" height=\"20\" class=\"copyright\">Copyright(C) 2004-2007 digi-mori.com All Rights Reserved<BR>このホームページ上の全てのデータ、ファイルを無断で転載、掲載する事を禁止します。</TD>");
		document.write("</TR>");
    document.write("</TABLE>");
}

/*
'==============================================================================
' デジ森会員ログイン
'==============================================================================
*/

function formSubmit(form){

    //document.write(navigator.appName);
    if (navigator.appName == "Microsoft Internet Explorer") {
        //IEの場合
        //alert(navigator.appVersion);
    }else{
        //IE以外の場合。
        alert("ログインはMicrosoft Internet Explorerで行って下さい。");
				//return false;
    }

    document.form.submit();

}

/*
'==============================================================================
' ウィンドウを新しく開く（リンク集の高知県下の地図）
'==============================================================================
*/
function OpnMap(gName, gUrl, gWidth, gHeight){

    var vUrl = gUrl;
    var vWindowName = gName;                //Window名称

    vOthers = "";
    vOthers = vOthers + " left=0";          //画面位置(横)
    vOthers = vOthers + ",top=0";           //画面位置(縦)
    vOthers = vOthers + ",scrollbars=yes";  //画面スクロールバー表示ON
    vOthers = vOthers + ",resizable=yes";   //画面サイズ変更ON
    vOthers = vOthers + "," + gWidth;       //画面サイズ(横)
    vOthers = vOthers + "," + gHeight;      //画面サイズ(縦)

    window.open(vUrl,vWindowName,vOthers);

}

/*
'==============================================================================
' ウィンドウOPEN
'==============================================================================
*/
function openBrWindow() { 
  var vUrl;
	var vName;
	var vOther;
	
	vUrl   = "yamamap/index.html"
	vName  = "山マップ"
	vOther = "width=376,height=500,scrollbars=yes"
		
  window.open(vUrl,vName,vOther);
	
}

/*
'==============================================================================
' 第1回もくもくランド用ページ切替OPEN
'==============================================================================
*/
function OpenMokMok() { 
  var vUrl;
	
  jpURL = [	"mokmok1.htm",
            "mokmok2.htm",
            "mokmok3.htm" ];
	
  n = Math.floor(Math.random() * jpURL.length);
	vUrl   = "other/" + jpURL[n];
		
  window.location = vUrl;
	return false;
	
}

/*
'==============================================================================
' おらんく情報Now 桜情報へのリンク設定
'==============================================================================
*/
function SubmitSakura() { 
	
	document.fm_sakura.submit();
	
}

function GoToSakura() { 

	document.write("<FORM name=\"fm_sakura\" action=\"/dmro/Map_Kekka.jsp\" method=\"post\">");
	document.write("<INPUT name=\"FromSearch\" type=\"hidden\" value=\"1\">");
	document.write("<INPUT name=\"MapKbn1\" type=\"hidden\" value=\"05\">");
	document.write("</FORM>")
	
}
