//this is a global variable to have only one instance of the calendar
var calendar = null;
//@element => is the where the calender will be rendered by Scal.
//@input => is the where the date will be updated.
//@container => is the for dragging.
//@source => is the img/button which raises up the calender, the script will locate the calendar over this control.
function showCalendar(element, input, container, source)
{
...
...
var date = new Date($F(input));