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_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];}}
}

//======================================================================================================================
//ブックマークアイコン表示
//======================================================================================================================
da_image = new Image();
da_image.src="/favicon.ico";


//======================================================================================================================
//ランダム画像表示
//======================================================================================================================
function rnd_graphics () {
	var	rnd = 0;		// 乱数格納用

	var	graphic_dat_max = 7;					//ユーザー設定箇所：画像データ数の設定

	var	graphic_dat	= new Array(graphic_dat_max);
	var	graphic_width	= new Array(graphic_dat_max);
	var	graphic_height	= new Array(graphic_dat_max);
	//////////////////////////////////////////////////////////
	// ***** ここからユーザーの設定箇所 (2) *****
	//
	// １． 画像ファイル設定
	//      画像ファイルを設定します。
	//          graphic_dat[?]	: 画像ファイル名
	//          graphic_width[?]	: 画像の幅   (単位 : dot)
	//          graphic_height[?]	: 画像の高さ (単位 : dot)
	//      をそれぞれ記入します。
	//      [?] の ? には 0 〜 (graphic_dat_max - 1) 
	//      までの数値が入ります。例えば graphic_dat_max = 5
	//      なら、 [0] 〜 [4] までの変数を設定します。
	//
	// 1 つ目
	graphic_dat[0]		= "http://www.adrajpn.org/images/photo_top/header001.jpg";
	graphic_width[0]	= "740";
	graphic_height[0]	= "200";
	// 2 つ目
	graphic_dat[1]		= "http://www.adrajpn.org/images/photo_top/header003.jpg";
	graphic_width[1]	= "740";
	graphic_height[1]	= "200";
	// 3 つ目
	graphic_dat[2]		= "http://www.adrajpn.org/images/photo_top/header005.jpg";
	graphic_width[2]	= "740";
	graphic_height[2]	= "200";
	// 4 つ目
	graphic_dat[3]		= "http://www.adrajpn.org/images/photo_top/header006.jpg";
	graphic_width[3]	= "740";
	graphic_height[3]	= "200";

	// 5 つ目
	graphic_dat[4]		= "http://www.adrajpn.org/images/photo_top/header007.jpg";
	graphic_width[4]	= "740";
	graphic_height[4]	= "200";

	// 6 つ目
	graphic_dat[5]		= "http://www.adrajpn.org/images/photo_top/header008.jpg";
	graphic_width[5]	= "740";
	graphic_height[5]	= "200";

	// 7 つ目
	graphic_dat[6]		= "http://www.adrajpn.org/images/photo_top/header009.jpg";
	graphic_width[6]	= "740";
	graphic_height[6]	= "200";


	//
	// ***** ここまでユーザーの設定箇所 (2) *****
	//////////////////////////////////////////////////////////
	//
	// 乱数発生
	//
	rnd = Math.floor(Math.random() * graphic_dat_max);
	//
	// 描画処理
	//
	if ((graphic_width[rnd] == "") || (graphic_height[rnd] == "")) {
		document.write('<table background=\"'+ graphic_dat[rnd] + '\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"740\">');
	}
	else if (graphic_dat[rnd] != "") {
		document.write('<table background=\"'+ graphic_dat[rnd] + '\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"740\">');
//		document.write('<IMG SRC="' + graphic_dat[rnd] + '" WIDTH=' + graphic_width[rnd] + " HEIGHT=" + graphic_height[rnd] + ">");
	}
}




//======================================================================================================================
//寄付金受付先の情報
//======================================================================================================================
function showKifukinInfo(purposeType, purpose) {
document.write("<center>");
document.write("	<table id=\"kifu\" width=\"500\">");
document.write("		<tbody>");
document.write("			<tr align=\"center\">");
document.write("				<th>寄付金の受付</th>");
document.write("			</tr>");
document.write("			<tr align=\"center\">");
document.write("				<td><br>");
document.write("					郵便局に備え付けの【郵便振替 払込取扱票】に必要事項をご記入の上、 <br>");
document.write("					郵便局の払込窓口にて払込ください。 <br>");
document.write("					<br>");
document.write("					<TABLE>");
document.write("					<TR><TD wideh=\"200\">口座番号：　</TD><TD><B><FONT size = \"+1\">00290-2-34169</FONT></B></TD></TR>");
document.write("					<TR><TD>加入者名：　</TD><TD><B>（特活）ADRA Japan</B></TD></TR>");
if (purposeType =='singlepurpose'){
	document.write("					<TR><TD>通信欄：　</TD><TD>※<B>「" + purpose + "」</B>とご記入ください。</TD></TR>");
} else if (purposeType =='multipurpose'){
	document.write("					<TR><TD>通信欄：　</TD><TD>※" + purpose + "をご記入ください。</TD></TR>");
}
document.write("					</TABLE>");
document.write("					<br>");
document.write("					<P align=\"right\">記入例は<a href=\"javascript:void(0);\" onClick=\"window.open('http://www.adrajpn.org/pop_ExampleKifu.htm', 'example', 'width=640,height=600,scrollbars=1')\">こちら</A>　　<br>");
document.write("					</P>");
document.write("				</td>");
document.write("			</tr>");
document.write("		</tbody>");
document.write("	</table>");
document.write("</center>");
}

//======================================================================================================================
//会費受付先の情報
//======================================================================================================================
function showKaihiInfo(purpose) {
document.write("<center>");
document.write("	<table id=\"kifu\" width=\"480\">");
document.write("		<tbody>");
document.write("			<tr align=\"center\">");
document.write("				<th>会費の受付</th>");
document.write("			</tr>");
document.write("			<tr align=\"center\">");
document.write("				<td><br>");
document.write("					郵便局に備え付けの【郵便振替 払込取扱票】に必要事項をご記入の上、 <br>");
document.write("					郵便局の払込窓口にて払込ください。 <br>");
document.write("					<br>");
document.write("					<TABLE>");
document.write("					<TR><TD>口座番号：　</TD><TD><B><FONT size = \"+1\">00290-2-34169</FONT></B></TD></TR>");
document.write("					<TR><TD>加入者名：　</TD><TD><B>（特活）ADRA Japan</B></TD></TR>");
document.write("					<TR><TD>通信欄：　</TD><TD>※会員種別をご記入ください。</TD></TR>");
document.write("					</TABLE>");
document.write("					<br>");
document.write("					<P align=\"right\">記入例は<a href=\"javascript:void(0);\" onClick=\"window.open('pop_ExampleKifu.htm', 'example', 'width=640,height=600,scrollbars=1')\">こちら</A>　　<br>");
document.write("					</P>");
document.write("				</td>");
document.write("			</tr>");
document.write("		</tbody>");
document.write("	</table>");
document.write("</center>");
}

//======================================================================================================================
//問い合わせ先情報
//======================================================================================================================
function showContactInfo(purpose) {
document.write("<center>");
document.write("	<table id=\"kifu\" width=\"540\">");
document.write("		<tbody>");
document.write("			<tr align=\"center\">");
document.write("				<th>お問い合わせ先</th>");
document.write("			</tr>");
document.write("			<tr>");
document.write("				<td>");
document.write("					<CENTER>");
document.write("					<BR><B>（特活）ADRA Japan</B>");
document.write("					<BR>");
document.write("					<BR>〒150-0001　東京都渋谷区神宮前1-11-1");
document.write("					<BR>TEL: 03-5410-0045　　FAX: 03-5474-2042");
document.write("					<BR>E-mail: <a href=\"mailto:tokyo@adrajpn.org?Subject=" + (purpose) + "\">tokyo@adrajpn.org</a>");
document.write("					<BR>");
document.write("					<BR>");
document.write("					</CENTER>");
document.write("				</td>");
document.write("			</tr>");
document.write("		</tbody>");
document.write("	</table>");
document.write("</center>");
}

