$D=YAHOO.util.Dom;$=$D.get;if(typeof TGN=="undefined"){var TGN={};TGN.SRHover={}}else{if(typeof TGN.SRHover=="undefined"){TGN.SRHover={}}}TGN.SRHover.Xoverride=0;TGN.SRHover.Yoverride=0;TGN.SRHover.Doverride=0;function closeIndiv(d,c){TGN.SRHover.sr_lastCmd="close";var b=750;if(TGN.SRHover.Doverride>0){b=TGN.SRHover.Doverride;TGN.SRHover.Doverride=0}var a="closeIndivImpl('"+d+"','"+c+"')";TGN.SRHover.sr_hoveredDivEvt=setTimeout(a,b);TGN.SRHover.sr_hoveredDiv=a}function closeIndivDelay(d,c,b){if(typeof b=="undefined"||b==null){b=1}TGN.SRHover.sr_lastCmd="close";var a="closeIndivImpl('"+d+"','"+c+"')";TGN.SRHover.sr_hoveredDivEvt=setTimeout(a,b);TGN.SRHover.sr_hoveredDiv=a}function haltIndivClose(){clearTimeout(TGN.SRHover.sr_hoveredDivEvt)}function closeIndivImpl(c,a){if(TGN.SRHover.sr_lastCmd==a){return}TGN.SRHover.sr_selectedRec=0;TGN.SRHover.sr_hoveredDiv=null;var b=document.getElementById("indivHoverMain");if(b==null){b=document.getElementById(srComposeName(c,a))}var d=document.getElementById("indivHoverArrow");if(d==null){d=document.getElementById("img-"+srComposeName(c,a))}if(b==null||d==null){return}if(b.className=="hoverbox hoverboxFixed"||b.className=="indivHide hoverboxFixed"){b.className="indivHide hoverboxFixed"}else{b.className="indivHide"}if(TGN.SRHover.sr_popIframe!=null){document.body.removeChild(TGN.SRHover.sr_popIframe);TGN.SRHover.sr_popIframe=null}d.className="indivHide"}function showNoPreview(d,b,a,c){showIndiv2(d,b,a,c,false,"","","",true)}function showIndiv(g,c,b,e,f,d,a){showIndiv2(g,c,b,e,false,f,d,a,false)}function showIndiv2(theEvent,theDB,theRec,headerTxt,subDb,iid,rc,xtraQSParam,noHover){var delay=300;if(TGN.SRHover.Doverride>0){delay=TGN.SRHover.Doverride}TGN.SRHover.sr_lastCmd=theRec;if(TGN.SRHover.sr_hoveredDiv!=null){clearTimeout(TGN.SRHover.sr_hoveredDivEvt);eval(TGN.SRHover.sr_hoveredDiv)}TGN.SRHover.sr_selectedRec=theRec;if(theEvent!=null){var yCord=YAHOO.util.Event.getPageY(theEvent);var xCord=YAHOO.util.Event.getPageX(theEvent)}setTimeout(function(){p_AIndiv(yCord,xCord,theDB,""+theRec,headerTxt,subDb,iid,rc,xtraQSParam,noHover)},delay)}function p_AIndiv(f,j,h,n,s,q,r,c,p,b){if(TGN.SRHover.sr_lastCmd=="close"){return}if(TGN.SRHover.sr_selectedRec==n){if(TGN.SRHover.Xoverride!=0){j=TGN.SRHover.Xoverride;TGN.SRHover.Xoverride=0}if(TGN.SRHover.Yoverride!=0){f=TGN.SRHover.Yoverride;TGN.SRHover.Yoverride=0}var l=document.getElementById(srComposeName(h,n));f=f-$D.getDocumentScrollTop();var g=document.getElementById("img-"+srComposeName(h,n));if(l==null||g==null){return}if(l.className=="hoverbox hoverboxFixed"||l.className=="hoverbox"){return}if(typeof(l.innerHTML)=="string"&&l.innerHTML!=""){if(l.innerHTML=="<!--Loaded-->"){return}var d=document.getElementById("indivHoverMain");var m=document.getElementById(srComposeName(h,n)+"_H3");if(d!=null){g=getTargetArrow(g);d.style.width="";d.innerHTML=l.innerHTML;l=d;l.style.left=j+100+"px";g.style.left=j+80+"px"}if(l.className=="indivHide hoverboxFixed"||l.className=="hoverbox hoverboxFixed"){l.className="hoverbox hoverboxFixed";setDivYCoord(l,f,60);AddIframe(l)}else{l.className="hoverbox";setDivYCoord(l,f,60)}if(TGN.SRHover.theBrowser=="IE7"){compforIEPOS(l,m)}setDivYCoord(g,f,20);if(d==null){g.style.left=l.offsetLeft-20+"px"}wrapHoverClick(l,document.getElementById(srComposeName(h,n)+"_overL"));g.className="indivImgPop";return}var k;try{k=new XMLHttpRequest()}catch(o){try{k=new ActiveXObject("Msxml2.XMLHTTP")}catch(o){try{k=new ActiveXObject("Microsoft.XMLHTTP")}catch(o){k=null}}}if(k!=null){k.onreadystatechange=function(){if(k.readyState==4){if(k.status==200){var z=k.responseXML;if(z!=undefined){var e=z.getElementsByTagName("status").item(0);if(e!=undefined){if(getNodeText(e)=="1"){var A=z.getElementsByTagName("htmlData").item(0);var v=z.getElementsByTagName("BrowserName").item(0);TGN.SRHover.theBrowser="";if(v!=undefined){TGN.SRHover.theBrowser=getNodeText(v)}var y="";var C=z.getElementsByTagName("HasDBRights").item(0);if(C!=undefined){y=getNodeText(C)}var u=z.getElementsByTagName("HeaderText").item(0);if(u!=undefined){s=getNodeText(u)}if(A!=undefined){if(TGN.SRHover.sr_selectedRec==n){dHtml="<div class='hoverOverlay' id='"+srComposeName(h,n)+"_overL'></div><div class='tl'></div><div class='tr'></div><div class='bl'></div><div class='br'></div><div class='hd'><h3 id='"+srComposeName(h,n)+"_H3'>"+s+"</h3></div><div class='bd'><div class='content'>"+getNodeText(A)+"</div></div> <div class='ft' id='"+srComposeName(h,n)+"_Ft'></div>";l.innerHTML=dHtml;g=getTargetArrow(g);var w=document.getElementById("indivHoverMain");if(w!=null){w.innerHTML=dHtml;w.onclick=l.onclick;l=w;l.style.left=j+100+"px";g.style.left=j+80+"px"}l.onmouseover=function(){haltIndivClose()};var t="closeIndivImpl('"+h+"','"+n+"')";l.onmouseout=function(){TGN.SRHover.sr_hoveredDivEvt=setTimeout(t,250)};if(TGN.SRHover.theBrowser=="IE7"){l.style.width=""}if(TGN.SRHover.theBrowser=="IE"){l.className="hoverbox hoverboxFixed"}else{l.className="hoverbox"}setDivYCoord(l,f,60);if(TGN.SRHover.theBrowser=="IE"){AddIframe(l)}setDivYCoord(g,f,20);if(w==null){g.style.left=l.offsetLeft-20+"px"}g.className="indivImgPop";if(TGN.SRHover.theBrowser=="IE7"){var B=document.getElementById(srComposeName(h,n)+"_H3");compforIEPOS(l,B)}wrapHoverClick(l,document.getElementById(srComposeName(h,n)+"_overL"));if(y=="True"){setTimeout('trackHover("Hover")',0)}else{setTimeout('trackHover("NoSub")',0)}}}}else{l.innerHTML="<!--Loaded-->"}}else{l.innerHTML="<!--Loaded-->"}}}}};var a="/Mercury/Pages/Ajax/IndivRec.aspx?IndivAjax=1"+GetURLRecidAndPid(n)+"&db="+h+"&output=html&Use302Redirect=t";if(q){a=a+"&noSub=1"}if(b){a=a+"&NonHover=1"}if(r!=null&&c!=null){a=a+"&iid="+r+"&rc="+c}if(p!=null){a=a+"&"+p}k.open("GET",a,true);try{k.send(null)}catch(o){}}}}function GetURLRecidAndPid(a){if(a.toString().indexOf("__")===-1){return"&recid="+a}else{return"&recid="+a.toString().replace("__","&h=")}}function wrapHoverClick(a,b){if(b!=null){b.style.width=a.offsetWidth+"px";b.style.height=a.offsetHeight+"px";b.onclick=a.onclick}}function scrubedQS(){var d=location.search.substring(1);var a=d.split("&");var e="";for(var c=0;c<a.length;c++){var f=a[c].indexOf("=");if(f>=0){var b=a[c].substring(0,f);if(b!="iid"&&b!="rc"&&b!="db"&&b!="recid"&&b!="output"){e+="&"+a[c]}}}return e}function trackHover(b){var a=s_gi(s_account);if(b=="NoSub"){s_pageName="Search:IndivRecHover:NoSub"}else{if(b=="Hover"){s_pageName="Search:IndivRecHover:Sub"}}void (a.t())}function AddIframe(b){if(TGN.SRHover.sr_popIframe!=null){document.body.removeChild(TGN.SRHover.sr_popIframe);TGN.SRHover.sr_popIframe=null}var a=document.createElement("IFRAME");a.setAttribute("src","");a.style.position="absolute";a.style.left=b.offsetLeft+"px";a.style.top=b.offsetTop+"px";a.style.width=b.offsetWidth+"px";a.style.height=b.offsetHeight+"px";a.style.border="none";a.style.backgroundColor="transparent";a.style.filter="alpha(opacity=0)";a.setAttribute("frameborder","0");a.setAttribute("allowtransparency","true");document.body.appendChild(a);TGN.SRHover.sr_popIframe=a}function getTargetArrow(b){var a=document.getElementById("indivHoverArrow");if(a!=null){return a}return b}function compforIEPOS(b,d,c){var a=b.offsetWidth;d.style.width=b.offsetWidth-21;b.style.width=a}function setDivYCoord(c,f,d){var e=($D.getViewportHeight()-f+d);var b=c.offsetHeight;var a=$D.getDocumentScrollTop();if(e>(b)||$D.getViewportHeight()<b){adNum=f+a-d;c.style.top=""+adNum+"px"}else{adNum=f+a-(b-e+d);if(e<=90){adNum=adNum+50}if(adNum>0){c.style.top=""+adNum+"px"}}}function getNodeText(b){if(typeof b.textContent!="undefined"){return b.textContent}else{if(typeof b.innerText!="undefined"){return b.innerText}else{if(typeof b.text!="undefined"){return b.text}else{switch(b.nodeType){case 3:case 4:return b.nodeValue;break;case 1:case 11:var c="";for(var a=0;a<b.childNodes.length;a++){c+=getNodeText(b.childNodes[a])}return c;break;default:return""}}}}return""}function srComposeName(b,a){return b+"-"+a}if(typeof TGN.SResults=="undefined"){TGN.SResults={}}TGN.SResults.KeyListener=function(){var f=new Array();var b=false;this.add=function(k,g,h){var j=new YAHOO.util.KeyListener(document,{keys:k},g,h);f.push(j);j.enable()};this.disable=function(){if(b){return}for(var g=0;g<f.length;g++){f[g].disable()}};this.enable=function(){if(b){return}for(var g=0;g<f.length;g++){f[g].enable()}};this.lockState=function(){b=true};this.unlockState=function(){b=false};function e(h,g){return(function(){if(g){return}for(var j=0;j<h.length;j++){h[j].enable()}})}var a=e(f,b);function d(h,g){return(function(){if(g){return}for(var j=0;j<h.length;j++){h[j].disable()}})}var c=d(f,b);this.addListeners=function(){for(i=0;i<document.forms.length;i++){for(x=0;x<document.forms[i].elements.length;x++){YAHOO.util.Event.addListener(document.forms[i].elements[x],"focus",c);YAHOO.util.Event.addListener(document.forms[i].elements[x],"blur",a)}}};this.addListener=function(g){YAHOO.util.Event.addListener(g,"focus",c);YAHOO.util.Event.addListener(g,"blur",a)};this.addListeners()};TGN.SResults.Key={};TGN.SResults.Key.CurrRes=-1;TGN.SResults.Key.CurrNode=null;TGN.SResults.Key.CloseP=null;TGN.SResults.Key.SelectRes=function(res){res=parseInt(res);if(res==TGN.SResults.Key.CurrRes||TGN.SResults.Key.CurrRes<0){return}if(TGN.SResults.Key.CloseP!=null){try{if(typeof TGN.SResults.Key.CloseP=="function"){TGN.SResults.Key.CloseP.call()}else{eval(TGN.SResults.Key.CloseP)}TGN.SResults.Key.CloseP=null}catch(e){}}var curSelEl=document.getElementById("sRes-"+TGN.SResults.Key.CurrRes);if(curSelEl!=null){curSelEl.className=curSelEl.className.replace(" keySelect","")}TGN.SResults.Key.CurrRes=res;if(!TGN.SResults.Key.HighNode()){TGN.SResults.Key.CurrRes=-1}};TGN.SResults.Key.NextRes=function(){if(TGN.SResults.Key.CloseP!=null){try{if(typeof TGN.SResults.Key.CloseP=="function"){TGN.SResults.Key.CloseP.call()}else{eval(TGN.SResults.Key.CloseP)}TGN.SResults.Key.CloseP=null}catch(e){}}var prevId=null;var hilite=false;if(TGN.SResults.Key.CurrRes<0){var div=new YAHOO.util.Element("results-main");var rows=div.getElementsByClassName("record","tr");if(rows.length>0){var first=new YAHOO.util.Element(rows[0]);TGN.SResults.Key.CurrRes=parseInt(first.get("id").substring(5));hilite=true}}else{prevId="sRes-"+TGN.SResults.Key.CurrRes;var next=YAHOO.util.Dom.getNextSibling(prevId);if(next){next=new YAHOO.util.Element(next);if(next.get("id").substring(0,5)=="sRes-"){TGN.SResults.Key.CurrRes=parseInt(next.get("id").substring(5));hilite=true}}}if(hilite){if(TGN.SResults.Key.HighNode()){if(prevId){var prev=document.getElementById(prevId);if(prev){prev.className=prev.className.replace(" keySelect","");var nextEl=$D.getY("sRes-"+(TGN.SResults.Key.CurrRes));if(nextEl!=false||nextEl!=null){var Yres=$D.getY(prevId);var DocStop=$D.getDocumentScrollTop();var VHi=$D.getViewportHeight();var diffSize=nextEl-Yres;if((nextEl+diffSize)>(VHi+DocStop)){window.scrollBy(0,diffSize+diffSize+Yres-VHi-DocStop+10)}}}}}else{TGN.SResults.Key.CurrRes-=1}}};TGN.SResults.Key.NextorLastResUp=function(){TGN.SResults.Key.PreviewNext()};TGN.SResults.Key.LastRes=function(){if(TGN.SResults.Key.CloseP!=null){try{if(typeof TGN.SResults.Key.CloseP=="function"){TGN.SResults.Key.CloseP.call()}else{eval(TGN.SResults.Key.CloseP)}TGN.SResults.Key.CloseP=null}catch(e){}}var prevId=null;if(TGN.SResults.Key.CurrRes>-1){prevId="sRes-"+TGN.SResults.Key.CurrRes;var next=YAHOO.util.Dom.getPreviousSibling(prevId);if(next){next=new YAHOO.util.Element(next);if(next.get("id").substring(0,5)=="sRes-"){TGN.SResults.Key.CurrRes=parseInt(next.get("id").substring(5));if(TGN.SResults.Key.HighNode()){if(prevId){var prev=document.getElementById(prevId);if(prev){prev.className=prev.className.replace(" keySelect","");var Yres=$D.getY("sRes-"+TGN.SResults.Key.CurrRes);if(Yres!=null||Yres!=false){var DocStop=$D.getDocumentScrollTop();if(Yres<DocStop){window.scrollBy(0,Yres-DocStop-10)}}}}}}}}};TGN.SResults.Key.BuildMoniker=function(e){var b=(e.getAttribute("dbid")==undefined||e.getAttribute("dbid")==null)?"":e.getAttribute("dbid");var d=(e.getAttribute("rid")==undefined||e.getAttribute("rid")==null)?"":e.getAttribute("rid");var f=(e.getAttribute("pid")==undefined||e.getAttribute("pid")==null)?"":e.getAttribute("pid");var c=(e.getAttribute("tid")==undefined||e.getAttribute("tid")==null)?"":e.getAttribute("tid");var g=(e.getAttribute("rgt")==undefined||e.getAttribute("rgt")==null)?"":e.getAttribute("rgt");if(d!=""&&g!=""){d+="_A"+g}var a=b+":"+d;if(f!=""){a+=":"+f;if(c!=""){a+=":"+c}}return a};TGN.SResults.Key.HighNode=function(){var a=document.getElementById("sRes-"+TGN.SResults.Key.CurrRes);if(a!=null){TGN.SResults.Key.CurrNode=a;a.className+=" keySelect";a.focus();if(TGN.Ancestry.Search.SearchInfo.isFtmMac){if(window.external&&"SelectRecord" in window.external){window.external.SelectRecord(TGN.SResults.Key.BuildMoniker(a))}}return true}return false};TGN.SResults.Key.Enter=function(){var tR=TGN.SResults.Key.CurrNode;if(tR!=null){var jsLink=tR.getAttribute("jsopen");if(jsLink!=null){if(jsLink.indexOf("javascript:")==0){try{eval(jsLink)}catch(e){}}else{document.location=jsLink}}}};TGN.SResults.Key.NewSearch=function(){};TGN.SResults.Key.FindH=function(a){if(a.className!="srchFoundDB"){return false}if(a.getAttribute("onmouseover")==null){return false}if(a.getAttribute("onmouseout")==null){return false}return true};TGN.SResults.Key.PreviewToggle=false;TGN.SResults.Key.ClosePreview=function(){if(TGN.SResults.Key.CloseP!=null){try{if(typeof TGN.SResults.Key.CloseP=="function"){TGN.SResults.Key.CloseP.call()}else{eval(TGN.SResults.Key.CloseP)}TGN.SResults.Key.CloseP=null}catch(e){}}};TGN.SResults.Key.Preview=function(){TGN.SResults.Key.PreviewToggle=!TGN.SResults.Key.PreviewToggle;if(!TGN.SResults.Key.PreviewToggle){TGN.SResults.Key.ClosePreview()}TGN.SResults.Key.PreviewNext()};TGN.SResults.Key.PreviewNext=function(){if(!TGN.SResults.Key.PreviewToggle){return}var tR=TGN.SResults.Key.CurrNode;var nodeA=$D.getElementsBy(TGN.SResults.Key.FindH,"span",tR);if(nodeA!=null&&nodeA.length>0){var aNode=nodeA[0];var rid=tR.getAttribute("rid");var jsCall=aNode.getAttribute("onmouseover");var xcord=$D.getX(tR)+200;var ycord=$D.getY(tR)+30;TGN.SRHover.sr_lastCmd=rid;TGN.SRHover.sr_selectedRec=rid;TGN.SRHover.Xoverride=xcord;TGN.SRHover.Yoverride=ycord;TGN.SRHover.Doverride=1;try{TGN.SResults.Key.CloseP=aNode.getAttribute("onmouseout");if(typeof jsCall=="function"){jsCall.call()}else{if(typeof jsCall=="string"){var event=null;eval(jsCall)}}}catch(e){}}};TGN.SResults.RegPageElem=function(){if(typeof TGN.KeyWatcher!="undefined"){var c=["ql_urlTxt","ql_nameTxt","addTodoTxt"];var b,a;for(b=0,a=c.length;b<a;b++){var d=document.getElementById(c[b]);if(d!=null){TGN.KeyWatcher.addListener(d)}}}};TGN.SResults.SetScripts=function(d){var c,b;var a=d.getElementsByTagName("script");var f=a.length;if(f>0){for(c=0;c<f;c++){b=a[c].text;if("undefined"!=typeof b&&"undefined"!=b&&b.length>0){var e=document.createElement("script");e.setAttribute("language","text/javascript");e.setAttribute("type","text/javascript");e.text=b;d.appendChild(e)}}}};TGN.SResults.Browse={dbid:0,showBrowseDb:function(f){TGN.SResults.Browse.dbid=f;var g=$("browseImagesPop");var a=$("categories");TGN.KeyWatcher.disable();if(null==g){g=document.createElement("div");g.setAttribute("id","browseImagesPop");g.setAttribute("display","none");a.appendChild(g)}else{if(g.style.display=="block"){TGN.SResults.Browse.hideBrowseDb();return}else{g.style.display="block";g.style.zIndex=2;return}}g.style.position="absolute";g.innerHTML='<img src="http://c.ancestry.com/css/search/i/loading32.gif">';g.style.display="block";g.style.width="32px";g.style.height="32px";g.style.top="225px";g.style.left="249px";g.style.zIndex=2;var c={success:function(h){var k=$("browseImagesPop");k.style.width="450px";k.style.height="";var j=document.createElement("div");k.innerHTML="";if(YAHOO.env.ua.ie>5&&YAHOO.env.ua.ie<=7){k.appendChild(j);j.innerHTML+=h.responseText}else{j.innerHTML+=h.responseText;k.appendChild(j)}TGN.SResults.SetScripts(j);k.style.top=(300-Math.round(k.clientHeight/2))+"px"},failure:function(h){window.location.href="/search/db.aspx?dbid="+TGN.SResults.Browse.dbid}};var e=getQueryStringParameter("path");if(null==e||e.length==0){var d=getDictionaryCookie("BROWSES","PATHDB");if(d==TGN.SResults.Browse.dbid){e=getDictionaryCookie("BROWSES","PATH")}}var b="/Browse/Controls/List/BrowseHandler.ashx?root=1&dbid="+TGN.SResults.Browse.dbid+"&path="+e;YAHOO.util.Connect.asyncRequest("GET",b,c,null)},hideBrowseDb:function(){var a=$("browseImagesPop");a.style.display="none";a.style.zIndex=-1;TGN.KeyWatcher.enable()},currRequest:0,RequestLevel:function(a,g,d,f){setDictionaryCookie("BROWSES","PATHDB",a,null,null);setDictionaryCookie("BROWSES","PATH",g,null,null);var c="/Browse/Controls/List/BrowseHandler.ashx?dbid="+a+"&path="+g;TGN.SResults.Browse.currRequest++;var b={success:function(l){if(TGN.SResults.Browse.currRequest!=l.argument[1]){return}var k=$(l.argument[0]);var h=parseInt(d.substring(d.length-1,d.length));if(l.responseText.indexOf(">ALL<")>0&&h+2<f){k.style.display="none";var j=d.substring(0,d.length-1);j=j+(h+1);TGN.SResults.Browse.RequestLevel(a,g+".ALL",j,f)}else{k.style.display="block";k.innerHTML=l.responseText}},failure:function(h){},argument:[d,TGN.SResults.Browse.currRequest]};var e=$(d);e.innerHTML='<img height="21" src="http://c.ancestry.com/css/search/i/loading32.gif">';YAHOO.util.Connect.asyncRequest("GET",c,b,null)},LoadNextLevel:function(a,e,d,c){var b;for(i=e+1;i<d-1;i++){b=$("browselevel"+(i-1));b.innerHTML=""}if(e<=(d-2)){b=$("browselevel"+(d-2));b.innerHTML=""}if(c.length>0&&e<d){TGN.SResults.Browse.RequestLevel(a,c,"browselevel"+e,d)}}};getQueryStringParameter=function(f,c){var d,b,a,h,g,e;c=c||top.location.href;a=c.indexOf("?");h=a>=0?c.substr(a+1):c;a=h.lastIndexOf("#");h=a>=0?h.substr(0,a):h;g=h.split("&");for(d=0,b=g.length;d<b;d++){e=g[d].split("=");if(e.length>=2){if(e[0]===f){return unescape(e[1])}}}return null};