// JavaScript Document

/*===================================================*/
function Flightnav(){
/*===================================================*/
today=new Date();
tMonth=today.getMonth();
tDate=today.getDate();
msec = (new Date()).getTime();
nmsec = 1 * 1000 * 60 * 60 * 24;

//発着案内の日付処理
tYear=today.getFullYear();
tMonth2=today.getMonth()+1;
tDate2=today.getDate();

//今日の日付
dayToday01 = tMonth2+"月"+tDate+"日";
if(tMonth2 < 10){
	tMonth2="0"+tMonth2;
}
if(tDate2 < 10){
	tDate2="0"+tDate2;
}
dayToday2 = tYear+""+tMonth2+""+tDate2;

//1日後の日付
fw    = new Date(nmsec+msec);
fwYear=fw.getFullYear();
fwMonth=fw.getMonth()+1;
fwDate=fw.getDate();
dayAfter1 = fwMonth+"月"+fwDate+"日";
if(fwMonth < 10){
	fwMonth="0"+fwMonth;
}
if(fwDate < 10){
	fwDate="0"+fwDate;
}
dayAfter2 = fwYear+""+fwMonth+""+fwDate;

//1日前の日付
bw    = new Date(msec-nmsec);
bwYear=bw.getFullYear();
bwMonth=bw.getMonth()+1;
bwDate=bw.getDate();
dayBefore1 = bwMonth+"月"+bwDate+"日";
if(bwMonth < 10){
	bwMonth="0"+bwMonth;
}
if(bwDate < 10){
	bwDate="0"+bwDate;
}
dayBefore2 = bwYear+""+bwMonth+""+bwDate;

document.forms["flightnav"].elements["DAY"].options[0] = new Option(dayBefore1,dayBefore2);
document.forms["flightnav"].elements["DAY"].options[1] = new Option(dayToday01,dayToday2);
document.forms["flightnav"].elements["DAY"].options[1].selected=true;
document.forms["flightnav"].elements["DAY"].options[2] = new Option(dayAfter1,dayAfter2);

}
/*===================================================*/