%message_to_wizard;
%( do not use %include;perso_header %)
%include_perso_header;
%define;nav()
%end;
%define;card_header(xx,yy)
%end;
%define;date(xlab,xvar,xdt,xcond)
%let;day_input;pattern="(?:0?[1-9]|1[0-9]|2[0-9]|3[0-1])" size="1" maxlength="2" xcond%in;
%let;month_input;pattern="(?:0?[1-9]|1[0-2]|VD|BR|FM|NI|PL|VT|GE|FL|PR|ME|TH|FT|JC|vd|br|fm|ni|pl|vt|ge|fl|pr|me|th|ft|jc)" size="1" maxlength="2" xcond%in;
%let;year_input;pattern="[?><~/-+]?\d*/?" size="4" maxlength="8" xcond%in;
%end;
%define;note(xx)
%end;
%define;source(xx)
%end;
%define;selector_pevent(xcnt)
%end;
%define;insert_pevent(xcnt)
%end;
%define;insert_witness(xcnt, wcnt, evt_name)
%(
%)
%end;
%define;one_witness(xcnt, wcnt, evt_name)
%end;
%(%)
%define;one_pevent(xcnt)
%if;(event.e_name != "#birt" and event.e_name != "#bapt" and event.e_name != "#deat" and event.e_name != "#buri" and event.e_name != "#crem")
%apply;date([*date/dates]0, "e_datexcnt", "event_date", "")
%if;has_witness;
%foreach;witness;
%apply;one_witness(xcnt, wcnt, "")
%if;is_last;%apply;insert_witness(xcnt, wcnt, "")%end;
%end;
%else;
%apply;insert_witness(xcnt, "0", "")
%end;
%end;
%end
%(%)
%define;one_specific_pevent(xcnt, evt_name)
%if;(event.e_name = "evt_name")
%if;("evt_name" = "#deat")
%end;
%if;("evt_name" = "#buri" or "evt_name" = "#crem")
%end;
%apply;date%with;[*date/dates]0%and;e_datexcnt%and;event_date%and;%if;("evt_name" = "#deat")onfocus='set_death_focus(xcnt)'%end;%end;
%if;(has_witness)
%foreach;witness;
%apply;one_witness(xcnt, wcnt, "evt_name")
%if;is_last;%apply;insert_witness(xcnt, wcnt, "evt_name")%end;
%end;
%else;
%apply;insert_witness(xcnt, "0", "evt_name")
%end;
%end;
%end;
%define;one_empty_specific_pevent(xcnt, evt_name)
%if;("evt_name" = "#deat")
%end;
%if;("evt_name" = "#buri" or "evt_name" = "#crem" or "evt_name" = "buri_or_crem")
%end;
%if;("evt_name"="#deat")
%apply;date([*date/dates]0, "e_datexcnt", "event_date", "onfocus='set_death_focus(xcnt)'")
%elseif("evt_name"="buri_or_crem")
%apply;date([*date/dates]0, "e_datexcnt", "event_date", "onfocus='set_buri(xcnt)'")
%else;
%apply;date([*date/dates]0, "e_datexcnt", "event_date", "")
%end;
%(
%if;("evt_name" = "#bapt")
%apply;one_empty_witness(xcnt, "1", "evt_name")
%apply;one_empty_witness(xcnt, "2", "evt_name")
%end;
%if;("evt_name" = "#bapt")
%apply;insert_witness(xcnt, "1", "evt_name")
%else;
%apply;insert_witness(xcnt, "0", "evt_name")
%end;
%)
%apply;insert_witness(xcnt, "0", "evt_name")
%end
%let;l_on1s;onkeydown="if (event.keyCode == 13) if (!event.shiftKey) javascript:document.upd.submit()"%in;
%include;trl
%include;copyr
%include;js