<%@language = "javascript" %>
<% /*
     $Revision$
     $Id$

     File:               loadCalendar.asp
     Description:        Maak kalender
     Parameters:
        mld_key:         mld_melding_key van de betreffende melding waarvan de gereed/eind datum
        doorlooptijd:    doorlooptijd in dagen
     Context:
     Note:
*/ %>

<%
DOCTYPE_Disable = true;
%>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/calendar.inc" -->

<%
// Maak een kalender
var cal_id = getFParam("cal_id");
var label = getFParam("label", "");
var datum = getFParamDate("datum", new Date);
var onChange = getFParam("onChange", "");
var onChangeDate = getFParam("onChangeDate", "");
var onChangeTime = getFParam("onChangeTime", "");
var volgnr = getFParamInt("volgnr", -1);
var calendars = getFParamInt("calendars", -1);
var readonly = (getFParamInt("readonly", 0) == 1);
var timeField = (getFParamInt("timeField", 0) == 1);
var initEmpty = (getFParamInt("initEmpty", 0) == 1);
var initTimeEmpty = (getFParamInt("initTimeEmpty", 0) == 1);
var required = (getFParamInt("required", 0) == 1);
var autoopen = (getFParamInt("autoopen", 0) == 1);
var saveValue = (getFParamInt("saveValue", 0) == 1);
var maxPast = getFParamInt("maxPast", -1);
var minFuture = getFParamInt("minFuture", -1);
var minDate = getFParamDate("minDate", null);
var maxDate = getFParamDate("maxDate", null);
var addClass = getFParam("addClass", "");
var hidden = (getFParamInt("hidden", 0) == 1);

params = { datum: datum };
if (label != "")
  params.label = label;
if (calendars > 0)
  params.calendars = calendars;
if (volgnr > 0)
  params.volgnr = volgnr;
if (onChange != "")
  params.onChange = onChange;
if (onChangeDate != "")
  params.onChangeDate = onChangeDate;
if (onChangeTime != "")
  params.onChangeTime = onChangeTime;
if (timeField)
{
  params.timeField = timeField;
  params.timeStep = parseFloat(getFParam("timeStep"));
  params.startTime = parseFloat(getFParam("startTime"));
  params.endTime = parseFloat(getFParam("endTime"));
}
if (initTimeEmpty)
  params.initTimeEmpty = true;
if (initEmpty)
  params.initEmpty = true;
if (required)
  params.required = true;
if (autoopen)
  params.autoopen = true;
if (readonly)
  params.readonly = true;
if (saveValue)
  params.saveValue = true;
if (maxPast >= 0)
  params.maxPast = maxPast;
if (minFuture >= 0)
  params.minFuture = minFuture;
if (minDate)
  params.minDate = minDate;
if (maxDate)
  params.maxDate = maxDate;
if (addClass != "")
  params.addClass = addClass;
if (hidden)
  params.hidden = true;

FCLTcalendar(cal_id, params);
%>
