function calcDates(sdate, edate){enddate = new Date (edate);startdate = new Date (sdate);etime = enddate.getTime();stime = startdate.getTime();duration = Math.round((etime-stime)/1000/60/60/24);
}