$('.cal').live("click",function(){
	$('#selectedDatepicker').datepicker(
			{beforeShow: readSelected,
				regional: "ja",
				numberOfMonths: 3,
				showButtonPanel: true,
				onSelect: updateSelected} ).datepicker("show");

});
// Prepare to show a date picker linked to three select controls
function readSelected() {
	$('#selectedDatepicker').val($('#selectYear').val() + '/' +
			$('#selectMonth').val() + '/' + $('#selectDate').val());
	return {};
}
// Update three select controls to match a date picker selection
function updateSelected(date) {
	$('#selectYear').val(date.substring(0, 4));
	$('#selectMonth').val(date.substring(5, 7));
	$('#selectDate').val(date.substring(8, 10));
}

