%doctype;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: updfam.txt,v 5.10 2007/01/19 01:53:16 ddr Exp $ -->
  <!-- Copyright (c) 1998-2007 INRIA -->
  <!-- Modified mickroue(a)yahoo.fr 2011/12/02 geneweb-6.03 templ=templm -->
  <title>%nn;
    %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK")
      [*add::family/families]0%nn;
    %elseif;(evar_m = "ADD_PAR")[*add::family/families]0%nn;
    %elseif;(evar_m = "MOD_FAM" or evar_m = "MOD_FAM_OK")
      [*modify::family/families]0 # %evar_i;
    %elseif;(evar_m = "MRG_DUP_FAM_Y_N" or evar_m = "MRG_FAM" or
             evar_m = "MRG_FAM_OK" or evar_m = "MRG_MOD_FAM_OK")
      [*merge::family/families]1 # %evar_i;
    %end;
  </title>
  <meta name="robots" content="none" %/>
  <meta http-equiv="Content-Type" content="text/html; charset=%charset;" %/>
  <meta http-equiv="Content-Style-Type" content="text/css" %/>
  <link rel="shortcut icon" href="%image_prefix;/favicon_gwd.png" %/>
  %include.css;
  <style type="text/css">
    /* templm */
    .nobr {
    	white-space: nowrap;
    }
    .background_sex_0 {
    	background-color: rgb(173,216,230);
    }
    .background_sex_1 {
    	background-color: rgb(255,182,193);
    }
    .background_sex_2 {
    	background-color: rgb(255,0,0);
    }
    /* updind.txt, updfam.txt */
    #upd form, #upd input, #upd select, #upd textarea {
    	font-size: 11px;
    }
    #upd fieldset {
    	width: auto;
    	float: left;
    	border: solid 1px;
    	border-color: rgb(128,128,128);
    	margin: 0.2em;
    	padding: 0.2em;
    }
    #upd fieldset dt {
    	width: auto;
    	float: left;
    	font-weight: bold;
    }
    #upd input {
    	padding: 0em 0.2em 0em;
    	margin: 0em 0.2em 0em;
    }
    #upd input[type='checkbox'], #upd input[type='radio'] {
    	width: auto;
    }
    #upd legend {
    	font-size: 12px;
    	font-weight: bold;
    }
    #upd .sure {
    	background-color: rgb(144,238,144);
    }
    #upd .not_sure {
    	background-color: rgb(192,192,192);
    }
    #upd .number {
    	font-family: "Courier New", Courier, monospace;
    	font-size: 12px;
    	font-weight: bold;
    	text-align: center;
    }
  </style>
  %base_header;

%(<!-- Begin define (used in updind.txt, updfam.txt)  -->%)
  <script type="text/javascript">
  <!--
  function changeCalendar(e,v,m,c) 
  {
    var mv = m;
    switch (m) 
    {
      case "VD": mv = 1; break;
      case "BR": mv = 2; break;
      case "FM": mv = 3; break;
      case "NI": mv = 4; break;
      case "PL": mv = 5; break;
      case "VT": mv = 6; break;
      case "GE": mv = 7; break;
      case "FL": mv = 8; break;
      case "PR": mv = 9; break;
      case "ME": mv = 10; break;
      case "TH": mv = 11; break;
      case "FT": mv = 12; break;
      case "JC": mv = 13; break;
    }
    switch(c.options%[c.selectedIndex%].value) 
    {
      case 'G':
      case 'J':
      document.getElementById(e).innerHTML = '\
      <select name="' + v + '">\
        <option value=""' + (mv == 0 ? ' selected="selected"' : '') + '>%nn;-<\/option>\
        <option value="1"' + (mv == 1 ? ' selected="selected"' : '') + '>%nn;[(month)]0<\/option>\
        <option value="2"' + (mv == 2 ? ' selected="selected"' : '') + '>%nn;[(month)]1<\/option>\
        <option value="3"' + (mv == 3 ? ' selected="selected"' : '') + '>%nn;[(month)]2<\/option>\
        <option value="4"' + (mv == 4 ? ' selected="selected"' : '') + '>%nn;[(month)]3<\/option>\
        <option value="5"' + (mv == 5 ? ' selected="selected"' : '') + '>%nn;[(month)]4<\/option>\
        <option value="6"' + (mv == 6 ? ' selected="selected"' : '') + '>%nn;[(month)]5<\/option>\
        <option value="7"' + (mv == 7 ? ' selected="selected"' : '') + '>%nn;[(month)]6<\/option>\
        <option value="8"' + (mv == 8 ? ' selected="selected"' : '') + '>%nn;[(month)]7<\/option>\
        <option value="9"' + (mv == 9 ? ' selected="selected"' : '') + '>%nn;[(month)]8<\/option>\
        <option value="10"' + (mv == 10 ? ' selected="selected"' : '') + '>%nn;[(month)]9<\/option>\
        <option value="11"' + (mv == 11 ? ' selected="selected"' : '') + '>%nn;[(month)]10<\/option>\
        <option value="12"' + (mv == 12 ? ' selected="selected"' : '') + '>%nn;[(month)]11<\/option>\
      <\/select>\
      ';
      break;
      case 'F':
      document.getElementById(e).innerHTML = '\
      <select name="' + v + '">\
        <option value=""' + (mv == 0 ? ' selected="selected"' : '') + '>%nn;-<\/option>\
        <option value="1"' + (mv == 1 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]0<\/option>\
        <option value="2"' + (mv == 2 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]1<\/option>\
        <option value="3"' + (mv == 3 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]2<\/option>\
        <option value="4"' + (mv == 4 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]3<\/option>\
        <option value="5"' + (mv == 5 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]4<\/option>\
        <option value="6"' + (mv == 6 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]5<\/option>\
        <option value="7"' + (mv == 7 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]6<\/option>\
        <option value="8"' + (mv == 8 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]7<\/option>\
        <option value="9"' + (mv == 9 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]8<\/option>\
        <option value="10"' + (mv == 10 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]9<\/option>\
        <option value="11"' + (mv == 11 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]10<\/option>\
        <option value="12"' + (mv == 12 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]11<\/option>\
        <option value="13"' + (mv == 13 ? ' selected="selected"' : '') + '>%nn;[(french revolution month)]12<\/option>\
      <\/select>\
      ';
      break;
      case 'H':
      document.getElementById(e).innerHTML = '\
      <select name="' + v + '">\
        <option value=""' + (mv == 0 ? ' selected="selected"' : '') + '>%nn;-<\/option>\
        <option value="1"' + (mv == 1 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]0<\/option>\
        <option value="2"' + (mv == 2 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]1<\/option>\
        <option value="3"' + (mv == 3 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]2<\/option>\
        <option value="4"' + (mv == 4 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]3<\/option>\
        <option value="5"' + (mv == 5 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]4<\/option>\
        <option value="6"' + (mv == 6 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]5<\/option>\
        <option value="7"' + (mv == 7 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]6<\/option>\
        <option value="8"' + (mv == 8 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]7<\/option>\
        <option value="9"' + (mv == 9 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]8<\/option>\
        <option value="10"' + (mv == 10 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]9<\/option>\
        <option value="11"' + (mv == 11 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]10<\/option>\
        <option value="12"' + (mv == 12 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]11<\/option>\
        <option value="13"' + (mv == 13 ? ' selected="selected"' : '') + '>%nn;[(hebrew month)]12<\/option>\
      <\/select>\
      ';
       break;
    }
  }

  function changeDisplay(id,c,cond1,cond2) 
  {
    var d = document.getElementById(id);
    var val = c.options%[c.selectedIndex%].value;

    if (val == cond1 || val == cond2)
      {d.style.display='inline';}
    else  
      {d.style.display='none';}
  }
  
  function no_sex(id)
  {
    document.getElementById(id).className='background_sex_2';
  }
  function male(id) 
  {
    document.getElementById(id).className='background_sex_0';
  }
  function female(id) 
  {
    document.getElementById(id).className='background_sex_1';
  }
-->
</script>
  
  %define;sure_date(xvar)
    class="%if;(xvar.prec = "sure")sure%else;not_sure%end;"%nn;
  %end;  
  
  %define;date(xlab,xvar,xdate)
    <span %apply;sure_date("xdate")>
      %if;([ !dates order]0 = "ddmmyy")
        <label %apply;accesskey("xvar")>xlab
         <input name="xvar_dd" class="number" title="[year/month/day]2" size="2" maxlength="2"%sp;
         value="%xdate.day;" %/></label>
        <label>/<span id="xvar_mm_sel"><input name="xvar_mm" class="number" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;" %/></span></label>
        <label>/<input name="xvar_yyyy" class="number" title="? ~ &lt; &gt; / [year/month/day]0" size="5" maxlength="6"%sp;
         value="%xdate.year;" %/></label>
      %else;
        <label>xlab<input name="xvar_yyyy" class="number" title="? ~ &lt; &gt; / [year/month/day]0" size="5" maxlength="6"%sp;
         value="%xdate.year;" %/></label>
        <label>/<span id="xvar_mm_sel"><input name="xvar_mm" class="number" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;" %/></span></label>
        <label>/<input name="xvar_dd" class="number" title="[year/month/day]2" size="2" maxlength="2"%sp;
         value="%xdate.day;" %/></label>
      %end;
      <select name="xvar_prec" title="[*precision]0" onchange="changeDisplay('lab_xvar_oryear',this,'oryear','yearint')">
        <option value="-"%if;(xdate.prec = "") selected="selected"%end;>-</option>
        <option value="sure"%if;(xdate.prec = "sure") selected="selected"%end;>[*exact]0</option>
        <option value="about"%if;(xdate.prec = "about") selected="selected"%end;>[*about (date)]0</option>
        <option value="maybe"%if;(xdate.prec = "maybe") selected="selected"%end;>[*possibly (date)]0</option>
        <option value="before"%if;(xdate.prec = "before") selected="selected"%end;>[*before (date)]0</option>
        <option value="after"%if;(xdate.prec = "after") selected="selected"%end;>[*after (date)]0</option>
        <option value="oryear"%if;(xdate.prec = "oryear") selected="selected"%end;>&lt;- [*or] -&gt;</option>
        <option value="yearint"%if;(xdate.prec = "yearint") selected="selected"%end;>&lt;- [*between (date)] -&gt;</option>
      </select>
      <label id = "lab_xvar_oryear" %if;(xdate.oryear = "") style="display: none;"%end;>
        <input name="xvar_oryear" class="number" title="[year/month/day]0" size="5" maxlength="5" value="%xdate.oryear;" %/>
      </label>
      <select name="xvar_cal"%sp; title="[*calendar/calendars]0" 
        onchange="changeCalendar('xvar_mm_sel','xvar_mm','%xdate.month;',this)">
        <option value="G"%if;(xdate.calendar = "gregorian") selected="selected"%end;>[*gregorian/julian/french/hebrew]0</option>
        <option value="J"%if;(xdate.calendar = "julian") selected="selected"%end;>[*gregorian/julian/french/hebrew]1</option>
        <option value="F"%if;(xdate.calendar = "french") selected="selected"%end;>[*gregorian/julian/french/hebrew]2</option>
        <option value="H"%if;(xdate.calendar = "hebrew") selected="selected"%end;>[*gregorian/julian/french/hebrew]3</option>
      </select>
    <label>...[or]0 [text]0<input name="xvar_text" size="15" maxlength="30"%sp;value="%xdate.text;" %/></label>
  </span>
  %end;

  %define;source(xvar, xx)
    <label>[*source/sources]0
    <input name="xvar_src" size="40" maxlength="200"
     value="%xx_src;"%sp;id="xvar_src" %/></label>
  %end;
%(<!-- End define (used in updind.txt, updfam.txt)  -->%)

    
%( <!-- Begin define  --> %)

  %define;search_focus(xcnt)
    %if;(evar_ins_witnxcnt = "on")
      onload="javascript:document.updfam.witn%expr(xcnt+1)_fn.focus();window.scrollBy(0,60);"%nn;
    %elseif;(evar_inv_chxcnt = "on")
      onload="javascript:document.updfam.ins_ch0_n.focus();window.scrollBy(0,60);"%nn;
    %elseif;(xcnt < 10)
      %apply;search_focus(xcnt + 1)      
    %end;
  %end;
  
  %define;load_focus()
    %if;(evar_m = "ADD_FAM_OK" or evar_m = "MOD_FAM_OK" or evar_m = "MRG_MOD_FAM_OK")
      %if;(evar_ins_ch0 = "on" or evar_ins_ch0_n > 1 and evar_ins_ch0_n < 10)
        onload="javascript:document.updfam.ins_ch0_n.focus();window.scrollBy(0,60);"%nn;
      %else;
        %apply;search_focus(0)
      %end;
    %elseif;(evar_m = "ADD_FAM" or evar_m = "ADD_PAR")
      %if;(father.first_name = "")
        onload="javascript:document.updfam.pa1_fn.focus();"%nn;
      %else;
        onload="javascript:document.updfam.pa2_fn.focus();"%nn;
      %end;
    %elseif;(evar_ins_ch > 1 and evar.ins_ch < 10)
      onload="javascript:document.updfam.submit();"%nn;
    %else;
      onload="javascript:document.updfam.ins_ch0_n.focus();"%nn;
    %end;
  %end;
  
  %define;accesskey(xvar)
    %if;("xvar"="marr")
      title="[*marriage/marriages]0 (2)" accesskey="2"%nn;
    %end;
  %end;
  <script type="text/javascript">
  <!--
    function show(xx) {
    document.getElementById(xx).style.display='inline';
    }
    
    function hide(xx) {
      document.getElementById(xx).style.display='none';
    }
    
    function fill_place(xx) 
    {
      switch(xx.value) {
      case "1": xx.value = document.updfam.pa1b_pl.value;
      break;
      case "2": xx.value = document.updfam.pa1d_pl.value;
      break;
      case "3": xx.value = document.updfam.pa2b_pl.value;
      break;
      case "4": xx.value = document.updfam.pa2d_pl.value;
      break;
      case "*": xx.value = document.updfam.marr_place.value;
      break;
      case "0": xx.value = document.updfam.ch1b_pl.value;
      break;
      case "+": xx.value = document.updfam.ch1d_pl.value;
      break;}
    }
  //-->
  </script>

  %define;place(xvar,xx)
    <label>[*place]
    <input name="xvar_place" size="40" maxlength="200"%sp;
    title="[*place] : 1,2,3,4,*,0,+"%sp;
    value="%xx_place;" id="xvar_place" onblur="fill_place(this)" %/></label>
  %end;

  %define;small_date(kind,xvar,xx)
    %if;([ !dates order]0 = "ddmmyy")
      <label>[*kind]<input name="xvar_dd" class="number" title="[year/month/day]2" size="2" maxlength="2"%sp;
      value="%xx.create.kind_day;" %/></label>
      <label>/<input name="xvar_mm" class="number" title="[year/month/day]1" size="2" maxlength="2"%sp;
      value="%xx.create.kind_month;" %/></label>
      <label>/<input name="xvar_yyyy" class="number" title="~ &lt; &gt; [year/month/day]0" size="5" maxlength="6"%sp;
        value="%xx.create.kind_year;" %/></label>
    %else;
      <label>[*kind]<input name="xvar_yyyy" class="number" title="~ &lt; &gt; [year/month/day]0" size="5" maxlength="6"%sp;
        value="%xx.create.kind_year;" %/></label>
      <label>/<input name="xvar_mm" class="number" title="[year/month/day]1" size="2" maxlength="2"%sp;
        value="%xx.create.kind_month;" %/></label>
      <label>/<input name="xvar_dd" class="number" title="[year/month/day]2" size="2" maxlength="2"%sp;
        value="%xx.create.kind_day;" %/></label>
    %end;
    <label>[*place]
      <input name="xvar_pl" size="20" maxlength="200" title="[*place] : 1,2,3,4,*,0,+"%sp;
      value="%xx.create.kind_place;" id="xvar_pl" onblur="fill_place(this)" %/></label>
  %end;

  %define;birth(xvar,xx)
    %apply;small_date("birth","xvarb","xx")
  %end;

  %define;death(xvar,xx)
    %apply;small_date("death","xvard","xx")
  %end;

  %define;type_sex(beg,xcnt,xx)
    <label  class="background_sex_2"><input type="radio" name="begxcnt_sex" onclick="no_sex('begxcnt')" value="N"%nn;
      %if;(xx.create.sex = "neuter") checked="checked"%end; %/>?</label>
    <label class="background_sex_0"><input type="radio" name="begxcnt_sex" onclick="male('begxcnt')" value="M"%nn;
      %if;(xx.create.sex = "male") checked="checked"%end; %/>[M/F]0</label>
    <label class="background_sex_1"><input type="radio" name="begxcnt_sex" onclick="female('begxcnt')" value="F"%nn;
      %if;(xx.create.sex = "female") checked="checked"%end; %/>[M/F]1</label>
  %end;
  
  %define;insert_parent(xcnt)
    <label title="[*insert::parents]"><input type="checkbox" name="ins_paxcnt" value="on" %/></label>
    <label title="[*insert] 2  .9 [parents]"><input name="ins_paxcnt_n" class="number" size="1" maxlength="1"%sp;value="" %/></label>
  %end;

  %define;insert_witness(xcnt)
    <label title="[*insert::witness/witnesses]0"><input type="checkbox" name="ins_witnxcnt" value="on" %/></label>
  %end;
  
  %define;insert_child(xcnt)
    <label title="[*insert::child/children]0"><input type="checkbox" name="ins_chxcnt" value="on" %/></label>%nn;
    <label title="[*insert] 2  .9 [child/children]1"><input name="ins_chxcnt_n" class="number" size="1" maxlength="1"%sp; value="%evar.ins_ch;" %/></label>
  %end;

  %define;invert_children(xcnt)
      <label class="nobr" title="[*invert] xcnt   . %expr(xcnt-1)">^%sp;<input type="checkbox" name="inv_chxcnt" value="on" %/></label>
  %end;

  %define;person(beg,xcnt,xx,c1,c2)
    <span class="nobr">
      <label %nn;
        %if;("begxcnt"="pa1")
          title="[*him/her]0 (1)" accesskey="1"%nn;
        %elseif;("begxcnt"="witn1")
          title="[*witness/witnesses]1 (3)" accesskey="3"%nn;
        %elseif;("begxcnt"="ch1")
          title="[*child/children]1 (4)" accesskey="4"%nn; 
        %end;>[*first name/first names]0_
        <input name="begxcnt_fn" style = "text-align: %right;;" size="30" maxlength="200"%sp;
         value="%xx.first_name;" id="begxcnt_fn" %/></label>
      <label>
        <input name="begxcnt_sn" size="30" maxlength="200"%sp;
         value="%xx.surname;" id="begxcnt_sn" %/>_[*surname/surnames]0</label>
      <label>[*number]_
        <input name="begxcnt_occ" class="number" size="5" maxlength="8" value="%xx.occ;"%sp;
         id="begxcnt_occ" %/></label>
      <label>[*link]0
        <input type="radio" name="begxcnt_p" value="link" onclick="hide('begxcnt')"%sp;
         %if;(xx.create = "link")%sp;checked="checked" %end; %/></label>
      <label>[*create]0
        <input type="radio" name="begxcnt_p" value="create" onclick="show('begxcnt')"%sp;
         %if;(xx.create = "create")%sp;checked="checked"%end; %/></label>
    </span>
    <span id="begxcnt" %if;(xx.create= "link") style="display: none;"%end;
        %if;("c1" = "yes")
          %if;(xx.create.sex = "male") class="background_sex_0"
          %elseif;(xx.create.sex = "female") class="background_sex_1"
          %else; class="background_sex_2"
          %end;
        %end;%nn;>
        %if;("c1" = "yes")
          <span class="nobr">
            %apply;type_sex("beg","xcnt","xx")
          </span>
        %end;
        %if;("c2" = "yes")
          <br %/>
          <span class="nobr">%apply;birth("begxcnt","xx")</span>
          <span class="nobr">%apply;death("begxcnt","xx")</span>
        %end;
      </span>
  %end;

%( <!-- End define --> %)
</head>

<body%body_prop; id="upd" %apply;load_focus()>
%message_to_wizard;
<form name="updfam" method="post" action="%action;">
  <p>%hidden;  
    <input type="hidden" name="digest" value="%digest;" %/>
    %if;(evar_ip != "")<input type="hidden" name="ip" value="%evar_ip;" %/>%nl;%end;
    %if;(evar_i != "")<input type="hidden" name="i" value="%evar_i;" %/>%nl;%end;
    %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK")
      <input type="hidden" name="m" value="ADD_FAM_OK" %/>%nl;
    %elseif;(evar_m = "ADD_PAR")
      <input type="hidden" name="m" value="ADD_FAM_OK" %/>%nl;
    %elseif;(evar_m = "MOD_FAM" or evar_m = "MOD_FAM_OK")
      <input type="hidden" name="m" value="MOD_FAM_OK" %/>%nl;
    %elseif;(evar_m = "MRG_DUP_FAM_Y_N" or evar_m = "MRG_FAM" or
             evar_m = "MRG_FAM_OK" or evar_m = "MRG_MOD_FAM_OK")
      <input type="hidden" name="i2" value="%evar_i2;" %/>
      %if;(evar_ini1 != "" and evar_ini2 != "")
        <input type="hidden" name="ini1" value="%evar_ini1;" %/>
        <input type="hidden" name="ini2" value="%evar_ini2;" %/>
      %end;
      %if;(evar.iexcl != "")
        <input type="hidden" name="iexcl" value="%evar.iexcl;" %/>
      %end;
      %if;(evar.fexcl != "")
        <input type="hidden" name="fexcl" value="%evar.fexcl;" %/>
      %end;
      <input type="hidden" name="m" value="MRG_MOD_FAM_OK" %/>%nl;
    %end;
  </p>
  <fieldset><legend><sup>(1)</sup>
  
        %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK")
          [*add::family/families]0
        %elseif;(evar_m = "ADD_PAR")
          [*add::family/families]0
        %elseif;(evar_m = "MOD_FAM" or evar_m = "MOD_FAM_OK")
          [*modify::family/families]0 # %evar_i;
        %elseif;(evar_m = "MRG_DUP_FAM_Y_N" or evar_m = "MRG_FAM" or
             evar_m = "MRG_FAM_OK" or evar_m = "MRG_MOD_FAM_OK")
          [*merge::family/families]1 # %evar_i;
        %end;
        &nbsp;<input type="submit" value="Ok" %/>
      </legend>
    <dl>
      %foreach;parent;
        <dt>%parent.himher;</dt>
        <dd  %if;(parent.himher = [*him/her]0)class="background_sex_0"%elseif;(parent.himher = [*him/her]1)class="background_sex_1"%end;>
          %apply;person("pa",cnt,"parent","no","yes")
          %if;(bvar.multi_parents = "yes")%apply;insert_parent(cnt)%end;
        </dd>
      %end;
      
      <dt>[*source/sources]1
        <label title="[source/sources]0 : [family/families]0 = [person/persons]1 ([create])">
          <input type="checkbox" name="rdsrc" value="on"%sp;
            %if;(evar_rdsrc = "on") checked="checked"%end;
          %/>
        </label>
      </dt>
      <dd>
        <label>[*family/families]0<input name="src" size="40" maxlength="300"
          value="%fsources;"%sp;id="src" %/></label>
        <label>[[*person/persons]1]<input name="psrc" size="40" maxlength="300"
          value="%nn;%if;(evar_psrc != "")%evar_psrc;%else;%evar_dsrc;%end;" id="psrc" %/></label>
        
      </dd>
      %if;(bvar.origin_file = "on")
        <dd>
          <label>[*file]<input name="origin_file" size="50" maxlength="200" value="%origin_file;" %/></label>
          </dd>
      %end;
    </dl>
  </fieldset>  
  <fieldset><legend><sup>(2)</sup> [*marriage/marriages]0</legend>    
    <p>
      <select name="mrel">
        <option value="marr"%if;(mrel = "marr" or mrel = "nsckm") selected="selected"%end;>[*married]</option>
        <option value="not_marr"%if;(mrel = "not_marr" or mrel = "nsck") selected="selected"%end;>[*not married]</option>
        <option value="engaged"%if;(mrel = "engaged") selected="selected"%end;>[*engaged]</option>
        <option value="no_ment"%if;(mrel = "no_ment") selected="selected"%end;>[*no mention]</option>
      </select>
      <span class="nobr">
        %apply;date([*date], "marr", "marriage")
      </span>
      <br %/>
      <span class="nobr">
        %apply;place("marr", "marriage")
        %apply;source("marr", "marriage")
      </span>
      <br %/>
        <label>[*comment]<input name="comment" size="50" maxlength="200"%sp;
          value="%comment;" id="comment" %/></label>
        <label><input type="checkbox" name="nsck" value="on%nn;
          "%if;(mrel = "nsck" or mrel = "nsckm") checked="checked"%end; %/>[*no sexes check]</label>
      <br %/>
    </p>
    <p>
      <select name="div" onchange="changeDisplay('date_divorce',this,'divorced','divorced')">
        <option value="not_divorced"%if;(divorce = "not_divorced") selected="selected"%end;>[*not divorced]</option>
        <option value="separated"%if;(divorce = "separated") selected="selected"%end;>[*separated]</option>
        <option value="divorced"%if;(divorce = "divorced") selected="selected"%end;>[*divorced]</option>
      </select>  
      <span id="date_divorce" %if;(divorce = "divorced")style="display: inline;"%else; style="display: none;"%end;>
        %apply;date([*date], "div", "divorce")
      </span>
    </p>
  </fieldset>
  <fieldset><legend><sup>(3)</sup> %apply;insert_witness("0") [*witness/witnesses]1</legend>
    <ol>
      %foreach;witness;
          <li>
          %apply;person("witn",cnt,"witness","yes","no")
          %apply;insert_witness(cnt)
          </li>
      %end;
    </ol>
  </fieldset>

  <fieldset><legend><sup>(4)</sup> %apply;insert_child("0") [*child/children]1</legend>
    <ol id="child_list">
    %foreach;child;
      <li>
        %apply;person("ch",cnt,"child","yes","yes")
        %if;(cnt != 1)
          %apply;invert_children(cnt)
        %end;
      </li>
    %end;
    </ol>
  </fieldset>
</form>

<div style="clear: both;">
  <dl>
    <dt>[*place] : </dt>
      <dd>[*him/her]0 : 1 = [birth], 2 = [death]</dd>
      <dd>[*him/her]1 : 3 = [birth], 4 = [death]</dd>
      <dd>* = [*marriage/marriages]0</dd>
      <dd>[*child/children]1 : 0 = [birth], + = [death]</dd>    
  </dl>
</div>
  %base_trailer;
  %copyright;
</body>
</html>
