
// 画像指定: コンビニ
var block01_images = {
	// 画像とジャンプ先の URL のペア
	url : [
		['../images/banner/img_24.gif', 'サークルＫ', 'http://www.circleksunkus.jp/', ''],
		['../images/banner/img_26.gif', 'サンクス', 'http://www.circleksunkus.jp/', ''],
		['../images/banner/img_28.gif', 'セブン-イレブン', 'http://www.sej.co.jp/', ''],
		['../images/banner/img_30.gif', 'ミニストップ', 'http://www.ministop.co.jp/', '']
	],

	// 順番のシャッフル
	shuffle : function() {
		for (i = this.url.length; i > 0; --i) {
			tmp = this.url[p = Math.floor(Math.random()*i)] ;
			this.url[p] = this.url[i-1] ;
			this.url[i-1] = tmp ;
		}
	},

	p : 0, // 表示画像のポインタ

	// 画像表示
	put : function() {
		if (this.p >= this.url.length) this.p = 0 ;
		if(this.url[this.p][2] == '') {
			return '<p class="image"><img src="' +this.url[this.p][0]+ '" alt="' +this.url[this.p][1]+ '" title="' +this.url[this.p][1]+ '" /></p><p class="notes">' +this.url[this.p++][3]+ '</p>';
		}else{
			return '<p class="image"><a href="' +this.url[this.p][2]+ '" target="_blank"><img src="' +this.url[this.p][0]+ '" alt="' +this.url[this.p][1]+ '" title="' +this.url[this.p][1]+ '" /></a></p><p class="notes">' +this.url[this.p++][3]+ '</p>';
		}
	}

};


// 画像指定: ファミレス
var block02_images = {
	// 画像とジャンプ先の URL のペア
	url : [
		['../images/banner/img_49.gif', '大戸屋', 'http://www.ootoya.com/', ''],
		['../images/banner/img_51.gif', 'Sizzler', 'http://www.sizzler.jp/', ''],
		['../images/banner/img_53.gif', 'Royal Host', 'http://www.royal.co.jp/', '<a href="#ex01">※1</a>'],
		['../images/banner/img_55.gif', 'Denny\'s', 'http://www.dennys.co.jp/dj/', ''],
		['../images/banner/img_57.gif', '和食さと', 'http://www.sato-restaurant-systems.co.jp/shop/sato/sato_info.html', ''],
		['../images/banner/img_59.gif', 'さとすし半', 'http://www.sato-restaurant-systems.co.jp/shop/han/han_info.html', ''],
		['../images/banner/img_67.gif', 'すし半', 'http://www.sato-restaurant-systems.co.jp/shop/han/han_info2.html', ''],
		['../images/banner/img_68.gif', 'かごの屋', 'http://www.kinrei.com/r/kagonoya/', ''],
		['../images/banner/img_69.gif', 'がんこ', 'http://www.gankofood.co.jp/group/washoku/', ''],
		['../images/banner/img_70.gif', 'がんこ寿司', 'http://www.gankofood.co.jp/group/sushi/', ''],
		['../images/banner/img_71.gif', '炉ばた料理がんこ', 'http://www.gankofood.co.jp/group/robata/', ''],
		['../images/banner/img_72.gif', 'こがんこ', 'http://www.gankofood.co.jp/group/koganko/', ''],
		['../images/banner/img_79.gif', 'さぼてん', 'http://www.ghf.co.jp/saboten/', '<a href="#ex02">※2</a>'],
		['../images/banner/img_80.gif', 'てんや', 'http://www.tenya.co.jp/', '<a href="#ex01">※1</a>'],
		['../images/banner/img_81.gif', 'とんかつがんこ', 'http://www.gankofood.co.jp/group/tonkatsu/', ''],
		['../images/banner/img_82.gif', '康竜', 'http://kouryu.org/', ''],
		['../images/banner/img_83.gif', '五味八珍', 'http://www.gomihattin.co.jp/shop/' ,'<a href="#ex03">※3</a>'],
		['../images/banner/img_84.gif', '回転寿司がんこ', 'http://www.gankofood.co.jp/group/sushi/' ,''],
		['../images/banner/img_92.gif', 'CAFE DE CRIE', 'http://www.pokkacreate.co.jp/' ,''],
		['../images/banner/img_94.gif', 'ニュートーキョー', 'http://www.newtokyo.co.jp/' ,'<a href="#ex01">※1</a>'],
		['../images/banner/img_95.gif', '家族亭', 'http://www.kazokutei.co.jp/' ,'<a href="#ex01">※1</a>'],
		['../images/banner/img_103.gif', '素材屋', 'http://www.kisoji.co.jp/sozaiya/' ,'<a href="#ex01">※1</a>'],
		['../images/banner/img_104.gif', '神戸らんぷ亭', 'http://www.kobelamptei.co.jp/' ,''],
		['../images/banner/img_105.gif', 'とりかく', 'http://www.kisoji.co.jp/torikaku/' ,'<a href="#ex01">※1</a>'],
		['../images/banner/img_106.gif', 'ステーキ宮', 'http://www.zict.co.jp/brand/brand.php?brand_no=100' ,'<a href="#ex05">※5</a>'],
		['../images/banner/img_107.gif', '居食ダイニング暖', 'http://www.zict.co.jp/brand/brand.php?brand_no=102' ,'<a href="#ex06">※6</a>'],
		['../images/banner/img_108.gif', '木曽路', 'http://www.kisoji.co.jp/' ,''],
		['../images/banner/img_115.gif', '和処ダイニング暖や', 'http://www.zict.co.jp/brand/brand.php?brand_no=106' ,''],
		['../images/banner/img_116.gif', 'M\'s DINING', 'http://www.zict.co.jp/brand/brand.php?brand_no=98' ,''],
		['../images/banner/img_117.gif', '食事酔房北海道', 'http://www.zict.co.jp/brand/brand.php?brand_no=103' ,'<a href="#ex04">※4</a>'],
		['../images/banner/img_118.gif', '和ぐるめ', 'http://www.aeoneaheart.co.jp/cgi-bin/shop.cgi?gyoutai_code=150' ,''],
		['../images/banner/img_119.gif', '浜木綿', 'http://www.hamayuu.co.jp/' ,''],
		['../images/banner/img_126.gif', 'グルメドール', 'http://www.aeoneaheart.co.jp/cgi-bin/shop.cgi?gyoutai_code=130' ,''],
		['../images/banner/img_hamakatsu_01.gif', 'とんかつ浜勝', 'http://www.hamakatsu.jp/shop/search2/' ,''],
		['../images/banner/img_127.gif', '山田うどん', 'http://www.yamada-udon.com/' ,'<a href="#ex07">※7</a>'],
		['../images/banner/img_128.gif', '四季亭', 'http://www.hamayuu.co.jp/sikitei/' ,''],
		['../images/banner/img_129.gif', '中国料理浜木綿', 'http://www.hamayuu.co.jp/hamayuu/' ,''],
		['../images/banner/img_130.gif', '中国料理はまゆう', 'http://www.hamayuu.co.jp/hamayuu/' ,''],
		['../images/banner/img_131.gif', 'バーガーキング', 'http://www.burgerkingjapan.co.jp/' ,''],
		['../images/banner/img_132.gif', 'ファミール', 'http://lbs.mapion.co.jp/map/uc/Top?grp=sevenandifs&br=03' ,''],
		['../images/banner/img_133.gif', '芝のらーめん屋さん', 'http://lbs.mapion.co.jp/map/uc/Top?grp=sevenandifs&br=05' ,''],
		['../images/banner/img_134_test.gif', '上島珈琲店', 'http://www.ueshima-coffee-ten.jp/' ,''],
		['../images/banner/img_friendly.gif', 'フレンドリー', 'http://www.friendly-co.com/friendly/lunch.htm' ,''],
		['../images/banner/img_eatmeet.gif', 'い～とみ～と', 'http://www.friendly-co.com/eatmeet/' ,'']
		['../images/banner/img_137.gif', '平城苑', 'http://www.heijouen.co.jp/' ,'']
		['../images/banner/img_136.gif', '無印良品', 'http://www.muji.net/shop/cafemeal.html/' ,''],
	],

	// 順番のシャッフル
	shuffle : function() {
		for (i = this.url.length; i > 0; --i) {
			tmp = this.url[p = Math.floor(Math.random()*i)] ;
			this.url[p] = this.url[i-1] ;
			this.url[i-1] = tmp ;
		}
	},

	p : 0, // 表示画像のポインタ

	// 画像表示
	put : function() {
		if (this.p >= this.url.length) this.p = 0 ;
		if(this.url[this.p][2] == '') {
			return '<p class="image"><img src="' +this.url[this.p][0]+ '" alt="' +this.url[this.p][1]+ '" title="' +this.url[this.p][1]+ '" /></p><p class="notes">' +this.url[this.p++][3]+ '</p>';
		}else{
			return '<p class="image"><a href="' +this.url[this.p][2]+ '" target="_blank"><img src="' +this.url[this.p][0]+ '" alt="' +this.url[this.p][1]+ '" title="' +this.url[this.p][1]+ '" /></a></p><p class="notes">' +this.url[this.p++][3]+ '</p>';
		}

	}
};


onload = function() {
	block01_images.shuffle() ;
	divs = document.getElementsByTagName('div') ;
	for (i = 0; i < divs.length; ++i) {
		if (divs[i].className != 'bannerimg_01') continue ; // class が「bannerimg_01」ではない div はスルー
		divs[i].innerHTML += block01_images.put() ;
	}
	block02_images.shuffle() ;
	divs = document.getElementsByTagName('div') ;
	for (i = 0; i < divs.length; ++i) {
		if (divs[i].className != 'bannerimg_02') continue ; // class が「bannerimg_02」ではない div はスルー
		divs[i].innerHTML += block02_images.put() ;
	}
}

