%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 2012/03/08 geneweb-6.04 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 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 */
    abbr {
    border-bottom: 0;
    }
    .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,255,255);
    }
    /* updind.txt */
    #sex_person, .modify_person {
    	text-align: right;
    	padding: 0.5em;
    	margin: 0em;
    }
    /* 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;
    	height: auto;
    	vertical-align: middle;
    }
    #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;
    }
    #upd th, td {
    white-space: nowrap;
    padding-left: 5px;
    padding-right: 5px;
    }
    #upd .bg7, #upd th {
    font-size: 11px;
    background-color: #E7EDB3;
    }
  </style>
  %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_dd.focus();"%nn;
  %elseif;(death.prec != "sure" and death.year != "" or death.text != "" or dead_dont_know_when)
    onload="javascript:document.upd.death_dd.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,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 valid(id) {
    document.getElementById(id).focus();
    document.getElementById(id).checked='checked';
  }
  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")>
      <select name="xvar_cal"%sp; title="[*calendar/calendars]0"%sp; 
        onchange="changeCalendar('xvar_mm_sel','xvar_mm','%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 = "ddmmyy")
        <label %apply;accesskey("xvar")>xlab
         <input id="xvar_date" name="xvar_dd" class="number" autocomplete="off" 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" autocomplete="off" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;"%/></span></label>
        <label>/<input name="xvar_yyyy" class="number" autocomplete="off" title="? /[year/month/day]0/" size="5" maxlength="6"%sp;
         value="%xdate.year;"%/></label>
      %else;
        <label %apply;accesskey("xvar")>xlab<input id="xvar_date" name="xvar_yyyy" class="number" autocomplete="off" title="? /[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" autocomplete="off" title="[year/month/day]1" size="2" maxlength="2"%sp;
         value="%xdate.month;"%/></span></label>
        <label>/<input name="xvar_dd" class="number" autocomplete="off" title="[year/month/day]2" size="2" maxlength="2"%sp;
         value="%xdate.day;"%/></label>
      %end;
      <select name="xvar_prec" title="[*precision]0"%sp;
        onchange="changeDisplay('lab_xvar_oryear',this,'oryear','yearint')"%sp;
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();">
        <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" 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
    <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  -->%)

<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 == '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';
         doc.death_date.focus();
        }
  }

  function fill_place(xx)
  {
    switch(xx.value) {
    case "1": xx.value = document.upd.birth_place.value;
    break;
    case "2": xx.value = document.upd.bapt_place.value;
    break;
    case "3": xx.value = document.upd.death_place.value;
    break;
    case "4": 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]
    <input name="xvar_place" size="40" maxlength="200"%sp;
     title="[*place] : 1=[birth], 2=[baptism], 3=[death], 4=[burial]"%sp; 
     value="%xx_place;" id="xvar_place" onblur="fill_place(this)"%/>
   </label>
%end;

%define;insert_title(xcnt)
  <label title="[*insert::title/titles]0 %expr(xcnt+1)"><input type="checkbox" name="ins_titlexcnt" value="on"%sp;
    onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></label>%nn;
  <label title="[*insert] 2…9 [title/titles]1">
    <input name="ins_titlexcnt_n" class="number" autocomplete="off" size="1" maxlength="1"%sp; value=""%/></label>
%end;

%define;one_title(xcnt)
  <strong>
    <label %if;(xcnt=1)title="[*title/titles]1 (6)" accesskey="6"%end;>[*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>[*main title]0
    <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();"%/></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 title="[insert::relation/relations]1 %expr(xcnt+1)"><input type="checkbox" name="add_relationxcnt" value="on"%sp;
  onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></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;
      %if;("xcnt_xvar"="1_fath")
        title="[*relation/relations]1 (7)" accesskey="7"
      %else;
        title="[first name/first names]0"
      %end;%/>
  </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>%nn;
    <label class="background_sex_0"> [M/F]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');"%/></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"> [M/F]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');"%/></label>%nn;
    <br%/>
    <label>[*public name]<input name="public_name" size="30" value="%public_name;" id="public_name"%/></label>%nn;
    <br%/>
      [*access]0 :
      <label>[*if titles]0<input id="access_1" 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_2');"%/></label>
      <label>[*public]0<input id="access_2" 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_3');"%/></label>
      <label>[*private]0<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');"%/></label>
    <br%/>
  </p>
  <p class="modify_person">
    %if;has_qualifiers;
      %foreach;qualifier;
    <label>[*qualifier]0<input name="qualifier%cnt;" size="30" value="%qualifier;"%sp; id="qualifier%cnt;"%/></label>%nn;
    <label><input type="checkbox" title="[insert::qualifier]" name="add_qualifier%cnt;" value="on"%sp;
      id="add_qualifier%cnt;" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></label>%nn;
    <br%/>
      %end;
    %elseif;(bvar.propose_qualifier != "no")
    <label>[*qualifier]0<input name="qualifier0" size="30" value="" id="qualifier0"%/></label>%nn;
    <label><input type="checkbox" title="[insert::qualifier]" name="add_qualifier0" value="on"%sp;
      id="add_qualifier0" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></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><input type="checkbox" title="[insert::alias]" name="add_alias%cnt;" value="on"%sp;
      id="add_alias%cnt;" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></label>%nn;
    <br%/>
      %end;
    %elseif;(bvar.propose_alias != "no")
      <label>[*alias]0<input name="alias0" size="30" value="" id="alias0"%/></label>%nn;
      <label><input type="checkbox" title="[insert::alias]" name="add_alias0" value="on"%sp;
        id="add_alias0" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></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><input type="checkbox" title="[insert::first name alias]" name="add_first_name_alias%cnt;"%sp;
      value="on" id="add_first_name_alias%cnt;" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></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><input type="checkbox" title="[insert::first name alias]" name="add_first_name_alias0" value="on"%sp;
        id="add_first_name_alias0" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></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><input type="checkbox" title="[insert::surname alias]" name="add_surname_alias%cnt;" value="on"%sp;
        onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></label>%nn;
    <br%/>
      %end;
    %else;
      <label>[*surname alias]0<input name="surname_alias0" size="30" value=""%sp; id="surname_alias0"%/></label>%nn;
      <label><input type="checkbox" title="[insert::surname alias]" name="add_surname_alias0" value="on"%sp;
        id="add_surname_alias0" onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"%/></label>%nn;
    <br%/>
    %end;
  </p>
  <p class="modify_person">
           <label>[*occupation]<input name="occu" size="40" maxlength="200" value="%occupation;" id="occu"%/></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], "birth", "birth")
  </span>
  <br%/>  
  %apply;place("birth", "birth")
  %apply;source("birth", "birth")
</fieldset>

<fieldset>
  <legend><sup>(3)</sup> [*baptism]</legend>
  <span class="nobr">
    %apply;date([*date], "bapt", "bapt")
  </span>
  <br%/>  
  %apply;place("bapt", "bapt")
  %apply;source("bapt", "bapt")
</fieldset>

<fieldset>
  <legend><sup>(4)</sup> [*death]
    <label title="[*death] (4)" accesskey="4">
    <select name="death" 
      onkeyup="setDead(this)"
      onchange="setDead(this)"
      onkeydown="if (event.keyCode == 13) javascript:document.upd.submit();"
      onkeypress="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>
  <span 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], "death", "death")
    </span>
    <br%/>
    %apply;place("death", "death")
  </span>
    %apply;source("death", "death")
</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], "burial", "burial")
  </span>
  <br%/>
  %apply;place("burial", "burial")
  %apply;source("burial", "burial")
</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 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>
