/*
 *	JavaScript Library
 *
 *	Copyright (C) 2005 tetsu21 All rights reserved.
 */

//######################################################################################
//
//		乱数により表示する画像を変更する
//
//		引数：PathType[n]	n=階層
//
//######################################################################################
function ChangeImageRandom( PathType ) {
// 画像ファイルテーブル設定
	ImgFile = new Array();
	ImgFile[0] = "img01.jpg";
	ImgFile[1] = "img02.jpg";
	ImgFile[2] = "img03.jpg";
	ImgFile[3] = "img04.jpg";

	ImgAlt = new Array();
	ImgAlt[0] = "坂と蔵";
	ImgAlt[1] = "東金砂神社";
	ImgAlt[3] = "生田の滝";
	ImgAlt[4] = "プラトーさとみ";

// 画像パス設定
	var ImgPath = "img/top_img/";
	switch( PathType ) {
		case 1:
			ImgPath = "../" + ImgPath;
			break;
		case 2:
			ImgPath = "../../" + ImgPath;
			break;
		case 3:
			ImgPath = "../../../" + ImgPath;
			break;
		default:
			break;
	}

	var ImgValue = Math.floor(ImgFile.length * Math.random());

// 画像表示
	document.write( "<img src=\"" + ImgPath + ImgFile[ImgValue] + "\" alt=\"" + ImgAlt[ImgValue] + "\" border=\"0\" width=\"572\" height=\"250\">" );
}


