%if;(evar.t = "T")%doctype_transitional;%else;%doctype;%end;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: anctree.txt, Template x v 6.05d 2012/06/02 12:00:00 ddr/dd Exp $ -->
  <!-- copyright (c) 1998-2012 INRIA -->
  <title>%nn;
    %if;(evar.t = "A")[*male line/female line]0%nn;
    %elseif;(evar.t = "C")[*male line/female line]1%nn;
    %else[*tree]%end;
    %if;(evar.t = "A" or evar.t = "C"):%sp;
      %if;(public_name != "")%public_name;%else;%first_name;%end;
      %if;(qualifier != "") %qualifier;%end; %surname;
    %end;
  </title>
  <meta name="robots" content="none"%/>
  <meta http-equiv="Content-Style-Type" content="text/css"%/>
  <meta http-equiv="Content-Type" content="text/html; charset=%charset;"%/>
  <link rel="shortcut icon" href="%image_prefix;/favicon_gwd.png"%/>
%include.css;
  <style type="text/css"><!--
  --></style>
%base_header;
</head>

%define;image_sosa(xxx,yyy)
  <img src="%image_prefix;/sosa.png" width="10" height="10"%sp;
    style="border: none" alt=""%sp;
    title="%if;(yyy=1)%else;[direct ancestor of %s:::xxx], %end;[*Sosa] yyy"%/>%nn;
%end;

%define;display_sosa(xx)
  %if;(bvar.display_sosa="" or bvar.display_sosa="yes")
    %if;xx.has_sosa;
      %if;not cancel_links;<a href="%prefix;%xx.sosa_link;">%end;
      %apply;image_sosa%with;%sosa_ref.first_name_key_strip;%sp;
                             %sosa_ref.surname_key_strip;
                        %and;%xx.sosa;%end;
      %if;not cancel_links;</a>%end;%sp;
    %end;
  %end;
%end;

%define;image_MF(xx,wi_he)
  %if;(wizard and not cancel_links and not xx.is_restricted)
    <a href="%prefix;m=MOD_IND;i=%xx.index;">%end;
  %if;xx.is_male;
    <img src="%image_prefix;/male.png" title="[M/F]0"%sp;
  %elseif;xx.is_female;
    <img src="%image_prefix;/female.png" title="[M/F]1"%sp;
  %else;
    <img src="%image_prefix;/sexunknown.png" title="?"%sp;
  %end;
         width="wi_he" height="wi_he" style="border: none" alt=""%/>%nn;
  %if;(wizard and not cancel_links and not xx.is_restricted)</a>%end;
  %sp;
%end;

%define;display_2arrows()
  %if;not cancel_links;
    <table style="float: %right;" border="%border;"><tr><td>
      %if;has_referer;
        <a href="%referer;"><img style="border-width: thin" alt="" title="&lt;&lt;"%sp;
          src="%image_prefix;/left.png"%wid_hei;left.png;%/></a>
      %end;
      <a href="%prefix;"><img style="border-width: thin" alt="" title="^^"%sp;
        src="%image_prefix;/up.png"%wid_hei;up.png;%/></a>
    </td></tr></table>
  %end;
%end;

%define;short_display_person(xx)
  %apply;display_sosa("xx")
  %if;(cancel_links or xx.is_restricted)%xx;
  %else;<a href="%prefix;%xx.access;">%xx;</a>%end;%sp;
  %xx.title;%xx.dates;%if;xx.birthday; ([happy birthday to you!])%end;
%end;

%define;a_tree_line()
  %if;(not is_first)
    <tr>
    %foreach;cell;
      %if;(not is_first)
        <td colspan="1" align="center"><tt>&nbsp;</tt></td>
      %end;
      <td colspan="%cell.colspan;" align="center">%nn;
        %if;(cell.is_empty or cell.is_top)<tt>&nbsp;</tt>%else;|%end;
      </td>
    %end;
    </tr>
  %end;
  <tr>
  %foreach;cell;
    %if;(not is_first)
      <td colspan="1" align="center"><tt>&nbsp;</tt></td>
    %end;
    <td colspan="%cell.colspan;" align="center">%nn;
    %if;(cell.is_empty)<tt>&nbsp;</tt>%nn;
    %else;
      %if;(evar.bd != "" and evar.bd > 0 or evar.color != "")%nl;
        <table border="%evar.bd;"><tr>
        <td align="center"%nn;
         %if;(evar.color != "") style="background:%evar.color;"%end;>%nn;
      %end;
      %apply;image_MF("cell.person","13")
      %apply;short_display_person("cell.person")
      %if;(evar.bd != "" and evar.bd > 0 or evar.color != "")
        </td>
        </tr></table>
      %end;
      %if;(evar.image = "on" and cell.person.has_image)
        <br%/>
        <table border="0" align="center"><tr align="left">
        <td>%nn;
        %if;(evar.cgl != "on")<a href="%cell.person.image_html_url;">%end;
        <img%sp;
        src="%cell.person.image_url;"%cell.person.image_small_size;%sp;
         border="0" alt="" title="[image/images]0"%/>%nn;
        %if;(evar.cgl != "on")</a>%end;</td>%nl;
        </tr></table>
      %end;
    %end;
    </td>
  %end;
  </tr>
  %if;(not is_last)
    <tr>
    %foreach;cell;
      %if;(not is_first)
        <td colspan="1" align="center">%nn;
        %if;cell.is_right;
          %if;(evar.marriage = "on" and cell.family.marriage_date.year != "")
            <em style="font-size:80%%">%nn;
            -&nbsp;%cell.family.marriage_date.year;&nbsp;-</em>
          %else;<tt>&nbsp;</tt>%end;
        %else;<tt>&nbsp;</tt>%end;
        </td>
      %end;
      <td colspan="%cell.colspan;" align="center">%nn;
      %if;cell.is_empty;<tt>&nbsp;</tt>%nn;
      %elseif;cancel_links;|%nn;
      %else;
        <a style="text-decoration:none" href="%prefix;
        m=A;t=T;v=%evar.v;;%cell.person.access;
        %if;(evar.image="on");image=on%end;
        %if;(evar.marriage = "on");marriage=on%end;">|</a>%nn;
      %end;
      </td>
    %end;
    </tr>
    <tr>
    %foreach;cell;
      %if;(not is_first)
        <td colspan="1" align="center">%nn;
        %if;(cell.is_right)<hr width="100%%"%/>%nn;
        %else;<tt>&nbsp;</tt>%end;
        </td>
      %end;
      <td colspan="%cell.colspan;" align="%nn;
         %if;cell.is_left;%right;
         %elseif;cell.is_right;%left;
         %else;center%end;">%nn;
      %if;cell.is_empty;<tt>&nbsp;</tt>%nn;
      %elseif;cell.is_left;<hr dir="ltr" width="50%%" align="%right;"%/>%nn;
      %elseif;cell.is_right;<hr dir="ltr" width="50%%" align="%left;"%/>%nn;
      %else;|%end;
      </td>
    %end;
    </tr>
  %end;
%end;

%define;male_line(xx, nn)
  %if;(nn > 0)
    %if;(xx.has_parents)%apply;male_line("xx.father", nn - 1)%end;
      %apply;image_MF("xx","13")
      %apply;short_display_person("xx")
    %if;("xx" != "self")<br%/>|<br%/>%end;
  %end;
%end;

%define;female_line(xx, nn)
  %if;(nn > 0)
    %if;(xx.has_parents)%apply;female_line("xx.mother", nn - 1)%end;
      %apply;image_MF("xx","13")
      %apply;short_display_person("xx")
    %if;("xx" != "self")<br%/>|<br%/>%end;
  %end;
%end;

%define;tree(xx)
  <table border="%border;" cellspacing="0" cellpadding="0" width="100%%">
  %foreach;ancestor_tree_line(xx)
    %apply;a_tree_line()
  %end;
  </table>
%end;

<body%body_prop;>
%let;central_index;%index;%in;
%let;central_person;%first_name_key_strip;%sp;%surname_key_strip;%in;
%message_to_wizard;

%if;(evar.t = "T")
  <div style="text-align:%right;">%nn;
  <a href="%prefix;m=A;t=T;v=%evar.v;;%access;
  ;dag=on;notab=on;slices=on"><tt>//</tt></a></div>
  %apply;tree%with;
    %if;(bvar.max_anc_tree = "")%apply;min(evar.v, max_anc_level, 7)
    %else;%apply;min(evar.v, max_anc_level, bvar.max_anc_tree)%end;
  %end;
%elseif;(evar.t = "A")
  %apply;display_2arrows()
  <table border="%border;" width="100%%"><tr><td align="center">
  <tr><td align="center">
    %apply;male_line("self", evar.v)
  </tr></tr></table>
%elseif;(evar.t = "C")
  %apply;display_2arrows()
  <table border="%border;" width="100%%"><tr><td align="center">
  <tr><td align="center">
    %apply;female_line("self", evar.v)
  </tr></tr></table>
%end;

%base_trailer;
%copyright;
</body>
</html>