window.FB=window.FB||{};window.Plaxo=window.Plaxo||{};FB.namespace=function(ns){if(!ns||!ns.length){return null;}var levels=ns.split(".");var nsobj=FB;for(var i=(levels[0]=="FB")?1:0;i<levels.length;++i){nsobj[levels[i]]=nsobj[levels[i]]||{};nsobj=nsobj[levels[i]];}return nsobj;};FB.namespace("Common");FB.namespace("Flash");FB.namespace("Plaxo");FB.Common.PageTracker=null;FB.Flash.Variant="Option1";FB.Flash.LastHandle=null;FB.Common.PNGCheckActual=function(id){if(YAHOO.env.ua.ie>0&&YAHOO.env.ua.ie<7){var img=document.getElementById(id);var imgID=(img.id)?"id='"+img.id+"' ":"";var imgClass=(img.className)?"class='"+img.className+"' ":"";var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' ";var imgStyle="display:inline-block;"+img.style.cssText;if(img.align=="left"){imgStyle="float:left;"+imgStyle;}if(img.align=="right"){imgStyle="float:right;"+imgStyle;}if(img.parentElement.href){imgStyle="cursor:hand;"+imgStyle;}var strNewHTML="<span "+imgID+imgClass+imgTitle+' style="'+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src='"+img.src+"', sizingMethod='scale');\"></span>";img.outerHTML=strNewHTML;}};FB.Flash.FlexComponents=new Array();FB.Flash.FlexComponent=function(version,mainPath,swfPath,path,id,container,parameters,delayWrite,transparent){this.SWFObject=new SWFObject(swfPath+"Flex/"+path,id,"100%","100%","10.0.42","#000000");this.SWFObject.setAttribute("useExpressInstall",false);this.SWFObject.skipDetect=true;this.SWFObject.addParam("allowScriptAccess","always");if(typeof (window.innerHeight)=="number"){this.useEmbed=true;this.SWFObject.addParam("PLUGINSPAGE","http://www.macromedia.com/go/getflashplayer");}else{this.useEmbed=false;var junkVersion=this.SWFObject.getAttribute("version").major+","+this.SWFObject.getAttribute("version").minor+","+this.SWFObject.getAttribute("version").rev+",0";this.SWFObject.setAttribute("width",this.SWFObject.getAttribute("width")+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+junkVersion);}this.SWFObject.addVariable("serviceProtocol",window.location.protocol);this.SWFObject.addVariable("serviceHost",window.location.host);this.SWFObject.addVariable("mainPath",mainPath);this.SWFObject.addVariable("applicationVersion",version);if(parameters!=null){for(var i=0;i<parameters.length;i++){var param=parameters[i];this.SWFObject.addVariable(param.name,param.value);}}this.Render=function(container){if(this.SWFObject.installedVer.major==0){this.SWFObject.write(container);var myW=document.getElementById("noFlashWarning");myW.style.display="block";}else{if(this.SWFObject.installedVer.versionIsValid(this.SWFObject.getAttribute("version"))){this.SWFObject.write(container);}else{var myC=document.getElementById(container);myC.style.display="none";if(!this.useEmbed){this.SWFObject.write(container);}myC=document.getElementById("noFlashWarning");myC.style.display="block";}}if(document.all){var flx=null;if(document.forms[0]){flx=document.forms[0].elements[id];}if(flx==null){flx=document.getElementById(id);}window[id]=flx;}this.Handle=(document.all)?window[id]:document[id];FB.Flash.LastHandle=this.Handle;FB.Flash.FlexComponents[id]=this.Handle;};if(!delayWrite){this.Render(container);}};FB.Flash.CheckOnFlash=function(id){if(FB.Flash.FlexComponents[id]==null){var container=document.getElementById(id+"Container");if(container!=null){container.style.display="none";}var hidden=document.getElementById("noFlashWarning");if(hidden!=null){hidden.style.display="block";FB.Common.PNGCheckActual("noFlashLogo");}}};FB.Flash.ContentResize=function(id,height,adjustment){if(FB.Flash.FlexComponents[id]!=null){var container=document.getElementById(id+"Container");if(container!=null){var actualHeight=height+adjustment;container.style.height=actualHeight+"px";document.getElementById("bd").style.height=actualHeight+"px";try{document.getElementById("bd").style.minHeight=actualHeight+"px";}catch(e){}FB.Flash.FlexComponents[id].style.height=actualHeight+"px";FB.Flash.FlexComponents[id].contentResized(height);window.scrollTo(0,0);}}};FB.Flash.UnregisterForPublicGame=function(id){try{FB.Flash.LastHandle.unregisterForPublicGame(id);}catch(e){}};FB.Flash.CompleteGame=function(){try{FB.Flash.LastHandle.refreshLeague();}catch(e){}};FB.Flash.Navigate=function(location,exit){if(exit){location=location+"Logout.aspx?f="+new Date().getTime();}if(location=="Cashier.Refresh"){FB.Flash.HomePanel.Handle.processJSEvent(location);}else{window.location.href=location;}};FB.Flash.SetFocus=function(){window.focus();};FB.Flash.GetCurrentVariant=function(){return FB.Flash.Variant;};FB.Flash.LaunchGame=function(location){var gameWindow=null;if(screen&&screen.width<=1024){gameWindow=window.open(location,"gamePlayer","status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=yes,scrollbars=no,width=1016,height=635,left=0,top=0");}else{gameWindow=window.open(location,"gamePlayer","status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=yes,scrollbars=no,width=1040,height=650,left=50,top=50");}if(gameWindow==null){window.alert("Please verify that your browser has pop-up windows enabled for this website or you will not be able to use our game player/clock/viewer.");}};FB.Flash.InviteFriends=function(url,alertText){if(url.indexOf("plaxo")!=-1){FB.Plaxo.showPlaxoABChooser("emailImport","PlaxoIntegration.aspx");}else{var friendsWindow=null;friendsWindow=window.open(url,"friendsWindow","status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=yes,scrollbars=no,width=700,height=550,left=50,top=50");if(friendsWindow==null){window.alert(alertText);}}};FB.Flash.PurchaseMore=function(url,width,height,alertText){var myWindow=null;myWindow=window.open(url,"purchaseWindow","status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=yes,scrollbars=yes,width="+width+",height="+height+",left=50,top=50");if(myWindow==null){window.alert(alertText);}};FB.Flash.CompletedPurchase=function(){FB.Flash.LastHandle.completedPurchase();};FB.Flash.TrackPageView=function(location){try{FB.Common.PageTracker._trackPageview("/"+location);}catch(err){}};FB.Flash.GetYCenter=function(){var yOffset=0;var iHeight=0;if(typeof (window.pageYOffset)=="number"){yOffset=window.pageYOffset;}else{yOffset=document.documentElement.scrollTop;}if(typeof (window.innerHeight)=="number"){iHeight=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){iHeight=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){iHeight=document.body.clientHeight;}}}return(yOffset)+(iHeight/2);};FB.Flash.SetLogin=function(login){var days=10;var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();document.cookie="FBL="+login+expires+"; path=/";};FB.Flash.GetLogin=function(){try{var name="FBL=";if(document.cookie.indexOf(name)==-1){return"";}var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(name)==0){return c.substring(name.length,c.length);}}return"";}catch(ex){return"";}};function onABCommComplete(){try{var ta=document.getElementById("emailImport");FB.Flash.League.Handle.importContacts(ta.value);}catch(e){}}Plaxo.popup=function(url,title,width,height){var numArgs=arguments.length;var ht;var windowObj;var windowParams=(numArgs>4)?arguments[4]:"statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,top=0";var isOffset=(numArgs>7)?arguments[7]:false;var offset;if(numArgs>5){if(isOffset){offset=(window.screenY)?window.screenY:self.screenTop;offset=(offset)?offset:0;}else{offset=0;}offset+=arguments[5];windowParams+=(windowParams)?",":"";windowParams+="top="+offset+",screenY="+offset;}else{windowParams+="top=0,screenY=0";}if(numArgs>6){if(isOffset){offset=(window.screenX)?window.screenX:self.screenLeft;offset=(offset)?offset:0;}else{offset=0;}offset+=arguments[6];windowParams+=",left="+offset+",screenX="+offset;}if(screen.height){ht=screen.height;}else{if(window.document.body.clientHeight){ht=window.document.body.clientHeight;}else{if(window.innerHeight){ht=window.innerHeight;}else{if(document.documentElement.clientHeight){ht=document.documentElement.clientHeight;}else{ht=580;}}}}if((height!=0)&&(height>ht)){height=ht;}if(height!=0&&width!=0){windowParams+=",height="+height+",width="+width;}else{if(width!=0){windowParams+=",width="+width;}}windowObj=window.open(url,title,windowParams,false);if(windowObj){windowObj.focus();}return windowObj;};Plaxo.byId=function(elem){if(typeof elem=="string"){elem=document.getElementById(elem);}return elem;};Plaxo.Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};Plaxo.String={contains:function(whole,part){return whole.indexOf(part)!=-1;},alnumChars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_",isalnum:function(ch){return this.contains(this.alnumChars,ch);},otherSafeEmailChars:".-+=",findBoundary:function(s,start,forward){if(forward){for(var i=start;i<s.length;i++){var ch=s.charAt(i);if(!Plaxo.String.isalnum(ch)&&!this.contains(this.otherSafeEmailChars,ch)){return i-1;}}return s.length-1;}else{for(var i=start-1;i>=0;i--){var ch=s.charAt(i);if(!Plaxo.String.isalnum(ch)&&!this.contains(this.otherSafeEmailChars,ch)){return i+1;}}return 0;}},removeDups:function(strs,ignoreCase){var uniqueStrs=[];var oldStrs={};for(var i=0;i<strs.length;i++){var s=strs[i];if(ignoreCase){s=s.toLowerCase();}if(!oldStrs[s]){uniqueStrs.push(strs[i]);oldStrs[s]=1;}}return uniqueStrs;}};Plaxo.ABLauncher=Plaxo.Class.create();Plaxo.ABLauncher.prototype={initialize:function(){this.name="Plaxo.ABLauncher 1.0";this.abWin=null;this.textArea=null;this.currentEmails={};},dialogWidth:460,dialogHeight:480,toQueryString:function(options){var queryComponents=[];for(key in options){if(typeof options[key]=="function"){continue;}var queryComponent=encodeURIComponent(key)+"="+encodeURIComponent(options[key]);queryComponents.push(queryComponent);}return queryComponents.join("&");},showABChooser:function(textArea,plaxoHost,callbackPage,extraOptions){this.textArea=Plaxo.byId(textArea);if(!this.textArea){return ;}this.currentEmails={};this.extractEmails(this.textArea.value);if(!this.abWin||this.abWin.closed){if(callbackPage.length>0&&callbackPage.charAt(0)!="/"){callbackPage="/"+callbackPage;}var cb=location.protocol+"//"+location.host+callbackPage;extraOptions.cb=cb;extraOptions.host=location.href;extraOptions.ts=new Date().getTime();var qs=this.toQueryString(extraOptions);if(extraOptions.comcast){var url="https://"+plaxoHost+"/scc?action=abchooser&"+qs;}else{var url="https://"+plaxoHost+"/ab_chooser?"+qs;}if(extraOptions.plaxoMembersOnly){url+="&direct=1";}else{var emails=this.getCurrentEmailList().join(",");url+="&t=import&emails="+escape(emails);}this.abWin=Plaxo.popup(url,"PlaxoABC",this.dialogWidth,this.dialogHeight,"resizable=no,scrollbars=no");}if(this.abWin){this.abWin.focus();}},getCurrentEmailList:function(){var emails=[];for(email in this.currentEmails){emails.push(email);}return emails;},extractEmails:function(str){var index=0;while(true){index=str.indexOf("@",index);if(index==-1){break;}var start=Plaxo.String.findBoundary(str,index-1,false);var end=Plaxo.String.findBoundary(str,index+1,true);var email=str.substring(start,end+1).toLowerCase();this.currentEmails[email]=1;index++;}},hasCurrentEmail:function(email){return this.currentEmails[email.toLowerCase()];},addCheckedRecipients:function(text){if(!text){return false;}if(!this.textArea){return false;}var curText=this.textArea.value;if(curText&&!curText.trim().endsWith(",")){curText+=", ";}curText+=text;this.setTextAreaValue(curText);return true;},setTextAreaValue:function(str){this.textArea.value=str;}};Plaxo.abl=null;FB.Plaxo.showPlaxoABChooser=function(textArea,callbackPage,plaxoHost,extraOptions){if(!Plaxo.abl){Plaxo.abl=new Plaxo.ABLauncher();}if(!plaxoHost){plaxoHost="www.plaxo.com";}if(!extraOptions){extraOptions={};}Plaxo.abl.showABChooser(textArea,plaxoHost,callbackPage,extraOptions);};