/* WSGC Copyright */
dojo.provide("pip");if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1=dojo.doc;if(_1.selection){var s=_1.selection;if(s.type=="Text"){return !s.createRange().htmlText.length;}else{return !s.createRange().length;}}else{var _3=dojo.global;var _4=_3.getSelection();if(dojo.isString(_4)){return !_4;}else{return _4.isCollapsed||!_4.toString();}}},getBookmark:function(){var _5,_6=dojo.doc.selection;if(_6){var _7=_6.createRange();if(_6.type.toUpperCase()=="CONTROL"){if(_7.length){_5=[];var i=0,_9=_7.length;while(i<_9){_5.push(_7.item(i++));}}else{_5=null;}}else{_5=_7.getBookmark();}}else{if(window.getSelection){_6=dojo.global.getSelection();if(_6){_7=_6.getRangeAt(0);_5=_7.cloneRange();}}else{console.warn("No idea how to store the current selection for this browser!");}}return _5;},moveToBookmark:function(_a){var _b=dojo.doc;if(_b.selection){var _c;if(dojo.isArray(_a)){_c=_b.body.createControlRange();dojo.forEach(_a,function(n){_c.addElement(n);});}else{_c=_b.selection.createRange();_c.moveToBookmark(_a);}_c.select();}else{var _e=dojo.global.getSelection&&dojo.global.getSelection();if(_e&&_e.removeAllRanges){_e.removeAllRanges();_e.addRange(_a);}else{console.warn("No idea how to restore selection for this browser!");}}},getFocus:function(_f,_10){return {node:_f&&dojo.isDescendant(dijit._curFocus,_f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_10||dojo.global,dijit.getBookmark):null,openedForWindow:_10};},focus:function(_11){if(!_11){return;}var _12="node" in _11?_11.node:_11,_13=_11.bookmark,_14=_11.openedForWindow;if(_12){var _15=(_12.tagName.toLowerCase()=="iframe")?_12.contentWindow:_12;if(_15&&_15.focus){try{_15.focus();}catch(e){}}dijit._onFocusNode(_12);}if(_13&&dojo.withGlobal(_14||dojo.global,dijit.isCollapsed)){if(_14){_14.focus();}try{dojo.withGlobal(_14||dojo.global,dijit.moveToBookmark,null,[_13]);}catch(e){}}},_activeStack:[],registerWin:function(_16){if(!_16){_16=window;}dojo.connect(_16.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var doc=_16.document;if(doc){if(dojo.isIE){doc.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(evt.srcElement);}});doc.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(evt.srcElement);});}else{doc.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);doc.addEventListener("blur",function(evt){dijit._onBlurNode(evt.target);},true);}}doc=null;},_onBlurNode:function(_1d){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(_1e){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _1f=[];try{while(_1e){if(_1e.dijitPopupParent){_1e=dijit.byId(_1e.dijitPopupParent).domNode;}else{if(_1e.tagName&&_1e.tagName.toLowerCase()=="body"){if(_1e===dojo.body()){break;}_1e=dijit.getDocumentWindow(_1e.ownerDocument).frameElement;}else{var id=_1e.getAttribute&&_1e.getAttribute("widgetId");if(id){_1f.unshift(id);}_1e=_1e.parentNode;}}}}catch(e){}dijit._setStack(_1f);},_onFocusNode:function(_21){if(!_21){return;}if(_21.nodeName&&_21.nodeName.toLowerCase()=="body"){return;}if(_21.nodeType==9){var _22=dijit.getDocumentWindow(_21).frameElement;if(!_22){return;}_21=_22;}dijit._onTouchNode(_21);if(_21==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_21;dojo.publish("focusNode",[_21]);},_setStack:function(_23){var _24=dijit._activeStack;dijit._activeStack=_23;for(var _25=0;_25<Math.min(_24.length,_23.length);_25++){if(_24[_25]!=_23[_25]){break;}}for(var i=_24.length-1;i>=_25;i--){var _27=dijit.byId(_24[i]);if(_27){_27._focused=false;_27._hasBeenBlurred=true;if(_27._onBlur){_27._onBlur();}if(_27._setStateClass){_27._setStateClass();}dojo.publish("widgetBlur",[_27]);}}for(i=_25;i<_23.length;i++){_27=dijit.byId(_23[i]);if(_27){_27._focused=true;if(_27._onFocus){_27._onFocus();}if(_27._setStateClass){_27._setStateClass();}dojo.publish("widgetFocus",[_27]);}}}});dojo.addOnLoad(dijit.registerWin);}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_28){if(this._hash[_28.id]){throw new Error("Tried to register widget with id=="+_28.id+" but that id is already registered");}this._hash[_28.id]=_28;},remove:function(id){delete this._hash[id];},forEach:function(_2a){for(var id in this._hash){_2a(this._hash[id]);}},filter:function(_2c){var res=new dijit.WidgetSet();this.forEach(function(_2e){if(_2c(_2e)){res.add(_2e);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_31){return _31.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_32){var id;do{id=_32+"_"+(_32 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_32]:dijit._widgetTypeCtr[_32]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.registry.forEach(function(_34){_34.destroy();});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_36){return dijit.registry.byId(_36.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_37){while(_37){if(_37.getAttribute&&_37.getAttribute("widgetId")){return dijit.registry.byId(_37.getAttribute("widgetId"));}_37=_37.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_38){var _39=dojo.style(_38);return (_39.visibility!="hidden")&&(_39.visibility!="collapsed")&&(_39.display!="none")&&(dojo.attr(_38,"type")!="hidden");};dijit.isTabNavigable=function(_3a){if(dojo.hasAttr(_3a,"disabled")){return false;}var _3b=dojo.hasAttr(_3a,"tabindex");var _3c=dojo.attr(_3a,"tabindex");if(_3b&&_3c>=0){return true;}var _3d=_3a.nodeName.toLowerCase();if(((_3d=="a"&&dojo.hasAttr(_3a,"href"))||dijit._tabElements[_3d])&&(!_3b||_3c>=0)){return true;}return false;};dijit._getTabNavigable=function(_3e){var _3f,_40,_41,_42,_43,_44;var _45=function(_46){dojo.query("> *",_46).forEach(function(_47){var _48=dijit._isElementShown(_47);if(_48&&dijit.isTabNavigable(_47)){var _49=dojo.attr(_47,"tabindex");if(!dojo.hasAttr(_47,"tabindex")||_49==0){if(!_3f){_3f=_47;}_40=_47;}else{if(_49>0){if(!_41||_49<_42){_42=_49;_41=_47;}if(!_43||_49>=_44){_44=_49;_43=_47;}}}}if(_48&&_47.nodeName.toUpperCase()!="SELECT"){_45(_47);}});};if(dijit._isElementShown(_3e)){_45(_3e);}return {first:_3f,last:_40,lowest:_41,highest:_43};};dijit.getFirstInTabbingOrder=function(_4a){var _4b=dijit._getTabNavigable(dojo.byId(_4a));return _4b.lowest?_4b.lowest:_4b.first;};dijit.getLastInTabbingOrder=function(_4c){var _4d=dijit._getTabNavigable(dojo.byId(_4c));return _4d.last?_4d.last:_4d.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_4e){this.pairs=[];this.returnWrappers=_4e||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_4f,_50,_51,_52,_53){this.pairs[((_53)?"unshift":"push")]([_4f,_50,_51,_52]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _55=this.pairs[i];if(_55[1].apply(this,arguments)){if((_55[3])||(this.returnWrappers)){return _55[2];}else{return _55[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_56){for(var i=0;i<this.pairs.length;i++){var _58=this.pairs[i];if(_58[0]==_56){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _59=dojo.global;var _5a=dojo.doc;var w=0,h=0;var de=_5a.documentElement;var dew=de.clientWidth,deh=de.clientHeight;if(dojo.isMozilla){var _60,_61,_62,_63;var dbw=_5a.body.clientWidth;if(dbw>dew){_60=dew;_62=dbw;}else{_62=dew;_60=dbw;}var dbh=_5a.body.clientHeight;if(dbh>deh){_61=deh;_63=dbh;}else{_63=deh;_61=dbh;}w=(_62>_59.innerWidth)?_60:_62;h=(_63>_59.innerHeight)?_61:_63;}else{if(!dojo.isOpera&&_59.innerWidth){w=_59.innerWidth;h=_59.innerHeight;}else{if(dojo.isIE&&de&&deh){w=dew;h=deh;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _66=dojo._docScroll();return {w:w,h:h,l:_66.x,t:_66.y};};dijit.placeOnScreen=function(_67,pos,_69,_6a){var _6b=dojo.map(_69,function(_6c){return {corner:_6c,pos:pos};});return dijit._place(_67,_6b);};dijit._place=function(_6d,_6e,_6f){var _70=dijit.getViewport();if(!_6d.parentNode||String(_6d.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_6d);}var _71=null;dojo.some(_6e,function(_72){var _73=_72.corner;var pos=_72.pos;if(_6f){_6f(_6d,_72.aroundCorner,_73);}var _75=_6d.style;var _76=_75.display;var _77=_75.visibility;_75.visibility="hidden";_75.display="";var mb=dojo.marginBox(_6d);_75.display=_76;_75.visibility=_77;var _79=(_73.charAt(1)=="L"?pos.x:Math.max(_70.l,pos.x-mb.w)),_7a=(_73.charAt(0)=="T"?pos.y:Math.max(_70.t,pos.y-mb.h)),_7b=(_73.charAt(1)=="L"?Math.min(_70.l+_70.w,_79+mb.w):pos.x),_7c=(_73.charAt(0)=="T"?Math.min(_70.t+_70.h,_7a+mb.h):pos.y),_7d=_7b-_79,_7e=_7c-_7a,_7f=(mb.w-_7d)+(mb.h-_7e);if(_71==null||_7f<_71.overflow){_71={corner:_73,aroundCorner:_72.aroundCorner,x:_79,y:_7a,w:_7d,h:_7e,overflow:_7f};}return !_7f;});_6d.style.left=_71.x+"px";_6d.style.top=_71.y+"px";if(_71.overflow&&_6f){_6f(_6d,_71.aroundCorner,_71.corner);}return _71;};dijit.placeOnScreenAroundNode=function(_80,_81,_82,_83){_81=dojo.byId(_81);var _84=_81.style.display;_81.style.display="";var _85=_81.offsetWidth;var _86=_81.offsetHeight;var _87=dojo.coords(_81,true);_81.style.display=_84;return dijit._placeOnScreenAroundRect(_80,_87.x,_87.y,_85,_86,_82,_83);};dijit.placeOnScreenAroundRectangle=function(_88,_89,_8a,_8b){return dijit._placeOnScreenAroundRect(_88,_89.x,_89.y,_89.width,_89.height,_8a,_8b);};dijit._placeOnScreenAroundRect=function(_8c,x,y,_8f,_90,_91,_92){var _93=[];for(var _94 in _91){_93.push({aroundCorner:_94,corner:_91[_94],pos:{x:x+(_94.charAt(1)=="L"?0:_8f),y:y+(_94.charAt(0)=="T"?0:_90)}});}return dijit._place(_8c,_93,_92);};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(_99,_9a,_9b,_9c){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _9f=[],_a0=1000,_a1=1;this.prepare=function(_a2){dojo.body().appendChild(_a2);var s=_a2.style;if(s.display=="none"){s.display="";}s.visibility="hidden";s.position="absolute";s.top="-9999px";};this.open=function(_a4){var _a5=_a4.popup,_a6=_a4.orient||{"BL":"TL","TL":"BL"},_a7=_a4.around,id=(_a4.around&&_a4.around.id)?(_a4.around.id+"_dropdown"):("popup_"+_a1++);var _a9=dojo.doc.createElement("div");dijit.setWaiRole(_a9,"presentation");_a9.id=id;_a9.className="dijitPopup";_a9.style.zIndex=_a0+_9f.length;_a9.style.left=_a9.style.top="0px";_a9.style.visibility="hidden";if(_a4.parent){_a9.dijitPopupParent=_a4.parent.id;}dojo.body().appendChild(_a9);var s=_a5.domNode.style;s.display="";s.visibility="";s.position="";_a9.appendChild(_a5.domNode);var _ab=new dijit.BackgroundIframe(_a9);var _ac=_a7?dijit.placeOnScreenAroundElement(_a9,_a7,_a6,_a5.orient?dojo.hitch(_a5,"orient"):null):dijit.placeOnScreen(_a9,_a4,_a6=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);_a9.style.visibility="visible";var _ad=[];var _ae=function(){for(var pi=_9f.length-1;pi>0&&_9f[pi].parent===_9f[pi-1].widget;pi--){}return _9f[pi];};_ad.push(dojo.connect(_a9,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_a4.onCancel){dojo.stopEvent(evt);_a4.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _b1=_ae();if(_b1&&_b1.onCancel){_b1.onCancel();}}}}));if(_a5.onCancel){_ad.push(dojo.connect(_a5,"onCancel",null,_a4.onCancel));}_ad.push(dojo.connect(_a5,_a5.onExecute?"onExecute":"onChange",null,function(){var _b2=_ae();if(_b2&&_b2.onExecute){_b2.onExecute();}}));_9f.push({wrapper:_a9,iframe:_ab,widget:_a5,parent:_a4.parent,onExecute:_a4.onExecute,onCancel:_a4.onCancel,onClose:_a4.onClose,handlers:_ad});if(_a5.onOpen){_a5.onOpen(_ac);}return _ac;};this.close=function(_b3){while(dojo.some(_9f,function(_b4){return _b4.widget==_b3;})){var top=_9f.pop(),_b6=top.wrapper,_b7=top.iframe,_b8=top.widget,_b9=top.onClose;if(_b8.onClose){_b8.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_b8||!_b8.domNode){return;}this.prepare(_b8.domNode);_b7.destroy();dojo._destroyElement(_b6);if(_b9){_b9();}}};}();dijit._frames=new function(){var _ba=[];this.pop=function(){var _bb;if(_ba.length){_bb=_ba.pop();_bb.style.display="";}else{if(dojo.isIE){var _bc=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _bd="<iframe src='"+_bc+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_bb=dojo.doc.createElement(_bd);}else{_bb=dojo.doc.createElement("iframe");_bb.src="javascript:\"\"";_bb.className="dijitBackgroundIframe";}_bb.tabIndex=-1;dojo.body().appendChild(_bb);}return _bb;};this.push=function(_be){_be.style.display="";if(dojo.isIE){_be.style.removeExpression("width");_be.style.removeExpression("height");}_ba.push(_be);};}();if(dojo.isIE<7){dojo.addOnLoad(function(){var f=dijit._frames;dojo.forEach([f.pop()],f.push);});}dijit.BackgroundIframe=function(_c0){if(!_c0.id){throw new Error("no id");}if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _c1=dijit._frames.pop();_c0.appendChild(_c1);if(dojo.isIE){_c1.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_c0.id+"').offsetWidth");_c1.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_c0.id+"').offsetHeight");}this.iframe=_c1;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_c2){_c2=dojo.byId(_c2);var _c3=_c2.ownerDocument.body;var _c4=_c3.parentNode;if(dojo.isFF==2||_c2==_c3||_c2==_c4){_c2.scrollIntoView(false);return;}var rtl=!dojo._isBodyLtr();var _c6=dojo.doc.compatMode!="BackCompat";var _c7=(_c6&&!dojo.isSafari)?_c4:_c3;function addPseudoAttrs(_c8){var _c9=_c8.parentNode;var _ca=_c8.offsetParent;if(_ca==null){_c8=_c7;_ca=_c4;_c9=null;}_c8._offsetParent=(_ca==_c3)?_c7:_ca;_c8._parent=(_c9==_c3)?_c7:_c9;_c8._start={H:_c8.offsetLeft,V:_c8.offsetTop};_c8._scroll={H:_c8.scrollLeft,V:_c8.scrollTop};_c8._renderedSize={H:_c8.offsetWidth,V:_c8.offsetHeight};var bp=dojo._getBorderExtents(_c8);_c8._borderStart={H:bp.l,V:bp.t};_c8._borderSize={H:bp.w,V:bp.h};_c8._clientSize=(_c8._offsetParent==_c4&&dojo.isSafari&&_c6)?{H:_c4.clientWidth,V:_c4.clientHeight}:{H:_c8.clientWidth,V:_c8.clientHeight};_c8._scrollBarSize={V:null,H:null};for(var dir in _c8._scrollBarSize){var _cd=_c8._renderedSize[dir]-_c8._clientSize[dir]-_c8._borderSize[dir];_c8._scrollBarSize[dir]=(_c8._clientSize[dir]>0&&_cd>=15&&_cd<=17)?_cd:0;}_c8._isScrollable={V:null,H:null};for(dir in _c8._isScrollable){var _ce=dir=="H"?"V":"H";_c8._isScrollable[dir]=_c8==_c7||_c8._scroll[dir]||_c8._scrollBarSize[_ce];}};var _cf=_c2;while(_cf!=null){addPseudoAttrs(_cf);var _d0=_cf._parent;if(_d0){_d0._child=_cf;}_cf=_d0;}for(var dir in _c7._renderedSize){_c7._renderedSize[dir]=Math.min(_c7._clientSize[dir],_c7._renderedSize[dir]);}var _d2=_c2;while(_d2!=_c7){_cf=_d2._parent;if(_cf.tagName=="TD"){var _d3=_cf._parent._parent._parent;if(_d3._offsetParent==_d2._offsetParent&&_cf._offsetParent!=_d2._offsetParent){_cf=_d3;}}var _d4=_d2==_c7||(_cf._offsetParent!=_d2._offsetParent);for(dir in _d2._start){var _d5=dir=="H"?"V":"H";if(rtl&&dir=="H"&&(dojo.isSafari||dojo.isIE)&&_cf._clientSize.H>0){var _d6=_cf.scrollWidth-_cf._clientSize.H;if(_d6>0){_cf._scroll.H-=_d6;}}if(dojo.isIE&&_cf._offsetParent.tagName=="TABLE"){_cf._start[dir]-=_cf._offsetParent._borderStart[dir];_cf._borderStart[dir]=_cf._borderSize[dir]=0;}if(_cf._clientSize[dir]==0){_cf._renderedSize[dir]=_cf._clientSize[dir]=_cf._child._clientSize[dir];if(rtl&&dir=="H"){_cf._start[dir]-=_cf._renderedSize[dir];}}else{_cf._renderedSize[dir]-=_cf._borderSize[dir]+_cf._scrollBarSize[dir];}_cf._start[dir]+=_cf._borderStart[dir];var _d7=_d2._start[dir]-(_d4?0:_cf._start[dir])-_cf._scroll[dir];var _d8=_d7+_d2._renderedSize[dir]-_cf._renderedSize[dir];var _d9,_da=(dir=="H")?"scrollLeft":"scrollTop";var _db=(dir=="H"&&rtl);var _dc=_db?-_d8:_d7;var _dd=_db?-_d7:_d8;if(_dc<=0){_d9=_dc;}else{if(_dd<=0){_d9=0;}else{if(_dc<_dd){_d9=_dc;}else{_d9=_dd;}}}var _de=0;if(_d9!=0){var _df=_cf[_da];_cf[_da]+=_db?-_d9:_d9;_de=_cf[_da]-_df;_d7-=_de;_dd-=_db?-_de:_de;}_cf._renderedSize[dir]=_d2._renderedSize[dir]+_cf._scrollBarSize[dir]-((_cf._isScrollable[dir]&&_dd>0)?_dd:0);_cf._start[dir]+=(_d7>=0||!_cf._isScrollable[dir])?_d7:0;}_d2=_cf;}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo;var ie=d.isIE;var _e2=d.isOpera;var maj=Math.floor;var ff=d.isFF;var _e5=d.boxModel.replace(/-/,"");var _e6={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_e2,dj_opera8:maj(_e2)==8,dj_opera9:maj(_e2)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};_e6["dj_"+_e5]=true;var _e7=dojo.doc.documentElement;for(var p in _e6){if(_e6[p]){if(_e7.className){_e7.className+=" "+p;}else{_e7.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){_e7.className+=" dijitRtl";for(var p in _e6){if(_e6[p]){_e7.className+=" "+p+"-rtl";}}}});})();}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_eb,_ec,_ed,obj,_ef,_f0){if(obj!=this._obj){this.stop();this._initialDelay=_f0||500;this._subsequentDelay=_ef||0.9;this._obj=obj;this._evt=evt;this._node=_ec;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_eb,_ed);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_f1,_f2,_f3,_f4,_f5,_f6){if(_f2.keyCode){_f2.charOrCode=_f2.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_f2.charCode){_f2.charOrCode=String.fromCharCode(_f2.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_f1,"onkeypress",this,function(evt){if(evt.charOrCode==_f2.charOrCode&&(_f2.ctrlKey===undefined||_f2.ctrlKey==evt.ctrlKey)&&(_f2.altKey===undefined||_f2.altKey==evt.ctrlKey)&&(_f2.shiftKey===undefined||_f2.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_f2,_f3,_f1,_f4,_f2,_f5,_f6);}else{if(dijit.typematic._obj==_f2){dijit.typematic.stop();}}}),dojo.connect(_f1,"onkeyup",this,function(evt){if(dijit.typematic._obj==_f2){dijit.typematic.stop();}})];},addMouseListener:function(_f9,_fa,_fb,_fc,_fd){var dc=dojo.connect;return [dc(_f9,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);}),dc(_f9,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_f9,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_f9,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(_f9,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_104,_105,_106,_107,_108,_109,_10a){return this.addKeyListener(_105,_106,_107,_108,_109,_10a).concat(this.addMouseListener(_104,_107,_108,_109,_10a));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.doc.createElement("div");div.id="a11yTestNode";div.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().appendChild(div);var cs=dojo.getComputedStyle(div);if(cs){var _10d=cs.backgroundImage;var _10e=(cs.borderTopColor==cs.borderRightColor)||(_10d!=null&&(_10d=="none"||_10d=="url(invalid-url:)"));dojo[_10e?"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 _111=this.getWaiRole(elem);if(role){return (_111.indexOf(role)>-1);}else{return (_111.length>0);}},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _115=(theRole=dojo.attr(elem,"role"))?theRole:"";if(dojo.isFF<3||!this._XhtmlRoles.test(_115)){dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);}else{if((" "+_115+" ").indexOf(" "+role+" ")<0){var _116=dojo.trim(_115.replace(this._XhtmlRoles,""));var _117=dojo.trim(_115.replace(_116,""));dojo.attr(elem,"role",_117+(_117?" ":"")+role);}}},removeWaiRole:function(elem,role){var _11a=dojo.attr(elem,"role");if(!_11a){return;}if(role){var _11b=dojo.isFF<3?"wairole:"+role:role;var t=dojo.trim((" "+_11a+" ").replace(" "+_11b+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_11e){if(dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_11e);}else{return elem.hasAttribute?elem.hasAttribute("aria-"+_11e):!!elem.getAttribute("aria-"+_11e);}},getWaiState:function(elem,_120){if(dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_120);}else{var _121=elem.getAttribute("aria-"+_120);return _121?_121:"";}},setWaiState:function(elem,_123,_124){if(dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_123,_124);}else{elem.setAttribute("aria-"+_123,_124);}},removeWaiState:function(elem,_126){if(dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_126);}else{elem.removeAttribute("aria-"+_126);}}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_127,_128){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 _129=dojo.date.stamp._isoRegExp.exec(_127);var _12a=null;if(_129){_129.shift();if(_129[1]){_129[1]--;}if(_129[6]){_129[6]*=1000;}if(_128){_128=new Date(_128);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _128["get"+prop]();}).forEach(function(_12c,_12d){if(_129[_12d]===undefined){_129[_12d]=_12c;}});}_12a=new Date(_129[0]||1970,_129[1]||0,_129[2]||1,_129[3]||0,_129[4]||0,_129[5]||0,_129[6]||0);var _12e=0;var _12f=_129[7]&&_129[7].charAt(0);if(_12f!="Z"){_12e=((_129[8]||0)*60)+(Number(_129[9])||0);if(_12f!="-"){_12e*=-1;}}if(_12f){_12e-=_12a.getTimezoneOffset();}if(_12e){_12a.setTime(_12a.getTime()+_12e*60000);}}return _12a;};dojo.date.stamp.toISOString=function(_130,_131){var _=function(n){return (n<10)?"0"+n:n;};_131=_131||{};var _134=[];var _135=_131.zulu?"getUTC":"get";var date="";if(_131.selector!="time"){var year=_130[_135+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_130[_135+"Month"]()+1),_(_130[_135+"Date"]())].join("-");}_134.push(date);if(_131.selector!="date"){var time=[_(_130[_135+"Hours"]()),_(_130[_135+"Minutes"]()),_(_130[_135+"Seconds"]())].join(":");var _139=_130[_135+"Milliseconds"]();if(_131.milliseconds){time+="."+(_139<100?"0":"")+_(_139);}if(_131.zulu){time+="Z";}else{if(_131.selector!="time"){var _13a=_130.getTimezoneOffset();var _13b=Math.abs(_13a);time+=(_13a>0?"-":"+")+_(Math.floor(_13b/60))+":"+_(_13b%60);}}_134.push(time);}return _134.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _13d=d._scopeName+"Type";var qry="["+_13d+"]";function val2type(_13f){if(d.isString(_13f)){return "string";}if(typeof _13f=="number"){return "number";}if(typeof _13f=="boolean"){return "boolean";}if(d.isFunction(_13f)){return "function";}if(d.isArray(_13f)){return "array";}if(_13f instanceof Date){return "date";}if(_13f instanceof d._Url){return "url";}return "object";};function str2obj(_140,type){switch(type){case "string":return _140;case "number":return _140.length?Number(_140):NaN;case "boolean":return typeof _140=="boolean"?_140:!(_140.toLowerCase()=="false");case "function":if(d.isFunction(_140)){_140=_140.toString();_140=d.trim(_140.substring(_140.indexOf("{")+1,_140.length-1));}try{if(_140.search(/[^\w\.]+/i)!=-1){_140=d.parser._nameAnonFunc(new Function(_140),this);}return d.getObject(_140,false);}catch(e){return new Function();}case "array":return _140?_140.split(/\s*,\s*/):[];case "date":switch(_140){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_140);}case "url":return d.baseUrl+_140;default:return d.fromJson(_140);}};var _142={};function getClassInfo(_143){if(!_142[_143]){var cls=d.getObject(_143);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_143+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _145=cls.prototype;var _146={};for(var name in _145){if(name.charAt(0)=="_"){continue;}var _148=_145[name];_146[name]=val2type(_148);}_142[_143]={cls:cls,params:_146};}return _142[_143];};this._functionFromScript=function(_149){var _14a="";var _14b="";var _14c=_149.getAttribute("args");if(_14c){d.forEach(_14c.split(/\s*,\s*/),function(part,idx){_14a+="var "+part+" = arguments["+idx+"]; ";});}var _14f=_149.getAttribute("with");if(_14f&&_14f.length){d.forEach(_14f.split(/\s*,\s*/),function(part){_14a+="with("+part+"){";_14b+="}";});}return new Function(_14a+_149.innerHTML+_14b);};this.instantiate=function(_151){var _152=[];d.forEach(_151,function(node){if(!node){return;}var type=node.getAttribute(_13d);if((!type)||(!type.length)){return;}var _155=getClassInfo(type);var _156=_155.cls;var ps=_156._noScript||_156.prototype._noScript;var _158={};var _159=node.attributes;for(var name in _155.params){var item=_159.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _15c=item.value;switch(name){case "class":_15c=node.className;break;case "style":_15c=node.style&&node.style.cssText;}var _15d=_155.params[name];_158[name]=str2obj(_15c,_15d);}if(!ps){var _15e=[],_15f=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_160){var _161=_160.getAttribute("event"),type=_160.getAttribute("type"),nf=d.parser._functionFromScript(_160);if(_161){if(type=="dojo/connect"){_15e.push({event:_161,func:nf});}else{_158[_161]=nf;}}else{_15f.push(nf);}});}var _163=_156["markupFactory"];if(!_163&&_156["prototype"]){_163=_156.prototype["markupFactory"];}var _164=_163?_163(_158,node,_156):new _156(_158,node);_152.push(_164);var _165=node.getAttribute("jsId");if(_165){d.setObject(_165,_164);}if(!ps){d.forEach(_15e,function(_166){d.connect(_164,_166.event,null,_166.func);});d.forEach(_15f,function(func){func.call(_164);});}});d.forEach(_152,function(_168){if(_168&&_168.startup&&!_168._started&&(!_168.getParent||!_168.getParent())){_168.startup();}});return _152;};this.parse=function(_169){var list=d.query(qry,_169);var _16b=this.instantiate(list);return _16b;};}();(function(){var _16c=function(){if(dojo.config["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_16c);}else{dojo._loaders.unshift(_16c);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_16d,_16e){var jpn="$joinpoint";var nso=(_16e||dojo.parser._anon);if(dojo.isIE){var cn=_16d["__dojoNameCache"];if(cn&&nso[cn]===_16d){return _16d["__dojoNameCache"];}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_16d;return ret;};}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"connect",function(_173,_174){if(_173&&dojo.isFunction(_173._onConnect)){_173._onConnect(_174);}});dijit._connectOnUseEventHandler=function(_175){};(function(){var _176={};var _177=function(dc){if(!_176[dc]){var r=[];var _17a;var _17b=dojo.getObject(dc).prototype;for(var _17c in _17b){if(dojo.isFunction(_17b[_17c])&&(_17a=_17c.match(/^_set([a-zA-Z]*)Attr$/))&&_17a[1]){r.push(_17a[1].charAt(0).toLowerCase()+_17a[1].substr(1));}}_176[dc]=r;}return _176[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(_17d,_17e){this.create(_17d,_17e);},create:function(_17f,_180){this.srcNodeRef=dojo.byId(_180);this._connects=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_17f){this.params=_17f;dojo.mixin(this,_17f);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();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 _182=function(attr,_184){if((_184.params&&attr in _184.params)||_184[attr]){_184.attr(attr,_184[attr]);}};for(var attr in this.attributeMap){_182(attr,this);}dojo.forEach(_177(this.declaredClass),function(a){if(!(a in this.attributeMap)){_182(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.doc.createElement("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_187){this.destroyDescendants(_187);this.destroy(_187);},destroy:function(_188){this.uninitialize();dojo.forEach(this._connects,function(_189){dojo.forEach(_189,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){if(w.destroy){w.destroy();}});this.destroyRendering(_188);dijit.registry.remove(this.id);},destroyRendering:function(_18b){if(this.bgIframe){this.bgIframe.destroy(_18b);delete this.bgIframe;}if(this.domNode){if(!_18b){dojo._destroyElement(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_18b){dojo._destroyElement(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_18c){dojo.forEach(this.getDescendants(),function(_18d){if(_18d.destroy){_18d.destroy(_18c);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_18f){if(_18f in this._deferredConnects){var _190=this[this._deferredConnects[_18f]||"domNode"];this.connect(_190,_18f.toLowerCase(),this[_18f]);delete this._deferredConnects[_18f];}},_setClassAttr:function(_191){var _192=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_192,this["class"]);this["class"]=_191;dojo.addClass(_192,_191);},_setStyleAttr:function(_193){var _194=this[this.attributeMap["style"]||"domNode"];if(_194.style.cssText){_194.style.cssText+="; "+_193;}else{_194.style.cssText=_193;}this["style"]=_193;},setAttribute:function(attr,_196){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_196);},_attrToDom:function(attr,_198){var _199=this.attributeMap[attr];dojo.forEach(dojo.isArray(_199)?_199:[_199],function(_19a){var _19b=this[_19a.node||_19a||"domNode"];var type=_19a.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_198)){_198=dojo.hitch(this,_198);}if(/^on[A-Z][a-zA-Z]*$/.test(attr)){attr=attr.toLowerCase();}dojo.attr(_19b,attr,_198);break;case "innerHTML":_19b.innerHTML=_198;break;case "class":dojo.removeClass(_19b,this[attr]);dojo.addClass(_19b,_198);break;}},this);this[attr]=_198;},attr:function(name,_19e){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _1a1=this._getAttrNames(name);if(args==2){if(this[_1a1.s]){return this[_1a1.s](_19e)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_19e);}this[name]=_19e;}return this;}else{if(this[_1a1.g]){return this[_1a1.g]();}else{return this[name];}}},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){if(this.containerNode){var list=dojo.query("[widgetId]",this.containerNode);return list.map(dijit.byNode);}else{return [];}},nodesWithKeyClick:["input","button"],connect:function(obj,_1a7,_1a8){var d=dojo;var dco=d.hitch(d,"connect",obj);var _1ab=[];if(_1a7=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){var m=d.hitch(this,_1a8);_1ab.push(dco("onkeydown",this,function(e){if(!d.isFF&&e.keyCode==d.keys.ENTER){return m(e);}else{if(e.keyCode==d.keys.SPACE){d.stopEvent(e);}}}),dco("onkeyup",this,function(e){if(e.keyCode==d.keys.SPACE){return m(e);}}));if(d.isFF){_1ab.push(dco("onkeypress",this,function(e){if(e.keyCode==d.keys.ENTER){return m(e);}}));}}_1a7="onclick";}_1ab.push(dco(_1a7,this,_1a8));this._connects.push(_1ab);return _1ab;},disconnect:function(_1b0){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_1b0){dojo.forEach(_1b0,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_1b2,_1b3){if(_1b2["declaredClass"]&&_1b2["addChild"]){_1b2.addChild(this,_1b3);}else{dojo.place(this.domNode,_1b2,_1b3);}return this;}});})();}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_1bd,map,_1bf,_1c0){_1c0=_1c0||dojo.global;_1bf=(!_1bf)?function(v){return v;}:dojo.hitch(_1c0,_1bf);return _1bd.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_1c2,key,_1c4){var _1c5=dojo.getObject(key,false,map);if(_1c4){_1c5=dojo.getObject(_1c4,false,_1c0).call(_1c0,_1c5,key);}return _1bf(_1c5,key).toString();});};dojo.string.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["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){var _1c9=this.declaredClass,_1ca=this;return dojo.string.substitute(tmpl,this,function(_1cb,key){if(key.charAt(0)=="!"){_1cb=_1ca[key.substr(1)];}if(typeof _1cb=="undefined"){throw new Error(_1c9+" template:"+key);}if(_1cb==null){return "";}return key.charAt(0)=="!"?_1cb:_1cb.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _1cd=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_1cd)){node=dijit._Templated._createNodesFromText(this._stringRepl(_1cd))[0];}else{node=_1cd.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);var _1cf=this.srcNodeRef;if(_1cf&&_1cf.parentNode){_1cf.parentNode.replaceChild(node,_1cf);}if(this.widgetsInTemplate){var cw=(this._supportingWidgets=dojo.parser.parse(node));this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(_1cf);},_fillContent:function(_1d3){var dest=this.containerNode;if(_1d3&&dest){while(_1d3.hasChildNodes()){dest.appendChild(_1d3.firstChild);}}},_attachTemplateNodes:function(_1d5,_1d6){_1d6=_1d6||function(n,p){return n.getAttribute(p);};var _1d9=dojo.isArray(_1d5)?_1d5:(_1d5.all||_1d5.getElementsByTagName("*"));var x=dojo.isArray(_1d5)?0:-1;var _1db={};for(;x<_1d9.length;x++){var _1dc=(x==-1)?_1d5:_1d9[x];if(this.widgetsInTemplate&&_1d6(_1dc,"dojoType")){continue;}var _1dd=_1d6(_1dc,"dojoAttachPoint");if(_1dd){var _1de,_1df=_1dd.split(/\s*,\s*/);while((_1de=_1df.shift())){if(dojo.isArray(this[_1de])){this[_1de].push(_1dc);}else{this[_1de]=_1dc;}}}var _1e0=_1d6(_1dc,"dojoAttachEvent");if(_1e0){var _1e1,_1e2=_1e0.split(/\s*,\s*/);var trim=dojo.trim;while((_1e1=_1e2.shift())){if(_1e1){var _1e4=null;if(_1e1.indexOf(":")!=-1){var _1e5=_1e1.split(":");_1e1=trim(_1e5[0]);_1e4=trim(_1e5[1]);}else{_1e1=trim(_1e1);}if(!_1e4){_1e4=_1e1;}this.connect(_1dc,_1e1,_1e4);}}}var role=_1d6(_1dc,"waiRole");if(role){dijit.setWaiRole(_1dc,role);}var _1e7=_1d6(_1dc,"waiState");if(_1e7){dojo.forEach(_1e7.split(/\s*,\s*/),function(_1e8){if(_1e8.indexOf("-")!=-1){var pair=_1e8.split("-");dijit.setWaiState(_1dc,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_1ea,_1eb,_1ec){var _1ed=dijit._Templated._templateCache;var key=_1eb||_1ea;var _1ef=_1ed[key];if(_1ef){if(!_1ef.ownerDocument||_1ef.ownerDocument==dojo.doc){return _1ef;}dojo._destroyElement(_1ef);}if(!_1eb){_1eb=dijit._Templated._sanitizeTemplateString(dojo._getText(_1ea));}_1eb=dojo.string.trim(_1eb);if(_1ec||_1eb.match(/\$\{([^\}]+)\}/g)){return (_1ed[key]=_1eb);}else{return (_1ed[key]=dijit._Templated._createNodesFromText(_1eb)[0]);}};dijit._Templated._sanitizeTemplateString=function(_1f0){if(_1f0){_1f0=_1f0.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _1f1=_1f0.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_1f1){_1f0=_1f1[1];}}else{_1f0="";}return _1f0;};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _1f2=dijit._Templated._templateCache;for(var key in _1f2){var _1f4=_1f2[key];if(!isNaN(_1f4.nodeType)){dojo._destroyElement(_1f4);}delete _1f2[key];}});}(function(){var _1f5={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};var tn;dijit._Templated._createNodesFromText=function(text){if(tn&&tn.ownerDocument!=dojo.doc){dojo._destroyElement(tn);tn=undefined;}if(!tn){tn=dojo.doc.createElement("div");tn.style.display="none";dojo.body().appendChild(tn);}var _1f8="none";var _1f9=text.replace(/^\s+/,"");for(var type in _1f5){var map=_1f5[type];if(map.re.test(_1f9)){_1f8=type;text=map.pre+text+map.post;break;}}tn.innerHTML=text;if(tn.normalize){tn.normalize();}var tag={cell:"tr",row:"tbody",section:"table"}[_1f8];var _1fd=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;var _1fe=[];while(_1fd.firstChild){_1fe.push(_1fd.removeChild(_1fd.firstChild));}tn.innerHTML="";return _1fe;};})();dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Contained",null,{getParent:function(){for(var p=this.domNode.parentNode;p;p=p.parentNode){var id=p.getAttribute&&p.getAttribute("widgetId");if(id){var _201=dijit.byId(id);return _201.isContainer?_201:null;}}return null;},_getSibling:function(_202){var node=this.domNode;do{node=node[_202+"Sibling"];}while(node&&node.nodeType!=1);if(!node){return null;}var id=node.getAttribute("widgetId");return dijit.byId(id);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_206,_207){var _208=this.containerNode;if(_207&&typeof _207=="number"){var _209=dojo.query("> [widgetId]",_208);if(_209&&_209.length>=_207){_208=_209[_207-1];_207="after";}}dojo.place(_206.domNode,_208,_207);if(this._started&&!_206._started){_206.startup();}},removeChild:function(_20a){if(typeof _20a=="number"&&_20a>0){_20a=this.getChildren()[_20a];}if(!_20a||!_20a.domNode){return;}var node=_20a.domNode;node.parentNode.removeChild(node);},_nextElement:function(node){do{node=node.nextSibling;}while(node&&node.nodeType!=1);return node;},_firstElement:function(node){node=node.firstChild;if(node&&node.nodeType!=1){node=this._nextElement(node);}return node;},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);},hasChildren:function(){return !!this._firstElement(this.containerNode);},destroyDescendants:function(_20e){dojo.forEach(this.getChildren(),function(_20f){_20f.destroyRecursive(_20e);});},_getSiblingOfChild:function(_210,dir){var node=_210.domNode;var _213=(dir>0?"nextSibling":"previousSibling");do{node=node[_213];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node?dijit.byNode(node):null;},getIndexOfChild:function(_214){var _215=this.getChildren();for(var i=0,c;c=_215[i];i++){if(c==_214){return i;}}return -1;}});dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_218,_219){var _21a=this._keyNavCodes={};var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_218,function(code){_21a[code]=prev;});dojo.forEach(_219,function(code){_21a[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_21f,_220){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_21f);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusNext:function(){if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){this.focusedChild.focusNext();return;}var _221=this._getNextFocusableChild(this.focusedChild,1);if(_221.getFocalNodes){this.focusChild(_221,_221.getFocalNodes()[0]);}else{this.focusChild(_221);}},focusPrev:function(){if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){this.focusedChild.focusPrev();return;}var _222=this._getNextFocusableChild(this.focusedChild,-1);if(_222.getFocalNodes){var _223=_222.getFocalNodes();this.focusChild(_222,_223[_223.length-1]);}else{this.focusChild(_222);}},focusChild:function(_224,node){if(_224){if(this.focusedChild&&_224!==this.focusedChild){this._onChildBlur(this.focusedChild);}this.focusedChild=_224;if(node&&_224.focusFocalNode){_224.focusFocalNode(node);}else{_224.focus();}}},_startupChild:function(_226){if(_226.getFocalNodes){dojo.forEach(_226.getFocalNodes(),function(node){dojo.attr(node,"tabindex",-1);this._connectNode(node);},this);}else{var node=_226.focusNode||_226.domNode;if(_226.isFocusable()){dojo.attr(node,"tabindex",-1);}this._connectNode(node);}},_connectNode:function(node){this.connect(node,"onfocus","_onNodeFocus");this.connect(node,"onblur","_onNodeBlur");},_onContainerFocus:function(evt){if(evt.target===this.domNode){this.focusFirstChild();}},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();dojo.stopEvent(evt);}},_onNodeFocus:function(evt){dojo.attr(this.domNode,"tabindex",-1);var _22e=dijit.getEnclosingWidget(evt.target);if(_22e&&_22e.isFocusable()){this.focusedChild=_22e;}dojo.stopEvent(evt);},_onNodeBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabindex",this.tabIndex);}dojo.stopEvent(evt);},_onChildBlur:function(_230){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_231,dir){if(_231){_231=this._getSiblingOfChild(_231,dir);}var _233=this.getChildren();for(var i=0;i<_233.length;i++){if(!_231){_231=_233[(dir>0)?0:(_233.length-1)];}if(_231.isFocusable()){return _231;}_231=this._getSiblingOfChild(_231,dir);}return null;}});}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");dojo.addClass(this.domNode,this.baseClass);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_235){_235.startup();});if(!this.getParent||!this.getParent()){this.resize();this.connect(dojo.global,"onresize","resize");}this.inherited(arguments);},resize:function(_236,_237){var node=this.domNode;if(_236){dojo.marginBox(node,_236);if(_236.t){node.style.top=_236.t+"px";}if(_236.l){node.style.left=_236.l+"px";}}var mb=_237||{};dojo.mixin(mb,_236||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(node),mb);}var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var be=dojo._getBorderExtents(node,cs);var bb=this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)};var pe=dojo._getPadExtents(node,cs);this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_23f){if(_23f.baseClass){dojo.addClass(_23f.domNode,this.baseClass+"-"+_23f.baseClass);}},addChild:function(_240,_241){this.inherited(arguments);if(this._started){this._setupChild(_240);}},removeChild:function(_242){if(_242.baseClass){dojo.removeClass(_242.domNode,this.baseClass+"-"+_242.baseClass);}this.inherited(arguments);}});dijit.layout.marginBox2contentBox=function(node,mb){var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var pb=dojo._getPadBorderExtents(node,cs);return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};};(function(){var _248=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_24b,dim){_24b.resize?_24b.resize(dim):dojo.marginBox(_24b.domNode,dim);dojo.mixin(_24b,dojo.marginBox(_24b.domNode));dojo.mixin(_24b,dim);};dijit.layout.layoutChildren=function(_24d,dim,_24f){dim=dojo.mixin({},dim);dojo.addClass(_24d,"dijitLayoutContainer");_24f=dojo.filter(_24f,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_24f,function(item){return item.layoutAlign=="client";}));dojo.forEach(_24f,function(_252){var elm=_252.domNode,pos=_252.layoutAlign;var _255=elm.style;_255.left=dim.l+"px";_255.top=dim.t+"px";_255.bottom=_255.right="auto";dojo.addClass(elm,"dijitAlign"+_248(pos));if(pos=="top"||pos=="bottom"){size(_252,{w:dim.w});dim.h-=_252.h;if(pos=="top"){dim.t+=_252.h;}else{_255.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_252,{h:dim.h});dim.w-=_252.w;if(pos=="left"){dim.l+=_252.w;}else{_255.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_252,dim);}}}});};})();}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),_setDisabledAttr:function(_256){this.disabled=_256;dojo.attr(this.focusNode,"disabled",_256);dijit.setWaiState(this.focusNode,"disabled",_256);if(_256){this._hovering=false;this._active=false;this.focusNode.removeAttribute("tabIndex");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_257){dojo.deprecated("setDisabled("+_257+") is deprecated. Use attr('disabled',"+_257+") instead.","","2.0");this.attr("disabled",_257);},_onFocus:function(e){dijit.scrollIntoView(this.domNode);this.inherited(arguments);},_onMouse:function(_259){var _25a=_259.currentTarget;if(_25a&&_25a.getAttribute){this.stateModifier=_25a.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_259.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _25b=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_25b);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _25c=this.baseClass.split(" ");function multiply(_25d){_25c=_25c.concat(dojo.map(_25c,function(c){return c+_25d;}),"dijit"+_25d);};if(this.checked){multiply("Checked");}if(this.state){multiply(this.state);}if(this.selected){multiply("Selected");}if(this.disabled){multiply("Disabled");}else{if(this.readOnly){multiply("ReadOnly");}else{if(this._active){multiply(this.stateModifier+"Active");}else{if(this._focused){multiply("Focused");}if(this._hovering){multiply(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_260={};dojo.forEach(tn.className.split(" "),function(c){_260[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _260[c];});}dojo.forEach(_25c,function(c){_260[c]=true;});var _264=[];for(var c in _260){_264.push(c);}tn.className=_264.join(" ");this._stateClasses=_25c;},compare:function(val1,val2){if((typeof val1=="number")&&(typeof val2=="number")){return (isNaN(val1)&&isNaN(val2))?0:(val1-val2);}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_268){},_onChangeActive:false,_handleOnChange:function(_269,_26a){this._lastValue=_269;if(this._lastValueReported==undefined&&(_26a===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_269;}if((this.intermediateChanges||_26a||_26a===undefined)&&((typeof _269!=typeof this._lastValueReported)||this.compare(_269,this._lastValueReported)!=0)){this._lastValueReported=_269;if(this._onChangeActive){this.onChange(_269);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._layoutHackHandle){clearTimeout(this._layoutHackHandle);}this.inherited(arguments);},setValue:function(_26b){dojo.deprecated("dijit.form._FormWidget:setValue("+_26b+") is deprecated.  Use attr('value',"+_26b+") instead.","","2.0");this.attr("value",_26b);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},_layoutHack:function(){if(dojo.isFF==2&&!this._layoutHackHandle){var node=this.domNode;var old=node.style.opacity;node.style.opacity="0.999";this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){this._layoutHackHandle=null;node.style.opacity=old;}),0);}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{value:""}),postCreate:function(){if(dojo.isIE||dojo.isSafari){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_26e,_26f){this.value=_26e;this._handleOnChange(_26e,_26f);},_getValueAttr:function(_270){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_valueChanged:function(){var v=this.attr("value");var lv=this._lastValueReported;return ((v!==null&&(v!==undefined)&&v.toString)?v.toString():"")!==((lv!==null&&(lv!==undefined)&&lv.toString)?lv.toString():"");},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}else{if(dojo.isSafari){te=document.createEvent("Events");te.initEvent("keypress",true,true);te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.target.dispatchEvent(te);}}}},_onKeyPress:function(e){if(e.charOrCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey&&this._valueChanged()){this.undo();dojo.stopEvent(e);return false;}else{if(this.intermediateChanges){var _276=this;setTimeout(function(){_276._handleOnChange(_276.attr("value"),false);},0);}}return true;}});}if(!dojo._hasResource["dijit.dijit"]){dojo._hasResource["dijit.dijit"]=true;dojo.provide("dijit.dijit");}if(!dojo._hasResource["dijit.form.Button"]){dojo._hasResource["dijit.form.Button"]=true;dojo.provide("dijit.form.Button");dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:"<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\" \n\t\t\t\tname=\"${name}\" type=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" \n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span \n\t\t\t\t></span \n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\" \n\t\t\t\t\tid=\"${id}_label\"  \n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){if(this.disabled||this.readOnly){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){if(e.type!="click"){dojo.stopEvent(e);}if(this._onClick(e)===false){e.preventDefault();}else{if(this.type=="submit"&&!this.focusNode.form){for(var node=this.domNode;node.parentNode;node=node.parentNode){var _27a=dijit.byNode(node);if(_27a&&typeof _27a._onSubmit=="function"){_27a._onSubmit(e);break;}}}}},_fillContent:function(_27b){if(_27b&&!("label" in this.params)){this.attr("label",_27b.innerHTML);}},postCreate:function(){if(this.showLabel==false){dojo.addClass(this.containerNode,"dijitDisplayNone");}dojo.setSelectable(this.focusNode,false);this.inherited(arguments);},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_27e){dojo.deprecated("dijit.form.Button.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_27e);},_setLabelAttr:function(_27f){this.containerNode.innerHTML=this.label=_27f;this._layoutHack();if(this.showLabel==false&&!this.params.title){this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");}}});dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\" \n\t\t\t\ttype=\"${type}\" name=\"${name}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode\" \n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" \n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"  \n\t\t\t\t\tdojoAttachPoint=\"containerNode,popupStateNode\" \n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n",_fillContent:function(){if(this.srcNodeRef){var _280=dojo.query("*",this.srcNodeRef);dijit.form.DropDownButton.superclass._fillContent.call(this,_280[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}if(!this.dropDown){var _281=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_281);delete this.dropDownContainer;}dijit.popup.prepare(this.dropDown.domNode);this.inherited(arguments);},destroyDescendants:function(){if(this.dropDown){this.dropDown.destroyRecursive();delete this.dropDown;}this.inherited(arguments);},_onArrowClick:function(e){if(this.disabled||this.readOnly){return;}this._toggleDropDown();},_onDropDownClick:function(e){var _284=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;if(!_284||e.detail!=0||this._seenKeydown){this._onArrowClick(e);}this._seenKeydown=false;},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled||this.readOnly){return;}if(e.charOrCode==dojo.keys.DOWN_ARROW){if(!this.dropDown||this.dropDown.domNode.style.visibility=="hidden"){dojo.stopEvent(e);this._toggleDropDown();}}},_onBlur:function(){this._closeDropDown();this.inherited(arguments);},_toggleDropDown:function(){if(this.disabled||this.readOnly){return;}dijit.focus(this.popupStateNode);var _288=this.dropDown;if(!_288){return;}if(!this._opened){if(_288.href&&!_288.isLoaded){var self=this;var _28a=dojo.connect(_288,"onLoad",function(){dojo.disconnect(_28a);self._openDropDown();});_288._loadCheck(true);return;}else{this._openDropDown();}}else{this._closeDropDown();}},_openDropDown:function(){var _28b=this.dropDown;var _28c=_28b.domNode.style.width;var self=this;dijit.popup.open({parent:this,popup:_28b,around:this.domNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){self._closeDropDown(true);},onCancel:function(){self._closeDropDown(true);},onClose:function(){_28b.domNode.style.width=_28c;self.popupStateNode.removeAttribute("popupActive");self._opened=false;}});if(this.domNode.offsetWidth>_28b.domNode.offsetWidth){var _28e=null;if(!this.isLeftToRight()){_28e=_28b.domNode.parentNode;var _28f=_28e.offsetLeft+_28e.offsetWidth;}dojo.marginBox(_28b.domNode,{w:this.domNode.offsetWidth});if(_28e){_28e.style.left=_28f-this.domNode.offsetWidth+"px";}}this.popupStateNode.setAttribute("popupActive","true");this._opened=true;if(_28b.focus){_28b.focus();}},_closeDropDown:function(_290){if(this._opened){dijit.popup.close(this.dropDown);if(_290){this.focus();}this._opened=false;}}});dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"  dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></td\n\t\t><td class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n",attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{id:"",name:"",tabIndex:["focusNode","titleNode"]}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){this.inherited(arguments);this._focalNodes=[this.titleNode,this.popupStateNode];dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){if(dojo.isIE){this.connect(node,"onactivate",this._onNodeFocus);this.connect(node,"ondeactivate",this._onNodeBlur);}else{this.connect(node,"onfocus",this._onNodeFocus);this.connect(node,"onblur",this._onNodeBlur);}}));},focusFocalNode:function(node){this._focusedNode=node;dijit.focus(node);},hasNextFocalNode:function(){return this._focusedNode!==this.getFocalNodes()[1];},focusNext:function(){this._focusedNode=this.getFocalNodes()[this._focusedNode?1:0];dijit.focus(this._focusedNode);},hasPrevFocalNode:function(){return this._focusedNode!==this.getFocalNodes()[0];},focusPrev:function(){this._focusedNode=this.getFocalNodes()[this._focusedNode?0:1];dijit.focus(this._focusedNode);},getFocalNodes:function(){return this._focalNodes;},_onNodeFocus:function(evt){this._focusedNode=evt.currentTarget;var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.addClass(this._focusedNode,fnc);},_onNodeBlur:function(evt){var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.removeClass(evt.currentTarget,fnc);},_onBlur:function(){this.inherited(arguments);this._focusedNode=null;}});dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){this.attr("checked",!this.checked);},_setCheckedAttr:function(_298){this.checked=_298;dojo.attr(this.focusNode||this.domNode,"checked",_298);dijit.setWaiState(this.focusNode||this.domNode,"pressed",_298);this._setStateClass();this._handleOnChange(_298,true);},setChecked:function(_299){dojo.deprecated("setChecked("+_299+") is deprecated. Use attr('checked',"+_299+") instead.","","2.0");this.attr("checked",_299);},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);}});}if(!dojo._hasResource["dijit.Menu"]){dojo._hasResource["dijit.Menu"]=true;dojo.provide("dijit.Menu");dojo.declare("dijit.Menu",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{constructor:function(){this._bindings=[];},templateString:"<table class=\"dijit dijitMenu dijitReset dijitMenuTable\" waiRole=\"menu\" dojoAttachEvent=\"onkeypress:_onKeyPress\">"+"<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,parentMenu:null,popupDelay:500,_contextMenuWithMouse:false,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(dojo.body());}else{dojo.forEach(this.targetNodeIds,this.bindDomNode,this);}this.connectKeyNavHandlers([dojo.keys.UP_ARROW],[dojo.keys.DOWN_ARROW]);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_29a){_29a.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_29b){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case dojo.keys.RIGHT_ARROW:this._moveToPopup(evt);dojo.stopEvent(evt);break;case dojo.keys.LEFT_ARROW:if(this.parentMenu){this.onCancel(false);}else{dojo.stopEvent(evt);}break;}},onItemHover:function(item){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}},_onChildBlur:function(item){dijit.popup.close(item.popup);item._blur();this._stopPopupTimer();},onItemUnhover:function(item){},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(item.disabled){return false;}if(item.popup){if(!this.is_open){this._openPopup();}}else{this.onExecute();item.onClick(evt);}},_iframeContentWindow:function(_2a4){var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_2a4))||dijit.Menu._iframeContentDocument(_2a4)["__parent__"]||(_2a4.name&&dojo.doc.frames[_2a4.name])||null;return win;},_iframeContentDocument:function(_2a6){var doc=_2a6.contentDocument||(_2a6.contentWindow&&_2a6.contentWindow.document)||(_2a6.name&&dojo.doc.frames[_2a6.name]&&dojo.doc.frames[_2a6.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var win=dijit.getDocumentWindow(node.ownerDocument);if(node.tagName.toLowerCase()=="iframe"){win=this._iframeContentWindow(node);node=dojo.withGlobal(win,dojo.body);}var cn=(node==dojo.body()?dojo.doc:node);node[this.id]=this._bindings.push([dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);},unBindDomNode:function(_2ab){var node=dojo.byId(_2ab);if(node){var bid=node[this.id]-1,b=this._bindings[bid];dojo.forEach(b,dojo.disconnect);delete this._bindings[bid];}},_contextKey:function(e){this._contextMenuWithMouse=false;if(e.keyCode==dojo.keys.F10){dojo.stopEvent(e);if(e.shiftKey&&e.type=="keydown"){var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};_e.preventDefault=_e.stopPropagation=function(){};window.setTimeout(dojo.hitch(this,function(){this._openMyself(_e);}),1);}}},_contextMouse:function(e){this._contextMenuWithMouse=true;},_openMyself:function(e){if(this.leftClickToOpen&&e.button>0){return;}dojo.stopEvent(e);var x,y;if(dojo.isSafari||this._contextMenuWithMouse){x=e.pageX;y=e.pageY;}else{var _2b5=dojo.coords(e.target,true);x=_2b5.x+10;y=_2b5.y+10;}var self=this;var _2b7=dijit.getFocus(this);function closeAndRestoreFocus(){dijit.focus(_2b7);dijit.popup.close(self);};dijit.popup.open({popup:this,x:x,y:y,onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},onOpen:function(e){this.isShowingNow=true;},onClose:function(){this._stopPopupTimer();this.parentMenu=null;this.isShowingNow=false;this.currentPopup=null;if(this.focusedChild){this._onChildBlur(this.focusedChild);this.focusedChild=null;}},_openPopup:function(){this._stopPopupTimer();var _2b9=this.focusedChild;var _2ba=_2b9.popup;if(_2ba.isShowingNow){return;}_2ba.parentMenu=this;var self=this;dijit.popup.open({parent:this,popup:_2ba,around:_2b9.domNode,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){dijit.popup.close(_2ba);_2b9.focus();self.currentPopup=null;}});this.currentPopup=_2ba;if(_2ba.focus){_2ba.focus();}},uninitialize:function(){dojo.forEach(this.targetNodeIds,this.unBindDomNode,this);this.inherited(arguments);}});dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\""+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\" waiRole=\"presentation\"><div class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\"></div></td>"+"<td class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode\"></td>"+"<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">"+"<div dojoAttachPoint=\"arrowWrapper\" style=\"display: none\">"+"<div class=\"dijitMenuExpand\"></div>"+"<span class=\"dijitMenuExpandA11y\">+</span>"+"</div>"+"</td>"+"</tr>",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),label:"",iconClass:"",disabled:false,_fillContent:function(_2bc){if(_2bc&&!("label" in this.params)){this.attr("label",_2bc.innerHTML);}},postCreate:function(){dojo.setSelectable(this.domNode,false);dojo.attr(this.containerNode,"id",this.id+"_text");dijit.setWaiState(this.domNode,"labelledby",this.id+"_text");},_onHover:function(){this.getParent().onItemHover(this);},_onUnhover:function(){this.getParent().onItemUnhover(this);},_onClick:function(evt){this.getParent().onItemClick(this,evt);dojo.stopEvent(evt);},onClick:function(evt){},focus:function(){dojo.addClass(this.domNode,"dijitMenuItemHover");try{dijit.focus(this.focusNode);}catch(e){}},_blur:function(){dojo.removeClass(this.domNode,"dijitMenuItemHover");},setLabel:function(_2bf){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_2bf);},setDisabled:function(_2c0){dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use attr('disabled', bool) instead.","","2.0");this.attr("disabled",_2c0);},_setDisabledAttr:function(_2c1){this.disabled=_2c1;dojo[_2c1?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.focusNode,"disabled",_2c1?"true":"false");}});dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _2c2=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_2c2[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var node=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(node);}dojo.body().appendChild(this.popup.domNode);this.popup.domNode.style.display="none";dojo.style(this.arrowWrapper,"display","");dijit.setWaiState(this.focusNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){this.popup.destroyRecursive();delete this.popup;}this.inherited(arguments);}});dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\"></div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\""+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\" waiRole=\"presentation\"><div class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">"+"<div class=\"dijitCheckedMenuItemIconChar\">&#10003;</div>"+"</div></td>"+"<td class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode,labelNode\"></td>"+"<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">"+"<div dojoAttachPoint=\"arrowWrapper\" style=\"display: none\">"+"<div class=\"dijitMenuExpand\"></div>"+"<span class=\"dijitMenuExpandA11y\">+</span>"+"</div>"+"</td>"+"</tr>",checked:false,_setCheckedAttr:function(_2c4){dojo.toggleClass(this.iconNode,"dijitCheckedMenuItemIconChecked",_2c4);dijit.setWaiState(this.domNode,"checked",_2c4);this.checked=_2c4;},onChange:function(_2c5){},_onClick:function(e){if(!this.disabled){this.attr("checked",!this.checked);this.onChange(this.checked);}this.inherited(arguments);}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_2c7,_2c8,_2c9){_2c9=dojo.i18n.normalizeLocale(_2c9);var _2ca=_2c9.split("-");var _2cb=[_2c7,"nls",_2c8].join(".");var _2cc=dojo._loadedModules[_2cb];if(_2cc){var _2cd;for(var i=_2ca.length;i>0;i--){var loc=_2ca.slice(0,i).join("_");if(_2cc[loc]){_2cd=_2cc[loc];break;}}if(!_2cd){_2cd=_2cc.ROOT;}if(_2cd){var _2d0=function(){};_2d0.prototype=_2cd;return new _2d0();}}throw new Error("Bundle not found: "+_2c8+" in "+_2c7+" , locale="+_2c9);};dojo.i18n.normalizeLocale=function(_2d1){var _2d2=_2d1?_2d1.toLowerCase():dojo.locale;if(_2d2=="root"){_2d2="ROOT";}return _2d2;};dojo.i18n._requireLocalization=function(_2d3,_2d4,_2d5,_2d6){var _2d7=dojo.i18n.normalizeLocale(_2d5);var _2d8=[_2d3,"nls",_2d4].join(".");var _2d9="";if(_2d6){var _2da=_2d6.split(",");for(var i=0;i<_2da.length;i++){if(_2d7["indexOf"](_2da[i])==0){if(_2da[i].length>_2d9.length){_2d9=_2da[i];}}}if(!_2d9){_2d9="ROOT";}}var _2dc=_2d6?_2d9:_2d7;var _2dd=dojo._loadedModules[_2d8];var _2de=null;if(_2dd){if(dojo.config.localizationComplete&&_2dd._built){return;}var _2df=_2dc.replace(/-/g,"_");var _2e0=_2d8+"."+_2df;_2de=dojo._loadedModules[_2e0];}if(!_2de){_2dd=dojo["provide"](_2d8);var syms=dojo._getModuleSymbols(_2d3);var _2e2=syms.concat("nls").join("/");var _2e3;dojo.i18n._searchLocalePath(_2dc,_2d6,function(loc){var _2e5=loc.replace(/-/g,"_");var _2e6=_2d8+"."+_2e5;var _2e7=false;if(!dojo._loadedModules[_2e6]){dojo["provide"](_2e6);var _2e8=[_2e2];if(loc!="ROOT"){_2e8.push(loc);}_2e8.push(_2d4);var _2e9=_2e8.join("/")+".js";_2e7=dojo._loadPath(_2e9,null,function(hash){var _2eb=function(){};_2eb.prototype=_2e3;_2dd[_2e5]=new _2eb();for(var j in hash){_2dd[_2e5][j]=hash[j];}});}else{_2e7=true;}if(_2e7&&_2dd[_2e5]){_2e3=_2dd[_2e5];}else{_2dd[_2e5]=_2e3;}if(_2d6){return true;}});}if(_2d6&&_2d7!=_2d9){_2dd[_2d7.replace(/-/g,"_")]=_2dd[_2d9.replace(/-/g,"_")];}};(function(){var _2ed=dojo.config.extraLocale;if(_2ed){if(!_2ed instanceof Array){_2ed=[_2ed];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_2f1,_2f2){req(m,b,_2f1,_2f2);if(_2f1){return;}for(var i=0;i<_2ed.length;i++){req(m,b,_2ed[i],_2f2);}};}})();dojo.i18n._searchLocalePath=function(_2f4,down,_2f6){_2f4=dojo.i18n.normalizeLocale(_2f4);var _2f7=_2f4.split("-");var _2f8=[];for(var i=_2f7.length;i>0;i--){_2f8.push(_2f7.slice(0,i).join("-"));}_2f8.push(false);if(down){_2f8.reverse();}for(var j=_2f8.length-1;j>=0;j--){var loc=_2f8[j]||"ROOT";var stop=_2f6(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_2fd,_2fe){function preload(_2ff){_2ff=dojo.i18n.normalizeLocale(_2ff);dojo.i18n._searchLocalePath(_2ff,true,function(loc){for(var i=0;i<_2fe.length;i++){if(_2fe[i]==loc){dojo["require"](_2fd+"_"+loc);return true;}}return false;});};preload();var _302=dojo.config.extraLocale||[];for(var i=0;i<_302.length;i++){preload(_302[i]);}};}if(!dojo._hasResource["dijit.layout.StackContainer"]){dojo._hasResource["dijit.layout.StackContainer"]=true;dojo.provide("dijit.layout.StackContainer");dojo.declare("dijit.layout.StackContainer",dijit.layout._LayoutWidget,{doLayout:true,baseClass:"dijitStackContainer",_started:false,postCreate:function(){this.inherited(arguments);dijit.setWaiRole(this.containerNode,"tabpanel");this.connect(this.domNode,"onkeypress",this._onKeyPress);},startup:function(){if(this._started){return;}var _304=this.getChildren();dojo.forEach(_304,this._setupChild,this);dojo.some(_304,function(_305){if(_305.selected){this.selectedChildWidget=_305;}return _305.selected;},this);var _306=this.selectedChildWidget;if(!_306&&_304[0]){_306=this.selectedChildWidget=_304[0];_306.selected=true;}if(_306){this._showChild(_306);}dojo.publish(this.id+"-startup",[{children:_304,selected:_306}]);this.inherited(arguments);},_setupChild:function(_307){this.inherited(arguments);_307.domNode.style.display="none";_307.domNode.style.position="relative";_307.domNode.title="";return _307;},addChild:function(_308,_309){this.inherited(arguments);if(this._started){dojo.publish(this.id+"-addChild",[_308,_309]);this.layout();if(!this.selectedChildWidget){this.selectChild(_308);}}},removeChild:function(page){this.inherited(arguments);if(this._beingDestroyed){return;}if(this._started){dojo.publish(this.id+"-removeChild",[page]);this.layout();}if(this.selectedChildWidget===page){this.selectedChildWidget=undefined;if(this._started){var _30b=this.getChildren();if(_30b.length){this.selectChild(_30b[0]);}}}},selectChild:function(page){page=dijit.byId(page);if(this.selectedChildWidget!=page){this._transition(page,this.selectedChildWidget);this.selectedChildWidget=page;dojo.publish(this.id+"-selectChild",[page]);}},_transition:function(_30d,_30e){if(_30e){this._hideChild(_30e);}this._showChild(_30d);if(this.doLayout&&_30d.resize){_30d.resize(this._containerContentBox||this._contentBox);}},_adjacent:function(_30f){var _310=this.getChildren();var _311=dojo.indexOf(_310,this.selectedChildWidget);_311+=_30f?1:_310.length-1;return _310[_311%_310.length];},forward:function(){this.selectChild(this._adjacent(true));},back:function(){this.selectChild(this._adjacent(false));},_onKeyPress:function(e){dojo.publish(this.id+"-containerKeyPress",[{e:e,page:this}]);},layout:function(){if(this.doLayout&&this.selectedChildWidget&&this.selectedChildWidget.resize){this.selectedChildWidget.resize(this._contentBox);}},_showChild:function(page){var _314=this.getChildren();page.isFirstChild=(page==_314[0]);page.isLastChild=(page==_314[_314.length-1]);page.selected=true;page.domNode.style.display="";if(page._loadCheck){page._loadCheck();}if(page.onShow){page.onShow();}},_hideChild:function(page){page.selected=false;page.domNode.style.display="none";if(page.onHide){page.onHide();}},closeChild:function(page){var _317=page.onClose(this,page);if(_317){this.removeChild(page);page.destroyRecursive();}},destroy:function(){this._beingDestroyed=true;this.inherited(arguments);}});dojo.declare("dijit.layout.StackController",[dijit._Widget,dijit._Templated,dijit._Container],{templateString:"<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",containerId:"",buttonWidget:"dijit.layout._StackButton",postCreate:function(){dijit.setWaiRole(this.domNode,"tablist");this.pane2button={};this.pane2handles={};this.pane2menu={};this._subscriptions=[dojo.subscribe(this.containerId+"-startup",this,"onStartup"),dojo.subscribe(this.containerId+"-addChild",this,"onAddChild"),dojo.subscribe(this.containerId+"-removeChild",this,"onRemoveChild"),dojo.subscribe(this.containerId+"-selectChild",this,"onSelectChild"),dojo.subscribe(this.containerId+"-containerKeyPress",this,"onContainerKeyPress")];},onStartup:function(info){dojo.forEach(info.children,this.onAddChild,this);this.onSelectChild(info.selected);},destroy:function(){for(var pane in this.pane2button){this.onRemoveChild(pane);}dojo.forEach(this._subscriptions,dojo.unsubscribe);this.inherited(arguments);},onAddChild:function(page,_31b){var _31c=dojo.doc.createElement("span");this.domNode.appendChild(_31c);var cls=dojo.getObject(this.buttonWidget);var _31e=new cls({label:page.title,closeButton:page.closable},_31c);this.addChild(_31e,_31b);this.pane2button[page]=_31e;page.controlButton=_31e;var _31f=[];_31f.push(dojo.connect(_31e,"onClick",dojo.hitch(this,"onButtonClick",page)));if(page.closable){_31f.push(dojo.connect(_31e,"onClickCloseButton",dojo.hitch(this,"onCloseButtonClick",page)));var _320=dojo.i18n.getLocalization("dijit","common");var _321=new dijit.Menu({targetNodeIds:[_31e.id],id:_31e.id+"_Menu"});var _322=new dijit.MenuItem({label:_320.itemClose});_31f.push(dojo.connect(_322,"onClick",dojo.hitch(this,"onCloseButtonClick",page)));_321.addChild(_322);this.pane2menu[page]=_321;}this.pane2handles[page]=_31f;if(!this._currentChild){_31e.focusNode.setAttribute("tabIndex","0");this._currentChild=page;}if(!this.isLeftToRight()&&dojo.isIE&&this._rectifyRtlTabList){this._rectifyRtlTabList();}},onRemoveChild:function(page){if(this._currentChild===page){this._currentChild=null;}dojo.forEach(this.pane2handles[page],dojo.disconnect);delete this.pane2handles[page];var menu=this.pane2menu[page];if(menu){menu.destroyRecursive();delete this.pane2menu[page];}var _325=this.pane2button[page];if(_325){_325.destroy();delete this.pane2button[page];}},onSelectChild:function(page){if(!page){return;}if(this._currentChild){var _327=this.pane2button[this._currentChild];_327.attr("checked",false);_327.focusNode.setAttribute("tabIndex","-1");}var _328=this.pane2button[page];_328.attr("checked",true);this._currentChild=page;_328.focusNode.setAttribute("tabIndex","0");var _329=dijit.byId(this.containerId);dijit.setWaiState(_329.containerNode,"labelledby",_328.id);},onButtonClick:function(page){var _32b=dijit.byId(this.containerId);_32b.selectChild(page);},onCloseButtonClick:function(page){var _32d=dijit.byId(this.containerId);_32d.closeChild(page);var b=this.pane2button[this._currentChild];if(b){dijit.focus(b.focusNode||b.domNode);}},adjacent:function(_32f){if(!this.isLeftToRight()&&(!this.tabPosition||/top|bottom/.test(this.tabPosition))){_32f=!_32f;}var _330=this.getChildren();var _331=dojo.indexOf(_330,this.pane2button[this._currentChild]);var _332=_32f?1:_330.length-1;return _330[(_331+_332)%_330.length];},onkeypress:function(e){if(this.disabled||e.altKey){return;}var _334=null;if(e.ctrlKey||!e._djpage){var k=dojo.keys;switch(e.charOrCode){case k.LEFT_ARROW:case k.UP_ARROW:if(!e._djpage){_334=false;}break;case k.PAGE_UP:if(e.ctrlKey){_334=false;}break;case k.RIGHT_ARROW:case k.DOWN_ARROW:if(!e._djpage){_334=true;}break;case k.PAGE_DOWN:if(e.ctrlKey){_334=true;}break;case k.DELETE:if(this._currentChild.closable){this.onCloseButtonClick(this._currentChild);}dojo.stopEvent(e);break;default:if(e.ctrlKey){if(e.charOrCode===k.TAB){this.adjacent(!e.shiftKey).onClick();dojo.stopEvent(e);}else{if(e.charOrCode=="w"){if(this._currentChild.closable){this.onCloseButtonClick(this._currentChild);}dojo.stopEvent(e);}}}}if(_334!==null){this.adjacent(_334).onClick();dojo.stopEvent(e);}}},onContainerKeyPress:function(info){info.e._djpage=info.page;this.onkeypress(info.e);}});dojo.declare("dijit.layout._StackButton",dijit.form.ToggleButton,{tabIndex:"-1",postCreate:function(evt){dijit.setWaiRole((this.focusNode||this.domNode),"tab");this.inherited(arguments);},onClick:function(evt){dijit.focus(this.focusNode);},onClickCloseButton:function(evt){evt.stopPropagation();}});dojo.extend(dijit._Widget,{title:"",selected:false,closable:false,onClose:function(){return true;}});}if(!dojo._hasResource["dijit.layout.TabContainer"]){dojo._hasResource["dijit.layout.TabContainer"]=true;dojo.provide("dijit.layout.TabContainer");dojo.declare("dijit.layout.TabContainer",[dijit.layout.StackContainer,dijit._Templated],{tabPosition:"top",baseClass:"dijitTabContainer",tabStrip:false,templateString:null,templateString:"<div class=\"dijitTabContainer\">\n\t<div dojoAttachPoint=\"tablistNode\"></div>\n    <!-- using \"display: none\" as the tablistSpacer was b0rking IE layout -->\n\t<div dojoAttachPoint=\"tablistSpacer\" class=\"dijitTabSpacer ${baseClass}-spacer\" style=\"display: none;\"></div>\n\t<div class=\"dijitTabPaneWrapper ${baseClass}-container\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n",_controllerWidget:"dijit.layout.TabController",postMixInProperties:function(){this.baseClass+=this.tabPosition.charAt(0).toUpperCase()+this.tabPosition.substr(1).replace(/-.*/,"");this.inherited(arguments);},postCreate:function(){this.inherited(arguments);var _33a=dojo.getObject(this._controllerWidget);this.tablist=new _33a({id:this.id+"_tablist",tabPosition:this.tabPosition,doLayout:this.doLayout,containerId:this.id,"class":this.baseClass+"-tabs"+(this.doLayout?"":" dijitTabNoLayout")},this.tablistNode);if(this.tabStrip){dojo.addClass(this.tablist.domNode,this.baseClass+"Strip");}},_setupChild:function(tab){dojo.addClass(tab.domNode,"dijitTabPane");this.inherited(arguments);return tab;},startup:function(){if(this._started){return;}this.tablist.startup();this.inherited(arguments);},layout:function(){if(!this.doLayout){return;}var _33c=this.tabPosition.replace(/-h/,"");var _33d=[{domNode:this.tablist.domNode,layoutAlign:_33c},{domNode:this.tablistSpacer,layoutAlign:_33c},{domNode:this.containerNode,layoutAlign:"client"}];dijit.layout.layoutChildren(this.domNode,this._contentBox,_33d);this._containerContentBox=dijit.layout.marginBox2contentBox(this.containerNode,_33d[2]);if(this.selectedChildWidget){this._showChild(this.selectedChildWidget);if(this.doLayout&&this.selectedChildWidget.resize){this.selectedChildWidget.resize(this._containerContentBox);}}},destroy:function(){if(this.tablist){this.tablist.destroy();}this.inherited(arguments);}});dojo.declare("dijit.layout.TabController",dijit.layout.StackController,{templateString:"<div wairole='tablist' dojoAttachEvent='onkeypress:onkeypress'></div>",tabPosition:"top",doLayout:true,buttonWidget:"dijit.layout._TabButton",_rectifyRtlTabList:function(){if(0>=this.tabPosition.indexOf("-h")){return;}if(!this.pane2button){return;}var _33e=0;for(var pane in this.pane2button){var ow=this.pane2button[pane].innerDiv.scrollWidth;_33e=Math.max(_33e,ow);}for(pane in this.pane2button){this.pane2button[pane].innerDiv.style.width=_33e+"px";}}});dojo.declare("dijit.layout._TabButton",dijit.layout._StackButton,{baseClass:"dijitTab",templateString:"<div waiRole=\"presentation\" dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>\n    <div waiRole=\"presentation\" class='dijitTabInnerDiv' dojoAttachPoint='innerDiv' id=\"${!label}\">\n        <div waiRole=\"presentation\" class='dijitTabContent' dojoAttachPoint='tabContent'>\n\t\t<span dojoAttachPoint='containerNode,focusNode' class='tabLabel'>${!label}</span><span class =\"dijitTabButtonSpacer\" ></span>\n\t        <div class=\"dijitInline closeNode\" dojoAttachPoint='closeNode' dojoAttachEvent='onclick:onClickCloseButton'>\n\t\t\t<span src=\"${_blankGif}\" alt=\"\" dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse' stateModifier='CloseButton' waiRole=\"presentation\"></span>\n\t            <span dojoAttachPoint='closeText' class='closeText'>x</span>\n\t        </div>\n        </div>\n    </div>\n</div>\n",postCreate:function(){if(this.closeButton){dojo.addClass(this.innerDiv,"dijitClosable");var _341=dojo.i18n.getLocalization("dijit","common");if(this.closeNode){dojo.attr(this.closeNode,"title",_341.itemClose);dojo.attr(this.closeButtonNode,"title",_341.itemClose);}}else{this.closeNode.style.display="none";}this.inherited(arguments);dojo.setSelectable(this.containerNode,false);}});}if(!dojo._hasResource["dojo.html"]){dojo._hasResource["dojo.html"]=true;dojo.provide("dojo.html");(function(){var _342=0;dojo.html._secureForInnerHtml=function(cont){return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");};dojo.html._emptyNode=function(node){while(node.firstChild){dojo._destroyElement(node.firstChild);}};dojo.html._setNodeContent=function(node,cont,_347){if(_347){dojo.html._emptyNode(node);}if(typeof cont=="string"){var pre="",post="",walk=0,name=node.nodeName.toLowerCase();switch(name){case "tr":pre="<tr>";post="</tr>";walk+=1;case "tbody":case "thead":pre="<tbody>"+pre;post+="</tbody>";walk+=1;case "table":pre="<table>"+pre;post+="</table>";walk+=1;break;}if(walk){var n=node.ownerDocument.createElement("div");n.innerHTML=pre+cont+post;do{n=n.firstChild;}while(--walk);dojo.forEach(n.childNodes,function(n){node.appendChild(n.cloneNode(true));});}else{node.innerHTML=cont;}}else{if(cont.nodeType){node.appendChild(cont);}else{dojo.forEach(cont,function(n){node.appendChild(n.cloneNode(true));});}}return node;};dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_34f,node){dojo.mixin(this,_34f||{});node=this.node=dojo.byId(this.node||node);if(!this.id){this.id=["Setter",(node)?node.id||node.tagName:"",_342++].join("_");}if(!(this.node||node)){new Error(this.declaredClass+": no node provided to "+this.id);}},set:function(cont,_352){if(undefined!==cont){this.content=cont;}if(_352){this._mixin(_352);}this.onBegin();this.setContent();this.onEnd();return this.node;},setContent:function(){var node=this.node;if(!node){console.error("setContent given no node");}try{node=dojo.html._setNodeContent(node,this.content);}catch(e){var _354=this.onContentError(e);try{node.innerHTML=_354;}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,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 _357=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_357){cont=_357[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(_359){var _35a={},key;for(key in _359){if(key in _35a){continue;}this[key]=_359[key];}},_parse:function(){var _35c=this.node;try{this.parseResults=dojo.parser.parse(_35c,true);}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(type,err,_35f){var _360=this["on"+type+"Error"].call(this,err);if(_35f){console.error(_35f,err);}else{if(_360){dojo.html._setNodeContent(this.node,_360,true);}}}});dojo.html.set=function(node,cont,_363){if(undefined==cont){console.warn("dojo.html.set: no cont argument provided, using empty string");cont="";}if(!_363){return dojo.html._setNodeContent(node,cont,true);}else{var op=new dojo.html._ContentSetter(dojo.mixin(_363,{content:cont,node:node}));return op.set();}};})();}if(!dojo._hasResource["dijit.layout.ContentPane"]){dojo._hasResource["dijit.layout.ContentPane"]=true;dojo.provide("dijit.layout.ContentPane");dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,postMixInProperties:function(){this.inherited(arguments);var _365=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_365);this.errorMessage=dojo.string.substitute(this.errorMessage,_365);},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},postCreate:function(){this.domNode.title="";if(!dijit.hasWaiRole(this.domNode)){dijit.setWaiRole(this.domNode,"group");}dojo.addClass(this.domNode,this.baseClass);},startup:function(){if(this._started){return;}if(this.doLayout!="false"&&this.doLayout!==false){this._checkIfSingleChild();if(this._singleChild){this._singleChild.startup();}}this._loadCheck();this.inherited(arguments);},_checkIfSingleChild:function(){var _366=dojo.query(">",this.containerNode),_367=_366.filter(function(node){return dojo.hasAttr(node,"dojoType")||dojo.hasAttr(node,"widgetId");}),_369=dojo.filter(_367.map(dijit.byNode),function(_36a){return _36a&&_36a.domNode&&_36a.resize;});if(_366.length==_367.length&&_369.length==1){this.isContainer=true;this._singleChild=_369[0];}else{delete this.isContainer;delete this._singleChild;}},refresh:function(){return this._prepareLoad(true);},setHref:function(href){dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated.\tUse attr('href', ...) instead.","","2.0");return this.attr("href",href);},_setHrefAttr:function(href){this.href=href;if(this._created){return this._prepareLoad();}},setContent:function(data){dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use attr('content', ...) instead.","","2.0");this.attr("content",data);},_setContentAttr:function(data){if(!this._isDownloaded){this.href="";}this._setContent(data||"");this._isDownloaded=false;if(this.doLayout!="false"&&this.doLayout!==false){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){this._singleChild.startup();var cb=this._contentBox||dojo.contentBox(this.containerNode);this._singleChild.resize({w:cb.w,h:cb.h});}}this._onLoadHandler();},_getContentAttr:function(){return this.containerNode.innerHTML;},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;},destroyRecursive:function(_370){if(this._beingDestroyed){return;}this._beingDestroyed=true;this.inherited(arguments);},resize:function(size){dojo.marginBox(this.domNode,size);var node=this.containerNode,mb=dojo.mixin(dojo.marginBox(node),size||{});var cb=this._contentBox=dijit.layout.marginBox2contentBox(node,mb);if(this._singleChild&&this._singleChild.resize){this._singleChild.resize({w:cb.w,h:cb.h});}},_prepareLoad:function(_375){this.cancel();this.isLoaded=false;this._loadCheck(_375);},_isShown:function(){if("open" in this){return this.open;}else{var node=this.domNode;return (node.style.display!="none")&&(node.style.visibility!="hidden");}},_loadCheck:function(_377){var _378=this._isShown();if(this.href&&(_377||(this.preload&&!this.isLoaded&&!this._xhrDfd)||(this.refreshOnShow&&_378&&!this._xhrDfd)||(!this.isLoaded&&_378&&!this._xhrDfd))){this._downloadExternalContent();}},_downloadExternalContent:function(){this._setContent(this.onDownloadStart.call(this));var self=this;var _37a={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(_37a,this.ioArgs);}var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_37a);hand.addCallback(function(html){try{self._isDownloaded=true;self.attr.call(self,"content",html);self.onDownloadEnd.call(self);}catch(err){self._onError.call(self,"Content",err);}delete self._xhrDfd;return html;});hand.addErrback(function(err){if(!hand.cancelled){self._onError.call(self,"Download",err);}delete self._xhrDfd;return err;});},_onLoadHandler:function(){this.isLoaded=true;try{this.onLoad.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code");}},_onUnloadHandler:function(){this.isLoaded=false;this.cancel();try{this.onUnload.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code");}},destroyDescendants:function(){this._onUnloadHandler();var _37e=this._contentSetter;if(_37e){_37e.empty();}else{this.inherited(arguments);dojo.html._emptyNode(this.containerNode);}},_setContent:function(cont){this.destroyDescendants();var _380=this._contentSetter;if(!(_380&&_380 instanceof dojo.html._ContentSetter)){_380=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){var _382=this.onContentError(e);try{this.containerNode.innerHTML=_382;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}})});}var _383=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});dojo.mixin(_380,_383);_380.set((dojo.isObject(cont)&&cont.domNode)?cont.domNode:cont);delete this._contentSetterParams;},_onError:function(type,err,_386){var _387=this["on"+type+"Error"].call(this,err);if(_386){console.error(_386,err);}else{if(_387){this._setContent.call(this,_387);}}},_createSubWidgets:function(){try{dojo.parser.parse(this.containerNode,true);}catch(e){this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));}},onLoad:function(e){},onUnload:function(e){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(_38a){},onDownloadError:function(_38b){return this.errorMessage;},onDownloadEnd:function(){}});}if(!dojo._hasResource["wsgc.js.ErrorController"]){dojo._hasResource["wsgc.js.ErrorController"]=true;dojo.provide("wsgc.js.ErrorController");dojo.declare("wsgc.js.ErrorController",null,{constructor:function(){if(typeof errorMap==="object"){this._messages=errorMap;}else{this._messages={};}},_messages:null,_getErrorMessage:function(_38c){if(typeof this._messages[_38c]!=="undefined"){return this._messages[_38c];}else{return "";}}});}if(!dojo._hasResource["wsgc.js.AddItemUtils"]){dojo._hasResource["wsgc.js.AddItemUtils"]=true;dojo.provide("wsgc.js.AddItemUtils");dojo.declare("wsgc.js.AddItemUtils",null,{_navigateWithReferrer:function(url){if(dojo.isIE>0){var a=document.createElement("a");dojo.style(a,"display","none");document.getElementsByTagName("body")[0].appendChild(a);a.href=url;a.click();return;}window.location=url;}});}if(!dojo._hasResource["wsgc.js.AddItemControllerBase"]){dojo._hasResource["wsgc.js.AddItemControllerBase"]=true;dojo.provide("wsgc.js.AddItemControllerBase");dojo.declare("wsgc.js.AddItemControllerBase",[wsgc.js.AddItemUtils],{constructor:function(){this._io=new wsgc.js.Io();this._ioHandle=dojo.subscribe("/riaResponse",this,"_processXMLResponse");this._productErrorStack=[];this._displayPipTabs();this._detectPipConfirmation();this._registerCoreMetricsEvents();this._errors=new wsgc.js.ErrorController();dojo.subscribe("/riaCloseEvent",this,"_handleRACCloseEvent");dojo.query(".skuQuantity").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onkeypress",this,"_handleEnterKeySkuQuantityInputs");}));dojo.connect(dojo.byId("pageErrorHook"),"onkeypress",dojo.hitch(this,"_gotoSpecificError"));this._registerRegistryShipOptionsEvents();},_io:null,_ioHandle:0,_errors:null,_productErrorStack:null,ERROR_CLASS:"errorDisplayed",_clearErrors:function(){dojo.byId("pageErrorHook").innerHTML="";dojo.byId("pageErrorHook").tabIndex="-1";dojo.removeClass("pageErrorHook",this.ERROR_CLASS);var _390=dojo.query(".skuErrorHook");dojo.forEach(_390,function(item){item.innerHTML="";item.tabIndex="-1";dojo.removeClass(item,this.ERROR_CLASS);},this);},_registerRegistryShipOptionsEvents:function(){dojo.query(".knownRegistry").forEach(function(elem){dojo.connect(elem,"onclick",function(evt){dojo.query(".knownRegistry").forEach(function(item){if(item.value==evt.currentTarget.value){item.checked=evt.currentTarget.checked;}});});});},_handleEnterKeySkuQuantityInputs:function(evt){var elem=evt.currentTarget;if(evt.keyCode==13){this.handleAddToCartClick(evt);}},_detectPipConfirmation:function(){var _397=dojo.queryToObject(window.location.search.slice(1));if(typeof (_397.transid)=="undefined"){return;}this._io._callConfirmationService(_397.transid);},_displayPipTabs:function(){dojo.query(".product-info-tabs-loading").forEach("item.innerHTML = '';");dojo.query(".product-info-tabs").forEach("dojo.style(item, 'visibility', 'visible')");},_handleRACCloseEvent:function(evt){this._resetPip();var _399=dojo.queryToObject(window.location.search.slice(1));if(!dojo.exists("transid",_399)){return;}this._io.deleteTransactionId(_399.transid);},_resetPip:function(){},_processXMLResponse:function(xml){if(typeof xml!="object"){xml=dojox.xml.parser.parse(xml);}var _39b=xml.getElementsByTagName("iserror");if((_39b[0])&&(_39b[0].firstChild)&&(_39b[0].firstChild.nodeValue=="1")){this._processAddItemErrors(xml);return;}var _39c=xml.getElementsByTagName("requestedit");if(_39c.length>0){var _39d=xml.getElementsByTagName("requestedit")[0].firstChild;if(_39d.nodeValue=="1"){this.populatePipForEditModeFromInterstitial(xml);return;}}var _39e=xml.getElementsByTagName("pageid");if(_39e.length>0){var _39f=xml.getElementsByTagName("targeturl");if(_39f.length>0){this._navigateWithReferrer(appUrl+_39f[0].firstChild.nodeValue);return;}}var _3a0=xml.getElementsByTagName("totalquantity")[0].firstChild.nodeValue;this._setBasketCount(_3a0);var _3a1=dijit.byId("dialog0");_3a1.renderFromXML(xml);_3a1.show();},_processAddItemErrors:function(xml){var _3a3=xml.getElementsByTagName("items")[0];if(!_3a3||_3a3.childNodes.length==0){return;}var item,sku,_3a6,_3a7,code,_3a9,_3aa=[];for(var i=0;i<_3a3.childNodes.length;i++){item=_3a3.childNodes[i];if(item.getElementsByTagName("errors").length==0){continue;}sku=item.getElementsByTagName("sku")[0].firstChild.nodeValue.toString();_3a6=item.getElementsByTagName("errors")[0];for(var k=0;k<_3a6.childNodes.length;k++){_3a7=_3a6.childNodes[k];code=_3a6.getElementsByTagName("code")[0].firstChild.nodeValue.toString();_3a9=_3a6.getElementsByTagName("message")[0].firstChild.nodeValue.toString();_3aa.push({sku:sku,code:code,message:_3a9});}}if(_3aa.length>0){dojo.publish("/renderSkuAddItemErrors",[_3aa]);}},_setBasketCount:function(_3ad){if(_3ad!=="0"){dojo.byId("cart-count").innerHTML="<span> : </span>"+_3ad;}else{dojo.byId("cart-count").innerHTML="";}},_registerCoreMetricsEvents:function(){dojo.subscribe("infotabs-selectChild",this,"_handleTabChange");},_handleTabChange:function(evt){switch(evt.title){case "MORE INFO":this._tabCMCall("More Info Tab");break;case "SHIPPING INFO":this._tabCMCall("Ship Info Tab");break;case "SUMMARY":this._tabCMCall("Summary Tab");break;}},_tabCMCall:function(arg){try{if(typeof cmCreateManualLinkClickTag==="function"){cmCreateManualLinkClickTag("PIP",arg);}if(typeof cmCreatePageElementTag==="function"){cmCreatePageElementTag(arg,"PIP Item");}if(typeof eventInteraction==="function"){eventInteraction("Tabs on PIP",arg,groupId);}}catch(e){console.error("cm pip-tab fail.");}},_gotoSpecificError:function(evt){if(evt.type!=="keypress"||typeof evt.keyCode==="undefined"||evt.keyCode!==9||(evt.shiftKey!==false&&evt.shiftKey!==0)){return;}var _3b1=dojo.query(".skuErrorHook");if(_3b1.length>0){for(var i=0;i<_3b1.length;i++){if(_3b1[i].tabIndex===0){_3b1[i].focus();evt.preventDefault();break;}}}}});}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_3b4){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_3b4&&_3b4.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_3b8){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("|"),_3b8);};dojo.regexp.group=function(_3bb,_3bc){return "("+(_3bc?"?:":"")+_3bb+")";};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_3bd,_3be){_3be=dojo.mixin({},_3be||{});var _3bf=dojo.i18n.normalizeLocale(_3be.locale);var _3c0=dojo.i18n.getLocalization("dojo.cldr","number",_3bf);_3be.customs=_3c0;var _3c1=_3be.pattern||_3c0[(_3be.type||"decimal")+"Format"];if(isNaN(_3bd)){return null;}return dojo.number._applyPattern(_3bd,_3c1,_3be);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_3c2,_3c3,_3c4){_3c4=_3c4||{};var _3c5=_3c4.customs.group;var _3c6=_3c4.customs.decimal;var _3c7=_3c3.split(";");var _3c8=_3c7[0];_3c3=_3c7[(_3c2<0)?1:0]||("-"+_3c8);if(_3c3.indexOf("%")!=-1){_3c2*=100;}else{if(_3c3.indexOf("‰")!=-1){_3c2*=1000;}else{if(_3c3.indexOf("¤")!=-1){_3c5=_3c4.customs.currencyGroup||_3c5;_3c6=_3c4.customs.currencyDecimal||_3c6;_3c3=_3c3.replace(/\u00a4{1,3}/,function(_3c9){var prop=["symbol","currency","displayName"][_3c9.length-1];return _3c4[prop]||_3c4.currency||"";});}else{if(_3c3.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _3cb=dojo.number._numberPatternRE;var _3cc=_3c8.match(_3cb);if(!_3cc){throw new Error("unable to find a number expression in pattern: "+_3c3);}if(_3c4.fractional===false){_3c4.places=0;}return _3c3.replace(_3cb,dojo.number._formatAbsolute(_3c2,_3cc[0],{decimal:_3c6,group:_3c5,places:_3c4.places,round:_3c4.round}));};dojo.number.round=function(_3cd,_3ce,_3cf){var _3d0=String(_3cd).split(".");var _3d1=(_3d0[1]&&_3d0[1].length)||0;if(_3d1>_3ce){var _3d2=Math.pow(10,_3ce);if(_3cf>0){_3d2*=10/_3cf;_3ce++;}_3cd=Math.round(_3cd*_3d2)/_3d2;_3d0=String(_3cd).split(".");_3d1=(_3d0[1]&&_3d0[1].length)||0;if(_3d1>_3ce){_3d0[1]=_3d0[1].substr(0,_3ce);_3cd=Number(_3d0.join("."));}}return _3cd;};dojo.number._formatAbsolute=function(_3d3,_3d4,_3d5){_3d5=_3d5||{};if(_3d5.places===true){_3d5.places=0;}if(_3d5.places===Infinity){_3d5.places=6;}var _3d6=_3d4.split(".");var _3d7=(_3d5.places>=0)?_3d5.places:(_3d6[1]&&_3d6[1].length)||0;if(!(_3d5.round<0)){_3d3=dojo.number.round(_3d3,_3d7,_3d5.round);}var _3d8=String(Math.abs(_3d3)).split(".");var _3d9=_3d8[1]||"";if(_3d5.places){var _3da=dojo.isString(_3d5.places)&&_3d5.places.indexOf(",");if(_3da){_3d5.places=_3d5.places.substring(_3da+1);}_3d8[1]=dojo.string.pad(_3d9.substr(0,_3d5.places),_3d5.places,"0",true);}else{if(_3d6[1]&&_3d5.places!==0){var pad=_3d6[1].lastIndexOf("0")+1;if(pad>_3d9.length){_3d8[1]=dojo.string.pad(_3d9,pad,"0",true);}var _3dc=_3d6[1].length;if(_3dc<_3d9.length){_3d8[1]=_3d9.substr(0,_3dc);}}else{if(_3d8[1]){_3d8.pop();}}}var _3dd=_3d6[0].replace(",","");pad=_3dd.indexOf("0");if(pad!=-1){pad=_3dd.length-pad;if(pad>_3d8[0].length){_3d8[0]=dojo.string.pad(_3d8[0],pad);}if(_3dd.indexOf("#")==-1){_3d8[0]=_3d8[0].substr(_3d8[0].length-pad);}}var _3de=_3d6[0].lastIndexOf(",");var _3df,_3e0;if(_3de!=-1){_3df=_3d6[0].length-_3de-1;var _3e1=_3d6[0].substr(0,_3de);_3de=_3e1.lastIndexOf(",");if(_3de!=-1){_3e0=_3e1.length-_3de-1;}}var _3e2=[];for(var _3e3=_3d8[0];_3e3;){var off=_3e3.length-_3df;_3e2.push((off>0)?_3e3.substr(off):_3e3);_3e3=(off>0)?_3e3.slice(0,off):"";if(_3e0){_3df=_3e0;delete _3e0;}}_3d8[0]=_3e2.reverse().join(_3d5.group||",");return _3d8.join(_3d5.decimal||".");};dojo.number.regexp=function(_3e5){return dojo.number._parseInfo(_3e5).regexp;};dojo.number._parseInfo=function(_3e6){_3e6=_3e6||{};var _3e7=dojo.i18n.normalizeLocale(_3e6.locale);var _3e8=dojo.i18n.getLocalization("dojo.cldr","number",_3e7);var _3e9=_3e6.pattern||_3e8[(_3e6.type||"decimal")+"Format"];var _3ea=_3e8.group;var _3eb=_3e8.decimal;var _3ec=1;if(_3e9.indexOf("%")!=-1){_3ec/=100;}else{if(_3e9.indexOf("‰")!=-1){_3ec/=1000;}else{var _3ed=_3e9.indexOf("¤")!=-1;if(_3ed){_3ea=_3e8.currencyGroup||_3ea;_3eb=_3e8.currencyDecimal||_3eb;}}}var _3ee=_3e9.split(";");if(_3ee.length==1){_3ee.push("-"+_3ee[0]);}var re=dojo.regexp.buildGroupRE(_3ee,function(_3f0){_3f0="(?:"+dojo.regexp.escapeString(_3f0,".")+")";return _3f0.replace(dojo.number._numberPatternRE,function(_3f1){var _3f2={signed:false,separator:_3e6.strict?_3ea:[_3ea,""],fractional:_3e6.fractional,decimal:_3eb,exponent:false};var _3f3=_3f1.split(".");var _3f4=_3e6.places;if(_3f3.length==1||_3f4===0){_3f2.fractional=false;}else{if(_3f4===undefined){_3f4=_3e6.pattern?_3f3[1].lastIndexOf("0")+1:Infinity;}if(_3f4&&_3e6.fractional==undefined){_3f2.fractional=true;}if(!_3e6.places&&(_3f4<_3f3[1].length)){_3f4+=","+_3f3[1].length;}_3f2.places=_3f4;}var _3f5=_3f3[0].split(",");if(_3f5.length>1){_3f2.groupSize=_3f5.pop().length;if(_3f5.length>1){_3f2.groupSize2=_3f5.pop().length;}}return "("+dojo.number._realNumberRegexp(_3f2)+")";});},true);if(_3ed){re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_3f6,_3f7,_3f8,_3f9){var prop=["symbol","currency","displayName"][_3f8.length-1];var _3fb=dojo.regexp.escapeString(_3e6[prop]||_3e6.currency||"");_3f7=_3f7?"\\s":"";_3f9=_3f9?"\\s":"";if(!_3e6.strict){if(_3f7){_3f7+="*";}if(_3f9){_3f9+="*";}return "(?:"+_3f7+_3fb+_3f9+")?";}return _3f7+_3fb+_3f9;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_3ea,decimal:_3eb,factor:_3ec};};dojo.number.parse=function(_3fc,_3fd){var info=dojo.number._parseInfo(_3fd);var _3ff=(new RegExp("^"+info.regexp+"$")).exec(_3fc);if(!_3ff){return NaN;}var _400=_3ff[1];if(!_3ff[1]){if(!_3ff[2]){return NaN;}_400=_3ff[2];info.factor*=-1;}_400=_400.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return Number(_400)*info.factor;};dojo.number._realNumberRegexp=function(_401){_401=_401||{};if(!("places" in _401)){_401.places=Infinity;}if(typeof _401.decimal!="string"){_401.decimal=".";}if(!("fractional" in _401)||/^0/.test(_401.places)){_401.fractional=[true,false];}if(!("exponent" in _401)){_401.exponent=[true,false];}if(!("eSigned" in _401)){_401.eSigned=[true,false];}var _402=dojo.number._integerRegexp(_401);var _403=dojo.regexp.buildGroupRE(_401.fractional,function(q){var re="";if(q&&(_401.places!==0)){re="\\"+_401.decimal;if(_401.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_401.places+"}";}}return re;},true);var _406=dojo.regexp.buildGroupRE(_401.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_401.eSigned})+")";}return "";});var _408=_402+_403;if(_403){_408="(?:(?:"+_408+")|(?:"+_403+"))";}return _408+_406;};dojo.number._integerRegexp=function(_409){_409=_409||{};if(!("signed" in _409)){_409.signed=[true,false];}if(!("separator" in _409)){_409.separator="";}else{if(!("groupSize" in _409)){_409.groupSize=3;}}var _40a=dojo.regexp.buildGroupRE(_409.signed,function(q){return q?"[-+]":"";},true);var _40c=dojo.regexp.buildGroupRE(_409.separator,function(sep){if(!sep){return "(?:0|[1-9]\\d*)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_409.groupSize,grp2=_409.groupSize2;if(grp2){var _410="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_410+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_410;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _40a+_40c;};}if(!dojo._hasResource["dojo.cldr.monetary"]){dojo._hasResource["dojo.cldr.monetary"]=true;dojo.provide("dojo.cldr.monetary");dojo.cldr.monetary.getData=function(code){var _412={ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,XOF:0,XPF:0};var _413={CHF:5};var _414=_412[code],_415=_413[code];if(typeof _414=="undefined"){_414=2;}if(typeof _415=="undefined"){_415=0;}return {places:_414,round:_415};};}if(!dojo._hasResource["dojo.currency"]){dojo._hasResource["dojo.currency"]=true;dojo.provide("dojo.currency");dojo.currency._mixInDefaults=function(_416){_416=_416||{};_416.type="currency";var _417=dojo.i18n.getLocalization("dojo.cldr","currency",_416.locale)||{};var iso=_416.currency;var data=dojo.cldr.monetary.getData(iso);dojo.forEach(["displayName","symbol","group","decimal"],function(prop){data[prop]=_417[iso+"_"+prop];});data.fractional=[true,false];return dojo.mixin(data,_416);};dojo.currency.format=function(_41b,_41c){return dojo.number.format(_41b,dojo.currency._mixInDefaults(_41c));};dojo.currency.regexp=function(_41d){return dojo.number.regexp(dojo.currency._mixInDefaults(_41d));};dojo.currency.parse=function(_41e,_41f){return dojo.number.parse(_41e,dojo.currency._mixInDefaults(_41f));};}if(!dojo._hasResource["wsgc.js.Io"]){dojo._hasResource["wsgc.js.Io"]=true;dojo.provide("wsgc.js.Io");dojo.declare("wsgc.js.Io",null,{constructor:function(){if(dojo.getObject("window.location.protocol")==="https:"){this.SHOPPINGCART_URL=secureAppUrl+"services/shoppingcart";}else{this.SHOPPINGCART_URL=appUrl+"services/shoppingcart";}},SHOPPINGCART_URL:"",_transIdRemovedFromSession:false,_alreadyProcessedEditTransaction:false,_xmlStr:"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><addtocartrequest><isgiftcard/><items/></addtocartrequest>",callRiaService:function(_420){var xml=dojox.xml.parser.parse(this._xmlStr);var _422=dojo.query("div.productLineList").length;var _423,sku,_425,_426,_427=[];var _428,_429;if(dojo.byId("monogramsku")&&dojo.byId("monogramsku").value!==""&&dojo.byId("monogramsequence")&&dojo.byId("monogramsequence").value!==""){_428=dojo.byId("monogramsku").value;_429=dojo.byId("monogramsequence").value;}for(var i=0;i<_422;i++){if(!dojo.byId("skuQuantity"+i)){continue;}_425=dojo.byId("skuQuantity"+i).value;if(_425==""){continue;}sku=dojo.byId("skuHidden"+i).value;_426=dojo.byId("skuCatalog"+i).value;_425=parseInt(_425,10);if(_425>0){_427.push({sku:sku,quantity:_425,catalog:_426});}}var _42b=xml.getElementsByTagName("items")[0];var _42c,_42d,_42e,_42f,_430,_431,_432,_433,_434;dojo.forEach(_427,function(_435){_42c=xml.createElement("item");_42d=this._createXMLNodeWithInnerText(xml,"sku",_435.sku);_42c.appendChild(_42d);_42e=this._createXMLNodeWithInnerText(xml,"quantity",_435.quantity);_42c.appendChild(_42e);_42f=this._createXMLNodeWithInnerText(xml,"catalog",_435.catalog);_42c.appendChild(_42f);if(_428&&_428===_435.sku){_430=xml.createElement("monograminfo");_431=this._createXMLNodeWithInnerText(xml,"monoapplyall","0");_430.appendChild(_431);_432=xml.createElement("seqmonogram");_433=this._createXMLNodeWithInnerText(xml,"monogramseqnum","1");_432.appendChild(_433);_434=this._createXMLNodeWithInnerText(xml,"monogramseqinfo",_429);_432.appendChild(_434);_430.appendChild(_432);_42c.appendChild(_430);}_42b.appendChild(_42c);},this);var _436="0";dojo.query(".giftWrap").forEach(function(elem){if(elem.checked){_436="X";}});var _438=this._createXMLNodeWithInnerText(xml,"wrapany",_436);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_438);if(typeof (groupId)!="undefined"){var _439=this._createXMLNodeWithInnerText(xml,"groupid",groupId);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_439);}if(dojo.query(".shipTo").length>0){var _43a=dojo.query(".shipTo")[0].value;var _43b=this._createXMLNodeWithInnerText(xml,"shiptoinfo",_43a);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_43b);}if((typeof (editData)!="undefined")&&(!this._alreadyProcessedEditTransaction)){var _43c=xml.createElement("shopeditskus");xml.getElementsByTagName("addtocartrequest")[0].appendChild(_43c);var _43d=this._createXMLNodeWithInnerText(xml,"editLine",editData.lineid);var _43e=this._createXMLNodeWithInnerText(xml,"editMode","pip");xml.getElementsByTagName("shopeditskus")[0].appendChild(_43d);xml.getElementsByTagName("shopeditskus")[0].appendChild(_43e);}if(_420){var _43f=xml.createElement("shopeditskus");xml.getElementsByTagName("addtocartrequest")[0].appendChild(_43f);var _440=this._createXMLNodeWithInnerText(xml,"editregistrysku",groupId);var _441=this._createXMLNodeWithInnerText(xml,"editmode","registry");xml.getElementsByTagName("shopeditskus")[0].appendChild(_440);xml.getElementsByTagName("shopeditskus")[0].appendChild(_441);}var _442=this._getUrlNode(xml);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_442);if(dojo.byId("pkey")&&(dojo.byId("pkey").value!="")){var _443=this._createXMLNodeWithInnerText(xml,"pkey",dojo.byId("pkey").value);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_443);}var _444=dojo.byId("productGroupIds");if(_444&&_444.value){var _445=this._createXMLNodeWithInnerText(xml,"styleandqtygroupids",_444.value);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_445);}xml=this._decorateXMLForRegistry(xml);var _446=this._getCmSrcFromUrl();if(_446!=""){var _447=this._createXMLNodeWithInnerText(xml,"cmsrc",_446);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_447);}var str;if(dojo.isIE>0){str=xml.xml;}else{var s=new XMLSerializer();str=s.serializeToString(xml);}var _44a=dojo.queryToObject(window.location.search.slice(1));var _44b="";if(!this._transIdRemovedFromSession){if(dojo.exists("transid",_44a)){_44b="/"+_44a.transid;}if(dojo.byId("transIdRAC")&&(dojo.byId("transIdRAC").value!="")){_44b="/"+dojo.byId("transIdRAC").value;}}var self=this;dojo.xhrPost({handleAs:"xml",url:this.SHOPPINGCART_URL+_44b,content:{"p_xml":str},handle:function(res,_44e){if(dojo._isDocumentOk(_44e.xhr)){if(typeof (editData)!="undefined"){self._alreadyProcessedEditTransaction=true;}self._publishResponse(res);return true;}else{return false;}},sync:false});},callRiaServiceRegistryList:function(){var xml=dojox.xml.parser.parse(this._xmlStr);var _450=dojo.query(".skuHidden").length;var _451,sku,_453,_454,_455=[];for(var i=0;i<_450;i++){if(!dojo.byId("webItems["+i+"].qtyToPurchase")){continue;}_453=dojo.byId("webItems["+i+"].qtyToPurchase").value;if(_453==""){continue;}sku=dojo.byId("skuHidden"+i).value;_454=dojo.byId("skuCatalog"+i).value;_453=parseInt(_453,10);if(_453>0){_455.push({sku:sku,quantity:_453,catalog:_454});}}var _457=xml.getElementsByTagName("items")[0];var _458,_459,_45a,_45b;dojo.forEach(_455,function(_45c){_458=xml.createElement("item");_459=this._createXMLNodeWithInnerText(xml,"sku",_45c.sku);_458.appendChild(_459);_45a=this._createXMLNodeWithInnerText(xml,"quantity",_45c.quantity);_458.appendChild(_45a);_45b=this._createXMLNodeWithInnerText(xml,"catalog",_45c.catalog);_458.appendChild(_45b);_457.appendChild(_458);},this);var _45d="0";dojo.query(".giftWrap").forEach(function(elem){if(elem.checked){_45d="1";}});var _45f=this._createXMLNodeWithInnerText(xml,"wrapany",_45d);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_45f);if(typeof (groupId)!="undefined"){var _460=this._createXMLNodeWithInnerText(xml,"groupid",groupId);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_460);}if(dojo.query(".shipTo").length>0){var _461=dojo.query(".shipTo")[0].value;var _462=this._createXMLNodeWithInnerText(xml,"shiptoinfo",_461);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_462);}if((typeof (editData)!="undefined")&&(!this._alreadyProcessedEditTransaction)){var _463=xml.createElement("shopeditskus");xml.getElementsByTagName("addtocartrequest")[0].appendChild(_463);var _464=this._createXMLNodeWithInnerText(xml,"editLine",editData.lineid);var _465=this._createXMLNodeWithInnerText(xml,"editMode","pip");xml.getElementsByTagName("shopeditskus")[0].appendChild(_464);xml.getElementsByTagName("shopeditskus")[0].appendChild(_465);}var _466=this._getUrlNode(xml);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_466);if(dojo.byId("pkey")&&(dojo.byId("pkey").value!="")){var _467=this._createXMLNodeWithInnerText(xml,"pkey",dojo.byId("pkey").value);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_467);}xml=this._decorateXMLForRegistry(xml);var _468=this._getCmSrcFromUrl();if(_468!=""){var _469=this._createXMLNodeWithInnerText(xml,"cmsrc",_468);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_469);}var str;if(dojo.isIE>0){str=xml.xml;}else{var s=new XMLSerializer();str=s.serializeToString(xml);}var _46c=dojo.queryToObject(window.location.search.slice(1));var _46d="";if(!this._transIdRemovedFromSession){if(dojo.exists("transid",_46c)){_46d="/"+_46c.transid;}if(dojo.byId("transIdRAC")&&(dojo.byId("transIdRAC").value!="")){_46d="/"+dojo.byId("transIdRAC").value;}}var self=this;dojo.xhrPost({handleAs:"xml",url:this.SHOPPINGCART_URL+_46d,content:{"p_xml":str},handle:function(res,_470){if(dojo._isDocumentOk(_470.xhr)){if(typeof (editData)!="undefined"){self._alreadyProcessedEditTransaction=true;}self._publishResponse(res);return true;}else{return false;}},sync:false});},callRiaServiceForSVC:function(){var xml=dojox.xml.parser.parse(this._xmlStr);var _472,sku,_474,_475,_476=[];var _477=xml.getElementsByTagName("items")[0];var _478,_479,_47a,_47b,_47c;_47c=dojo.byId("giftCardAmount").value.split("-");_475=_47c[0];sku=_47c[1];_478=xml.createElement("item");_479=this._createXMLNodeWithInnerText(xml,"sku",sku);_478.appendChild(_479);_47a=this._createXMLNodeWithInnerText(xml,"quantity",dojo.byId("giftCardQty").value);_478.appendChild(_47a);_47b=this._createXMLNodeWithInnerText(xml,"catalog",_475);_478.appendChild(_47b);_477.appendChild(_478);var _47d="0";dojo.query(".giftWrap").forEach(function(elem){if(elem.checked){_47d="1";}});var _47f=this._createXMLNodeWithInnerText(xml,"wrapany",_47d);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_47f);var _480=this._createXMLNodeWithInnerText(xml,"groupid",groupId);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_480);if(dojo.query(".shipTo").length>0){var _481=dojo.query(".shipTo")[0].value;var _482=this._createXMLNodeWithInnerText(xml,"shiptoinfo",_481);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_482);}if((typeof (editData)!="undefined")&&(!this._alreadyProcessedEditTransaction)){var _483=xml.createElement("shopeditskus");xml.getElementsByTagName("addtocartrequest")[0].appendChild(_483);var _484=this._createXMLNodeWithInnerText(xml,"editLine",editData.lineid);var _485=this._createXMLNodeWithInnerText(xml,"editMode","pip");xml.getElementsByTagName("shopeditskus")[0].appendChild(_484);xml.getElementsByTagName("shopeditskus")[0].appendChild(_485);}var _486=this._getUrlNode(xml);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_486);if(dojo.byId("pkey")&&(dojo.byId("pkey").value!="")){var _487=this._createXMLNodeWithInnerText(xml,"pkey",dojo.byId("pkey").value);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_487);}xml=this._decorateXMLForRegistry(xml);var _488=this._getCmSrcFromUrl();if(_488!=""){var _489=this._createXMLNodeWithInnerText(xml,"cmsrc",_488);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_489);}var str;if(dojo.isIE>0){str=xml.xml;}else{var s=new XMLSerializer();str=s.serializeToString(xml);}var _48c=dojo.queryToObject(window.location.search.slice(1));var _48d="";if(!this._transIdRemovedFromSession){if(dojo.exists("transid",_48c)){_48d="/"+_48c.transid;}if(dojo.byId("transIdRAC")&&(dojo.byId("transIdRAC").value!="")){_48d="/"+dojo.byId("transIdRAC").value;}}var self=this;dojo.xhrPost({handleAs:"xml",url:this.SHOPPINGCART_URL+_48d,content:{"p_xml":str},handle:function(res,_490){if(dojo._isDocumentOk(_490.xhr)){if(typeof (editData)!="undefined"){self._alreadyProcessedEditTransaction=true;}self._publishResponse(res);return true;}else{return false;}},sync:false});},_publishResponse:function(_491){dojo.publish("/riaResponse",[_491]);},_createXMLNodeWithInnerText:function(xml,_493,_494){var node=xml.createElement(_493);var _496=xml.createTextNode(_494);node.appendChild(_496);return node;},_decorateXMLForRegistry:function(xml){if(dojo.byId("registrantid")&&(dojo.byId("registrantid").value!="")){var _498=xml.createElement("registry");var _499=this._createXMLNodeWithInnerText(xml,"registryid",dojo.byId("registrantid").value);_498.appendChild(_499);var _49a=this._createXMLNodeWithInnerText(xml,"isregistrant",dojo.byId("isregistrant").value);_498.appendChild(_49a);xml.getElementsByTagName("addtocartrequest")[0].appendChild(_498);if(dojo.byId("isregistrylist")&&(dojo.byId("isregistrylist").value!="")){var _49b=this._createXMLNodeWithInnerText(xml,"isregistrylist",dojo.byId("isregistrylist").value);_498.appendChild(_49b);}var _49c=dojo.queryToObject(window.location.search.slice(1));var _49d=0;if(dojo.byId("regitemneeds")&&dojo.byId("regitemneeds").value){_49d=dojo.byId("regitemneeds").value;}var _49e=this._createXMLNodeWithInnerText(xml,"needs",_49d);_498.appendChild(_49e);var _49f=0;if(dojo.exists("fromrgl",_49c)){_49f=_49c.fromrgl;}var _4a0=this._createXMLNodeWithInnerText(xml,"sourcereglist",_49f);_498.appendChild(_4a0);var _4a1=dojo.queryToObject(window.location.search.slice(1));if(typeof (_4a1.transid)!="undefined"){var _4a2=this._createXMLNodeWithInnerText(xml,"isregistryedit","1");_498.appendChild(_4a2);}}return xml;},_getUrlNode:function(xml){var _4a4=this._createXMLNodeWithInnerText(xml,"srcurl",window.location.toString().split(appUrl)[1]);return _4a4;},_getCmSrcFromUrl:function(){var _4a5=dojo.queryToObject(window.location.search.slice(1));var _4a6="";if(dojo.exists("cm_src",_4a5)){_4a6=_4a5.cm_src;if(_4a6.substring(2,1)===":"){_4a6=_4a6.substring(3);}if(cmSrcPrefix&&cmSrcPrefix==="E:"){_4a6="E:"+_4a6;}else{if(dojo.byId("registrantid")&&(dojo.byId("registrantid").value!="")){_4a6=cmSrcPrefix+_4a6;}else{_4a6="E:"+_4a6;}}}else{if(dojo.exists("fromrgl",_4a5)){_4a6="RGL";if(cmSrcPrefix&&dojo.byId("registrantid")&&(dojo.byId("registrantid").value!="")){_4a6=cmSrcPrefix+_4a6;}else{_4a6="E:"+_4a6;}}else{if((dojo.byId("pipCategoryId"))&&(dojo.byId("pipCategoryId").value!="")){if(cmSrcPrefix&&dojo.byId("registrantid")&&(dojo.byId("registrantid").value!="")){_4a6=cmSrcPrefix+dojo.byId("pipCategoryId").value;}else{_4a6="E:"+dojo.byId("pipCategoryId").value;}}else{if((dojo.byId("isregistrylist"))&&(dojo.byId("isregistrylist").value!="0")&&(dojo.byId("isregistrant"))&&(dojo.byId("isregistrant").value==="0")){_4a6="G:RGL";}}}}if((dojo.byId("iscompletion"))){_4a6="R:CMP";}return _4a6;},_callConfirmationService:function(_4a7){var self=this;if(this._transIdRemovedFromSession){return;}dojo.xhrGet({handleAs:"xml",url:this.SHOPPINGCART_URL+"/"+_4a7,handle:function(res,_4aa){if(dojo._isDocumentOk(_4aa.xhr)){self._publishResponse(res);return true;}else{self._transIdRemovedFromSession=true;return false;}},sync:false});},deleteTransactionId:function(_4ab){if(this._transIdRemovedFromSession){return;}var _4ac="<?xml version='1.0' encoding='UTF-8'?><clearTransactionRequest></clearTransactionRequest>";var self=this;dojo.xhrPost({handleAs:"xml",url:this.SHOPPINGCART_URL+"/"+_4ab,content:{"p_xml":_4ac},handle:function(res,_4af){if(dojo._isDocumentOk(_4af.xhr)){self._transIdRemovedFromSession=true;return true;}else{return false;}},sync:false});this._transIdRemovedFromSession=true;}});}if(!dojo._hasResource["wsgc.js.SwatchBase"]){dojo._hasResource["wsgc.js.SwatchBase"]=true;dojo.provide("wsgc.js.SwatchBase");dojo.declare("wsgc.js.SwatchBase",null,{constructor:function(){this._createSwatchNameToggle();dojo.query("#swatch-block ul li a").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onmouseover",this,"handleSwatchOnMouseOver");dojo.connect(elem,"onfocus",this,"handleSwatchOnMouseOver");dojo.connect(elem,"onmouseout",this,"handleSwatchOnMouseOut");dojo.connect(elem,"onblur",this,"handleSwatchOnMouseOut");}));},SHOWN_IN_PREFIX:"Shown: ",currentSwatchTitle:"Rollover to view name.",DEFAULT_SWATCH_TEXT:"Rollover to view name.",_createSwatchNameToggle:function(){var elem=dojo.byId("swatch-name");if(elem){this.swatchNameFader=new dojo.fadeOut({node:"swatch-name",duration:1000,onEnd:dojo.hitch(this,this._setSwatchTitleCurrent)});}},handleSwatchOnMouseOver:function(evt){var elem=evt.currentTarget;if(!dojo.attr(elem,"swatchlabel")){return;}this._setSwatchHighlighted(elem);var _4b4=dojo.byId("swatch-name");if(_4b4){if(this.swatchNameFader.status()!=="stopped"){this.swatchNameFader.stop();}this._setSwatchTitle(dojo.attr(elem,"swatchlabel"));}},handleSwatchOnMouseOut:function(evt){var elem=evt.currentTarget;this._setSwatchUnhighlighted(elem);if(this.swatchNameFader.status()!=="stopped"){this.swatchNameFader.stop();}var _4b7=dojo.byId("swatch-name");if(_4b7&&_4b7.innerHTML===this.currentSwatchTitle){return;}else{this.swatchNameFader.play(0,true);}},_setSwatchTitleCurrent:function(){this._setSwatchTitle(this.currentSwatchTitle);if(this.currentSwatchTitle===this.DEFAULT_SWATCH_TEXT){this._setSwatchesUnselected();}},_setSwatchTitle:function(name){var _4b9=dojo.byId("swatch-name");if(_4b9){_4b9.innerHTML=name;if(dojo.isIE){dojo.style("swatch-name","filter","");}else{dojo.style("swatch-name","opacity","");}}},_setSwatchSelected:function(elem){this._setSwatchesUnselected();dojo.query("img",elem).forEach("dojo.addClass(item, 'selected');");dojo.query(".product-thumb").forEach("dojo.removeClass(item, 'selected');");},_setSwatchesUnselected:function(){dojo.query("#swatch-block li img").forEach("dojo.removeClass(item, 'selected');");},_setSwatchHighlighted:function(elem){if(!elem){return;}dojo.query("img",elem).forEach("dojo.addClass(item, 'on');");},_setSwatchUnhighlighted:function(elem){if(elem){dojo.query("img",elem).forEach("dojo.removeClass(item, 'on');");}}});}if(!dojo._hasResource["wsgc.js.SwatchBlockController"]){dojo._hasResource["wsgc.js.SwatchBlockController"]=true;dojo.provide("wsgc.js.SwatchBlockController");dojo.declare("wsgc.js.SwatchBlockController",wsgc.js.SwatchBase,{constructor:function(_4bd){this._pipC=_4bd;},SWATCHBLOCK_HEIGHT:120,DCSEnabled:false,_handleSwatchClick:function(evt){var elem=evt.currentTarget;dojo.stopEvent(evt);var _4c0=dojo.attr(evt.currentTarget,"skuArray");var _4c1=dojo.fromJson(_4c0);if(_4c1.length===0){return false;}imageDataStore.fetch({query:{id:""+_4c1[0]},caller:this,queryOptions:{ignoreCase:true},onComplete:dojo.hitch(this,this._handleImageCallbackForSwatchClick)});if(!dojo.attr(elem,"swatchlabel")){return false;}this.currentSwatchTitle=this.SHOWN_IN_PREFIX+dojo.attr(elem,"swatchlabel");this._setSwatchTitleCurrent();this._setSwatchSelected(elem);return false;},_handleImageCallbackForSwatchClick:function(_4c2,_4c3){if(_4c2.length<1){return;}var item=_4c2[0];var path=imageDataStore.getValue(item,"pt");var alt=imageDataStore.getValue(item,"al");var _4c7=imageDataStore.getValue(item,"at");var _4c8=imageDataStore.getValue(item,"id");var src=imageRepo+path+_4c7+".jpg";if(dojo.byId("hero-image")){dojo.byId("hero-image").src=imageRepo+path+this._pipC.HERO_IMG_SUFFIX+".jpg";dojo.byId("hero-image").alt=alt;dojo.byId("hero-image").title=alt;}var _4ca=dojo.byId("more-views-link");if(_4ca){this._pipC._updatePopupHref(_4ca,"view-larger.html",{"sku":_4c8,"zoom":0});}},_setSwatchTitleBySKU:function(sku){var _4cc=null;this._setSwatchesUnselected();this.currentSwatchTitle=this.DEFAULT_SWATCH_TEXT;this._setSwatchTitleCurrent();var temp=dojo.query("#swatch-block li a[skuarray*=\""+sku+"\"] img");if(temp.length<1){return;}_4cc=temp[0];this._setSwatchesUnselected();this._setSwatchSelected(dojo.query("#swatch-block a[skuarray*=\""+sku+"\"]")[0]);if(dojo.query("#swatch-block a[skuarray*=\""+sku+"\"]").length===0){return;}this.currentSwatchTitle=this.SHOWN_IN_PREFIX+dojo.attr(dojo.query("#swatch-block a[skuarray*=\""+sku+"\"]")[0],"swatchlabel");this._setSwatchTitleCurrent();}});}if(!dojo._hasResource["wsgc.js.PipController"]){dojo._hasResource["wsgc.js.PipController"]=true;dojo.provide("wsgc.js.PipController");dojo.declare("wsgc.js.PipController",wsgc.js.AddItemControllerBase,{constructor:function(){this._swatchController=new wsgc.js.SwatchBlockController(this);this._registerThumbEvents();this._resetPip(typeof editData==="undefined");this._registerEventListeners();},_swatchController:null,HERO_IMG_SUFFIX:"m",SUBSET_IMG_SUFFIX:"x",_shipToMetricsProcessed:false,_giftWrapMetricsProcessed:false,_fromRegistyrList:false,isShipToValid:true,_giftWrapShipToCMCall:function(arg){try{if(typeof cmCreatePageElementTag==="function"){cmCreatePageElementTag(arg,"GiftWrap_shipto_Section");}}catch(e){console.error("cm pip-gift wrap ship to fail.");}},_handleGiftWrapCMCall:function(evt){if(!this._giftWrapMetricsProcessed){this._giftWrapShipToCMCall("GWCheckbox");this._giftWrapMetricsProcessed=true;}},_handleShipToCMCall:function(evt){if(!this._shipToMetricsProcessed){this._giftWrapShipToCMCall("shipto");this._shipToMetricsProcessed=true;}},_registerEventListeners:function(){dojo.subscribe("/renderSkuAddItemErrors",this,"_renderAddItemErrors");dojo.query("span.attribute-drop-down select.attribute2, span.attribute-drop-down select.attribute3, span.attribute-drop-down select.attribute4").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onkeypress",this,"_handleTabKeyPressOnSelectElements");}));dojo.query(".btn_addtobasket").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this,"handleAddToCartClick");}));dojo.query(".skuSwatch").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this._swatchController,"_handleSwatchClick");}));dojo.query(".giftWrap").forEach(function(item){dojo.connect(item,"onclick",function(evt){dojo.query(".giftWrap").forEach(function(item){item.checked=evt.currentTarget.checked;});});});dojo.query(".giftWrap").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this,"_handleGiftWrapCMCall");}));dojo.query(".shipTo").forEach(function(item){dojo.connect(item,"onchange",function(evt){dojo.query(".shipTo").forEach(function(item){item.selectedIndex=evt.currentTarget.selectedIndex;});});});dojo.query(".shipTo").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onchange",this,"_handleShipToCMCall");}));dojo.query(".knownRegistry").forEach(function(elem){dojo.connect(elem,"onclick",this,"_updateRegistryFromRadioButton");},this);if(dojo.byId("previewBtnLnk")){dojo.connect(dojo.byId("previewBtnLnk"),"onclick",this,"_updatePersonalizationHref");}},_handleTabKeyPressOnSelectElements:function(evt){var elem=evt.currentTarget;if(((evt.keyCode==9)&&(evt.shiftKey==true))||(dojo.attr(elem,"isEdge")=="true")||(elem.selectedIndex==0)){return true;}if(evt.keyCode==9){var _4df=parseInt(dojo.attr(elem,"attrIndex"),10);var _4e0=parseInt(dojo.attr(elem,"productIndex"),10);if(dojo.byId("attr"+(_4df+1)+"_"+_4e0)&&!dojo.byId("attr"+(_4df+1)+"_"+_4e0).disabled){return true;}this["handleAttrChange"](evt);evt.preventDefault();return false;}return true;},_resetPip:function(_4e1){if(typeof _4e1==="undefined"){_4e1=true;}dojo.query("span.attribute-drop-down select.attribute2").forEach(function(elem){elem.selectedIndex=0;});dojo.query("span.attribute-drop-down select.attribute3, span.attribute-drop-down select.attribute4").forEach(function(elem){dojo.query("#"+elem.id+" > *").orphan();elem.disabled=true;});dojo.query(".skuQuantity").forEach("item.value = ''");dojo.query(".skuHidden").forEach("item.value = ''");dojo.query(".drop-area .productPrice > *").orphan();dojo.query(".giftWrap").forEach("item.checked = false;");dojo.query(".shipTo").forEach("item.selectedIndex = 0;");if(dojo.query(".knownRegistry").length>0&&_4e1){dojo.query(".knownRegistry[checked]").forEach("item.checked=false;");dojo.query(".knownRegistry[value='no']").forEach("item.checked=true;");if(dojo.byId("registrantid")){dojo.byId("registrantid").value="";}}},_registerThumbEvents:function(){dojo.query(".product-thumb").forEach(function(elem){dojo.connect(elem,"onclick",this,"_handleThumbClick");dojo.connect(elem,"onkeypress",this,"_handleThumbClick");},this);},_handleThumbClick:function(evt){if(evt.type==="keypress"&&(typeof evt.keyCode==="undefined"||evt.keyCode!==13||(evt.shiftKey!==false&&evt.shiftKey!==0))){return;}evt.preventDefault();dojo.query(".product-thumb").forEach("dojo.removeClass(item, 'selected');");dojo.addClass(evt.currentTarget,"selected");var _4e6=dojo.attr(evt.currentTarget,"imgIndex");if(dojo.query(".hiddenImageCache img[imgIndex='"+_4e6+"']").length==0){return;}var _4e7=dojo.query("div.hiddenImageCache img[imgIndex='"+_4e6+"']")[0];var _4e8=dojo.attr(_4e7,"src");dojo.byId("hero-image").src=_4e8;var link=dojo.byId("more-views-link");if(link){this._updatePopupHref(link,"more-views.html",{"active":_4e6});var _4ea=dojo.attr(link,"href");var _4eb=dojo.byId("link_view_more");if(_4eb){dojo.attr(_4eb,"href",_4ea);}}if(dojo.byId("swatch-block")){this._swatchController.currentSwatchTitle=this._swatchController.DEFAULT_SWATCH_TEXT;this._swatchController._setSwatchTitleCurrent();}if(evt.type==="keypress"){dojo.byId("more-views-link").focus();}},_renderErrors:function(){if(this._productErrorStack.length==0&&this.isShipToValid){if(this._errors._getErrorMessage("required.productattribs")!==""){dojo.byId("pageErrorHook").innerHTML=this._errors._getErrorMessage("required.productattribs");dojo.addClass("pageErrorHook",this.ERROR_CLASS);}}else{if(this._errors._getErrorMessage("info.errattn")!==""){dojo.byId("pageErrorHook").innerHTML=this._errors._getErrorMessage("info.errattn");dojo.addClass("pageErrorHook",this.ERROR_CLASS);}}var _4ec,div;dojo.forEach(this._productErrorStack,function(item){_4ec=item.productNumber;div=document.createElement("div");div.innerHTML=item.error;dojo.byId("skuErrorHook_"+_4ec).appendChild(div);dojo.byId("skuErrorHook_"+_4ec).tabIndex="0";dojo.addClass("skuErrorHook_"+_4ec,this.ERROR_CLASS);},this);if(dojo.byId("pageErrorHook").innerHTML!==""){dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();}else{var _4ef=dojo.query(".skuErrorHook[tabIndex='0']");if(_4ef.length>0){_4ef[0].focus();}}if(!this.isShipToValid&&dojo.byId("shipToErrorHook")){dojo.byId("shipToErrorHook").innerHTML=this._errors._getErrorMessage("invalid.shipTo");dojo.addClass("shipToErrorHook",this.ERROR_CLASS);}window.scrollTo(0,0);},_formValid:function(){var _4f0=true;this.isShipToValid=true;this._productErrorStack=[];var _4f1=[];var _4f2=dojo.query("div.productLineList");var _4f3,_4f4,_4f5;for(var i=0;i<_4f2.length;i++){if(!dojo.byId("skuQuantity"+i)){continue;}_4f4=dojo.byId("skuQuantity"+i).value;if(dojo.trim(_4f4)===""){continue;}if(_4f4.length===2&&_4f4.charAt(0)==="0"){_4f4=_4f4.charAt(1);}_4f4=dojo.number.parse(_4f4,{places:0});if(isNaN(_4f4)||_4f4<1||_4f4>99){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.quantity")});dojo.byId("skuQuantity"+i).value="";_4f1[i]=true;_4f0=false;continue;}else{_4f1[i]=false;_4f0=false;if(dojo.byId("skuHidden"+i)){_4f5=dojo.byId("skuHidden"+i).value;if(_4f5===""){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.option")});}}}}var _4f7=dojo.query(".attribute2");var attr,_4f9;for(i=0;i<_4f7.length;i++){attr=_4f7[i];_4f9=dojo.attr(attr,"productindex");if((attr.value!="")&&(dojo.trim(dojo.byId("skuQuantity"+_4f9).value)==="")&&!_4f1[_4f9]){this._productErrorStack.push({productNumber:_4f9,error:this._errors._getErrorMessage("invalid.quantity")});_4f0=false;}}if(dojo.query(".knownRegistry").length>0){if(_4f0==true){this._productErrorStack.push({productNumber:0,error:this._errors._getErrorMessage("invalid.formEmpty")});}if((dojo.query(".knownRegistry[checked]").length>0)&&(dojo.query(".knownRegistry[value='no']")[0].checked==true)&&(dojo.query(".shipTo")[0].value==="Registrant")){this._productErrorStack.push({productNumber:0,error:this._errors._getErrorMessage("invalid.registrantShipping")});}}if(dojo.query(".shipTo").filter(function(item){if(item.value===""){return true;}}).length>0){this.isShipToValid=false;}return (this._productErrorStack.length===0&&!_4f0&&this.isShipToValid);},handleAddToCartClick:function(evt){if(evt){evt.preventDefault();evt.stopPropagation();}this._clearErrors();var _4fc=this._formValid();if(!_4fc){this._renderErrors();return;}if(this._fromRegistyrList){this._io.callRiaService(true);}else{this._io.callRiaService(false);}},_processEdge:function(elem){var sku=elem.value;if(sku=="undefined"||sku===""){return;}var _4ff={"id":sku};var _500=dojo.attr(elem.id,"productIndex");skuDataStore.fetch({query:_4ff,caller:this,queryOptions:{ignoreCase:true},sort:[{attribute:"ns"}],onComplete:this._handleEdgeCallback,productIndex:_500});imageDataStore.fetch({query:_4ff,caller:this,queryOptions:{ignoreCase:true},onComplete:dojo.hitch(this,this._handleImageChangeCallback),productIndex:_500});if((dojo.byId("skuQuantity"+_500).value=="")||(parseInt(dojo.byId("skuQuantity"+_500).value,10)<1)){dojo.byId("skuQuantity"+_500).value=1;}},_handleImageChangeCallback:function(_501,_502){if(_501.length<1){return;}var item=_501[0];var path=imageDataStore.getValue(item,"pt");var alt=imageDataStore.getValue(item,"al");var _506=this.SUBSET_IMG_SUFFIX;var _507=imageDataStore.getValue(item,"id");var src=imageRepo+path+_506+".jpg";if(dojo.byId("thumb"+_502.productIndex)){dojo.byId("thumb"+_502.productIndex).src=src;dojo.byId("thumb"+_502.productIndex).alt=alt;}var link=dojo.byId("previewColor"+_502.productIndex);if(link){this._updatePopupHref(link,"preview-colors.html",{"sku":_507});var _50a=dojo.attr(link,"href");var _50b=dojo.byId("thumbLink"+_502.productIndex);if(_50b){dojo.attr(_50b,"href",_50a);}}if(_502.productIndex==0&&this._swatchController.DCSEnabled){dojo.byId("hero-image").src=imageRepo+path+_502.caller.HERO_IMG_SUFFIX+".jpg";dojo.byId("hero-image").alt=alt;dojo.byId("hero-image").title=alt;var sku=imageDataStore.getValue(item,"id");if(sku){this._swatchController._setSwatchTitleBySKU(sku);}link=dojo.byId("more-views-link");if(link){this._updatePopupHref(link,"preview-colors.html",{"sku":_507});}}},_handleEdgeCallback:function(_50d,_50e){if(_50d.length<1){return;}var item=_50d[0];var sku=skuDataStore.getValue(item,"id");var _511=skuDataStore.getValue(item,"cat");dojo.byId("skuHidden"+_50e.productIndex).value=sku;dojo.byId("skuCatalog"+_50e.productIndex).value=_511;_50e.caller._renderPricing(item,_50e.productIndex);},_renderPricing:function(item,_513){var _514=skuDataStore.getValue(item,"rp");var sale=skuDataStore.getValue(item,"sl");var _516=skuDataStore.getValue(item,"sp");var _517=skuDataStore.getValue(item,"sc");var _518=skuDataStore.getValue(item,"b");var _519=document.createElement("span");dojo.addClass(_519,"price");var _51a="$"+dojo.currency.format(_514);_519.innerHTML=_51a;if(parseInt(_517,10)>0){var _51b=document.createElement("span");dojo.addClass(_51b,"offscreen");_51b.innerHTML="Delivery Surcharge ";var _51c=document.createElement("span");dojo.addClass(_51c,"price-surcharge");_51c.innerHTML="($"+dojo.currency.format(_517)+"*)";}var _51d=document.createElement("span");if(sale||_516){_519.innerHTML="Sugg. Price "+_51a;if(_516){dojo.addClass(_519,"price-strike");}else{dojo.addClass(_519,"price-strike-sale");}_514=skuDataStore.getValue(item,"p");if(sale){dojo.addClass(_51d,"price-sale");_51d.innerHTML="Sale $"+dojo.currency.format(_514);}if(_516){dojo.addClass(_51d,"price-special");_51d.innerHTML="Our Price $"+dojo.currency.format(_514);}}else{dojo.addClass(_519,"price-standard");}var _51e;if(_518&&((!(dojo.byId("isregistrant")&&dojo.byId("isregistrant").value==="1"))||dojo.byId("iscompletion"))){_51e=document.createElement("span");_51e.id="backorder"+_513;dojo.addClass(_51e,"backorder");_51e.innerHTML=this._errors._getErrorMessage("message.backorder")+_518;}this._clearSubsetPricing(_513);dojo.byId("productPrice"+_513).appendChild(_519);if(sale||_516){dojo.byId("productPrice"+_513).appendChild(_51d);}if(_51c){dojo.byId("productPrice"+_513).appendChild(_51b);dojo.byId("productPrice"+_513).appendChild(_51c);}if(_518){dojo.byId("productPrice"+_513).parentNode.appendChild(_51e);}},_clearSubsetPricing:function(_51f){dojo.query("#productPrice"+_51f+" > *").orphan();dojo.query(".backorder",dojo.byId("product"+_51f)).orphan();},_clearSelectedSku:function(_520){if(dojo.byId("skuHidden"+_520)){dojo.byId("skuHidden"+_520).value="";}if(dojo.byId("skuCatalog"+_520)){dojo.byId("skuCatalog"+_520).value="";}},_clearSelectedQuantity:function(_521){if(dojo.byId("skuQuantity"+_521)){dojo.byId("skuQuantity"+_521).value="";}},handleAttrChange:function(evt){this._doAttrChange(evt.currentTarget,evt);var _523=parseInt(dojo.attr(evt.currentTarget,"productIndex"),10);var anim=dojo.fadeOut({node:dojo.byId("skuErrorHook_"+_523),errorClass:this.ERROR_CLASS,duration:500});dojo.connect(anim,"onEnd",function(evt){this.node.innerHTML="";this.node.tabIndex="-1";dojo.removeClass(this.node,this.errorClass);dojo._setOpacity(this.node,"1.0");});anim.play();},_doAttrChange:function(_526,evt){var _528=parseInt(dojo.attr(_526,"productIndex"),10);var _529=parseInt(dojo.attr(_526,"attrIndex"),10);if(_529===2&&dojo.byId("attr2_"+_528)&&dojo.byId("attr2_"+_528).value===""){this._clearSelectedQuantity(_528);}if(dojo.attr(_526,"isEdge")=="true"){this._clearSubsetPricing(_528);this._clearSelectedSku(_528);this._processEdge(_526);return;}var _52a={"c":_528};for(var i=2;i<=_529;i++){var _52c="attr"+i.toString()+"_"+_528.toString();var _52d=dojo.byId(_52c).value;_52a["a"+i.toString()]=_52d;}var id=_526.value;attributeStore.fetch({query:_52a,caller:this,evt:evt,select:_526,queryOptions:{ignoreCase:true},sort:[{attribute:"ns"}],onComplete:this.populateDropdown,productIndex:_528,attrIndex:_529});},_disableSubsequentAttributes:function(_52f){var attr=_52f.attrIndex+2;for(var i=attr;i<=4;i++){var _532=dojo.byId("attr"+i+"_"+_52f.productIndex);if(!_532){break;}_532.innerHTML="";_532.disabled=true;}_52f.caller._clearSubsetPricing(_52f.productIndex);_52f.caller._clearSelectedSku(_52f.productIndex);},populateDropdown:function(_533,_534){var _535=_534.attrIndex+1;_534.caller._disableSubsequentAttributes(_534);var _536=dojo.byId("attr"+_535+"_"+_534.productIndex);_536.disabled=false;if((_534.evt)&&(_534.evt.keyCode==9)){_536.focus();}_536.innerHTML="";if(_533.length==0){_536.disabled=true;return;}var _537={},_538=[],item,_53a,_53b;_538.push({label:_533[0].ps[_535-1],sku:""});for(var i=0;i<_533.length;i++){item=_533[i];_53a=attributeStore.getValue(item,"a"+_535);if(_53a==null||_537[_53a]){continue;}_537[_53a]=true;_53b=_53a;if(dojo.attr(_536,"isEdge")=="true"){_53b=attributeStore.getValue(item,"id");}_538.push({label:_53a,value:_53b});}var _53d;dojo.forEach(_538,function(item){_53d=document.createElement("option");_53d.innerHTML=item.label;dojo.attr(_53d,"lookup",item.label);_53d.value=item.value;_536.appendChild(_53d);});},_populateSubsetDropDownsBySingleSku:function(sku,dcs){if(typeof dcs==="undefined"){dcs=false;}var _541={"id":sku.toString()};attributeStore.fetch({query:_541,caller:this,queryOptions:{ignoreCase:true},onComplete:this.getAttrs,dcs:dcs});},getAttrs:function(_542,_543){if(_542.length==0){return;}var item=_542[0];var _545=attributeStore.getValue(item,"a2");var _546=attributeStore.getValue(item,"a3");var _547=attributeStore.getValue(item,"a4");var sku=attributeStore.getValue(item,"id");var _549=attributeStore.getValue(item,"c");_543.caller.dropDownSelectFunc(2,_545,_549);setTimeout(function(){_543.caller.dropDownSelectFunc(3,_546,_549);},100);setTimeout(function(){_543.caller.dropDownSelectFunc(4,_547,_549);},200);if(_543.dcs){dojo.byId("skuErrorHook_"+_549).innerHTML=_543.caller._errors._getErrorMessage("notification.update");}},_populateSubsetDropDownsByMultipleSkus:function(_54a){if(_54a.length===0){return;}var _54b="";for(var i=0;i<_54a.length;i++){if(i>0){_54b=_54b+" OR ";}_54b=_54b+"\"id\": \""+_54a[i]+"\"";}attributeStore.fetch({query:_54b,caller:this,queryOptions:{ignoreCase:true},onComplete:this._setMultipleAttrs});},_setMultipleAttrs:function(_54d,_54e){if(_54d.length==0){return;}var _54f=attributeStore.getValue(_54d[0],"c");var sku=attributeStore.getValue(_54d[0],"id");var _551,_552,_553,_554,_555,_556;for(var i=0;i<_54d.length;i++){_554=attributeStore.getValue(_54d[i],"a2");_555=attributeStore.getValue(_54d[i],"a3");_556=attributeStore.getValue(_54d[i],"a4");if(i===0){_551=_554;_552=_555;_553=_556;}else{if(_553!==_556){_553="";}if(_552!==_555){_552="";_553="";}if(_551!==_554){_551="";_552="";_553="";}}}if(_551!==""){dojo.byId("skuErrorHook_"+_54f).innerHTML=_54e.caller._errors._getErrorMessage("notification.partialupdate");}else{dojo.byId("skuErrorHook_"+_54f).innerHTML=_54e.caller._errors._getErrorMessage("notification.swatchchange");}if(_551===""&&dojo.query("#attr2_"+_54f).length>0){_551=dojo.query("#attr2_"+_54f)[0].options[0].text;}_54e.caller.dropDownSelectFunc(2,_551,_54f);setTimeout(function(){_54e.caller.dropDownSelectFunc(3,_552,_54f);},100);setTimeout(function(){_54e.caller.dropDownSelectFunc(4,_553,_54f);},200);},dropDownSelectFunc:function(_558,_559,_55a){dojo.query("#attr"+_558+"_"+_55a).forEach(function(_55b){dojo.forEach(_55b.options,function(_55c){if(dojo.attr(_55c,"lookup")===_559){_55c.selected=true;pipC._doAttrChange(_55b,null);}});});},populatePipForEditMode:function(){if(typeof editData.catSKU=="undefined"){return;}if((editData.giftWrap!=null)&&(editData.giftWrap.giftWrapped)){dojo.query(".giftWrap").forEach("item.checked = true;");}var _55d=editData.shipTo;dojo.query(".shipTo").forEach(function(item){item.value=_55d;});if(_55d==="Registrant"&&dojo.query(".shipTo option[value='Registrant']").length===0){var _55f=document.createElement("option");_55f.value="";_55f.text="";dojo.query(".shipTo").forEach(function(item){item.insertBefore(_55f,item.firstChild);item.value="";});}if(dojo.query(".knownRegistry[checked]").length>0&&dojo.query(".knownRegistry[value='no']")[0].checked==true){dojo.byId("registrantid").value="";}if(typeof isThinPIP==="undefined"){this._populateQtyAndDropdowns(editData.catSKU.SKU,editData.quantity);}else{dojo.byId("skuQuantity0").value=editData.quantity;}},populatePipForEditModeFromInterstitial:function(xml){var _562=xml.getElementsByTagName("items")[0];if(_562.length==0){return;}var _563=xml.getElementsByTagName("wrapany");if(_563[0].firstChild.nodeValue&&(_563[0].firstChild.nodeValue=="1")){dojo.query(".giftWrap").forEach("item.checked = true;");}var _564=xml.getElementsByTagName("shiptoinfo");var i=0;if(_564.length>0){var _566=xml.getElementsByTagName("nickname");if(_566[0].firstChild.nodeValue){_564=dojo.query(".shipTo")[0];var _567=_564.options.length-1;for(i=0;i<_564.options.length;i++){if(_566[0].firstChild.nodeValue==_564.options[i].value){_567=i;break;}}dojo.query(".shipTo").forEach(function(item){item.selectedIndex=_567;});}}if(dojo.query(".knownRegistry").length>0){var _569=xml.getElementsByTagName("registryid");if(_569[0]&&_569[0].firstChild.nodeValue&&_569[0].firstChild.nodeValue!=""){dojo.query(".knownRegistry[value='"+_569[0].firstChild.nodeValue+"']").forEach("item.checked = true;");dojo.byId("registrantid").value=_569[0].firstChild.nodeValue;}else{dojo.query(".knownRegistry[value='no']").forEach("item.checked = true;");dojo.byId("registrantid").value="";}}if(typeof isThinPIP==="undefined"){var _56a=function(_56b,_56c){if(_562.length==0){return;}var _56d=_56b[0];var _56e=attributeStore.getValue(_56d,"c");if(typeof (_56f[_56e])=="undefined"){_56f[_56e]=parseInt(_56c.quantity,10);}else{_56f[_56e]+=parseInt(_56c.quantity,10);}_56c.caller.getAttrs(_56b,_56c);};var item,_56f=[];for(i=0;i<_562.childNodes.length;i++){attributeStore.fetch({query:{"id":_562.childNodes[i].getElementsByTagName("sku")[0].firstChild.nodeValue.toString()},caller:this,queryOptions:{ignoreCase:true},onComplete:_56a,quantity:_562.childNodes[i].getElementsByTagName("quantity")[0].firstChild.nodeValue.toString()});}for(var _571 in _56f){dojo.byId("skuQuantity"+_571).value=_56f[_571];}}else{dojo.byId("skuQuantity0").value=_562.childNodes[0].getElementsByTagName("quantity")[0].firstChild.nodeValue.toString();}},_updatePopupHref:function(obj,page,_574){if(obj&&obj.href){var _575=dojo.attr(obj,"href");_575=this._updateURL(_575,page,_574);dojo.attr(obj,"href",_575);}},_updateURL:function(uri,page,_578){var _579;var _57a=new dojo._Url(uri);_57a.path=_57a.path.replace(/[^\/]*.html/,page);if(dojo.isString(_578)){_57a.query=_578;}else{if(dojo.isObject(_578)&&_57a.query){var _57b=dojo.queryToObject(_57a.query);for(var _57c in _578){_57b[_57c]=_578[_57c];}_57a.query=dojo.objectToQuery(_57b);}else{if(dojo.isObject(_578)&&!_57a.query){_57a.query=dojo.objectToQuery(_578);}}}if(_57a.scheme){_579=_57a.scheme+"://";}if(_57a.host){_579=_579+_57a.host;}if(_57a.port){_579=_579+":"+_57a.port;}if(_57a.path){_579=_579+_57a.path;}if(_57a.query){_579=_579+"?"+_57a.query;}return _579;},_renderAddItemErrors:function(_57d){if(typeof isThinPIP!=="undefined"){this._clearSubsetPricing(0);var _57e=document.createElement("span");dojo.addClass(_57e,"error");_57e.innerHTML=_57d[0].message;dojo.byId("productPrice0").appendChild(_57e);dojo.byId("pageErrorHook").innerHTML=this._errors._getErrorMessage("info.errattn");window.scrollTo(0,0);}else{var _57f=function(_580,_581){if(_580.length==0){return;}var _582=_580[0];var _583=attributeStore.getValue(_582,"c");_581.caller._clearSubsetPricing(_583);var _584=document.createElement("span");dojo.addClass(_584,"backorder");_584.innerHTML=_581.message;dojo.byId("skuErrorHook_"+_583).parentNode.insertBefore(_584,dojo.byId("skuErrorHook_"+_583).parentNode.firstChild);dojo.byId("pageErrorHook").innerHTML=_581.caller._errors._getErrorMessage("info.errattn");window.scrollTo(0,0);};for(var i=0;i<_57d.length;i++){attributeStore.fetch({query:{"id":_57d[i].sku},message:_57d[i].message,caller:this,queryOptions:{ignoreCase:true},onComplete:_57f});}}},_updateRegistryFromRadioButton:function(evt){var _587=evt.currentTarget;var _588=dojo.byId("registrantid");if(!_587||!_588){return;}if(_587.value&&_587.value!=="no"){_588.value=_587.value;}else{_588.value="";}},populateFromRegListQueryParams:function(){var _589=dojo.queryToObject(window.location.search.slice(1));var _58a=0;var _58b;if(dojo.exists("fromrgl",_589)){if(dojo.byId("regitemneeds")&&dojo.byId("regitemneeds").value){_58a=dojo.byId("regitemneeds").value;if(dojo.query("input[id^='skuHidden'][value='"+groupId+"']").length===0){var _58c={"id":groupId.toString()};attributeStore.fetch({query:_58c,caller:this,queryOptions:{ignoreCase:true},onComplete:this._populateRegistrantNeeds,needs:_58a});}if(dojo.byId("isregistrant")&&dojo.byId("isregistrant").value==="1"&&!dojo.byId("iscompletion")){if(updateRegistryBtnSrc){dojo.query(".btn_addtobasket").forEach("item.src='"+updateRegistryBtnSrc+"';");}this._fromRegistyrList=true;}}}},_populateRegistrantNeeds:function(_58d,_58e){if(_58d.length==0){return;}var item=_58d[0];var _590=attributeStore.getValue(item,"c");var _591=_58e.needs;if(dojo.query(".registrantNeeds").length>0){dojo.query(".registrantNeeds","product"+_590).forEach(function(el){el.innerHTML="Registrant still needs "+_591+" of this product.";});}if(dojo.byId("skuQuantity"+_590)){dojo.byId("skuQuantity"+_590).value="";}_58e.caller.getAttrs(_58d,_58e);},_updatePersonalizationHref:function(evt){evt.preventDefault();var _594={};dojo.query(".persText").forEach(function(item){_594[item.id.substring(4)]=item.value;});this._updatePopupHref(dojo.byId("previewBtnLnk"),"preview-personalization.html",_594);var _596,_597,_598,_599,_59a,_59b;if(evt.currentTarget&&evt.currentTarget.rel){_59b=dojo.fromJson(_59a);}else{_59b={"name":"pipPopup","dim":{"width":770}};}_596=(_59b&&typeof _59b.dim!=="undefined"&&typeof _59b.dim.height!=="undefined"&&_59b.dim.height)?_59b.dim.height:utils.POPUP_DEFAULT_HEIGHT;_597=(_59b&&typeof _59b.dim!=="undefined"&&typeof _59b.dim.width!=="undefined"&&_59b.dim.width)?_59b.dim.width:utils.POPUP_DEFAULT_WIDTH;_598=(_59b&&typeof _59b.dim!=="undefined"&&typeof _59b.dim.resize!=="undefined"&&_59b.dim.resize)?_59b.dim.resize:utils.POPUP_DEFAULT_RESIZE;_599=(_59b&&typeof _59b.name!=="undefined"!=="undefined"&&_59b.name)?_59b.name:utils.POPUP_DEFAULT_NAME;var url=evt.currentTarget.href;var _59d="toolbar=no,location=no,directories=no,scrollbars=1,resizable="+_598+",height="+_596+",width="+_597+",screenX=4,screenY=4,top=4,left=4";var win=window.open(url,_599,_59d);win.focus();},setMonogramInfo:function(sku,_5a0,_5a1,_5a2,qty,_5a4,_5a5,_5a6){var _5a7;this._populateQtyAndDropdowns(sku,qty);for(var i=0;i<3;i++){if(!_5a2[i]){_5a2[i]="";}}_5a7=_5a1+"|"+_5a0+"|"+_5a2[0]+"|"+_5a2[1]+"|"+_5a2[2];if(dojo.byId("monogramsku")){dojo.byId("monogramsku").value=sku;}if(dojo.byId("monogramsequence")){dojo.byId("monogramsequence").value=_5a7;}if(dojo.query(".giftWrap").length>0){dojo.query(".giftWrap").forEach(function(item){item.checked=_5a4;});}if(dojo.query(".shipTo").length>0){dojo.query(".shipTo").forEach(function(item){item.value=_5a5;});}if(_5a6!==""){if(dojo.query(".knownRegistry").length>0){dojo.query(".knownRegistry[value='"+_5a6+"']").forEach("item.checked='checked';");}if(dojo.byId("registrantid")){dojo.byId("registrantid").value=_5a6;}}this.handleAddToCartClick();},_bvRatingsDisplayed:function(_5ab,_5ac,_5ad,_5ae,_5af){var _5b0=dojo.byId("BVReviewsContainer");var _5b1=dojo.byId("BVSecondaryCustomerRatings");var _5b2=dojo.byId("BVSVPLinkContainer");var _5b3=dojo.byId("reviews-controls");var _5b4=0;if(_5ab>0){if(_5b0){dojo.removeClass("BVReviewsContainer","hide");_5b0.style.display="block";}if(_5b1){_5b0.style.display="block";}if(_5b2){_5b2.style.display="block";}if(_5b3){_5b3.style.display="block";}}else{if(_5b2){_5b3.style.display="none";}}if(typeof cmCreateProductTag==="function"&&typeof cm_BvPm!=="undefined"){var _5b5=cm_BvPm;if(_5ab==0&&_5ad==0){_5b5=_5b5+" without reviews";}else{_5b5=_5b5+" with reviews";}cmCreateProductTag(cm_BvCg,_5b5.toUpperCase(),cm_BvPr,cm_BvPc,cm_BvPv4,"",_5ab,_5ac,_5ad,_5ae);}},_bvCheckLoadState:function(){if(!BVisLoaded){var page=dojo.byId("BVFrame").src;dojo.byId("BVFrame").src="http://reviews.williams-sonoma.com/logging?page="+escape(page);dojo.byId("BVReviewsContainer").innerHTML="<!-- Review retrieval timed out -->";if(typeof cm_BvPm!=="undefined"&&typeof cmCreateProductTag==="function"){var _5b7=cm_BvPm;var _5b8=cm_BvPr.indexOf("_");if(_5b8!=0){cm_BvPr=cm_BvPr.subString(0,_5b8);}cmCreateProductTag(cm_BvCg,_5b7.toUpperCase(),cm_BvPr,cm_BvPc,cm_BvPv4,"","bvNotAvailable","bvNotAvailable");}}},_populateQtyAndDropdowns:function(sku,qty){var _5bb={"id":sku.toString()};var _5bc=function(_5bd,_5be){if(_5bd.length==0){return;}var item=_5bd[0];var _5c0=attributeStore.getValue(item,"c");dojo.byId("skuQuantity"+_5c0).value=_5be.quantity;_5be.caller.getAttrs(_5bd,_5be);};attributeStore.fetch({query:_5bb,caller:this,queryOptions:{ignoreCase:true},onComplete:_5bc,quantity:qty});}});}if(!dojo._hasResource["wsgc.js.FQController"]){dojo._hasResource["wsgc.js.FQController"]=true;dojo.provide("wsgc.js.FQController");dojo.declare("wsgc.js.FQController",wsgc.js.AddItemControllerBase,{constructor:function(){dojo.query(".btn_addtobasket").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this,"_handleAddToCartClick");}));dojo.query(".skuQuantity").forEach(function(elem){dojo.connect(elem,"onblur",this,"_verifyQty");},this);dojo.query(".giftWrap").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this,"_handleGiftWrapCMCall");}));dojo.query(".shipTo").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onchange",this,"_handleShipToCMCall");}));this._formValid();},_shipToMetricsProcessed:false,_giftWrapMetricsProcessed:false,_giftWrapShipToCMCall:function(arg){try{if(typeof cmCreatePageElementTag==="function"){cmCreatePageElementTag(arg,"GiftWrap_shipto_Section");}}catch(e){console.error("cm pip-gift wrap ship to fail.");}},_handleGiftWrapCMCall:function(evt){if(!this._giftWrapMetricsProcessed){this._giftWrapShipToCMCall("GWCheckbox");this._giftWrapMetricsProcessed=true;}},_handleShipToCMCall:function(evt){if(!this._shipToMetricsProcessed){this._giftWrapShipToCMCall("shipto");this._shipToMetricsProcessed=true;}},_handleAddToCartClick:function(evt){dojo.stopEvent(evt);var _5c9=this._formValid();if(!_5c9){this._renderErrors();return;}var _5ca=dojo.byId("isRAC").value;var _5cb;if(dojo.byId("isStaleTransaction")){_5cb=dojo.byId("isStaleTransaction").value;}else{_5cb="false";}if((_5ca==="1")||((_5ca==="0")&&(_5cb==="true"))){this._io._transIdRemovedFromSession=true;}this._io.callRiaService();},_processXMLResponse:function(xml){if(typeof xml!="object"){xml=dojox.xml.parser.parse(xml);}var _5cd=xml.getElementsByTagName("pageid");var _5ce=xml.getElementsByTagName("transactionid");if(_5cd.length>0){window.location=appUrl+"shoppingcart/"+_5ce[0].firstChild.nodeValue+"/"+_5cd[0].firstChild.nodeValue+".html";return;}var _5cf=xml.getElementsByTagName("totalquantity")[0].firstChild.nodeValue;this._setBasketCount(_5cf);var _5d0=dijit.byId("dialog0");_5d0.renderFromXML(xml);_5d0.show();},_renderErrors:function(){if(this._productErrorStack.length===0){dojo.byId("pageErrorHook").innerHTML=this._errors._getErrorMessage("required.productattribs");}else{dojo.byId("pageErrorHook").innerHTML=this._errors._getErrorMessage("info.errattn");}var _5d1;dojo.forEach(this._productErrorStack,function(item){_5d1=item.productNumber;dojo.byId("skuErrorHook_"+_5d1).innerHTML=item.error;dojo.byId("skuErrorHook_"+_5d1).tabIndex="0";});if(dojo.byId("pageErrorHook").innerHTML!==""){dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();}else{var _5d3=dojo.query(".skuErrorHook[tabIndex='0']");if(_5d3.length>0){_5d3[0].focus();}}window.scrollTo(0,0);},_formValid:function(){var i;if(this._productErrorStack.length>0){for(i=0;i<this._productErrorStack.length;i++){if(this._productErrorStack[i].error===this._errors._getErrorMessage("invalid.quantity")){return false;}}}var _5d5=true;this._productErrorStack=[];var _5d6=dojo.query("div.productLineList");var _5d7,_5d8,_5d9;for(i=0;i<_5d6.length;i++){if(!dojo.byId("skuQuantity"+i)){continue;}_5d8=dojo.byId("skuQuantity"+i).value;if(dojo.trim(_5d8)===""){dojo.byId("skuQuantity"+i).value="";continue;}if(_5d8.charAt(0)==="0"&&_5d8.length>1){_5d8=_5d8.replace(/^[0]+/,"");}_5d8=dojo.number.parse(_5d8,{places:0});if(isNaN(_5d8)||_5d8<=0){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.quantity")});dojo.byId("skuQuantity"+i).value="";continue;}else{_5d5=false;if(dojo.byId("skuHidden"+i)){_5d9=dojo.byId("skuHidden"+i).value;if(_5d9===""){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.option")});}}}}return (this._productErrorStack.length===0&&!_5d5);},_verifyQty:function(evt){var _5db=evt.currentTarget.value;if(_5db.charAt(0)==="0"&&_5db.length>1){_5db=_5db.replace(/^[0]+/,"");}var qty=dojo.number.parse(_5db,{places:0});if((!isNaN(qty)&&qty>0)||dojo.trim(_5db)===""){var _5dd=evt.currentTarget.id.substr(11);dojo.byId("skuErrorHook_"+_5dd).innerHTML="";dojo.byId("skuErrorHook_"+_5dd).tabIndex="-1";this._clearErrors();this._formValid();}else{this._clearErrors();var _5de=this._formValid();if(!_5de){this._renderErrors();return;}}},_handleRACCloseEvent:function(evt){this._resetPip();dojo.byId("isRAC").value="1";if(dojo.byId("transIdRAC").value==""){return;}},_detectPipConfirmation:function(){if(dojo.byId("isRAC").value!=="1"){return;}this._io._callConfirmationService(dojo.byId("transIdRAC").value);},_resetPip:function(){dojo.query("span.attribute-drop-down select.attribute2").forEach(function(elem){elem.selectedIndex=0;});dojo.query("span.attribute-drop-down select.attribute3, span.attribute-drop-down select.attribute4").forEach(function(elem){dojo.query("#"+elem.id+" > *").orphan();elem.disabled=true;});dojo.query(".skuQuantity").forEach("item.value = ''");dojo.query(".skuHidden").forEach("item.value = ''");dojo.query(".drop-area .productPrice > *").orphan();dojo.query(".giftWrap").forEach("item.checked = false;");dojo.query(".shipTo").forEach("item.selectedIndex = 0;");},_clearErrors:function(){this.inherited(arguments);this._productErrorStack=[];}});}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0;dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;if(dojo.isSafari||dojo.isOpera){rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;}if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}}var _5f9=n.scrollLeft,_5fa=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_5f9!=n.scrollLeft||_5fa!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){this.node=dojo.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=this.host=host,d=node.ownerDocument,_600=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo,"stopEvent"),dojo.connect(d,"onselectstart",dojo,"stopEvent"),_600];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});dojo.stopEvent(e);},onMouseUp:function(e){if(dojo.isSafari&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}dojo.stopEvent(e);},onFirstMove:function(){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left));t=Math.round(parseFloat(s.top));break;default:s.position="absolute";var m=dojo.marginBox(this.node);var b=dojo.doc.body;var bs=dojo.getComputedStyle(b);var bm=dojo._getMarginBox(b,bs);var bc=dojo._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this);}dojo.disconnect(this.events.pop());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,_60f){this.node=dojo.byId(node);if(!_60f){_60f={};}this.handle=_60f.handle?dojo.byId(_60f.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_60f.delay>0?_60f.delay:0;this.skip=_60f.skip;this.mover=_60f.mover?_60f.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_610,node){return new dojo.dnd.Moveable(node,_610);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"));this.events.push(dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}dojo.stopEvent(e);},onMouseUp:function(e){dojo.disconnect(this.events.pop());dojo.disconnect(this.events.pop());dojo.stopEvent(e);},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_617){dojo.publish("/dnd/move/start",[_617]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_618){dojo.publish("/dnd/move/stop",[_618]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_619){},onMove:function(_61a,_61b){this.onMoving(_61a,_61b);var s=_61a.node.style;s.left=_61b.l+"px";s.top=_61b.t+"px";this.onMoved(_61a,_61b);},onMoving:function(_61d,_61e){},onMoved:function(_61f,_620){}});}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(_621,node){return new dojo.dnd.move.constrainedMoveable(node,_621);},constructor:function(node,_624){if(!_624){_624={};}this.constraints=_624.constraints;this.within=_624.within;},onFirstMove:function(_625){var c=this.constraintBox=this.constraints.call(this,_625);c.r=c.l+c.w;c.b=c.t+c.h;if(this.within){var mb=dojo.marginBox(_625.node);c.r-=mb.w;c.b-=mb.h;}},onMove:function(_628,_629){var c=this.constraintBox,s=_628.node.style;s.left=(_629.l<c.l?c.l:c.r<_629.l?c.r:_629.l)+"px";s.top=(_629.t<c.t?c.t:c.b<_629.t?c.b:_629.t)+"px";}});dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_62c,node){return new dojo.dnd.move.boxConstrainedMoveable(node,_62c);},constructor:function(node,_62f){var box=_62f&&_62f.box;this.constraints=function(){return box;};}});dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_631,node){return new dojo.dnd.move.parentConstrainedMoveable(node,_631);},constructor:function(node,_634){var area=_634&&_634.area;this.constraints=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(area=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};}});dojo.dnd.move.constrainedMover=function(fun,_63b){dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");var _63c=function(node,e,_63f){dojo.dnd.Mover.call(this,node,e,_63f);};dojo.extend(_63c,dojo.dnd.Mover.prototype);dojo.extend(_63c,{onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;l=l<c.l?c.l:c.r<l?c.r:l;t=t<c.t?c.t:c.b<t?c.b:t;this.host.onMove(this,{l:l,t:t});},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var c=this.constraintBox=fun.call(this);c.r=c.l+c.w;c.b=c.t+c.h;if(_63b){var mb=dojo.marginBox(this.node);c.r-=mb.w;c.b-=mb.h;}}});return _63c;};dojo.dnd.move.boxConstrainedMover=function(box,_648){dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");return dojo.dnd.move.constrainedMover(function(){return box;},_648);};dojo.dnd.move.parentConstrainedMover=function(area,_64a){dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");var fun=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(area=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};return dojo.dnd.move.constrainedMover(fun,_64a);};dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;}if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){dojo._hasResource["dojo.dnd.TimedMoveable"]=true;dojo.provide("dojo.dnd.TimedMoveable");(function(){var _650=dojo.dnd.Moveable.prototype.onMove;dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(node,_652){if(!_652){_652={};}if(_652.timeout&&typeof _652.timeout=="number"&&_652.timeout>=0){this.timeout=_652.timeout;}},markupFactory:function(_653,node){return new dojo.dnd.TimedMoveable(node,_653);},onMoveStop:function(_655){if(_655._timer){clearTimeout(_655._timer);_650.call(this,_655,_655._leftTop);}dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);},onMove:function(_656,_657){_656._leftTop=_657;if(!_656._timer){var _t=this;_656._timer=setTimeout(function(){_656._timer=null;_650.call(_t,_656,_656._leftTop);},this.timeout);}}});})();}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");(function(){var _659={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _65c=function(_65d){this._index=-1;this._animations=_65d||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;dojo.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};dojo.extend(_65c,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){dojo.disconnect(this._onAnimateCtx);dojo.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=dojo.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_65f,_660){if(!this._current){this._current=this._animations[this._index=0];}if(!_660&&this._current.status()=="playing"){return this;}var _661=dojo.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_662=dojo.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_664=dojo.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);dojo.disconnect(_661);dojo.disconnect(_662);dojo.disconnect(_664);});if(this._onAnimateCtx){dojo.disconnect(this._onAnimateCtx);}this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){dojo.disconnect(this._onEndCtx);}this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=dojo.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);dojo.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_668,_669){this.pause();var _66a=this.duration*_668;this._current=null;dojo.some(this._animations,function(a){if(a.duration<=_66a){this._current=a;return true;}_66a-=a.duration;return false;});if(this._current){this._current.gotoPercent(_66a/this._current.duration,_669);}return this;},stop:function(_66c){if(this._current){if(_66c){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=dojo.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);dojo.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){dojo.disconnect(this._onAnimateCtx);}if(this._onEndCtx){dojo.disconnect(this._onEndCtx);}}});dojo.extend(_65c,_659);dojo.fx.chain=function(_66f){return new _65c(_66f);};var _670=function(_671){this._animations=_671||[];this._connects=[];this._finished=0;this.duration=0;dojo.forEach(_671,function(a){var _673=a.duration;if(a.delay){_673+=a.delay;}if(this.duration<_673){this.duration=_673;}this._connects.push(dojo.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new dojo._Animation({curve:[0,1],duration:this.duration});dojo.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){this._connects.push(dojo.connect(this._pseudoAnimation,evt,dojo.hitch(this,"_fire",evt)));},this);};dojo.extend(_670,{_doAction:function(_675,args){dojo.forEach(this._animations,function(a){a[_675].apply(a,args);});return this;},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd");}},_call:function(_678,args){var t=this._pseudoAnimation;t[_678].apply(t,args);},play:function(_67b,_67c){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(_67d,_67e){var ms=this.duration*_67d;dojo.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_67e);});this._call("gotoPercent",arguments);return this;},stop:function(_681){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){dojo.forEach(this._connects,dojo.disconnect);}});dojo.extend(_670,_659);dojo.fx.combine=function(_682){return new _670(_682);};})();dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){var _t=this;dojo.mixin(_t,args);_t.node=args.node;_t._showArgs=dojo.mixin({},args);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},args);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_685){return this.showAnim.play(_685||0);},hide:function(_686){return this.hideAnim.play(_686||0);}});dojo.fx.wipeIn=function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style,o;var anim=dojo.animateProperty(dojo.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 _68c=dojo.style(node,"height");return Math.max(_68c,1);}},end:function(){return node.scrollHeight;}}}},args));dojo.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o;});return anim;};dojo.fx.wipeOut=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;var o;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));dojo.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});dojo.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return anim;};dojo.fx.slideTo=function(args){var node=(args.node=dojo.byId(args.node));var top=null;var left=null;var init=(function(n){return function(){var cs=dojo.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=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));dojo.connect(anim,"beforeBegin",anim,init);return anim;};}if(!dojo._hasResource["dijit.form.Form"]){dojo._hasResource["dijit.form.Form"]=true;dojo.provide("dijit.form.Form");dojo.declare("dijit.form._FormMixin",null,{reset:function(){dojo.forEach(this.getDescendants(),function(_69c){if(_69c.reset){_69c.reset();}});},validate:function(){var _69d=false;return dojo.every(dojo.map(this.getDescendants(),function(_69e){_69e._hasBeenBlurred=true;var _69f=_69e.disabled||!_69e.validate||_69e.validate();if(!_69f&&!_69d){dijit.scrollIntoView(_69e.containerNode||_69e.domNode);_69e.focus();_69d=true;}return _69f;}),function(item){return item;});},setValues:function(val){dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");return this.attr("value",val);},_setValueAttr:function(obj){var map={};dojo.forEach(this.getDescendants(),function(_6a4){if(!_6a4.name){return;}var _6a5=map[_6a4.name]||(map[_6a4.name]=[]);_6a5.push(_6a4);});for(var name in map){if(!map.hasOwnProperty(name)){continue;}var _6a7=map[name],_6a8=dojo.getObject(name,false,obj);if(_6a8===undefined){continue;}if(!dojo.isArray(_6a8)){_6a8=[_6a8];}if(typeof _6a7[0].checked=="boolean"){dojo.forEach(_6a7,function(w,i){w.attr("value",dojo.indexOf(_6a8,w.value)!=-1);});}else{if(_6a7[0]._multiValue){_6a7[0].attr("value",_6a8);}else{dojo.forEach(_6a7,function(w,i){w.attr("value",_6a8[i]);});}}}},getValues:function(){dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},_getValueAttr:function(){var obj={};dojo.forEach(this.getDescendants(),function(_6ae){var name=_6ae.name;if(!name||_6ae.disabled){return;}var _6b0=_6ae.attr("value");if(typeof _6ae.checked=="boolean"){if(/Radio/.test(_6ae.declaredClass)){if(_6b0!==false){dojo.setObject(name,_6b0,obj);}}else{var ary=dojo.getObject(name,false,obj);if(!ary){ary=[];dojo.setObject(name,ary,obj);}if(_6b0!==false){ary.push(_6b0);}}}else{dojo.setObject(name,_6b0,obj);}});return obj;},isValid:function(){return dojo.every(this.getDescendants(),function(_6b2){return _6b2.disabled||!_6b2.isValid||_6b2.isValid();});},onValidStateChange:function(_6b3){},_widgetChange:function(){var _6b4=this.isValid();if(_6b4!==this._lastValidState){this._lastValidState=_6b4;this.onValidStateChange(_6b4);}},connectChildren:function(){dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));var _6b5=this;this._changeConnections=dojo.map(dojo.filter(this.getDescendants(),function(item){return item.validate;}),function(_6b7){return _6b5.connect(_6b7,"validate","_widgetChange");});this._widgetChange();},startup:function(){this.inherited(arguments);this._changeConnections=[];this.connectChildren();this._lastValidState=this.isValid();}});dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' name='${name}'></form>",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),execute:function(_6b8){},onExecute:function(){},_setEncTypeAttr:function(_6b9){this.encType=_6b9;dojo.attr(this.domNode,"encType",_6b9);if(dojo.isIE){this.domNode.encoding=_6b9;}},postCreate:function(){if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var item=this.srcNodeRef.attributes.getNamedItem("encType");if(item&&!item.specified&&(typeof item.value=="string")){this.attr("encType",item.value);}}this.inherited(arguments);},onReset:function(e){return true;},_onReset:function(e){var faux={returnValue:true,preventDefault:function(){this.returnValue=false;},stopPropagation:function(){},currentTarget:e.currentTarget,target:e.target};if(!(this.onReset(faux)===false)&&faux.returnValue){this.reset();}dojo.stopEvent(e);return false;},_onSubmit:function(e){var fp=dijit.form.Form.prototype;if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues());}if(this.onSubmit(e)===false){dojo.stopEvent(e);}},onSubmit:function(e){return this.isValid();},submit:function(){if(!(this.onSubmit()===false)){this.containerNode.submit();}}});}if(!dojo._hasResource["dijit.Dialog"]){dojo._hasResource["dijit.Dialog"]=true;dojo.provide("dijit.Dialog");dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper' id='${id}_wrapper'><div class='dijitDialogUnderlay ${class}' id='${id}' dojoAttachPoint='node'></div></div>",attributeMap:{},postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);},layout:function(){var _6c1=dijit.getViewport();var is=this.node.style,os=this.domNode.style;os.top=_6c1.t+"px";os.left=_6c1.l+"px";is.width=_6c1.w+"px";is.height=_6c1.h+"px";var _6c4=dijit.getViewport();if(_6c1.w!=_6c4.w){is.width=_6c4.w+"px";}if(_6c1.h!=_6c4.h){is.height=_6c4.h+"px";}},show:function(){this.domNode.style.display="block";this.layout();if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="block";}},hide:function(){this.domNode.style.display="none";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="none";}},uninitialize:function(){if(this.bgIframe){this.bgIframe.destroy();}}});dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_6c5){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.attr("value"));},_getFocusItems:function(_6c6){var _6c7=dijit._getTabNavigable(dojo.byId(_6c6));this._firstFocusItem=_6c7.lowest||_6c7.first||_6c6;this._lastFocusItem=_6c7.last||_6c7.highest||this._firstFocusItem;if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){dojo.attr(_6c6,"tabindex","0");this._firstFocusItem=_6c6;}}});dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:null,templateString:"<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\" title=\"${buttonCancel}\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}]}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,postMixInProperties:function(){var _6c8=dojo.i18n.getLocalization("dijit","common");dojo.mixin(this,_6c8);this.inherited(arguments);},postCreate:function(){var s=this.domNode.style;s.visibility="hidden";s.position="absolute";s.display="";s.top="-9999px";dojo.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[];},onLoad:function(){this._position();this.inherited(arguments);},_endDrag:function(e){if(e&&e.node&&e.node===this.domNode){var vp=dijit.getViewport();var p=e._leftTop||dojo.coords(e.node,true);this._relativePosition={t:p.t-vp.t,l:p.l-vp.l};}},_setup:function(){var node=this.domNode;if(this.titleBar&&this.draggable){this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(node,{handle:this.titleBar}):new dojo.dnd.Moveable(node,{handle:this.titleBar,timeout:0});dojo.subscribe("/dnd/move/stop",this,"_endDrag");}else{dojo.addClass(node,"dijitDialogFixed");}this._underlay=new dijit.DialogUnderlay({id:this.id+"_underlay","class":dojo.map(this["class"].split(/\s/),function(s){return s+"_underlay";}).join(" ")});var _6cf=this._underlay;this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,onBegin:dojo.hitch(_6cf,"show")});this._fadeOut=dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){node.style.visibility="hidden";node.style.top="-9999px";_6cf.hide();}});},uninitialize:function(){if(this._fadeIn&&this._fadeIn.status()=="playing"){this._fadeIn.stop();}if(this._fadeOut&&this._fadeOut.status()=="playing"){this._fadeOut.stop();}if(this._underlay){this._underlay.destroy();}if(this._moveable){this._moveable.destroy();}},_size:function(){var mb=dojo.marginBox(this.domNode);var _6d1=dijit.getViewport();if(mb.w>=_6d1.w||mb.h>=_6d1.h){dojo.style(this.containerNode,{width:Math.min(mb.w,Math.floor(_6d1.w*0.75))+"px",position:"relative"});}},_position:function(){if(!dojo.hasClass(dojo.body(),"dojoMove")){var node=this.domNode;var _6d3=dijit.getViewport();var p=this._relativePosition;var mb=p?null:dojo.marginBox(node);dojo.style(node,{left:Math.floor(_6d3.l+(p?p.l:(_6d3.w-mb.w)/2))+"px",top:Math.floor(_6d3.t+(p?p.t:(_6d3.h-mb.h)/2))+"px"});}},_onKey:function(evt){if(evt.charOrCode){var dk=dojo.keys;var node=evt.target;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.domNode);}var _6d9=(this._firstFocusItem==this._lastFocusItem);if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!_6d9){dijit.focus(this._lastFocusItem);}dojo.stopEvent(evt);}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!_6d9){dijit.focus(this._firstFocusItem);}dojo.stopEvent(evt);}else{while(node){if(node==this.domNode){if(evt.charOrCode==dk.ESCAPE){this.onCancel();}else{return;}}node=node.parentNode;}if(evt.charOrCode!==dk.TAB){dojo.stopEvent(evt);}else{if(!dojo.isOpera){try{this._firstFocusItem.focus();}catch(e){}}}}}}},show:function(){if(this.open){return;}if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true;}if(this._fadeOut.status()=="playing"){this._fadeOut.stop();}this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));this._modalconnects.push(dojo.connect(window,"onresize",this,"layout"));this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));dojo.style(this.domNode,{opacity:0,visibility:""});this.open=true;this._loadCheck();this._size();this._position();this._fadeIn.play();this._savedFocus=dijit.getFocus(this);if(this.autofocus){this._getFocusItems(this.domNode);setTimeout(dojo.hitch(dijit,"focus",this._firstFocusItem),50);}},hide:function(){if(!this._alreadyInitialized){return;}if(this._fadeIn.status()=="playing"){this._fadeIn.stop();}this._fadeOut.play();if(this._scrollConnected){this._scrollConnected=false;}dojo.forEach(this._modalconnects,dojo.disconnect);this._modalconnects=[];if(this.refocus){this.connect(this._fadeOut,"onEnd",dojo.hitch(dijit,"focus",this._savedFocus));}if(this._relativePosition){delete this._relativePosition;}this.open=false;},layout:function(){if(this.domNode.style.visibility!="hidden"){this._underlay.layout();this._position();}},destroy:function(){dojo.forEach(this._modalconnects,dojo.disconnect);if(this.refocus&&this.open){setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25);}this.inherited(arguments);}});dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,"class":"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:"<div waiRole=\"presentation\">\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\n\t</div>\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\n</div>\n",postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey");this.containerNode.title=this.title;},orient:function(node,_6db,_6dc){this.domNode.className=this["class"]+" dijitTooltipAB"+(_6dc.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_6dc.charAt(0)=="T"?"Below":"Above");},onOpen:function(pos){this.orient(this.domNode,pos.aroundCorner,pos.corner);this._loadCheck();if(this.autofocus){this._getFocusItems(this.containerNode);dijit.focus(this._firstFocusItem);}},_onKey:function(evt){var node=evt.target;var dk=dojo.keys;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.containerNode);}var _6e1=(this._firstFocusItem==this._lastFocusItem);if(evt.charOrCode==dk.ESCAPE){this.onCancel();dojo.stopEvent(evt);}else{if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!_6e1){dijit.focus(this._lastFocusItem);}dojo.stopEvent(evt);}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!_6e1){dijit.focus(this._firstFocusItem);}dojo.stopEvent(evt);}else{if(evt.charOrCode===dk.TAB){evt.stopPropagation();}}}}}});}if(!dojo._hasResource["wsgc.widgets.RichCartDialog"]){dojo._hasResource["wsgc.widgets.RichCartDialog"]=true;dojo.provide("wsgc.widgets.RichCartDialog");dojo.declare("dijit.RichCartDialogUnderlay",[dijit.DialogUnderlay],{templateString:"<div class=dijitDialogUnderlayWrapper id='${id}_underlay'><div class=dijitDialogUnderlay dojoAttachPoint='node' dojoAttachEvent='onclick: _backgroundClose'></div></div>",_backgroundClose:function(evt){dijit.byId("dialog0").close();},layout:function(){var _6e3=dijit.getViewport();var is=this.node.style,os=this.domNode.style;var _6e6=_6e3.w;if(dojo.isSafari){_6e6=(_6e3.w-15);}os.top=_6e3.t+"px";os.left=_6e3.l+"px";is.height=_6e3.h+"px";is.width=_6e6+"px";var _6e7=dijit.getViewport();_6e6=_6e7.w;if(dojo.isSafari){_6e6=(_6e7.w-15);}if(_6e3.w!=_6e7.w){is.width=_6e6+"px";}if(_6e3.h!=_6e7.h){is.height=_6e7.h+"px";}}});dojo.declare("wsgc.widgets.RichCartDialog",[dijit.Dialog],{templateString:"<div class=\"dijitDialog\">\n\t<div dojoAttachPoint=\"containerNode\" class=\"rac-container\">\n\t\t<div class=\"rac-title\">\n\t\t\t<h1>You've just added the following to your basket:</h1>\n            <div id=\"btn-close\" class=\"button-background\">\n\t\t\t\t<a dojoAttachPoint=\"closeButtonNode\" dojoAttachEvent=\"onclick:close\" href=\"javascript:;\" class=\"button\" title=\"Close\">close</a>\n            </div>\n\t\t</div>\n\t\t<div class=\"rac-content\">\n\t\t\t<div class=\"rac-basket\" dojoattachpoint=\"itemsHook\">\n\t\t\t</div>\t\n\t\t\t<div class=\"rac-totals-block clearfix\">\n            \t<ul>\n                    <li class=\"totals-block-static-text total-header\"><h3>Basket Summary</h3></li>\n                    <li class=\"cart-total total-header\"><h3>Total</h3></li>\n                    <li class=\"totals-block-static-text \">Total Items in Basket:</li>\n                    <li dojoattachpoint=\"skucount\" class=\"totals-block-dynamic-text cart-total\"></li>\n                    <li class=\"totals-block-static-text\">Merchandise Subtotal:</li>\n                    <li dojoattachpoint=\"totalprice\" class=\"totals-block-dynamic-text cart-total\"></li>\n                </ul>\n\t\t\t\t<span class=\"totals-block-disclaimer\">(Subtotal does not include shipping and processing, gift wrap, discounts or tax)</span>\n\t\t\t</div>\n\t\t\t<div class=\"totals-block-buttons\">\n                <div id=\"btn-continue\" class=\"button-background\">\n                    <a dojoAttachEvent=\"onclick:_handleContinueShoppingClick\" href=\"javascript:;\" class=\"button\" title=\"Continue Shopping\">Continue Shopping</a>\n                </div>\n                <div id=\"btn-checkout\" class=\"button-background\">\n                    <a dojoAttachEvent=\"onclick:_handlePipCheckoutClick\" href=\"${appUrl}shoppingcart/\" class=\"button\" title=\"Checkout\">Checkout</a>\n                 </div>\n            </div>\n\t\t</div>\n\t\t<!-- <span dojoAttachPoint=\"tabEnd\" dojoAttachEvent=\"onfocus:_cycleFocus\" tabindex=\"0\"></span> -->\n\t</div>\n</div>\n\t\n",_lineItemIds:[],appUrl:"",_productDatasetLookup:null,RAC_ASPECT:"s",_coreMetricsPageID:"ECOMMERCE CONFIRMATION-RICH",_position:function(){var _6e8=this.domNode.style;_6e8.left="50%";_6e8.top="22.4em";_6e8.marginLeft="-22.5em";_6e8.marginRight="-22.5em";},show:function(){this._setCoremetricsPageId();if(dojo.isFF===2){dojo.query(".product-info-tab-content").style("overflow","hidden");}window.scrollTo(0,0);this.inherited(arguments);},hide:function(){if(dojo.isFF===2){dojo.query(".product-info-tab-content").style("overflow","auto");}this.inherited(arguments);},_setup:function(){this._modalconnects=[];if(this.titleBar){this._moveable=new dojo.dnd.Moveable(this.domNode,{handle:this.titleBar});}this._underlay=new dijit.RichCartDialogUnderlay();var node=this.domNode;this._fadeIn=dojo.fx.combine([dojo.fadeIn({node:node,duration:this.duration,onEnd:function(){node.style.display="block";}}),dojo.fadeIn({node:this._underlay.domNode,duration:this.duration,onBegin:dojo.hitch(this._underlay,"show")})]);this._fadeOut=dojo.fx.combine([dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){node.style.display="none";}}),dojo.fadeOut({node:this._underlay.domNode,duration:this.duration,onEnd:dojo.hitch(this._underlay,"hide")})]);if(typeof (cmCreateManualPageviewTag)!="undefined"){cmCreateManualPageviewTag(this._coreMetricsPageID,"RICH_ADD_TO_CART","","","");}if(typeof s_code!="undefined"){s.pageName="ADD ITEM CONFIRMATION RAC";s.prop4="RAC";s.channel="ADD ITEM";s.events="";s.products="";s.prop1="";s.eVar4="";s.t();}},close:function(evt){if(typeof (cmCreatePageElementTag)!="undefined"){cmCreatePageElementTag("Close","Rich add to cart","","","");}if(typeof (cmCreateManualLinkClickTag)!="undefined"){cmCreateManualLinkClickTag("RICH_ADD_TO_CART","rich_close",this._coreMetricsPageID);}this.hide();dojo.publish("/riaCloseEvent",[]);},_handleContinueShoppingClick:function(evt){if(typeof (cmCreatePageElementTag)!="undefined"){cmCreatePageElementTag("Continue","Rich add to cart","","","");}if(typeof (cmCreateManualLinkClickTag)!="undefined"){cmCreateManualLinkClickTag("RICH_ADD_TO_CART","rich_continue",this._coreMetricsPageID);}this.hide();dojo.publish("/riaCloseEvent",[]);},_handlePipCheckoutClick:function(evt){if(typeof (cmCreatePageElementTag)!="undefined"){cmCreatePageElementTag("Checkout","Rich add to cart","","","");}if(typeof (cmCreateManualLinkClickTag)!="undefined"){cmCreateManualLinkClickTag("RICH_ADD_TO_CART","rich_checkout",this._coreMetricsPageID);}},setTotalPrice:function(_6ed){this.totalprice.innerHTML="$"+dojo.currency.format(_6ed);},setTotalQuantity:function(_6ee){this.skucount.innerHTML=_6ee;},parseSVCAttributesFromXml:function(item){var _6f0;if((item.getElementsByTagName("seqgiftcard"))&&(item.getElementsByTagName("seqgiftcard").length>0)){_6f0=item.getElementsByTagName("seqgiftcard")[0];}else{return null;}var _6f1={"to":"","from":"","message1":"","message2":"","sendTo":""};if(_6f0.getElementsByTagName("to")[0].firstChild){_6f1["to"]=_6f0.getElementsByTagName("to")[0].firstChild.nodeValue;}if(_6f0.getElementsByTagName("from")[0].firstChild){_6f1["from"]=_6f0.getElementsByTagName("from")[0].firstChild.nodeValue;}if(_6f0.getElementsByTagName("messgone")[0].firstChild){_6f1["message1"]=_6f0.getElementsByTagName("messgone")[0].firstChild.nodeValue;}if(_6f0.getElementsByTagName("messgtwo")[0].firstChild){_6f1["message2"]=_6f0.getElementsByTagName("messgtwo")[0].firstChild.nodeValue;}if(_6f0.getElementsByTagName("giftcardnickname")[0].firstChild){_6f1["sendTo"]=_6f0.getElementsByTagName("giftcardnickname")[0].firstChild.nodeValue;}return _6f1;},parseMongramAttributesFromXml:function(item){var _6f3;if((item.getElementsByTagName("monogramseqinfo"))&&(item.getElementsByTagName("monogramseqinfo").length>0)){_6f3=item.getElementsByTagName("monogramseqinfo")[0];}else{return null;}if(!(_6f3.childNodes.length>0)){return null;}var _6f4=_6f3.firstChild.nodeValue;var _6f5=_6f4.split("|");var _6f6={};_6f6["styleLine"]=_6f5[0];_6f6["colorLine"]=_6f5[1];var _6f7=[];for(var i=2;i<_6f5.length;i++){if(_6f5[i]!=""){_6f7[_6f7.length]=_6f5[i];}}_6f6["monogramText"]=_6f7;return _6f6;},renderFromXML:function(xml){var _6fa=xml.getElementsByTagName("totalprice")[0].firstChild.nodeValue;this.setTotalPrice(_6fa);var _6fb=xml.getElementsByTagName("totalquantity")[0].firstChild.nodeValue;this.setTotalQuantity(_6fb);var _6fc=xml.getElementsByTagName("items")[0];for(var i=0;i<this._lineItemIds.length;i++){dijit.byId(this._lineItemIds[i]).destroy();}this._lineItemIds=[];var _6fe,src,alt,item,_702,_703,sku,_705,_706,_707,_708,_709;if((xml.getElementsByTagName("shiptoinfo").length>0)&&xml.getElementsByTagName("shiptoinfo")[0].getElementsByTagName("nickname").length>0){_709=xml.getElementsByTagName("shiptoinfo")[0].getElementsByTagName("nickname")[0].firstChild.nodeValue;}for(i=0;i<_6fc.childNodes.length;i++){item=_6fc.childNodes[i];_703=new wsgc.widgets.DialogProductLineItem({});this._lineItemIds[this._lineItemIds.length]=_703.id;sku=item.getElementsByTagName("sku")[0].firstChild.nodeValue;_703.setSku(sku);this._setSkuImgAttributes(sku,_703);_702=item.getElementsByTagName("productname")[0].firstChild.nodeValue;_703.setTitle(_702);_705=item.getElementsByTagName("price")[0].firstChild.nodeValue;_703.setPrice(_705);_706=item.getElementsByTagName("quantity")[0].firstChild.nodeValue;_703.setQuantity(_706);if(item.getElementsByTagName("backorderinfo").length>0){_707=item.getElementsByTagName("backorderinfo")[0].firstChild.nodeValue;_703.setBackorder(_707);}if(item.getElementsByTagName("giftwrapinfo").length>0){_708=item.getElementsByTagName("giftwrapinfo")[0].firstChild.nodeValue;_703.setGiftWrap(_708);}else{_703.setGiftWrap("No");}_703.setSendTo(_709);var _70a=this.parseMongramAttributesFromXml(item);if(_70a!=null){_703.setMonogram(_70a);}var _70b=this.parseSVCAttributesFromXml(item);if(_70b!=null){_703.setSVC(_70b);}this.itemsHook.appendChild(_703.domNode);}},_setSkuImgAttributes:function(sku,_70d){try{var _70e={id:sku};imageDataStore.fetch({query:_70e,caller:this,queryOptions:{ignoreCase:true},onComplete:this._handleImageLookupCallback,lineItem:_70d});}catch(err){console.error("RAC Error: "+err);return;}},_handleImageLookupCallback:function(_70f,_710){var item=_70f[0];var path=imageDataStore.getValue(item,"pt");var alt=imageDataStore.getValue(item,"al");var _714=imageDataStore.getValue(item,"at");var src=imageRepo+path+_710.caller.RAC_ASPECT+".jpg";_710.lineItem.setImgSrc(src);_710.lineItem.setImgAlt(alt);},_setCoremetricsPageId:function(){if((dojo.query(".knownRegistry[value='no']").length>0&&!dojo.query(".knownRegistry[value='no']")[0].checked)||(dojo.byId("registrantid")&&dojo.byId("registrantid").value!==""&&dojo.byId("isregistrant")&&dojo.byId("isregistrant").value==="0")||(dojo.byId("iscompletion")&&dojo.byId("iscompletion").value==="1")){this._coreMetricsPageID="GIFT GIVER CONFIRMATION-RICH";}else{this._coreMetricsPageID="ECOMMERCE CONFIRMATION-RICH";}}});}if(!dojo._hasResource["wsgc.widgets.DialogProductLineItem"]){dojo._hasResource["wsgc.widgets.DialogProductLineItem"]=true;dojo.provide("wsgc.widgets.DialogProductLineItem");dojo.declare("wsgc.widgets.DialogProductLineItem",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"lineItemContainer clearfix\">\n\t<div class=\"imageContainer\">\n\t\t<!-- src is intentionally omitted as an attribute below as an empty src creates a second call to the PIP on construction -->\n\t\t<img dojoattachpoint=\"productImage\" class=\"square\" alt=\"\" style=\"display: none\"/>\n\t</div>\n\t<div class=\"copy\">\n\t\t<div class=\"info sansserif\">\n\t\t\t<h4 class=\"dynamic-text\" dojoattachpoint=\"title\"></h4>\n\t\t\t<div dojoattachpoint=\"sku\"></div>\n\t\t\t<div dojoattachpoint=\"quantity\"></div>\n\t\t\t<div dojoattachpoint=\"price\"></div>\n\t\t\t<div dojoattachpoint=\"giftwrap\" ></div>\n\t\t\t<div dojoattachpoint=\"svc\" class=\"svc\" style=\"display:none;\">\n\t\t\t\t<div dojoattachpoint=\"svcTo\" style=\"display: none;\"></div>\n\t\t\t\t<div dojoattachpoint=\"svcFrom\" style=\"display: none;\"></div>\n\t\t\t\t<div dojoattachpoint=\"svcMessageLabel\" class=\"svc-message-label\" style=\"display: none;\">Message:</div>\n\t\t\t\t<div dojoattachpoint=\"svcMessageLine1\" style=\"display: none;\"></div>\n\t\t\t\t<div dojoattachpoint=\"svcMessageLine2\" style=\"display: none;\"></div>\n\t\t\t</div>\n\t\t\t<div dojoattachpoint=\"sendTo\"></div>\n\t\t\t<div dojoattachpoint=\"monogram\" style=\"display: none;\">\n\t\t\t\t<ul dojoattachpoint=\"monogramAttributes\" class=\"monogramAttributes clearfix\">\n\t\t\t\t\t<li>This item will be personalized:</li>\n\t\t\t\t\t<li dojoattachpoint=\"monogramLineItems\"></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div class=\"backorder\" dojoattachpoint=\"backorder\"></div>\n\t\t</div>\n\t</div>\t\n</div>\n",setPrice:function(_716){this.price.innerHTML="Price: <span class='dynamic-text'>$"+dojo.currency.format(_716)+"</span><br/>";},setTitle:function(_717){this.title.innerHTML=_717+"<br/>";this.attr({"title":_717});},setSku:function(sku){this.sku.innerHTML="Item #: <span class='dynamic-text'>"+sku+"</span><br/>";},setQuantity:function(_719){this.quantity.innerHTML="Quantity: <span class='dynamic-text'>"+_719+"</span><br/>";},setGiftWrap:function(_71a){this.giftwrap.innerHTML="Gift Wrap: <span class='dynamic-text'>"+_71a+"</span><br/>";},setImgSrc:function(src){this.productImage.src=src;if(src!=""){this.productImage.style["display"]="";}},setImgAlt:function(alt){this.productImage.alt=alt;},setBackorder:function(_71d){this.backorder.innerHTML="<span>This item will be available to ship "+_71d+".</span>";},setSendTo:function(_71e){this.sendTo.innerHTML="Ship To: <span class='dynamic-text'>"+_71e+"</span><br/>";},setMonogram:function(_71f){this.monogram.style["display"]="";var _720="<span class='dynamic-text'>";_720+="Style: "+_71f["styleLine"]+"<br />";if((_71f["colorLine"]!=undefined)&&(_71f["colorLine"]!="")){_720+="Color: "+_71f["colorLine"]+"<br />";}var _721=_71f["monogramText"];_720+="Personalization: ";for(var i=0;i<_721.length;i++){_720+=_721[i];if(i!=(_721.length-1)){_720+="<br />";}}_720+="</span>";this.monogramLineItems.innerHTML=_720;},setSVC:function(_723){this.setSendTo(_723["sendTo"]);var _724=_723["to"]+_723["from"]+_723["message1"]+_723["message2"];var _725=dojo.string.trim(_724).length;if(_725==0){return;}this.svc.style["display"]="";if(_723["to"]&&(dojo.string.trim(_723["to"])!="")){this.svcTo.style["display"]="";this.svcTo.innerHTML="To: <span class='dynamic-text'>"+_723["to"]+"</span>";}if(_723["from"]&&(dojo.string.trim(_723["from"])!="")){this.svcFrom.style["display"]="";this.svcFrom.innerHTML="From: <span class='dynamic-text'>"+_723["from"]+"</span>";}if((_723["message1"]&&(dojo.string.trim(_723["message1"])!=""))||(_723["message2"]&&dojo.string.trim(_723["message2"]).length>0)){this.svcMessageLabel.style["display"]="";this.svcMessageLine1.style["display"]="";this.svcMessageLine1.innerHTML="<span class='dynamic-text'>"+_723["message1"]+"</span>";}if(dojo.string.trim(_723["message2"]).length>0){if(_723["message1"]&&(dojo.string.trim(_723["message1"])=="")){this.svcMessageLine1.style["display"]="";this.svcMessageLine1.innerHTML="<span class='dynamic-text'> </span>";}this.svcMessageLine2.style["display"]="";this.svcMessageLine2.innerHTML="<span class='dynamic-text'>"+_723["message2"]+"</span>";}}});}if(!dojo._hasResource["dojo.data.util.filter"]){dojo._hasResource["dojo.data.util.filter"]=true;dojo.provide("dojo.data.util.filter");dojo.data.util.filter.patternToRegExp=function(_726,_727){var rxp="^";var c=null;for(var i=0;i<_726.length;i++){c=_726.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_726.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_727){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};}if(!dojo._hasResource["dojo.data.util.sorter"]){dojo._hasResource["dojo.data.util.sorter"]=true;dojo.provide("dojo.data.util.sorter");dojo.data.util.sorter.basicComparator=function(a,b){var ret=0;if(a>b||typeof a==="undefined"||a===null){ret=1;}else{if(a<b||typeof b==="undefined"||b===null){ret=-1;}}return ret;};dojo.data.util.sorter.createSortFunction=function(_72e,_72f){var _730=[];function createSortFunction(attr,dir){return function(_733,_734){var a=_72f.getValue(_733,attr);var b=_72f.getValue(_734,attr);var _737=null;if(_72f.comparatorMap){if(typeof attr!=="string"){attr=_72f.getIdentity(attr);}_737=_72f.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;}_737=_737||dojo.data.util.sorter.basicComparator;return dir*_737(a,b);};};var _738;for(var i=0;i<_72e.length;i++){_738=_72e[i];if(_738.attribute){var _73a=(_738.descending)?-1:1;_730.push(createSortFunction(_738.attribute,_73a));}}return function(rowA,rowB){var i=0;while(i<_730.length){var ret=_730[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(!dojo._hasResource["dojo.data.util.simpleFetch"]){dojo._hasResource["dojo.data.util.simpleFetch"]=true;dojo.provide("dojo.data.util.simpleFetch");dojo.data.util.simpleFetch.fetch=function(_73f){_73f=_73f||{};if(!_73f.store){_73f.store=this;}var self=this;var _741=function(_742,_743){if(_743.onError){var _744=_743.scope||dojo.global;_743.onError.call(_744,_742,_743);}};var _745=function(_746,_747){var _748=_747.abort||null;var _749=false;var _74a=_747.start?_747.start:0;var _74b=(_747.count&&(_747.count!==Infinity))?(_74a+_747.count):_746.length;_747.abort=function(){_749=true;if(_748){_748.call(_747);}};var _74c=_747.scope||dojo.global;if(!_747.store){_747.store=self;}if(_747.onBegin){_747.onBegin.call(_74c,_746.length,_747);}if(_747.sort){_746.sort(dojo.data.util.sorter.createSortFunction(_747.sort,self));}if(_747.onItem){for(var i=_74a;(i<_746.length)&&(i<_74b);++i){var item=_746[i];if(!_749){_747.onItem.call(_74c,item,_747);}}}if(_747.onComplete&&!_749){var _74f=null;if(!_747.onItem){_74f=_746.slice(_74a,_74b);}_747.onComplete.call(_74c,_74f,_747);}};this._fetchItems(_73f,_745,_741);return _73f;};}if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){dojo._hasResource["dojo.data.ItemFileReadStore"]=true;dojo.provide("dojo.data.ItemFileReadStore");dojo.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_750){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_750.url;this._jsonData=_750.data;this._datatypeMap=_750.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_751){return dojo.date.stamp.fromISOString(_751);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(_750.urlPreventCache!==undefined){this.urlPreventCache=_750.urlPreventCache?true:false;}if(_750.clearOnClose){this.clearOnClose=true;}},url:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");}},_assertIsAttribute:function(_753){if(typeof _753!=="string"){throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");}},getValue:function(item,_755,_756){var _757=this.getValues(item,_755);return (_757.length>0)?_757[0]:_756;},getValues:function(item,_759){this._assertIsItem(item);this._assertIsAttribute(_759);return item[_759]||[];},getAttributes:function(item){this._assertIsItem(item);var _75b=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_75b.push(key);}}return _75b;},hasAttribute:function(item,_75e){return this.getValues(item,_75e).length>0;},containsValue:function(item,_760,_761){var _762=undefined;if(typeof _761==="string"){_762=dojo.data.util.filter.patternToRegExp(_761,false);}return this._containsValue(item,_760,_761,_762);},_containsValue:function(item,_764,_765,_766){return dojo.some(this.getValues(item,_764),function(_767){if(_767!==null&&!dojo.isObject(_767)&&_766){if(_767.toString().match(_766)){return true;}}else{if(_765===_767){return true;}}});},isItem:function(_768){if(_768&&_768[this._storeRefPropName]===this){if(this._arrayOfAllItems[_768[this._itemNumPropName]]===_768){return true;}}return false;},isItemLoaded:function(_769){return this.isItem(_769);},loadItem:function(_76a){this._assertIsItem(_76a.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},_fetchItems:function(_76d,_76e,_76f){var self=this;var _771=function(_772,_773){var _774=[];if(_772.query){var _775=_772.queryOptions?_772.queryOptions.ignoreCase:false;var _776={};for(var key in _772.query){var _778=_772.query[key];if(typeof _778==="string"){_776[key]=dojo.data.util.filter.patternToRegExp(_778,_775);}}for(var i=0;i<_773.length;++i){var _77a=true;var _77b=_773[i];if(_77b===null){_77a=false;}else{for(var key in _772.query){var _778=_772.query[key];if(!self._containsValue(_77b,key,_778,_776[key])){_77a=false;}}}if(_77a){_774.push(_77b);}}_76e(_774,_772);}else{for(var i=0;i<_773.length;++i){var item=_773[i];if(item!==null){_774.push(item);}}_76e(_774,_772);}};if(this._loadFinished){_771(_76d,this._getItemsArray(_76d.queryOptions));}else{if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_76d,filter:_771});}else{this._loadInProgress=true;var _77d={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache};var _77e=dojo.xhrGet(_77d);_77e.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;_771(_76d,self._getItemsArray(_76d.queryOptions));self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_76f(e,_76d);}});_77e.addErrback(function(_780){self._loadInProgress=false;_76f(_780,_76d);});}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;_771(_76d,this._getItemsArray(_76d.queryOptions));}catch(e){_76f(e,_76d);}}else{_76f(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_76d);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _782=this._queuedFetches[i];var _783=_782.args;var _784=_782.filter;if(_784){_784(_783,this._getItemsArray(_783.queryOptions));}else{this.fetchItemByIdentity(_783);}}this._queuedFetches=[];}},_getItemsArray:function(_785){if(_785&&_785.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_786){if(this.clearOnClose&&(this._jsonFileUrl!=="")){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[];}},_getItemsFromLoadedData:function(_787){var _788=false;function valueIsAnItem(_789){var _78a=((_789!=null)&&(typeof _789=="object")&&(!dojo.isArray(_789)||_788)&&(!dojo.isFunction(_789))&&(_789.constructor==Object||dojo.isArray(_789))&&(typeof _789._reference=="undefined")&&(typeof _789._type=="undefined")&&(typeof _789._value=="undefined"));return _78a;};var self=this;function addItemAndSubItemsToArrayOfAllItems(_78c){self._arrayOfAllItems.push(_78c);for(var _78d in _78c){var _78e=_78c[_78d];if(_78e){if(dojo.isArray(_78e)){var _78f=_78e;for(var k=0;k<_78f.length;++k){var _791=_78f[k];if(valueIsAnItem(_791)){addItemAndSubItemsToArrayOfAllItems(_791);}}}else{if(valueIsAnItem(_78e)){addItemAndSubItemsToArrayOfAllItems(_78e);}}}}};this._labelAttr=_787.label;var i;var item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_787.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];if(dojo.isArray(item)){_788=true;}addItemAndSubItemsToArrayOfAllItems(item);item[this._rootItemPropName]=true;}var _794={};var key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _796=item[key];if(_796!==null){if(!dojo.isArray(_796)){item[key]=[_796];}}else{item[key]=[null];}}_794[key]=key;}}while(_794[this._storeRefPropName]){this._storeRefPropName+="_";}while(_794[this._itemNumPropName]){this._itemNumPropName+="_";}while(_794[this._reverseRefMap]){this._reverseRefMap+="_";}var _797;var _798=_787.identifier;if(_798){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_798;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_797=item[_798];var _799=_797[0];if(!this._itemsByIdentity[_799]){this._itemsByIdentity[_799]=item;}else{if(this._jsonFileUrl){throw new Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_798+"].  Value collided: ["+_799+"]");}else{if(this._jsonData){throw new Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_798+"].  Value collided: ["+_799+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_797=item[key];for(var j=0;j<_797.length;++j){_796=_797[j];if(_796!==null&&typeof _796=="object"){if(_796._type&&_796._value){var type=_796._type;var _79c=this._datatypeMap[type];if(!_79c){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(dojo.isFunction(_79c)){_797[j]=new _79c(_796._value);}else{if(dojo.isFunction(_79c.deserialize)){_797[j]=_79c.deserialize(_796._value);}else{throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_796._reference){var _79d=_796._reference;if(!dojo.isObject(_79d)){_797[j]=this._itemsByIdentity[_79d];}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _79f=this._arrayOfAllItems[k];var _7a0=true;for(var _7a1 in _79d){if(_79f[_7a1]!=_79d[_7a1]){_7a0=false;}}if(_7a0){_797[j]=_79f;}}}if(this.referenceIntegrity){var _7a2=_797[j];if(this.isItem(_7a2)){this._addReferenceToMap(_7a2,item,key);}}}else{if(this.isItem(_796)){if(this.referenceIntegrity){this._addReferenceToMap(_796,item,key);}}}}}}}},_addReferenceToMap:function(_7a3,_7a4,_7a5){},getIdentity:function(item){var _7a7=this._features["dojo.data.api.Identity"];if(_7a7===Number){return item[this._itemNumPropName];}else{var _7a8=item[_7a7];if(_7a8){return _7a8[0];}}return null;},fetchItemByIdentity:function(_7a9){if(!this._loadFinished){var self=this;if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_7a9});}else{this._loadInProgress=true;var _7ab={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache};var _7ac=dojo.xhrGet(_7ab);_7ac.addCallback(function(data){var _7ae=_7a9.scope?_7a9.scope:dojo.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;var item=self._getItemByIdentity(_7a9.identity);if(_7a9.onItem){_7a9.onItem.call(_7ae,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_7a9.onError){_7a9.onError.call(_7ae,error);}}});_7ac.addErrback(function(_7b0){self._loadInProgress=false;if(_7a9.onError){var _7b1=_7a9.scope?_7a9.scope:dojo.global;_7a9.onError.call(_7b1,_7b0);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;var item=self._getItemByIdentity(_7a9.identity);if(_7a9.onItem){var _7b3=_7a9.scope?_7a9.scope:dojo.global;_7a9.onItem.call(_7b3,item);}}}}else{var item=this._getItemByIdentity(_7a9.identity);if(_7a9.onItem){var _7b3=_7a9.scope?_7a9.scope:dojo.global;_7a9.onItem.call(_7b3,item);}}},_getItemByIdentity:function(_7b4){var item=null;if(this._itemsByIdentity){item=this._itemsByIdentity[_7b4];}else{item=this._arrayOfAllItems[_7b4];}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _7b7=this._features["dojo.data.api.Identity"];if(_7b7===Number){return null;}else{return [_7b7];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl){var _7b9={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,sync:true};var _7ba=dojo.xhrGet(_7b9);_7ba.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}else{if(self._loadInProgress){throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");}}}catch(e){console.log(e);throw e;}});_7ba.addErrback(function(_7bc){throw _7bc;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);}if(!dojo._hasResource["dojox.data.AndOrReadStore"]){dojo._hasResource["dojox.data.AndOrReadStore"]=true;dojo.provide("dojox.data.AndOrReadStore");dojo.declare("dojox.data.AndOrReadStore",null,{constructor:function(_7bd){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_7bd.url;this._jsonData=_7bd.data;this._datatypeMap=_7bd.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_7be){return dojo.date.stamp.fromISOString(_7be);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(_7bd.urlPreventCache!==undefined){this.urlPreventCache=_7bd.urlPreventCache?true:false;}if(_7bd.clearOnClose){this.clearOnClose=true;}},url:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error("dojox.data.AndOrReadStore: Invalid item argument.");}},_assertIsAttribute:function(_7c0){if(typeof _7c0!=="string"){throw new Error("dojox.data.AndOrReadStore: Invalid attribute argument.");}},getValue:function(item,_7c2,_7c3){var _7c4=this.getValues(item,_7c2);return (_7c4.length>0)?_7c4[0]:_7c3;},getValues:function(item,_7c6){this._assertIsItem(item);this._assertIsAttribute(_7c6);return item[_7c6]||[];},getAttributes:function(item){this._assertIsItem(item);var _7c8=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_7c8.push(key);}}return _7c8;},hasAttribute:function(item,_7cb){return this.getValues(item,_7cb).length>0;},containsValue:function(item,_7cd,_7ce){var _7cf=undefined;if(typeof _7ce==="string"){_7cf=dojo.data.util.filter.patternToRegExp(_7ce,false);}return this._containsValue(item,_7cd,_7ce,_7cf);},_containsValue:function(item,_7d1,_7d2,_7d3){return dojo.some(this.getValues(item,_7d1),function(_7d4){if(_7d4!==null&&!dojo.isObject(_7d4)&&_7d3){if(_7d4.toString().match(_7d3)){return true;}}else{if(_7d2===_7d4){return true;}}});},isItem:function(_7d5){if(_7d5&&_7d5[this._storeRefPropName]===this){if(this._arrayOfAllItems[_7d5[this._itemNumPropName]]===_7d5){return true;}}return false;},isItemLoaded:function(_7d6){return this.isItem(_7d6);},loadItem:function(_7d7){this._assertIsItem(_7d7.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},_fetchItems:function(_7da,_7db,_7dc){var self=this;var _7de=function(_7df,_7e0){var _7e1=[];if(_7df.query){var _7e2=_7df.queryOptions?_7df.queryOptions.ignoreCase:false;var _7e3=_7df.query;if(typeof _7e3!="string"){_7e3=dojo.toJson(_7e3);_7e3=_7e3.replace(/\\\\/g,"\\");}_7e3=_7e3.replace(/\\"/g,"\"");var _7e4=dojo.trim(_7e3.replace(/{|}/g,""));var pos2,i;if(_7e4.match(/"? *complexQuery *"?:/)){_7e4=dojo.trim(_7e4.replace(/"?\s*complexQuery\s*"?:/,""));var _7e7=["'","\""];var pos1,_7e9;var flag=false;for(i=0;i<_7e7.length;i++){pos1=_7e4.indexOf(_7e7[i]);pos2=_7e4.indexOf(_7e7[i],1);_7e9=_7e4.indexOf(":",1);if(pos1===0&&pos2!=-1&&_7e9<pos2){flag=true;break;}}if(flag){_7e4=_7e4.replace(/^\"|^\'|\"$|\'$/g,"");}}var _7eb=_7e4;var _7ec=/^,|^NOT |^AND |^OR |^\(|^\)|^!|^&&|^\|\|/i;var _7ed="";var op="";var val="";var pos=-1;var err=false;var key="";var _7f3="";var tok="";pos2=-1;for(i=0;i<_7e0.length;++i){var _7f5=true;var _7f6=_7e0[i];if(_7f6===null){_7f5=false;}else{_7e4=_7eb;_7ed="";while(_7e4.length>0&&!err){op=_7e4.match(_7ec);while(op&&!err){_7e4=dojo.trim(_7e4.replace(op[0],""));op=dojo.trim(op[0]).toUpperCase();op=op=="NOT"?"!":op=="AND"||op==","?"&&":op=="OR"?"||":op;op=" "+op+" ";_7ed+=op;op=_7e4.match(_7ec);}if(_7e4.length>0){pos=_7e4.indexOf(":");if(pos==-1){err=true;break;}else{key=dojo.trim(_7e4.substring(0,pos).replace(/\"|\'/g,""));_7e4=dojo.trim(_7e4.substring(pos+1));tok=_7e4.match(/^\'|^\"/);if(tok){tok=tok[0];pos=_7e4.indexOf(tok);pos2=_7e4.indexOf(tok,pos+1);if(pos2==-1){err=true;break;}_7f3=_7e4.substring(pos+1,pos2);if(pos2==_7e4.length-1){_7e4="";}else{_7e4=dojo.trim(_7e4.substring(pos2+1));}_7ed+=self._containsValue(_7f6,key,_7f3,dojo.data.util.filter.patternToRegExp(_7f3,_7e2));}else{tok=_7e4.match(/\s|\)|,/);if(tok){var pos3=new Array(tok.length);for(var j=0;j<tok.length;j++){pos3[j]=_7e4.indexOf(tok[j]);}pos=pos3[0];if(pos3.length>1){for(var j=1;j<pos3.length;j++){pos=Math.min(pos,pos3[j]);}}_7f3=dojo.trim(_7e4.substring(0,pos));_7e4=dojo.trim(_7e4.substring(pos));}else{_7f3=dojo.trim(_7e4);_7e4="";}_7ed+=self._containsValue(_7f6,key,_7f3,dojo.data.util.filter.patternToRegExp(_7f3,_7e2));}}}}_7f5=eval(_7ed);}if(_7f5){_7e1.push(_7f6);}}if(err){_7e1=[];console.log("The store's _fetchItems failed, probably due to a syntax error in query.");}_7db(_7e1,_7df);}else{for(var i=0;i<_7e0.length;++i){var item=_7e0[i];if(item!==null){_7e1.push(item);}}_7db(_7e1,_7df);}};if(this._loadFinished){_7de(_7da,this._getItemsArray(_7da.queryOptions));}else{if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_7da,filter:_7de});}else{this._loadInProgress=true;var _7fa={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache};var _7fb=dojo.xhrGet(_7fa);_7fb.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;_7de(_7da,self._getItemsArray(_7da.queryOptions));self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_7dc(e,_7da);}});_7fb.addErrback(function(_7fd){self._loadInProgress=false;_7dc(_7fd,_7da);});}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;_7de(_7da,this._getItemsArray(_7da.queryOptions));}catch(e){_7dc(e,_7da);}}else{_7dc(new Error("dojox.data.AndOrReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_7da);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _7ff=this._queuedFetches[i];var _800=_7ff.args;var _801=_7ff.filter;if(_801){_801(_800,this._getItemsArray(_800.queryOptions));}else{this.fetchItemByIdentity(_800);}}this._queuedFetches=[];}},_getItemsArray:function(_802){if(_802&&_802.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_803){if(this.clearOnClose&&(this._jsonFileUrl!=="")){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[];}},_getItemsFromLoadedData:function(_804){function valueIsAnItem(_805){var _806=((_805!==null)&&(typeof _805==="object")&&(!dojo.isArray(_805))&&(!dojo.isFunction(_805))&&(_805.constructor==Object)&&(typeof _805._reference==="undefined")&&(typeof _805._type==="undefined")&&(typeof _805._value==="undefined"));return _806;};var self=this;function addItemAndSubItemsToArrayOfAllItems(_808){self._arrayOfAllItems.push(_808);for(var _809 in _808){var _80a=_808[_809];if(_80a){if(dojo.isArray(_80a)){var _80b=_80a;for(var k=0;k<_80b.length;++k){var _80d=_80b[k];if(valueIsAnItem(_80d)){addItemAndSubItemsToArrayOfAllItems(_80d);}}}else{if(valueIsAnItem(_80a)){addItemAndSubItemsToArrayOfAllItems(_80a);}}}}};this._labelAttr=_804.label;var i;var item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_804.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];addItemAndSubItemsToArrayOfAllItems(item);item[this._rootItemPropName]=true;}var _810={};var key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _812=item[key];if(_812!==null){if(!dojo.isArray(_812)){item[key]=[_812];}}else{item[key]=[null];}}_810[key]=key;}}while(_810[this._storeRefPropName]){this._storeRefPropName+="_";}while(_810[this._itemNumPropName]){this._itemNumPropName+="_";}while(_810[this._reverseRefMap]){this._reverseRefMap+="_";}var _813;var _814=_804.identifier;if(_814){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_814;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_813=item[_814];var _815=_813[0];if(!this._itemsByIdentity[_815]){this._itemsByIdentity[_815]=item;}else{if(this._jsonFileUrl){throw new Error("dojox.data.AndOrReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_814+"].  Value collided: ["+_815+"]");}else{if(this._jsonData){throw new Error("dojox.data.AndOrReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_814+"].  Value collided: ["+_815+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_813=item[key];for(var j=0;j<_813.length;++j){_812=_813[j];if(_812!==null&&typeof _812=="object"){if(_812._type&&_812._value){var type=_812._type;var _818=this._datatypeMap[type];if(!_818){throw new Error("dojox.data.AndOrReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(dojo.isFunction(_818)){_813[j]=new _818(_812._value);}else{if(dojo.isFunction(_818.deserialize)){_813[j]=_818.deserialize(_812._value);}else{throw new Error("dojox.data.AndOrReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_812._reference){var _819=_812._reference;if(!dojo.isObject(_819)){_813[j]=this._itemsByIdentity[_819];}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _81b=this._arrayOfAllItems[k];var _81c=true;for(var _81d in _819){if(_81b[_81d]!=_819[_81d]){_81c=false;}}if(_81c){_813[j]=_81b;}}}if(this.referenceIntegrity){var _81e=_813[j];if(this.isItem(_81e)){this._addReferenceToMap(_81e,item,key);}}}else{if(this.isItem(_812)){if(this.referenceIntegrity){this._addReferenceToMap(_812,item,key);}}}}}}}},_addReferenceToMap:function(_81f,_820,_821){},getIdentity:function(item){var _823=this._features["dojo.data.api.Identity"];if(_823===Number){return item[this._itemNumPropName];}else{var _824=item[_823];if(_824){return _824[0];}}return null;},fetchItemByIdentity:function(_825){if(!this._loadFinished){var self=this;if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_825});}else{this._loadInProgress=true;var _827={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache};var _828=dojo.xhrGet(_827);_828.addCallback(function(data){var _82a=_825.scope?_825.scope:dojo.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;var item=self._getItemByIdentity(_825.identity);if(_825.onItem){_825.onItem.call(_82a,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_825.onError){_825.onError.call(_82a,error);}}});_828.addErrback(function(_82c){self._loadInProgress=false;if(_825.onError){var _82d=_825.scope?_825.scope:dojo.global;_825.onError.call(_82d,_82c);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;var item=self._getItemByIdentity(_825.identity);if(_825.onItem){var _82f=_825.scope?_825.scope:dojo.global;_825.onItem.call(_82f,item);}}}}else{var item=this._getItemByIdentity(_825.identity);if(_825.onItem){var _82f=_825.scope?_825.scope:dojo.global;_825.onItem.call(_82f,item);}}},_getItemByIdentity:function(_830){var item=null;if(this._itemsByIdentity){item=this._itemsByIdentity[_830];}else{item=this._arrayOfAllItems[_830];}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _833=this._features["dojo.data.api.Identity"];if(_833===Number){return null;}else{return [_833];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl){var _835={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,sync:true};var _836=dojo.xhrGet(_835);_836.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}else{if(self._loadInProgress){throw new Error("dojox.data.AndOrReadStore:  Unable to perform a synchronous load, an async load is in progress.");}}}catch(e){console.log(e);throw e;}});_836.addErrback(function(_838){throw _838;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});dojo.extend(dojox.data.AndOrReadStore,dojo.data.util.simpleFetch);}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_839,_83a,_83b){if(this.aroundNode&&this.aroundNode===_83a){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_839;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var _83c={};var ltr=this.isLeftToRight();dojo.forEach((_83b&&_83b.length)?_83b:dijit.Tooltip.defaultPosition,function(pos){switch(pos){case "after":_83c[ltr?"BR":"BL"]=ltr?"BL":"BR";break;case "before":_83c[ltr?"BL":"BR"]=ltr?"BR":"BL";break;case "below":_83c[ltr?"BL":"BR"]=ltr?"TL":"TR";_83c[ltr?"BR":"BL"]=ltr?"TR":"TL";break;case "above":default:_83c[ltr?"TL":"TR"]=ltr?"BL":"BR";_83c[ltr?"TR":"TL"]=ltr?"BR":"BL";break;}});var pos=dijit.placeOnScreenAroundElement(this.domNode,_83a,_83c,dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_83a;},orient:function(node,_841,_842){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"}[_841+"-"+_842];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_843){if(this._onDeck&&this._onDeck[1]==_843){this._onDeck=null;}else{if(this.aroundNode===_843){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_844,_845,_846){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_844,_845,_846);};dijit.hideTooltip=function(_847){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_847);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData");this._connectNodes=[];dojo.forEach(this.connectId,function(id){var node=dojo.byId(id);if(node){this._connectNodes.push(node);dojo.forEach(["onMouseEnter","onMouseLeave","onFocus","onBlur"],function(_84a){this.connect(node,_84a.toLowerCase(),"_"+_84a);},this);if(dojo.isIE){node.style.zoom=1;}}},this);},_onMouseEnter:function(e){this._onHover(e);},_onMouseLeave:function(e){this._onUnHover(e);},_onFocus:function(e){this._focus=true;this._onHover(e);this.inherited(arguments);},_onBlur:function(e){this._focus=false;this._onUnHover(e);this.inherited(arguments);},_onHover:function(e){if(!this._showTimer){var _850=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_850);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_852){_852=_852||this._connectNodes[0];if(!_852){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_852,this.position);this._connectNode=_852;},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},uninitialize:function(){this.close();}});dijit.Tooltip.defaultPosition=["after","before"];}if(!dojo._hasResource["wsgc.widgets.QueryTooltip"]){dojo._hasResource["wsgc.widgets.QueryTooltip"]=true;dojo.provide("wsgc.widgets.QueryTooltip");dojo.declare("wsgc.widgets.QueryTooltip",[dijit.Tooltip],{query:"",postCreate:function(){if(this.srcNodeRef){this.srcNodeRef.style.display="none";}if(this.query==""){console.error("No \"connectClass\" found.");return;}this._connectNodes=[];dojo.query(this.query).forEach(function(node){if(node){this._connectNodes.push(node);dojo.forEach(["onMouseEnter","onMouseLeave","onFocus","onBlur"],function(_854){this.connect(node,_854.toLowerCase(),"_"+_854);},this);if(dojo.isIE){node.style.zoom=1;}}},this);if(dojo.query(this.query).length>0){if(!dojo.hasClass(this.domNode,"show")){dojo.addClass(this.domNode,"show");var _855;if(dojo.query(".off-screen-loading-container").length>0){_855=dojo.query(".off-screen-loading-container")[0];if(!dojo.hasClass(_855,"show")){dojo.addClass(_855,"show");}}}}}});}if(!dojo._hasResource["wsgc.js.MonogramController"]){dojo._hasResource["wsgc.js.MonogramController"]=true;dojo.provide("wsgc.js.MonogramController");dojo.declare("wsgc.js.MonogramController",null,{constructor:function(){this._registerRadioClickListenersByClass("noMono","handleNoMonogramClick");this._registerRadioClickListenersByClass("monoRadio","handleMonogramClick");this._initDisabledFields();dojo.query(".monoApplyAll").forEach(function(node){this._doApplyToAll(node,true);},this);dojo.query(".monoApplyAll").forEach(function(node){dojo.connect(node,"onclick",this,"_handleApplyToAll");},this);this._registerGiftCardApplyToAllListener();if(dojo.byId("applyToAll")){this._giftCardApplyToAll();}if(dojo.query("#gift-card-options .knownRegistry").length>0){dojo.connect(dojo.byId("giftOptionsForm"),"onsubmit",this,function(evt){if(dojo.query(".knownRegistry[value='no']")[0].checked===true&&dojo.query(".giftCardShipTo, .giftCardShipToHead").filter(function(item){if(item.value==="Registrant"){return true;}}).length>0){evt.preventDefault();var _85a="<ul class=\"error\"><li class=\"message\"><span class=\"alert-icon\">!</span> Please select a registrant name or a different Ship to recipient.</li></ul>";dojo.byId("pageErrorHook").innerHTML=_85a;window.scrollTo(0,0);return false;}else{dojo.byId("isEditMode").value="0";return true;}});}},DISABLED_COLOR:"#C0C0C0",ENABLED_COLOR:"#FFFFFF",_handleApplyToAll:function(evt){this._doApplyToAll(evt.currentTarget,false);},_doApplyToAll:function(_85c,_85d){if(_85d&&!_85c.checked){return;}var sku=dojo.attr(_85c,"sku");var _85f;var _860=-1;var _861="";var _862=[];var _863=dojo.query("div[sku=\""+sku+"\"] input[class=\"monoRadio targetRadio\"]");var _864=dojo.query("div[sku=\""+sku+"\"] input[class=\"monoRadio sourceRadio\"]");var _865=dojo.query("div[sku=\""+sku+"\"] input[class=\"noMono targetRadio\"]");var _866=dojo.query("div[sku=\""+sku+"\"] select[class=\"list monoDetail targetSelect\"]");var _867=dojo.query("div[sku=\""+sku+"\"] select[class=\"list monoDetail sourceSelect\"]");var _868=dojo.query("div[sku=\""+sku+"\"] input[class=\"textField monoDetail targetText\"]");var _869=dojo.query("div[sku=\""+sku+"\"] input[class=\"textField monoDetail sourceText\"]");_864.forEach(function(node){if(node.checked==true){_860=node.value;}});_867.forEach(function(node){_861=node.selectedIndex;});_869.forEach(function(node){_85f=dojo.attr(node,"textindex");_862[_85f]=node.value;});if(_860>-1){_865.forEach(function(node){node.checked=false;node.disabled=_85c.checked;},this);_863.forEach(function(node){if(node.value==_860){node.checked=true;}node.disabled=_85c.checked;},this);}else{_865.forEach(function(node){node.checked=true;node.disabled=_85c.checked;},this);_863.forEach(function(node){node.checked=false;node.disabled=_85c.checked;},this);}_866.forEach(function(node){node.selectedIndex=_861;node.disabled=_85c.checked;((dojo.isIE>5)&&(_85c.checked))?this._showDisabledBackgroundColor(node):this._removeDisabledBackgroundColor(node);},this);_868.forEach(function(node){_85f=dojo.attr(node,"textindex");node.value=_862[_85f];node.disabled=_85c.checked;((dojo.isIE>5)&&(_85c.checked))?this._showDisabledBackgroundColor(node):this._removeDisabledBackgroundColor(node);},this);},_initDisabledFields:function(){var _873=dojo.query(".noMono",document);dojo.forEach(_873,function(item){if(item.checked==true){var _875=dojo.attr(item,"monoset");this._monogramDetailItemsDisabled(true,_875);this._monogramDetailTextDisabled(true,_875);}},this);},handleNoMonogramClick:function(evt){var _877=dojo.attr(evt.target,"monoset");var _878=dojo.query("#monoSet"+_877+" .monoRadio");dojo.forEach(_878,function(_879){_879.checked=false;});this._monogramDetailItemsDisabled(true,_877);this._monogramDetailTextDisabled(true,_877);},_monogramDetailTextDisabled:function(_87a,_87b){var _87c="";if(_87a){_87c="italic";}dojo.query("#monoSet"+_87b+" .monoText").forEach(function(item){item.style["fontStyle"]=_87c;});},_monogramDetailItemsDisabled:function(_87e,_87f){var _880;dojo.forEach(dojo.query("#monoSet"+_87f+" .monoDetail",document),function(item){item.disabled=_87e;if(dojo.isIE){if(_87e==true){this._showDisabledBackgroundColor(item);}else{this._removeDisabledBackgroundColor(item);}}},this);},_showDisabledBackgroundColor:function(node){node.style["backgroundColor"]=this.DISABLED_COLOR;},_removeDisabledBackgroundColor:function(node){node.style["backgroundColor"]="";},handleMonogramClick:function(evt){var _885=dojo.attr(evt.target,"monoset");dojo.query("#monoSet"+_885+" .noMono").forEach(function(_886){_886.checked=false;});this._monogramDetailItemsDisabled(false,_885);this._monogramDetailTextDisabled(false,_885);},_registerRadioClickListenersByClass:function(_887,_888){var _889=dojo.query("."+_887);for(var i=0;i<_889.length;i++){dojo.connect(_889[i],"onclick",this,_888);}},_registerGiftCardApplyToAllListener:function(){if(!dojo.byId("applyToAll")){return;}dojo.connect(dojo.byId("applyToAll"),"onclick",this,"_giftCardApplyToAll");},_giftCardApplyToAll:function(evt){var _88c=false;if(evt){_88c=evt.target.checked;}else{_88c=dojo.attr("applyToAll","checked");}if(_88c){var _88d=["giftCardTo","giftCardFrom","giftCardMsg1","giftCardMsg2","giftCardShipTo","nickName"];var _88e=[];for(var i=0;i<_88d.length;i++){if(dojo.query("."+_88d[i]+"Head").length>0&&dojo.query("."+_88d[i]+"Head")[0].value){_88e[i]=dojo.query("."+_88d[i]+"Head")[0].value;}else{_88e[i]="";}dojo.query("."+_88d[i]).forEach(function(elem){elem.value=_88e[i];if(!dojo.isFF){dojo.attr(elem,"disabled",true);dojo.style(elem,"backgroundColor",this.DISABLED_COLOR);}else{dojo.attr(elem,"disabled",true);}},this);}}else{dojo.query(".giftCardTo, .giftCardFrom, .giftCardMsg1, .giftCardMsg2, .giftCardShipTo, .nickName").forEach(function(elem){dojo.attr(elem,"disabled",false);if(!dojo.isFF){dojo.style(elem,"backgroundColor",this.ENABLED_COLOR);}},this);}}});}if(!dojo._hasResource["wsgc.js.PopupController"]){dojo._hasResource["wsgc.js.PopupController"]=true;dojo.provide("wsgc.js.PopupController");dojo.declare("wsgc.js.PopupController",wsgc.js.SwatchBase,{constructor:function(){this._registerThumbEvents();this._moreViewsDefaultImgSelection();this._registerRelatedArticlesEvents();this._registerZoomViewEvents();if(dojo.byId("preview-personalization")){this._registerProductPreviewEvents();}},currentSku:null,HERO_IMG_SUFFIX:"m",LARGE_SWATCH_IMG_SUFFIX:"l",REGULAR_SWATCH_IMG_SUFFIX:"s",MOREINFO_SWATCHBLOCK_HEIGHT:180,PREVIEWCOLORS_SWATCHBLOCK_HEIGHT:120,ERROR_CLASS:"errorDisplayed",PREVIEW_MONO_TEXT_ERROR:"Please enter the text you would like for the monogram. ",PREVIEW_QUANTITY_ERROR:"Please enter a quantity between 1 and 99. ",PREVIEW_CASE_RULE_ERROR_PREFIX:"Your message contains invalid characters. Please revise. Valid characters include: ",PREVIEW_SHIPTO_ERROR:"Please select a registrant name or a different Ship to recipient. ",PREVIEW_MONO_CHAR_ERROR:"Your monogram must contain specified number of characters. ",PREVIEW_FIST_LINE_ERROR:"First line of personalization cannot be empty. ",PREVIEW_NO_OPENER:"Please return to the product information page and click on 'Preview Personalization' again to add an item.",_registerThumbEvents:function(){dojo.query(".imageSwitch").forEach(function(elem){dojo.connect(elem,"onclick",this,"_moreViewsHeroSwap");},this);},_moreViewsHeroSwap:function(evt){var _894=dojo.attr(evt.currentTarget,"imgIndex");if(dojo.query(".hiddenImageCache img[imgIndex='"+_894+"']").length===0){return;}var _895=dojo.query(".hiddenImageCache img[imgIndex='"+_894+"']")[0];var _896=dojo.attr(_895,"src");var _897=dojo.attr(_895,"alt");dojo.byId("hero-image").src=_896;dojo.byId("hero-image").alt=_897;if(dojo.byId("heroTitle")){var _898="";if(dojo.query("span",evt.currentTarget).length>0){_898=dojo.query("span",evt.currentTarget)[0].innerHTML;}dojo.byId("heroTitle").innerHTML=_898;}if(dojo.byId("viewArea")&&dojo.byId("zoomArea")&&dojo.hasClass("viewArea","hide")){dojo.addClass("zoomArea","hide");dojo.removeClass("viewArea","hide");}dojo.query(".img-selected").forEach(function(elem){dojo.removeClass(elem,"img-selected");});dojo.addClass(evt.currentTarget.parentNode,"img-selected");},_moreViewsDefaultImgSelection:function(){if(!dojo.byId("thumbnails")){return;}var _89a=dojo.query(".img-selected");if(_89a.length>0){return;}dojo.query(".defaultImg").forEach("dojo.addClass(item, 'img-selected');");},_sendMessageToParent:function(_89b){if(window.opener&&window.opener.pipC&&typeof window.opener.pipC.childGateway){window.opener.pipC.childGateway(_89b);}else{return;}},_publishColor:function(_89c){this._sendMessageToParent("{action: 'handlePopupColorSelection',  subsetSku: '"+_89c+"'}");},_initiatePreviewColorsEvents:function(){var _89d=dojo.query("#preview-colors-popup img.selected");if(_89d.length>0){this._setSelectedSwatch(_89d[0].parentNode);}},_registerPreviewColorsEvents:function(){if(dojo.byId("preview-colors")){dojo.query(".skuSwatch").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this,"_handleSwatchClick");}));}if(dojo.byId("more-info")){dojo.query(".swatch").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",function(evt){evt.preventDefault();return false;});}));}},_swatchPreview:function(elem){var _8a2=dojo.query("img.selected",elem);if(_8a2.length===0){return;}var _8a3=_8a2[0];var _8a4=dojo.attr(_8a3,"src");var _8a5=new RegExp(this.REGULAR_SWATCH_IMG_SUFFIX+"\\.jpg$");_8a4=_8a4.replace(_8a5,this.LARGE_SWATCH_IMG_SUFFIX+".jpg");var _8a6=dojo.byId("largeSwatch");if(_8a6){dojo.attr(_8a6,"src",_8a4);dojo.attr(_8a6,"alt",this.currentSwatchTitle);dojo.attr(_8a6,"title",this.currentSwatchTitle);}},_handleSwatchClick:function(evt){var elem=evt.currentTarget;this._setSelectedSwatch(elem);},_setSelectedSwatch:function(elem){var _8aa=dojo.attr(elem,"skuArray");var _8ab=dojo.fromJson(_8aa);if(_8ab.length===0){return;}this.currentSku=_8aa;if(window.opener){window.opener.imageDataStore.fetch({query:{id:""+_8ab[0]},caller:this,queryOptions:{ignoreCase:true},onComplete:dojo.hitch(this,this._handleImageCallbackForSwatchClick)});}if(!dojo.attr(elem,"swatchlabel")){return;}this.currentSwatchTitle=dojo.attr(elem,"swatchlabel");this._setSwatchTitleCurrent();this._setSwatchSelected(elem);this._swatchPreview(elem);},_setSwatchTitleCurrent:function(){this.inherited(arguments);var _8ac=dojo.byId("shown-in-text");if(_8ac){_8ac.innerHTML=this.SHOWN_IN_PREFIX+this.currentSwatchTitle;}var _8ad=dojo.byId("previewSwatchName");if(_8ad){_8ad.innerHTML=this.currentSwatchTitle;}},_registerRelatedArticlesEvents:function(){dojo.query(".articleSwitch").forEach(function(elem){dojo.connect(elem,"onclick",this,"_relatedArticleSwitch");},this);},_relatedArticleSwitch:function(evt){var link=evt.currentTarget;var _8b1=dojo.attr(link,"articleIndex");dojo.query(".articleSwitch").forEach(function(elem){dojo.removeClass(elem,"img-selected");});dojo.addClass(link,"img-selected");dojo.query(".relArticle").forEach(function(elem){dojo.addClass(elem,"hide");});dojo.removeClass(dojo.byId("article"+_8b1),"hide");},_registerZoomViewEvents:function(){dojo.query(".zoomThumbnail").forEach(function(elem){dojo.connect(elem,"onclick",this,function(evt){if(!(evt&&evt.currentTarget)){return;}var _8b6=new dojox.embed.Flash({path:dojo.attr(evt.currentTarget,"zoomsrc"),width:350,height:350,params:{wmode:"transparent",allowScriptAccess:"always"}},dojo.byId("zoomImage"));if(dojo.byId("viewArea")&&dojo.byId("zoomArea"&&dojo.hasClass("zoomArea","hide"))){dojo.addClass("viewArea","hide");dojo.removeClass("zoomArea","hide");}dojo.query(".img-selected").forEach("dojo.removeClass(item, 'img-selected');");dojo.addClass(evt.currentTarget.parentNode,"img-selected");});});},_registerProductPreviewEvents:function(){try{if(!(window.opener&&window.opener.pipC&&window.opener.pipC.setMonogramInfo)){dojo.query(".add-item-actions").forEach("item.display='none'");dojo.addClass("pageErrorHook",this.ERROR_CLASS);dojo.byId("pageErrorHook").innerHTML=this.PREVIEW_NO_OPENER;dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();dojo.query(".add-item-actions").forEach("item.style.display='none'");}}catch(e){dojo.query(".add-item-actions").forEach("item.display='none'");dojo.addClass("pageErrorHook",this.ERROR_CLASS);dojo.byId("pageErrorHook").innerHTML=this.PREVIEW_NO_OPENER;dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();dojo.query(".add-item-actions").forEach("item.style.display='none'");}dojo.query(".productRadio").forEach(function(elem){dojo.connect(elem,"onclick",this,function(evt){dojo.byId("preview-personalization-form").submit();});});dojo.query(".btn_addtobasket").connect("onclick",this,this._handlePreviewAddToBasket);},_handlePreviewAddToBasket:function(evt){dojo.stopEvent(evt);var _8ba=[];var _8bb="";var _8bc="";for(var i=0;i<3;i++){if(dojo.byId("text"+(i+1))){_8ba[i]=dojo.byId("text"+(i+1)).value;_8bb=_8bb+dojo.byId("text"+(i+1)).value;}}if(dojo.trim(_8bb)===""){_8bc=this.PREVIEW_MONO_TEXT_ERROR;}if(dojo.trim(_8bb)!==""&&_8ba.length>1&&dojo.trim(_8ba[0])===""){_8bc=this.PREVIEW_FIST_LINE_ERROR;}var _8be="",_8bf="";if(dojo.byId("perstype")){_8be=dojo.byId("perstype").value;}if(dojo.byId("mdetails")){_8bf=dojo.byId("mdetails").value;}if(_8be=="M"){if((_8bf==="1/3"&&_8bb.length===2)||((_8bf=="001")&&(_8bb.length!=1))||((_8bf=="003")&&(_8bb.length!=3))){_8bc=_8bc+this.PREVIEW_MONO_CHAR_ERROR;}}var _8c0="",re="",_8c2=[],_8c3="";if(_8be==="M"){re="A-Za-z";_8c3="A-Z a-z";}else{re="A-Za-z0-9.,-/'& ";_8c3="A-Z a-z 0-9 . , - / ' & space";}re="["+re+"]*";_8c3=_8c3+". ";var _8c4=true;for(i=0;i<_8ba.length;i++){_8c4=(_8c4&&(_8ba[i].match(re)[0]!==""||_8ba[i]===""));}if(!_8c4){_8bc=this.PREVIEW_CASE_RULE_ERROR_PREFIX+_8c3;}var qty=dojo.byId("skuquantity").value;if(qty.length===2&&qty.charAt(0)==="0"){qty=qty.charAt(1);}qty=dojo.number.parse(qty,{places:0});if(isNaN(qty)||qty<1||qty>99){_8bc=_8bc+this.PREVIEW_QUANTITY_ERROR;}var _8c6="";if(dojo.query(".shipTo").length>0){_8c6=dojo.query(".shipTo")[0].value;}var _8c7="";if(dojo.query(".knownRegistry").length>0&&dojo.query(".knownRegistry").filter(function(item){return dojo.attr(item,"checked");})[0].value!=="no"){_8c7=dojo.query(".knownRegistry").filter(function(item){return dojo.attr(item,"checked");})[0].value;}if(_8c7===""&&_8c6==="Registrant"){_8bc=_8bc+this.PREVIEW_SHIPTO_ERROR;}if(dojo.trim(_8bc)!==""){dojo.addClass("pageErrorHook",this.ERROR_CLASS);dojo.byId("pageErrorHook").innerHTML=_8bc;dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();return;}try{if(window.opener&&window.opener.pipC&&window.opener.pipC.setMonogramInfo){var sku="";if(dojo.query(".productRadio[checked]").length>0){sku=dojo.query(".productRadio[checked]")[0].value;}var _8cb="";if(dojo.byId("style")){_8cb=dojo.byId("style").value;}var _8cc="";if(dojo.byId("color")){_8cc=dojo.byId("color").value;}var _8cd="";if(dojo.query(".giftWrap").length>0){_8cd=dojo.query(".giftWrap")[0].checked;}window.opener.pipC.setMonogramInfo(sku,_8cb,_8cc,_8ba,qty,_8cd,_8c6,_8c7);window.close();}else{dojo.query(".add-item-actions").forEach("item.display='none'");dojo.addClass("pageErrorHook",this.ERROR_CLASS);dojo.byId("pageErrorHook").innerHTML=this.PREVIEW_NO_OPENER;dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();dojo.query(".add-item-actions").forEach("item.style.display='none'");}}catch(e){dojo.query(".add-item-actions").forEach("item.display='none'");dojo.addClass("pageErrorHook",this.ERROR_CLASS);dojo.byId("pageErrorHook").innerHTML=this.PREVIEW_NO_OPENER;dojo.byId("pageErrorHook").tabIndex="0";dojo.byId("pageErrorHook").focus();dojo.query(".add-item-actions").forEach("item.style.display='none'");}}});}if(!dojo._hasResource["wsgc.js.RegistryListController"]){dojo._hasResource["wsgc.js.RegistryListController"]=true;dojo.provide("wsgc.js.RegistryListController");dojo.declare("wsgc.js.RegistryListController",[wsgc.js.AddItemUtils],{constructor:function(){this._io=new wsgc.js.Io();dojo.query(".addToCart").forEach(dojo.hitch(this,function(elem){dojo.connect(elem,"onclick",this,"handleAddToCartClick");}));this._registerManageRegistryEvents();this._ioHandle=dojo.subscribe("/riaResponse",this,"_processXMLResponse");this._errors=new wsgc.js.ErrorController();this._detectEditMode();this._sendAnnouncementCardsToOtherEnabler();this._registerGiftCardCheckboxClick();this._registerRegistryEmailEditActions();},_io:null,_ioHandle:0,_errors:null,handleAddToCartClick:function(evt){dojo.stopEvent(evt);this._clearErrors();var _8d0=this._formValid("qtyToPurchase");if(!_8d0){this._renderErrors();return;}this._io.callRiaServiceRegistryList();},_detectEditMode:function(){var _8d1=dojo.queryToObject(window.location.search.slice(1));if(typeof (_8d1.transid)=="undefined"){return;}this._io._callConfirmationService(_8d1.transid);},_clearErrors:function(){dojo.byId("pageErrorHook").innerHTML="";dojo.byId("pageErrorHook").tabIndex="-1";},_renderErrors:function(){dojo.byId("pageErrorHook").innerHTML=this._errors._getErrorMessage("invalid.quantity");window.scrollTo(0,0);},_registerManageRegistryEvents:function(){dojo.subscribe("/renderSkuAddItemErrors",this,"_renderAddItemErrors");dojo.query(".postFormOnChange").forEach(function(item){dojo.connect(item,"onchange",null,function(evt){dojo.byId("regListForm").submit();});});dojo.query(".postFormOnClick").forEach(function(item){dojo.connect(item,"onclick",null,function(evt){dojo.byId("regListForm").submit();});});dojo.query(".postFormOnUpdate").connect("click",this,function(evt){dojo.stopEvent(evt);this._clearErrors();var _8d7=this._formValid("requestedQuantity");if(!_8d7){this._renderErrors();return;}if(dojo.byId("updateBtn")){dojo.byId("updateBtn").value="true";}dojo.byId("regListForm").submit();});},_processXMLResponse:function(xml){if(typeof xml!="object"){xml=dojox.xml.parser.parse(xml);}var _8d9=xml.getElementsByTagName("requestedit");if(_8d9.length>0){var _8da=xml.getElementsByTagName("requestedit")[0].firstChild;if(_8da.nodeValue=="1"){this.populateListForEditMode(xml);return;}}var _8db=xml.getElementsByTagName("iserror");if((_8db[0])&&(_8db[0].firstChild)&&(_8db[0].firstChild.nodeValue=="1")){this._processAddItemErrors(xml);return;}var _8dc=xml.getElementsByTagName("targeturl");if(_8dc.length>0){this._navigateWithReferrer(appUrl+_8dc[0].firstChild.nodeValue);return;}},populateListForEditMode:function(xml){var _8de=xml.getElementsByTagName("items")[0];if(_8de.length==0){return;}var _8df,sku;for(var i=0;i<_8de.childNodes.length;i++){_8df=_8de.childNodes[i].getElementsByTagName("quantity")[0].firstChild.nodeValue.toString();sku=_8de.childNodes[i].getElementsByTagName("sku")[0].firstChild.nodeValue.toString();if(dojo.query("input[sku='"+sku+"']").length>0){dojo.query("input[sku='"+sku+"']")[0].value=_8df;}}},_navigateWithReferrer:function(url){if(dojo.isIE>0){var a=document.createElement("a");dojo.style(a,"display","none");document.getElementsByTagName("body")[0].appendChild(a);a.href=url;a.click();return;}window.location=url;},_formValid:function(_8e4){var _8e5=true;this._productErrorStack=[];var _8e6=[];var _8e7;if(dojo.trim(_8e4)==="qtyToPurchase"){_8e7=dojo.query(".regListItem");}else{_8e7=dojo.query("input[id$=\""+_8e4+"\"]");}var _8e8,_8e9,_8ea;for(var i=0;i<_8e7.length;i++){if(!dojo.byId("webItems["+i+"]."+_8e4)){continue;}_8e9=dojo.byId("webItems["+i+"]."+_8e4).value;if(dojo.trim(_8e9)===""){continue;}if(_8e9.length===2&&_8e9.charAt(0)==="0"){_8e9=_8e9.charAt(1);}_8e9=dojo.number.parse(_8e9,{places:0});if(dojo.trim(_8e4)==="requestedQuantity"&&(isNaN(_8e9)||_8e9<0||_8e9>99)){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.quantity")});dojo.byId("webItems["+i+"]."+_8e4).value="";_8e6[i]=true;continue;}else{if(dojo.trim(_8e4)==="qtyToPurchase"&&(isNaN(_8e9)||_8e9<1||_8e9>99)){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.quantity")});dojo.byId("webItems["+i+"]."+_8e4).value="";_8e6[i]=true;continue;}else{_8e6[i]=false;_8e5=false;if(dojo.byId("skuHidden"+i)){_8ea=dojo.byId("skuHidden"+i).value;if(_8ea===""){this._productErrorStack.push({productNumber:i,error:this._errors._getErrorMessage("invalid.option")});}}}}}if(_8e5==true){this._productErrorStack.push({productNumber:0,error:this._errors._getErrorMessage("invalid.formEmpty")});}return (this._productErrorStack.length===0&&!_8e5);},_processAddItemErrors:function(xml){var _8ed=xml.getElementsByTagName("items")[0];if(_8ed.length==0){return;}var item,sku,_8f0,_8f1,code,_8f3,_8f4=[];for(var i=0;i<_8ed.childNodes.length;i++){item=_8ed.childNodes[i];if(item.getElementsByTagName("errors").length==0){continue;}sku=item.getElementsByTagName("sku")[0].firstChild.nodeValue.toString();_8f0=item.getElementsByTagName("errors")[0];for(var k=0;k<_8f0.childNodes.length;k++){_8f1=_8f0.childNodes[k];code=_8f0.getElementsByTagName("code")[0].firstChild.nodeValue.toString();_8f3=_8f0.getElementsByTagName("message")[0].firstChild.nodeValue.toString();_8f4.push({sku:sku,code:code,message:_8f3});}}if(_8f4.length>0){dojo.publish("/renderSkuAddItemErrors",[_8f4]);}},_renderAddItemErrors:function(_8f7){if(_8f7.length>0&&_8f7[0].message){if(dojo.byId("pageErrorHook")){dojo.byId("pageErrorHook").appendChild(document.createTextNode(_8f7[0].message));window.scrollTo(0,0);}}},_sendAnnouncementCardsToOtherEnabler:function(){if(!dojo.byId("announcement-cards")){return;}var _8f8=dojo.query("input[name='selectedOption']:checked")[0].value;if(_8f8=="other"){dojo.query("#alternate-pre input, #alternate-pre select").forEach(function(elem){elem.removeAttribute("disabled");dojo.removeClass(elem,"disabled");});}else{dojo.query("#alternate-pre input, #alternate-pre select").forEach(function(elem){dojo.attr(elem,"disabled","disabled");dojo.addClass(elem,"disabled");});}dojo.query("input[name='selectedOption']").forEach(function(elem){dojo.connect(elem,"onclick",function(){var _8fc=dojo.query("input[name='selectedOption']:checked")[0].value;if(_8fc=="other"){dojo.query("#alternate-pre input, #alternate-pre select").forEach(function(elem){elem.removeAttribute("disabled");dojo.removeClass(elem,"disabled");});}else{dojo.query("#alternate-pre input, #alternate-pre select").forEach(function(elem){dojo.attr(elem,"disabled","disabled");dojo.addClass(elem,"disabled");});}});});},_registerGiftCardCheckboxClick:function(){if(dojo.byId("giftFormSubmit")){dojo.connect(dojo.byId("giftFormSubmit"),"onclick",this,function(){dojo.byId("giftform").submit();});}},_registerRegistryEmailEditActions:function(){dojo.query(".updateGenPreview").forEach(function(elem){dojo.connect(elem,"onclick",this,function(evt){actionField=dojo.byId("action");actionField.value="preview";});});dojo.query(".updateGenSend").forEach(function(elem){dojo.connect(elem,"onclick",this,function(evt){actionField=dojo.byId("action");actionField.value="send";});});}});}dojo.i18n._preloadLocalizations("wsgc.nls.pip",["xx","ROOT","en","en-us"]);
