<!--
//フラッシュをJava経由で読み込むスクリプト
function showFlash(url,width,height){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'">');
	document.write('<param name="movie" value="'+url+'">');
	document.write('<param name="quality" value="high">');
	document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
	document.write('</embed>');
	document.write('</object>');
}

//大きいバナーイメージ(又はフラッシュ)を定義
//※小さいバナーと同じ数だけ用意してください。
var mainimage = new Array(
	'<scr'+'ipt type="text/javascript">showFlash("random/images/image_01_large.jpg",560,170);</scr'+'ipt>',
	'<img src="random/images/image_02_large.jpg" style="width: 560px;height: 170px;">',
	'<img src="random/images/image_03_large.jpg" style="width: 560px;height: 170px;">',
	'<img src="random/images/image_05_large.jpg" style="width: 560px;height: 170px;">',
	'<img src="random/images/image_06_large.jpg" style="width: 560px;height: 170px;">',
	'<img src="random/images/image_07_large.jpg" style="width: 560px;height: 170px;">');



//小さいバナーイメージ(又はフラッシュ)を定義
//※大きいバナーと同じ数だけ用意してください。
var subimages = new Array(
	'<img src="./images/image_01_small.jpg" style="width: 160px;height: 80px;">',
	'<img src="./images/image_02_small.jpg" style="width: 160px;height: 80px;">',
	'<img src="./images/image_03_small.jpg" style="width: 160px;height: 80px;">',
	'<img src="./images/image_05_small.jpg" style="width: 160px;height: 80px;">',
	'<img src="./images/image_06_small.jpg" style="width: 160px;height: 80px;">',
	'<img src="./images/image_07_small.jpg" style="width: 160px;height: 80px;">');

//フラッシュをバナーに組み込む場合は最上段のshowFlash関数を利用します。
//記述方法は下記の通り。※scriptタグの多重定義のみ気をつけてください。
//	'<scr'+'ipt language="javascript" type="text/javascript">showFlash("flashname.swf","width","height");</scr'+'ipt>',

//バナーの数を調べます。
var figure = subimages.length;

for (i=0; i<100; i++) //　100はシャッフルする回数
{
	n1 = Math.floor(Math.random() * figure);
	n2 = Math.floor(Math.random() * figure);
	n = subimages[n1];
	m = mainimage[n1]
	subimages[n1] = subimages[n2];
	mainimage[n1] = mainimage[n2];
	subimages[n2] = n;
	mainimage[n2] = m;
}

//小さいバナーイメージを呼び出す関数
function putsubimage(cnt){
	document.write(subimages[cnt]);
}

//大きいバナーイメージを呼び出す関数
function putmainimage(cnt){
	document.write(mainimage[cnt]);
}

//-->

