document.write('<table width="530" border="0" cellpadding="0" cellspacing="1" style="border: 1px solid #999999; ; font-size:12px; background-color:#F6F6F6;">');
document.write('  <tr style="background-color:#CF0C28;">');
document.write('    <td colspan="4">');
document.write('      <table width="100%" border="0" cellspacing="0" cellpadding="3">');
document.write('        <tr>');
document.write('          <td><img src="http://www.okitour.net/a8/car_search/img/title3.gif" width="125" height="17" align="absmiddle"></td>');
document.write('          <td align="right"><img src="http://www.okitour.net/a8/car_search/img/catch_2column.gif" width="320" height="17"></td>');
document.write('        </tr>');
document.write('      </table>');
document.write('    </td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td height="5" colspan="4" align="center"></td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td width="87" height="23" align="center"><b>ご利用開始日</b></td>');
document.write('    <td width="192"><select  name="SEARCH_YYYYMM_FROM">');
d1 = new Date();
for (i = 0; i < 6; i++) {
//    d2 = new Date((d1.getYear() < 2000) ? d1.getYear()+1900 : d1.getYear(), d1.getMonth()+i, d1.getDate());
    d2 = new Date((d1.getYear() < 2000) ? d1.getYear()+1900 : d1.getYear(), d1.getMonth()+i, 1);
    yy = (d2.getYear() < 2000) ? d2.getYear()+1900 : d2.getYear();
    mm = d2.getMonth() + 1;
    if (mm < 10) { mm = "0" + mm; }
    document.write('        <option value="' +yy + '' +mm+ '">' +yy+ '年' +mm+ '</option>');
}
document.write('      </select>');
document.write('      月');
document.write('      <select  name="SEARCH_DD_FROM">');
d1 = new Date();
d2 = new Date((d1.getYear() < 2000) ? d1.getYear()+1900 : d1.getYear(), d1.getMonth(), d1.getDate()+1);
for (i = 1; i < 31; i++) {
    d = i;
    if (d < 10) { d = "0" + d; }
    if (i == d2.getDate()){
        document.write('        <option value="' +d+ '" selected="selected">' +d+ '</option>');
    }else{
        document.write('        <option value="' +d+ '">' +d+ '</option>');
    }
}
document.write('      </select>');
document.write('      日から </td>');
document.write('    <td width="51"><b>ご返却日</b> </td>');
document.write('    <td width="193">');
document.write('      <select  name="SEARCH_YYYYMM_TO">');
d1 = new Date();
for (i = 0; i < 6; i++) {
//    d2 = new Date((d1.getYear() < 2000) ? d1.getYear()+1900 : d1.getYear(), d1.getMonth()+i, d1.getDate());
    d2 = new Date((d1.getYear() < 2000) ? d1.getYear()+1900 : d1.getYear(), d1.getMonth()+i, 1);
    yy = (d2.getYear() < 2000) ? d2.getYear()+1900 : d2.getYear();
    mm = d2.getMonth() + 1;
    if (mm < 10) { mm = "0" + mm; }
    document.write('        <option value="' +yy + '' +mm+ '">' +yy+ '年' +mm+ '</option>');
}
document.write('      </select>');
document.write('      月');
document.write('      <select  name="SEARCH_DD_TO">');
d1 = new Date();
d2 = new Date((d1.getYear() < 2000) ? d1.getYear()+1900 : d1.getYear(), d1.getMonth(), d1.getDate()+1);
for (i = 1; i < 31; i++) {
    d = i;
    if (d < 10) { d = "0" + d; }
    if (i == d2.getDate()){
        document.write('        <option value="' +d+ '" selected="selected">' +d+ '</option>');
    }else{
        document.write('        <option value="' +d+ '">' +d+ '</option>');
    }
}
document.write('      </select>');
document.write('      日まで</td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td height="5" colspan="4" align="center"></td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td height="5" align="center"><b>ご出発エリア</b></td>');
document.write('    <td height="5"><select  name="SEARCH_AREA">');
document.write('        <option value="那覇空港周辺">那覇空港周辺</option>');
document.write('        <option value="那覇市内中心部">那覇市内中心部</option>');
document.write('        <option value="本島中部リゾートエリア">本島中部リゾートエリア</option>');
document.write('        <option value="本島北部エリア">本島北部エリア</option>');
document.write('        <option value="石垣島エリア">石垣島エリア</option>');
document.write('        <option value="宮古島エリア">宮古島エリア</option>');
document.write('      </select>');
document.write('    </td>');
document.write('    <td height="5" align="center">&nbsp;</td>');
document.write('    <td height="5" align="center">&nbsp;</td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td height="5" colspan="4"></td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td height="5" colspan="4" align="center"><input name="a8" type="submit" id="a8" style="font-size:10pt;" value=" 検 索 "><input type="hidden" name="SEARCH_FLAG" value="ON"></td>');
document.write('  </tr>');
document.write('  <tr>');
document.write('    <td height="5" colspan="4" align="center"></td>');
document.write('  </tr>');
document.write('</table>');

