/* トップページ */
bnrImg = new Array();
bnrImg[0] = ["topbnr/bnr_01.gif","http://www.toto.co.jp/"];
bnrImg[1] = ["topbnr/bnr_02.gif","http://www.mew.co.jp/"];
bnrImg[2] = ["topbnr/bnr_19.gif","http://www.tokyu-homes.co.jp/"];


/* その他のページ　上部 */
otherImg = new Array();
otherImg[0] = ["otherbnr/bnr_01.gif","http://www.toto.co.jp/"];
otherImg[1] = ["otherbnr/bnr_02.gif","http://www.mew.co.jp/"];
otherImg[2] = ["otherbnr/bnr_03.gif","http://www.inax.co.jp/"];
otherImg[3] = ["otherbnr/bnr_04.gif","http://www.yamaha-living.co.jp/"];
otherImg[4] = ["otherbnr/bnr_05.gif","http://www.sunwave.co.jp/"];


/* その他のページ　右側 */
rightImg = new Array();
rightImg[0] = ["rightbnr/bnr_01.gif","http://www.toto.co.jp/"];
rightImg[1] = ["rightbnr/bnr_02.gif","http://www.mew.co.jp/"];
rightImg[2] = ["rightbnr/bnr_03.gif","http://www.inax.co.jp/"];
rightImg[3] = ["rightbnr/bnr_04.gif","http://www.yamaha-living.co.jp/"];
rightImg[4] = ["rightbnr/bnr_05.gif","http://www.sunwave.co.jp/"];
rightImg[5] = ["rightbnr/bnr_06.gif","http://www.cleanup.co.jp/"];
rightImg[6] = ["rightbnr/bnr_07.gif","http://www.noritz.co.jp/"];
rightImg[7] = ["rightbnr/bnr_08.gif","http://www.micado.co.jp/"];
rightImg[8] = ["rightbnr/bnr_09.gif","http://www.tostem.co.jp/"];
rightImg[9] = ["rightbnr/bnr_10.gif","http://www.takara-standard.co.jp/"];
rightImg[10] = ["rightbnr/bnr_11.gif","http://refopa.net/advertise_map.html"];

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



/* トップページ */

function changeImg(){
	i = Math.floor(Math.random()*bnrImg.length);
	document.bnrImg.src = bnrImg[i][0];
}



/* その他のページ */

function changeImg02(){
	i = Math.floor(Math.random()*otherImg.length);
	i01 = Math.floor(Math.random()*rightImg.length);
	i02 = Math.floor(Math.random()*rightImg.length);
	i03 = Math.floor(Math.random()*rightImg.length);

	/* 重複防止 */
	if(i01 == i02 || i01 == i03 || i02 == i03){
		changeImg02()
	}

	document.otherImg.src = otherImg[i][0];	
	document.rightImg01.src = rightImg[i01][0];
	document.rightImg02.src = rightImg[i02][0];
	document.rightImg03.src = rightImg[i03][0];
}

function changeImg03(){
	i = Math.floor(Math.random()*otherImg.length);
	document.otherImg.src = otherImg[i][0];	
}

function changeURL(){window.open(bnrImg[i][1]);}
function changeURL02(){window.open(otherImg[i][1]);}

function changeURL03(imgNo){
	if(imgNo == 'right01'){
		window.open(rightImg[i01][1]);
	}else if(imgNo == 'right02'){
		window.open(rightImg[i02][1]);
	}else{
		window.open(rightImg[i03][1]);
	}
}











