// JavaScript Document

var subimages = new Array(
	'<a href="http://www.e-namihei.com/" target="_blank"><img src="1/01.gif" alt="バナー広告掲載募集中" width="170" height="80" /></a>',
	'<a href="http://www.e-namihei.com/" target="_blank"><img src="1/02.gif" alt="バナー広告掲載募集中" width="170" height="80" /></a>',
	'<a href="http://www.e-namihei.com/" target="_blank"><img src="1/03.gif" alt="バナー広告掲載募集中" width="170" height="80" /></a>');

//バナーの数を調べます。
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];
	subimages[n1] = subimages[n2];
	subimages[n2] = n;
}

//小さいバナーイメージを呼び出す関数
function putsubimage(cnt){
	document.write(subimages[cnt]);
}

