function showmsg(){
	alert("Please select the day you want to check-in, check-out!");

}
function insdate(obj){
year = "20" + obj.substr(0,2);
month = obj.substr(2,2);
day = obj.substr(4,2);
//window.open('dateform.php?theyear=' + year + '&themonth=' + month + '&theday=' + day , '_blank', 'width=320,height=200');
//document.form.getElementByName("in_month").value="2007";

a = document.getElementById("in_day").value;
b = document.getElementById("in_month").value;
c = document.getElementById("in_year").value;
d = document.getElementById("out_day").value;
e = document.getElementById("out_month").value;
f = document.getElementById("out_year").value;


if((a == "") && (b == "") && (c == "")){
	document.getElementById("in_day").value = day;
	document.getElementById("in_month").value = month;
	document.getElementById("in_year").value = year;
}else if((d == "") && (e == "") && (f == "")){
	document.getElementById("out_day").value = day;
	document.getElementById("out_month").value = month;
	document.getElementById("out_year").value = year;
}


}
function clear_in_date(){
	document.getElementById("in_day").value = "";
	document.getElementById("in_month").value = "";
	document.getElementById("in_year").value = "";
}
function clear_out_date(){
	document.getElementById("out_day").value = "";
	document.getElementById("out_month").value = "";
	document.getElementById("out_year").value = "";
}
function chkvalue(){
a = document.getElementById("in_day").value;
b = document.getElementById("in_month").value;
c = document.getElementById("in_year").value;
d = document.getElementById("out_day").value;
e = document.getElementById("out_month").value;
f = document.getElementById("out_year").value;

window.location='https://www.sakura-hostel.co.jp/korean/reservation.php?in_day=' + a + '&in_month=' + b + '&in_year=' + c + '&out_day=' + d + '&out_month=' + e + '&out_year=' + f; 


}
