function wopen1(){ window.open ("http://www.kokusai-hotel.com/cgi-bin/reserve/reserve.cgi?mode=102","WindowOpen1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=600")}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

	//日付情報をセット//
	var objfrm =  document.frmplanseek
	var year
	//コンボボックスの年の場所を作成
	today = new Date();

	year = today.getYear();
	if(year < 2000) { year += 1900; }
	
    var len = objfrm.cmbARRY.length;
    objfrm.cmbARRY.options[len] = new Option(year,year);
    objfrm.cmbARRY.options[len + 1] = new Option(year +1 ,year +1 );
	//コンボボックスに日付を設定
	today.setDate(today.getDate() + 1);
	objfrm.cmbARRY.value = today.getYear();
	objfrm.cmbARRM.value = today.getMonth() + 1;
	objfrm.cmbARRD.value = today.getDate();

	//サブミットボタンをクリックした
	function btnSeekSubmit(btnName) {

		//ホテル名も検索対象に入れるとき==================================
		var htl = new Array();
		htl = document.frmplanseek.cmbHOTEL.value.split(',');
//		alert(htl[0]);
//		alert(htl[1]);
		//==================================================================

		//日付の設定
		setSeekYmd(objfrm);


	//ウインドウオープンの場合
		window.open('https://asp.hotel-story.ne.jp/ver3d/planlist.asp?hcod1=' + htl[0] + '&hcod2=' + htl[1] + '&hidmode=select&mode=seek&hidSELECTARRYMD='+document.frmplanseek.hidSELECTARRYMD.value + '&hidSELECTHAKSU='+document.frmplanseek.hidSELECTHAKSU.value + '&hidSELECTadult='+document.frmplanseek.cmbADULT.value + '&hidSELECTminPrice='+document.frmplanseek.minPrice.value + '&hidSELECTmaxPrice='+document.frmplanseek.maxPrice.value,'planlist','width=800,Height=600,resizable=yes,scrollbars=yes,status=yes');

	//そのままサブミットの場合
//		document.frmplanseek.action = 'https://asp.hotel-story.ne.jp/ver3d/planlist.asp?hcod1=' + htl[0] + '&hcod2=' + htl[1] + '&mode=seek&hidSELECTARRYMD='+document.frmplanseek.hidSELECTARRYMD.value + '&hidSELECTHAKSU='+document.frmplanseek.hidSELECTHAKSU.value + '&cmbADULT='+document.frmplanseek.cmbADULT.value + '&minPrice='+document.frmplanseek.minPrice.value + '&maxPrice='+document.frmplanseek.maxPrice.value ;
//		document.frmplanseek.method = 'POST';
//		document.frmplanseek.submit();

	}

	//コンボボックスから日付にコンバート
	function setSeekYmd(obj) {
		var tmpText;
		var sIndex;

		sIndex = obj.cmbARRY.selectedIndex;
		tmpText = obj.cmbARRY.options[sIndex].value;
		sIndex = obj.cmbARRM.selectedIndex;
		tmpText = tmpText + '/' + obj.cmbARRM.options[sIndex].value;
		sIndex = obj.cmbARRD.selectedIndex;
		tmpText = tmpText + '/' + obj.cmbARRD.options[sIndex].value;

		obj.hidSELECTARRYMD.value = tmpText
	}
