%doctype;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: updind.txt,v 5.10 2007/01/19 01:53:16 ddr Exp $ -->
  <!-- Copyright (c) 1998-2007 INRIA -->
  <!-- Modified mickroue(a)yahoo.fr 20120930 templ=templm -->
  <title>%nn;
    %if;(evar_m = "MRG_IND_OK" or evar_m = "MRG_MOD_IND_OK")
      [*merge::person/persons]1 # %index;
    %elseif;(evar_m = "MOD_IND" or evar_m = "MOD_IND_OK")
      [*modify::person/persons]0 # %index;
    %else;[*add::person/persons]0%end;
  </title>
  <meta name="robots" content="none"%/>
  <meta name="format-detection" content="telephone=no"%/>
  <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;
  %base_header;

  %define;search_focus(xcnt)
    %if;(evar_add_qualifierxcnt = "on")
      onload="javascript:document.upd.qualifier%expr(xcnt+1).focus();"%nn;
    %elseif;(evar_add_aliasxcnt = "on")
      onload="javascript:document.upd.alias%expr(xcnt+1).focus();"%nn;
    %elseif;(evar_add_first_name_aliasxcnt = "on")
      onload="javascript:document.upd.first_name_alias%expr(xcnt+1).focus();"%nn;
    %elseif;(evar_add_surname_aliasxcnt = "on")
      onload="javascript:document.upd.surname_alias%expr(xcnt+1).focus();"%nn;
    %elseif;(evar_ins_titlexcnt = "on" or evar_ins_titlexcnt_n > 1)
      onload="javascript:document.upd.t_ident%expr(xcnt+1).focus();window.scrollBy(0,60);"%nn;
    %elseif;(evar_add_relationxcnt = "on")
      onload="javascript:document.upd.r%expr(xcnt+1)_type.focus();window.scrollBy(0,60);"%nn;
    %elseif;(xcnt < 10)
      %apply;search_focus(xcnt + 1)
    %end;
  %end;

  %define;load_focus()
    %if;(evar_m = "MOD_IND_OK" or evar_m = "MRG_MOD_IND_OK")
    %apply;search_focus(0)
    %elseif;(evar_m = "MOD_IND")
      %if;(birth.prec != "sure")
        onload="javascript:document.upd.birth_d1.focus();"%nn;
      %elseif;(death.prec != "sure" and death.year != "" or death.text != "" or dead_dont_know_when or died_young)
        onload="javascript:document.upd.death_d1.focus();"%nn;
      %elseif;(of_course_dead or dont_know_if_dead)
        onload="javascript:document.upd.death.focus();"%nn;
      %else;
        onload="javascript:document.upd.first_name.focus();"%nn;
      %end;
    %end;
  %end;

%(<!-- Begin define (used in updind.txt, updfam.txt)  -->%)
  <script type="text/javascript">
  <!--
  function changeCalendar(e,v,d2,d3,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 id="' + d2 + '" name="' + v + '" onkeypress="javascript:return changeFocus(event,\''+ d3 +'\');">\
        <option value=""' + (mv == 0 ? ' selected="selected"' : '') + '>%nn;-<\/option>\
        <option value="1"' + (mv == 1 ? ' selected="selected"' : '') + '>%nn;1 - [(month)]0<\/option>\
        <option value="2"' + (mv == 2 ? ' selected="selected"' : '') + '>%nn;2 - [(month)]1<\/option>\
        <option value="3"' + (mv == 3 ? ' selected="selected"' : '') + '>%nn;3 - [(month)]2<\/option>\
        <option value="4"' + (mv == 4 ? ' selected="selected"' : '') + '>%nn;4 - [(month)]3<\/option>\
        <option value="5"' + (mv == 5 ? ' selected="selected"' : '') + '>%nn;5 - [(month)]4<\/option>\
        <option value="6"' + (mv == 6 ? ' selected="selected"' : '') + '>%nn;6 - [(month)]5<\/option>\
        <option value="7"' + (mv == 7 ? ' selected="selected"' : '') + '>%nn;7 - [(month)]6<\/option>\
        <option value="8"' + (mv == 8 ? ' selected="selected"' : '') + '>%nn;8 - [(month)]7<\/option>\
        <option value="9"' + (mv == 9 ? ' selected="selected"' : '') + '>%nn;9 - [(month)]8<\/option>\
        <option value="10"' + (mv == 10 ? ' selected="selected"' : '') + '>%nn;10 - [(month)]9<\/option>\
        <option value="11"' + (mv == 11 ? ' selected="selected"' : '') + '>%nn;11 - [(month)]10<\/option>\
        <option value="12"' + (mv == 12 ? ' selected="selected"' : '') + '>%nn;12 - [(month)]11<\/option>\
      <\/select>\
      ';
      break;
      case 'F':
      document.getElementById(e).innerHTML = '\
      <select id="' + d2 + '" name="' + v + '" onkeypress="javascript:return changeFocus(event,\''+ d3 +'\');">\
        <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 id="' + d2 + '" name="' + v + '" onkeypress="javascript:return changeFocus(event,\''+ d3 +'\');">\
        <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 changeFocus(event,id) {
    var key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (key == 42 || key == 60 || key == 62 || key == 95)
    {
     document.getElementById(id).focus();
     return false;
    }
  }
  function valid(id) {
    document.getElementById(id).focus();
    document.getElementById(id).checked = true;
  }
  function addRow(event,id) {
    var key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (key == 49 || key == 13)
    { document.getElementById(id).checked = true;
      document.upd.submit()
    }
  }
  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';
  }
  function compute(id,prec)
  {
   var x = document.getElementById(id);
   var y = document.getElementById(prec);
   if (x.value != '' && x.value != eval(x.value))
   { x.value = eval(x.value);
     y.value = 'about'
   }
  }
-->
</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")>
      <select name="xvar_cal"%sp; title="[*calendar/calendars]0"%sp; 
        onchange="changeCalendar('xvar_mm_sel','xvar_mm','xvar_d2','xvar_d3','%xdate.month;',this)"%sp;
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();">
        <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>
      %if;([ !dates order]0 = "ddmmyyyy")
        <label %apply;accesskey("xvar")>xlab%nn;
          <input id="xvar_d1" name="xvar_dd" class="number" autocomplete="off" title="[year/month/day]2" size="2" maxlength="2"%sp;
           value="%xdate.day;" onkeypress="javascript:return changeFocus(event,'xvar_d2');"%/></label>
        <span id="xvar_mm_sel"><input id="xvar_d2" name="xvar_mm" class="number" autocomplete="off" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;" onkeypress="javascript:return changeFocus(event,'xvar_d3');"%/></span>
        <input id="xvar_d3" name="xvar_yyyy" class="number" autocomplete="off" title="? /[year/month/day]0/" size="6" maxlength="12"%sp;
         value="%xdate.year;" onkeypress="javascript:return changeFocus(event,'xvar_d4');" onblur="javascript:compute('xvar_d3','xvar_d4')"%/>
      %elseif;([ !dates order]0 = "mmddyyyy")
        <label for="xvar_d1" %apply;accesskey("xvar")>xlab</label>%nn;
          <span id="xvar_mm_sel"><input id="xvar_d1" name="xvar_mm" class="number" autocomplete="off" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;" onkeypress="javascript:return changeFocus(event,'xvar_d2');"%/></span>
        <input id="xvar_d2" name="xvar_dd" class="number" autocomplete="off" title="[year/month/day]2" size="2" maxlength="2"%sp;
           value="%xdate.day;" onkeypress="javascript:return changeFocus(event,'xvar_d3');"%/>
        <input id="xvar_d3" name="xvar_yyyy" class="number" autocomplete="off" title="? /[year/month/day]0/" size="6" maxlength="12"%sp;
         value="%xdate.year;" onkeypress="javascript:return changeFocus(event,'xvar_d4');" onblur="javascript:compute('xvar_d3','xvar_d4')"%/>
      %else;
        <label %apply;accesskey("xvar")>xlab
          <input id="xvar_d1" name="xvar_yyyy" class="number" autocomplete="off" title="? /[year/month/day]0/" size="6" maxlength="12"%sp;
           value="%xdate.year;" onkeypress="javascript:return changeFocus(event,'xvar_d2');" onblur="javascript:compute('xvar_d1','xvar_d4')"%/></label>
        <span id="xvar_mm_sel"><input id="xvar_d2" name="xvar_mm" class="number" autocomplete="off" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;" onkeypress="javascript:return changeFocus(event,'xvar_d3');"%/></span>
        <input id="xvar_d3" name="xvar_dd" class="number" autocomplete="off" title="[year/month/day]2" size="2" maxlength="2"%sp;
         value="%xdate.day;" onkeypress="javascript:return changeFocus(event,'xvar_d4');"%/>
      %end;
      <select id="xvar_d4" name="xvar_prec" title="[*precision]0"
        onchange="changeDisplay('lab_xvar_oryear',this,'oryear','yearint')"
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"
        onkeypress="javascript:return changeFocus(event,'xvar_d5');"
        onkeyup="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;>[*or] -&gt;</option>
        <option value="yearint"%if;(xdate.prec = "yearint") selected="selected"%end;>[*between (date)] -&gt;</option>
      </select>
      <label id="lab_xvar_oryear" %if;(xdate.oryear = "") style="display: none;"%end;>
        <input id="xvar_d5" name="xvar_oryear" class="number" autocomplete="off" title="[year/month/day]0" size="5" maxlength="5" value="%xdate.oryear;"%/>
      </label>
      <label>…[or]0 [text]0<input name="xvar_text" size="20" maxlength="50"%sp;value="%xdate.text;"%/></label>
  </span>
  %end;

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

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

<script type="text/javascript">
<!--
  function setDead(c) 
  {
    var doc = document.upd;
    var d1 = document.getElementById('content_death');
    var d2 = document.getElementById('content_burial');
    var d3 = document.getElementById('content_death_reason');
    var val = c.options%[c.selectedIndex%].value;
      if (val == 'Auto' || val == 'NotDead' || val == 'DontKnowIfDead' || val == 'OfCourseDead')
        {d1.style.display='none';
         d2.style.display='none';
         d3.style.display='none';
         doc.burial.value = "UnknownBurial";
         doc.burial_dd.value = "";
         doc.burial_mm.value = "";
         doc.burial_yyyy.value = "";
         doc.burial_prec.value = "-";
         doc.burial_oryear.value = "";
         doc.burial_text.value = "";
         doc.burial_place.value = "";
         doc.burial_src.value = "";
        }
      else
        {d1.style.display='inline';
         d2.style.display='inline';
         d3.style.display='inline';
        }
  }
  function changeFocusDeath(event)
  {
    var d1 = document.getElementById('content_death');
    var d2 = document.getElementById('content_burial');
    var d3 = document.getElementById('content_death_reason');
    var id = document.getElementById('death');
    var key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    
    if (key == 42 || key == 43 || key == 60 || key == 62 || key == 95)
      {id.value = "Death";
       d1.style.display='inline';
       d2.style.display='inline';
       d3.style.display='inline';
       document.getElementById('death_d1').focus();
       return false;
      }
  }
  function fill_place(xx)
  {
    switch(xx.value) {
    case "2": xx.value = document.upd.birth_place.value;
    break;
    case "3": xx.value = document.upd.bapt_place.value;
    break;
    case "4": xx.value = document.upd.death_place.value;
    break;
    case "5": xx.value = document.upd.burial_place.value;
    break;}
  }
-->
</script>

%define;accesskey(xvar)
  %if;("xvar"="birth")
    title="[*birth] (2)" accesskey="2"%nn;
  %elseif;("xvar"="bapt")
    title="[*baptism] (3)" accesskey="3"%nn;
  %elseif;("xvar"="burial")
    title="[*burial] (5)" accesskey="5"%nn;
  %end;
%end;

%define;place(xvar,xx)
  <label>[*place]%nn;
    <input name="xvar_place" size="90" maxlength="200"%sp;
     title="[*place] : 2=[birth], 3=[baptism], 4=[death], 5=[burial]"%sp; 
     value="%xx_place;" id="xvar_place" onblur="fill_place(this)"%/>
   </label>
%end;

%define;insert_title(xcnt)
  <input style="display: none" type="checkbox" id="ins_titlexcnt" name="ins_titlexcnt" value="on"%/>
  <label%sp;
     %if;(xcnt=0) title="[*insert] 1…9 [title/titles]1 (6)" accesskey="6"
     %else; title="[*insert] 1…9 [title/titles]1"
     %end;>
    <input name="ins_titlexcnt_n" class="number addrow"%sp;
     autocomplete="off" size="1" maxlength="1" value=""%sp;
     onkeypress="javascript:return addRow(event,'ins_titlexcnt')"%/></label>
%end;

%define;one_title(xcnt)
  <strong>
    <label>[*title/titles]0<input name="t_identxcnt" size="15"
    value="%title.t_ident;"%sp;id="t_identxcnt"%/></label>
    <label>[*estate]0<input name="t_placexcnt" size="30"
    value="%title.t_estate;"%sp;id="t_placexcnt"%/></label>
  </strong>
  <br%/>
  <label>[*name]0
    <input name="t_namexcnt" size="20" 
    value="%title.t_name;"%sp;id="t_namexcnt"%/></label>
  <label>[*nth]0
    <input name="t_nthxcnt" class="number" autocomplete="off" size="3" value="%title.t_nth;"%sp;
    id="t_nthxcnt"%/></label>
  <label>
    <input type="checkbox" name="t_main_titlexcnt" value="on"%sp;
    %if;title.t_main; checked="checked"%end;%sp;
    onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/>[*main title]0</label>
  <dl class="nobr">
    <dt>[*begin]0</dt>
      <dd>%apply;date("", "t_date_startxcnt", "title_date_start")</dd>
    <dt>[*end]0</dt>
      <dd>%apply;date("", "t_date_endxcnt", "title_date_end")</dd>
  </dl>
%end

%define;insert_relation(xcnt)
  <label class="addrow"%sp; 
    %if;(xcnt=0)
      title="[insert::relation/relations]0 (7)" accesskey="7"
    %else;
      title="[insert::relation/relations]0"
    %end;>
   <input type="checkbox" id="add_relationxcnt" name="add_relationxcnt" value="on"%sp;
     onkeypress="return addRow(event,'add_relationxcnt')"%/></label>
%end;

%define;relations(xcnt)
  <tr class="background_sex_0">
   <td rowspan="2" class="bg7">%apply;relation_type("xcnt")</td> 
   <td>[*him/her]0</td>
   %apply;one_relation("xcnt","fath","r_father")
  </tr>
  <tr class="background_sex_1"> 
   <td>[*him/her]1</td>
   %apply;one_relation("xcnt","moth","r_mother")
   <td class="bg7">%apply;insert_relation("xcnt")</td>
  </tr>
%end;

%define;relation_type(xcnt)
  <select name="rxcnt_type" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();">
    <option value="GodParent"%if;relation.rt_godparent;%sp;selected="selected"%end;>
      %sp;[*godfather/godmother/godparents]2</option>
    <option value="Adoption"%if;relation.rt_adoption; selected="selected"%end;>
      %sp;[*adoptive father/adoptive mother/adoptive parents]2</option>
    <option value="Recognition"%if;relation.rt_recognition;%sp;selected="selected"%end;>
      %sp;[*recognizing father/recognizing mother/recognizing parents]2</option>
    <option value="CandidateParent"%if;relation.rt_candidate_parent;%sp;selected="selected"%end;>
      [*candidate father/candidate mother/candidate parents]2</option>
    <option value="FosterParent"%if;relation.rt_foster_parent;%sp;selected="selected"%end;>
      %sp;[*foster father/foster mother/foster parents]2</option>
  </select>
%end;

%define;one_relation(xcnt,xvar,xrel)
  <td>
    <input id="rxcnt_xvar_p_l" type="radio" name="rxcnt_xvar_p" value="link" title="[link]"%sp;
      %if;relation.xrel.link;%sp;checked="checked" %end;%sp;
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                 if (event.keyCode == 32) javascript:valid('rxcnt_xvar_p_c');"%/>
    <input id="rxcnt_xvar_p_c" type="radio" name="rxcnt_xvar_p" value="create" title="[create]"%sp;
      %if;relation.xrel.create;%sp;checked="checked"%end;%sp;
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                 if (event.keyCode == 32) javascript:valid('rxcnt_xvar_p_l');"%/>
  </td><td>
    <input name="rxcnt_xvar_fn" style="text-align: right;" size="30" maxlength="200"%sp;
      value="%relation.xrel.first_name;" id="rxcnt_xvar_fn"%sp;
      title="[first name/first names]0"%/>
  </td><td>
    <input name="rxcnt_xvar_sn" size="30" maxlength="200" title="[surname/surnames]0"%sp;
      value="%relation.xrel.surname;" id="rxcnt_xvar_sn"%/>
  </td><td>
    <input name="rxcnt_xvar_occ" class="number" autocomplete="off" size="5" maxlength="8" title="[number]"%sp;
      value="%relation.xrel.occ;" id="rxcnt_xvar_occ"%/>
  </td>
%end;

%(<!-- End define  -->%)
</head>
<body%body_prop; id="upd" %apply;load_focus()>
%message_to_wizard;

<form name="upd" method="post" action="%action;">
<p>
  %hidden;
  <input type="hidden" name="digest" value="%digest;"%/>
  <input type="hidden" name="i" value="%index;"%/>
  %if;(evar_m = "MRG_IND_OK" or evar_m = "MRG_MOD_IND_OK")
    %if;(evar_i2 != "")
      <input type="hidden" name="i2" value="%evar_i2;">
    %end;
    %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 != "" or evar.fexcl != "")
      <input type="hidden" name="ip" value="%evar.ip;"%/>
      %if;(evar.iexcl != "")
        <input type="hidden" name="iexcl" value="%evar.iexcl;"%/>
      %end;
      %if;(evar.fexcl != "")
        <input type="hidden" name="fexcl" value="%evar.fexcl;"%/>
      %end;
    %end;
    <input type="hidden" name="m" value="MRG_MOD_IND_OK"%/>
  %elseif;(evar_m = "MOD_IND" or evar_m = "MOD_IND_OK")
    <input type="hidden" name="m" value="MOD_IND_OK"%/>
  %else;
    <input type="hidden" name="m" value="ADD_IND_OK"%/>
  %end;
</p>

<fieldset>
  <legend>
    <sup>(1)</sup> 
    %if;(evar_m = "MRG_IND_OK" or evar_m = "MRG_MOD_IND_OK")
      [*merge::person/persons]1 # %index;
    %elseif;(evar_m = "MOD_IND" or evar_m = "MOD_IND_OK")
      [*modify::person/persons]0 # %index;
    %else;
      [*add::person/persons]0
    %end;
    &nbsp;<input type="submit" value="Ok"%/>
  </legend>
    
  <p id="sex_person" %if;is_male;class="background_sex_0"%elseif;is_female;class="background_sex_1"%else;class="background_sex_2"%end;>
    <label title="[*first name/first names]0 (1)" accesskey="1">[*first name/first names]0<input name="first_name" size="30" maxlength="200" value="%first_name;"%sp;id="first_name"%/></label>%nn;
    <br%/>
    <label>[*surname/surnames]0<input name="surname" size="30" maxlength="200" value="%surname;"%sp;id="surname"%/></label>%nn;
    <br%/>
    <label>[*number]0<input name="occ" class="number" autocomplete="off" size="3" maxlength="8" value="%occ;" id="occ"%/></label>
        [*sex] : <label class="background_sex_0"><input type="radio" id="sexM" name="sex" value="M" onclick="male('sex_person')"
      %if;is_male;%sp;checked="checked"%end;%sp;
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                 if (event.keyCode == 32) javascript:valid('sexU'), no_sex('sex_person');"%/>[M/F]0 </label>%nn;
    <label class="background_sex_2"><input type="radio" id="sexU" name="sex" value="N" onclick="no_sex('sex_person')"
      %if;not(is_male or is_female)%sp;checked="checked"%end;%sp;
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                 if (event.keyCode == 32) javascript:valid('sexF'), female('sex_person');"%/>? </label>%nn;
    <label class="background_sex_1"><input type="radio" id="sexF" name="sex" value="F" onclick="female('sex_person')"
     %if;is_female;%sp;checked="checked"%end;%sp;
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                 if (event.keyCode == 32) javascript:valid('sexM'), male('sex_person');"%/>[M/F]1 </label> <br%/>
    <label>[*public name]<input name="public_name" size="30" value="%public_name;" id="public_name"%/></label>%nn;
    <br%/>
      [*access]0 :
      <label><input id="access_1" type="radio" name="access" value="Public"%if;acc_public; checked="checked"%end;%sp;
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                   if (event.keyCode == 32) javascript:valid('access_2');"%/>[public]0</label>
      <label><input id="access_2" type="radio" name="access" value="IfTitles"%if;acc_if_titles; checked="checked"%end;%sp;
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                   if (event.keyCode == 32) javascript:valid('access_3');"%/>[if titles]0</label>
      <label><input id="access_3" type="radio" name="access" value="Private"%if;acc_private; checked="checked"%end;%sp;
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();
                   if (event.keyCode == 32) javascript:valid('access_1');"%/>[private]0</label>
    <br%/><br%/>
    %if;has_qualifiers;
      %foreach;qualifier;
    <label>[*qualifier]0<input name="qualifier%cnt;" size="30" value="%qualifier;"%sp; id="qualifier%cnt;"%/></label>%nn;
    <label class="addrow"><input type="checkbox" title="[insert::qualifier]" name="add_qualifier%cnt;" value="on"%sp;
      id="add_qualifier%cnt;" onkeypress="return addRow(event,'add_qualifier%cnt;')"%/></label>%nn;
    <br%/>
      %end;
    %elseif;(bvar.propose_qualifier != "no")
    <label>[*qualifier]0<input name="qualifier0" size="30" value="" id="qualifier0"%/></label>%nn;
    <label class="addrow"><input type="checkbox" title="[insert::qualifier]" name="add_qualifier0" value="on"%sp;
      id="add_qualifier0" onkeypress="return addRow(event,'add_qualifier0')"%/></label>%nn;
    <br%/>
    %end;
    %if;has_aliases;
      %foreach;alias;
    <label>[*alias]0<input name="alias%cnt;" size="30" value="%alias;"%sp; id="alias%cnt;"%/></label>%nn;
    <label class="addrow"><input type="checkbox" title="[insert::alias]" name="add_alias%cnt;" value="on"%sp;
      id="add_alias%cnt;" onkeypress="return addRow(event,'add_alias%cnt;')"%/></label>%nn;
    <br%/>
      %end;
    %elseif;(bvar.propose_alias != "no")
      <label>[*alias]0<input name="alias0" size="30" value="" id="alias0"%/></label>%nn;
      <label class="addrow"><input type="checkbox" title="[insert::alias]" name="add_alias0" value="on"%sp;
        id="add_alias0" onkeypress="return addRow(event,'add_alias0')"%/></label>%nn;
    <br%/>
    %end;
    %if;has_first_names_aliases;
      %foreach;first_name_alias;
    <label>[*first name alias]0<input name="first_name_alias%cnt;" size="30"%sp; value="%first_name_alias;" id="first_name_alias%cnt;"%/></label>%nn;
    <label class="addrow"><input type="checkbox" title="[insert::first name alias]" name="add_first_name_alias%cnt;"%sp;
      value="on" id="add_first_name_alias%cnt;" onkeypress="return addRow(event,'add_first_name_alias%cnt;')"%/></label>%nn;
    <br%/>
      %end;
    %else;
      <label>[*first name alias]0<input name="first_name_alias0" size="30" value=""%sp; id="first_name_alias0"%/></label>%nn;
      <label class="addrow"><input type="checkbox" title="[insert::first name alias]" name="add_first_name_alias0" value="on"%sp;
        id="add_first_name_alias0" onkeypress="return addRow(event,'add_first_name_alias0')"%/></label>%nn;
    <br%/>
    %end;
    %if;has_surnames_aliases;
      %foreach;surname_alias;
    <label>[*surname alias]0<input name="surname_alias%cnt;" size="30" value="%surname_alias;"%/></label>%nn;
    <label class="addrow"><input type="checkbox" title="[insert::surname alias]" name="add_surname_alias%cnt;" value="on"%sp;
        id="add_surname_alias%cnt;" onkeypress="return addRow(event,'add_surname_alias%cnt;')"%/></label>%nn;
    <br%/>
      %end;
    %else;
      <label>[*surname alias]0<input name="surname_alias0" size="30" value=""%sp; id="surname_alias0"%/></label>%nn;
      <label class="addrow"><input type="checkbox" title="[insert::surname alias]" name="add_surname_alias0" value="on"%sp;
        id="add_surname_alias0" onkeypress="return addRow(event,'add_surname_alias0')"%/></label>%nn;
    <br%/>
    %end;
    <br%/>
          <label>[*occupation/occupations]0 (P)<input name="occu" size="40" maxlength="200" value="%occupation;" id="occu" accesskey="P" title="[occupation/occupations] (P)"%/></label>%nn;
    <br%/><label>[*source/sources]0<input name="src" size="40" maxlength="300"%sp; value="%sources;"%sp;id="src"%/></label>%nn;
    <br%/><label>[*image/images]0<input name="image" size="30" value="%image;" id="image"%/></label>%nn;
    <br%/>
  </p>
</fieldset>

<fieldset>
  <legend><sup>(2)</sup> [*birth]</legend>
  <span class="nobr">
    %apply;date([*date/dates]0, "birth", "birth")
  </span>
  <div style="text-align:%right;">
    %apply;place("birth", "birth")
    <br%/>
    %apply;source("birth", "birth")
  </div>
</fieldset>

<fieldset>
  <legend><sup>(3)</sup> [*baptism]</legend>
  <span class="nobr">
    %apply;date([*date/dates]0, "bapt", "bapt")
  </span>
  <div style="text-align:%right;">
    %apply;place("bapt", "bapt")
    <br%/>
    %apply;source("bapt", "bapt")
  </div>
</fieldset>

<fieldset>
  <legend><sup>(4)</sup> [*death]
    <label title="[*death] (4)" accesskey="4">
    <select id="death" name="death" 
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"
      onchange="setDead(this)"
      onkeypress="return changeFocusDeath(event);"
      onkeyup="setDead(this)">
      %if;(not has_birth_date and dont_know_if_dead)
        <option value="Auto" selected="selected"> -</option>
      %end;
      <option value="NotDead"%if;not_dead; selected="selected"%end;>
       [*alive]2</option>
      <option value="DontKnowIfDead"%if;(dont_know_if_dead and has_birth_date)%sp;selected="selected"%end;>
       [*don't know]0 %nl;</option>
      <option value="OfCourseDead"%if;of_course_dead; selected="selected"%end;>
       [*of course dead]</option>
      <option value="Death"%if;(death.year != "" or death.text != "" or
       dead_dont_know_when) selected="selected"%end;>
       [*died]2</option>
      <option value="DeadYoung"%if;died_young; selected="selected"%end;>
       [*died young]2</option>
    </select>
    </label>
    <select name="death_reason" id="content_death_reason" %if;(not_dead or dont_know_if_dead or of_course_dead)style="display: none;"%end;%sp;
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();">
      <option value="Unspecified"%if;dr_unspecified;selected="selected"%end;>[*unspecified]2</option>
      <option value="Killed"%if;dr_killed; selected="selected" %end;>[*killed (in action)]2</option>
      <option value="Murdered"%if;dr_murdered;selected="selected"%end;>[*murdered]2</option>
      <option value="Executed"%if;dr_executed;selected="selected"%end;>[*executed (legally killed)]2</option>
      <option value="Disappeared"%if;dr_disappeared;selected="selected"%end;>[*disappeared]2</option>  
    </select>
  </legend>
  <div id="content_death" %if;(not_dead or dont_know_if_dead or of_course_dead)style="display: none;"%end;>
    <span class="nobr">
      %apply;date([*date/dates]0, "death", "death")
    </span>
    <div style="text-align:%right;">%apply;place("death", "death")</div>
  </div>
  <div style="text-align:%right;">%apply;source("death", "death")</div>
</fieldset>
<fieldset id="content_burial" %if;(not_dead or dont_know_if_dead or of_course_dead)style="display: none;"%end;>
  <legend><sup>(5)</sup> [*burial]
    <select name="burial" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();">
      <option value="UnknownBurial"%if;bt_unknown_burial; selected="selected"%end;>-</option>
      <option value="Buried"%if;bt_buried; selected="selected"%end;>[*buried]2</option>
      <option value="Cremated"%if;bt_cremated; selected="selected"%end;>[*cremated]2</option>
    </select>
  </legend>
  <span class="nobr">
    %apply;date([*date/dates]0, "burial", "burial")
  </span>
  <div style="text-align:%right;">
    %apply;place("burial", "burial")
    <br%/>
    %apply;source("burial", "burial")
  </div>
</fieldset>

<fieldset>
  <legend><sup>(6)</sup> %apply;insert_title("0") [*title/titles]1</legend>
  <ol>
    %if;has_titles;
      %foreach;title;
        <li>
          %apply;one_title(cnt)
          %apply;insert_title(cnt)
        </li>
      %end;
    %else;
      <li>
        %apply;one_title("1")
        %apply;insert_title("1")
      </li>
    %end;
  </ol>
</fieldset>

<fieldset>
  <legend><sup>(7)</sup> [*relation/relations]1</legend>
  <table>
    <tr>
      <td>&nbsp;</td>
      <td class="bg7">%apply;insert_relation("0")</td>
      <th><abbr title="[link]/[create]">↴ +</abbr></th>
      <th>[first name/first names]0</th>
      <th>[surname/surnames]0</th>
      <th><abbr title="[number]">#</abbr></th>
    </tr>
    %if;has_relations;
      %foreach;relation;
        %apply;relations(cnt)
      %end;
    %else;
      %apply;relations("1")
    %end;
  </table>
</fieldset>
<fieldset>
  <legend><sup>(8)</sup><label for="notes" title="[*note/notes]1 (8)" accesskey="8"> [*note/notes]1</label></legend>
    <div id="toolbar">
    %let;name;notes%in;
    %include.toolbar;
    </div>
    <textarea onkeydown="if (event.keyCode == 9) javascript:document.upd.first_name.focus();" name="notes" rows="25" cols="110" id="notes">%notes;%sq;</textarea>%sq;
    %let;name;notes%in;%nl;
    <div style = "font-size: 120%%;">%nl;%include.accent;</div>
</fieldset>
</form>
  %base_trailer;
  %copyright;
</body>
</html>
