<!--

function setMenu(){
	offX = 0;
	offY = 5;

	idName="lyrMenu";
// レイヤの移動位置算出
	if(document.all){
		x=document.all(idName).style.pixelLeft;
		y=document.all(idName).style.pixelTop;
	}else if(document.getElementById){
		x=document.getElementById(idName).style.Left;
		y=document.getElementById(idName).style.Top;
	}

	if(document.all){
		sx = document.body.scrollLeft;
		sy = document.body.scrollTop;
	}else{
		sx = self.pageXOffset;
		sy = self.pageYOffset;
	}
	
	if(x != sx + offX){x = x + (sx + offX - x) / 2}
	if(sy <= 105){y = y + (105 - y) / 2} else if(y != sy + offY){y = y + (sy + offY - y) / 2}
	
// レイヤを移動する
	if(document.all){
		document.all(idName).style.pixelLeft=x;
		document.all(idName).style.pixelTop=y;
	}else if(document.getElementById){
		document.getElementById(idName).style.left=x;
		document.getElementById(idName).style.top=y;
	}else if(document.layers){
		document.layers[idName].moveTo(x,y);
	}

}

function onMouseOverMenu(over){
      // over
	if((over.className != "main2") && (over.className != "main2sub")){
		over.style.backgroundColor = "#dcffdc";
		over.style.cursor = "hand";}
}

  function onMouseOutMenu(out){
      //第１レベル　out
	if((out.className != "main2") && (out.className != "main2sub")){
		out.style.backgroundColor = "#efefff"}
  }
  
  function onMouseOutSMenu(out){
      //第２レベル　out
	if((out.className != "main2") && (out.className != "main2sub")){
		out.style.backgroundColor = "#e0e0e0"}
  }

  function onMouseOutSFMenu(out){
      //focused第２レベル　out
    out.style.backgroundColor = "#ffefff"
  }

  function onMouseOutTMenu(out){
      //トピック　out
    out.style.backgroundColor = "#ffffee"
  }    

function exMenu(tName){
	vType = ["none","block"];
	Name = ["Menu1","Menu2","Menu3","Menu4","Menu5","Menu6","Menu7","Menu8","Menu9","Menu10"];
	
	for (i=0;i<9;i++){
		if(document.all){
			tMenu = document.all[Name[i]];
			pMenu = document.all[Name[i]+"-0"];
		}else if(document.getElementById){
			tMenu = document.getElementById[Name[i]];
			pMenu = document.getElementById[Name[i]+"-0"];
		}
		if(Name[i] == tName){
			tMenu.style.display = vType[tMenu.style.display.indexOf("none") + 1];
		}else if(pMenu.className != "main2"){
			tMenu.style.display = "none";
		}
	}
	
}

function exMenuIni(p,tName){// p:リンク先の相対パス tName:表示される項目のメニュー
	if(tName != ""){
		pName = tName.substring(0,tName.length - 2);
		if(document.all){
			document.all[pName].style.display = "block";
			document.all["Menu0"].className = "main1";
			document.all[pName+"-0"].className = "main2";
			document.all[tName].className = "main2sub";
		}else if(getElementById){
			document.getElementById[pName].style.display = "block";
			document.getElementById["Menu0"].className = "main1";
			document.getElementById[pName+"-0"].className = "main2";
			document.getElementById[tName].className = "main2sub";
		}
	}else {// トップのとき、ハイスクールガイドのアイコンを表示。
		document.write("<img src='"+p+"img/spacer.gif' width=100 height=27 alt='スペース' border='0'>");
		document.write("<a href='"+p+"guide/hsguide.html'><img src='"+p+"img/hsg.gif' width=72 height=56 border=0 alt='ハイスクールガイドへのリンク' vspace=5></a>");
	}
}

function MenuWrite(tID,tName){
	document.write("<div id='"+tID+"' class='main1' onMouseOver='onMouseOverMenu(this)' onMouseOut='onMouseOutMenu(this)' onClick=exMenu('"+tID.substring(0,tID.length-2)+"')>"+tName+"</div>");
}

function SubMenuWrite(tID,tURL,tName){
	document.write("<a href='" + tURL + "'><div id='" + tID + "' class='main1sub' onMouseOver='onMouseOverMenu(this)' onMouseOut='onMouseOutSMenu(this)'>" + tName + "</div></a>");
}

function Menu(p,tMenu){
	document.write("<a href='"+p+"index.html'><div id='Menu0' class='main2' onMouseOver='onMouseOverMenu(this)' onMouseOut='onMouseOutSMenu(this)'>トップ</div></a>");
	MenuWrite("Menu1-0","学校概要");
	document.write("<div id='Menu1' style='display:none'>");
		SubMenuWrite("Menu1-1",p + "about/index.html","校長あいさつ");
		SubMenuWrite("Menu1-2",p + "about/history.html","沿革");
		SubMenuWrite("Menu1-3",p + "about/aim.html","校訓・校歌など");
		SubMenuWrite("Menu1-4",p + "about/special.html","特色");
		SubMenuWrite("Menu1-5",p + "about/access.html","アクセス");
		SubMenuWrite("Menu1-6",p + "facil/index.html","施設");
	document.write("</div>");

	MenuWrite("Menu2-0","授業と進路");
	document.write("<div id='Menu2' style='display:none'>");
		SubMenuWrite("Menu2-1",p + "study/index.html","授業");
		SubMenuWrite("Menu2-2",p + "study/future.html","進路");
	document.write("</div>");

	MenuWrite("Menu3-0","行事");
	document.write("<div id='Menu3' style='display:none'>");
		SubMenuWrite("Menu3-1",p + "event/index.html","今年度の行事");
		SubMenuWrite("Menu3-2",p + "event/past.html","昨年度までの行事");
	document.write("</div>");

	MenuWrite("Menu4-0","部活動・生徒会");
	document.write("<div id='Menu4' style='display:none'>");
		SubMenuWrite("Menu4-1",p + "student/index.html","部活動");
		SubMenuWrite("Menu4-2",p + "student/information.html","生徒会総務");
	document.write("</div>");

	MenuWrite("Menu5-0","入学案内");
	document.write("<div id='Menu5' style='display:none'>");
		SubMenuWrite("Menu5-1",p + "guide/index.html","概要と募集要項");
		SubMenuWrite("Menu5-2",p + "guide/hsguide.html","ハイスクールガイド");
		SubMenuWrite("Menu5-3",p + "guide/setumei.html","学校説明会");
		SubMenuWrite("Menu5-4",p + "guide/orientation.html","オリエンテーション");
		SubMenuWrite("Menu5-5",p + "guide/guide_faq.html","ＦＡＱ");
	document.write("</div>");

	MenuWrite("Menu7-0","同窓会・卒業生");
	document.write("<div id='Menu7' style='display:none'>");
		SubMenuWrite("Menu7-1",p + "graduates/index.html","同窓会・卒業生");
	document.write("</div>");

	MenuWrite("Menu8-0","ＰＴＡ・保護者");
	document.write("<div id='Menu8' style='display:none'>");
		SubMenuWrite("Menu8-1",p + "pta/index.html'","ＰＴＡ");
		SubMenuWrite("Menu8-2",p + "pta/parent.html'","保護者");
	document.write("</div>");

	MenuWrite("Menu9-0","事務室");
	document.write("<div id='Menu9' style='display:none'>");
		SubMenuWrite("Menu9-1",p + "office/index.html","在校生");
		SubMenuWrite("Menu9-2",p + "office/form.html","卒業生");
		SubMenuWrite("Menu9-3",p + "office/office_etc.html","その他");
	document.write("</div>");

	MenuWrite("Menu6-0","リンク");
	document.write("<div id='Menu6' style='display:none'>");
		SubMenuWrite("Menu6-1",p + "etc_/link_school.html","学校");
		SubMenuWrite("Menu6-2",p + "etc_/link.html","その他");
	document.write("</div>");

	document.write("<br><div align='right'><IMG SRC='http://www.gsn.ed.jp/cgi-bin/Count.cgi?display=date|dformat=YYMMDD|dd=D|ft=0|prgb=010101|tr=Y' ALT='日付'></div>");

	document.write("<SCRIPT>exMenuIni('" + p + "','" + tMenu + "')</SCRIPT>");
}


function TopicMenuWrite(tURL,tName){
	document.write("<a href='"+tURL+"'><div class='main3' onMouseOver='onMouseOverMenu(this)' onMouseOut='onMouseOutTMenu(this)')>"+tName+"</div></a>");
}

function TopicMenu(p){// 画面右のトピックメニュー
	document.write("<div align='center'><font color='Red'><b>トピック</b></font></div>");
	
// 	TopicMenuWrite("javascript:livecam(\"http://www.numata-hs.gsn.ed.jp/livecam/index.html\",\"livecam_window\")","<img src="+p+"img/video_film.gif align=absmiddle width=25 height=30 border=0><img src="+p+"img/spacer.gif width=8 height=1 border=0>"+"ライブカメラ");
	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
	TopicMenuWrite(p+"info/warn.html","ご注意下さい");
	TopicMenuWrite(p+"livecam/index.html","ライブカメラ");
	TopicMenuWrite(p+"facil/library/index.html","図書館");
	TopicMenuWrite(p+"facil/gakushoku.html","五常館の学食");
	TopicMenuWrite(p+"etc_/link.html#weather","天気予報(リンク)");
//	TopicMenuWrite(p+"ns/index.html#weather","沼高祭携帯サイト");
//	TopicMenuWrite(p+"study/openschool_3.html","公開授業");
//	TopicMenuWrite(p+"guide/setumei.html","学校説明会");
//	TopicMenuWrite(p+"study/tambara.html","現代数学講座");
//	TopicMenuWrite(p+"graduates/t_practice.html","教育実習");
//	TopicMenuWrite(p+"graduates/20zaikyo.html","20年度在京同窓会");
//	TopicMenuWrite(p+"office/scholarship_shien.html#link","学生支援機構申込");
//	TopicMenuWrite(p+"facil/sakura.html","沼高の桜");
//	TopicMenuWrite(p+"pta/doc/2007/hyouka.html","学校評価");
//	TopicMenuWrite(p+"pta/flu.html","インフルエンザ");
//	TopicMenuWrite(p+"guide/index.html","19年度募集要項");


//	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
//	document.write("<a href='http://i-learn.jp/schools/search.asp/a=s&k1=H&o=updf' target='_blank'><img src='http://www.i-learn.jp/c.ashx?m=3303' width='88' height='31' border='0'></a><br>");
	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
	document.write("<table bgcolor='silver' cellpadding='0' cellspacing='1'><tr><td><table bgcolor='white' cellpadding='0'><tr><td><a href='http://www.numata-hs.gsn.ed.jp/i/' target='_blank'><img src='i/img/qr_top.gif' alt='携帯電話用ＱＲコード' width='74' height='74' align='absmiddle' border='0'></a></td><td><font size='-1'><a href='http://www.numata-hs.gsn.ed.jp/i/' target='_blank' title='パソコンでは、正常に閲覧できないページがあります。'>携帯電話用</a></font></td></tr><tr><td colspan='2'><font size='-1'><a href='http://www.numata-hs.gsn.ed.jp/i/' target='_blank' title='パソコンでは、正常に閲覧できないページがあります。'>www.numata-hs.gsn.ed.jp/i/</a></font></td></tr></table></td></tr></table>");
	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
//	document.write("<table bgcolor='silver' cellpadding='0' cellspacing='1'><tr><td><table bgcolor='#CCFFFF' cellpadding='0'><tr><td><a href='http://www.numata-hs.gsn.ed.jp/ns/' target='_blank'><img src='./img/ns_qr.png' alt='沼高祭携帯電話用サイトＱＲコード' width='74' height='74' align='absmiddle' border='0'></a></td><td><font size='-1'><a href='http://www.numata-hs.gsn.ed.jp/ns/' target='_blank' title='パソコンでは、正常に閲覧できないページがあります。'>沼高祭用<br>携帯電話サイト</a></font></td></tr><tr><td colspan='2'><font size='-1'><a href='http://www.numata-hs.gsn.ed.jp/ns/' target='_blank' title='パソコンでは、正常に閲覧できないページがあります。'>www.numata-hs.gsn.ed.jp/ns/</a></font></td></tr></table></td></tr></table>");
	document.write("<a href='"+p+"about/special.html#env'><img src='"+p+"menu/img/team_numako_logo_s_winter.gif' width=160 height=43 alt='沼田高校はチームマイナス6％に参加しています。' border='0'></a><br>");
	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
//	document.write("<a href='http://www.gunmasoubun.com/' target='_blank'><img src='http://www.gunmasoubun.com/images/bn_gunma_soubun.gif' width=160 height=40 alt='ぐんま総文公式ホームページ' border='0'></a><br><table border=0 cellpadding='1' cellspacing=0 bgcolor='silver' width=160><tr><td><table bgcolor='#FFe9FF' width=158><tr><td align='center'>総文祭まであと<img src='http://numako.jpn.org/ns/dream/dream.cgi?mode=down2&gif=4'>日</td></tr></table></td></tr></table>");
	document.write("<a href='http://www.fm-oze.co.jp/' target='_blank'><img src='"+p+"menu/img/fmoze_logo.gif' width=160 height=50 alt='ＦＭ尾瀬は利根沼田のローカル放送です。' border='0'></a><br>");
	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
	document.write("<a href='http://www.numata-hs.gsn.ed.jp/facil/aed.html' target='_top'><img src='"+p+"img/aed_logo.gif' width=160 height=50 alt='沼田高校はAED設置施設です。' border='0'></a><br>");

//	document.write("<a href='http://tambara.ms.u-tokyo.ac.jp/lectures_for_highschool.html' target='_blank'><img src='"+p+"menu/img/sugaku_koza.gif' width=160 height=50 alt='沼田高校は、東大の「高校生のための現代数学講座」に協力をしています。' border='0'></a><br>");
	document.write("<img src='"+p+"img/spacer.gif' width=1 height=5 alt='スペース' border='0'><br>");
	document.write("<a href='http://center.kakomon.jp/hs/jump/?10126' target='_blank'><img src='"+p+"img/kakomon.gif' width=160 height=50 alt='センター試験過去問' border='0'></a><br>");
}
// -->
