
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_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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//
// 指定した日付で画像を切り替え
// (Version 0.01		2004. 2. 2.)
// Version 0.01a	2004. 3.28. Update
//
// Copyright    : H.Yamashita
// URL          : http://www2s.biglobe.ne.jp/~Hiro/
// Notice       : いわゆるフリー素材です。但し、営利目的以外で使用してください。
//
//////////////////////////////////////////
// ※ユーザー設定箇所は 2 箇所あります。//
//////////////////////////////////////////
function fncGraphicChangerByDate() {
	var	i;
	var	month;
	var	day;
	var	today;

	//////////////////////////////////////////////////////////
	// ***** ここからユーザーの設定箇所 (1) *****
	//
	// １．画像ファイル数の設定
	//     maxFile で、用意する画像ファイル数を決定する。
	//
	var	maxFile = 2;
	//
	//
	// ***** ここまでユーザーの設定箇所 (1) *****
	//////////////////////////////////////////////////////////

	var	date = new Date();
	var	graphics_data = new Array(maxFile);
	var	graphics_path = new Array(maxFile);

	if ((month = (date.getMonth() + 1)) < 10) {
		month = "0" + month;
	}
	else {
		month += "";
	}

	if ((day = date.getDate()) < 10) {
		day = "0" + day;
	}
	else {
		day += "";
	}

	today = month + day;

//////////////////////////////////////////////////////////
// ***** ここからユーザーの設定箇所 (2) *****
//
// １．ページの設定
//     graphics_data[?] に、表示させたい月日（月２桁、日２桁）
//     graphics_path[?] に、表示させたい画像までのパス（ＵＲＬ）、
//     を、それぞれ設定する。
//     ? には、 0 から「ユーザーの設定箇所 (1)」で設定した
//     maxFile までの数値が入る。
//     例えば maxFile = 3 なら、? には 0 から 2 までの数値を
//     入れることができるため、日付と画像を３つ指定できる。
//     ※※※注意※※※
//     graphics_data[?] に指定する日付が若い順になるように
//     指定すること。例えば、
//         graphics_data[0] = "0923";
//         graphics_path[0] = "../graphics/03momiji02.jpg";
//         graphics_data[1] = "0102";
//         graphics_path[1] = "../graphics/03tkm01.jpg";
//     という指定はできません。
//
	graphics_data[0] = "0804";
	graphics_path[0] = "info2009/0908_kyuka.gif";
	graphics_data[1] = "0819";
	graphics_path[1] = "info2008/eigyou1.jpg";

//
// ***** ここまでユーザーの設定箇所 (2) *****
//////////////////////////////////////////////////////////

for (i = 0; i < maxFile; i++) {
	if (graphics_data[i] > today) {
		if (i == 0) {
			i = maxFile;
		}
		break;
	}
}
i--;

document.write("<IMG SRC=\"" + graphics_path[i] + "\">");

}

