var calendar = null; function getCalendarClick(imgObj, obj){ getShowCalendar("calendar", obj, "calendar-container", imgObj); } function getShowCalendar(element, input, container, source){ if (!calendar){ container = $(container); new Draggable(container, {handle: "rtop", starteffect: Prototype.emptyFunction, endeffect: Prototype.emptyFunction}); calendar = new scal(element, $(input),{ updateformat: 'yyyy.mm.dd', closebutton: ' ', wrapper: container }); }else{ calendar.updateelement = $(input); } //var date = new Date($F(input)); var date = new Date(); calendar.setCurrentDate(isNaN(date) ? new Date() : date); if (source = $(source)){ Position.clone($(source), container, {setWidth: false, setHeight: false, offsetLeft: source.getWidth() + 2}); } calendar.openCalendar(); } function getProtoCalendarDate(){ }