/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

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={};this.length=0;},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;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_2,_3){_3=_3||dojo.global;var i=0,id;for(id in this._hash){_2.call(_3,this._hash[id],i++,this._hash);}return this;},filter:function(_4,_5){_5=_5||dojo.global;var _6=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_4.call(_5,w,i++,this._hash)){_6.add(w);}}return _6;},byId:function(id){return this._hash[id];},byClass:function(_7){var _8=new dijit.WidgetSet(),id,_9;for(id in this._hash){_9=this._hash[id];if(_9.declaredClass==_7){_8.add(_9);}}return _8;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_a,_b){return dojo.map(this.toArray(),_a,_b);},every:function(_c,_d){_d=_d||dojo.global;var x=0,i;for(i in this._hash){if(!_c.call(_d,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_e,_f){_f=_f||dojo.global;var x=0,i;for(i in this._hash){if(_e.call(_f,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){dijit.registry=new dijit.WidgetSet();var _10=dijit.registry._hash,_11=dojo.attr,_12=dojo.hasAttr,_13=dojo.style;dijit.byId=function(id){return typeof id=="string"?_10[id]:id;};var _14={};dijit.getUniqueId=function(_15){var id;do{id=_15+"_"+(_15 in _14?++_14[_15]:_14[_15]=0);}while(_10[id]);return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;};dijit.findWidgets=function(_16){var _17=[];function _18(_19){for(var _1a=_19.firstChild;_1a;_1a=_1a.nextSibling){if(_1a.nodeType==1){var _1b=_1a.getAttribute("widgetId");if(_1b){_17.push(_10[_1b]);}else{_18(_1a);}}}};_18(_16);return _17;};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(_1c){if(!_1c._destroyed){if(_1c.destroyRecursive){_1c.destroyRecursive();}else{if(_1c.destroy){_1c.destroy();}}}});};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll();});}dijit.byNode=function(_1d){return _10[_1d.getAttribute("widgetId")];};dijit.getEnclosingWidget=function(_1e){while(_1e){var id=_1e.getAttribute&&_1e.getAttribute("widgetId");if(id){return _10[id];}_1e=_1e.parentNode;}return null;};var _1f=(dijit._isElementShown=function(_20){var s=_13(_20);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_11(_20,"type")!="hidden");});dijit.hasDefaultTabStop=function(_21){switch(_21.nodeName.toLowerCase()){case "a":return _12(_21,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":if(dojo.isMoz){try{return _21.contentDocument.designMode=="on";}catch(err){return false;}}else{if(dojo.isWebKit){var doc=_21.contentDocument,_22=doc&&doc.body;return _22&&_22.contentEditable=="true";}else{try{doc=_21.contentWindow.document;_22=doc&&doc.body;return _22&&_22.firstChild&&_22.firstChild.contentEditable=="true";}catch(e){return false;}}}default:return _21.contentEditable=="true";}};var _23=(dijit.isTabNavigable=function(_24){if(_11(_24,"disabled")){return false;}else{if(_12(_24,"tabIndex")){return _11(_24,"tabIndex")>=0;}else{return dijit.hasDefaultTabStop(_24);}}});dijit._getTabNavigable=function(_25){var _26,_27,_28,_29,_2a,_2b;var _2c=function(_2d){dojo.query("> *",_2d).forEach(function(_2e){if((dojo.isIE&&_2e.scopeName!=="HTML")||!_1f(_2e)){return;}if(_23(_2e)){var _2f=_11(_2e,"tabIndex");if(!_12(_2e,"tabIndex")||_2f==0){if(!_26){_26=_2e;}_27=_2e;}else{if(_2f>0){if(!_28||_2f<_29){_29=_2f;_28=_2e;}if(!_2a||_2f>=_2b){_2b=_2f;_2a=_2e;}}}}if(_2e.nodeName.toUpperCase()!="SELECT"){_2c(_2e);}});};if(_1f(_25)){_2c(_25);}return {first:_26,last:_27,lowest:_28,highest:_2a};};dijit.getFirstInTabbingOrder=function(_30){var _31=dijit._getTabNavigable(dojo.byId(_30));return _31.lowest?_31.lowest:_31.first;};dijit.getLastInTabbingOrder=function(_32){var _33=dijit._getTabNavigable(dojo.byId(_32));return _33.last?_33.last:_33.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 _34=["l","a","v","e"];cd.reverse();_34.reverse();dojo[_34.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(_35,_36){return agi.require("js."+_35,"js",_36);};agi.requireCss=function(_37,_38){return agi.require("css."+_37,"css",_38);};agi.require=function(_39,_3a,_3b){var _3c=agi._loadedResources[_39];if(_3c&&!_3b){return _3c;}_3a=_3a||"js";var _3d=agx.currentPage.imghost;var _3e=[_39.split(".").join("/"),_3a].join(".");if(_3e.charAt(0)=="/"){_3e=_3e.substring(1);}var uri=[_3d,_3e].join("/");var tag=dojo.doc.createElement(agi._mimeMap[_3a].tag);if(_3a=="css"){tagi.rel=agi._mimeMap.css.rel;tagi.href=uri;}else{tagi.src=uri;tagi.type=agi._mimeMap[_3a].type;}dojo.query("head")[0].appendChild(tag);agi._loadedResources[_39]=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(_3f,_40){d.forEach(this._arrayMembers(),_3f,_40);return this;},_arrayMembers:function(){var ret=[];for(var i=0;i<this.length;i++){ret.push(this[i]);}return ret;},every:function(_41,_42){return d.every(this._arrayMembers(),_41,_42);},some:function(_43,_44){return d.some(this._arrayMembers(),_43,_44);},map:function(_45,obj){return d.map(this._arrayMembers(),_45,obj,t.ExtArray);}});d.declare("agi.types.Dict",[],{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 _46=new t.ExtArray();this.keys().forEach(d.hitch(this,function(i){_46.push([i,this[i]]);}));return _46;}});})();}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(_47){ret=[];if(d.isArray(_47)){for(x in _47){if(!Array.prototype[x]){ret.push([x,_47[x]]);}}}else{if(d.isString(_47)){for(x in _47){if(!String.prototype[x]){ret.push([x,_47[x]]);}}}else{d.forEach(_47,function(x){ret.push([x,_47[x]]);});}}return ret;};u.getClassName=function(_48){if(!_48.declaredClass){if(d.isString(_48)){return "String";}else{if(d.isArray(_48)||d.isArrayLike(_48)){return "Array";}else{if(d.isFunction(_48)){return "function";}else{if(d.isObject(_48)){return "Object";}}}}}else{var _49=_48.declaredClass.split(".");return _49[_49.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(_4a){return _4a.toString().replace(/"/g,"&quot;").replace(/&/g,"&amp;");};u.toPx=function(num){return num.toString()+"px";};u.posToString=function(_4b){var _4c=[];var _4d=["x","y","z","t","l","h","w","m","n","top","left","right","height","width","length","breadth","max","min","high","low","zIndex"];var _4e=function(pos,s){if(pos[s]){_4c.push(s+": "+pos[s]);}return;};for(i=0;i<_4d.length;i++){_4e(_4b,_4d[i]);}return "{"+_4c.join(", ")+"}";};u._debounce_waiting=false;u._setDebounceWaitingFalse=function(){u._debounce_waiting=false;};u.debounce=function(x,_4f,_50){var _51=3000;if(_50){_51=_50*1000;}if(window.setDoPopAway){setDoPopAway(false);}if(u._debounce_waiting){if(_4f){alert("Please wait while we process your request.");}return false;}else{u._debounce_waiting=true;setTimeout(u._setDebounceWaitingFalse,_51);return true;}};u.collection_as_array=u.collectionToArray=function(_52){var ret=[];d.forEach(_52,function(i){ret.push(i);});return ret;};u.extend_array=u.extendArray=function(_53,_54){d.forEach(_54,function(i){_53.push(i);});};u.product_id=u.getProdId=function(_55){return "productw-"+_55;};u.isUndef=function(_56){return (_56===undefined);};u.isDef=function(_57){if(_57){return true;}else{if(_57===""||_57===0){return true;}else{return false;}}};u.isNull=function(_58){return (_58===null);};u.queryOne=function(_59,_5a){ret=d.query(_59,_5a);if(ret.length<=0){return null;}else{return ret[0];}};u.query_one=u.q1=u.queryOne;u.getQueryVariable=function(_5b,_5c){var wv;if(webvars){wv=webvars;}if(_5c){wv=d.queryToObject(_5c);}else{if(!_5c&&!wv){wv=d.queryToQbect(window.location.search.substring(1));}}return wv[_5b];};u.get_query_variable=u.getQv=u.getQueryVariable;u.truncate=function(_5d,_5e,_5f){_5f=_5f?_5f.toLowerCase():"left";if(_5d.length>_5e){var _60=0;var ret=_5d;if(_5f=="right"){ret=_5d.substring(_5d.length-_5e);ret="..."+ret;}else{if(_5f=="left"){ret=_5d.substring(_60,_5d.indexOf(" ",_5e));ret+="...";}}}else{ret=_5d;}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(_61,_62){_61.options.length=0;var _63=agi.html._buildOptions(_62);var i=0;var o;for(o=0;o<_63.length;o++){_61.options[i]=_63[o];i++;}};u._build_options=u._buildOptions=function(_64){var _65=[];var _66=0;var t;for(t=0;t<_64.length;t++){var _67=_64[t][1];var _68=_64[t][0];var o=new Option(_68,_67);_65[_65.length]=o;_66++;}if(_66>1){_65.unshift(new Option("",""));}return _65;};u.show=function(_69,_6a){d.style(_69,{display:_6a?_6a:"block"});};u.hide=function(_6b){d.style(_6b,{display:"none"});};u.toggleDisplay=function(_6c){if(d.style(_6c,"display")=="none"){d.style(_6c,{display:"block"});}else{d.style(_6c,{display:"none"});}};u.toggle_block=function(_6d,_6e,_6f,_70){if(_6f&&_70){var _71=_6d.className;if(_71.indexOf(_6f)>-1){d.removeClass(_6d,_6f);d.addClass(_6d,_70);}else{d.removeClass(_6d,_70);d.addClass(_6d,_6f);}}u.toggleDisplay(_6e);};u.toggleBlock=u.toggle_block;u.get_position=u.getPosition=function(_72){return d.coords(_72,true);};u.getAbsolutePosition=function(_73){return d._abs(_73,true);};u.isUndefined=function(it){return ((typeof (it)=="undefined")&&(it===undefined));};u.getNameInObj=function(ns,_74){if(!ns){ns=d.global;}for(var x in ns){if(ns[x]===_74){return x.toString();}}return null;};u.forward=function(_75){return function(){return this[_75].apply(this,arguments);};};u.shallowCopy=function(obj,_76){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]=_76?u.shallowCopy(obj[i],_76):obj[i];}}}else{if(d.lang.isArray(obj)){ret=[];for(i=0;i<obj.length;i++){ret[i]=_76?u.shallowCopy(obj[i],_76):obj[i];}}else{ret=obj;}}return ret;};u.errorToString=function(_77){if(!typeof _77.message=="undefined"){return _77.message;}else{if(!typeof _77.description=="undefined"){return _77.description;}else{return _77;}}};u.raise=function(_78,_79){if(_79){_78=_78+": "+u.errorToString(_79);}else{_78=u.errorToString(_78);}throw _79||new Error(_78);};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.contains=function(obj){return this.indexOf(obj)>-1;};arr.remove=function(idx){return this.splice(idx,1);};arr.append=function(_7a){return this.push(_7a);};arr.extend=function(_7b){d.forEach(_7b,d.hitch(this,function(i){this.push(i);}));};})();(function(){var str=String.prototype;str.startswith=function(_7c){return this.match("^"+_7c)==_7c;};str.endswith=function(_7d){return this.match(_7d+"$")==_7d;};str.contains=function(_7e){return this.match(_7e)!=null;};str.isdigit=function(_7f){if(this=="0"){return true;}else{var _80=_7f||10;var val=parseInt(this,_80);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 _81=this.id||"<NO ID>";return ["[",agi.util.getClassName(this),", id=",(this.id||"<NO ID>"),"]"].join("");}});}if(!dojo._hasResource["agi.classes.Identified"]){dojo._hasResource["agi.classes.Identified"]=true;dojo.provide("agi.classes.Identified");dojo.declare("agi.classes.Identified",[agi.classes.Named],{constructor:function(){this._getId();},_getId:function(){if(!this._isIdentified){this.id=agi.classes._idGen();agi.registry.add(this);this._isIdentified=true;}}});}if(!dojo._hasResource["agi.widget.Carousel"]){dojo._hasResource["agi.widget.Carousel"]=true;dojo.provide("agi.widget.Carousel");dojo.declare("agi.widget.Carousel",[agi.classes.Identified],{items:[],width:0,container_width:0,node:null,position:0,min_left:0,left_button:null,right_button:null,wrap:false,flip_count:1,view_count:3,row_count:1,page:1,pages:1,class_base:null,moving:false,hide_buttons:false,right_button_always_on:false,ANIMATION_DURATION:700,constructor:function(_82){if(typeof _82=="object"){dojo.mixin(this,_82);}else{this.legacy_args.apply(this,arguments);}var _83=dojo.query("."+this.class_base+"-container");if(_83.length==1){this.node=_83[0];}else{return;}try{this.left_button=dojo.query("."+this.class_base+"-left")[0];dojo._setOpacity(this.left_button,0.5);dojo.style(this.left_button,{cursor:"default"});}catch(e){}try{this.right_button=dojo.query("."+this.class_base+"-right")[0];}catch(e){}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);}this.position_items();},position_items:function(){this.items=dojo.query("> li",this.node);this.pages=Math.ceil((this.items.length/this.row_count)/this.flip_count);this.width=dojo.marginBox(this.items[0]).w;if(dojo.isSafari){var css=dojo.getComputedStyle(this.items[0]);var _84=dojo._toPixelValue(this.items[0],css.marginRight);var _85=dojo._toPixelValue(this.items[0],css.marginLeft);this.width+=_84-_85;}if(this.width==0){var _86=dojo.style(this.items[0]);this.width=this.make_int(_86.width)+this.make_int(_86.marginLeft)+this.make_int(_86.marginRight)+this.make_int(_86.paddingLeft)+this.make_int(_86.paddingRight);}if(this.items.length<=this.view_count&&this.hide_buttons){dojo.style(this.left_button,{visibility:"hidden"});dojo.style(this.right_button,{visibility:"hidden"});}else{dojo.style(this.left_button,{visibility:"visible"});dojo.style(this.right_button,{visibility:"visible"});}this.min_left=-1*this.width*(this.items.length/this.row_count-this.view_count);this.min_left=(Math.min(this.min_left,0));var _87=(this.width*this.items.length+50)/this.row_count;dojo.style(this.node,{width:_87+"px"});this.container_width=_87;var _88=this.items.length%this.view_count;var _89=0;if(_88>0){_89=this.view_count-_88;}for(var i=0;i<_89;i++){dojo.create("li",{className:this.items[0].className,style:"visibility: hidden;"},this.node);_87+=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 _8a=dojo.clone(this.items[i]);dojo.place(_8a,this.node);_87+=this.width;this.min_left-=this.width;}}dojo.style(this.node,{width:_87+"px"});this.reset();},legacy_args:function(_8b,_8c,_8d,_8e,_8f,_90){if(!_8c){this.view_count=3;}else{this.view_count=_8c;}if(!_8d){this.flip_count=this.view_count;}else{this.flip_count=_8d;}if(!_8e){this.wrap=false;}else{this.wrap=_8e;}if(!_8f){this.hide_buttons=false;}else{this.hide_buttons=_8f;}if(!_90){this.row_count=1;}else{this.row_count=_90;}this.class_base=_8b;},make_int:function(str){return str.replace(/\D/g,"")*1;},scroll_left:function(evt){if(evt!=null){dojo.stopEvent(evt);}if(this.moving||this.items.length<=this.view_count){return;}if(this.wrap&&this.position==0){this.position=this.min_left;dojo.style(this.node,{left:this.position+"px"});}if(this.position<0){this.scroll_animation(Math.min(0,this.position+(this.width*this.flip_count)));this.fix_pages(this.page-1);}},scroll_right:function(evt){if(evt!=null){dojo.stopEvent(evt);}if(this.moving||this.items.length<=this.view_count){return;}if(this.position>=this.min_left){this.scroll_animation(Math.max(this.min_left,this.position-(this.width*this.flip_count)));this.fix_pages(this.page+1);}},scroll_animation:function(_91,_92){if(!_92){_92=false;}this.position=_91;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:_91},this.ANIMATION_DURATION,null,on_end);this.moving=true;},fix_buttons:function(){if(!this.wrap&&this.position==0){dojo.style(this.left_button,{cursor:"default"});dojo._setOpacity(this.left_button,0.5);}else{dojo.style(this.left_button,{cursor:"pointer"});dojo._setOpacity(this.left_button,1);}if(!this.wrap&&this.position==this.min_left){dojo._setOpacity(this.right_button,0.5);dojo.style(this.right_button,{cursor:"default"});}else{dojo.style(this.right_button,{cursor:"pointer"});dojo._setOpacity(this.right_button,1);}if(this.right_button_always_on==true){dojo.style(this.right_button,{cursor:"pointer"});dojo._setOpacity(this.right_button,1);}},fix_pages:function(_93){this.page=Math.max(0,Math.min(_93,this.pages));var _94=this.class_base+"-pages";var _95=dojo.query("li",_94);_95.removeClass("agi-scroll-on");_95.addClass("agi-scroll-off");this.on_id="#agi-scroll-page-"+(this.page-1);this.on_node=dojo.query("#"+this.class_base+"-page-"+(this.page),_94);this.on_node.addClass("agi-scroll-on");this.on_node.removeClass("agi-scroll-off");},reset:function(){this.moving=false;this.node.style.left="0px";this.position=0;this.fix_pages(1);this.fix_buttons();}});}if(!dojo._hasResource["dojox.string.Builder"]){dojo._hasResource["dojox.string.Builder"]=true;dojo.provide("dojox.string.Builder");dojox.string.Builder=function(str){var b="";this.length=0;this.append=function(s){if(arguments.length>1){var tmp="",l=arguments.length;switch(l){case 9:tmp=""+arguments[8]+tmp;case 8:tmp=""+arguments[7]+tmp;case 7:tmp=""+arguments[6]+tmp;case 6:tmp=""+arguments[5]+tmp;case 5:tmp=""+arguments[4]+tmp;case 4:tmp=""+arguments[3]+tmp;case 3:tmp=""+arguments[2]+tmp;case 2:b+=""+arguments[0]+arguments[1]+tmp;break;default:var i=0;while(i<arguments.length){tmp+=arguments[i++];}b+=tmp;}}else{b+=s;}this.length=b.length;return this;};this.concat=function(s){return this.append.apply(this,arguments);};this.appendArray=function(_96){return this.append.apply(this,_96);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_97,_98){b=b.replace(_97,_98);this.length=b.length;return this;};this.remove=function(_99,len){if(len===undefined){len=b.length;}if(len==0){return this;}b=b.substr(0,_99)+b.substr(_99+len);this.length=b.length;return this;};this.insert=function(_9a,str){if(_9a==0){b=str+b;}else{b=b.slice(0,_9a)+str+b.slice(_9a);}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,_9b,_9c){var _9d=[];var _9e,_9f,_a0=0;while(_9e=re.exec(str)){_9f=str.slice(_a0,re.lastIndex-_9e[0].length);if(_9f.length){_9d.push(_9f);}if(_9b){if(dojo.isOpera){var _a1=_9e.slice(0);while(_a1.length<_9e.length){_a1.push(null);}_9e=_a1;}var _a2=_9b.apply(_9c,_9e.slice(1).concat(_9d.length));if(typeof _a2!="undefined"){_9d.push(_a2);}}_a0=re.lastIndex;}_9f=str.slice(_a0);if(_9f.length){_9d.push(_9f);}return _9d;};}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(_a3){if(_a3){dojo._mixin(this,_a3);if(_a3.get){this._getter=_a3.get;delete this.get;}}},{push:function(){var _a4=this;var _a5=dojo.delegate(this);_a5.pop=function(){return _a4;};return _a5;},pop:function(){throw new Error("pop() called on empty Context");},get:function(key,_a6){var n=this._normalize;if(this._getter){var got=this._getter(key);if(typeof got!="undefined"){return n(got);}}if(typeof this[key]!="undefined"){return n(this[key]);}return _a6;},_normalize:function(_a7){if(_a7 instanceof Date){_a7.year=_a7.getFullYear();_a7.month=_a7.getMonth()+1;_a7.day=_a7.getDate();_a7.date=_a7.year+"-"+("0"+_a7.month).slice(-2)+"-"+("0"+_a7.day).slice(-2);_a7.hour=_a7.getHours();_a7.minute=_a7.getMinutes();_a7.second=_a7.getSeconds();_a7.microsecond=_a7.getMilliseconds();}return _a7;},update:function(_a8){var _a9=this.push();if(_a8){dojo._mixin(this,_a8);}return _a9;}});var _aa=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _ab=/\s+/g;var _ac=function(_ad,_ae){_ad=_ad||_ab;if(!(_ad instanceof RegExp)){_ad=new RegExp(_ad,"g");}if(!_ad.global){throw new Error("You must use a globally flagged RegExp with split "+_ad);}_ad.exec("");var _af,_b0=[],_b1=0,i=0;while(_af=_ad.exec(this)){_b0.push(this.slice(_b1,_ad.lastIndex-_af[0].length));_b1=_ad.lastIndex;if(_ae&&(++i>_ae-1)){break;}}_b0.push(this.slice(_b1));return _b0;};dd.Token=function(_b2,_b3){this.token_type=_b2;this.contents=new String(dojo.trim(_b3));this.contents.split=_ac;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_b4){var bit,_b5=[],i=0;_b4=_b4||999;while(i++<_b4&&(bit=_aa.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_b5.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_b5.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_b5.push(bit);}}}return _b5;};var ddt=dd.text={_get:function(_b6,_b7,_b8){var _b9=dd.register.get(_b6,_b7.toLowerCase(),_b8);if(!_b9){if(!_b8){throw new Error("No tag found for "+_b7);}return null;}var fn=_b9[1];var _ba=_b9[2];var _bb;if(fn.indexOf(":")!=-1){_bb=fn.split(":");fn=_bb.pop();}dojo["require"](_ba);var _bc=dojo.getObject(_ba);return _bc[fn||_b7]||_bc[_b7+"_"]||_bc[fn+"_"];},getTag:function(_bd,_be){return ddt._get("tag",_bd,_be);},getFilter:function(_bf,_c0){return ddt._get("filter",_bf,_c0);},getTemplate:function(_c1){return new dd.Template(ddt.getTemplateString(_c1));},getTemplateString:function(_c2){return dojo._getText(_c2.toString())||"";},_resolveLazy:function(_c3,_c4,_c5){if(_c4){if(_c5){return dojo.fromJson(dojo._getText(_c3))||{};}else{return dd.text.getTemplateString(_c3);}}else{return dojo.xhrGet({handleAs:(_c5)?"json":"text",url:_c3});}},_resolveTemplateArg:function(arg,_c6){if(ddt._isTemplate(arg)){if(!_c6){var d=new dojo.Deferred();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_c6);},_isTemplate:function(arg){return (typeof arg=="undefined")||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));},_resolveContextArg:function(arg,_c7){if(arg.constructor==Object){if(!_c7){var d=new dojo.Deferred;d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_c7,true);},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){return dojox.string.tokenize(str,ddt._re,ddt._parseDelims);},_parseDelims:function(_c8,_c9,tag){if(_c8){return [dd.TOKEN_VAR,_c8];}else{if(_c9){var _ca=dojo.trim(tag).split(/\s+/g);for(var i=0,_cb;_cb=_ca[i];i++){dojo["require"](_cb);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=dojo.extend(function(_cc,_cd){var str=_cd?_cc:ddt._resolveTemplateArg(_cc,true)||"";var _ce=ddt.tokenize(str);var _cf=new dd._Parser(_ce);this.nodelist=_cf.parse();},{update:function(_d0,_d1){return ddt._resolveContextArg(_d1).addCallback(this,function(_d2){var _d3=this.render(new dd._Context(_d2));if(_d0.forEach){_d0.forEach(function(_d4){_d4.innerHTML=_d3;});}else{dojo.byId(_d0).innerHTML=_d3;}return this;});},render:function(_d5,_d6){_d6=_d6||this.getBuffer();_d5=_d5||new dd._Context({});return this.nodelist.render(_d5,_d6)+"";},getBuffer:function(){return new dojox.string.Builder();}});var _d7=/\{\{\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,_d7,function(_d8){return new dd._Filter(_d8);}));}};dd._QuickNodeList=dojo.extend(function(_d9){this.contents=_d9;},{render:function(_da,_db){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_db=_db.concat(this.contents[i].resolve(_da));}else{_db=_db.concat(this.contents[i]);}}return _db;},dummyRender:function(_dc){return this.render(_dc,dd.Template.prototype.getBuffer()).toString();},clone:function(_dd){return this;}});dd._Filter=dojo.extend(function(_de){if(!_de){throw new Error("Filter must be called with variable name");}this.contents=_de;var _df=this._cache[_de];if(_df){this.key=_df[0];this.filters=_df[1];}else{this.filters=[];dojox.string.tokenize(_de,this._re,this._tokenize,this);this._cache[_de]=[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 _e0=arguments[pos];if(this._args[pos]=="'"){_e0=_e0.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_e0=_e0.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_e0];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(_e1){if(typeof this.key=="undefined"){return "";}var str=this.resolvePath(this.key,_e1);for(var i=0,_e2;_e2=this.filters[i];i++){if(_e2[1]){if(_e2[1][0]){str=_e2[0](str,this.resolvePath(_e2[1][1],_e1));}else{str=_e2[0](str,_e2[1][1]);}}else{str=_e2[0](str);}}return str;},resolvePath:function(_e3,_e4){var _e5,_e6;var _e7=_e3.charAt(0);var _e8=_e3.slice(-1);if(!isNaN(parseInt(_e7))){_e5=(_e3.indexOf(".")==-1)?parseInt(_e3):parseFloat(_e3);}else{if(_e7=="\""&&_e7==_e8){_e5=_e3.slice(1,-1);}else{if(_e3=="true"){return true;}if(_e3=="false"){return false;}if(_e3=="null"||_e3=="None"){return null;}_e6=_e3.split(".");_e5=_e4.get(_e6[0]);if(dojo.isFunction(_e5)){var _e9=_e4.getThis&&_e4.getThis();if(_e5.alters_data){_e5="";}else{if(_e9){_e5=_e5.call(_e9);}else{_e5="";}}}for(var i=1;i<_e6.length;i++){var _ea=_e6[i];if(_e5){var _eb=_e5;if(dojo.isObject(_e5)&&_ea=="items"&&typeof _e5[_ea]=="undefined"){var _ec=[];for(var key in _e5){_ec.push([key,_e5[key]]);}_e5=_ec;continue;}if(_e5.get&&dojo.isFunction(_e5.get)&&_e5.get.safe){_e5=_e5.get(_ea);}else{if(typeof _e5[_ea]=="undefined"){_e5=_e5[_ea];break;}else{_e5=_e5[_ea];}}if(dojo.isFunction(_e5)){if(_e5.alters_data){_e5="";}else{_e5=_e5.call(_eb);}}else{if(_e5 instanceof Date){_e5=dd._Context.prototype._normalize(_e5);}}}else{return "";}}}}return _e5;}});dd._TextNode=dd._Node=dojo.extend(function(obj){this.contents=obj;},{set:function(_ed){this.contents=_ed;return this;},render:function(_ee,_ef){return _ef.concat(this.contents);},isEmpty:function(){return !dojo.trim(this.contents);},clone:function(){return this;}});dd._NodeList=dojo.extend(function(_f0){this.contents=_f0||[];this.last="";},{push:function(_f1){this.contents.push(_f1);return this;},concat:function(_f2){this.contents=this.contents.concat(_f2);return this;},render:function(_f3,_f4){for(var i=0;i<this.contents.length;i++){_f4=this.contents[i].render(_f3,_f4);if(!_f4){throw new Error("Template must return buffer");}}return _f4;},dummyRender:function(_f5){return this.render(_f5,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(_f6,_f7){var str=this.contents.resolve(_f6);if(!str){str="";}else{if(!str.safe){str=dd._base.escape(""+str);}}return _f7.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};};dd._Parser=dojo.extend(function(_f8){this.contents=_f8;},{i:0,parse:function(_f9){var _fa={},_fb;_f9=_f9||[];for(var i=0;i<_f9.length;i++){_fa[_f9[i]]=true;}var _fc=new dd._NodeList();while(this.i<this.contents.length){_fb=this.contents[this.i++];if(typeof _fb=="string"){_fc.push(new dd._TextNode(_fb));}else{var _fd=_fb[0];var _fe=_fb[1];if(_fd==dd.TOKEN_VAR){_fc.push(new dd._VarNode(_fe));}else{if(_fd==dd.TOKEN_BLOCK){if(_fa[_fe]){--this.i;return _fc;}var cmd=_fe.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_fc.push(fn(this,new dd.Token(_fd,_fe)));}}}}}}if(_f9.length){throw new Error("Could not find closing tag(s): "+_f9.toString());}this.contents.length=0;return _fc;},next_token:function(){var _ff=this.contents[this.i++];return new dd.Token(_ff[0],_ff[1]);},delete_first_token:function(){this.i++;},skip_past:function(_100){while(this.i<this.contents.length){var _101=this.contents[this.i++];if(_101[0]==dd.TOKEN_BLOCK&&_101[1]==_100){return;}}throw new Error("Unclosed tag found when looking for "+_100);},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(_102,name){var _103=dd.register._registry[_102+"s"];for(var i=0,_104;_104=_103[i];i++){if(typeof _104[0]=="string"){if(_104[0]==name){return _104;}}else{if(name.match(_104[0])){return _104;}}}},getAttributeTags:function(){var tags=[];var _105=dd.register._registry.attributes;for(var i=0,_106;_106=_105[i];i++){if(_106.length==3){tags.push(_106);}else{var fn=dojo.getObject(_106[1]);if(fn&&dojo.isFunction(fn)){_106.push(fn);tags.push(_106);}}}return tags;},_any:function(type,base,_107){for(var path in _107){for(var i=0,fn;fn=_107[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,_108){dd.register._any("tags",base,_108);},filters:function(base,_109){dd.register._any("filters",base,_109);}};var _10a=/&/g;var _10b=/</g;var _10c=/>/g;var _10d=/'/g;var _10e=/"/g;dd._base.escape=function(_10f){return dd.mark_safe(_10f.replace(_10a,"&amp;").replace(_10b,"&lt;").replace(_10c,"&gt;").replace(_10e,"&quot;").replace(_10d,"&#39;"));};dd._base.safe=function(_110){if(typeof _110=="string"){_110=new String(_110);}if(typeof _110=="object"){_110.safe=true;}return _110;};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["dojo.window"]){dojo._hasResource["dojo.window"]=true;dojo.provide("dojo.window");dojo.window.getBox=function(){var _111=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _112=dojo._docScroll();return {w:_111.clientWidth,h:_111.clientHeight,l:_112.x,t:_112.y};};dojo.window.get=function(doc){if(dojo.isIE&&window!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;};dojo.window.scrollIntoView=function(node,pos){try{node=dojo.byId(node);var doc=node.ownerDocument||dojo.doc,body=doc.body||dojo.body(),html=doc.documentElement||body.parentNode,isIE=dojo.isIE,isWK=dojo.isWebKit;if((!(dojo.isMoz||isIE||isWK||dojo.isOpera)||node==body||node==html)&&(typeof node.scrollIntoView!="undefined")){node.scrollIntoView(false);return;}var _113=doc.compatMode=="BackCompat",_114=_113?body:html,_115=isWK?body:_114,_116=_114.clientWidth,_117=_114.clientHeight,rtl=!dojo._isBodyLtr(),_118=pos||dojo.position(node),el=node.parentNode,_119=function(el){return ((isIE<=6||(isIE&&_113))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_119(node)){return;}while(el){if(el==body){el=_115;}var _11a=dojo.position(el),_11b=_119(el);if(el==_115){_11a.w=_116;_11a.h=_117;if(_115==html&&isIE&&rtl){_11a.x+=_115.offsetWidth-_11a.w;}if(_11a.x<0||!isIE){_11a.x=0;}if(_11a.y<0||!isIE){_11a.y=0;}}else{var pb=dojo._getPadBorderExtents(el);_11a.w-=pb.w;_11a.h-=pb.h;_11a.x+=pb.l;_11a.y+=pb.t;}if(el!=_115){var _11c=el.clientWidth,_11d=_11a.w-_11c;if(_11c>0&&_11d>0){_11a.w=_11c;if(isIE&&rtl){_11a.x+=_11d;}}_11c=el.clientHeight;_11d=_11a.h-_11c;if(_11c>0&&_11d>0){_11a.h=_11c;}}if(_11b){if(_11a.y<0){_11a.h+=_11a.y;_11a.y=0;}if(_11a.x<0){_11a.w+=_11a.x;_11a.x=0;}if(_11a.y+_11a.h>_117){_11a.h=_117-_11a.y;}if(_11a.x+_11a.w>_116){_11a.w=_116-_11a.x;}}var l=_118.x-_11a.x,t=_118.y-Math.max(_11a.y,0),r=l+_118.w-_11a.w,bot=t+_118.h-_11a.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);_118.x+=el.scrollLeft;el.scrollLeft+=(isIE>=8&&!_113&&rtl)?-s:s;_118.x-=el.scrollLeft;}if(bot*t>0){_118.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_118.y-=el.scrollTop;}el=(el!=_115)&&!_11b&&el.parentNode;}}catch(error){node.scrollIntoView(false);}};}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(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{}}return bm;},moveToBookmark:function(_11e){var _11f=dojo.doc,mark=_11e.mark;if(mark){if(dojo.global.getSelection){var sel=dojo.global.getSelection();if(sel&&sel.removeAllRanges){if(mark.pRange){var r=mark;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end;}else{sel.removeAllRanges();sel.addRange(mark);}}else{}}else{if(_11f.selection&&mark){var rg;if(mark.pRange){rg=mark.range;}else{if(dojo.isArray(mark)){rg=_11f.body.createControlRange();dojo.forEach(mark,function(n){rg.addElement(n);});}else{rg=_11f.body.createTextRange();rg.moveToBookmark(mark);}}rg.select();}}}},getFocus:function(menu,_120){var node=!dijit._curFocus||(menu&&dojo.isDescendant(dijit._curFocus,menu.domNode))?dijit._prevFocus:dijit._curFocus;return {node:node,bookmark:(node==dijit._curFocus)&&dojo.withGlobal(_120||dojo.global,dijit.getBookmark),openedForWindow:_120};},focus:function(_121){if(!_121){return;}var node="node" in _121?_121.node:_121,_122=_121.bookmark,_123=_121.openedForWindow,_124=_122?_122.isCollapsed:false;if(node){var _125=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_125&&_125.focus){try{_125.focus();}catch(e){}}dijit._onFocusNode(node);}if(_122&&dojo.withGlobal(_123||dojo.global,dijit.isCollapsed)&&!_124){if(_123){_123.focus();}try{dojo.withGlobal(_123||dojo.global,dijit.moveToBookmark,null,[_122]);}catch(e2){}}},_activeStack:[],registerIframe:function(_126){return dijit.registerWin(_126.contentWindow,_126);},unregisterIframe:function(_127){dijit.unregisterWin(_127);},registerWin:function(_128,_129){var _12a=function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);if(dojo.isIE&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}dijit._onTouchNode(_129||evt.target||evt.srcElement,"mouse");};var doc=dojo.isIE?_128.document.documentElement:_128.document;if(doc){if(dojo.isIE){doc.attachEvent("onmousedown",_12a);var _12b=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){dijit._onFocusNode(_129||evt.srcElement);}else{dijit._onTouchNode(_129||evt.srcElement);}};doc.attachEvent("onactivate",_12b);var _12c=function(evt){dijit._onBlurNode(_129||evt.srcElement);};doc.attachEvent("ondeactivate",_12c);return function(){doc.detachEvent("onmousedown",_12a);doc.detachEvent("onactivate",_12b);doc.detachEvent("ondeactivate",_12c);doc=null;};}else{doc.addEventListener("mousedown",_12a,true);var _12d=function(evt){dijit._onFocusNode(_129||evt.target);};doc.addEventListener("focus",_12d,true);var _12e=function(evt){dijit._onBlurNode(_129||evt.target);};doc.addEventListener("blur",_12e,true);return function(){doc.removeEventListener("mousedown",_12a,true);doc.removeEventListener("focus",_12d,true);doc.removeEventListener("blur",_12e,true);doc=null;};}}},unregisterWin:function(_12f){_12f&&_12f();},_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,by){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _130=[];try{while(node){var _131=dojo.attr(node,"dijitPopupParent");if(_131){node=dijit.byId(_131).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===dojo.body()){break;}node=dojo.window.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_132=id&&dijit.byId(id);if(_132&&!(by=="mouse"&&_132.get("disabled"))){_130.unshift(id);}node=node.parentNode;}}}}catch(e){}dijit._setStack(_130,by);},_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(_133,by){var _134=dijit._activeStack;dijit._activeStack=_133;for(var _135=0;_135<Math.min(_134.length,_133.length);_135++){if(_134[_135]!=_133[_135]){break;}}var _136;for(var i=_134.length-1;i>=_135;i--){_136=dijit.byId(_134[i]);if(_136){_136._focused=false;_136._hasBeenBlurred=true;if(_136._onBlur){_136._onBlur(by);}dojo.publish("widgetBlur",[_136,by]);}}for(i=_135;i<_133.length;i++){_136=dijit.byId(_133[i]);if(_136){_136._focused=true;if(_136._onFocus){_136._onFocus(by);}dojo.publish("widgetFocus",[_136,by]);}}}});dojo.addOnLoad(function(){var _137=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_137);_137=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_138){this.pairs=[];this.returnWrappers=_138||false;};dojo.extend(dojo.AdapterRegistry,{register:function(name,_139,wrap,_13a,_13b){this.pairs[((_13b)?"unshift":"push")]([name,_139,wrap,_13a]);},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(){return dojo.window.getBox();};dijit.placeOnScreen=function(node,pos,_13c,_13d){var _13e=dojo.map(_13c,function(_13f){var c={corner:_13f,pos:{x:pos.x,y:pos.y}};if(_13d){c.pos.x+=_13f.charAt(1)=="L"?_13d.x:-_13d.x;c.pos.y+=_13f.charAt(0)=="T"?_13d.y:-_13d.y;}return c;});return dijit._place(node,_13e);};dijit._place=function(node,_140,_141){var view=dojo.window.getBox();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(node);}var best=null;dojo.some(_140,function(_142){var _143=_142.corner;var pos=_142.pos;if(_141){_141(node,_142.aroundCorner,_143);}var _144=node.style;var _145=_144.display;var _146=_144.visibility;_144.visibility="hidden";_144.display="";var mb=dojo.marginBox(node);_144.display=_145;_144.visibility=_146;var _147=Math.max(view.l,_143.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_148=Math.max(view.t,_143.charAt(0)=="T"?pos.y:(pos.y-mb.h)),endX=Math.min(view.l+view.w,_143.charAt(1)=="L"?(_147+mb.w):pos.x),endY=Math.min(view.t+view.h,_143.charAt(0)=="T"?(_148+mb.h):pos.y),_149=endX-_147,_14a=endY-_148,_14b=(mb.w-_149)+(mb.h-_14a);if(best==null||_14b<best.overflow){best={corner:_143,aroundCorner:_142.aroundCorner,x:_147,y:_148,w:_149,h:_14a,overflow:_14b};}return !_14b;});node.style.left=best.x+"px";node.style.top=best.y+"px";if(best.overflow&&_141){_141(node,best.aroundCorner,best.corner);}return best;};dijit.placeOnScreenAroundNode=function(node,_14c,_14d,_14e){_14c=dojo.byId(_14c);var _14f=_14c.style.display;_14c.style.display="";var _150=dojo.position(_14c,true);_14c.style.display=_14f;return dijit._placeOnScreenAroundRect(node,_150.x,_150.y,_150.w,_150.h,_14d,_14e);};dijit.placeOnScreenAroundRectangle=function(node,_151,_152,_153){return dijit._placeOnScreenAroundRect(node,_151.x,_151.y,_151.width,_151.height,_152,_153);};dijit._placeOnScreenAroundRect=function(node,x,y,_154,_155,_156,_157){var _158=[];for(var _159 in _156){_158.push({aroundCorner:_159,corner:_156[_159],pos:{x:x+(_159.charAt(1)=="L"?0:_154),y:y+(_159.charAt(0)=="T"?0:_155)}});}return dijit._place(node,_158,_157);};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,_15a,_15b,_15c){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};dijit.getPopupAroundAlignment=function(_15d,_15e){var _15f={};dojo.forEach(_15d,function(pos){switch(pos){case "after":_15f[_15e?"BR":"BL"]=_15e?"BL":"BR";break;case "before":_15f[_15e?"BL":"BR"]=_15e?"BR":"BL";break;case "below":_15f[_15e?"BL":"BR"]=_15e?"TL":"TR";_15f[_15e?"BR":"BL"]=_15e?"TR":"TL";break;case "above":default:_15f[_15e?"TL":"TR"]=_15e?"BL":"BR";_15f[_15e?"TR":"TL"]=_15e?"BR":"BL";break;}});return _15f;};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){return dojo.window.get(doc);};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup={_stack:[],_beginZIndex:1000,_idGen:1,moveOffScreen:function(node){var _160=node.parentNode;if(!_160||!dojo.hasClass(_160,"dijitPopup")){_160=dojo.create("div",{"class":"dijitPopup",style:{visibility:"hidden",top:"-9999px"}},dojo.body());dijit.setWaiRole(_160,"presentation");_160.appendChild(node);}var s=node.style;s.display="";s.visibility="";s.position="";s.top="0px";dojo.style(_160,{visibility:"hidden",top:"-9999px"});},getTopPopup:function(){var _161=this._stack;for(var pi=_161.length-1;pi>0&&_161[pi].parent===_161[pi-1].widget;pi--){}return _161[pi];},open:function(args){var _162=this._stack,_163=args.popup,_164=args.orient||((args.parent?args.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_165=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);var _166=_163.domNode.parentNode;if(!_166||!dojo.hasClass(_166,"dijitPopup")){this.moveOffScreen(_163.domNode);_166=_163.domNode.parentNode;}dojo.attr(_166,{id:id,style:{zIndex:this._beginZIndex+_162.length},"class":"dijitPopup "+(_163.baseClass||_163["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(dojo.isIE||dojo.isMoz){var _167=_166.childNodes[1];if(!_167){_167=new dijit.BackgroundIframe(_166);}}var best=_165?dijit.placeOnScreenAroundElement(_166,_165,_164,_163.orient?dojo.hitch(_163,"orient"):null):dijit.placeOnScreen(_166,args,_164=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_166.style.visibility="visible";_163.domNode.style.visibility="visible";var _168=[];_168.push(dojo.connect(_166,"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 _169=this.getTopPopup();if(_169&&_169.onCancel){_169.onCancel();}}}}));if(_163.onCancel){_168.push(dojo.connect(_163,"onCancel",args.onCancel));}_168.push(dojo.connect(_163,_163.onExecute?"onExecute":"onChange",this,function(){var _16a=this.getTopPopup();if(_16a&&_16a.onExecute){_16a.onExecute();}}));_162.push({wrapper:_166,iframe:_167,widget:_163,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_168});if(_163.onOpen){_163.onOpen(best);}return best;},close:function(_16b){var _16c=this._stack;while(dojo.some(_16c,function(elem){return elem.widget==_16b;})){var top=_16c.pop(),_16d=top.wrapper,_16e=top.iframe,_16f=top.widget,_170=top.onClose;if(_16f.onClose){_16f.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_16f&&_16f.domNode){this.moveOffScreen(_16f.domNode);}else{dojo.destroy(_16d);}if(_170){_170();}}}};dijit._frames=new function(){var _171=[];this.pop=function(){var _172;if(_171.length){_172=_171.pop();_172.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\");'>";_172=dojo.doc.createElement(html);}else{_172=dojo.create("iframe");_172.src="javascript:\"\"";_172.className="dijitBackgroundIframe";dojo.style(_172,"opacity",0.1);}_172.tabIndex=-1;dijit.setWaiRole(_172,"presentation");}return _172;};this.push=function(_173){_173.style.display="none";_171.push(_173);};}();dijit.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(dojo.isIE||dojo.isMoz){var _174=dijit._frames.pop();node.appendChild(_174);if(dojo.isIE<7){this.resize(node);this._conn=dojo.connect(node,"onresize",this,function(){this.resize(node);});}else{dojo.style(_174,{width:"100%",height:"100%"});}this.iframe=_174;}};dojo.extend(dijit.BackgroundIframe,{resize:function(node){if(this.iframe&&dojo.isIE<7){dojo.style(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"});}},destroy:function(){if(this._conn){dojo.disconnect(this._conn);this._conn=null;}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,pos){dojo.window.scrollIntoView(node,pos);};}if(!dojo._hasResource["dojo.uacss"]){dojo._hasResource["dojo.uacss"]=true;dojo.provide("dojo.uacss");(function(){var d=dojo,html=d.doc.documentElement,ie=d.isIE,_175=d.isOpera,maj=Math.floor,ff=d.isFF,_176=d.boxModel.replace(/-/,""),_177={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_quirks:d.isQuirks,dj_iequirks:ie&&d.isQuirks,dj_opera:_175,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};_177["dj_"+_176]=true;var _178="";for(var clz in _177){if(_177[clz]){_178+=clz+" ";}}html.className=d.trim(html.className+" "+_178);dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){var _179="dj_rtl dijitRtl "+_178.replace(/ /g,"-rtl ");html.className=d.trim(html.className+" "+_179);}});})();}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");}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=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_17a,node,_17b,obj,_17c,_17d,_17e){if(obj!=this._obj){this.stop();this._initialDelay=_17d||500;this._subsequentDelay=_17c||0.9;this._minDelay=_17e||10;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_17a,_17b);this._fireEventAndReload();this._evt=dojo.mixin({faux:true},evt);}},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,_17f,_180,_181,_182,_183,_184){if(_17f.keyCode){_17f.charOrCode=_17f.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_17f.charCode){_17f.charOrCode=String.fromCharCode(_17f.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==_17f.charOrCode&&(_17f.ctrlKey===undefined||_17f.ctrlKey==evt.ctrlKey)&&(_17f.altKey===undefined||_17f.altKey==evt.altKey)&&(_17f.metaKey===undefined||_17f.metaKey==(evt.metaKey||false))&&(_17f.shiftKey===undefined||_17f.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_180,node,_181,_17f,_182,_183,_184);}else{if(dijit.typematic._obj==_17f){dijit.typematic.stop();}}}),dojo.connect(node,"onkeyup",this,function(evt){if(dijit.typematic._obj==_17f){dijit.typematic.stop();}})];},addMouseListener:function(node,_185,_186,_187,_188,_189){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_185,node,_186,node,_187,_188,_189);}),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){evt.preventDefault();}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_185,node,_186,node,_187,_188,_189);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_18a,_18b,_18c,_18d,_18e,_18f,_190,_191){return this.addKeyListener(_18b,_18c,_18d,_18e,_18f,_190,_191).concat(this.addMouseListener(_18a,_18d,_18e,_18f,_190,_191));}};}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 _192=cs.backgroundImage;var _193=(cs.borderTopColor==cs.borderRightColor)||(_192!=null&&(_192=="none"||_192=="url(invalid-url:)"));dojo[_193?"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 _194=this.getWaiRole(elem);return role?(_194.indexOf(role)>-1):(_194.length>0);},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _195=dojo.attr(elem,"role")||"";if(!this._XhtmlRoles.test(_195)){dojo.attr(elem,"role",role);}else{if((" "+_195+" ").indexOf(" "+role+" ")<0){var _196=dojo.trim(_195.replace(this._XhtmlRoles,""));var _197=dojo.trim(_195.replace(_196,""));dojo.attr(elem,"role",_197+(_197?" ":"")+role);}}},removeWaiRole:function(elem,role){var _198=dojo.attr(elem,"role");if(!_198){return;}if(role){var t=dojo.trim((" "+_198+" ").replace(" "+role+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_199){return elem.hasAttribute?elem.hasAttribute("aria-"+_199):!!elem.getAttribute("aria-"+_199);},getWaiState:function(elem,_19a){return elem.getAttribute("aria-"+_19a)||"";},setWaiState:function(elem,_19b,_19c){elem.setAttribute("aria-"+_19b,_19c);},removeWaiState:function(elem,_19d){elem.removeAttribute("aria-"+_19d);}});}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(_19e,_19f){if(_19e&&dojo.isFunction(_19e._onConnect)){_19e._onConnect(_19f);}});dijit._connectOnUseEventHandler=function(_1a0){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var _1a1=function(evt){dijit._lastKeyDownNode=evt.srcElement;};dojo.doc.attachEvent("onkeydown",_1a1);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",_1a1);});})();}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target;},true);}(function(){var _1a2={},_1a3=function(_1a4){var dc=_1a4.declaredClass;if(!_1a2[dc]){var r=[],_1a5,_1a6=_1a4.constructor.prototype;for(var _1a7 in _1a6){if(dojo.isFunction(_1a6[_1a7])&&(_1a5=_1a7.match(/^_set([a-zA-Z]*)Attr$/))&&_1a5[1]){r.push(_1a5[1].charAt(0).toLowerCase()+_1a5[1].substr(1));}}_1a2[dc]=r;}return _1a2[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",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")).toString(),postscript:function(_1a8,_1a9){this.create(_1a8,_1a9);},create:function(_1aa,_1ab){this.srcNodeRef=dojo.byId(_1ab);this._connects=[];this._subscribes=[];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(_1aa){this.params=_1aa;dojo.mixin(this,_1aa);}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 _1ac=this.srcNodeRef;if(_1ac&&_1ac.parentNode){_1ac.parentNode.replaceChild(this.domNode,_1ac);}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 _1ad=function(attr,_1ae){if((_1ae.params&&attr in _1ae.params)||_1ae[attr]){_1ae.set(attr,_1ae[attr]);}};for(var attr in this.attributeMap){_1ad(attr,this);}dojo.forEach(_1a3(this),function(a){if(!(a in this.attributeMap)){_1ad(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){if(this.baseClass){var _1af=this.baseClass.split(" ");if(!this.isLeftToRight()){_1af=_1af.concat(dojo.map(_1af,function(name){return name+"Rtl";}));}dojo.addClass(this.domNode,_1af);}},startup:function(){this._started=true;},destroyRecursive:function(_1b0){this._beingDestroyed=true;this.destroyDescendants(_1b0);this.destroy(_1b0);},destroy:function(_1b1){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_1b2){dfe(_1b2,d.disconnect);});dfe(this._subscribes,function(_1b3){dun(_1b3);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_1b1);dijit.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_1b4){if(this.bgIframe){this.bgIframe.destroy(_1b4);delete this.bgIframe;}if(this.domNode){if(_1b4){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_1b4){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_1b5){dojo.forEach(this.getChildren(),function(_1b6){if(_1b6.destroyRecursive){_1b6.destroyRecursive(_1b5);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_1b7){if(_1b7 in this._deferredConnects){var _1b8=this[this._deferredConnects[_1b7]||"domNode"];this.connect(_1b8,_1b7.toLowerCase(),_1b7);delete this._deferredConnects[_1b7];}},_setClassAttr:function(_1b9){var _1ba=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_1ba,this["class"]);this["class"]=_1b9;dojo.addClass(_1ba,_1b9);},_setStyleAttr:function(_1bb){var _1bc=this[this.attributeMap.style||"domNode"];if(dojo.isObject(_1bb)){dojo.style(_1bc,_1bb);}else{if(_1bc.style.cssText){_1bc.style.cssText+="; "+_1bb;}else{_1bc.style.cssText=_1bb;}}this.style=_1bb;},setAttribute:function(attr,_1bd){dojo.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_1bd);},_attrToDom:function(attr,_1be){var _1bf=this.attributeMap[attr];dojo.forEach(dojo.isArray(_1bf)?_1bf:[_1bf],function(_1c0){var _1c1=this[_1c0.node||_1c0||"domNode"];var type=_1c0.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_1be)){_1be=dojo.hitch(this,_1be);}var _1c2=_1c0.attribute?_1c0.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(_1c1,_1c2,_1be);break;case "innerText":_1c1.innerHTML="";_1c1.appendChild(dojo.doc.createTextNode(_1be));break;case "innerHTML":_1c1.innerHTML=_1be;break;case "class":dojo.removeClass(_1c1,this[attr]);dojo.addClass(_1c1,_1be);break;}},this);this[attr]=_1be;},attr:function(name,_1c3){if(dojo.config.isDebug){var _1c4=arguments.callee._ach||(arguments.callee._ach={}),_1c5=(arguments.callee.caller||"unknown caller").toString();if(!_1c4[_1c5]){dojo.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_1c5,"","2.0");_1c4[_1c5]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},get:function(name){var _1c6=this._getAttrNames(name);return this[_1c6.g]?this[_1c6.g]():this[name];},set:function(name,_1c7){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _1c8=this._getAttrNames(name);if(this[_1c8.s]){var _1c9=this[_1c8.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(name in this.attributeMap){this._attrToDom(name,_1c7);}var _1ca=this[name];this[name]=_1c7;}return _1c9||this;},_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(){return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];},getChildren:function(){return this.containerNode?dijit.findWidgets(this.containerNode):[];},nodesWithKeyClick:["input","button"],connect:function(obj,_1cb,_1cc){var d=dojo,dc=d._connect,_1cd=[];if(_1cb=="ondijitclick"){if(dojo.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){var m=d.hitch(this,_1cc);_1cd.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=e.target;e.preventDefault();}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=null;return m(e);}}));}_1cb="onclick";}_1cd.push(dc(obj,_1cb,this,_1cc));this._connects.push(_1cd);return _1cd;},disconnect:function(_1ce){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_1ce){dojo.forEach(_1ce,dojo.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_1cf,_1d0){var d=dojo,_1d1=d.subscribe(_1cf,this,_1d0);this._subscribes.push(_1d1);return _1d1;},unsubscribe:function(_1d2){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_1d2){dojo.unsubscribe(_1d2);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_1d3,_1d4){if(_1d3.declaredClass&&_1d3.addChild){_1d3.addChild(this,_1d4);}else{dojo.place(this.domNode,_1d3,_1d4);}return this;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});})();}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(_1d5,map,_1d6,_1d7){_1d7=_1d7||dojo.global;_1d6=_1d6?dojo.hitch(_1d7,_1d6):function(v){return v;};return _1d5.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_1d8,key,_1d9){var _1da=dojo.getObject(key,false,map);if(_1d9){_1da=dojo.getObject(_1d9,false,_1d7).call(_1d7,_1da,key);}return _1d6(_1da,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(_1db,_1dc){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 _1dd=dojo.date.stamp._isoRegExp.exec(_1db),_1de=null;if(_1dd){_1dd.shift();if(_1dd[1]){_1dd[1]--;}if(_1dd[6]){_1dd[6]*=1000;}if(_1dc){_1dc=new Date(_1dc);dojo.forEach(dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _1dc["get"+prop]();}),function(_1df,_1e0){_1dd[_1e0]=_1dd[_1e0]||_1df;});}_1de=new Date(_1dd[0]||1970,_1dd[1]||0,_1dd[2]||1,_1dd[3]||0,_1dd[4]||0,_1dd[5]||0,_1dd[6]||0);if(_1dd[0]<100){_1de.setFullYear(_1dd[0]||1970);}var _1e1=0,_1e2=_1dd[7]&&_1dd[7].charAt(0);if(_1e2!="Z"){_1e1=((_1dd[8]||0)*60)+(Number(_1dd[9])||0);if(_1e2!="-"){_1e1*=-1;}}if(_1e2){_1e1-=_1de.getTimezoneOffset();}if(_1e1){_1de.setTime(_1de.getTime()+_1e1*60000);}}return _1de;};dojo.date.stamp.toISOString=function(_1e3,_1e4){var _1e5=function(n){return (n<10)?"0"+n:n;};_1e4=_1e4||{};var _1e6=[],_1e7=_1e4.zulu?"getUTC":"get",date="";if(_1e4.selector!="time"){var year=_1e3[_1e7+"FullYear"]();date=["0000".substr((year+"").length)+year,_1e5(_1e3[_1e7+"Month"]()+1),_1e5(_1e3[_1e7+"Date"]())].join("-");}_1e6.push(date);if(_1e4.selector!="date"){var time=[_1e5(_1e3[_1e7+"Hours"]()),_1e5(_1e3[_1e7+"Minutes"]()),_1e5(_1e3[_1e7+"Seconds"]())].join(":");var _1e8=_1e3[_1e7+"Milliseconds"]();if(_1e4.milliseconds){time+="."+(_1e8<100?"0":"")+_1e5(_1e8);}if(_1e4.zulu){time+="Z";}else{if(_1e4.selector!="time"){var _1e9=_1e3.getTimezoneOffset();var _1ea=Math.abs(_1e9);time+=(_1e9>0?"-":"+")+_1e5(Math.floor(_1ea/60))+":"+_1e5(_1ea%60);}}_1e6.push(time);}return _1e6.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");new Date("X");dojo.parser=new function(){var d=dojo;this._attrName=d._scopeName+"Type";this._query="["+this._attrName+"]";function _1eb(_1ec){if(d.isString(_1ec)){return "string";}if(typeof _1ec=="number"){return "number";}if(typeof _1ec=="boolean"){return "boolean";}if(d.isFunction(_1ec)){return "function";}if(d.isArray(_1ec)){return "array";}if(_1ec instanceof Date){return "date";}if(_1ec instanceof d._Url){return "url";}return "object";};function _1ed(_1ee,type){switch(type){case "string":return _1ee;case "number":return _1ee.length?Number(_1ee):NaN;case "boolean":return typeof _1ee=="boolean"?_1ee:!(_1ee.toLowerCase()=="false");case "function":if(d.isFunction(_1ee)){_1ee=_1ee.toString();_1ee=d.trim(_1ee.substring(_1ee.indexOf("{")+1,_1ee.length-1));}try{if(_1ee===""||_1ee.search(/[^\w\.]+/i)!=-1){return new Function(_1ee);}else{return d.getObject(_1ee,false)||new Function(_1ee);}}catch(e){return new Function();}case "array":return _1ee?_1ee.split(/\s*,\s*/):[];case "date":switch(_1ee){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_1ee);}case "url":return d.baseUrl+_1ee;default:return d.fromJson(_1ee);}};var _1ef={};dojo.connect(dojo,"extend",function(){_1ef={};});function _1f0(_1f1){if(!_1ef[_1f1]){var cls=d.getObject(_1f1);if(!cls){return null;}var _1f2=cls.prototype;var _1f3={},_1f4={};for(var name in _1f2){if(name.charAt(0)=="_"){continue;}if(name in _1f4){continue;}var _1f5=_1f2[name];_1f3[name]=_1eb(_1f5);}_1ef[_1f1]={cls:cls,params:_1f3};}return _1ef[_1f1];};this._functionFromScript=function(_1f6){var _1f7="";var _1f8="";var _1f9=_1f6.getAttribute("args");if(_1f9){d.forEach(_1f9.split(/\s*,\s*/),function(part,idx){_1f7+="var "+part+" = arguments["+idx+"]; ";});}var _1fa=_1f6.getAttribute("with");if(_1fa&&_1fa.length){d.forEach(_1fa.split(/\s*,\s*/),function(part){_1f7+="with("+part+"){";_1f8+="}";});}return new Function(_1f7+_1f6.innerHTML+_1f8);};this.instantiate=function(_1fb,_1fc,args){var _1fd=[],dp=dojo.parser;_1fc=_1fc||{};args=args||{};d.forEach(_1fb,function(obj){if(!obj){return;}var node,type,_1fe,_1ff,_200;if(obj.node){node=obj.node;type=obj.type;_1fe=obj.clsInfo||(type&&_1f0(type));_1ff=_1fe&&_1fe.cls;_200=obj.scripts;}else{node=obj;type=dp._attrName in _1fc?_1fc[dp._attrName]:node.getAttribute(dp._attrName);_1fe=type&&_1f0(type);_1ff=_1fe&&_1fe.cls;_200=(_1ff&&(_1ff._noScript||_1ff.prototype._noScript)?[]:d.query("> script[type^='dojo/']",node));}if(!_1fe){throw new Error("Could not load class '"+type);}var _201={},_202=node.attributes;if(args.defaults){dojo.mixin(_201,args.defaults);}if(obj.inherited){dojo.mixin(_201,obj.inherited);}for(var name in _1fe.params){var item=name in _1fc?{value:_1fc[name],specified:true}:_202.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _203=item.value;switch(name){case "class":_203="className" in _1fc?_1fc.className:node.className;break;case "style":_203="style" in _1fc?_1fc.style:(node.style&&node.style.cssText);}var _204=_1fe.params[name];if(typeof _203=="string"){_201[name]=_1ed(_203,_204);}else{_201[name]=_203;}}var _205=[],_206=[];d.forEach(_200,function(_207){node.removeChild(_207);var _208=_207.getAttribute("event"),type=_207.getAttribute("type"),nf=d.parser._functionFromScript(_207);if(_208){if(type=="dojo/connect"){_205.push({event:_208,func:nf});}else{_201[_208]=nf;}}else{_206.push(nf);}});var _209=_1ff.markupFactory||_1ff.prototype&&_1ff.prototype.markupFactory;var _20a=_209?_209(_201,node,_1ff):new _1ff(_201,node);_1fd.push(_20a);var _20b=node.getAttribute("jsId");if(_20b){d.setObject(_20b,_20a);}d.forEach(_205,function(_20c){d.connect(_20a,_20c.event,null,_20c.func);});d.forEach(_206,function(func){func.call(_20a);});});if(!_1fc._started){d.forEach(_1fd,function(_20d){if(!args.noStart&&_20d&&_20d.startup&&!_20d._started&&(!_20d.getParent||!_20d.getParent())){_20d.startup();}});}return _1fd;};this.parse=function(_20e,args){var root;if(!args&&_20e&&_20e.rootNode){args=_20e;root=args.rootNode;}else{root=_20e;}var _20f=this._attrName;function scan(_210,list){var _211=dojo.clone(_210.inherited);dojo.forEach(["dir","lang"],function(name){var val=_210.node.getAttribute(name);if(val){_211[name]=val;}});var _212=_210.scripts;var _213=!_210.clsInfo||!_210.clsInfo.cls.prototype.stopParser;for(var _214=_210.node.firstChild;_214;_214=_214.nextSibling){if(_214.nodeType==1){var type=_213&&_214.getAttribute(_20f);if(type){var _215={"type":type,clsInfo:_1f0(type),node:_214,scripts:[],inherited:_211};list.push(_215);scan(_215,list);}else{if(_212&&_214.nodeName.toLowerCase()=="script"){type=_214.getAttribute("type");if(type&&/^dojo\//i.test(type)){_212.push(_214);}}else{if(_213){scan({node:_214,inherited:_211},list);}}}}}};var list=[];scan({node:root?dojo.byId(root):dojo.body(),inherited:(args&&args.inherited)||{dir:dojo._isBodyLtr()?"ltr":"rtl"}},list);return this.instantiate(list,null,args);};}();(function(){var _216=function(){if(dojo.config.parseOnLoad){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_216);}else{dojo._loaders.unshift(_216);}})();}if(!dojo._hasResource["dojo.cache"]){dojo._hasResource["dojo.cache"]=true;dojo.provide("dojo.cache");(function(){var _217={};dojo.cache=function(_218,url,_219){if(typeof _218=="string"){var _21a=dojo.moduleUrl(_218,url);}else{_21a=_218;_219=url;}var key=_21a.toString();var val=_219;if(_219!=undefined&&!dojo.isString(_219)){val=("value" in _219?_219.value:undefined);}var _21b=_219&&_219.sanitize?true:false;if(typeof val=="string"){val=_217[key]=_21b?dojo.cache._sanitize(val):val;}else{if(val===null){delete _217[key];}else{if(!(key in _217)){val=dojo._getText(key);_217[key]=_21b?dojo.cache._sanitize(val):val;}val=_217[key];}}return val;};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _21c=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_21c){val=_21c[1];}}else{val="";}return val;};})();}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,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];},_stringRepl:function(tmpl){var _21d=this.declaredClass,_21e=this;return dojo.string.substitute(tmpl,this,function(_21f,key){if(key.charAt(0)=="!"){_21f=dojo.getObject(key.substr(1),false,_21e);}if(typeof _21f=="undefined"){throw new Error(_21d+" template:"+key);}if(_21f==null){return "";}return key.charAt(0)=="!"?_21f:_21f.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _220=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_220)){node=dojo._toDom(this._stringRepl(_220));if(node.nodeType!=1){throw new Error("Invalid template: "+_220);}}else{node=_220.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _221=dojo.parser,qry,attr;if(_221._query!="[dojoType]"){qry=_221._query;attr=_221._attrName;_221._query="[dojoType]";_221._attrName="dojoType";}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}}));if(qry){_221._query=qry;_221._attrName=attr;}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_222){var dest=this.containerNode;if(_222&&dest){while(_222.hasChildNodes()){dest.appendChild(_222.firstChild);}}},_attachTemplateNodes:function(_223,_224){_224=_224||function(n,p){return n.getAttribute(p);};var _225=dojo.isArray(_223)?_223:(_223.all||_223.getElementsByTagName("*"));var x=dojo.isArray(_223)?0:-1;for(;x<_225.length;x++){var _226=(x==-1)?_223:_225[x];if(this.widgetsInTemplate&&_224(_226,"dojoType")){continue;}var _227=_224(_226,"dojoAttachPoint");if(_227){var _228,_229=_227.split(/\s*,\s*/);while((_228=_229.shift())){if(dojo.isArray(this[_228])){this[_228].push(_226);}else{this[_228]=_226;}this._attachPoints.push(_228);}}var _22a=_224(_226,"dojoAttachEvent");if(_22a){var _22b,_22c=_22a.split(/\s*,\s*/);var trim=dojo.trim;while((_22b=_22c.shift())){if(_22b){var _22d=null;if(_22b.indexOf(":")!=-1){var _22e=_22b.split(":");_22b=trim(_22e[0]);_22d=trim(_22e[1]);}else{_22b=trim(_22b);}if(!_22d){_22d=_22b;}this.connect(_226,_22b,_22d);}}}var role=_224(_226,"waiRole");if(role){dijit.setWaiRole(_226,role);}var _22f=_224(_226,"waiState");if(_22f){dojo.forEach(_22f.split(/\s*,\s*/),function(_230){if(_230.indexOf("-")!=-1){var pair=_230.split("-");dijit.setWaiState(_226,pair[0],pair[1]);}});}}},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){dojo.forEach(this._attachPoints,function(_231){delete this[_231];},this);this._attachPoints=[];this.inherited(arguments);}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_232,_233,_234){var _235=dijit._Templated._templateCache;var key=_233||_232;var _236=_235[key];if(_236){try{if(!_236.ownerDocument||_236.ownerDocument==dojo.doc){return _236;}}catch(e){}dojo.destroy(_236);}if(!_233){_233=dojo.cache(_232,{sanitize:true});}_233=dojo.string.trim(_233);if(_234||_233.match(/\$\{([^\}]+)\}/g)){return (_235[key]=_233);}else{var node=dojo._toDom(_233);if(node.nodeType!=1){throw new Error("Invalid template: "+_233);}return (_235[key]=node);}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _237=dijit._Templated._templateCache;for(var key in _237){var _238=_237[key];if(typeof _238=="object"){dojo.destroy(_238);}delete _237[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 _239=new dojox.dtl._Context(this);if(!this._created){delete _239._getter;}var _23a=dojo._toDom(this._template.render(_239));if(_23a.nodeType!==1&&_23a.nodeType!==3){for(var i=0,l=_23a.childNodes.length;i<l;++i){node=_23a.childNodes[i];if(node.nodeType==1){break;}}}else{node=_23a;}}this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _23b=dojo.parser,qry,attr;if(_23b._query!="[dojoType]"){qry=_23b._query;attr=_23b._attrName;_23b._query="[dojoType]";_23b._attrName="dojoType";}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}}));if(qry){_23b._query=qry;_23b._attrName=attr;}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,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(_23c,_23d,_23e){var _23f=this._templateCache;var key=_23d||_23c;if(_23f[key]){return _23f[key];}_23d=dojo.string.trim(_23d||dojo.cache(_23c,{sanitize:true}));if(this._dijitTemplateCompat&&(_23e||_23d.match(/\$\{([^\}]+)\}/g))){_23d=this._stringRepl(_23d);}if(_23e||!_23d.match(/\{[{%]([^\}]+)[%}]\}/g)){return _23f[key]=dojo._toDom(_23d);}else{return _23f[key]=new dojox.dtl.Template(_23d);}},render:function(){this.buildRendering();},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);}});}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(_240,_241,_242,type){this.bools=_240;this.trues=_241;this.falses=_242;this.type=type;},{render:function(_243,_244){var i,bool,_245,_246,_247;if(this.type=="or"){for(i=0;bool=this.bools[i];i++){_245=bool[0];_246=bool[1];_247=_246.resolve(_243);if((_247&&!_245)||(_245&&!_247)){if(this.falses){_244=this.falses.unrender(_243,_244);}return (this.trues)?this.trues.render(_243,_244,this):_244;}}if(this.trues){_244=this.trues.unrender(_243,_244);}return (this.falses)?this.falses.render(_243,_244,this):_244;}else{for(i=0;bool=this.bools[i];i++){_245=bool[0];_246=bool[1];_247=_246.resolve(_243);if(_247==_245){if(this.trues){_244=this.trues.unrender(_243,_244);}return (this.falses)?this.falses.render(_243,_244,this):_244;}}if(this.falses){_244=this.falses.unrender(_243,_244);}return (this.trues)?this.trues.render(_243,_244,this):_244;}return _244;},unrender:function(_248,_249){_249=(this.trues)?this.trues.unrender(_248,_249):_249;_249=(this.falses)?this.falses.unrender(_248,_249):_249;return _249;},clone:function(_24a){var _24b=(this.trues)?this.trues.clone(_24a):null;var _24c=(this.falses)?this.falses.clone(_24a):null;return new this.constructor(this.bools,_24b,_24c,this.type);}});ddtl.IfEqualNode=dojo.extend(function(var1,var2,_24d,_24e,_24f){this.var1=new dd._Filter(var1);this.var2=new dd._Filter(var2);this.trues=_24d;this.falses=_24e;this.negate=_24f;},{render:function(_250,_251){var var1=this.var1.resolve(_250);var var2=this.var2.resolve(_250);var1=(typeof var1!="undefined")?var1:"";var2=(typeof var1!="undefined")?var2:"";if((this.negate&&var1!=var2)||(!this.negate&&var1==var2)){if(this.falses){_251=this.falses.unrender(_250,_251,this);}return (this.trues)?this.trues.render(_250,_251,this):_251;}if(this.trues){_251=this.trues.unrender(_250,_251,this);}return (this.falses)?this.falses.render(_250,_251,this):_251;},unrender:function(_252,_253){return ddtl.IfNode.prototype.unrender.call(this,_252,_253);},clone:function(_254){var _255=this.trues?this.trues.clone(_254):null;var _256=this.falses?this.falses.clone(_254):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_255,_256,this.negate);}});ddtl.ForNode=dojo.extend(function(_257,loop,_258,_259){this.assign=_257;this.loop=new dd._Filter(loop);this.reversed=_258;this.nodelist=_259;this.pool=[];},{render:function(_25a,_25b){var i,j,k;var _25c=false;var _25d=this.assign;for(k=0;k<_25d.length;k++){if(typeof _25a[_25d[k]]!="undefined"){_25c=true;_25a=_25a.push();break;}}if(!_25c&&_25a.forloop){_25c=true;_25a=_25a.push();}var _25e=this.loop.resolve(_25a)||[];for(i=_25e.length;i<this.pool.length;i++){this.pool[i].unrender(_25a,_25b,this);}if(this.reversed){_25e=_25e.slice(0).reverse();}var _25f=dojo.isObject(_25e)&&!dojo.isArrayLike(_25e);var _260=[];if(_25f){for(var key in _25e){_260.push(_25e[key]);}}else{_260=_25e;}var _261=_25a.forloop={parentloop:_25a.get("forloop",{})};var j=0;for(i=0;i<_260.length;i++){var item=_260[i];_261.counter0=j;_261.counter=j+1;_261.revcounter0=_260.length-j-1;_261.revcounter=_260.length-j;_261.first=!j;_261.last=(j==_260.length-1);if(_25d.length>1&&dojo.isArrayLike(item)){if(!_25c){_25c=true;_25a=_25a.push();}var _262={};for(k=0;k<item.length&&k<_25d.length;k++){_262[_25d[k]]=item[k];}dojo.mixin(_25a,_262);}else{_25a[_25d[0]]=item;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_25b));}_25b=this.pool[j++].render(_25a,_25b,this);}delete _25a.forloop;if(_25c){_25a=_25a.pop();}else{for(k=0;k<_25d.length;k++){delete _25a[_25d[k]];}}return _25b;},unrender:function(_263,_264){for(var i=0,pool;pool=this.pool[i];i++){_264=pool.unrender(_263,_264);}return _264;},clone:function(_265){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_265));}});dojo.mixin(ddtl,{if_:function(_266,_267){var i,part,type,_268=[],_269=_267.contents.split();_269.shift();_267=_269.join(" ");_269=_267.split(" and ");if(_269.length==1){type="or";_269=_267.split(" or ");}else{type="and";for(i=0;i<_269.length;i++){if(_269[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;part=_269[i];i++){var not=false;if(part.indexOf("not ")==0){part=part.slice(4);not=true;}_268.push([not,new dd._Filter(part)]);}var _26a=_266.parse(["else","endif"]);var _26b=false;var _267=_266.next_token();if(_267.contents=="else"){_26b=_266.parse(["endif"]);_266.next_token();}return new ddtl.IfNode(_268,_26a,_26b,type);},_ifequal:function(_26c,_26d,_26e){var _26f=_26d.split_contents();if(_26f.length!=3){throw new Error(_26f[0]+" takes two arguments");}var end="end"+_26f[0];var _270=_26c.parse(["else",end]);var _271=false;var _26d=_26c.next_token();if(_26d.contents=="else"){_271=_26c.parse([end]);_26c.next_token();}return new ddtl.IfEqualNode(_26f[1],_26f[2],_270,_271,_26e);},ifequal:function(_272,_273){return ddtl._ifequal(_272,_273);},ifnotequal:function(_274,_275){return ddtl._ifequal(_274,_275,true);},for_:function(_276,_277){var _278=_277.contents.split();if(_278.length<4){throw new Error("'for' statements should have at least four words: "+_277.contents);}var _279=_278[_278.length-1]=="reversed";var _27a=(_279)?-3:-2;if(_278[_278.length+_27a]!="in"){throw new Error("'for' tag received an invalid argument: "+_277.contents);}var _27b=_278.slice(1,_27a).join(" ").split(/ *, */);for(var i=0;i<_27b.length;i++){if(!_27b[i]||_27b[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_277.contents);}}var _27c=_276.parse(["endfor"]);_276.next_token();return new ddtl.ForNode(_27b,_278[_278.length+_27a+1],_279,_27c);}});})();}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(_27d){_27d=_27d||{};dojo.mixin(this,_27d);this.init();},init:function(){this.menu=dojo.byId(this.node);if(!this.menu){return;}this.menu_opts=dojo.query(this.menuCssSelector,this.menu)[0];if(dojo.isIE){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(_27e){dojo.mixin(this,_27e);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(_27f){var _280={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(_280,_27f);var _281=window.open(_280.url,_280.name,"toolbar="+_280.toolbar+","+"location="+_280.location+","+"status="+_280.status+","+"resizable="+_280.resizable+","+"copyhistory="+_280.copyhistory+","+"width="+_280.width+","+"height="+_280.height+","+"scrollbars="+_280.scrollbars);return _281;};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(_282){settings={url:ahost+"/feedback",name:"pwfeedback",width:610,height:580,scrollbars:"yes"};dojo.mixin(settings,_282);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(_283){settings={name:"pwlargepreview",width:950,height:600,resizable:1,toolbar:0,location:0,scrollbars:1};dojo.mixin(settings,_283);pw.popup.open(settings);return false;};pw.popup.picad=function(){settings={url:ahost+"/header/picasaad",name:"picad",width:326,height:210,scrollbars:"no"};pw.popup.open(settings);return false;};pw.popup.currentCouponCodes=function(){settings={url:ahost+"/coupons/coupon-codes-pop",name:"pwcouponcodes",width:730,height:590,scrollbars:"yes"};pw.popup.open(settings);return false;};pw.popup.holidayshippingpop=function(){settings={url:ahost+"/shipping/holiday-pop",name:"pwholidayshipping",width:700,height:590,scrollbars:"yes"};pw.popup.open(settings);return false;};pw.popup.learnAboutPaypal=function(){pw.popup.open({url:ahost+"/checkout/paypal-pop",width:480,height:100});return false;};pw.popup.closeAndGo=function(url){window.opener.location.href=url;window.close();};}if(!dojo._hasResource["dojo.io.iframe"]){dojo._hasResource["dojo.io.iframe"]=true;dojo.provide("dojo.io.iframe");dojo.io.iframe={create:function(_284,_285,uri){if(window[_284]){return window[_284];}if(window.frames[_284]){return window.frames[_284];}var _286=null;var turi=uri;if(!turi){if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){}turi=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));}var _287=dojo.isIE?"<iframe name=\""+_284+"\" src=\""+turi+"\" onload=\""+_285+"\">":"iframe";_286=dojo.doc.createElement(_287);with(_286){name=_284;setAttribute("name",_284);id=_284;}dojo.body().appendChild(_286);window[_284]=_286;with(_286.style){if(!(dojo.isSafari<3)){position="absolute";}left=top="1px";height=width="1px";visibility="hidden";}if(!dojo.isIE){this.setSrc(_286,turi,true);_286.onload=new Function(_285);}return _286;},setSrc:function(_288,src,_289){try{if(!_289){if(dojo.isWebKit){_288.location=src;}else{frames[_288.name].location=src;}}else{var idoc;if(dojo.isIE||dojo.isWebKit>521){idoc=_288.contentWindow.document;}else{if(dojo.isSafari){idoc=_288.document;}else{idoc=_288.contentWindow;}}if(!idoc){_288.location=src;return;}else{idoc.location.replace(src);}}}catch(e){}},doc:function(_28a){var doc=_28a.contentDocument||(((_28a.name)&&(_28a.document)&&(dojo.doc.getElementsByTagName("iframe")[_28a.name].contentWindow)&&(dojo.doc.getElementsByTagName("iframe")[_28a.name].contentWindow.document)))||((_28a.name)&&(dojo.doc.frames[_28a.name])&&(dojo.doc.frames[_28a.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 _28b=null;try{var _28c=dfd.ioArgs;var dii=dojo.io.iframe;var ifd=dii.doc(dii._frame);var _28d=_28c.handleAs;_28b=ifd;if(_28d!="html"){if(_28d=="xml"){if(dojo.isIE){dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _28e=(dii._frame.contentWindow.document).documentElement.innerText;_28e=_28e.replace(/>\s+</g,"><");_28e=dojo.trim(_28e);var _28f={responseText:_28e};_28b=dojo._contentHandlers["xml"](_28f);}}else{_28b=ifd.getElementsByTagName("textarea")[0].value;if(_28d=="json"){_28b=dojo.fromJson(_28b);}else{if(_28d=="javascript"){_28b=dojo.eval(_28b);}}}}}catch(e){_28b=e;}finally{_28c._callNext();}return _28b;},function(_290,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _290;});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;}do{var dfd=this._currentDfd=this._dfdQueue.shift();}while(dfd&&dfd.canceled&&this._dfdQueue.length);if(!dfd||dfd.canceled){this._currentDfd=null;return;}var _291=dfd.ioArgs;var args=_291.args;_291._contentToClean=[];var fn=dojo.byId(args["form"]);var _292=args["content"]||{};if(fn){if(_292){var _293=function(name,_294){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=_294;fn.appendChild(tn);_291._contentToClean.push(name);};for(var x in _292){var val=_292[x];if(dojo.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_293(x,val[i]);}}else{if(!fn[x]){_293(x,val);}else{fn[x].value=val;}}}}var _295=fn.getAttributeNode("action");var _296=fn.getAttributeNode("method");var _297=fn.getAttributeNode("target");if(args["url"]){_291._originalAction=_295?_295.value:null;if(_295){_295.value=args.url;}else{fn.setAttribute("action",args.url);}}if(!_296||!_296.value){if(_296){_296.value=(args["method"])?args["method"]:"post";}else{fn.setAttribute("method",(args["method"])?args["method"]:"post");}}_291._originalTarget=_297?_297.value:null;if(_297){_297.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;dojo._ioNotifyStart(dfd);fn.submit();}else{var _298=args.url+(args.url.indexOf("?")>-1?"&":"?")+_291.query;dojo._ioNotifyStart(dfd);this.setSrc(this._frame,_298,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _299=dfd.ioArgs;var args=_299.args;var _29a=dojo.byId(args.form);if(_29a){var _29b=_299._contentToClean;for(var i=0;i<_29b.length;i++){var key=_29b[i];for(var j=0;j<_29a.childNodes.length;j++){var _29c=_29a.childNodes[j];if(_29c.name==key){dojo.destroy(_29c);break;}}}if(_299["_originalAction"]){_29a.setAttribute("action",_299._originalAction);}if(_299["_originalTarget"]){_29a.setAttribute("target",_299._originalTarget);_29a.target=_299._originalTarget;}}_299._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,_29d){if(typeof _29d=="undefined"){var _29d={};}if(typeof _29d.load=="undefined"){_29d.load="void";}if(typeof _29d.error=="undefined"){_29d.error="void";}if(typeof _29d.timeout=="undefined"){_29d.timeout=60;}_29d.timeout=_29d.timeout*1000;var form=dojo.byId(form);var _29e=new Date().getTime();if(window.location.href.indexOf(shost)==0){var _29f="securecallback"+_29e;}else{if(window.location.href.indexOf(khost)==0){var _29f="cachecallback"+_29e;}else{var _29f="callback"+_29e;}}var _2a0="error"+_29e;var _2a1="pw.io.iframe.timeout"+_29e;pw.io.iframe[_2a0]=function(_2a2){pw.io.iframe[_29f]=function(){};var _2a3=pw.io.iframe._get_function(_2a2);_2a3();};_2a1=setTimeout("pw.io.iframe."+_2a0+"('"+_29d.error+"')",_29d.timeout);_29d.error="pw.io.iframe."+_2a0;pw.io.iframe[_29f]=function(_2a4){clearTimeout(_2a1);var _2a5=pw.io.iframe._get_function(_29d.load);_2a5(_2a4);};_29d.callback="pw.io.iframe."+_29f;_29d.cachebust=_29e;var _2a6=dojo.query(".pw-callback",form);if(_2a6!=null){_2a6=_2a6[0];}if((_2a6==null)||(typeof _2a6=="undefined")){var _2a6=dojo.create("input",{className:"pw-callback",id:"pw-callback",type:"hidden",name:"callback"},form);}_2a6.value=_29d.callback;var _2a7=dojo.io.iframe.send({url:form.action,method:form.method,form:form,handleAs:"html"});},_get_function:function(str){var _2a8=window;if(str.indexOf(".")==-1){return _2a8[str];}var _2a9=str.split(".");for(var i=0;i<_2a9.length;i++){_2a8=_2a8[_2a9[i]];}return _2a8;}};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_2aa){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_2aa&&_2aa.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_2ab){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("|"),_2ab);};dojo.regexp.group=function(_2ac,_2ad){return "("+(_2ad?"?:":"")+_2ac+")";};}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_2ae,_2af,_2b0){_2b0=dojo.i18n.normalizeLocale(_2b0);var _2b1=_2b0.split("-");var _2b2=[_2ae,"nls",_2af].join(".");var _2b3=dojo._loadedModules[_2b2];if(_2b3){var _2b4;for(var i=_2b1.length;i>0;i--){var loc=_2b1.slice(0,i).join("_");if(_2b3[loc]){_2b4=_2b3[loc];break;}}if(!_2b4){_2b4=_2b3.ROOT;}if(_2b4){var _2b5=function(){};_2b5.prototype=_2b4;return new _2b5();}}throw new Error("Bundle not found: "+_2af+" in "+_2ae+" , locale="+_2b0);};dojo.i18n.normalizeLocale=function(_2b6){var _2b7=_2b6?_2b6.toLowerCase():dojo.locale;if(_2b7=="root"){_2b7="ROOT";}return _2b7;};dojo.i18n._requireLocalization=function(_2b8,_2b9,_2ba,_2bb){var _2bc=dojo.i18n.normalizeLocale(_2ba);var _2bd=[_2b8,"nls",_2b9].join(".");var _2be="";if(_2bb){var _2bf=_2bb.split(",");for(var i=0;i<_2bf.length;i++){if(_2bc["indexOf"](_2bf[i])==0){if(_2bf[i].length>_2be.length){_2be=_2bf[i];}}}if(!_2be){_2be="ROOT";}}var _2c0=_2bb?_2be:_2bc;var _2c1=dojo._loadedModules[_2bd];var _2c2=null;if(_2c1){if(dojo.config.localizationComplete&&_2c1._built){return;}var _2c3=_2c0.replace(/-/g,"_");var _2c4=_2bd+"."+_2c3;_2c2=dojo._loadedModules[_2c4];}if(!_2c2){_2c1=dojo["provide"](_2bd);var syms=dojo._getModuleSymbols(_2b8);var _2c5=syms.concat("nls").join("/");var _2c6;dojo.i18n._searchLocalePath(_2c0,_2bb,function(loc){var _2c7=loc.replace(/-/g,"_");var _2c8=_2bd+"."+_2c7;var _2c9=false;if(!dojo._loadedModules[_2c8]){dojo["provide"](_2c8);var _2ca=[_2c5];if(loc!="ROOT"){_2ca.push(loc);}_2ca.push(_2b9);var _2cb=_2ca.join("/")+".js";_2c9=dojo._loadPath(_2cb,null,function(hash){var _2cc=function(){};_2cc.prototype=_2c6;_2c1[_2c7]=new _2cc();for(var j in hash){_2c1[_2c7][j]=hash[j];}});}else{_2c9=true;}if(_2c9&&_2c1[_2c7]){_2c6=_2c1[_2c7];}else{_2c1[_2c7]=_2c6;}if(_2bb){return true;}});}if(_2bb&&_2bc!=_2be){_2c1[_2bc.replace(/-/g,"_")]=_2c1[_2be.replace(/-/g,"_")];}};(function(){var _2cd=dojo.config.extraLocale;if(_2cd){if(!_2cd instanceof Array){_2cd=[_2cd];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_2ce,_2cf){req(m,b,_2ce,_2cf);if(_2ce){return;}for(var i=0;i<_2cd.length;i++){req(m,b,_2cd[i],_2cf);}};}})();dojo.i18n._searchLocalePath=function(_2d0,down,_2d1){_2d0=dojo.i18n.normalizeLocale(_2d0);var _2d2=_2d0.split("-");var _2d3=[];for(var i=_2d2.length;i>0;i--){_2d3.push(_2d2.slice(0,i).join("-"));}_2d3.push(false);if(down){_2d3.reverse();}for(var j=_2d3.length-1;j>=0;j--){var loc=_2d3[j]||"ROOT";var stop=_2d1(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_2d4,_2d5){function _2d6(_2d7){_2d7=dojo.i18n.normalizeLocale(_2d7);dojo.i18n._searchLocalePath(_2d7,true,function(loc){for(var i=0;i<_2d5.length;i++){if(_2d5[i]==loc){dojo["require"](_2d4+"_"+loc);return true;}}return false;});};_2d6();var _2d8=dojo.config.extraLocale||[];for(var i=0;i<_2d8.length;i++){_2d6(_2d8[i]);}};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_2d9,_2da){_2da=dojo.mixin({},_2da||{});var _2db=dojo.i18n.normalizeLocale(_2da.locale),_2dc=dojo.i18n.getLocalization("dojo.cldr","number",_2db);_2da.customs=_2dc;var _2dd=_2da.pattern||_2dc[(_2da.type||"decimal")+"Format"];if(isNaN(_2d9)||Math.abs(_2d9)==Infinity){return null;}return dojo.number._applyPattern(_2d9,_2dd,_2da);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_2de,_2df,_2e0){_2e0=_2e0||{};var _2e1=_2e0.customs.group,_2e2=_2e0.customs.decimal,_2e3=_2df.split(";"),_2e4=_2e3[0];_2df=_2e3[(_2de<0)?1:0]||("-"+_2e4);if(_2df.indexOf("%")!=-1){_2de*=100;}else{if(_2df.indexOf("‰")!=-1){_2de*=1000;}else{if(_2df.indexOf("¤")!=-1){_2e1=_2e0.customs.currencyGroup||_2e1;_2e2=_2e0.customs.currencyDecimal||_2e2;_2df=_2df.replace(/\u00a4{1,3}/,function(_2e5){var prop=["symbol","currency","displayName"][_2e5.length-1];return _2e0[prop]||_2e0.currency||"";});}else{if(_2df.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _2e6=dojo.number._numberPatternRE;var _2e7=_2e4.match(_2e6);if(!_2e7){throw new Error("unable to find a number expression in pattern: "+_2df);}if(_2e0.fractional===false){_2e0.places=0;}return _2df.replace(_2e6,dojo.number._formatAbsolute(_2de,_2e7[0],{decimal:_2e2,group:_2e1,places:_2e0.places,round:_2e0.round}));};dojo.number.round=function(_2e8,_2e9,_2ea){var _2eb=10/(_2ea||10);return (_2eb*+_2e8).toFixed(_2e9)/_2eb;};if((0.9).toFixed()==0){(function(){var _2ec=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 _2ec(v,p,m)+(v>0?d:-d);};})();}dojo.number._formatAbsolute=function(_2ed,_2ee,_2ef){_2ef=_2ef||{};if(_2ef.places===true){_2ef.places=0;}if(_2ef.places===Infinity){_2ef.places=6;}var _2f0=_2ee.split("."),_2f1=typeof _2ef.places=="string"&&_2ef.places.indexOf(","),_2f2=_2ef.places;if(_2f1){_2f2=_2ef.places.substring(_2f1+1);}else{if(!(_2f2>=0)){_2f2=(_2f0[1]||[]).length;}}if(!(_2ef.round<0)){_2ed=dojo.number.round(_2ed,_2f2,_2ef.round);}var _2f3=String(Math.abs(_2ed)).split("."),_2f4=_2f3[1]||"";if(_2f0[1]||_2ef.places){if(_2f1){_2ef.places=_2ef.places.substring(0,_2f1);}var pad=_2ef.places!==undefined?_2ef.places:(_2f0[1]&&_2f0[1].lastIndexOf("0")+1);if(pad>_2f4.length){_2f3[1]=dojo.string.pad(_2f4,pad,"0",true);}if(_2f2<_2f4.length){_2f3[1]=_2f4.substr(0,_2f2);}}else{if(_2f3[1]){_2f3.pop();}}var _2f5=_2f0[0].replace(",","");pad=_2f5.indexOf("0");if(pad!=-1){pad=_2f5.length-pad;if(pad>_2f3[0].length){_2f3[0]=dojo.string.pad(_2f3[0],pad);}if(_2f5.indexOf("#")==-1){_2f3[0]=_2f3[0].substr(_2f3[0].length-pad);}}var _2f6=_2f0[0].lastIndexOf(","),_2f7,_2f8;if(_2f6!=-1){_2f7=_2f0[0].length-_2f6-1;var _2f9=_2f0[0].substr(0,_2f6);_2f6=_2f9.lastIndexOf(",");if(_2f6!=-1){_2f8=_2f9.length-_2f6-1;}}var _2fa=[];for(var _2fb=_2f3[0];_2fb;){var off=_2fb.length-_2f7;_2fa.push((off>0)?_2fb.substr(off):_2fb);_2fb=(off>0)?_2fb.slice(0,off):"";if(_2f8){_2f7=_2f8;delete _2f8;}}_2f3[0]=_2fa.reverse().join(_2ef.group||",");return _2f3.join(_2ef.decimal||".");};dojo.number.regexp=function(_2fc){return dojo.number._parseInfo(_2fc).regexp;};dojo.number._parseInfo=function(_2fd){_2fd=_2fd||{};var _2fe=dojo.i18n.normalizeLocale(_2fd.locale),_2ff=dojo.i18n.getLocalization("dojo.cldr","number",_2fe),_300=_2fd.pattern||_2ff[(_2fd.type||"decimal")+"Format"],_301=_2ff.group,_302=_2ff.decimal,_303=1;if(_300.indexOf("%")!=-1){_303/=100;}else{if(_300.indexOf("‰")!=-1){_303/=1000;}else{var _304=_300.indexOf("¤")!=-1;if(_304){_301=_2ff.currencyGroup||_301;_302=_2ff.currencyDecimal||_302;}}}var _305=_300.split(";");if(_305.length==1){_305.push("-"+_305[0]);}var re=dojo.regexp.buildGroupRE(_305,function(_306){_306="(?:"+dojo.regexp.escapeString(_306,".")+")";return _306.replace(dojo.number._numberPatternRE,function(_307){var _308={signed:false,separator:_2fd.strict?_301:[_301,""],fractional:_2fd.fractional,decimal:_302,exponent:false},_309=_307.split("."),_30a=_2fd.places;if(_309.length==1&&_303!=1){_309[1]="###";}if(_309.length==1||_30a===0){_308.fractional=false;}else{if(_30a===undefined){_30a=_2fd.pattern?_309[1].lastIndexOf("0")+1:Infinity;}if(_30a&&_2fd.fractional==undefined){_308.fractional=true;}if(!_2fd.places&&(_30a<_309[1].length)){_30a+=","+_309[1].length;}_308.places=_30a;}var _30b=_309[0].split(",");if(_30b.length>1){_308.groupSize=_30b.pop().length;if(_30b.length>1){_308.groupSize2=_30b.pop().length;}}return "("+dojo.number._realNumberRegexp(_308)+")";});},true);if(_304){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_30c,_30d,_30e,_30f){var prop=["symbol","currency","displayName"][_30e.length-1],_310=dojo.regexp.escapeString(_2fd[prop]||_2fd.currency||"");_30d=_30d?"[\\s\\xa0]":"";_30f=_30f?"[\\s\\xa0]":"";if(!_2fd.strict){if(_30d){_30d+="*";}if(_30f){_30f+="*";}return "(?:"+_30d+_310+_30f+")?";}return _30d+_310+_30f;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_301,decimal:_302,factor:_303};};dojo.number.parse=function(_311,_312){var info=dojo.number._parseInfo(_312),_313=(new RegExp("^"+info.regexp+"$")).exec(_311);if(!_313){return NaN;}var _314=_313[1];if(!_313[1]){if(!_313[2]){return NaN;}_314=_313[2];info.factor*=-1;}_314=_314.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _314*info.factor;};dojo.number._realNumberRegexp=function(_315){_315=_315||{};if(!("places" in _315)){_315.places=Infinity;}if(typeof _315.decimal!="string"){_315.decimal=".";}if(!("fractional" in _315)||/^0/.test(_315.places)){_315.fractional=[true,false];}if(!("exponent" in _315)){_315.exponent=[true,false];}if(!("eSigned" in _315)){_315.eSigned=[true,false];}var _316=dojo.number._integerRegexp(_315),_317=dojo.regexp.buildGroupRE(_315.fractional,function(q){var re="";if(q&&(_315.places!==0)){re="\\"+_315.decimal;if(_315.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_315.places+"}";}}return re;},true);var _318=dojo.regexp.buildGroupRE(_315.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_315.eSigned})+")";}return "";});var _319=_316+_317;if(_317){_319="(?:(?:"+_319+")|(?:"+_317+"))";}return _319+_318;};dojo.number._integerRegexp=function(_31a){_31a=_31a||{};if(!("signed" in _31a)){_31a.signed=[true,false];}if(!("separator" in _31a)){_31a.separator="";}else{if(!("groupSize" in _31a)){_31a.groupSize=3;}}var _31b=dojo.regexp.buildGroupRE(_31a.signed,function(q){return q?"[-+]":"";},true);var _31c=dojo.regexp.buildGroupRE(_31a.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_31a.groupSize,grp2=_31a.groupSize2;if(grp2){var _31d="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_31d+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_31d;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _31b+_31c;};}if(!dojo._hasResource["dojox.validate.regexp"]){dojo._hasResource["dojox.validate.regexp"]=true;dojo.provide("dojox.validate.regexp");dojo.mixin(dojox.validate.regexp,{ipAddress:function(_31e){_31e=(typeof _31e=="object")?_31e:{};if(typeof _31e.allowDottedDecimal!="boolean"){_31e.allowDottedDecimal=true;}if(typeof _31e.allowDottedHex!="boolean"){_31e.allowDottedHex=true;}if(typeof _31e.allowDottedOctal!="boolean"){_31e.allowDottedOctal=true;}if(typeof _31e.allowDecimal!="boolean"){_31e.allowDecimal=true;}if(typeof _31e.allowHex!="boolean"){_31e.allowHex=true;}if(typeof _31e.allowIPv6!="boolean"){_31e.allowIPv6=true;}if(typeof _31e.allowHybrid!="boolean"){_31e.allowHybrid=true;}var _31f="((\\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 _320="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";var _321="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";var _322="(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 _323="0[xX]0*[\\da-fA-F]{1,8}";var _324="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";var _325="([\\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(_31e.allowDottedDecimal){a.push(_31f);}if(_31e.allowDottedHex){a.push(_320);}if(_31e.allowDottedOctal){a.push(_321);}if(_31e.allowDecimal){a.push(_322);}if(_31e.allowHex){a.push(_323);}if(_31e.allowIPv6){a.push(_324);}if(_31e.allowHybrid){a.push(_325);}var _326="";if(a.length>0){_326="("+a.join("|")+")";}return _326;},host:function(_327){_327=(typeof _327=="object")?_327:{};if(typeof _327.allowIP!="boolean"){_327.allowIP=true;}if(typeof _327.allowLocal!="boolean"){_327.allowLocal=false;}if(typeof _327.allowPort!="boolean"){_327.allowPort=true;}if(typeof _327.allowNamed!="boolean"){_327.allowNamed=false;}var _328="(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)";var _329="(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)";var _32a=_327.allowPort?"(\\:\\d+)?":"";var _32b="((?:"+_328+"\\.)+"+_329+"\\.?)";if(_327.allowIP){_32b+="|"+dojox.validate.regexp.ipAddress(_327);}if(_327.allowLocal){_32b+="|localhost";}if(_327.allowNamed){_32b+="|^[^-][a-zA-Z0-9_-]*";}return "("+_32b+")"+_32a;},url:function(_32c){_32c=(typeof _32c=="object")?_32c:{};if(!("scheme" in _32c)){_32c.scheme=[true,false];}var _32d=dojo.regexp.buildGroupRE(_32c.scheme,function(q){if(q){return "(https?|ftps?)\\://";}return "";});var _32e="(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]+(?:\\?[^?#\\s/]*)?(?:#[A-Za-z][\\w.:-]*)?)?)?";return _32d+dojox.validate.regexp.host(_32c)+_32e;},emailAddress:function(_32f){_32f=(typeof _32f=="object")?_32f:{};if(typeof _32f.allowCruft!="boolean"){_32f.allowCruft=false;}_32f.allowPort=false;var _330="([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?A-Z^-~]+";var _331=_330+"@"+dojox.validate.regexp.host(_32f);if(_32f.allowCruft){_331="<?(mailto\\:)?"+_331+">?";}return _331;},emailAddressList:function(_332){_332=(typeof _332=="object")?_332:{};if(typeof _332.listSeparator!="string"){_332.listSeparator="\\s;,";}var _333=dojox.validate.regexp.emailAddress(_332);var _334="("+_333+"\\s*["+_332.listSeparator+"]\\s*)*"+_333+"\\s*["+_332.listSeparator+"]?\\s*";return _334;},numberFormat:function(_335){_335=(typeof _335=="object")?_335:{};if(typeof _335.format=="undefined"){_335.format="###-###-####";}var _336=function(_337){return dojo.regexp.escapeString(_337,"?").replace(/\?/g,"\\d?").replace(/#/g,"\\d");};return dojo.regexp.buildGroupRE(_335.format,_336);}});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(_338){_338=(typeof _338=="object")?_338:{};if(typeof _338.allowTerritories!="boolean"){_338.allowTerritories=true;}if(typeof _338.allowMilitary!="boolean"){_338.allowMilitary=true;}var _339="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 _33a="AS|FM|GU|MH|MP|PW|PR|VI";var _33b="AA|AE|AP";if(_338.allowTerritories){_339+="|"+_33a;}if(_338.allowMilitary){_339+="|"+_33b;}return "("+_339+")";}};}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(_33c,_33d){_33d=(typeof _33d=="object")?_33d:{};if(/^\s*$/.test(_33c)){return false;}if(typeof _33d.length=="number"&&_33d.length!=_33c.length){return false;}if(typeof _33d.minlength=="number"&&_33d.minlength>_33c.length){return false;}if(typeof _33d.maxlength=="number"&&_33d.maxlength<_33c.length){return false;}return true;};dojox.validate._isInRangeCache={};dojox.validate.isInRange=function(_33e,_33f){_33e=dojo.number.parse(_33e,_33f);if(isNaN(_33e)){return false;}_33f=(typeof _33f=="object")?_33f:{};var max=(typeof _33f.max=="number")?_33f.max:Infinity,min=(typeof _33f.min=="number")?_33f.min:-Infinity,dec=(typeof _33f.decimal=="string")?_33f.decimal:".",_340=dojox.validate._isInRangeCache,_341=_33e+"max"+max+"min"+min+"dec"+dec;if(typeof _340[_341]!="undefined"){return _340[_341];}_340[_341]=!(_33e<min||_33e>max);return _340[_341];};dojox.validate.isNumberFormat=function(_342,_343){var re=new RegExp("^"+dojox.validate.regexp.numberFormat(_343)+"$","i");return re.test(_342);};dojox.validate.isValidLuhn=function(_344){var sum=0,_345,_346;if(!dojo.isString(_344)){_344=String(_344);}_344=_344.replace(/[- ]/g,"");_345=_344.length%2;for(var i=0;i<_344.length;i++){_346=parseInt(_344.charAt(i));if(i%2==_345){_346*=2;}if(_346>9){_346-=9;}sum+=_346;}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,_347){var _348=[];var _349=[];var _34a={isSuccessful:function(){return (!this.hasInvalid()&&!this.hasMissing());},hasMissing:function(){return (_348.length>0);},getMissing:function(){return _348;},isMissing:function(_34b){for(var i=0;i<_348.length;i++){if(_34b==_348[i]){return true;}}return false;},hasInvalid:function(){return (_349.length>0);},getInvalid:function(){return _349;},isInvalid:function(_34c){for(var i=0;i<_349.length;i++){if(_34c==_349[i]){return true;}}return false;}};var _34d=function(name,_34e){return (typeof _34e[name]=="undefined");};if(_347.trim instanceof Array){for(var i=0;i<_347.trim.length;i++){var elem=form[_347.trim[i]];if(_34d("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/(^\s*|\s*$)/g,"");}}if(_347.uppercase instanceof Array){for(var i=0;i<_347.uppercase.length;i++){var elem=form[_347.uppercase[i]];if(_34d("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.toUpperCase();}}if(_347.lowercase instanceof Array){for(var i=0;i<_347.lowercase.length;i++){var elem=form[_347.lowercase[i]];if(_34d("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.toLowerCase();}}if(_347.ucfirst instanceof Array){for(var i=0;i<_347.ucfirst.length;i++){var elem=form[_347.ucfirst[i]];if(_34d("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(_347.digit instanceof Array){for(var i=0;i<_347.digit.length;i++){var elem=form[_347.digit[i]];if(_34d("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}elem.value=elem.value.replace(/\D/g,"");}}if(_347.required instanceof Array){for(var i=0;i<_347.required.length;i++){if(!dojo.isString(_347.required[i])){continue;}var elem=form[_347.required[i]];if(!_34d("type",elem)&&(elem.type=="text"||elem.type=="textarea"||elem.type=="password"||elem.type=="file")&&/^\s*$/.test(elem.value)){_348[_348.length]=elem.name;}else{if(!_34d("type",elem)&&(elem.type=="select-one"||elem.type=="select-multiple")&&(elem.selectedIndex==-1||/^\s*$/.test(elem.options[elem.selectedIndex].value))){_348[_348.length]=elem.name;}else{if(dojo.isArrayLike(elem)&&(elem.type!="select-one"&&elem.type!="select-multiple")){var _34f=false;for(var j=0;j<elem.length;j++){if(elem[j].checked){_34f=true;}}if(!_34f){_348[_348.length]=elem[0].name;}}}}}}if(_347.required instanceof Array){for(var i=0;i<_347.required.length;i++){if(!dojo.isObject(_347.required[i])){continue;}var elem,_350;for(var name in _347.required[i]){elem=form[name];_350=_347.required[i][name];}if(elem instanceof Array){var _34f=0;for(var j=0;j<elem.length;j++){if(elem[j].checked){_34f++;}}if(_34f<_350){_348[_348.length]=elem[0].name;}}else{if(!_34d("type",elem)&&elem.type=="select-multiple"){var _351=0;for(var j=0;j<elem.options.length;j++){if(elem.options[j].selected&&!/^\s*$/.test(elem.options[j].value)){_351++;}}if(_351<_350){_348[_348.length]=elem.name;}}}}}if(dojo.isObject(_347.dependencies)){for(name in _347.dependencies){var elem=form[name];if(_34d("type",elem)){continue;}if(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){continue;}if(/\S+/.test(elem.value)){continue;}if(_34a.isMissing(elem.name)){continue;}var _352=form[_347.dependencies[name]];if(_352.type!="text"&&_352.type!="textarea"&&_352.type!="password"){continue;}if(/^\s*$/.test(_352.value)){continue;}_348[_348.length]=elem.name;}}if(dojo.isObject(_347.constraints)){for(name in _347.constraints){var elem=form[name];if(!elem){continue;}if(!_34d("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 _353=true;if(dojo.isFunction(_347.constraints[name])){_353=_347.constraints[name](elem.value);}else{if(dojo.isArray(_347.constraints[name])){if(dojo.isArray(_347.constraints[name][0])){for(var i=0;i<_347.constraints[name].length;i++){_353=dojox.validate.evaluateConstraint(_347,_347.constraints[name][i],name,elem);if(!_353){break;}}}else{_353=dojox.validate.evaluateConstraint(_347,_347.constraints[name],name,elem);}}}if(!_353){_349[_349.length]=elem.name;}}}if(dojo.isObject(_347.confirm)){for(name in _347.confirm){var elem=form[name];var _352=form[_347.confirm[name]];if(_34d("type",elem)||_34d("type",_352)||(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password")||(_352.type!=elem.type)||(_352.value==elem.value)||(_34a.isInvalid(elem.name))||(/^\s*$/.test(_352.value))){continue;}_349[_349.length]=elem.name;}}return _34a;};dojox.validate.evaluateConstraint=function(_354,_355,_356,elem){var _357=_355[0];var _358=_355.slice(1);_358.unshift(elem.value);if(typeof _357!="undefined"){return _357.apply(null,_358);}return false;};}if(!dojo._hasResource["dojox.dtl"]){dojo._hasResource["dojox.dtl"]=true;dojo.provide("dojox.dtl");}if(!dojo._hasResource["dojox.dtl.filter.misc"]){dojo._hasResource["dojox.dtl.filter.misc"]=true;dojo.provide("dojox.dtl.filter.misc");dojo.mixin(dojox.dtl.filter.misc,{filesizeformat:function(_359){_359=parseFloat(_359);if(_359<1024){return (_359==1)?_359+" byte":_359+" bytes";}else{if(_359<1024*1024){return (_359/1024).toFixed(1)+" KB";}else{if(_359<1024*1024*1024){return (_359/1024/1024).toFixed(1)+" MB";}}}return (_359/1024/1024/1024).toFixed(1)+" GB";},pluralize:function(_35a,arg){arg=arg||"s";if(arg.indexOf(",")==-1){arg=","+arg;}var _35b=arg.split(",");if(_35b.length>2){return "";}var _35c=_35b[0];var _35d=_35b[1];if(parseInt(_35a,10)!=1){return _35d;}return _35c;},_phone2numeric:{a:2,b:2,c:2,d:3,e:3,f:3,g:4,h:4,i:4,j:5,k:5,l:5,m:6,n:6,o:6,p:7,r:7,s:7,t:8,u:8,v:8,w:9,x:9,y:9},phone2numeric:function(_35e){var dm=dojox.dtl.filter.misc;_35e=_35e+"";var _35f="";for(var i=0;i<_35e.length;i++){var chr=_35e.charAt(i).toLowerCase();(dm._phone2numeric[chr])?_35f+=dm._phone2numeric[chr]:_35f+=_35e.charAt(i);}return _35f;},pprint:function(_360){return dojo.toJson(_360);}});}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_361){var _362=_361.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_362==1&&dojo.date.isLeapYear(_361)){return 29;}return days[_362];};dojo.date.isLeapYear=function(_363){var year=_363.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_364){var str=_364.toString();var tz="";var _365;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_365=str.match(pat))){tz=_365[1];}else{str=_364.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_365=str.match(pat))){tz=_365[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_366,_367,_368){_366=new Date(+_366);_367=new Date(+(_367||new Date()));if(_368=="date"){_366.setHours(0,0,0,0);_367.setHours(0,0,0,0);}else{if(_368=="time"){_366.setFullYear(0,0,0);_367.setFullYear(0,0,0);}}if(_366>_367){return 1;}if(_366<_367){return -1;}return 0;};dojo.date.add=function(date,_369,_36a){var sum=new Date(+date);var _36b=false;var _36c="Date";switch(_369){case "day":break;case "weekday":var days,_36d;var mod=_36a%5;if(!mod){days=(_36a>0)?5:-5;_36d=(_36a>0)?((_36a-5)/5):((_36a+5)/5);}else{days=mod;_36d=parseInt(_36a/5);}var strt=date.getDay();var adj=0;if(strt==6&&_36a>0){adj=1;}else{if(strt==0&&_36a<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_36a>0)?2:-2;}_36a=(7*_36d)+days+adj;break;case "year":_36c="FullYear";_36b=true;break;case "week":_36a*=7;break;case "quarter":_36a*=3;case "month":_36b=true;_36c="Month";break;default:_36c="UTC"+_369.charAt(0).toUpperCase()+_369.substring(1)+"s";}if(_36c){sum["set"+_36c](sum["get"+_36c]()+_36a);}if(_36b&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_36e,_36f,_370){_36f=_36f||new Date();_370=_370||"day";var _371=_36f.getFullYear()-_36e.getFullYear();var _372=1;switch(_370){case "quarter":var m1=_36e.getMonth();var m2=_36f.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_371*4);_372=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_36e,_36f,"day"));var _373=parseInt(dojo.date.difference(_36e,_36f,"week"));var mod=days%7;if(mod==0){days=_373*5;}else{var adj=0;var aDay=_36e.getDay();var bDay=_36f.getDay();_373=parseInt(days/7);mod=days%7;var _374=new Date(_36e);_374.setDate(_374.getDate()+(_373*7));var _375=_374.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_375+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_375+mod)<0:adj=2;}}}days+=adj;days-=(_373*2);}_372=days;break;case "year":_372=_371;break;case "month":_372=(_36f.getMonth()-_36e.getMonth())+(_371*12);break;case "week":_372=parseInt(dojo.date.difference(_36e,_36f,"day")/7);break;case "day":_372/=24;case "hour":_372/=60;case "minute":_372/=60;case "second":_372/=1000;case "millisecond":_372*=_36f.getTime()-_36e.getTime();}return Math.round(_372);};}if(!dojo._hasResource["dojox.date.php"]){dojo._hasResource["dojox.date.php"]=true;dojo.provide("dojox.date.php");dojox.date.php.format=function(date,_376){var df=new dojox.date.php.DateFormat(_376);return df.format(date);};dojox.date.php.DateFormat=function(_377){if(!this.regex){var keys=[];for(var key in this.constructor.prototype){if(dojo.isString(key)&&key.length==1&&dojo.isFunction(this[key])){keys.push(key);}}this.regex=new RegExp("(?:(\\\\.)|(["+keys.join("")+"]))","g");}var _378=[];this.tokens=dojox.string.tokenize(_377,this.regex,function(_379,_37a,i){if(_37a){_378.push([i,_37a]);return _37a;}if(_379){return _379.charAt(1);}});this.replacements=_378;};dojo.extend(dojox.date.php.DateFormat,{weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdays_3:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_3:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],format:function(date){this.date=date;for(var i=0,_37b;_37b=this.replacements[i];i++){this.tokens[_37b[0]]=this[_37b[1]]();}return this.tokens.join("");},d:function(){var j=this.j();return (j.length==1)?"0"+j:j;},D:function(){return this.weekdays_3[this.date.getDay()];},j:function(){return this.date.getDate()+"";},l:function(){return this.weekdays[this.date.getDay()];},N:function(){var w=this.w();return (!w)?7:w;},S:function(){switch(this.date.getDate()){case 11:case 12:case 13:return "th";case 1:case 21:case 31:return "st";case 2:case 22:return "nd";case 3:case 23:return "rd";default:return "th";}},w:function(){return this.date.getDay()+"";},z:function(){var _37c=this.date.getTime()-new Date(this.date.getFullYear(),0,1).getTime();return Math.floor(_37c/86400000)+"";},W:function(){var week;var _37d=new Date(this.date.getFullYear(),0,1).getDay()+1;var w=this.date.getDay()+1;var z=parseInt(this.z());if(z<=(8-_37d)&&_37d>4){var _37e=new Date(this.date.getFullYear()-1,this.date.getMonth(),this.date.getDate());if(_37d==5||(_37d==6&&dojo.date.isLeapYear(_37e))){week=53;}else{week=52;}}else{var i;if(Boolean(this.L())){i=366;}else{i=365;}if((i-z)<(4-w)){week=1;}else{var j=z+(7-w)+(_37d-1);week=Math.ceil(j/7);if(_37d>4){--week;}}}return week;},F:function(){return this.months[this.date.getMonth()];},m:function(){var n=this.n();return (n.length==1)?"0"+n:n;},M:function(){return this.months_3[this.date.getMonth()];},n:function(){return this.date.getMonth()+1+"";},t:function(){return (Boolean(this.L())&&this.date.getMonth()==1)?29:this.monthdays[this.getMonth()];},L:function(){return (dojo.date.isLeapYear(this.date))?"1":"0";},o:function(){},Y:function(){return this.date.getFullYear()+"";},y:function(){return this.Y().slice(-2);},a:function(){return this.date.getHours()>=12?"pm":"am";},b:function(){return this.a().toUpperCase();},B:function(){var off=this.date.getTimezoneOffset()+60;var secs=(this.date.getHours()*3600)+(this.date.getMinutes()*60)+this.getSeconds()+(off*60);var beat=Math.abs(Math.floor(secs/86.4)%1000)+"";while(beat.length<2){beat="0"+beat;}return beat;},g:function(){return (this.date.getHours()>12)?this.date.getHours()-12+"":this.date.getHours()+"";},G:function(){return this.date.getHours()+"";},h:function(){var g=this.g();return (g.length==1)?"0"+g:g;},H:function(){var G=this.G();return (G.length==1)?"0"+G:G;},i:function(){var mins=this.date.getMinutes()+"";return (mins.length==1)?"0"+mins:mins;},s:function(){var secs=this.date.getSeconds()+"";return (secs.length==1)?"0"+secs:secs;},e:function(){return dojo.date.getTimezoneName(this.date);},I:function(){},O:function(){var off=Math.abs(this.date.getTimezoneOffset());var _37f=Math.floor(off/60)+"";var mins=(off%60)+"";if(_37f.length==1){_37f="0"+_37f;}if(mins.length==1){_37f="0"+mins;}return ((this.date.getTimezoneOffset()<0)?"+":"-")+_37f+mins;},P:function(){var O=this.O();return O.substring(0,2)+":"+O.substring(2,4);},T:function(){return this.e().substring(0,3);},Z:function(){return this.date.getTimezoneOffset()*-60;},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.h()+":"+this.i()+":"+this.s()+this.P();},r:function(){return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();},U:function(){return Math.floor(this.date.getTime()/1000);}});}if(!dojo._hasResource["dojox.dtl.utils.date"]){dojo._hasResource["dojox.dtl.utils.date"]=true;dojo.provide("dojox.dtl.utils.date");dojox.dtl.utils.date.DateFormat=function(_380){dojox.date.php.DateFormat.call(this,_380);};dojo.extend(dojox.dtl.utils.date.DateFormat,dojox.date.php.DateFormat.prototype,{f:function(){return (!this.date.getMinutes())?this.g():this.g()+":"+this.i();},N:function(){return dojox.dtl.utils.date._months_ap[this.date.getMonth()];},P:function(){if(!this.date.getMinutes()&&!this.date.getHours()){return "midnight";}if(!this.date.getMinutes()&&this.date.getHours()==12){return "noon";}return this.f()+" "+this.a();}});dojo.mixin(dojox.dtl.utils.date,{format:function(date,_381){var df=new dojox.dtl.utils.date.DateFormat(_381);return df.format(date);},timesince:function(d,now){if(!(d instanceof Date)){d=new Date(d.year,d.month,d.day);}if(!now){now=new Date();}var _382=Math.abs(now.getTime()-d.getTime());for(var i=0,_383;_383=dojox.dtl.utils.date._chunks[i];i++){var _384=Math.floor(_382/_383[0]);if(_384){break;}}return _384+" "+_383[1](_384);},_chunks:[[60*60*24*365*1000,function(n){return (n==1)?"year":"years";}],[60*60*24*30*1000,function(n){return (n==1)?"month":"months";}],[60*60*24*7*1000,function(n){return (n==1)?"week":"weeks";}],[60*60*24*1000,function(n){return (n==1)?"day":"days";}],[60*60*1000,function(n){return (n==1)?"hour":"hours";}],[60*1000,function(n){return (n==1)?"minute":"minutes";}]],_months_ap:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."]});}if(!dojo._hasResource["dojox.dtl.filter.dates"]){dojo._hasResource["dojox.dtl.filter.dates"]=true;dojo.provide("dojox.dtl.filter.dates");(function(){var ddfd=dojox.dtl.filter.dates;dojo.mixin(ddfd,{_toDate:function(_385){if(_385 instanceof Date){return _385;}_385=new Date(_385);if(_385.getTime()==new Date(0).getTime()){return "";}return _385;},date:function(_386,arg){_386=ddfd._toDate(_386);if(!_386){return "";}arg=arg||"N j, Y";return dojox.dtl.utils.date.format(_386,arg);},time:function(_387,arg){_387=ddfd._toDate(_387);if(!_387){return "";}arg=arg||"P";return dojox.dtl.utils.date.format(_387,arg);},timesince:function(_388,arg){_388=ddfd._toDate(_388);if(!_388){return "";}var _389=dojox.dtl.utils.date.timesince;if(arg){return _389(arg,_388);}return _389(_388);},timeuntil:function(_38a,arg){_38a=ddfd._toDate(_38a);if(!_38a){return "";}var _38b=dojox.dtl.utils.date.timesince;if(arg){return _38b(arg,_38a);}return _38b(new Date(),_38a);}});})();}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,_38c,_38d,_38e,_38f){var _390=this;var req=null;this.async=_38d;this.method=_38c;this.url=url;this.showbusy=_38e;this.in_process=false;this.handleas=_38f?_38f:"text";this.get_millisecond_query=function(){var _391=new Date();var ms=_391.getTime();return "&ajax_requester_ms="+ms;};this.sendRequest=function(_392){var _393={url:this.url,sync:!this.async,content:_392?_392:{},preventCache:_392?true:false,handleAs:this.handleas,load:_390.processLoad,error:_390.processError};if(this.showbusy){document.body.style.cursor="wait";}this.in_process=true;if(this.method.toUpperCase()=="POST"){dojo.xhrPost(_393);}else{dojo.xhrGet(_393);}};this.processLoad=function(_394,_395){_394=_390.processAlways(_394,_395);if(_395.xhr.getResponseHeader("Kaboom")){if(_395.xhrgetResponseHeader("Kaboom").toLowerCase()=="true"){if(_390.onerror){_390.onerror(_394,_395);}}}else{if(_390.onsuccess){_390.onsuccess(_394,_395);}}return _394;};this.processError=function(_396,_397){_396=_390.processAlways(_396,_397);if(_390.onerror){_390.onerror(_396,_397);}return _396;};this.processAlways=function(_398,_399){_390.in_process=false;if(_390.showbusy){document.body.style.cursor="auto";}if(!_398){_398="";}try{_398=_398.replace("<!--this page was compressed by your friendly neighborhood pydriver-->","");}catch(e){}return _398;};this.formToQuery=function(_39a){var _39b=dojo.formToObject(_39a);return _39b;};};var script_fragment="<script[^>]*>([\\s\\S]*?)</script>";agi.requester.stripScripts=function(_39c){return _39c.replace(new RegExp(script_fragment,"img"),"");};agi.requester.extractScripts=function(_39d){var _39e=new RegExp(script_fragment,"img");var _39f=new RegExp(script_fragment,"im");var _3a0=_39d.match(_39e);var _3a1=[];if(_3a0){for(var i=0;i<_3a0.length;i++){if(_3a0[i].indexOf("agi-lb-exec")!=-1){_3a1.push(_3a0[i].match(_39f)[1]);}}}return _3a1;};agi.requester.evalScripts=function(_3a2){var _3a3=agi.requester.extractScripts(_3a2);for(i=0;i<_3a3.length;i++){try{eval(_3a3[i]);}catch(e){}}};agi.requester.checkAll=function(_3a4,_3a5){form=dojo.byId(_3a4);for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"){form.elements[i].checked=_3a5;}}};agi.requester.countChecked=function(_3a6){var form=dojo.byId(_3a6);var _3a7=0;for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"&form.elements[i].checked){_3a7++;}}return _3a7;};agi.requester.selectAll=function(_3a8,_3a9){if(_3a9==undefined){var _3aa=true;}else{var _3aa=_3a9;}var list=dojo.byId(_3a8);var _3ab=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=_3aa;len=_3ab.length;for(n=0;n<len;n++){if((_3ab[n].value)==(list.childNodes[i].childNodes[j].value)){_3ab[n].checked=_3aa;}}}}}}};agi.requester.selectEqual=function(_3ac){var _3ad=document.getElementsByName(_3ac.name);for(i=0;i<_3ad.length;i++){if(_3ac.form.elements[i].value==_3ac.value){_3ac.form.elements[i].checked=_3ac.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",showoverlay:true,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(_3ae){_3ae=_3ae||{};dojo.mixin(this,_3ae);this._checkPositioning();},uninitialize:function(){dojo._destroyElement(this.loader);dojo._destroyElement(this.lightbox);if(this.overlay){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 _3af=this.overlayId;var _3b0=dojo.byId(_3af);if(!_3b0){_3b0=document.createElement("div");_3b0.setAttribute("id",_3af);dojo.addClass(_3b0,this.noprintClass);var _3b1=this._pageSize();dojo.style(_3b0,{display:"none",position:"absolute",top:"0",left:"0",zIndex:this.overlayZindex,width:"100%",height:_3b1[1]+"px"});body.insertBefore(_3b0,body.firstChild);}try{filter=dojo.style(_3b0,"filter");if(filter&&dojo.isIE){if(filter.indexOf(imghost)==-1){filter=filter.replace("/agbeta",imghost+"/agbeta");dojo.style(_3b0,"filter",filter);}}}catch(e){}return _3b0;},_createLightbox:function(_3b2){var body=dojo.body();var _3b3=dojo.byId(this.lightboxId);if(!_3b3){_3b3=document.createElement("div");_3b3.setAttribute("id",this.lightboxId);dojo.style(_3b3,{display:"none",position:"absolute",zIndex:this.containerZindex});body.insertBefore(_3b3,_3b2.nextSibling);}_3b3.innerHTML="";return _3b3;},_createLoader:function(){var body=dojo.body();var _3b4=dojo.byId("loadingImage");if(!_3b4){if(this.loaderSrc.endswith(".swf")){_3b4=this._createLoaderSwf(this.loaderSrc);}else{_3b4=this._createLoaderImage(this.loaderSrc);}dojo.style(_3b4,{display:"none",visibility:"hidden",position:"absolute",zIndex:this.loaderZindex});body.insertBefore(_3b4,body.firstChild);}return _3b4;},_createLoaderSwf:function(src){var _3b5=document.createElement("embed");_3b5.setAttribute("id",this.loaderId);_3b5.setAttribute("name","FlashProduct");_3b5.setAttribute("src",src);_3b5.setAttribute("swLiveConnect",true);_3b5.setAttribute("width",this.loaderWidth);_3b5.setAttribute("height",this.loaderHeight);_3b5.setAttribute("scale","noborder");_3b5.setAttribute("quality","high");_3b5.setAttribute("type","application/x-shockwave-flash");_3b5.setAttribute("pluginspace","http://www.macromedia.com/go/getflashplayer");_3b5.setAttribute("wmode","transparent");return _3b5;},_createLoaderImage:function(src){var _3b6=document.createElement("img");_3b6.setAttribute("id",this.loaderId);_3b6.setAttribute("src",src);_3b6.setAttribute("width",this.loaderWidth);_3b6.setAttribute("height",this.loaderHeight);return _3b6;},_loadContent:function(){if(this.domNode&&!this.node){this.node=this.domNode;}if(this.loader&&this.showloader){var _3b7=this._pageSize();var _3b8=this._pageScroll();var _3b9=_3b8[1]+((_3b7[3]-35-this.loader.height)/2);var _3ba=((_3b7[0]-20-this.loader.width)/2);dojo.style(this.loader,{display:"block",visibility:"visible",top:_3b9+"px",left:_3ba+"px"});}if(this.overlay&&this.showoverlay){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(_3bb,_3bc){this.lightbox.innerHTML=agi.requester.stripScripts(_3bb);this._ready=true;this.show();agi.requester.evalScripts(_3bb);this._enableOverlayClick();return _3bb;},_onError:function(_3bd,_3be){this.hide();return _3bd;},show:function(){this._showPhase0();this._showPhase1();this._showPhase2();this.postShow();},_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&&this.showoverlay){dojo.style(this.overlay,{display:"block",visibility:"visible"});}},_showPhase1:function(){var _3bf=this._pageScroll();var _3c0=this.top+_3bf[1];var _3c1={left:"-9999px",top:_3c0+"px",visibility:"visible",display:"block"};if(this.height){_3c1.height=this.height+"px";}if(this.width){_3c1.width=this.width+"px";}dojo.style(this.lightbox,_3c1);},_showPhase2:function(){var _3c2=this._pageSize();if(this.left==null){this.left=((_3c2[0]-this.lightbox.offsetWidth)/2);}var _3c3={left:this.left+"px"};dojo.style(this.lightbox,_3c3);this._resizeOverlay();this._enableKeypressListener();if(!this._bgIframe){var _3c4=this.lightbox;if(this.overlay&&this.showoverlay){_3c4=this.overlay;}this._bgIframe=new dijit.BackgroundIframe(_3c4);}this._showing=true;},postShow:function(){return;},hide:function(_3c5){if(!this._showing){return;}if(this.overlay){this.overlay.onclick=function(){return false;};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(_3c5){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.overlay&&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){if(evt.charOrCode==this.closeKey){this.hide();}},_resizeOverlay:function(){if(this.overlay){var _3c6=this._pageSize();dojo.style(this.overlay,"height",_3c6[1]+"px");}},_pageScroll:function(){var _3c7=0;if(self.pageYOffset){_3c7=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){_3c7=document.documentElement.scrollTop;}else{if(document.body){_3c7=document.body.scrollTop;}}}var _3c8=[null,_3c7];return _3c8;},_pageSize:function(){var _3c9,_3ca;if(window.innerHeight&&window.scrollMaxY){_3c9=document.body.scrollWidth;_3ca=window.innerHeight+window.scrollMaxY;}else{if(document.body.scrollHeight>document.body.offsetHeight){_3c9=document.body.scrollWidth;_3ca=document.body.scrollHeight;}else{_3c9=document.body.offsetWidth;_3ca=document.body.offsetHeight;}}var _3cb,_3cc;if(self.innerHeight){_3cb=self.innerWidth;_3cc=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){_3cb=document.documentElement.clientWidth;_3cc=document.documentElement.clientHeight;}else{if(document.body){_3cb=document.body.clientWidth;_3cc=document.body.clientHeight;}}}var _3cd,_3ce;if(_3ca<_3cc){_3ce=_3cc;}else{_3ce=_3ca;}if(_3c9<_3cb){_3cd=_3cb;}else{_3cd=_3c9;}var _3cf=[_3cd,_3ce,_3cb,_3cc];return _3cf;}});}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(_3d0){if(dojo.isObject(_3d0)){dojo.mixin(this,_3d0);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,_3d1){dojo.forEach(_3d1,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,_3d2){dojo.forEach(_3d2,function(name){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+name){if(li!==null){dojo.addClass(li,"pw-formerror");}}});});};pw.validators.addErrorToField=function(form,_3d3,_3d4){pw.validators.setErrorClasses(form,[_3d3]);var _3d5={};_3d5[_3d3]={invalid:_3d4};pw.validators.addMessages(form,[_3d3],_3d5,"invalid");};pw.validators.addErrorMessages=function(form,_3d6,_3d7){var _3d8=_3d6.getMissing();var _3d9=[];var _3da=_3d6.getInvalid();for(var i=0;i<_3da.length;i++){var _3db=_3da[i];if(_3d8.indexOf(_3db)==-1){_3d9.push(_3db);}}pw.validators.addMessages(form,_3d8,_3d7,"missing");pw.validators.addMessages(form,_3d9,_3d7,"invalid");};pw.validators.addMessages=function(form,_3dc,_3dd,_3de){dojo.forEach(_3dc,function(_3df){if(_3df in _3dd){var _3e0=_3dd[_3df][_3de];pw.validators.setMessage(form,_3df,_3e0);}});};pw.validators.setMessage=function(form,_3e1,_3e2){dojo.query("li",form).forEach(function(li){if(li.id=="fli-"+_3e1){if(li!==null){dojo.create("span",{className:"error-message",innerHTML:_3e2},li);}}});};pw.validators.deleteErrorMessages=function(form){var _3e3=dojo.query(".error-message",form);dojo.forEach(_3e3,function(span){dojo.destroy(span);});};pw.validators.generateProfile=function(_3e4,_3e5){var _3e6=dojo.mixin({},_3e5);_3e6.fields=dojo.clone(_3e5.fields);_3e6.required=dojo.clone(_3e5.required);var i;var _3e7;for(i=0;i<_3e6.fields.length;i++){_3e6.fields[i]=_3e4[_3e6.fields[i]];}for(i=0;i<_3e6.required.length;i++){_3e6.required[i]=_3e4[_3e6.required[i]];}for(_3e7 in _3e4){if(typeof _3e6.constraints[_3e7]!=="undefined"){_3e6.constraints[_3e4[_3e7]]=_3e6.constraints[_3e7];delete _3e6.constraints[_3e7];}if(typeof _3e6.messages[_3e7]!=="undefined"){_3e6.messages[_3e4[_3e7]]=_3e6.messages[_3e7];delete _3e6.messages[_3e7];}}return _3e6;};pw.validators.getFieldMapping=function(_3e8,node){var _3e9;var _3ea={};for(var i=0;i<_3e8.length;i++){_3e9=dojo.query(_3e8[i].query,node);if(_3e9&&_3e9.length){_3e9=_3e9[0];_3ea[_3e8[i].field]=_3e9.getAttribute("name");}}return _3ea;};pw.validators.showErrors=function(form,_3eb,_3ec,_3ed){var _3ee=[];if(!_3ed){pw.validators.deleteErrorMessages(form);}_3ee=(_3eb.getMissing()).slice();_3ee.extend(_3eb.getInvalid());pw.validators.cleanErrors(form,_3ec.fields);pw.validators.setErrorClasses(form,_3ee);pw.validators.addErrorMessages(form,_3eb,_3ec.messages);};pw.validators.showServerErrors=function(form,_3ef,_3f0){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_3ef.fields);for(fieldname in _3f0){pw.validators.setErrorClasses(form,[fieldname]);pw.validators.setMessage(form,fieldname,_3f0[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(_3f1){try{clearInterval(agi.dom.window._scrollInterval);}catch(e){}var _3f2=dojo.byId(_3f1);var _3f3=dojo.coords(_3f2,true);var top=_3f3.y;var _3f4=_3f3.y+_3f3.h;var _3f5=dijit.getViewport();var _3f6=_3f5.t;var _3f7=_3f5.l;var _3f8=Math.floor((agi.dom.window.getSize().height-_3f2.clientHeight)/2);var _3f9=agi.dom.window.getLightboxTop();if(_3f6<top&&_3f4<agi.dom.window.getSize().height){return;}if((_3f4-_3f9)<agi.dom.window.getSize().height){agi.dom.window.scrollTo(_3f9);}else{if(_3f8>0){agi.dom.window.scrollTo(top-_3f8);}else{if(_3f6>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,_3fa){var _3fb=dijit.getViewport().t;var _3fc;if(_3fb>_3fa){_3fc=Math.max(_3fb-step,_3fa);}else{_3fc=Math.min(_3fb+step,_3fa);}window.scroll(0,_3fc);if(_3fc==_3fa){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 _3fd={};_3fd.pageYOffset=dijit.getViewport().t;_3fd.pageXOffset=dijit.getViewport().l;return _3fd;};agi.dom.window.getElementScrollOffset=function(_3fe){var elem=dojo.byId(_3fe);var _3ff={};if(typeof (elem.pageYOffset)=="number"){_3ff.pageYOffset=elem.pageYOffset;_3ff.pageXOffset=elem.pageXOffset;}else{_3ff.pageYOffset=elem.scrollTop;_3ff.pageXOffset=elem.scrollLeft;}return _3ff;};agi.dom.window.getMaxScroll=function(){var _400=document.body.clientHeight;if(typeof (window.innerHeight)=="number"){var _401=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){var _401=document.documentElement.clientHeight;}}if(_400>_401){return _400-_401;}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,_402){return dojo.style(el,_402);};}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(_403,_404,_405){var _406=dojo.byId(_403);var _407=_406.className;if(_404){if(_405){_406.setAttribute("class",_405);_406.setAttribute("className",_405);}_406.style.display="block";_406.innerHTML=_404;agi.dom.window.scroll_into_view(_403);}else{_406.style.display="none";}};agi.validation.reformat_emails=function(_408,_409){var _40a="";for(var i=0;i<_408.length;i++){if(!agi.validation.isEmpty(_408[i])){_40a+=agi.validation.trim(_408[i]);if(i<_408.length-1){_40a+=", ";}}}if(_409){_409.value=_40a;}return _40a;};agi.validation.validate_email=function(_40b,_40c,_40d){var _40e=agi.validation.trim(_40b);var _40f;var _410;var _411=[];var _412;if(!_40c){_40c=75;}if(!_40d){_40d;}if(_40e==""&&!_40d){throw (agi.validation.IS_EMPTY);}else{if(_40e==""){return;}}if(_40e.length>_40c){throw (agi.validation.TOO_LONG);}if(_40e.match(/.*@$|.*@.*@.|^@.*|^[^@]*$/)){throw (agi.validation.EMAIL_FAIL);}_40f=_40e.split("@")[0];_410=_40e.split("@")[1];if(_40f==""||_410==""){throw (agi.validation.EMAIL_FAIL);}if(_40f.match(/.*[*()<>;:,\[\]\\'" ].*/)){throw (agi.validation.EMAIL_FAIL);}if(_410.indexOf("..")!=-1){throw (agi.validation.EMAIL_FAIL);}_411=_410.split(".");_412=_411.length;if(_412==1){throw (agi.validation.EMAIL_FAIL);}if(_411[_412-1].length<2||_411[_412-1].length>6){throw (agi.validation.EMAIL_FAIL);}return agi.validation.PASS;};agi.validation.validate_emails=function(_413,_414,_415){var _416=true;var _417=_413.value.replace(/;/g,",");var _418={"error_message":"","error_codes":[],"pass_validation":agi.validation.FAIL,"emails":""};if(!_414){_414=true;}if(!_415){_415=agi.validation.defaultErrorMessages;}if(_414){_417=_417.replace(/\n/g,", ");_417=_417.replace(/\r/g,", ");}if(agi.validation.isEmpty(_417)||agi.validation.isEmpty(_417.replace(/,/g,""))){_416=agi.validation.FAIL;_418.error_message+="<p>"+_415[agi.validation.IS_EMPTY]+"</p>";}_417=_417.split(",");for(i=0;i<_417.length;i++){try{agi.validation.validate_email(_417[i],"",true);}catch(e_code){_418.error_message+="<p>"+_417[i]+" "+_415[e_code]+"</p>";_416=agi.validation.FAIL;_418.error_codes[_418.error_codes.length]=e_code+"|"+_417[i];}}if(_414){agi.validation.reformat_emails(_417,_413);}_418.emails=_417;_418.pass_validation=_416;return _418;};agi.validation.validate_checkboxes=function(_419){var _41a=document.getElementsByName(_419);var _41b=false;for(var i=0;i<_41a.length;i++){if(_41a[i].checked){_41b=true;break;}}if(!_41b){return agi.validation.FAIL;}return agi.validation.PASS;};agi.validation.Error=function(_41c,_41d,type){var _41e=this;this.message=_41d;this.field=_41c;this.type=type;};agi.validation.Errors=function(_41f){var _420=this;this.errors=[];this.display_div=dojo.byId(_41f);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(_421){if(_421){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(_422){var _423=this.display_div.className;if(_422&&(_423.indexOf(_422)==-1)){message_class=(this.display_div.className)?this.display_div.className+" "+_422:_422;this.display_div.setAttribute("class",message_class);this.display_div.setAttribute("className",message_class);}};this.write_message=function(_424,_425){if(_424){this.display_div.style.display="block";this.display_div.innerHTML=_424;}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(_426){this.errors.push(_426);};this.add_error=function(_427,_428,type){if(!type){type=this.ERROR;}this.add(new Error(_427,_428,type));};};}if(!dojo._hasResource["agi.validate._base"]){dojo._hasResource["agi.validate._base"]=true;dojo.provide("agi.validate._base");agi.validate.isEmailAddressList=function(_429,_42a){_429=_429.replace(/^\s*|\s*$|\s*,\s*$|\s*;\s*$/g,"");var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_42a)+"$","i");var _42b=re.test(_429);var _42c=dojox.validate.getEmailAddressList(_429,_42a);var _42d=false;if(typeof _42a.minlength!="undefined"){if(_42c.length<_42a.minlength){var _42d=true;}}var _42e=false;if(typeof _42a.maxlength!="undefined"){if(_42c.length>_42a.maxlength){var _42e=true;}}return _42b&&!_42d&&!_42e;};agi.validate.isEmailAddressListWithinLimits=function(_42f,_430){_42f=_42f.replace(/^\s*|\s*$|\s*,\s*$|\s*;\s*$/g,"");var _431=dojox.validate.getEmailAddressList(_42f,_430);var _432=false;if(typeof _430.minlength!="undefined"){if(_431.length<_430.minlength){_432=true;}}var _433=false;if(typeof _430.maxlength!="undefined"){if(_431.length>_430.maxlength){_433=true;}}return !_432&&!_433;};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(_434,_435){var day=dojo.byId(_435.dayField).value;var _436={min:_435.dayMin,max:_435.dayMax};var _437=dojox.validate.isInRange(_434,_435);var _438=dojox.validate.isInRange(day,_436);return _438&&_437;};agi.validate.isInteger=function(_439){return (_439.toString().search(/^[0-9]+$/)==0);};agi.validate.isNumeric=function(_43a){return !isNaN(_43a)&&_43a!="";};agi.validate.isValidEmailAddress=function(_43b){var _43c=/^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}$/i;return _43c.test(_43b);};agi.validate.isNotEmpty=function(elem){if(!elem){return true;}var str=elem.value;if(str==null||str.length==0){return false;}else{return true;}};agi.validate.simpleDateValidation=function(_43d){var _43e=new Date(_43d);var _43f=(_43e.getMonth()+1)+"/"+_43e.getDate()+"/"+_43e.getFullYear();if(_43d!=_43f){return false;}else{return true;}};}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:dojo.cache("dijit","templates/Tooltip.html","<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(_440,_441,_442,rtl){if(this.aroundNode&&this.aroundNode===_441){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_440;var pos=dijit.placeOnScreenAroundElement(this.domNode,_441,dijit.getPopupAroundAlignment((_442&&_442.length)?_442:dijit.Tooltip.defaultPosition,!rtl),dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_441;},orient:function(node,_443,_444){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"}[_443+"-"+_444];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_445){if(this._onDeck&&this._onDeck[1]==_445){this._onDeck=null;}else{if(this.aroundNode===_445){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_446,_447,_448,rtl){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_446,_447,_448,rtl);};dijit.hideTooltip=function(_449){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_449);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],constructor:function(){this._nodeConnectionsById={};},_setConnectIdAttr:function(_44a){for(var _44b in this._nodeConnectionsById){this.removeTarget(_44b);}dojo.forEach(dojo.isArrayLike(_44a)?_44a:[_44a],this.addTarget,this);},_getConnectIdAttr:function(){var ary=[];for(var id in this._nodeConnectionsById){ary.push(id);}return ary;},addTarget:function(id){var node=dojo.byId(id);if(!node){return;}if(node.id in this._nodeConnectionsById){return;}this._nodeConnectionsById[node.id]=[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")];},removeTarget:function(node){var id=node.id||node;if(id in this._nodeConnectionsById){dojo.forEach(this._nodeConnectionsById[id],this.disconnect,this);delete this._nodeConnectionsById[id];}},postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this);},_onTargetMouseEnter:function(e){this._onHover(e);},_onTargetMouseLeave:function(e){this._onUnHover(e);},_onTargetFocus:function(e){this._focus=true;this._onHover(e);},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _44c=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_44c);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_44d){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_44d,this.position,!this.isLeftToRight());this._connectNode=_44d;this.onShow(_44d,this.position);},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_44e,_44f){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});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:null,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",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,_450,_451){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"}[_450+"-"+_451];},open:function(_452){_452=_452||this._connectNodes[0];if(!_452){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}var _453=null;if(this.contentNode!=null){_453=this.contentNode.innerHTML;}var _454=this.label||_453||this.containerNode.innerHTML;this._showTooltip(_454,_452,this.position);this._connectNode=_452;},close:function(){if(this._connectNode){this._hideTooltip(this._connectNode);delete this._connectNode;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},_showTooltip:function(_455,_456,_457){return this.show(_455,_456,_457);},_hideTooltip:function(_458){return this.hide(_458);},_setConnectIdAttr:function(ids){this._connectNodes=[];this.connectId=dojo.isArrayLike(ids)?ids:[ids];dojo.forEach(this.connectId,function(id){var node=dojo.byId(id);if(node){this._connectNodes.push(node);this.connect(node,"onmouseenter","_onMouseEnter");this.connect(node,"onmouseleave","_onMouseLeave");this.connect(node,"onfocus","_onFocus__Tooltip");this.connect(node,"onblur","_onBlur__Tooltip");if(dojo.isIE){node.style.zoom=1;}}},this);},_onMouseEnter:function(e){this._onHover(e);},_onMouseLeave:function(e){this._onUnHover(e);},_onFocus__Tooltip:function(e){this._focus=true;this._onHover(e);},_onBlur__Tooltip:function(e){this._focus=false;this._onUnHover(e);}});}if(!dojo._hasResource["pw.widget.Formtip"]){dojo._hasResource["pw.widget.Formtip"]=true;dojo.provide("pw.widget.Formtip");dojo.declare("pw.widget.Formtip",[agi.widget.Tooltip],{showDelay:300,baseClassName:"pwformtip",templateString:"<div class=\"pwformtip pwformtipLeft\" id=\"dojoTooltip\">\n    <div class=\"pwformtipContainer pwformtipContents\"\n        dojoAttachPoint=\"containerNode\" waiRole=\"alert\">\n    </div>\n    <div class=\"pwformtipConnector\"></div>\n</div>\n"});}if(!dojo._hasResource["pw.messages"]){dojo._hasResource["pw.messages"]=true;dojo.provide("pw.messages");pw.messages.tooltip={email:"Your email address is private and will never be shared without your permission.",phone:"This phone number will not be shared and will only be used to make contact about this order if necessary.",phone_myaccount:"This phone number will not be shared and will only be used to make contact about your orders if necessary.",password:"<b>Password Requirements:</b><ol class=\"pw-tooltip-list\"><li>Must be at least six characters</li><li>No spaces</li><li>Not case sensitive</li></ol>",keepMeLoggedIn:"Not recommended if you're using a public computer.",howToFavorite:"Have prized photos in your PhotoWorks albums? Now you can make them your favorites with a click of the star! To start, find the photo in your album. Underneath the photo, simply click once on the star icon. All photos deemed as \"favorites\" can be found in your new Favorites album. It's that easy!",captions:"Captions can be printed on the back of prints and displayed in photo books and slideshows.",removeRefinement:"Remove this item to broaden your search.",printsBorder:"Selecting white borders will result in your photo having a 1/4\" inch white border when it is printed. By selecting white borders the border will have an even width on all four sides. If \"shrink to fit\" is selected for any print, \"white borders\" will be applied to that print and may result in uneven borders on two sides of the print.<br/><br/><strong>Please note:</strong> White borders are not visible in print preview. Selecting white borders may cause a slight increase in the amount of cropping necessary to print your photos.",recipientEmail:"The email addresses on your To: line will only receive your personalized PhotoMail invitation. That's it. PhotoWorks will not send them unsolicited emails or sell their email address to any third party.<br/><br/>Recipients will not be required to join PhotoWorks to view your shared photos. If they wish, they may choose to join PhotoWorks and receive promotional offers from PhotoWorks.",printsPrepaidPlan:"This is a test from Frank Maricocchi",printsVolumeDiscount:"<table id=\"pw-volumetable\"><tr><th>Quantity</th><th>Price Per Print</th></tr><tr><td>1-499</td><td>$0.15</td></tr><tr><td>500-999</td><td>$0.12</td></tr><tr><td>1000+</td><td>$0.09</td></tr></table>",webshotsLearn:"<p><strong>Why are my Webshots images not appearing?</strong></p><p>If you share a computer with another Webshots user, it is possible that you will not see your Webshots photostream or sets when you try to access them through PhotoWorks. This will happen if the other user did not log out of their Webshots account after the last use.</p><p>To get your images to appear, sign out the currently authenticated Webshots user, then sign out from PhotoWorks.com and try image import again.</p>"};}if(!dojo._hasResource["pw.widget.SigninLightbox"]){dojo._hasResource["pw.widget.SigninLightbox"]=true;dojo.provide("pw.widget.SigninLightbox");dojo.declare("pw.widget.SigninLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for password reminders.",templateString:"<div>\n\n<div id=\"pw-light-signin\" class=\"pw-rc-light\"><span class=\"pw-x1\"></span><span class=\"pw-x2\"></span><span class=\"pw-x3\"></span>\n\t<div class=\"pw-light-header\">\n        <ul>\n            <li class=\"pw-l-close\"><a href=\".\" onclick = \"dojo.publish('pw/modals/signin/hide');\n                                                          return false;\"><span></span>Close</a></li>\n        </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\" id=\"pw-fs-submit-signin\">\n                <li class=\"pw-light-cancel\" id=\"pw-signmod_forgot\">\n                   <a id=\"forgot-password-link\" href=\"/forgot\"><span></span>Forgot your password?</a>\n                </li>\n\t\t\t\t<li class=\"pw-light-save\">\n                   <input id=\"si-submit\" type=\"submit\" value=\"Log In\" />\n                </li>\n            </ol> \n\n        </form>\n\t\t<span id=\"pw-signin-light-promo\"></span>\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(_459){this.show();this.wireUp();if(_459!=null){if(_459.email){this.form.email.value=_459.email;}if(_459.url){this.url=_459.url;}else{this.url="";}}else{this.url="";this.form.email.value="";}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});dojo.query("#pw-signin-promo").place(dojo.byId("pw-signin-light-promo"),"first");dojo.query("#pw-signin-promo").style({display:"block"});},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(_45a){if(_45a.success==true){if(this.url&&this.url!=""){window.location.href=this.url;}else{if(agx.currentPage.isHomepage==true){window.location.href=ahost+"/news";}else{window.location.reload(true);}}}else{if(_45a.success==false&&dojo.byId("login-error")==null){var _45b=function(_45c){var form=dojo.byId("signin_form");dojo.create("div",{id:"login-error",className:"pw-error",innerHTML:_45c},form,"before");};if(_45a.error_msg!=null){_45b(_45a.error_msg);}else{_45b("An undetermined error has occured.  Please try again.");}}else{window.location.reload(true);}}},validate:function(form){var _45d=pw.validators.signin.profile;var _45e=dojox.validate.check(form,_45d);if(_45e.isSuccessful()){return true;}pw.validators.showErrors(form,_45e,_45d);return false;},showForgotPassword:function(evt){var form=dojo.byId("signin_form");var _45f=form.email.value;dojo.stopEvent(evt);dojo.publish("pw/modals/signin/hide");dojo.publish("pw/modals/forgot-password/show",[_45f]);}});}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){document.location=ahost+"/news";return;if(evt){dojo.stopEvent(evt);}return;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 _460=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(_461){if(_461.success==true){pw.validators.cleanAllErrors(this.form);if(agx.currentPage.isHomepage==true){window.location.href=ahost+"/my-photoworks?uut_event=pw_reg_end";}else{var url=window.location.href;var _462=url.indexOf("?")>0?"&":"?";window.location.href=window.location.href+_462+"uut_event=pw_reg_end";}}else{if(_461.success==false&&dojo.byId("signup-error")==null){var _463=function(_464){var form=dojo.byId("signup_form");dojo.create("div",{id:"signup-error",className:"pw-error",innerHTML:_464},form,"before");};if(_461.type=="CustomerExists"){_463("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(_461.type=="AlreadySignedIn"){location.reload(true);}else{_463("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(_465){dojo.disconnect(_465);});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 _466=pw.validators.signup.profile;var _467=dojox.validate.check(form,_466);if(_467.isSuccessful()){return true;}pw.validators.showErrors(form,_467,_466);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-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(_468){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(_468!=null){this.forgotForm.email.value=_468;}},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 _469=this.validate(this.forgotForm);if(!_469){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 _46a=form.email.value;var _46b=pw.validators.forgotpassword.profile;var _46c=dojox.validate.check(form,_46b);if(_46c.isSuccessful()){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_46b.fields);return true;}pw.validators.showErrors(form,_46c,_46b);return false;},onLoadCallback:function(data){var _46d=data.done;var _46e=data.email;this.email=_46e;if(!_46e){return this.onEmailNotFound(data);}if(!_46d){return this.onErrorCallback(data);}var _46e=data.email;this.email=_46e;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=_46e;this.forgotError.innerHTML="";dojo.style(this.forgotError,{display:"none"});},onErrorCallback:function(data){this.forgotError.innerHTML="There was an error submitting your form."+" Please re-enter your email and try again.";dojo.style(this.forgotError,{display:""});},onEmailNotFound:function(data){pw.validators.addErrorToField(this.forgotForm,"email","This address is not associated with a PhotoWorks account.");dojo.style(this.forgotError,{display:"none"});},showSignin:function(evt){var form=dojo.byId("pw-forgot-form");var _46f=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 _470=0,d=dojo;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){d.empty(node);if(cont){if(typeof cont=="string"){cont=d._toDom(cont,node.ownerDocument);}if(!cont.nodeType&&d.isArrayLike(cont)){for(var _471=cont.length,i=0;i<cont.length;i=_471==cont.length?i+1:0){d.place(cont[i],node,"last");}}else{d.place(cont,node,"last");}}return node;};dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_472,node){dojo.mixin(this,_472||{});node=this.node=dojo.byId(this.node||node);if(!this.id){this.id=["Setter",(node)?node.id||node.tagName:"",_470++].join("_");}},set:function(cont,_473){if(undefined!==cont){this.content=cont;}if(_473){this._mixin(_473);}this.onBegin();this.setContent();this.onEnd();return this.node;},setContent:function(){var node=this.node;if(!node){throw new Error(this.declaredClass+": setContent given no node");}try{node=dojo.html._setNodeContent(node,this.content);}catch(e){var _474=this.onContentError(e);try{node.innerHTML=_474;}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 _475=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_475){cont=_475[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(_476){var _477={},key;for(key in _476){if(key in _477){continue;}this[key]=_476[key];}},_parse:function(){var _478=this.node;try{this.parseResults=dojo.parser.parse({rootNode:_478,dir:this.dir,lang:this.lang});}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(type,err,_479){var _47a=this["on"+type+"Error"].call(this,err);if(_479){}else{if(_47a){dojo.html._setNodeContent(this.node,_47a,true);}}}});dojo.html.set=function(node,cont,_47b){if(undefined==cont){cont="";}if(!_47b){return dojo.html._setNodeContent(node,cont,true);}else{var op=new dojo.html._ContentSetter(dojo.mixin(_47b,{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 _47c=[];for(var i=0;i<str.length;i++){_47c.push(str.charCodeAt(i));}return _47c;},bytes_to_str:function(_47d){var str="";dojo.forEach(_47d,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,_47e,sep){var map=[];var _47f=s.toString().split(_47e);for(var i=0;i<_47f.length;i++){var pair=_47f[i];if(pair){var data=pair.split(sep);map[unescape(data[0])]=unescape(data[1]);}}return map;};agi.cookie.NVP.fromMap=function(map,_480,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])+_480;}}}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.SUBPATHS=[[/\/birthday-calendar/,"_bcal"]];agi.cookie.AGICookie.getCookieDomain=function(){var _481=window.location.hostname.split(".");var idx=_481.length-2;var tld=_481.slice(-1);if(tld!="com"&&tld!="net"&&tld!="org"){idx=_481.length-3;}_481=_481.slice(idx);return "."+_481.join(".");};agi.cookie.AGICookie.getCookieName=function(name){var _482=window.location.hostname.split(".");var _483=name;var hn="";if(_482.length<3){hn="www";}else{hn=_482[0];}dojo.forEach(agi.cookie.AGICookie.SUBHOSTS,function(pair){if(pair[0].test(window.location.hostname)){name+=pair[1];}});dojo.forEach(agi.cookie.AGICookie.SUBPATHS,function(pair){if(pair[0].test(window.location.pathname)){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,_484){var c=agi.cookie.AGICookie.getCookie(name);if(typeof c=="null"){return null;}var v=agi.cookie.NVP.getValue(agi.base64.decode(c),_484,"=","&");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,_485,_486,perm){name=agi.cookie.AGICookie.getCookieName(name);var cki=name+"="+escape(_485)+";";if(perm){_486="Thursday, 31-Dec-2037 00:01:00 GMT";}if(_486){cki=cki+"expires="+_486+";";}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,_487){var v=agi.cookie.AGICookie.getCookieValueRaw(name,_487);if(!v&&name=="customer"&&_487=="name"){v=agi.cookie.AGICookie.getCookieValueRaw(name,"email");}if(!v&&name=="customer"&&_487=="name"){v="member";}return v;};agi.cookie.AGICookie.setCookieValue=function(name,_488,_489,_48a,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[_488]=_489;agi.cookie.AGICookie.setCookie(name,agi.base64.encode(agi.cookie.NVP.fromMap(map,"&","=")),_48a,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(_48b){_48b=_48b||{};dojo.mixin(this,_48b);this.node=dojo.byId(this.node);},show:function(){if(this.node!=null){var name=agi.cookie.AGICookie.getCookieValue("customer","name");var _48c=this.beforeName+name+this.afterName;dojo.html.set(this.node,_48c);}}});}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 _48d={lightboxId:"lightbox",loaderId:"loadingImage",overlayId:"pw-overlay",loadnow:false,width:660,top:35,overflow:""};_48d.lightboxId="lightbox_forgot_password";this.forgotPassword=new pw.widget.ForgotPasswordLightbox(_48d);_48d.lightboxId="lightbox_signup";this.signup=new pw.widget.SignupLightbox(_48d);_48d.lightboxId="lightbox_signin";this.signin=new pw.widget.SigninLightbox(_48d);var _48e=dojo.byId("signin");var _48f=dojo.byId("signup");if(_48e!=null){dojo.connect(_48e,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show");});}if(_48f!=null){dojo.connect(_48f,"onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signup/show");});}if(dojo.byId("signin")){dojo.query("li#pw-myaccdropmenu  a.pw-drop-acctop").connect("onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show",[{"email":"","url":e.target.href}]);});dojo.query("div#pw-myaccmenu a").connect("onclick",function(e){dojo.stopEvent(e);dojo.publish("pw/modals/signin/show",[{"email":"","url":e.target.href}]);});}if(dojo.byId("pw-search")&&dojo.isIE>0){dojo.query("li#pw-myaccdropmenu a.pw-drop-acctop").connect("onmouseover",function(){dojo.byId("pw-search").blur();});dojo.query("li#pw-helpdropmenu a.pw-drop-helptop").connect("onmouseover",function(){dojo.byId("pw-search").blur();});}}});}if(!dojo._hasResource["dojox.validate.web"]){dojo._hasResource["dojox.validate.web"]=true;dojo.provide("dojox.validate.web");dojox.validate.isIpAddress=function(_490,_491){var re=new RegExp("^"+dojox.validate.regexp.ipAddress(_491)+"$","i");return re.test(_490);};dojox.validate.isUrl=function(_492,_493){var re=new RegExp("^"+dojox.validate.regexp.url(_493)+"$","i");return re.test(_492);};dojox.validate.isEmailAddress=function(_494,_495){var re=new RegExp("^"+dojox.validate.regexp.emailAddress(_495)+"$","i");return re.test(_494);};dojox.validate.isEmailAddressList=function(_496,_497){var re=new RegExp("^"+dojox.validate.regexp.emailAddressList(_497)+"$","i");return re.test(_496);};dojox.validate.getEmailAddressList=function(_498,_499){if(!_499){_499={};}if(!_499.listSeparator){_499.listSeparator="\\s;,";}if(dojox.validate.isEmailAddressList(_498,_499)){return _498.split(new RegExp("\\s*["+_499.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 _49a=0;this.element=a[_49a]||null;this.atEnd=function(){return (_49a>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_49a++];return this.element;};this.map=function(fn,_49b){return dojo.map(a,fn,_49b);};this.reset=function(){_49a=0;this.element=a[_49a];};};dojox.collections.DictionaryIterator=function(obj){var a=[];var _49c={};for(var p in obj){if(!_49c[p]){a.push(obj[p]);}}var _49d=0;this.element=a[_49d]||null;this.atEnd=function(){return (_49d>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_49d++];return this.element;};this.map=function(fn,_49e){return dojo.map(a,fn,_49e);};this.reset=function(){_49d=0;this.element=a[_49d];};};}if(!dojo._hasResource["dojox.collections.Dictionary"]){dojo._hasResource["dojox.collections.Dictionary"]=true;dojo.provide("dojox.collections.Dictionary");dojox.collections.Dictionary=function(_49f){var _4a0={};this.count=0;var _4a1={};this.add=function(k,v){var b=(k in _4a0);_4a0[k]=new dojox.collections.DictionaryEntry(k,v);if(!b){this.count++;}};this.clear=function(){_4a0={};this.count=0;};this.clone=function(){return new dojox.collections.Dictionary(this);};this.contains=this.containsKey=function(k){if(_4a1[k]){return false;}return (_4a0[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 _4a0[k];};this.forEach=function(fn,_4a2){var a=[];for(var p in _4a0){if(!_4a1[p]){a.push(_4a0[p]);}}dojo.forEach(a,fn,_4a2);};this.getKeyList=function(){return (this.getIterator()).map(function(_4a3){return _4a3.key;});};this.getValueList=function(){return (this.getIterator()).map(function(_4a4){return _4a4.value;});};this.item=function(k){if(k in _4a0){return _4a0[k].valueOf();}return undefined;};this.getIterator=function(){return new dojox.collections.DictionaryIterator(_4a0);};this.remove=function(k){if(k in _4a0&&!_4a1[k]){delete _4a0[k];this.count--;return true;}return false;};if(_49f){var e=_49f.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",zIndex:2000,smallSpinner:{src:imghost+"/ag/reminders/loader.swf",height:32,width:32,cache:{}},mediumSpinner:{src:imghost+"/ag/reminders/loader.swf",height:64,width:64,cache:{}},largeSpinner:{src:imghost+"/ag/reminders/loader.swf",height:128,width:128,cache:{}},bgiframe:null,spinnerData:null,constructor:function(_4a5){dojo.mixin(this,_4a5);},prep:function(size){var _4a6=this.createSpinner(size);return _4a6;},show:function(node,size,_4a7){node=dojo.byId(node);this.node=node;var _4a8=this.createOverlay(node);this.bgiframe=new dijit.BackgroundIframe(_4a8);var _4a9=this.createSpinner(size);this.positionSpinner(_4a9,_4a8,node);if(_4a7){dojo.style(dojo.body(),"cursor","wait");}if(this.applyClass){dojo.addClass(node,this.applyClass);}var _4aa=dojo.hitch(this,this.hide);return _4aa;},hide:function(){dojo.query("#"+this.overlayId+this.id).style("display","none").orphan();if(this.applyClass&&this.node){dojo.removeClass(this.node,this.applyClass);}dojo.style(dojo.body(),"cursor","auto");if(this.bgiframe!=null){this.bgiframe.destroy();this.bgiframe=null;}},createOverlay:function(node){var _4ab;if(node==dojo.body()){_4ab=dojo.coords(node,true);}else{_4ab=dojo.coords(node,true);}_4ab.y-=dojo.style(node,"marginTop");var _4ac=dojo.create("div",{id:this.overlayId+this.id},dojo.body());dojo.style(_4ac,{position:"absolute",width:_4ab.w+"px",height:_4ab.h+"px",left:_4ab.x+"px",top:_4ab.y+"px",zIndex:this.zIndex});dojo.addClass(_4ac,this.overlayClass);return _4ac;},createSpinner:function(size){var _4ad;var _4ae=this._getSpinner(size);var _4af=this.spinnerId+this.id;if(_4ae.cache[_4af]){_4ad=_4ae.cache[_4af];}else{if(_4ae.src.endswith(".swf")){_4ad=this._createSpinnerSwf(_4ae);}else{_4ad=this._createSpinnerImg(_4ae);}_4ae.cache[_4af]=_4ad;}dojo.style(_4ad,{display:"none",visibility:"hidden"});return _4ad;},positionSpinner:function(_4b0,_4b1,_4b2){var _4b3;if(_4b2==dojo.body()){_4b3=dijit.getViewport();}else{_4b3=dojo.coords(_4b1,true);}spinnerData=this.spinnerData;var _4b4=(_4b3.h-spinnerData.height)/2;var _4b5=(_4b3.w-spinnerData.width)/2;dojo.place(_4b0,_4b1);dojo.style(_4b0,{display:"block",position:"relative",visibility:"visible",top:_4b4+"px",left:_4b5+"px"});return _4b0;},_getSpinner:function(size){var _4b6={};switch(size){case ("small"):_4b6=this.smallSpinner;break;case ("medium"):_4b6=this.mediumSpinner;break;case ("large"):default:_4b6=this.largeSpinner;break;}this.spinnerData=_4b6;if(!_4b6.cache){_4b6.cache={};}return _4b6;},_createSpinnerSwf:function(_4b7){var _4b7=dojo.create("embed",{id:this.spinnerId+this.id,name:"FlashProduct",src:_4b7.src,swLiveConnect:true,width:_4b7.width,height:_4b7.height,scale:"noborder",quality:"high",type:"application/x-shockwave-flash",pluginspace:"http://www.macromedia.com/go/getflashplayer",wmode:"transparent"},dojo.body());dojo.style(_4b7,"left","-9999px");return _4b7;},_createSpinnerImg:function(_4b8){var _4b8=dojo.create("img",{id:this.spinnerId,src:_4b8.src,width:_4b8.width,height:_4b8.height},dojo.body());dojo.style(_4b8,"left","-9999px");return _4b8;}});}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:"pw-offerloading",innerHTML:""},this.offerPane));this.panes.add("success",dojo.create("div",{className:"pw-offersuccess",innerHTML:""},this.offerPane));this.panes.add("error",dojo.create("div",{className:"pw-offererror",innerHTML:""},this.offerPane));},onSubscribe:function(evt){dojo.stopEvent(evt);var _4b9=this.validate(this.offerForm);if(!_4b9){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 _4ba=form.email.value;var _4bb=pw.validators.offersignup.profile;var _4bc=dojox.validate.check(form,_4bb);if(_4bc.isSuccessful()){pw.validators.deleteErrorMessages(form);pw.validators.cleanErrors(form,_4bb.fields);return true;}pw.validators.showErrors(form,_4bc,_4bb);return false;},onLoadCallback:function(data){var _4bd=data.success;if(!_4bd){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(_4be){var pane=_4be.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","Thank you for subscribing to our email. Welcome to PhotoWorks!");},showError:function(_4bf){this.hideAll();this.showPane("error",_4bf);}});}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(_4c0,_4c1,perm){var name=perm?"mc_p":"mc_s";return agi.cookie.AGICookie.setCookieValue(name,_4c0,_4c1,null,perm);};agi.cookie.MagicCookie.getCookieValue=function(_4c2){var _4c3=agi.cookie.AGICookie.getCookieValue("mc_s",_4c2);if(!_4c3){_4c3=agi.cookie.AGICookie.getCookieValue("mc_p",_4c2);}return _4c3;};agi.cookie.MagicCookie.delCookieValue=function(_4c4,perm){return agi.cookie.MagicCookie.setCookieValue(_4c4,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");};agi.cookie.getCustomerEmail=function(){return agi.cookie.AGICookie.getCookieValue("customer","email");};agi.cookie.getCustomerAge=function(){try{var v=agi.cookie.AGICookie.getCookieValue("customer","age");if(!v){v="";}age=parseInt(v);if(age<18){v="";}else{if(age>65){v="65";}}return v;}catch(er){return "";}};agi.cookie.getCustomerGender=function(){try{var v=agi.cookie.AGICookie.getCookieValue("customer","gender");if(!v){v="";}return v.toLowerCase();}catch(er){return "";}};}if(!dojo._hasResource["agi.cookie"]){dojo._hasResource["agi.cookie"]=true;dojo.provide("agi.cookie");}if(!dojo._hasResource["agi.storage.TempStorage"]){dojo._hasResource["agi.storage.TempStorage"]=true;dojo.provide("agi.storage.TempStorage");dojo.provide("agi.storage.windowstorage");dojo.provide("agi.storage.sessionstorage");agi.storage._getCurrentTimeStamp=function(){return new Date().getTime();};agi.storage.sessionstorage={identifier:"agi.storage.sessionstorage",get:function(key){var _4c5=sessionStorage.getItem(key);if(_4c5){return dojo.fromJson(_4c5);}},put:function(key,_4c6,_4c7){_4c6=dojo.toJson(_4c6);sessionStorage.setItem(key,_4c6);if(typeof _4c7!="undefined"){_4c7();}}};agi.storage.windowstorage={identifier:"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,_4c8,_4c9){try{var data=dojo.fromJson(window.name);}catch(e){var data={};}if(typeof data=="undefined"){var data={};}data[key]=_4c8;window.name=dojo.toJson(data);if(typeof _4c9!="undefined"){_4c9();}}};dojo.declare("agi.storage.TempStorage",[agi.classes.Identified],{force_reload:false,initialized:false,data:null,sid:null,provider:null,constructor:function(_4ca){if(typeof sessionStorage!="undefined"){this.provider=agi.storage.sessionstorage;}else{this.provider=agi.storage.windowstorage;}this.data={};this.force_reload=_4ca;this.sid=agi.cookie.MagicCookie.getCookieValue("psid");this.initialize();},initialize:function(){this.data=this.provider.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,_4cb){this.data["filler"]=null;this.data[key]=_4cb;this.save();},remove:function(key){delete this.data[key];this.save();},save:function(){this.provider.put(this.sid,this.data,this.onsuccess);},clear:function(){this.data={};this.save();},onsuccess:function(_4cc,key,_4cd){}});}if(!dojo._hasResource["dojo.behavior"]){dojo._hasResource["dojo.behavior"]=true;dojo.provide("dojo.behavior");dojo.behavior=new function(){function _4ce(obj,name){if(!obj[name]){obj[name]=[];}return obj[name];};var _4cf=0;function _4d0(obj,_4d1,func){var _4d2={};for(var x in obj){if(typeof _4d2[x]=="undefined"){if(!func){_4d1(obj[x],x);}else{func.call(_4d1,obj[x],x);}}}};this._behaviors={};this.add=function(_4d3){var _4d4={};_4d0(_4d3,this,function(_4d5,name){var _4d6=_4ce(this._behaviors,name);if(typeof _4d6["id"]!="number"){_4d6.id=_4cf++;}var _4d7=[];_4d6.push(_4d7);if((dojo.isString(_4d5))||(dojo.isFunction(_4d5))){_4d5={found:_4d5};}_4d0(_4d5,function(rule,_4d8){_4ce(_4d7,_4d8).push(rule);});});};var _4d9=function(node,_4da,_4db){if(dojo.isString(_4da)){if(_4db=="found"){dojo.publish(_4da,[node]);}else{dojo.connect(node,_4db,function(){dojo.publish(_4da,arguments);});}}else{if(dojo.isFunction(_4da)){if(_4db=="found"){_4da(node);}else{dojo.connect(node,_4db,_4da);}}}};this.apply=function(){_4d0(this._behaviors,function(_4dc,id){dojo.query(id).forEach(function(elem){var _4dd=0;var bid="_dj_behavior_"+_4dc.id;if(typeof elem[bid]=="number"){_4dd=elem[bid];if(_4dd==(_4dc.length)){return;}}for(var x=_4dd,tver;tver=_4dc[x];x++){_4d0(tver,function(_4de,_4df){if(dojo.isArray(_4de)){dojo.forEach(_4de,function(_4e0){_4d9(elem,_4e0,_4df);});}});}elem[bid]=_4dc.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(_4e1){},wireUp:function(){dojo.query("a.upload_link").connect("onclick",this,this.uploadLinkHandler);},uploadLinkHandler:function(evt){dojo.stopEvent(evt);this.upload();return false;},upload:function(_4e2,_4e3){if(!_4e2){_4e2=window.location.href;}if(!_4e3){_4e3=null;}agi.cookie.MagicCookie.setCookieValue(this.REDIRECT_COOKIE,_4e2,false);if(_4e3!=null){window.location.href=this.UPLOAD_HREF+"?osource="+encodeURIComponent(_4e3);}else{window.location.href=this.UPLOAD_HREF;}},resume:function(_4e4){var _4e5=agi.cookie.MagicCookie.getCookieValue(this.REDIRECT_COOKIE);if(_4e5){agi.cookie.MagicCookie.delCookieValue(this.REDIRECT_COOKIE,false);}else{if(_4e4){_4e5=ahost+this.ALBUMS_BASE_HREF+_4e4;}else{_4e5=ahost+this.MY_PHOTOWORKS_HREF;}}window.location.href=_4e5;},hasReturnPoint:function(){return !!agi.cookie.MagicCookie.getCookieValue(this.REDIRECT_COOKIE);}});}if(!dojo._hasResource["agi.livechat"]){dojo._hasResource["agi.livechat"]=true;dojo.provide("agi.livechat");dojo.declare("agi.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:"Page URL",PAGE_TITLE:"Page Title",CUSTOMER_ID:"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(_4e6){dojo.mixin(this,_4e6);if(_4e6.prefill){for(var k in _4e6.prefill){if(_4e6.prefill[k]){this.prefillValues[k]=_4e6.prefill[k];}}}if(_4e6.agentOnly){for(var k in _4e6.agentOnly){if(_4e6.agentOnly[k]){this.agentOnlyValues[k]=_4e6.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(_4e7,_4e8,_4e9,_4ea,_4eb,_4ec){var _4ed="CHAT_ONLY";this.launchChat(_4e7,_4e8,_4e9,_4ea,_4eb,_4ec,_4ed);},_startChatAndCobrowse:function(_4ee,_4ef,_4f0,_4f1,_4f2,_4f3){var _4f4="COBROWSE";this.launchChat(_4ee,_4ef,_4f0,_4f1,_4f2,_4f3,_4f4);},_startChatWithEscalation:function(_4f5,_4f6,_4f7,_4f8,_4f9,_4fa){var _4fb="COBROWSE_ESCALATION";this.launchChat(_4f5,_4f6,_4f7,_4f8,_4f9,_4fa,_4fb);},launchChat:function(_4fc,_4fd,_4fe,_4ff,_500,_501,_502){this.openInitialWindow();this.finishLaunchingChat(_4fc,_4fd,_4fe,_4ff,_500,_501,_502);},finishLaunchingChat:function(_503,_504,_505,_506,_507,_508,_509){var _50a=this.getChatWindow();this.saveChatParameters(_50a,_503,_504,_505,_506,_507,_508,_509);if(this.alreadyConavigating()){this.handleRecursiveLaunch(_503,_504,_50a);return;}if(this.browserDoesNotSupportDOM2()||this.isIEonMac()){this.handleUnsupportedBrowser(_503,_504,_50a);return;}if(!this.areCookiesEnabled()){this.handleDisabledCookies(_503,_504,_50a);return;}if(window.location.protocol=="https:"){this.createAndSubmitForm();}else{this.checkSSLEnabledAndSubmit(_503,_504);}},createAndSubmitForm:function(){var _50b=this.getChatWindow();var _50c=this.createForm(_50b.serverName,_50b);if(typeof (this.gUseDynamicStartPage)!="undefined"&&this.gUseDynamicStartPage){this.addFormField(_50c,_50b,"DSP_LAUNCHER_PAGE_NAME",this.gDSPLauncherPageName);}this.addFormField(_50c,_50b,"CHAT_WINDOW_WIDTH",this.gChatWindowWidth);this.addFormField(_50c,_50b,"CHAT_WINDOW_PROPERTIES",this.gChatWindowProperties);this.addFormField(_50c,_50b,"ICHANNEL_ID",_50b.iChannel);this.addFormField(_50c,_50b,"ATTACHED_DATA",_50b.attachedData);this.addFormField(_50c,_50b,"ENTER_ON_QUEUE_PAGE",_50b.enterOnQueuePage);this.addFormField(_50c,_50b,"CHAT_LAUNCH_MODE",_50b.chatLaunchMode);this.addFormField(_50c,_50b,"AGENT_VISIBLE_DATA",this.createAgentVisibleDataString(_50b.agentOnlyValues));this.addFormField(_50c,_50b,"REFERRER_URL",window.location.href);var _50d=_50b.prefillValues;for(prefillItem in _50d){this.addFormField(_50c,_50b,prefillItem,_50d[prefillItem]);}_50c.submit();},openInitialWindow:function(){var _50e=window.open("",this.getChatWindowName(),this.getWinProperties());_50e.document.write("<html><body></body></html>");_50e.document.close();this.setChatWindow(_50e);this.origChatWindow=_50e;},createForm:function(_50f,win){var _510=win.document.createElement("form");_510.method="post";_510.target="_self";_510.action=this.gHTTPS+_50f+"/CONAV/CHAT/ChatPreLaunch";win.document.body.appendChild(_510);return _510;},DATA_SEPARATOR:"_HB_",createAgentVisibleDataString:function(_511){var _512="";for(agentItem in _511){if(this.isNonEmptyString(_512)){_512+=this.DATA_SEPARATOR;}_512+=agentItem+this.DATA_SEPARATOR+_511[agentItem];}return _512;},addFormField:function(_513,win,name,_514){if(!this.isNonEmptyString(name)||!this.isNonEmptyString(_514)){return;}var _515=win.document.createElement("input");_515.type="hidden";_515.name=name;_515.value=_514;_513.appendChild(_515);},alreadyConavigating:function(){return (typeof (isHipboneSharedWindow)!="undefined");},handleRecursiveLaunch:function(_516,_517,win){win.location.href=this.gHTTPS+_517+"/CONAV/chat/errorpages/recursiveConav.jsp?ICHANNEL_ID="+_516;},browserDoesNotSupportDOM2:function(){return (null==document.getElementById);},handleUnsupportedBrowser:function(_518,_519,win){win.location.href=this.gHTTPS+_519+"/CONAV/CHAT/ChatPreLaunch?ICHANNEL_ID="+_518;},areCookiesEnabled:function(){var time=(new Date()).getTime();this.setTestCookie(time);if(this.theCookieIsSet(time)){this.removeTestCookie(time);return true;}return false;},setTestCookie:function(_51a){document.cookie="hbcookietest="+_51a;},theCookieIsSet:function(_51b){var _51c=document.cookie;return (this.isNonEmptyString(_51c)&&_51c.indexOf(_51b)>-1);},removeTestCookie:function(_51d){document.cookie="hbcookietest="+_51d+"; expires=Fri, 02-Jan-1970 00:00:00 GMT";},handleDisabledCookies:function(_51e,_51f,win){win.location.href=this.gHTTP+_51f+"/CONAV/chat/errorpages/cookiesDisabled.jsp?ICHANNEL_ID="+_51e;},checkSSLEnabledAndSubmit:function(_520,_521){this.createAndSubmitForm();var _522=new Image(1,1);_522.onerror=dojo.hitch(this,function(){this.handleChatNoSSL(_520,_521);});_522.src=this.gHTTPS+_521+"/CONAV/HTD/Default/shared/images/blank.gif?time="+(new Date()).getTime();},handleChatNoSSL:function(_523,_524){var link=this.gHTTP+_524+"/CONAV/chat/errorpages/sslDisabled.jsp?ICHANNEL_ID="+_523;window.open(link,this.getChatWindowName(),this.getWinProperties());this.getChatWindow().close();},saveChatParameters:function(_525,_526,_527,_528,_529,_52a,_52b,_52c){_525.iChannel=_526;_525.serverName=_527;_525.attachedData=_528;_525.prefillValues=_529;_525.agentOnlyValues=_52a;_525.enterOnQueuePage=_52b;_525.chatLaunchMode=_52c;},setAOLChatWindow:function(_52d){this.setChatWindow(_52d);this.finishLaunchingChat(iChannel,serverName,attachedData,prefillValues,agentOnlyValues,enterOnQueuePage,chatLaunchMode);},gChatLaunchWindow:null,setChatWindow:function(_52e){window.gChatLaunchWindow=_52e;},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.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.livechat.KanaLiveChat],{agentOnlyValues:{PAGE_URL:"www.photoworks.com",PAGE_TITLE:"PhotoWorks Homepage",CUSTOMER_ID:"PhotoWorks Customer"}});}if(!dojo._hasResource["pw.widget.NoChatLightbox"]){dojo._hasResource["pw.widget.NoChatLightbox"]=true;dojo.provide("pw.widget.NoChatLightbox");dojo.declare("pw.widget.NoChatLightbox",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{templateString:"<div>\n\t<div id=\"pw-light-chat-unavailable\" class=\"pw-rc-light\" style=\"position: absolute; top: -20px;\">\n\t\t<div class=\"pw-light-header\">\n\t\t\t<ul>\n\t\t\t\t<li class=\"pw-l-close\">\n\t\t\t\t\t<a href=\".\" onclick=\"dojo.publish('pw/modals/nochat/hide');return false;\">\n\t\t\t\t\t<span></span>Close</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"pw-light-content\">\n\t\t\t<div id=\"pw-chatun-image\">\n\t\t\t\t<img src=\"{{imghost}}/pw/help/chat_unavailable.jpg\" width=\"193\" height=\"80\" alt=\"Live Chat unavailable\" title=\"\" />\n\t\t\t</div>\n\t\t\t<div id=\"pw-chatun-text\">\n\t\t\t\t<p>We're sorry. Chat is unavailable at this time.</p>\n\t\t\t\t<p>For information regarding hours Chat is available, please click the Help link below.</p>\n\t\t\t\t<p id=\"pw-chatun-links\">Please check our online <a href=\"/help\" target=\"_blank\">Help</a> or <a href=\"/help/email-us\" target=\"_blank\">email us</a>.</p>\n\t\t\t</div>        \n\t\t</div>\n\t</div>\n</div>\n",imghost:imghost,postCreate:function(){this.inherited(arguments);dojo.subscribe("pw/modals/nochat/show",dojo.hitch(this,this.show));dojo.subscribe("pw/modals/nochat/hide",dojo.hitch(this,this.hide));dojo.subscribe("pw/modals/hide",dojo.hitch(this,this.hide));}});}if(!dojo._hasResource["pw.controllers.KanaLiveChat"]){dojo._hasResource["pw.controllers.KanaLiveChat"]=true;dojo.provide("pw.controllers.KanaLiveChat");dojo.declare("pw.controllers.KanaLiveChat",[agi.classes.Identified],{url:"/help/is-chat-available",constructor:function(){this.nochat=new pw.widget.NoChatLightbox({lightboxId:"lightbox",loaderId:"loadingImage",overlayId:"pw-overlay",loadnow:false,width:604,height:111,overflow:""});dojo.subscribe("pw/livechat/show",dojo.hitch(this,this.openChat));},openChat:function(_52f){if(_52f!=null){this.startChat(_52f);}else{this.checkServer();}},checkServer:function(){dojo.xhrGet({url:this.url,handleAs:"json",load:dojo.hitch(this,this.checkedServer),sync:true});},checkedServer:function(_530,_531){var _532=_530.enabled;this.startChat(_532);},startChat:function(_533){if(_533){var _534={};_534.gIChannelID=pw.livechat.getChannel();_534.gServer=pw.livechat.url;var _535=agi.cookie.AGICookie.getCookieValue("customer","email");var name=agi.cookie.AGICookie.getCookieValue("customer","name");var _536=agi.cookie.AGICookie.getCookieValue("customer","guest");if(_535&&!_536){_534.prefill={"CUSTOMER_NAME":name,"CUSTOMER_EMAIL":_535};}_534.agentOnly={"CUSTOMER_ID":_535,"PAGE_URL":window.location,"PAGE_TITLE":document.title};this.chat=new pw.livechat.KanaLiveChat(_534);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(_537){_537=_537||{};dojo.mixin(this,_537);this.init();},init:function(){this.node=dojo.byId(this.node);agi.widget.hoverItems.push(this.node);this.idx=agi.widget.hoverItems.length-1;var _538="onmouseover";var _539="onmouseout";if(dojo.isIE==6){_538="onmouseenter";_539="onmouseleave";}this.cxn_handles.push(dojo.connect(this.node,_538,dojo.hitch(this,this.hover)),true);this.cxn_handles.push(dojo.connect(this.node,_539,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.widget.WalletOmnitureTracker"]){dojo._hasResource["pw.widget.WalletOmnitureTracker"]=true;dojo.provide("pw.widget.WalletOmnitureTracker");dojo.declare("pw.widget.WalletOmnitureTracker",[agi.classes.Identified],{wallet:null,constructor:function(){},ping:function(_53a){this.wallet=_53a;var _53b=this.makeVars();omniture.swap_vars_and_ping(_53b);},getVarPrefix:function(){if(dojo.exists("s_ag")){return "s_agi.";}else{return "s_";}},makeVars:function(){var p=this.getVarPrefix();var _53c={};_53c[p+"pageName"]="/WalletModule";if(this.wallet.get_minimized()){}else{}return _53c;}});}if(!dojo._hasResource["dojo.fx.Toggler"]){dojo._hasResource["dojo.fx.Toggler"]=true;dojo.provide("dojo.fx.Toggler");dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(args){var _53d=this;dojo.mixin(_53d,args);_53d.node=args.node;_53d._showArgs=dojo.mixin({},args);_53d._showArgs.node=_53d.node;_53d._showArgs.duration=_53d.showDuration;_53d.showAnim=_53d.showFunc(_53d._showArgs);_53d._hideArgs=dojo.mixin({},args);_53d._hideArgs.node=_53d.node;_53d._hideArgs.duration=_53d.hideDuration;_53d.hideAnim=_53d.hideFunc(_53d._hideArgs);dojo.connect(_53d.showAnim,"beforeBegin",dojo.hitch(_53d.hideAnim,"stop",true));dojo.connect(_53d.hideAnim,"beforeBegin",dojo.hitch(_53d.showAnim,"stop",true));},show:function(_53e){return this.showAnim.play(_53e||0);},hide:function(_53f){return this.hideAnim.play(_53f||0);}});}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var d=dojo,_540={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _541=function(_542){this._index=-1;this._animations=_542||[];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(_541,{_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(_543,_544){if(!this._current){this._current=this._animations[this._index=0];}if(!_544&&this._current.status()=="playing"){return this;}var _545=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_546=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_547=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(_545);d.disconnect(_546);d.disconnect(_547);});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(_548,_549){this.pause();var _54a=this.duration*_548;this._current=null;d.some(this._animations,function(a){if(a.duration<=_54a){this._current=a;return true;}_54a-=a.duration;return false;});if(this._current){this._current.gotoPercent(_54a/this._current.duration,_549);}return this;},stop:function(_54b){if(this._current){if(_54b){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(_541,_540);dojo.fx.chain=function(_54c){return new _541(_54c);};var _54d=function(_54e){this._animations=_54e||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(_54e,function(a){var _54f=a.duration;if(a.delay){_54f+=a.delay;}if(this.duration<_54f){this.duration=_54f;}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","onEnd"],function(evt){self._connects.push(d.connect(self._pseudoAnimation,evt,function(){self._fire(evt,arguments);}));});};d.extend(_54d,{_doAction:function(_550,args){d.forEach(this._animations,function(a){a[_550].apply(a,args);});return this;},_onEnd:function(){if(++this._finished>this._animations.length){this._fire("onEnd");}},_call:function(_551,args){var t=this._pseudoAnimation;t[_551].apply(t,args);},play:function(_552,_553){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(_554,_555){var ms=this.duration*_554;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_555);});this._call("gotoPercent",arguments);return this;},stop:function(_556){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(_54d,_540);dojo.fx.combine=function(_557){return new _54d(_557);};dojo.fx.wipeIn=function(args){var node=args.node=d.byId(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 _558=d.style(node,"height");return Math.max(_558,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.position(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["pw.widget.Wallet"]){dojo._hasResource["pw.widget.Wallet"]=true;dojo.provide("pw.widget.Wallet");dojo.declare("pw.widget.Wallet",[agi.classes.Identified,agi.widget._TemplatedWidget,agi.classes.Adopter],{templateString:"<div class=\"pw-wallet\">\n\n    <div id=\"pw-wallet-head\" style=\"background-image:url({{imghost|safe}}{{image|safe}});\">\n        <a href=\"#\" id=\"pw-wallet-toggle\" onClick=\"dojo.publish('/pw/widget/wallet/toggle'); dojo.stopEvent(event);\"><img id=\"pw-wallet-toggle-close\" src=\"{{imghost|safe}}/pw/page/wallet/button_close.png\" alt=\"close\" /><img id=\"pw-wallet-toggle-open\" src=\"{{imghost|safe}}/pw/page/wallet/button_seeoffers.png\" alt=\"see offers\" /></a>\n    </div>\n\n    <ol id=\"pw-wallet-list\">\n    {% for coupon in coupons %}\n        <li class=\"pw-coupon\" id=\"pw-wallet-coupon-{{coupon.id|safe}}\" style=\"overflow:hidden;\">\n        \t<span class=\"pw-walsubspan-top\"></span> \n            {% if coupon.image != '' %}\n                    <img src=\"{{imghost|safe}}{{coupon.image|safe}}\" width=\"75\" height=\"54\" />\n            {% endif %}\n                <div class=\"pw-wallet-desc\">\n                    <h2>{{coupon.title|safe}}</h2>\n                    <p>{{coupon.description|safe}}<p>\n                    {% if coupon.code != '' %}\n                     <div>   \n                        <div class=\"pw-codetext\" >Code: {{coupon.code|safe}}</div>\n                        <a href=\"#\" class=\"button bn-red-75\" onClick=\"dojo.publish('/pw/widget/wallet/redeem', ['{{coupon.code|safe}}']);dojo.stopEvent(event);\">Redeem</a>\n                     </div>\n                    {% endif %}\n                </div>\n        \n            <div class=\"pw-wallet-detbar\">\n                <div class=\"pw-wallet-details\">\n                \t{% if coupon.detail != '' %}\n                \t<a href=\"#\" class=\"pw-coupondetails\" id=\"pw-coupon-detail-{{coupon.id|safe}}\" onclick=\"dojo.publish('/pw/widget/wallet/detail/toggle', ['{{coupon.id|safe}}']);dojo.stopEvent(event);\">Details</a>\n                \t{% endif %}\n                </div>\n                <div class=\"pw-wallet-expire\">\n                \tExpires: {{coupon.expiration}}\n                </div>\n            </div>\n            <div style=\"clear: both;\"></div>\n            {% if coupon.detail != '' %}\n            <div id=\"pw-coupon-tooltip-{{coupon.id|safe}}\" class=\"pw-coupon-tooltip\" style=\"display:none;\">\n                {{coupon.detail|safe}}\n            </div>\n            {% endif %}\n            <span class=\"pw-walsubspan-bot\"></span>\n        </li>\n    {% endfor %}\n    </ol>\n\t<span id=\"pw-walspan2\"></span>\n</div>\n",ANIMATION_DURATION:750,DETAIL_ANIMATION_DURATION:375,COOKIE_KEY:"miniwallet",coupons:null,header:"Special Offers",size:null,fields:["title","code","image","description","detail","new","expiration"],imghost:imghost,ahost:ahost,shost:shost,animate_redeem:false,tracker:null,wallet_title:"",image:"",constructor:function(){this.coupons=[];this.init();this.tracker=new pw.widget.WalletOmnitureTracker();},init:function(){var _559=dojo.query(".pw-wallet-coupon");_559.forEach(this.build_coupon,this);this.buld_header();dojo.subscribe("/pw/widget/wallet/maximize",this,this.maximize);dojo.subscribe("/pw/widget/wallet/minimize",this,this.minimize);dojo.subscribe("/pw/widget/wallet/toggle",this,this.toggle);dojo.subscribe("/pw/widget/wallet/redeem",this,this.redeem);dojo.subscribe("/pw/widget/wallet/detail/toggle",this,this.toggle_detail);},buld_header:function(){var _55a=dojo.query("ul.pw-wallet-header li.pw-wallet-image");var _55b=dojo.query("ul.pw-wallet-header li.pw-wallet-title");var _55c=dojo.query("ul.pw-wallet-header li.pw-wallet-maximized");var _55d=dojo.query("ul.pw-wallet-header li.pw-wallet-animated");if(_55a.length>0){this.image=_55a[0].innerHTML;}if(_55b.length>0){this.wallet_title=_55b[0].innerHTML;}if(_55c.length>0){if(_55c[0].innerHTML=="1"){this.size="max";}else{if(_55c[0].innerHTML=="-1"){this.size="min";}}}if(_55d.length>0){this.animate_redeem=(_55d[0].innerHTML=="1");}},build_coupon:function(list){var _55e={};dojo.forEach(this.fields,function(_55f){_55e[_55f]=this.get_value(_55f,list);},this);if(!_55e.code){_55e.id=this.coupons.length+"";}else{_55e.id=_55e.code;}this.coupons.push(_55e);},get_value:function(key,_560){var _561=dojo.query(".pw-wallet-"+key,_560);if(_561.length>0){return _561[0].innerHTML;}else{return "";}},buildRendering:function(){if(this.templatePath||this.templateString){this.inherited(arguments);}},postCreate:function(){this.inherited(arguments);this.handles=[];},show:function(){if(this.coupons.length==0){return;}dojo.style(this.domNode,{opacity:0});dojo.place(this.domNode,dojo.body(),"last");if(this.get_minimized()){dojo.style("pw-wallet-list","display","none");dojo.style("pw-wallet-toggle-close","display","none");dojo.style("pw-wallet-toggle-open","display","inline");}else{dojo.style("pw-wallet-toggle-close","display","inline");dojo.style("pw-wallet-toggle-open","display","none");}this.select();dojo.anim(this.domNode,{opacity:1},this.ANIMATION_DURATION).play();dojo.style("pw-wallet-list",{position:"static"});this.tracker.ping(this);},toggle_detail:function(_562){var _563=dojo.byId("pw-coupon-tooltip-"+_562);var _564=dojo.style(_563,"display");dojo.forEach(this.coupons,function(item){var node=dojo.byId("pw-coupon-tooltip-"+item.id);if(!node){return;}var _565=dojo.style(node,"display");if(item.id!=_562&&_565!="none"){dojo.fx.wipeOut({node:dojo.byId("pw-coupon-tooltip-"+item.id),duration:this.DETAIL_ANIMATION_DURATION,onAnimate:dojo.hitch(this,this.correct_div_ie)}).play();}},this);if(_564=="none"){dojo.fx.wipeIn({node:_563,duration:this.DETAIL_ANIMATION_DURATION,onAnimate:dojo.hitch(this,this.correct_div_ie)}).play();}else{dojo.fx.wipeOut({node:_563,duration:this.DETAIL_ANIMATION_DURATION,onAnimate:dojo.hitch(this,this.correct_div_ie)}).play();}},toggle:function(){var _566=dojo.style("pw-wallet-list","display");if(_566=="none"){this.maximize();}else{this.minimize();}},toggle_button:function(){var _567=dojo.style("pw-wallet-list","height");if(_567<10){dojo.style("pw-wallet-toggle-close","display","none");dojo.style("pw-wallet-toggle-open","display","inline");}else{dojo.style("pw-wallet-toggle-close","display","inline");dojo.style("pw-wallet-toggle-open","display","none");}dojo.style("pw-wallet-list",{position:"static"});},correct_div_ie:function(_568){if(dojo.isIE!=7){return;}var _569=dojo.query("div.pw-wallet").style("height")[0];dojo.query("div.pw-wallet").style("height",_569+"px");dojo.query("div.pw-wallet").style("height","auto");},maximize:function(){this.set_minimized(0);dojo.style("pw-wallet-list",{position:"relative"});dojo.fx.wipeIn({node:"pw-wallet-list",duration:this.ANIMATION_DURATION,onEnd:dojo.hitch(this,this.toggle_button),onAnimate:dojo.hitch(this,this.correct_div_ie)}).play();},minimize:function(){this.set_minimized(1);dojo.style("pw-wallet-list",{position:"relative"});dojo.fx.wipeOut({node:"pw-wallet-list",duration:this.ANIMATION_DURATION,onEnd:dojo.hitch(this,this.toggle_button),onAnimate:dojo.hitch(this,this.correct_div_ie)}).play();},redeem:function(_56a){var _56b=[];var _56c=dojo.query("#pw-wallet-list li");var _56d=dojo.byId("pw-wallet-coupon-"+_56a);var idx=_56c.indexOf(_56d);agi.cookie.MagicCookie.setCookieValue("coupon",_56a,false);dojo.query("#pw-wallet-list li").removeClass("pw-coupon-selected");dojo.query("#pw-wallet-coupon-"+_56a).addClass("pw-coupon-selected");if(document.location.pathname=="/cart"&&agx.currentPage.controller.updateSummary!=null){agx.currentPage.controller.updateSummary();}if(idx==0||!this.animate_redeem){return;}dojo.style("pw-wallet-list",{position:"relative"});var _56e=dojo.coords(_56c[0]);var _56f=dojo.coords(_56d);var top=-1*(_56f.y-_56e.y);var _570=_56f.h;_56b.push(dojo.fx.slideTo({node:_56d,top:top,left:0,unit:"px"}));for(var i=0;i<idx;i++){_56b.push(dojo.fx.slideTo({node:_56c[i],top:_570,left:0,unit:"px"}));}var _571=dojo.fx.combine(_56b);_571.onEnd=dojo.hitch(this,this.select);_571.duration=this.ANIMATION_DURATION;_571.play();},select:function(_572){if(agi.cookie.MagicCookie.getCookieValue("coupon")&&!_572){_572=agi.cookie.MagicCookie.getCookieValue("coupon");}if(!_572){return;}if(this.animate_redeem){dojo.place(dojo.byId("pw-wallet-coupon-"+_572),dojo.byId("pw-wallet-list"),"first");}dojo.query("#pw-wallet-list li").style("top","0px");dojo.query("#pw-wallet-list li").removeClass("pw-coupon-selected");dojo.query("#pw-wallet-coupon-"+_572).addClass("pw-coupon-selected");dojo.style("pw-wallet-list",{position:"static"});},set_minimized:function(_573){agi.cookie.MagicCookie.setCookieValue(this.COOKIE_KEY,_573,false);},get_minimized:function(){var _574=agi.cookie.MagicCookie.getCookieValue(this.COOKIE_KEY);if(this.size=="max"){return false;}else{if(this.size=="min"){return true;}else{if(_574&&_574=="1"){return true;}else{return false;}}}}});}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(){if(typeof agx.currentPage.disableTempStorage=="undefined"||!agx.currentPage.disableTempStorage){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 _575=new pw.upload.Upload();_575.wireUp();this.applyIEHovers();this.setNavpathCookie();this.wallet=new pw.widget.Wallet();this.wallet.show();},applyIEHovers:function(){if(dojo.isIE==6){dojo.query(".pw-mypw-thumb").forEach(dojo.hitch(this,function(node){var _576=new agi.widget.HoverItem({node:node,className:"pw-mypw-thumb-hover"});}));}},setNavpathCookie:function(){var _577=agx.currentPage.navpath;if(_577){agi.cookie.MagicCookie.setCookieValue("navpath",_577,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;this.successCallback=info.callback;dojo.byId("pw-continue-submit").value=info.button;dojo.byId("pw-message").innerHTML=info.message;},_onSubmit:function(evt){dojo.stopEvent(evt);if(this.successCallback){this.successCallback();}else{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)));method=agx.currentPage.uploadMethod;if(method=="advanced"&&dojo.byId("pw-upload-applet")!=null){dojo.style("pw-upload-applet","visibility","hidden");}},onClose:function(evt){this.onCancel();if(evt){dojo.stopEvent(evt);}this.hide();dojo.forEach(this.handles,function(_578){dojo.disconnect(_578);});this.handles=[];},onCancel:function(){method=agx.currentPage.uploadMethod;if(method=="advanced"&&dojo.byId("pw-upload-applet")!=null){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(_579){dojo.mixin(this,_579);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;if(this.overlayId=="pw-overlay-overlay"){dojo.style("pw-overlay-overlay",{opacity:0.3,backgroundColor:"#000000"});dojo.style("pw-overlay",{opacity:0});}},_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);}if(this.overlayId=="pw-overlay-overlay"){dojo.style("pw-overlay-overlay",{opacity:0});dojo.style("pw-overlay",{opacity:0.3});}this.hide();dojo.forEach(this.handles,function(_57a){dojo.disconnect(_57a);});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(_57b){dojo.mixin(this,_57b);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.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),_57c=dojo.coords(node,true);args.duration=args.duration||1000;args.words=args.words||false;var _57d=(args.text&&typeof (args.text)=="string")?args.text:node.innerHTML,_57e=s.height,_57f=s.width,_580=[];dojo.style(node,{height:cs.height,width:cs.width});var _581=/(<\/?\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 _582=(typeof args.text=="string")?args.text.match(reg):node.innerHTML.match(reg);var html="";var _583=0;var _584=0;for(var i=0;i<_582.length;i++){var _585=_582[i];if(!_585.match(_581)){html+="<span>"+_585+"</span>";_583++;}else{html+=_585;}}node.innerHTML=html;function _586(_587){var next=_587.nextSibling;if(_587.tagName=="SPAN"&&_587.childNodes.length==1&&_587.firstChild.nodeType==3){var _588=dojo.coords(_587,true);_584++;dojo.style(_587,{padding:0,margin:0,top:(args.crop?"0px":_588.t+"px"),left:(args.crop?"0px":_588.l+"px"),display:"inline"});var _589=args.pieceAnimation(_587,_588,_57c,_584,_583);if(dojo.isArray(_589)){_580=_580.concat(_589);}else{_580[_580.length]=_589;}}else{if(_587.firstChild){_586(_587.firstChild);}}if(next){_586(next);}};_586(node.firstChild);var anim=dojo.fx.combine(_580);dojo.connect(anim,"onEnd",anim,function(){node.innerHTML=_57d;dojo.style(node,{height:_57e,width:_57f});});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(_58a,_58b,_58c,_58d,_58e){var _58f=_58b.h;var _590=_58b.w;var _591=args.distance*2;var _592=args.duration;var _593=parseFloat(_58a.style.top);var _594=parseFloat(_58a.style.left);var _595=0;var _596=0;var _597=0;if(args.random){var seed=(Math.random()*args.random)+Math.max(1-args.random,0);_591*=seed;_592*=seed;_595=((args.unhide&&args.sync)||(!args.unhide&&!args.sync))?(args.duration-_592):0;_596=Math.random()-0.5;_597=Math.random()-0.5;}var _598=((_58c.h-_58f)/2-(_58b.y-_58c.y));var _599=((_58c.w-_590)/2-(_58b.x-_58c.x));var _59a=Math.sqrt(Math.pow(_599,2)+Math.pow(_598,2));var _59b=_593-_598*_591+_59a*_597;var _59c=_594-_599*_591+_59a*_596;var _59d=dojo.animateProperty({node:_58a,duration:_592,delay:_595,easing:(args.easing||(args.unhide?dojo.fx.easing.sinOut:dojo.fx.easing.circOut)),beforeBegin:(args.unhide?function(){if(args.fade){dojo.style(_58a,"opacity",0);}_58a.style.position=args.crop?"relative":"absolute";_58a.style.top=_59b+"px";_58a.style.left=_59c+"px";}:function(){_58a.style.position=args.crop?"relative":"absolute";}),properties:{top:(args.unhide?{start:_59b,end:_593}:{start:_593,end:_59b}),left:(args.unhide?{start:_59c,end:_594}:{start:_594,end:_59c})}});if(args.fade){var _59e=dojo.animateProperty({node:_58a,duration:_592,delay:_595,easing:(args.fadeEasing||dojo.fx.easing.quadOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})}});return (args.unhide?[_59e,_59d]:[_59d,_59e]);}else{return _59d;}};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 _59f=Math.abs(args.random);args.pieceAnimation=function(_5a0,_5a1,_5a2,_5a3,_5a4){var _5a5=_5a1.h;var _5a6=_5a1.w;var _5a7=args.interval||(args.duration/(1.5*_5a4));var _5a8=(args.duration-_5a4*_5a7);var _5a9=Math.random()*_5a4*_5a7;var _5aa=(args.reverseOrder||args.distance<0)?(_5a3*_5a7):((_5a4-_5a3)*_5a7);var _5ab=_5a9*_59f+Math.max(1-_59f,0)*_5aa;var _5ac={};if(args.unhide){_5ac.top={start:(parseFloat(_5a0.style.top)-_5a2.h*args.distance),end:parseFloat(_5a0.style.top)};if(args.fade){_5ac.opacity={start:0,end:1};}}else{_5ac.top={end:(parseFloat(_5a0.style.top)+_5a2.h*args.distance)};if(args.fade){_5ac.opacity={end:0};}}var _5ad=dojo.animateProperty({node:_5a0,duration:_5a8,delay:_5ab,easing:(args.easing||(args.unhide?dojo.fx.easing.sinIn:dojo.fx.easing.circIn)),properties:_5ac,beforeBegin:(args.unhide?function(){if(args.fade){dojo.style(_5a0,"opacity",0);}_5a0.style.position=args.crop?"relative":"absolute";_5a0.style.top=_5ac.top.start+"px";}:function(){_5a0.style.position=args.crop?"relative":"absolute";})});return _5ad;};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 _5ae=Math.abs(args.random);args.pieceAnimation=function(_5af,_5b0,_5b1,_5b2,_5b3){var _5b4=args.interval||(args.duration/(1.5*_5b3));var _5b5=(args.duration-_5b3*_5b4);var _5b6=Math.random()*_5b3*_5b4;var _5b7=(args.reverseOrder)?((_5b3-_5b2)*_5b4):(_5b2*_5b4);var _5b8=_5b6*_5ae+Math.max(1-_5ae,0)*_5b7;var _5b9=dojo.animateProperty({node:_5af,duration:_5b5,delay:_5b8,easing:(args.easing||dojo.fx.easing.sinInOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})},beforeBegin:(args.unhide?function(){dojo.style(_5af,"opacity",0);}:undefined)});return _5b9;};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 _5ba=Math.abs(args.random);var _5bb=10;args.pieceAnimation=function(_5bc,_5bd,_5be,_5bf,_5c0){var _5c1=args.interval||(args.duration/(1.5*_5c0)),text=("textContent" in _5bc)?_5bc.textContent:_5bc.innerText,_5c2=text.match(/\s/g);if(typeof (args.wordDelay)=="undefined"){args.wordDelay=_5c1*2;}if(!args.unhide){_5bb=(_5c0-_5bf-1)*_5c1;}var _5c3,_5c4;if(args.fixed){if(args.unhide){var _5c3=function(){dojo.style(_5bc,"opacity",0);};}}else{if(args.unhide){var _5c3=function(){_5bc.style.display="none";};var _5c4=function(){_5bc.style.display="inline";};}else{var _5c4=function(){_5bc.style.display="none";};}}var _5c5=dojo.animateProperty({node:_5bc,duration:1,delay:_5bb,easing:(args.easing||dojo.fx.easing.sinInOut),properties:{opacity:(args.unhide?{start:0,end:1}:{end:0})},beforeBegin:_5c3,onEnd:_5c4});if(args.unhide){var _5c6=Math.random()*text.length*_5c1;var _5c7=_5c6*_5ba/2+Math.max(1-_5ba/2,0)*args.wordDelay;_5bb+=_5c6*_5ba+Math.max(1-_5ba,0)*_5c1*text.length+(_5c7*(_5c2&&text.lastIndexOf(_5c2[_5c2.length-1])==text.length-1));}return _5c5;};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(_5c8){dojo.mixin(this,_5c8);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(_5c9){this.showNow=_5c9;if(!this.url){return;}dojo.xhrGet({url:this.url,handleAs:"json",load:dojo.hitch(this,this.gotData)});},gotData:function(_5ca,_5cb){this.data=_5ca;if(this.showNow){this.show();}},show:function(){if(!this.data){return this.loadData(true);}var _5cc=dojo.byId(this.overlayId);this.original_opacity=dojo.style(_5cc).opacity;this.original_background_color=dojo.style(_5cc).backgroundColor;dojo.style(_5cc,{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 _5cd=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 _5ce=dojo.byId(this.innerContentId);var _5cf={node:_5ce,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(_5ce,"visibility","visible");var _5d0=page.showFor!=null?page.showFor:5000;if(_5cd!=null){_5cf.onEnd=dojo.hitch(this,function(){dojo.style(_5ce,"visibility","hidden");this.showPage(i+1);});var anim=dojox.fx.text.explode(_5cf);setTimeout(function(){anim.play();},_5d0);}else{setTimeout(dojo.hitch(this,this.hide),_5d0);}},makeLIs:function(_5d1){html="";for(var i=0;i<_5d1.length;i++){html=html+"<li>"+_5d1[i]+"</li>";}return html;},hide:function(){this.lightbox.hide();var _5d2=dojo.byId(this.overlayId);dojo.style(_5d2,{opacity:this.original_opacity,backgroundColor:this.original_background_color});}});}if(!dojo._hasResource["agi.ovoid.Genesis"]){dojo._hasResource["agi.ovoid.Genesis"]=true;dojo.provide("agi.ovoid.Genesis");dojo.declare("agi.ovoid.Genesis",[agi.ovoid.Konami],{code:"66,65,39,39,65,67,38,40,65,13"});}if(!dojo._hasResource["agi.ovoid.Release"]){dojo._hasResource["agi.ovoid.Release"]=true;dojo.provide("agi.ovoid.Release");dojo.declare("agi.ovoid.Release",[agi.classes.Identified,agi.widget.Lightbox,agi.classes.Adopter],{__doc__:"Lightbox widget for large image preview on design (double click thumbs).",templateString:"<div>\n\n<div id=\"pw-light-release\" 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('agi/modals/release/hide'); return false;\"><span></span>Close</a>\n            </li>\n        </ul>\n    </div>\n    \n    <div class=\"pw-light-content\" style=\"text-align: center;\">\n\t\t<h1 style=\"width:100%; color:#c42216; font-size: 28px; line-height: 34px; font-weight: bold; margin-bottom: 15px;\"></h1>\n\t\t<h2 style=\"font-size: 20px; line-height: 26px; color: #c42216; font-weight: bold; margin-bottom: 15px;\"></h2>\n        <div id=\"release-content\">\n        </div>\n    </div>\n</div>\n\n</div>\n",imghost:imghost,title:"PhotoWorks.com",subtitle:"",embed:"",data:null,dataUrl:null,showNow:false,constructor:function(){},postCreate:function(){this.inherited(arguments);dojo.subscribe("agi/modals/release/show",dojo.hitch(this,this.onOpen));dojo.subscribe("agi/modals/release/hide",dojo.hitch(this,this.onClose));dojo.subscribe("agi/modals/hide",dojo.hitch(this,this.onClose));this.handles=[];this.showNow=false;},onOpen:function(){if(!this.data){return this.loadData(true);}this.show();},onClose:function(evt){if(evt){dojo.stopEvent(evt);}this.hide();dojo.forEach(this.handles,dojo.disconnect);this.handles=[];},loadData:function(_5d3){this.showNow=_5d3;if(!this.dataUrl){return;}dojo.xhrGet({url:this.dataUrl,handleAs:"json",load:dojo.hitch(this,this.gotData)});},gotData:function(_5d4,_5d5){if(this.showNow){this.show();}this.data=_5d4;var _5d6=dojo.query("#"+this.lightboxId+" .pw-light-content h1")[0];var _5d7=dojo.query("#"+this.lightboxId+" .pw-light-content h2")[0];var _5d8=dojo.query("#"+this.lightboxId+" .pw-light-content div")[0];dojo.html.set(_5d6,this.data.title);dojo.html.set(_5d7,this.data.subtitle);dojo.html.set(_5d8,this.data.content);}});}if(!dojo._hasResource["pw.focus"]){dojo._hasResource["pw.focus"]=true;dojo.provide("pw.focus");window.onYouTubePlayerReady=function(_5d9){var _5da=document.getElementById("pw-ytplayer");_5da.addEventListener("onStateChange","pw.focus.stateChange");};pw.focus.stateChange=function(_5db){if(_5db==0){pw.focus.credits.hide();}else{if(_5db==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/Z0GFRcFm-aY?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});pw.focus.release=new agi.ovoid.Release({dataUrl:"/credits/pfr2010",lightboxId:"release_lightbox",loaderId:"loadingImage",overlayId:"pw-overlay",loadnow:false,width:660,top:35,overflow:""});var _5dc=new agi.ovoid.Konami({callback:function(){pw.focus.credits.show();}});var _5dd=new agi.ovoid.Genesis({callback:function(){pw.focus.release.onOpen();}});};dojo.addOnLoad(pw.focus.init);}dojo.publish("/pw.layers.core/loaded/");dojo.i18n._preloadLocalizations("pw.layers.nls.core",["ROOT","ar","ca","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","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);

