
/* treeutils.js */
var $trees;if("undefined"==typeof TGN){$trees=YAHOO.namespace("Ancestry.Trees")}else{$trees=TGN.namespace("TGN.Ancestry.Trees")}$trees.res={resourceStrings:null,getString:function(a){var b=(null!=$trees.res.resourceStrings)?$trees.res.resourceStrings[a]:null;return(b)?b:"$$"+a},setString:function(a,b){if(!$trees.res.resourceStrings){$trees.res.resourceStrings={}}$trees.res.resourceStrings[a]=b}};$trees.content={objs:null,getObject:function(a){return(null!=$trees.content.objs)?$trees.content.objs[a]:null},setObject:function(a,b){if(!$trees.content.objs){$trees.content.objs={}}$trees.content.objs[a]=b},getPersonKey:function(b,a){return"person_"+a.toString()},setPerson:function(c,a,b){$trees.content.setObject($trees.content.getPersonKey(c,a),b)},getPerson:function(b,a){return $trees.content.getObject($trees.content.getPersonKey(b,a))},addPerson:function(q,a,r,g,o,f,e,j,n,k,p,h,b,i,l,m){var c=/"/g;k=k.replace(c,"'");var d={typ:q,rel:a,name:r,gname:g,sname:o,birth:f,birthPlace:e,death:j,deathPlace:n,linkUrl:k,imgUrl:p,gender:h,sid:b,pid:i,tid:l,pageStackArgs:m};$trees.content.setPerson(l,i,d);return d}};$trees.util={gotoTemplate:null,setGotoTemplate:function(a){$trees.util.gotoTemplate=a},gotoPerson:function(c,a){if($trees.util.gotoTemplate!=null&&a!=null){var b=$trees.util.gotoTemplate.replace("{t}",c).replace("{p}",a);window.location.href=b}},getShortName:function(b){if(b&&40<b.length){var a=[];a=b.split(" ");b=a[0].charAt(0)+" ";b+=a[a.length-1]}return b},getYearFromDate:function(a){var c="";if(a&&""!=a){var b=validDateSimple(a);if(0==b[0]){c=b[1]}}return c},imposeMaxLength:function(b,a){if(b.value.length>a){b.value=b.value.substring(0,a)}return true},htmlEncode:function(a){var c=document.createElement("div");var b=document.createTextNode(a);c.appendChild(b);return c.innerHTML},htmlDecode:function(a){var b=document.createElement("div");b.innerHTML=a.replace(/<\/?[^>]+>/gi,"");return b.childNodes[0]?b.childNodes[0].nodeValue:""}};
/* hints.js */
function hintHoverUpdate(g,f,d){var e=document.getElementById("hintsTitle"+d);var a=document.getElementById("hintRecordLink"+d);var c=document.getElementById("hintPersonaLink"+d);var b=document.getElementById("hintObjectLink"+d);if(a!=null&&c!=null&&b!=null){if(f){e.style.display="none";a.style.display="none";c.style.display="none";b.style.display="none"}}}function getIEVersion(){version=0;if(navigator.appVersion.indexOf("MSIE")!=-1){var a=navigator.appVersion.split("MSIE");version=parseFloat(a[1])}return version}function hintHover(){showPop("hintHoverDiv")}function hintOut(){hidePop("hintHoverDiv")}var hintURLArray=new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","");var hintPidArray=new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","");var hintURLArrayIndex=0;var hintRequestInProgress=false;var onHintRequestComplete=null;function OnHintComplete(m){hintRequestInProgress=false;var w=m.responseXML.documentElement;if(w!=null){var k=w.getElementsByTagName("personaCount")[0];if(k!=null){var n=k.firstChild.data;var i=parseInt(n);k=w.getElementsByTagName("pid")[0];if(k!=null){var l=k.firstChild.data;k=w.getElementsByTagName("recordCount")[0];if(k!=null){n=k.firstChild.data;var c=parseInt(n);k=w.getElementsByTagName("objectCount")[0];if(k!=null){n=k.firstChild.data;var e=parseInt(n);var s=document.getElementById("hintIcon"+l);var v=document.getElementById("hintWorkingIcon"+l);if(s!=null){s.style.display="none"}if(v!=null){v.style.display="none"}if((c>0||i>0)&&s!=null){s.style.display="inline"}var q=document.getElementById("hintRecordCount"+l);var a=document.getElementById("hintPersonaCount"+l);var h=document.getElementById("hintObjectCount"+l);var b=document.getElementById("hintStatus"+l);if(q!=null){q.value=c}if(a!=null){a.value=i}if(h!=null){h.value=e}if(b!=null){b.value=1}var j=document.getElementById("hintHover"+l);if(j==null){j=document.getElementById("hintHover");if(j!=null){l=""}}var t=document.getElementById("hintsTitle"+l);var f=document.getElementById("hintRecordLink"+l);var g=document.getElementById("hintPersonaLink"+l);var p=document.getElementById("hintObjectLink"+l);var u=document.getElementById("phSpan"+l);var d=document.getElementById("rhSpan"+l);var r=document.getElementById("ohSpan"+l);if(t!=null&&f!=null&&g!=null&&p!=null&&u!=null&&d!=null&&r!=null){if(c>0||i>0||e>0){t.style.display=""}else{t.style.display="none"}if(c>0){f.style.display="";d.innerHTML=c}else{f.style.display="none"}if(i>0){g.style.display="";u.innerHTML=i}else{g.style.display="none"}if(e>0){p.style.display="";r.innerHTML=e}else{p.style.display="none"}if(j!=null){if(c>0||i>0||e>0){j.style.display=""}else{j.style.display="none"}}}if(typeof onHintRequestComplete=="function"){onHintRequestComplete(l)}}}}}}initiateHintRequest()}function OnHintError(l){hintRequestInProgress=false;var u=l.responseXML.documentElement;if(u!=null){var q=u.getElementsByTagName("throttled")[0];var j=u.getElementsByTagName("pid")[0];if(j!=null){var k=j.firstChild.data;var d=0;var h=0;var f=0;var s=document.getElementById("hintWorkingIcon"+k);var p=document.getElementById("hintIcon"+k);var m=document.getElementById("hintRecordCount"+k);var a=document.getElementById("hintPersonaCount"+k);var g=document.getElementById("hintObjectCount"+k);var c=document.getElementById("hintStatus"+k);if(m!=null&&m.value.length>0){d=parseInt(m.value)}if(a!=null&&a.value.length>0){h=parseInt(a.value)}if(g!=null&&g.value.length>0){f=parseInt(g.value)}if(c!=null){c.value=1}var i=document.getElementById("hintHover"+k);if(i==null){i=document.getElementById("hintHover");if(i!=null){k=""}}else{var r=document.getElementById("phSpan"+k);var e=document.getElementById("rhSpan"+k);var n=document.getElementById("ohSpan"+k);h=parseInt(r.innerHTML.length>0?r.innerHTML:"0");d=parseInt(e.innerHTML.length>0?e.innerHTML:"0");f=parseInt(n.innerHTML.length>0?n.innerHTML:"0")}var t=d+h+f;if(s!=null){s.style.display="none"}if(p!=null){p.style.display=(t>0)?"":"none"}if(i!=null){i.style.display=(t>0)?"":"none"}if(q!=null){var b=document.getElementById("throttledMsgDiv");if(b!=null){b.style.display=""}}}}initiateHintRequest()}function addHintURL(c,b,a){hintURLArray[c]=b;hintPidArray[c]=a}function clearHintURL(){hintURLArray=new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","");hintPidArray=new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","");hintURLArrayIndex=0}function setOnHintRequestComplete(a){onHintRequestComplete=a}function initiateHintRequests(){initiateHintRequest()}function initiateHintRequest(){if(hintRequestInProgress==false){var b=hintURLArray[hintURLArrayIndex];while(hintURLArrayIndex<31&&b.length==0){hintURLArrayIndex++;b=hintURLArray[hintURLArrayIndex]}if(hintURLArrayIndex<31&&b.length>0){hintRequestInProgress=true;YAHOO.util.Connect.asyncRequest("GET",hintURLArray[hintURLArrayIndex],{success:OnHintComplete,failure:OnHintError});var c=document.getElementById("hintWorkingIcon"+hintPidArray[hintURLArrayIndex]);if(c!=null){c.style.display=""}var d=document.getElementById("hintIcon"+hintPidArray[hintURLArrayIndex]);if(d!=null){d.style.display="none"}var e=document.getElementById("hintHover"+hintPidArray[hintURLArrayIndex]);if(e!=null){e.style.display=""}var a=document.getElementById("hintStatus"+hintPidArray[hintURLArrayIndex]);if(a!=null){a.value=0}hintURLArrayIndex++}}};
/* validation.js */
var monthNamesAll=null;var monthAbbrs=null;var aboutAbbr=null;var beforeAbbr=null;var afterAbbr=null;var betweenAbbr=null;var conjunctionAbbr=null;var rangeAbbr=null;var unknown=null;var monthDayYearOrder=null;var warnDateYearTooBig=null;var warnDateTwoMonths=null;var warnDateDayWithoutMonth=null;var warnDateTwoDays=null;var warnDateTwoYears=null;var warnDateDayTooLarge=null;var warnDateMonthTooLarge=null;var warnDateInvalidMonth=null;var warnDateBirthBeforeMother=null;var warnDateBirthAfterMother=null;var warnDateBirthBeforeFather=null;var warnDateBirthAfterFather=null;var warnDateBirth120BeforeDeath=null;var warnDateDeath120AfterBirth=null;var warnDateBeforeBirth=null;var warnDateAfterDeath=null;var warnDateMayBeWrong=null;var warnStillUseIt=null;var warnOfTheSpouse=null;var badBirthDate=null;var badDeathDate=null;var badMarriageDate=null;var warnLastName=null;var warnNameFather=null;var warnNameMaiden=null;var invalidNameChars=null;var errorNameInvalidChar=null;function initValidationStrings(){monthNamesAll=[$trees.res.getString("g.monthNamesJan"),$trees.res.getString("g.monthNamesFeb"),$trees.res.getString("g.monthNamesMar"),$trees.res.getString("g.monthNamesApr"),$trees.res.getString("g.monthNamesMay"),$trees.res.getString("g.monthNamesJun"),$trees.res.getString("g.monthNamesJul"),$trees.res.getString("g.monthNamesAug"),$trees.res.getString("g.monthNamesSep"),$trees.res.getString("g.monthNamesOct"),$trees.res.getString("g.monthNamesNov"),$trees.res.getString("g.monthNamesDec")];monthAbbrs=[$trees.res.getString("g.monthAbbrsJan"),$trees.res.getString("g.monthAbbrsFeb"),$trees.res.getString("g.monthAbbrsMar"),$trees.res.getString("g.monthAbbrsApr"),$trees.res.getString("g.monthAbbrsMay"),$trees.res.getString("g.monthAbbrsJun"),$trees.res.getString("g.monthAbbrsJul"),$trees.res.getString("g.monthAbbrsAug"),$trees.res.getString("g.monthAbbrsSep"),$trees.res.getString("g.monthAbbrsOct"),$trees.res.getString("g.monthAbbrsNov"),$trees.res.getString("g.monthAbbrsDec")];aboutAbbr=$trees.res.getString("g.dateAboutAbbr");beforeAbbr=$trees.res.getString("g.dateBeforeAbbr");afterAbbr=$trees.res.getString("g.dateAfterAbbr");betweenAbbr=$trees.res.getString("g.dateBetweenAbbr");conjunctionAbbr=$trees.res.getString("g.dateConjunctionAbbr");rangeAbbr=$trees.res.getString("g.dateRangeAbbr");unknown=$trees.res.getString("g.unknown");monthDayYearOrder=$trees.res.getString("g.monthDayYearOrder");warnDateYearTooBig=$trees.res.getString("g.warnDateYearTooBig");warnDateTwoMonths=$trees.res.getString("g.warnDateTwoMonths");warnDateDayWithoutMonth=$trees.res.getString("g.warnDateDayWithoutMonth");warnDateTwoDays=$trees.res.getString("g.warnDateTwoDays");warnDateTwoYears=$trees.res.getString("g.warnDateTwoYears");warnDateDayTooLarge=$trees.res.getString("g.warnDateDayTooLarge");warnDateMonthTooLarge=$trees.res.getString("g.warnDateMonthTooLarge");warnDateInvalidMonth=$trees.res.getString("g.warnDateInvalidMonth");warnDateBirthBeforeMother=$trees.res.getString("g.warnDateBirthBeforeMother");warnDateBirthAfterMother=$trees.res.getString("g.warnDateBirthAfterMother");warnDateBirthBeforeFather=$trees.res.getString("g.warnDateBirthBeforeFather");warnDateBirthAfterFather=$trees.res.getString("g.warnDateBirthAfterFather");warnDateBirth120BeforeDeath=$trees.res.getString("g.warnDateBirth120BeforeDeath");warnDateDeath120AfterBirth=$trees.res.getString("g.warnDateDeath120AfterBirth");warnDateBeforeBirth=$trees.res.getString("g.warnDateBeforeBirth");warnDateAfterDeath=$trees.res.getString("g.warnDateAfterDeath");warnDateMayBeWrong=$trees.res.getString("g.warnDateMayBeWrong");warnStillUseIt=$trees.res.getString("g.warnStillUseIt");warnOfTheSpouse=$trees.res.getString("g.warnOfTheSpouse");badBirthDate=$trees.res.getString("g.badBirthDate");badDeathDate=$trees.res.getString("g.badDeathDate");badMarriageDate=$trees.res.getString("g.badMarriageDate");warnLastName=$trees.res.getString("g.warnLastName");warnNameEmpty=$trees.res.getString("g.warnNameEmpty");warnNameFather=$trees.res.getString("g.warnNameFather");warnNameMaiden=$trees.res.getString("g.warnNameMaiden");invalidNameChars=$trees.res.getString("g.invalidNameCharsJS");errorNameInvalidChar=$trees.res.getString("g.errorNameInvalidChar")}function validDate(g,e,b,h,a,i,d,k,j){var n=g.toLowerCase();var f=false;var m;var l=[0,""];if(n.length>0){if(n.indexOf(unknown.toLowerCase())>=0){n=""}if(!isDigit(n.charAt(0))){var c=parseModifier(n,aboutAbbr);if(c.length<n.length){n=c}else{c=parseModifier(n,beforeAbbr);if(c.length<n.length){n=c}else{c=parseModifier(n,afterAbbr);if(c.length<n.length){n=c}else{if(j){c=parseModifier(n,betweenAbbr);if(c.length<n.length){n=c;f=true}}}}}}if(j){if(f){m=new Array(2);m=splitDateRange(n,true)}else{m=new Array(2);m=splitDateRange(n,false)}if(m[0].length>0&&m[1].length>0){l=validDate(m[0],e,b,h,a,i,d,k);if(l[0]==0){l=validDate(m[1],e,b,h,a,i,d,k)}return l}}l=validateDate(n);if(l[0]==0&&l[1].length>0&&e.length>0){l[0]=checkDates(l[1],l[2],l[3],e,b,h,a,i,d,k)}if(l[0]!=0){l[1]=getWarning(l[0])}}return l}function getWarning(a){switch(a){case 1:return warnDateYearTooBig;case 2:return warnDateTwoMonths;case 3:return warnDateDayWithoutMonth;case 4:return warnDateTwoDays;case 5:return warnDateTwoMonths;case 6:return warnDateTwoYears;case 7:return warnDateDayTooLarge;case 8:return warnDateMonthTooLarge;case 9:return warnDateInvalidMonth;case 101:return warnDateBirthBeforeMother;case 102:return warnDateBirthAfterMother;case 103:return warnDateBirthBeforeFather;case 104:return warnDateBirthAfterFather;case 105:return warnDateBirth120BeforeDeath;case 106:return warnDateDeath120AfterBirth;case 107:return warnDateBeforeBirth;case 108:return warnDateAfterDeath;default:return""}}function splitDateRange(a,e){var c=new Array(2);c[0]="";c[1]="";var g=(e)?conjunctionAbbr:rangeAbbr;var d=g.split("|");for(var b=0;b<d.length;b++){var f=d[b];var h=a.indexOf(f);if(h>0&&a.length>h+f.length){if(a.indexOf(f,h+1)==-1&&(!isLetter(a.charAt(h))||!isLetter(a.charAt(h-1)))&&(!isLetter(a.charAt(h+f.length))||!isLetter(a.charAt(h+f.length-1)))){c[0]=a.substring(0,h);c[1]=a.substring(h+f.length)}}}return c}function validDateOwt(a){return validDate(a,"","","","","","","",false)}function validDateSimple(a){return validDate(a,"","","","","","","",true)}function validateDate(a){var h=new Array(4);var b=getTokens(a);var s=new Array();var p=new Array();var j=0;var n=new Array();var l=0;var e=0;var r=0;var k=false;var m=new Date();var q=m.getFullYear();b=stripDayModifier(b);for(var g=0;g<b.length;g++){var c=b[g];if(isDigit(c.charAt(0))){if(c<=31){s.push(c)}if(c<=12){p.push(c)}if(c<=q){if(s.length==0&&p.length==0){k=true}n.push(c)}else{h[0]=1;return h}}else{var o=monthTextToNumber(c.toLowerCase());if(o>0){if(j>0){h[0]=2;return h}j=o}else{h[0]=9;return h}}}if(j>0){l=j;p.length=0}else{if(p.length==1){l=p[0];removeItem(s,l);removeItem(n,l)}}if(s.length==1){e=s[0];removeItem(n,e);if(l==0){h[0]=3;return h}}else{if(s.length>1){switch(s.length){case 2:if(p.length==2){l=p[0];e=s[1];if(l!=e&&monthDayYearOrder.indexOf("D")<monthDayYearOrder.indexOf("M")&&(k==false||monthDayYearOrder.indexOf("Y")==0)){var f=e;e=l;l=f}s[0]=e;s.length=1;removeItem(n,e);p[0]=l;p.length=1;removeItem(n,l)}else{if(n.length==2){e=s[0];if(monthDayYearOrder.indexOf("Y")<monthDayYearOrder.indexOf("D")){e=s[1];s[0]=e}s.length=1;removeItem(n,e)}else{h[0]=4;return h}}break;case 3:if(n.length==3&&p.length==0){e=s[monthDayYearOrder.indexOf("D")];l=s[monthDayYearOrder.indexOf("M")];n[0]=s[monthDayYearOrder.indexOf("Y")];n.length=1;p[0]=l;p.length=1;s[0]=e;s.length=1}break;default:h[0]=4;return h}}}if(p.length>1){h[0]=5;return h}if(n.length==1){r=n[0]}else{if(n.length>1){if(s.length==0){if(p.length==0){h[0]=6;return h}else{h[0]=7;return h}}else{if(j==0&&p.length==0){h[0]=8;return h}else{h[0]=6;return h}}}}if(l>0&&e>0){if(!isDayInBounds(l,e,r)){h[0]=7;return h}}h[0]=0;if(n.length>0){h[1]=r}else{h[1]=""}h[2]=l;h[3]=e;return h}function stripDayModifier(c){var a=new Array();for(var b=0;b<c.length;b++){if(!isLetter(c[b].charAt(0))){a.push(c[b])}else{if(isLetter(c[b].charAt(0))&&c[b].length>2){a.push(c[b])}else{if(c[b]!="th"&&c[b]!="nd"&&c[b]!="rd"&&c[b]!="st"&&c[b].length>2){a.push(c[b])}}}}return a}function monthTextToNumber(d){var c=0;for(var b=0;b<12;b++){var f=monthAbbrs[b].split(":");for(var a=0;a<f.length;a++){if(d==f[a]){return b+1}}var e=":"+d;if(monthNamesAll[b].indexOf(e)>=0){if(c>0){return 0}c=b+1}}return c}function parseModifier(e,b){var d=e.toLowerCase();var a=b.split("|");for(var c=0;c<a.length;c++){if(d.substring(0,a[c].length+1)==a[c]+" "){return e.substring(a[c].length+1)}}return e}function checkDates(k,j,m,d,b,e,a,f,c,g){var l=null;var i=null;var h=null;var n=null;if(d=="birth"){if(a!=null&&a.length>0){n=validateDate(a);if(n[0]==0&&n[1].length>0){if(k<(parseInt(n[1])+15)){return 101}}}if(f!=null&&f.length>0){n=validateDate(f);if(n[0]==0&&n[1].length>0){if(k>(parseInt(n[1]))){return 102}}}if(c!=null&&c.length>0){h=validateDate(c);if(h[0]==0&&h[1].length>0){if(k<parseInt(h[1])+17){return 103}}}if(g!=null&&g.length>0){h=validateDate(g);if(h[0]==0&&h[1].length>0){if(k>(parseInt(h[1])+1)){return 104}}}if(i==null&&e!=null&&e.length>0){i=validateDate(e)}if(i!=null&&i[0]==0&&i[1].length>0){if(k<parseInt(i[1])-120){return 105}}}else{if(l==null&&b!=null&&b.length>0){l=validateDate(b)}if(d=="death"){if(l!=null&&l[0]==0&&l[1].length>0){if(k>parseInt(l[1])+120){return 106}}}if(l!=null&&l[0]==0){if(dateCompare(k,j,m,l[1],l[2],l[3])==-1){return 107}}}if(d!="death"&&d!="burial"&&d!="cremation"){if(i==null&&e.length>0){i=validateDate(e)}if(i!=null&&i[0]==0){if(dateCompare(k,j,m,i[1],i[2],i[3])==1){return 108}}}return 0}function dateCompare(c,a,f,b,e,d){if(c!=null&&c.length>0&&b!=null&&b.length>0){if(parseInt(c)<parseInt(b)){return -1}else{if(parseInt(c)>parseInt(b)){return 1}else{if(a!=null&&a>0&&e!=null&&e>0){if(parseInt(a)<parseInt(e)){return -1}else{if(parseInt(a)>parseInt(e)){return 1}else{if(f!=null&&f.length>0&&d!=null&&d.length>0){if(parseInt(f)<parseInt(d)){return -1}else{if(parseInt(f)>parseInt(d)){return 1}else{return 0}}}}}}}}}return 0}function getTokens(h){var b=new Array();var f="";var a=false;var g=false;var e=" /-.,:;";for(var d=0;d<h.length;d++){var j=h.charAt(d);if(isDigit(j)){if(!g){f+=j}else{b.push(f);f=j;g=false}a=true}else{if(e.indexOf(j)!=-1){if(f.length>0){b.push(f);f="";g=false;a=false}}else{if(!a){f+=j}else{b.push(f);f=j;a=false}g=true}}}if(f.length>0){b.push(f)}return b}function isDigit(a){if(a<"0"||a>"9"){return false}return true}function isLetter(a){if(a>="a"&&a<="z"){return true}else{if(a>="A"&&a<="Z"){return false}}}function removeItem(d,c){for(var b=0;b<d.length;b++){if(d[b]==c){for(var a=b;a<d.length-1;a++){d[a]=d[a+1]}d.length--}}return d}function isDayInBounds(d,a,c){if(a<1){return false}switch(d){case 4:case 6:case 9:case 11:return(a<=30);case 2:var b=29;if(c>0){if(c%4!=0){b=28}else{if(c%400==0){b=29}else{if(c%100==0){b=28}}}}return(a<=b);default:return(a<=31)}}function checkForInvalidChar(b){for(var a=0;a<b.length;a++){if(invalidNameChars.indexOf(b.charAt(a))>=0){return b.charAt(a)}}return""}function validateSurname(e,d,a){var c=e.toLowerCase();var b=d.toLowerCase();var f=a.toLowerCase();if(b.length>0){if(c!=b){if(nameMatch(c,f)){return warnNameMaiden}else{return warnNameFather}}}else{if(nameMatch(c,f)){return warnNameMaiden}}return""}function nameMatch(a,d){if(a.length>0){var c=d.split(";");for(var b=0;b<c.length;b++){if(a==c[b]){return true}}}return false};
/* hoverbox.js */
var $NS=YAHOO.namespace("hover");var hoverInfoArray=new Array();var hoverStoryArray=new Array();var hoverAudioArray=new Array();var hoverVideoArray=new Array();var ToShow;var initHover=function(){$NS.hoverbox=new YAHOO.widget.Overlay("hoverbox",{visible:false,zIndex:9999,width:"300px",iframe:false,monitorresize:false});$NS.hoverbox.setHeader("title");$NS.hoverbox.setBody("addedby");$NS.hoverbox.setFooter("desc");var a=$NS.hoverbox.render(document.body)};var onHover=function(k,d,o){if($NS.hoverbox!=undefined){var n;switch(k){case"audio":n=hoverAudioArray;break;case"video":n=hoverVideoArray;break;case"application":n=hoverStoryArray;break;case"photo":default:n=hoverInfoArray;break}var b="knob-lt";var j=YAHOO.util.Dom.getX(d)+d.offsetWidth+3;var g=YAHOO.util.Dom.getViewportWidth()+document.documentElement.scrollLeft;if((j+240)>g){j=j-322-8*2-d.offsetWidth+10;b="knob-rt"}$NS.hoverbox.setHeader('<span class="'+b+'"></span><h4>'+n[o].name+"</h4>");var a="";if(n[o].addedby!=undefined){a=n[o].addedby}if(n[o].desc!=undefined){var h=n[o].desc.substring(0,200);if(h.length<n[o].desc.length){h+="..."}a=a+"<br /><br />"+h}$NS.hoverbox.setBody(a);var m="";if(n[o].copied!=undefined){m=n[o].copied.title;var q=n[o].copied.copiers;for(var f=0;f<q.length;f++){m+="<br />"+q[f]}if(n[o].copied.more!=undefined){m+="<br />"+n[o].copied.more}}if(n[o].comments!=undefined){m+="<br />"+n[o].comments}$NS.hoverbox.setFooter(m);var p=YAHOO.util.Dom.getY(d)+10;var e=YAHOO.util.Dom.getViewportHeight()+document.documentElement.scrollTop;var c=document.getElementById("hoverbox").offsetHeight;var l=(p+c)-e;if(l>0){p=e-c-8;if(l>20){b=b.substring(0,b.length-1)+"b";$NS.hoverbox.setHeader('<span class="'+b+'"></span><h4>'+n[o].name+"</h4>")}}$NS.hoverbox.cfg.setProperty("xy",[j,p]);$NS.hoverbox.render(document.body);$NS.hoverbox.cfg.setProperty("visible",false);removeListnr();hoverBoxLstnr()}};var hoverboxitem=null;var version=navigator.userAgent;var findIE7=version.indexOf("MSIE 7");var hoverBoxLstnr=function(){hoverboxitem=document.getElementById("hoverbox");if(hoverboxitem!=null){if(findIE7!=-1){clearHoverboxTimer();hoverboxitem.setAttribute("onmouseover","javscript:clearHoverboxTimer();");hoverboxitem.setAttribute("onmouseout","javscript:clearHoverboxTimer();javscript:hoverboxTimeout();");hoverboxitem.onmouseover="javscript:clearHoverboxTimer();";hoverboxitem.onmouseout="javscript:clearHoverboxTimer();javscript:hoverboxTimeout();";YAHOO.util.Event.addListener("hoverbox","mouseover",clearHoverboxTimer);YAHOO.util.Event.addListener("hoverbox","mouseout",hoverboxTimeout)}else{hoverboxitem.setAttribute("onmouseover","javscript:clearHoverboxTimer();");hoverboxitem.setAttribute("onmouseout","javscript:clearHoverboxTimer();javscript:hoverboxTimeout();")}hoverboxitem.style.zIndex="9999"}};var removeListnr=function(){if(findIE7!=-1){YAHOO.util.Event.removeListener("hoverbox","mouseover",clearHoverboxTimer);YAHOO.util.Event.removeListener("hoverbox","mouseout",hoverboxTimeout)}hoverboxitem=null};var offHover=function(){removeListnr();if($NS.hoverbox!=undefined){$NS.hoverbox.cfg.setProperty("visible",false)}};var timerHB=0;var clearHoverboxTimer=function(){if(timerHB!=0&&timerHB!=null){clearTimeout(timerHB);timerHB=0;ToShow=setTimeout(function(){if($NS.hoverbox!=undefined){$NS.hoverbox.cfg.setProperty("visible",true)}},100)}};var hoverboxTimeout=function(){timerHB=setTimeout(function(){clearTimeout(ToShow);ToShow=0;removeListnr();if($NS.hoverbox!=undefined){$NS.hoverbox.cfg.setProperty("visible",false)}},500)};
/* carouselHelper.js */
TreesCarousel=function(a){this.init(a);initHover()};var imageTagIdx=1;TreesCarousel.prototype={init:function(a){this.ajaxHandler=a.ajaxHandler;this.ajaxParams=a.ajaxParams!=undefined?a.ajaxParams:"";this.type=a.type;this.treeId=a.treeId;this.personId=a.personId;this.userId=a.userId;this.userName=a.userName;this.ancestryDomain=a.ancestryDomain;this.treesDomain=a.treesDomain;this.currPgArgs=a.currPgArgs;this.rightArrow=a.rightArrow;this.rightArrowDisabled=a.rightArrowDisabled;this.leftArrow=a.leftArrow;this.leftArrowDisabled=a.leftArrowDisabled;this.storyIcon=a.storyIcon;this.audioIcon=a.audioIcon;this.videoIcon=a.videoIcon;this.showTitle=a.showTitle;this.addPhotoImg=a.addPhotoImg;this.addPhotoUrl=a.addPhotoUrl;this.viewId=a.viewId;this.isReadonly=a.isReadonly;this.totalCount=a.totalCount;this.maxCount=a.maxCount;this.useIndex=a.useIndex!=undefined?a.useIndex:true;this.canGetMore=a.canGetMore!=undefined?a.canGetMore:false;this.includeTitle=a.includeTitle!=undefined?a.includeTitle:false;this.showViewAll=a.showViewAll!=undefined?a.showViewAll:false}};function getObjects(carousel,carouselData,begIndex){var begVal=(typeof begIndex!="undefined")?begIndex:1;var sUrl="/"+carouselData.ajaxHandler+"?typ="+carouselData.type+"&tid="+carouselData.treeId+"&pid="+carouselData.personId+"&uid="+carouselData.userId+"&unm="+carouselData.userName+"&beg="+begVal+"&num="+carouselData.maxCount+"&sva="+carouselData.showViewAll;YAHOO.util.Connect.asyncRequest("GET",sUrl,{success:function(o){var i,r=eval("("+o.responseText+")");var numRetrieved=r.whatsnew.objects.length;var numPreviouslyRetrieved=carousel.get("numItems");objectsCarousel.set("numItems",(numPreviouslyRetrieved+numRetrieved));if(typeof objectsCarousel!="undefined"){if(typeof objectsQueue=="undefined"){objectsQueue=new carouselObjectsQueue()}for(i=0;i<numRetrieved;i++){var item=r.whatsnew.objects[i];if(numPreviouslyRetrieved==0&&i<objectsCarousel.get("numVisible")){var el=fmtInnerHTML(item,carouselData);objectsCarousel.addItem(el)}else{objectsQueue.add(item)}switch(item.type){case"audio":hoverArray=hoverAudioArray;break;case"video":hoverArray=hoverVideoArray;break;case"application":hoverArray=hoverStoryArray;break;case"photo":default:hoverArray=hoverInfoArray;break}item.idx=parseInt(item.idx)+parseInt(numPreviouslyRetrieved);hoverArray[item.idx]=item}objectsCarousel.set("selectedItem",0)}},failure:function(o){}})}function fmtInnerHTML(m,j){var f="";var k="";var b="";var d='class="withLabel"';var e=(m.label!=null&&m.label.length>0)?'<div class="imgText">'+m.label+"</div>":"";switch(m.type){case"image":var l="&oid="+m.oid;f="/pt/ViewPhoto.aspx";k="http://"+j.treesDomain+f+"?tid="+m.tid+"&pid="+m.pid+l+j.currPgArgs;if(j.useIndex){k+="&idx="+m.idx}if(j.viewId!=undefined){k+="&vid="+photoTreesCarousel.viewId}b=m.url;d="";break;case"audio":f="/pt/ViewAudio.aspx";k="http://"+j.treesDomain+f+"?tid="+m.tid+"&pid="+m.pid+"&oid="+m.oid+j.currPgArgs;b=j.audioIcon;e=(m.label!=null&&m.label.length>0)?'<div class="imgText audioLabel">'+m.label+"</div>":"";break;case"video":f="/pt/Video/ViewVideo.aspx";k="http://"+j.treesDomain+f+"?tid="+m.tid+"&pid="+m.pid+"&oid="+m.oid+j.currPgArgs;b=j.videoIcon;e=(m.label!=null&&m.label.length>0)?'<div class="imgText videoLabel">'+m.label+"</div>":"";break;case"application":f="/pt/ViewStory.aspx";k="http://"+j.treesDomain+f+"?tid="+m.tid+"&pid="+m.pid+"&oid="+m.oid+j.currPgArgs;b=j.storyIcon;break;case"link":k=m.link;d="";break}var a="<a "+d+' href="'+k+'">';var g="";if(b.length>0){g='<span id="imageTag'+imageTagIdx+'" onmouseover="javascript:onHover(\''+m.type+"', this, '"+m.idx+'\');javascript:clearHoverboxTimer();" onmouseout="javascript:hoverboxTimeout();" style="background-image: url('+b+');" >'+e+"</span>"}else{g='<div class="justTextDiv"><div class="justText">'+m.name+"</div></div>";m.name=""}var h='<div class="actImage largeImg couterdiv">'+a+g+"</a></div>";imageTagIdx++;var c="";if(j.includeTitle){var i=m.name;if(i.length>15){i=i.substring(0,13)+"..."}c='<div class="thumb-title"><span>'+i+"</span></div>"}return h+c}var objectsQueue;function carouselObjectsQueue(){this.queue=new Array();this.add=addObjectToQueue;this.getObj=getFirstObject;this.len=getLength}function addObjectToQueue(a){this.queue.push(a)}function getFirstObject(){return this.queue.shift()}function getLength(){return this.queue.length}function loadFromQueue(g,f){var d=g.get("numVisible");var a=objectsQueue.len();if(a>0){for(var b=0;b<d&&b<a;b++){var e=objectsQueue.getObj();if(e!=undefined){var c=fmtInnerHTML(e,f);g.addItem(c)}}}if(f.canGetMore){a=objectsQueue.len();var h=g.get("numItems");if(a<=d&&h<f.totalCount){getObjects(g,f,h+1)}}};
/* jsr_class.js */
// jsr_class.js
//
// JSONscriptRequest -- a simple class for making HTTP requests
// using dynamically generated script tags and JSON
//
// Author: Jason Levitt
// Date: December 7th, 2005
//
// A SECURITY WARNING FROM DOUGLAS CROCKFORD:
// "The dynamic <script> tag hack suffers from a problem. It allows a page 
// to access data from any server in the web, which is really useful. 
// Unfortunately, the data is returned in the form of a script. That script 
// can deliver the data, but it runs with the same authority as scripts on 
// the base page, so it is able to steal cookies or misuse the authorization 
// of the user with the server. A rogue script can do destructive things to 
// the relationship between the user and the base server."
//
// So, be extremely cautious in your use of this script.
//
//
// Sample Usage:
//
// <script type="text/javascript" src="jsr_class.js"></script>
// 
// function callbackfunc(jsonData) {
//      alert('Latitude = ' + jsonData.ResultSet.Result[0].Latitude + 
//            '  Longitude = ' + jsonData.ResultSet.Result[0].Longitude);
//      aObj.removeScriptTag();
// }
//
// request = 'http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&
//            output=json&callback=callbackfunc&location=78704';
// aObj = new JSONscriptRequest(request);
// aObj.buildScriptTag();
// aObj.addScriptTag();
//
//


// Constructor -- pass a REST request URL to the constructor
//
function JSONscriptRequest(fullUrl) {
    // REST request path
    this.fullUrl = fullUrl; 
    // Keep IE from caching requests
    this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
    // Get the DOM location to put the script tag
    this.headLoc = document.getElementsByTagName("head").item(0);
    // Generate a unique script tag id
    this.scriptId = 'JscriptId' + this.scriptCounter();
}

// Static script ID counter
JSONscriptRequest.prototype.scriptCounter = function (){
    return Math.round((Math.random()*1000000)+1);
}

// buildScriptTag method
//
JSONscriptRequest.prototype.buildScriptTag = function () {

    // Create the script tag
    this.scriptObj = document.createElement("script");
    
    // Add script object attributes
    this.scriptObj.setAttribute("type", "text/javascript");
    this.scriptObj.setAttribute("charset", "utf-8");
    this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);
    this.scriptObj.setAttribute("id", this.scriptId);
    this.scriptObj.setAttribute("defer", "defer");
}

// buildScriptTag method
//
JSONscriptRequest.prototype.buildScriptTagCss = function () {

    // Create the script tag
    this.scriptObj = document.createElement("link");
    // Add script object attributes
    this.scriptObj.setAttribute("type", "text/css");
    this.scriptObj.setAttribute("charset", "utf-8");
    this.scriptObj.setAttribute("href", this.fullUrl + this.noCacheIE);
    this.scriptObj.setAttribute("rel", "stylesheet");
    //this.scriptObj.setAttribute("id", this.scriptId);
    this.scriptObj.setAttribute("defer", "defer");
}
 
// removeScriptTag method
// 
JSONscriptRequest.prototype.removeScriptTag = function () {
    // Destroy the script tag
    this.headLoc.removeChild(this.scriptObj);  
}

// addScriptTag method
//
JSONscriptRequest.prototype.addScriptTag = function () {
    // Create the script tag
    this.headLoc.appendChild(this.scriptObj);
}


/* audioDlg.js */
var __c2c2Called=false;var __status3=false;if(typeof TGN=="undefined"){var TGN={}}TGN.AudioDialog=function(a){this.dlgCb=a.dlgCb;this.val=a.val;this.sid="";this.twoWay=false;this.p1=null;this.p2=null;this.el=new Array();this.init()};TGN.AudioDialog.prototype={init:function(){this.hidePhoneRecording=true;this.resid=mResid.TGN.Media.Audio.Assets.AudioDlg;this.tgn_modal=new YAHOO.widget.Panel("tgn_modal",{width:"500px",close:true,fixedcenter:true,underlay:"none",modal:true,visible:false,draggable:false,zIndex:1199,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25}});this.tgn_modal.setHeader('<div class="tl"></div><h3>'+this.resid.recordFamily+'</h3><div class="tr"></div><span id="close_box" class="container-close"></span>');this.tgn_modal.setBody("Body");var a='<div class="bl"></div><span id="ft-logo" class="ft-logo"></span>';a+="<a"+(this.hidePhoneRecording?' style="visibility:hidden;"':"")+' href="http://'+mGlobals.mediaURL+'/audio/aboutus.aspx" id="ft-help"><span>'+this.resid.learnMore+'</span></a><div class="br"></div>';this.tgn_modal.setFooter(a);this.tgn_modal.render(document.body);YAHOO.util.Dom.addClass("tgn_modal","tgn_modal");this.modal=YAHOO.util.Dom.get("tgn_modal");this.tgn_modal.hideEvent.subscribe(this.clean,this,true)},c2c1CallClicked:function(){this.el.push(YAHOO.util.Dom.get("p1_area"));this.el.push(YAHOO.util.Dom.get("p1_pre"));this.el.push(YAHOO.util.Dom.get("p1_num"));this.el.push(YAHOO.util.Dom.get("p2_area"));this.el.push(YAHOO.util.Dom.get("p2_pre"));this.el.push(YAHOO.util.Dom.get("p2_num"));if(3==this.el[0].value.length&&3==this.el[1].value.length&&4==this.el[2].value.length){var a=new Date();var b=new Date(a.getTime()+(630720000000));setCookieEx2("AUD",this.el[0].value+","+this.el[1].value+","+this.el[2].value,null,b.toUTCString(),getRootDomain());this.p1=this.el[0].value+"-"+this.el[1].value+"-"+this.el[2].value;if(!this.twoWay){this.c2c2()}else{this.c2c1TwoWay1();this.p2=this.el[3].value+"-"+this.el[4].value+"-"+this.el[5].value}this.setStatus(1);if(3==this.el[3].value.length&&3==this.el[4].value.length&&4==this.el[5].value.length){this.dlgCb({dlgAct:"callBtn",phone:""+this.el[0].value+this.el[1].value+this.el[2].value+","+this.el[3].value+this.el[4].value+this.el[5].value+"",q:TGN.Question.sQuestionId})}else{this.dlgCb({dlgAct:"callBtn",phone:""+this.el[0].value+this.el[1].value+this.el[2].value+"",q:TGN.Question.sQuestionId})}}},pInputCheck:function(b){var a=b.charCode?b.charCode:b.keyCode;if(a!=8&&a!=9&&a!=46&&a!=37&&a!=39){if(a<48||a>57){YAHOO.util.Event.preventDefault(b);if(13==a){this.customEnter.fire()}}}},pSelectText:function(b){var a=YAHOO.util.Event.getTarget(b);YAHOO.util.Dom.get(a.id).select()},phoneAdvance:function(c){var b=YAHOO.util.Event.getTarget(c);var a=c.charCode?c.charCode:c.keyCode;if(9==a||16==a){return}switch(b.id){case"p1_area":if(3==b.value.length){id="p1_pre";YAHOO.util.Dom.get(id).focus()}break;case"p1_pre":if(3==b.value.length){id="p1_num";YAHOO.util.Dom.get(id).focus()}break;case"p2_area":if(3==b.value.length){id="p2_pre";YAHOO.util.Dom.get(id).focus()}break;case"p2_pre":if(3==b.value.length){id="p2_num";YAHOO.util.Dom.get(id).focus()}break;case"num":default:break}},c2c1:function(){var d='<div class="content"><div align="center"><p style="width:330px;">'+this.resid.madeItEasy+'</p></div><div class="main clearfix" id="callme"><img id="callmeimg" src="'+mGlobals.cache+'/lib/tgn/media/audio/assets/images/focus-callme.jpg" alt="Call Me" /><div id="pform" class="clearfix"><div id="cc_num1"><p class="phoneLabel"><strong>'+this.resid.phoneNumber+'</strong></p><input type="text" name="p1_area" value="" id="p1_area" maxlength="3" size="3" class="field"><span>&nbsp;&ndash;&nbsp;</span><input type="text" name="p1_pre" value="" id="p1_pre" maxlength="3" size="3" class="field"><span>&nbsp;&ndash;&nbsp;</span><input type="text" name="p1_num" value="" id="p1_num" maxlength="4" size="4" class="field"><p class="info"><strong>example:</strong> 801 555 3123 </p></div><a id="addPerson2Way" href="javascript:;">'+this.resid.recordAnother+'</a><div id="cc_num2"><img id="removeP2" src="'+mGlobals.cache+'/lib/tgn/media/audio/assets/images/remove.gif" alt="Remove" width="14" height "14" /><p class="phoneLabel"><strong>'+this.resid.otherPhoneNumber+'</strong></p><input type="text" name="p2_area" value="" id="p2_area" maxlength="3" size="3" class="field"><span>&nbsp;&ndash;&nbsp;</span><input type="text" name="p2_pre" value="" id="p2_pre" maxlength="3" size="3" class="field"><span>&nbsp;&ndash;&nbsp;</span><input type="text" name="p2_num" value="" id="p2_num" maxlength="4" size="4" class="field"></div></div><div align="center"><p class="clear" style="width:230px;">'+this.resid.contentSubmission+'</p></div></div><div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-callme"><span>'+this.resid.callMe+' &raquo;</span></a><span id="ph_cancel" class="cancel"> '+this.resid.or+' &nbsp;<a href="javascript:;" id="btn1-cancel">'+this.resid.cancel+"</a></span></div></div>";this.tgn_modal.body.innerHTML=d;this.getPhoneCookie();this.tgn_modal.render(document.body);YAHOO.util.Event.addListener("addPerson2Way","click",this.addPersonPhone,this,true);YAHOO.util.Event.addListener("removeP2","click",this.removePersonPhone,this,true);var b=YAHOO.util.Dom.get("cc_num1").getElementsByTagName("input");YAHOO.util.Event.addListener(b,"keyup",this.phoneAdvance);YAHOO.util.Event.addListener(b,"keypress",this.pInputCheck,this,true);YAHOO.util.Event.addListener(b,"focus",this.pSelectText,this,true);var a=YAHOO.util.Dom.get("cc_num2").getElementsByTagName("input");YAHOO.util.Event.addListener(a,"keyup",this.phoneAdvance);YAHOO.util.Event.addListener(a,"keypress",this.pInputCheck,this,true);YAHOO.util.Event.addListener(a,"focus",this.pSelectText,this,true);YAHOO.util.Event.addListener("btn-callme","click",this.c2c1CallClicked,this,true);YAHOO.util.Event.addListener("btn1-cancel","click",this.requestClose,this,true);YAHOO.util.Event.addListener("close_box","click",this.requestClose,this,true);this.customEnter=new YAHOO.util.CustomEvent("Enter");this.customEnter.subscribe(this.c2c1CallClicked,this,true);var c=YAHOO.util.Dom.get("p1_area");c.focus()},c2c1TwoWay1:function(){YAHOO.util.Event.removeListener("btn-callme","click",this.c2c1CallClicked);YAHOO.util.Dom.removeClass("btn-callme","btn-cta");YAHOO.util.Dom.addClass("btn-callme","btn-cta-inactive");YAHOO.util.Dom.setStyle("ph_cancel","display","none");var a='<p class="phoneLabel"><strong>'+this.resid.connecting+'</strong></p><div style="color:#959E2B; font-size:19px;"><strong>'+this.resid.dialing+" "+this.p1+"</strong></div>";YAHOO.util.Dom.get("cc_num1").innerHTML=a;YAHOO.util.Dom.setStyle("cc_num1","background","url("+mGlobals.cache+"/lib/TGN/Media/Audio/Assets/images/person1-connect.gif) no-repeat");var b='<p class="phoneLabel"><strong>&nbsp;</strong></p><div id="test123" style="color:#BBB988; font-size:19px;"><strong>'+this.resid.waitingToConnect+"</strong></div>";YAHOO.util.Dom.get("cc_num2").innerHTML=b;if(0!=YAHOO.env.ua.ie&&YAHOO.env.ua.ie<7){this.tgn_modal.body.innerHTML=this.tgn_modal.body.innerHTML;this.tgn_modal.render(document.body)}},c2c1TwoWay2:function(){var a='<p class="phoneLabel"><strong>&nbsp;</strong></p><div style="color:#BBB988; font-size:19px;"><strong>'+this.resid.connected+"</strong></div>";YAHOO.util.Dom.get("cc_num1").innerHTML=a;YAHOO.util.Dom.setStyle("cc_num1","background","url("+mGlobals.cache+"/lib/TGN/Media/Audio/Assets/images/person1_bg.gif) no-repeat 18px 0px");var b='<p class="phoneLabel"><strong>'+this.resid.connecting+'</strong></p><div style="color:#675E4C; font-size:19px;"><strong>'+this.resid.dialing+" "+this.p2+"</strong></div>";YAHOO.util.Dom.get("cc_num2").innerHTML=b;YAHOO.util.Dom.setStyle("cc_num2","background","url("+mGlobals.cache+"/lib/TGN/Media/Audio/Assets/images/person2-connect.gif) no-repeat")},getPhoneCookie:function(){var b=getCookie("AUD");if(b!=null){var a=b.split(",");if(a.length==3){document.getElementById("p1_area").value=a[0];document.getElementById("p1_pre").value=a[1];document.getElementById("p1_num").value=a[2]}}},addPersonPhone:function(d){var c=YAHOO.util.Event.getTarget(d);c.style.display="none";YAHOO.util.Dom.setStyle("cc_num2","display","block");var a=new YAHOO.util.Anim("cc_num2",{opacity:{to:1}},0.4,YAHOO.util.Easing.easeIn);a.animate();this.twoWay=true;var b=this;setTimeout(function(){b.p2Focus()},500)},p2Focus:function(){var a=YAHOO.util.Dom.get("p2_area");a.focus()},removePersonPhone:function(b){var c=function(){YAHOO.util.Dom.setStyle("cc_num2","display","none");YAHOO.util.Dom.setStyle("addPerson2Way","display","inline")};var a=new YAHOO.util.Anim("cc_num2",{opacity:{to:0}},0.4,YAHOO.util.Easing.easeIn);a.animate();a.onComplete.subscribe(c,this,true);document.getElementById("p2_area").value="";document.getElementById("p2_pre").value="";document.getElementById("p2_num").value="";this.twoWay=false},requestClose:function(){this.dlgCb({dlgAct:"closeBtn"})},statusRecord:function(){if(0!=YAHOO.env.ua.ie&&YAHOO.env.ua.ie<7){this.tgn_modal.body.innerHTML=this.tgn_modal.body.innerHTML;this.tgn_modal.render(document.body)}this.dlgCb({dlgAct:"reBtn"})},c2c2FinishClicked:function(){if(0!=YAHOO.env.ua.ie&&YAHOO.env.ua.ie<7){this.tgn_modal.body.innerHTML=this.tgn_modal.body.innerHTML;this.tgn_modal.render(document.body)}this.dlgCb({dlgAct:"finBtn"})},setStatus:function(a){if(0==a){return}if((2==a||3==a)&&!__c2c2Called){this.c2c2()}var e="";var c="";var b="";var f="";var g=null;var d=true;this.sid=a;g=this.c2c2FinishClicked;switch(a){case 1:if(this.twoWay){return}e=this.resid.weAreCalling;c=this.resid.simplyAnswer;b=this.resid.pleaseWait;g=null;d=false;break;case 2:e=this.resid.unableToConnect;c='<p style="width:340px">'+this.resid.numberBusy+"</p>";b=this.resid.close;g=this.requestClose;break;case 3:if(__status3){return}e=this.resid.waitingToRecord;c='<p style="width:250px">'+this.resid.beginRecording+"</p>";b=this.resid.recordNow;g=this.statusRecord;d=false;__status3=true;break;case 4:e=this.resid.weAreRecording;c='<p style="width:300px">'+this.resid.progressBar+"</p>";b=this.resid.finished;f=TGN.Question.sQuestion;break;case 5:e=this.resid.attempHangUp;c=this.resid.waitWhile;b=this.resid.pleaseWait;g=null;break;case 7:if(this.twoWay){this.c2c1TwoWay2();return}break;case 0:default:e=this.resid.invalidRequest;c='<p style="width:280px">'+this.resid.systemDidNot+"</p>";b=this.resid.close;g=this.requestClose;break}if(null!=YAHOO.util.Dom.get("s_title")){YAHOO.util.Event.removeListener("btn-finish","click");YAHOO.util.Event.removeListener("close_box","click");YAHOO.util.Dom.get("s_title").innerHTML="<h5><strong>"+e+'</strong></h5><div id="focus'+a+'"></div>';if(f!=""&&f!=undefined){YAHOO.util.Dom.get("s_title").innerHTML+='<div class="q_boxrecord"><li class="q_record">'+f+"</li></div>"}YAHOO.util.Dom.get("s_desc").innerHTML=c;YAHOO.util.Dom.get("btn_fin_spn").innerHTML=b;if(null!=g){YAHOO.util.Event.addListener("btn-finish","click",g,this,true)}if(true==d){YAHOO.util.Dom.get("close_box").style.display="block";if(null!=g){YAHOO.util.Event.addListener("close_box","click",g,this,true)}}else{YAHOO.util.Dom.get("close_box").style.display="none"}}},c2c2:function(){__c2c2Called=true;var a='<div class="content"><p>&nbsp;</p><div class="main" id="status"><div id="s_title"></div><div id="s_desc" align="center"></div><br><span id="s_prog_bar"></span></div><div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-finish"><span id="btn_fin_spn"></span></a></div></div>';var b='<div class="bl"></div><span id="ft-logo" class="ft-logo"></span><div class="br"></div>';this.tgn_modal.footer.innerHTML=b;this.tgn_modal.body.innerHTML=a},c2c2e:function(a,d){var b,c;if(0==a){c='<div class="tl"></div><h3>'+this.resid.disconnected+'</h3><div class="tr"></div><span id="close_box" class="container-close"></span>'}else{c='<div class="tl"></div><h3>'+this.resid.congratulations+'</h3><div class="tr"></div><span id="close_box" class="container-close"></span>'}if(0==a){b='<div class="content"><p>&nbsp;</p><div class="main" id="status"><div id="title"><h5><strong>'+this.resid.notRecorded+"</strong></h5>";if("mic"==d){b+='<div id="focusB-mic"></div></div>'}else{b+='<div id="focusB"></div></div>'}b+='<div id="fin"></div><div align="center"><p id="bla" style="width:240px">'+this.resid.notConnected+"</p></div></div>"}else{b='<div class="content"><p>&nbsp;</p><div class="main" id="status"><div id="title"><h5><strong>'+this.resid.beenRecorded+"</strong></h5>";if("mic"==d){cRecd=true;b+='<div id="focusG-mic"></div></div>'}else{b+='<div id="focusG"></div></div>'}b+='<div id="fin">'+this.resid.thankYou+'</div><p id="bla">'+this.resid.savedTo+"</p></div>"}b+='<div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-done"><span>'+this.resid.close+"</span></a></div>";this.tgn_modal.header.innerHTML=c;this.tgn_modal.body.innerHTML=b;this.tgn_modal.render(document.body);YAHOO.util.Event.addListener("btn-done","click",this.requestClose,this,true);YAHOO.util.Event.addListener("close_box","click",this.requestClose,this,true)},checkEntries:function(c){var d=this.resid.enterName;var b=function(f){for(var e=0;e<f.length;e++){if(""==f[e].value||d==f[e].value){f[e].style.borderColor="#990000";return false}}return true};var a=function(h){var g=h.value.split(",");var f=/^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$/;for(j=0;j<g.length;j++){if(!f.test(g[j])){h.style.borderColor="#990000";return false}}return true};if(!b(c)||!a(c[1])){YAHOO.util.Dom.get("ad_error").style.display="block";errorAnim=new YAHOO.util.Anim("ad_error",{opacity:{from:0,to:1}},0.3);errorAnim.animate();return false}return true},inv1SendClicked:function(){var a=new Array();a.push(YAHOO.util.Dom.get("inv_from"));a.push(YAHOO.util.Dom.get("inv_email"));a.push(YAHOO.util.Dom.get("inv_message"));if(this.checkEntries(a)){if(TGN.Question.sQuestionId!=undefined&&TGN.Question.sQuestionId!=""){this.dlgCb({dlgAct:"sendInv",f:a[0].value,e:a[1].value,m:a[2].value,q:TGN.Question.sQuestionId})}else{this.dlgCb({dlgAct:"sendInv",f:a[0].value,e:a[1].value,m:a[2].value})}}},onFocus:function(c){var d=this.resid.enterName;var a=this.resid.enterEmail;var b=YAHOO.util.Event.getTarget(c);if("inv_from"==b.id){if(b.value==d){b.value=""}}else{if("inv_email"==b.id){if(b.value==a){b.value=""}}}},onBlur:function(c){var d=this.resid.enterName;var a=this.resid.enterEmail;var b=YAHOO.util.Event.getTarget(c);if("inv_from"==b.id){if(b.value==""){b.value=d}}else{if("inv_email"==b.id){if(b.value==""){b.value=a}}}},inv1:function(){var c=TGN.Question.sQuestion;var b='<div class="hd"><div class="tl"></div><h3>'+this.resid.inviteTitle+'</h3><div class="tr"></div></div>';var a='<div class="content" id="invite"><div id="instr" align="center"><p style="width:370px;">'+this.resid.inviteMembers+"</p><p>"+this.resid.keepInMind+'</p></div><div id="ad_error" class="g_error_new">'+this.resid.pleaseFillIn+'</div><div class="main clearfix"><div id="pform" class="clearfix"><div class="audline"><label>'+this.resid.from+'</label><div class="fields"><input type="text" name="inv_from" id="inv_from" class="field" size="30" value="'+this.resid.enterName+'"></div></div><div class="audline"><label>'+this.resid.to+'</label><div class="fields"><input type="text" name="inv_email" id="inv_email" class="field" size="30" value="'+this.resid.enterEmail+'"><p class="info">'+this.resid.seperateComma+'</p></div></div><div class="audline"><label>'+this.resid.message+'</label><div class="fields"><textarea name="inv_message" rows="4" cols="28" id="inv_message" class="field">';if(c!=""&&c!=undefined){a+=this.resid.message1First+"\r\n\r\n"+c+"\r\n\r\n"+this.resid.message1Last}else{a+=this.resid.message2}a+='</textarea></div></div></div><div id="focus"></div></div><div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-send"><span>'+this.resid.send+'</span></a><span class="cancel"> '+this.resid.or+' &nbsp;<a href="javascript:;" id="btn-cancel">'+this.resid.cancel+"</a></span></div>";this.tgn_modal.header.innerHTML=b;this.tgn_modal.body.innerHTML=a;this.tgn_modal.render(document.body);YAHOO.util.Event.addListener("btn-send","click",this.inv1SendClicked,this,true);YAHOO.util.Event.addListener("btn-cancel","click",this.requestClose,this,true);YAHOO.util.Event.addListener("close_box","click",this.requestClose,this,true);YAHOO.util.Event.addListener("inv_from","focus",this.onFocus,this,true);YAHOO.util.Event.addListener("inv_from","blur",this.onBlur,this,true);YAHOO.util.Event.addListener("inv_email","focus",this.onFocus,this,true);YAHOO.util.Event.addListener("inv_email","blur",this.onBlur,this,true)},inv2:function(){var a='<div class="content" id="sent"><p>&nbsp;</p><div class="main"><h4><strong>'+this.resid.invitationSentTitle+'</strong></h4><div id="focus"></div><div align="center"><p style="width:330px" class="bold">'+this.resid.invitationSent+'</p></div></div><div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-close"><span>'+this.resid.close+"</span></a></div>";this.tgn_modal.body.innerHTML=a;this.tgn_modal.render(document.body);YAHOO.util.Event.addListener("btn-close","click",this.requestClose,this,true)},audioErr:function(a){var c='<div class="tl"></div><h3>'+this.resid.mustBe+'</h3><div class="tr"></div>';var b='<div class="content" id="sent"><p>&nbsp;</p><div class="main"><h5><strong>'+this.resid.sorryMustBe+'</strong></h5><div id="ai_errImg"></div><div align="center"><p style="width:300px"><br />'+this.resid.mustBeRegistered+'</p></div></div><div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-close"><span>'+this.resid.close+"</span></a></div>";var e='<div class="tl"></div><h3>'+this.resid.errorOccurred+'</h3><div class="tr"></div>';var d='<div class="content" id="sent"><p>&nbsp;</p><div class="main"><h5><strong>'+this.resid.sorryErrorOccurred+'</strong></h5><div id="ai_errImg"></div><div align="center"><p style="width:330px"><br />'+this.resid.unableToProcess+'</p></div></div><div class="buttons"><a href="javascript:;" class="btn-cta" id="btn-close"><span>'+this.resid.close+"</span></a></div>";this.tgn_modal.header.innerHTML=null!=a?c:e;this.tgn_modal.body.innerHTML=null!=a?b:d;this.tgn_modal.render(document.body);YAHOO.util.Event.addListener("btn-close","click",this.requestClose,this,true)},mic1:function(){TGN.LoadJSFile(mGlobals.cache+"/lib/TGN/Media/Audio/flixn.js?");TGN.LoadJSFile(mGlobals.cache+"/lib/TGN/Media/Audio/urlEncodeDecode.js?");var c=TGN.Question.sQuestion;var b="";if(c!=""&&c!=undefined){b+='<br><br><div class="q_boxrecord"><li class="q_record">'+c+"</li></div>"}b+='<br><br><div id="swf_audio"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><div style="background-image: url(http://flixn.com/images/en/common/noflash/328x320.jpg); width: 328px; height: 320px;"></div></a></div><br /><br />';this.tgn_modal.body.innerHTML=b;this.tgn_modal.render(document.body);var a=(!mGlobals.twoLetterISOLanguageName)?"en":mGlobals.twoLetterISOLanguageName;var d=new SWFObject(mGlobals.cache+"/swf/audio/recorder."+a+".swf?ver=1","audio_obj","375","150","8","#FFFFFF");d.addParam("menu","false");d.addParam("allowScriptAccess","always");d.addVariable("siteroot",mGlobals.flashvarEnvironment);d.addVariable("statebag",mGlobals.flashvarStatebag);d.write("swf_audio")},start:function(){mGlobals.isFullExperience=eval(mGlobals.isFullExperience);var startHtml='<div class="content clearfix" id="start"><div align="center"><p style="width:390px;">'+this.resid.shareStories+"</div></p>";if(mGlobals.isFullExperience){startHtml+='<h4 class="greenText">'+this.resid.howDoYou+'</h4><div id="begin-story" class="half left main"><div class="msg"><img src="'+mGlobals.cache+'/i/pixel.gif" width="107" height="81" align="right"><h5>'+this.resid.recordBy+'</h5><p class="text">'+this.resid.recordPhone+'</p><div class="focus"></div></div></div>'}if(mGlobals.isFullExperience){startHtml+='<div id="invite-family" class="half right main">'}else{startHtml+='<div align="center"><div id="invite-family" class="half main" style="margin-top:40px;">'}startHtml+='<div class="msg"><img src="'+mGlobals.cache+'/i/pixel.gif" width="120" height="92" align="right"><h5>'+this.resid.recordComputer+'</h5><p class="text">'+this.resid.computerMic+'</p><div class="focus"></div></div></div><div class="buttons startbtns">';if(mGlobals.isFullExperience){startHtml+='<a href="javascript:;" class="btn-cta btn-phone left" id="btn-begin" name="btn-begin"><span>'+this.resid.beginStory+"</span></a>"}startHtml+='<a href="javascript:;" class="btn-cta btn-mic right ';if(!mGlobals.isFullExperience){startHtml+="asbtn-"+mGlobals.partnerId}startHtml+='" id="btn-mic" name="btn-mic"><span>'+this.resid.beginStory+"</span></a></div>";if(mGlobals.isFullExperience){startHtml+='<a href="javascript:;" class="btn-cta-grey btn-mail right" id="btn-invite" name="btn-invite"><span>'+this.resid.inviteFamily+"</span></a>"}else{startHtml+="</div>"}startHtml+="</div>";if(0!=this.val){this.tgn_modal.body.innerHTML=startHtml;this.tgn_modal.show();YAHOO.util.Event.addListener("btn-begin","click",this.begin,this,true);YAHOO.util.Event.addListener("btn-mic","click",this.mic,this,true);YAHOO.util.Event.addListener("btn-invite","click",this.invite,this,true);YAHOO.util.Event.addListener("close_box","click",this.requestClose,this,true);if(this.hidePhoneRecording){this.mic()}}else{this.audioErr(true)}if(!mGlobals.isFullExperience){YAHOO.util.Dom.setStyle(YAHOO.util.Dom.get("start"),"height","280px")}var tgnModalMask=document.getElementById("tgn_modal_mask");if(tgnModalMask!=null){tgnModalMask.style.zIndex="1198"}var tgnModalC=document.getElementById("tgn_modal_c");if(tgnModalC!=null){tgnModalC.style.zIndex="1199"}},invite:function(){this.question("invite")},begin:function(){this.question("begin")},mic:function(){this.question("mic")},question:function(d){var e,a,c;if(d=="begin"||d=="mic"){e=this.resid.startRecording;a=this.resid.chooseQuestionRecord;c=this.resid.selectQuestionRecord}else{e=this.resid.inviteFamilyArrow;a=this.resid.chooseQuestionInvite;c=this.resid.selectQuestionInvite}var f='<div class="content">'+a+'<div class="main clearfix" style="overflow:auto; margin-top: 10px; background: #ffffff; height: 100px; text-align:left;"><div id="catDiv"></div></div><p>&nbsp;</p><div class="main clearfix q_box" id="question" style="height: 7px; background: #ffffff; text-align:left; font-size:12px;"><li class="q_img">'+c+'</li></div><p>&nbsp;</p><a href="javascript:;" class="btn-cta" id="btn-start" name="btn-start"><span>'+e+"</span></a></div></div>";this.tgn_modal.body.innerHTML=f;this.tgn_modal.render(document.body);var b=new TGN.Question();if(b.error&&d=="begin"){this.c2c1();return}else{if(b.error&&d=="mic"){this.mic1();return}else{if(b.error){this.inv1();return}}}if(d=="begin"){YAHOO.util.Event.addListener("btn-start","click",this.c2c1,this,true);YAHOO.util.Event.addListener("btn-skip1","click",this.c2c1,this,true);YAHOO.util.Event.addListener("btn-skip2","click",this.c2c1,this,true)}else{if(d=="mic"){YAHOO.util.Event.addListener("btn-start","click",this.mic1,this,true);YAHOO.util.Event.addListener("btn-skip1","click",this.mic1,this,true);YAHOO.util.Event.addListener("btn-skip2","click",this.mic1,this,true)}else{YAHOO.util.Event.addListener("btn-start","click",this.inv1,this,true);YAHOO.util.Event.addListener("btn-skip1","click",this.inv1,this,true);YAHOO.util.Event.addListener("btn-skip2","click",this.inv1,this,true)}}YAHOO.util.Event.addListener("close_box","click",this.requestClose,this,true)},close:function(){this.tgn_modal.hide()},clean:function(){TGN.Question.sQuestion="";TGN.Question.sQuestionId="";TGN.Question.sQuestionResid="";this.twoWay=false;__c2c2Called=false;__status3=false;cRecd=false;this.el=new Array()}};TGN.ProgressBar=function(a){this.pcolor="#b9c57b";this.ccolor="yellow";this.wcolor="red";this.unloadedcolor="white";this.bordercolor="black";this.h=20;this.w=300;this.waitTime=60*12;this.blocksize=(this.w-2)/this.waitTime;this.loaded=0;this.PBouter;this.PBdone;this.Pid=0;this.txt='<div id="PBouter" style="margin: auto;position:relative; visibility:hidden; background-color:'+this.bordercolor+"; width:"+this.w+"px; height:"+this.h+'px;"><div style="position:absolute; top:1px; left:1px; width:'+(this.w-2)+"px; height:"+(this.h-2)+"px; background-color:"+this.unloadedcolor+'; font-size:1px;"></div><div id="PBdone" style="position:absolute; top:1px; left:1px; width:0px; height:'+(this.h-2)+"px; background-color:"+this.pcolor+'; font-size:1px;"></div></div>'};TGN.ProgressBar.prototype={write:function(a){a.innerHTML=this.txt},incrCount:function(){var a=new Date();this.loaded=Math.ceil((a.getTime()-this.time.getTime())/1000);if(this.loaded<0){this.loaded=0}if(this.loaded>=(this.waitTime)*0.95){this.PBdone.style.background=this.wcolor}else{if(this.loaded>=(this.waitTime)*0.9){this.PBdone.style.background=this.ccolor}}if(this.loaded>=this.waitTime){this.loaded=this.waitTime}this.resizeEl(this.PBdone,this.blocksize*this.loaded)},hideBar:function(){},init:function(){this.PBouter=YAHOO.util.Dom.get("PBouter");this.PBdone=YAHOO.util.Dom.get("PBdone");this.resizeEl(this.PBdone,0,0,this.h-2,0);this.PBouter.style.visibility="visible";this.time=new Date()},resizeEl:function(b,a){b.style.width=a+"px"}};TGN.AudioLoadFiles=function(){TGN.LoadJSFile("http://"+mGlobals.mediaURL+"/audio/resource/assets/audiodlg.aspx?");TGN.LoadJSFile(mGlobals.cache+"/lib/TGN/Media/Audio/question.js?");TGN.LoadJSFile(mGlobals.cache+"/js/utility.js?");TGN.LoadJSFile(mGlobals.cache+mGlobals.yahooUI+"/build/treeview/treeview-min.js?");TGN.LoadJSFile("http://"+mGlobals.mediaURL+"/audio/widgets/question.aspx?");TGN.LoadJSFile(mGlobals.cache+"/js/swfobject.js?");TGN.LoadCSSFile(mGlobals.cache+"/lib/TGN/Media/Audio/Assets/question.css?");TGN.LoadJSFile(mGlobals.cache+mGlobals.yahooUI+"/build/history/history-beta-min.js?")};TGN.LoadJSFile=function(a){this.qObj=new JSONscriptRequest(a);this.qObj.buildScriptTag();this.qObj.addScriptTag()};TGN.LoadCSSFile=function(a){this.qObj=new JSONscriptRequest(a);this.qObj.buildScriptTagCss();this.qObj.addScriptTag()};YAHOO.util.Event.onDOMReady(TGN.AudioLoadFiles);
/* audio.js */
if(typeof TGN=="undefined"){var TGN={}}TGN.AudioInvitation=function(a){this.srCb=a.srCb;this.serviceUrl=a.sURL;this.fncName=a.fncName;this.from="";this.toEmail="";this.message="";this.referent="";this.token="";this.aObj=""};TGN.AudioInvitation.SERVICE="calldirector";TGN.AudioInvitation.METHOD="send-invite";TGN.AudioInvitation.prototype.sendInvite=function(a){params="?cb="+encodeURIComponent(this.fncName+".icb")+"&fn="+encodeURIComponent(a.f)+"&te="+encodeURIComponent(a.e)+"&m="+encodeURIComponent(a.m)+"&r="+encodeURIComponent(a.r)+"&21svcn12=1&token="+encodeURIComponent(a.t);if(typeof a.q!="undefined"){params=params+"&q="+encodeURIComponent(a.q)}this.iObj=new JSONscriptRequest(this.serviceUrl+"/"+TGN.AudioInvitation.SERVICE+"/"+TGN.AudioInvitation.METHOD+"/json.ashx"+params);this.iObj.buildScriptTag();this.iObj.addScriptTag()};TGN.AudioInvitation.prototype.clean=function(a){a.removeScriptTag();a=null};TGN.AudioInvitation.prototype.icb=function(a){this.clean(this.iObj);if(a.messages.message.exception){a.cbFnc="invFail"}else{a.cbFnc="invOk"}this.srCb(a)};TGN.AudioClickToCall=function(a){this.srCb=a.srCb;this.serviceUrl=a.sURL;this.fncName=a.fncName;this.phone="";this.aObj=""};TGN.AudioClickToCall.SERVICE="calldirector";TGN.AudioClickToCall.METHOD_CALL="call-invoke";TGN.AudioClickToCall.METHOD_STATUS="call-status";TGN.AudioClickToCall.METHOD_COMMAND="call-command";TGN.AudioClickToCall.prototype.clean=function(a){if("s"==a){if(null!=this.sObj){this.sObj.removeScriptTag()}this.sObj=null}else{if(null!=this.aObj){this.aObj.removeScriptTag()}this.aObj==null}};TGN.AudioClickToCall.prototype.makeCall=function(a){params="?cb="+encodeURIComponent(this.fncName+".cb")+"&phone="+encodeURIComponent(a.phone)+"&21svcn12=1&r="+encodeURIComponent(a.r)+"&token="+encodeURIComponent(a.t);if(typeof a.q!="undefined"){params=params+"&q="+encodeURIComponent(a.q)}this.aObj=new JSONscriptRequest(this.serviceUrl+"/"+TGN.AudioClickToCall.SERVICE+"/"+TGN.AudioClickToCall.METHOD_CALL+"/json.ashx"+params);this.aObj.buildScriptTag();this.aObj.addScriptTag()};TGN.AudioClickToCall.prototype.sendCmd=function(a){params="?cb="+encodeURIComponent(this.fncName+".cb")+"&sid="+encodeURIComponent(a.sid)+"&21svcn12=1&cmd="+a.cmd+"&token="+encodeURIComponent(a.t);this.aObj=new JSONscriptRequest(this.serviceUrl+"/"+TGN.AudioClickToCall.SERVICE+"/"+TGN.AudioClickToCall.METHOD_COMMAND+"/json.ashx"+params);this.aObj.buildScriptTag();this.aObj.addScriptTag()};TGN.AudioClickToCall.prototype.cb=function(a){this.clean("s");switch(a.messages.message.method){case TGN.AudioClickToCall.METHOD_CALL:if(a.messages.message.exception){a.cbFnc="callFail"}else{a.cbFnc="callOk"}this.srCb(a);break;case TGN.AudioClickToCall.METHOD_COMMAND:a.cbFnc="cmd";this.srCb(a);break;default:break}};TGN.AudioClickToCall.prototype.scb=function(a){this.clean("s");a.cbFnc="state";this.srCb(a)};TGN.AudioClickToCall.prototype.getStatus=function(a){params="?cb="+encodeURIComponent(this.fncName+".scb")+"&sid="+encodeURIComponent(a.sid)+"&21svcn12=1&token="+encodeURIComponent(a.t);this.sObj=new JSONscriptRequest(this.serviceUrl+"/"+TGN.AudioClickToCall.SERVICE+"/"+TGN.AudioClickToCall.METHOD_STATUS+"/json.ashx"+params);this.sObj.buildScriptTag();this.sObj.addScriptTag()};
/* addAudio.js */
var __mc;var __si;var __audioDlg=null;var referent="";var onExit=null;var cRecd=false;var sessionId=null;var CallStatus={init:function(a){sessionId=a.messages.message.sessionId;this.restart()},restart:function(){this.statusWait=false;this.wait=0;this.stop=false;this.loop();this.Pid=setInterval("CallStatus.loop()",3000)},loop:function(){if(false==this.statusWait){this.ping()}else{this.wait++}if(10<=this.wait&&this.statusWait){__mc.clean("s");this.ping()}},ping:function(){this.statusWait=true;this.wait=0;__mc.getStatus({sid:sessionId,t:mGlobals.token})},callBack:function(c){var a=c.messages.message.status;if(!this.stop){switch(a.id){case"6":this.killPing();__audioDlg.c2c2e(a.rcnt);cRecd=a.rcnt>0?true:false;break;case"2":this.killPing();__audioDlg.setStatus(parseInt(a.id));break;default:__audioDlg.setStatus(parseInt(a.id));if("4"==a.id){if(null==YAHOO.util.Dom.get("PBouter")){var b=YAHOO.util.Dom.get("s_prog_bar");this.pBar=new TGN.ProgressBar();this.pBar.write(b);this.pBar.init()}else{this.pBar.incrCount()}}this.statusWait=false;break}}},killPing:function(){this.stop=true;clearInterval(this.Pid)}};function dlgCb(a){switch(a.dlgAct){case"callBtn":__mc=new TGN.AudioClickToCall({srCb:c2callSrCb,sURL:mGlobals.mServiceURL,fncName:"__mc"});a.r=referent;a.t=mGlobals.token;__mc.makeCall(a);break;case"closeBtn":CallStatus.killPing();__audioDlg.close();if(null!=onExit&&cRecd){if(0!=YAHOO.env.ua.ie&&YAHOO.env.ua.ie<7){setTimeout("onExit()",1000)}else{onExit()}}break;case"reBtn":__mc.sendCmd({sid:sessionId,t:mGlobals.token,cmd:"rec"});break;case"finBtn":__mc.sendCmd({sid:sessionId,t:mGlobals.token,cmd:"hu"});break;case"sendInv":__si=new TGN.AudioInvitation({srCb:invCb,sURL:mGlobals.mServiceURL,fncName:"__si"});a.r=referent;a.t=mGlobals.token;__si.sendInvite(a);__audioDlg.inv2();break;default:break}}function AddAudioStory(b,a){onExit=a;referent=b;sessionId=null;if(typeof mResid=="undefined"){setTimeout("AddAudioStory(referent,onExit)",1000);return}if(null==__audioDlg){__audioDlg=new TGN.AudioDialog({dlgCb:dlgCb,val:mGlobals.val})}__audioDlg.start()}function c2callSrCb(a){switch(a.cbFnc){case"callOk":CallStatus.init(a);break;case"callFail":__audioDlg.audioErr();break;case"state":CallStatus.callBack(a);break;case"cmd":break;default:break}}function invCb(a){switch(a.cbFnc){case"invOk":break;case"invFail":__audioDlg.audioErr();break;default:break}};