function catcalc(cal) {
        var date = cal.date;
        var time = date.getTime()
        // use the _other_ field
        var field = document.getElementById("f_calcdate");
        if (field == cal.params.inputField) {
        } else {
            time += Date.DAY; 
        }
        var date2 = new Date(time);
        field.value = date2.print("%d.%m.%Y");
    }
	//input by one-click the button    
    Calendar.setup({        
        inputField     :    "f_date_a",   // id of the input field
        ifFormat       :    "%d.%m.%Y",       // format of the input field    
        timeFormat     :    "24",
        onUpdate       :    catcalc,
        button         :    "f_trigger_c1",  // trigger for the calendar (button ID)    
        range          : 	[2008, 2018]
    });    
     
    
    Calendar.setup({
        inputField     :    "f_calcdate",
        ifFormat       :    "%d.%m.%Y",	//"%Y-%m-%d %H:%M",    
        timeFormat     :    "24",
        button         :    "f_trigger_c2",  // trigger for the calendar (button ID)  
        range          : 	[2008, 2018]
    });
    
  //input by one-click the input field
    Calendar.setup2({        
        inputField     :    "f_date_a",   // id of the input field
        ifFormat       :    "%d.%m.%Y",       // format of the input field    
        timeFormat     :    "24",  
        onUpdate       :    catcalc,        
        range          : 	[2008, 2018]
    });         
    
    Calendar.setup2({
        inputField     :    "f_calcdate",
        ifFormat       :    "%d.%m.%Y",	//"%Y-%m-%d %H:%M",    
        timeFormat     :    "24",
        range          : 	[2008, 2018]
    });
   