/*Copyright(c)2008 AG Interactive,All Rights Reserved;Copyright(c)2004-2008 The Dojo Foundation,All Rights Reserved*/
/*This is a compiled version of Dojo built for AG Interactive.*/
dojo.provide("bma.layers.home");if(!dojo._hasResource["agi.flash.ufo"]){dojo._hasResource["agi.flash.ufo"]=true;dojo.provide("agi.flash.ufo");UFO={req:["movie","width","height","majorversion","build"],opt:["play","loop","menu","quality","scale","salign","wmode","bgcolor","base","flashvars","devicefont","allowscriptaccess","seamlesstabbing"],optAtt:["id","name","align"],optExc:["swliveconnect"],ximovie:"ufo.swf",xiwidth:"215",xiheight:"138",ua:navigator.userAgent.toLowerCase(),pluginType:"",fv:[0,0],foList:[],create:function(FO,id,_3){if(!UFO.uaHas("w3cdom")||UFO.uaHas("ieMac")){return;}UFO.getFlashVersion();UFO.foList[id]=UFO.updateFO(FO);if(typeof _3=="undefined"||_3!="true"){UFO.createCSS("#"+id,"visibility:hidden;");}UFO.domLoad(id,_3);},updateFO:function(FO){if(typeof FO.xi!="undefined"&&FO.xi=="true"){if(typeof FO.ximovie=="undefined"){FO.ximovie=UFO.ximovie;}if(typeof FO.xiwidth=="undefined"){FO.xiwidth=UFO.xiwidth;}if(typeof FO.xiheight=="undefined"){FO.xiheight=UFO.xiheight;}}FO.mainCalled=false;return FO;},domLoad:function(id,_6){if(typeof _6!="undefined"&&_6=="true"){UFO.main(id);}else{var _t=setInterval(function(){if((document.getElementsByTagName("body")[0]!=null||document.body!=null)&&document.getElementById(id)!=null){UFO.main(id);clearInterval(_t);}},250);if(typeof document.addEventListener!="undefined"){document.addEventListener("DOMContentLoaded",function(){UFO.main(id);clearInterval(_t);},null);}}},main:function(id){var _9=UFO.foList[id];if(_9.mainCalled){return;}UFO.foList[id].mainCalled=true;document.getElementById(id).style.visibility="hidden";if(UFO.hasRequired(id)){if(UFO.hasFlashVersion(parseInt(_9.majorversion,10),parseInt(_9.build,10))){if(typeof _9.setcontainercss!="undefined"&&_9.setcontainercss=="true"){UFO.setContainerCSS(id);}UFO.writeSWF(id);}else{if(_9.xi=="true"&&UFO.hasFlashVersion(6,65)){UFO.createDialog(id);}}}document.getElementById(id).style.visibility="visible";},createCSS:function(_a,_b){var _h=document.getElementsByTagName("head")[0];var _s=UFO.createElement("style");if(!UFO.uaHas("ieWin")){_s.appendChild(document.createTextNode(_a+" {"+_b+"}"));}_s.setAttribute("type","text/css");_s.setAttribute("media","screen");_h.appendChild(_s);if(UFO.uaHas("ieWin")&&document.styleSheets&&document.styleSheets.length>0){var _e=document.styleSheets[document.styleSheets.length-1];if(typeof _e.addRule=="object"){_e.addRule(_a,_b);}}},setContainerCSS:function(id){var _fo=UFO.foList[id];var _w=/%/.test(_fo.width)?"":"px";var _h=/%/.test(_fo.height)?"":"px";UFO.createCSS("#"+id,"width:"+_fo.width+_w+"; height:"+_fo.height+_h+";");if(_fo.width=="100%"){UFO.createCSS("body","margin-left:0; margin-right:0; padding-left:0; padding-right:0;");}if(_fo.height=="100%"){UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;");}},createElement:function(el){return (UFO.uaHas("xml")&&typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml",el):document.createElement(el);},createObjParam:function(el,_15,_16){var _p=UFO.createElement("param");_p.setAttribute("name",_15);_p.setAttribute("value",_16);el.appendChild(_p);},uaHas:function(ft){var _u=UFO.ua;switch(ft){case "w3cdom":return (typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&(typeof document.createElement!="undefined"||typeof document.createElementNS!="undefined"));case "xml":var _m=document.getElementsByTagName("meta");var _l=_m.length;for(var i=0;i<_l;i++){if(/content-type/i.test(_m[i].getAttribute("http-equiv"))&&/xml/i.test(_m[i].getAttribute("content"))){return true;}}return false;case "ieMac":return /msie/.test(_u)&&!/opera/.test(_u)&&/mac/.test(_u);case "ieWin":return /msie/.test(_u)&&!/opera/.test(_u)&&/win/.test(_u);case "gecko":return /gecko/.test(_u)&&!/applewebkit/.test(_u);case "opera":return /opera/.test(_u);case "safari":return /applewebkit/.test(_u);default:return false;}},getFlashVersion:function(){if(UFO.fv[0]!=0){return;}if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){UFO.pluginType="npapi";var _d=navigator.plugins["Shockwave Flash"].description;if(typeof _d!="undefined"){_d=_d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var _m=parseInt(_d.replace(/^(.*)\..*$/,"$1"),10);var _r=/r/.test(_d)?parseInt(_d.replace(/^.*r(.*)$/,"$1"),10):0;UFO.fv=[_m,_r];}}else{if(window.ActiveXObject){UFO.pluginType="ax";try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");UFO.fv=[6,0];_a.AllowScriptAccess="always";}catch(e){if(UFO.fv[0]==6){return;}}try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(typeof _a=="object"){var _d=_a.GetVariable("$version");if(typeof _d!="undefined"){_d=_d.replace(/^\S+\s+(.*)$/,"$1").split(",");UFO.fv=[parseInt(_d[0],10),parseInt(_d[2],10)];}}}}},hasRequired:function(id){var _l=UFO.req.length;for(var i=0;i<_l;i++){if(typeof UFO.foList[id][UFO.req[i]]=="undefined"){return false;}}return true;},hasFlashVersion:function(_24,_25){return (UFO.fv[0]>_24||(UFO.fv[0]==_24&&UFO.fv[1]>=_25))?true:false;},writeSWF:function(id){var _fo=UFO.foList[id];var _e=document.getElementById(id);if(UFO.pluginType=="npapi"){if(UFO.uaHas("gecko")||UFO.uaHas("xml")){while(_e.hasChildNodes()){_e.removeChild(_e.firstChild);}var _29=UFO.createElement("object");_29.setAttribute("type","application/x-shockwave-flash");_29.setAttribute("data",_fo.movie);_29.setAttribute("width",_fo.width);_29.setAttribute("height",_fo.height);var _l=UFO.optAtt.length;for(var i=0;i<_l;i++){if(typeof _fo[UFO.optAtt[i]]!="undefined"){_29.setAttribute(UFO.optAtt[i],_fo[UFO.optAtt[i]]);}}var _o=UFO.opt.concat(UFO.optExc);var _l=_o.length;for(var i=0;i<_l;i++){if(typeof _fo[_o[i]]!="undefined"){UFO.createObjParam(_29,_o[i],_fo[_o[i]]);}}_e.appendChild(_29);}else{var _2d="";var _o=UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);var _l=_o.length;for(var i=0;i<_l;i++){if(typeof _fo[_o[i]]!="undefined"){_2d+=" "+_o[i]+"=\""+_fo[_o[i]]+"\"";}}_e.innerHTML="<embed type=\"application/x-shockwave-flash\" src=\""+_fo.movie+"\" width=\""+_fo.width+"\" height=\""+_fo.height+"\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\""+_2d+"></embed>";}}else{if(UFO.pluginType=="ax"){var _2e="";var _l=UFO.optAtt.length;for(var i=0;i<_l;i++){if(typeof _fo[UFO.optAtt[i]]!="undefined"){_2e+=" "+UFO.optAtt[i]+"=\""+_fo[UFO.optAtt[i]]+"\"";}}var _2f="";var _l=UFO.opt.length;for(var i=0;i<_l;i++){if(typeof _fo[UFO.opt[i]]!="undefined"){_2f+="<param name=\""+UFO.opt[i]+"\" value=\""+_fo[UFO.opt[i]]+"\" />";}}var _p=window.location.protocol=="https:"?"https:":"http:";_e.innerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+_2e+" width=\""+_fo.width+"\" height=\""+_fo.height+"\" codebase=\""+_p+"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+_fo.majorversion+",0,"+_fo.build+",0\"><param name=\"movie\" value=\""+_fo.movie+"\" />"+_2f+"</object>";if(_fo["id"]){window[_fo["id"]]=document.getElementById(_fo["id"]);}}}},createDialog:function(id){var _fo=UFO.foList[id];UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","height:100%; overflow:hidden;");UFO.createCSS("#xi-con","position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");UFO.createCSS("#xi-dia","position:absolute; left:50%; top:50%; margin-left: -"+Math.round(parseInt(_fo.xiwidth,10)/2)+"px; margin-top: -"+Math.round(parseInt(_fo.xiheight,10)/2)+"px; width:"+_fo.xiwidth+"px; height:"+_fo.xiheight+"px;");var _b=document.getElementsByTagName("body")[0];var _c=UFO.createElement("div");_c.setAttribute("id","xi-con");var _d=UFO.createElement("div");_d.setAttribute("id","xi-dia");_c.appendChild(_d);_b.appendChild(_c);var _36=window.location;if(UFO.uaHas("xml")&&UFO.uaHas("safari")){var _37=document.getElementsByTagName("title")[0].firstChild.nodeValue=document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0,47)+" - Flash Player Installation";}else{var _37=document.title=document.title.slice(0,47)+" - Flash Player Installation";}var _38=UFO.pluginType=="ax"?"ActiveX":"PlugIn";var _uc=typeof _fo.xiurlcancel!="undefined"?"&xiUrlCancel="+_fo.xiurlcancel:"";var _uf=typeof _fo.xiurlfailed!="undefined"?"&xiUrlFailed="+_fo.xiurlfailed:"";UFO.foList["xi-dia"]={movie:_fo.ximovie,width:_fo.xiwidth,height:_fo.xiheight,majorversion:"6",build:"65",flashvars:"MMredirectURL="+_36+"&MMplayerType="+_38+"&MMdoctitle="+_37+_uc+_uf};UFO.writeSWF("xi-dia");},expressInstallCallback:function(){var _b=document.getElementsByTagName("body")[0];var _c=document.getElementById("xi-con");_b.removeChild(_c);UFO.createCSS("body","height:auto; overflow:auto;");UFO.createCSS("html","height:auto; overflow:auto;");},cleanupIELeaks:function(){var _o=document.getElementsByTagName("object");var _l=_o.length;for(var i=0;i<_l;i++){_o[i].style.display="none";for(var x in _o[i]){if(typeof _o[i][x]=="function"){_o[i][x]=null;}}}}};if(typeof window.attachEvent!="undefined"&&UFO.uaHas("ieWin")){window.attachEvent("onunload",UFO.cleanupIELeaks);}}if(!dojo._hasResource["dojox.encoding.base64"]){dojo._hasResource["dojox.encoding.base64"]=true;dojo.provide("dojox.encoding.base64");(function(){var p="=";var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var dxe=dojox.encoding;dxe.base64.encode=function(ba){var s=[],l=ba.length;var rm=l%3;var x=l-rm;for(var i=0;i<x;){var t=ba[i++]<<16|ba[i++]<<8|ba[i++];s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(tab.charAt((t>>>6)&63));s.push(tab.charAt(t&63));}switch(rm){case 2:var t=ba[i++]<<16|ba[i++]<<8;s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(tab.charAt((t>>>6)&63));s.push(p);break;case 1:var t=ba[i++]<<16;s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(p);s.push(p);break;}return s.join("");};dxe.base64.decode=function(str){var s=str.split(""),out=[];var l=s.length;while(s[--l]==p){}for(var i=0;i<l;){var t=tab.indexOf(s[i++])<<18;if(i<=l){t|=tab.indexOf(s[i++])<<12;}if(i<=l){t|=tab.indexOf(s[i++])<<6;}if(i<=l){t|=tab.indexOf(s[i++]);}out.push((t>>>16)&255);out.push((t>>>8)&255);out.push(t&255);}while(out[out.length-1]==0){out.pop();}return out;};})();}if(!dojo._hasResource["agi.base64"]){dojo._hasResource["agi.base64"]=true;dojo.provide("agi.base64");agi.base64={encode:function(str){if(!str){return "";}return dojox.encoding.base64.encode(this.string_to_bytes(str));},decode:function(str){if(!str){return "";}return this.bytes_to_str(dojox.encoding.base64.decode(str));},string_to_bytes:function(str){var _54=[];for(var i=0;i<str.length;i++){_54.push(str.charCodeAt(i));}return _54;},bytes_to_str:function(_56){var str="";dojo.forEach(_56,function(_58){str+=String.fromCharCode(_58);});return str;}};}if(!dojo._hasResource["agi.cookie.NVP"]){dojo._hasResource["agi.cookie.NVP"]=true;dojo.provide("agi.cookie.NVP");agi.cookie.NVP.getValue=function(_59,_5a,sep,_5c){var _5d,_5e;_5d=_59.indexOf(_5c+_5a+sep);if(-1==_5d){_5d=_59.indexOf(_5a+sep);if(-1==_5d){return null;}_5d+=_5a.length+sep.length;}else{_5d+=_5c.length+_5a.length+sep.length;}_5e=_59.indexOf(_5c,_5d);if(-1==_5e){_5e=_59.length;}return _59.substring(_5d,_5e);};agi.cookie.NVP.toMap=function(s,_60,sep){var map=[];var _63=s.toString().split(_60);for(var i=0;i<_63.length;i++){var _65=_63[i];if(_65){var _66=_65.split(sep);map[unescape(_66[0])]=unescape(_66[1]);}}return map;};agi.cookie.NVP.fromMap=function(map,_68,sep){var s="";for(var _6b in map){if(typeof map[_6b]=="null"){continue;}else{if(typeof map[_6b]=="function"){continue;}else{s+=escape(_6b)+sep+escape(map[_6b])+_68;}}}if(s){s=s.substr(0,s.length-1);}return s;};}if(!dojo._hasResource["agi.cookie.AGICookie"]){dojo._hasResource["agi.cookie.AGICookie"]=true;dojo.provide("agi.cookie.AGICookie");agi.cookie.AGICookie.toString=function(){return "AGICookie";};agi.cookie.AGICookie.SUBHOSTS=[[/\.yahoo\./,"_yh"],[/\.msn\./,"_msn"],[/\.aol\.|^aol\./,"_aol"],[/\.target\./,"_tg"]];agi.cookie.AGICookie.getCookieDomain=function(){var _6c=window.location.hostname.split(".");var idx=_6c.length-2;var tld=_6c.slice(-1);if(tld!="com"&&tld!="net"&&tld!="org"){idx=_6c.length-3;}_6c=_6c.slice(idx);return "."+_6c.join(".");};agi.cookie.AGICookie.getCookieName=function(_6f){var _70=window.location.hostname.split(".");var _71=_6f;var hn="";if(_70.length<3){hn="www";}else{hn=_70[0];}dojo.forEach(agi.cookie.AGICookie.SUBHOSTS,function(_73){if(_73[0].test(window.location.hostname)){_6f+=_73[1];}});dojo.forEach(["dev","vanilla","work","stage"],function(pfx){if(hn.startswith(pfx)){_6f+="_"+pfx;}});return escape(_6f);};agi.cookie.AGICookie.getCookieValueRaw=function(_75,_76){var c=agi.cookie.AGICookie.getCookie(_75);if(typeof c=="null"){return null;}var v=agi.cookie.NVP.getValue(agi.base64.decode(c),_76,"=","&");if(v){return unescape(v);}return v;};agi.cookie.AGICookie.getCookie=function(_79){var c=agi.cookie.NVP.getValue(dojo.doc.cookie,agi.cookie.AGICookie.getCookieName(_79),"=",";");if(!c){return c;}c=unescape(c);while(c.indexOf("%0A")>-1||c.indexOf("%0a")>-1){c=c.replace(/\%0[aA]/,"");}c=unescape(c);return c;};agi.cookie.AGICookie.setCookie=function(_7b,_7c,_7d,_7e){_7b=agi.cookie.AGICookie.getCookieName(_7b);var cki=_7b+"="+escape(_7c)+";";if(_7e){_7d="Thursday, 31-Dec-2037 00:01:00 GMT";}if(_7d){cki=cki+"expires="+_7d+";";}cki=cki+"path=/;domain="+agi.cookie.AGICookie.getCookieDomain();dojo.doc.cookie=cki;};agi.cookie.AGICookie.expireCookie=function(_80){agi.cookie.AGICookie.setCookie(_80,"","Friday, 01-Jan-99 00:00:00 GMT");};agi.cookie.AGICookie.getCookieValue=function(_81,_82){var v=agi.cookie.AGICookie.getCookieValueRaw(_81,_82);if(!v&&_81=="customer"&&_82=="name"){v=agi.cookie.AGICookie.getCookieValueRaw(_81,"email");}if(!v&&_81=="customer"&&_82=="name"){v="member";}return v;};agi.cookie.AGICookie.setCookieValue=function(_84,_85,_86,_87,_88){var map=null;var c=agi.cookie.AGICookie.getCookie(_84);if(c){map=agi.cookie.NVP.toMap(agi.base64.decode(c),"&","=");}else{map=[];}map[_85]=_86;agi.cookie.AGICookie.setCookie(_84,agi.base64.encode(agi.cookie.NVP.fromMap(map,"&","=")),_87,_88);};}if(!dojo._hasResource["agi.cookie.MagicCookie"]){dojo._hasResource["agi.cookie.MagicCookie"]=true;dojo.provide("agi.cookie.MagicCookie");agi.cookie.MagicCookie.setCookieValue=function(_8b,_8c,_8d){var _8e=_8d?"mc_p":"mc_s";return agi.cookie.AGICookie.setCookieValue(_8e,_8b,_8c,null,_8d);};agi.cookie.MagicCookie.getCookieValue=function(_8f){var _90=agi.cookie.AGICookie.getCookieValue("mc_s",_8f);if(!_90){_90=agi.cookie.AGICookie.getCookieValue("mc_p",_8f);}return _90;};agi.cookie.MagicCookie.delCookieValue=function(_91,_92){return agi.cookie.MagicCookie.setCookieValue(_91,null,_92);};}if(!dojo._hasResource["agi.cookie._base"]){dojo._hasResource["agi.cookie._base"]=true;dojo.provide("agi.cookie._base");agi.cookie.toString=function(){return "AGICookie";};agi.cookie.getMemNum=function(){return agi.cookie.AGICookie.getCookieValue("customer","memnum");};agi.cookie.getMemName=function(){return agi.cookie.AGICookie.getCookieValue("customer","name");};agi.cookie.getCustomerEmail=function(){return agi.cookie.AGICookie.getCookieValue("customer","email");};agi.cookie.getCustomerAge=function(){try{var v=agi.cookie.AGICookie.getCookieValue("customer","age");if(!v){v="";}age=parseInt(v);if(age<18){v="";}else{if(age>65){v="65";}}return v;}catch(er){return "";}};agi.cookie.getCustomerGender=function(){try{var v=agi.cookie.AGICookie.getCookieValue("customer","gender");if(!v){v="";}return v.toLowerCase();}catch(er){return "";}};}if(!dojo._hasResource["agi.cookie"]){dojo._hasResource["agi.cookie"]=true;dojo.provide("agi.cookie");}if(!dojo._hasResource["agi.flash.util"]){dojo._hasResource["agi.flash.util"]=true;dojo.provide("agi.flash.util");getCUCustomerStatus=function(){return getCustomerStatus();};getCUCustomerPrevStatus=function(){return getCustomerPrevStatus();};getCUCustomerNumber=function(){var num=getCustomerNumber();if(num=="Unknown"||num=="undefined"){return 0;}else{return num;}};readBillboardFromCookie=function(){try{if(v=agi.cookie.MagicCookie.getCookieValue("bboard")){return v;}else{return setBillboardToCookie(0);}}catch(er){return 0;}};setBillboardToCookie=function(_96){try{agi.cookie.MagicCookie.setCookieValue("bboard",_96,"mc_p");return _96;}catch(er){return 0;}};readOfferStateFromCookie=function(){try{if(v=agi.cookie.MagicCookie.getCookieValue("offerState")){return v;}else{return setOfferStateToCookie(0);}}catch(er){return 0;}};setOfferStateToCookie=function(_97){try{agi.cookie.MagicCookie.setCookieValue("offerState",_97);return _97;}catch(er){return 0;}};readReminderStateFromCookie=function(){try{if(v=agi.cookie.MagicCookie.getCookieValue("reminderState")){return v;}else{return setReminderStateToCookie(0);}}catch(er){return 0;}};setReminderStateToCookie=function(_98){try{agi.cookie.MagicCookie.setCookieValue("reminderState",_98);return _98;}catch(er){return 0;}};setVisitToCookie=function(){try{var _99=getVisitFromCookie();agi.cookie.MagicCookie.setCookieValue("visit",++_99);}catch(er){return 0;}};clearVisitFromCookie=function(){agi.cookie.MagicCookie.setCookieValue("visit",0);};getVisitFromCookie=function(){try{if(v=agi.cookie.MagicCookie.getCookieValue("visit")){return v;}else{return 1;}}catch(er){return 1;}};getCustomerSegmentFromCookie=function(){var _9a=getCustomerStatus();var _9b=getCustomerPrevStatus();switch(_9a){case "1":return 1;break;case "2":return 1;break;case "3":return 3;break;case "4":return 3;break;case "5":return 5;break;default:return 1;}};getEnv=function(){var env=window.location.hostname.split(".")[0];env=env.replace("1","");env=env.replace("2","");if((env!="dev")&&(env!="work")&&(env!="stage")){env="www";}return env;};cleanupFP9IELeaks=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};};if(dojo.isIE){dojo.addOnUnload(cleanupFP9IELeaks);}dojo.addOnLoad(setVisitToCookie);}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_9d){if(this._hash[_9d.id]){throw new Error("Tried to register widget with id=="+_9d.id+" but that id is already registered");}this._hash[_9d.id]=_9d;},remove:function(id){delete this._hash[id];},forEach:function(_9f){for(var id in this._hash){_9f(this._hash[id]);}},filter:function(_a1){var res=new dijit.WidgetSet();this.forEach(function(_a3){if(_a1(_a3)){res.add(_a3);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_a6){return _a6.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_a7){var id;do{id=_a7+"_"+(_a7 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_a7]:dijit._widgetTypeCtr[_a7]=0);}while(dijit.byId(id));return id;};dijit.findWidgets=function(_a9){var _aa=[];function getChildrenHelper(_ab){var _ac=dojo.isIE?_ab.children:_ab.childNodes,i=0,_ae;while(_ae=_ac[i++]){if(_ae.nodeType!=1){continue;}var _af=_ae.getAttribute("widgetId");if(_af){var _b0=dijit.byId(_af);_aa.push(_b0);}else{getChildrenHelper(_ae);}}};getChildrenHelper(_a9);return _aa;};if(dojo.isIE){dojo.addOnWindowUnload(function(){dojo.forEach(dijit.findWidgets(dojo.body()),function(_b1){if(_b1.destroyRecursive){_b1.destroyRecursive();}else{if(_b1.destroy){_b1.destroy();}}});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_b3){return dijit.registry.byId(_b3.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_b4){while(_b4){if(_b4.getAttribute&&_b4.getAttribute("widgetId")){return dijit.registry.byId(_b4.getAttribute("widgetId"));}_b4=_b4.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_b5){var _b6=dojo.style(_b5);return (_b6.visibility!="hidden")&&(_b6.visibility!="collapsed")&&(_b6.display!="none")&&(dojo.attr(_b5,"type")!="hidden");};dijit.isTabNavigable=function(_b7){if(dojo.hasAttr(_b7,"disabled")){return false;}var _b8=dojo.hasAttr(_b7,"tabindex");var _b9=dojo.attr(_b7,"tabindex");if(_b8&&_b9>=0){return true;}var _ba=_b7.nodeName.toLowerCase();if(((_ba=="a"&&dojo.hasAttr(_b7,"href"))||dijit._tabElements[_ba])&&(!_b8||_b9>=0)){return true;}return false;};dijit._getTabNavigable=function(_bb){var _bc,_bd,_be,_bf,_c0,_c1;var _c2=function(_c3){dojo.query("> *",_c3).forEach(function(_c4){var _c5=dijit._isElementShown(_c4);if(_c5&&dijit.isTabNavigable(_c4)){var _c6=dojo.attr(_c4,"tabindex");if(!dojo.hasAttr(_c4,"tabindex")||_c6==0){if(!_bc){_bc=_c4;}_bd=_c4;}else{if(_c6>0){if(!_be||_c6<_bf){_bf=_c6;_be=_c4;}if(!_c0||_c6>=_c1){_c1=_c6;_c0=_c4;}}}}if(_c5&&_c4.nodeName.toUpperCase()!="SELECT"){_c2(_c4);}});};if(dijit._isElementShown(_bb)){_c2(_bb);}return {first:_bc,last:_bd,lowest:_be,highest:_c0};};dijit.getFirstInTabbingOrder=function(_c7){var _c8=dijit._getTabNavigable(dojo.byId(_c7));return _c8.lowest?_c8.lowest:_c8.first;};dijit.getLastInTabbingOrder=function(_c9){var _ca=dijit._getTabNavigable(dojo.byId(_c9));return _ca.last?_ca.last:_ca.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["agi._base"]){dojo._hasResource["agi._base"]=true;dojo.provide("agi._base");dojo.provide("agi.registry");agi.registry=new dijit.WidgetSet();agi.byId=function(id){return agi.registry.byId(id);};agi.listAll=function(){var cd=["r","i","d",".","e","l","o","s","n","o","c"];var _cd=["l","a","v","e"];cd.reverse();_cd.reverse();dojo[_cd.join("")](cd.join(""))(agi.registry._hash);};agi._loadedResources={};agi._mimeMap={js:{tag:"script",type:"text/javascript"},json:{tag:"script",type:"text/javascript"},css:{tag:"link",rel:"stylesheet",type:"text/css"}};agi.requireJs=function(_ce,_cf){return agi.require("js."+_ce,"js",_cf);};agi.requireCss=function(_d0,_d1){return agi.require("css."+_d0,"css",_d1);};agi.require=function(_d2,_d3,_d4){var _d5=agi._loadedResources[_d2];if(_d5&&!_d4){return _d5;}_d3=_d3||"js";var _d6=agx.currentPage.imghost;var _d7=[_d2.split(".").join("/"),_d3].join(".");if(_d7.charAt(0)=="/"){_d7=_d7.substring(1);}var uri=[_d6,_d7].join("/");var tag=dojo.doc.createElement(agi._mimeMap[_d3].tag);if(_d3=="css"){tagi.rel=agi._mimeMap.css.rel;tagi.href=uri;}else{tagi.src=uri;tagi.type=agi._mimeMap[_d3].type;}dojo.query("head")[0].appendChild(tag);agi._loadedResources[_d2]=tag;return tag;};}if(!dojo._hasResource["agi.classes._base"]){dojo._hasResource["agi.classes._base"]=true;dojo.provide("agi.classes._base");agi.classes.toString=function(){return "AGBase";};agi.classes._idInc=0;agi.classes._idGen=function(){agi.classes._idInc++;return agi.classes._idInc;};}if(!dojo._hasResource["agi.types"]){dojo._hasResource["agi.types"]=true;dojo.provide("agi.types");dojo.provide("agi.types.ExtArray");(function(){var t=agi.types;var d=dojo;t.toString=function(){return "AGTypes";};d.declare("agi.types.ExtArray",[Array],{toString:function(){return this.declaredClass.split(".")[2]+"("+this._arrayMembers().join(", ")+")";},forEach:function(_dc,_dd){d.forEach(this._arrayMembers(),_dc,_dd);return this;},_arrayMembers:function(){var ret=[];for(var i=0;i<this.length;i++){ret.push(this[i]);}return ret;},every:function(_e0,_e1){return d.every(this._arrayMembers(),_e0,_e1);},some:function(_e2,_e3){return d.some(this._arrayMembers(),_e2,_e3);},map:function(_e4,obj){return d.map(this._arrayMembers(),_e4,obj,t.ExtArray);}});d.declare("agi.types.Dict",[null],{toString:function(){return this.declaredClass.split(".")[2]+"("+this.keys().join(", ")+")";},fromObject:function(obj){for(m in obj){if(!Object.prototype[m]){this[m]=obj[m];}}},keys:function(){var ret=new t.ExtArray();for(m in this){if(d.isString(m)&&!t.Dict.prototype[m]&&m!="declaredClass"&&m!="preamble"){ret.push(m);}}ret.sort();return ret;},values:function(){var ret=new t.ExtArray();this.keys().forEach(d.hitch(this,function(i){ret.push(this[i]);}));return ret;},items:function(){var _ea=new t.ExtArray();this.keys().forEach(d.hitch(this,function(i){_ea.push([i,this[i]]);}));return _ea;}});})();}if(!dojo._hasResource["agi.util"]){dojo._hasResource["agi.util"]=true;dojo.provide("agi.util");if(typeof $=="undefined"){$=function(i){return dojo.byId(i);};}(function(){var u=agi.util;var t=agi.types;var d=dojo;u.toString=function(){return "AGUtil";};u.dir=function(_f0){ret=[];if(d.isArray(_f0)){for(x in _f0){if(!Array.prototype[x]){ret.push([x,_f0[x]]);}}}else{if(d.isString(_f0)){for(x in _f0){if(!String.prototype[x]){ret.push([x,_f0[x]]);}}}else{d.forEach(_f0,function(x){ret.push([x,_f0[x]]);});}}return ret;};u.getClassName=function(_f2){if(!_f2.declaredClass){if(d.isString(_f2)){return "String";}else{if(d.isArray(_f2)||d.isArrayLike(_f2)){return "Array";}else{if(d.isFunction(_f2)){return "function";}else{if(d.isObject(_f2)){return "Object";}}}}}else{var _f3=_f2.declaredClass.split(".");return _f3[_f3.length-1];}};u.capitalize=function(str){return str.charAt(0).toUpperCase()+str.substring(1);};u.randInt=function(max){return parseInt((parseInt(max,10)*Math.random())/Math.random(),10);};u.escapeQuotAmp=function(_f6){return _f6.toString().replace(/"/g,"&quot;").replace(/&/g,"&amp;");};u.toPx=function(num){return num.toString()+"px";};u.posToString=function(_f8){var _f9=[];var _fa=["x","y","z","t","l","h","w","m","n","top","left","right","height","width","length","breadth","max","min","high","low","zIndex"];var _fb=function(pos,s){if(pos[s]){_f9.push(s+": "+pos[s]);}return;};for(i=0;i<_fa.length;i++){_fb(_f8,_fa[i]);}return "{"+_f9.join(", ")+"}";};u._debounce_waiting=false;u._setDebounceWaitingFalse=function(){u._debounce_waiting=false;};u.debounce=function(x,_ff,_100){var _101=3000;if(_100){_101=_100*1000;}if(window.setDoPopAway){setDoPopAway(false);}if(u._debounce_waiting){if(_ff){alert("Please wait while we process your request.");}return false;}else{u._debounce_waiting=true;setTimeout(u._setDebounceWaitingFalse,_101);return true;}};u.collection_as_array=u.collectionToArray=function(coll){var ret=[];d.forEach(coll,function(i){ret.push(i);});return ret;};u.extend_array=u.extendArray=function(arr1,_106){d.forEach(_106,function(i){arr1.push(i);});};u.product_id=u.getProdId=function(_108){return "productw-"+_108;};u.isUndef=function(_109){return (_109===undefined);};u.isDef=function(_10a){if(_10a){return true;}else{if(_10a===""||_10a===0){return true;}else{return false;}}};u.isNull=function(_10b){return (_10b===null);};u.queryOne=function(_10c,_10d){ret=d.query(_10c,_10d);if(ret.length<=0){return null;}else{return ret[0];}};u.query_one=u.q1=u.queryOne;u.getQueryVariable=function(_10e,srch){var wv;if(webvars){wv=webvars;}if(srch){wv=d.queryToObject(srch);}else{if(!srch&&!wv){wv=d.queryToQbect(window.location.search.substring(1));}}return wv[_10e];};u.get_query_variable=u.getQv=u.getQueryVariable;u.truncate=function(text,_112,_113){_113=_113?_113.toLowerCase():"left";if(text.length>_112){var _114=0;var ret=text;if(_113=="right"){ret=text.substring(text.length-_112);ret="..."+ret;}else{if(_113=="left"){ret=text.substring(_114,text.indexOf(" ",_112));ret+="...";}}}else{ret=text;}return ret;};u.trunc=u.truncate;u.get_friendly_path=u.getFriendlyPath=function(){return d.doc.location.pathname.split(".pd")[1];};u.set_options=u.setOptions=function(_116,_117){_116.options.length=0;var _118=agi.html._buildOptions(_117);var i=0;var o;for(o=0;o<_118.length;o++){_116.options[i]=_118[o];i++;}};u._build_options=u._buildOptions=function(_11b){var _11c=[];var _11d=0;var t;for(t=0;t<_11b.length;t++){var _11f=_11b[t][1];var _120=_11b[t][0];var o=new Option(_120,_11f);_11c[_11c.length]=o;_11d++;}if(_11d>1){_11c.unshift(new Option("",""));}return _11c;};u.show=function(node,_123){d.style(node,{display:_123?_123:"block"});};u.hide=function(node){d.style(node,{display:"none"});};u.toggleDisplay=function(node){if(d.style(node,"display")=="none"){d.style(node,{display:"block"});}else{d.style(node,{display:"none"});}};u.toggle_block=function(_126,_127,_128,_129){if(_128&&_129){var _12a=_126.className;if(_12a.indexOf(_128)>-1){d.removeClass(_126,_128);d.addClass(_126,_129);}else{d.removeClass(_126,_129);d.addClass(_126,_128);}}u.toggleDisplay(_127);};u.toggleBlock=u.toggle_block;u.get_position=u.getPosition=function(node){return d.coords(node,true);};u.getAbsolutePosition=function(node){return d._abs(node,true);};u.isUndefined=function(it){return ((typeof (it)=="undefined")&&(it===undefined));};u.getNameInObj=function(ns,item){if(!ns){ns=d.global;}for(var x in ns){if(ns[x]===item){return x.toString();}}return null;};u.forward=function(_131){return function(){return this[_131].apply(this,arguments);};};u.shallowCopy=function(obj,deep){var i,ret;if(obj===null){return null;}if(d.isObject(obj)){ret=new obj.constructor();for(i in obj){if(u.isUndefined(ret[i])){ret[i]=deep?u.shallowCopy(obj[i],deep):obj[i];}}}else{if(d.lang.isArray(obj)){ret=[];for(i=0;i<obj.length;i++){ret[i]=deep?u.shallowCopy(obj[i],deep):obj[i];}}else{ret=obj;}}return ret;};u.errorToString=function(_136){if(!typeof _136.message=="undefined"){return _136.message;}else{if(!typeof _136.description=="undefined"){return _136.description;}else{return _136;}}};u.raise=function(_137,_138){if(_138){_137=_137+": "+u.errorToString(_138);}else{_137=u.errorToString(_137);}throw _138||new Error(_137);};u.keyList=function(obj){var ret=new t.ExtArray();for(k in obj){if(d.isString(k)){ret.push(k);}}ret.sort();return ret;};u.enumerate=function(arr){var ret=new t.ExtArray();for(var i=0;i<arr.length;i++){ret.push([i,arr[i]]);}return ret;};u.objToDict=function(obj){var ret=new t.Dict();ret.fromObject(obj);return ret;};})();(function(){var arr=Array.prototype;var d=dojo;arr.indexOf=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj){return i;}}return -1;};arr.remove=function(idx){return this.splice(idx,1);};arr.append=function(item){return this.push(item);};arr.extend=function(_146){d.forEach(_146,d.hitch(this,function(i){this.push(i);}));};})();(function(){var str=String.prototype;str.startswith=function(_149){return this.match("^"+_149)==_149;};str.endswith=function(_14a){return this.match(_14a+"$")==_14a;};str.contains=function(_14b){return this.match(_14b)!=null;};str.isdigit=function(base){if(this=="0"){return true;}else{var _14d=base||10;var val=parseInt(this,_14d);if((val===0)||(val.toString()=="NaN")){return false;}else{return true;}}};})();}if(!dojo._hasResource["agi.classes.Named"]){dojo._hasResource["agi.classes.Named"]=true;dojo.provide("agi.classes.Named");dojo.declare("agi.classes.Named",null,{toString:function(){var _id=this.id||"<NO ID>";return ["[",agi.util.getClassName(this),", id=",(this.id||"<NO ID>"),"]"].join("");}});}if(!dojo._hasResource["agi.classes.Identified"]){dojo._hasResource["agi.classes.Identified"]=true;dojo.provide("agi.classes.Identified");dojo.declare("agi.classes.Identified",[agi.classes.Named],{constructor:function(){this._getId();},_getId:function(){if(!this._isIdentified){this.id=agi.classes._idGen();agi.registry.add(this);this._isIdentified=true;}}});}if(!dojo._hasResource["agi.classes.Adopter"]){dojo._hasResource["agi.classes.Adopter"]=true;dojo.provide("agi.classes.Adopter");dojo.declare("agi.classes.Adopter",[agi.classes.Identified],{constructor:function(_150){if(dojo.isObject(_150)){dojo.mixin(this,_150);this.postMixInProperties();}},postMixInProperties:function(){return;}});}if(!dojo._hasResource["agi.classes.Controller"]){dojo._hasResource["agi.classes.Controller"]=true;dojo.provide("agi.classes.Controller");dojo.declare("agi.classes.Controller",[agi.classes.Adopter],function(){var self={};dojo.mixin(self,{__culprit__:"$Author: dbuch $"});return self;}());}if(!dojo._hasResource["agi.classes._Mixin"]){dojo._hasResource["agi.classes._Mixin"]=true;dojo.provide("agi.classes._Mixin");dojo.declare("agi.classes._Mixin",[agi.classes.Controller],{__culprit__:"$Author: dbuch $"});}if(!dojo._hasResource["agi.flash.HomepageMixin"]){dojo._hasResource["agi.flash.HomepageMixin"]=true;dojo.provide("agi.flash.HomepageMixin");dojo.declare("agi.flash.HomepageMixin",[agi.classes._Mixin],{__culprit__:"$Author$",constructor:function(){this.initCorpAd();},initCorpAd:function(){if(!dojo.byId("agi-ad3")){return;}var fo3={movie:imghost+"/agbeta/ecards/"+flashCorpAd,id:"flash_admodule",name:"flash_admodule",width:"300",height:"128",swliveconnect:"true",majorversion:"8",build:"0",allowscriptaccess:"always",wmode:"opaque"};UFO.create(fo3,"agi-ad3","true");}});}if(!dojo._hasResource["bma.controllers.StandardPage"]){dojo._hasResource["bma.controllers.StandardPage"]=true;dojo.provide("bma.controllers.StandardPage");dojo.declare("bma.controllers.StandardPage",[agi.classes.Controller],{constructor:function(){}});}if(!dojo._hasResource["agi.widget.Carousel"]){dojo._hasResource["agi.widget.Carousel"]=true;dojo.provide("agi.widget.Carousel");dojo.declare("agi.widget.Carousel",[agi.classes.Identified],{items:[],width:0,container_width:0,node:null,position:0,min_left:0,left_button:null,right_button:null,wrap:false,flip_count:1,view_count:3,row_count:1,page:1,pages:1,class_base:null,moving:false,hide_buttons:false,ANIMATION_DURATION:700,constructor:function(_153){if(typeof _153=="object"){dojo.mixin(this,_153);}else{this.legacy_args.apply(this,arguments);}var _154=dojo.query("."+this.class_base+"-container");if(_154.length==1){this.node=_154[0];}else{return;}try{this.left_button=dojo.query("."+this.class_base+"-left")[0];dojo._setOpacity(this.left_button,0.5);}catch(e){}try{this.right_button=dojo.query("."+this.class_base+"-right")[0];}catch(e){}this.items=dojo.query("> li",this.node);this.pages=Math.ceil((this.items.length/this.row_count)/this.flip_count);this.width=dojo.marginBox(this.items[0]).w;if(dojo.isSafari){var css=dojo.getComputedStyle(this.items[0]);var _156=dojo._toPixelValue(this.items[0],css.marginRight);var _157=dojo._toPixelValue(this.items[0],css.marginLeft);this.width+=_156-_157;}if(this.width==0){var _158=dojo.style(this.items[0]);this.width=this.make_int(_158.width)+this.make_int(_158.marginLeft)+this.make_int(_158.marginRight)+this.make_int(_158.paddingLeft)+this.make_int(_158.paddingRight);}if(this.items.length<=this.view_count&&this.hide_buttons){dojo.style(this.left_button,{visibility:"hidden"});dojo.style(this.right_button,{visibility:"hidden"});}else{dojo.style(this.left_button,{visibility:"visible"});dojo.style(this.right_button,{visibility:"visible"});}this.min_left=-1*this.width*(this.items.length/this.row_count-this.view_count);this.min_left=(Math.min(this.min_left,0));var _159=(this.width*this.items.length+50)/this.row_count;dojo.style(this.node,{width:_159+"px"});this.container_width=_159;if(this.left_button){dojo.style(this.left_button,{cursor:"pointer"});dojo.connect(this.left_button,"onclick",this,this.scroll_left);}if(this.right_button){dojo.style(this.right_button,{cursor:"pointer"});dojo.connect(this.right_button,"onclick",this,this.scroll_right);}var _15a=this.items.length%this.view_count;var _15b=0;if(_15a>0){_15b=this.view_count-_15a;}for(var i=0;i<_15b;i++){dojo.create("li",{className:this.items[0].className,style:"visibility: hidden;"},this.node);_159+=this.width;this.min_left-=this.width;}if(this.wrap&&this.items.length>this.view_count){for(var i=0;i<this.view_count;i++){var _15d=dojo.clone(this.items[i]);dojo.place(_15d,this.node);_159+=this.width;this.min_left-=this.width;}}dojo.style(this.node,{width:_159+"px"});this.reset();},legacy_args:function(_15e,_15f,_160,wrap,_162,_163){if(!_15f){this.view_count=3;}else{this.view_count=_15f;}if(!_160){this.flip_count=this.view_count;}else{this.flip_count=_160;}if(!wrap){this.wrap=false;}else{this.wrap=wrap;}if(!_162){this.hide_buttons=false;}else{this.hide_buttons=_162;}if(!_163){this.row_count=1;}else{this.row_count=_163;}this.class_base=_15e;},make_int:function(str){return str.replace(/\D/g,"")*1;},scroll_left:function(evt){if(evt!=null){dojo.stopEvent(evt);}if(this.moving||this.items.length<=this.view_count){return;}if(this.wrap&&this.position==0){this.position=this.min_left;dojo.style(this.node,{left:this.position+"px"});}if(this.position<0){this.scroll_animation(Math.min(0,this.position+(this.width*this.flip_count)));this.fix_pages(this.page-1);}},scroll_right:function(evt){if(evt!=null){dojo.stopEvent(evt);}if(this.moving||this.items.length<=this.view_count){return;}if(this.position>=this.min_left){this.scroll_animation(Math.max(this.min_left,this.position-(this.width*this.flip_count)));this.fix_pages(this.page+1);}},scroll_animation:function(_167,wrap){if(!wrap){wrap=false;}this.position=_167;this.fix_buttons();if(this.wrap&&(this.position==this.min_left)){on_end=dojo.hitch(this,this.reset);}else{on_end=dojo.hitch(this,function(){this.moving=false;});}dojo.anim(this.node,{left:_167},this.ANIMATION_DURATION,null,on_end);this.moving=true;},fix_buttons:function(){if(!this.wrap&&this.position==0){dojo._setOpacity(this.left_button,0.5);}else{dojo._setOpacity(this.left_button,1);}if(!this.wrap&&this.position==this.min_left){dojo._setOpacity(this.right_button,0.5);}else{dojo._setOpacity(this.right_button,1);}},fix_pages:function(page){this.page=Math.max(0,Math.min(page,this.pages));var _16a=this.class_base+"-pages";var _16b=dojo.query("li",_16a);_16b.removeClass("agi-scroll-on");_16b.addClass("agi-scroll-off");this.on_id="#agi-scroll-page-"+(this.page-1);this.on_node=dojo.query("#"+this.class_base+"-page-"+(this.page),_16a);this.on_node.addClass("agi-scroll-on");this.on_node.removeClass("agi-scroll-off");},reset:function(){this.moving=false;this.node.style.left="0px";this.position=0;this.fix_pages(1);this.fix_buttons();}});}if(!dojo._hasResource["bma.controllers.FacebookBirthday"]){dojo._hasResource["bma.controllers.FacebookBirthday"]=true;dojo.provide("bma.controllers.FacebookBirthday");dojo.declare("bma.controllers.FacebookBirthday",[bma.controllers.StandardPage],{fb_reminders:null,constructor:function(){dojo.subscribe("agi/facebook/reminders/show",dojo.hitch(this,this.facebook_carousel));},facebook_carousel:function(){var _16c={class_base:"agi-fb-birthday",view_count:4,flip_count:4,wrap:false,hide_buttons:false,row_count:1};if(agx.currentPage.facebookBirthdaySettings){dojo.mixin(_16c,agx.currentPage.facebookBirthdaySettings);}if(dojo.query(".agi-fb-birthday-container").length>0){this.fb_reminders=new agi.widget.Carousel(_16c);}}});}if(!dojo._hasResource["bma.controllers.Home"]){dojo._hasResource["bma.controllers.Home"]=true;dojo.provide("bma.controllers.Home");dojo.declare("bma.controllers.Home",[bma.controllers.FacebookBirthday],{newsletter:null,signup:null,newsletter_open:false,ANIMATION_DURATION:250,constructor:function(){}});}dojo.publish("/bma.layers.home/loaded/");

