<!-- ************************************ 共通 JavaScript ************************************ -->
//--検索の日付をデフォルトセットする
function getDates(){
	getyy = document.quick.chkin_yy.options[0].value;

	dd = new Date();

	year = dd.getFullYear();
	mon = dd.getMonth();
	date = dd.getDate() - 1;
	year = year - getyy; 
	document.quick.chkin_yy.selectedIndex = year;
	document.quick.chkin_mm.selectedIndex = mon;
	document.quick.chkin_dd.selectedIndex = date;
	dd2 = new Date();
	outyear = dd2.getFullYear();
	outmon = dd2.getMonth();
	outdate = dd2.getDate();
	outyear = outyear - getyy;

	if(outmon == 0 && outdate == 31){
//1月
		outdate = 0;
		outmon =  1;
	}else if(outmon == 1 && outdate == 28){
//2月
		outdate = 0;
		outmon =  2;
	}else if(outmon == 2 && outdate == 31){
//3月
		outdate = 0;
		outmon =  3;
	}else if(outmon == 3 && outdate == 30){
//4月
		outdate = 0;
		outmon =  4;
	}else if(outmon == 4 && outdate == 31){
//5月
		outdate = 0;
		outmon =  5;
	}else if(outmon == 5 && outdate == 30){
//6月
		outdate = 0;
		outmon =  6;
	}else if(outmon == 6 && outdate == 31){
//7月
		outdate = 0;
		outmon =  7;
	}else if(outmon == 7 && outdate == 31){
//8月
		outdate = 0;
		outmon =  8;
	}else if(outmon == 8 && outdate == 30){
//9月
		outdate = 0;
		outmon =  9;
	}else if(outmon == 9 && outdate == 31){
//10月
		outdate = 0;
		outmon =  10;
	}else if(outmon == 10 && outdate == 30){
//11月
		outdate = 0;
		outmon =  11;
	}else if(outmon == 11 && outdate == 31){
//12月
		outdate = 0;
		outmon =  0;
		outyear = outyear + 1;
	}
	document.quick.chkout_yy.selectedIndex = outyear;
	document.quick.chkout_mm.selectedIndex = outmon;
	document.quick.chkout_dd.selectedIndex = outdate;
}

window.onload = getDates;
<!-- ************************************ 共通 JavaScript ************************************ -->

