%(<!-- $Id: relmenu.txt,v 7.00 2014/12/13 16:42:10 mr Exp $ -->%)
%( used for jquery. old relmenu.txt is in relmenu1.txt %)
%define;jq2()
  %( display consang nb ancestors nb descendants %)
  %if;(bvar.show_consang != "no")
    %if;(has_parents)
      %reset_count;
      %foreach;ancestor_level
        %if;(level = max_anc_level)
          %number_of_ancestors; [ancestors] / %level; [generation/generations]1%nn;
        %end;
        %foreach;ancestor
          %if;(ancestor.same != "")
            %incr_count;
          %end;
        %end;
      %end;
      %if;(has_consanguinity or count != 0)
        , <span class="nobr">
        %if;(cancel_links)
          [consanguinity] : %consanguinity;
        %else;
          <a href="%prefix;em=R;ei=%mother.index;;m=NG;t=PN;select=%father.index;;et=A;spouse=on;image=on" 
             title="[relationship computing], [parents]">[consanguinity] : %consanguinity;</a>
        %end;
        %if;(count != 0) (%nn;
          %if;(not cancel_links)
            <a href="%prefix;m=A;t=N;v=%max_anc_level;;i=%index;;same=%count;"
               title="[display smallest sosa number relative to ancestor]">%count; ==</a>%nn;
          %else;
            %count; ==%nn;
          %end;)
        %end;
      %end;
      </span>
      <br%/>
    %end;
    %if;(has_children)
      %foreach;descendant_level;
        %if;(level = max_desc_level)
          %if;(number_of_descendants = "1")
            [a descendant]0 / %nn;
          %else;
            %number_of_descendants; [descendants] / %nn;
          %end;
          %level;
          %if;(level = "1") [generation/generations]0 %else; [generation/generations]1%end;
        %end;
      %end;
      <br%/>
    %end;
  %end;
%end;
%if(evar.jq2 = "on")
  %apply;jq2()
%else;
  %include.relmenu1;
%end;