getPK=(function(){var a="p"+(new Date()*1).toString(32),b=0;return function(c){if(c){return c}if(b>99999){b=0;a="p"+(new Date()*1).toString(32)}return a+(++b).toString(32)}}());var AcOS={GetInnerText:function(a){if(a){return a.innerText||a.textContent||""}else{return""}},GetTextReplaceBR:function(f){var d=f.innerHTML,a=[];if(d){var c=document.createElement("DIV");c.style.display="none";document.body.appendChild(c);a=d.split(/<br\s*\/?>/gi);for(var b=a.length;b;){c.innerHTML=a[--b];a[b]=AcOS.GetInnerText(c)}document.body.removeChild(c)}return a.join("\n")},GetTarget:function(a){var b=a.srcElement||a.target;if(b.nodeName=="#text"){b=b.parentNode}return b},FieldValueGet:function(c){var a=c.value.Trim(),b=c.getAttribute("watermarkvalue");return(b&&a==b?"":a)},SetTempValue:function(aVal){if(!AcOS.temp){AcOS.temp={}}with(AcOS){for(var i=aVal.length;i;){temp[aVal[--i][0]]=aVal[i][1]}}},DelTempValue:function(aVal){with(AcOS){for(var i=aVal.length;i;){delete temp[aVal[--i]]}for(var item in temp){return}delete AcOS.temp}},SetFocus:function(f,c){if(!f){return}var d,b;if(c){d=f.elements[c];try{d.focus();if(d.type=="text"){d.select()}}catch(b){}}else{d=f.elements;for(var a=0;a<d.length;++a){if(d[a].type=="text"&&d[a].offsetWidth&&!d[a].disabled){try{d[a].focus();d[a].select();break}catch(b){}}}}},MenuIframeBg:function(aMenu,aIframeID,aShow){if(!/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){return}var ifrm=$(aIframeID);if(aShow){if(!ifrm){ifrm=document.createElement("<iframe frameborder ='0' src='javascript:false;'></iframe>");ifrm.id=aIframeID;with(ifrm.style){position="absolute";zIndex="1"}}aMenu.parentNode.appendChild(ifrm);with(ifrm.style){left=aMenu.getStyle("left");top=aMenu.getStyle("top");width=aMenu.offsetWidth+"px";height=aMenu.offsetHeight+"px";visibility="visible"}}else{if(ifrm){document.body.appendChild(ifrm);with(ifrm.style){visibility="hidden";top="-9999px"}}}},Offset:function(aObj,aOffset){var res=0;while(aObj){res+=eval("aObj.offset"+aOffset);aObj=aObj.offsetParent}return res},GetImageWidth:function(aImg){var container=aImg.parentNode,imageWidth;document.body.appendChild(aImg);with(aImg.style){position="absolute";left="-9999px";top="-9999px";display="inline";imageWidth=aImg.getWidth();display="none";position="static";left="0px";top="0px"}container.appendChild(aImg);return imageWidth},HideContent:function(a){var c=a.childNodes;for(var b=c.length;b;){if(c[--b].nodeName!="#text"){c[b].style.display="none"}}},ShowContent:function(a){var c=a.childNodes;for(var b=c.length;b;){if(c[--b].nodeName!="#text"){c[b].style.display="block"}}},AddLoadingAnim:function(d){var a=d.getAttribute("loadingid")||getPK(),c=$(a);if(c){AcOS.HideContent(d);c.style.display="block"}else{var b=d.offsetHeight;if(b){b=b-(parseInt(d.getStyle("padding-top"),10)||0)-(parseInt(d.getStyle("padding-bottom"),10)||0)-(parseInt(d.getStyle("border-top-width"),10)||0)-(parseInt(d.getStyle("border-bottom-width"),10)||0)}c=document.createElement("div");d.setAttribute("loadingid",(c.id=a));c.style.textAlign="center";c.innerHTML='<div class="loadingAnimation"><h1>Loading...</h1><img src="images/loadingWhiteBg.gif" alt="Loading..." width="32" height="32" /></div>';d.style.height=b+"px";AcOS.HideContent(d);d.appendChild(c);if(b>c.offsetHeight){c.style.height=b+"px"}d.style.height="auto"}},RemoveLoadingAnim:function(c){var b=$(c),a=$(b.getAttribute("loadingid"));a.parentNode.removeChild(a);AcOS.ShowContent(b)},disableFields:function(e,c){var a=[e.getElementsByTagName("INPUT"),e.getElementsByTagName("SELECT")];for(var d=a.length;d;){for(var b=a[--d].length;b;){a[d][--b].disabled=c}}},offsetT:function(b){var a=0;do{a+=b.offsetTop}while((b=b.offsetParent));return a},AddClassName:function(b,a){if(b.className.search(a)==-1){b.className+=" "+a}},RemoveClassName:function(c,b){var a=new RegExp("\\s*"+b,"g");c.className=c.className.replace(a,"")},ClassName:function(c,a,b){if(b){AcOS.AddClassName(c,a)}else{AcOS.RemoveClassName(c,a)}},FlagSwitcher:function(c,b,a){if(a){c.setAttribute(b,"1")}else{c.removeAttribute(b)}},StopTimeout:function(a){if(a){clearTimeout(a);a=null}},GetFirstChild:function(b){var a=b.firstChild;if(a&&(a.nodeName=="#text"||a.nodeName=="#comment")){a=AcOS.GetNextSibl(a)}return a},GetLastChild:function(b){var a=b.lastChild;if(a&&(a.nodeName=="#text"||a.nodeName=="#comment")){a=AcOS.GetPrevSibl(a)}return a},GetPrevSibl:function(a){while((a=a.previousSibling)&&(a.nodeName=="#text"||a.nodeName=="#comment")){}return a},GetNextSibl:function(a){while((a=a.nextSibling)&&(a.nodeName=="#text"||a.nodeName=="#comment")){}return a},GetParentByClass:function(e,c,a){var b=a?e:e.parentNode,d=new RegExp(c+"(?:\\b[^-]|$)");while(b){if(d.test(b.className)){break}b=b.parentNode}return b},RemoveNode:function(a){a.parentNode.removeChild(a)},GetElementsByName:function(a,c){var b=a.elements[c];if(b){if(b.nodeName){b=[b]}}else{b=[]}return b},GetElemId:function(a){return a.id||(a.id=getPK())},FireEvent:function(c,b){if(document.createEventObject){var a=document.createEventObject();return c.fireEvent("on"+b,a)}else{var a=document.createEvent("HTMLEvents");a.initEvent(b,true,true);return !c.dispatchEvent(a)}},ContainersToggle:{Run:function(c){var e=AcOS.GetTarget(c),f=$(e.getAttribute("wrapperid")),a=AcOS.GetFirstChild(f),b=e.getAttribute("currentcontainerid"),d=e.options[e.selectedIndex].value;if(e.getAttribute("isrequired")&&d){divFieldErrorText(e,null,null,"InError")}if(b){$(b).style.display="none";e.removeAttribute("currentcontainerid")}f.style.display="none";for(;a;){if(d==a.getAttribute("optionvalue")){a.style.display="block";e.setAttribute("currentcontainerid",(a.id||(a.id=getPK())));break}a=AcOS.GetNextSibl(a)}if(e.getAttribute("currentcontainerid")){f.style.display="block"}},Init:function(d,a,c){var b=document.getElementById(d);if(b){b.setAttribute("wrapperid",a);if(c){b.setAttribute("isrequired",1)}addEvent(b,"change",AcOS.ContainersToggle.Run);AcOS.FireEvent(b,"change")}}},Toggle:function(c,a){var d=typeof(c)=="string"?document.getElementById(c):c,b=AcOS.GetNextSibl(d);if(b.offsetWidth){b.style.opacity="0.8";AcOS.AddClassName(d,"headRowDisabled")}else{b.style.opacity="1";AcOS.RemoveClassName(d,"headRowDisabled")}if(window.jQuery){jQuery(b).slideToggle("slow",a)}else{b.style.display="block"}},Submit:function(d,c){if(!d.getAttribute("multiplesubmit")){if(d.getAttribute("submitaccessdenied")){return}d.setAttribute("submitaccessdenied","1")}var b=document.getElementById(d.name+"SubmitButton");if(b){var h=document.getElementById(d.name+"ProcessingBox");if(h){b.style.display="none";h.style.display="block"}}if(c){for(var f,e=c.length;e;){if((f=document.getElementById(c[--e][0]))){f.style.display="none";if(c[e][1]&&(f=document.getElementById(c[e][0]+"ProcessingBox"))){f.style.display=""}}}}var a=d.getElementsByTagName("input");for(var g,e=a.length;e;){if(a[--e].type=="text"&&a[e].value.Trim()!=AcOS.FieldValueGet(a[e])){g=document.createElement("input");g.type="hidden";g.name=a[e].name;a[e].removeAttribute("name");g.value="";d.appendChild(g)}}if(navigator.userAgent.indexOf("AppleWebKit/")>-1&&window.top!=window&&d.target=="_blank"){d.action=AcOS.QueryBuilder(d.action.replace(/_=[^&]*&?/g,""),("_="+getPK()))}setTimeout("document.forms['"+d.name+"'].submit()",100)},CapitaliseFirstLetter:function(a){return(a.charAt(0).toUpperCase()+a.slice(1))},Ellipsis:function(h,a){var f=document.getElementById(h),e="...";if(!f){return}if(f.offsetWidth){if(f.offsetWidth>(a||f.parentNode.offsetWidth)){var d;try{f.innerHTML+=e;while(f.offsetWidth>(a||f.parentNode.offsetWidth)){var g=AcOS.GetInnerText(f),c=g.length;f.innerHTML=g.slice(0,-(e.length+1))+e;if(c==(c=AcOS.GetInnerText(f).length)){break}}}catch(d){}}}else{if(f.innerHTML&&!window.DocumentLoaded){var b='AcOS.Ellipsis("'+h+'"'+(a?", "+a:"")+")";addEvent(window,"load",new Function("setTimeout('"+b+"', 200)"));return}}},ForceEllipsis:function(b){if(window.Prototype){var c=$$("#"+b+" [setellipsis]");for(var a=c.length;a;){if(c[--a].getAttribute("setellipsis")=="auto"){AcOS.Ellipsis(AcOS.GetElemId(c[a]))}}}},QueryBuilder:function(a,b){if(b){return(a+(/\?/.test(a)?(/\?$/.test(a)?"":"&"):"?")+b)}else{return a}},ToolTip:function(d,c,b){var a=document.getElementById(c);if(!a){return}if(b){a.style.visibility="hidden";a.style.display="block";a.style.left=(AcOS.Offset(d,"Left")-AcOS.Offset(a,"Left")-35)+"px";a.style.top=(AcOS.Offset(d,"Top")-AcOS.Offset(a,"Top")+22)+"px";a.style.visibility="visible"}else{a.style.left=a.style.top=0;a.style.display="none";a.style.visibility="hidden"}},SerializeForm:function(b){var d=document.forms[b],c=d.elements,e=[];for(var a=c.length;a;){if(c[--a].type=="text"){e.push(c[a].name+"="+AcOS.FieldValueGet(c[a]))}else{if(c[a].type=="radio"&&c[a].checked){e.push(c[a].name+"="+c[a].value)}}}return e.join("&")},LoadJS:function(a){var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("src",a);document.getElementsByTagName("head")[0].appendChild(b)},RadioButtonsValueGet:function(b){for(var a=b.length;a;){if(b[--a].checked){return b[a].value}}}};var LvOS={lvTimeout:10,Show:function(b,a){Lightview.show({href:"#"+b,options:{closeButton:false,autosize:true},bottomMenubarHTML:(a?a:"")})},Hide:function(){Lightview.hide()},SetFocusLvHidden:function(){with(LvOS){document.stopObserving("lightview:opened",SetFocusLvOpened);document.stopObserving("lightview:hidden",SetFocusLvHidden);AcOS.DelTempValue(["FocusFieldID"])}},SetFocusLvOpened:function(){AcOS.SetFocus($("lightview").getElementsByTagName("FORM")[0],AcOS.temp.FocusFieldID);LvOS.SetFocusLvHidden()},SetFocus:function(aFieldID){AcOS.SetTempValue([["FocusFieldID",aFieldID]]);with(LvOS){document.observe("lightview:opened",SetFocusLvOpened);document.observe("lightview:hidden",SetFocusLvHidden)}},GetOpened:function(){return(window.LightviewOpened?Lightview.contentBottom.firstDescendant():null)},RemoveHTML:function(){with(LvOS.ShowHTML){var holder=document.getElementById(lightboxId).parentNode;holder.parentNode.removeChild(holder);document.stopObserving("lightview:opened",LvOS.RemoveHTML);if(LvOS.ShowHTML.runOnRemove){runOnRemove();delete runOnRemove}delete accessDenied;delete lightboxId}},ShowHTML:function(aHTML,aRunOnRemoveHTML){if(!aHTML||LvOS.ShowHTML.accessDenied){return}LvOS.ShowHTML.accessDenied=true;LvOS.ShowHTML.lightboxId=getPK();LvOS.ShowHTML.runOnRemove=aRunOnRemoveHTML;with(LvOS.ShowHTML){var holder=document.createElement("div");holder.className="hideElement";holder.innerHTML=aHTML;document.body.appendChild(holder);var lightbox=AcOS.GetFirstChild(holder);lightbox.id=lightboxId;document.observe("lightview:hidden",LvOS.RemoveHTML);LvOS.Show(lightboxId)}},ShowLoading:function(){var a="commonLoadingLightbox",b=$(a);if(!b){b=document.createElement("div");b.id=a;b.style.display="none";b.className="loadingLvClass";b.innerHTML="Loading...";document.body.appendChild(b)}LvOS.Show(a)},Load_DeleteProp:function(){with(LvOS){var container=$(Load.containerId);if(container&&(container=container.parentNode)){container.parentNode.removeChild(container)}var d=["accessDenied","query","dialogId","success","containerId"];for(var i=d.length;i;){delete LvOS.Load[d[--i]]}}},Load_Start:function(){with(LvOS){CbOS.AjaxTask({query:Load.query,method:"POST",mode:"getResponse",success:function(aResponse){if(window.LightviewOpened){if(aResponse.indexOf("<html")!=-1){Lightview.hide();return}var ajaxContainer=document.createElement("div");with(ajaxContainer.style){position="absolute";left="0";top="-9999px"}document.body.appendChild(ajaxContainer);ajaxContainer.innerHTML=CbOS.JSParser(aResponse,true);var lightbox=AcOS.GetFirstChild(ajaxContainer);Load.containerId=(lightbox.id||(lightbox.id=getPK()));var jsString=lightbox.getAttribute("runjs");if(jsString){eval(jsString)}if(Load.success){Load.success()}setTimeout("LvOS.Show('"+Load.containerId+"')",250)}},error:function(aResponse){if(window.LightviewOpened){LvOS.ShowHTML(aResponse)}}});document.stopObserving("lightview:opened",Load_Start)}},Load_Hidden:function(){with(LvOS){document.stopObserving("lightview:opened",Load_Start);document.stopObserving("lightview:hidden",Load_Hidden);Load_DeleteProp()}},Load:function(aQuery,aSuccess){if(window.lightviewAccessDenied){return}with(LvOS){if(Load.accessDenied){return}Load.accessDenied=true;Load.query=aQuery;Load.success=aSuccess;document.observe("lightview:opened",Load_Start);document.observe("lightview:hidden",Load_Hidden);ShowLoading()}},WindowResizeHandler:function(){if(window.LightviewOpened){AcOS.StopTimeout(LvOS.WindowResizeHandler.T);LvOS.WindowResizeHandler.T=setTimeout("if (window.LightviewOpened) Lightview.Resize()",250)}},ShowOnLoad:function(a){addEvent(window,"load",function(){document.observe("lightview:loaded",new Function("setTimeout(\"Lightview.show({href: '#"+a+"', options: {closeButton:false, autosize:true}})\" ,50)"))})}};showLightviewOnLoad=function(a){if(window==top){addEvent(window,"load",function(){document.observe("lightview:loaded",new Function("setTimeout(\"Lightview.show({href: '#"+a+"', options: {closeButton:false, autosize:true}})\" ,50)"))})}};Number.prototype.toJSON=function(){return this};String.prototype.toJSON=function(){var a=this.replace(/\"/g,"'");a=a.replace(/\\/g,"");return'"'+a+'"'};Array.prototype.toJSON=function(){var b=[];for(var a=0;a<this.length;++a){b.push(toJSON(this[a]))}return"["+b.join(", ")+"]"};toJSON=function(a){var c=typeof a;switch(c){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null){return"null"}try{if(a.toJSON){return a.toJSON()}}catch(f){}var b=[];for(var e in a){var d=toJSON(a[e]);if(d!==undefined){b.push(e.toJSON()+": "+d)}}return"{"+b.join(", ")+"}"};function AnyPopup(a,b,c){if(!b){b="_blank"}if(!c){c="width=600,height=400,status=no,resizable=no,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no"}var d=window.open(a,b,c);if(window.focus){d.window.focus()}}newWinOpen=function(g,b,d,e,a){var f=(screen.width-d)/2;var c=(screen.height-e)/2;winProp="width="+d+",height="+e+",left="+f+",top="+c+",scrollbars="+a;Win=window.open(g,b,winProp)};SepNum=function(d){if(d<1000){return d}var c=[];d=d.toString().split("");for(var b=d.length,a=0;b>0;--b){c.unshift(d[b-1]);if(++a%3==0&&b!=1){c.unshift(",")}}return c.join("")};addEvent=function(d,b,c,a){if(d.addEventListener){d.addEventListener(b,c,a||false)}else{if(d.attachEvent){d.attachEvent("on"+b,c)}}};removeEvent=function(d,b,c,a){if(d.addEventListener){d.removeEventListener(b,c,a||false)}else{if(d.attachEvent){d.detachEvent("on"+b,c)}}};CancelBubble=function(b){if(!b){return}if(b.cancelable){if(b.preventDefault&&b.cancelable){b.preventDefault()}if(b.stopPropagation){b.stopPropagation()}return false}else{if(b.keyCode!=17&&b.keyCode!=16){b.cancelBubble=true;var a;try{b.keyCode=0}catch(a){}return b.returnValue=false}}};RunAjaxScript=function(c){c=c.replace(/\<(\/?)SCRIPT/g,"<$1script").split("<script");for(var b=0;b<c.length;++b){var d=c[b].split("<\/script>"),f;if(d.length>1){var a;if((a=d[0].replace(/^[^>]*>\s*(<!--)?/,""))){try{(new Function(a))()}catch(f){}}c[b]=d[1]}}return c.join("")};SetStyle=function(a,d,b){var c=document.getElementById(a);if(c){c.style[d]=b}};addEvent(window,"load",new Function('if (!window.DocumentLoaded) DocumentLoaded = "completed"'));addEvent(window,"load",function(){if(typeof(jQuery)!="undefined"){jQuery(".FKeySuggestTextControl").bind("autocompleteopen",function(b,a){jQuery(window).unbind("resize.suggestionsMenu");jQuery(window).bind("resize.suggestionsMenu",function(){var c=jQuery(b.target);c.autocomplete("widget").position(jQuery.extend({of:c},c.autocomplete("option","position")))});if(window.Lightview&&window.LightviewOpened){window.Lightview.RepositionSuggestionsMenu=new Function("var element = jQuery('#"+b.target.form.id+" #"+b.target.id+"'); element.autocomplete('widget').position(jQuery.extend({of: element}, element.autocomplete('option','position') ));")}}).bind("autocompleteclose",function(b,a){if(window.Lightview){delete window.Lightview.RepositionSuggestionsMenu}jQuery(window).unbind("resize.suggestionsMenu")})}});ValidateLocal=function(e,o,d){var t,p,h={},b,D,s,C,z,v;for(var w in o){if(!h[o[w][0]]&&(p=e.elements[o[w][0]])&&p.nodeName){s=null;isReq=true;b=p.getAttribute("relatedField");C=p.getAttribute("watermarkvalue");D=AcOS.FieldValueGet(p);if(b){b=(b=e[b])&&(b.options?b.options[b.selectedIndex]:b);z=p.getAttribute("watermarkvalue");b=AcOS.FieldValueGet(b)}switch(o[w][1]){case ValidateTypeReq:if(p.offsetWidth){if(p.type=="checkbox"){s=divFieldErrorText(p,p.checked?null:(o[w][2]||"Value is required."),null,d)}else{if(p.type=="text"||p.type=="textarea"||p.type=="password"||(p.type=="file"&&!e.getAttribute("uploadisnotreq"))){s=divFieldErrorText(p,D?null:(o[w][2]||"Value is required."),null,d)}else{if(p.type=="select-one"){var m=e.EventType,y;if(m){y=m.options[m.selectedIndex].value=="EVEN"}s=divFieldErrorText(p,p.options[p.selectedIndex].value.Trim()?null:(y?null:(o[w][2]||"Value is required.")),null,d)}}}}break;case ValidateTypePastYear:if(p.offsetWidth&&!p.disabled){if(!D||/^\d+$/.test(D)){var n=(new Date()).getFullYear(),f=window.SearchAllMenu?(SearchAllMenu.contentVisible=="content9"):null,j=window.SearchAllMenu?(e.name=="VitalRecords"||e.name=="SearchAnyName"):null,u=parseInt(D,10),r=e.Location,g=window.SearchAllMenu?(SearchAllMenu.contentVisible=="content17"):null,q=(e.name=="CensusSearch");if(p.getAttribute("isRequired")=="true"&&!D&&!b){s=divFieldErrorText(p,"Value is required",null,d)}else{if((f||j)&&r&&r.options&&r.options[r.selectedIndex].value=="UK"){s=divFieldErrorText(p,(f&&(u<1841||u>1901)&&"Must be from 1841-1901")||(j&&(u<1837||u>2005)&&"Must be from 1837 - 2005")||null,null,d)}else{if(g){s=divFieldErrorText(p,u<1700||u>n?"Must be from 1700-"+n:null,null,d)}else{if(q){s=divFieldErrorText(p,u>1930?'Year must be before 1930 (<a href="javascript:void(0)" onmouseover="AcOS.ToolTip(this, \'hintCensusBirthYearValidation\', true)" onmouseout="AcOS.ToolTip(this, \'hintCensusBirthYearValidation\', false)">why</a>)':null,true,d)}else{if(u<10||u>n){s=divFieldErrorText(p,"Year must be in range 10 - "+n,true,d)}else{divFieldErrorText(p,null,null,d)}}}}}}else{var B=p.getAttribute("errorprefix");if(B){p.removeAttribute("errorprefix")}s=divFieldErrorText(p,"Year is not valid",null,d);if(B){p.setAttribute("errorprefix",B)}}}else{divFieldErrorText(p,null,null,d)}break;case ValidateTypeReqPastYear:var a=(new Date()).getFullYear(),A=parseInt(D,10);if(p.offsetWidth){s=divFieldErrorText(p,D?(isNaN(D)?"Year is not valid":((A>=10&&A<=a)||!D?null:"Year must be in range 10 - "+a)):"Value is required",null,d)}break;case"ValidateTypeReqNameExt":if(p.offsetWidth&&!p.disabled){var x=SearchAllMenu.contentVisible;if(x=="content13"||x=="content14"||e.name=="yesFeedbackForm"){s=divFieldErrorText(p,D?(/^[^\d~\!@#\$%\^&\*\(\)_=\+\{\}\[\]\|\\\:;\",<>\/\?]*$/.test(D)?null:NameErrorMessage):"Value is required",null,d)}else{s=divFieldErrorText(p,D?(validName.test(D)?null:NameErrorMessage):"Value is required",null,d)}}else{divFieldErrorText(p,null,null,d)}break;case"ValidateTypeReqFTPersonName":if(p.offsetWidth){s=divFieldErrorText(p,D?(/^[\w\[\]\/\\\s#\.'`,"\?\(\)\$\^\*\=\+\!\|~&:;@%<>-]*$/.test(D)?null:"Incorrect character."):"Value is required.",null,d)}break;case"ValidateTypeFTPersonName":s=divFieldErrorText(p,!p.disabled&&D?(/^[\w\[\]\/\\\s#\.'`,"\?\(\)\$\^\*\=\+\!\|~&:;@%<>-]*$/.test(D)?null:"Incorrect character."):(b?null:"Value is required."),null,d);break;case ValidateTypeAge:s=divFieldErrorText(p,!D?null:(/(^\d+$)/.test(D)?(((parseInt(D,10)<151)&&(parseInt(D,10)>0))?null:"Age must be in range 1 - 150"):"Age is not valid"),null,d);break;case"minCharacters":v=D?D.length:0;s=divFieldErrorText(p,v?(v>=6?null:"Password must be at least 6 characters long"):null,null,d);break;case"maxCharacters":var i=o[w][2];v=D?D.replace(/\r\n|\n\r|\r(?!\n)|\n(?!\r)/ig,"\r\n").length:0;s=divFieldErrorText(p,v?(v<=i?null:"Value must be "+i+" characters or less."):null,null,d);break;case"ValidateTypeEmail":isReq=false;case"ValidateTypeReqEmail":req=o[w][2]?o[w][2]:"Value is required.";cus=o[w][3]?o[w][3]:"Email is not valid.";s=divFieldErrorText(p,D?(validEmail.test(D)?null:cus):(isReq?req:null),null,d);break}if(s){p.setAttribute("vlerror",true)}else{p.removeAttribute("vlerror")}h[o[w][0]]=s;t=s||t}}if(window.LightviewOpened&&!e.getAttribute("noresize")){Lightview.Resize()}else{if(!e.getAttribute("noalert")){ShowAlertError(t)}}return !t};AddSrchAnim=function(e,d){var b=e.childNodes;for(var a=b.length;a;){if(b[--a].style){b[a].style.display="none"}}var c=document.createElement("div");c.style.textAlign="center";c.style.width="100%";if(d=="white"){c.innerHTML='<h1 style="padding-top: 25px; padding-bottom: 25px; font-family: Georgia; color: #aeaeae;">Searching...</h1><p style="padding-bottom: 45px;"><img src="images/loadingWhiteBg.gif" alt="Searching.." width="32" height="32" /></p>'}else{c.innerHTML='<h1 style="padding-top: 25px; padding-bottom: 25px; font-family: Georgia; color: #aeaeae;">Searching...</h1><p style="padding-bottom: 45px;"><img src="images/loading.gif" alt="Searching.." width="32" height="32" /></p>'}e.appendChild(c);return c};function ShowWaitTimeout(q,f,c,n,k,b,o){c.setAttribute("noalert",1);var d=(k==null||(window.ValidateLocal?ValidateLocal(c,k,"InError"):true));if(!(f==null||validateUniversal(c,f,"InError"))){d=false}if(window.ChooseEventValidation&&ChooseEventValidation(c)){d=false}if(!c.getAttribute("noshowalerterror")){ShowAlertError(!d)}if(d){if(window.SearchFormEventTracking){SearchFormEventTracking(c,o)}if(window.Lightview&&document.getElementById("member_search")){LvOS.Hide()}var i;if(!c.getAttribute("specificsearchanimation")){if(document.getElementById("ProcessingLightbox_ID")){Lightview.show({href:"#ProcessingLightbox_ID",options:{closeButton:false,autosize:true}})}else{if(((i=document.getElementById("resultsBlock"))||(i=document.getElementById("member_search")))&&i.getAttribute("searchingAnimation")){var l=$("topActions"),g=$(i),e=parseInt(g.getStyle("padding-top"),10)+parseInt(g.getStyle("padding-bottom"),10),j=g.getHeight();if(l){j+=l.offsetHeight;l.setStyle({display:"none"})}g.setStyle({height:(j>=(l=AddSrchAnim(i,b).offsetHeight)?j-e:l)+"px"});if(i.id=="resultsBlock"){window.scrollTo(0,0)}}else{if(!c.getAttribute("nosearchanimation")&&(i=document.getElementById(q))){AddSrchAnim(i,b)}}}}if(c.getAttribute("nosearchanimation")){AcOS.Submit(c)}else{setTimeout("AcOS.Submit(document.getElementById('"+c.id+"'))",3000)}return true}return false}function Show(a,b){a.style.display="none";b.style.display=""}function ToggleDisplayStyle(b){var a=document.getElementById(b);if(a==null){return}a.style.display=(a.style.display=="none")?"":"none"}AdvArrow=function(g,e){var f=document.getElementById(e);if(f){var a=f.style.display=="none",d=g.getElementsByTagName("SPAN")[0];if(d){d.innerHTML=a?"Less":"More"}g.style.backgroundPosition=a?"100% 0":"100% -"+g.offsetHeight+"px";g.setAttribute("sliding",true);for(var c=f.getElementsByTagName("INPUT"),b=c.length;b>0;--b){if(a){c[b-1].removeAttribute("style")}else{c[b-1].style.backgroundColor="#ffffff"}c[b-1].disabled=!a}}if(window.event){event.cancelBubble=true;event.returnValue=false}};CheckTextNode=function(b){var a=document.getElementById(b);return(a&&(a=a.firstChild)&&a.nodeName=="#text"&&a.data.Trim())?a:false};SaveRecordPopulateBase=function(e,c){var f,a=[],d=c.AddSavedRecord;d.reset();a=d.elements;for(var b=0;b<a.length;b++){if(a[b].type=="text"||a[b].type=="select-one"){a[b].value=""}if(a[b].className.indexOf("InError")!=-1){a[b].className=a[b].className.replace(new RegExp("InError"),"")}}a=d.getElementsByTagName("div");for(var b=0;b<a.length;b++){if(a[b].className=="FieldErrorText"){a[b].parentNode.removeChild(a[b]);b--}}c.getElementById(e+"Gender").value="Unknown";if((f=CheckTextNode("firstNameDetails"))){c.getElementById(e+"FirstName").value=f.data}if((f=CheckTextNode("middleNameDetails"))){c.getElementById(e+"MiddleName").value=f.data}if((f=CheckTextNode("lastNameDetails"))){c.getElementById(e+"LastName").value=f.data}if((f=CheckTextNode("birthMonth"))){c.getElementById(e+"BirthMonth").options[parseInt(f.data,10)].selected=true}if((f=CheckTextNode("birthDay"))){c.getElementById(e+"BirthDay").options[parseInt(f.data,10)].selected=true}if((f=CheckTextNode("birthYearId"))){c.getElementById(e+"BirthYear").value=f.data}if((f=CheckTextNode("deathMonth"))){c.getElementById(e+"DeathMonth").options[parseInt(f.data,10)].selected=true}if((f=CheckTextNode("deathDay"))){c.getElementById(e+"DeathDay").options[parseInt(f.data,10)].selected=true}if((f=CheckTextNode("deathYearId"))){c.getElementById(e+"DeathYear").value=f.data}if((f=CheckTextNode("birthLocation"))){c.getElementById(e+"BirthLocation").value=f.data}if((f=CheckTextNode("deathLocation"))){c.getElementById(e+"DeathLocation").value=f.data}if((f=CheckTextNode("collection"))){c.getElementById(e+"RecordSource").value=f.data}};ContentUpdate=function(b,c,a){AcOS.AddLoadingAnim($(c));CbOS.Ajax({query:b,method:"POST",mode:"update",containerId:c,success:a||null,error:function(d){LvOS.ShowHTML(d,function(){AcOS.RemoveLoadingAnim(c)})}})};function DisplayProcessingElement(b,a){if(typeof jQuery!="undefined"){jQuery("#"+b).hide();jQuery("#"+a).show()}else{document.getElementById(b).style.display="none";document.getElementById(a).style.display="block"}}function ResetSearching(){var a=document.getElementById("searching");a.src=a.src}RegisterLightboxHidden=function(){document.stopObserving("lightview:opened",RegisterLightboxOpened);document.stopObserving("lightview:hidden",RegisterLightboxHidden)};SetFocusObj=function(c,a){c=document.getElementById(c)||(a&&document.getElementById(a));if(c){var b;try{c.focus();if(c.type=="text"){c.select()}}catch(b){}}};RegisterLightboxOpened=function(){SetFocusObj("Registration_R1_RegisterFirstName","submit_trial")};PageTrackEvent=function(c,b,a){if(!window.pageTracker){setTimeout('PageTrackEvent("'+c+'", "'+b+'", "'+a+'")',20)}else{pageTracker._trackEvent(c,b,a)}};ShowRegisterLightbox=function(a){if(window.DocumentLoaded){document.observe("lightview:opened",RegisterLightboxOpened);document.observe("lightview:hidden",RegisterLightboxHidden);Lightview.show({href:"#Register_Lightbox_ID",options:{closeButton:false,autosize:true}});if(a){PageTrackEvent("Register","ShowLightbox","Show Register Lightbox")}}};SelfTreeLightboxHidden=function(){$("SelfTreeFrame").style.height="auto";$("SelfTreeResult").innerHTML='<div class="center" style="padding-bottom: 140px;"><h2 class="processing">Processing...</h2><p><img src="images/loading_light.gif" alt="Searching.." width="32" height="32" /></p><br /><br /><p>Please wait a moment while we compile the results of your request.</p></div>';document.stopObserving("lightview:opened",SelfTreeLightboxOpened);document.stopObserving("lightview:hidden",SelfTreeLightboxHidden)};SelfTreeLightboxOpened=function(){document.stopObserving("lightview:opened",SelfTreeLightboxOpened);CbOS.Ajax({query:$("SelfTreeFrame").getAttribute("ajaxurl"),success:function(a){if(a=="ERR"){return location.reload()}if(window.LightviewOpened){var d=document.getElementsByClassName("lv_contentBottom")[0],c=$("SelfTreeFrame");if(d.offsetHeight==c.offsetHeight){d.style.overflow="visible"}$("SelfTreeResult").innerHTML=RunAjaxScript(a);SetFocusLightboxOpened();if($("ProblemDetailId")){$("SelfTreeResult").innerHTML=$("ProblemDetailId").innerHTML;var b=$("GoBackLink");if(b){b.onclick=function(){Lightview.hide();return false}}}if(d.offsetHeight<=c.offsetHeight){Lightview.Resize()}else{c.style.height="100%"}PageTrackEvent("Register","ShowLightbox","Show Register Lightbox")}},error:function(a){if(window.LightviewOpened){LvOS.ShowHTML(a)}}})};SelfTreeFrameRun=function(a){if(window.DocumentLoaded&&a){document.observe("lightview:opened",SelfTreeLightboxOpened);document.observe("lightview:hidden",SelfTreeLightboxHidden);$("SelfTreeFrame").setAttribute("ajaxurl",a);Lightview.show({href:"#SelfTreeFrame",options:{closeButton:false,autosize:true}})}};ShowAdditionalRows=function(c,d){var b=document.getElementById(d).getElementsByTagName("TR");c.style.display="none";for(var a=b.length;a;){b[--a].style.display="block"}};AdditionValidateAncAlerts=function(h,a,g){var d=["_FirstName","_Location","_BirthYear","_DeathYear"],l,f,k,b;for(var e=1;e<=a;++e){l="AncestorAlerts_R"+e;k=false;f=h[l+"_LastName"];if(f&&f.offsetWidth){if(!f.value.Trim()){for(var c=d.length;c;){if(h[l+d[--c]].value.Trim()){k=true;break}}b=divFieldErrorText(f,(k?"Last Name is required":null),null,g)||b}else{b=divFieldErrorText(f,(validName.test(f.value)?null:NameErrorMessage),null,g)||b}}}return !b};function toggleHide(a,b,e,c){var d=(b.style.display=="none");b.style.display=d?"":"none";setTimeout("document.getElementById('"+(a.id||(a.id=getPK()))+"').src = '"+(d?e:c)+"'",40)}OpenNewWindow=function(d,h,c,g){var b=h+"NewWindow",a=window[b],f;if(a&&!a.closed){if(a.location){a.location.href=d}else{open(d,"_blank",(g||""))}}else{a=window[b]=open(d,h,(g||""))}try{a.focus()}catch(f){}if(c){return CancelBubble(c)}};GetOpenerWindow=function(b){var a;try{return((b=b.opener)&&!b.closed&&b)}catch(a){return false}};NavigateToOpener=function(c,d,b){var a=GetOpenerWindow(window);if(a){a.location=c;a.focus()}else{OpenNewWindow(c,d,null,b)}};SetFocusLightboxHidden=function(){document.stopObserving("lightview:opened",SetFocusLightboxOpened);document.stopObserving("lightview:hidden",SetFocusLightboxHidden)};SetFocusLightboxOpened=function(){SetFocusLightboxHidden();var a=document.getElementById("lightview").getElementsByTagName("FORM")[0];if(a&&(a.id||(a.id=getPK()))){SetFocusForm(a.id)}};SetFocusLightbox=function(){document.observe("lightview:opened",SetFocusLightboxOpened);document.observe("lightview:hidden",SetFocusLightboxHidden)};var timer;var current="testimonial1";function testimFade(b,a){$(b).fade({duration:0.4});$(a).appear({duration:0.4,delay:0.4})}function testimForward(d){var a=current.substring(11)*1;var c;var b=function(){testimForward(0)};if(d==1){timer=window.setTimeout(b,15000)}else{clearTimeout(timer);a++;c="testimonial"+a;if(!document.getElementById(c)){c="testimonial1"}testimFade(current,c);current=c;timer=window.setTimeout(b,15000)}}function testimBackward(){var b=current.substring(11)*1;var c;b--;c="testimonial"+b;if(!document.getElementById(c)){var a=1;while(document.getElementById("testimonial"+a)){c="testimonial"+a;a++}}testimFade(current,c);current=c;clearTimeout(timer);testimForward(1)}window.SlideShow={Run:function(f,c){var b=document.getElementById(f),a=b.slideShow,e=document.getElementById(a.currentSlideId),d=c?AcOS.GetPrevSibl(e)||AcOS.GetLastChild(b):AcOS.GetNextSibl(e)||AcOS.GetFirstChild(b);AcOS.StopTimeout(a.t);if(window.Prototype){$(e).fade({duration:0.4});$(d).appear({duration:0.4,delay:0.4})}else{e.style.display="none";d.style.display=""}a.currentSlideId=AcOS.GetElemId(d);a.t=setTimeout("SlideShow.Run('"+f+"')",a.timeout)},Init:function(d,a){var c=document.getElementById(d),b=a||5000;c.slideShow={timeout:b,t:setTimeout("SlideShow.Run('"+d+"')",b),currentSlideId:AcOS.GetElemId(AcOS.GetFirstChild(c))}}};window.RecordCounter={totalID:"recordCount",timeZero:new Date(2010,7,19),speed:0.449,timeout:2,add:0,Update:function(d){var b=SepNum(d).split(""),a="";for(var c=0;c<b.length;c++){if(/^\d$/.test(b[c])){a+="<span>"+b[c]+"</span>"}else{a+='<span class="number-separator">'+b[c]+"</span>"}}document.getElementById(RecordCounter.totalID).innerHTML=a},Run:function(){with(RecordCounter){Update(Math.round(recordsCount+(add+=speed*timeout)))}},Init:function(aRecordCount){with(RecordCounter){RecordCounter.recordsCount=Math.round(aRecordCount+speed*((new Date()).getTime()-timeZero.getTime())/1000);Update(recordsCount);setInterval("RecordCounter.Run()",timeout*1000)}}};toggleMe=function(){Effect.SlideUp("communicate",{duration:0.33})};toggleMeDown=function(){Effect.SlideDown("communicate",{duration:0.33})};showCloseConfirm=function(a){if(window.event){event.cancelBubble=true}if(confirm(a)){Lightview.hide()}return false};AutocompleteYearField=function(b,f){var e=document.getElementById(b),a=(new Date()).getUTCFullYear(),c=parseInt(e.options[0].value,10);for(var d=1;++c<=a;++d){e.options[d]=new Option(c,c);if(f&&f==c){e.options[d].selected=true}}e.style.display="inline"};AutocompleteSelectElement=function(c,b){for(var a=0;a<b.length;++a){c.options[a]=new Option(b[a],b[a])}};UpdateTotalCost=function(){var h=document.getElementById("totalCost"),f=document.getElementById("totalCostAgree"),e=parseFloat(h.getAttribute("basecost")),i=document.getElementById("costOfCertifiedCopies"),d=document.getElementById("costOfCopies"),j=document.getElementById("costOfShipping"),b=i&&i.offsetWidth&&i.innerHTML,c=d&&d.offsetWidth&&d.innerHTML,g=j&&j.offsetWidth&&j.innerHTML,a=(e+(parseFloat(b)||0)+(parseFloat(c)||0)+(parseFloat(g)||0)).toFixed(2);h.innerHTML=a;if(f){f.innerHTML=a}};UpdateShipmentCost=function(h,e,c,b){var l=document.forms[h],j=document.getElementById("costOfShipping"),g=parseFloat(j.getAttribute("fedexcost")),f=parseFloat(j.getAttribute("uspscost")),i=document.getElementById("costOfCopies"),d=document.getElementById("shipmentWay"),k=l.elements[(e||"")+"ShippingType"].value,a=document.getElementById("ShippingTypeLv");switch(k){case"Next Day":j.innerHTML=g.toFixed(2);d.innerHTML="FedEx Air";break;case"Regular Shipping":j.innerHTML=f.toFixed(2);d.innerHTML="Shipping";break}if(a){a.value=k}UpdateTotalCost()};UpdateShipmentNotice=function(a,c){var d=document.forms[a],e=document.getElementById("fedExContainer"),b=document.getElementById("uspsContainer");if(d.elements[(c||"")+"ShippingType"].value=="Next Day"){e.style.display="block";b.style.display="none"}else{b.style.display="block";e.style.display="none"}Lightview.Resize()};UpdateCertifiedCopiesCost=function(a,c){var e=document.forms[a],d=document.getElementById("costOfCertifiedCopies"),b=parseInt(e.elements[(c||"")+"AdditionalCopies"].value);d.innerHTML=((b+1)*parseFloat(d.getAttribute("onecopyprice"),10)).toFixed(2)};UpdateCopiesCost=function(g,d,e){var j=document.forms[g],b=document.getElementById("copiesContainer"),a=document.getElementById("numberOfCopies"),f=document.getElementById("costOfCopies"),h=document.getElementById("costOfShipping"),c=parseFloat(document.getElementById("oneCertificateCopyCost").innerHTML),i=parseInt(j.elements[(d||"")+"AdditionalCopies"].value);a.innerHTML=i+" Additional Cop"+((i==1)?"y":"ies");f.innerHTML=(c*i).toFixed(2);if(e=="init"){b.style.display=i?"block":"none"}UpdateCertifiedCopiesCost(g,d);UpdateTotalCost()};UpdateCopiesCount=function(a,c){var d=document.forms[a],b=parseInt(d.elements[(c||"")+"AdditionalCopies"].value);document.getElementById("AdditionalCopiesCount").value=b};DifferentCCLinkVCOnClick=function(a){var c=document.getElementById("AdditionalCopiesCount").value,b=document.getElementById("ShippingTypeLv").value;if(c){a+="&AdditionalCopiesCount="+c}if(b){a+="&ShippingTypeLv="+b}setTimeout("window.location.href ='"+a+"'",25)};CertifiedCopiesToggle=function(a,c){var d=document.forms[a],e=document.getElementById("certifiedCopiesContainer"),b=d.elements[(c||"")+"ResultType"].value;UpdateCertifiedCopiesCost(a,c);e.style.display=(b=="Certified Copy"?"block":"none");UpdateTotalCost()};PrepopulateCityAndState={Timeout:function(){var frm=document.forms[PrepopulateCityAndState.frmName],zipCodeField=frm[PrepopulateCityAndState.zipCodeFieldId],relFields=eval(zipCodeField.getAttribute("relfields")),waitImage=zipCodeField.parentNode.getElementsByTagName("img")[0];if(PrepopulateCityAndState.T){clearTimeout(PrepopulateCityAndState.T);PrepopulateCityAndState.T=null}waitImage.style.display="none";zipCodeField.readOnly=false;for(var i=relFields.length;i;){frm.elements[relFields[--i]].disabled=false}window.vitalCertificateAccessDenied=null},Populate:function(aResult){if(aResult!="EMPTY"){var frm=document.forms[PrepopulateCityAndState.frmName],zipCodeField=frm[PrepopulateCityAndState.zipCodeFieldId],relFields=eval(zipCodeField.getAttribute("relfields")),cityField=frm[relFields[0]],stateField=frm[relFields[1]],resutsArr=aResult.split("|"),city=resutsArr[0],state=resutsArr[1];cityField.value=city;for(var opts=stateField.options,i=opts.length;i;){if(opts[--i].value==state){opts[i].selected=true;break}}}PrepopulateCityAndState.Timeout()},Run:function(aEvent){if(window.vitalCertificateAccessDenied){return}var zipCodeField=aEvent.srcElement||aEvent.target,zipCodeFieldValue=zipCodeField.value.Trim();if(validZIP.test(zipCodeFieldValue)){var url=zipCodeField.getAttribute("url")+"&zipcode="+zipCodeFieldValue,frm=zipCodeField.form,relFields=eval(zipCodeField.getAttribute("relfields")),waitImage=zipCodeField.parentNode.getElementsByTagName("img")[0],err=zipCodeField.getAttribute("iderrortext");PrepopulateCityAndState.frmName=frm.name;PrepopulateCityAndState.zipCodeFieldId=zipCodeField.id;if(err&&(err=document.getElementById(err))){err.parentNode.removeChild(err)}if(!waitImage){waitImage=document.createElement("img");waitImage.className="waitingCircleImage";waitImage.src="images/loading_light.gif";with(waitImage.style){width="25px";height="25px";marginLeft="20px";verticalAlign="top";display="inline"}zipCodeField.parentNode.appendChild(waitImage)}window.vitalCertificateAccessDenied=true;waitImage.style.display="inline";zipCodeField.readOnly=true;for(var i=relFields.length;i;){frm.elements[relFields[--i]].disabled=true}PrepopulateCityAndState.T=setTimeout("PrepopulateCityAndState.Timeout()",10000);setTimeout("CbOS.Ajax({query:'"+url+"', success: PrepopulateCityAndState.Populate, error: PrepopulateCityAndState.Timeout})",500)}}};RelationshipOnChange=function(a,c){var d=document.forms[a],f=d[c+"Relationship"],b=d[c+"OtherRelationship"],e=f.options[f.selectedIndex].value=="Other";b.disabled=e?false:true;b.parentNode.style.display=e?"block":"none";if(e){b.removeAttribute("isdisabled")}else{b.setAttribute("isdisabled","isdisabled")}Lightview.Resize()};CommentsCounter={UpdateCounter:function(f,b,a,e,d){var c=document.getElementById(f);if(e>d){b.value=a.substring(0,(e=d)).Trim()}c.innerHTML=d-e},Run:function(g,c){var j=document.forms[g],f=j[c+"Comments"],b=f.value.Trim().replace(/\r\n|\n\r|\r(?!\n)|\n(?!\r)/g,"\r\n"),d=b.length,a=parseInt(f.getAttribute("maxsymbols"),10),i=f.getAttribute("counterid");if(i){CommentsCounter.UpdateCounter(i,f,b,d,a)}else{if(d>Math.round(a*0.7)){f.setAttribute("counterid",(i=getPK()));var h=document.createElement("div");h.innerHTML='You have <span id="'+i+'"></span>&nbsp;symbols left.';h.style.display="none";h.className="leftSpace instructions";f.parentNode.appendChild(h);CommentsCounter.UpdateCounter(i,f,b,d,a);h.style.display="block";Lightview.Resize()}}},Init:function(b,c,a){var d=document.forms[b][c+"Comments"];d.setAttribute("maxsymbols",a);addEvent(d,"keyup",new Function("CommentsCounter.Run('"+b+"', '"+c+"')"));CommentsCounter.Run(b,c)}};ContactUsObject={ContactReasonTrack:function(d,c,b){var a=document.forms[d][c+"ContactReason"];if(a){PageTrackEvent("ContactUs_"+b,"Reason_For_Contact",a.options[a.selectedIndex].value)}},LvSubmitLinkOnclick:function(aFormId,aPrefix,aSiteArea,aTracAction){with(ContactUsObject){ContactReasonTrack(aFormId,aPrefix,aSiteArea);PageTrackEvent("ContactUs_"+aSiteArea,"Email_Intercept",aTracAction);setTimeout("document.forms['"+aFormId+"'].submit()",300)}},FormBtnOnClick:function(aForm,aAction,aPrefix,aValidationParam,aErrorClass,aSiteArea){with(ContactUsObject){var errorBar=document.getElementById("doubleCheckErrorBar");if(errorBar){errorBar.setAttribute("defaulterrormessage","Please correct errors marked below")}if(validateUniversal(aForm,aValidationParam,aErrorClass)){aForm.action=aAction;var message=aForm[(aPrefix||"")+"Message"].value;if(/\bcancel(l|ed|led|lation|ation|ling|ing|\b)/i.test(message)){Lightview.show({href:"#Cancel_Check_ID",options:{closeButton:"small",autosize:true}});PageTrackEvent("ContactUs_"+aSiteArea,"ShowLightbox","Cancel Membership Check")}else{if(/\b(log[\x20-]?in|password|sign[\x20-]?in)\b/i.test(message)){Lightview.show({href:"#divLoginReset",options:{closeButton:"small",autosize:true}});PageTrackEvent("ContactUs_"+aSiteArea,"ShowLightbox","Login Issues")}else{if(/\b(opt[\x20-]?out|Privacy|Remove m(e|y))\b/i.test(message)){Lightview.show({href:"#divRemoveInfo",options:{closeButton:"small",autosize:true}});PageTrackEvent("ContactUs_"+aSiteArea,"ShowLightbox","Opt Out Requests")}else{if(/\bcredit[s]?\b/i.test(message)){Lightview.show({href:"#divCreditsInfo",options:{closeButton:"small",autosize:true}});PageTrackEvent("ContactUs_"+aSiteArea,"ShowLightbox","Credits inquiries")}else{if(/\b(un[-]?subscribe|(mailing|email) list)\b/i.test(message)){Lightview.show({href:"#divUnsubscribe",options:{closeButton:"small",autosize:true}});PageTrackEvent("ContactUs_"+aSiteArea,"ShowLightbox","Unsubscribe")}else{PageTrackEvent("ContactUs_"+aSiteArea,"Button","Submit_Inquiry");ContactReasonTrack(aForm.id,aPrefix,aSiteArea);setTimeout("document.forms['"+aForm.id+"'].submit()",300)}}}}}}}}};FootnoteRecordObj={GetFootnoteIcon:function(e){var a=document.getElementById(e),d=a.getAttribute("footnoteiconid");if(d){return document.getElementById(d)}else{var b=a.getElementsByTagName("A");for(var c=b.length;c;){if(b[--c].getAttribute("isfootnoteicon")){a.setAttribute("footnoteiconid",(b[c].id||(b[c].id=getPK())));return b[c]}}}},ApplyColoredStyle:function(a){FootnoteRecordObj.GetFootnoteIcon(a).style.backgroundPosition="0 -28px"},ApplyGreyStyle:function(a){FootnoteRecordObj.GetFootnoteIcon(a).style.backgroundPosition="0 0"},Out:function(){removeEvent(document.body,"mouseover",FootnoteRecordObj.Out);FootnoteRecordObj.outEventAdded=null;FootnoteRecordObj.ApplyGreyStyle(FootnoteRecordObj.activeId);FootnoteRecordObj.activeId=null},Over:function(b,d){var c=FootnoteRecordObj.activeId,a=b.id||(b.id=getPK());if(a!=c){if(c){FootnoteRecordObj.ApplyGreyStyle(c)}FootnoteRecordObj.ApplyColoredStyle((FootnoteRecordObj.activeId=a));if(!FootnoteRecordObj.outEventAdded){addEvent(document.body,"mouseover",FootnoteRecordObj.Out);FootnoteRecordObj.outEventAdded=true}}CancelBubble(d)}};InviteFM={DisableSubmitBtn:function(b){var a=document.getElementById("InviteFMSubmitBtn");if(b){AcOS.AddClassName(a,"btnBlueSmDisabled")}else{AcOS.RemoveClassName(a,"btnBlueSmDisabled")}InviteFM.submitAccessDenied=b},IsFamilyMember:function(){var a=document.getElementById("fcMembersBox").getElementsByTagName("h6");for(var b=a.length;b;){if(a[--b].offsetWidth){return true}}return false},GetPersonObj:function(b){var c=InviteFM.contactObj.persons;for(var a in c){if(c[a]["Key"]==b){return c[a]}}return null},GetFullNameBox:function(a){return AcOS.GetFirstChild(AcOS.GetNextSibl(AcOS.GetFirstChild(a)))},GetContactKey:function(f){var d=f.getAttribute("userid"),e=f.getAttribute("fn").toLowerCase(),a=f.getAttribute("ln").toLowerCase(),g=document.getElementById("fcContactBox").getElementsByTagName("h6");if(d){for(var c,b=0;b<g.length;++b){if(g[b].getAttribute("userid")==d){c=g[b].getAttribute("key");f.setAttribute("key",c);return c}}}else{for(var c,b=0;b<g.length;++b){if(g[b].getAttribute("fn").toLowerCase()==e&&g[b].getAttribute("ln").toLowerCase()==a){c=g[b].getAttribute("key");f.setAttribute("key",c);return c}}}return false},HideItem:function(f){var e=f.getAttribute("key")||InviteFM.GetContactKey(f),a=document.getElementById("contact"+e);f.style.display="none";if(e){AcOS.RemoveClassName(a,"contactIsSelected");a.removeAttribute("isselected")}var d=f.getAttribute("recordid");if(d){InviteFM.familyObj["record"+d]={Key:++InviteFM.lastKey,Value:{id:d,deleted:true}}}else{delete InviteFM.familyObj["person"+e]}var c=InviteFM.IsFamilyMember(),b=document.getElementById("fcMembersBox");InviteFM.DisableSubmitBtn(!c);document.getElementById("defaultMessageBox").style.display=c?"none":"block";if(c){AcOS.RemoveClassName(b,"noContacts")}else{AcOS.AddClassName(b,"noContacts")}},ShowItem:function(a){var b=a.getAttribute("key");AcOS.AddClassName(a,"contactIsSelected");a.setAttribute("isselected","1");document.getElementById("family"+b).style.display="block"},Add:function(g){if(g.getAttribute("isselected")){return}var f=g.getAttribute("fn").substring(0,79),c=g.getAttribute("ln").substring(0,79);if(f&&c){var d=g.getAttribute("key"),e=document.getElementById("family"+d);e.setAttribute("fn",f);e.setAttribute("ln",c);InviteFM.GetFullNameBox(e).innerHTML=f+" "+c;InviteFM.familyObj["person"+d]=InviteFM.GetPersonObj(d);InviteFM.familyObj["person"+d].Value.first=f;InviteFM.familyObj["person"+d].Value.last=c;InviteFM.ShowItem(g);AcOS.Ellipsis("familyEmailHolder"+d);AcOS.Ellipsis("familyNameHolder"+d)}else{InviteFM.ShowPersonLightbox(g,"add")}var b=InviteFM.IsFamilyMember(),a=document.getElementById("fcMembersBox");InviteFM.DisableSubmitBtn(!b);document.getElementById("defaultMessageBox").style.display=b?"none":"block";if(b){AcOS.RemoveClassName(a,"noContacts")}else{AcOS.AddClassName(a,"noContacts")}},ShowPersonLightbox:function(c,d){var a=document.getElementById("editPersonLightbox"),b=document.getElementById("contactEmail"),e=a.getElementsByTagName("form")[0];ClearForm(e.name);b.innerHTML=c.getAttribute("email");AcOS.Ellipsis(b.id);e.firstName.value=c.getAttribute("fn");e.lastName.value=c.getAttribute("ln");InviteFM.itemId=AcOS.GetElemId(c);InviteFM.mode=d;LvOS.SetFocus();LvOS.Show("editPersonLightbox")},Validate:function(a){if(validateUniversal(a,[["firstName",ValidateTypeReq],["lastName",ValidateTypeReq]],"InError")){var j=document.getElementById(InviteFM.itemId),i=j.getAttribute("key"),c=i?document.getElementById("family"+i):j,f=InviteFM.GetFullNameBox(c),h=a.firstName.value,k=a.lastName.value;c.setAttribute("fn",h);c.setAttribute("ln",k);f.innerHTML=h+" "+k;if(InviteFM.mode=="add"){var b=InviteFM.familyObj["person"+i]=InviteFM.GetPersonObj(i);b.Value.first=h;b.Value.last=k;InviteFM.ShowItem(j)}else{if(i){var b=InviteFM.familyObj["person"+i];if(!b){b=InviteFM.familyObj["person"+i]=InviteFM.GetPersonObj(i)}b.Value.first=h;b.Value.last=k}else{var d=c.getAttribute("recordid");if(d){var b=InviteFM.familyObj["record"+d];if(!b){b=InviteFM.familyObj["record"+d]={Key:++InviteFM.lastKey,Value:{id:d,first:h,last:k}}}}}}AcOS.Ellipsis(f.id);var e=InviteFM.IsFamilyMember(),g=document.getElementById("fcMembersBox");InviteFM.DisableSubmitBtn(!e);document.getElementById("defaultMessageBox").style.display=e?"none":"block";if(e){AcOS.RemoveClassName(g,"noContacts")}else{AcOS.AddClassName(g,"noContacts")}LvOS.Hide()}},Submit:function(c,a){if(InviteFM.submitAccessDenied){return}var e=document.forms[c],d=[];for(var b in InviteFM.familyObj){d.push(InviteFM.familyObj[b])}e[InviteFM.formPrefix+"Connections"].value=toJSON({persons:d});e.action=a;e.submit()},Init:function(a,b,c){InviteFM.formPrefix=b;InviteFM.contactObj=(new Function("return "+document.forms[a][b+"Connections"].value))();InviteFM.familyObj={};InviteFM.lastKey=c?parseInt(c,10):0;InviteFM.submitAccessDenied=!InviteFM.IsFamilyMember()}};PostToUrl=function(c,f,d){var e=document.createElement("form");e.setAttribute("method","post");e.setAttribute("action",c);if(d){e.setAttribute("target",d)}e.style.display="none";for(var b in f){var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("name",b);a.setAttribute("value",f[b]);e.appendChild(a)}document.body.appendChild(e);e.submit();document.body.removeChild(e)};ImageTools={DisplayAnim:function(a,c){var b=AcOS.GetPrevSibl(a);if(b){b.style.display=c?"block":"none"}},Resize:function(e,d,g){if(window.PrintPreview&&PrintPreview.accessDenied){return}var c=e.parentNode;if(d&&!g){g=d}if(!d){d=c.offsetWidth}if(!g){g=c.offsetHeight}e.removeAttribute("height");e.removeAttribute("width");e.style.paddingTop=e.style.paddingBottom=0;var b=$(e).getDimensions(),a,f;if(b.width>b.height){a=(b.width<d)?b.width:d}else{f=(b.height<g)?b.height:g}e.setAttribute((a?"width":"height"),(a||f));if(e.getAttribute("valign")){b=$(e).getDimensions();e.style.paddingTop=e.style.paddingBottom=Math.floor((g-b.height)/2)+"px"}if(!e.getAttribute("loading")){ImageTools.DisplayAnim(e,false);e.style.display="inline"}},Reload:function(b,a){var c=$(b);if(c){c.style.display="none";c.src=a;setTimeout("ImageTools.DisplayAnim($('"+b+"'), ($('"+b+"').offsetWidth ? false : true));",0)}},OnLoadAnim:function(b,c,d){if(window.PrintPreview&&PrintPreview.accessDenied){return}ImageTools.Resize(b,c,d);var a=b.nextSibling;if(a&&a.nodeName=="#text"){a=a.nextSibling}b.style.display=(a&&a.offsetWidth)?"none":"block"}};FamilyTreeWizard={SetGrandParentTitle:function(c,f){var k=document.getElementById("FamilyTreeWizard"+f+"GrandMotherHolder"),b=document.getElementById("FamilyTreeWizard"+f+"GrandFatherHolder"),g,j,a;for(var h,e=0,d=0;d<c.length;++d){h=c[d].id.split("_")[2];if(h=="FirstName"){g=AcOS.CapitaliseFirstLetter(c[d].value.Trim());++e}else{if(h=="LastName"){j=AcOS.CapitaliseFirstLetter(c[d].value.Trim());++e}}if(e==2){break}}a=g+(g&&j?" ":"")+j;k.innerHTML=a?"("+a+"'s Mother)":"";b.innerHTML=a?"("+a+"'s Father)":"";k.style.display=b.style.display=a?"inline":"none"},GrandParentTitleRules:function(){var a=(document.getElementById("FamilyTreeWizardMotherRow")).getElementsByTagName("input"),b=(document.getElementById("FamilyTreeWizardFatherRow")).getElementsByTagName("input");FamilyTreeWizard.SetGrandParentTitle(a,"Maternal");FamilyTreeWizard.SetGrandParentTitle(b,"Paternal")},PrepopulateGenderForSpouse:function(h){var m=(document.getElementById("FamilyTreeWizardHomePersonRow")).getElementsByTagName("select");for(var e=m.length;e;){if(m[--e].id.split("_")[2]=="Gender"){var l=m[e].options[m[e].selectedIndex].value.Trim();if(l){FamilyTreeWizard.childrenTabWasOpened=true;var b=(l=="M"?"F":"M"),f=h||AcOS.GetFirstChild(AcOS.GetNextSibl(document.getElementById("FamilyTreeWizardChildrenTab")));while(!f.getAttribute("wizardgroup")){f=AcOS.GetNextSibl(f)}var g=AcOS.GetFirstChild(f),a=g.getElementsByTagName("select");for(var d=a.length;d;){if(a[--d].id.split("_")[2]=="Gender"&&!a[d].options[a[d].selectedIndex].value.Trim()){for(var c=a[d].options.length;c;){if(a[d].options[--c].value==b){a[d].selectedIndex=c;FamilyTreeWizard.GenderHandler(null,a[d]);break}}break}}}break}}},SetCheckbox:function(b){var e=document.getElementById(b),d=AcOS.GetNextSibl(e),a=d.getElementsByTagName("input"),g=false;for(var c=a.length;c;){if(a[--c].offsetWidth&&a[c].value.Trim()){var f=a[c].id.split("_")[2];if(f=="FirstName"||f=="LastName"){g=true;break}}}if(g){AcOS.AddClassName(e,"headRowTicked")}else{AcOS.RemoveClassName(e,"headRowTicked")}},Validation:function(h){var a=document.forms[FamilyTreeWizard.formName],b=document.getElementById(h),f=AcOS.GetNextSibl(b),j=f.getElementsByTagName("input"),d=f.getElementsByTagName("select"),g=[],e;for(var c=j.length;c;){e=j[--c].id;if(/HomePerson_R1_FirstName|HomePerson_R1_LastName/.test(e)){g.push([e,ValidateTypeReqName])}else{if(/FirstName|LastName/.test(e)){g.push([e,ValidateTypeName])}else{if(/BirthYear/.test(e)){g.push([e,ValidateTypePastYear])}}}}return validateUniversal(a,g,"InError")},Validate:function(a){var c=FamilyTreeWizard.activeTabId,b=true;if(c){b=FamilyTreeWizard.Validation(c)}if(b){if(c){FamilyTreeWizard.SetCheckbox(c);if(c=="FamilyTreeWizardYourselfTab"&&AcOS.GetNextSibl(document.getElementById(c)).offsetWidth){FamilyTreeWizard.GrandParentTitleRules()}}if(!FamilyTreeWizard.pageInError&&!FamilyTreeWizard.childrenTabWasOpened&&a=="FamilyTreeWizardChildrenTab"){FamilyTreeWizard.PrepopulateGenderForSpouse()}return true}else{return false}},ToggleContent:function(aNextId,aTracJS){if(FamilyTreeWizard.accessDenied||!FamilyTreeWizard.Validate(aNextId)){return}if(aTracJS){eval(aTracJS)}window.scrollTo(0,0);FamilyTreeWizard.accessDenied=true;var prevId=FamilyTreeWizard.activeTabId;if(prevId){if(prevId==aNextId){AcOS.Toggle(aNextId,new Function("FamilyTreeWizard.activeTabId = null; FamilyTreeWizard.accessDenied = null; FamilyTreeWizard.ToggleContentCompleted();"))}else{AcOS.Toggle(prevId,new Function("AcOS.RemoveClassName(document.getElementById('"+aNextId+"'), 'headRowTicked'); AcOS.Toggle('"+aNextId+"', new Function('FamilyTreeWizard.activeTabId = \""+aNextId+"\"; FamilyTreeWizard.SetFocus(); FamilyTreeWizard.accessDenied = null; FamilyTreeWizard.ToggleContentCompleted();'))"))}}else{AcOS.RemoveClassName(document.getElementById(aNextId),"headRowTicked");AcOS.Toggle(aNextId,new Function("FamilyTreeWizard.activeTabId = '"+aNextId+"'; FamilyTreeWizard.SetFocus(); FamilyTreeWizard.accessDenied = null; FamilyTreeWizard.ToggleContentCompleted();"))}},ToggleContentCompleted:function(){if(typeof FamilyTreeWizardToggleContentCompleted!="undefined"){FamilyTreeWizardToggleContentCompleted()}},CopyRow:function(aElemToCopy,aIsCopyGroup){with(FamilyTreeWizard){var newElem=(jQuery(aElemToCopy).clone())[0],newInputFields=newElem.getElementsByTagName("input"),newSelectFields=newElem.getElementsByTagName("select"),currentPosition=newElem.getAttribute("position"),p=aElemToCopy.parentNode,zindex=newElem.getAttribute("zindex");if(zindex){var newZindex=parseInt(zindex,10)-1;newElem.setAttribute("zindex",newZindex);newElem.style.zIndex=newZindex}if(currentPosition){var newPosition=parseInt(currentPosition)+1,newTitle=newElem.getElementsByTagName("h5")[0];newElem.setAttribute("position",newPosition);newTitle.innerHTML=newTitle.innerHTML.replace(/\d+/,newPosition)}++FamilyTreeWizard.lastRowCounter;newElem.style.display="none";var script=aElemToCopy.getElementsByTagName("script");for(var i=0;i<script.length;++i){if(script[i]){if(!aElemToCopy.runJS){aElemToCopy.runJS=""}aElemToCopy.runJS+=script[i].innerHTML;newElem.innerHTML=CbOS.JSParser(newElem.innerHTML)}}if(aElemToCopy.runJS){newElem.runJS=aElemToCopy.runJS.replace(/_R\d+_/g,"_R"+FamilyTreeWizard.lastRowCounter+"_")}newElem.innerHTML=newElem.innerHTML.replace(/_R\d+_/g,"_R"+FamilyTreeWizard.lastRowCounter+"_");for(var i=newInputFields.length;i;){if(newInputFields[--i].type=="hidden"){if(aIsCopyGroup&&p.getAttribute("wizardgroup")&&newInputFields[i].id.split("_")[2]=="FamilyGroup"){newInputFields[i].value=parseInt(newInputFields[i].value)+1}}else{newInputFields[i].value="";AcOS.RemoveClassName(newInputFields[i],"InError");var error=AcOS.GetNextSibl(newInputFields[i]);while(error&&error.nodeName!="div"){error=AcOS.GetNextSibl(error)}if(error&&error.nodeName=="div"){error.parentNode.removeChild(error)}}}for(var i=newSelectFields.length;i;){newSelectFields[--i].selectedIndex=0;AcOS.RemoveClassName(newInputFields[i],"InError");var error=AcOS.GetNextSibl(newInputFields[i]);if(error){error.parentNode.removeChild(error)}}var hiddenElement=document.createElement("input");hiddenElement.type="hidden";hiddenElement.name=newInputFields[0].id.split("_")[0]+"_R"+FamilyTreeWizard.lastRowCounter+"_";hiddenElement.value="E";if(p.getAttribute("wizardgroup")){p.parentNode.appendChild(hiddenElement)}else{p.appendChild(hiddenElement)}return newElem}},AddPerson:function(aObj,aCountCopyElem){if(SearchBoxPrepare.containerOpened){return}var elemToCopy=AcOS.GetPrevSibl(aObj.parentNode);if(elemToCopy.getAttribute("wizardgroup")){var newGroup=elemToCopy.cloneNode(false),childToCopy=AcOS.GetFirstChild(elemToCopy),wizardRow,zIndex=parseInt(newGroup.getAttribute("spouseposition"))-100;newGroup.style.display="none";newGroup.id=getPK();elemToCopy.parentNode.insertBefore(newGroup,aObj.parentNode);while(childToCopy){if(childToCopy.getAttribute("wizardrow")){if(aCountCopyElem){wizardRow=FamilyTreeWizard.CopyRow(childToCopy,"copyGroup");wizardRow.style.display="block";wizardRow.style.zIndex=--zIndex;if(wizardRow.getAttribute("zindex")){wizardRow.setAttribute("zindex",zIndex)}newGroup.appendChild(wizardRow);if(FamilyTreeWizard.fbFeaturesData){FamilyTreeWizard.FbFriendFeaturesRules({prefix:"RelativePerson_R"+FamilyTreeWizard.lastRowCounter+"_"})}if(wizardRow.runJS){eval(wizardRow.runJS)}--aCountCopyElem}}else{newGroup.appendChild(childToCopy.cloneNode(true))}childToCopy=AcOS.GetNextSibl(childToCopy)}FamilyTreeWizard.PrepopulateGenderForSpouse(newGroup);for(var frmSelectElements=newGroup.getElementsByTagName("select"),i=frmSelectElements.length;i;){if(/Gender$/.test(frmSelectElements[--i].id)){addEvent(frmSelectElements[i],"change",FamilyTreeWizard.GenderHandler);FamilyTreeWizard.GenderHandler(null,frmSelectElements[i])}}newGroup.setAttribute("spouseposition",zIndex);jQuery(newGroup).slideToggle("slow",new Function("FamilyTreeWizard.SetFocusInNewPersonRow('"+newGroup.id+"'); FamilyTreeWizard.ToggleContentCompleted();"))}else{var newElem=FamilyTreeWizard.CopyRow(elemToCopy);newElem.id=getPK();elemToCopy.parentNode.insertBefore(newElem,aObj.parentNode);for(var frmSelectElements=newElem.getElementsByTagName("select"),i=frmSelectElements.length;i;){if(/Gender$/.test(frmSelectElements[--i].id)){addEvent(frmSelectElements[i],"change",FamilyTreeWizard.GenderHandler);FamilyTreeWizard.GenderHandler(null,frmSelectElements[i])}}if(newElem.runJS){eval(newElem.runJS)}if(FamilyTreeWizard.fbFeaturesData){FamilyTreeWizard.FbFriendFeaturesRules({prefix:"RelativePerson_R"+FamilyTreeWizard.lastRowCounter+"_"})}jQuery(newElem).slideToggle("slow",new Function("FamilyTreeWizard.SetFocusInNewPersonRow('"+newElem.id+"'); FamilyTreeWizard.ToggleContentCompleted();"))}SuggestControlAutocompletePrepare()},SetFocusInNewPersonRow:function(a){var c=document.getElementById(a).getElementsByTagName("input");for(var b=0;b<c.length;++b){if(c[b].id.split("_")[2]=="FirstName"){AcOS.SetFocus(document.forms[FamilyTreeWizard.formName],c[b].id);break}}},SetFocus:function(){AcOS.SetFocus(document.forms[FamilyTreeWizard.formName])},TracExpandCollapseTab:function(a){return"PageTrackEvent('FTW_"+FamilyTreeWizard.siteArea+"_"+FamilyTreeWizard.splitTest+"', '"+a.getAttribute("step")+"', '"+(AcOS.GetNextSibl(a).offsetWidth?"Collapse":"Expand")+"')"},SkipAddingRelatives:function(b){if(FamilyTreeWizard.RelativesValidate()){var a=FamilyTreeWizard.activeTabId?document.getElementById(FamilyTreeWizard.activeTabId).getAttribute("step"):"noOpenedStep";PageTrackEvent("FTW_"+FamilyTreeWizard.siteArea+"_"+FamilyTreeWizard.splitTest,a,"Skip");if(b){document.forms[FamilyTreeWizard.formName].action+=b.replace(/&amp;/g,String.fromCharCode(38))}if(FamilyTreeWizard.data.isFacebookCanvas){PostFacebookActionAdd(FamilyTreeWizard.formName,FamilyTreeWizard.data)}else{setTimeout("document.forms['"+FamilyTreeWizard.formName+"'].submit()",300)}}},Submit:function(aObj,aTracJS){if(FamilyTreeWizard.Validation("FamilyTreeWizardChildrenTab")&&FamilyTreeWizard.RelativesValidate()){FamilyTreeWizard.onUnloadAccessDenied=true;aObj.style.display="none";AcOS.GetNextSibl(aObj).style.display="block";if(aTracJS){eval(aTracJS)}if(FamilyTreeWizard.data.isFacebookCanvas){PostFacebookActionAdd(FamilyTreeWizard.formName,FamilyTreeWizard.data)}else{setTimeout("document.forms['"+FamilyTreeWizard.formName+"'].submit()",300)}}},OnUnloadHandler:function(){if(!FamilyTreeWizard.onUnloadAccessDenied){var a=FamilyTreeWizard.activeTabId?document.getElementById(FamilyTreeWizard.activeTabId).getAttribute("step"):"noOpenedStep";PageTrackEvent("FTW_"+FamilyTreeWizard.siteArea+"_"+FamilyTreeWizard.splitTest,a,"Away")}},GenderHandler:function(c,f){var d=c?AcOS.GetTarget(c):f,e=d.id.replace(/Gender/,"LastName_Label"),b=document.getElementById(e);b.innerHTML=d.options[d.selectedIndex].value=="F"?"Maiden Name":"Last Name";if(FamilyTreeWizard.fbFeaturesData){var a=document.getElementById(d.id.replace("Gender",FamilyTreeWizard.fbFeaturesData.personImageSuffix));if(a&&!/graph.facebook.com/.test(a.src)){a.src="images/noAvatar"+d.options[d.selectedIndex].value+".gif"}}},RelativesValidate:function(){if(!document.getElementById("addRelativesLightbox")||FamilyTreeWizard.relativesValidateAccessDenied||/HideAddRelativesLightbox=1/.test(location.href)){return true}var b=document.forms[FamilyTreeWizard.formName].elements;for(var a=b.length;a;){if(b[--a].type=="text"&&/^RelativePerson.*(FirstName|LastName)/.test(b[a].id)&&b[a].value.Trim()){return true}}FamilyTreeWizard.relativesValidateAccessDenied=true;LvOS.Show("addRelativesLightbox");return false},ClearHiddenKeyField:function(f){var e=f.id,c=f.getAttribute("autocompletevalue");if(f.value!=c){var a=document.getElementById(e.replace(/FirstName|LastName/,"FacebookConnectUserID"));if(a){a.value=""}var b=document.getElementById(e.replace(/FirstName|LastName/,"FamilyConnectionId"));if(b){b.value=""}var d=document.getElementById(e.replace(e.split("_")[2],/FirstName/.test(e)?"LastName":"FirstName"));f.removeAttribute("autocompletevalue");d.removeAttribute("autocompletevalue")}},AjaxTaskStop:function(a){CbOS.AjaxTaskAbort(a.facebookFriendCheckAjaxTaskId);a.facebookFriendCheckAjaxTaskId=null},InviteDialogRun:function(c,b){var d="REPLACER_FULL_NAME",e=50,f=c.firstName+" "+c.lastName,g=e-FamilyTreeWizard.fbFeaturesData.dialogDefaultTitle.length+d.length,a=f.length<g?f:f.substring(0,(g-3))+"...";FamilyTreeWizard.fbFeaturesData.dialogData.to=c.fbId.Trim().replace(/\s/g,",");FamilyTreeWizard.fbFeaturesData.dialogData.title=FamilyTreeWizard.fbFeaturesData.dialogDefaultTitle.replace(d,a);InviteFriendDialogDataObj(FamilyTreeWizard.fbFeaturesData.dialogData,null,b,null,true,null)},FbFriendFeaturesRules:function(a){var b=document.getElementById((a.prefix+FamilyTreeWizard.fbFeaturesData.personImageSuffix)),d=document.getElementById((a.prefix+FamilyTreeWizard.fbFeaturesData.shareLinkSuffix));if(a.fbId){var e=a.fbId.match(/\d*/);if(b){b.src="//graph.facebook.com/"+e+"/picture?type=square"}if(d){d.onclick=function(){FamilyTreeWizard.InviteDialogRun(a,FamilyTreeWizard.fbFeaturesData.siteArea)};AcOS.RemoveClassName(d,"ftw-share-link-disabled")}FacebookUserIdSet({facebookConnectUserId:e,id:a.id,firstName:a.firstName,lastName:a.lastName,prefix:a.prefix})}else{if(b){var c=document.getElementById((a.prefix+"Gender"));b.src="images/noAvatar"+c.options[c.selectedIndex].value+".gif"}if(d){d.onclick=null;AcOS.AddClassName(d,"ftw-share-link-disabled")}}},FbFriendFeatures:function(b){if(!/HomePerson/.test(b.id)){var c=b.id.replace(/FirstName|LastName/,""),f=document.forms[FamilyTreeWizard.formName],d=f.elements[c+"FirstName"],i=f.elements[c+"LastName"],e=d.value.Trim(),a=i.value.Trim(),g=d.getAttribute("autocompletevalue"),h=i.getAttribute("autocompletevalue");FamilyTreeWizard.AjaxTaskStop(d);if(e&&a){if(e!=g||a!=h){d.facebookFriendCheckAjaxTaskId=CbOS.Ajax({query:AcOS.QueryBuilder(FamilyTreeWizard.fbFeaturesData.fbIdAjaxUrl,"SearchString="+e+"|"+a),method:"POST",success:function(j){FamilyTreeWizard.FbFriendFeaturesRules({fbId:(j=="EMPTY"?"":j),firstName:e,lastName:a,prefix:c})},error:function(){FamilyTreeWizard.FbFriendFeaturesRules({prefix:c})}})}}else{FamilyTreeWizard.FbFriendFeaturesRules({prefix:c})}}},Init:function(l,m,d,h,c,g,k,j,e){FamilyTreeWizard.data=e||{};if(k){FamilyTreeWizard.relativesValidateAccessDenied=true}if(d){FamilyTreeWizard.pageInError=true;if(l!="FamilyTreeWizardYourselfTab"){FamilyTreeWizard.GrandParentTitleRules()}}var a=document.forms[h];a.setAttribute("noalert","1");FamilyTreeWizard.formName=h;FamilyTreeWizard.lastRowCounter=parseInt(m.split("_")[1].replace(/R/,""));FamilyTreeWizard.activeTabId=l;FamilyTreeWizard.siteArea=c;FamilyTreeWizard.splitTest=g||"A";if(j){FamilyTreeWizard.fbFeaturesData=j}addEvent(window,"unload",FamilyTreeWizard.OnUnloadHandler);FamilyTreeWizard.SetFocus();var b=a.elements;for(var f=b.length;f;){if(b[--f].type=="select-one"&&/Gender$/.test(b[f].id)){addEvent(b[f],"change",FamilyTreeWizard.GenderHandler)}}}};PostFacebookActionResponseHandler=function(b,a){var c=document.forms[a];if(!(--c.postFacebookActionCounter)){AcOS.StopTimeout(c.submitTimeout);c.submit()}};PostFacebookActionAdd=function(h,c){var k=document.forms[h];if(k.getAttribute("submitaccessdenied")){return}var b=k.elements,m,n,g,l,j,f=[];k.setAttribute("submitaccessdenied",1);for(var e=b.length;e;){if(b[--e].type=="text"&&/^RelativePerson.*FirstName/.test(b[e].id)){g=b[e].id.replace("FirstName","");m=b[e].value.Trim();n=k.elements[g+"LastName"].value.Trim();if(m||n){var d=k.elements[g+"FacebookConnectUserID"],a=k.elements[g+"Gender"];l=d.value?"http://graph.facebook.com/"+d.value+"/picture?type=square":(c.frontendSiteUrl+"images/noAvatar"+a.options[a.selectedIndex].value+".gif");j=k.elements[g+"RecordType"].value;if(j=="GFP"||j=="GFM"){j="Grandfather"}if(j=="GMP"||j=="GMM"){j="Grandmother"}f.push({firstName:m,lastName:n,relationship:j,imageUrl:l})}}}if(f.length){k.postFacebookActionCounter=f.length;for(var e=f.length;e;){PostActionToFacebook("add","relative",c.frontendSiteUrl+"?_act=fbRelativeObject&relativeFirstName="+f[--e].firstName+"&relativeLastName="+f[e].lastName+"&relationship="+f[e].relationship+"&userFirstName="+c.userFirstName+"&image="+encodeURIComponent(f[e].imageUrl),null,null,function(i){PostFacebookActionResponseHandler(i,h)},c.analyticsCode,null)}k.submitTimeout=setTimeout("document.forms['"+h+"'].submit()",5000)}else{k.submit()}};SubmitInviteForm=function(d,a){var e=document.forms[d],f=e.elements.invited,c="";if(f){if(!f.length){f=[f]}for(var b=f.length;b;){if(f[--b].getAttribute("invited")=="0"){e.action=a;e.submit();return}else{if(c.length>0){c+=", "}c+=f[b].getAttribute("email")}}document.getElementById("AlreadyInvitedList").innerHTML=c;LvOS.Show("inviteFailedLightbox")}LvOS.Show("inviteFailedEmptyLightbox")};AjaxSubmit=function(a,b,c){CbOS.AjaxTask({query:b,method:"POST",mode:"getResponse",data:a,success:function(d){if(d=="EMPTY"){if(window.LightviewOpened){Lightview.hide()}return}if(c){$(c).innerHTML=d;Lightview.Resize()}else{LvOS.ShowHTML(d)}},error:function(d){LvOS.ShowHTML(d)}})};popupWins=new Array();WindowOpener=function(c,b,a){if(typeof(popupWins[b])!="object"){popupWins[b]=window.open(c,b,a)}else{if(!popupWins[b].closed){if(c){popupWins[b].location.href=c}}else{popupWins[b]=window.open(c,b,a)}}popupWins[b].focus();return popupWins[b]};WaterMark=function(a){var d=AcOS.GetTarget(a),c=d.getAttribute("watermarkvalue"),b=d.getAttribute("watermarkclass");if(a.type=="focus"){if(d.value==c){d.value="";AcOS.RemoveClassName(d,b);if(d.getAttribute("maxlengthdefault")){d.setAttribute("maxlength",d.getAttribute("maxlengthdefault"));d.removeAttribute("maxlengthdefault")}}}else{if(!d.value.Trim()||(d.value==c)){if(d.getAttribute("maxlength")){d.setAttribute("maxlengthdefault",d.getAttribute("maxlength"));d.removeAttribute("maxlength")}AcOS.AddClassName(d,b);d.value=c}}};WhatermarkChangeDependOnGender=function(b,a){var c=AcOS.FieldValueGet(a);if(b=="F"){a.setAttribute("watermarkvalue","Maiden Name");if(!c){a.value="Maiden Name"}}else{a.setAttribute("watermarkvalue","Last Name");if(!c){a.value="Last Name"}}};FormWatermarksPrepare=function(a,c){var h=document[a].elements;for(var f,d,g,b=h.length;b;){f=h[--b].getAttribute("watermarkvalue");if(h[b].type!="text"||!f){continue}g=h[b].value.Trim();d=h[b].getAttribute("watermarkclass");switch(c){case"set":if(!g){AcOS.AddClassName(h[b],d);h[b].value=f}else{if(g!=f){AcOS.RemoveClassName(h[b],d)}else{AcOS.AddClassName(h[b],d)}}break;case"clear":if(h[b].value==f){h[b].value="";AcOS.RemoveClassName(h[b],d)}break}}};PrintPreview={RemovePrintContent:function(){var p=$("printPrevLightbox");if(p){var f=p.firstChild;if(f&&(f.nodeName!="#text"||(f=f.nextSibling))){with(PrintPreview){if(PrintPreview.moveTo&&(moveTo=$(moveTo))){moveTo.appendChild(f);moveTo=null}else{p.removeChild(f)}}}}},PrintPreviewOpened:function(){PrintPreview.opened=true;($("pageWrapper")||$("content")).className="noPrint"},PrintPreviewHidden:function(){($("pageWrapper")||$("content")).className="";with(PrintPreview){if(PrintPreview.noClickable){var img=$("printPrevNoClickable");if(img){img.style.display="none";document.body.appendChild(img)}PrintPreview.noClickable=null}RemovePrintContent();document.stopObserving("lightview:opened",PrintPreviewOpened);document.stopObserving("lightview:hidden",PrintPreviewHidden);accessDenied=opened=null}},Run:function(aId,aMove,aNoClickable){if(window.DocumentLoaded=="completed"&&window.Lightview&&!window.lightviewAccessDenied&&!PrintPreview.accessDenied){var content=$(aId);if(content){PrintPreview.accessDenied=true;var p=$("printPrevLightbox");if(!p){p=document.createElement("DIV");p.id="printPrevLightbox";with(p.style){display="none";position="relative";overflow="visible"}document.body.appendChild(p)}with(PrintPreview){RemovePrintContent();var contScript=content.getElementsByTagName("SCRIPT");for(var i=contScript.length;i;){contScript[--i].parentNode.removeChild(contScript[i])}p.style.width=content.offsetWidth+"px";if(aMove){var pn=content.parentNode;PrintPreview.moveTo=pn.id||(pn.id=getPK())}p.appendChild(aMove?content:content.cloneNode(true));document.observe("lightview:opened",PrintPreviewOpened);document.observe("lightview:hidden",PrintPreviewHidden)}bottomMenubarHTML="<div id='lvPrintButtons'><div onclick='Lightview.hide(); return false' class='lvPrintButtons btnBlueSm right'>Close</div><div onclick='$$(\".lv_contentBottom\")[0].scrollTop = 0; window.print(); return false' class='lvPrintButtons btnBlueSm right'>Print</div><div class='clr_thin'></div></div>";if(aNoClickable){PrintPreview.noClickable=true;var img=$("printPrevNoClickable"),dim=p.getDimensions();if(!img){img=new Image();img.onload=new Function("LvOS.Show('printPrevLightbox')");img.src="images/bg/1x1Trsp.gif";img.id="printPrevNoClickable";document.body.appendChild(img)}with(img.style){width=dim.width+"px";height=dim.height+"px"}p.appendChild(img);img.style.display="block";LvOS.Show("printPrevLightbox",bottomMenubarHTML)}else{LvOS.Show("printPrevLightbox",bottomMenubarHTML)}}}}};ResizeLightViewBgImg=function(){var b=Lightview.container.getDimensions(),a=$("LightViewBgImg");a.width=b.width;a.height=b.height};SearchGuideObject={GetTabId:function(a){var c=document.getElementById("searchGuideTabs").getElementsByTagName("A"),d;for(var b=c.length;b;){if(c[--b].getAttribute("rel")==a){d=c[b];break}}return AcOS.GetElemId(d)},Show:function(aEvent,aRel){with(SearchGuideObject){var nextTab=aRel?document.getElementById(GetTabId(aRel)):AcOS.GetTarget(aEvent),prevTabId=SearchGuideObject.activeTabId;if(nextTab.nodeName=="A"&&nextTab.id!=prevTabId){var prevTab=document.getElementById(prevTabId);SearchGuideObject.activeTabId=AcOS.GetElemId(nextTab);AcOS.RemoveClassName(prevTab,"tabCurrent");AcOS.AddClassName(nextTab,"tabCurrent");document.getElementById(prevTab.getAttribute("rel")).style.display="none";document.getElementById(nextTab.getAttribute("rel")).style.display="block"}}return CancelBubble(aEvent)},GetContent:function(a,b){LvOS.Load(a,new Function("SearchGuideObject.Init('"+b+"')"))},Init:function(a){SearchGuideObject.activeTabId=SearchGuideObject.GetTabId(a)}};FixLightViewBgImg=function(){if(!window.Lightview){return}document.observe("lightview:opened",function(b){var a=new Image();a.src="images/bg/1x1w.gif";a.style.position="absolute";a.style.zIndex=4998;document.body.appendChild(a);a.id="LightViewBgImg";ResizeLightViewBgImg();addEvent(window,"resize",ResizeLightViewBgImg,true);addEvent(window,"scroll",ResizeLightViewBgImg,true)});document.observe("lightview:hidden",function(a){var b=$("LightViewBgImg");if(b){b.parentNode.removeChild(b)}if(document.addEventListener){window.removeEventListener("resize",ResizeLightViewBgImg,true);window.removeEventListener("scroll",ResizeLightViewBgImg,true)}else{window.detachEvent("onresize",ResizeLightViewBgImg);window.detachEvent("onscroll",ResizeLightViewBgImg)}})};if(document.all||window.opera){addEvent(window,"load",FixLightViewBgImg)}FacebookCanvasObj={Resize:function(a,b){if(b){addEvent(window,b,new Function("FacebookCanvasObj.Resize('"+a+"')"))}else{var c=document.getElementById(a);if(c){setTimeout("FB.Canvas.setSize({height:'"+c.offsetHeight+"'})",250)}}}};FullStateToAbbr=function(b){var a;switch(b.Trim()){case"United States":a="US";break;case"United Kingdom":a="UK";break;case"Canada":a="Canada";break;case"Alabama":a="AL";break;case"Alaska":a="AK";break;case"Arizona":a="AZ";break;case"Arkansas":a="AR";break;case"California":a="CA";break;case"Colorado":a="CO";break;case"Connecticut":a="CT";break;case"District of Columbia":a="DC";break;case"Delaware":a="DE";break;case"Florida":a="FL";break;case"Georgia":a="GA";break;case"Hawaii":a="HI";break;case"Iowa":a="IA";break;case"Idaho":a="ID";break;case"Illinois":a="IL";break;case"Indiana":a="IN";break;case"Kansas":a="KS";break;case"Kentucky":a="KY";break;case"Louisiana":a="LA";break;case"Maine":a="ME";break;case"Maryland":a="MD";break;case"Massachusetts":a="MA";break;case"Michigan":a="MI";break;case"Minnesota":a="MN";break;case"Mississippi":a="MS";break;case"Missouri":a="MO";break;case"Montana":a="MT";break;case"Nebraska":a="NE";break;case"Nevada":a="NV";break;case"New Hampshire":a="NH";break;case"New Jersey":a="NJ";break;case"New Mexico":a="NM";break;case"New York":a="NY";break;case"North Carolina":a="NC";break;case"North Dakota":a="ND";break;case"Ohio":a="OH";break;case"Oklahoma":a="OK";break;case"Oregon":a="OR";break;case"Pennsylvania":a="PA";break;case"Rhode Island":a="RI";break;case"South Carolina":a="SC";break;case"South Dakota":a="SD";break;case"Tennessee":a="TN";break;case"Texas":a="TX";break;case"Utah":a="UT";break;case"Vermont":a="VT";break;case"Virginia":a="VA";break;case"Washington":a="WA";break;case"West Virginia":a="WV";break;case"Wisconsin":a="WI";break;case"Wyoming":a="WY";break;default:a=""}return a};GoogleMapLightbox=function(c,b,e,h,a){var d=document.getElementById(b);if(!d){for(var f=0;f<a.length;++f){AcOS.LoadJS(a[f])}var g=document.createElement("div");g.className="hideElement";d=document.createElement("div");d.id=b;d.className="googleMap";g.appendChild(d);document.body.appendChild(g)}if((typeof(GoogleMapsShow2)=="undefined")||(typeof(google)=="undefined")){setTimeout("GoogleMapLightbox('"+c+"', '"+b+"', '"+e+"', '"+h+"')",50)}else{GoogleMapsShow2(c,b,[e],false,false,h,true,5);setTimeout("Lightview.show({href: ('#' + '"+b+"'), title: 'LOCATION MAP', options: {closeButton: 'small', topclose: false, autosize: true}})",250)}};FbMessageOnWall=function(a,c,b){CbOS.Ajax({query:c,method:"POST",success:function(d){var e=b;e.link=AcOS.QueryBuilder(e.link,("RequestId="+d));e.requestId=d;FbLoginAndPostMessageOnUserWallDisplay(a,e)}})};CollectionsDescriptionToggle=function(d,c,b,a){if(d.getAttribute("accessdenied")){return}d.setAttribute("accessdenied","1");if(d.getAttribute("description")){d.innerHTML=a;d.removeAttribute("description")}else{d.innerHTML=b;d.setAttribute("description","1")}jQuery("#"+c).slideToggle("slow",new Function("document.getElementById('"+AcOS.GetElemId(d)+"').removeAttribute('accessdenied')"))};TotalCostUpdate=function(){var a=document.getElementById("totalCost"),b=a.ftdna;a.innerHTML=parseFloat(b.mainProductPrice+b.promoteProductPrice+b.shippingProductPrice).toFixed(2)};PromoteProductRemove=function(a,f,d){document.getElementById("promoteProductBox").style.display="none";var e=document.getElementById("totalCost"),h=document.forms[a],g=h.elements;e.ftdna.promoteProductPrice=0;for(var b=g.length,c=0;c<b;++c){if(d){if(g[c].type=="hidden"&&g[c].value==f){g[c].parentNode.removeChild(g[c]);break}}else{if(g[c].getAttribute("productid")==f){g[c].value=0;break}}}TotalCostUpdate()};ShippingProductInputAdd=function(b,a){var c=document.createElement("input");c.type="hidden";c.id=c.name="PRODUCT1";c.value=a;document.forms[b].appendChild(c)};ShippingProductUpdate=function(h,g,d){var b=document.getElementById("totalCost").ftdna,k=h?AcOS.GetTarget(h):document.getElementById("ftdnaShippingMethod"),f=document.getElementById("shippingProductPriceCell");if(d){var j=document.forms[g];for(var a=j.elements,c=a.length,e=0;e<c;++e){if(a[e].type=="hidden"&&(a[e].value==b.threeDayShipping.id||a[e].value==b.nextDayShipping.id)){a[e].parentNode.removeChild(a[e]);--c}}}switch(k.value){case"NextDayShipping":if(d){ShippingProductInputAdd(g,b.nextDayShipping.id)}else{document.getElementById(b.threeDayShipping.hiddenInputId).value=0;document.getElementById(b.nextDayShipping.hiddenInputId).value=1}b.shippingProductId=b.nextDayShipping.id;b.shippingProductPrice=b.nextDayShipping.price;break;case"ThreeDayShipping":if(d){ShippingProductInputAdd(g,b.threeDayShipping.id)}else{document.getElementById(b.threeDayShipping.hiddenInputId).value=1;document.getElementById(b.nextDayShipping.hiddenInputId).value=0}b.shippingProductId=b.threeDayShipping.id;b.shippingProductPrice=b.threeDayShipping.price;break;case"RegularShipping":if(!d){document.getElementById(b.threeDayShipping.hiddenInputId).value=0;document.getElementById(b.nextDayShipping.hiddenInputId).value=0}b.shippingProductId=b.regularShipping.id;b.shippingProductPrice=b.regularShipping.price;break}f.innerHTML=b.shippingProductPrice.toFixed(2);TotalCostUpdate()};AccuracyTipMouseOut=function(a){var b=AcOS.GetTarget(a);while(b){if(/tipper/.test(b.className)){AcOS.GetNextSibl(b).style.display="none";removeEvent(b,"mouseout",AccuracyTipMouseOut);break}b=b.parentNode}};AccuracyTip=function(a){AcOS.GetNextSibl(a).style.display="block";addEvent(a,"mouseout",AccuracyTipMouseOut)};FacebookUserIdSet=function(c){var e=document.getElementById(c.prefix+"FirstName"),b=document.getElementById(c.prefix+"LastName"),d=document.getElementById(c.prefix+"FamilyConnectionId"),a=document.getElementById(c.prefix+"FacebookConnectUserID");e.setAttribute("autocompletevalue",(c.firstName||""));b.setAttribute("autocompletevalue",(c.lastName||""));if(d){d.value=c.id||""}if(a){a.value=c.facebookConnectUserId||""}};
