/*----------------------
ポップアップウィンドウ
----------------------*/

function winOpen(winName,url,W,H){
	var WinD11=window.open(url,winName,'scrollbars=1,resizable=0,width='+W+',height='+H+'');
	WinD11.focus();
}


function setURL(){
	/*window.opener.location.href = "http://61.114.232.148/dev/seki/meijiyasuda/check_html/20100922/";*/
	window.opener.location.href = "http://test.my-happiness.com/";
	/*window.opener.focus();*/
}


/*----------------------
左メニュー
----------------------*/

/*過去入賞作品のご紹介*/
var prize_on;
var prize_off;
function setDisplay_prize(prize_on,prize_off){
	document.getElementById("menu_prize_on").style.display = prize_on;
	document.getElementById("menu_prize_off").style.display = prize_off;
}

/*広告のご紹介*/
var adv_on;
var adv_off;
function setDisplay_adv(adv_on,adv_off){
	document.getElementById("menu_adv_on").style.display = adv_on;
	document.getElementById("menu_adv_off").style.display = adv_off;
}

/*-------------------------------------------------------------------*/
function rnd_msg () {
	var r = 0;    var a = 0;
	var b = 0;    var msg_dat_max = 0;

	for(i=0;i<2;i++) {
		if(i) {
			msg_dat_max = a;
			r = Math.floor(Math.random() * msg_dat_max);
			r++;
		}
		a=0;b=0;
		b=a;a+= 25 ;if(i&&b<r&&r<=a) md= '<img src="img/main01.jpg" alt="第2回 MY HAPPINESS フォトコンテスト - 今年も多数のご応募ありがとうございました。心温まる写真の数々をどうぞご覧ください。" width="518" height="263"><br>';
		b=a;a+= 25 ;if(i&&b<r&&r<=a) md= '<img src="img/main02.jpg" alt="第2回 MY HAPPINESS フォトコンテスト - 今年も多数のご応募ありがとうございました。心温まる写真の数々をどうぞご覧ください。" width="518" height="263"><br>';
		b=a;a+= 25 ;if(i&&b<r&&r<=a) md= '<img src="img/main03.jpg" alt="第2回 MY HAPPINESS フォトコンテスト - 今年も多数のご応募ありがとうございました。心温まる写真の数々をどうぞご覧ください。" width="518" height="263"><br>';
		b=a;a+= 25 ;if(i&&b<r&&r<=a) md= '<img src="img/main04.jpg" alt="第2回 MY HAPPINESS フォトコンテスト - 今年も多数のご応募ありがとうございました。心温まる写真の数々をどうぞご覧ください。" width="518" height="263"><br>';
	}
	document.write(md);
}





