/////////////////////////////////////////////////////////////
//　外部からのフレームリンク防止
/////////////////////////////////////////////////////////////

try{
	var path=parent.location.href;
	if(path.indexOf("genbu") <0){
		location.href="http://www.genbu.net/genbuframe.htm";
	}
} catch(e){
	location.href="http://www.genbu.net/genbuframe.htm";
}

/////////////////////////////////////////////////////////////
//　マップ表示
/////////////////////////////////////////////////////////////
function mapdsp( url )
{
	document.open();
	document.write("　<a href=",url," target=_map><img src=../../link/mapion_2.gif border=0 align=absmiddle alt='Mapion display !!'></a>");
	document.close();
}

function gmapdsp( url )
{
	document.open();
	document.write("　<a href=",url," target=_map><img src=../../link/gmap.gif border=0 align=absmiddle alt='Google Maps display !!'></a>");
	document.close();
}

function mmapdsp( url )
{
	 document.open();
	 document.write("　<a href=",url," target=_map><img src=../../link/mapfan.gif border=0 align=absmiddle alt='Mapfan web display !!'></a>");
	 document.close();
}

function tmapdsp( url )
{
	document.open();
	document.write("　<a href=",url," target=_map><img src=../../link/tizumaru.gif border=0 align=absmiddle alt='Chizumaru Maps display !!'></a>");
	document.close();
}

function zmapdsp( url )
{
	document.open();
	document.write("　<a href=",url," target=_map><img src=../../link/zenrin.gif border=0 align=absmiddle alt='Zenrin Data Com Maps display !!'></a>");
	document.close();
}

function ymapdsp( url )
{
	document.open();
	document.write("　<a href=",url," target=_map><img src=../../link/yahoo.gif border=0 align=absmiddle alt='Yahoo! Map display !!'></a>");
	document.close();
}

/////////////////////////////////////////////////////////////
//　メインヘッダ表示
/////////////////////////////////////////////////////////////
function head( name )
{
	document.open();
	document.write("<table border=0 cellpadding=0 cellspacing=0 width=100% bgcolor=gray>");
	document.write(" <tr><td align=center><font color=white size=4>",name,"</font></td></tr>");
	document.write("</table>");
	document.close();
}

/////////////////////////////////////////////////////////////
//　画像装飾表示
/////////////////////////////////////////////////////////////
function resize( obj,w,v )
{
	if(obj.width==w){
		obj.width= obj.width * 1.5;
		obj.height= obj.height * 1.5;
	}
	else{
		obj.width= w;
		obj.height= v;
	}
}
function sinmon( img,page,name )
{
	document.open();
	document.write("<a href=../../sinmon/",page," target=_top><img src=../../sinmon/",img," border=0 width=70 height=70 unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no' title='神紋解説ページへ！！'><br><span style='font-style:italic'>",name,"</span></a><br>");
	document.close();
}

function syuin_w(name,w)
{
	document.open();
	document.write("<a href=",name,"_syuin.htm><img class=gakubutis src=",name,"_syuin.jpg border=0 align=top width=",w," unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no' height=300 alt=朱印のページへ！！></a>");
	document.close();
}
function syuin_else_w(name,no,w)
{
	document.open();
	document.write("<a href=",name,"_syuin.htm><img class=gakubutis src=",name,"_syuin",no,".jpg border=0 align=top width=",w," unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no' height=300 alt=朱印のページへ！！></a>");
	document.close();
}

function gaku_wv( im,w,v )
{
	document.open();
	document.write("<IMG class=gakubuti SRC =",im," border=0 width=",w," height=",v," unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no' onclick='resize(this,",w,",",v,");'>");
	document.close();
}


function table_one_one_wv( msg,img,w,v )
{
	document.open();
	document.write("<table width=530 border=0 cellpadding=0 cellspacing=0>");
	document.write(" <tr><td align=center><br>",msg,"<br></td></tr>");
	document.write("    <tr><td align=center><script>gaku_wv('",img,"','",w,"','",v,"');</script>");
	document.write(" </td></tr></table>");
	document.close();
}
function table_one_two_wv( msg,img1,w1,v1,img2,w2,v2 )
{
	document.open();
	document.write("<table width=560 border=0 cellpadding=0 cellspacing=0>");
	document.write(" <tr><td align=center COLSPAN=2><br>",msg,"<br></td></tr>");
	document.write("    <tr><td align=center width=50%><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script>");
	document.write(" </td><td align=center width=50%><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script>");
	document.write("</td></tr></table>");
	document.close();
}
function table_two_two_wv( msg1,img1,w1,v1,msg2,img2,w2,v2 )
{
	document.open();
	document.write("<table width=530 border=0 cellpadding=0 cellspacing=0>");
	document.write("    <tr><td align=center width=50%><br>",msg1,"<br><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script>");
	document.write(" </td><td align=center width=50%><br>",msg2,"<br><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script>");
	document.write("</td></tr></table>");
	document.close();
}
function table_two_two_wv_wide( msg1,img1,w1,v1,msg2,img2,w2,v2 )
{
	document.open();
	document.write("<table width=630 border=0 cellpadding=0 cellspacing=0>");
	document.write("    <tr><td align=center width=50%><br>",msg1,"<br><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script>");
	document.write(" </td><td align=center width=50%><br>",msg2,"<br><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script>");
	document.write("</td></tr></table>");
	document.close();
}
function table_three_three_wv( msg1,img1,w1,v1,msg2,img2,w2,v2,msg3,img3,w3,v3 )
{
	document.open();
	document.write("<table width=560 border=0 cellpadding=0 cellspacing=0><tr>");
	document.write("<td align=center width=33%><br>",msg1,"<br><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script></td>");
	document.write("<td align=center width=34%><br>",msg2,"<br><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script></td>");
	document.write("<td align=center width=33%><br>",msg3,"<br><script>gaku_wv('",img3,"','",w3,"','",v3,"');</script></td>");
	document.write("</tr></table>");
	document.close();
}
function table_three_three_wv_btm( msg1,img1,w1,v1,msg2,img2,w2,v2,msg3,img3,w3,v3 )
{
	document.open();
	document.write("<table border=0 cellpadding=0 cellspacing=0><tr>");
	document.write("<td align=center valign=bottom><br>",msg1,"<br><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script></td>");
	document.write("<td width=10></td>");
	document.write("<td align=center valign=bottom><br>",msg2,"<br><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script></td>");
	document.write("<td width=10></td>");
	document.write("<td align=center valign=bottom><br>",msg3,"<br><script>gaku_wv('",img3,"','",w3,"','",v3,"');</script></td>");
	document.write("</tr></table>");
	document.close();
}

function table_four_four_wv( msg1,img1,w1,v1,msg2,img2,w2,v2,msg3,img3,w3,v3,msg4,img4,w4,v4 )
{
	document.open();
	document.write("<table width=560 border=0 cellpadding=0 cellspacing=0><tr>");
	document.write("<td align=center width=25%><br>",msg1,"<br><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script></td>");
	document.write("<td align=center width=25%><br>",msg2,"<br><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script></td>");
	document.write("<td align=center width=25%><br>",msg3,"<br><script>gaku_wv('",img3,"','",w3,"','",v3,"');</script></td>");
	document.write("<td align=center width=25%><br>",msg4,"<br><script>gaku_wv('",img4,"','",w4,"','",v4,"');</script></td>");
	document.write("</tr></table>");
	document.close();
}
function table_five_five_wv( msg1,img1,w1,v1,msg2,img2,w2,v2,msg3,img3,w3,v3,msg4,img4,w4,v4,msg5,img5,w5,v5 )
{
	document.open();
	document.write("<table width=560 border=0 cellpadding=0 cellspacing=0><tr>");
	document.write("<td align=center width=20%><br>",msg1,"<br><script>gaku_wv('",img1,"','",w1,"','",v1,"');</script></td>");
	document.write("<td align=center width=20%><br>",msg2,"<br><script>gaku_wv('",img2,"','",w2,"','",v2,"');</script></td>");
	document.write("<td align=center width=20%><br>",msg3,"<br><script>gaku_wv('",img3,"','",w3,"','",v3,"');</script></td>");
	document.write("<td align=center width=20%><br>",msg4,"<br><script>gaku_wv('",img4,"','",w4,"','",v4,"');</script></td>");
	document.write("<td align=center width=20%><br>",msg5,"<br><script>gaku_wv('",img5,"','",w5,"','",v5,"');</script></td>");
	document.write("</tr></table>");
	document.close();
}
function syuin1_w(name,w)
{
	document.open();
	document.write("<div align=center><center>");
	document.write("<img class=gakubutis src=",name,"_syuin.jpg border=0 width=",w," height=300 unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no'>");
	document.write("</center></div>");
	document.close();
}

function syuin1_2_w(name,no,w)
{
	document.open();
	document.write("<div align=center><center>");
	document.write("<img class=gakubutis src=",name,"_syuin",no,".jpg border=0 width=",w," height=300 unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no'>");
	document.write("</center></div>");
	document.close();
}

function syuin2_w(name,w1,w2)
{
	document.open();
	document.write("<div align=center><center>");
	document.write("<table border=0 cellspacing=0 cellpadding=0><tr>");
	document.write("<td><img class=gakubutis src=",name,"_syuin.jpg border=0 width=",w1," height=300 unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no'></td>");
	document.write("<td width=10 bgcolor=0>　</td>");
	document.write("<td><img class=gakubutis src=",name,"_syuin1.jpg border=0 width=",w2," height=300 unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no'></td>");
	document.write("</tr></table>");
	document.write("</center></div>");
	document.close();
}

function syuin2_2_w(name,no1,w1,no2,w2)
{
	document.open();
	document.write("<div align=center><center>");
	document.write("<table border=0 cellspacing=0 cellpadding=0><tr>");
	document.write("<td><img class=gakubutis src=",name,"_syuin",no1,".jpg border=0 width=",w1," height=300 unselectable='on' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no'></td>");
	document.write("<td width=10 bgcolor=0>　</td>");
	document.write("<td><img class=gakubutis src=",name,"_syuin",no2,".jpg border=0 width=",w2," height=300 unselectable='on' onmousedown='return false;' onmousedown='return false;' oncontextmenu='return false;' galleryimg='no'></td>");
	document.write("</tr></table>");
	document.write("</center></div>");
	document.close();
}

/////////////////////////////////////////////////////////////
//　次ページ／戻りなどの表示
/////////////////////////////////////////////////////////////
function iconchg(id,no){
	if(navigator.appVersion.charAt(0) >= "3"){
		document.images[id].src = img[no].src;;
	}
}
function more(page)
{
	document.open();
	document.write("<table width=600 align=center><tr><td align=right>");
	document.write("<a href=",page," onmouseover=iconchg('MORE',3) onmouseout=iconchg('MORE',2)><img src=../../image/more.gif name=MORE alt='境内へ' border=0></a>");
	document.write("</td></tr></table>");
	document.close();
}
function more2(page)
{
	document.open();
	document.write("<table width=600 align=center><tr><td align=right>");
	document.write("<a href=",page," onmouseover=iconchg('MORE2',9) onmouseout=iconchg('MORE2',8)><img src=../../image/more2.gif name=MORE2 alt='もっと詳しい内容へ' border=0></a>");
	document.write("</td></tr></table>");
	document.close();
}
function back(page)
{
	document.open();
	document.write("<table width=600 align=center><tr><td align=left>");
	document.write("<a href=",page," onmouseover=iconchg('BACK',5) onmouseout=iconchg('BACK',4)><img src=../../image/back.gif name=BACK border=0></a>");
	document.write("</td></tr></table>");
	document.close();
}
function toppage(page)
{
	document.open();
	document.write("<table width=600 align=center><tr><td align=right>");
	document.write("<a href=",page," onmouseover=iconchg('HEAD',7) onmouseout=iconchg('HEAD',6)><img src=../../image/head.gif name=HEAD border=0></a>");
	document.write("</td></tr></table>");
	document.close();
}

function back_more2(pageback,pagemore)
{
	document.open();
	document.write("<table width=600 align=center><tr><td align=left>");
	document.write("<a href=",pageback," onmouseover=iconchg('BACK',5) onmouseout=iconchg('BACK',4)><img src=../../image/back.gif name=BACK border=0></a>");
	document.write("</td><td align=right>");
	document.write("<a href=",pagemore," onmouseover=iconchg('MORE2',9) onmouseout=iconchg('MORE2',8)><img src=../../image/more2.gif name=MORE2 alt='もっと詳しい内容へ' border=0></a>");
	document.write("</td></tr></table>");
	document.close();
}
function back_toppage(pageback,pagetop)
{
	document.open();
	document.write("<table width=600 align=center><tr><td align=left>");
	document.write("<a href=",pageback," onmouseover=iconchg('BACK',5) onmouseout=iconchg('BACK',4)><img src=../../image/back.gif name=BACK border=0></a>");
	document.write("</td><td align=right>");
	document.write("<a href=",pagetop," onmouseover=iconchg('HEAD',7) onmouseout=iconchg('HEAD',6)><img src=../../image/head.gif name=HEAD border=0></a>");
	document.write("</td></tr></table>");
	document.close();
}
