<!-- 
var term = 8; //　選択表示する月数(リザーブゲートの公開月数に設定すると良いかと思います。)
var today = new Date();
var cYear = today.getFullYear();
var cMonth = today.getMonth();
var cDate = today.getDate();
var i;
var std;
var optC;
var optN;
var mstr;
for (i=0; i<term; i++) {
  cMonth++;
  if (cMonth > 12) {
    cMonth = 1;
    cYear++;
  }
  fcMonth = cMonth;
  if (cMonth < 10) { fcMonth = "0" + cMonth; }
  vcMonth = cMonth * 1;
  if (i == 0) { std = "selectedi=\"selected\""; }
  else { std = ""; }

switch (vcMonth){
case 1:
	mstr = "Jan";
	break;
case 2:
	mstr = "Feb";
	break;
case 3:
	mstr = "Mar";
	break;
case 4:
	mstr = "Apr";
	break;
case 5:
	mstr = "May";
	break;
case 6:
	mstr = "Jun";
	break;
case 7:
	mstr = "Jul";
	break;
case 8:
	mstr = "Aug";
	break;
case 9:
	mstr = "Sep";
	break;
case 10:
	mstr = "Oct";
	break;
case 11:
	mstr = "Nov";
	break;
case 12:
	mstr = "Dec";
	break;
}
  optC = optC + "<option value='"+cYear+fcMonth+"' "+std+">"+mstr+" "+cYear+"</option>\n";
}
for(i=1; i<=31; i++){
  if(i == cDate) { std = "selected=\"selected\""; }else{ std = ""; }
  optN = optN + "<option value='"+i+"' "+std+">"+i+"</option>\n";
}

function write_a_calendar() {
	document.write ("<div style='padding:0px 0px 5px 0px;'><div style='padding:0px 0px 2px 0px;'>");
	document.write ("<table class='cols4layout' style='width:100%;'><tr><th style='font-size:10px;'>");
	document.write ("Arrival</th><td style='font-size:11px;'>");
	document.write ("<nobr><select name='k_d' style='font-size:11px;'>");
	document.write (optN+"</select>\n/\n");
	document.write ("<select name='k_ym' style='font-size:11px;'>");
	document.write (optC+"</select></nobr>\n");
	document.write ("</td></tr><tr><th style='font-size:11px;'>");
	document.write ("Stay</th><td style='font-size:11px;'>");
	document.write ('<select name="s_num" style="font-size:11px;"><option value="1" selected>1</option><option value="2" >2</option>');
	document.write ('<option value="3" >3</option><option value="4" >4</option><option value="5" >5</option>');
	document.write ('<option value="6" >6</option><option value="7" >7</option><option value="8" >8</option>');
	document.write ('<option value="9" >9</option><option value="10" >10</option></select>night(s)');
	document.write ('</td></tr></table></div>');
	document.write ('<input type="submit" value="Search Plan" style="font-size:11px;width:100%"/>');
	document.write ('</div>');
}

// -->
