function updateArr(cal) {
		var date = cal.date;
		year = date.getFullYear();
		month = date.getMonth() + 1;
		day = date.getDate();
		if (month < 10) month = '0' + month;
		if (day < 10) day = '0'+day;
		fulldate = year + '-' + month + '-' + day;
		setArrival(fulldate, MONTHS_DAYS[date.getMonth()]);
		changeArrDate();
		startDate = date.getTime();
}
function updateDep(cal) {
		var date = cal.date;
		year = date.getFullYear();
		month = date.getMonth() + 1;
		day = date.getDate();
		if (month < 10) month = '0' + month;
		if (day < 10) day = '0'+day;
		fulldate = year + '-' + month + '-' + day;
		//alert(fulldate);
		setDeparture(fulldate, MONTHS_DAYS[date.getMonth()]);
		changeDepDate();
}
