function GE(e){
return document.getElementById(e);
}
function SV(e,v){
GE(e).value=v?v:"";
}
function GV(e){
return GE(e).value;
}
function WV(e1,e2){
var t=GV(e1);
SV(e1,GV(e2));
SV(e2,t);
}
function SO(e,v){
var s=GE(e);
var v=v?v:"";
for(var j=0;j/g,">");
}
function EL(v){
return v?EH(v.replace(/\n/g,"^$")).replace(/\^\$/g," "):"";
}
function CU(v){
return v?v.replace(/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,function(url){
return ""+url+"";
}):"";
}
function SB(v){
return v.replace(/\//g,"/");
}
function DT(){
return (new Date()).getTime();
}
function BR(_23,_24,_25){
var url=_23+"ap_"+_24+".php?";
for(var j in _25){
if(_25[j]!=null){
url+=(j+"="+escape(_25[j])+"&");
}
}
return url;
}
function BA(_28,_29,_2a){
return BR(_28,_29,_2a)+"_="+(DT()+Math.random());
}
function AG(_2b,_2c,_2d,_2e){
AP(_2b,_2c,"",_2d,_2e);
}
function AP(_2f,_30,_31,_32,_33){
var xhr=new XMLHttpRequest();
xhr.open("POST",BA("ap/",_2f,_30),true);
xhr.onreadystatechange=function(){
if(xhr.readyState==4){
_32(_2f,_33,((xhr.status==200)&&xhr.responseText)?eval("("+xhr.responseText+")"):{});
}
};
xhr.send(_31);
}
var Bw=null;
function CE(w){
Bw=w;
window.onerror=SE;
}
function TR(){
var s="";
for(var a=TR;a;a=a.caller){
s+=(a.name||a.toString().match(/function (\w*)/))+"<";
if(a.caller==a){
break;
}
}
return s;
}
function SE(m,u,l,w){
w=w||window;
if(Bw){
if(Bw.SE){
Bw.SE(m,u,l,w);
}
}else{
AP("log_js_error",{},m+"|"+(w?w.location:"")+"|"+u+"|"+l+"|",function(){
},null);
}
}
function RE(e){
alert(e);
}
function SC(n,v,s){
var d=new Date();
d.setTime(d.getTime()+365*86400000);
var t=".familyecho.com";
document.cookie=n+"="+v+"; expires="+d.toGMTString()+"; path=/"+((s&&(window.location.hostname.substr(-t.length)==t))?("; domain="+t):"");
}
function GC(n){
var cs=document.cookie.split(";");
for(var j=0;j=0){
if(Pr){
var _53=(_4f.substring(0,_52).match(/\$/g)||[]).length;
var _54=_50[_53];
if(Number.isInteger(parseFloat(_54))){
_51=Pr.select(parseInt(_54));
}
}
}else{
var _55=_4f.indexOf("^");
if(_55>=0){
if(ordinalRules){
var _53=(_4f.substring(0,_55).match(/\$/g)||[]).length;
var _54=_50[_53];
if(Number.isInteger(parseFloat(_54))){
_51=ordinalRules.select(parseInt(_54));
}
}
}
}
var _56=undefined;
if(locale_phrases[_4f]){
_56=locale_phrases[_4f][_51];
var _57=["str","many","few","two","one","zero"];
for(var i=0;i<_57.length;i++){
if(_56!==undefined){
break;
}else{
_56=locale_phrases[_4f][_57[i]];
}
}
}
if(_56===undefined){
_56=_4f;
}
if(Dp){
return "{"+_56+"}";
}else{
if(Lp){
return _56+_56;
}else{
return _56;
}
}
}
function SN(_59,_5a){
var _5b=(_59.match(/[\$\#\^]/g)||[]).length;
var _5c=_5b>1;
var _5d=_5c?/([\#\$\^])([1-9])/:/([\$\#\^])/;
var _5e=0;
while(true){
var _5f=_59.slice(_5e).match(_5d);
if(!_5f){
break;
}
var _60=_59.indexOf(_5f[0],_5e);
var _61=_5f[0].length;
var _62=_5f[1];
var _63=_5c?_5f[2]:1;
var _64=_5a[_63-1];
if(_64===undefined){
_64=_62;
}
if(Dp){
_64=_62+_64+_62;
}
_59=_59.substr(0,_60)+_64+_59.substr(_60+_61);
_5e=_60+_64.length;
}
_5a.splice(0,_5b);
return _59;
}
function SG(_65,_66){
var _67=0;
while(true){
var _68=_65.indexOf("<",_67);
if(_68>=0){
var _69=_65.indexOf(">",_68);
}
if((_68>=0)&&(_69>=0)){
var _6a=_66.shift();
if(_6a===undefined){
_6a="a href=\"#\"";
}
_6a=_6a.trim();
var _6b=_6a.search(/[ \t]/);
if(_6b<0){
_6b=_6a.length;
}
var _6c=_65.substr(_69+4);
_65=_65.substr(0,_68)+"<"+_6a+">"+_65.substr(_68+4,_69-_68-4)+""+_6a.substr(0,_6b)+">"+_6c;
_67=_65.length-_6c.length;
}else{
break;
}
}
return _65;
}
var Lf=null;
function LF(_6d){
Lf=_6d;
SS("footerlang",true);
var c=locale_names[locale_value];
ST("currentlang",c);
if((locale_value!="en")&&GC("langnote")){
alert(_t("Some of the $ translation is AI-generated, so it may not be perfect.",c)+" "+_t("Please contact us if you would like to help improve the $ translation.",c));
SC("langnote","");
}
}
function LL(){
var ls=[];
for(var l in locale_names){
ls[ls.length]={l:l,c:locale_names[l],s:(l==locale_value)};
}
ls=ls.sort(function(a,b){
return a.c.localeCompare(b.c);
});
return ls;
}
function LC(){
var h="✕";
h+="
";
SH("langcontent",h);
GE("langoverlay").style.display="flex";
}
function LH(){
SS("langoverlay",false);
}
function LS(l){
SC("lang",l,true);
SC("langnote",1);
if(Lf){
document.forms[Lf].submit();
}else{
var u=new URL(location.href);
var m="delete";
u.searchParams[m]("lang");
location.href=u.href;
}
}
var Fmn=["",_t("Mth_1"),_t("Mth_2"),_t("Mth_3"),_t("Mth_4"),_t("Mth_5"),_t("Mth_6"),_t("Mth_7"),_t("Mth_8"),_t("Mth_9"),_t("Mth_10"),_t("Mth_11"),_t("Mth_12")];
var Fgn={"":"","f":_t("Female"),"m":_t("Male"),"o":_t("Other")};
var Fvn={"":_t("Known date"),"app":_t("Approximate"),"bef":_t("Before"),"aft":_t("After"),"bet":_t("Date range")};
function FAA(a,v){
a[a.length]=v;
}
function FAN(a,a2){
for(var j=0;j=0){
a.splice(i,1);
}
}
}
function FRF(f,ap,fp){
for(var i in f){
var p=f[i];
p.c=[];
p.pc={};
p.fg=false;
if(p.m&&!f[p.m]){
p.m=null;
}
if(p.f&&!f[p.f]){
p.f=null;
}
if(p.s&&!f[p.s]){
p.s=null;
}
if(p.X&&!f[p.X]){
p.X=null;
}
if(p.Y&&!f[p.Y]){
p.Y=null;
}
if(p.K&&!f[p.K]){
p.K=null;
}
if(p.L&&!f[p.L]){
p.L=null;
}
if(p.s){
p.pc[p.s]=true;
}
if(p.ep){
for(var j in p.ep){
if(p.ep[j]&&f[j]){
p.pc[j]=true;
}
}
}
}
var ai=0;
for(var i in f){
var p=f[i];
var j=0;
if(p.m||p.f){
j++;
p["m"+j]=p.m;
p["f"+j]=p.f;
p["t"+j]=p.V;
}
if(p.X||p.Y){
j++;
p["m"+j]=p.X;
p["f"+j]=p.Y;
p["t"+j]=p.W;
}
if(p.K||p.L){
j++;
p["m"+j]=p.K;
p["f"+j]=p.L;
p["t"+j]=p.Q;
}
while(j<3){
j++;
p["m"+j]=null;
p["f"+j]=null;
p["t"+j]=null;
}
var m1=p.m1;
var f1=p.f1;
var m2=p.m2;
var f2=p.f2;
var m3=p.m3;
var f3=p.f3;
p.i=i;
p.h=null;
ai++;
p.ai=ai;
if(p.p){
p.h=FDN(p,false,0);
}
if(m1&&f1){
f[m1].pc[f1]=true;
f[f1].pc[m1]=true;
}
if(m2&&f2){
f[m2].pc[f2]=true;
f[f2].pc[m2]=true;
}
if(m3&&f3){
f[m3].pc[f3]=true;
f[f3].pc[m3]=true;
}
if(m1){
FAA(f[m1].c,i);
}
if(f1&&(f1!=m1)){
FAA(f[f1].c,i);
}
if(m2&&(m2!=m1)&&(m2!=f1)){
FAA(f[m2].c,i);
}
if(f2&&(f2!=m1)&&(f2!=f1)&&(f2!=m2)){
FAA(f[f2].c,i);
}
if(m3&&(m3!=m1)&&(m3!=f1)&&(m3!=m2)&&(m3!=f2)){
FAA(f[m3].c,i);
}
if(f3&&(f3!=m1)&&(f3!=f1)&&(f3!=m2)&&(f3!=f2)&&(f3!=m3)){
FAA(f[f3].c,i);
}
}
for(var i in f){
var p=f[i];
var mi=p.m1;
var fi=p.f1;
if(!p.h){
if(i==ap){
p.h=_t("Me");
}else{
if(i==fp){
p.h=_t("Founder");
}else{
var r=p["^"];
if(r&&f[r]&&f[r].h){
var s=null;
if((r==mi)||(r==fi)){
s=FIT(p.V,p.g);
}else{
if(f[r].m==i){
s=FPT(f[r].V,p.g,"f",1);
}else{
if(f[r].f==i){
s=FPT(f[r].V,p.g,"m",1);
}else{
if(f[r].X==i){
s=FPT(f[r].W,p.g,"f",2);
}else{
if(f[r].Y==i){
s=FPT(f[r].W,p.g,"m",2);
}else{
if(f[r].K==i){
s=FPT(f[r].W,p.g,"f",3);
}else{
if(f[r].L==i){
s=FPT(f[r].W,p.g,"m",3);
}else{
if((mi&&(f[r].m==mi))||(fi&&(f[r].f==fi))){
s=FST((f[r].m==mi)&&(f[r].f==fi),p.g);
}else{
if((r==p.s)||(p.ep&&(p.ep[r]==2))){
s=_t("Partner");
}else{
if(f[r].pc[i]){
s=_t("Ex-partner");
}
}
}
}
}
}
}
}
}
}
if(s){
p.h=_t("$1 of $2",s,f[r].h);
}
}
}
}
if(!p.h){
p.h=_t("Anon #",p.ai);
}
}
p.cp=0;
for(var pi in p.pc){
p.cp++;
}
p.es=p.s||((p.cp==1)?pi:null);
}
if(fp){
FSR(f,fp,"fg",true,true,true,true,true,false);
}
}
function FSR(f,i,l,u,uu,d,dd,a,aa){
if(i&&f[i]&&!f[i][l]){
var p=f[i];
p[l]=true;
if(u){
FSR(f,p.m,l,uu,uu,dd,dd,aa,aa);
FSR(f,p.f,l,uu,uu,dd,dd,aa,aa);
FSR(f,p.X,l,uu,uu,dd,dd,aa,aa);
FSR(f,p.Y,l,uu,uu,dd,dd,aa,aa);
FSR(f,p.K,l,uu,uu,dd,dd,aa,aa);
FSR(f,p.L,l,uu,uu,dd,dd,aa,aa);
}
if(d){
for(var j=0;j=0){
var s2=FPD(d.substring(hi+1));
if(o&&(FCD(s1,s2)>0)){
p={v:"",d1:s2.d,m1:s2.m,y1:s2.y};
s2=s1;
}
p.v="bet";
p.d2=s2.d;
p.m2=s2.m;
p.y2=s2.y;
}else{
if(d.indexOf("~")>=0){
p.v="app";
}else{
if(d.indexOf(">")>=0){
p.v="bef";
}else{
if(d.indexOf("<")>=0){
p.v="aft";
}
}
}
}
return p;
}
function FDY(y){
var t="";
if(y){
t+=Math.abs(y);
if(y<0){
t=_t("$ BCE",t);
}
}
return t;
}
function FSD(d,m,y){
if(m){
if(d){
var f=y?"j M Y":"j M";
}else{
var f=y?"M Y":"M";
}
}else{
f=y?"Y":"";
}
return f.replaceAll("j",String(d)).replaceAll("M",Fmn[m]).replaceAll("Y",FDY(y));
}
function FDT(d,c,b){
var p=FPS(d?d.toString():"",true);
var s="";
if(p){
if(p.v=="bet"){
if(p.y1&&p.y2&&((p.y2-p.y1)==1)&&(!p.m1)&&(!p.m2)){
var s=FCT(p.y1,p.y2);
}else{
var sy=(p.y1==p.y2);
var us=false;
if(p.m1&&p.m2&&sy){
p.y1="";
}else{
if((p.y1<0)&&(p.y2<0)&&(!p.m1)&&(!p.m2)){
p.y1=-p.y1;
}
}
if(sy&&(p.m1==p.m2)&&p.d1&&p.d2){
var s1=p.d1;
us=((p.d2-p.d1)==1);
}else{
var s1=FSD(p.d1,p.m1,p.y1);
us=sy&&p.m1&&p.m2&&((p.m2-p.m1)==1)&&(!p.d1)&&(!p.d2);
}
var s2=FSD(p.d2,p.m2,p.y2);
if(s1&&s2){
var s=s1+(((s1+"").indexOf(" ")>0)?" ~ ":(us?"/":"~"))+s2;
}else{
if(s1||s2){
var s=(b?("~ "+s1+s2):(c?_t("Approx $",s1+s2):_t("approx $",s1+s2)));
}
}
}
}else{
s=FSD(p.d1,p.m1,p.y1);
if(s){
if(b){
var es={"app":"~ ","bef":"< ","aft":"> "};
s=(es[p.v]||"")+s;
}else{
var ts={"app":c?_i("Approx $"):_i("approx $"),"bef":c?_i("Before $"):_i("before $"),"aft":c?_i("After $"):_i("after $")};
if(ts[p.v]){
s=_t(ts[p.v],s);
}
}
}
}
}
return s;
}
function FYT(d){
var p=FPS(d?d.toString():"",true);
var s="";
if(p.v=="bet"){
if(p.y1&&p.y2){
if(p.y1==p.y2){
s=FDY(p.y1);
}else{
if((p.y2-p.y1)==1){
s=FCT(p.y1,p.y2);
}else{
s=Math.abs(p.y1)+"~"+FDY(p.y2);
}
}
}else{
if(p.y1||p.y2){
s="~"+FDY(p.y1)+FDY(p.y2);
}
}
}else{
s=FDY(p.y1);
if(s){
var es={"app":"~","bef":"<","aft":">"};
s=(es[p.v]||"")+s;
}
}
return s;
}
function FCT(y1,y2){
var d=1000000;
var bce=(y1<0);
if(bce){
var t=y1;
y1=-y2;
y2=-t;
}
if(Math.floor(y1/100)==Math.floor(y2/100)){
d=(Math.floor(y1/10)==Math.floor(y2/10))?10:100;
}
var s=y1+"/"+(y2%d);
if(bce){
s=_t("$ BCE",s);
}
return s;
}
function FYS(p){
if(!p){
return "";
}
var by=FYT(p.b);
var dy=(p.z=="1")?FYT(p.d):"";
var y=(by||"")+(((""+by+dy).indexOf("~")>=0)?" - ":"-")+(dy||"");
return (by||dy)?(" ("+y.trim()+")"):"";
}
function FDE(v,m,l){
v=parseInt(v);
v="0000"+((isNaN(v)||(v<0))?0:((v>m)?m:v));
return v.substring(v.length-l,v.length);
}
function FDS(d,m,y){
return ((y<0)?"B":"")+FDE((y<0)?-y:y,9999,4)+FDE(m,12,2)+FDE(d,31,2);
}
function FNS(){
var d=new Date();
return FDS(d.getDate(),1+d.getMonth(),d.getFullYear());
}
function FBS(v,d1,m1,y1,d2,m2,y2){
var s=FDS(d1,m1,y1);
if(v=="bet"){
s+="-"+FDS(d2,m2,y2);
}else{
if(v=="app"){
s+="~";
}else{
if(v=="bef"){
s+=">";
}else{
if(v=="aft"){
s+="<";
}
}
}
}
return s;
}
function FDN(p,mn,sn,sf,bn,ah,ni,ti,su){
if(!p){
return _t("Unknown");
}
var fn=p.p||"";
var n=fn;
if(!mn){
var fns=fn.trim().split(" ");
n=fns[0]||"";
}
if(ni&&p.N){
n+=(n?" ":"")+"\""+p.N+"\"";
}
if(n&&sn){
var an=bn?p.q:p.l;
if(!an){
an=bn?p.l:p.q;
}else{
if(sn>=2){
var cn=bn?p.l:p.q;
if(cn&&(cn!=an)){
an+="/"+cn;
}
}
}
if(an){
if(n){
if(sf){
n=an+" "+n;
}else{
n+=" "+an;
}
}else{
n=an;
}
}
}
if(n&&ti&&p.T){
n=p.T+" "+n;
}
if(n&&su&&p.J){
n+=" "+p.J;
}
if((!n)&&ah){
n=p.h;
}
return n;
}
function FIT(t,g){
if(t=="b"){
var gs={"f":_t("Biological daughter"),"m":_t("Biological son"),"":_t("Biological child")};
}else{
if(t=="a"){
var gs={"f":_t("Adopted daughter"),"m":_t("Adopted son"),"":_t("Adopted child")};
}else{
if(t=="f"){
var gs={"f":_t("Foster daughter"),"m":_t("Foster son"),"":_t("Foster child")};
}else{
if(t=="s"){
var gs={"f":_t("Stepdaughter"),"m":_t("Stepson"),"":_t("Stepchild")};
}else{
if(t=="g"){
var gs={"f":_t("Goddaughter"),"m":_t("Godson"),"":_t("Godchild")};
}else{
var gs={"f":_t("Daughter"),"m":_t("Son"),"":_t("Child")};
}
}
}
}
}
return gs[g]||gs[""];
}
function FPT(t,g,dg,s){
if(t=="b"){
var gs={"f":_t("Biological mother"),"m":_t("Biological father"),"":_t("Biological parent")};
}else{
if(t=="a"){
var gs={"f":_t("Adopted mother"),"m":_t("Adopted father"),"":_t("Adopted parent")};
}else{
if(t=="f"){
var gs={"f":_t("Foster mother"),"m":_t("Foster father"),"":_t("Foster parent")};
}else{
if(t=="s"){
var gs={"f":_t("Stepmother"),"m":_t("Stepfather"),"":_t("Stepparent")};
}else{
if(t=="g"){
var gs={"f":_t("Godmother"),"m":_t("Godfather"),"":_t("Godparent")};
}else{
if(s==2){
var gs={"f":_t("Second mother"),"m":_t("Second father"),"":_t("Second parent")};
}else{
if(s==3){
var gs={"f":_t("Third mother"),"m":_t("Third father"),"":_t("Third parent")};
}else{
var gs={"f":_t("Mother"),"m":_t("Father"),"":_t("Parent")};
}
}
}
}
}
}
}
return gs[g]||(((g||"").charAt(0)=="o")?gs[""]:gs[dg])||gs[""];
}
function FST(b,g){
if(b){
var gs={"f":_t("Sister"),"m":_t("Brother"),"":_t("Sibling")};
}else{
var gs={"f":_t("Half sister"),"m":_t("Half brother"),"":_t("Half sibling")};
}
return gs[g]||gs[""];
}
function FET(g){
var gs={"f":_t("Stepsister"),"m":_t("Stepbrother"),"":_t("Stepsibling")};
return gs[g]||gs[""];
}
function FPO(p,o){
var d=FPD(p.b);
if((!o)&&d.y){
return d.y*10000+d.m*100+d.d;
}
if(p.O&&!isNaN(parseFloat(p.O))){
return parseFloat(p.O);
}
return null;
}
function FBO(f,os,ys,o){
var lb=null;
var ub=null;
for(var j=0;jlb)&&(op2.ai){
return 1;
}
}
return 0;
}
function FSC(f,ci){
var cp=[];
for(var j=0;j0)?_t("Late wife"):_t("Late husband")):_t("Late spouse");
}else{
if(pw){
s=cm?((cm>0)?_t("Widow"):_t("Widower")):_t("Widowed spouse");
}else{
s=cm?((cm>0)?_t("Wife"):_t("Husband")):_t("Spouse");
}
}
if(gpi=="s"){
s=_t("$ (separated)",s);
}
}else{
if((gpi=="m")||(gpi=="d")||(gpi=="a")){
s=cm?((cm>0)?_t("Ex-wife"):_t("Ex-husband")):_t("Ex-spouse");
}else{
if((gpi=="e")&&(cp||pl)){
if(pl){
s=(cm>0)?_t("Late fiancee"):_t("Late fiance");
}else{
s=(cm>0)?_t("Fiancee"):_t("Fiance");
}
}else{
if(gpi=="e"){
s=(cm>0)?_t("Ex-fiancee"):_t("Ex-fiance");
}else{
if((gpi=="r")&&FAD(pz)&&(!((p.z==1)&&(p.d==pz)))&&(!((sp.z==1)&&(sp.d==pz)))){
s=_t("Ex-partner");
}else{
s=pl?_t("Late partner"):(cp?_t("Partner"):_t("Ex-partner"));
}
}
}
}
}
return s;
}
function FCP(f,fi,ti,m,a){
var p={};
var s={};
var i=null;
p[fi]=".";
s[fi]=true;
while(!p[ti]){
var sn={};
if(a){
for(var si in s){
var pc=f[si].pc;
for(var i in pc){
if(i&&f[i]&&!p[i]){
p[i]="p"+si;
sn[i]=true;
}
}
}
}
for(var si in s){
var c=f[si].c;
for(var j=0;j=b.d);
var ma=(t.m>b.m)||((t.m==b.m)&&da);
var ba=(b.y<0)&&(t.y>0);
var y=t.y-b.y-(ma?0:1)-(ba?1:0);
if(y>0){
var a={"t":"y","v":y};
}else{
var m=(t.y*12+t.m)-(b.y*12+b.m)-(ba?12:0)-(da?0:1);
if(m>0){
var a={"t":"m","v":m};
}else{
var d=Math.round((new Date(t.y+10000,t.m-1,t.d)-new Date(b.y+10000,b.m-1,b.d))/86400000);
if(d>0){
var a={"t":"d","v":d};
}else{
var a={"t":"d","v":0};
}
}
}
a.a=b.a||t.a;
return a;
}else{
return null;
}
}
function FAS(a,o){
var m={"d":o?_i("# day/s old"):_i("# day/s"),"m":o?_i("# month/s old"):_i("# month/s"),"y":o?_i("# year/s old"):_i("# year/s")};
return a?(m[a.t]?_t(m[a.t],a.v):a.v):null;
}
function FDR(b,t,o){
var l=FBA(FSL(b),FSE(t));
var u=FBA(FSE(b),FSL(t));
var s="";
if(l){
if(u&&(l.t==u.t)){
if(l.v==u.v){
s=FAS(u,o);
}else{
s=l.v+"-"+FAS(u,o);
}
}else{
if(u){
s=FAS(l,o)+" - "+FAS(u,o);
}else{
s=_t("at least $",FAS(l,o));
}
}
}else{
if(u){
s=_t("at most $",FAS(u,o));
}
}
if((l&&l.a)||(u&&u.a)){
s=_t("approx $",s);
}
return s;
}
var Ecf=["back","male","female","other","living","deceased"];
var Elf=["current","otherpartner","biological","otherparent"];
var Efa={};
var Eff={};
var Efo;
var Ewp=null;
var Edt,Eda,Edc,Edm;
var Eve;
var Esd=null;
var Eeq=[];
var Esc=false;
var Ess="",Eis="";
var Eec=null;
var Epc=null;
var Esa;
var Edd,Edy,Ece,Eca,Ecd;
var Eed,Eud,Exd,Esf,Eaf;
var Elh,Ech;
var Elb=null;
var Ebi;
var Esb;
var Eoh=null;
function PL(){
if(!staticMode){
CE();
LF("topform");
}
if(hideSidebar){
ESI(false);
}
if(staticMode||(typeof (XMLHttpRequest)!="undefined")){
window.onbeforeunload=EPU;
var c=GC("zoomfactor");
var zf=parseFloat((c===null)?defaultZoom:c);
SV("showzoom",zf);
var c=GC("showdetail");
Esd=(c===null)?defaultDetail:c;
NSD(Esd);
for(var j=0;j=0));
Esb=(navigator.userAgent.toLowerCase().indexOf("safari")>=0);
TIS(GE("treemargin"));
NRR();
if(staticMode){
Efo=GV("founderid");
var h=new String(window.location.hash);
if(h.length&&(h.charAt(0)=="#")){
h=h.substring(1);
}
var a=h.split(":");
var m=a[0];
var i=a[1];
if(i){
SV("viewpersonid",i);
}
if(m){
SV("viewmode",m);
}
SS("printbutton",false);
ERP(false);
}else{
Ece=true;
Eca=true;
Ecd=true;
Efo=GV("personid");
var fi=GV("familyid");
var ic=GV("importcacheid");
if(fi||ic){
AG("family_read",{f:fi,i:ic,p:GV("personid"),c:GV("checksum"),s:GV("sessionid")},EFR,fi&&(ic||GV("newscript").length));
}else{
ERP(false);
}
}
}else{
SS("treebg",false);
SS("noajax",true);
}
}
function EPR(){
NPF();
NRR();
}
function ESB(l){
if(!Esb){
if(Ebi){
Eoh=l;
setTimeout("GE('backframe').src='back.htm?"+l+"';",100);
}else{
window.location.hash=l;
}
}
}
function EBI(l){
var h=new String(l.search);
var p=h.lastIndexOf("?");
if(p>=0){
h=h.substring(p+1);
}
if(Eoh&&(Eoh!=h)){
return;
}
Eoh=null;
window.location.hash=h;
}
function EBT(){
if(!Esb){
var h=new String(window.location.hash);
if(h.length&&(h.charAt(0)=="#")){
h=h.substring(1);
}
if(Eoh&&(Eoh!=h)){
return;
}
var a=h.split(":");
var m=a[0];
var i=a[1];
Elh=Ech;
Ech=m;
if((i&&(i!=GV("viewpersonid")))||(m&&(m!=GV("viewmode")))){
if((Eec!==null)&&(i==Epc)&&(m==="view")){
EFE(false);
}else{
if(i&&Efa[i]){
SV("viewpersonid",i);
}
if(m){
SV("viewmode",m);
}
EUS(false,null,null,true,true);
}
}
}
}
function EPU(e){
if((!Esc)&&(!staticMode)){
if(GV("newscript").length||GV("importcacheid")){
e=e||window.event;
var m=_t("If you leave this page before saving, your changes to this family will be lost.");
e.returnValue=m;
return m;
}
}
}
function ESC(){
Esc=true;
}
function EFR(_17,_18,_19){
if(_19.ok){
Efa={};
if(_19.f){
if(_19.ar){
ERS(_19.t);
Ess=_19.t;
Eve=_19.v;
Ewp=_19.pw?GV("personid"):null;
Efo=_19.fp;
Edd=_19.al;
Edy=_19.ad;
Ece=_19.aw;
Eca=_19.an;
Ecd=_19.ax;
Eed=_19.ae;
Eud=_19.au;
Exd=_19.az;
Esf=_19.as;
Eaf=_19.aa;
Edt=_19.ds;
Eda=_19.da;
Edc=_19.dc;
Edm=_19.dm;
var e=GE("lfamilylabels");
e.innerHTML="";
var _1b=_19.fl;
if(_1b&&_1b.length){
for(var j=0;j<_1b.length;j++){
var s=document.createElement("span");
s.className="lfamilylabel";
s.innerText=_1b[j].charAt(0).toUpperCase()+_1b[j].substring(1);
e.appendChild(s);
}
}
if(Ewp&&GE("welcomewrite")){
SR("welcomewrite",true);
}
if(Eud){
DAD();
}
}else{
Ece=false;
Eca=false;
Ecd=false;
RE(_t("You do not have permission to view this family."));
if(GE("addfamily")){
SS("addfamily",false);
}
}
}
if(_19.m){
ERS(_19.m);
Eis=_19.m;
if(_19.ro){
staticMode=true;
Esa=true;
Ece=false;
Eca=false;
Ecd=false;
Ewp=null;
SS("do_signin",false);
SH("lfooterlinks","Family displayed via the Family Echo API.");
}
if(_19.lo){
SH("lfamilyname",_19.lo);
}
}
}else{
RE(_t("This family could not currently be loaded.")+" "+_t("This may be due to occasional system maintenance, so please try again in a few hours."));
}
ERP(_18);
}
function ERP(_1e){
ERS(GV("newscript"));
if(Esd===null){
Esd="";
for(var j in Efa){
if(Efa[j].r){
Esd="r";
}
}
NSD(Esd);
}
EUS(true,null,GV("viewmode"),true,false);
if(_1e){
ESS();
}else{
EUL(false);
}
setInterval(EBT,250);
}
function EMD(e){
e=e||window.event;
var t=e.target||e.srcElement||e;
if(!(GE("findfield").contains(t)||GE("findlist").contains(t))){
NHF();
}
}
function EUS(r,i,m,d,s){
var pi=Evp=GV("viewpersonid");
var pm=viewMode=GV("viewmode");
if(r){
var ap=GV("personid");
if(Efo&&!Efa[Efo]){
Efa[Efo]={};
}
FRF(Efa,ap,Efo);
if(ap&&Efa[ap]){
NSP(ap);
SV("name",FDN(Efa[ap],false,1,false,false,false));
SV("email",Efa[ap].e);
}else{
NSP(Efo);
}
var fc=0;
for(var j in Efa){
fc++;
}
NCP(fc);
if((staticMode||GV("familyid"))&&Efo&&Efa[Efo]){
var fb=FDN(Efa[Efo],false,1,false,false,false);
ST("lfamilyinfo",_t("Founded by $",fb));
if(!staticMode){
SS("historybutton",true);
}
}else{
ST("lfamilyinfo","");
}
}
if(i){
Evp=i;
}
if(m){
viewMode=m;
}
if((!Evp)||(!Efa[Evp])){
if(Efo&&Efa[Efo]){
Evp=Efo;
}else{
for(Evp in Efa){
break;
}
}
}
SV("viewpersonid",Evp);
SV("viewmode",viewMode);
if(Evp!=pi){
if(document.activeElement){
document.activeElement.blur();
}
}
if(viewMode=="history"){
ESI(true);
if((!Esb&&Elh!=viewMode)||(Esb&&m)){
GE("extraframe").src="history.php?f="+escape(GV("familyid"))+"&p="+escape(GV("personid"))+"&c="+escape(GV("checksum"))+"&s="+escape(GV("sessionid"))+(EID()?"&d=1":"");
}
SI("extradiv",true);
}else{
if(viewMode=="share"){
ESI(true);
GE("extraframe").src="share.php?f="+escape(GV("familyid"))+"&p="+escape(GV("personid"))+"&c="+escape(GV("checksum"))+"&i="+escape(Evp)+"&s="+escape(GV("sessionid"))+"&z="+((Efa[Evp].z!="1")?0:1)+(EID()?"&d=1":"");
SI("extradiv",true);
}else{
if(viewMode=="download"){
ESI(true);
GE("extraframe").src="download.php?f="+escape(GV("familyid"))+"&p="+escape(GV("personid"))+"&c="+escape(GV("checksum"))+"&s="+escape(GV("sessionid"))+(EID()?"&d=1":"");
SI("extradiv",true);
}else{
if(viewMode=="print"){
ESI(true);
if(m){
GE("extraframe").src="print.php?f="+escape(GV("familyid"))+"&p="+escape(GV("personid"))+"&c="+escape(GV("checksum"))+"&s="+escape(GV("sessionid"))+(EID()?"&d=1":"");
}
SI("extradiv",true);
}else{
if(viewMode=="import"){
ESI(true);
GE("extraframe").src="import.php?p="+escape(GV("personid"))+(EID()?"&d=1":"");
SI("extradiv",true);
}else{
if(viewMode=="importfinish"){
}else{
if(GI("extradiv")){
GE("extraframe").src="";
SI("extradiv",false);
}
}
}
}
}
}
}
if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&navigator.userAgent.match(/AppleWebKit/)){
SS("extradiv",GI("extradiv"));
}
SSE(Evp,viewMode);
if(i||m){
ESB(viewMode+":"+Evp);
}
if(d||(Evp!=pi)){
TRT(Efa,Evp,GV("personid"),Esd,NGD(),NGB(),NGS(),NGR(),NGL(),NGM(),NGH(),NGA(),NGC(),pi,GV("showzoom"),GV("showwidth"),GV("textsize"),s);
NRT();
}
if(m=="path"){
SUP(Evp);
SPS();
SS("pathdiv",true);
}
if(m=="calendar"){
SUC();
SS("caltimediv",true);
ESI(true);
}
if(m=="timeline"){
SUI();
SS("caltimediv",true);
ESI(true);
}
if(viewMode=="path"){
SSP(Evp);
}else{
SS("pathdiv",false);
}
if((viewMode!="calendar")&&(viewMode!="timeline")){
SS("caltimediv",false);
}
if(r||(Evp!=pi)){
if(parent&&parent.postMessage){
parent.postMessage("focus="+Evp,"*");
}
}
}
function EUF(){
EUS(true,null,null,true,false);
}
function ERF(){
EUS(false,null,null,true,true);
}
function ERI(){
EUS(false,null,null,true,false);
}
function ESP(i,s){
EHW();
for(var j=0;j<(Eeq.length-1);j++){
if(Eeq[j]==i){
Eeq.splice(j,1);
EUS(false,i,"edit",false,s);
return;
}
}
var vm=GV("viewmode");
Eeq=[];
EUS(false,i,((vm=="share")||(vm=="print")||(vm=="history")||(vm=="path")||(vm=="calendar")||(vm=="timeline")||(vm=="users"))?null:"view",false,s);
}
function ESM(m){
EUS(false,null,m,false,false);
}
function ECS(){
Eec=GV("newscript").length;
Epc=GV("viewpersonid");
}
function ESE(r,i,b){
Eeq=[];
for(var j=1;j0)&&(pc[pl-1].charAt(0)==e.p)&&(e.p!="+")&&(e.p!="-")){
pc[pl-1]=e.p+e.v;
}else{
pc[pl]=e.p+e.v;
}
}
if(pi){
os+=pi+"\t"+pc.join("\t")+"\n";
}
return os;
}
function EFC(i,c){
for(var p in c){
var v=c[p]?NE(new String(c[p])):"";
EFV(i,p,v);
GE("newscript").value+="\ni"+i+"\t"+p.charAt(0)+EEF(v);
}
EUL(false);
}
function EPC(i1,i2,c){
for(var p in c){
var v=c[p]?NE(new String(c[p])):"";
EPV(i1,i2,p,v);
GE("newscript").value+="\np"+i1+" "+i2+"\t"+p.charAt(0)+EEF(v);
}
EUL(false);
}
function EDC(i,c){
for(var p in c){
var v=c[p]?NE(new String(c[p])):"";
EDV(i,p,v);
GE("newscript").value+="\nd"+i+"\t"+p.charAt(0)+EEF(v);
}
EUL(false);
}
function EEF(s){
return s.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t");
}
function EFI(){
var c="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for(var j=0;j<1000;j++){
var i="";
for(var k=0;k<5;k++){
i+=c.charAt(Math.floor(Math.random()*(k?36:26)));
}
if(!Efa[i]){
break;
}
}
return i;
}
var Edf=false;
function ESS(){
if(!staticMode){
var fi=GV("familyid");
var ic=GV("importcacheid");
if(fi&&!Edf){
var len=GV("newscript").length;
if(len||ic){
Edf=true;
AP("family_append",{f:fi,i:ic,p:GV("personid"),c:GV("checksum"),v:Eve},EOS(GV("newscript")),ESR,len);
EUL(false);
}else{
Edf=true;
EUL(false);
Edf=false;
setTimeout("EUL(true);",500);
}
}
}
}
function ESR(_6e,len,_70){
Edf=false;
if(_70.ok){
Eve=_70.v;
Ess+="\n"+Eis;
Eis="";
SV("importcacheid","");
var ns=GV("newscript");
Ess+=ns.substring(0,len);
SV("newscript",ns.substring(len,ns.length));
if(_70.t){
Efa={};
ERS(_70.t);
Ess=_70.t;
ERS(GV("newscript"));
EUS(true,null,null,true,false);
}
}else{
RE(_t("The family could not be saved - please try again."));
}
EUL(true);
}
function EUL(js){
if(!staticMode){
var len=GV("newscript").length;
var ic=GV("importcacheid");
if(Edf){
p="lsaving";
}else{
if(len||ic){
p="lsave";
}else{
if(!Ece){
p=Ewp?"lwriteone":"lreadonly";
}else{
p=js?"lsaved":"linitial";
}
}
}
var es=["linitial","lreadonly","lwriteone","lsave","lsaving","lsaved"];
for(var j=0;j2){
var p=FPD(e.options[2].value);
}else{
var d=new Date();
var p={y:d.getFullYear(),m:1+d.getMonth(),d:d.getDate()};
}
var f=FDE(Math.abs(p.y),9999,4)+"-"+FDE(p.m,12,2)+"-"+FDE(p.d,31,2)+((p.y<0)?" B":"");
while(true){
var f=prompt(_t("Show ages on which date? Please enter the date in YYYY-MM-DD format and add \"B\" for BCE."),f);
if(f===null){
SV("otherage","");
break;
}
if(EWA(f)){
e.selectedIndex=2;
SC("otheragedate",f);
break;
}
}
}
ERF();
}
function EWA(f){
var b=(f.toLowerCase().indexOf("b")>=0);
var s=f.replace(/[^0-9-]/g,"").split("-");
if(s.length==3){
var y=parseInt(s[0]);
var m=parseInt(s[1]);
var o=parseInt(s[2]);
if((y>=1)&&(y<=9999)&&(m>=1)&&(m<=12)&&(o>=1)&&(o<=31)){
if(b){
y=-y;
}
GE("otherage").options[2]=new Option("on "+FSD(o,m,y),FDS(o,m,y));
return true;
}
}
return false;
}
function ECR(_90){
var i=_90.id;
if(i.substr(0,5)=="color"){
var f=i.substr(5);
SC("color"+f,_90.value);
ERF();
}
}
function ECE(_93){
var i=_93.id;
if(i.substr(0,4)=="line"){
var f=i.substr(4);
SC("line"+f,_93.value);
ERF();
}
}
function ERC(f,c){
SV("color"+f,c);
SC("color"+f,c);
ERF();
}
function ESN(){
SC("showbirthname",NGB());
ERF();
}
function ESF(){
SC("showsurnamefirst",NGS());
ERF();
}
function EML(){
SC("showmaleleft",NGM());
ERF();
}
function ECO(){
SC("showcousins",NGC());
ERF();
}
function ECH(){
SC("showchildren",NGH());
ERF();
}
function ECP(){
SC("showparents",NGH());
ERF();
}
function ECW(){
SC("widthfactor",GV("showwidth"));
ERI();
}
function ERW(){
SV("showwidth",1);
SC("widthfactor",1);
ERF();
}
function ECT(){
SC("textsize",GV("textsize"));
ERI();
}
function ERT(){
SV("textsize",1);
SC("textsize",1);
ERF();
}
function ETO(){
var s=!GS("optionsdiv");
if(s&&GS("filesdiv")){
ETF();
}
if(s&&GS("usersdiv")){
ETU();
}
SS("optionsdiv",s);
SH("optionslinktext",s?_h("Hide options"):_h("Options"));
GE("treemargin").style.paddingBottom=(s?(GE("optionsdiv").offsetHeight+"px"):0);
TCD(Evp,250);
}
function ETF(){
var s=!GS("filesdiv");
if(s&&GS("optionsdiv")){
ETO();
}
if(s&&GS("usersdiv")){
ETU();
}
if(s){
DDF(true);
DUS();
}
SS("filesdiv",s);
SS("filesbutton",!s);
SS("filestreebutton",s);
GE("treemargin").style.paddingBottom=(s?(GE("filesdiv").offsetHeight+"px"):0);
TCD(Evp,250);
}
function ETU(){
var s=!GS("usersdiv");
if(s&&GS("optionsdiv")){
ETO();
}
if(s&&GS("filesdiv")){
ETF();
}
if(s){
GE("usersframe").src="users.php?f="+escape(GV("familyid"))+"&p="+escape(GV("personid"))+"&c="+escape(GV("checksum"))+"&s="+escape(GV("sessionid"))+(EID()?"&d=1":"");
}
SS("usersdiv",s);
SS("usersbutton",!s);
SS("userstreebutton",s);
GE("treemargin").style.paddingBottom=(s?(GE("usersdiv").offsetHeight+"px"):0);
TCD(Evp,250);
}
function ETI(){
var w=GE("leftdiv").offsetWidth;
var s=TGS();
var v=GI("leftdiv");
ESM("view");
ESI(!v);
NRR();
TSD(s.left+(v?-w:w),s.top);
TCD(Evp,250);
}
function ESI(s){
var c=s?"marginon":"marginoff";
GE("treemargin").className=c;
GE("fileviewmargin").className=c;
GE("navmargin").className=c;
GE("welcomemargin").className=c;
GE("optionsmargin").className=c;
GE("filesmargin").className=c;
GE("usersmargin").className=c;
SI("leftdiv",s);
NSS(s);
}
function EID(){
return (document.body.className=="dark");
}
function ETD(){
if(EID()){
var oc="dark";
var nc="light";
var sb=true;
}else{
var oc="light";
var nc="dark";
var sb=false;
}
document.body.className=nc;
var fs=["extraframe","uploadiframe","usersframe"];
for(var j=0;j
var Btc={pd:4};
function BMG(f,i,si,pg){
var eg=0;
var p=f[i];
if(pg["m"]&&si){
if(p.gp&&p.mp){
var t=p.gp[si];
if(((t=="m")||(t=="s")||(t=="d")||(t=="a"))&&FAD(p.mp[si])){
eg=Math.max(eg,0.625);
}
}
}
if(pg["w"]&&si){
if(p.gp&&p.wp){
var t=p.gp[si];
if(((t=="m")||(t=="s")||(t=="d")||(t=="a"))&&p.wp[si]){
eg=Math.max(eg,1.125);
}
}
}
if(pg["d"]&&si){
if(p.gp&&p.dp){
if((p.gp[si]=="d")&&FAD(p.dp[si])){
eg=Math.max(eg,0.625);
}
}
}
return 1+eg;
}
function BGC(f,pi,ci,h,fl,pg,dp,_f){
var ds=[],ss=[],gs=[];
var tw=0;
for(var j=0;j_3b)){
var x=(vx<_3a)?_3a:_3b;
var y=(vy+ay/2);
TAL(d,vx,vy,vx,y,s);
TAL(d,vx,y,x,y,s);
TAL(d,x,y,x,ay,s);
}else{
TAL(d,vx,vy,vx,ay,s);
}
TAL(d,g?_34:_33,ay,g?_36:_35,ay,s);
}
}
}
function BDD(d,f,i,si,x,y,pd,sr,da){
var p=f[i];
TAE(d,i,p,x,y);
if(pd){
if(p.m1||p.f1){
TAL(d,x,y,x,y-0.425,FSB(p,1)?"c":"b");
}
if(p.m2||p.f2){
TAL(d,x+0.05,y,x+0.05,y-0.45,FSB(p,2)?"c":"b");
}
}
if((sr!==null)&&(p.cp>((si&&p.pc[si])?1:0))){
TAL(d,x,y,x+(sr?0.475:-0.475),y,(p.s&&f[p.s]&&p.s!=si)?"s":"p");
}
if(da){
BAC(d,f,i,x,y);
}
}
function BAC(d,f,i,x,y){
var ac=FLA(f,i);
if(ac.length){
var sb=false;
var sg=false;
for(var j=0;j1)?(ot/(yt-1)):0;
var uo=0.1/(yt+1);
var uy=cy-0.5+uo*(yt+1);
var ax=[];
for(var pi in ps){
if(dp.p[i+"-"+pi]){
TAL(d,fx,ly,fx+(dr?0.475:-0.475),ly,FUP(f,i,pi)?"s":"p");
}else{
dp.p[i+"-"+pi]=true;
dp.p[pi+"-"+i]=true;
var pc=FLP(f,i,pi);
if(_5d){
FAI(pc,_5d);
}
BDH(d,f,i,pi,pc,h,dr,fx,cy,ly,uy,fl,pg,dp,ax,pcx,_5f);
}
ly-=lo;
uy-=uo;
}
}
function BDH(d,f,i,pi,ci,h,dr,fx,cy,ly,uy,fl,pg,dp,ax,pcx,_7b){
var g=BMG(f,i,pi,pg);
if(ci.length){
var ds=BGC(f,i,ci,h,fl,pg,dp,_7b);
var cx=dr?(d.r-ds.fl+ds.aw/2):(d.l-ds.lr-ds.aw/2);
var px=cx+(dr?0.5:-0.5);
BDC(d,ds,cx,cy+1,(pi&&f[pi])?cx:fx,ly,(pi===null)?-0.15:0);
}else{
var px=dr?(d.r):(d.l-1);
}
if(pi){
pcx[pi]=px-(dr?0.5:-0.5);
}
if(pi&&f[pi]){
var s=FUP(f,i,pi)?"S":"P";
if(ax.length){
var xo=(dr?0.5:-0.5);
var x1=ax[0]-xo*(1+(ax.length)/10);
var x2=ax[ax.length-1]+xo+xo/10;
TAL(d,fx,ly,x1,ly,s);
TAL(d,x1,ly,x1,uy,s);
TAL(d,x1,uy,x2,uy,s);
TAL(d,x2,uy,x2,ly,s);
TAL(d,x2,ly,px,ly,s);
if(Math.abs(px-x2)>=(g-1)){
TAP(d,i,pi,x2+(dr?-0.5:0.5),px,ly,false);
}else{
TAP(d,i,pi,x2+(dr?-1.5:-0.5),x2+(dr?0.5:1.5),uy,true);
}
}else{
TAL(d,fx,ly,px,ly,s);
TAP(d,i,pi,fx,px,ly,true);
}
BDD(d,f,pi,i,px,cy,true,dr,true);
ax[ax.length]=px;
}
}
function BSS(d,f,p,si,h,dr,cy,fl,pg,dp){
var li=[],ri=[];
for(var j=0;j0){
var bs=FLS(f,pi,1);
if(bs.length){
if(od){
var aa=BSS(d,f,p,bs,h-1,dr,-1,fl,pg,dp);
}else{
var aa=BSS(d,f,p,bs,h-1,null,-1,fl,pg,dp);
var al=aa.ll?aa.al:fx;
var ar=aa.rl?aa.ar:fx;
var bx=(al+ar)/2;
if(Math.abs(bx-fx)>Btc.pd){
bx=fx+0.5*(aa.rl-aa.ll);
}
}
var ap=aa.ap;
for(var j=0;j0){
BDL(d,bx+(ad.yl[-1]+ad.yr[-1]-1)/2,ax,-2,-1,gs,0);
}
}
}
}
function BGA(f,i,h,dr,da,fl,pg,dp){
var d=TND();
var p=f[i];
if((h>0)&&!dp.a[i]){
dp.a[i]=true;
var x1=0;
var x2=0;
if(p.m1||p.f1){
if(p.m1&&p.f1){
var g=BMG(f,p.m1,p.f1,pg);
if(dr===null){
var m1=!fl;
var d1=false,d2=true;
x1-=g/2;
}else{
var m1=fl?(!dr):dr;
var d1=dr,d2=dr;
}
var i1=m1?p.m1:p.f1;
var i2=m1?p.f1:p.m1;
TAD(d,BGA(f,i1,h-1,d1,true,fl,pg,dp),x1,-1);
BDD(d,f,i1,i2,x1,-1,false,d1,true);
x2=d2?(d.r+g-1):(d.l-g);
TAD(d,BGA(f,i2,h-1,d2,true,fl,pg,dp),x2,-1);
BDD(d,f,i2,i1,x2,-1,false,d2,true);
TAL(d,x1,-1,x2,-1,FUP(f,i1,i2)?"S":"P");
TAP(d,i1,i2,x1,x2,-1,false);
}else{
var pi=p.m1||p.f1;
TAD(d,BGA(f,pi,h-1,dr,true,fl,pg,dp),x1,-1);
BDD(d,f,pi,null,x1,-1,false,f[pi].g!=(fl?"f":"m"),false);
}
if(da){
var gr=FSB(p,1);
var x=(x1+x2)/2;
TAL(d,x,-0.5,x,-1,gr?"C":"B");
TAL(d,x,-0.5,0,-0.5,gr?"C":"B");
TAL(d,0,-0.5,0,0,gr?"C":"B");
var bs=FLS(f,i,1);
if(bs.length){
var sl=false;
var sr=false;
if((dr===null)||(!p.m1)||(!p.f1)){
for(var j=0;j0){
TAE(d,i,p,0,0);
var c=p.c.slice();
if(p.es){
FAN(c,f[p.es].c);
}
var _e3=[];
var _e4=[];
var _e5=[];
var _e6=[];
var _e7={};
var _e8={};
for(var j=0;j0){
var px=0;
var gs=[FSB(p,1)];
var ax=[0];
var bs=FLS(f,i,1);
if(bs.length){
var aa=BSS(d,f,p,bs,oh,null,0,fl,pg,dp);
px=(aa.al+aa.ar)/2;
if(Math.abs(px)>Btc.pd){
px=0.5*(aa.rl-aa.ll);
}
for(var j=0;j=aa.rl);
var eu={};
for(j=2;j<=3;j++){
var drj=dr2;
var mj=p["m"+j];
var fj=p["f"+j];
if(mj||fj){
var ej=null;
var ei=null;
var ex=null;
var em=false;
if(mj&&((fj==p.m1)||(fj==p.f1))&&!eu[fj]){
ej=mj;
drj=(fj==p.m1)?fl:!fl;
ei=fj;
ex=fx;
fj=null;
em=true;
}else{
if(fj&&(mj==p.m1)||(mj==p.f1)&&!eu[mj]){
ej=fj;
drj=(fj==p.m1)?fl:!fl;
ei=mj;
ex=mx;
mj=null;
em=true;
}else{
if(!(mj&&fj)){
ej=mj||fj;
if(f[ej].pc[p.m1]&&!eu[p.m1]){
drj=fl;
ei=p.m1;
ex=mx;
}else{
if(f[ej].pc[p.f1]&&!eu[p.f1]){
drj=!fl;
ei=p.f1;
ex=fx;
}else{
ej=null;
}
}
}
}
}
var gr2=FSB(p,j);
var g=ej?BMG(f,ej,ei,pg):1;
var m2x=drj?(d.yr[-1]+g-1):(d.yl[-1]-g);
var f2x=m2x;
if(mj&&fj){
var g=BMG(f,mj,fj,pg);
m2x+=(fl?(drj?g:0):(drj?0:-g));
f2x=m2x+(fl?-g:g);
TAL(d,m2x,-1,f2x,-1,FUP(f,mj,fj)?"S":"P");
TAP(d,mj,fj,m2x,f2x,-1,false);
}
var p2x=em?((m2x+ex)/2):((m2x+f2x)/2);
var oy=((j==2)&&p3)?-0.1:-0.05;
var ox=drj?(j-1)*0.05:-(j-1)*0.05;
TAL(d,ox,0,ox,-0.5+oy,gr2?"C":"B");
TAL(d,ox,-0.5+oy,p2x,-0.5+oy,gr2?"C":"B");
TAL(d,p2x,-0.5+oy,p2x,-1,gr2?"C":"B");
var bs2=FLS(f,i,j);
if(bs2.length){
TAL(d,p2x,-0.5+oy,p2x+(drj?0.1:-0.1),-0.5+oy,gr2?"c":"b");
}
if(mj){
BDD(d,f,mj,fj,m2x,-1,true,fl,false);
}
if(fj){
BDD(d,f,fj,mj,f2x,-1,true,!fl,false);
}
if(ej&&ei){
TAL(d,ex,-1,m2x,-1,FUP(f,ej,ei)?"S":"P");
TAP(d,ej,ei,ex,m2x,-1,false);
eu[ei]=true;
}
}
}
}else{
if(p.m1){
var ac=FLA(f,p.m1);
if(ac.length&&p.f1){
BDH(d,f,p.m1,null,ac,oh,fl,mx,-1,-1,-1,fl,pg,dp,[],{});
}
BDA(d,f,p.m1,p.f1,oh,fl,mx,-1,fl,pg,dp,[],{});
}
if(p.f1){
var ac=FLA(f,p.f1);
if(ac.length&&p.m1){
BDH(d,f,p.f1,null,ac,oh,!fl,fx,-1,-1,-1,fl,pg,dp,[],{});
}
BDA(d,f,p.f1,p.m1,oh,!fl,fx,-1,fl,pg,dp,[],{});
}
}
if(p.m1){
BPS(d,f,p.m1,p.f1,ph,oh,fl,mx,fl,pg,dp);
}
if(p.f1){
BPS(d,f,p.f1,p.m1,ph,oh,!fl,fx,fl,pg,dp);
}
}
}else{
if(p.m1||p.f1){
TAL(d,0,0,0,-0.425,FSB(p,1)?"c":"b");
if(p.m2||p.f2){
TAL(d,0.05,0,0.05,-0.45,FSB(p,2)?"c":"b");
}
}
}
}
d.e[i].k=true;
if(m&&d.e[m]){
d.e[m].m=true;
}
return d;
}
function NSS(s){
SS("sidehide",s);
SS("sideshow",!s);
}
function NKS(s){
SH("keylinktext",s?"Hide":"Show");
}
function NSD(d){
GE("detail_0p").checked=true;
GE("detail_0lq").checked=true;
var ds=(d+"").split(".");
var db={};
for(var i=0;i"+NSE(jn[j].n,exp)+"";
}
}
if(!h){
h="
"+_h("No matches found")+"
";
}
e.innerHTML=h;
if(locale_rtl){
e.dir="rtl";
}
var i=e.querySelector("#list_"+(si||""));
if(i){
i.className="snamesel";
e.scrollTop=i.offsetTop-(i.offsetHeight+e.offsetHeight)/2;
}
}
function NSR(ss){
var esc=/[-\/\\^$*+?.()|[\]{}]/g;
var reg="";
for(var k=0;k$&");
}
return h;
}
function NSB(a,b){
if(a.l
var ios=navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&navigator.userAgent.match(/AppleWebKit/);
function TND(){
return {l:0,r:0,w:0,t:0,b:0,h:0,e:{},n:[],p:[],yl:{},yr:{}};
}
function TAE(d,i,p,x,y,k){
var di=d.e[i];
if(di){
i+=Math.random();
}
d.e[i]={p:p,x:x,y:y,k:k,d:di};
d.l=Math.min(d.l,x);
d.r=Math.max(d.r,1+x);
d.w=d.r-d.l;
d.t=Math.min(d.t,y);
d.b=Math.max(d.b,1+y);
d.h=d.b-d.t;
if(d.yl[y]===undefined){
d.yl[y]=x;
}else{
d.yl[y]=Math.min(d.yl[y],x);
}
if(d.yr[y]===undefined){
d.yr[y]=1+x;
}else{
d.yr[y]=Math.max(d.yr[y],1+x);
}
}
function TAL(d,x1,y1,x2,y2,t){
d.n[d.n.length]={x1:x1,y1:y1,x2:x2,y2:y2,t:t};
}
function TAP(d,i,si,x1,x2,y,b){
if(Math.abs(x1-x2)>1.1){
d.p[d.p.length]={i:i,si:si,x1:x1,x2:x2,y:y,b:b};
}
}
function TAD(od,d,dx,dy){
for(var j=0;j=0;g--){
for(var j=0;j"+EH(TGP(yb,d.e[p.i].p,p.si))+"
";
o.appendChild(v);
}
for(var i in d.e){
var e=d.e[i];
var rs="";
var fn=FDN(e.p,true,(bn==2)?2:1,sf,(bn==1),true,true,true,true);
var _53=((e.p.z=="1")&&!pr)?c.deceased:c.living;
var sh=sz.Tnh;
var ey=y?TGL(yb,ad,e.p):null;
if(sp&&e.p.r){
var er=e.p.r.split(" ");
var uf=EIU||(opener&&opener.top&&opener.top.EIU);
if(uf){
var u=uf(er[0]);
var ew=sz.Tew-sz.Tep*2;
var eh=Math.min(ew,sz.Tph);
if(er[1]&&er[2]){
if(parseInt(er[1])>parseInt(er[2])){
eh=Math.floor(ew*er[2]/er[1]);
}else{
ew=Math.floor(eh*er[1]/er[2]);
}
}
rs+="
";
sh+=sz.Tph+sz.Tep*2;
}
}
if(ey){
rs+="
"+EL(ey)+"
";
sh+=sz.Tdh;
}
var sx=ox+(e.x)*(sz.Tew+sz.Ths);
var sy=oy+(e.y)*(sz.Teh+sz.Tvs);
sh=Math.max(sh,sz.Tmh);
TRB(o,sx-(sz.Tew/2),sy-(sh/2),sz.Tew,sh,e.k?3:1,(e.p.g=="f")?c.female:((e.p.g=="m")?c.male:(((e.p.g||"").charAt(0)=="o")?c.other:"#FFFFFF")),null);
var v=document.createElement("div");
v.className="di";
if(locale_rtl){
v.dir="rtl";
}
var s=v.style;
s.width=sz.Tew+"px";
s.height=sh+"px";
s.left=(sx-(sz.Tew/2))+"px";
s.top=(sy-(sh/2))+"px";
if(wp){
v.onmousedown=TCT;
v.id=i;
v.pid=e.p.i;
o.ps[i]={x:sx,y:sy};
}
if(spn){
var tn=FDN(e.p,mn,ssn?((bn==2)?2:1):0,sf,(bn==1),true,ni,tj,tj);
var ns="
"+_h("There are no birthdays or anniversaries to display.")+"
";
}
SS("showcalendar",true);
SS("showtimeline",false);
SH("caltimecontent",h);
}
function SUI(){
var es=[];
for(var j in Efa){
var p=Efa[j];
if(p.b){
var bd=FSE(p.b)||FSL(p.b);
if(bd){
bd.t="b";
bd.i1=j;
bd.fd=p.b;
es[es.length]=bd;
}
}
if((p.z==1)&&p.d){
var dd=FSE(p.d)||FSL(p.d);
if(dd){
dd.t="d";
dd.i1=j;
dd.fd=p.d;
es[es.length]=dd;
}
}
for(var pi in p.pc){
if((pi>j)&&Efa[pi]&&p.gp&&(p.gp[pi]=="m")&&p.mp&&p.mp[pi]){
var md=FSE(p.mp[pi])||FSL(p.mp[pi]);
if(md){
md.t="m";
md.i1=j;
md.i2=pi;
md.fd=p.mp[pi];
es[es.length]=md;
}
}
}
}
es.sort(FCD);
if(es.length){
var sf=NGS();
var bn=NGB();
var h="";
var ly=-99999999;
h+="
";
for(var j=0;j
"+FDY(e.y)+"
";
ly=e.y;
}
var dt=FDT(e.fd,true,true);
h+="
"+dt+"
";
var l1="a href=\"#\" onClick=\"ESP('"+e.i1+"', true); return false;\"";
var l2=e.i2?"a href=\"#\" onClick=\"ESP('"+e.i2+"', true); return false;\"":"";
if(e.i2){
var n1=FDN(Efa[e.i1],false,1,sf,(bn==1),true,false,false,false);
var n2=FDN(Efa[e.i2],false,1,sf,(bn==1),true,false,false,false);
}else{
var n1=FDN(Efa[e.i1],true,1,sf,(bn==1),true,true,true,true);
var n2="";
}
if(e.t=="b"){
h+=_h("<$> born",n1,l1);
}
if(e.t=="d"){
h+=_h("<$> died",n1,l1);
}
if(e.t=="m"){
h+=_h("<$1> and <$2> married",n1,n2,l1,l2);
}
h+"
";
}
h+="
";
}else{
h="
"+_h("There are no birth dates, death dates or marriages to display.")+"
var Dsf="u";
var Dsr=true;
var Dso=["n","a","t","s","u"];
var Dec=0;
function DGU(i,d){
var f=Eff[i];
if(f){
var u="file.php?f="+escape(GV("familyid"))+"&p="+escape(GV("personid"))+"&c="+escape(GV("checksum"))+"&r="+escape(i)+"&t="+escape(f.t);
if(d){
u+="&n="+escape(f.n+(f.t?("."+f.t):""));
}
}
return u;
}
function DSI(i){
var f=Eff[i];
if(f){
var v=DTV(f.t);
var _8=(v=="iframe");
var u=DGU(i,false);
ST("fileviewname",f.n);
SH("fileviewmeta",""+_h("$1 $2",DSH(f.s),DTH(f.t))+"");
ST("fileviewdate",_t("Uploaded $",DDT(f.u)));
if(v=="iframe"){
GE("fileviewiframe").src="";
GE("fileviewiframe").src=u;
}else{
if(v=="audio"){
GE("fileviewaudio").src="";
GE("fileviewaudio").src=u;
}else{
GE("fileviewimage").src="";
GE("fileviewimage").src=u;
}
SS("fileviewimage",v!="audio");
SS("fileviewaudio",v=="audio");
}
GE("fileviewiframe").style.display=_8?"block":"none";
GE("fileviewinline").style.display=_8?"none":"flex";
SS("fileviewdiv",true);
}
}
function DHV(){
SS("fileviewdiv",false);
}
function DST(s){
if(s>=1073741824){
return Number.parseFloat(s/1073741824).toFixed(1)+"G";
}else{
if(s>=1048576){
return Number.parseFloat(s/1048576).toFixed(1)+"M";
}else{
return Number.parseFloat(s/1024).toFixed(0)+"K";
}
}
}
function DSH(s){
return EH(DST(s));
}
function DMT(s){
if(s>=1073741824){
return Math.floor(s/1073741824)+"G";
}else{
if(s>=1048576){
return Math.floor(s/1048576)+"M";
}else{
return Math.floor(s/1024)+"K";
}
}
}
function DTT(t,e){
var x="";
if(t){
var u=t.toUpperCase();
switch(u){
case "JPG":
x=e?_t("$ image","JPEG"):_t("Image");
break;
case "JPEG":
case "BMP":
case "PNG":
case "GIF":
x=e?_t("$ image",u):_t("Image");
break;
case "TXT":
x=_t("Text");
break;
case "HTM":
x="HTML";
break;
case "MP3":
case "WAV":
case "OGG":
case "M4A":
x=e?_t("$ audio",u):_t("Audio");
break;
case "AVI":
case "WMV":
case "MPEG":
x=e?_t("$ video",u):_t("Video");
break;
case "MPG":
x=e?_t("$ video","MPEG"):_t("Video");
break;
case "MP4":
x=e?_t("$ video","MPEG4"):_t("Video");
break;
case "MPV":
x=e?_t("$ video","QuickTime"):_t("Video");
break;
case "ZIP":
case "GZ":
x=e?_t("$ archive",u):_t("Archive");
break;
case "DOC":
case "DOCX":
x=_t("Word");
break;
case "XLS":
case "XLSX":
case "XLSM":
x=_t("Excel");
break;
case "PPT":
case "PPTX":
x=_t("PowerPoint");
break;
default:
x=u;
break;
}
}
return x;
}
function DTH(t,e){
return EH(DTT(t,e));
}
function DDT(u){
var d=new Date(u*1000);
return FSD(d.getDate(),1+d.getMonth(),d.getFullYear());
}
function DCH(u){
return EH(DDT(u));
}
function DTV(t){
switch(t.toUpperCase()){
case "JPG":
case "JPEG":
case "PNG":
case "GIF":
return "image";
case "TXT":
case "HTM":
case "HTML":
case "PDF":
return "iframe";
case "MP3":
case "WAV":
case "OGG":
case "M4A":
return "audio";
}
return false;
}
function DSD(a,b){
if(a.ub.u){
return -1;
}else{
return 0;
}
}
}
function DDF(z){
if(z){
SV("filesfind","");
GE("filestable").style.tableLayout="auto";
SS("filesuploadfile",Eud);
}else{
DFL();
}
while(Dec>0){
DEI(false);
}
var ss=GV("filesfind").trim().toLowerCase().split(" ");
var fs=[];
var l=0;
var hf=false;
for(var i in Eff){
var f=Eff[i];
hf=true;
f.i=i;
f.aa=DAO(f);
var n=(f.n||"")+" "+(f.d||"");
for(var j=0;j "+" "+" ";
}
if(Exd){
h+="";
}
c.innerHTML=h;
r.appendChild(c);
t.appendChild(r);
}
}else{
var r=document.createElement("TR");
r.className="filesrow";
var c=document.createElement("TD");
c.className="fnone";
c.colSpan=7;
c.innerHTML=hf?_h("No files match the current search."):_h("There are currently no files in this family.");
r.appendChild(c);
t.appendChild(r);
}
for(var j=0;j▲
");
}
}
function DUS(){
var c=0;
for(var i in Eff){
c++;
}
var h=_h("# file/s",c)+", ";
if(Eda>Edt){
h+=_h("$1 used (plus $2 in other families) of $3 available",DST(Edt),DST(Eda-Edt),DMT(Edc));
}else{
h+=_h("$1 used of $2 available",DST(Edt),DMT(Edc));
}
var np=[];
if(!Edd){
np.push(_t("download"));
}
if(!Eud){
np.push(_t("upload"));
}
if(!Eed){
np.push(_t("edit"));
}
if(!Exd){
np.push(_t("delete"));
}
if(np.length){
h+=" "+_h("You do not currently have permission to $ files.",np.join(", "));
}
SH("filesstatus",h);
}
function DFL(){
var e=GE("filestable");
if(e.style.tableLayout!="fixed"){
var cs=GE("filesheader").getElementsByTagName("th");
for(i=0;i";
}else{
h+="";
}
}
return h+NSE(f.n||_t("Untitled"),exp)+(Edd?"":"");
}
function DDH(i,f,exp){
return NSE(f.d,exp);
}
function DAO(f){
var aa=[];
if(f.ps){
for(var j in f.ps){
var p=Efa[j];
if(p){
var a={i:j,n:SPN(p)};
a.s=a.n.toLowerCase();
aa.push(a);
}
}
aa.sort(DSA);
}
return aa;
}
function DAH(aa,exp){
var h="";
for(var k=0;k"+NSE(aa[k].n,exp)+"";
}
return h?h:"none";
}
function DIF(){
DDF(false);
}
function DSL(a,b){
var r=0;
if(a.ob.o){
r=1;
}
}
return Dsr?(-r):r;
}
function DSA(a,b){
var r=0;
if(a.sb.s){
r=1;
}
}
return ((Dsf=="a")&&Dsr)?(-r):r;
}
function DCT(f,r){
if(Dsf==f){
Dsr=!Dsr;
}else{
Dsf=f;
Dsr=r;
}
DDF(false);
}
function DEI(f){
if(f){
if(Dec==0){
DFL();
SI("filesfind",false);
}
Dec++;
}else{
Dec--;
if(Dec==0){
SI("filesfind",true);
}
}
}
function DCE(i){
DEI(true);
var f=Eff[i];
var c=GE("filename"+i);
c.innerHTML="";
var c=GE("filedesc"+i);
c.innerHTML="";
var c=GE("fileattach"+i);
var ai="fileattachrows"+i;
c.innerHTML="
";
var aa=DAO(f);
if(aa.length){
for(var k=0;k− "+"+";
w.appendChild(r);
GE(t).appendChild(w);
var ra=[];
for(var j in Efa){
ra.push(j);
}
SPP("fileattachsel"+i,ra,p,true);
}
function DDA(i){
var e=GE("fileattachrow"+i);
e.parentNode.removeChild(e);
}
function DRA(t){
var ii={};
for(var r=GE(t).firstChild;r;r=r.nextSibling){
if(r.id.indexOf("fileattachrow")==0){
var v=GV("fileattachsel"+r.id.substring(13));
if(v){
ii[v]=true;
}
}
}
return ii;
}
function DTU(a,c){
var s=!GS("uploaddiv");
if(s){
SV("uploadfile",null);
SV("uploadname","");
SV("uploaddesc","");
SRR("uploadattachrows");
DAA("uploadattachrows",true,a);
ST("uploadmax",DMT(DMU()));
if(c){
GE("uploadfile").click();
}
}
GE("uploaddiv").style.display=s?"flex":"none";
}
function DMU(){
return Math.min(Edm,Edc-(Eda||Edt||0));
}
function DUC(){
var fnt=DUI();
if(fnt.s>DMU()){
alert(_t("This file is $1 in size, which is larger than the maximum of $2.",DST(fnt.s),DST(DMU())));
SV("uploadfile",null);
}else{
SV("uploadname",fnt.n);
}
}
function DUI(){
var f=GE("uploadfile").files.item(0);
var n="";
var t="";
var s=null;
if(f){
n=new String(f.name);
var p=n.lastIndexOf(".");
if(p>0){
t=n.substring(p+1).toLowerCase();
n=n.substring(0,p);
}
s=f.size;
}
return {f:f,n:n,t:t,s:s};
}
function DCU(){
var ii=DRA("uploadattachrows");
var fnt=DUI();
if(fnt.f){
AP("file_upload",{f:GV("familyid"),p:GV("personid"),c:GV("checksum"),t:fnt.t},fnt.f,DUR,{n:GV("uploadname")||fnt.n,t:fnt.t,d:GV("uploaddesc"),ii:ii});
}else{
RE(_t("Please select a file to upload it."));
}
}
function DUR(_7c,_7d,_7e){
if(_7e.r){
var ai=null;
EDC(_7e.r,{n:_7d.n,t:_7d.t,u:_7e.d,s:_7e.s,d:_7d.d});
for(var i in _7d.ii){
EDC(_7e.r,{"+":i});
if((i==Spe)||(ai===null)){
ai=i;
}
}
var ds=parseInt(_7e.ds);
if(!isNaN(ds)){
Edt=ds;
}
var da=parseInt(_7e.da);
if(!isNaN(da)){
Eda=da;
}
ESS();
EUS(false,ai,null,false,true);
SWA(4);
if(GS("filesdiv")){
DDF(true);
DUS();
}else{
ETF();
}
GE("uploaddiv").style.display="none";
}else{
RE(_7e.er||_t("The file could not be uploaded - please try again."));
}
}
function DAD(){
GE("main").addEventListener("dragenter",DDE);
GE("main").addEventListener("dragover",DDE);
GE("main").addEventListener("dragleave",DDL);
GE("main").addEventListener("drop",DDD);
}
var Dut=false;
var Dht=null;
function DDE(e){
e=e||window.event;
if(e.preventDefault){
e.preventDefault();
}
if(Dht){
clearTimeout(Dht);
Dht=null;
}
if(!GS("uploaddiv")){
Dut=true;
DTU("",false);
}
return false;
}
function DDL(e){
e=e||window.event;
if(e.preventDefault){
e.preventDefault();
}
if(Dut&&!Dht){
Dht=setTimeout(function(){
if(GS("uploaddiv")){
DTU();
}
Dut=false;
Dht=null;
},100);
}
return false;
}
function DDD(e){
DDE();
var f=e.dataTransfer.files;
if(f.length==1){
GE("uploadfile").files=f;
DUC();
FS("uploadname");
}
Dut=false;
return false;
}