// JavaScript Document
var now_date = new Date();
var tom_date = new Date();

var addSec = 86400000;

tom_date.setTime( now_date.getTime()+addSec );

var now_year  = document.roomsearch.ciDateY;
var now_month = document.roomsearch.ciDateM;
var now_day   = document.roomsearch.ciDateD;

// var out_year  = document.roomsearch.coDateY;
// var out_month = document.roomsearch.coDateM;
// var out_day   = document.roomsearch.coDateD;
var nn;


for( var ii=now_date.getFullYear(), jj=0; ii<=now_date.getFullYear() + 2; ii++, jj++ ){
	now_year.options[jj] = new Option( ii, ii );
	// out_year.options[jj] = new Option( ii, ii );
}
now_year.selectedIndex = 0;
// out_year.selectedIndex = 0;

for( var ii=1, kk=0; ii<=12; ii++, kk++ ){
	if(ii < 10){
		nn = "0" + ii;
	}
	else{
		nn = ii;
	}
	now_month.options[kk] = new Option( nn, nn );
	// out_month.options[kk] = new Option( nn, nn );
}
now_month.selectedIndex = now_date.getMonth();
// out_month.selectedIndex = tom_date.getMonth();

for( var ii=1, jj=0; ii<=31; ii++, jj++ ){
	if(ii < 10){
		nn = "0" + ii;
	}
	else{
		nn = ii;
	}
	now_day.options[jj] = new Option( nn, nn );
	// out_day.options[jj] = new Option( nn, nn );
}

now_day.selectedIndex = now_date.getDate() - 1;
// out_day.selectedIndex = tom_date.getDate() - 1;

