// 広告バナー設定



//*****************************************************

//エリアトップページ　レギュラーバナー（全国共通）

//*****************************************************

bnrMapImg = new Array()

bnrMapImg[0] = ["mapbnr/bnr_01.gif","http://www.toto.co.jp/"];
bnrMapImg[1] = ["mapbnr/bnr_02.gif","http://www.mew.co.jp/"];
bnrMapImg[2] = ["mapbnr/bnr_03.gif","http://www.inax.co.jp/"];
bnrMapImg[3] = ["mapbnr/bnr_04.gif","http://www.yamaha-living.co.jp/"];
bnrMapImg[4] = ["mapbnr/bnr_05.gif","http://www.sunwave.co.jp/"];
bnrMapImg[5] = ["mapbnr/bnr_06.gif","http://www.cleanup.co.jp/"];
bnrMapImg[6] = ["mapbnr/bnr_07.gif","http://www.noritz.co.jp/"];
bnrMapImg[7] = ["mapbnr/bnr_08.gif","http://www.micado.co.jp/"];
bnrMapImg[8] = ["mapbnr/bnr_09.gif","http://www.tostem.co.jp/"];
bnrMapImg[9] = ["mapbnr/bnr_10.gif","http://www.takara-standard.co.jp/"];
bnrMapImg[10] = ["mapbnr/bnr_11.gif","http://refopa.net/advertise_map.html"];

bnrMapImg[11] = ["mapbnr/bnr_12.gif","http://www.secom.co.jp/"];
bnrMapImg[12] = ["mapbnr/bnr_13.gif","http://www.saibugas.co.jp/"];
bnrMapImg[13] = ["mapbnr/bnr_14.gif","http://www.ykkap.co.jp/"];
bnrMapImg[14] = ["mapbnr/bnr_15.gif","http://www.toex.co.jp/"];
bnrMapImg[15] = ["mapbnr/bnr_16.gif","http://www.shinnikkei.co.jp/"];
bnrMapImg[16] = ["mapbnr/bnr_17.gif","http://www.woodone.co.jp/"];
bnrMapImg[17] = ["mapbnr/bnr_18.gif","http://www.nippori.co.jp/"];
bnrMapImg[18] = ["mapbnr/bnr_19.gif","http://www.tokyu-homes.co.jp/"];
bnrMapImg[19] = ["mapbnr/bnr_21.gif","http://www.sanwa-ss.co.jp/"];


//*****************************************************

//詳細ページ　レギュラーバナー（全国共通）

//*****************************************************

bnrMapDetailImg = new Array()

bnrMapDetailImg[0] = ["mapdetailbnr/bnr_01.gif","http://www.toto.co.jp/"];
bnrMapDetailImg[1] = ["mapdetailbnr/bnr_02.gif","http://www.mew.co.jp/"];
bnrMapDetailImg[2] = ["mapdetailbnr/bnr_03.gif","http://www.inax.co.jp/"];
bnrMapDetailImg[3] = ["mapdetailbnr/bnr_04.gif","http://www.yamaha-living.co.jp/"];
bnrMapDetailImg[4] = ["mapdetailbnr/bnr_05.gif","http://www.sunwave.co.jp/"];
bnrMapDetailImg[5] = ["mapdetailbnr/bnr_06.gif","http://www.cleanup.co.jp/"];
bnrMapDetailImg[6] = ["mapdetailbnr/bnr_07.gif","http://www.noritz.co.jp/"];
bnrMapDetailImg[7] = ["mapdetailbnr/bnr_08.gif","http://www.micado.co.jp/"];
bnrMapDetailImg[8] = ["mapdetailbnr/bnr_09.gif","http://www.tostem.co.jp/"];
bnrMapDetailImg[9] = ["mapdetailbnr/bnr_10.gif","http://www.takara-standard.co.jp/"];
bnrMapDetailImg[10] = ["mapdetailbnr/bnr_11.gif","http://refopa.net/advertise_map.html"];

bnrMapDetailImg[11] = ["mapdetailbnr/bnr_12.gif","http://www.secom.co.jp/"];
bnrMapDetailImg[12] = ["mapdetailbnr/bnr_13.gif","http://www.saibugas.co.jp/"];
bnrMapDetailImg[13] = ["mapdetailbnr/bnr_14.gif","http://www.ykkap.co.jp/"];
bnrMapDetailImg[14] = ["mapdetailbnr/bnr_15.gif","http://www.toex.co.jp/"];
bnrMapDetailImg[15] = ["mapdetailbnr/bnr_16.gif","http://www.shinnikkei.co.jp/"];
bnrMapDetailImg[16] = ["mapdetailbnr/bnr_17.gif","http://www.woodone.co.jp/"];
bnrMapDetailImg[17] = ["mapdetailbnr/bnr_18.gif","http://www.nippori.co.jp/"];
bnrMapDetailImg[18] = ["mapdetailbnr/bnr_19.gif","http://www.tokyu-homes.co.jp/"];
bnrMapDetailImg[19] = ["mapdetailbnr/bnr_21.gif","http://www.sanwa-ss.co.jp/"];


//*****************************************************

// 詳細ページラージバナー（全国共通）

//*****************************************************

bnrMapLargeImg = new Array()

bnrMapLargeImg[0] = ["maplargebnr/bnr_01.jpg","http://www.toto.co.jp/"];
bnrMapLargeImg[1] = ["maplargebnr/bnr_02.jpg","http://www.mew.co.jp/"];
bnrMapLargeImg[2] = ["maplargebnr/bnr_03.jpg","http://www.inax.co.jp/"];
bnrMapLargeImg[3] = ["maplargebnr/bnr_04.jpg","http://www.yamaha-living.co.jp/"];
bnrMapLargeImg[4] = ["maplargebnr/bnr_05.jpg","http://www.sunwave.co.jp/"];
bnrMapLargeImg[5] = ["maplargebnr/bnr_06.jpg","http://www.cleanup.co.jp/"];
bnrMapLargeImg[6] = ["maplargebnr/bnr_07.jpg","http://www.noritz.co.jp/"];
bnrMapLargeImg[7] = ["maplargebnr/bnr_08.jpg","http://www.micado.co.jp/"];
bnrMapLargeImg[8] = ["maplargebnr/bnr_09.jpg","http://www.tostem.co.jp/"];
bnrMapLargeImg[9] = ["maplargebnr/bnr_10.jpg","http://www.takara-standard.co.jp/"];
/*
bnrMapLargeImg[10] = ["maplargebnr/bnr_11.gif","http://refopa.net/advertise_map.html"];
bnrMapLargeImg[11] = ["maplargebnr/bnr_12.gif","http://www.secom.co.jp/"];
bnrMapLargeImg[12] = ["maplargebnr/bnr_13.gif","http://www.saibugas.co.jp/"];
bnrMapLargeImg[13] = ["maplargebnr/bnr_14.gif","http://www.ykkap.co.jp/"];
bnrMapLargeImg[14] = ["maplargebnr/bnr_15.gif","http://www.toex.co.jp/"];
bnrMapLargeImg[15] = ["maplargebnr/bnr_16.gif","http://www.shinnikkei.co.jp/"];
bnrMapLargeImg[16] = ["maplargebnr/bnr_17.gif","http://www.woodone.co.jp/"];
bnrMapLargeImg[17] = ["maplargebnr/bnr_18.gif","http://www.nippori.co.jp/"];
bnrMapLargeImg[18] = ["maplargebnr/bnr_19.gif","http://www.tokyu-homes.co.jp/"];
bnrMapLargeImg[19] = ["maplargebnr/bnr_21.gif","http://www.sanwa-ss.co.jp/"];

*/



// 地域別バナー設定を行なう

fncGetAreaBnr();
//*****************************************************

//都道府県別バナー設定

//*****************************************************

// 設定しないバナー設定はコメントにする。

function fncGetAreaBnr(){

	try {
		var str_url = location.href;
		if (str_url == null || str_url.length == 0){
			return false;
		}

		var int_index = str_url.indexOf("refopa.net");
		if (int_index == -1){
			return false;
		}

		var str_subdomain = str_url.substr(0, int_index - 1);
		str_subdomain = str_subdomain.replace("http://", "");

		// 都道府県別設定（地域別に必要な都道府県のみ設定する）		

		switch(str_subdomain){

			case "hokkaido":

				break;



			case "aomori":

				break;



			case "iwate":

				break;



			case "miyagi":

				break;



			case "akita":

				break;



			case "yamagata":

				break;



			case "fukushima":

				break;



			case "ibaraki":

				break;



			case "tochigi":

				break;



			case "gunma":

				break;



			case "saitama":

				break;



			case "chiba":

				break;



			case "tokyo":

				break;



			case "kanagawa":

				break;



			case "yamanashi":

				break;



			case "niigata":

				break;



			case "toyama":

				break;



			case "ishikawa":

				break;



			case "fukui":

				break;



			case "nagano":

				break;



			case "gifu":

				break;



			case "shizuoka":

				break;



			case "aichi":

				break;



			case "mie":

				break;



			case "shiga":

				break;



			case "kyoto":

				break;



			case "osaka":

				break;



			case "hyogo":

				break;



			case "nara":

				break;



			case "wakayama":

				break;



			case "tottori":

				break;



			case "shimane":

				break;



			case "okayama":

				break;



			case "hiroshima":

				break;



			case "yamaguchi":

				break;




			case "tokushima":

				break;



			case "kagawa":

				break;



			case "ehime":

				break;



			case "kochi":

				break;



			case "fukuoka":
				// エリアトップページ　レギュラーバナー
/*
				bnrMapImg = new Array()

				bnrMapImg[0] = ["mapbnr/" + str_subdomain + "/bnr_01.gif","http://re-form.co.jp/"];
				bnrMapImg[1] = ["mapbnr/" + str_subdomain + "/bnr_02.gif","http://www.reform-site.com/"];
				bnrMapImg[2] = ["mapbnr/" + str_subdomain + "/bnr_03.gif","http://reform-hansoku.com/"];
				bnrMapImg[3] = ["mapbnr/" + str_subdomain + "/bnr_04.jpg","http://reform-contents.com/"];
				bnrMapImg[4] = ["mapbnr/" + str_subdomain + "/bnr_05.gif","http://re-form.co.jp/"];
				bnrMapImg[5] = ["mapbnr/" + str_subdomain + "/bnr_06.gif","http://www.reform-site.com/"];
				bnrMapImg[6] = ["mapbnr/" + str_subdomain + "/bnr_07.gif","http://reform-hansoku.com/"];
				bnrMapImg[7] = ["mapbnr/" + str_subdomain + "/bnr_08.jpg","http://reform-contents.com/"];
				bnrMapImg[8] = ["mapbnr/" + str_subdomain + "/bnr_09.gif","http://re-form.co.jp/"];
				bnrMapImg[9] = ["mapbnr/" + str_subdomain + "/bnr_10.gif","http://www.reform-site.com/"];
				bnrMapImg[10] = ["mapbnr/" + str_subdomain + "/bnr_11.gif","http://reform-hansoku.com/"];
				bnrMapImg[11] = ["mapbnr/" + str_subdomain + "/bnr_12.jpg","http://reform-contents.com/"];
				bnrMapImg[12] = ["mapbnr/" + str_subdomain + "/bnr_13.gif","http://re-form.co.jp/"];
				bnrMapImg[13] = ["mapbnr/" + str_subdomain + "/bnr_14.gif","http://www.reform-site.com/"];
				bnrMapImg[14] = ["mapbnr/" + str_subdomain + "/bnr_15.gif","http://reform-hansoku.com/"];
				bnrMapImg[15] = ["mapbnr/" + str_subdomain + "/bnr_16.gif","http://reform-contents.com/"];
				bnrMapImg[16] = ["mapbnr/" + str_subdomain + "/bnr_17.gif","http://www.homeclip.co.jp/irn/kiso/index.html"];
				bnrMapImg[17] = ["mapbnr/" + str_subdomain + "/bnr_18.gif","http://www.toilet-kan.com/"];
				bnrMapImg[18] = ["mapbnr/" + str_subdomain + "/bnr_19.jpg","http://www.reformmagic.com/"];
				bnrMapImg[19] = ["mapbnr/" + str_subdomain + "/bnr_20.gif","http://inax.jp/reform/index.html"];
*/
				// 詳細ページ　レギュラーバナー
/*
				bnrMapDetailImg = new Array()

				bnrMapDetailImg[0] = ["mapdetailbnr/" + str_subdomain + "/bnr_01.gif","http://re-form.co.jp/"];
				bnrMapDetailImg[1] = ["mapdetailbnr/" + str_subdomain + "/bnr_02.gif","http://www.reform-site.com/"];
				bnrMapDetailImg[2] = ["mapdetailbnr/" + str_subdomain + "/bnr_03.gif","http://reform-hansoku.com/"];
				bnrMapDetailImg[3] = ["mapdetailbnr/" + str_subdomain + "/bnr_04.jpg","http://reform-contents.com/"];
				bnrMapDetailImg[4] = ["mapdetailbnr/" + str_subdomain + "/bnr_05.gif","http://re-form.co.jp/"];
				bnrMapDetailImg[5] = ["mapdetailbnr/" + str_subdomain + "/bnr_06.gif","http://www.reform-site.com/"];
				bnrMapDetailImg[6] = ["mapdetailbnr/" + str_subdomain + "/bnr_07.gif","http://reform-hansoku.com/"];
				bnrMapDetailImg[7] = ["mapdetailbnr/" + str_subdomain + "/bnr_08.jpg","http://reform-contents.com/"];
				bnrMapDetailImg[8] = ["mapdetailbnr/" + str_subdomain + "/bnr_09.gif","http://re-form.co.jp/"];
				bnrMapDetailImg[9] = ["mapdetailbnr/" + str_subdomain + "/bnr_10.gif","http://www.reform-site.com/"];
				bnrMapDetailImg[10] = ["mapdetailbnr/" + str_subdomain + "/bnr_11.gif","http://reform-hansoku.com/"];
				bnrMapDetailImg[11] = ["mapdetailbnr/" + str_subdomain + "/bnr_12.jpg","http://reform-contents.com/"];
				bnrMapDetailImg[12] = ["mapdetailbnr/" + str_subdomain + "/bnr_13.gif","http://re-form.co.jp/"];
				bnrMapDetailImg[13] = ["mapdetailbnr/" + str_subdomain + "/bnr_14.gif","http://www.reform-site.com/"];
				bnrMapDetailImg[14] = ["mapdetailbnr/" + str_subdomain + "/bnr_15.gif","http://reform-hansoku.com/"];
				bnrMapDetailImg[15] = ["mapdetailbnr/" + str_subdomain + "/bnr_16.gif","http://reform-contents.com/"];
				bnrMapDetailImg[16] = ["mapdetailbnr/" + str_subdomain + "/bnr_17.gif","http://re-form.co.jp/"];
				bnrMapDetailImg[17] = ["mapdetailbnr/" + str_subdomain + "/bnr_18.gif","http://www.reform-site.com/"];
				bnrMapDetailImg[18] = ["mapdetailbnr/" + str_subdomain + "/bnr_19.jpg","http://reform-hansoku.com/"];
				bnrMapDetailImg[19] = ["mapdetailbnr/" + str_subdomain + "/bnr_20.gif","http://reform-contents.com/"];
*/
				// 詳細ページラージバナー
/*
				bnrMapLargeImg = new Array()

				bnrMapLargeImg[0] = ["maplargebnr/" + str_subdomain + "/bnr_large_01.jpg","http://re-form.co.jp/"];
				bnrMapLargeImg[1] = ["maplargebnr/" + str_subdomain + "/bnr_large_02.jpg","http://www.reform-site.com/"];
				bnrMapLargeImg[2] = ["maplargebnr/" + str_subdomain + "/bnr_large_03.jpg","http://reform-hansoku.com/"];
				bnrMapLargeImg[3] = ["maplargebnr/" + str_subdomain + "/bnr_large_04.jpg","http://reform-contents.com/"];
				bnrMapLargeImg[4] = ["maplargebnr/" + str_subdomain + "/bnr_large_05.jpg","http://re-form.co.jp/"];
				bnrMapLargeImg[5] = ["maplargebnr/" + str_subdomain + "/bnr_large_06.jpg","http://www.reform-site.com/"];
				bnrMapLargeImg[6] = ["maplargebnr/" + str_subdomain + "/bnr_large_07.jpg","http://reform-hansoku.com/"];
				bnrMapLargeImg[7] = ["maplargebnr/" + str_subdomain + "/bnr_large_08.jpg","http://reform-contents.com/"];
				bnrMapLargeImg[8] = ["maplargebnr/" + str_subdomain + "/bnr_large_09.jpg","http://re-form.co.jp/"];
				bnrMapLargeImg[9] = ["maplargebnr/" + str_subdomain + "/bnr_large_10.jpg","http://www.reform-site.com/"];
*/
				break;



			case "saga":

				break;



			case "nagasaki":

				break;



			case "kumamoto":

				break;



			case "oita":

				break;



			case "miyazaki":

				break;



			case "kagoshima":

				break;



			case "okinawa":

				break;

		}


		return true;

	} catch(ex) {

		return false;

	}

}



//エリアトップ用

function changeImg_area01(){

try {


		//Foot

		var i01 = Math.floor(Math.random()*bnrMapImg.length);
		var obj_img01 = document.getElementById("mapFootImg01");
		var obj_alink01 =  document.getElementById("mapFootLink01");
		obj_img01.src = bnrMapImg[i01][0];
		obj_alink01.href = bnrMapImg[i01][1];

		var i02 = Math.floor(Math.random()*bnrMapImg.length);
		var obj_img02 = document.getElementById("mapFootImg02");
		var obj_alink02 =  document.getElementById("mapFootLink02");
		obj_img02.src = bnrMapImg[i02][0];
		obj_alink02.href = bnrMapImg[i02][1];

		var i03 = Math.floor(Math.random()*bnrMapImg.length);
		var obj_img03 = document.getElementById("mapFootImg03");
		var obj_alink03 =  document.getElementById("mapFootLink03");
		obj_img03.src = bnrMapImg[i03][0];
		obj_alink03.href = bnrMapImg[i03][1];


		// 重複防止

		if (bnrMapImg.length >=5 ){
			if (i01 == i02 || i01 == i03 || i02 == i03){
				changeImg_area01();
			}
		}

		return true

	} catch(ex) {

		return false

	}

}



//詳細ページ用

function changeImg_map02_up(){

try {

		//Large

		var iLarge = Math.floor(Math.random()*bnrMapLargeImg.length);
		var obj_imgLarge = document.getElementById("mapLargeImg01");
		var obj_alink_large01 =  document.getElementById("mapLargeLink01");
		obj_imgLarge.src = bnrMapLargeImg[iLarge][0];
		obj_alink_large01.href = bnrMapLargeImg[iLarge][1];

		//Head

		var iHead = Math.floor(Math.random()*bnrMapDetailImg.length);
		var obj_imgHead = document.getElementById("mapHeadImg01");
		var obj_alink_head01 =  document.getElementById("mapHeadLink01");
		obj_imgHead.src = bnrMapDetailImg[iHead][0];
		obj_alink_head01.href = bnrMapDetailImg[iHead][1];

		//Foot

		var i01 = Math.floor(Math.random()*bnrMapDetailImg.length);
		var obj_img01 = document.getElementById("mapFootImg01");
		var obj_alink01 =  document.getElementById("mapFootLink01");
		obj_img01.src = bnrMapDetailImg[i01][0];
		obj_alink01.href = bnrMapDetailImg[i01][1];

		var i02 = Math.floor(Math.random()*bnrMapDetailImg.length);
		var obj_img02 = document.getElementById("mapFootImg02");
		var obj_alink02 =  document.getElementById("mapFootLink02");
		obj_img02.src = bnrMapDetailImg[i02][0];
		obj_alink02.href = bnrMapDetailImg[i02][1];


		var i03 = Math.floor(Math.random()*bnrMapDetailImg.length);
		var obj_img03 = document.getElementById("mapFootImg03");
		var obj_alink03 =  document.getElementById("mapFootLink03");
		obj_img03.src = bnrMapImg[i03][0];
		obj_alink03.href = bnrMapImg[i03][1];


		// 重複防止（８件以上ある場合のみ）

		if (bnrMapDetailImg.length >=8 ){
			if (i01 == i02 || i01 == i03 || i02 == i03 || iHead == i01 || iHead == i02 || iHead == i03){
				changeImg_map02_up();
			}
		}

		return true

	} catch(ex) {

		return false

	}

}