// トップローテーションバナー
function ad01() {
	ad=new Array();
	//基本入力項目 （index.htmlからのパス）
	ad[0]=new adlist('http://asahi.co.jp/symphony/','banner/img/01.jpg','シンフォニーフォール');
	ad[1]=new adlist('http://www.pentough.com/','banner/img/02.jpg','ペンタフ株式会社');
	ad[2]=new adlist('http://www.pop-circus.co.jp/','banner/img/03.jpg','ポップサーカス');
	ad[3]=new adlist('http://www.daiwaservice.co.jp/moving/index.html','banner/img/04.jpg','ダイワサービス');
	ad[4]=new adlist('http://www.mandnplanning.com/','banner/img/05.jpg','株式会社　エムアンドエヌ企画');
	//乱数を発生させる
	ad01=Math.floor(ad.length * Math.random());
	ad02=(ad01 + 1);
	if(ad02 > 4)  {ad02=0};
	ad03=(ad02 + 1);
	if(ad03 > 4)  {ad03=0};
	ad04=(ad03 + 1);
	if(ad04 > 4)  {ad04=0};
	//乱数をインデックスとして利用し、配列から広告データ取り出す
	document.write ('<p><a href=\"' + ad[ad01].url + '\" target=\"_blank\"><img src=\"' + ad[ad01].imgpath + '\" alt=\"' + ad[ad01].title + '\"  width=\"185\" border=\"0\" height=\"261\"></a></p>');
	document.write ('<p><a href=\"' + ad[ad02].url + '\" target=\"_blank\"><img src=\"' + ad[ad02].imgpath + '\" alt=\"' + ad[ad02].title + '\"  width=\"185\" border=\"0\" height=\"261\"></a></p>');
	document.write ('<p><a href=\"' + ad[ad03].url + '\" target=\"_blank\"><img src=\"' + ad[ad03].imgpath + '\" alt=\"' + ad[ad03].title + '\"  width=\"185\" border=\"0\" height=\"261\"></a></p>');
	document.write ('<p><a href=\"' + ad[ad04].url + '\" target=\"_blank\"><img src=\"' + ad[ad04].imgpath + '\" alt=\"' + ad[ad04].title + '\"  width=\"185\" border=\"0\" height=\"261\"></a></p>');
	document.close();
}

//adlistクラス
function adlist(url, imgpath, title){
	this.url=url;		//URL
	this.imgpath=imgpath;	//Image Path
	this.title=title;	//Title
}