/*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,moving:false,ANIMATION_DURATION:700,constructor:function(_b4,_b5,_b6,_b7,_b8,_b9){if(!_b6){this.flip_count=1;}else{this.flip_count=_b6;}if(!_b5){this.view_count=3;}else{this.view_count=_b5;}if(!_b7){this.wrap=false;}else{this.wrap=_b7;}if(!_b8){_b8=false;}if(!_b9){this.row_count=1;}else{this.row_count=_b9;}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.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/_b9-this.view_count);this.min_left=(Math.min(this.min_left,0));var _bf=(this.width*this.items.length+50)/_b9;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)));}},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)));}},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);}},reset:function(){this.moving=false;this.node.style.left="0px";this.position=0;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(_d0){return this.append.apply(this,_d0);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_d1,_d2){b=b.replace(_d1,_d2);this.length=b.length;return this;};this.remove=function(_d3,len){if(len===undefined){len=b.length;}if(len==0){return this;}b=b.substr(0,_d3)+b.substr(_d3+len);this.length=b.length;return this;};this.insert=function(_d5,str){if(_d5==0){b=str+b;}else{b=b.slice(0,_d5)+str+b.slice(_d5);}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,_d9,_da){var _db=[];var _dc,_dd,_de=0;while(_dc=re.exec(str)){_dd=str.slice(_de,re.lastIndex-_dc[0].length);if(_dd.length){_db.push(_dd);}if(_d9){if(dojo.isOpera){var _df=_dc.slice(0);while(_df.length<_dc.length){_df.push(null);}_dc=_df;}var _e0=_d9.apply(_da,_dc.slice(1).concat(_db.length));if(typeof _e0!="undefined"){_db.push(_e0);}}_de=re.lastIndex;}_dd=str.slice(_de);if(_dd.length){_db.push(_dd);}return _db;};}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(_e2){dojo._mixin(this,_e2||{});this._dicts=[];},{push:function(){var _e3=this;var _e4=dojo.delegate(this);_e4.pop=function(){return _e3;};return _e4;},pop:function(){throw new Error("pop() called on empty Context");},get:function(key,_e6){if(typeof this[key]!="undefined"){return this._normalize(this[key]);}for(var i=0,_e8;_e8=this._dicts[i];i++){if(typeof _e8[key]!="undefined"){return this._normalize(_e8[key]);}}return _e6;},_normalize:function(_e9){if(_e9 instanceof Date){_e9.year=_e9.getFullYear();_e9.month=_e9.getMonth()+1;_e9.day=_e9.getDate();_e9.date=_e9.year+"-"+("0"+_e9.month).slice(-2)+"-"+("0"+_e9.day).slice(-2);_e9.hour=_e9.getHours();_e9.minute=_e9.getMinutes();_e9.second=_e9.getSeconds();_e9.microsecond=_e9.getMilliseconds();}return _e9;},update:function(_ea){var _eb=this.push();if(_ea){dojo._mixin(this,_ea);}return _eb;}});var _ec=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _ed=/\s+/g;var _ee=function(_ef,_f0){_ef=_ef||_ed;if(!(_ef instanceof RegExp)){_ef=new RegExp(_ef,"g");}if(!_ef.global){throw new Error("You must use a globally flagged RegExp with split "+_ef);}_ef.exec("");var _f1,_f2=[],_f3=0,i=0;while(_f1=_ef.exec(this)){_f2.push(this.slice(_f3,_ef.lastIndex-_f1[0].length));_f3=_ef.lastIndex;if(_f0&&(++i>_f0-1)){break;}}_f2.push(this.slice(_f3));return _f2;};dd.Token=function(_f5,_f6){this.token_type=_f5;this.contents=new String(dojo.trim(_f6));this.contents.split=_ee;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_f7){var bit,_f9=[],i=0;_f7=_f7||999;while(i++<_f7&&(bit=_ec.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_f9.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_f9.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_f9.push(bit);}}}return _f9;};var ddt=dd.text={_get:function(_fc,_fd,_fe){var _ff=dd.register.get(_fc,_fd.toLowerCase(),_fe);if(!_ff){if(!_fe){throw new Error("No tag found for "+_fd);}return null;}var fn=_ff[1];var _101=_ff[2];var _102;if(fn.indexOf(":")!=-1){_102=fn.split(":");fn=_102.pop();}dojo["require"](_101);var _103=dojo.getObject(_101);return _103[fn||_fd]||_103[_fd+"_"]||_103[fn+"_"];},getTag:function(name,_105){return ddt._get("tag",name,_105);},getFilter:function(name,_107){return ddt._get("filter",name,_107);},getTemplate:function(file){return new dd.Template(ddt.getTemplateString(file));},getTemplateString:function(file){return dojo._getText(file.toString())||"";},_resolveLazy:function(_10a,sync,json){if(sync){if(json){return dojo.fromJson(dojo._getText(_10a))||{};}else{return dd.text.getTemplateString(_10a);}}else{return dojo.xhrGet({handleAs:(json)?"json":"text",url:_10a});}},_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 _118=dojo.trim(tag).split(/\s+/g);for(var i=0,part;part=_118[i];i++){dojo["require"](part);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=dojo.extend(function(_11b,_11c){var str=_11c?_11b:ddt._resolveTemplateArg(_11b,true)||"";var _11e=ddt.tokenize(str);var _11f=new dd._Parser(_11e);this.nodelist=_11f.parse();},{update:function(node,_121){return ddt._resolveContextArg(_121).addCallback(this,function(_122){var _123=this.render(new dd._Context(_122));if(node.forEach){node.forEach(function(item){item.innerHTML=_123;});}else{dojo.byId(node).innerHTML=_123;}return this;});},render:function(_125,_126){_126=_126||this.getBuffer();_125=_125||new dd._Context({});return this.nodelist.render(_125,_126)+"";},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(_129){return new dd._Filter(_129);}));}};dd._QuickNodeList=dojo.extend(function(_12a){this.contents=_12a;},{render:function(_12b,_12c){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_12c=_12c.concat(this.contents[i].resolve(_12b));}else{_12c=_12c.concat(this.contents[i]);}}return _12c;},dummyRender:function(_12f){return this.render(_12f,dd.Template.prototype.getBuffer()).toString();},clone:function(_130){return this;}});dd._Filter=dojo.extend(function(_131){if(!_131){throw new Error("Filter must be called with variable name");}this.contents=_131;var _132=this._cache[_131];if(_132){this.key=_132[0];this.filters=_132[1];}else{this.filters=[];dojox.string.tokenize(_131,this._re,this._tokenize,this);this._cache[_131]=[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 _137=arguments[pos];if(this._args[pos]=="'"){_137=_137.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_137=_137.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_137];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(_139){if(typeof this.key=="undefined"){return "";}var str=this.resolvePath(this.key,_139);for(var i=0,_13c;_13c=this.filters[i];i++){if(_13c[1]){if(_13c[1][0]){str=_13c[0](str,this.resolvePath(_13c[1][1],_139));}else{str=_13c[0](str,_13c[1][1]);}}else{str=_13c[0](str);}}return str;},resolvePath:function(path,_13e){var _13f,_140;var _141=path.charAt(0);var last=path.slice(-1);if(!isNaN(parseInt(_141))){_13f=(path.indexOf(".")==-1)?parseInt(path):parseFloat(path);}else{if(_141=="\""&&_141==last){_13f=path.slice(1,-1);}else{if(path=="true"){return true;}if(path=="false"){return false;}if(path=="null"||path=="None"){return null;}_140=path.split(".");_13f=_13e.get(_140[0]);if(dojo.isFunction(_13f)){var self=_13e.getThis&&_13e.getThis();if(_13f.alters_data){_13f="";}else{if(self){_13f=_13f.call(self);}else{_13f="";}}}for(var i=1;i<_140.length;i++){var part=_140[i];if(_13f){var base=_13f;if(dojo.isObject(_13f)&&part=="items"&&typeof _13f[part]=="undefined"){var _147=[];for(var key in _13f){_147.push([key,_13f[key]]);}_13f=_147;continue;}if(_13f.get&&dojo.isFunction(_13f.get)&&_13f.get.safe){_13f=_13f.get(part);}else{if(typeof _13f[part]=="undefined"){_13f=_13f[part];break;}else{_13f=_13f[part];}}if(dojo.isFunction(_13f)){if(_13f.alters_data){_13f="";}else{_13f=_13f.call(base);}}else{if(_13f instanceof Date){_13f=dd._Context.prototype._normalize(_13f);}}}else{return "";}}}}return _13f;}});dd._TextNode=dd._Node=dojo.extend(function(obj){this.contents=obj;},{set:function(data){this.contents=data;return this;},render:function(_14b,_14c){return _14c.concat(this.contents);},isEmpty:function(){return !dojo.trim(this.contents);},clone:function(){return this;}});dd._NodeList=dojo.extend(function(_14d){this.contents=_14d||[];this.last="";},{push:function(node){this.contents.push(node);return this;},concat:function(_14f){this.contents=this.contents.concat(_14f);return this;},render:function(_150,_151){for(var i=0;i<this.contents.length;i++){_151=this.contents[i].render(_150,_151);if(!_151){throw new Error("Template must return buffer");}}return _151;},dummyRender:function(_153){return this.render(_153,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(_155,_156){var str=this.contents.resolve(_155);if(!str.safe){str=dd._base.escape(""+str);}return _156.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};};dd._Parser=dojo.extend(function(_158){this.contents=_158;},{i:0,parse:function(_159){var _15a={};_159=_159||[];for(var i=0;i<_159.length;i++){_15a[_159[i]]=true;}var _15c=new dd._NodeList();while(this.i<this.contents.length){token=this.contents[this.i++];if(typeof token=="string"){_15c.push(new dd._TextNode(token));}else{var type=token[0];var text=token[1];if(type==dd.TOKEN_VAR){_15c.push(new dd._VarNode(text));}else{if(type==dd.TOKEN_BLOCK){if(_15a[text]){--this.i;return _15c;}var cmd=text.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_15c.push(fn(this,new dd.Token(type,text)));}}}}}}if(_159.length){throw new Error("Could not find closing tag(s): "+_159.toString());}this.contents.length=0;return _15c;},next_token:function(){var _161=this.contents[this.i++];return new dd.Token(_161[0],_161[1]);},delete_first_token:function(){this.i++;},skip_past:function(_162){while(this.i<this.contents.length){var _163=this.contents[this.i++];if(_163[0]==dd.TOKEN_BLOCK&&_163[1]==_162){return;}}throw new Error("Unclosed tag found when looking for "+_162);},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(_167,name){var _169=dd.register._registry[_167+"s"];for(var i=0,_16b;_16b=_169[i];i++){if(typeof _16b[0]=="string"){if(_16b[0]==name){return _16b;}}else{if(name.match(_16b[0])){return _16b;}}}},getAttributeTags:function(){var tags=[];var _16d=dd.register._registry.attributes;for(var i=0,_16f;_16f=_16d[i];i++){if(_16f.length==3){tags.push(_16f);}else{var fn=dojo.getObject(_16f[1]);if(fn&&dojo.isFunction(fn)){_16f.push(fn);tags.push(_16f);}}}return tags;},_any:function(type,base,_173){for(var path in _173){for(var i=0,fn;fn=_173[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,_17a){dd.register._any("tags",base,_17a);},filters:function(base,_17c){dd.register._any("filters",base,_17c);}};var _17d=/&/g;var _17e=/</g;var _17f=/>/g;var _180=/'/g;var _181=/"/g;dd._base.escape=function(_182){return dd.mark_safe(_182.replace(_17d,"&amp;").replace(_17e,"&lt;").replace(_17f,"&gt;").replace(_181,"&quot;").replace(_180,"&#39;"));};dd._base.safe=function(_183){if(typeof _183=="string"){_183=new String(_183);}if(typeof _183=="object"){_183.safe=true;}return _183;};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 _184=dojo.doc;if(_184.selection){var s=_184.selection;if(s.type=="Text"){return !s.createRange().htmlText.length;}else{return !s.createRange().length;}}else{var _186=dojo.global;var _187=_186.getSelection();if(dojo.isString(_187)){return !_187;}else{return !_187||_187.isCollapsed||!_187.toString();}}},getBookmark:function(){var _188,_189=dojo.doc.selection;if(_189){var _18a=_189.createRange();if(_189.type.toUpperCase()=="CONTROL"){if(_18a.length){_188=[];var i=0,len=_18a.length;while(i<len){_188.push(_18a.item(i++));}}else{_188=null;}}else{_188=_18a.getBookmark();}}else{if(window.getSelection){_189=dojo.global.getSelection();if(_189){_18a=_189.getRangeAt(0);_188=_18a.cloneRange();}}else{}}return _188;},moveToBookmark:function(_18d){var _18e=dojo.doc;if(_18e.selection){var _18f;if(dojo.isArray(_18d)){_18f=_18e.body.createControlRange();dojo.forEach(_18d,function(n){_18f.addElement(n);});}else{_18f=_18e.selection.createRange();_18f.moveToBookmark(_18d);}_18f.select();}else{var _191=dojo.global.getSelection&&dojo.global.getSelection();if(_191&&_191.removeAllRanges){_191.removeAllRanges();_191.addRange(_18d);}else{}}},getFocus:function(menu,_193){return {node:menu&&dojo.isDescendant(dijit._curFocus,menu.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_193||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_193||dojo.global,dijit.getBookmark):null,openedForWindow:_193};},focus:function(_194){if(!_194){return;}var node="node" in _194?_194.node:_194,_196=_194.bookmark,_197=_194.openedForWindow;if(node){var _198=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_198&&_198.focus){try{_198.focus();}catch(e){}}dijit._onFocusNode(node);}if(_196&&dojo.withGlobal(_197||dojo.global,dijit.isCollapsed)){if(_197){_197.focus();}try{dojo.withGlobal(_197||dojo.global,dijit.moveToBookmark,null,[_196]);}catch(e){}}},_activeStack:[],registerIframe:function(_199){dijit.registerWin(_199.contentWindow,_199);},registerWin:function(_19a,_19b){dojo.connect(_19a.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(_19b||evt.target||evt.srcElement);});var doc=_19a.document;if(doc){if(dojo.isIE){doc.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(_19b||evt.srcElement);}});doc.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(_19b||evt.srcElement);});}else{doc.addEventListener("focus",function(evt){dijit._onFocusNode(_19b||evt.target);},true);doc.addEventListener("blur",function(evt){dijit._onBlurNode(_19b||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 _1a4=[];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){_1a4.unshift(id);}node=node.parentNode;}}}}catch(e){}dijit._setStack(_1a4);},_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(_1a7){var _1a8=dijit._activeStack;dijit._activeStack=_1a7;for(var _1a9=0;_1a9<Math.min(_1a8.length,_1a7.length);_1a9++){if(_1a8[_1a9]!=_1a7[_1a9]){break;}}for(var i=_1a8.length-1;i>=_1a9;i--){var _1ab=dijit.byId(_1a8[i]);if(_1ab){_1ab._focused=false;_1ab._hasBeenBlurred=true;if(_1ab._onBlur){_1ab._onBlur();}if(_1ab._setStateClass){_1ab._setStateClass();}dojo.publish("widgetBlur",[_1ab]);}}for(i=_1a9;i<_1a7.length;i++){_1ab=dijit.byId(_1a7[i]);if(_1ab){_1ab._focused=true;if(_1ab._onFocus){_1ab._onFocus();}if(_1ab._setStateClass){_1ab._setStateClass();}dojo.publish("widgetFocus",[_1ab]);}}}});dojo.addOnLoad(function(){dijit.registerWin(window);});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_1ac){this.pairs=[];this.returnWrappers=_1ac||false;};dojo.extend(dojo.AdapterRegistry,{register:function(name,_1ae,wrap,_1b0,_1b1){this.pairs[((_1b1)?"unshift":"push")]([name,_1ae,wrap,_1b0]);},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 _1b7=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _1b8=dojo._docScroll();return {w:_1b7.clientWidth,h:_1b7.clientHeight,l:_1b8.x,t:_1b8.y};};dijit.placeOnScreen=function(node,pos,_1bb,_1bc){var _1bd=dojo.map(_1bb,function(_1be){var c={corner:_1be,pos:{x:pos.x,y:pos.y}};if(_1bc){c.pos.x+=_1be.charAt(1)=="L"?_1bc.x:-_1bc.x;c.pos.y+=_1be.charAt(0)=="T"?_1bc.y:-_1bc.y;}return c;});return dijit._place(node,_1bd);};dijit._place=function(node,_1c1,_1c2){var view=dijit.getViewport();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(node);}var best=null;dojo.some(_1c1,function(_1c5){var _1c6=_1c5.corner;var pos=_1c5.pos;if(_1c2){_1c2(node,_1c5.aroundCorner,_1c6);}var _1c8=node.style;var _1c9=_1c8.display;var _1ca=_1c8.visibility;_1c8.visibility="hidden";_1c8.display="";var mb=dojo.marginBox(node);_1c8.display=_1c9;_1c8.visibility=_1ca;var _1cc=(_1c6.charAt(1)=="L"?pos.x:Math.max(view.l,pos.x-mb.w)),_1cd=(_1c6.charAt(0)=="T"?pos.y:Math.max(view.t,pos.y-mb.h)),endX=(_1c6.charAt(1)=="L"?Math.min(view.l+view.w,_1cc+mb.w):pos.x),endY=(_1c6.charAt(0)=="T"?Math.min(view.t+view.h,_1cd+mb.h):pos.y),_1d0=endX-_1cc,_1d1=endY-_1cd,_1d2=(mb.w-_1d0)+(mb.h-_1d1);if(best==null||_1d2<best.overflow){best={corner:_1c6,aroundCorner:_1c5.aroundCorner,x:_1cc,y:_1cd,w:_1d0,h:_1d1,overflow:_1d2};}return !_1d2;});node.style.left=best.x+"px";node.style.top=best.y+"px";if(best.overflow&&_1c2){_1c2(node,best.aroundCorner,best.corner);}return best;};dijit.placeOnScreenAroundNode=function(node,_1d4,_1d5,_1d6){_1d4=dojo.byId(_1d4);var _1d7=_1d4.style.display;_1d4.style.display="";var _1d8=_1d4.offsetWidth;var _1d9=_1d4.offsetHeight;var _1da=dojo.coords(_1d4,true);_1d4.style.display=_1d7;return dijit._placeOnScreenAroundRect(node,_1da.x,_1da.y,_1d8,_1d9,_1d5,_1d6);};dijit.placeOnScreenAroundRectangle=function(node,_1dc,_1dd,_1de){return dijit._placeOnScreenAroundRect(node,_1dc.x,_1dc.y,_1dc.width,_1dc.height,_1dd,_1de);};dijit._placeOnScreenAroundRect=function(node,x,y,_1e2,_1e3,_1e4,_1e5){var _1e6=[];for(var _1e7 in _1e4){_1e6.push({aroundCorner:_1e7,corner:_1e4[_1e7],pos:{x:x+(_1e7.charAt(1)=="L"?0:_1e2),y:y+(_1e7.charAt(0)=="T"?0:_1e3)}});}return dijit._place(node,_1e6,_1e5);};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,_1ed,_1ee,_1ef){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 _1f2=[],_1f3=1000,_1f4=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 _1f8=args.popup,_1f9=args.orient||{"BL":"TL","TL":"BL"},_1fa=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_1f4++);var _1fc=dojo.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_1f3+_1f2.length,visibility:"hidden"}},dojo.body());dijit.setWaiRole(_1fc,"presentation");_1fc.style.left=_1fc.style.top="0px";if(args.parent){_1fc.dijitPopupParent=args.parent.id;}var s=_1f8.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_1fc.appendChild(_1f8.domNode);var _1fe=new dijit.BackgroundIframe(_1fc);var best=_1fa?dijit.placeOnScreenAroundElement(_1fc,_1fa,_1f9,_1f8.orient?dojo.hitch(_1f8,"orient"):null):dijit.placeOnScreen(_1fc,args,_1f9=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_1fc.style.visibility="visible";var _200=[];var _201=function(){for(var pi=_1f2.length-1;pi>0&&_1f2[pi].parent===_1f2[pi-1].widget;pi--){}return _1f2[pi];};_200.push(dojo.connect(_1fc,"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 _204=_201();if(_204&&_204.onCancel){_204.onCancel();}}}}));if(_1f8.onCancel){_200.push(dojo.connect(_1f8,"onCancel",null,args.onCancel));}_200.push(dojo.connect(_1f8,_1f8.onExecute?"onExecute":"onChange",null,function(){var _205=_201();if(_205&&_205.onExecute){_205.onExecute();}}));_1f2.push({wrapper:_1fc,iframe:_1fe,widget:_1f8,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_200});if(_1f8.onOpen){_1f8.onOpen(best);}return best;};this.close=function(_206){while(dojo.some(_1f2,function(elem){return elem.widget==_206;})){var top=_1f2.pop(),_209=top.wrapper,_20a=top.iframe,_20b=top.widget,_20c=top.onClose;if(_20b.onClose){_20b.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_20b||!_20b.domNode){return;}this.prepare(_20b.domNode);_20a.destroy();dojo.destroy(_209);if(_20c){_20c();}}};}();dijit._frames=new function(){var _20d=[];this.pop=function(){var _20e;if(_20d.length){_20e=_20d.pop();_20e.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\");'>";_20e=dojo.doc.createElement(html);}else{_20e=dojo.create("iframe");_20e.src="javascript:\"\"";_20e.className="dijitBackgroundIframe";}_20e.tabIndex=-1;dojo.body().appendChild(_20e);}return _20e;};this.push=function(_211){_211.style.display="none";if(dojo.isIE){_211.style.removeExpression("width");_211.style.removeExpression("height");}_20d.push(_211);};}();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 _213=dijit._frames.pop();node.appendChild(_213);if(dojo.isIE){_213.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");_213.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");}this.iframe=_213;}};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 _219=dojo.isIE>=8&&!_21a;var rtl=!ltr&&!_219;var _21c=body;var _21a=doc.compatMode=="BackCompat";if(_21a){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{_21c=html;}html._offsetHeight=html.clientHeight;html._offsetWidth=html.clientWidth;}function isFixedPosition(_21d){var ie=dojo.isIE;return ((ie<=6||(ie>=7&&_21a))?false:(dojo.style(_21d,"position").toLowerCase()=="fixed"));};function addPseudoAttrs(_21f){var _220=_21f.parentNode;var _221=_21f.offsetParent;if(_221==null||isFixedPosition(_21f)){_221=html;_220=(_21f==body)?html:null;}_21f._offsetParent=_221;_21f._parent=_220;var bp=dojo._getBorderExtents(_21f);_21f._borderStart={H:(_219&&!ltr)?(bp.w-bp.l):bp.l,V:bp.t};_21f._borderSize={H:bp.w,V:bp.h};_21f._scrolledAmount={H:_21f.scrollLeft,V:_21f.scrollTop};_21f._offsetSize={H:_21f._offsetWidth||_21f.offsetWidth,V:_21f._offsetHeight||_21f.offsetHeight};_21f._offsetStart={H:(_219&&!ltr)?_221.clientWidth-_21f.offsetLeft-_21f._offsetSize.H:_21f.offsetLeft,V:_21f.offsetTop};_21f._clientSize={H:_21f._clientWidth||_21f.clientWidth,V:_21f._clientHeight||_21f.clientHeight};if(_21f!=body&&_21f!=html&&_21f!=node){for(var dir in _21f._offsetSize){var _224=_21f._offsetSize[dir]-_21f._clientSize[dir]-_21f._borderSize[dir];var _225=_21f._clientSize[dir]>0&&_224>0;if(_225){_21f._offsetSize[dir]-=_224;if(dojo.isIE&&rtl&&dir=="H"){_21f._offsetStart[dir]+=_224;}}}}};var _226=node;while(_226!=null){if(isFixedPosition(_226)){node.scrollIntoView(false);return;}addPseudoAttrs(_226);_226=_226._parent;}if(dojo.isIE&&node._parent){var _227=node._offsetParent;node._offsetStart.H+=_227._borderStart.H;node._offsetStart.V+=_227._borderStart.V;}if(dojo.isIE>=7&&_21c==html&&rtl&&body._offsetStart&&body._offsetStart.H==0){var _228=html.scrollWidth-html._offsetSize.H;if(_228>0){body._offsetStart.H=-_228;}}if(dojo.isIE<=6&&!_21a){html._offsetSize.H+=html._borderSize.H;html._offsetSize.V+=html._borderSize.V;}if(rtl&&body._offsetStart&&_21c==html&&html._scrolledAmount){var ofs=body._offsetStart.H;if(ofs<0){html._scrolledAmount.H+=ofs;body._offsetStart.H=0;}}_226=node;while(_226){var _22a=_226._parent;if(!_22a){break;}if(_22a.tagName=="TD"){var _22b=_22a._parent._parent._parent;if(_22a!=_226._offsetParent&&_22a._offsetParent!=_226._offsetParent){_22a=_22b;}}var _22c=_226._offsetParent==_22a;for(var dir in _226._offsetStart){var _22e=dir=="H"?"V":"H";if(rtl&&dir=="H"&&(_22a!=html)&&(_22a!=body)&&(dojo.isIE||dojo.isWebKit)&&_22a._clientSize.H>0&&_22a.scrollWidth>_22a._clientSize.H){var _22f=_22a.scrollWidth-_22a._clientSize.H;if(_22f>0){_22a._scrolledAmount.H-=_22f;}}if(_22a._offsetParent.tagName=="TABLE"){if(dojo.isIE){_22a._offsetStart[dir]-=_22a._offsetParent._borderStart[dir];_22a._borderStart[dir]=_22a._borderSize[dir]=0;}else{_22a._offsetStart[dir]+=_22a._offsetParent._borderStart[dir];}}if(dojo.isIE){_22a._offsetStart[dir]+=_22a._offsetParent._borderStart[dir];}var _230=_226._offsetStart[dir]-_22a._scrolledAmount[dir]-(_22c?0:_22a._offsetStart[dir])-_22a._borderStart[dir];var _231=_230+_226._offsetSize[dir]-_22a._offsetSize[dir]+_22a._borderSize[dir];var _232=(dir=="H")?"scrollLeft":"scrollTop";var _233=dir=="H"&&rtl;var _234=_233?-_231:_230;var _235=_233?-_230:_231;var _236=(_234*_235<=0)?0:Math[(_234<0)?"max":"min"](_234,_235);if(_236!=0){var _237=_22a[_232];_22a[_232]+=(_233)?-_236:_236;var _238=_22a[_232]-_237;}if(_22c){_226._offsetStart[dir]+=_22a._offsetStart[dir];}_226._offsetStart[dir]-=_22a[_232];}_226._parent=_22a._parent;_226._offsetParent=_22a._offsetParent;}_22a=node;var next;while(_22a&&_22a.removeAttribute){next=_22a.parentNode;_22a.removeAttribute("_offsetParent");_22a.removeAttribute("_parent");_22a=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,_23d=d.isOpera,maj=Math.floor,ff=d.isFF,_240=d.boxModel.replace(/-/,""),_241={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_23d,dj_opera8:maj(_23d)==8,dj_opera9:maj(_23d)==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};_241["dj_"+_240]=true;for(var p in _241){if(_241[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 _241){if(_241[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,_245,node,_247,obj,_249,_24a){if(obj!=this._obj){this.stop();this._initialDelay=_24a||500;this._subsequentDelay=_249||0.9;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_245,_247);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,_24c,_24d,_24e,_24f,_250){if(_24c.keyCode){_24c.charOrCode=_24c.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_24c.charCode){_24c.charOrCode=String.fromCharCode(_24c.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==_24c.charOrCode&&(_24c.ctrlKey===undefined||_24c.ctrlKey==evt.ctrlKey)&&(_24c.altKey===undefined||_24c.altKey==evt.ctrlKey)&&(_24c.shiftKey===undefined||_24c.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_24c,_24d,node,_24e,_24c,_24f,_250);}else{if(dijit.typematic._obj==_24c){dijit.typematic.stop();}}}),dojo.connect(node,"onkeyup",this,function(evt){if(dijit.typematic._obj==_24c){dijit.typematic.stop();}})];},addMouseListener:function(node,_254,_255,_256,_257){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_254,node,_255,node,_256,_257);}),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,_254,node,_255,node,_256,_257);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_25e,_25f,_260,_261,_262,_263,_264){return this.addKeyListener(_25f,_260,_261,_262,_263,_264).concat(this.addMouseListener(_25e,_261,_262,_263,_264));}};}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 _267=cs.backgroundImage;var _268=(cs.borderTopColor==cs.borderRightColor)||(_267!=null&&(_267=="none"||_267=="url(invalid-url:)"));dojo[_268?"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 _26b=this.getWaiRole(elem);return role?(_26b.indexOf(role)>-1):(_26b.length>0);},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _26f=dojo.attr(elem,"role")||"";if(dojo.isFF<3||!this._XhtmlRoles.test(_26f)){dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);}else{if((" "+_26f+" ").indexOf(" "+role+" ")<0){var _270=dojo.trim(_26f.replace(this._XhtmlRoles,""));var _271=dojo.trim(_26f.replace(_270,""));dojo.attr(elem,"role",_271+(_271?" ":"")+role);}}},removeWaiRole:function(elem,role){var _274=dojo.attr(elem,"role");if(!_274){return;}if(role){var _275=dojo.isFF<3?"wairole:"+role:role;var t=dojo.trim((" "+_274+" ").replace(" "+_275+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_278){if(dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_278);}return elem.hasAttribute?elem.hasAttribute("aria-"+_278):!!elem.getAttribute("aria-"+_278);},getWaiState:function(elem,_27a){if(dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_27a);}return elem.getAttribute("aria-"+_27a)||"";},setWaiState:function(elem,_27c,_27d){if(dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_27c,_27d);}else{elem.setAttribute("aria-"+_27c,_27d);}},removeWaiState:function(elem,_27f){if(dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_27f);}else{elem.removeAttribute("aria-"+_27f);}}});}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(_280,_281){if(_280&&dojo.isFunction(_280._onConnect)){_280._onConnect(_281);}});dijit._connectOnUseEventHandler=function(_282){};(function(){var _283={};var _284=function(dc){if(!_283[dc]){var r=[];var _287;var _288=dojo.getObject(dc).prototype;for(var _289 in _288){if(dojo.isFunction(_288[_289])&&(_287=_289.match(/^_set([a-zA-Z]*)Attr$/))&&_287[1]){r.push(_287[1].charAt(0).toLowerCase()+_287[1].substr(1));}}_283[dc]=r;}return _283[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(_28a,_28b){this.create(_28a,_28b);},create:function(_28c,_28d){this.srcNodeRef=dojo.byId(_28d);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(_28c){this.params=_28c;dojo.mixin(this,_28c);}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 _28f=this.srcNodeRef;if(_28f&&_28f.parentNode){_28f.parentNode.replaceChild(this.domNode,_28f);}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 _290=function(attr,_292){if((_292.params&&attr in _292.params)||_292[attr]){_292.attr(attr,_292[attr]);}};for(var attr in this.attributeMap){_290(attr,this);}dojo.forEach(_284(this.declaredClass),function(a){if(!(a in this.attributeMap)){_290(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_295){this.destroyDescendants(_295);this.destroy(_295);},destroy:function(_296){this.uninitialize();dojo.forEach(this._connects,function(_297){dojo.forEach(_297,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){if(w.destroy){w.destroy();}});this.destroyRendering(_296);dijit.registry.remove(this.id);},destroyRendering:function(_299){if(this.bgIframe){this.bgIframe.destroy(_299);delete this.bgIframe;}if(this.domNode){if(_299){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_299){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_29a){dojo.forEach(this.getChildren(),function(_29b){if(_29b.destroyRecursive){_29b.destroyRecursive(_29a);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_29d){if(_29d in this._deferredConnects){var _29e=this[this._deferredConnects[_29d]||"domNode"];this.connect(_29e,_29d.toLowerCase(),_29d);delete this._deferredConnects[_29d];}},_setClassAttr:function(_29f){var _2a0=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_2a0,this["class"]);this["class"]=_29f;dojo.addClass(_2a0,_29f);},_setStyleAttr:function(_2a1){var _2a2=this[this.attributeMap["style"]||"domNode"];if(dojo.isObject(_2a1)){dojo.style(_2a2,_2a1);}else{if(_2a2.style.cssText){_2a2.style.cssText+="; "+_2a1;}else{_2a2.style.cssText=_2a1;}}this["style"]=_2a1;},setAttribute:function(attr,_2a4){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_2a4);},_attrToDom:function(attr,_2a6){var _2a7=this.attributeMap[attr];dojo.forEach(dojo.isArray(_2a7)?_2a7:[_2a7],function(_2a8){var _2a9=this[_2a8.node||_2a8||"domNode"];var type=_2a8.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_2a6)){_2a6=dojo.hitch(this,_2a6);}if(/^on[A-Z][a-zA-Z]*$/.test(attr)){attr=attr.toLowerCase();}dojo.attr(_2a9,attr,_2a6);break;case "innerHTML":_2a9.innerHTML=_2a6;break;case "class":dojo.removeClass(_2a9,this[attr]);dojo.addClass(_2a9,_2a6);break;}},this);this[attr]=_2a6;},attr:function(name,_2ac){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _2af=this._getAttrNames(name);if(args==2){if(this[_2af.s]){return this[_2af.s](_2ac)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_2ac);}this[name]=_2ac;}return this;}else{if(this[_2af.g]){return this[_2af.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,_2b5,_2b6){var d=dojo;var dc=dojo.connect;var _2b9=[];if(_2b5=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){var m=d.hitch(this,_2b6);_2b9.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){_2b9.push(dc(obj,"onkeypress",this,function(e){if(e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));}}_2b5="onclick";}_2b9.push(dc(obj,_2b5,this,_2b6));this._connects.push(_2b9);return _2b9;},disconnect:function(_2be){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_2be){dojo.forEach(_2be,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(_2c0,_2c1){if(_2c0["declaredClass"]&&_2c0["addChild"]){_2c0.addChild(this,_2c1);}else{dojo.place(this.domNode,_2c0,_2c1);}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(_2cb,map,_2cd,_2ce){_2ce=_2ce||dojo.global;_2cd=(!_2cd)?function(v){return v;}:dojo.hitch(_2ce,_2cd);return _2cb.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_2d0,key,_2d2){var _2d3=dojo.getObject(key,false,map);if(_2d2){_2d3=dojo.getObject(_2d2,false,_2ce).call(_2ce,_2d3,key);}return _2cd(_2d3,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(_2d6,_2d7){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 _2d8=dojo.date.stamp._isoRegExp.exec(_2d6);var _2d9=null;if(_2d8){_2d8.shift();if(_2d8[1]){_2d8[1]--;}if(_2d8[6]){_2d8[6]*=1000;}if(_2d7){_2d7=new Date(_2d7);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _2d7["get"+prop]();}).forEach(function(_2db,_2dc){if(_2d8[_2dc]===undefined){_2d8[_2dc]=_2db;}});}_2d9=new Date(_2d8[0]||1970,_2d8[1]||0,_2d8[2]||1,_2d8[3]||0,_2d8[4]||0,_2d8[5]||0,_2d8[6]||0);var _2dd=0;var _2de=_2d8[7]&&_2d8[7].charAt(0);if(_2de!="Z"){_2dd=((_2d8[8]||0)*60)+(Number(_2d8[9])||0);if(_2de!="-"){_2dd*=-1;}}if(_2de){_2dd-=_2d9.getTimezoneOffset();}if(_2dd){_2d9.setTime(_2d9.getTime()+_2dd*60000);}}return _2d9;};dojo.date.stamp.toISOString=function(_2df,_2e0){var _=function(n){return (n<10)?"0"+n:n;};_2e0=_2e0||{};var _2e3=[];var _2e4=_2e0.zulu?"getUTC":"get";var date="";if(_2e0.selector!="time"){var year=_2df[_2e4+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_2df[_2e4+"Month"]()+1),_(_2df[_2e4+"Date"]())].join("-");}_2e3.push(date);if(_2e0.selector!="date"){var time=[_(_2df[_2e4+"Hours"]()),_(_2df[_2e4+"Minutes"]()),_(_2df[_2e4+"Seconds"]())].join(":");var _2e8=_2df[_2e4+"Milliseconds"]();if(_2e0.milliseconds){time+="."+(_2e8<100?"0":"")+_(_2e8);}if(_2e0.zulu){time+="Z";}else{if(_2e0.selector!="time"){var _2e9=_2df.getTimezoneOffset();var _2ea=Math.abs(_2e9);time+=(_2e9>0?"-":"+")+_(Math.floor(_2ea/60))+":"+_(_2ea%60);}}_2e3.push(time);}return _2e3.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _2ec=d._scopeName+"Type";var qry="["+_2ec+"]";var _2ee=0,_2ef={};var _2f0=function(_2f1,_2f2){var nso=_2f2||_2ef;if(dojo.isIE){var cn=_2f1["__dojoNameCache"];if(cn&&nso[cn]===_2f1){return cn;}}var name;do{name="__"+_2ee++;}while(name in nso);nso[name]=_2f1;return name;};function val2type(_2f6){if(d.isString(_2f6)){return "string";}if(typeof _2f6=="number"){return "number";}if(typeof _2f6=="boolean"){return "boolean";}if(d.isFunction(_2f6)){return "function";}if(d.isArray(_2f6)){return "array";}if(_2f6 instanceof Date){return "date";}if(_2f6 instanceof d._Url){return "url";}return "object";};function str2obj(_2f7,type){switch(type){case "string":return _2f7;case "number":return _2f7.length?Number(_2f7):NaN;case "boolean":return typeof _2f7=="boolean"?_2f7:!(_2f7.toLowerCase()=="false");case "function":if(d.isFunction(_2f7)){_2f7=_2f7.toString();_2f7=d.trim(_2f7.substring(_2f7.indexOf("{")+1,_2f7.length-1));}try{if(_2f7.search(/[^\w\.]+/i)!=-1){_2f7=_2f0(new Function(_2f7),this);}return d.getObject(_2f7,false);}catch(e){return new Function();}case "array":return _2f7?_2f7.split(/\s*,\s*/):[];case "date":switch(_2f7){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_2f7);}case "url":return d.baseUrl+_2f7;default:return d.fromJson(_2f7);}};var _2f9={};function getClassInfo(_2fa){if(!_2f9[_2fa]){var cls=d.getObject(_2fa);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_2fa+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _2fc=cls.prototype;var _2fd={},_2fe={};for(var name in _2fc){if(name.charAt(0)=="_"){continue;}if(name in _2fe){continue;}var _300=_2fc[name];_2fd[name]=val2type(_300);}_2f9[_2fa]={cls:cls,params:_2fd};}return _2f9[_2fa];};this._functionFromScript=function(_301){var _302="";var _303="";var _304=_301.getAttribute("args");if(_304){d.forEach(_304.split(/\s*,\s*/),function(part,idx){_302+="var "+part+" = arguments["+idx+"]; ";});}var _307=_301.getAttribute("with");if(_307&&_307.length){d.forEach(_307.split(/\s*,\s*/),function(part){_302+="with("+part+"){";_303+="}";});}return new Function(_302+_301.innerHTML+_303);};this.instantiate=function(_309,_30a){var _30b=[];_30a=_30a||{};d.forEach(_309,function(node){if(!node){return;}var type=_2ec in _30a?_30a[_2ec]:node.getAttribute(_2ec);if(!type||!type.length){return;}var _30e=getClassInfo(type),_30f=_30e.cls,ps=_30f._noScript||_30f.prototype._noScript;var _311={},_312=node.attributes;for(var name in _30e.params){var item=name in _30a?{value:_30a[name],specified:true}:_312.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _315=item.value;switch(name){case "class":_315="className" in _30a?_30a.className:node.className;break;case "style":_315="style" in _30a?_30a.style:(node.style&&node.style.cssText);}var _316=_30e.params[name];if(typeof _315=="string"){_311[name]=str2obj(_315,_316);}else{_311[name]=_315;}}if(!ps){var _317=[],_318=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_319){var _31a=_319.getAttribute("event"),type=_319.getAttribute("type"),nf=d.parser._functionFromScript(_319);if(_31a){if(type=="dojo/connect"){_317.push({event:_31a,func:nf});}else{_311[_31a]=nf;}}else{_318.push(nf);}});}var _31c=_30f["markupFactory"];if(!_31c&&_30f["prototype"]){_31c=_30f.prototype["markupFactory"];}var _31d=_31c?_31c(_311,node,_30f):new _30f(_311,node);_30b.push(_31d);var _31e=node.getAttribute("jsId");if(_31e){d.setObject(_31e,_31d);}if(!ps){d.forEach(_317,function(_31f){d.connect(_31d,_31f.event,null,_31f.func);});d.forEach(_318,function(func){func.call(_31d);});}});d.forEach(_30b,function(_321){if(_321&&_321.startup&&!_321._started&&(!_321.getParent||!_321.getParent())){_321.startup();}});return _30b;};this.parse=function(_322){var list=d.query(qry,_322);var _324=this.instantiate(list);return _324;};}();(function(){var _325=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,_325);}else{dojo._loaders.unshift(_325);}})();}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 _327=this.declaredClass,_328=this;return dojo.string.substitute(tmpl,this,function(_329,key){if(key.charAt(0)=="!"){_329=dojo.getObject(key.substr(1),false,_328);}if(typeof _329=="undefined"){throw new Error(_327+" template:"+key);}if(_329==null){return "";}return key.charAt(0)=="!"?_329:_329.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _32b=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_32b)){node=dojo._toDom(this._stringRepl(_32b));}else{node=_32b.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(_330){var dest=this.containerNode;if(_330&&dest){while(_330.hasChildNodes()){dest.appendChild(_330.firstChild);}}},_attachTemplateNodes:function(_332,_333){_333=_333||function(n,p){return n.getAttribute(p);};var _336=dojo.isArray(_332)?_332:(_332.all||_332.getElementsByTagName("*"));var x=dojo.isArray(_332)?0:-1;for(;x<_336.length;x++){var _338=(x==-1)?_332:_336[x];if(this.widgetsInTemplate&&_333(_338,"dojoType")){continue;}var _339=_333(_338,"dojoAttachPoint");if(_339){var _33a,_33b=_339.split(/\s*,\s*/);while((_33a=_33b.shift())){if(dojo.isArray(this[_33a])){this[_33a].push(_338);}else{this[_33a]=_338;}}}var _33c=_333(_338,"dojoAttachEvent");if(_33c){var _33d,_33e=_33c.split(/\s*,\s*/);var trim=dojo.trim;while((_33d=_33e.shift())){if(_33d){var _340=null;if(_33d.indexOf(":")!=-1){var _341=_33d.split(":");_33d=trim(_341[0]);_340=trim(_341[1]);}else{_33d=trim(_33d);}if(!_340){_340=_33d;}this.connect(_338,_33d,_340);}}}var role=_333(_338,"waiRole");if(role){dijit.setWaiRole(_338,role);}var _343=_333(_338,"waiState");if(_343){dojo.forEach(_343.split(/\s*,\s*/),function(_344){if(_344.indexOf("-")!=-1){var pair=_344.split("-");dijit.setWaiState(_338,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_346,_347,_348){var _349=dijit._Templated._templateCache;var key=_347||_346;var _34b=_349[key];if(_34b){if(!_34b.ownerDocument||_34b.ownerDocument==dojo.doc){return _34b;}dojo.destroy(_34b);}if(!_347){_347=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(_346)));}_347=dojo.string.trim(_347);if(_348||_347.match(/\$\{([^\}]+)\}/g)){return (_349[key]=_347);}else{return (_349[key]=dojo._toDom(_347));}};dijit._Templated._sanitizeTemplateString=function(_34c){if(_34c){_34c=_34c.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _34d=_34c.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_34d){_34c=_34d[1];}}else{_34c="";}return _34c;};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _34e=dijit._Templated._templateCache;for(var key in _34e){var _350=_34e[key];if(!isNaN(_350.nodeType)){dojo.destroy(_350);}delete _34e[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 _353=dojo._toDom(this._template.render(new dojox.dtl._Context(this)));if(_353.nodeType!==1&&_353.nodeType!==3){for(var i=0,l=_353.childNodes.length;i<l;++i){node=_353.childNodes[i];if(node.nodeType==1){break;}}}else{node=_353;}}this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _356=dojo.parser.parse(node);this._attachTemplateNodes(_356,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(_359,_35a,_35b){var _35c=this._templateCache;var key=_35a||_359;if(_35c[key]){return _35c[key];}_35a=dojo.string.trim(_35a||dijit._Templated._sanitizeTemplateString(dojo._getText(_359)));if(this._dijitTemplateCompat&&(_35b||_35a.match(/\$\{([^\}]+)\}/g))){_35a=this._stringRepl(_35a);}if(_35b||!_35a.match(/\{[{%]([^\}]+)[%}]\}/g)){return _35c[key]=dojo._toDom(_35a);}else{return _35c[key]=new dojox.dtl.Template(_35a);}},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(_361,_362,_363,type){this.bools=_361;this.trues=_362;this.falses=_363;this.type=type;},{render:function(_365,_366){var i,bool,_369,_36a,_36b;if(this.type=="or"){for(i=0;bool=this.bools[i];i++){_369=bool[0];_36a=bool[1];_36b=_36a.resolve(_365);if((_36b&&!_369)||(_369&&!_36b)){if(this.falses){_366=this.falses.unrender(_365,_366);}return (this.trues)?this.trues.render(_365,_366,this):_366;}}if(this.trues){_366=this.trues.unrender(_365,_366);}return (this.falses)?this.falses.render(_365,_366,this):_366;}else{for(i=0;bool=this.bools[i];i++){_369=bool[0];_36a=bool[1];_36b=_36a.resolve(_365);if(_36b==_369){if(this.trues){_366=this.trues.unrender(_365,_366);}return (this.falses)?this.falses.render(_365,_366,this):_366;}}if(this.falses){_366=this.falses.unrender(_365,_366);}return (this.trues)?this.trues.render(_365,_366,this):_366;}return _366;},unrender:function(_36c,_36d){_36d=(this.trues)?this.trues.unrender(_36c,_36d):_36d;_36d=(this.falses)?this.falses.unrender(_36c,_36d):_36d;return _36d;},clone:function(_36e){var _36f=(this.trues)?this.trues.clone(_36e):null;var _370=(this.falses)?this.falses.clone(_36e):null;return new this.constructor(this.bools,_36f,_370,this.type);}});ddtl.IfEqualNode=dojo.extend(function(var1,var2,_373,_374,_375){this.var1=new dd._Filter(var1);this.var2=new dd._Filter(var2);this.trues=_373;this.falses=_374;this.negate=_375;},{render:function(_376,_377){var var1=this.var1.resolve(_376);var var2=this.var2.resolve(_376);var1=(typeof var1!="undefined")?var1:"";var2=(typeof var1!="undefined")?var2:"";if((this.negate&&var1!=var2)||(!this.negate&&var1==var2)){if(this.falses){_377=this.falses.unrender(_376,_377,this);}return (this.trues)?this.trues.render(_376,_377,this):_377;}if(this.trues){_377=this.trues.unrender(_376,_377,this);}return (this.falses)?this.falses.render(_376,_377,this):_377;},unrender:function(_37a,_37b){return ddtl.IfNode.prototype.unrender.call(this,_37a,_37b);},clone:function(_37c){var _37d=this.trues?this.trues.clone(_37c):null;var _37e=this.falses?this.falses.clone(_37c):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_37d,_37e,this.negate);}});ddtl.ForNode=dojo.extend(function(_37f,loop,_381,_382){this.assign=_37f;this.loop=new dd._Filter(loop);this.reversed=_381;this.nodelist=_382;this.pool=[];},{render:function(_383,_384){var i,j,k;var _388=false;var _389=this.assign;for(k=0;k<_389.length;k++){if(typeof _383[_389[k]]!="undefined"){_388=true;_383=_383.push();break;}}if(!_388&&_383.forloop){_388=true;_383=_383.push();}var _38a=this.loop.resolve(_383)||[];for(i=_38a.length;i<this.pool.length;i++){this.pool[i].unrender(_383,_384,this);}if(this.reversed){_38a=_38a.slice(0).reverse();}var _38b=dojo.isObject(_38a)&&!dojo.isArrayLike(_38a);var _38c=[];if(_38b){for(var key in _38a){_38c.push(_38a[key]);}}else{_38c=_38a;}var _38e=_383.forloop={parentloop:_383.get("forloop",{})};var j=0;for(i=0;i<_38c.length;i++){var item=_38c[i];_38e.counter0=j;_38e.counter=j+1;_38e.revcounter0=_38c.length-j-1;_38e.revcounter=_38c.length-j;_38e.first=!j;_38e.last=(j==_38c.length-1);if(_389.length>1&&dojo.isArrayLike(item)){if(!_388){_388=true;_383=_383.push();}var _390={};for(k=0;k<item.length&&k<_389.length;k++){_390[_389[k]]=item[k];}dojo.mixin(_383,_390);}else{_383[_389[0]]=item;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_384));}_384=this.pool[j++].render(_383,_384,this);}delete _383.forloop;if(_388){_383=_383.pop();}else{for(k=0;k<_389.length;k++){delete _383[_389[k]];}}return _384;},unrender:function(_391,_392){for(var i=0,pool;pool=this.pool[i];i++){_392=pool.unrender(_391,_392);}return _392;},clone:function(_395){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_395));}});dojo.mixin(ddtl,{if_:function(_396,_397){var i,part,type,_39b=[],_39c=_397.contents.split();_39c.shift();_397=_39c.join(" ");_39c=_397.split(" and ");if(_39c.length==1){type="or";_39c=_397.split(" or ");}else{type="and";for(i=0;i<_39c.length;i++){if(_39c[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;part=_39c[i];i++){var not=false;if(part.indexOf("not ")==0){part=part.slice(4);not=true;}_39b.push([not,new dd._Filter(part)]);}var _39e=_396.parse(["else","endif"]);var _39f=false;var _397=_396.next_token();if(_397.contents=="else"){_39f=_396.parse(["endif"]);_396.next_token();}return new ddtl.IfNode(_39b,_39e,_39f,type);},_ifequal:function(_3a0,_3a1,_3a2){var _3a3=_3a1.split_contents();if(_3a3.length!=3){throw new Error(_3a3[0]+" takes two arguments");}var end="end"+_3a3[0];var _3a5=_3a0.parse(["else",end]);var _3a6=false;var _3a1=_3a0.next_token();if(_3a1.contents=="else"){_3a6=_3a0.parse([end]);_3a0.next_token();}return new ddtl.IfEqualNode(_3a3[1],_3a3[2],_3a5,_3a6,_3a2);},ifequal:function(_3a7,_3a8){return ddtl._ifequal(_3a7,_3a8);},ifnotequal:function(_3a9,_3aa){return ddtl._ifequal(_3a9,_3aa,true);},for_:function(_3ab,_3ac){var _3ad=_3ac.contents.split();if(_3ad.length<4){throw new Error("'for' statements should have at least four words: "+_3ac.contents);}var _3ae=_3ad[_3ad.length-1]=="reversed";var _3af=(_3ae)?-3:-2;if(_3ad[_3ad.length+_3af]!="in"){throw new Error("'for' tag received an invalid argument: "+_3ac.contents);}var _3b0=_3ad.slice(1,_3af).join(" ").split(/ *, */);for(var i=0;i<_3b0.length;i++){if(!_3b0[i]||_3b0[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_3ac.contents);}}var _3b2=_3ab.parse(["endfor"]);_3ab.next_token();return new ddtl.ForNode(_3b0,_3ad[_3ad.length+_3af+1],_3ae,_3b2);}});})();}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(_3b3){_3b3=_3b3||{};dojo.mixin(this,_3b3);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(_3b6){dojo.mixin(this,_3b6);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(_3b8){var _3b9={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(_3b9,_3b8);var _3ba=window.open(_3b9.url,_3b9.name,"toolbar="+_3b9.toolbar+","+"location="+_3b9.location+","+"status="+_3b9.status+","+"resizable="+_3b9.resizable+","+"copyhistory="+_3b9.copyhistory+","+"width="+_3b9.width+","+"height="+_3b9.height+","+"scrollbars="+_3b9.scrollbars);return _3ba;};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(_3bc){settings={url:ahost+"/feedback",name:"pwfeedback",width:610,height:580,scrollbars:"yes"};dojo.mixin(settings,_3bc);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(_3bd){settings={name:"pwlargepreview",width:950,height:600,resizable:1,toolbar:0,location:0,scrollbars:1};dojo.mixin(settings,_3bd);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:700,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(_3bf,_3c0,uri){if(window[_3bf]){return window[_3bf];}if(window.frames[_3bf]){return window.frames[_3bf];}var _3c2=null;var turi=uri;if(!turi){if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){}turi=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));}var _3c4=dojo.isIE?"<iframe name=\""+_3bf+"\" src=\""+turi+"\" onload=\""+_3c0+"\">":"iframe";_3c2=dojo.doc.createElement(_3c4);with(_3c2){name=_3bf;setAttribute("name",_3bf);id=_3bf;}dojo.body().appendChild(_3c2);window[_3bf]=_3c2;with(_3c2.style){if(!(dojo.isSafari<3)){position="absolute";}left=top="1px";height=width="1px";visibility="hidden";}if(!dojo.isIE){this.setSrc(_3c2,turi,true);_3c2.onload=new Function(_3c0);}return _3c2;},setSrc:function(_3c5,src,_3c7){try{if(!_3c7){if(dojo.isWebKit){_3c5.location=src;}else{frames[_3c5.name].location=src;}}else{var idoc;if(dojo.isIE||dojo.isWebKit>521){idoc=_3c5.contentWindow.document;}else{if(dojo.isSafari){idoc=_3c5.document;}else{idoc=_3c5.contentWindow;}}if(!idoc){_3c5.location=src;return;}else{idoc.location.replace(src);}}}catch(e){}},doc:function(_3c9){var doc=_3c9.contentDocument||(((_3c9.name)&&(_3c9.document)&&(document.getElementsByTagName("iframe")[_3c9.name].contentWindow)&&(document.getElementsByTagName("iframe")[_3c9.name].contentWindow.document)))||((_3c9.name)&&(document.frames[_3c9.name])&&(document.frames[_3c9.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 _3cf=null;try{var _3d0=dfd.ioArgs;var dii=dojo.io.iframe;var ifd=dii.doc(dii._frame);var _3d3=_3d0.handleAs;_3cf=ifd;if(_3d3!="html"){if(_3d3=="xml"){if(dojo.isIE){dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _3d4=(dii._frame.contentWindow.document).documentElement.innerText;_3d4=_3d4.replace(/>\s+</g,"><");_3d4=dojo.trim(_3d4);var _3d5={responseText:_3d4};_3cf=dojo._contentHandlers["xml"](_3d5);}}else{_3cf=ifd.getElementsByTagName("textarea")[0].value;if(_3d3=="json"){_3cf=dojo.fromJson(_3cf);}else{if(_3d3=="javascript"){_3cf=dojo.eval(_3cf);}}}}}catch(e){_3cf=e;}finally{_3d0._callNext();}return _3cf;},function(_3d6,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _3d6;});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 _3dc=dfd.ioArgs;var args=_3dc.args;_3dc._contentToClean=[];var fn=dojo.byId(args["form"]);var _3df=args["content"]||{};if(fn){if(_3df){var _3e0=function(name,_3e2){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=_3e2;fn.appendChild(tn);_3dc._contentToClean.push(name);};for(var x in _3df){var val=_3df[x];if(dojo.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_3e0(x,val[i]);}}else{if(!fn[x]){_3e0(x,val);}else{fn[x].value=val;}}}}var _3e7=fn.getAttributeNode("action");var _3e8=fn.getAttributeNode("method");var _3e9=fn.getAttributeNode("target");if(args["url"]){_3dc._originalAction=_3e7?_3e7.value:null;if(_3e7){_3e7.value=args.url;}else{fn.setAttribute("action",args.url);}}if(!_3e8||!_3e8.value){if(_3e8){_3e8.value=(args["method"])?args["method"]:"post";}else{fn.setAttribute("method",(args["method"])?args["method"]:"post");}}_3dc._originalTarget=_3e9?_3e9.value:null;if(_3e9){_3e9.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;fn.submit();}else{var _3ea=args.url+(args.url.indexOf("?")>-1?"&":"?")+_3dc.query;this.setSrc(this._frame,_3ea,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _3ec=dfd.ioArgs;var args=_3ec.args;var _3ee=dojo.byId(args.form);if(_3ee){var _3ef=_3ec._contentToClean;for(var i=0;i<_3ef.length;i++){var key=_3ef[i];for(var j=0;j<_3ee.childNodes.length;j++){var _3f3=_3ee.childNodes[j];if(_3f3.name==key){dojo.destroy(_3f3);break;}}}if(_3ec["_originalAction"]){_3ee.setAttribute("action",_3ec._originalAction);}if(_3ec["_originalTarget"]){_3ee.setAttribute("target",_3ec._originalTarget);_3ee.target=_3ec._originalTarget;}}_3ec._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,_3f5){if(typeof _3f5=="undefined"){var _3f5={};}if(typeof _3f5.load=="undefined"){_3f5.load="void";}if(typeof _3f5.error=="undefined"){_3f5.error="void";}if(typeof _3f5.timeout=="undefined"){_3f5.timeout=60;}_3f5.timeout=_3f5.timeout*1000;var form=dojo.byId(form);var _3f6=new Date().getTime();if(window.location.href.indexOf(shost)==0){var _3f7="securecallback"+_3f6;}else{if(window.location.href.indexOf(khost)==0){var _3f7="cachecallback"+_3f6;}else{var _3f7="callback"+_3f6;}}var _3f8="error"+_3f6;var _3f9="pw.io.iframe.timeout"+_3f6;pw.io.iframe[_3f8]=function(_3fa){pw.io.iframe[_3f7]=function(){};var _3fb=pw.io.iframe._get_function(_3fa);_3fb();};_3f9=setTimeout("pw.io.iframe."+_3f8+"('"+_3f5.error+"')",_3f5.timeout);_3f5.error="pw.io.iframe."+_3f8;pw.io.iframe[_3f7]=function(_3fc){clearTimeout(_3f9);var _3fd=pw.io.iframe._get_function(_3f5.load);_3fd(_3fc);};_3f5.callback="pw.io.iframe."+_3f7;_3f5.cachebust=_3f6;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=_3f5.callback;var _3fe=dojo.io.iframe.send({url:form.action,method:form.method,form:form,handleAs:"html"});},_get_function:function(str){var _400=window;if(str.indexOf(".")==-1){return _400[str];}var _401=str.split(".");for(var i=0;i<_401.length;i++){_400=_400[_401[i]];}return _400;}};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_404){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_404&&_404.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_408){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("|"),_408);};dojo.regexp.group=function(_40b,_40c){return "("+(_40c?"?:":"")+_40b+")";};}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_40d,_40e,_40f){_40f=dojo.i18n.normalizeLocale(_40f);var _410=_40f.split("-");var _411=[_40d,"nls",_40e].join(".");var _412=dojo._loadedModules[_411];if(_412){var _413;for(var i=_410.length;i>0;i--){var loc=_410.slice(0,i).join("_");if(_412[loc]){_413=_412[loc];break;}}if(!_413){_413=_412.ROOT;}if(_413){var _416=function(){};_416.prototype=_413;return new _416();}}throw new Error("Bundle not found: "+_40e+" in "+_40d+" , locale="+_40f);};dojo.i18n.normalizeLocale=function(_417){var _418=_417?_417.toLowerCase():dojo.locale;if(_418=="root"){_418="ROOT";}return _418;};dojo.i18n._requireLocalization=function(_419,_41a,_41b,_41c){var _41d=dojo.i18n.normalizeLocale(_41b);var _41e=[_419,"nls",_41a].join(".");var _41f="";if(_41c){var _420=_41c.split(",");for(var i=0;i<_420.length;i++){if(_41d["indexOf"](_420[i])==0){if(_420[i].length>_41f.length){_41f=_420[i];}}}if(!_41f){_41f="ROOT";}}var _422=_41c?_41f:_41d;var _423=dojo._loadedModules[_41e];var _424=null;if(_423){if(dojo.config.localizationComplete&&_423._built){return;}var _425=_422.replace(/-/g,"_");var _426=_41e+"."+_425;_424=dojo._loadedModules[_426];}if(!_424){_423=dojo["provide"](_41e);var syms=dojo._getModuleSymbols(_419);var _428=syms.concat("nls").join("/");var _429;dojo.i18n._searchLocalePath(_422,_41c,function(loc){var _42b=loc.replace(/-/g,"_");var _42c=_41e+"."+_42b;var _42d=false;if(!dojo._loadedModules[_42c]){dojo["provide"](_42c);var _42e=[_428];if(loc!="ROOT"){_42e.push(loc);}_42e.push(_41a);var _42f=_42e.join("/")+".js";_42d=dojo._loadPath(_42f,null,function(hash){var _431=function(){};_431.prototype=_429;_423[_42b]=new _431();for(var j in hash){_423[_42b][j]=hash[j];}});}else{_42d=true;}if(_42d&&_423[_42b]){_429=_423[_42b];}else{_423[_42b]=_429;}if(_41c){return true;}});}if(_41c&&_41d!=_41f){_423[_41d.replace(/-/g,"_")]=_423[_41f.replace(/-/g,"_")];}};(function(){var _433=dojo.config.extraLocale;if(_433){if(!_433 instanceof Array){_433=[_433];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_437,_438){req(m,b,_437,_438);if(_437){return;}for(var i=0;i<_433.length;i++){req(m,b,_433[i],_438);}};}})();dojo.i18n._searchLocalePath=function(_43a,down,_43c){_43a=dojo.i18n.normalizeLocale(_43a);var _43d=_43a.split("-");var _43e=[];for(var i=_43d.length;i>0;i--){_43e.push(_43d.slice(0,i).join("-"));}_43e.push(false);if(down){_43e.reverse();}for(var j=_43e.length-1;j>=0;j--){var loc=_43e[j]||"ROOT";var stop=_43c(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_443,_444){function preload(_445){_445=dojo.i18n.normalizeLocale(_445);dojo.i18n._searchLocalePath(_445,true,function(loc){for(var i=0;i<_444.length;i++){if(_444[i]==loc){dojo["require"](_443+"_"+loc);return true;}}return false;});};preload();var _448=dojo.config.extraLocale||[];for(var i=0;i<_448.length;i++){preload(_448[i]);}};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_44a,_44b){_44b=dojo.mixin({},_44b||{});var _44c=dojo.i18n.normalizeLocale(_44b.locale);var _44d=dojo.i18n.getLocalization("dojo.cldr","number",_44c);_44b.customs=_44d;var _44e=_44b.pattern||_44d[(_44b.type||"decimal")+"Format"];if(isNaN(_44a)||Math.abs(_44a)==Infinity){return null;}return dojo.number._applyPattern(_44a,_44e,_44b);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_44f,_450,_451){_451=_451||{};var _452=_451.customs.group;var _453=_451.customs.decimal;var _454=_450.split(";");var _455=_454[0];_450=_454[(_44f<0)?1:0]||("-"+_455);if(_450.indexOf("%")!=-1){_44f*=100;}else{if(_450.indexOf("‰")!=-1){_44f*=1000;}else{if(_450.indexOf("¤")!=-1){_452=_451.customs.currencyGroup||_452;_453=_451.customs.currencyDecimal||_453;_450=_450.replace(/\u00a4{1,3}/,function(_456){var prop=["symbol","currency","displayName"][_456.length-1];return _451[prop]||_451.currency||"";});}else{if(_450.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _458=dojo.number._numberPatternRE;var _459=_455.match(_458);if(!_459){throw new Error("unable to find a number expression in pattern: "+_450);}if(_451.fractional===false){_451.places=0;}return _450.replace(_458,dojo.number._formatAbsolute(_44f,_459[0],{decimal:_453,group:_452,places:_451.places,round:_451.round}));};dojo.number.round=function(_45a,_45b,_45c){var _45d=10/(_45c||10);return (_45d*+_45a).toFixed(_45b)/_45d;};if((0.9).toFixed()==0){(function(){var _45e=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 _45e(v,p,m)+(v>0?d:-d);};})();}dojo.number._formatAbsolute=function(_464,_465,_466){_466=_466||{};if(_466.places===true){_466.places=0;}if(_466.places===Infinity){_466.places=6;}var _467=_465.split(".");var _468=(_466.places>=0)?_466.places:(_467[1]&&_467[1].length)||0;if(!(_466.round<0)){_464=dojo.number.round(_464,_468,_466.round);}var _469=String(Math.abs(_464)).split(".");var _46a=_469[1]||"";if(_466.places){var _46b=dojo.isString(_466.places)&&_466.places.indexOf(",");if(_46b){_466.places=_466.places.substring(_46b+1);}_469[1]=dojo.string.pad(_46a.substr(0,_466.places),_466.places,"0",true);}else{if(_467[1]&&_466.places!==0){var pad=_467[1].lastIndexOf("0")+1;if(pad>_46a.length){_469[1]=dojo.string.pad(_46a,pad,"0",true);}var _46d=_467[1].length;if(_46d<_46a.length){_469[1]=_46a.substr(0,_46d);}}else{if(_469[1]){_469.pop();}}}var _46e=_467[0].replace(",","");pad=_46e.indexOf("0");if(pad!=-1){pad=_46e.length-pad;if(pad>_469[0].length){_469[0]=dojo.string.pad(_469[0],pad);}if(_46e.indexOf("#")==-1){_469[0]=_469[0].substr(_469[0].length-pad);}}var _46f=_467[0].lastIndexOf(",");var _470,_471;if(_46f!=-1){_470=_467[0].length-_46f-1;var _472=_467[0].substr(0,_46f);_46f=_472.lastIndexOf(",");if(_46f!=-1){_471=_472.length-_46f-1;}}var _473=[];for(var _474=_469[0];_474;){var off=_474.length-_470;_473.push((off>0)?_474.substr(off):_474);_474=(off>0)?_474.slice(0,off):"";if(_471){_470=_471;delete _471;}}_469[0]=_473.reverse().join(_466.group||",");return _469.join(_466.decimal||".");};dojo.number.regexp=function(_476){return dojo.number._parseInfo(_476).regexp;};dojo.number._parseInfo=function(_477){_477=_477||{};var _478=dojo.i18n.normalizeLocale(_477.locale);var _479=dojo.i18n.getLocalization("dojo.cldr","number",_478);var _47a=_477.pattern||_479[(_477.type||"decimal")+"Format"];var _47b=_479.group;var _47c=_479.decimal;var _47d=1;if(_47a.indexOf("%")!=-1){_47d/=100;}else{if(_47a.indexOf("‰")!=-1){_47d/=1000;}else{var _47e=_47a.indexOf("¤")!=-1;if(_47e){_47b=_479.currencyGroup||_47b;_47c=_479.currencyDecimal||_47c;}}}var _47f=_47a.split(";");if(_47f.length==1){_47f.push("-"+_47f[0]);}var re=dojo.regexp.buildGroupRE(_47f,function(_481){_481="(?:"+dojo.regexp.escapeString(_481,".")+")";return _481.replace(dojo.number._numberPatternRE,function(_482){var _483={signed:false,separator:_477.strict?_47b:[_47b,""],fractional:_477.fractional,decimal:_47c,exponent:false};var _484=_482.split(".");var _485=_477.places;if(_484.length==1||_485===0){_483.fractional=false;}else{if(_485===undefined){_485=_477.pattern?_484[1].lastIndexOf("0")+1:Infinity;}if(_485&&_477.fractional==undefined){_483.fractional=true;}if(!_477.places&&(_485<_484[1].length)){_485+=","+_484[1].length;}_483.places=_485;}var _486=_484[0].split(",");if(_486.length>1){_483.groupSize=_486.pop().length;if(_486.length>1){_483.groupSize2=_486.pop().length;}}return "("+dojo.number._realNumberRegexp(_483)+")";});},true);if(_47e){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_487,_488,_489,_48a){var prop=["symbol","currency","displayName"][_489.length-1];var _48c=dojo.regexp.escapeString(_477[prop]||_477.currency||"");_488=_488?"[\\s\\xa0]":"";_48a=_48a?"[\\s\\xa0]":"";if(!_477.strict){if(_488){_488+="*";}if(_48a){_48a+="*";}return "(?:"+_488+_48c+_48a+")?";}return _488+_48c+_48a;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_47b,decimal:_47c,factor:_47d};};dojo.number.parse=function(_48d,_48e){var info=dojo.number._parseInfo(_48e);var _490=(new RegExp("^"+info.regexp+"$")).exec(_48d);if(!_490){return NaN;}var _491=_490[1];if(!_490[1]){if(!_490[2]){return NaN;}_491=_490[2];info.factor*=-1;}_491=_491.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _491*info.factor;};dojo.number._realNumberRegexp=function(_492){_492=_492||{};if(!("places" in _492)){_492.places=Infinity;}if(typeof _492.decimal!="string"){_492.decimal=".";}if(!("fractional" in _492)||/^0/.test(_492.places)){_492.fractional=[true,false];}if(!("exponent" in _492)){_492.exponent=[true,false];}if(!("eSigned" in _492)){_492.eSigned=[true,false];}var _493=dojo.number._integerRegexp(_492);var _494=dojo.regexp.buildGroupRE(_492.fractional,function(q){var re="";if(q&&(_492.places!==0)){re="\\"+_492.decimal;if(_492.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_492.places+"}";}}return re;},true);var _497=dojo.regexp.buildGroupRE(_492.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_492.eSigned})+")";}return "";});var _499=_493+_494;if(_494){_499="(?:(?:"+_499+")|(?:"+_494+"))";}return _499+_497;};dojo.number._integerRegexp=function(_49a){_49a=_49a||{};if(!("signed" in _49a)){_49a.signed=[true,false];}if(!("separator" in _49a)){_49a.separator="";}else{if(!("groupSize" in _49a)){_49a.groupSize=3;}}var _49b=dojo.regexp.buildGroupRE(_49a.signed,function(q){return q?"[-+]":"";},true);var _49d=dojo.regexp.buildGroupRE(_49a.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_49a.groupSize,grp2=_49a.groupSize2;if(grp2){var _4a1="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_4a1+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_4a1;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _49b+_49d;};}if(!dojo._hasResource["dojox.validate.regexp"]){dojo._hasResource["dojox.validate.regexp"]=true;dojo.provide("dojox.validate.regexp");dojo.mixin(dojox.validate.regexp,{ipAddress:function(_4a2){_4a2=(typeof _4a2=="object")?_4a2:{};if(typeof _4a2.allowDottedDecimal!="boolean"){_4a2.allowDottedDecimal=true;}if(typeof _4a2.allowDottedHex!="boolean"){_4a2.allowDottedHex=true;}if(typeof _4a2.allowDottedOctal!="boolean"){_4a2.allowDottedOctal=true;}if(typeof _4a2.allowDecimal!="boolean"){_4a2.allowDecimal=true;}if(typeof _4a2.allowHex!="boolean"){_4a2.allowHex=true;}if(typeof _4a2.allowIPv6!="boolean"){_4a2.allowIPv6=true;}if(typeof _4a2.allowHybrid!="boolean"){_4a2.allowHybrid=true;}var _4a3="((\\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 _4a4="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";var _4a5="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";var _4a6="(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 _4a7="0[xX]0*[\\da-fA-F]{1,8}";var _4a8="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";var _4a9="([\\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(_4a2.allowDottedDecimal){a.push(_4a3);}if(_4a2.allowDottedHex){a.push(_4a4);}if(_4a2.allowDottedOctal){a.push(_4a5);}if(_4a2.allowDecimal){a.push(_4a6);}if(_4a2.allowHex){a.push(_4a7);}if(_4a2.allowIPv6){a.push(_4a8);}if(_4a2.allowHybrid){a.push(_4a9);}var _4ab="";if(a.length>0){_4ab="("+a.join("|")+")";}return _4ab;},host:function(_4ac){_4ac=(typeof _4ac=="object")?_4ac:{};if(typeof _4ac.allowIP!="boolean"){_4ac.allowIP=true;}if(typeof _4ac.allowLocal!="boolean"){_4ac.allowLocal=false;}if(typeof _4ac.allowPort!="boolean"){_4ac.allowPort=true;}if(typeof _4ac.allowNamed!="boolean"){_4ac.allowNamed=false;}var _4ad="(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)";var _4ae="(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)";var _4af=_4ac.allowPort?"(\\:\\d+)?":"";var _4b0="((?:"+_4ad+"\\.)*"+_4ae+"\\.?)";if(_4ac.allowIP){_4b0+="|"+dojox.validate.regexp.ipAddress(_4ac);}if(_4ac.allowLocal){_4b0+="|localhost";}if(_4ac.allowNamed){_4b0+="|^[^-][a-zA-Z0-9_-]*";}return "("+_4b0+")"+_4af;},url:function(_4b1){_4b1=(typeof _4b1=="object")?_4b1:{};if(!("scheme" in _4b1)){_4b1.scheme=[true,false];}var _4b2=dojo.regexp.buildGroupRE(_4b1.scheme,function(q){if(q){return "(https?|ftps?)\\://";}return "";});var _4b4="(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]+(?:\\?[^?#\\s/]*)?(?:#[A-Za-z][\\w.:-]*)?)?)?";return _4b2+dojox.validate.regexp.host(_4b1)+_4b4;},emailAddress:function(_4b5){_4b5=(typeof _4b5=="object")?_4b5:{};if(typeof _4b5.allowCruft!="boolean"){_4b5.allowCruft=false;}_4b5.allowPort=false;var _4b6="([\\da-zA-Z]+[-._+&'])*[\\da-zA-Z]+";var _4b7=_4b6+"@"+dojox.validate.regexp.host(_4b5);if(_4b5.allowCruft){_4b7="<?(mailto\\:)?"+_4b7+">?";}return _4b7;},emailAddressList:function(_4b8){_4b8=(typeof _4b8=="object")?_4b8:{};if(typeof _4b8.listSeparator!="string"){_4b8.listSeparator="\\s;,";}var _4b9=dojox.validate.regexp.emailAddress(_4b8);var _4ba="("+_4b9+"\\s*["+_4b8.listSeparator+"]\\s*)*"+_4b9+"\\s*["+_4b8.listSeparator+"]?\\s*";return _4ba;},numberFormat:function(_4bb){_4bb=(typeof _4bb=="object")?_4bb:{};if(typeof _4bb.format=="undefined"){_4bb.format="###-###-####";}var _4bc=function(_4bd){return dojo.regexp.escapeString(_4bd,"?").replace(/\?/g,"\\d?").replace(/#/g,"\\d");};return dojo.regexp.buildGroupRE(_4bb.format,_4bc);}});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(_4be){_4be=(typeof _4be=="object")?_4be:{};if(typeof _4be.allowTerritories!="boolean"){_4be.allowTerritories=true;}if(typeof _4be.allowMilitary!="boolean"){_4be.allowMilitary=true;}var _4bf="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 _4c0="AS|FM|GU|MH|MP|PW|PR|VI";var _4c1="AA|AE|AP";if(_4be.allowTerritories){_4bf+="|"+_4c0;}if(_4be.allowMilitary){_4bf+="|"+_4c1;}return "("+_4bf+")";}};}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(_4c2,_4c3){_4c3=(typeof _4c3=="object")?_4c3:{};if(/^\s*$/.test(_4c2)){return false;}if(typeof _4c3.length=="number"&&_4c3.length!=_4c2.length){return false;}if(typeof _4c3.minlength=="number"&&_4c3.minlength>_4c2.length){return false;}if(typeof _4c3.maxlength=="number"&&_4c3.maxlength<_4c2.length){return false;}return true;};dojox.validate._isInRangeCache={};dojox.validate.isInRange=function(_4c4,_4c5){_4c4=dojo.number.parse(_4c4,_4c5);if(isNaN(_4c4)){return false;}_4c5=(typeof _4c5=="object")?_4c5:{};var max=(typeof _4c5.max=="number")?_4c5.max:Infinity,min=(typeof _4c5.min=="number")?_4c5.min:-Infinity,dec=(typeof _4c5.decimal=="string")?_4c5.decimal:".",_4c9=dojox.validate._isInRangeCache,_4ca=_4c4+"max"+max+"min"+min+"dec"+dec;if(typeof _4c9[_4ca]!="undefined"){return _4c9[_4ca];}_4c9[_4ca]=!(_4c4<min||_4c4>max);return _4c9[_4ca];};dojox.validate.isNumberFormat=function(_4cb,_4cc){var re=new RegExp("^"+dojox.validate.regexp.numberFormat(_4cc)+"$","i");return re.test(_4cb);};dojox.validate.isValidLuhn=function(_4ce){var sum=0,_4d0,_4d1;if(!dojo.isString(_4ce)){_4ce=String(_4ce);}_4ce=_4ce.replace(/[- ]/g,"");_4d0=_4ce.length%2;for(var i=0;i<_4ce.length;i++){_4d1=parseInt(_4ce.charAt(i));if(i%2==_4d0){_4d1*=2;}if(_4d1>9){_4d1-=9;}sum+=_4d1;}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,_4d4){var _4d5=[];var _4d6=[];var _4d7={isSuccessful:function(){return (!this.hasInvalid()&&!this.hasMissing());},hasMissing:function(){return (_4d5.length>0);},getMissing:function(){return _4d5;},isMissing:function(_4d8){for(var i=0;i<_4d5.length;i++){if(_4d8==_4d5[i]){return true;}}return false;},hasInvalid:function(){return (_4d6.length>0);},getInvalid:function(){return _4d6;},isInvalid:function(_4da){for(var i=0;i<_4d6.length;i++){if(_4da==_4d6[i]){return true;}}return false;}};var _4dc=function(name,_4de){return (typeof _4de[name]=="undefined");};if(_4d4.trim instanceof Array){for(var i=0;i<_4d4.trim.length;i++){var elem=form[_4d4.trim[i]];if(_4dc("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/(^\s*|\s*$)/g,"");}}if(_4d4.uppercase instanceof Array){for(var i=0;i<_4d4.uppercase.length;i++){var elem=form[_4d4.uppercase[i]];if(_4dc("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.toUpperCase();}}if(_4d4.lowercase instanceof Array){for(var i=0;i<_4d4.lowercase.length;i++){var elem=form[_4d4.lowercase[i]];if(_4dc("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.toLowerCase();}}if(_4d4.ucfirst instanceof Array){for(var i=0;i<_4d4.ucfirst.length;i++){var elem=form[_4d4.ucfirst[i]];if(_4dc("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(_4d4.digit instanceof Array){for(var i=0;i<_4d4.digit.length;i++){var elem=form[_4d4.digit[i]];if(_4dc("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/\D/g,"");}}if(_4d4.required instanceof Array){for(var i=0;i<_4d4.required.length;i++){if(!dojo.isString(_4d4.required[i])){continue;}var elem=form[_4d4.required[i]];if(!_4dc("type",elem)&&(elem.type=="text"||elem.type=="textarea"||elem.type=="password"||elem.type=="file")&&/^\s*$/.test(elem.value)){_4d5[_4d5.length]=elem.name;}else{if(!_4dc("type",elem)&&(elem.type=="select-one"||elem.type=="select-multiple")&&(elem.selectedIndex==-1||/^\s*$/.test(elem.options[elem.selectedIndex].value))){_4d5[_4d5.length]=elem.name;}else{if(dojo.isArrayLike(elem)&&(elem.type!="select-one"&&elem.type!="select-multiple")){var _4e2=false;for(var j=0;j<elem.length;j++){if(elem[j].checked){_4e2=true;}}if(!_4e2){_4d5[_4d5.length]=elem[0].name;}}}}}}if(_4d4.required instanceof Array){for(var i=0;i<_4d4.required.length;i++){if(!dojo.isObject(_4d4.required[i])){continue;}var elem,_4e4;for(var name in _4d4.required[i]){elem=form[name];_4e4=_4d4.required[i][name];}if(elem instanceof Array){var _4e2=0;for(var j=0;j<elem.length;j++){if(elem[j].checked){_4e2++;}}if(_4e2<_4e4){_4d5[_4d5.length]=elem[0].name;}}else{if(!_4dc("type",elem)&&elem.type=="select-multiple"){var _4e6=0;for(var j=0;j<elem.options.length;j++){if(elem.options[j].selected&&!/^\s*$/.test(elem.options[j].value)){_4e6++;}}if(_4e6<_4e4){_4d5[_4d5.length]=elem.name;}}}}}if(dojo.isObject(_4d4.dependencies)){for(name in _4d4.dependencies){var elem=form[name];if(_4dc("type",elem)){continue;}if(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}if(/\S+/.test(elem.value)){continue;}if(_4d7.isMissing(elem.name)){continue;}var _4e7=form[_4d4.dependencies[name]];if(_4e7.type!="text"&&_4e7.type!="textarea"&&_4e7.type!="password"){continue;}if(/^\s*$/.test(_4e7.value)){continue;}_4d5[_4d5.length]=elem.name;}}if(dojo.isObject(_4d4.constraints)){for(name in _4d4.constraints){var elem=form[name];if(!elem){continue;}if(!_4dc("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 _4e9=true;if(dojo.isFunction(_4d4.constraints[name])){_4e9=_4d4.constraints[name](elem.value);}else{if(dojo.isArray(_4d4.constraints[name])){if(dojo.isArray(_4d4.constraints[name][0])){for(var i=0;i<_4d4.constraints[name].length;i++){_4e9=dojox.validate.evaluateConstraint(_4d4,_4d4.constraints[name][i],name,elem);if(!_4e9){break;}}}else{_4e9=dojox.validate.evaluateConstraint(_4d4,_4d4.constraints[name],name,elem);}}}if(!_4e9){_4d6[_4d6.length]=elem.name;}}}if(dojo.isObject(_4d4.confirm)){for(name in _4d4.confirm){var elem=form[name];var _4e7=form[_4d4.confirm[name]];if(_4dc("type",elem)||_4dc("type",_4e7)||(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password")||(_4e7.type!=elem.type)||(_4e7.value==elem.value)||(_4d7.isInvalid(elem.name))||(/^\s*$/.test(_4e7.value))){continue;}_4d6[_4d6.length]=elem.name;}}return _4d7;};dojox.validate.evaluateConstraint=function(_4ea,_4eb,_4ec,elem){var _4ee=_4eb[0];var _4ef=_4eb.slice(1);_4ef.unshift(elem.value);if(typeof _4ee!="undefined"){return _4ee.apply(null,_4ef);}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,_4f1,_4f2,_4f3,_4f4){var _4f5=this;var req=null;this.async=_4f2;this.method=_4f1;this.url=url;this.showbusy=_4f3;this.in_process=false;this.handleas=_4f4?_4f4:"text";this.get_millisecond_query=function(){var _4f7=new Date();var ms=_4f7.getTime();return "&ajax_requester_ms="+ms;};this.sendRequest=function(_4f9){var _4fa={url:this.url,sync:!this.async,content:_4f9?_4f9:{},preventCache:_4f9?true:false,handleAs:this.handleas,load:_4f5.processLoad,error:_4f5.processError};if(this.showbusy){document.body.style.cursor="wait";}this.in_process=true;if(this.method.toUpperCase()=="POST"){dojo.xhrPost(_4fa);}else{dojo.xhrGet(_4fa);}};this.processLoad=function(_4fb,_4fc){_4fb=_4f5.processAlways(_4fb,_4fc);if(_4fc.xhr.getResponseHeader("Kaboom")){if(_4fc.xhrgetResponseHeader("Kaboom").toLowerCase()=="true"){if(_4f5.onerror){_4f5.onerror(_4fb,_4fc);}}}else{if(_4f5.onsuccess){_4f5.onsuccess(_4fb,_4fc);}}return _4fb;};this.processError=function(_4fd,_4fe){_4fd=_4f5.processAlways(_4fd,_4fe);if(_4f5.onerror){_4f5.onerror(_4fd,_4fe);}return _4fd;};this.processAlways=function(_4ff,_500){_4f5.in_process=false;if(_4f5.showbusy){document.body.style.cursor="auto";}if(!_4ff){_4ff="";}try{_4ff=_4ff.replace("<!--this page was compressed by your friendly neighborhood pydriver-->","");}catch(e){}return _4ff;};this.formToQuery=function(_501){var _502=dojo.formToObject(_501);return _502;};};var script_fragment="<script[^>]*>([\\s\\S]*?)</script>";agi.requester.stripScripts=function(_503){return _503.replace(new RegExp(script_fragment,"img"),"");};agi.requester.extractScripts=function(_504){var _505=new RegExp(script_fragment,"img");var _506=new RegExp(script_fragment,"im");var _507=_504.match(_505);var _508=[];if(_507){for(var i=0;i<_507.length;i++){if(_507[i].indexOf("agi-lb-exec")!=-1){_508.push(_507[i].match(_506)[1]);}}}return _508;};agi.requester.evalScripts=function(_50a){var _50b=agi.requester.extractScripts(_50a);for(i=0;i<_50b.length;i++){try{eval(_50b[i]);}catch(e){}}};agi.requester.checkAll=function(_50c,_50d){form=dojo.byId(_50c);for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"){form.elements[i].checked=_50d;}}};agi.requester.countChecked=function(_50e){var form=dojo.byId(_50e);var _510=0;for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"&form.elements[i].checked){_510++;}}return _510;};agi.requester.selectAll=function(_511,_512){if(_512==undefined){var _513=true;}else{var _513=_512;}var list=dojo.byId(_511);var _515=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=_513;len=_515.length;for(n=0;n<len;n++){if((_515[n].value)==(list.childNodes[i].childNodes[j].value)){_515[n].checked=_513;}}}}}}};agi.requester.selectEqual=function(_516){var _517=document.getElementsByName(_516.name);for(i=0;i<_517.length;i++){if(_516.form.elements[i].value==_516.value){_516.form.elements[i].checked=_516.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(_51a){_51a=_51a||{};dojo.mixin(this,_51a);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 _51d=this.overlayId;var _51e=dojo.byId(_51d);if(!_51e){_51e=document.createElement("div");_51e.setAttribute("id",_51d);dojo.addClass(_51e,this.noprintClass);var _51f=this._pageSize();dojo.style(_51e,{display:"none",position:"absolute",top:"0",left:"0",zIndex:this.overlayZindex,width:"100%",height:_51f[1]+"px"});body.insertBefore(_51e,body.firstChild);}try{filter=dojo.style(_51e,"filter");if(filter&&dojo.isIE){if(filter.indexOf(imghost)==-1){filter=filter.replace("/agbeta",imghost+"/agbeta");dojo.style(_51e,"filter",filter);}}}catch(e){}return _51e;},_createLightbox:function(_520){var body=dojo.body();var _522=dojo.byId(this.lightboxId);if(!_522){_522=document.createElement("div");_522.setAttribute("id",this.lightboxId);dojo.style(_522,{display:"none",position:"absolute",zIndex:this.containerZindex});body.insertBefore(_522,_520.nextSibling);}_522.innerHTML="";return _522;},_createLoader:function(){var body=dojo.body();var _524=dojo.byId("loadingImage");if(!_524){if(this.loaderSrc.endswith(".swf")){_524=this._createLoaderSwf(this.loaderSrc);}else{_524=this._createLoaderImage(this.loaderSrc);}dojo.style(_524,{display:"none",visibility:"hidden",position:"absolute",zIndex:this.loaderZindex});body.insertBefore(_524,body.firstChild);}return _524;},_createLoaderSwf:function(src){var _526=document.createElement("embed");_526.setAttribute("id",this.loaderId);_526.setAttribute("name","FlashProduct");_526.setAttribute("src",src);_526.setAttribute("swLiveConnect",true);_526.setAttribute("width",this.loaderWidth);_526.setAttribute("height",this.loaderHeight);_526.setAttribute("scale","noborder");_526.setAttribute("quality","high");_526.setAttribute("type","application/x-shockwave-flash");_526.setAttribute("pluginspace","http://www.macromedia.com/go/getflashplayer");_526.setAttribute("wmode","transparent");return _526;},_createLoaderImage:function(src){var _528=document.createElement("img");_528.setAttribute("id",this.loaderId);_528.setAttribute("src",src);_528.setAttribute("width",this.loaderWidth);_528.setAttribute("height",this.loaderHeight);return _528;},_loadContent:function(){if(this.domNode&&!this.node){this.node=this.domNode;}if(this.loader&&this.showloader){var _529=this._pageSize();var _52a=this._pageScroll();var _52b=_52a[1]+((_529[3]-35-this.loader.height)/2);var _52c=((_529[0]-20-this.loader.width)/2);dojo.style(this.loader,{display:"block",visibility:"visible",top:_52b+"px",left:_52c+"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(_52e,_52f){this.lightbox.innerHTML=agi.requester.stripScripts(_52e);this._ready=true;this.show();agi.requester.evalScripts(_52e);this._enableOverlayClick();return _52e;},_onError:function(_530,_531){this.hide();return _530;},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 _532=this._pageScroll();var _533=this.top+_532[1];var _534={left:"-9999px",top:_533+"px",visibility:"visible",display:"block"};if(this.height){_534.height=this.height+"px";}if(this.width){_534.width=this.width+"px";}dojo.style(this.lightbox,_534);},_showPhase2:function(){var _535=this._pageSize();if(this.left==null){this.left=((_535[0]-this.lightbox.offsetWidth)/2);}var _536={left:this.left+"px"};dojo.style(this.lightbox,_536);this._resizeOverlay();this._enableKeypressListener();if(!this._bgIframe){var _537=this.lightbox;if(this.overlay){_537=this.overlay;}this._bgIframe=new dijit.BackgroundIframe(_537);}this._showing=true;},hide:function(_538){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(_538){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 _53a;if(evt==null){_53a=event.keyCode;}else{_53a=evt.which;}var key=String.fromCharCode(_53a).toLowerCase();if(key==this.closeKey){this.hide();}},_resizeOverlay:function(){var _53c=this._pageSize();dojo.style(this.overlay,"height",_53c[1]+"px");},_pageScroll:function(){var _53d=0;if(self.pageYOffset){_53d=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){_53d=document.documentElement.scrollTop;}else{if(document.body){_53d=document.body.scrollTop;}}}var _53e=[null,_53d];return _53e;},_pageSize:function(){var _53f,_540;if(window.innerHeight&&window.scrollMaxY){_53f=document.body.scrollWidth;_540=window.innerHeight+window.scrollMaxY;}else{if(document.body.scrollHeight>document.body.offsetHeight){_53f=document.body.scrollWidth;_540=document.body.scrollHeight;}else{_53f=document.body.offsetWidth;_540=document.body.offsetHeight;}}var _541,_542;if(self.innerHeight){_541=self.innerWidth;_542=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){_541=document.documentElement.clientWidth;_542=document.documentElement.clientHeight;}else{if(document.body){_541=document.body.clientWidth;_542=document.body.clientHeight;}}}var _543,_544;if(_540<_542){_544=_542;}else{_544=_540;}if(_53f<_541){_543=_541;}else{_543=_53f;}var _545=[_543,_544,_541,_542];return _545;}});}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(_546){if(dojo.isObject(_546)){dojo.mixin(this,_546);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,_54a){dojo.forEach(_54a,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,_54e){dojo.forEach(_54e,function(name){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+name){if(li!==null){dojo.addClass(li,"pw-formerror");}}});});};pw.validators.addErrorMessages=function(form,_552,_553){var _554=_552.getMissing();var _555=[];var _556=_552.getInvalid();for(var i=0;i<_556.length;i++){var _558=_556[i];if(_554.indexOf(_558)==-1){_555.push(_558);}}pw.validators.addMessages(form,_554,_553,"missing");pw.validators.addMessages(form,_555,_553,"invalid");};pw.validators.addMessages=function(form,_55a,_55b,_55c){dojo.forEach(_55a,function(_55d){if(_55d in _55b){var _55e=_55b[_55d][_55c];pw.validators.setMessage(form,_55d,_55e);}});};pw.validators.setMessage=function(form,_560,_561){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+_560){if(li!==null){dojo.create("span",{className:"error-message",innerHTML:_561},li);}}});};pw.validators.deleteErrorMessages=function(form){var _564=dojo.query(".error-message",form);dojo.forEach(_564,function(span){dojo.destroy(span);});};pw.validators.generateProfile=function(_566,_567){var _568=dojo.mixin({},_567);_568.fields=dojo.clone(_567.fields);_568.required=dojo.clone(_567.required);var i;var _56a;for(i=0;i<_568.fields.length;i++){_568.fields[i]=_566[_568.fields[i]];}for(i=0;i<_568.required.length;i++){_568.required[i]=_566[_568.required[i]];}for(_56a in _566){if(typeof _568.constraints[_56a]!=="undefined"){_568.constraints[_566[_56a]]=_568.constraints[_56a];delete _568.constraints[_56a];}if(typeof _568.messages[_56a]!=="undefined"){_568.messages[_566[_56a]]=_568.messages[_56a];delete _568.messages[_56a];}}return _568;};pw.validators.showErrors=function(form,_56c,_56d,_56e){var _56f=[];if(!_56e){pw.validators.deleteErrorMessages(form);}_56f=(_56c.getMissing()).slice();_56f.extend(_56c.getInvalid());pw.validators.cleanErrors(form,_56d.fields);pw.validators.setErrorClasses(form,_56f);pw.validators.addErrorMessages(form,_56c,_56d.messages);};pw.validators.showServerErrors=function(form,_571,_572){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_571.fields);for(fieldname in _572){pw.validators.setErrorClasses(form,[fieldname]);pw.validators.setMessage(form,fieldname,_572[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(_573){try{clearInterval(agi.dom.window._scrollInterval);}catch(e){}var _574=dojo.byId(_573);var _575=dojo.coords(_574,true);var top=_575.y;var _577=_575.y+_575.h;var _578=dijit.getViewport();var _579=_578.t;var _57a=_578.l;var _57b=Math.floor((agi.dom.window.getSize().height-_574.clientHeight)/2);var _57c=agi.dom.window.getLightboxTop();if(_579<top&&_577<agi.dom.window.getSize().height){return;}if((_577-_57c)<agi.dom.window.getSize().height){agi.dom.window.scrollTo(_57c);}else{if(_57b>0){agi.dom.window.scrollTo(top-_57b);}else{if(_579>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,_57f){var _580=dijit.getViewport().t;var _581;if(_580>_57f){_581=Math.max(_580-step,_57f);}else{_581=Math.min(_580+step,_57f);}window.scroll(0,_581);if(_581==_57f){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 _583={};_583.pageYOffset=dijit.getViewport().t;_583.pageXOffset=dijit.getViewport().l;return _583;};agi.dom.window.getElementScrollOffset=function(_584){var elem=dojo.byId(_584);var _586={};if(typeof (elem.pageYOffset)=="number"){_586.pageYOffset=elem.pageYOffset;_586.pageXOffset=elem.pageXOffset;}else{_586.pageYOffset=elem.scrollTop;_586.pageXOffset=elem.scrollLeft;}return _586;};agi.dom.window.getMaxScroll=function(){var _587=document.body.clientHeight;if(typeof (window.innerHeight)=="number"){var _588=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){var _588=document.documentElement.clientHeight;}}if(_587>_588){return _587-_588;}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,_58c){return dojo.style(el,_58c);};}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(_591,_592,_593){var _594=dojo.byId(_591);var _595=_594.className;if(_592){if(_593){_594.setAttribute("class",_593);_594.setAttribute("className",_593);}_594.style.display="block";_594.innerHTML=_592;agi.dom.window.scroll_into_view(_591);}else{_594.style.display="none";}};agi.validation.reformat_emails=function(_596,_597){var _598="";for(var i=0;i<_596.length;i++){if(!agi.validation.isEmpty(_596[i])){_598+=agi.validation.trim(_596[i]);if(i<_596.length-1){_598+=", ";}}}if(_597){_597.value=_598;}return _598;};agi.validation.validate_email=function(_59a,_59b,_59c){var _59d=agi.validation.trim(_59a);var _59e;var _59f;var _5a0=[];var _5a1;if(!_59b){_59b=75;}if(!_59c){_59c;}if(_59d==""&&!_59c){throw (agi.validation.IS_EMPTY);}else{if(_59d==""){return;}}if(_59d.length>_59b){throw (agi.validation.TOO_LONG);}if(_59d.match(/.*@$|.*@.*@.|^@.*|^[^@]*$/)){throw (agi.validation.EMAIL_FAIL);}_59e=_59d.split("@")[0];_59f=_59d.split("@")[1];if(_59e==""||_59f==""){throw (agi.validation.EMAIL_FAIL);}if(_59e.match(/.*[*()<>;:,\[\]\\'" ].*/)){throw (agi.validation.EMAIL_FAIL);}if(_59f.indexOf("..")!=-1){throw (agi.validation.EMAIL_FAIL);}_5a0=_59f.split(".");_5a1=_5a0.length;if(_5a1==1){throw (agi.validation.EMAIL_FAIL);}if(_5a0[_5a1-1].length<2||_5a0[_5a1-1].length>6){throw (agi.validation.EMAIL_FAIL);}return agi.validation.PASS;};agi.validation.validate_emails=function(_5a2,_5a3,_5a4){var _5a5=true;var _5a6=_5a2.value.replace(/;/g,",");var _5a7={"error_message":"","error_codes":[],"pass_validation":agi.validation.FAIL,"emails":""};if(!_5a3){_5a3=true;}if(!_5a4){_5a4=agi.validation.defaultErrorMessages;}if(_5a3){_5a6=_5a6.replace(/\n/g,", ");_5a6=_5a6.replace(/\r/g,", ");}if(agi.validation.isEmpty(_5a6)||agi.validation.isEmpty(_5a6.replace(/,/g,""))){_5a5=agi.validation.FAIL;_5a7.error_message+="<p>"+_5a4[agi.validation.IS_EMPTY]+"</p>";}_5a6=_5a6.split(",");for(i=0;i<_5a6.length;i++){try{agi.validation.validate_email(_5a6[i],"",true);}catch(e_code){_5a7.error_message+="<p>"+_5a6[i]+" "+_5a4[e_code]+"</p>";_5a5=agi.validation.FAIL;_5a7.error_codes[_5a7.error_codes.length]=e_code+"|"+_5a6[i];}}if(_5a3){agi.validation.reformat_emails(_5a6,_5a2);}_5a7.emails=_5a6;_5a7.pass_validation=_5a5;return _5a7;};agi.validation.validate_checkboxes=function(_5a8){var _5a9=document.getElementsByName(_5a8);var _5aa=false;for(var i=0;i<_5a9.length;i++){if(_5a9[i].checked){_5aa=true;break;}}if(!_5aa){return agi.validation.FAIL;}return agi.validation.PASS;};agi.validation.Error=function(_5ac,_5ad,type){var _5af=this;this.message=_5ad;this.field=_5ac;this.type=type;};agi.validation.Errors=function(_5b0){var _5b1=this;this.errors=[];this.display_div=dojo.byId(_5b0);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(_5b2){if(_5b2){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(_5b3){var _5b4=this.display_div.className;if(_5b3&&(_5b4.indexOf(_5b3)==-1)){message_class=(this.display_div.className)?this.display_div.className+" "+_5b3:_5b3;this.display_div.setAttribute("class",message_class);this.display_div.setAttribute("className",message_class);}};this.write_message=function(_5b5,_5b6){if(_5b5){this.display_div.style.display="block";this.display_div.innerHTML=_5b5;}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(_5b8){this.errors.push(_5b8);};this.add_error=function(_5b9,_5ba,type){if(!type){type=this.ERROR;}this.add(new Error(_5b9,_5ba,type));};};}if(!dojo._hasResource["agi.validate._base"]){dojo._hasResource["agi.validate._base"]=true;dojo.provide("agi.validate._base");agi.validate.isEmailAddressList=function(_5bc,_5bd){_5bc=_5bc.replace(/^\s*|\s*$|\s*,\s*$|\s*;\s*$/g,"");var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_5bd)+"$","i");var _5bf=re.test(_5bc);var _5c0=dojox.validate.getEmailAddressList(_5bc,_5bd);var _5c1=false;if(typeof _5bd.minlength!="undefined"){if(_5c0.length<_5bd.minlength){var _5c1=true;}}var _5c2=false;if(typeof _5bd.maxlength!="undefined"){if(_5c0.length>_5bd.maxlength){var _5c2=true;}}return _5bf&&!_5c1&&!_5c2;};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(_5c4,_5c5){var day=dojo.byId(_5c5.dayField).value;var _5c7={min:_5c5.dayMin,max:_5c5.dayMax};var _5c8=dojox.validate.isInRange(_5c4,_5c5);var _5c9=dojox.validate.isInRange(day,_5c7);return _5c9&&_5c8;};agi.validate.isValidEmailAddress=function(_5ca){var _5cb=/^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}$/i;return _5cb.test(_5ca);};}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(_5cc,_5cd,_5ce){if(this.aroundNode&&this.aroundNode===_5cd){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_5cc;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var _5cf={};var ltr=this.isLeftToRight();dojo.forEach((_5ce&&_5ce.length)?_5ce:dijit.Tooltip.defaultPosition,function(pos){switch(pos){case "after":_5cf[ltr?"BR":"BL"]=ltr?"BL":"BR";break;case "before":_5cf[ltr?"BL":"BR"]=ltr?"BR":"BL";break;case "below":_5cf[ltr?"BL":"BR"]=ltr?"TL":"TR";_5cf[ltr?"BR":"BL"]=ltr?"TR":"TL";break;case "above":default:_5cf[ltr?"TL":"TR"]=ltr?"BL":"BR";_5cf[ltr?"TR":"TL"]=ltr?"BR":"BL";break;}});var pos=dijit.placeOnScreenAroundElement(this.domNode,_5cd,_5cf,dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_5cd;},orient:function(node,_5d4,_5d5){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"}[_5d4+"-"+_5d5];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_5d6){if(this._onDeck&&this._onDeck[1]==_5d6){this._onDeck=null;}else{if(this.aroundNode===_5d6){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(_5d7,_5d8,_5d9){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_5d7,_5d8,_5d9);};dijit.hideTooltip=function(_5da){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_5da);};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(_5de){this.connect(node,_5de.toLowerCase(),"_"+_5de);},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 _5e4=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_5e4);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_5e6){_5e6=_5e6||this._connectNodes[0];if(!_5e6){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_5e6,this.position);this._connectNode=_5e6;},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,_5e8,_5e9){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"}[_5e8+"-"+_5e9];},open:function(_5eb){_5eb=_5eb||this._connectNodes[0];if(!_5eb){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}var _5ec=null;if(this.contentNode!=null){_5ec=this.contentNode.innerHTML;}var _5ed=this.label||_5ec||this.containerNode.innerHTML;this._showTooltip(_5ed,_5eb,this.position);this._connectNode=_5eb;},close:function(){if(this._connectNode){this._hideTooltip(this._connectNode);delete this._connectNode;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},_showTooltip:function(_5ee,_5ef,_5f0){return this.show(_5ee,_5ef,_5f0);},_hideTooltip:function(_5f1){return this.hide(_5f1);}});}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.",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(_5f2){this.show();this.wireUp();if(_5f2!=null){if(_5f2.email){this.form.email.value=_5f2.email;}if(_5f2.url){this.url=_5f2.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(_5f5){if(_5f5.success==true&&this.url!=""){var url=this.url;this.url="";window.location=url;}else{if(_5f5.success==false&&dojo.byId("login-error")==null){var _5f7=function(_5f8){var form=dojo.byId("signin_form");dojo.create("div",{id:"login-error",className:"pw-error",innerHTML:_5f8},form,"before");};if(_5f5.error_msg!=null){_5f7(_5f5.error_msg);}else{_5f7("An undetermined error has occured.  Please try again.");}}else{window.location.reload(true);}}},validate:function(form){var _5fb=pw.validators.signin.profile;var _5fc=dojox.validate.check(form,_5fb);if(_5fc.isSuccessful()){return true;}pw.validators.showErrors(form,_5fc,_5fb);return false;},showForgotPassword:function(evt){var form=dojo.byId("signin_form");var _5ff=form.email.value;dojo.stopEvent(evt);dojo.publish("pw/modals/signin/hide");dojo.publish("pw/modals/forgot-password/show",[_5ff]);}});}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 _602=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(_603){if(_603.success==true){pw.validators.cleanAllErrors(this.form);location.href="/my-photoworks?uut_event=pw_reg_end";}else{if(_603.success==false&&dojo.byId("signup-error")==null){var _604=function(_605){var form=dojo.byId("signup_form");dojo.create("div",{id:"signup-error",className:"pw-error",innerHTML:_605},form,"before");};if(_603.type=="CustomerExists"){_604("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(_603.type=="AlreadySignedIn"){location.reload(true);}else{_604("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(_608){dojo.disconnect(_608);});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 _60a=pw.validators.signup.profile;var _60b=dojox.validate.check(form,_60a);if(_60b.isSuccessful()){return true;}pw.validators.showErrors(form,_60b,_60a);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(_60c){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(_60c!=null){this.forgotForm.email.value=_60c;}},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 _60f=this.validate(this.forgotForm);if(!_60f){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 _611=form.email.value;var _612=pw.validators.forgotpassword.profile;var _613=dojox.validate.check(form,_612);if(_613.isSuccessful()){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_612.fields);return true;}pw.validators.showErrors(form,_613,_612);return false;},onLoadCallback:function(data){var _615=data.done;var _616=data.email;this.email=_616;if(!_616){return this.onEmailNotFound(data);}if(!_615){return this.onErrorCallback(data);}var _616=data.email;this.email=_616;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=_616;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){this.forgotError.innerHTML="This address is not associated with a PhotoWorks account.";dojo.style(this.forgotError,{display:""});},showSignin:function(evt){var form=dojo.byId("pw-forgot-form");var _61b=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 _61d=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,_621){if(_621){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(_629,node){dojo.mixin(this,_629||{});node=this.node=dojo.byId(this.node||node);if(!this.id){this.id=["Setter",(node)?node.id||node.tagName:"",_61d++].join("_");}if(!(this.node||node)){new Error(this.declaredClass+": no node provided to "+this.id);}},set:function(cont,_62c){if(undefined!==cont){this.content=cont;}if(_62c){this._mixin(_62c);}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 _62e=this.onContentError(e);try{node.innerHTML=_62e;}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 _631=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_631){cont=_631[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(_633){var _634={},key;for(key in _633){if(key in _634){continue;}this[key]=_633[key];}},_parse:function(){var _636=this.node;try{this.parseResults=dojo.parser.parse(_636,true);}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(type,err,_639){var _63a=this["on"+type+"Error"].call(this,err);if(_639){}else{if(_63a){dojo.html._setNodeContent(this.node,_63a,true);}}}});dojo.html.set=function(node,cont,_63d){if(undefined==cont){cont="";}if(!_63d){return dojo.html._setNodeContent(node,cont,true);}else{var op=new dojo.html._ContentSetter(dojo.mixin(_63d,{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 _652=[];for(var i=0;i<str.length;i++){_652.push(str.charCodeAt(i));}return _652;},bytes_to_str:function(_654){var str="";dojo.forEach(_654,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,_65e,sep){var map=[];var _661=s.toString().split(_65e);for(var i=0;i<_661.length;i++){var pair=_661[i];if(pair){var data=pair.split(sep);map[unescape(data[0])]=unescape(data[1]);}}return map;};agi.cookie.NVP.fromMap=function(map,_666,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])+_666;}}}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 _66a=window.location.hostname.split(".");var idx=_66a.length-2;var tld=_66a.slice(-1);if(tld!="com"&&tld!="net"&&tld!="org"){idx=_66a.length-3;}_66a=_66a.slice(idx);return "."+_66a.join(".");};agi.cookie.AGICookie.getCookieName=function(name){var _66e=window.location.hostname.split(".");var _66f=name;var hn="";if(_66e.length<3){hn="www";}else{hn=_66e[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,_674){var c=agi.cookie.AGICookie.getCookie(name);if(typeof c=="null"){return null;}var v=agi.cookie.NVP.getValue(agi.base64.decode(c),_674,"=","&");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,_67a,_67b,perm){name=agi.cookie.AGICookie.getCookieName(name);var cki=name+"="+escape(_67a)+";";if(perm){_67b="Thursday, 31-Dec-2037 00:01:00 GMT";}if(_67b){cki=cki+"expires="+_67b+";";}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,_680){var v=agi.cookie.AGICookie.getCookieValueRaw(name,_680);if(!v&&name=="customer"&&_680=="name"){v=agi.cookie.AGICookie.getCookieValueRaw(name,"email");}if(!v&&name=="customer"&&_680=="name"){v="member";}return v;};agi.cookie.AGICookie.setCookieValue=function(name,_683,_684,_685,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[_683]=_684;agi.cookie.AGICookie.setCookie(name,agi.base64.encode(agi.cookie.NVP.fromMap(map,"&","=")),_685,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(_689){_689=_689||{};dojo.mixin(this,_689);this.node=dojo.byId(this.node);},show:function(){if(this.node!=null){var name=agi.cookie.AGICookie.getCookieValue("customer","name");var _68b=this.beforeName+name+this.afterName;dojo.html.set(this.node,_68b);}}});}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 _68c={lightboxId:"lightbox",loaderId:"loadingImage",overlayId:"pw-overlay",loadnow:false,width:660,top:35,overflow:""};_68c.lightboxId="lightbox_forgot_password";this.forgotPassword=new pw.widget.ForgotPasswordLightbox(_68c);_68c.lightboxId="lightbox_signup";this.signup=new pw.widget.SignupLightbox(_68c);_68c.lightboxId="lightbox_signin";this.signin=new pw.widget.SigninLightbox(_68c);var _68d=dojo.byId("signin");var _68e=dojo.byId("signup");if(_68d!=null){dojo.connect(_68d,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show");});}if(_68e!=null){dojo.connect(_68e,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signup/show");});}if(dojo.byId("signin")){dojo.query("div#pw-myaccmenu a").forEach(function(_691){dojo.connect(_691,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show",[{"email":"","url":_691.href}]);});});}}});}if(!dojo._hasResource["dojox.validate.web"]){dojo._hasResource["dojox.validate.web"]=true;dojo.provide("dojox.validate.web");dojox.validate.isIpAddress=function(_693,_694){var re=new RegExp("^"+dojox.validate.regexp.ipAddress(_694)+"$","i");return re.test(_693);};dojox.validate.isUrl=function(_696,_697){var re=new RegExp("^"+dojox.validate.regexp.url(_697)+"$","i");return re.test(_696);};dojox.validate.isEmailAddress=function(_699,_69a){var re=new RegExp("^"+dojox.validate.regexp.emailAddress(_69a)+"$","i");return re.test(_699);};dojox.validate.isEmailAddressList=function(_69c,_69d){var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_69d)+"$","i");return re.test(_69c);};dojox.validate.getEmailAddressList=function(_69f,_6a0){if(!_6a0){_6a0={};}if(!_6a0.listSeparator){_6a0.listSeparator="\\s;,";}if(dojox.validate.isEmailAddressList(_69f,_6a0)){return _69f.split(new RegExp("\\s*["+_6a0.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 _6a5=0;this.element=a[_6a5]||null;this.atEnd=function(){return (_6a5>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_6a5++];return this.element;};this.map=function(fn,_6a7){return dojo.map(a,fn,_6a7);};this.reset=function(){_6a5=0;this.element=a[_6a5];};};dojox.collections.DictionaryIterator=function(obj){var a=[];var _6aa={};for(var p in obj){if(!_6aa[p]){a.push(obj[p]);}}var _6ac=0;this.element=a[_6ac]||null;this.atEnd=function(){return (_6ac>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_6ac++];return this.element;};this.map=function(fn,_6ae){return dojo.map(a,fn,_6ae);};this.reset=function(){_6ac=0;this.element=a[_6ac];};};}if(!dojo._hasResource["dojox.collections.Dictionary"]){dojo._hasResource["dojox.collections.Dictionary"]=true;dojo.provide("dojox.collections.Dictionary");dojox.collections.Dictionary=function(_6af){var _6b0={};this.count=0;var _6b1={};this.add=function(k,v){var b=(k in _6b0);_6b0[k]=new dojox.collections.DictionaryEntry(k,v);if(!b){this.count++;}};this.clear=function(){_6b0={};this.count=0;};this.clone=function(){return new dojox.collections.Dictionary(this);};this.contains=this.containsKey=function(k){if(_6b1[k]){return false;}return (_6b0[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 _6b0[k];};this.forEach=function(fn,_6ba){var a=[];for(var p in _6b0){if(!_6b1[p]){a.push(_6b0[p]);}}dojo.forEach(a,fn,_6ba);};this.getKeyList=function(){return (this.getIterator()).map(function(_6bd){return _6bd.key;});};this.getValueList=function(){return (this.getIterator()).map(function(_6be){return _6be.value;});};this.item=function(k){if(k in _6b0){return _6b0[k].valueOf();}return undefined;};this.getIterator=function(){return new dojox.collections.DictionaryIterator(_6b0);};this.remove=function(k){if(k in _6b0&&!_6b1[k]){delete _6b0[k];this.count--;return true;}return false;};if(_6af){var e=_6af.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(_6c2){dojo.mixin(this,_6c2);},prep:function(size){var _6c4=this.createSpinner(size);return _6c4;},show:function(node,size,_6c7){node=dojo.byId(node);this.node=node;var _6c8=this.createOverlay(node);this.bgiframe=new dijit.BackgroundIframe(_6c8);var _6c9=this.createSpinner(size);this.positionSpinner(_6c9,_6c8,node);if(_6c7){dojo.style(dojo.body(),"cursor","wait");}var _6ca=dojo.hitch(this,this.hide);if(this.applyClass){dojo.addClass(node,this.applyClass);}return _6ca;},hide:function(){var _6cb=dojo.byId(this.overlayId);dojo.style(_6cb,"display","none");if(this.applyClass&&this.node){dojo.removeClass(this.node,this.applyClass);}dojo.style(dojo.body(),"cursor","auto");_6cb.parentNode.removeChild(_6cb);if(this.bgiframe!=null){this.bgiframe.destroy();this.bgiframe=null;}},createOverlay:function(node){var _6cd;if(node==dojo.body()){_6cd=dojo.coords(node,false);}else{_6cd=dojo.coords(node,true);}_6cd.y-=dojo.style(node,"marginTop");var _6ce=dojo.create("div",{id:this.overlayId},dojo.body());dojo.style(_6ce,{position:"absolute",width:_6cd.w+"px",height:_6cd.h+"px",left:_6cd.x+"px",top:_6cd.y+"px",zIndex:2000});dojo.addClass(_6ce,this.overlayClass);return _6ce;},createSpinner:function(size){var _6d0;var _6d1=this._getSpinner(size);if(_6d1.cache){_6d0=_6d1.cache;}else{if(_6d1.src.endswith(".swf")){_6d0=this._createSpinnerSwf(_6d1);}else{_6d0=this._createSpinnerImg(_6d1);}_6d1.cache=_6d0;}dojo.style(_6d0,{display:"none",visibility:"hidden"});return _6d0;},positionSpinner:function(_6d2,_6d3,_6d4){var _6d5;if(_6d4==dojo.body()){_6d5=dijit.getViewport();}else{_6d5=dojo.coords(_6d3,true);}spinnerData=this.spinnerData;var _6d6=(_6d5.h-spinnerData.height)/2;var _6d7=(_6d5.w-spinnerData.width)/2;dojo.place(_6d2,_6d3);dojo.style(_6d2,{display:"block",position:"relative",visibility:"visible",top:_6d6+"px",left:_6d7+"px"});return _6d2;},_getSpinner:function(size){var _6d9={};switch(size){case ("small"):_6d9=this.smallSpinner;break;case ("medium"):_6d9=this.mediumSpinner;break;case ("large"):default:_6d9=this.largeSpinner;break;}this.spinnerData=_6d9;return _6d9;},_createSpinnerSwf:function(_6da){var _6da=dojo.create("embed",{id:this.spinnerId,name:"FlashProduct",src:_6da.src,swLiveConnect:true,width:_6da.width,height:_6da.height,scale:"noborder",quality:"high",type:"application/x-shockwave-flash",pluginspace:"http://www.macromedia.com/go/getflashplayer",wmode:"transparent"},dojo.body());dojo.style(_6da,"left","-9999px");return _6da;},_createSpinnerImg:function(_6db){var _6db=dojo.create("img",{id:this.spinnerId,src:_6db.src,width:_6db.width,height:_6db.height},dojo.body());dojo.style(_6db,"left","-9999px");return _6db;}});}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 _6dd=this.validate(this.offerForm);if(!_6dd){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 _6df=form.email.value;var _6e0=pw.validators.offersignup.profile;var _6e1=dojox.validate.check(form,_6e0);if(_6e1.isSuccessful()){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_6e0.fields);return true;}pw.validators.showErrors(form,_6e1,_6e0);return false;},onLoadCallback:function(data){var _6e3=data.success;if(!_6e3){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(_6e5){var pane=_6e5.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(_6ea){this.hideAll();this.showPane("error",_6ea);}});}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(_6eb,_6ec,perm){var name=perm?"mc_p":"mc_s";return agi.cookie.AGICookie.setCookieValue(name,_6eb,_6ec,null,perm);};agi.cookie.MagicCookie.getCookieValue=function(_6ef){var _6f0=agi.cookie.AGICookie.getCookieValue("mc_s",_6ef);if(!_6f0){_6f0=agi.cookie.AGICookie.getCookieValue("mc_p",_6ef);}return _6f0;};agi.cookie.MagicCookie.delCookieValue=function(_6f1,perm){return agi.cookie.MagicCookie.setCookieValue(_6f1,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,_6f6,_6f7){try{var data=dojo.fromJson(window.name);}catch(e){var data={};}if(typeof data=="undefined"){var data={};}data[key]=_6f6;window.name=dojo.toJson(data);if(typeof _6f7!="undefined"){_6f7();}}};dojo.declare("agi.storage.TempStorage",[agi.classes.Identified],{force_reload:false,initialized:false,data:null,sid:null,constructor:function(_6f9){this.data={};this.force_reload=_6f9;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,_6fc){this.data["filler"]=null;this.data[key]=_6fc;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(_6fe,key,_700){}});}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,_705,func){var _707={};for(var x in obj){if(typeof _707[x]=="undefined"){if(!func){_705(obj[x],x);}else{func.call(_705,obj[x],x);}}}};this._behaviors={};this.add=function(_709){var _70a={};forIn(_709,this,function(_70b,name){var _70d=arrIn(this._behaviors,name);if(typeof _70d["id"]!="number"){_70d.id=_inc++;}var _70e=[];_70d.push(_70e);if((dojo.isString(_70b))||(dojo.isFunction(_70b))){_70b={found:_70b};}forIn(_70b,function(rule,_710){arrIn(_70e,_710).push(rule);});});};var _711=function(node,_713,_714){if(dojo.isString(_713)){if(_714=="found"){dojo.publish(_713,[node]);}else{dojo.connect(node,_714,function(){dojo.publish(_713,arguments);});}}else{if(dojo.isFunction(_713)){if(_714=="found"){_713(node);}else{dojo.connect(node,_714,_713);}}}};this.apply=function(){forIn(this._behaviors,function(_715,id){dojo.query(id).forEach(function(elem){var _718=0;var bid="_dj_behavior_"+_715.id;if(typeof elem[bid]=="number"){_718=elem[bid];if(_718==(_715.length)){return;}}for(var x=_718,tver;tver=_715[x];x++){forIn(tver,function(_71c,_71d){if(dojo.isArray(_71c)){dojo.forEach(_71c,function(_71e){_711(elem,_71e,_71d);});}});}elem[bid]=_715.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(_71f){},wireUp:function(){dojo.query("a.upload_link").connect("onclick",this,this.uploadLinkHandler);},uploadLinkHandler:function(evt){dojo.stopEvent(evt);this.upload();return false;},upload:function(_721,_722){if(!_721){_721=window.location.href;}if(!_722){_722=null;}agi.cookie.MagicCookie.setCookieValue(this.REDIRECT_COOKIE,_721,false);if(_722!=null){window.location.href=this.UPLOAD_HREF+"?osource="+encodeURIComponent(_722);}else{window.location.href=this.UPLOAD_HREF;}},resume:function(_723){var _724=agi.cookie.MagicCookie.getCookieValue(this.REDIRECT_COOKIE);if(_724){agi.cookie.MagicCookie.delCookieValue(this.REDIRECT_COOKIE,false);}else{if(_723){_724=ahost+this.ALBUMS_BASE_HREF+_723;}else{_724=ahost+this.MY_PHOTOWORKS_HREF;}}window.location.href=_724;},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(_726){dojo.mixin(this,_726);if(_726.prefill){for(var k in _726.prefill){if(_726.prefill[k]){this.prefillValues[k]=_726.prefill[k];}}}if(_726.agentOnly){for(var k in _726.agentOnly){if(_726.agentOnly[k]){this.agentOnlyValues[k]=_726.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(_728,_729,_72a,_72b,_72c,_72d){var _72e="CHAT_ONLY";this.launchChat(_728,_729,_72a,_72b,_72c,_72d,_72e);},_startChatAndCobrowse:function(_72f,_730,_731,_732,_733,_734){var _735="COBROWSE";this.launchChat(_72f,_730,_731,_732,_733,_734,_735);},_startChatWithEscalation:function(_736,_737,_738,_739,_73a,_73b){var _73c="COBROWSE_ESCALATION";this.launchChat(_736,_737,_738,_739,_73a,_73b,_73c);},launchChat:function(_73d,_73e,_73f,_740,_741,_742,_743){this.openInitialWindow();this.finishLaunchingChat(_73d,_73e,_73f,_740,_741,_742,_743);},finishLaunchingChat:function(_744,_745,_746,_747,_748,_749,_74a){var _74b=this.getChatWindow();this.saveChatParameters(_74b,_744,_745,_746,_747,_748,_749,_74a);if(this.alreadyConavigating()){this.handleRecursiveLaunch(_744,_745,_74b);return;}if(this.browserDoesNotSupportDOM2()||this.isIEonMac()){this.handleUnsupportedBrowser(_744,_745,_74b);return;}if(!this.areCookiesEnabled()){this.handleDisabledCookies(_744,_745,_74b);return;}if(window.location.protocol=="https:"){this.createAndSubmitForm();}else{this.checkSSLEnabledAndSubmit(_744,_745);}},createAndSubmitForm:function(){var _74c=this.getChatWindow();var _74d=this.createForm(_74c.serverName,_74c);if(typeof (this.gUseDynamicStartPage)!="undefined"&&this.gUseDynamicStartPage){this.addFormField(_74d,_74c,"DSP_LAUNCHER_PAGE_NAME",this.gDSPLauncherPageName);}this.addFormField(_74d,_74c,"CHAT_WINDOW_WIDTH",this.gChatWindowWidth);this.addFormField(_74d,_74c,"CHAT_WINDOW_PROPERTIES",this.gChatWindowProperties);this.addFormField(_74d,_74c,"ICHANNEL_ID",_74c.iChannel);this.addFormField(_74d,_74c,"ATTACHED_DATA",_74c.attachedData);this.addFormField(_74d,_74c,"ENTER_ON_QUEUE_PAGE",_74c.enterOnQueuePage);this.addFormField(_74d,_74c,"CHAT_LAUNCH_MODE",_74c.chatLaunchMode);this.addFormField(_74d,_74c,"AGENT_VISIBLE_DATA",this.createAgentVisibleDataString(_74c.agentOnlyValues));this.addFormField(_74d,_74c,"REFERRER_URL",window.location.href);var _74e=_74c.prefillValues;for(prefillItem in _74e){this.addFormField(_74d,_74c,prefillItem,_74e[prefillItem]);}_74d.submit();},openInitialWindow:function(){var _74f=window.open("",this.getChatWindowName(),this.getWinProperties());_74f.document.write("<html><body></body></html>");_74f.document.close();this.setChatWindow(_74f);this.origChatWindow=_74f;},createForm:function(_750,win){var _752=win.document.createElement("form");_752.method="post";_752.target="_self";_752.action=this.gHTTPS+_750+"/CONAV/CHAT/ChatPreLaunch";win.document.body.appendChild(_752);return _752;},DATA_SEPARATOR:"_HB_",createAgentVisibleDataString:function(_753){var _754="";for(agentItem in _753){if(this.isNonEmptyString(_754)){_754+=this.DATA_SEPARATOR;}_754+=agentItem+this.DATA_SEPARATOR+_753[agentItem];}return _754;},addFormField:function(_755,win,name,_758){if(!this.isNonEmptyString(name)||!this.isNonEmptyString(_758)){return;}var _759=win.document.createElement("input");_759.type="hidden";_759.name=name;_759.value=_758;_755.appendChild(_759);},alreadyConavigating:function(){return (typeof (isHipboneSharedWindow)!="undefined");},handleRecursiveLaunch:function(_75a,_75b,win){win.location.href=this.gHTTPS+_75b+"/CONAV/chat/errorpages/recursiveConav.jsp?ICHANNEL_ID="+_75a;},browserDoesNotSupportDOM2:function(){return (null==document.getElementById);},handleUnsupportedBrowser:function(_75d,_75e,win){win.location.href=this.gHTTPS+_75e+"/CONAV/CHAT/ChatPreLaunch?ICHANNEL_ID="+_75d;},areCookiesEnabled:function(){var time=(new Date()).getTime();this.setTestCookie(time);if(this.theCookieIsSet(time)){this.removeTestCookie(time);return true;}return false;},setTestCookie:function(_761){document.cookie="hbcookietest="+_761;},theCookieIsSet:function(_762){var _763=document.cookie;return (this.isNonEmptyString(_763)&&_763.indexOf(_762)>-1);},removeTestCookie:function(_764){document.cookie="hbcookietest="+_764+"; expires=Fri, 02-Jan-1970 00:00:00 GMT";},handleDisabledCookies:function(_765,_766,win){win.location.href=this.gHTTP+_766+"/CONAV/chat/errorpages/cookiesDisabled.jsp?ICHANNEL_ID="+_765;},checkSSLEnabledAndSubmit:function(_768,_769){this.createAndSubmitForm();var _76a=new Image(1,1);_76a.onerror=dojo.hitch(this,function(){this.handleChatNoSSL(_768,_769);});_76a.src=this.gHTTPS+_769+"/CONAV/HTD/Default/shared/images/blank.gif?time="+(new Date()).getTime();},handleChatNoSSL:function(_76b,_76c){var link=this.gHTTP+_76c+"/CONAV/chat/errorpages/sslDisabled.jsp?ICHANNEL_ID="+_76b;window.open(link,this.getChatWindowName(),this.getWinProperties());this.getChatWindow().close();},saveChatParameters:function(_76e,_76f,_770,_771,_772,_773,_774,_775){_76e.iChannel=_76f;_76e.serverName=_770;_76e.attachedData=_771;_76e.prefillValues=_772;_76e.agentOnlyValues=_773;_76e.enterOnQueuePage=_774;_76e.chatLaunchMode=_775;},setAOLChatWindow:function(_776){this.setChatWindow(_776);this.finishLaunchingChat(iChannel,serverName,attachedData,prefillValues,agentOnlyValues,enterOnQueuePage,chatLaunchMode);},gChatLaunchWindow:null,setChatWindow:function(_777){window.gChatLaunchWindow=_777;},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\">\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(_779){if(_779!=null){this.startChat(_779);}else{this.checkServer();}},checkServer:function(){dojo.xhrGet({url:this.url,handleAs:"json",load:dojo.hitch(this,this.checkedServer),sync:true});},checkedServer:function(_77a,_77b){var _77c=_77a.enabled;this.startChat(_77c);},startChat:function(_77d){if(_77d){var _77e={};_77e.gIChannelID=pw.livechat.getChannel();_77e.gServer=pw.livechat.url;var _77f=agi.cookie.AGICookie.getCookieValue("customer","email");var name=agi.cookie.AGICookie.getCookieValue("customer","name");var _781=agi.cookie.AGICookie.getCookieValue("customer","guest");if(_77f&&!_781){_77e.prefill={"CUSTOMER_NAME":name,"CUSTOMER_EMAIL":_77f};}_77e.agentOnly={"CUSTOMER_ID":_77f,"PAGE_URL":window.location,"PAGE_TITLE":document.title};this.chat=new pw.livechat.KanaLiveChat(_77e);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(_782){_782=_782||{};dojo.mixin(this,_782);this.init();},init:function(){this.node=dojo.byId(this.node);agi.widget.hoverItems.push(this.node);this.idx=agi.widget.hoverItems.length-1;var _783="onmouseover";var _784="onmouseout";if(dojo.isIE==6){_783="onmouseenter";_784="onmouseleave";}this.cxn_handles.push(dojo.connect(this.node,_783,dojo.hitch(this,this.hover)),true);this.cxn_handles.push(dojo.connect(this.node,_784,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 _787=new pw.upload.Upload();_787.wireUp();this.applyIEHovers();this.setNavpathCookie();},applyIEHovers:function(){if(dojo.isIE==6){dojo.query(".pw-mypw-thumb").forEach(dojo.hitch(this,function(node){var _789=new agi.widget.HoverItem({node:node,className:"pw-mypw-thumb-hover"});}));}},setNavpathCookie:function(){var _78a=agx.currentPage.navpath;if(_78a){agi.cookie.MagicCookie.setCookieValue("navpath",_78a,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(_791){dojo.disconnect(_791);});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(_792){dojo.mixin(this,_792);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(_796){dojo.disconnect(_796);});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(_797){dojo.mixin(this,_797);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(_79b){return this.showAnim.play(_79b||0);},hide:function(_79c){return this.hideAnim.play(_79c||0);}});}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var d=dojo,_79e={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _7a1=function(_7a2){this._index=-1;this._animations=_7a2||[];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(_7a1,{_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(_7a4,_7a5){if(!this._current){this._current=this._animations[this._index=0];}if(!_7a5&&this._current.status()=="playing"){return this;}var _7a6=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_7a7=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_7a9=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(_7a6);d.disconnect(_7a7);d.disconnect(_7a9);});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(_7ad,_7ae){this.pause();var _7af=this.duration*_7ad;this._current=null;d.some(this._animations,function(a){if(a.duration<=_7af){this._current=a;return true;}_7af-=a.duration;return false;});if(this._current){this._current.gotoPercent(_7af/this._current.duration,_7ae);}return this;},stop:function(_7b1){if(this._current){if(_7b1){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(_7a1,_79e);dojo.fx.chain=function(_7b4){return new _7a1(_7b4);};var _7b5=function(_7b6){this._animations=_7b6||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(_7b6,function(a){var _7b8=a.duration;if(a.delay){_7b8+=a.delay;}if(this.duration<_7b8){this.duration=_7b8;}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(_7b5,{_doAction:function(_7bb,args){d.forEach(this._animations,function(a){a[_7bb].apply(a,args);});return this;},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd");}},_call:function(_7be,args){var t=this._pseudoAnimation;t[_7be].apply(t,args);},play:function(_7c1,_7c2){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(_7c3,_7c4){var ms=this.duration*_7c3;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_7c4);});this._call("gotoPercent",arguments);return this;},stop:function(_7c7){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(_7b5,_79e);dojo.fx.combine=function(_7c8){return new _7b5(_7c8);};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 _7ce=d.style(node,"height");return Math.max(_7ce,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),_80d=dojo.coords(node,true);args.duration=args.duration||1000;args.words=args.words||false;var _80e=(args.text&&typeof (args.text)=="string")?args.text:node.innerHTML,_80f=s.height,_810=s.width,_811=[];dojo.style(node,{height:cs.height,width:cs.width});var _812=/(<\/?\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 _814=(typeof args.text=="string")?args.text.match(reg):node.innerHTML.match(reg);var html="";var _816=0;var _817=0;for(var i=0;i<_814.length;i++){var _819=_814[i];if(!_819.match(_812)){html+="<span>"+_819+"</span>";_816++;}else{html+=_819;}}node.innerHTML=html;function animatePieces(_81a){var next=_81a.nextSibling;if(_81a.tagName=="SPAN"&&_81a.childNodes.length==1&&_81a.firstChild.nodeType==3){var _81c=dojo.coords(_81a,true);_817++;dojo.style(_81a,{padding:0,margin:0,top:(args.crop?"0px":_81c.t+"px"),left:(args.crop?"0px":_81c.l+"px"),display:"inline"});var _81d=args.pieceAnimation(_81a,_81c,_80d,_817,_816);if(dojo.isArray(_81d)){_811=_811.concat(_81d);}else{_811[_811.length]=_81d;}}else{if(_81a.firstChild){animatePieces(_81a.firstChild);}}if(next){animatePieces(next);}};animatePieces(node.firstChild);var anim=dojo.fx.combine(_811);dojo.connect(anim,"onEnd",anim,function(){node.innerHTML=_80e;dojo.style(node,{height:_80f,width:_810});});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(_822,_823,_824,_825,_826){var _827=_823.h;var _828=_823.w;var _829=args.distance*2;var _82a=args.duration;var _82b=parseFloat(_822.style.top);var _82c=parseFloat(_822.style.left);var _82d=0;var _82e=0;var _82f=0;if(args.random){var seed=(Math.random()*args.random)+Math.max(1-args.random,0);_829*=seed;_82a*=seed;_82d=((args.unhide&&args.sync)||(!args.unhide&&!args.sync))?(args.duration-_82a):0;_82e=Math.random()-0.5;_82f=Math.random()-0.5;}var _831=((_824.h-_827)/2-(_823.y-_824.y));var _832=((_824.w-_828)/2-(_823.x-_824.x));var _833=Math.sqrt(Math.pow(_832,2)+Math.pow(_831,2));var _834=_82b-_831*_829+_833*_82f;var _835=_82c-_832*_829+_833*_82e;var _836=dojo.animateProperty({node:_822,duration:_82a,delay:_82d,easing:(args.easing||(args.unhide?dojo.fx.easing.sinOut:dojo.fx.easing.circOut)),beforeBegin:(args.unhide?function(){if(args.fade){dojo.style(_822,"opacity",0);}_822.style.position=args.crop?"relative":"absolute";_822.style.top=_834+"px";_822.style.left=_835+"px";}:function(){_822.style.position=args.crop?"relative":"absolute";}),properties:{top:(args.unhide?{start:_834,end:_82b}:{start:_82b,end:_834}),left:(args.unhide?{start:_835,end:_82c}:{start:_82c,end:_835})}});if(args.fade){var _837=dojo.animateProperty({node:_822,duration:_82a,delay:_82d,easing:(args.fadeEasing||dojo.fx.easing.quadOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})}});return (args.unhide?[_837,_836]:[_836,_837]);}else{return _836;}};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 _83d=Math.abs(args.random);args.pieceAnimation=function(_83e,_83f,_840,_841,_842){var _843=_83f.h;var _844=_83f.w;var _845=args.interval||(args.duration/(1.5*_842));var _846=(args.duration-_842*_845);var _847=Math.random()*_842*_845;var _848=(args.reverseOrder||args.distance<0)?(_841*_845):((_842-_841)*_845);var _849=_847*_83d+Math.max(1-_83d,0)*_848;var _84a={};if(args.unhide){_84a.top={start:(parseFloat(_83e.style.top)-_840.h*args.distance),end:parseFloat(_83e.style.top)};if(args.fade){_84a.opacity={start:0,end:1};}}else{_84a.top={end:(parseFloat(_83e.style.top)+_840.h*args.distance)};if(args.fade){_84a.opacity={end:0};}}var _84b=dojo.animateProperty({node:_83e,duration:_846,delay:_849,easing:(args.easing||(args.unhide?dojo.fx.easing.sinIn:dojo.fx.easing.circIn)),properties:_84a,beforeBegin:(args.unhide?function(){if(args.fade){dojo.style(_83e,"opacity",0);}_83e.style.position=args.crop?"relative":"absolute";_83e.style.top=_84a.top.start+"px";}:function(){_83e.style.position=args.crop?"relative":"absolute";})});return _84b;};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 _851=Math.abs(args.random);args.pieceAnimation=function(_852,_853,_854,_855,_856){var _857=args.interval||(args.duration/(1.5*_856));var _858=(args.duration-_856*_857);var _859=Math.random()*_856*_857;var _85a=(args.reverseOrder)?((_856-_855)*_857):(_855*_857);var _85b=_859*_851+Math.max(1-_851,0)*_85a;var _85c=dojo.animateProperty({node:_852,duration:_858,delay:_85b,easing:(args.easing||dojo.fx.easing.sinInOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})},beforeBegin:(args.unhide?function(){dojo.style(_852,"opacity",0);}:undefined)});return _85c;};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 _862=Math.abs(args.random);var _863=10;args.pieceAnimation=function(_864,_865,_866,_867,_868){var _869=args.interval||(args.duration/(1.5*_868));var text=_864.textContent;var _86b=text.match(/\s/g);if(typeof (args.wordDelay)=="undefined"){args.wordDelay=_869*2;}if(!args.unhide){_863=(_868-_867-1)*_869;}var _86c,_86d;if(args.fixed){if(args.unhide){var _86c=function(){dojo.style(_864,"opacity",0);};}}else{if(args.unhide){var _86c=function(){_864.style.display="none";};var _86d=function(){_864.style.display="inline";};}else{var _86d=function(){_864.style.display="none";};}}var _86e=dojo.animateProperty({node:_864,duration:1,delay:_863,easing:(args.easing||dojo.fx.easing.sinInOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})},beforeBegin:_86c,onEnd:_86d});if(args.unhide){var _86f=Math.random()*text.length*_869;var _870=_86f*_862/2+Math.max(1-_862/2,0)*args.wordDelay;_863+=_86f*_862+Math.max(1-_862,0)*_869*text.length+(_870*(_86b&&text.lastIndexOf(_86b[_86b.length-1])==text.length-1));}return _86e;};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(_873){dojo.mixin(this,_873);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(_874){this.showNow=_874;if(!this.url){return;}dojo.xhrGet({url:this.url,handleAs:"json",load:dojo.hitch(this,this.gotData)});},gotData:function(_875,_876){this.data=_875;if(this.showNow){this.show();}},show:function(){if(!this.data){return this.loadData(true);}var _877=dojo.byId(this.overlayId);this.original_opacity=dojo.style(_877).opacity;this.original_background_color=dojo.style(_877).backgroundColor;dojo.style(_877,{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 _87a=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 _87e=dojo.byId(this.innerContentId);var _87f={node:_87e,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(_87e,"visibility","visible");var _880=page.showFor!=null?page.showFor:5000;if(_87a!=null){_87f.onEnd=dojo.hitch(this,function(){dojo.style(_87e,"visibility","hidden");this.showPage(i+1);});var anim=dojox.fx.text.explode(_87f);setTimeout(function(){anim.play();},_880);}else{setTimeout(dojo.hitch(this,this.hide),_880);}},makeLIs:function(_882){html="";for(var i=0;i<_882.length;i++){html=html+"<li>"+_882[i]+"</li>";}return html;},hide:function(){this.lightbox.hide();var _884=dojo.byId(this.overlayId);dojo.style(_884,{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(_885){var _886=document.getElementById("pw-ytplayer");_886.addEventListener("onStateChange","pw.focus.stateChange");};pw.focus.stateChange=function(_887){if(_887==0){pw.focus.credits.hide();}else{if(_887==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 _888=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"]);
