/*
	機　能：今すぐ検索の選択されたラジオボタンにより日付条件の使用可否を決定する
	引数１：選択されたラジオボタン
*/
function uTop10_SearchDateSel(argSelRadio) {

	var SelType = false;


	if(argSelRadio=="WRdoToday") {
		SelType = true;	
	}else if(argSelRadio=="WRdoTomorrow") {
		SelType = true;
	}else {
		SelType = false;
	}

	//日付項目を使用可否を設定する
	document.getElementById('WDdlCheckinYYYY').disabled = SelType;
	document.getElementById('WDdlCheckinMM').disabled   = SelType;
	document.getElementById('WDdlCheckinDD').disabled   = SelType;
	

	//ラジオボタンに対応した日付を表示する

	var yyyymmdd;
	var yy;
	var mm;
	var dd;
	
	if(argSelRadio!="WRdoSelDate") {
		if(argSelRadio=="WRdoToday") {				//今日の宿泊
			yyyymmdd =document.getElementById('WTxtToday').value;
		}else if(argSelRadio=='WRdoTomorrow') {		//明日の宿泊
			yyyymmdd = document.getElementById('WTxtTomorrow').value;
		}

		yy = yyyymmdd.substr(2, 2);
		mm = yyyymmdd.substr(4, 2);
		dd = yyyymmdd.substr(6, 2);
		document.getElementById('WDdlCheckinYYYY').value = yy;
		document.getElementById('WDdlCheckinMM').value = eval(mm);
		document.getElementById('WDdlCheckinDD').value = eval(dd);

	}

}

/*
	機　能：現在のラジオボタンの選択状態で日付項目のdisabledを操作する

*/
function uTop10_NowSearchDateSel() {

	if(document.getElementById('WRdoToday').checked) {
		uTop10_SearchDateSel('WRdoToday');
	}else if(document.getElementById('WRdoTomorrow').checked) {
		uTop10_SearchDateSel('WRdoTomorrow');
	}else if(document.getElementById('WRdoSelDate').checked) {
		uTop10_SearchDateSel('WRdoSelDate');
	}

}