/*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("pw.layers.core");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(_1){if(this._hash[_1.id]){throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered");}this._hash[_1.id]=_1;},remove:function(id){delete this._hash[id];},forEach:function(_3){for(var id in this._hash){_3(this._hash[id]);}},filter:function(_5){var _6=new dijit.WidgetSet();this.forEach(function(_7){if(_5(_7)){_6.add(_7);}});return _6;},byId:function(id){return this._hash[id];},byClass:function(_9){return this.filter(function(_a){return _a.declaredClass==_9;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_b){var id;do{id=_b+"_"+(_b in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_b]:dijit._widgetTypeCtr[_b]=0);}while(dijit.byId(id));return id;};dijit.findWidgets=function(_d){var _e=[];function getChildrenHelper(_f){var _10=dojo.isIE?_f.children:_f.childNodes,i=0,_12;while(_12=_10[i++]){if(_12.nodeType!=1){continue;}var _13=_12.getAttribute("widgetId");if(_13){var _14=dijit.byId(_13);_e.push(_14);}else{getChildrenHelper(_12);}}};getChildrenHelper(_d);return _e;};if(dojo.isIE){dojo.addOnWindowUnload(function(){dojo.forEach(dijit.findWidgets(dojo.body()),function(_15){if(_15.destroyRecursive){_15.destroyRecursive();}else{if(_15.destroy){_15.destroy();}}});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_17){return dijit.registry.byId(_17.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_18){while(_18){if(_18.getAttribute&&_18.getAttribute("widgetId")){return dijit.registry.byId(_18.getAttribute("widgetId"));}_18=_18.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_19){var _1a=dojo.style(_19);return (_1a.visibility!="hidden")&&(_1a.visibility!="collapsed")&&(_1a.display!="none")&&(dojo.attr(_19,"type")!="hidden");};dijit.isTabNavigable=function(_1b){if(dojo.hasAttr(_1b,"disabled")){return false;}var _1c=dojo.hasAttr(_1b,"tabindex");var _1d=dojo.attr(_1b,"tabindex");if(_1c&&_1d>=0){return true;}var _1e=_1b.nodeName.toLowerCase();if(((_1e=="a"&&dojo.hasAttr(_1b,"href"))||dijit._tabElements[_1e])&&(!_1c||_1d>=0)){return true;}return false;};dijit._getTabNavigable=function(_1f){var _20,_21,_22,_23,_24,_25;var _26=function(_27){dojo.query("> *",_27).forEach(function(_28){var _29=dijit._isElementShown(_28);if(_29&&dijit.isTabNavigable(_28)){var _2a=dojo.attr(_28,"tabindex");if(!dojo.hasAttr(_28,"tabindex")||_2a==0){if(!_20){_20=_28;}_21=_28;}else{if(_2a>0){if(!_22||_2a<_23){_23=_2a;_22=_28;}if(!_24||_2a>=_25){_25=_2a;_24=_28;}}}}if(_29&&_28.nodeName.toUpperCase()!="SELECT"){_26(_28);}});};if(dijit._isElementShown(_1f)){_26(_1f);}return {first:_20,last:_21,lowest:_22,highest:_24};};dijit.getFirstInTabbingOrder=function(_2b){var _2c=dijit._getTabNavigable(dojo.byId(_2b));return _2c.lowest?_2c.lowest:_2c.first;};dijit.getLastInTabbingOrder=function(_2d){var _2e=dijit._getTabNavigable(dojo.byId(_2d));return _2e.last?_2e.last:_2e.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 _31=["l","a","v","e"];cd.reverse();_31.reverse();dojo[_31.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(_32,_33){return agi.require("js."+_32,"js",_33);};agi.requireCss=function(_34,_35){return agi.require("css."+_34,"css",_35);};agi.require=function(_36,_37,_38){var _39=agi._loadedResources[_36];if(_39&&!_38){return _39;}_37=_37||"js";var _3a=agx.currentPage.imghost;var _3b=[_36.split(".").join("/"),_37].join(".");if(_3b.charAt(0)=="/"){_3b=_3b.substring(1);}var uri=[_3a,_3b].join("/");var tag=dojo.doc.createElement(agi._mimeMap[_37].tag);if(_37=="css"){tagi.rel=agi._mimeMap.css.rel;tagi.href=uri;}else{tagi.src=uri;tagi.type=agi._mimeMap[_37].type;}dojo.query("head")[0].appendChild(tag);agi._loadedResources[_36]=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(_40,_41){d.forEach(this._arrayMembers(),_40,_41);return this;},_arrayMembers:function(){var ret=[];for(var i=0;i<this.length;i++){ret.push(this[i]);}return ret;},every:function(_44,_45){return d.every(this._arrayMembers(),_44,_45);},some:function(_46,_47){return d.some(this._arrayMembers(),_46,_47);},map:function(_48,obj){return d.map(this._arrayMembers(),_48,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 _4e=new t.ExtArray();this.keys().forEach(d.hitch(this,function(i){_4e.push([i,this[i]]);}));return _4e;}});})();}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(_54){ret=[];if(d.isArray(_54)){for(x in _54){if(!Array.prototype[x]){ret.push([x,_54[x]]);}}}else{if(d.isString(_54)){for(x in _54){if(!String.prototype[x]){ret.push([x,_54[x]]);}}}else{d.forEach(_54,function(x){ret.push([x,_54[x]]);});}}return ret;};u.getClassName=function(_56){if(!_56.declaredClass){if(d.isString(_56)){return "String";}else{if(d.isArray(_56)||d.isArrayLike(_56)){return "Array";}else{if(d.isFunction(_56)){return "function";}else{if(d.isObject(_56)){return "Object";}}}}}else{var _57=_56.declaredClass.split(".");return _57[_57.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(_5a){return _5a.toString().replace(/"/g,"&quot;").replace(/&/g,"&amp;");};u.toPx=function(num){return num.toString()+"px";};u.posToString=function(_5c){var _5d=[];var _5e=["x","y","z","t","l","h","w","m","n","top","left","right","height","width","length","breadth","max","min","high","low","zIndex"];var _5f=function(pos,s){if(pos[s]){_5d.push(s+": "+pos[s]);}return;};for(i=0;i<_5e.length;i++){_5f(_5c,_5e[i]);}return "{"+_5d.join(", ")+"}";};u._debounce_waiting=false;u._setDebounceWaitingFalse=function(){u._debounce_waiting=false;};u.debounce=function(x,_63,_64){var _65=3000;if(_64){_65=_64*1000;}if(window.setDoPopAway){setDoPopAway(false);}if(u._debounce_waiting){if(_63){alert("Please wait while we process your request.");}return false;}else{u._debounce_waiting=true;setTimeout(u._setDebounceWaitingFalse,_65);return true;}};u.collection_as_array=u.collectionToArray=function(_66){var ret=[];d.forEach(_66,function(i){ret.push(i);});return ret;};u.extend_array=u.extendArray=function(_69,_6a){d.forEach(_6a,function(i){_69.push(i);});};u.product_id=u.getProdId=function(_6c){return "productw-"+_6c;};u.isUndef=function(_6d){return (_6d===undefined);};u.isDef=function(_6e){if(_6e){return true;}else{if(_6e===""||_6e===0){return true;}else{return false;}}};u.isNull=function(_6f){return (_6f===null);};u.queryOne=function(_70,_71){ret=d.query(_70,_71);if(ret.length<=0){return null;}else{return ret[0];}};u.query_one=u.q1=u.queryOne;u.getQueryVariable=function(_72,_73){var wv;if(webvars){wv=webvars;}if(_73){wv=d.queryToObject(_73);}else{if(!_73&&!wv){wv=d.queryToQbect(window.location.search.substring(1));}}return wv[_72];};u.get_query_variable=u.getQv=u.getQueryVariable;u.truncate=function(_75,_76,_77){_77=_77?_77.toLowerCase():"left";if(_75.length>_76){var _78=0;var ret=_75;if(_77=="right"){ret=_75.substring(_75.length-_76);ret="..."+ret;}else{if(_77=="left"){ret=_75.substring(_78,_75.indexOf(" ",_76));ret+="...";}}}else{ret=_75;}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(_7a,_7b){_7a.options.length=0;var _7c=agi.html._buildOptions(_7b);var i=0;var o;for(o=0;o<_7c.length;o++){_7a.options[i]=_7c[o];i++;}};u._build_options=u._buildOptions=function(_7f){var _80=[];var _81=0;var t;for(t=0;t<_7f.length;t++){var _83=_7f[t][1];var _84=_7f[t][0];var o=new Option(_84,_83);_80[_80.length]=o;_81++;}if(_81>1){_80.unshift(new Option("",""));}return _80;};u.show=function(_86,_87){d.style(_86,{display:_87?_87:"block"});};u.hide=function(_88){d.style(_88,{display:"none"});};u.toggleDisplay=function(_89){if(d.style(_89,"display")=="none"){d.style(_89,{display:"block"});}else{d.style(_89,{display:"none"});}};u.toggle_block=function(_8a,_8b,_8c,_8d){if(_8c&&_8d){var _8e=_8a.className;if(_8e.indexOf(_8c)>-1){d.removeClass(_8a,_8c);d.addClass(_8a,_8d);}else{d.removeClass(_8a,_8d);d.addClass(_8a,_8c);}}u.toggleDisplay(_8b);};u.toggleBlock=u.toggle_block;u.get_position=u.getPosition=function(_8f){return d.coords(_8f,true);};u.getAbsolutePosition=function(_90){return d._abs(_90,true);};u.isUndefined=function(it){return ((typeof (it)=="undefined")&&(it===undefined));};u.getNameInObj=function(ns,_93){if(!ns){ns=d.global;}for(var x in ns){if(ns[x]===_93){return x.toString();}}return null;};u.forward=function(_95){return function(){return this[_95].apply(this,arguments);};};u.shallowCopy=function(obj,_97){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]=_97?u.shallowCopy(obj[i],_97):obj[i];}}}else{if(d.lang.isArray(obj)){ret=[];for(i=0;i<obj.length;i++){ret[i]=_97?u.shallowCopy(obj[i],_97):obj[i];}}else{ret=obj;}}return ret;};u.errorToString=function(_9a){if(!typeof _9a.message=="undefined"){return _9a.message;}else{if(!typeof _9a.description=="undefined"){return _9a.description;}else{return _9a;}}};u.raise=function(_9b,_9c){if(_9c){_9b=_9b+": "+u.errorToString(_9c);}else{_9b=u.errorToString(_9b);}throw _9c||new Error(_9b);};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(_a9){return this.push(_a9);};arr.extend=function(_aa){d.forEach(_aa,d.hitch(this,function(i){this.push(i);}));};})();(function(){var str=String.prototype;str.startswith=function(_ad){return this.match("^"+_ad)==_ad;};str.endswith=function(_ae){return this.match(_ae+"$")==_ae;};str.contains=function(_af){return this.match(_af)!=null;};str.isdigit=function(_b0){if(this=="0"){return true;}else{var _b1=_b0||10;var val=parseInt(this,_b1);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.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,ANIMATION_DURATION:700,constructor:function(_b4,_b5,_b6,_b7,_b8,_b9){if(!_b5){this.view_count=3;}else{this.view_count=_b5;}if(!_b6){this.flip_count=this.view_count;}else{this.flip_count=_b6;}if(!_b7){this.wrap=false;}else{this.wrap=_b7;}if(!_b8){_b8=false;}if(!_b9){this.row_count=1;}else{this.row_count=_b9;}this.class_base=_b4;var _ba=dojo.query("."+_b4+"-container");if(_ba.length==1){this.node=_ba[0];}else{return;}try{this.left_button=dojo.query("."+_b4+"-left")[0];dojo._setOpacity(this.left_button,0.5);}catch(e){}try{this.right_button=dojo.query("."+_b4+"-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 _bc=dojo._toPixelValue(this.items[0],css.marginRight);var _bd=dojo._toPixelValue(this.items[0],css.marginLeft);this.width+=_bc-_bd;}if(this.width==0){var _be=dojo.style(this.items[0]);this.width=this.make_int(_be.width)+this.make_int(_be.marginLeft)+this.make_int(_be.marginRight)+this.make_int(_be.paddingLeft)+this.make_int(_be.paddingRight);}if(this.items.length<=this.view_count&&_b8){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 _bf=(this.width*this.items.length+50)/this.row_count;dojo.style(this.node,{width:_bf+"px"});this.container_width=_bf;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 _c0=this.items.length%this.view_count;var _c1=0;if(_c0>0){_c1=this.view_count-_c0;}for(var i=0;i<_c1;i++){dojo.create("li",{className:this.items[0].className,style:"visibility: hidden;"},this.node);_bf+=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 _c3=dojo.clone(this.items[i]);dojo.place(_c3,this.node);_bf+=this.width;this.min_left-=this.width;}}dojo.style(this.node,{width:_bf+"px"});this.reset();},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(_c7,_c8){if(!_c8){_c8=false;}this.position=_c7;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:_c7},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(_c9){this.page=Math.max(0,Math.min(_c9,this.pages));var _ca=this.class_base+"-pages";var _cb=dojo.query("li",_ca);_cb.removeClass("agi-scroll-on");_cb.addClass("agi-scroll-off");this.on_id="#agi-scroll-page-"+(this.page-1);this.on_node=dojo.query("#"+this.class_base+"-page-"+(this.page),_ca);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["dojox.string.Builder"]){dojo._hasResource["dojox.string.Builder"]=true;dojo.provide("dojox.string.Builder");dojox.string.Builder=function(str){var b="";this.length=0;this.append=function(s){if(arguments.length>1){var tmp="",l=arguments.length;switch(l){case 9:tmp=""+arguments[8]+tmp;case 8:tmp=""+arguments[7]+tmp;case 7:tmp=""+arguments[6]+tmp;case 6:tmp=""+arguments[5]+tmp;case 5:tmp=""+arguments[4]+tmp;case 4:tmp=""+arguments[3]+tmp;case 3:tmp=""+arguments[2]+tmp;case 2:b+=""+arguments[0]+arguments[1]+tmp;break;default:var i=0;while(i<arguments.length){tmp+=arguments[i++];}b+=tmp;}}else{b+=s;}this.length=b.length;return this;};this.concat=function(s){return this.append.apply(this,arguments);};this.appendArray=function(_d3){return this.append.apply(this,_d3);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_d4,_d5){b=b.replace(_d4,_d5);this.length=b.length;return this;};this.remove=function(_d6,len){if(len===undefined){len=b.length;}if(len==0){return this;}b=b.substr(0,_d6)+b.substr(_d6+len);this.length=b.length;return this;};this.insert=function(_d8,str){if(_d8==0){b=str+b;}else{b=b.slice(0,_d8)+str+b.slice(_d8);}this.length=b.length;return this;};this.toString=function(){return b;};if(str){this.append(str);}};}if(!dojo._hasResource["dojox.string.tokenize"]){dojo._hasResource["dojox.string.tokenize"]=true;dojo.provide("dojox.string.tokenize");dojox.string.tokenize=function(str,re,_dc,_dd){var _de=[];var _df,_e0,_e1=0;while(_df=re.exec(str)){_e0=str.slice(_e1,re.lastIndex-_df[0].length);if(_e0.length){_de.push(_e0);}if(_dc){if(dojo.isOpera){var _e2=_df.slice(0);while(_e2.length<_df.length){_e2.push(null);}_df=_e2;}var _e3=_dc.apply(_dd,_df.slice(1).concat(_de.length));if(typeof _e3!="undefined"){_de.push(_e3);}}_e1=re.lastIndex;}_e0=str.slice(_e1);if(_e0.length){_de.push(_e0);}return _de;};}if(!dojo._hasResource["dojox.dtl._base"]){dojo._hasResource["dojox.dtl._base"]=true;dojo.provide("dojox.dtl._base");dojo.experimental("dojox.dtl");(function(){var dd=dojox.dtl;dd.TOKEN_BLOCK=-1;dd.TOKEN_VAR=-2;dd.TOKEN_COMMENT=-3;dd.TOKEN_TEXT=3;dd._Context=dojo.extend(function(_e5){dojo._mixin(this,_e5||{});this._dicts=[];},{push:function(){var _e6=this;var _e7=dojo.delegate(this);_e7.pop=function(){return _e6;};return _e7;},pop:function(){throw new Error("pop() called on empty Context");},get:function(key,_e9){if(typeof this[key]!="undefined"){return this._normalize(this[key]);}for(var i=0,_eb;_eb=this._dicts[i];i++){if(typeof _eb[key]!="undefined"){return this._normalize(_eb[key]);}}return _e9;},_normalize:function(_ec){if(_ec instanceof Date){_ec.year=_ec.getFullYear();_ec.month=_ec.getMonth()+1;_ec.day=_ec.getDate();_ec.date=_ec.year+"-"+("0"+_ec.month).slice(-2)+"-"+("0"+_ec.day).slice(-2);_ec.hour=_ec.getHours();_ec.minute=_ec.getMinutes();_ec.second=_ec.getSeconds();_ec.microsecond=_ec.getMilliseconds();}return _ec;},update:function(_ed){var _ee=this.push();if(_ed){dojo._mixin(this,_ed);}return _ee;}});var _ef=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _f0=/\s+/g;var _f1=function(_f2,_f3){_f2=_f2||_f0;if(!(_f2 instanceof RegExp)){_f2=new RegExp(_f2,"g");}if(!_f2.global){throw new Error("You must use a globally flagged RegExp with split "+_f2);}_f2.exec("");var _f4,_f5=[],_f6=0,i=0;while(_f4=_f2.exec(this)){_f5.push(this.slice(_f6,_f2.lastIndex-_f4[0].length));_f6=_f2.lastIndex;if(_f3&&(++i>_f3-1)){break;}}_f5.push(this.slice(_f6));return _f5;};dd.Token=function(_f8,_f9){this.token_type=_f8;this.contents=new String(dojo.trim(_f9));this.contents.split=_f1;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_fa){var bit,_fc=[],i=0;_fa=_fa||999;while(i++<_fa&&(bit=_ef.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_fc.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_fc.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_fc.push(bit);}}}return _fc;};var ddt=dd.text={_get:function(_ff,name,_101){var _102=dd.register.get(_ff,name.toLowerCase(),_101);if(!_102){if(!_101){throw new Error("No tag found for "+name);}return null;}var fn=_102[1];var _104=_102[2];var _105;if(fn.indexOf(":")!=-1){_105=fn.split(":");fn=_105.pop();}dojo["require"](_104);var _106=dojo.getObject(_104);return _106[fn||name]||_106[name+"_"]||_106[fn+"_"];},getTag:function(name,_108){return ddt._get("tag",name,_108);},getFilter:function(name,_10a){return ddt._get("filter",name,_10a);},getTemplate:function(file){return new dd.Template(ddt.getTemplateString(file));},getTemplateString:function(file){return dojo._getText(file.toString())||"";},_resolveLazy:function(_10d,sync,json){if(sync){if(json){return dojo.fromJson(dojo._getText(_10d))||{};}else{return dd.text.getTemplateString(_10d);}}else{return dojo.xhrGet({handleAs:(json)?"json":"text",url:_10d});}},_resolveTemplateArg:function(arg,sync){if(ddt._isTemplate(arg)){if(!sync){var d=new dojo.Deferred();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,sync);},_isTemplate:function(arg){return (typeof arg=="undefined")||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));},_resolveContextArg:function(arg,sync){if(arg.constructor==Object){if(!sync){var d=new dojo.Deferred;d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,sync,true);},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){return dojox.string.tokenize(str,ddt._re,ddt._parseDelims);},_parseDelims:function(varr,load,tag){if(varr){return [dd.TOKEN_VAR,varr];}else{if(load){var _11b=dojo.trim(tag).split(/\s+/g);for(var i=0,part;part=_11b[i];i++){dojo["require"](part);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=dojo.extend(function(_11e,_11f){var str=_11f?_11e:ddt._resolveTemplateArg(_11e,true)||"";var _121=ddt.tokenize(str);var _122=new dd._Parser(_121);this.nodelist=_122.parse();},{update:function(node,_124){return ddt._resolveContextArg(_124).addCallback(this,function(_125){var _126=this.render(new dd._Context(_125));if(node.forEach){node.forEach(function(item){item.innerHTML=_126;});}else{dojo.byId(node).innerHTML=_126;}return this;});},render:function(_128,_129){_129=_129||this.getBuffer();_128=_128||new dd._Context({});return this.nodelist.render(_128,_129)+"";},getBuffer:function(){return new dojox.string.Builder();}});var qfRe=/\{\{\s*(.+?)\s*\}\}/g;dd.quickFilter=function(str){if(!str){return new dd._NodeList();}if(str.indexOf("{%")==-1){return new dd._QuickNodeList(dojox.string.tokenize(str,qfRe,function(_12c){return new dd._Filter(_12c);}));}};dd._QuickNodeList=dojo.extend(function(_12d){this.contents=_12d;},{render:function(_12e,_12f){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_12f=_12f.concat(this.contents[i].resolve(_12e));}else{_12f=_12f.concat(this.contents[i]);}}return _12f;},dummyRender:function(_132){return this.render(_132,dd.Template.prototype.getBuffer()).toString();},clone:function(_133){return this;}});dd._Filter=dojo.extend(function(_134){if(!_134){throw new Error("Filter must be called with variable name");}this.contents=_134;var _135=this._cache[_134];if(_135){this.key=_135[0];this.filters=_135[1];}else{this.filters=[];dojox.string.tokenize(_134,this._re,this._tokenize,this);this._cache[_134]=[this.key,this.filters];}},{_cache:{},_re:/(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,_values:{0:"\"",1:"\"",2:"",8:"\""},_args:{4:"\"",5:"\"",6:"",7:"'"},_tokenize:function(){var pos,arg;for(var i=0,has=[];i<arguments.length;i++){has[i]=(typeof arguments[i]!="undefined"&&typeof arguments[i]=="string"&&arguments[i]);}if(!this.key){for(pos in this._values){if(has[pos]){this.key=this._values[pos]+arguments[pos]+this._values[pos];break;}}}else{for(pos in this._args){if(has[pos]){var _13a=arguments[pos];if(this._args[pos]=="'"){_13a=_13a.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_13a=_13a.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_13a];break;}}var fn=ddt.getFilter(arguments[3]);if(!dojo.isFunction(fn)){throw new Error(arguments[3]+" is not registered as a filter");}this.filters.push([fn,arg]);}},getExpression:function(){return this.contents;},resolve:function(_13c){if(typeof this.key=="undefined"){return "";}var str=this.resolvePath(this.key,_13c);for(var i=0,_13f;_13f=this.filters[i];i++){if(_13f[1]){if(_13f[1][0]){str=_13f[0](str,this.resolvePath(_13f[1][1],_13c));}else{str=_13f[0](str,_13f[1][1]);}}else{str=_13f[0](str);}}return str;},resolvePath:function(path,_141){var _142,_143;var _144=path.charAt(0);var last=path.slice(-1);if(!isNaN(parseInt(_144))){_142=(path.indexOf(".")==-1)?parseInt(path):parseFloat(path);}else{if(_144=="\""&&_144==last){_142=path.slice(1,-1);}else{if(path=="true"){return true;}if(path=="false"){return false;}if(path=="null"||path=="None"){return null;}_143=path.split(".");_142=_141.get(_143[0]);if(dojo.isFunction(_142)){var self=_141.getThis&&_141.getThis();if(_142.alters_data){_142="";}else{if(self){_142=_142.call(self);}else{_142="";}}}for(var i=1;i<_143.length;i++){var part=_143[i];if(_142){var base=_142;if(dojo.isObject(_142)&&part=="items"&&typeof _142[part]=="undefined"){var _14a=[];for(var key in _142){_14a.push([key,_142[key]]);}_142=_14a;continue;}if(_142.get&&dojo.isFunction(_142.get)&&_142.get.safe){_142=_142.get(part);}else{if(typeof _142[part]=="undefined"){_142=_142[part];break;}else{_142=_142[part];}}if(dojo.isFunction(_142)){if(_142.alters_data){_142="";}else{_142=_142.call(base);}}else{if(_142 instanceof Date){_142=dd._Context.prototype._normalize(_142);}}}else{return "";}}}}return _142;}});dd._TextNode=dd._Node=dojo.extend(function(obj){this.contents=obj;},{set:function(data){this.contents=data;return this;},render:function(_14e,_14f){return _14f.concat(this.contents);},isEmpty:function(){return !dojo.trim(this.contents);},clone:function(){return this;}});dd._NodeList=dojo.extend(function(_150){this.contents=_150||[];this.last="";},{push:function(node){this.contents.push(node);return this;},concat:function(_152){this.contents=this.contents.concat(_152);return this;},render:function(_153,_154){for(var i=0;i<this.contents.length;i++){_154=this.contents[i].render(_153,_154);if(!_154){throw new Error("Template must return buffer");}}return _154;},dummyRender:function(_156){return this.render(_156,dd.Template.prototype.getBuffer()).toString();},unrender:function(){return arguments[1];},clone:function(){return this;},rtrim:function(){while(1){i=this.contents.length-1;if(this.contents[i] instanceof dd._TextNode&&this.contents[i].isEmpty()){this.contents.pop();}else{break;}}return this;}});dd._VarNode=dojo.extend(function(str){this.contents=new dd._Filter(str);},{render:function(_158,_159){var str=this.contents.resolve(_158);if(!str.safe){str=dd._base.escape(""+str);}return _159.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};};dd._Parser=dojo.extend(function(_15b){this.contents=_15b;},{i:0,parse:function(_15c){var _15d={};_15c=_15c||[];for(var i=0;i<_15c.length;i++){_15d[_15c[i]]=true;}var _15f=new dd._NodeList();while(this.i<this.contents.length){token=this.contents[this.i++];if(typeof token=="string"){_15f.push(new dd._TextNode(token));}else{var type=token[0];var text=token[1];if(type==dd.TOKEN_VAR){_15f.push(new dd._VarNode(text));}else{if(type==dd.TOKEN_BLOCK){if(_15d[text]){--this.i;return _15f;}var cmd=text.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_15f.push(fn(this,new dd.Token(type,text)));}}}}}}if(_15c.length){throw new Error("Could not find closing tag(s): "+_15c.toString());}this.contents.length=0;return _15f;},next_token:function(){var _164=this.contents[this.i++];return new dd.Token(_164[0],_164[1]);},delete_first_token:function(){this.i++;},skip_past:function(_165){while(this.i<this.contents.length){var _166=this.contents[this.i++];if(_166[0]==dd.TOKEN_BLOCK&&_166[1]==_165){return;}}throw new Error("Unclosed tag found when looking for "+_165);},create_variable_node:function(expr){return new dd._VarNode(expr);},create_text_node:function(expr){return new dd._TextNode(expr||"");},getTemplate:function(file){return new dd.Template(file);}});dd.register={_registry:{attributes:[],tags:[],filters:[]},get:function(_16a,name){var _16c=dd.register._registry[_16a+"s"];for(var i=0,_16e;_16e=_16c[i];i++){if(typeof _16e[0]=="string"){if(_16e[0]==name){return _16e;}}else{if(name.match(_16e[0])){return _16e;}}}},getAttributeTags:function(){var tags=[];var _170=dd.register._registry.attributes;for(var i=0,_172;_172=_170[i];i++){if(_172.length==3){tags.push(_172);}else{var fn=dojo.getObject(_172[1]);if(fn&&dojo.isFunction(fn)){_172.push(fn);tags.push(_172);}}}return tags;},_any:function(type,base,_176){for(var path in _176){for(var i=0,fn;fn=_176[path][i];i++){var key=fn;if(dojo.isArray(fn)){key=fn[0];fn=fn[1];}if(typeof key=="string"){if(key.substr(0,5)=="attr:"){var attr=fn;if(attr.substr(0,5)=="attr:"){attr=attr.slice(5);}dd.register._registry.attributes.push([attr.toLowerCase(),base+"."+path+"."+attr]);}key=key.toLowerCase();}dd.register._registry[type].push([key,fn,base+"."+path]);}}},tags:function(base,_17d){dd.register._any("tags",base,_17d);},filters:function(base,_17f){dd.register._any("filters",base,_17f);}};var _180=/&/g;var _181=/</g;var _182=/>/g;var _183=/'/g;var _184=/"/g;dd._base.escape=function(_185){return dd.mark_safe(_185.replace(_180,"&amp;").replace(_181,"&lt;").replace(_182,"&gt;").replace(_184,"&quot;").replace(_183,"&#39;"));};dd._base.safe=function(_186){if(typeof _186=="string"){_186=new String(_186);}if(typeof _186=="object"){_186.safe=true;}return _186;};dd.mark_safe=dd._base.safe;dd.register.tags("dojox.dtl.tag",{"date":["now"],"logic":["if","for","ifequal","ifnotequal"],"loader":["extends","block","include","load","ssi"],"misc":["comment","debug","filter","firstof","spaceless","templatetag","widthratio","with"],"loop":["cycle","ifchanged","regroup"]});dd.register.filters("dojox.dtl.filter",{"dates":["date","time","timesince","timeuntil"],"htmlstrings":["linebreaks","linebreaksbr","removetags","striptags"],"integers":["add","get_digit"],"lists":["dictsort","dictsortreversed","first","join","length","length_is","random","slice","unordered_list"],"logic":["default","default_if_none","divisibleby","yesno"],"misc":["filesizeformat","pluralize","phone2numeric","pprint"],"strings":["addslashes","capfirst","center","cut","fix_ampersands","floatformat","iriencode","linenumbers","ljust","lower","make_list","rjust","slugify","stringformat","title","truncatewords","truncatewords_html","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap"]});dd.register.filters("dojox.dtl",{"_base":["escape","safe"]});})();}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _187=dojo.doc;if(_187.selection){var s=_187.selection;if(s.type=="Text"){return !s.createRange().htmlText.length;}else{return !s.createRange().length;}}else{var _189=dojo.global;var _18a=_189.getSelection();if(dojo.isString(_18a)){return !_18a;}else{return !_18a||_18a.isCollapsed||!_18a.toString();}}},getBookmark:function(){var _18b,_18c=dojo.doc.selection;if(_18c){var _18d=_18c.createRange();if(_18c.type.toUpperCase()=="CONTROL"){if(_18d.length){_18b=[];var i=0,len=_18d.length;while(i<len){_18b.push(_18d.item(i++));}}else{_18b=null;}}else{_18b=_18d.getBookmark();}}else{if(window.getSelection){_18c=dojo.global.getSelection();if(_18c){_18d=_18c.getRangeAt(0);_18b=_18d.cloneRange();}}else{}}return _18b;},moveToBookmark:function(_190){var _191=dojo.doc;if(_191.selection){var _192;if(dojo.isArray(_190)){_192=_191.body.createControlRange();dojo.forEach(_190,function(n){_192.addElement(n);});}else{_192=_191.selection.createRange();_192.moveToBookmark(_190);}_192.select();}else{var _194=dojo.global.getSelection&&dojo.global.getSelection();if(_194&&_194.removeAllRanges){_194.removeAllRanges();_194.addRange(_190);}else{}}},getFocus:function(menu,_196){return {node:menu&&dojo.isDescendant(dijit._curFocus,menu.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_196||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_196||dojo.global,dijit.getBookmark):null,openedForWindow:_196};},focus:function(_197){if(!_197){return;}var node="node" in _197?_197.node:_197,_199=_197.bookmark,_19a=_197.openedForWindow;if(node){var _19b=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_19b&&_19b.focus){try{_19b.focus();}catch(e){}}dijit._onFocusNode(node);}if(_199&&dojo.withGlobal(_19a||dojo.global,dijit.isCollapsed)){if(_19a){_19a.focus();}try{dojo.withGlobal(_19a||dojo.global,dijit.moveToBookmark,null,[_199]);}catch(e){}}},_activeStack:[],registerIframe:function(_19c){dijit.registerWin(_19c.contentWindow,_19c);},registerWin:function(_19d,_19e){dojo.connect(_19d.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(_19e||evt.target||evt.srcElement);});var doc=_19d.document;if(doc){if(dojo.isIE){doc.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(_19e||evt.srcElement);}});doc.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(_19e||evt.srcElement);});}else{doc.addEventListener("focus",function(evt){dijit._onFocusNode(_19e||evt.target);},true);doc.addEventListener("blur",function(evt){dijit._onBlurNode(_19e||evt.target);},true);}}doc=null;},_onBlurNode:function(node){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(node){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _1a7=[];try{while(node){if(node.dijitPopupParent){node=dijit.byId(node.dijitPopupParent).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===dojo.body()){break;}node=dijit.getDocumentWindow(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId");if(id){_1a7.unshift(id);}node=node.parentNode;}}}}catch(e){}dijit._setStack(_1a7);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}dijit._onTouchNode(node);if(node==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=node;dojo.publish("focusNode",[node]);},_setStack:function(_1aa){var _1ab=dijit._activeStack;dijit._activeStack=_1aa;for(var _1ac=0;_1ac<Math.min(_1ab.length,_1aa.length);_1ac++){if(_1ab[_1ac]!=_1aa[_1ac]){break;}}for(var i=_1ab.length-1;i>=_1ac;i--){var _1ae=dijit.byId(_1ab[i]);if(_1ae){_1ae._focused=false;_1ae._hasBeenBlurred=true;if(_1ae._onBlur){_1ae._onBlur();}if(_1ae._setStateClass){_1ae._setStateClass();}dojo.publish("widgetBlur",[_1ae]);}}for(i=_1ac;i<_1aa.length;i++){_1ae=dijit.byId(_1aa[i]);if(_1ae){_1ae._focused=true;if(_1ae._onFocus){_1ae._onFocus();}if(_1ae._setStateClass){_1ae._setStateClass();}dojo.publish("widgetFocus",[_1ae]);}}}});dojo.addOnLoad(function(){dijit.registerWin(window);});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_1af){this.pairs=[];this.returnWrappers=_1af||false;};dojo.extend(dojo.AdapterRegistry,{register:function(name,_1b1,wrap,_1b3,_1b4){this.pairs[((_1b4)?"unshift":"push")]([name,_1b1,wrap,_1b3]);},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2];}else{return pair[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _1ba=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _1bb=dojo._docScroll();return {w:_1ba.clientWidth,h:_1ba.clientHeight,l:_1bb.x,t:_1bb.y};};dijit.placeOnScreen=function(node,pos,_1be,_1bf){var _1c0=dojo.map(_1be,function(_1c1){var c={corner:_1c1,pos:{x:pos.x,y:pos.y}};if(_1bf){c.pos.x+=_1c1.charAt(1)=="L"?_1bf.x:-_1bf.x;c.pos.y+=_1c1.charAt(0)=="T"?_1bf.y:-_1bf.y;}return c;});return dijit._place(node,_1c0);};dijit._place=function(node,_1c4,_1c5){var view=dijit.getViewport();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(node);}var best=null;dojo.some(_1c4,function(_1c8){var _1c9=_1c8.corner;var pos=_1c8.pos;if(_1c5){_1c5(node,_1c8.aroundCorner,_1c9);}var _1cb=node.style;var _1cc=_1cb.display;var _1cd=_1cb.visibility;_1cb.visibility="hidden";_1cb.display="";var mb=dojo.marginBox(node);_1cb.display=_1cc;_1cb.visibility=_1cd;var _1cf=(_1c9.charAt(1)=="L"?pos.x:Math.max(view.l,pos.x-mb.w)),_1d0=(_1c9.charAt(0)=="T"?pos.y:Math.max(view.t,pos.y-mb.h)),endX=(_1c9.charAt(1)=="L"?Math.min(view.l+view.w,_1cf+mb.w):pos.x),endY=(_1c9.charAt(0)=="T"?Math.min(view.t+view.h,_1d0+mb.h):pos.y),_1d3=endX-_1cf,_1d4=endY-_1d0,_1d5=(mb.w-_1d3)+(mb.h-_1d4);if(best==null||_1d5<best.overflow){best={corner:_1c9,aroundCorner:_1c8.aroundCorner,x:_1cf,y:_1d0,w:_1d3,h:_1d4,overflow:_1d5};}return !_1d5;});node.style.left=best.x+"px";node.style.top=best.y+"px";if(best.overflow&&_1c5){_1c5(node,best.aroundCorner,best.corner);}return best;};dijit.placeOnScreenAroundNode=function(node,_1d7,_1d8,_1d9){_1d7=dojo.byId(_1d7);var _1da=_1d7.style.display;_1d7.style.display="";var _1db=_1d7.offsetWidth;var _1dc=_1d7.offsetHeight;var _1dd=dojo.coords(_1d7,true);_1d7.style.display=_1da;return dijit._placeOnScreenAroundRect(node,_1dd.x,_1dd.y,_1db,_1dc,_1d8,_1d9);};dijit.placeOnScreenAroundRectangle=function(node,_1df,_1e0,_1e1){return dijit._placeOnScreenAroundRect(node,_1df.x,_1df.y,_1df.width,_1df.height,_1e0,_1e1);};dijit._placeOnScreenAroundRect=function(node,x,y,_1e5,_1e6,_1e7,_1e8){var _1e9=[];for(var _1ea in _1e7){_1e9.push({aroundCorner:_1ea,corner:_1e7[_1ea],pos:{x:x+(_1ea.charAt(1)=="L"?0:_1e5),y:y+(_1ea.charAt(0)=="T"?0:_1e6)}});}return dijit._place(node,_1e9,_1e8);};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(node,_1f0,_1f1,_1f2){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _1f5=[],_1f6=1000,_1f7=1;this.prepare=function(node){var s=node.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}dojo.body().appendChild(node);};this.open=function(args){var _1fb=args.popup,_1fc=args.orient||{"BL":"TL","TL":"BL"},_1fd=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_1f7++);var _1ff=dojo.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_1f6+_1f5.length,visibility:"hidden"}},dojo.body());dijit.setWaiRole(_1ff,"presentation");_1ff.style.left=_1ff.style.top="0px";if(args.parent){_1ff.dijitPopupParent=args.parent.id;}var s=_1fb.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_1ff.appendChild(_1fb.domNode);var _201=new dijit.BackgroundIframe(_1ff);var best=_1fd?dijit.placeOnScreenAroundElement(_1ff,_1fd,_1fc,_1fb.orient?dojo.hitch(_1fb,"orient"):null):dijit.placeOnScreen(_1ff,args,_1fc=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_1ff.style.visibility="visible";var _203=[];var _204=function(){for(var pi=_1f5.length-1;pi>0&&_1f5[pi].parent===_1f5[pi-1].widget;pi--){}return _1f5[pi];};_203.push(dojo.connect(_1ff,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){dojo.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _207=_204();if(_207&&_207.onCancel){_207.onCancel();}}}}));if(_1fb.onCancel){_203.push(dojo.connect(_1fb,"onCancel",null,args.onCancel));}_203.push(dojo.connect(_1fb,_1fb.onExecute?"onExecute":"onChange",null,function(){var _208=_204();if(_208&&_208.onExecute){_208.onExecute();}}));_1f5.push({wrapper:_1ff,iframe:_201,widget:_1fb,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_203});if(_1fb.onOpen){_1fb.onOpen(best);}return best;};this.close=function(_209){while(dojo.some(_1f5,function(elem){return elem.widget==_209;})){var top=_1f5.pop(),_20c=top.wrapper,_20d=top.iframe,_20e=top.widget,_20f=top.onClose;if(_20e.onClose){_20e.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_20e||!_20e.domNode){return;}this.prepare(_20e.domNode);_20d.destroy();dojo.destroy(_20c);if(_20f){_20f();}}};}();dijit._frames=new function(){var _210=[];this.pop=function(){var _211;if(_210.length){_211=_210.pop();_211.style.display="";}else{if(dojo.isIE){var burl=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var html="<iframe src='"+burl+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_211=dojo.doc.createElement(html);}else{_211=dojo.create("iframe");_211.src="javascript:\"\"";_211.className="dijitBackgroundIframe";}_211.tabIndex=-1;dojo.body().appendChild(_211);}return _211;};this.push=function(_214){_214.style.display="none";if(dojo.isIE){_214.style.removeExpression("width");_214.style.removeExpression("height");}_210.push(_214);};}();dijit.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(dojo.isIE<7||(dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _216=dijit._frames.pop();node.appendChild(_216);if(dojo.isIE){_216.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");_216.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");}this.iframe=_216;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(node){try{node=dojo.byId(node);var doc=dojo.doc;var body=dojo.body();var html=body.parentNode;if((!(dojo.isFF>=3||dojo.isIE||dojo.isWebKit)||node==body||node==html)&&(typeof node.scrollIntoView=="function")){node.scrollIntoView(false);return;}var ltr=dojo._isBodyLtr();var _21c=dojo.isIE>=8&&!_21d;var rtl=!ltr&&!_21c;var _21f=body;var _21d=doc.compatMode=="BackCompat";if(_21d){html._offsetWidth=html._clientWidth=body._offsetWidth=body.clientWidth;html._offsetHeight=html._clientHeight=body._offsetHeight=body.clientHeight;}else{if(dojo.isWebKit){body._offsetWidth=body._clientWidth=html.clientWidth;body._offsetHeight=body._clientHeight=html.clientHeight;}else{_21f=html;}html._offsetHeight=html.clientHeight;html._offsetWidth=html.clientWidth;}function isFixedPosition(_220){var ie=dojo.isIE;return ((ie<=6||(ie>=7&&_21d))?false:(dojo.style(_220,"position").toLowerCase()=="fixed"));};function addPseudoAttrs(_222){var _223=_222.parentNode;var _224=_222.offsetParent;if(_224==null||isFixedPosition(_222)){_224=html;_223=(_222==body)?html:null;}_222._offsetParent=_224;_222._parent=_223;var bp=dojo._getBorderExtents(_222);_222._borderStart={H:(_21c&&!ltr)?(bp.w-bp.l):bp.l,V:bp.t};_222._borderSize={H:bp.w,V:bp.h};_222._scrolledAmount={H:_222.scrollLeft,V:_222.scrollTop};_222._offsetSize={H:_222._offsetWidth||_222.offsetWidth,V:_222._offsetHeight||_222.offsetHeight};_222._offsetStart={H:(_21c&&!ltr)?_224.clientWidth-_222.offsetLeft-_222._offsetSize.H:_222.offsetLeft,V:_222.offsetTop};_222._clientSize={H:_222._clientWidth||_222.clientWidth,V:_222._clientHeight||_222.clientHeight};if(_222!=body&&_222!=html&&_222!=node){for(var dir in _222._offsetSize){var _227=_222._offsetSize[dir]-_222._clientSize[dir]-_222._borderSize[dir];var _228=_222._clientSize[dir]>0&&_227>0;if(_228){_222._offsetSize[dir]-=_227;if(dojo.isIE&&rtl&&dir=="H"){_222._offsetStart[dir]+=_227;}}}}};var _229=node;while(_229!=null){if(isFixedPosition(_229)){node.scrollIntoView(false);return;}addPseudoAttrs(_229);_229=_229._parent;}if(dojo.isIE&&node._parent){var _22a=node._offsetParent;node._offsetStart.H+=_22a._borderStart.H;node._offsetStart.V+=_22a._borderStart.V;}if(dojo.isIE>=7&&_21f==html&&rtl&&body._offsetStart&&body._offsetStart.H==0){var _22b=html.scrollWidth-html._offsetSize.H;if(_22b>0){body._offsetStart.H=-_22b;}}if(dojo.isIE<=6&&!_21d){html._offsetSize.H+=html._borderSize.H;html._offsetSize.V+=html._borderSize.V;}if(rtl&&body._offsetStart&&_21f==html&&html._scrolledAmount){var ofs=body._offsetStart.H;if(ofs<0){html._scrolledAmount.H+=ofs;body._offsetStart.H=0;}}_229=node;while(_229){var _22d=_229._parent;if(!_22d){break;}if(_22d.tagName=="TD"){var _22e=_22d._parent._parent._parent;if(_22d!=_229._offsetParent&&_22d._offsetParent!=_229._offsetParent){_22d=_22e;}}var _22f=_229._offsetParent==_22d;for(var dir in _229._offsetStart){var _231=dir=="H"?"V":"H";if(rtl&&dir=="H"&&(_22d!=html)&&(_22d!=body)&&(dojo.isIE||dojo.isWebKit)&&_22d._clientSize.H>0&&_22d.scrollWidth>_22d._clientSize.H){var _232=_22d.scrollWidth-_22d._clientSize.H;if(_232>0){_22d._scrolledAmount.H-=_232;}}if(_22d._offsetParent.tagName=="TABLE"){if(dojo.isIE){_22d._offsetStart[dir]-=_22d._offsetParent._borderStart[dir];_22d._borderStart[dir]=_22d._borderSize[dir]=0;}else{_22d._offsetStart[dir]+=_22d._offsetParent._borderStart[dir];}}if(dojo.isIE){_22d._offsetStart[dir]+=_22d._offsetParent._borderStart[dir];}var _233=_229._offsetStart[dir]-_22d._scrolledAmount[dir]-(_22f?0:_22d._offsetStart[dir])-_22d._borderStart[dir];var _234=_233+_229._offsetSize[dir]-_22d._offsetSize[dir]+_22d._borderSize[dir];var _235=(dir=="H")?"scrollLeft":"scrollTop";var _236=dir=="H"&&rtl;var _237=_236?-_234:_233;var _238=_236?-_233:_234;var _239=(_237*_238<=0)?0:Math[(_237<0)?"max":"min"](_237,_238);if(_239!=0){var _23a=_22d[_235];_22d[_235]+=(_236)?-_239:_239;var _23b=_22d[_235]-_23a;}if(_22f){_229._offsetStart[dir]+=_22d._offsetStart[dir];}_229._offsetStart[dir]-=_22d[_235];}_229._parent=_22d._parent;_229._offsetParent=_22d._offsetParent;}_22d=node;var next;while(_22d&&_22d.removeAttribute){next=_22d.parentNode;_22d.removeAttribute("_offsetParent");_22d.removeAttribute("_parent");_22d=next;}}catch(error){node.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo,html=d.doc.documentElement,ie=d.isIE,_240=d.isOpera,maj=Math.floor,ff=d.isFF,_243=d.boxModel.replace(/-/,""),_244={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_240,dj_opera8:maj(_240)==8,dj_opera9:maj(_240)==9,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};_244["dj_"+_243]=true;for(var p in _244){if(_244[p]){if(html.className){html.className+=" "+p;}else{html.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){html.className+=" dijitRtl";for(var p in _244){if(_244[p]){html.className+=" "+p+"-rtl";}}}});})();}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_248,node,_24a,obj,_24c,_24d){if(obj!=this._obj){this.stop();this._initialDelay=_24d||500;this._subsequentDelay=_24c||0.9;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_248,_24a);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(node,_24f,_250,_251,_252,_253){if(_24f.keyCode){_24f.charOrCode=_24f.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_24f.charCode){_24f.charOrCode=String.fromCharCode(_24f.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(node,"onkeypress",this,function(evt){if(evt.charOrCode==_24f.charOrCode&&(_24f.ctrlKey===undefined||_24f.ctrlKey==evt.ctrlKey)&&(_24f.altKey===undefined||_24f.altKey==evt.ctrlKey)&&(_24f.shiftKey===undefined||_24f.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_24f,_250,node,_251,_24f,_252,_253);}else{if(dijit.typematic._obj==_24f){dijit.typematic.stop();}}}),dojo.connect(node,"onkeyup",this,function(evt){if(dijit.typematic._obj==_24f){dijit.typematic.stop();}})];},addMouseListener:function(node,_257,_258,_259,_25a){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_257,node,_258,node,_259,_25a);}),dc(node,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_257,node,_258,node,_259,_25a);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_261,_262,_263,_264,_265,_266,_267){return this.addKeyListener(_262,_263,_264,_265,_266,_267).concat(this.addMouseListener(_261,_264,_265,_266,_267));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());var cs=dojo.getComputedStyle(div);if(cs){var _26a=cs.backgroundImage;var _26b=(cs.borderTopColor==cs.borderRightColor)||(_26a!=null&&(_26a=="none"||_26a=="url(invalid-url:)"));dojo[_26b?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(elem,role){var _26e=this.getWaiRole(elem);return role?(_26e.indexOf(role)>-1):(_26e.length>0);},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _272=dojo.attr(elem,"role")||"";if(dojo.isFF<3||!this._XhtmlRoles.test(_272)){dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);}else{if((" "+_272+" ").indexOf(" "+role+" ")<0){var _273=dojo.trim(_272.replace(this._XhtmlRoles,""));var _274=dojo.trim(_272.replace(_273,""));dojo.attr(elem,"role",_274+(_274?" ":"")+role);}}},removeWaiRole:function(elem,role){var _277=dojo.attr(elem,"role");if(!_277){return;}if(role){var _278=dojo.isFF<3?"wairole:"+role:role;var t=dojo.trim((" "+_277+" ").replace(" "+_278+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_27b){if(dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_27b);}return elem.hasAttribute?elem.hasAttribute("aria-"+_27b):!!elem.getAttribute("aria-"+_27b);},getWaiState:function(elem,_27d){if(dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_27d);}return elem.getAttribute("aria-"+_27d)||"";},setWaiState:function(elem,_27f,_280){if(dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_27f,_280);}else{elem.setAttribute("aria-"+_27f,_280);}},removeWaiState:function(elem,_282){if(dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_282);}else{elem.removeAttribute("aria-"+_282);}}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"connect",function(_283,_284){if(_283&&dojo.isFunction(_283._onConnect)){_283._onConnect(_284);}});dijit._connectOnUseEventHandler=function(_285){};(function(){var _286={};var _287=function(dc){if(!_286[dc]){var r=[];var _28a;var _28b=dojo.getObject(dc).prototype;for(var _28c in _28b){if(dojo.isFunction(_28b[_28c])&&(_28a=_28c.match(/^_set([a-zA-Z]*)Attr$/))&&_28a[1]){r.push(_28a[1].charAt(0).toLowerCase()+_28a[1].substr(1));}}_286[dc]=r;}return _286[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(_28d,_28e){this.create(_28d,_28e);},create:function(_28f,_290){this.srcNodeRef=dojo.byId(_290);this._connects=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_28f){this.params=_28f;dojo.mixin(this,_28f);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _292=this.srcNodeRef;if(_292&&_292.parentNode){_292.parentNode.replaceChild(this.domNode,_292);}for(attr in this.params){this._onConnect(attr);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _293=function(attr,_295){if((_295.params&&attr in _295.params)||_295[attr]){_295.attr(attr,_295[attr]);}};for(var attr in this.attributeMap){_293(attr,this);}dojo.forEach(_287(this.declaredClass),function(a){if(!(a in this.attributeMap)){_293(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_298){this.destroyDescendants(_298);this.destroy(_298);},destroy:function(_299){this.uninitialize();dojo.forEach(this._connects,function(_29a){dojo.forEach(_29a,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){if(w.destroy){w.destroy();}});this.destroyRendering(_299);dijit.registry.remove(this.id);},destroyRendering:function(_29c){if(this.bgIframe){this.bgIframe.destroy(_29c);delete this.bgIframe;}if(this.domNode){if(_29c){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_29c){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_29d){dojo.forEach(this.getChildren(),function(_29e){if(_29e.destroyRecursive){_29e.destroyRecursive(_29d);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_2a0){if(_2a0 in this._deferredConnects){var _2a1=this[this._deferredConnects[_2a0]||"domNode"];this.connect(_2a1,_2a0.toLowerCase(),_2a0);delete this._deferredConnects[_2a0];}},_setClassAttr:function(_2a2){var _2a3=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_2a3,this["class"]);this["class"]=_2a2;dojo.addClass(_2a3,_2a2);},_setStyleAttr:function(_2a4){var _2a5=this[this.attributeMap["style"]||"domNode"];if(dojo.isObject(_2a4)){dojo.style(_2a5,_2a4);}else{if(_2a5.style.cssText){_2a5.style.cssText+="; "+_2a4;}else{_2a5.style.cssText=_2a4;}}this["style"]=_2a4;},setAttribute:function(attr,_2a7){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_2a7);},_attrToDom:function(attr,_2a9){var _2aa=this.attributeMap[attr];dojo.forEach(dojo.isArray(_2aa)?_2aa:[_2aa],function(_2ab){var _2ac=this[_2ab.node||_2ab||"domNode"];var type=_2ab.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_2a9)){_2a9=dojo.hitch(this,_2a9);}if(/^on[A-Z][a-zA-Z]*$/.test(attr)){attr=attr.toLowerCase();}dojo.attr(_2ac,attr,_2a9);break;case "innerHTML":_2ac.innerHTML=_2a9;break;case "class":dojo.removeClass(_2ac,this[attr]);dojo.addClass(_2ac,_2a9);break;}},this);this[attr]=_2a9;},attr:function(name,_2af){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _2b2=this._getAttrNames(name);if(args==2){if(this[_2b2.s]){return this[_2b2.s](_2af)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_2af);}this[name]=_2af;}return this;}else{if(this[_2b2.g]){return this[_2b2.g]();}else{return this[name];}}},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){if(this.containerNode){var list=dojo.query("[widgetId]",this.containerNode);return list.map(dijit.byNode);}else{return [];}},getChildren:function(){if(this.containerNode){return dijit.findWidgets(this.containerNode);}else{return [];}},nodesWithKeyClick:["input","button"],connect:function(obj,_2b8,_2b9){var d=dojo;var dc=dojo.connect;var _2bc=[];if(_2b8=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){var m=d.hitch(this,_2b9);_2bc.push(dc(obj,"onkeydown",this,function(e){if(!d.isFF&&e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}else{if(e.keyCode==d.keys.SPACE){d.stopEvent(e);}}}),dc(obj,"onkeyup",this,function(e){if(e.keyCode==d.keys.SPACE&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));if(d.isFF){_2bc.push(dc(obj,"onkeypress",this,function(e){if(e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));}}_2b8="onclick";}_2bc.push(dc(obj,_2b8,this,_2b9));this._connects.push(_2bc);return _2bc;},disconnect:function(_2c1){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_2c1){dojo.forEach(_2c1,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_2c3,_2c4){if(_2c3["declaredClass"]&&_2c3["addChild"]){_2c3.addChild(this,_2c4);}else{dojo.place(this.domNode,_2c3,_2c4);}return this;}});})();}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_2ce,map,_2d0,_2d1){_2d1=_2d1||dojo.global;_2d0=(!_2d0)?function(v){return v;}:dojo.hitch(_2d1,_2d0);return _2ce.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_2d3,key,_2d5){var _2d6=dojo.getObject(key,false,map);if(_2d5){_2d6=dojo.getObject(_2d5,false,_2d1).call(_2d1,_2d6,key);}return _2d0(_2d6,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_2d9,_2da){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _2db=dojo.date.stamp._isoRegExp.exec(_2d9);var _2dc=null;if(_2db){_2db.shift();if(_2db[1]){_2db[1]--;}if(_2db[6]){_2db[6]*=1000;}if(_2da){_2da=new Date(_2da);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _2da["get"+prop]();}).forEach(function(_2de,_2df){if(_2db[_2df]===undefined){_2db[_2df]=_2de;}});}_2dc=new Date(_2db[0]||1970,_2db[1]||0,_2db[2]||1,_2db[3]||0,_2db[4]||0,_2db[5]||0,_2db[6]||0);var _2e0=0;var _2e1=_2db[7]&&_2db[7].charAt(0);if(_2e1!="Z"){_2e0=((_2db[8]||0)*60)+(Number(_2db[9])||0);if(_2e1!="-"){_2e0*=-1;}}if(_2e1){_2e0-=_2dc.getTimezoneOffset();}if(_2e0){_2dc.setTime(_2dc.getTime()+_2e0*60000);}}return _2dc;};dojo.date.stamp.toISOString=function(_2e2,_2e3){var _=function(n){return (n<10)?"0"+n:n;};_2e3=_2e3||{};var _2e6=[];var _2e7=_2e3.zulu?"getUTC":"get";var date="";if(_2e3.selector!="time"){var year=_2e2[_2e7+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_2e2[_2e7+"Month"]()+1),_(_2e2[_2e7+"Date"]())].join("-");}_2e6.push(date);if(_2e3.selector!="date"){var time=[_(_2e2[_2e7+"Hours"]()),_(_2e2[_2e7+"Minutes"]()),_(_2e2[_2e7+"Seconds"]())].join(":");var _2eb=_2e2[_2e7+"Milliseconds"]();if(_2e3.milliseconds){time+="."+(_2eb<100?"0":"")+_(_2eb);}if(_2e3.zulu){time+="Z";}else{if(_2e3.selector!="time"){var _2ec=_2e2.getTimezoneOffset();var _2ed=Math.abs(_2ec);time+=(_2ec>0?"-":"+")+_(Math.floor(_2ed/60))+":"+_(_2ed%60);}}_2e6.push(time);}return _2e6.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _2ef=d._scopeName+"Type";var qry="["+_2ef+"]";var _2f1=0,_2f2={};var _2f3=function(_2f4,_2f5){var nso=_2f5||_2f2;if(dojo.isIE){var cn=_2f4["__dojoNameCache"];if(cn&&nso[cn]===_2f4){return cn;}}var name;do{name="__"+_2f1++;}while(name in nso);nso[name]=_2f4;return name;};function val2type(_2f9){if(d.isString(_2f9)){return "string";}if(typeof _2f9=="number"){return "number";}if(typeof _2f9=="boolean"){return "boolean";}if(d.isFunction(_2f9)){return "function";}if(d.isArray(_2f9)){return "array";}if(_2f9 instanceof Date){return "date";}if(_2f9 instanceof d._Url){return "url";}return "object";};function str2obj(_2fa,type){switch(type){case "string":return _2fa;case "number":return _2fa.length?Number(_2fa):NaN;case "boolean":return typeof _2fa=="boolean"?_2fa:!(_2fa.toLowerCase()=="false");case "function":if(d.isFunction(_2fa)){_2fa=_2fa.toString();_2fa=d.trim(_2fa.substring(_2fa.indexOf("{")+1,_2fa.length-1));}try{if(_2fa.search(/[^\w\.]+/i)!=-1){_2fa=_2f3(new Function(_2fa),this);}return d.getObject(_2fa,false);}catch(e){return new Function();}case "array":return _2fa?_2fa.split(/\s*,\s*/):[];case "date":switch(_2fa){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_2fa);}case "url":return d.baseUrl+_2fa;default:return d.fromJson(_2fa);}};var _2fc={};function getClassInfo(_2fd){if(!_2fc[_2fd]){var cls=d.getObject(_2fd);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_2fd+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _2ff=cls.prototype;var _300={},_301={};for(var name in _2ff){if(name.charAt(0)=="_"){continue;}if(name in _301){continue;}var _303=_2ff[name];_300[name]=val2type(_303);}_2fc[_2fd]={cls:cls,params:_300};}return _2fc[_2fd];};this._functionFromScript=function(_304){var _305="";var _306="";var _307=_304.getAttribute("args");if(_307){d.forEach(_307.split(/\s*,\s*/),function(part,idx){_305+="var "+part+" = arguments["+idx+"]; ";});}var _30a=_304.getAttribute("with");if(_30a&&_30a.length){d.forEach(_30a.split(/\s*,\s*/),function(part){_305+="with("+part+"){";_306+="}";});}return new Function(_305+_304.innerHTML+_306);};this.instantiate=function(_30c,_30d){var _30e=[];_30d=_30d||{};d.forEach(_30c,function(node){if(!node){return;}var type=_2ef in _30d?_30d[_2ef]:node.getAttribute(_2ef);if(!type||!type.length){return;}var _311=getClassInfo(type),_312=_311.cls,ps=_312._noScript||_312.prototype._noScript;var _314={},_315=node.attributes;for(var name in _311.params){var item=name in _30d?{value:_30d[name],specified:true}:_315.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _318=item.value;switch(name){case "class":_318="className" in _30d?_30d.className:node.className;break;case "style":_318="style" in _30d?_30d.style:(node.style&&node.style.cssText);}var _319=_311.params[name];if(typeof _318=="string"){_314[name]=str2obj(_318,_319);}else{_314[name]=_318;}}if(!ps){var _31a=[],_31b=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_31c){var _31d=_31c.getAttribute("event"),type=_31c.getAttribute("type"),nf=d.parser._functionFromScript(_31c);if(_31d){if(type=="dojo/connect"){_31a.push({event:_31d,func:nf});}else{_314[_31d]=nf;}}else{_31b.push(nf);}});}var _31f=_312["markupFactory"];if(!_31f&&_312["prototype"]){_31f=_312.prototype["markupFactory"];}var _320=_31f?_31f(_314,node,_312):new _312(_314,node);_30e.push(_320);var _321=node.getAttribute("jsId");if(_321){d.setObject(_321,_320);}if(!ps){d.forEach(_31a,function(_322){d.connect(_320,_322.event,null,_322.func);});d.forEach(_31b,function(func){func.call(_320);});}});d.forEach(_30e,function(_324){if(_324&&_324.startup&&!_324._started&&(!_324.getParent||!_324.getParent())){_324.startup();}});return _30e;};this.parse=function(_325){var list=d.query(qry,_325);var _327=this.instantiate(list);return _327;};}();(function(){var _328=function(){if(dojo.config["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_328);}else{dojo._loaders.unshift(_328);}})();}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){var _32a=this.declaredClass,_32b=this;return dojo.string.substitute(tmpl,this,function(_32c,key){if(key.charAt(0)=="!"){_32c=dojo.getObject(key.substr(1),false,_32b);}if(typeof _32c=="undefined"){throw new Error(_32a+" template:"+key);}if(_32c==null){return "";}return key.charAt(0)=="!"?_32c:_32c.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _32e=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_32e)){node=dojo._toDom(this._stringRepl(_32e));}else{node=_32e.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var cw=(this._supportingWidgets=dojo.parser.parse(node));this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_333){var dest=this.containerNode;if(_333&&dest){while(_333.hasChildNodes()){dest.appendChild(_333.firstChild);}}},_attachTemplateNodes:function(_335,_336){_336=_336||function(n,p){return n.getAttribute(p);};var _339=dojo.isArray(_335)?_335:(_335.all||_335.getElementsByTagName("*"));var x=dojo.isArray(_335)?0:-1;for(;x<_339.length;x++){var _33b=(x==-1)?_335:_339[x];if(this.widgetsInTemplate&&_336(_33b,"dojoType")){continue;}var _33c=_336(_33b,"dojoAttachPoint");if(_33c){var _33d,_33e=_33c.split(/\s*,\s*/);while((_33d=_33e.shift())){if(dojo.isArray(this[_33d])){this[_33d].push(_33b);}else{this[_33d]=_33b;}}}var _33f=_336(_33b,"dojoAttachEvent");if(_33f){var _340,_341=_33f.split(/\s*,\s*/);var trim=dojo.trim;while((_340=_341.shift())){if(_340){var _343=null;if(_340.indexOf(":")!=-1){var _344=_340.split(":");_340=trim(_344[0]);_343=trim(_344[1]);}else{_340=trim(_340);}if(!_343){_343=_340;}this.connect(_33b,_340,_343);}}}var role=_336(_33b,"waiRole");if(role){dijit.setWaiRole(_33b,role);}var _346=_336(_33b,"waiState");if(_346){dojo.forEach(_346.split(/\s*,\s*/),function(_347){if(_347.indexOf("-")!=-1){var pair=_347.split("-");dijit.setWaiState(_33b,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_349,_34a,_34b){var _34c=dijit._Templated._templateCache;var key=_34a||_349;var _34e=_34c[key];if(_34e){if(!_34e.ownerDocument||_34e.ownerDocument==dojo.doc){return _34e;}dojo.destroy(_34e);}if(!_34a){_34a=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(_349)));}_34a=dojo.string.trim(_34a);if(_34b||_34a.match(/\$\{([^\}]+)\}/g)){return (_34c[key]=_34a);}else{return (_34c[key]=dojo._toDom(_34a));}};dijit._Templated._sanitizeTemplateString=function(_34f){if(_34f){_34f=_34f.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _350=_34f.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_350){_34f=_350[1];}}else{_34f="";}return _34f;};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _351=dijit._Templated._templateCache;for(var key in _351){var _353=_351[key];if(!isNaN(_353.nodeType)){dojo.destroy(_353);}delete _351[key];}});}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dojox.dtl._Templated"]){dojo._hasResource["dojox.dtl._Templated"]=true;dojo.provide("dojox.dtl._Templated");dojo.declare("dojox.dtl._Templated",dijit._Templated,{_dijitTemplateCompat:false,buildRendering:function(){var node;if(this.domNode&&!this._template){return;}if(!this._template){var t=this.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);if(t instanceof dojox.dtl.Template){this._template=t;}else{node=t;}}if(!node){var _356=dojo._toDom(this._template.render(new dojox.dtl._Context(this)));if(_356.nodeType!==1&&_356.nodeType!==3){for(var i=0,l=_356.childNodes.length;i<l;++i){node=_356.childNodes[i];if(node.nodeType==1){break;}}}else{node=_356;}}this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _359=dojo.parser.parse(node);this._attachTemplateNodes(_359,function(n,p){return n[p];});}if(this.domNode){dojo.place(node,this.domNode,"before");this.destroyDescendants();dojo.destroy(this.domNode);}this.domNode=node;this._fillContent(this.srcNodeRef);},_templateCache:{},getCachedTemplate:function(_35c,_35d,_35e){var _35f=this._templateCache;var key=_35d||_35c;if(_35f[key]){return _35f[key];}_35d=dojo.string.trim(_35d||dijit._Templated._sanitizeTemplateString(dojo._getText(_35c)));if(this._dijitTemplateCompat&&(_35e||_35d.match(/\$\{([^\}]+)\}/g))){_35d=this._stringRepl(_35d);}if(_35e||!_35d.match(/\{[{%]([^\}]+)[%}]\}/g)){return _35f[key]=dojo._toDom(_35d);}else{return _35f[key]=new dojox.dtl.Template(_35d);}},render:function(){this.buildRendering();}});}if(!dojo._hasResource["dojox.dtl.tag.logic"]){dojo._hasResource["dojox.dtl.tag.logic"]=true;dojo.provide("dojox.dtl.tag.logic");(function(){var dd=dojox.dtl;var ddt=dd.text;var ddtl=dd.tag.logic;ddtl.IfNode=dojo.extend(function(_364,_365,_366,type){this.bools=_364;this.trues=_365;this.falses=_366;this.type=type;},{render:function(_368,_369){var i,bool,_36c,_36d,_36e;if(this.type=="or"){for(i=0;bool=this.bools[i];i++){_36c=bool[0];_36d=bool[1];_36e=_36d.resolve(_368);if((_36e&&!_36c)||(_36c&&!_36e)){if(this.falses){_369=this.falses.unrender(_368,_369);}return (this.trues)?this.trues.render(_368,_369,this):_369;}}if(this.trues){_369=this.trues.unrender(_368,_369);}return (this.falses)?this.falses.render(_368,_369,this):_369;}else{for(i=0;bool=this.bools[i];i++){_36c=bool[0];_36d=bool[1];_36e=_36d.resolve(_368);if(_36e==_36c){if(this.trues){_369=this.trues.unrender(_368,_369);}return (this.falses)?this.falses.render(_368,_369,this):_369;}}if(this.falses){_369=this.falses.unrender(_368,_369);}return (this.trues)?this.trues.render(_368,_369,this):_369;}return _369;},unrender:function(_36f,_370){_370=(this.trues)?this.trues.unrender(_36f,_370):_370;_370=(this.falses)?this.falses.unrender(_36f,_370):_370;return _370;},clone:function(_371){var _372=(this.trues)?this.trues.clone(_371):null;var _373=(this.falses)?this.falses.clone(_371):null;return new this.constructor(this.bools,_372,_373,this.type);}});ddtl.IfEqualNode=dojo.extend(function(var1,var2,_376,_377,_378){this.var1=new dd._Filter(var1);this.var2=new dd._Filter(var2);this.trues=_376;this.falses=_377;this.negate=_378;},{render:function(_379,_37a){var var1=this.var1.resolve(_379);var var2=this.var2.resolve(_379);var1=(typeof var1!="undefined")?var1:"";var2=(typeof var1!="undefined")?var2:"";if((this.negate&&var1!=var2)||(!this.negate&&var1==var2)){if(this.falses){_37a=this.falses.unrender(_379,_37a,this);}return (this.trues)?this.trues.render(_379,_37a,this):_37a;}if(this.trues){_37a=this.trues.unrender(_379,_37a,this);}return (this.falses)?this.falses.render(_379,_37a,this):_37a;},unrender:function(_37d,_37e){return ddtl.IfNode.prototype.unrender.call(this,_37d,_37e);},clone:function(_37f){var _380=this.trues?this.trues.clone(_37f):null;var _381=this.falses?this.falses.clone(_37f):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_380,_381,this.negate);}});ddtl.ForNode=dojo.extend(function(_382,loop,_384,_385){this.assign=_382;this.loop=new dd._Filter(loop);this.reversed=_384;this.nodelist=_385;this.pool=[];},{render:function(_386,_387){var i,j,k;var _38b=false;var _38c=this.assign;for(k=0;k<_38c.length;k++){if(typeof _386[_38c[k]]!="undefined"){_38b=true;_386=_386.push();break;}}if(!_38b&&_386.forloop){_38b=true;_386=_386.push();}var _38d=this.loop.resolve(_386)||[];for(i=_38d.length;i<this.pool.length;i++){this.pool[i].unrender(_386,_387,this);}if(this.reversed){_38d=_38d.slice(0).reverse();}var _38e=dojo.isObject(_38d)&&!dojo.isArrayLike(_38d);var _38f=[];if(_38e){for(var key in _38d){_38f.push(_38d[key]);}}else{_38f=_38d;}var _391=_386.forloop={parentloop:_386.get("forloop",{})};var j=0;for(i=0;i<_38f.length;i++){var item=_38f[i];_391.counter0=j;_391.counter=j+1;_391.revcounter0=_38f.length-j-1;_391.revcounter=_38f.length-j;_391.first=!j;_391.last=(j==_38f.length-1);if(_38c.length>1&&dojo.isArrayLike(item)){if(!_38b){_38b=true;_386=_386.push();}var _393={};for(k=0;k<item.length&&k<_38c.length;k++){_393[_38c[k]]=item[k];}dojo.mixin(_386,_393);}else{_386[_38c[0]]=item;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_387));}_387=this.pool[j++].render(_386,_387,this);}delete _386.forloop;if(_38b){_386=_386.pop();}else{for(k=0;k<_38c.length;k++){delete _386[_38c[k]];}}return _387;},unrender:function(_394,_395){for(var i=0,pool;pool=this.pool[i];i++){_395=pool.unrender(_394,_395);}return _395;},clone:function(_398){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_398));}});dojo.mixin(ddtl,{if_:function(_399,_39a){var i,part,type,_39e=[],_39f=_39a.contents.split();_39f.shift();_39a=_39f.join(" ");_39f=_39a.split(" and ");if(_39f.length==1){type="or";_39f=_39a.split(" or ");}else{type="and";for(i=0;i<_39f.length;i++){if(_39f[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;part=_39f[i];i++){var not=false;if(part.indexOf("not ")==0){part=part.slice(4);not=true;}_39e.push([not,new dd._Filter(part)]);}var _3a1=_399.parse(["else","endif"]);var _3a2=false;var _39a=_399.next_token();if(_39a.contents=="else"){_3a2=_399.parse(["endif"]);_399.next_token();}return new ddtl.IfNode(_39e,_3a1,_3a2,type);},_ifequal:function(_3a3,_3a4,_3a5){var _3a6=_3a4.split_contents();if(_3a6.length!=3){throw new Error(_3a6[0]+" takes two arguments");}var end="end"+_3a6[0];var _3a8=_3a3.parse(["else",end]);var _3a9=false;var _3a4=_3a3.next_token();if(_3a4.contents=="else"){_3a9=_3a3.parse([end]);_3a3.next_token();}return new ddtl.IfEqualNode(_3a6[1],_3a6[2],_3a8,_3a9,_3a5);},ifequal:function(_3aa,_3ab){return ddtl._ifequal(_3aa,_3ab);},ifnotequal:function(_3ac,_3ad){return ddtl._ifequal(_3ac,_3ad,true);},for_:function(_3ae,_3af){var _3b0=_3af.contents.split();if(_3b0.length<4){throw new Error("'for' statements should have at least four words: "+_3af.contents);}var _3b1=_3b0[_3b0.length-1]=="reversed";var _3b2=(_3b1)?-3:-2;if(_3b0[_3b0.length+_3b2]!="in"){throw new Error("'for' tag received an invalid argument: "+_3af.contents);}var _3b3=_3b0.slice(1,_3b2).join(" ").split(/ *, */);for(var i=0;i<_3b3.length;i++){if(!_3b3[i]||_3b3[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_3af.contents);}}var _3b5=_3ae.parse(["endfor"]);_3ae.next_token();return new ddtl.ForNode(_3b3,_3b0[_3b0.length+_3b2+1],_3b1,_3b5);}});})();}if(!dojo._hasResource["agi.widget.HoverMenu"]){dojo._hasResource["agi.widget.HoverMenu"]=true;dojo.provide("agi.widget.HoverMenu");dojo.declare("agi.widget.HoverMenu",[agi.classes.Identified],{node:null,menu:null,menuCssSelector:"div",menu_opts:null,_bgIframe:null,cxn_handles:[],constructor:function(_3b6){_3b6=_3b6||{};dojo.mixin(this,_3b6);this.init();},init:function(){this.menu=dojo.byId(this.node);if(!this.menu){return;}this.menu_opts=dojo.query(this.menuCssSelector,this.menu)[0];this._bgIframe=new dijit.BackgroundIframe(this.menu_opts);this.cxn_handles.push(dojo.connect(this.menu,"onmouseover",dojo.hitch(this,this.showMenu)),true);this.cxn_handles.push(dojo.connect(this.menu,"onmouseout",dojo.hitch(this,this.hideMenu)),true);this.cxn_handles.push(dojo.connect(this.menu_opts,"onmouseover",dojo.hitch(this,this.showMenu)),true);this.cxn_handles.push(dojo.connect(this.menu_opts,"onmouseout",dojo.hitch(this,this.hideMenu)),true);},showMenu:function(evt){dojo.stopEvent(evt);dojo.addClass(this.menu,"over");dojo.addClass(this.menu_opts,"over");},hideMenu:function(evt){dojo.stopEvent(evt);dojo.removeClass(this.menu,"over");dojo.removeClass(this.menu_opts,"over");}});}if(!dojo._hasResource["agi.widget.ClearField"]){dojo._hasResource["agi.widget.ClearField"]=true;dojo.provide("agi.widget.ClearField");dojo.declare("agi.widget.ClearField",[agi.classes.Identified],{node:null,action:"onfocus",cxn_handles:null,constructor:function(_3b9){dojo.mixin(this,_3b9);this.cxn_handles=[];this.node=dojo.byId(this.node);this.default_value=this.node.value;this.initConnection();},initConnection:function(){this.cxn_handles.push(dojo.connect(this.node,this.action,dojo.hitch(this,this.clear)));dojo.connect(this.node,"onblur",dojo.hitch(this,this.restore));},isClearable:function(){return (this.node.value==this.default_value);},clear:function(evt){if(!this.isClearable()){return;}this.node.value="";dojo.forEach(this.cxn_handles,dojo.disconnect);},reset:function(){this.node.value=this.default_value;this.initConnection();},restore:function(){if(!this.node.value){this.reset();}}});}if(!dojo._hasResource["pw.popup"]){dojo._hasResource["pw.popup"]=true;dojo.provide("pw.popup");pw.popup.open=function(_3bb){var _3bc={url:"/",name:"pwpopup",toolbar:"no",location:"no",directories:"no",status:"no",menubar:"no",resizable:"no",copyhistory:"no",width:300,height:300,scrollbars:"no"};dojo.mixin(_3bc,_3bb);var _3bd=window.open(_3bc.url,_3bc.name,"toolbar="+_3bc.toolbar+","+"location="+_3bc.location+","+"status="+_3bc.status+","+"resizable="+_3bc.resizable+","+"copyhistory="+_3bc.copyhistory+","+"width="+_3bc.width+","+"height="+_3bc.height+","+"scrollbars="+_3bc.scrollbars);return _3bd;};pw.popup.help=function(url){pw.popup.open({url:url,name:"pwhelp",width:620,height:500,scrollbars:"yes"});return false;};pw.popup.livechat=function(){dojo.publish("pw/livechat/show");return false;};pw.popup.feedback=function(_3bf){settings={url:ahost+"/feedback",name:"pwfeedback",width:610,height:580,scrollbars:"yes"};dojo.mixin(settings,_3bf);pw.popup.open(settings);return false;};pw.popup.terms=function(){settings={url:ahost+"/about/tos-pop",name:"pwterms",width:764,height:580,scrollbars:"yes"};pw.popup.open(settings);return false;};pw.popup.cartPreview=function(_3c0){settings={name:"pwlargepreview",width:950,height:600,resizable:1,toolbar:0,location:0,scrollbars:1};dojo.mixin(settings,_3c0);pw.popup.open(settings);return false;};pw.popup.picad=function(){settings={url:ahost+"/header/picasaad",name:"picad",width:326,height:210,scrollbars:"no"};pw.popup.open(settings);return false;};pw.popup.currentCouponCodes=function(){settings={url:ahost+"/coupons/coupon-codes-pop",name:"pwcouponcodes",width:730,height:590,scrollbars:"yes"};pw.popup.open(settings);return false;};pw.popup.holidayshippingpop=function(){settings={url:ahost+"/shipping/holiday-pop",name:"pwholidayshipping",width:700,height:590,scrollbars:"yes"};pw.popup.open(settings);return false;};pw.popup.learnAboutPaypal=function(){pw.popup.open({url:ahost+"/checkout/paypal-pop",width:480,height:100});return false;};pw.popup.closeAndGo=function(url){window.opener.location.href=url;window.close();};}if(!dojo._hasResource["dojo.io.iframe"]){dojo._hasResource["dojo.io.iframe"]=true;dojo.provide("dojo.io.iframe");dojo.io.iframe={create:function(_3c2,_3c3,uri){if(window[_3c2]){return window[_3c2];}if(window.frames[_3c2]){return window.frames[_3c2];}var _3c5=null;var turi=uri;if(!turi){if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){}turi=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));}var _3c7=dojo.isIE?"<iframe name=\""+_3c2+"\" src=\""+turi+"\" onload=\""+_3c3+"\">":"iframe";_3c5=dojo.doc.createElement(_3c7);with(_3c5){name=_3c2;setAttribute("name",_3c2);id=_3c2;}dojo.body().appendChild(_3c5);window[_3c2]=_3c5;with(_3c5.style){if(!(dojo.isSafari<3)){position="absolute";}left=top="1px";height=width="1px";visibility="hidden";}if(!dojo.isIE){this.setSrc(_3c5,turi,true);_3c5.onload=new Function(_3c3);}return _3c5;},setSrc:function(_3c8,src,_3ca){try{if(!_3ca){if(dojo.isWebKit){_3c8.location=src;}else{frames[_3c8.name].location=src;}}else{var idoc;if(dojo.isIE||dojo.isWebKit>521){idoc=_3c8.contentWindow.document;}else{if(dojo.isSafari){idoc=_3c8.document;}else{idoc=_3c8.contentWindow;}}if(!idoc){_3c8.location=src;return;}else{idoc.location.replace(src);}}}catch(e){}},doc:function(_3cc){var doc=_3cc.contentDocument||(((_3cc.name)&&(_3cc.document)&&(document.getElementsByTagName("iframe")[_3cc.name].contentWindow)&&(document.getElementsByTagName("iframe")[_3cc.name].contentWindow.document)))||((_3cc.name)&&(document.frames[_3cc.name])&&(document.frames[_3cc.name].document))||null;return doc;},send:function(args){if(!this["_frame"]){this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");}var dfd=dojo._ioSetArgs(args,function(dfd){dfd.canceled=true;dfd.ioArgs._callNext();},function(dfd){var _3d2=null;try{var _3d3=dfd.ioArgs;var dii=dojo.io.iframe;var ifd=dii.doc(dii._frame);var _3d6=_3d3.handleAs;_3d2=ifd;if(_3d6!="html"){if(_3d6=="xml"){if(dojo.isIE){dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _3d7=(dii._frame.contentWindow.document).documentElement.innerText;_3d7=_3d7.replace(/>\s+</g,"><");_3d7=dojo.trim(_3d7);var _3d8={responseText:_3d7};_3d2=dojo._contentHandlers["xml"](_3d8);}}else{_3d2=ifd.getElementsByTagName("textarea")[0].value;if(_3d6=="json"){_3d2=dojo.fromJson(_3d2);}else{if(_3d6=="javascript"){_3d2=dojo.eval(_3d2);}}}}}catch(e){_3d2=e;}finally{_3d3._callNext();}return _3d2;},function(_3d9,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _3d9;});dfd.ioArgs._callNext=function(){if(!this["_calledNext"]){this._calledNext=true;dojo.io.iframe._currentDfd=null;dojo.io.iframe._fireNextRequest();}};this._dfdQueue.push(dfd);this._fireNextRequest();dojo._ioWatch(dfd,function(dfd){return !dfd.ioArgs["_hasError"];},function(dfd){return (!!dfd.ioArgs["_finished"]);},function(dfd){if(dfd.ioArgs._finished){dfd.callback(dfd);}else{dfd.errback(new Error("Invalid dojo.io.iframe request state"));}});return dfd;},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){try{if((this._currentDfd)||(this._dfdQueue.length==0)){return;}var dfd=this._currentDfd=this._dfdQueue.shift();var _3df=dfd.ioArgs;var args=_3df.args;_3df._contentToClean=[];var fn=dojo.byId(args["form"]);var _3e2=args["content"]||{};if(fn){if(_3e2){var _3e3=function(name,_3e5){var tn;if(dojo.isIE){tn=dojo.doc.createElement("<input type='hidden' name='"+name+"'>");}else{tn=dojo.doc.createElement("input");tn.type="hidden";tn.name=name;}tn.value=_3e5;fn.appendChild(tn);_3df._contentToClean.push(name);};for(var x in _3e2){var val=_3e2[x];if(dojo.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_3e3(x,val[i]);}}else{if(!fn[x]){_3e3(x,val);}else{fn[x].value=val;}}}}var _3ea=fn.getAttributeNode("action");var _3eb=fn.getAttributeNode("method");var _3ec=fn.getAttributeNode("target");if(args["url"]){_3df._originalAction=_3ea?_3ea.value:null;if(_3ea){_3ea.value=args.url;}else{fn.setAttribute("action",args.url);}}if(!_3eb||!_3eb.value){if(_3eb){_3eb.value=(args["method"])?args["method"]:"post";}else{fn.setAttribute("method",(args["method"])?args["method"]:"post");}}_3df._originalTarget=_3ec?_3ec.value:null;if(_3ec){_3ec.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;fn.submit();}else{var _3ed=args.url+(args.url.indexOf("?")>-1?"&":"?")+_3df.query;this.setSrc(this._frame,_3ed,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _3ef=dfd.ioArgs;var args=_3ef.args;var _3f1=dojo.byId(args.form);if(_3f1){var _3f2=_3ef._contentToClean;for(var i=0;i<_3f2.length;i++){var key=_3f2[i];for(var j=0;j<_3f1.childNodes.length;j++){var _3f6=_3f1.childNodes[j];if(_3f6.name==key){dojo.destroy(_3f6);break;}}}if(_3ef["_originalAction"]){_3f1.setAttribute("action",_3ef._originalAction);}if(_3ef["_originalTarget"]){_3f1.setAttribute("target",_3ef._originalTarget);_3f1.target=_3ef._originalTarget;}}_3ef._finished=true;}};}if(!dojo._hasResource["pw.io.iframe"]){dojo._hasResource["pw.io.iframe"]=true;dojo.provide("pw.io.iframe");pw.io.iframe={sendSecure:function(form,_3f8){if(typeof _3f8=="undefined"){var _3f8={};}if(typeof _3f8.load=="undefined"){_3f8.load="void";}if(typeof _3f8.error=="undefined"){_3f8.error="void";}if(typeof _3f8.timeout=="undefined"){_3f8.timeout=60;}_3f8.timeout=_3f8.timeout*1000;var form=dojo.byId(form);var _3f9=new Date().getTime();if(window.location.href.indexOf(shost)==0){var _3fa="securecallback"+_3f9;}else{if(window.location.href.indexOf(khost)==0){var _3fa="cachecallback"+_3f9;}else{var _3fa="callback"+_3f9;}}var _3fb="error"+_3f9;var _3fc="pw.io.iframe.timeout"+_3f9;pw.io.iframe[_3fb]=function(_3fd){pw.io.iframe[_3fa]=function(){};var _3fe=pw.io.iframe._get_function(_3fd);_3fe();};_3fc=setTimeout("pw.io.iframe."+_3fb+"('"+_3f8.error+"')",_3f8.timeout);_3f8.error="pw.io.iframe."+_3fb;pw.io.iframe[_3fa]=function(_3ff){clearTimeout(_3fc);var _400=pw.io.iframe._get_function(_3f8.load);_400(_3ff);};_3f8.callback="pw.io.iframe."+_3fa;_3f8.cachebust=_3f9;if(typeof form.pw_io_iframe_callback=="undefined"){dojo.create("input",{id:"pw_io_iframe_callback",type:"hidden",name:"callback"},form);}dojo.byId("pw_io_iframe_callback").value=_3f8.callback;var _401=dojo.io.iframe.send({url:form.action,method:form.method,form:form,handleAs:"html"});},_get_function:function(str){var _403=window;if(str.indexOf(".")==-1){return _403[str];}var _404=str.split(".");for(var i=0;i<_404.length;i++){_403=_403[_404[i]];}return _403;}};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_407){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_407&&_407.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_40b){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_40b);};dojo.regexp.group=function(_40e,_40f){return "("+(_40f?"?:":"")+_40e+")";};}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_410,_411,_412){_412=dojo.i18n.normalizeLocale(_412);var _413=_412.split("-");var _414=[_410,"nls",_411].join(".");var _415=dojo._loadedModules[_414];if(_415){var _416;for(var i=_413.length;i>0;i--){var loc=_413.slice(0,i).join("_");if(_415[loc]){_416=_415[loc];break;}}if(!_416){_416=_415.ROOT;}if(_416){var _419=function(){};_419.prototype=_416;return new _419();}}throw new Error("Bundle not found: "+_411+" in "+_410+" , locale="+_412);};dojo.i18n.normalizeLocale=function(_41a){var _41b=_41a?_41a.toLowerCase():dojo.locale;if(_41b=="root"){_41b="ROOT";}return _41b;};dojo.i18n._requireLocalization=function(_41c,_41d,_41e,_41f){var _420=dojo.i18n.normalizeLocale(_41e);var _421=[_41c,"nls",_41d].join(".");var _422="";if(_41f){var _423=_41f.split(",");for(var i=0;i<_423.length;i++){if(_420["indexOf"](_423[i])==0){if(_423[i].length>_422.length){_422=_423[i];}}}if(!_422){_422="ROOT";}}var _425=_41f?_422:_420;var _426=dojo._loadedModules[_421];var _427=null;if(_426){if(dojo.config.localizationComplete&&_426._built){return;}var _428=_425.replace(/-/g,"_");var _429=_421+"."+_428;_427=dojo._loadedModules[_429];}if(!_427){_426=dojo["provide"](_421);var syms=dojo._getModuleSymbols(_41c);var _42b=syms.concat("nls").join("/");var _42c;dojo.i18n._searchLocalePath(_425,_41f,function(loc){var _42e=loc.replace(/-/g,"_");var _42f=_421+"."+_42e;var _430=false;if(!dojo._loadedModules[_42f]){dojo["provide"](_42f);var _431=[_42b];if(loc!="ROOT"){_431.push(loc);}_431.push(_41d);var _432=_431.join("/")+".js";_430=dojo._loadPath(_432,null,function(hash){var _434=function(){};_434.prototype=_42c;_426[_42e]=new _434();for(var j in hash){_426[_42e][j]=hash[j];}});}else{_430=true;}if(_430&&_426[_42e]){_42c=_426[_42e];}else{_426[_42e]=_42c;}if(_41f){return true;}});}if(_41f&&_420!=_422){_426[_420.replace(/-/g,"_")]=_426[_422.replace(/-/g,"_")];}};(function(){var _436=dojo.config.extraLocale;if(_436){if(!_436 instanceof Array){_436=[_436];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_43a,_43b){req(m,b,_43a,_43b);if(_43a){return;}for(var i=0;i<_436.length;i++){req(m,b,_436[i],_43b);}};}})();dojo.i18n._searchLocalePath=function(_43d,down,_43f){_43d=dojo.i18n.normalizeLocale(_43d);var _440=_43d.split("-");var _441=[];for(var i=_440.length;i>0;i--){_441.push(_440.slice(0,i).join("-"));}_441.push(false);if(down){_441.reverse();}for(var j=_441.length-1;j>=0;j--){var loc=_441[j]||"ROOT";var stop=_43f(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_446,_447){function preload(_448){_448=dojo.i18n.normalizeLocale(_448);dojo.i18n._searchLocalePath(_448,true,function(loc){for(var i=0;i<_447.length;i++){if(_447[i]==loc){dojo["require"](_446+"_"+loc);return true;}}return false;});};preload();var _44b=dojo.config.extraLocale||[];for(var i=0;i<_44b.length;i++){preload(_44b[i]);}};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_44d,_44e){_44e=dojo.mixin({},_44e||{});var _44f=dojo.i18n.normalizeLocale(_44e.locale);var _450=dojo.i18n.getLocalization("dojo.cldr","number",_44f);_44e.customs=_450;var _451=_44e.pattern||_450[(_44e.type||"decimal")+"Format"];if(isNaN(_44d)||Math.abs(_44d)==Infinity){return null;}return dojo.number._applyPattern(_44d,_451,_44e);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_452,_453,_454){_454=_454||{};var _455=_454.customs.group;var _456=_454.customs.decimal;var _457=_453.split(";");var _458=_457[0];_453=_457[(_452<0)?1:0]||("-"+_458);if(_453.indexOf("%")!=-1){_452*=100;}else{if(_453.indexOf("‰")!=-1){_452*=1000;}else{if(_453.indexOf("¤")!=-1){_455=_454.customs.currencyGroup||_455;_456=_454.customs.currencyDecimal||_456;_453=_453.replace(/\u00a4{1,3}/,function(_459){var prop=["symbol","currency","displayName"][_459.length-1];return _454[prop]||_454.currency||"";});}else{if(_453.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _45b=dojo.number._numberPatternRE;var _45c=_458.match(_45b);if(!_45c){throw new Error("unable to find a number expression in pattern: "+_453);}if(_454.fractional===false){_454.places=0;}return _453.replace(_45b,dojo.number._formatAbsolute(_452,_45c[0],{decimal:_456,group:_455,places:_454.places,round:_454.round}));};dojo.number.round=function(_45d,_45e,_45f){var _460=10/(_45f||10);return (_460*+_45d).toFixed(_45e)/_460;};if((0.9).toFixed()==0){(function(){var _461=dojo.number.round;dojo.number.round=function(v,p,m){var d=Math.pow(10,-p||0),a=Math.abs(v);if(!v||a>=d||a*Math.pow(10,p+1)<5){d=0;}return _461(v,p,m)+(v>0?d:-d);};})();}dojo.number._formatAbsolute=function(_467,_468,_469){_469=_469||{};if(_469.places===true){_469.places=0;}if(_469.places===Infinity){_469.places=6;}var _46a=_468.split(".");var _46b=(_469.places>=0)?_469.places:(_46a[1]&&_46a[1].length)||0;if(!(_469.round<0)){_467=dojo.number.round(_467,_46b,_469.round);}var _46c=String(Math.abs(_467)).split(".");var _46d=_46c[1]||"";if(_469.places){var _46e=dojo.isString(_469.places)&&_469.places.indexOf(",");if(_46e){_469.places=_469.places.substring(_46e+1);}_46c[1]=dojo.string.pad(_46d.substr(0,_469.places),_469.places,"0",true);}else{if(_46a[1]&&_469.places!==0){var pad=_46a[1].lastIndexOf("0")+1;if(pad>_46d.length){_46c[1]=dojo.string.pad(_46d,pad,"0",true);}var _470=_46a[1].length;if(_470<_46d.length){_46c[1]=_46d.substr(0,_470);}}else{if(_46c[1]){_46c.pop();}}}var _471=_46a[0].replace(",","");pad=_471.indexOf("0");if(pad!=-1){pad=_471.length-pad;if(pad>_46c[0].length){_46c[0]=dojo.string.pad(_46c[0],pad);}if(_471.indexOf("#")==-1){_46c[0]=_46c[0].substr(_46c[0].length-pad);}}var _472=_46a[0].lastIndexOf(",");var _473,_474;if(_472!=-1){_473=_46a[0].length-_472-1;var _475=_46a[0].substr(0,_472);_472=_475.lastIndexOf(",");if(_472!=-1){_474=_475.length-_472-1;}}var _476=[];for(var _477=_46c[0];_477;){var off=_477.length-_473;_476.push((off>0)?_477.substr(off):_477);_477=(off>0)?_477.slice(0,off):"";if(_474){_473=_474;delete _474;}}_46c[0]=_476.reverse().join(_469.group||",");return _46c.join(_469.decimal||".");};dojo.number.regexp=function(_479){return dojo.number._parseInfo(_479).regexp;};dojo.number._parseInfo=function(_47a){_47a=_47a||{};var _47b=dojo.i18n.normalizeLocale(_47a.locale);var _47c=dojo.i18n.getLocalization("dojo.cldr","number",_47b);var _47d=_47a.pattern||_47c[(_47a.type||"decimal")+"Format"];var _47e=_47c.group;var _47f=_47c.decimal;var _480=1;if(_47d.indexOf("%")!=-1){_480/=100;}else{if(_47d.indexOf("‰")!=-1){_480/=1000;}else{var _481=_47d.indexOf("¤")!=-1;if(_481){_47e=_47c.currencyGroup||_47e;_47f=_47c.currencyDecimal||_47f;}}}var _482=_47d.split(";");if(_482.length==1){_482.push("-"+_482[0]);}var re=dojo.regexp.buildGroupRE(_482,function(_484){_484="(?:"+dojo.regexp.escapeString(_484,".")+")";return _484.replace(dojo.number._numberPatternRE,function(_485){var _486={signed:false,separator:_47a.strict?_47e:[_47e,""],fractional:_47a.fractional,decimal:_47f,exponent:false};var _487=_485.split(".");var _488=_47a.places;if(_487.length==1||_488===0){_486.fractional=false;}else{if(_488===undefined){_488=_47a.pattern?_487[1].lastIndexOf("0")+1:Infinity;}if(_488&&_47a.fractional==undefined){_486.fractional=true;}if(!_47a.places&&(_488<_487[1].length)){_488+=","+_487[1].length;}_486.places=_488;}var _489=_487[0].split(",");if(_489.length>1){_486.groupSize=_489.pop().length;if(_489.length>1){_486.groupSize2=_489.pop().length;}}return "("+dojo.number._realNumberRegexp(_486)+")";});},true);if(_481){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_48a,_48b,_48c,_48d){var prop=["symbol","currency","displayName"][_48c.length-1];var _48f=dojo.regexp.escapeString(_47a[prop]||_47a.currency||"");_48b=_48b?"[\\s\\xa0]":"";_48d=_48d?"[\\s\\xa0]":"";if(!_47a.strict){if(_48b){_48b+="*";}if(_48d){_48d+="*";}return "(?:"+_48b+_48f+_48d+")?";}return _48b+_48f+_48d;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_47e,decimal:_47f,factor:_480};};dojo.number.parse=function(_490,_491){var info=dojo.number._parseInfo(_491);var _493=(new RegExp("^"+info.regexp+"$")).exec(_490);if(!_493){return NaN;}var _494=_493[1];if(!_493[1]){if(!_493[2]){return NaN;}_494=_493[2];info.factor*=-1;}_494=_494.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _494*info.factor;};dojo.number._realNumberRegexp=function(_495){_495=_495||{};if(!("places" in _495)){_495.places=Infinity;}if(typeof _495.decimal!="string"){_495.decimal=".";}if(!("fractional" in _495)||/^0/.test(_495.places)){_495.fractional=[true,false];}if(!("exponent" in _495)){_495.exponent=[true,false];}if(!("eSigned" in _495)){_495.eSigned=[true,false];}var _496=dojo.number._integerRegexp(_495);var _497=dojo.regexp.buildGroupRE(_495.fractional,function(q){var re="";if(q&&(_495.places!==0)){re="\\"+_495.decimal;if(_495.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_495.places+"}";}}return re;},true);var _49a=dojo.regexp.buildGroupRE(_495.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_495.eSigned})+")";}return "";});var _49c=_496+_497;if(_497){_49c="(?:(?:"+_49c+")|(?:"+_497+"))";}return _49c+_49a;};dojo.number._integerRegexp=function(_49d){_49d=_49d||{};if(!("signed" in _49d)){_49d.signed=[true,false];}if(!("separator" in _49d)){_49d.separator="";}else{if(!("groupSize" in _49d)){_49d.groupSize=3;}}var _49e=dojo.regexp.buildGroupRE(_49d.signed,function(q){return q?"[-+]":"";},true);var _4a0=dojo.regexp.buildGroupRE(_49d.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_49d.groupSize,grp2=_49d.groupSize2;if(grp2){var _4a4="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_4a4+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_4a4;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _49e+_4a0;};}if(!dojo._hasResource["dojox.validate.regexp"]){dojo._hasResource["dojox.validate.regexp"]=true;dojo.provide("dojox.validate.regexp");dojo.mixin(dojox.validate.regexp,{ipAddress:function(_4a5){_4a5=(typeof _4a5=="object")?_4a5:{};if(typeof _4a5.allowDottedDecimal!="boolean"){_4a5.allowDottedDecimal=true;}if(typeof _4a5.allowDottedHex!="boolean"){_4a5.allowDottedHex=true;}if(typeof _4a5.allowDottedOctal!="boolean"){_4a5.allowDottedOctal=true;}if(typeof _4a5.allowDecimal!="boolean"){_4a5.allowDecimal=true;}if(typeof _4a5.allowHex!="boolean"){_4a5.allowHex=true;}if(typeof _4a5.allowIPv6!="boolean"){_4a5.allowIPv6=true;}if(typeof _4a5.allowHybrid!="boolean"){_4a5.allowHybrid=true;}var _4a6="((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";var _4a7="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";var _4a8="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";var _4a9="(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|"+"4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";var _4aa="0[xX]0*[\\da-fA-F]{1,8}";var _4ab="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";var _4ac="([\\da-fA-F]{1,4}\\:){6}"+"((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";var a=[];if(_4a5.allowDottedDecimal){a.push(_4a6);}if(_4a5.allowDottedHex){a.push(_4a7);}if(_4a5.allowDottedOctal){a.push(_4a8);}if(_4a5.allowDecimal){a.push(_4a9);}if(_4a5.allowHex){a.push(_4aa);}if(_4a5.allowIPv6){a.push(_4ab);}if(_4a5.allowHybrid){a.push(_4ac);}var _4ae="";if(a.length>0){_4ae="("+a.join("|")+")";}return _4ae;},host:function(_4af){_4af=(typeof _4af=="object")?_4af:{};if(typeof _4af.allowIP!="boolean"){_4af.allowIP=true;}if(typeof _4af.allowLocal!="boolean"){_4af.allowLocal=false;}if(typeof _4af.allowPort!="boolean"){_4af.allowPort=true;}if(typeof _4af.allowNamed!="boolean"){_4af.allowNamed=false;}var _4b0="(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)";var _4b1="(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)";var _4b2=_4af.allowPort?"(\\:\\d+)?":"";var _4b3="((?:"+_4b0+"\\.)*"+_4b1+"\\.?)";if(_4af.allowIP){_4b3+="|"+dojox.validate.regexp.ipAddress(_4af);}if(_4af.allowLocal){_4b3+="|localhost";}if(_4af.allowNamed){_4b3+="|^[^-][a-zA-Z0-9_-]*";}return "("+_4b3+")"+_4b2;},url:function(_4b4){_4b4=(typeof _4b4=="object")?_4b4:{};if(!("scheme" in _4b4)){_4b4.scheme=[true,false];}var _4b5=dojo.regexp.buildGroupRE(_4b4.scheme,function(q){if(q){return "(https?|ftps?)\\://";}return "";});var _4b7="(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]+(?:\\?[^?#\\s/]*)?(?:#[A-Za-z][\\w.:-]*)?)?)?";return _4b5+dojox.validate.regexp.host(_4b4)+_4b7;},emailAddress:function(_4b8){_4b8=(typeof _4b8=="object")?_4b8:{};if(typeof _4b8.allowCruft!="boolean"){_4b8.allowCruft=false;}_4b8.allowPort=false;var _4b9="([\\da-zA-Z]+[-._+&'])*[\\da-zA-Z]+";var _4ba=_4b9+"@"+dojox.validate.regexp.host(_4b8);if(_4b8.allowCruft){_4ba="<?(mailto\\:)?"+_4ba+">?";}return _4ba;},emailAddressList:function(_4bb){_4bb=(typeof _4bb=="object")?_4bb:{};if(typeof _4bb.listSeparator!="string"){_4bb.listSeparator="\\s;,";}var _4bc=dojox.validate.regexp.emailAddress(_4bb);var _4bd="("+_4bc+"\\s*["+_4bb.listSeparator+"]\\s*)*"+_4bc+"\\s*["+_4bb.listSeparator+"]?\\s*";return _4bd;},numberFormat:function(_4be){_4be=(typeof _4be=="object")?_4be:{};if(typeof _4be.format=="undefined"){_4be.format="###-###-####";}var _4bf=function(_4c0){return dojo.regexp.escapeString(_4c0,"?").replace(/\?/g,"\\d?").replace(/#/g,"\\d");};return dojo.regexp.buildGroupRE(_4be.format,_4bf);}});dojox.validate.regexp.ca={postalCode:function(){return "([A-Z][0-9][A-Z] [0-9][A-Z][0-9])";},province:function(){return "(AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT)";}};dojox.validate.regexp.us={state:function(_4c1){_4c1=(typeof _4c1=="object")?_4c1:{};if(typeof _4c1.allowTerritories!="boolean"){_4c1.allowTerritories=true;}if(typeof _4c1.allowMilitary!="boolean"){_4c1.allowMilitary=true;}var _4c2="AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|"+"NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";var _4c3="AS|FM|GU|MH|MP|PW|PR|VI";var _4c4="AA|AE|AP";if(_4c1.allowTerritories){_4c2+="|"+_4c3;}if(_4c1.allowMilitary){_4c2+="|"+_4c4;}return "("+_4c2+")";}};}if(!dojo._hasResource["dojox.validate._base"]){dojo._hasResource["dojox.validate._base"]=true;dojo.provide("dojox.validate._base");dojo.experimental("dojox.validate");dojox.validate.isText=function(_4c5,_4c6){_4c6=(typeof _4c6=="object")?_4c6:{};if(/^\s*$/.test(_4c5)){return false;}if(typeof _4c6.length=="number"&&_4c6.length!=_4c5.length){return false;}if(typeof _4c6.minlength=="number"&&_4c6.minlength>_4c5.length){return false;}if(typeof _4c6.maxlength=="number"&&_4c6.maxlength<_4c5.length){return false;}return true;};dojox.validate._isInRangeCache={};dojox.validate.isInRange=function(_4c7,_4c8){_4c7=dojo.number.parse(_4c7,_4c8);if(isNaN(_4c7)){return false;}_4c8=(typeof _4c8=="object")?_4c8:{};var max=(typeof _4c8.max=="number")?_4c8.max:Infinity,min=(typeof _4c8.min=="number")?_4c8.min:-Infinity,dec=(typeof _4c8.decimal=="string")?_4c8.decimal:".",_4cc=dojox.validate._isInRangeCache,_4cd=_4c7+"max"+max+"min"+min+"dec"+dec;if(typeof _4cc[_4cd]!="undefined"){return _4cc[_4cd];}_4cc[_4cd]=!(_4c7<min||_4c7>max);return _4cc[_4cd];};dojox.validate.isNumberFormat=function(_4ce,_4cf){var re=new RegExp("^"+dojox.validate.regexp.numberFormat(_4cf)+"$","i");return re.test(_4ce);};dojox.validate.isValidLuhn=function(_4d1){var sum=0,_4d3,_4d4;if(!dojo.isString(_4d1)){_4d1=String(_4d1);}_4d1=_4d1.replace(/[- ]/g,"");_4d3=_4d1.length%2;for(var i=0;i<_4d1.length;i++){_4d4=parseInt(_4d1.charAt(i));if(i%2==_4d3){_4d4*=2;}if(_4d4>9){_4d4-=9;}sum+=_4d4;}return !(sum%10);};}if(!dojo._hasResource["dojox.validate.check"]){dojo._hasResource["dojox.validate.check"]=true;dojo.provide("dojox.validate.check");dojo.experimental;dojox.validate.check=function(form,_4d7){var _4d8=[];var _4d9=[];var _4da={isSuccessful:function(){return (!this.hasInvalid()&&!this.hasMissing());},hasMissing:function(){return (_4d8.length>0);},getMissing:function(){return _4d8;},isMissing:function(_4db){for(var i=0;i<_4d8.length;i++){if(_4db==_4d8[i]){return true;}}return false;},hasInvalid:function(){return (_4d9.length>0);},getInvalid:function(){return _4d9;},isInvalid:function(_4dd){for(var i=0;i<_4d9.length;i++){if(_4dd==_4d9[i]){return true;}}return false;}};var _4df=function(name,_4e1){return (typeof _4e1[name]=="undefined");};if(_4d7.trim instanceof Array){for(var i=0;i<_4d7.trim.length;i++){var elem=form[_4d7.trim[i]];if(_4df("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/(^\s*|\s*$)/g,"");}}if(_4d7.uppercase instanceof Array){for(var i=0;i<_4d7.uppercase.length;i++){var elem=form[_4d7.uppercase[i]];if(_4df("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.toUpperCase();}}if(_4d7.lowercase instanceof Array){for(var i=0;i<_4d7.lowercase.length;i++){var elem=form[_4d7.lowercase[i]];if(_4df("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.toLowerCase();}}if(_4d7.ucfirst instanceof Array){for(var i=0;i<_4d7.ucfirst.length;i++){var elem=form[_4d7.ucfirst[i]];if(_4df("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/\b\w+\b/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1).toLowerCase();});}}if(_4d7.digit instanceof Array){for(var i=0;i<_4d7.digit.length;i++){var elem=form[_4d7.digit[i]];if(_4df("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/\D/g,"");}}if(_4d7.required instanceof Array){for(var i=0;i<_4d7.required.length;i++){if(!dojo.isString(_4d7.required[i])){continue;}var elem=form[_4d7.required[i]];if(!_4df("type",elem)&&(elem.type=="text"||elem.type=="textarea"||elem.type=="password"||elem.type=="file")&&/^\s*$/.test(elem.value)){_4d8[_4d8.length]=elem.name;}else{if(!_4df("type",elem)&&(elem.type=="select-one"||elem.type=="select-multiple")&&(elem.selectedIndex==-1||/^\s*$/.test(elem.options[elem.selectedIndex].value))){_4d8[_4d8.length]=elem.name;}else{if(dojo.isArrayLike(elem)&&(elem.type!="select-one"&&elem.type!="select-multiple")){var _4e5=false;for(var j=0;j<elem.length;j++){if(elem[j].checked){_4e5=true;}}if(!_4e5){_4d8[_4d8.length]=elem[0].name;}}}}}}if(_4d7.required instanceof Array){for(var i=0;i<_4d7.required.length;i++){if(!dojo.isObject(_4d7.required[i])){continue;}var elem,_4e7;for(var name in _4d7.required[i]){elem=form[name];_4e7=_4d7.required[i][name];}if(elem instanceof Array){var _4e5=0;for(var j=0;j<elem.length;j++){if(elem[j].checked){_4e5++;}}if(_4e5<_4e7){_4d8[_4d8.length]=elem[0].name;}}else{if(!_4df("type",elem)&&elem.type=="select-multiple"){var _4e9=0;for(var j=0;j<elem.options.length;j++){if(elem.options[j].selected&&!/^\s*$/.test(elem.options[j].value)){_4e9++;}}if(_4e9<_4e7){_4d8[_4d8.length]=elem.name;}}}}}if(dojo.isObject(_4d7.dependencies)){for(name in _4d7.dependencies){var elem=form[name];if(_4df("type",elem)){continue;}if(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}if(/\S+/.test(elem.value)){continue;}if(_4da.isMissing(elem.name)){continue;}var _4ea=form[_4d7.dependencies[name]];if(_4ea.type!="text"&&_4ea.type!="textarea"&&_4ea.type!="password"){continue;}if(/^\s*$/.test(_4ea.value)){continue;}_4d8[_4d8.length]=elem.name;}}if(dojo.isObject(_4d7.constraints)){for(name in _4d7.constraints){var elem=form[name];if(!elem){continue;}if(!_4df("tagName",elem)&&(elem.tagName.toLowerCase().indexOf("input")>=0||elem.tagName.toLowerCase().indexOf("textarea")>=0)&&/^\s*$/.test(elem.value)){continue;}if(dojo.isArrayLike(elem)&&(elem.type!="select-one"&&elem.type!="select-multiple")){elem=dojo.filter(elem,function(e){return e.checked;}).pop();if(!elem){continue;}}var _4ec=true;if(dojo.isFunction(_4d7.constraints[name])){_4ec=_4d7.constraints[name](elem.value);}else{if(dojo.isArray(_4d7.constraints[name])){if(dojo.isArray(_4d7.constraints[name][0])){for(var i=0;i<_4d7.constraints[name].length;i++){_4ec=dojox.validate.evaluateConstraint(_4d7,_4d7.constraints[name][i],name,elem);if(!_4ec){break;}}}else{_4ec=dojox.validate.evaluateConstraint(_4d7,_4d7.constraints[name],name,elem);}}}if(!_4ec){_4d9[_4d9.length]=elem.name;}}}if(dojo.isObject(_4d7.confirm)){for(name in _4d7.confirm){var elem=form[name];var _4ea=form[_4d7.confirm[name]];if(_4df("type",elem)||_4df("type",_4ea)||(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password")||(_4ea.type!=elem.type)||(_4ea.value==elem.value)||(_4da.isInvalid(elem.name))||(/^\s*$/.test(_4ea.value))){continue;}_4d9[_4d9.length]=elem.name;}}return _4da;};dojox.validate.evaluateConstraint=function(_4ed,_4ee,_4ef,elem){var _4f1=_4ee[0];var _4f2=_4ee.slice(1);_4f2.unshift(elem.value);if(typeof _4f1!="undefined"){return _4f1.apply(null,_4f2);}return false;};}if(!dojo._hasResource["agi.widget._TemplatedWidget"]){dojo._hasResource["agi.widget._TemplatedWidget"]=true;dojo.provide("agi.widget._TemplatedWidget");dojo.declare("agi.widget._TemplatedWidget",[dijit._Widget,dojox.dtl._Templated],{__culprit__:"$Author: dbuch $"});}if(!dojo._hasResource["agi.requester"]){dojo._hasResource["agi.requester"]=true;dojo.provide("agi.requester");agi.requester.Requester=function(url,_4f4,_4f5,_4f6,_4f7){var _4f8=this;var req=null;this.async=_4f5;this.method=_4f4;this.url=url;this.showbusy=_4f6;this.in_process=false;this.handleas=_4f7?_4f7:"text";this.get_millisecond_query=function(){var _4fa=new Date();var ms=_4fa.getTime();return "&ajax_requester_ms="+ms;};this.sendRequest=function(_4fc){var _4fd={url:this.url,sync:!this.async,content:_4fc?_4fc:{},preventCache:_4fc?true:false,handleAs:this.handleas,load:_4f8.processLoad,error:_4f8.processError};if(this.showbusy){document.body.style.cursor="wait";}this.in_process=true;if(this.method.toUpperCase()=="POST"){dojo.xhrPost(_4fd);}else{dojo.xhrGet(_4fd);}};this.processLoad=function(_4fe,_4ff){_4fe=_4f8.processAlways(_4fe,_4ff);if(_4ff.xhr.getResponseHeader("Kaboom")){if(_4ff.xhrgetResponseHeader("Kaboom").toLowerCase()=="true"){if(_4f8.onerror){_4f8.onerror(_4fe,_4ff);}}}else{if(_4f8.onsuccess){_4f8.onsuccess(_4fe,_4ff);}}return _4fe;};this.processError=function(_500,_501){_500=_4f8.processAlways(_500,_501);if(_4f8.onerror){_4f8.onerror(_500,_501);}return _500;};this.processAlways=function(_502,_503){_4f8.in_process=false;if(_4f8.showbusy){document.body.style.cursor="auto";}if(!_502){_502="";}try{_502=_502.replace("<!--this page was compressed by your friendly neighborhood pydriver-->","");}catch(e){}return _502;};this.formToQuery=function(_504){var _505=dojo.formToObject(_504);return _505;};};var script_fragment="<script[^>]*>([\\s\\S]*?)</script>";agi.requester.stripScripts=function(_506){return _506.replace(new RegExp(script_fragment,"img"),"");};agi.requester.extractScripts=function(_507){var _508=new RegExp(script_fragment,"img");var _509=new RegExp(script_fragment,"im");var _50a=_507.match(_508);var _50b=[];if(_50a){for(var i=0;i<_50a.length;i++){if(_50a[i].indexOf("agi-lb-exec")!=-1){_50b.push(_50a[i].match(_509)[1]);}}}return _50b;};agi.requester.evalScripts=function(_50d){var _50e=agi.requester.extractScripts(_50d);for(i=0;i<_50e.length;i++){try{eval(_50e[i]);}catch(e){}}};agi.requester.checkAll=function(_50f,_510){form=dojo.byId(_50f);for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"){form.elements[i].checked=_510;}}};agi.requester.countChecked=function(_511){var form=dojo.byId(_511);var _513=0;for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"&form.elements[i].checked){_513++;}}return _513;};agi.requester.selectAll=function(_514,_515){if(_515==undefined){var _516=true;}else{var _516=_515;}var list=dojo.byId(_514);var _518=document.getElementsByName("event_id");for(i=0;i<list.childNodes.length;i++){if(list.childNodes[i].nodeName=="LI"){for(j=0;j<list.childNodes[i].childNodes.length;j++){if(list.childNodes[i].childNodes[j].type=="checkbox"){list.childNodes[i].childNodes[j].checked=_516;len=_518.length;for(n=0;n<len;n++){if((_518[n].value)==(list.childNodes[i].childNodes[j].value)){_518[n].checked=_516;}}}}}}};agi.requester.selectEqual=function(_519){var _51a=document.getElementsByName(_519.name);for(i=0;i<_51a.length;i++){if(_519.form.elements[i].value==_519.value){_519.form.elements[i].checked=_519.checked;}}};agi.requester.fixurl=function(url){if(url.indexOf("http")!=0){var sep="";url.indexOf("/")==0?sep="":sep="/";url=agi.requester.ajaxhost()+sep+url;}return url;};agi.requester.ajaxhost=function(){return document.location.protocol+"//"+document.location.hostname;};}if(!dojo._hasResource["agi.widget.Lightbox"]){dojo._hasResource["agi.widget.Lightbox"]=true;dojo.provide("agi.widget.Lightbox");dojo.declare("agi.widget.Lightbox",[agi.classes.Identified,agi.widget._TemplatedWidget],{url:null,contents:null,node:null,templatePath:null,left:null,top:null,height:null,width:null,position:"absolute",relativeTo:null,showloader:true,loaderSrc:imghost+"/ag/reminders/loader.swf",loaderId:"agi-lightboxloader",loaderHeight:120,loaderWidth:120,overlayId:"agi-overlay",lightboxId:"agi-lightbox",noprintClass:"agi-noprint",timeout:60000,loadnow:true,allowclick:false,closeKey:null,overflow:"auto",overlayZindex:"999",containerZindex:"1000",loaderZindex:"250",_defaultTop:20,_ready:false,_reset:false,_showing:false,_bgIframe:null,_keypressListener:null,_hideSignal:"ag/Lightbox/hide",_resizeSignal:"ag/Lightbox/resize",constructor:function(_51d){_51d=_51d||{};dojo.mixin(this,_51d);this._checkPositioning();},uninitialize:function(){dojo._destroyElement(this.loader);dojo._destroyElement(this.lightbox);dojo._destroyElement(this.overlay);if(this._bgIframe){this._bgIframe.destroy();this._bgIframe=null;}},_checkPositioning:function(){if(this.position=="relative"){if(!this.relativeTo){throw (this+" needs a relativeTo when positioning relatively");}if(this.left==null){this.left=0;}if(this.top==null){this.top=0;}var pos=dojo.coords(this.relativeTo);this.left+=pos.x;this.top+=pos.y;}else{if(this.position=="user"){if(this.top==null||this.left==null){throw (this+" needs 'left' and 'top' defined when using user-defined positioning.");}}else{if(this.top==null){this.top=this._defaultTop;}}}},buildRendering:function(){if(this.templatePath||this.templateString){this.inherited(arguments);}this.overlay=this._createOverlay();this.lightbox=this._createLightbox(this.overlay);this.loader=this._createLoader();},postCreate:function(){this.inherited(arguments);dojo.subscribe(this._hideSignal,dojo.hitch(this,this.hide));dojo.subscribe(this._resizeSignal,dojo.hitch(this,this._resizeOverlay));if(this.loadnow){this._loadContent();}},_createOverlay:function(){var body=dojo.body();var _520=this.overlayId;var _521=dojo.byId(_520);if(!_521){_521=document.createElement("div");_521.setAttribute("id",_520);dojo.addClass(_521,this.noprintClass);var _522=this._pageSize();dojo.style(_521,{display:"none",position:"absolute",top:"0",left:"0",zIndex:this.overlayZindex,width:"100%",height:_522[1]+"px"});body.insertBefore(_521,body.firstChild);}try{filter=dojo.style(_521,"filter");if(filter&&dojo.isIE){if(filter.indexOf(imghost)==-1){filter=filter.replace("/agbeta",imghost+"/agbeta");dojo.style(_521,"filter",filter);}}}catch(e){}return _521;},_createLightbox:function(_523){var body=dojo.body();var _525=dojo.byId(this.lightboxId);if(!_525){_525=document.createElement("div");_525.setAttribute("id",this.lightboxId);dojo.style(_525,{display:"none",position:"absolute",zIndex:this.containerZindex});body.insertBefore(_525,_523.nextSibling);}_525.innerHTML="";return _525;},_createLoader:function(){var body=dojo.body();var _527=dojo.byId("loadingImage");if(!_527){if(this.loaderSrc.endswith(".swf")){_527=this._createLoaderSwf(this.loaderSrc);}else{_527=this._createLoaderImage(this.loaderSrc);}dojo.style(_527,{display:"none",visibility:"hidden",position:"absolute",zIndex:this.loaderZindex});body.insertBefore(_527,body.firstChild);}return _527;},_createLoaderSwf:function(src){var _529=document.createElement("embed");_529.setAttribute("id",this.loaderId);_529.setAttribute("name","FlashProduct");_529.setAttribute("src",src);_529.setAttribute("swLiveConnect",true);_529.setAttribute("width",this.loaderWidth);_529.setAttribute("height",this.loaderHeight);_529.setAttribute("scale","noborder");_529.setAttribute("quality","high");_529.setAttribute("type","application/x-shockwave-flash");_529.setAttribute("pluginspace","http://www.macromedia.com/go/getflashplayer");_529.setAttribute("wmode","transparent");return _529;},_createLoaderImage:function(src){var _52b=document.createElement("img");_52b.setAttribute("id",this.loaderId);_52b.setAttribute("src",src);_52b.setAttribute("width",this.loaderWidth);_52b.setAttribute("height",this.loaderHeight);return _52b;},_loadContent:function(){if(this.domNode&&!this.node){this.node=this.domNode;}if(this.loader&&this.showloader){var _52c=this._pageSize();var _52d=this._pageScroll();var _52e=_52d[1]+((_52c[3]-35-this.loader.height)/2);var _52f=((_52c[0]-20-this.loader.width)/2);dojo.style(this.loader,{display:"block",visibility:"visible",top:_52e+"px",left:_52f+"px"});}if(this.overlay){dojo.style(this.overlay,{display:"block",visibility:"visible"});}if(this.url){dojo.xhrGet({url:this.url,handleAs:"text",timeout:this.timeout,load:dojo.hitch(this,this._onSuccess),error:dojo.hitch(this,this._onError)});}else{if(this.contents){this.lightbox.innerHTML=agi.requester.stripScripts(this.contents);this._ready=true;this.show();agi.requester.evalScripts(this.contents);this._enableOverlayClick();}else{if(this.node){var node=dojo.byId(this.node);this.lightbox.appendChild(dojo.byId(node));dojo.style(node,"display","block");this._ready=true;this.show();this._enableOverlayClick();}}}},_onSuccess:function(_531,_532){this.lightbox.innerHTML=agi.requester.stripScripts(_531);this._ready=true;this.show();agi.requester.evalScripts(_531);this._enableOverlayClick();return _531;},_onError:function(_533,_534){this.hide();return _533;},show:function(){this._showPhase0();this._showPhase1();this._showPhase2();},_showPhase0:function(){if(!this._ready){return this._loadContent();}if(this._reset){this._checkPositioning();this._reset=false;}if(this.contents){this.lightbox.innerHTML=this.contents;}dojo.style(this.lightbox,"overflow",this.overflow);if(this.loader){dojo.style(this.loader,{display:"none",visibility:"hidden"});}if(this.overlay){dojo.style(this.overlay,{display:"block",visibility:"visible"});}},_showPhase1:function(){var _535=this._pageScroll();var _536=this.top+_535[1];var _537={left:"-9999px",top:_536+"px",visibility:"visible",display:"block"};if(this.height){_537.height=this.height+"px";}if(this.width){_537.width=this.width+"px";}dojo.style(this.lightbox,_537);},_showPhase2:function(){var _538=this._pageSize();if(this.left==null){this.left=((_538[0]-this.lightbox.offsetWidth)/2);}var _539={left:this.left+"px"};dojo.style(this.lightbox,_539);this._resizeOverlay();this._enableKeypressListener();if(!this._bgIframe){var _53a=this.lightbox;if(this.overlay){_53a=this.overlay;}this._bgIframe=new dijit.BackgroundIframe(_53a);}this._showing=true;},hide:function(_53b){if(!this._showing){return;}if(this.overlay){this.overlay.onclick=function(){return false;};}if(this.overlay){dojo.style(this.overlay,{display:"none",visibility:"hidden"});}if(this.loader){dojo.style(this.loader,{display:"none",visibility:"hidden"});}if(this.lightbox){dojo.style(this.lightbox,{display:"none",visibility:"hidden"});if(_53b){this.reset();}else{this.contents=this.lightbox.innerHTML;}}this._disableKeypressListener();this._showing=false;},reset:function(){if(this.node){dojo.style(this.node,{display:"none"});dojo.place(this.node,dojo.body(),"last");}this.lightbox.innerHTML="";this.contents=null;this.url=null;this.domNode=null;this.top=null;this.left=null;this._ready=false;this._reset=true;},_enableOverlayClick:function(){if(this.allowclick){this._overlayClick=dojo.connect(this.overlay,"onclick",dojo.hitch(this,this.hide));}},_disableOverlayClick:function(){if(this._overlayClick){dojo.disconnect(this._overlayClick);this._overlayClick=null;}},_enableKeypressListener:function(){if(this.closeKey&&!this._keypressListener){this._keypressListener=dojo.connect(document,"keypress",dojo.hitch(this,this._onKeypress));}},_disableKeypressListener:function(){if(this._keypressListener){dojo.disconnect(this._keypressListener);this._keypressListener=null;}},_onKeypress:function(evt){var _53d;if(evt==null){_53d=event.keyCode;}else{_53d=evt.which;}var key=String.fromCharCode(_53d).toLowerCase();if(key==this.closeKey){this.hide();}},_resizeOverlay:function(){var _53f=this._pageSize();dojo.style(this.overlay,"height",_53f[1]+"px");},_pageScroll:function(){var _540=0;if(self.pageYOffset){_540=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){_540=document.documentElement.scrollTop;}else{if(document.body){_540=document.body.scrollTop;}}}var _541=[null,_540];return _541;},_pageSize:function(){var _542,_543;if(window.innerHeight&&window.scrollMaxY){_542=document.body.scrollWidth;_543=window.innerHeight+window.scrollMaxY;}else{if(document.body.scrollHeight>document.body.offsetHeight){_542=document.body.scrollWidth;_543=document.body.scrollHeight;}else{_542=document.body.offsetWidth;_543=document.body.offsetHeight;}}var _544,_545;if(self.innerHeight){_544=self.innerWidth;_545=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){_544=document.documentElement.clientWidth;_545=document.documentElement.clientHeight;}else{if(document.body){_544=document.body.clientWidth;_545=document.body.clientHeight;}}}var _546,_547;if(_543<_545){_547=_545;}else{_547=_543;}if(_542<_544){_546=_544;}else{_546=_542;}var _548=[_546,_547,_544,_545];return _548;}});}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(_549){if(dojo.isObject(_549)){dojo.mixin(this,_549);this.postMixInProperties();}},postMixInProperties:function(){return;}});}if(!dojo._hasResource["pw.validators"]){dojo._hasResource["pw.validators"]=true;dojo.provide("pw.validators");pw.validators.cleanAllErrors=function(form){top_err=dojo.byId("login-error");dojo.destroy(top_err);dojo.query("li",form).forEach(function(li){if(li.id.indexOf("fli-")==0){if(li!==null&&typeof (li)!="undefined"){dojo.removeClass(li,"pw-formerror");}}pw.validators.deleteErrorMessages(form);});};pw.validators.cleanErrors=function(form,_54d){dojo.forEach(_54d,function(name){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+name){if(li!==null&&typeof (li)!="undefined"){dojo.removeClass(li,"pw-formerror");}}});});};pw.validators.setErrorClasses=function(form,_551){dojo.forEach(_551,function(name){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+name){if(li!==null){dojo.addClass(li,"pw-formerror");}}});});};pw.validators.addErrorToField=function(form,_555,_556){pw.validators.setErrorClasses(form,[_555]);var _557={};_557[_555]={invalid:_556};pw.validators.addMessages(form,[_555],_557,"invalid");};pw.validators.addErrorMessages=function(form,_559,_55a){var _55b=_559.getMissing();var _55c=[];var _55d=_559.getInvalid();for(var i=0;i<_55d.length;i++){var _55f=_55d[i];if(_55b.indexOf(_55f)==-1){_55c.push(_55f);}}pw.validators.addMessages(form,_55b,_55a,"missing");pw.validators.addMessages(form,_55c,_55a,"invalid");};pw.validators.addMessages=function(form,_561,_562,_563){dojo.forEach(_561,function(_564){if(_564 in _562){var _565=_562[_564][_563];pw.validators.setMessage(form,_564,_565);}});};pw.validators.setMessage=function(form,_567,_568){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+_567){if(li!==null){dojo.create("span",{className:"error-message",innerHTML:_568},li);}}});};pw.validators.deleteErrorMessages=function(form){var _56b=dojo.query(".error-message",form);dojo.forEach(_56b,function(span){dojo.destroy(span);});};pw.validators.generateProfile=function(_56d,_56e){var _56f=dojo.mixin({},_56e);_56f.fields=dojo.clone(_56e.fields);_56f.required=dojo.clone(_56e.required);var i;var _571;for(i=0;i<_56f.fields.length;i++){_56f.fields[i]=_56d[_56f.fields[i]];}for(i=0;i<_56f.required.length;i++){_56f.required[i]=_56d[_56f.required[i]];}for(_571 in _56d){if(typeof _56f.constraints[_571]!=="undefined"){_56f.constraints[_56d[_571]]=_56f.constraints[_571];delete _56f.constraints[_571];}if(typeof _56f.messages[_571]!=="undefined"){_56f.messages[_56d[_571]]=_56f.messages[_571];delete _56f.messages[_571];}}return _56f;};pw.validators.getFieldMapping=function(_572,node){var _574;var _575={};for(var i=0;i<_572.length;i++){_574=dojo.query(_572[i].query,node);if(_574&&_574.length){_574=_574[0];_575[_572[i].field]=_574.getAttribute("name");}}return _575;};pw.validators.showErrors=function(form,_578,_579,_57a){var _57b=[];if(!_57a){pw.validators.deleteErrorMessages(form);}_57b=(_578.getMissing()).slice();_57b.extend(_578.getInvalid());pw.validators.cleanErrors(form,_579.fields);pw.validators.setErrorClasses(form,_57b);pw.validators.addErrorMessages(form,_578,_579.messages);};pw.validators.showServerErrors=function(form,_57d,_57e){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_57d.fields);for(fieldname in _57e){pw.validators.setErrorClasses(form,[fieldname]);pw.validators.setMessage(form,fieldname,_57e[fieldname]);}};}if(!dojo._hasResource["dojox.validate"]){dojo._hasResource["dojox.validate"]=true;dojo.provide("dojox.validate");}if(!dojo._hasResource["agi.dom.window"]){dojo._hasResource["agi.dom.window"]=true;dojo.provide("agi.dom.window");agi.dom.window._scrollInterval=null;agi.dom.window.scroll_into_view=function(_57f){try{clearInterval(agi.dom.window._scrollInterval);}catch(e){}var _580=dojo.byId(_57f);var _581=dojo.coords(_580,true);var top=_581.y;var _583=_581.y+_581.h;var _584=dijit.getViewport();var _585=_584.t;var _586=_584.l;var _587=Math.floor((agi.dom.window.getSize().height-_580.clientHeight)/2);var _588=agi.dom.window.getLightboxTop();if(_585<top&&_583<agi.dom.window.getSize().height){return;}if((_583-_588)<agi.dom.window.getSize().height){agi.dom.window.scrollTo(_588);}else{if(_587>0){agi.dom.window.scrollTo(top-_587);}else{if(_585>top){agi.dom.window.scrollTo(top);}}}};agi.dom.window.scrollTo=function(y){if(y>agi.dom.window.getMaxScroll()){y=agi.dom.window.getMaxScroll();}step=Math.abs(dijit.getViewport().t-y)/25;agi.dom.window._scrollInterval=setInterval("agi.dom.window.smoothScroll("+step+","+y+")",5);};agi.dom.window.smoothScroll=function(step,_58b){var _58c=dijit.getViewport().t;var _58d;if(_58c>_58b){_58d=Math.max(_58c-step,_58b);}else{_58d=Math.min(_58c+step,_58b);}window.scroll(0,_58d);if(_58d==_58b){clearInterval(agi.dom.window._scrollInterval);}};agi.dom.window.getSize=function(){var size={};size.width=0;size.height=0;if(typeof (window.innerWidth)=="number"){size.width=window.innerWidth;size.height=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){size.width=document.documentElement.clientWidth;size.height=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){size.width=document.body.clientWidth;size.height=document.body.clientHeight;}}}return size;};agi.dom.window.getScrollOffset=function(){var _58f={};_58f.pageYOffset=dijit.getViewport().t;_58f.pageXOffset=dijit.getViewport().l;return _58f;};agi.dom.window.getElementScrollOffset=function(_590){var elem=dojo.byId(_590);var _592={};if(typeof (elem.pageYOffset)=="number"){_592.pageYOffset=elem.pageYOffset;_592.pageXOffset=elem.pageXOffset;}else{_592.pageYOffset=elem.scrollTop;_592.pageXOffset=elem.scrollLeft;}return _592;};agi.dom.window.getMaxScroll=function(){var _593=document.body.clientHeight;if(typeof (window.innerHeight)=="number"){var _594=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){var _594=document.documentElement.clientHeight;}}if(_593>_594){return _593-_594;}else{return 0;}};agi.dom.window.getLightboxTop=function(){try{var tmp=dojo.byId("lightbox");var top=0;if(tmp.style.display=="none"){return 0;}while(tmp.offsetParent&&tmp.tagName.toUpperCase()!="BODY"){top+=tmp.offsetTop;tmp=tmp.offsetParent;}top+=tmp.offsetTop;if(top>10){return top-10;}else{return top;}}catch(e){return 0;}};agi.dom.window.getStyle=function(el,_598){return dojo.style(el,_598);};}if(!dojo._hasResource["agi.validation"]){dojo._hasResource["agi.validation"]=true;dojo.provide("agi.validation");agi.validation.PASS=true;agi.validation.FAIL=false;agi.validation.EMAIL_FAIL="EMAIL_FAIL";agi.validation.IS_EMPTY="IS_EMPTY";agi.validation.TOO_LONG="TOO_LONG";agi.validation.ONE_EMAIL="ONE_EMAIL";agi.validation.defaultErrorMessages=[];agi.validation.defaultErrorMessages[agi.validation.EMAIL_FAIL]=" is not a valid email address.";agi.validation.defaultErrorMessages[agi.validation.TOO_LONG]=" is too long to fit in our database; please choose an alternative email address.";agi.validation.defaultErrorMessages[agi.validation.IS_EMPTY]="Please specify at least one recipient's email for your card.";agi.validation.defaultErrorMessages[agi.validation.ONE_EMAIL]="Please enter one email address at a time.";agi.validation.isEmpty=function(val){if(agi.validation.trim(val)==""){return true;}return false;};agi.validation.ltrim=function(val){return val.replace(/^\s*/g,"");};agi.validation.rtrim=function(val){return val.replace(/\s*$/g,"");};agi.validation.trim=function(val){return val.replace(/^\s*|\s*$/g,"");};agi.validation.write_message=function(_59d,_59e,_59f){var _5a0=dojo.byId(_59d);var _5a1=_5a0.className;if(_59e){if(_59f){_5a0.setAttribute("class",_59f);_5a0.setAttribute("className",_59f);}_5a0.style.display="block";_5a0.innerHTML=_59e;agi.dom.window.scroll_into_view(_59d);}else{_5a0.style.display="none";}};agi.validation.reformat_emails=function(_5a2,_5a3){var _5a4="";for(var i=0;i<_5a2.length;i++){if(!agi.validation.isEmpty(_5a2[i])){_5a4+=agi.validation.trim(_5a2[i]);if(i<_5a2.length-1){_5a4+=", ";}}}if(_5a3){_5a3.value=_5a4;}return _5a4;};agi.validation.validate_email=function(_5a6,_5a7,_5a8){var _5a9=agi.validation.trim(_5a6);var _5aa;var _5ab;var _5ac=[];var _5ad;if(!_5a7){_5a7=75;}if(!_5a8){_5a8;}if(_5a9==""&&!_5a8){throw (agi.validation.IS_EMPTY);}else{if(_5a9==""){return;}}if(_5a9.length>_5a7){throw (agi.validation.TOO_LONG);}if(_5a9.match(/.*@$|.*@.*@.|^@.*|^[^@]*$/)){throw (agi.validation.EMAIL_FAIL);}_5aa=_5a9.split("@")[0];_5ab=_5a9.split("@")[1];if(_5aa==""||_5ab==""){throw (agi.validation.EMAIL_FAIL);}if(_5aa.match(/.*[*()<>;:,\[\]\\'" ].*/)){throw (agi.validation.EMAIL_FAIL);}if(_5ab.indexOf("..")!=-1){throw (agi.validation.EMAIL_FAIL);}_5ac=_5ab.split(".");_5ad=_5ac.length;if(_5ad==1){throw (agi.validation.EMAIL_FAIL);}if(_5ac[_5ad-1].length<2||_5ac[_5ad-1].length>6){throw (agi.validation.EMAIL_FAIL);}return agi.validation.PASS;};agi.validation.validate_emails=function(_5ae,_5af,_5b0){var _5b1=true;var _5b2=_5ae.value.replace(/;/g,",");var _5b3={"error_message":"","error_codes":[],"pass_validation":agi.validation.FAIL,"emails":""};if(!_5af){_5af=true;}if(!_5b0){_5b0=agi.validation.defaultErrorMessages;}if(_5af){_5b2=_5b2.replace(/\n/g,", ");_5b2=_5b2.replace(/\r/g,", ");}if(agi.validation.isEmpty(_5b2)||agi.validation.isEmpty(_5b2.replace(/,/g,""))){_5b1=agi.validation.FAIL;_5b3.error_message+="<p>"+_5b0[agi.validation.IS_EMPTY]+"</p>";}_5b2=_5b2.split(",");for(i=0;i<_5b2.length;i++){try{agi.validation.validate_email(_5b2[i],"",true);}catch(e_code){_5b3.error_message+="<p>"+_5b2[i]+" "+_5b0[e_code]+"</p>";_5b1=agi.validation.FAIL;_5b3.error_codes[_5b3.error_codes.length]=e_code+"|"+_5b2[i];}}if(_5af){agi.validation.reformat_emails(_5b2,_5ae);}_5b3.emails=_5b2;_5b3.pass_validation=_5b1;return _5b3;};agi.validation.validate_checkboxes=function(_5b4){var _5b5=document.getElementsByName(_5b4);var _5b6=false;for(var i=0;i<_5b5.length;i++){if(_5b5[i].checked){_5b6=true;break;}}if(!_5b6){return agi.validation.FAIL;}return agi.validation.PASS;};agi.validation.Error=function(_5b8,_5b9,type){var _5bb=this;this.message=_5b9;this.field=_5b8;this.type=type;};agi.validation.Errors=function(_5bc){var _5bd=this;this.errors=[];this.display_div=dojo.byId(_5bc);this.error_html="<p>%s</p>";this.error_color="#FF0000";this.ERROR="agi-message-area agi-error";this.MESSAGE="agi-message-area agi-message-demo";this.SUCCESS="agi-message-area agi-message-success";this.count=function(){return this.errors.length;};this.is_error=function(){return (this.errors.length>0);};this.display=function(_5be){if(_5be){agi.validation.write_message(this.display_div.id,this.to_html(),"agi-message-area agi-error");this.mark_fields();}else{agi.validation.write_message(this.display_div.id,null,"agi-message-area agi-error");this.clear_fields();}};this.set_class=function(_5bf){var _5c0=this.display_div.className;if(_5bf&&(_5c0.indexOf(_5bf)==-1)){message_class=(this.display_div.className)?this.display_div.className+" "+_5bf:_5bf;this.display_div.setAttribute("class",message_class);this.display_div.setAttribute("className",message_class);}};this.write_message=function(_5c1,_5c2){if(_5c1){this.display_div.style.display="block";this.display_div.innerHTML=_5c1;}else{this.display_div.style.display="none";}};this.mark_fields=function(){for(i=0;i<this.errors.length;i++){try{dojo.byId(this.errors[i].field+"-error").className="agi-mesage-area agi-error";}catch(e){}}};this.clear_fields=function(){for(i=0;i<this.errors.length;i++){try{dojo.byId(this.errors[i].field+"-error").className="";}catch(e){}}};this.to_html=function(){var html="";for(i=0;i<this.errors.length;i++){html+=this.error_html.replace("%s",this.errors[i].message);}return html;};this.show=function(){this.display(true);};this.hide=function(){this.display(false);};this.reset=function(){this.hide();this.errors=[];};this.add=function(_5c4){this.errors.push(_5c4);};this.add_error=function(_5c5,_5c6,type){if(!type){type=this.ERROR;}this.add(new Error(_5c5,_5c6,type));};};}if(!dojo._hasResource["agi.validate._base"]){dojo._hasResource["agi.validate._base"]=true;dojo.provide("agi.validate._base");agi.validate.isEmailAddressList=function(_5c8,_5c9){_5c8=_5c8.replace(/^\s*|\s*$|\s*,\s*$|\s*;\s*$/g,"");var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_5c9)+"$","i");var _5cb=re.test(_5c8);var _5cc=dojox.validate.getEmailAddressList(_5c8,_5c9);var _5cd=false;if(typeof _5c9.minlength!="undefined"){if(_5cc.length<_5c9.minlength){var _5cd=true;}}var _5ce=false;if(typeof _5c9.maxlength!="undefined"){if(_5cc.length>_5c9.maxlength){var _5ce=true;}}return _5cb&&!_5cd&&!_5ce;};agi.validate.reformatEmailAddressList=function(node){node=dojo.byId(node);node.value=node.value.replace(/^\s*|\s*$|\s*,\s*$|\s*;\s*$/g,"");node.value=node.value.replace(/(\w)\s+|\r+|\n+(\w)/g,"$1, $2");node.value=node.value.replace(/;/g,",");return node.value;};agi.validate.isDate=function(_5d0,_5d1){var day=dojo.byId(_5d1.dayField).value;var _5d3={min:_5d1.dayMin,max:_5d1.dayMax};var _5d4=dojox.validate.isInRange(_5d0,_5d1);var _5d5=dojox.validate.isInRange(day,_5d3);return _5d5&&_5d4;};agi.validate.isValidEmailAddress=function(_5d6){var _5d7=/^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}$/i;return _5d7.test(_5d6);};}if(!dojo._hasResource["agi.validate"]){dojo._hasResource["agi.validate"]=true;dojo.provide("agi.validate");}if(!dojo._hasResource["pw.validators.signin"]){dojo._hasResource["pw.validators.signin"]=true;dojo.provide("pw.validators.signin");dojo.addOnLoad(function(){pw.validators.signin.profile={fields:["email","password","remember_me"],required:["email","password"],constraints:{email:[agi.validate.isValidEmailAddress]},messages:{email:{missing:"Email address  is required",invalid:"Invalid email address"},password:{missing:"Password is required"}}};});}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_5d8,_5d9,_5da){if(this.aroundNode&&this.aroundNode===_5d9){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_5d8;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var _5db={};var ltr=this.isLeftToRight();dojo.forEach((_5da&&_5da.length)?_5da:dijit.Tooltip.defaultPosition,function(pos){switch(pos){case "after":_5db[ltr?"BR":"BL"]=ltr?"BL":"BR";break;case "before":_5db[ltr?"BL":"BR"]=ltr?"BR":"BL";break;case "below":_5db[ltr?"BL":"BR"]=ltr?"TL":"TR";_5db[ltr?"BR":"BL"]=ltr?"TR":"TL";break;case "above":default:_5db[ltr?"TL":"TR"]=ltr?"BL":"BR";_5db[ltr?"TR":"TL"]=ltr?"BR":"BL";break;}});var pos=dijit.placeOnScreenAroundElement(this.domNode,_5d9,_5db,dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_5d9;},orient:function(node,_5e0,_5e1){node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_5e0+"-"+_5e1];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_5e2){if(this._onDeck&&this._onDeck[1]==_5e2){this._onDeck=null;}else{if(this.aroundNode===_5e2){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_5e3,_5e4,_5e5){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_5e3,_5e4,_5e5);};dijit.hideTooltip=function(_5e6){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_5e6);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(ids){this._connectNodes=[];this.connectId=dojo.isArrayLike(ids)?ids:[ids];dojo.forEach(this.connectId,function(id){var node=dojo.byId(id);if(node){this._connectNodes.push(node);dojo.forEach(["onMouseEnter","onMouseLeave","onFocus","onBlur"],function(_5ea){this.connect(node,_5ea.toLowerCase(),"_"+_5ea);},this);if(dojo.isIE){node.style.zoom=1;}}},this);},postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData");},_onMouseEnter:function(e){this._onHover(e);},_onMouseLeave:function(e){this._onUnHover(e);},_onFocus:function(e){this._focus=true;this._onHover(e);this.inherited(arguments);},_onBlur:function(e){this._focus=false;this._onUnHover(e);this.inherited(arguments);},_onHover:function(e){if(!this._showTimer){var _5f0=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_5f0);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_5f2){_5f2=_5f2||this._connectNodes[0];if(!_5f2){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_5f2,this.position);this._connectNode=_5f2;},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},uninitialize:function(){this.close();}});dijit.Tooltip.defaultPosition=["after","before"];}if(!dojo._hasResource["agi.widget.Tooltip"]){dojo._hasResource["agi.widget.Tooltip"]=true;dojo.provide("agi.widget.Tooltip");dojo.declare("agi.widget.Tooltip",[dijit.Tooltip,dijit._MasterTooltip,agi.classes.Identified],{templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n    <div class=\"dijitTooltipContainer dijitTooltipContents\"\n        dojoAttachPoint=\"containerNode\" waiRole='alert'>\n    </div>\n    <div class=\"dijitTooltipConnector\"></div>\n</div>\n",templateString:null,baseClassName:"dijitTooltip",postCreate:function(){if(this.contentNode){this.contentNode=dojo.byId(this.contentNode);}dojo.addClass(this.domNode,this.baseClassName+"Data");dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},orient:function(node,_5f4,_5f5){var bcn=this.baseClassName;node.className=bcn+" "+{"BL-TL":bcn+"Below "+bcn+"ABLeft","TL-BL":bcn+"Above "+bcn+"ABLeft","BR-TR":bcn+"Below "+bcn+"ABRight","TR-BR":bcn+"Above "+bcn+"ABRight","BR-BL":bcn+"Right","BL-BR":bcn+"Left"}[_5f4+"-"+_5f5];},open:function(_5f7){_5f7=_5f7||this._connectNodes[0];if(!_5f7){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}var _5f8=null;if(this.contentNode!=null){_5f8=this.contentNode.innerHTML;}var _5f9=this.label||_5f8||this.containerNode.innerHTML;this._showTooltip(_5f9,_5f7,this.position);this._connectNode=_5f7;},close:function(){if(this._connectNode){this._hideTooltip(this._connectNode);delete this._connectNode;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},_showTooltip:function(_5fa,_5fb,_5fc){return this.show(_5fa,_5fb,_5fc);},_hideTooltip:function(_5fd){return this.hide(_5fd);},_setConnectIdAttr:function(ids){this._connectNodes=[];this.connectId=dojo.isArrayLike(ids)?ids:[ids];dojo.forEach(this.connectId,function(id){var node=dojo.byId(id);if(node){this._connectNodes.push(node);this.connect(node,"onmousenter","_onMouseEnter");this.connect(node,"onmouseleave","_onMouseLeave");this.connect(node,"onfocus","_onFocus__Tooltip");this.connect(node,"onblur","_onBlur__Tooltip");if(dojo.isIE){node.style.zoom=1;}}},this);},_onFocus__Tooltip:function(e){this._focus=true;this._onHover(e);},_onBlur__Tooltip:function(e){this._focus=false;this._onUnHover(e);}});}if(!dojo._hasResource["pw.widget.Formtip"]){dojo._hasResource["pw.widget.Formtip"]=true;dojo.provide("pw.widget.Formtip");dojo.declare("pw.widget.Formtip",[agi.widget.Tooltip],{showDelay:300,baseClassName:"pwformtip",templateString:"<div class=\"pwformtip pwformtipLeft\" id=\"dojoTooltip\">\n    <div class=\"pwformtipContainer pwformtipContents\"\n        dojoAttachPoint=\"containerNode\" waiRole=\"alert\">\n    </div>\n    <div class=\"pwformtipConnector\"></div>\n</div>\n"});}if(!dojo._hasResource["pw.messages"]){dojo._hasResource["pw.messages"]=true;dojo.provide("pw.messages");pw.messages.tooltip={email:"Your email address is private and will never be shared without your permission.",phone:"This phone number will not be shared and will only be used to make contact about this order if necessary.",phone_myaccount:"This phone number will not be shared and will only be used to make contact about your orders if necessary.",password:"<b>Password Requirements:</b><ol class=\"pw-tooltip-list\"><li>Must be at least six characters</li><li>No spaces</li><li>Not case sensitive</li></ol>",keepMeLoggedIn:"Not recommended if you're using a public computer.",howToFavorite:"Have prized photos in your PhotoWorks albums? Now you can make them your favorites with a click of the star! To start, find the photo in your album. Underneath the photo, simply click once on the star icon. All photos deemed as \"favorites\" can be found in your new Favorites album. It's that easy!",captions:"Captions can be printed on the back of prints and displayed in photo books and slideshows.",removeRefinement:"Remove this item to broaden your search.",printsBorder:"Selecting white borders will result in your photo having a 1/4\" inch white border when it is printed. By selecting white borders the border will have an even width on all four sides. If \"shrink to fit\" is selected for any print, \"white borders\" will be applied to that print and may result in uneven borders on two sides of the print.<br/><br/><strong>Please note:</strong> White borders are not visible in print preview. Selecting white borders may cause a slight increase in the amount of cropping necessary to print your photos.",recipientEmail:"The email addresses on your To: line will only receive your personalized PhotoMail invitation. That's it. PhotoWorks will not send them unsolicited emails or sell their email address to any third party.<br/><br/>Recipients will not be required to join PhotoWorks to view your shared photos. If they wish, they may choose to join PhotoWorks and receive promotional offers from PhotoWorks.",printsPrepaidPlan:"This is a test from Frank Maricocchi",printsVolumeDiscount:"<table id=\"pw-volumetable\"><tr><th>Quantity</th><th>Price Per Print</th></tr><tr><td>1-499</td><td>$0.15</td></tr><tr><td>500-999</td><td>$0.12</td></tr><tr><td>1000+</td><td>$0.09</td></tr></table>",webshotsLearn:"<p><strong>Why are my Webshots images not appearing?</strong></p><p>If you share a computer with another Webshots user, it is possible that you will not see your Webshots photostream or sets when you try to access them through PhotoWorks. This will happen if the other user did not log out of their Webshots account after the last use.</p><p>To get your images to appear, sign out the currently authenticated Webshots user, then sign out from PhotoWorks.com and try image import again.</p>"};}if(!dojo._hasResource["pw.widget.SigninLightbox"]){dojo._hasResource["pw.widget.SigninLightbox"]=true;dojo.provide("pw.widget.SigninLightbox");dojo.declare("pw.widget.SigninLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for password reminders.",templateString:"<div>\n\n<div id=\"pw-light-signin\" class=\"pw-rc-light\"><span class=\"pw-x1\"></span><span class=\"pw-x2\"></span><span class=\"pw-x3\"></span>\n\t<div class=\"pw-light-header\">\n        <ul>\n            <li class=\"pw-l-close\"><a href=\".\" onclick = \"dojo.publish('pw/modals/signin/hide');\n                                                          return false;\"><span></span>Close</a></li>\n            <li class=\"pw-l-login\">Not a Member? <a href=\"/signup\" \n                                                    onclick=\"dojo.publish('pw/modals/signin/hide');\n                                                             dojo.publish('pw/modals/signup/show');\n                                                             return false;\" ><span></span>Sign Up!</a></li>\n        </ul>\n    </div>\n    \n    <div  class=\"pw-light-content\">\n        <h3><span></span>Member Log In</h3>\n            <div id=\"pw-signin-form-error\" class=\"pw-error\" style=\"display:none;\"><span class=\"pw-erroricon\"></span>\n                <div class=\"pw-error-int\">\n                </div>\n            </div>\n       <form id=\"signin_form\" class=\"util\" action=\"{{shost}}/signin\" \n             method=\"post\" name=\"signin_body\">\n            <fieldset>\n                <ol>\n                    <li id=\"fli-email\">\n                        <label for=\"email\">Email Address:</label>\n                        <input name=\"email\" id=\"email\" class=\"text\" \n                               value=\"\" type=\"text\" maxlength=\"75\" />\n                    </li>\n                    <li id=\"fli-password\">\n                        <label for=\"password\">Password:</label>\n                        <input name=\"password\" id=\"password\" class=\"text\" value=\"\" type=\"password\" maxlength=\"75\" />\n                    </li>\n                </ol>\n            </fieldset>  \n            <fieldset class=\"pw-fs-permission\">\n                <ol>      \n                    <li id=\"fli-remember_me\" class=\"checkbox\">\n                        <label for=\"remember_me\">Keep me logged in<a class=\"pw-infolink\" id=\"keepMeLoggedIn\" href=\"#\"><span class=\"pw-questionicon\"></span></a></label>\n                        <input type=\"checkbox\" class=\"checkbox\" name=\"remember_me\" id=\"remember_me\" checked=\"checked\" checked />\n                    </li>\n                </ol>\n            </fieldset>\n            \n             <ol class=\"pw-light-buttons-pos pw-clearfix\">\n                <li class=\"pw-light-save\">\n                   <input id=\"si-submit\" class=\"button bn-grey-150\" type=\"submit\" value=\"Log In\" />\n                </li>\n                <li class=\"pw-light-cancel\">\n                   <a id=\"forgot-password-link\" href=\"/forgot\"><span></span>Forgot your password?</a>\n                </li>\n            </ol> \n\n        </form>\n    </div>\n</div>\n\n</div>\n",imghost:imghost,shost:shost,url:"",okFunc:null,constructor:function(){},postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/signin/show",dojo.hitch(this,this.onOpen));dojo.subscribe("pw/modals/signin/hide",dojo.hitch(this,this.onClose));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.onClose));this.handles=[];},onOpen:function(_603){this.show();this.wireUp();if(_603!=null){if(_603.email){this.form.email.value=_603.email;}if(_603.url){this.url=_603.url;}}this.form.email.focus();},wireUp:function(){this.form=dojo.byId("signin_form");this.handles.push(dojo.connect(this.form,"onsubmit",dojo.hitch(this,this._onSubmit)));this.forgot_password_link=dojo.byId("forgot-password-link");this.handles.push(dojo.connect(this.forgot_password_link,"onclick",dojo.hitch(this,this.showForgotPassword)));this.ttKeepMeLoggedIn=new pw.widget.Formtip({connectId:"keepMeLoggedIn",label:pw.messages.tooltip.keepMeLoggedIn});},onClose:function(evt){if(evt){dojo.stopEvent(evt);}pw.validators.cleanAllErrors(this.form);this.hide();dojo.forEach(this.handles,dojo.disconnect);this.handles=[];delete this.ttKeepMeLoggedIn;},_onSubmit:function(evt){dojo.stopEvent(evt);pw.validators.cleanAllErrors(this.form);if(dojo.byId("login-error")!=null){dojo.destroy("login-error");}if(!this.validate(this.form)){return;}if(dojo.byId("pw-signin-format")==null){dojo.create("input",{id:"pw-signin-format",type:"hidden",name:"format",value:"async"},this.form);}this.okFunc=agx.currentPage.controller.submitOK;agx.currentPage.controller.submitOK=dojo.hitch(this,this._signInOK);pw.io.iframe.sendSecure(this.form.id,{load:"agx.currentPage.controller.submitOK",timeout:30,error:"agx.currentPage.controller.loginBAD"});},_signInOK:function(_606){if(_606.success==true){if(window.location.href==(ahost+"/")){window.location.href=ahost+"/my-photoworks";}else{window.location.reload(true);}}else{if(_606.success==false&&dojo.byId("login-error")==null){var _607=function(_608){var form=dojo.byId("signin_form");dojo.create("div",{id:"login-error",className:"pw-error",innerHTML:_608},form,"before");};if(_606.error_msg!=null){_607(_606.error_msg);}else{_607("An undetermined error has occured.  Please try again.");}}else{window.location.reload(true);}}},validate:function(form){var _60b=pw.validators.signin.profile;var _60c=dojox.validate.check(form,_60b);if(_60c.isSuccessful()){return true;}pw.validators.showErrors(form,_60c,_60b);return false;},showForgotPassword:function(evt){var form=dojo.byId("signin_form");var _60f=form.email.value;dojo.stopEvent(evt);dojo.publish("pw/modals/signin/hide");dojo.publish("pw/modals/forgot-password/show",[_60f]);}});}if(!dojo._hasResource["pw.validators.signup"]){dojo._hasResource["pw.validators.signup"]=true;dojo.provide("pw.validators.signup");dojo.addOnLoad(function(){pw.validators.signup.profile={fields:["first_name","last_name","email","password","password_confirm","newsletter"],required:["first_name","last_name","email","password","password_confirm"],constraints:{email:[agi.validate.isValidEmailAddress],password:[dojox.validate.isText,{minlength:6}]},confirm:{password_confirm:"password"},messages:{first_name:{missing:"First name is required"},last_name:{missing:"Last name is required"},email:{missing:"Email address is required",invalid:"Invalid email address"},password:{missing:"Password is required",invalid:"Password must be at least 6 characters"},password_confirm:{missing:"Password confirmation is required",invalid:"Passwords must match"}}};});}if(!dojo._hasResource["pw.widget.SignupLightbox"]){dojo._hasResource["pw.widget.SignupLightbox"]=true;dojo.provide("pw.widget.SignupLightbox");dojo.declare("pw.widget.SignupLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for password reminders.",templateString:"<div>\n\n<div id=\"pw-light-signup\" class=\"pw-rc-light\" ><span class=\"pw-x1\"></span><span class=\"pw-x2\"></span><span class=\"pw-x3\"></span>\n\t<div class=\"pw-light-header\">\n        <ul>\n            <li class=\"pw-l-close\">\n                <a href=\"/\" onclick=\"dojo.publish('pw/modals/signup/hide'); return false;\"><span></span>Close</a>\n            </li>\n            <li class=\"pw-l-login\">\n                Already a member? <a href=\"/signin\" onclick=\"dojo.publish('pw/modals/signup/hide');dojo.publish('pw/modals/signin/show'); return false;\">Log In!</a>\n            </li>\n        </ul>\n    </div>\n    \n    <div  class=\"pw-light-content\">\n        <h3><span></span>Sign Up</h3>\n        <form id=\"signup_form\" class=\"util\" action=\"{{shost}}/signup\" method=\"post\">\n            <fieldset>\n                <ol>\n                    <li id=\"fli-first_name\">\n                        <label for=\"first_name\">First Name:</label>\n                        <input name=\"first_name\" id=\"first_name\" class=\"text\" \n                               value=\"\" type=\"text\" maxlength=\"75\" />\n                    </li>\n                    <li id=\"fli-last_name\">\n                        <label for=\"last_name\">Last Name:</label>\n                        <input name=\"last_name\" id=\"last_name\" class=\"text\" \n                               value=\"\" type=\"text\" maxlength=\"75\" />\n                    </li>\n                    <li id=\"fli-email\">\n                        <label for=\"email\">Email Address:</label>\n                        <input name=\"email\" id=\"email\" class=\"text\" value=\"\" \n                               type=\"text\" maxlength=\"75\" />\n                    </li>\n              </ol>\n            </fieldset>\n            <fieldset>\n              <ol>\n                    <li id=\"fli-password\" >\n                        <label for=\"password\">Password:</label>\n                        <input name=\"password\" id=\"password\" class=\"text\" value=\"\" \n                               type=\"password\" maxlength=\"75\" />\n                    </li>\n                    <li id=\"fli-password_confirm\" >\n                        <label for=\"password_confirm\">Confirm Password:</label>\n                        <input name=\"password_confirm\" id=\"password_confirm\" \n                               class=\"text\" value=\"\" type=\"password\" maxlength=\"75\" />\n                    </li>\n                </ol>\n            </fieldset>\n            <fieldset class=\"pw-fs-permission\">\n                <ol>\n                    <li id=\"fli-newsletter\" class=\"checkbox\">\n                        <input type=\"checkbox\" name=\"newsletter\" id=\"newsletter\" class=\"checkbox\" checked=\"checked\" checked />\n                        <label for=\"newsletter\">\n                            Send me special offers and news about PhotoWorks\n                        </label>\n                    </li>\n                </ol>\n            </fieldset>\n\n\n                <ol  class=\"pw-fs-submit\">\n                    <li id=\"fli-tos\">\n                        <p>By clicking Create Account, \n                        I agree to the <a target=\"_other\" href=\"{{ khost }}/about/terms-of-use\" onclick=\"return pw.popup.terms()\">terms of use</a>.\n                        </p>\n                    </li>\n                    <li id=\"fli-su-submit\">\n                        <input id=\"su-submit\" class=\"button bn-grey-150\" type=\"submit\" value=\"Create Account\" />\n                    </li>\n                </ol>\n        </form>\n        <img src=\"{{imghost}}/pw/merchandising/signup/lightbox_v1.gif\" alt=\"At PhotoWorks, we make it easy to add your favorite photos to great products that are as unique as the memories you want to showcase.\" class=\"pw-signup-promo\" />\n    </div>\n</div>\n\n</div>\n",imghost:imghost,shost:shost,khost:khost,constructor:function(){},postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/signup/show",dojo.hitch(this,this.onOpen));dojo.subscribe("pw/modals/signup/hide",dojo.hitch(this,this.onClose));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.onClose));this.handles=[];},onOpen:function(evt){if(evt){dojo.stopEvent(evt);}this.show();this.wireUp();this.form.first_name.focus();},_onSubmit:function(evt){dojo.stopEvent(evt);this.clearErrors();if(!this.validate(this.form)){return;}if(dojo.byId("pw-signup-format")==null){dojo.create("input",{id:"pw-signup-format",type:"hidden",name:"format",value:"async"},this.form);}var _612=agx.currentPage.controller.submitOK;agx.currentPage.controller.submitOK=this._signUpOK;pw.io.iframe.sendSecure(this.form.id,{load:"agx.currentPage.controller.submitOK",timeout:60,error:"agx.currentPage.controller.signupBAD"});},_signUpOK:function(_613){if(_613.success==true){pw.validators.cleanAllErrors(this.form);if(window.location.href==(ahost+"/")){window.location.href=ahost+"/my-photoworks?uut_event=pw_reg_end";}else{var url=window.location.href;var _615=url.indexOf("?")>0?"&":"?";window.location.href=window.location.href+_615+"uut_event=pw_reg_end";}}else{if(_613.success==false&&dojo.byId("signup-error")==null){var _616=function(_617){var form=dojo.byId("signup_form");dojo.create("div",{id:"signup-error",className:"pw-error",innerHTML:_617},form,"before");};if(_613.type=="CustomerExists"){_616("That email address is already associated with a PhotoWorks account.  If you are already a member, you can <a href='"+ahost+"/signin'>log in now</a>");}else{if(_613.type=="AlreadySignedIn"){location.reload(true);}else{_616("Sorry! There was an unexpected system error when attempting to create your account.  Please try again");}}}}},wireUp:function(){this.form=dojo.byId("signup_form");this.handles.push(dojo.connect(this.form,"onsubmit",dojo.hitch(this,this._onSubmit)));this.ttEmail=new pw.widget.Formtip({connectId:[this.form.email],label:pw.messages.tooltip.email});this.ttPassword=new pw.widget.Formtip({connectId:[this.form.password],label:pw.messages.tooltip.password});},onClose:function(evt){if(evt){dojo.stopEvent(evt);}this.clearErrors();this.hide();dojo.forEach(this.handles,function(_61a){dojo.disconnect(_61a);});this.handles=[];if(this.ttEmail){delete this.ttEmail;}if(this.ttPassword){delete this.ttPassword;}},clearErrors:function(){pw.validators.cleanAllErrors(this.form);if(dojo.byId("signup-error")!=null){dojo.destroy("signup-error");}},validate:function(form){var _61c=pw.validators.signup.profile;var _61d=dojox.validate.check(form,_61c);if(_61d.isSuccessful()){return true;}pw.validators.showErrors(form,_61d,_61c);return false;}});}if(!dojo._hasResource["pw.validators.forgotpassword"]){dojo._hasResource["pw.validators.forgotpassword"]=true;dojo.provide("pw.validators.forgotpassword");dojo.addOnLoad(function(){pw.validators.forgotpassword.profile={fields:["email"],required:["email"],constraints:{email:[agi.validate.isValidEmailAddress]},messages:{email:{missing:"Please enter your email address",invalid:"Please enter a valid email address"}}};});}if(!dojo._hasResource["pw.widget.ForgotPasswordLightbox"]){dojo._hasResource["pw.widget.ForgotPasswordLightbox"]=true;dojo.provide("pw.widget.ForgotPasswordLightbox");dojo.declare("pw.widget.ForgotPasswordLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for password reminders.",templateString:"<div>\n<div id=\"pw-light-forgot\" class=\"pw-rc-light\">\n    <span class=\"pw-x1\"></span><span class=\"pw-x2\"></span><span class=\"pw-x3\"></span>\n\t<div class=\"pw-light-header\">\n        <ul>\n            <li class=\"pw-l-close\"><a href=\".\" onclick=\"dojo.publish('pw/modals/forgot-password/hide'); return false;\">\n                <span></span>Close</a></li>\n            <li class=\"pw-l-login\" id=\"pw-light-forgot-header-signup\">Not a Member? <a href=\"/signin\" onclick=\"dojo.publish('pw/modals/forgot-password/hide'); dojo.publish('pw/modals/signup/show'); return false;\">\n                <span></span>Sign Up!</a></li>\n            <li class=\"pw-l-login\" id=\"pw-light-forgot-header-login\" style=\"display:none;\">\n                <a href=\"/signin\" onclick=\"dojo.publish('pw/modals/forgot-password/hide'); dojo.publish('pw/modals/signin/show'); return false;\">Log In!</a>\n            </li>\n        </ul>\n    </div>\n\n    <div class=\"pw-light-content\">\n        <div  id=\"pw-forgot-form-region\" class=\"pw-light-topp\">\n            <h3><span></span>Forgot Password?</h3>\n            <div id=\"pw-forgot-form-error\" class=\"pw-error\" style=\"display:none;\"><span class=\"pw-erroricon\"></span>\n                <div class=\"pw-error-int\">\n                </div>\n            </div>\n            \n            <p  class=\"pw-light-topp\">Please enter the email address you used to create your account.  We will send your password to this address.</p>\n            <form id=\"pw-forgot-form\" class=\"util\" action=\"/password-reminder\" method=\"post\">\n                <fieldset>\n                    <ol>\n                    <li id=\"fli-email\">\n                        <label for=\"email\">Email Address:</label>\n                        <input name=\"email\" id=\"email\" class=\"text\" value=\"{{email}}\" type=\"text\" maxlength=\"75\" dojoType=\"EmailTextBox\" required=\"true\" trim=\"true\" />\n\n                    </li>\n                    </ol>\n                </fieldset>\n                 <ol class=\"pw-light-buttons-pos pw-clearfix\">\n                    <li class=\"pw-light-save\">\n                       <input type=\"submit\" id=\"forgot-submit\" class=\"button bn-grey-150\" value=\"Send\" />\n                    </li>\n                </ol>   \n            </form>\n        </div>\n\n        <div id=\"pw-forgot-confirmpass-region\" style=\"display:none;\">\n            <h3><span></span>Your password is on its way!</h3>\n            <p>Your password was sent to <span id=\"pw-forgot-confirm-email\"></span>.\n            <ul id=\"pw-forgot-confirmlist\">\n                <li>If you don't receive your password, please check your email's spam filter.</li>\n                <li>Once you receive your password, you can <a id=\"signin-link\" href=\"/signin\">log in</a>.</li>\n            </ul>\n            </p>\n        </div>\n\n    </div>\n</div>\n</div>\n",imghost:imghost,constructor:function(){if(this.email==null){this.email="";}},postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/forgot-password/show",dojo.hitch(this,this.onOpen));dojo.subscribe("pw/modals/forgot-password/hide",dojo.hitch(this,this.onClose));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.onClose));this.handles=[];},show:function(){email_field=dojo.query("#signin_form [name=email]");if(email_field.length!=0){this.email=email_field[0].value;}this.inherited(arguments);},wireUp:function(){this.forgotForm=dojo.byId("pw-forgot-form");this.forgotFormRegion=dojo.byId("pw-forgot-form-region");this.forgotConfirm=dojo.byId("pw-forgot-confirmpass-region");this.forgotError=dojo.byId("pw-forgot-form-error");this.forgotEmailPlaceholder=dojo.byId("pw-forgot-confirm-email");this.headerSignUp=dojo.byId("pw-light-forgot-header-signup");this.headerSignIn=dojo.byId("pw-light-forgot-header-login");this.signinLink=dojo.byId("signin-link");if(!this.forgotForm){return;}this.handles.push(dojo.connect(this.forgotForm,"onsubmit",dojo.hitch(this,this.onFormSubmit)));this.handles.push(dojo.connect(this.signinLink,"onclick",dojo.hitch(this,this.showSignin)));},onOpen:function(_61e){this.show();this.wireUp();this.forgotError.innerHTML="";dojo.style(this.forgotError,{display:"none"});dojo.style(this.forgotFormRegion,{display:""});dojo.style(this.forgotConfirm,{display:"none"});dojo.style(this.headerSignUp,{display:""});dojo.style(this.headerSignIn,{display:"none"});if(_61e!=null){this.forgotForm.email.value=_61e;}},onClose:function(evt){if(evt){dojo.stopEvent(evt);}this.hide();dojo.forEach(this.handles,dojo.disconnect);this.handles=[];},onFormSubmit:function(evt){dojo.stopEvent(evt);var _621=this.validate(this.forgotForm);if(!_621){return;}dojo.xhrPost({url:this.forgotForm.action+"/json",form:this.forgotForm,handleAs:"json",load:dojo.hitch(this,this.onLoadCallback),error:dojo.hitch(this,this.onErrorCallback)});},validate:function(form){var _623=form.email.value;var _624=pw.validators.forgotpassword.profile;var _625=dojox.validate.check(form,_624);if(_625.isSuccessful()){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_624.fields);return true;}pw.validators.showErrors(form,_625,_624);return false;},onLoadCallback:function(data){var _627=data.done;var _628=data.email;this.email=_628;if(!_628){return this.onEmailNotFound(data);}if(!_627){return this.onErrorCallback(data);}var _628=data.email;this.email=_628;dojo.style(this.forgotFormRegion,{display:"none"});dojo.style(this.forgotConfirm,{display:""});dojo.style(this.headerSignUp,{display:"none"});dojo.style(this.headerSignIn,{display:""});this.forgotEmailPlaceholder.innerHTML=_628;this.forgotError.innerHTML="";dojo.style(this.forgotError,{display:"none"});},onErrorCallback:function(data){this.forgotError.innerHTML="There was an error submitting your form."+" Please re-enter your email and try again.";dojo.style(this.forgotError,{display:""});},onEmailNotFound:function(data){pw.validators.addErrorToField(this.forgotForm,"email","This address is not associated with a PhotoWorks account.");dojo.style(this.forgotError,{display:"none"});},showSignin:function(evt){var form=dojo.byId("pw-forgot-form");var _62d=this.email;dojo.stopEvent(evt);dojo.publish("pw/modals/forgot-password/hide");dojo.publish("pw/modals/signin/show",[this.email]);},showSignup:function(evt){dojo.stopEvent(evt);dojo.publish("pw/modals/forgot-password/hide");dojo.publish("pw/modals/signup/show");}});}if(!dojo._hasResource["dojo.html"]){dojo._hasResource["dojo.html"]=true;dojo.provide("dojo.html");(function(){var _62f=0;dojo.html._secureForInnerHtml=function(cont){return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");};dojo.html._emptyNode=dojo.empty;dojo.html._setNodeContent=function(node,cont,_633){if(_633){dojo.html._emptyNode(node);}if(typeof cont=="string"){var pre="",post="",walk=0,name=node.nodeName.toLowerCase();switch(name){case "tr":pre="<tr>";post="</tr>";walk+=1;case "tbody":case "thead":pre="<tbody>"+pre;post+="</tbody>";walk+=1;case "table":pre="<table>"+pre;post+="</table>";walk+=1;break;}if(walk){var n=node.ownerDocument.createElement("div");n.innerHTML=pre+cont+post;do{n=n.firstChild;}while(--walk);dojo.forEach(n.childNodes,function(n){node.appendChild(n.cloneNode(true));});}else{node.innerHTML=cont;}}else{if(cont.nodeType){node.appendChild(cont);}else{dojo.forEach(cont,function(n){node.appendChild(n.cloneNode(true));});}}return node;};dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_63b,node){dojo.mixin(this,_63b||{});node=this.node=dojo.byId(this.node||node);if(!this.id){this.id=["Setter",(node)?node.id||node.tagName:"",_62f++].join("_");}if(!(this.node||node)){new Error(this.declaredClass+": no node provided to "+this.id);}},set:function(cont,_63e){if(undefined!==cont){this.content=cont;}if(_63e){this._mixin(_63e);}this.onBegin();this.setContent();this.onEnd();return this.node;},setContent:function(){var node=this.node;if(!node){}try{node=dojo.html._setNodeContent(node,this.content);}catch(e){var _640=this.onContentError(e);try{node.innerHTML=_640;}catch(e){}}this.node=node;},empty:function(){if(this.parseResults&&this.parseResults.length){dojo.forEach(this.parseResults,function(w){if(w.destroy){w.destroy();}});delete this.parseResults;}dojo.html._emptyNode(this.node);},onBegin:function(){var cont=this.content;if(dojo.isString(cont)){if(this.cleanContent){cont=dojo.html._secureForInnerHtml(cont);}if(this.extractContent){var _643=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_643){cont=_643[1];}}}this.empty();this.content=cont;return this.node;},onEnd:function(){if(this.parseContent){this._parse();}return this.node;},tearDown:function(){delete this.parseResults;delete this.node;delete this.content;},onContentError:function(err){return "Error occured setting content: "+err;},_mixin:function(_645){var _646={},key;for(key in _645){if(key in _646){continue;}this[key]=_645[key];}},_parse:function(){var _648=this.node;try{this.parseResults=dojo.parser.parse(_648,true);}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(type,err,_64b){var _64c=this["on"+type+"Error"].call(this,err);if(_64b){}else{if(_64c){dojo.html._setNodeContent(this.node,_64c,true);}}}});dojo.html.set=function(node,cont,_64f){if(undefined==cont){cont="";}if(!_64f){return dojo.html._setNodeContent(node,cont,true);}else{var op=new dojo.html._ContentSetter(dojo.mixin(_64f,{content:cont,node:node}));return op.set();}};})();}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 _664=[];for(var i=0;i<str.length;i++){_664.push(str.charCodeAt(i));}return _664;},bytes_to_str:function(_666){var str="";dojo.forEach(_666,function(item){str+=String.fromCharCode(item);});return str;}};}if(!dojo._hasResource["agi.cookie.NVP"]){dojo._hasResource["agi.cookie.NVP"]=true;dojo.provide("agi.cookie.NVP");agi.cookie.NVP.getValue=function(data,name,sep,term){var spos,epos;spos=data.indexOf(term+name+sep);if(-1==spos){spos=data.indexOf(name+sep);if(-1==spos){return null;}spos+=name.length+sep.length;}else{spos+=term.length+name.length+sep.length;}epos=data.indexOf(term,spos);if(-1==epos){epos=data.length;}return data.substring(spos,epos);};agi.cookie.NVP.toMap=function(s,_670,sep){var map=[];var _673=s.toString().split(_670);for(var i=0;i<_673.length;i++){var pair=_673[i];if(pair){var data=pair.split(sep);map[unescape(data[0])]=unescape(data[1]);}}return map;};agi.cookie.NVP.fromMap=function(map,_678,sep){var s="";for(var name in map){if(typeof map[name]=="null"){continue;}else{if(typeof map[name]=="function"){continue;}else{s+=escape(name)+sep+escape(map[name])+_678;}}}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 _67c=window.location.hostname.split(".");var idx=_67c.length-2;var tld=_67c.slice(-1);if(tld!="com"&&tld!="net"&&tld!="org"){idx=_67c.length-3;}_67c=_67c.slice(idx);return "."+_67c.join(".");};agi.cookie.AGICookie.getCookieName=function(name){var _680=window.location.hostname.split(".");var _681=name;var hn="";if(_680.length<3){hn="www";}else{hn=_680[0];}dojo.forEach(agi.cookie.AGICookie.SUBHOSTS,function(pair){if(pair[0].test(window.location.hostname)){name+=pair[1];}});dojo.forEach(["dev","vanilla","work","stage"],function(pfx){if(hn.startswith(pfx)){name+="_"+pfx;}});return escape(name);};agi.cookie.AGICookie.getCookieValueRaw=function(name,_686){var c=agi.cookie.AGICookie.getCookie(name);if(typeof c=="null"){return null;}var v=agi.cookie.NVP.getValue(agi.base64.decode(c),_686,"=","&");if(v){return unescape(v);}return v;};agi.cookie.AGICookie.getCookie=function(name){var c=agi.cookie.NVP.getValue(dojo.doc.cookie,agi.cookie.AGICookie.getCookieName(name),"=",";");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(name,_68c,_68d,perm){name=agi.cookie.AGICookie.getCookieName(name);var cki=name+"="+escape(_68c)+";";if(perm){_68d="Thursday, 31-Dec-2037 00:01:00 GMT";}if(_68d){cki=cki+"expires="+_68d+";";}cki=cki+"path=/;domain="+agi.cookie.AGICookie.getCookieDomain();dojo.doc.cookie=cki;};agi.cookie.AGICookie.expireCookie=function(name){agi.cookie.AGICookie.setCookie(name,"","Friday, 01-Jan-99 00:00:00 GMT");};agi.cookie.AGICookie.getCookieValue=function(name,_692){var v=agi.cookie.AGICookie.getCookieValueRaw(name,_692);if(!v&&name=="customer"&&_692=="name"){v=agi.cookie.AGICookie.getCookieValueRaw(name,"email");}if(!v&&name=="customer"&&_692=="name"){v="member";}return v;};agi.cookie.AGICookie.setCookieValue=function(name,_695,_696,_697,perm){var map=null;var c=agi.cookie.AGICookie.getCookie(name);if(c){map=agi.cookie.NVP.toMap(agi.base64.decode(c),"&","=");}else{map=[];}map[_695]=_696;agi.cookie.AGICookie.setCookie(name,agi.base64.encode(agi.cookie.NVP.fromMap(map,"&","=")),_697,perm);};}if(!dojo._hasResource["pw.widget.WelcomeBack"]){dojo._hasResource["pw.widget.WelcomeBack"]=true;dojo.provide("pw.widget.WelcomeBack");dojo.declare("pw.widget.WelcomeBack",[agi.classes.Identified],{node:null,beforeName:"Hi, ",afterName:"!",constructor:function(_69b){_69b=_69b||{};dojo.mixin(this,_69b);this.node=dojo.byId(this.node);},show:function(){if(this.node!=null){var name=agi.cookie.AGICookie.getCookieValue("customer","name");var _69d=this.beforeName+name+this.afterName;dojo.html.set(this.node,_69d);}}});}if(!dojo._hasResource["pw.controllers.Header"]){dojo._hasResource["pw.controllers.Header"]=true;dojo.provide("pw.controllers.Header");dojo.declare("pw.controllers.Header",[agi.classes.Identified],{__doc__:"Controller for standard site header",help_menu_id:"pw-helpdropmenu",myaccount_menu_id:"pw-myaccdropmenu",shop_menu_id:"pw-tb-shop",search_field_id:"pw-search",welcomeback_id:"welcome",constructor:function(){if(dojo.byId(this.welcomeback_id)){this.welcomeback=new pw.widget.WelcomeBack({node:this.welcomeback_id});this.welcomeback.show();}if(dojo.byId(this.help_menu_id)){this.help_menu=new agi.widget.HoverMenu({node:this.help_menu_id,id:this.help_menu_id});}if(dojo.byId(this.myaccount_menu_id)){this.myaccount_menu=new agi.widget.HoverMenu({node:this.myaccount_menu_id,id:this.myaccount_menu_id});}if(dojo.byId(this.shop_menu_id)){this.shop_menu=new agi.widget.HoverMenu({node:this.shop_menu_id,id:this.shop_menu_id});}if(dojo.byId(this.search_field_id)){this.search_field=new agi.widget.ClearField({node:this.search_field_id,id:this.search_field_id,action:"onfocus"});}var _69e={lightboxId:"lightbox",loaderId:"loadingImage",overlayId:"pw-overlay",loadnow:false,width:660,top:35,overflow:""};_69e.lightboxId="lightbox_forgot_password";this.forgotPassword=new pw.widget.ForgotPasswordLightbox(_69e);_69e.lightboxId="lightbox_signup";this.signup=new pw.widget.SignupLightbox(_69e);_69e.lightboxId="lightbox_signin";this.signin=new pw.widget.SigninLightbox(_69e);var _69f=dojo.byId("signin");var _6a0=dojo.byId("signup");if(_69f!=null){dojo.connect(_69f,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show");});}if(_6a0!=null){dojo.connect(_6a0,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signup/show");});}if(dojo.byId("signin")){dojo.query("div#pw-myaccmenu a").forEach(function(_6a3){dojo.connect(_6a3,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show",[{"email":"","url":_6a3.href}]);});});}}});}if(!dojo._hasResource["dojox.validate.web"]){dojo._hasResource["dojox.validate.web"]=true;dojo.provide("dojox.validate.web");dojox.validate.isIpAddress=function(_6a5,_6a6){var re=new RegExp("^"+dojox.validate.regexp.ipAddress(_6a6)+"$","i");return re.test(_6a5);};dojox.validate.isUrl=function(_6a8,_6a9){var re=new RegExp("^"+dojox.validate.regexp.url(_6a9)+"$","i");return re.test(_6a8);};dojox.validate.isEmailAddress=function(_6ab,_6ac){var re=new RegExp("^"+dojox.validate.regexp.emailAddress(_6ac)+"$","i");return re.test(_6ab);};dojox.validate.isEmailAddressList=function(_6ae,_6af){var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_6af)+"$","i");return re.test(_6ae);};dojox.validate.getEmailAddressList=function(_6b1,_6b2){if(!_6b2){_6b2={};}if(!_6b2.listSeparator){_6b2.listSeparator="\\s;,";}if(dojox.validate.isEmailAddressList(_6b1,_6b2)){return _6b1.split(new RegExp("\\s*["+_6b2.listSeparator+"]\\s*"));}return [];};}if(!dojo._hasResource["pw.validators.offersignup"]){dojo._hasResource["pw.validators.offersignup"]=true;dojo.provide("pw.validators.offersignup");dojo.addOnLoad(function(){pw.validators.offersignup.profile={fields:["email"],required:["email"],constraints:{email:[agi.validate.isValidEmailAddress]},messages:{email:{missing:"Please enter a valid email address.",invalid:"Please enter a valid email address."}}};});}if(!dojo._hasResource["dojox.collections._base"]){dojo._hasResource["dojox.collections._base"]=true;dojo.provide("dojox.collections._base");dojox.collections.DictionaryEntry=function(k,v){this.key=k;this.value=v;this.valueOf=function(){return this.value;};this.toString=function(){return String(this.value);};};dojox.collections.Iterator=function(arr){var a=arr;var _6b7=0;this.element=a[_6b7]||null;this.atEnd=function(){return (_6b7>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_6b7++];return this.element;};this.map=function(fn,_6b9){return dojo.map(a,fn,_6b9);};this.reset=function(){_6b7=0;this.element=a[_6b7];};};dojox.collections.DictionaryIterator=function(obj){var a=[];var _6bc={};for(var p in obj){if(!_6bc[p]){a.push(obj[p]);}}var _6be=0;this.element=a[_6be]||null;this.atEnd=function(){return (_6be>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_6be++];return this.element;};this.map=function(fn,_6c0){return dojo.map(a,fn,_6c0);};this.reset=function(){_6be=0;this.element=a[_6be];};};}if(!dojo._hasResource["dojox.collections.Dictionary"]){dojo._hasResource["dojox.collections.Dictionary"]=true;dojo.provide("dojox.collections.Dictionary");dojox.collections.Dictionary=function(_6c1){var _6c2={};this.count=0;var _6c3={};this.add=function(k,v){var b=(k in _6c2);_6c2[k]=new dojox.collections.DictionaryEntry(k,v);if(!b){this.count++;}};this.clear=function(){_6c2={};this.count=0;};this.clone=function(){return new dojox.collections.Dictionary(this);};this.contains=this.containsKey=function(k){if(_6c3[k]){return false;}return (_6c2[k]!=null);};this.containsValue=function(v){var e=this.getIterator();while(e.get()){if(e.element.value==v){return true;}}return false;};this.entry=function(k){return _6c2[k];};this.forEach=function(fn,_6cc){var a=[];for(var p in _6c2){if(!_6c3[p]){a.push(_6c2[p]);}}dojo.forEach(a,fn,_6cc);};this.getKeyList=function(){return (this.getIterator()).map(function(_6cf){return _6cf.key;});};this.getValueList=function(){return (this.getIterator()).map(function(_6d0){return _6d0.value;});};this.item=function(k){if(k in _6c2){return _6c2[k].valueOf();}return undefined;};this.getIterator=function(){return new dojox.collections.DictionaryIterator(_6c2);};this.remove=function(k){if(k in _6c2&&!_6c3[k]){delete _6c2[k];this.count--;return true;}return false;};if(_6c1){var e=_6c1.getIterator();while(e.get()){this.add(e.element.key,e.element.value);}}};}if(!dojo._hasResource["agi.widget.BusyOverlay"]){dojo._hasResource["agi.widget.BusyOverlay"]=true;dojo.provide("agi.widget.BusyOverlay");dojo.declare("agi.widget.BusyOverlay",[agi.classes.Identified],{overlayId:"agi-lookbusy-overlay",overlayClass:"inprogress",applyClass:null,spinnerId:"spinner",smallSpinner:{src:imghost+"/ag/reminders/loader.swf",height:32,width:32,cache:null},mediumSpinner:{src:imghost+"/ag/reminders/loader.swf",height:64,width:64,cache:null},largeSpinner:{src:imghost+"/ag/reminders/loader.swf",height:128,width:128,cache:null},bgiframe:null,spinnerData:null,constructor:function(_6d4){dojo.mixin(this,_6d4);},prep:function(size){var _6d6=this.createSpinner(size);return _6d6;},show:function(node,size,_6d9){node=dojo.byId(node);this.node=node;var _6da=this.createOverlay(node);this.bgiframe=new dijit.BackgroundIframe(_6da);var _6db=this.createSpinner(size);this.positionSpinner(_6db,_6da,node);if(_6d9){dojo.style(dojo.body(),"cursor","wait");}var _6dc=dojo.hitch(this,this.hide);if(this.applyClass){dojo.addClass(node,this.applyClass);}return _6dc;},hide:function(){var _6dd=dojo.byId(this.overlayId);dojo.style(_6dd,"display","none");if(this.applyClass&&this.node){dojo.removeClass(this.node,this.applyClass);}dojo.style(dojo.body(),"cursor","auto");_6dd.parentNode.removeChild(_6dd);if(this.bgiframe!=null){this.bgiframe.destroy();this.bgiframe=null;}},createOverlay:function(node){var _6df;if(node==dojo.body()){_6df=dojo.coords(node,false);}else{_6df=dojo.coords(node,true);}_6df.y-=dojo.style(node,"marginTop");var _6e0=dojo.create("div",{id:this.overlayId},dojo.body());dojo.style(_6e0,{position:"absolute",width:_6df.w+"px",height:_6df.h+"px",left:_6df.x+"px",top:_6df.y+"px",zIndex:2000});dojo.addClass(_6e0,this.overlayClass);return _6e0;},createSpinner:function(size){var _6e2;var _6e3=this._getSpinner(size);if(_6e3.cache){_6e2=_6e3.cache;}else{if(_6e3.src.endswith(".swf")){_6e2=this._createSpinnerSwf(_6e3);}else{_6e2=this._createSpinnerImg(_6e3);}_6e3.cache=_6e2;}dojo.style(_6e2,{display:"none",visibility:"hidden"});return _6e2;},positionSpinner:function(_6e4,_6e5,_6e6){var _6e7;if(_6e6==dojo.body()){_6e7=dijit.getViewport();}else{_6e7=dojo.coords(_6e5,true);}spinnerData=this.spinnerData;var _6e8=(_6e7.h-spinnerData.height)/2;var _6e9=(_6e7.w-spinnerData.width)/2;dojo.place(_6e4,_6e5);dojo.style(_6e4,{display:"block",position:"relative",visibility:"visible",top:_6e8+"px",left:_6e9+"px"});return _6e4;},_getSpinner:function(size){var _6eb={};switch(size){case ("small"):_6eb=this.smallSpinner;break;case ("medium"):_6eb=this.mediumSpinner;break;case ("large"):default:_6eb=this.largeSpinner;break;}this.spinnerData=_6eb;return _6eb;},_createSpinnerSwf:function(_6ec){var _6ec=dojo.create("embed",{id:this.spinnerId,name:"FlashProduct",src:_6ec.src,swLiveConnect:true,width:_6ec.width,height:_6ec.height,scale:"noborder",quality:"high",type:"application/x-shockwave-flash",pluginspace:"http://www.macromedia.com/go/getflashplayer",wmode:"transparent"},dojo.body());dojo.style(_6ec,"left","-9999px");return _6ec;},_createSpinnerImg:function(_6ed){var _6ed=dojo.create("img",{id:this.spinnerId,src:_6ed.src,width:_6ed.width,height:_6ed.height},dojo.body());dojo.style(_6ed,"left","-9999px");return _6ed;}});}if(!dojo._hasResource["pw.widget.BusyOverlay"]){dojo._hasResource["pw.widget.BusyOverlay"]=true;dojo.provide("pw.widget.BusyOverlay");dojo.declare("pw.widget.BusyOverlay",[agi.widget.BusyOverlay],{overlayId:"pw-lookbusy-overlay",applyClass:"pw-progresson",smallSpinner:{src:imghost+"/pw/element/inProgress_animation.swf",height:46,width:46},mediumSpinner:{src:imghost+"/pw/element/inProgress_animation.swf",height:93,width:93},largeSpinner:{src:imghost+"/pw/element/inProgress_animation.swf",height:137,width:137}});}if(!dojo._hasResource["pw.widget.OfferSignup"]){dojo._hasResource["pw.widget.OfferSignup"]=true;dojo.provide("pw.widget.OfferSignup");dojo.declare("pw.widget.OfferSignup",[agi.classes.Identified,agi.classes.Adopter],{__doc__:"Widget for subscribing to newsletter",imghost:imghost,offerForm:null,panes:null,constructor:function(){this.busy=new pw.widget.BusyOverlay();this.offerPane=dojo.byId("pw-offeremail-pane");this.offerForm=dojo.byId("offeremail");if(this.offerPane===null){return;}if(this.offerForm===null){return;}dojo.connect(this.offerForm,"onsubmit",this,dojo.hitch(this,this.onSubscribe));this.panes=new dojox.collections.Dictionary();this.panes.add("form",this.offerForm);this.panes.add("loading",dojo.create("div",{className:"",innerHTML:""},this.offerPane));this.panes.add("success",dojo.create("div",{className:"",innerHTML:""},this.offerPane));this.panes.add("error",dojo.create("div",{className:"",innerHTML:""},this.offerPane));},onSubscribe:function(evt){dojo.stopEvent(evt);var _6ef=this.validate(this.offerForm);if(!_6ef){return;}this.busy.show(this.offerPane,"small");dojo.xhrPost({url:this.offerForm.action+"/json",form:this.offerForm,handleAs:"json",load:dojo.hitch(this,this.onLoadCallback),error:dojo.hitch(this,this.onErrorCallback)});this.showInProgress();},validate:function(form){var _6f1=form.email.value;var _6f2=pw.validators.offersignup.profile;var _6f3=dojox.validate.check(form,_6f2);if(_6f3.isSuccessful()){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_6f2.fields);return true;}pw.validators.showErrors(form,_6f3,_6f2);return false;},onLoadCallback:function(data){var _6f5=data.success;if(!_6f5){return this.onErrorCallback(data);}this.showConfirm();this.busy.hide();},onErrorCallback:function(data){this.showError("There was an error submitting your form."+" Please re-enter your email and try again.");this.busy.hide();},hideAll:function(){this.panes.forEach(function(_6f7){var pane=_6f7.value;dojo.style(pane,{"display":"none"});});},hidePartial:function(){dojo.style("pw-offerinput",{"display":"none"});dojo.style("pw-offersubmit",{"display":"none"});dojo.style("pw-offerform",{"display":""});dojo.style("offeremail",{"display":""});},showPane:function(id,text){var pane=this.panes.item(id);dojo.style(pane,{display:""});pane.innerHTML=text;},showInProgress:function(){this.hidePartial();pw.validators.deleteErrorMessages("offeremail");this.showPane("loading","Loading...");},showConfirm:function(){this.hidePartial();this.showPane("loading","");this.showPane("success","<div id=\"pw-offersuccess\" class=\"\">Thank you for subscribing to our email. Welcome to PhotoWorks!</div>");},showError:function(_6fc){this.hideAll();this.showPane("error",_6fc);}});}if(!dojo._hasResource["pw.controllers.Footer"]){dojo._hasResource["pw.controllers.Footer"]=true;dojo.provide("pw.controllers.Footer");dojo.declare("pw.controllers.Footer",[agi.classes.Identified],{__doc__:"Controller for standard site footer",offeremail_field_id:"pw-offerinput",constructor:function(){if(dojo.byId(this.offeremail_field_id)){this.offeremail_field=new agi.widget.ClearField({node:this.offeremail_field_id,id:this.offeremail_field_id,action:"onfocus"});this.offerEmailWidget=new pw.widget.OfferSignup();}}});}if(!dojo._hasResource["agi.cookie.MagicCookie"]){dojo._hasResource["agi.cookie.MagicCookie"]=true;dojo.provide("agi.cookie.MagicCookie");agi.cookie.MagicCookie.setCookieValue=function(_6fd,_6fe,perm){var name=perm?"mc_p":"mc_s";return agi.cookie.AGICookie.setCookieValue(name,_6fd,_6fe,null,perm);};agi.cookie.MagicCookie.getCookieValue=function(_701){var _702=agi.cookie.AGICookie.getCookieValue("mc_s",_701);if(!_702){_702=agi.cookie.AGICookie.getCookieValue("mc_p",_701);}return _702;};agi.cookie.MagicCookie.delCookieValue=function(_703,perm){return agi.cookie.MagicCookie.setCookieValue(_703,null,perm);};}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");};}if(!dojo._hasResource["agi.cookie"]){dojo._hasResource["agi.cookie"]=true;dojo.provide("agi.cookie");}if(!dojo._hasResource["agi.storage.TempStorage"]){dojo._hasResource["agi.storage.TempStorage"]=true;dojo.provide("agi.storage.TempStorage");dojo.provide("agi.storage.windowstorage");agi.storage._getCurrentTimeStamp=function(){return new Date().getTime();};agi.storage.windowstorage={get:function(key){try{var data=dojo.fromJson(window.name);}catch(e){window.name="{}";var data={};}if(typeof data!="undefined"){return data[key];}},put:function(key,_708,_709){try{var data=dojo.fromJson(window.name);}catch(e){var data={};}if(typeof data=="undefined"){var data={};}data[key]=_708;window.name=dojo.toJson(data);if(typeof _709!="undefined"){_709();}}};dojo.declare("agi.storage.TempStorage",[agi.classes.Identified],{force_reload:false,initialized:false,data:null,sid:null,constructor:function(_70b){this.data={};this.force_reload=_70b;this.sid=agi.cookie.MagicCookie.getCookieValue("psid");this.initialize();},initialize:function(){this.data=agi.storage.windowstorage.get(this.sid);if(!this.data||this.force_reload){this.data={};this.save();}this.initialized=true;dojo.publish("agi/tempstorage/initialized");},get:function(key){return this.data[key]||null;},set:function(key,_70e){this.data["filler"]=null;this.data[key]=_70e;this.save();},remove:function(key){delete this.data[key];this.save();},save:function(){agi.storage.windowstorage.put(this.sid,this.data,this.onsuccess);},clear:function(){this.data={};this.save();},onsuccess:function(_710,key,_712){}});}if(!dojo._hasResource["dojo.behavior"]){dojo._hasResource["dojo.behavior"]=true;dojo.provide("dojo.behavior");dojo.behavior=new function(){function arrIn(obj,name){if(!obj[name]){obj[name]=[];}return obj[name];};var _inc=0;function forIn(obj,_717,func){var _719={};for(var x in obj){if(typeof _719[x]=="undefined"){if(!func){_717(obj[x],x);}else{func.call(_717,obj[x],x);}}}};this._behaviors={};this.add=function(_71b){var _71c={};forIn(_71b,this,function(_71d,name){var _71f=arrIn(this._behaviors,name);if(typeof _71f["id"]!="number"){_71f.id=_inc++;}var _720=[];_71f.push(_720);if((dojo.isString(_71d))||(dojo.isFunction(_71d))){_71d={found:_71d};}forIn(_71d,function(rule,_722){arrIn(_720,_722).push(rule);});});};var _723=function(node,_725,_726){if(dojo.isString(_725)){if(_726=="found"){dojo.publish(_725,[node]);}else{dojo.connect(node,_726,function(){dojo.publish(_725,arguments);});}}else{if(dojo.isFunction(_725)){if(_726=="found"){_725(node);}else{dojo.connect(node,_726,_725);}}}};this.apply=function(){forIn(this._behaviors,function(_727,id){dojo.query(id).forEach(function(elem){var _72a=0;var bid="_dj_behavior_"+_727.id;if(typeof elem[bid]=="number"){_72a=elem[bid];if(_72a==(_727.length)){return;}}for(var x=_72a,tver;tver=_727[x];x++){forIn(tver,function(_72e,_72f){if(dojo.isArray(_72e)){dojo.forEach(_72e,function(_730){_723(elem,_730,_72f);});}});}elem[bid]=_727.length;});});};};dojo.addOnLoad(dojo.behavior,"apply");}if(!dojo._hasResource["pw.upload.Upload"]){dojo._hasResource["pw.upload.Upload"]=true;dojo.provide("pw.upload.Upload");dojo.declare("pw.upload.Upload",[agi.classes.Adopter],{REDIRECT_COOKIE:"uplredir",UPLOAD_HREF:"/upload/",ALBUMS_BASE_HREF:"/my-photoworks/albums/",MY_PHOTOWORKS_HREF:"/my-photoworks/",constructor:function(_731){},wireUp:function(){dojo.query("a.upload_link").connect("onclick",this,this.uploadLinkHandler);},uploadLinkHandler:function(evt){dojo.stopEvent(evt);this.upload();return false;},upload:function(_733,_734){if(!_733){_733=window.location.href;}if(!_734){_734=null;}agi.cookie.MagicCookie.setCookieValue(this.REDIRECT_COOKIE,_733,false);if(_734!=null){window.location.href=this.UPLOAD_HREF+"?osource="+encodeURIComponent(_734);}else{window.location.href=this.UPLOAD_HREF;}},resume:function(_735){var _736=agi.cookie.MagicCookie.getCookieValue(this.REDIRECT_COOKIE);if(_736){agi.cookie.MagicCookie.delCookieValue(this.REDIRECT_COOKIE,false);}else{if(_735){_736=ahost+this.ALBUMS_BASE_HREF+_735;}else{_736=ahost+this.MY_PHOTOWORKS_HREF;}}window.location.href=_736;},hasReturnPoint:function(){return !!agi.cookie.MagicCookie.getCookieValue(this.REDIRECT_COOKIE);}});}if(!dojo._hasResource["pw.livechat"]){dojo._hasResource["pw.livechat"]=true;dojo.provide("pw.livechat");pw.livechat.url="chat.imgag.com";pw.livechat.channels={"book":"RXWve41025006","prints":"9uPIBF1201106","cards":"eMJjo01201104","calendars":"eMJjo01201104","gifts":"eMJjo01201104","upload":"qOD5cz1232724","checkout":"zYBWRO1201138","myphotoworks":"0Cla5O1201136","mystorefront":"0Cla5O1201136"};pw.livechat.getChannel=function(){var path=window.location.pathname;if(path.contains("/cart")||path.contains("/checkout")){return pw.livechat.channels["checkout"];}else{if(path.contains("/create/photo-gifts")){return pw.livechat.channels["gifts"];}else{if(path.contains("/create/photo-books")){return pw.livechat.channels["book"];}else{if(path.contains("/photo-prints")){return pw.livechat.channels["prints"];}else{if(path.contains("/upload")){return pw.livechat.channels["upload"];}}}}}return pw.livechat.channels["myphotoworks"];};dojo.declare("pw.livechat.KanaLiveChat",[agi.classes.Identified],{gIChannelID:"Default",gServer:"responselive03.kanaondemand.com",gAttachedData:"<Sample Test>",bEnterOnQueuePage:false,prefillValues:{CUSTOMER_NAME:"",CUSTOMER_QUERY:"",CUSTOMFIELD1:""},agentOnlyValues:{PAGE_URL:"www.photoworks.com",PAGE_TITLE:"PhotoWorks Homepage",CUSTOMER_ID:"PhotoWorks Customer"},HBUsePageContents:false,gUseDynamicStartPage:true,gDSPLauncherPageName:"./responseLiveLauncher.html",gChatWindowWidth:400,gChatWindowHeight:500,gChatWindowProperties:"width="+400+",height="+500+",menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars=auto,resizable=yes,screenX=10,screenY=10,left=10,top=10",gHTTP:"http://",gHTTPS:"https://",constructor:function(_738){dojo.mixin(this,_738);if(_738.prefill){for(var k in _738.prefill){if(_738.prefill[k]){this.prefillValues[k]=_738.prefill[k];}}}if(_738.agentOnly){for(var k in _738.agentOnly){if(_738.agentOnly[k]){this.agentOnlyValues[k]=_738.agentOnly[k];}}}},startChat:function(){this._startChat(this.gIChannelID,this.gServer,this.gAttachedData,this.prefillValues,this.agentOnlyValues,this.bEnterOnQueuePage);},startChatAndCobrowse:function(){this._startChatAndCobrowse(this.gIChannelID,this.gServer,this.gAttachedData,this.prefillValues,this.agentOnlyValues,this.bEnterOnQueuePage);},startChatWithEscalation:function(){this._startChatWithEscalation(this.gIChannelID,this.gServer,this.gAttachedData,this.prefillValues,this.agentOnlyValues,this.bEnterOnQueuePage);},_startChat:function(_73a,_73b,_73c,_73d,_73e,_73f){var _740="CHAT_ONLY";this.launchChat(_73a,_73b,_73c,_73d,_73e,_73f,_740);},_startChatAndCobrowse:function(_741,_742,_743,_744,_745,_746){var _747="COBROWSE";this.launchChat(_741,_742,_743,_744,_745,_746,_747);},_startChatWithEscalation:function(_748,_749,_74a,_74b,_74c,_74d){var _74e="COBROWSE_ESCALATION";this.launchChat(_748,_749,_74a,_74b,_74c,_74d,_74e);},launchChat:function(_74f,_750,_751,_752,_753,_754,_755){this.openInitialWindow();this.finishLaunchingChat(_74f,_750,_751,_752,_753,_754,_755);},finishLaunchingChat:function(_756,_757,_758,_759,_75a,_75b,_75c){var _75d=this.getChatWindow();this.saveChatParameters(_75d,_756,_757,_758,_759,_75a,_75b,_75c);if(this.alreadyConavigating()){this.handleRecursiveLaunch(_756,_757,_75d);return;}if(this.browserDoesNotSupportDOM2()||this.isIEonMac()){this.handleUnsupportedBrowser(_756,_757,_75d);return;}if(!this.areCookiesEnabled()){this.handleDisabledCookies(_756,_757,_75d);return;}if(window.location.protocol=="https:"){this.createAndSubmitForm();}else{this.checkSSLEnabledAndSubmit(_756,_757);}},createAndSubmitForm:function(){var _75e=this.getChatWindow();var _75f=this.createForm(_75e.serverName,_75e);if(typeof (this.gUseDynamicStartPage)!="undefined"&&this.gUseDynamicStartPage){this.addFormField(_75f,_75e,"DSP_LAUNCHER_PAGE_NAME",this.gDSPLauncherPageName);}this.addFormField(_75f,_75e,"CHAT_WINDOW_WIDTH",this.gChatWindowWidth);this.addFormField(_75f,_75e,"CHAT_WINDOW_PROPERTIES",this.gChatWindowProperties);this.addFormField(_75f,_75e,"ICHANNEL_ID",_75e.iChannel);this.addFormField(_75f,_75e,"ATTACHED_DATA",_75e.attachedData);this.addFormField(_75f,_75e,"ENTER_ON_QUEUE_PAGE",_75e.enterOnQueuePage);this.addFormField(_75f,_75e,"CHAT_LAUNCH_MODE",_75e.chatLaunchMode);this.addFormField(_75f,_75e,"AGENT_VISIBLE_DATA",this.createAgentVisibleDataString(_75e.agentOnlyValues));this.addFormField(_75f,_75e,"REFERRER_URL",window.location.href);var _760=_75e.prefillValues;for(prefillItem in _760){this.addFormField(_75f,_75e,prefillItem,_760[prefillItem]);}_75f.submit();},openInitialWindow:function(){var _761=window.open("",this.getChatWindowName(),this.getWinProperties());_761.document.write("<html><body></body></html>");_761.document.close();this.setChatWindow(_761);this.origChatWindow=_761;},createForm:function(_762,win){var _764=win.document.createElement("form");_764.method="post";_764.target="_self";_764.action=this.gHTTPS+_762+"/CONAV/CHAT/ChatPreLaunch";win.document.body.appendChild(_764);return _764;},DATA_SEPARATOR:"_HB_",createAgentVisibleDataString:function(_765){var _766="";for(agentItem in _765){if(this.isNonEmptyString(_766)){_766+=this.DATA_SEPARATOR;}_766+=agentItem+this.DATA_SEPARATOR+_765[agentItem];}return _766;},addFormField:function(_767,win,name,_76a){if(!this.isNonEmptyString(name)||!this.isNonEmptyString(_76a)){return;}var _76b=win.document.createElement("input");_76b.type="hidden";_76b.name=name;_76b.value=_76a;_767.appendChild(_76b);},alreadyConavigating:function(){return (typeof (isHipboneSharedWindow)!="undefined");},handleRecursiveLaunch:function(_76c,_76d,win){win.location.href=this.gHTTPS+_76d+"/CONAV/chat/errorpages/recursiveConav.jsp?ICHANNEL_ID="+_76c;},browserDoesNotSupportDOM2:function(){return (null==document.getElementById);},handleUnsupportedBrowser:function(_76f,_770,win){win.location.href=this.gHTTPS+_770+"/CONAV/CHAT/ChatPreLaunch?ICHANNEL_ID="+_76f;},areCookiesEnabled:function(){var time=(new Date()).getTime();this.setTestCookie(time);if(this.theCookieIsSet(time)){this.removeTestCookie(time);return true;}return false;},setTestCookie:function(_773){document.cookie="hbcookietest="+_773;},theCookieIsSet:function(_774){var _775=document.cookie;return (this.isNonEmptyString(_775)&&_775.indexOf(_774)>-1);},removeTestCookie:function(_776){document.cookie="hbcookietest="+_776+"; expires=Fri, 02-Jan-1970 00:00:00 GMT";},handleDisabledCookies:function(_777,_778,win){win.location.href=this.gHTTP+_778+"/CONAV/chat/errorpages/cookiesDisabled.jsp?ICHANNEL_ID="+_777;},checkSSLEnabledAndSubmit:function(_77a,_77b){this.createAndSubmitForm();var _77c=new Image(1,1);_77c.onerror=dojo.hitch(this,function(){this.handleChatNoSSL(_77a,_77b);});_77c.src=this.gHTTPS+_77b+"/CONAV/HTD/Default/shared/images/blank.gif?time="+(new Date()).getTime();},handleChatNoSSL:function(_77d,_77e){var link=this.gHTTP+_77e+"/CONAV/chat/errorpages/sslDisabled.jsp?ICHANNEL_ID="+_77d;window.open(link,this.getChatWindowName(),this.getWinProperties());this.getChatWindow().close();},saveChatParameters:function(_780,_781,_782,_783,_784,_785,_786,_787){_780.iChannel=_781;_780.serverName=_782;_780.attachedData=_783;_780.prefillValues=_784;_780.agentOnlyValues=_785;_780.enterOnQueuePage=_786;_780.chatLaunchMode=_787;},setAOLChatWindow:function(_788){this.setChatWindow(_788);this.finishLaunchingChat(iChannel,serverName,attachedData,prefillValues,agentOnlyValues,enterOnQueuePage,chatLaunchMode);},gChatLaunchWindow:null,setChatWindow:function(_789){window.gChatLaunchWindow=_789;},getChatWindow:function(){return window.gChatLaunchWindow;},getChatWindowName:function(){return "_blank";},getWinProperties:function(){return this.gChatWindowProperties;},isAOL:function(){return (navigator.appVersion.toLowerCase().indexOf("aol")!=-1);},isInternetExplorer:function(){return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1);},isMacKana:function(){return (navigator.userAgent.toLowerCase().indexOf("mac")!=-1);},isIEonMac:function(){return (this.isInternetExplorer()&&this.isMacKana());},isNonEmptyString:function(str){if(null==str||str==""){return false;}return true;},goToAfterLaunchUrl:function(){if(typeof (window.gAfterLaunchURL)=="undefined"){return;}window.location.href=window.gAfterLaunchURL;}});}if(!dojo._hasResource["pw.widget.NoChatLightbox"]){dojo._hasResource["pw.widget.NoChatLightbox"]=true;dojo.provide("pw.widget.NoChatLightbox");dojo.declare("pw.widget.NoChatLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{templateString:"<div>\n\t<div id=\"pw-light-chat-unavailable\" class=\"pw-rc-light\" style=\"position: absolute; top: -20px;\">\n\t\t<div class=\"pw-light-header\">\n\t\t\t<ul>\n\t\t\t\t<li class=\"pw-l-close\">\n\t\t\t\t\t<a href=\".\" onclick=\"dojo.publish('pw/modals/nochat/hide');return false;\">\n\t\t\t\t\t<span></span>Close</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"pw-light-content\">\n\t\t\t<div id=\"pw-chatun-image\">\n\t\t\t\t<img src=\"{{imghost}}/pw/help/chat_unavailable.jpg\" width=\"193\" height=\"80\" alt=\"Live Chat unavailable\" title=\"\" />\n\t\t\t</div>\n\t\t\t<div id=\"pw-chatun-text\">\n\t\t\t\t<p>We're sorry. Chat is unavailable at this time.</p>\n\t\t\t\t<p>For information regarding hours Chat is available, please click the Help link below.</p>\n\t\t\t\t<p id=\"pw-chatun-links\">Please check our online <a href=\"/help\" target=\"_blank\">Help</a> or <a href=\"/help/email-us\" target=\"_blank\">email us</a>.</p>\n\t\t\t</div>        \n\t\t</div>\n\t</div>\n</div>\n",imghost:imghost,postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/nochat/show",dojo.hitch(this,this.show));dojo.subscribe("pw/modals/nochat/hide",dojo.hitch(this,this.hide));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.hide));}});}if(!dojo._hasResource["pw.controllers.KanaLiveChat"]){dojo._hasResource["pw.controllers.KanaLiveChat"]=true;dojo.provide("pw.controllers.KanaLiveChat");dojo.declare("pw.controllers.KanaLiveChat",[agi.classes.Identified],{url:"/help/is-chat-available",constructor:function(){this.nochat=new pw.widget.NoChatLightbox({lightboxId:"lightbox",loaderId:"loadingImage",overlayId:"pw-overlay",loadnow:false,width:604,height:111,overflow:""});dojo.subscribe("pw/livechat/show",dojo.hitch(this,this.openChat));},openChat:function(_78b){if(_78b!=null){this.startChat(_78b);}else{this.checkServer();}},checkServer:function(){dojo.xhrGet({url:this.url,handleAs:"json",load:dojo.hitch(this,this.checkedServer),sync:true});},checkedServer:function(_78c,_78d){var _78e=_78c.enabled;this.startChat(_78e);},startChat:function(_78f){if(_78f){var _790={};_790.gIChannelID=pw.livechat.getChannel();_790.gServer=pw.livechat.url;var _791=agi.cookie.AGICookie.getCookieValue("customer","email");var name=agi.cookie.AGICookie.getCookieValue("customer","name");var _793=agi.cookie.AGICookie.getCookieValue("customer","guest");if(_791&&!_793){_790.prefill={"CUSTOMER_NAME":name,"CUSTOMER_EMAIL":_791};}_790.agentOnly={"CUSTOMER_ID":_791,"PAGE_URL":window.location,"PAGE_TITLE":document.title};this.chat=new pw.livechat.KanaLiveChat(_790);this.chat.startChatWithEscalation();}else{this.nochat.show();}}});}if(!dojo._hasResource["agi.widget.HoverItem"]){dojo._hasResource["agi.widget.HoverItem"]=true;dojo.provide("agi.widget.HoverItem");agi.widget.hoverItems=[];dojo.declare("agi.widget.HoverItem",[agi.classes.Identified],{node:null,idx:0,className:"hover",cxn_handles:[],constructor:function(_794){_794=_794||{};dojo.mixin(this,_794);this.init();},init:function(){this.node=dojo.byId(this.node);agi.widget.hoverItems.push(this.node);this.idx=agi.widget.hoverItems.length-1;var _795="onmouseover";var _796="onmouseout";if(dojo.isIE==6){_795="onmouseenter";_796="onmouseleave";}this.cxn_handles.push(dojo.connect(this.node,_795,dojo.hitch(this,this.hover)),true);this.cxn_handles.push(dojo.connect(this.node,_796,dojo.hitch(this,this.unhover)),true);},hover:function(evt){dojo.addClass(this.node,this.className);},unhover:function(evt){dojo.removeClass(this.node,this.className);}});}if(!dojo._hasResource["pw.controllers.StandardPage"]){dojo._hasResource["pw.controllers.StandardPage"]=true;dojo.provide("pw.controllers.StandardPage");dojo.declare("pw.controllers.StandardPage",[agi.classes.Identified],{header:null,footer:null,tempstorage:null,constructor:function(){this.tempstorage=new agi.storage.TempStorage();this.header=new pw.controllers.Header();this.footer=new pw.controllers.Footer();this.livechat=new pw.controllers.KanaLiveChat();var _799=new pw.upload.Upload();_799.wireUp();this.applyIEHovers();this.setNavpathCookie();},applyIEHovers:function(){if(dojo.isIE==6){dojo.query(".pw-mypw-thumb").forEach(dojo.hitch(this,function(node){var _79b=new agi.widget.HoverItem({node:node,className:"pw-mypw-thumb-hover"});}));}},setNavpathCookie:function(){var _79c=agx.currentPage.navpath;if(_79c){agi.cookie.MagicCookie.setCookieValue("navpath",_79c,false);}},submitOK:function(){window.location.reload();},loginBAD:function(){var form=dojo.byId("signin_form");pw.validators.deleteErrorMessages(form);pw.validators.setErrorClasses(["email","password"]);if(dojo.byId("login-error")==null){dojo.create("div",{id:"login-error",className:"pw-error",innerHTML:"There was a problem with the connection to the server.  Your request may have timed out.  Please try again."},form,"before");}},signupBAD:function(){var form=dojo.byId("signup_form");pw.validators.deleteErrorMessages(form);pw.validators.setErrorClasses(["first_name","last_name","email","password","password_confirm"]);if(dojo.byId("signup-error")==null){dojo.create("div",{id:"signup-error",className:"pw-error",innerHTML:"There was a problem with the connection to the server.  Your request may have timed out.  Please try again."},form,"before");}}});}if(!dojo._hasResource["pw.widget.ConfirmationLightbox"]){dojo._hasResource["pw.widget.ConfirmationLightbox"]=true;dojo.provide("pw.widget.ConfirmationLightbox");dojo.declare("pw.widget.ConfirmationLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for confirmations.",templateString:"<div>\n<div id=\"pw-light-confirm\" class=\"pw-rc-light\">\n    <span class=\"pw-x1\"></span><span class=\"pw-x2\"></span><span class=\"pw-x3\"></span>\n    <div class=\"pw-light-header\">\n        <ul>\n            <li class=\"pw-l-close\">\n                <a href=\".\" onclick=\"dojo.publish('pw/modals/confirm/hide');\n                                     return false;\">\n                <span></span>Close</a>\n            </li>\n        </ul>\n    </div>\n    \n    <div class=\"pw-light-content\">\n        <h3><span></span>Confirmation</h3>\n        <p id=\"pw-message\">\n        </p> \n        <div id=\"pw-update-form-region\">\n            <form id=\"confirm-form\" action=\"\" method=\"post\">\n                 <ol class=\"pw-light-buttons-posr pw-clearfix\">\n                    <li class=\"pw-light-save\">\n                        <input type=\"submit\" value=\"\" id=\"pw-continue-submit\" class=\"button bn-grey-125\" />\n                    </li>\n                    <li class=\"pw-light-cancel\">\n                       <a href=\".\" onclick=\"dojo.publish('pw/modals/confirm/hide'); return false;\">Cancel</a>\n                    </li>\n                </ol>    \n            </form>\n        </div>\n    </div>\n</div>\n</div>\n",imghost:imghost,constructor:function(){},postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/confirm/show",dojo.hitch(this,this.onOpen));dojo.subscribe("pw/modals/confirm/hide",dojo.hitch(this,this.onClose));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.onClose));this.handles=[];},onOpen:function(info){this.show();this.wireUp();var form=dojo.byId("confirm-form");this.action=form.action=info.action;dojo.byId("pw-continue-submit").value=info.button;dojo.byId("pw-message").innerHTML=info.message;},_onSubmit:function(evt){dojo.stopEvent(evt);window.location=ahost+this.action;},wireUp:function(){this.form=dojo.byId("confirm-form");this.handles.push(dojo.connect(this.form,"onsubmit",dojo.hitch(this,this._onSubmit)));},onClose:function(evt){this.onCancel();if(evt){dojo.stopEvent(evt);}this.hide();dojo.forEach(this.handles,function(_7a3){dojo.disconnect(_7a3);});this.handles=[];},onCancel:function(){method=agx.currentPage.uploadMethod;if(method=="advanced"){dojo.style("pw-upload-applet","visibility","visible");}}});}if(!dojo._hasResource["pw.widget.DeleteConfirmationLightbox"]){dojo._hasResource["pw.widget.DeleteConfirmationLightbox"]=true;dojo.provide("pw.widget.DeleteConfirmationLightbox");dojo.declare("pw.widget.DeleteConfirmationLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for deleting an album.",templateString:"<div>\n<div id=\"{{ div_id }}\" class=\"pw-rc-light\">\n    <span class=\"pw-x1\"></span><span class=\"pw-x2\"></span><span class=\"pw-x3\"></span>\n    <div class=\"pw-light-header\">\n        <ul>\n            <li class=\"pw-l-close\">\n                <a href=\".\" onclick=\"dojo.publish('pw/modals/delete_confirm/hide');\n                                     return false;\">\n                <span></span>Close</a>\n            </li>\n        </ul>\n    </div>\n    \n    <div class=\"pw-light-content\">\n        <h3><span></span>Are You Sure You Want To Delete?</h3>\n        <p id=\"pw-delete-message\">\n            {{message}}\n        </p> \n        <div id=\"pw-update-form-region\">\n            <form id=\"delete-confirm-form\" action=\"{{ action }}\" method=\"post\">\n                 <ol class=\"pw-light-buttons-posr pw-clearfix\">\n                    <li class=\"pw-light-save\">\n                        <input type=\"submit\" value=\"{{ button }}\" id=\"pw-continue-submit\" class=\"button bn-grey-125\" />\n                    </li>\n                    <li class=\"pw-light-cancel\">\n                       <a href=\".\" onclick=\"dojo.publish('pw/modals/delete_confirm/hide'); return false;\">Cancel</a>\n                    </li>\n                </ol>    \n            </form>\n        </div>\n    </div>\n</div>\n</div>\n",imghost:imghost,message:"This action cannot be undone.",action:"",button:"Delete",do_submit:true,publish:null,publish_args:null,name:"default",div_id:"pw-light-delete-gen",constructor:function(){},postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/delete_confirm/show/"+this.name,dojo.hitch(this,this.onOpen));dojo.subscribe("pw/modals/delete_confirm/hide",dojo.hitch(this,this.onClose));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.onClose));this.handles=[];},onOpen:function(_7a4){dojo.mixin(this,_7a4);this.show();this.wireUp();var form=dojo.byId("delete-confirm-form");dojo.html.set(dojo.byId("pw-delete-message"),this.message);form.action=this.action;},_onSubmit:function(evt){if(!this.do_submit){dojo.stopEvent(evt);}if(this.publish){dojo.publish(this.publish,this.publish_args);}return this.do_submit;},wireUp:function(){this.form=dojo.byId("delete-confirm-form");this.handles.push(dojo.connect(this.form,"onsubmit",dojo.hitch(this,this._onSubmit)));},onClose:function(evt){if(evt){dojo.stopEvent(evt);}this.hide();dojo.forEach(this.handles,function(_7a8){dojo.disconnect(_7a8);});this.handles=[];}});}if(!dojo._hasResource["pw.widget.Tooltip"]){dojo._hasResource["pw.widget.Tooltip"]=true;dojo.provide("pw.widget.Tooltip");dojo.declare("pw.widget.Tooltip",[agi.widget.Tooltip],{showDelay:300,baseClassName:"pwtooltip",templateString:"<div class=\"pwtooltip pwtooltipLeft\" id=\"dojoTooltip\">\n    <div class=\"pwtooltipContainer pwtooltipContents\"\n        dojoAttachPoint=\"containerNode\" waiRole=\"alert\">\n    </div>\n    <div class=\"pwtooltipConnector\"></div>\n</div>\n"});}if(!dojo._hasResource["agi.ovoid.Konami"]){dojo._hasResource["agi.ovoid.Konami"]=true;dojo.provide("agi.ovoid.Konami");dojo.declare("agi.ovoid.Konami",[agi.classes.Identified],{kkeys:null,code:"38,38,40,40,37,39,37,39,66,65,13",handles:null,callback:null,once:true,constructor:function(_7a9){dojo.mixin(this,_7a9);this.kkeys=[];this.handles=[];this.handles.push(dojo.connect(dojo.doc,"onkeydown",dojo.hitch(this,this.keydown)));},keydown:function(evt){this.kkeys.push(evt.keyCode);if(this.kkeys.toString().indexOf(this.code)>=0){if(this.once){dojo.forEach(this.handles,dojo.disconnect);}if(this.callback){this.callback();}}}});}if(!dojo._hasResource["dojo.fx.Toggler"]){dojo._hasResource["dojo.fx.Toggler"]=true;dojo.provide("dojo.fx.Toggler");dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){var _t=this;dojo.mixin(_t,args);_t.node=args.node;_t._showArgs=dojo.mixin({},args);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},args);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_7ad){return this.showAnim.play(_7ad||0);},hide:function(_7ae){return this.hideAnim.play(_7ae||0);}});}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var d=dojo,_7b0={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _7b3=function(_7b4){this._index=-1;this._animations=_7b4||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;d.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};d.extend(_7b3,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){d.disconnect(this._onAnimateCtx);d.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_7b6,_7b7){if(!this._current){this._current=this._animations[this._index=0];}if(!_7b7&&this._current.status()=="playing"){return this;}var _7b8=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_7b9=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_7bb=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(_7b8);d.disconnect(_7b9);d.disconnect(_7bb);});if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){d.disconnect(this._onEndCtx);}this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=d.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);d.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_7bf,_7c0){this.pause();var _7c1=this.duration*_7bf;this._current=null;d.some(this._animations,function(a){if(a.duration<=_7c1){this._current=a;return true;}_7c1-=a.duration;return false;});if(this._current){this._current.gotoPercent(_7c1/this._current.duration,_7c0);}return this;},stop:function(_7c3){if(this._current){if(_7c3){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=d.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);d.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}if(this._onEndCtx){d.disconnect(this._onEndCtx);}}});d.extend(_7b3,_7b0);dojo.fx.chain=function(_7c6){return new _7b3(_7c6);};var _7c7=function(_7c8){this._animations=_7c8||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(_7c8,function(a){var _7ca=a.duration;if(a.delay){_7ca+=a.delay;}if(this.duration<_7ca){this.duration=_7ca;}this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new d._Animation({curve:[0,1],duration:this.duration});var self=this;d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){self._connects.push(d.connect(self._pseudoAnimation,evt,function(){self._fire(evt,arguments);}));});};d.extend(_7c7,{_doAction:function(_7cd,args){d.forEach(this._animations,function(a){a[_7cd].apply(a,args);});return this;},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd");}},_call:function(_7d0,args){var t=this._pseudoAnimation;t[_7d0].apply(t,args);},play:function(_7d3,_7d4){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this;},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this;},gotoPercent:function(_7d5,_7d6){var ms=this.duration*_7d5;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_7d6);});this._call("gotoPercent",arguments);return this;},stop:function(_7d9){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){d.forEach(this._connects,dojo.disconnect);}});d.extend(_7c7,_7b0);dojo.fx.combine=function(_7da){return new _7c7(_7da);};dojo.fx.wipeIn=function(args){args.node=d.byId(args.node);var node=args.node,s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _7e0=d.style(node,"height");return Math.max(_7e0,1);}},end:function(){return node.scrollHeight;}}}},args));d.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o;});return anim;};dojo.fx.wipeOut=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{end:1}}},args));d.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});d.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return anim;};dojo.fx.slideTo=function(args){var node=args.node=d.byId(args.node),top=null,left=null;var init=(function(n){return function(){var cs=d.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=d.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=d.animateProperty(d.mixin({properties:{top:args.top||0,left:args.left||0}},args));d.connect(anim,"beforeBegin",anim,init);return anim;};})();}if(!dojo._hasResource["dojo.fx.easing"]){dojo._hasResource["dojo.fx.easing"]=true;dojo.provide("dojo.fx.easing");dojo.fx.easing={linear:function(n){return n;},quadIn:function(n){return Math.pow(n,2);},quadOut:function(n){return n*(n-2)*-1;},quadInOut:function(n){n=n*2;if(n<1){return Math.pow(n,2)/2;}return -1*((--n)*(n-2)-1)/2;},cubicIn:function(n){return Math.pow(n,3);},cubicOut:function(n){return Math.pow(n-1,3)+1;},cubicInOut:function(n){n=n*2;if(n<1){return Math.pow(n,3)/2;}n-=2;return (Math.pow(n,3)+2)/2;},quartIn:function(n){return Math.pow(n,4);},quartOut:function(n){return -1*(Math.pow(n-1,4)-1);},quartInOut:function(n){n=n*2;if(n<1){return Math.pow(n,4)/2;}n-=2;return -1/2*(Math.pow(n,4)-2);},quintIn:function(n){return Math.pow(n,5);},quintOut:function(n){return Math.pow(n-1,5)+1;},quintInOut:function(n){n=n*2;if(n<1){return Math.pow(n,5)/2;}n-=2;return (Math.pow(n,5)+2)/2;},sineIn:function(n){return -1*Math.cos(n*(Math.PI/2))+1;},sineOut:function(n){return Math.sin(n*(Math.PI/2));},sineInOut:function(n){return -1*(Math.cos(Math.PI*n)-1)/2;},expoIn:function(n){return (n==0)?0:Math.pow(2,10*(n-1));},expoOut:function(n){return (n==1)?1:(-1*Math.pow(2,-10*n)+1);},expoInOut:function(n){if(n==0){return 0;}if(n==1){return 1;}n=n*2;if(n<1){return Math.pow(2,10*(n-1))/2;}--n;return (-1*Math.pow(2,-10*n)+2)/2;},circIn:function(n){return -1*(Math.sqrt(1-Math.pow(n,2))-1);},circOut:function(n){n=n-1;return Math.sqrt(1-Math.pow(n,2));},circInOut:function(n){n=n*2;if(n<1){return -1/2*(Math.sqrt(1-Math.pow(n,2))-1);}n-=2;return 1/2*(Math.sqrt(1-Math.pow(n,2))+1);},backIn:function(n){var s=1.70158;return Math.pow(n,2)*((s+1)*n-s);},backOut:function(n){n=n-1;var s=1.70158;return Math.pow(n,2)*((s+1)*n+s)+1;},backInOut:function(n){var s=1.70158*1.525;n=n*2;if(n<1){return (Math.pow(n,2)*((s+1)*n-s))/2;}n-=2;return (Math.pow(n,2)*((s+1)*n+s)+2)/2;},elasticIn:function(n){if(n==0||n==1){return n;}var p=0.3;var s=p/4;n=n-1;return -1*Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p);},elasticOut:function(n){if(n==0||n==1){return n;}var p=0.3;var s=p/4;return Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p)+1;},elasticInOut:function(n){if(n==0){return 0;}n=n*2;if(n==2){return 1;}var p=0.3*1.5;var s=p/4;if(n<1){n-=1;return -0.5*(Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p));}n-=1;return 0.5*(Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p))+1;},bounceIn:function(n){return (1-dojo.fx.easing.bounceOut(1-n));},bounceOut:function(n){var s=7.5625;var p=2.75;var l;if(n<(1/p)){l=s*Math.pow(n,2);}else{if(n<(2/p)){n-=(1.5/p);l=s*Math.pow(n,2)+0.75;}else{if(n<(2.5/p)){n-=(2.25/p);l=s*Math.pow(n,2)+0.9375;}else{n-=(2.625/p);l=s*Math.pow(n,2)+0.984375;}}}return l;},bounceInOut:function(n){if(n<0.5){return dojo.fx.easing.bounceIn(n*2)/2;}return (dojo.fx.easing.bounceOut(n*2-1)/2)+0.5;}};}if(!dojo._hasResource["dojox.fx.text"]){dojo._hasResource["dojox.fx.text"]=true;dojo.provide("dojox.fx.text");dojox.fx.text._split=function(args){var node=args.node=dojo.byId(args.node),s=node.style,cs=dojo.getComputedStyle(node),_81f=dojo.coords(node,true);args.duration=args.duration||1000;args.words=args.words||false;var _820=(args.text&&typeof (args.text)=="string")?args.text:node.innerHTML,_821=s.height,_822=s.width,_823=[];dojo.style(node,{height:cs.height,width:cs.width});var _824=/(<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>)/g;var reg=(args.words?/(<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>)\s*|([^\s<]+\s*)/g:/(<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>)\s*|([^\s<]\s*)/g);var _826=(typeof args.text=="string")?args.text.match(reg):node.innerHTML.match(reg);var html="";var _828=0;var _829=0;for(var i=0;i<_826.length;i++){var _82b=_826[i];if(!_82b.match(_824)){html+="<span>"+_82b+"</span>";_828++;}else{html+=_82b;}}node.innerHTML=html;function animatePieces(_82c){var next=_82c.nextSibling;if(_82c.tagName=="SPAN"&&_82c.childNodes.length==1&&_82c.firstChild.nodeType==3){var _82e=dojo.coords(_82c,true);_829++;dojo.style(_82c,{padding:0,margin:0,top:(args.crop?"0px":_82e.t+"px"),left:(args.crop?"0px":_82e.l+"px"),display:"inline"});var _82f=args.pieceAnimation(_82c,_82e,_81f,_829,_828);if(dojo.isArray(_82f)){_823=_823.concat(_82f);}else{_823[_823.length]=_82f;}}else{if(_82c.firstChild){animatePieces(_82c.firstChild);}}if(next){animatePieces(next);}};animatePieces(node.firstChild);var anim=dojo.fx.combine(_823);dojo.connect(anim,"onEnd",anim,function(){node.innerHTML=_820;dojo.style(node,{height:_821,width:_822});});if(args.onPlay){dojo.connect(anim,"onPlay",anim,args.onPlay);}if(args.onEnd){dojo.connect(anim,"onEnd",anim,args.onEnd);}return anim;};dojox.fx.text.explode=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;args.distance=args.distance||1;args.duration=args.duration||1000;args.random=args.random||0;if(typeof (args.fade)=="undefined"){args.fade=true;}if(typeof (args.sync)=="undefined"){args.sync=true;}args.random=Math.abs(args.random);args.pieceAnimation=function(_834,_835,_836,_837,_838){var _839=_835.h;var _83a=_835.w;var _83b=args.distance*2;var _83c=args.duration;var _83d=parseFloat(_834.style.top);var _83e=parseFloat(_834.style.left);var _83f=0;var _840=0;var _841=0;if(args.random){var seed=(Math.random()*args.random)+Math.max(1-args.random,0);_83b*=seed;_83c*=seed;_83f=((args.unhide&&args.sync)||(!args.unhide&&!args.sync))?(args.duration-_83c):0;_840=Math.random()-0.5;_841=Math.random()-0.5;}var _843=((_836.h-_839)/2-(_835.y-_836.y));var _844=((_836.w-_83a)/2-(_835.x-_836.x));var _845=Math.sqrt(Math.pow(_844,2)+Math.pow(_843,2));var _846=_83d-_843*_83b+_845*_841;var _847=_83e-_844*_83b+_845*_840;var _848=dojo.animateProperty({node:_834,duration:_83c,delay:_83f,easing:(args.easing||(args.unhide?dojo.fx.easing.sinOut:dojo.fx.easing.circOut)),beforeBegin:(args.unhide?function(){if(args.fade){dojo.style(_834,"opacity",0);}_834.style.position=args.crop?"relative":"absolute";_834.style.top=_846+"px";_834.style.left=_847+"px";}:function(){_834.style.position=args.crop?"relative":"absolute";}),properties:{top:(args.unhide?{start:_846,end:_83d}:{start:_83d,end:_846}),left:(args.unhide?{start:_847,end:_83e}:{start:_83e,end:_847})}});if(args.fade){var _849=dojo.animateProperty({node:_834,duration:_83c,delay:_83f,easing:(args.fadeEasing||dojo.fx.easing.quadOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})}});return (args.unhide?[_849,_848]:[_848,_849]);}else{return _848;}};var anim=dojox.fx.text._split(args);return anim;};dojox.fx.text.converge=function(args){args.unhide=true;return dojox.fx.text.explode(args);};dojox.fx.text.disintegrate=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;args.duration=args.duration||1500;args.distance=args.distance||1.5;args.random=args.random||0;if(!args.fade){args.fade=true;}var _84f=Math.abs(args.random);args.pieceAnimation=function(_850,_851,_852,_853,_854){var _855=_851.h;var _856=_851.w;var _857=args.interval||(args.duration/(1.5*_854));var _858=(args.duration-_854*_857);var _859=Math.random()*_854*_857;var _85a=(args.reverseOrder||args.distance<0)?(_853*_857):((_854-_853)*_857);var _85b=_859*_84f+Math.max(1-_84f,0)*_85a;var _85c={};if(args.unhide){_85c.top={start:(parseFloat(_850.style.top)-_852.h*args.distance),end:parseFloat(_850.style.top)};if(args.fade){_85c.opacity={start:0,end:1};}}else{_85c.top={end:(parseFloat(_850.style.top)+_852.h*args.distance)};if(args.fade){_85c.opacity={end:0};}}var _85d=dojo.animateProperty({node:_850,duration:_858,delay:_85b,easing:(args.easing||(args.unhide?dojo.fx.easing.sinIn:dojo.fx.easing.circIn)),properties:_85c,beforeBegin:(args.unhide?function(){if(args.fade){dojo.style(_850,"opacity",0);}_850.style.position=args.crop?"relative":"absolute";_850.style.top=_85c.top.start+"px";}:function(){_850.style.position=args.crop?"relative":"absolute";})});return _85d;};var anim=dojox.fx.text._split(args);return anim;};dojox.fx.text.build=function(args){args.unhide=true;return dojox.fx.text.disintegrate(args);};dojox.fx.text.blockFadeOut=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;args.duration=args.duration||1000;args.random=args.random||0;var _863=Math.abs(args.random);args.pieceAnimation=function(_864,_865,_866,_867,_868){var _869=args.interval||(args.duration/(1.5*_868));var _86a=(args.duration-_868*_869);var _86b=Math.random()*_868*_869;var _86c=(args.reverseOrder)?((_868-_867)*_869):(_867*_869);var _86d=_86b*_863+Math.max(1-_863,0)*_86c;var _86e=dojo.animateProperty({node:_864,duration:_86a,delay:_86d,easing:(args.easing||dojo.fx.easing.sinInOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})},beforeBegin:(args.unhide?function(){dojo.style(_864,"opacity",0);}:undefined)});return _86e;};var anim=dojox.fx.text._split(args);return anim;};dojox.fx.text.blockFadeIn=function(args){args.unhide=true;return dojox.fx.text.blockFadeOut(args);};dojox.fx.text.backspace=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;args.words=false;args.duration=args.duration||2000;args.random=args.random||0;var _874=Math.abs(args.random);var _875=10;args.pieceAnimation=function(_876,_877,_878,_879,_87a){var _87b=args.interval||(args.duration/(1.5*_87a));var text=_876.textContent;var _87d=text.match(/\s/g);if(typeof (args.wordDelay)=="undefined"){args.wordDelay=_87b*2;}if(!args.unhide){_875=(_87a-_879-1)*_87b;}var _87e,_87f;if(args.fixed){if(args.unhide){var _87e=function(){dojo.style(_876,"opacity",0);};}}else{if(args.unhide){var _87e=function(){_876.style.display="none";};var _87f=function(){_876.style.display="inline";};}else{var _87f=function(){_876.style.display="none";};}}var _880=dojo.animateProperty({node:_876,duration:1,delay:_875,easing:(args.easing||dojo.fx.easing.sinInOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})},beforeBegin:_87e,onEnd:_87f});if(args.unhide){var _881=Math.random()*text.length*_87b;var _882=_881*_874/2+Math.max(1-_874/2,0)*args.wordDelay;_875+=_881*_874+Math.max(1-_874,0)*_87b*text.length+(_882*(_87d&&text.lastIndexOf(_87d[_87d.length-1])==text.length-1));}return _880;};var anim=dojox.fx.text._split(args);return anim;};dojox.fx.text.type=function(args){args.unhide=true;return dojox.fx.text.backspace(args);};}if(!dojo._hasResource["agi.ovoid.Credits"]){dojo._hasResource["agi.ovoid.Credits"]=true;dojo.provide("agi.ovoid.Credits");dojo.declare("agi.ovoid.Credits",[agi.classes.Identified],{url:"",templateString:"",overlayId:"",contentClass:"",innerContentId:"",lbWidth:660,lbTop:35,original_opacity:0.3,original_background_color:"black",opacity:0.75,background_color:"white",autostart:false,playing:false,start_timeout:5000,constructor:function(_885){dojo.mixin(this,_885);this.data=null;this.lightbox=new agi.widget.Lightbox({lightboxId:"lightbox",overlayId:this.overlayId,loadnow:false,width:this.lbWidth,top:this.lbTop,overflow:"",contents:this.templateString});this.showNow=false;},loadData:function(_886){this.showNow=_886;if(!this.url){return;}dojo.xhrGet({url:this.url,handleAs:"json",load:dojo.hitch(this,this.gotData)});},gotData:function(_887,_888){this.data=_887;if(this.showNow){this.show();}},show:function(){if(!this.data){return this.loadData(true);}var _889=dojo.byId(this.overlayId);this.original_opacity=dojo.style(_889).opacity;this.original_background_color=dojo.style(_889).backgroundColor;dojo.style(_889,{opacity:this.opacity,backgroundColor:this.background_color});this.lightbox.show();if(this.autostart){this.play();}else{setTimeout(dojo.hitch(this,this.play),this.start_timeout);}},play:function(){if(this.playing){return;}this.showPage(0);this.playing=true;},showPage:function(i){var page=this.data.pages[i];var _88c=this.data.pages[i+1];var h1=dojo.query("."+this.contentClass+" h1")[0];var h2=dojo.query("."+this.contentClass+" h2")[0];var ul=dojo.query("."+this.contentClass+" ul")[0];var _890=dojo.byId(this.innerContentId);var _891={node:_890,random:0.5,distance:1.5,duration:1500};if(page){if(page.heading!=null){h1.innerHTML=page.heading;}if(page.subhead!=null){h2.innerHTML=page.subhead;}else{h2.innerHTML="";}if(page.items!=null){ul.innerHTML=this.makeLIs(page.items);}else{ul.innerHTML="";}}dojo.style(_890,"visibility","visible");var _892=page.showFor!=null?page.showFor:5000;if(_88c!=null){_891.onEnd=dojo.hitch(this,function(){dojo.style(_890,"visibility","hidden");this.showPage(i+1);});var anim=dojox.fx.text.explode(_891);setTimeout(function(){anim.play();},_892);}else{setTimeout(dojo.hitch(this,this.hide),_892);}},makeLIs:function(_894){html="";for(var i=0;i<_894.length;i++){html=html+"<li>"+_894[i]+"</li>";}return html;},hide:function(){this.lightbox.hide();var _896=dojo.byId(this.overlayId);dojo.style(_896,{opacity:this.original_opacity,backgroundColor:this.original_background_color});}});}if(!dojo._hasResource["pw.focus"]){dojo._hasResource["pw.focus"]=true;dojo.provide("pw.focus");window.onYouTubePlayerReady=function(_897){var _898=document.getElementById("pw-ytplayer");_898.addEventListener("onStateChange","pw.focus.stateChange");};pw.focus.stateChange=function(_899){if(_899==0){pw.focus.credits.hide();}else{if(_899==1){pw.focus.credits.play();}}};if(dojo.isIE){pw.focus.enablejsapi=0;pw.focus.autostart=true;}else{pw.focus.enablejsapi=1;pw.focus.autostart=false;}pw.focus.init=function(){pw.focus.credits=new agi.ovoid.Credits({opacity:0.9,background_color:"white",url:"/credits/pf2009",templateString:"<div><embed id=\"pw-ytplayer\" src=\"http://www.youtube.com/v/osgjTEXWDKw&hl=en&fs=1&rel=0&autoplay=1&enablejsapi="+pw.focus.enablejsapi+"\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"false\" width=\"1\" height=\"1\"></embed><div class=\"pw-rc-light2\"><div class=\"pw-light-content\" style=\"text-align:center;position:relative;overflow:visible;\"><h1 style=\"width:100%; color:#c42216; font-size: 28px; line-height: 34px; font-weight: bold; margin-bottom: 15px;\"></h1><div id=\"credits-inner\"><h2 style=\"font-size: 20px; line-height: 26px; color: #c42216; font-weight: bold; margin-bottom: 5px;\"></h2><ul style=\"font-size: 16px; color: #000000; font-weight: bold; line-height: 22px;\"></ul></div></div></div>",contentClass:"pw-light-content",innerContentId:"credits-inner",overlayId:"pw-overlay",autostart:pw.focus.autostart});var _89a=new agi.ovoid.Konami({callback:function(){pw.focus.credits.show();}});};dojo.addOnLoad(pw.focus.init);}dojo.publish("/pw.layers.core/loaded/");dojo.i18n._preloadLocalizations("pw.layers.nls.core",["ROOT","ar","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nl","nl-nl","no","pl","pt","pt-br","pt-pt","ru","sv","tr","xx","zh","zh-cn","zh-tw"]);
