+function DateLeft() {
+ UpdateDates()
+ var dFrom = new Date(date_from)
+ var dTo = new Date(date_to)
+ var delta = Math.round(((dTo.getTime() - dFrom.getTime()))/(86400*1000))
+ dTo.setDate(dTo.getDate() - (1 + delta))
+ dFrom.setDate(dFrom.getDate() - (1 + delta))
+ date_from = toDate(dFrom)
+ date_to = toDate(dTo)
+ SetDates()
+}
+
+function DateRight() {
+ dToday = new Date();
+ UpdateDates()
+ var dFrom = new Date(date_from)
+ var dTo = new Date(date_to)
+ var delta = Math.round(((dTo.getTime() - dFrom.getTime()))/(86400*1000))
+ dFrom.setDate(dFrom.getDate() + 1 + delta)
+ dTo.setDate(dTo.getDate() + 1 + delta)
+ if (dTo>Today()) {
+ dTo = Today()
+ }
+ if (dFrom>Today()) {
+ dFrom = Today()
+ }
+ date_from = toDate(dFrom)
+ date_to = toDate(dTo)
+ SetDates()
+}
+