function change_hotel_EndDate() {
    leisure_nd = new Date(
		document.quick.chkin_yy.options[document.quick.chkin_yy.options.selectedIndex].value, 
		document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value, 
		document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value
	);
	mm = leisure_nd.getMonth();

    y = leisure_nd.getFullYear()-1;
    m = leisure_nd.getMonth()-1;
    d = leisure_nd.getDate();

	if(d == 31 && (mm == 2 || mm == 4 || mm == 6 || mm == 9 || mm == 11)){
		if(mm==2){
			d = 28;
		}else{
			d = 30;
		}
	}else if(eval(document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value) == 1){
		if(eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==29){
			m = 0;
			d = 29;
		}else if(eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==30){
			m = 0;
			d = 30;
		}else if(eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==31){
			m = 0;
			d = 31;
		}
	}else if(( d == 29 || d == 30 )&& mm == 2){
		d = 28;
	}else if((eval(document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value) == 5) && 
		eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==31){
		m = 4;
		d = 31;
	}else if((eval(document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value) == 8) && 
		eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==31){
		m = 7;
		d = 31;
	}else if((eval(document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value) == 10) && 
		eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==31){
		m = 9;
		d = 31;
	}else if((eval(document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value) == 3) && 
		eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value)==31){
		m = 2;
		d = 31;
	}
    myDate = addDate(y, m ,d, 1);
	currYear    = myDate.getFullYear();
	currMonth   = myDate.getMonth();
	currDate    = myDate.getDate();

//--- 2008/4/7’Ç‰Á•ª
//	document.quick.chkout_yy.selectedIndex = yearIndex(currYear);

	if((eval(document.quick.chkin_mm.options[document.quick.chkin_mm.options.selectedIndex].value) == 12) && 
	eval(document.quick.chkin_dd.options[document.quick.chkin_dd.options.selectedIndex].value) == 31){

		if(document.quick.chkout_yy.length <= document.quick.chkin_yy.selectedIndex + 1){
			document.quick.chkout_yy.selectedIndex = document.quick.chkin_yy.selectedIndex;
		}else{
			document.quick.chkout_yy.selectedIndex = document.quick.chkin_yy.selectedIndex + 1;
		}
	}else{
			document.quick.chkout_yy.selectedIndex = document.quick.chkin_yy.selectedIndex;
	}



	document.quick.chkout_mm.selectedIndex = currMonth;
	document.quick.chkout_dd.selectedIndex = currDate-1;
}
function addDate(year, month, date, n)
{
	var leisure_number = n * 1000 * 60 * 60 * 24;
	var targetDate = new Date(year, month, date);
	var DateInMS = targetDate.getTime();
	DateInMS += leisure_number;
	targetDate.setTime(DateInMS);
	var theYear = targetDate.getFullYear();
	var theMonth = targetDate.getMonth();
	var theDate = targetDate.getDate();
	rdt  = new Date(theYear, theMonth, theDate);
	return(rdt);
}
function weddingsub(){ 
    option = "toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=700,height=700"; 
    win = window.open('',"sub",option); 
}
