/*
	Copyright (c) 2004-2008, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

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 _3=dijit.byId(id);
return _3.isContainer?_3:null;
}
}
return null;
},_getSibling:function(_4){
var _5=this.domNode;
do{
_5=_5[_4+"Sibling"];
}while(_5&&_5.nodeType!=1);
if(!_5){
return null;
}
var id=_5.getAttribute("widgetId");
return dijit.byId(id);
},getPreviousSibling:function(){
return this._getSibling("previous");
},getNextSibling:function(){
return this._getSibling("next");
}});
dojo.declare("dijit._Container",null,{isContainer:true,addChild:function(_7,_8){
if(_8===undefined){
_8="last";
}
var _9=this.containerNode||this.domNode;
if(_8&&typeof _8=="number"){
var _a=dojo.query("> [widgetid]",_9);
if(_a&&_a.length>=_8){
_9=_a[_8-1];
_8="after";
}
}
dojo.place(_7.domNode,_9,_8);
if(this._started&&!_7._started){
_7.startup();
}
},removeChild:function(_b){
var _c=_b.domNode;
_c.parentNode.removeChild(_c);
},_nextElement:function(_d){
do{
_d=_d.nextSibling;
}while(_d&&_d.nodeType!=1);
return _d;
},_firstElement:function(_e){
_e=_e.firstChild;
if(_e&&_e.nodeType!=1){
_e=this._nextElement(_e);
}
return _e;
},getChildren:function(){
return dojo.query("> [widgetId]",this.containerNode||this.domNode).map(dijit.byNode);
},hasChildren:function(){
var cn=this.containerNode||this.domNode;
return !!this._firstElement(cn);
},_getSiblingOfChild:function(_10,dir){
var _12=_10.domNode;
var _13=(dir>0?"nextSibling":"previousSibling");
do{
_12=_12[_13];
}while(_12&&(_12.nodeType!=1||!dijit.byNode(_12)));
return _12?dijit.byNode(_12):null;
}});
dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_14,_15){
var _16=this._keyNavCodes={};
var _17=dojo.hitch(this,this.focusPrev);
var _18=dojo.hitch(this,this.focusNext);
dojo.forEach(_14,function(_19){
_16[_19]=_17;
});
dojo.forEach(_15,function(_1a){
_16[_1a]=_18;
});
this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus");
},startupKeyNavChildren:function(){
dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));
},addChild:function(_1b,_1c){
dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);
this._startupChild(_1b);
},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 _1d=this._getNextFocusableChild(this.focusedChild,1);
if(_1d.getFocalNodes){
this.focusChild(_1d,_1d.getFocalNodes()[0]);
}else{
this.focusChild(_1d);
}
},focusPrev:function(){
if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){
this.focusedChild.focusPrev();
return;
}
var _1e=this._getNextFocusableChild(this.focusedChild,-1);
if(_1e.getFocalNodes){
var _1f=_1e.getFocalNodes();
this.focusChild(_1e,_1f[_1f.length-1]);
}else{
this.focusChild(_1e);
}
},focusChild:function(_20,_21){
if(_20){
if(this.focusedChild&&_20!==this.focusedChild){
this._onChildBlur(this.focusedChild);
}
this.focusedChild=_20;
if(_21&&_20.focusFocalNode){
_20.focusFocalNode(_21);
}else{
_20.focus();
}
}
},_startupChild:function(_22){
if(_22.getFocalNodes){
dojo.forEach(_22.getFocalNodes(),function(_23){
dojo.attr(_23,"tabindex",-1);
this._connectNode(_23);
},this);
}else{
var _24=_22.focusNode||_22.domNode;
if(_22.isFocusable()){
dojo.attr(_24,"tabindex",-1);
}
this._connectNode(_24);
}
},_connectNode:function(_25){
this.connect(_25,"onfocus","_onNodeFocus");
this.connect(_25,"onblur","_onNodeBlur");
},_onContainerFocus:function(evt){
if(evt.target===this.domNode){
this.focusFirstChild();
}
},_onContainerKeypress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
var _28=this._keyNavCodes[evt.keyCode];
if(_28){
_28();
dojo.stopEvent(evt);
}
},_onNodeFocus:function(evt){
dojo.attr(this.domNode,"tabindex",-1);
var _2a=dijit.getEnclosingWidget(evt.target);
if(_2a&&_2a.isFocusable()){
this.focusedChild=_2a;
}
dojo.stopEvent(evt);
},_onNodeBlur:function(evt){
if(this.tabIndex){
dojo.attr(this.domNode,"tabindex",this.tabIndex);
}
dojo.stopEvent(evt);
},_onChildBlur:function(_2c){
},_getFirstFocusableChild:function(){
return this._getNextFocusableChild(null,1);
},_getNextFocusableChild:function(_2d,dir){
if(_2d){
_2d=this._getSiblingOfChild(_2d,dir);
}
var _2f=this.getChildren();
for(var i=0;i<_2f.length;i++){
if(!_2d){
_2d=_2f[(dir>0)?0:(_2f.length-1)];
}
if(_2d.isFocusable()){
return _2d;
}
_2d=this._getSiblingOfChild(_2d,dir);
}
return null;
}});
}
if(!dojo._hasResource["dojo.dnd.common"]){
dojo._hasResource["dojo.dnd.common"]=true;
dojo.provide("dojo.dnd.common");
dojo.dnd._copyKey=navigator.appVersion.indexOf("Macintosh")<0?"ctrlKey":"metaKey";
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);
b.l+=t.x+n.scrollLeft;
b.t+=t.y+n.scrollTop;
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-b.l,ry=e.pageY-b.t,dx=0,dy=0;
if(rx>0&&rx<b.w){
if(rx<w){
dx=-dojo.dnd.H_AUTOSCROLL_VALUE;
}else{
if(rx>b.w-w){
dx=dojo.dnd.H_AUTOSCROLL_VALUE;
}
}
}
if(ry>0&&ry<b.h){
if(ry<h){
dy=-dojo.dnd.V_AUTOSCROLL_VALUE;
}else{
if(ry>b.h-h){
dy=dojo.dnd.V_AUTOSCROLL_VALUE;
}
}
}
var _48=n.scrollLeft,_49=n.scrollTop;
n.scrollLeft=n.scrollLeft+dx;
n.scrollTop=n.scrollTop+dy;
if(_48!=n.scrollLeft||_49!=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(_4a,e,_4c){
this.node=dojo.byId(_4a);
this.marginBox={l:e.pageX,t:e.pageY};
this.mouseButton=e.button;
var h=this.host=_4c,d=_4a.ownerDocument,_4f=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"),_4f];
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});
},onMouseUp:function(e){
if(this.mouseButton==e.button){
this.destroy();
}
},onFirstMove:function(){
var s=this.node.style,l,t;
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);
l=m.l;
t=m.t;
break;
}
this.marginBox.l=l-this.marginBox.l;
this.marginBox.t=t-this.marginBox.t;
this.host.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=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(_58,_59){
this.node=dojo.byId(_58);
if(!_59){
_59={};
}
this.handle=_59.handle?dojo.byId(_59.handle):null;
if(!this.handle){
this.handle=this.node;
}
this.delay=_59.delay>0?_59.delay:0;
this.skip=_59.skip;
this.mover=_59.mover?_59.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(_5a,_5b){
return new dojo.dnd.Moveable(_5b,_5a);
},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{
new this.mover(this.node,e,this);
}
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);
new this.mover(this.node,e,this);
}
dojo.stopEvent(e);
},onMouseUp:function(e){
dojo.disconnect(this.events.pop());
dojo.disconnect(this.events.pop());
},onSelectStart:function(e){
if(!this.skip||!dojo.dnd.isFormElement(e)){
dojo.stopEvent(e);
}
},onMoveStart:function(_60){
dojo.publish("/dnd/move/start",[_60]);
dojo.addClass(dojo.body(),"dojoMove");
dojo.addClass(this.node,"dojoMoveItem");
},onMoveStop:function(_61){
dojo.publish("/dnd/move/stop",[_61]);
dojo.removeClass(dojo.body(),"dojoMove");
dojo.removeClass(this.node,"dojoMoveItem");
},onFirstMove:function(_62){
},onMove:function(_63,_64){
this.onMoving(_63,_64);
var s=_63.node.style;
s.left=_64.l+"px";
s.top=_64.t+"px";
this.onMoved(_63,_64);
},onMoving:function(_66,_67){
},onMoved:function(_68,_69){
}});
}
if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){
dojo._hasResource["dojo.dnd.TimedMoveable"]=true;
dojo.provide("dojo.dnd.TimedMoveable");
(function(){
var _6a=dojo.dnd.Moveable.prototype.onMove;
dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(_6b,_6c){
if(!_6c){
_6c={};
}
if(_6c.timeout&&typeof _6c.timeout=="number"&&_6c.timeout>=0){
this.timeout=_6c.timeout;
}
},markupFactory:function(_6d,_6e){
return new dojo.dnd.TimedMoveable(_6e,_6d);
},onMoveStop:function(_6f){
if(_6f._timer){
clearTimeout(_6f._timer);
_6a.call(this,_6f,_6f._leftTop);
}
dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);
},onMove:function(_70,_71){
_70._leftTop=_71;
if(!_70._timer){
var _t=this;
_70._timer=setTimeout(function(){
_70._timer=null;
_6a.call(_t,_70,_70._leftTop);
},this.timeout);
}
}});
})();
}
if(!dojo._hasResource["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
dojo.provide("dojo.fx.Toggler");
(function(){
var _73={_fire:function(evt,_75){
if(this[evt]){
this[evt].apply(this,_75||[]);
}
return this;
}};
var _76=function(_77){
this._index=-1;
this._animations=_77||[];
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(_76,{_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(_79,_7a){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_7a&&this._current.status()=="playing"){
return this;
}
var _7b=dojo.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_7c=dojo.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_7e=dojo.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
dojo.disconnect(_7b);
dojo.disconnect(_7c);
dojo.disconnect(_7e);
});
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(_82,_83){
this.pause();
var _84=this.duration*_82;
this._current=null;
dojo.some(this._animations,function(a){
if(a.duration<=_84){
this._current=a;
return true;
}
_84-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_84/_current.duration,_83);
}
return this;
},stop:function(_86){
if(this._current){
if(_86){
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(_76,_73);
dojo.fx.chain=function(_89){
return new _76(_89);
};
var _8a=function(_8b){
this._animations=_8b||[];
this._connects=[];
this._finished=0;
this.duration=0;
dojo.forEach(_8b,function(a){
var _8d=a.duration;
if(a.delay){
_8d+=a.delay;
}
if(this.duration<_8d){
this.duration=_8d;
}
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(_8a,{_doAction:function(_8f,_90){
dojo.forEach(this._animations,function(a){
a[_8f].apply(a,_90);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_92,_93){
var t=this._pseudoAnimation;
t[_92].apply(t,_93);
},play:function(_95,_96){
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(_97,_98){
var ms=this.duration*_97;
dojo.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_98);
});
this._call("gotoProcent",arguments);
return this;
},stop:function(_9b){
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(_8a,_73);
dojo.fx.combine=function(_9c){
return new _8a(_9c);
};
})();
dojo.declare("dojo.fx.Toggler",null,{constructor:function(_9d){
var _t=this;
dojo.mixin(_t,_9d);
_t.node=_9d.node;
_t._showArgs=dojo.mixin({},_9d);
_t._showArgs.node=_t.node;
_t._showArgs.duration=_t.showDuration;
_t.showAnim=_t.showFunc(_t._showArgs);
_t._hideArgs=dojo.mixin({},_9d);
_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(_9f){
return this.showAnim.play(_9f||0);
},hide:function(_a0){
return this.hideAnim.play(_a0||0);
}});
dojo.fx.wipeIn=function(_a1){
_a1.node=dojo.byId(_a1.node);
var _a2=_a1.node,s=_a2.style;
var _a4=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s.height="1px";
s.display="";
s.visibility="";
return 1;
}else{
var _a5=dojo.style(_a2,"height");
return Math.max(_a5,1);
}
},end:function(){
return _a2.scrollHeight;
}}}},_a1));
dojo.connect(_a4,"onEnd",function(){
s.height="auto";
});
return _a4;
};
dojo.fx.wipeOut=function(_a6){
var _a7=_a6.node=dojo.byId(_a6.node);
var s=_a7.style;
var _a9=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},_a6));
dojo.connect(_a9,"beforeBegin",function(){
s.overflow="hidden";
s.display="";
});
dojo.connect(_a9,"onEnd",function(){
s.height="auto";
s.display="none";
});
return _a9;
};
dojo.fx.slideTo=function(_aa){
var _ab=(_aa.node=dojo.byId(_aa.node));
var top=null;
var _ad=null;
var _ae=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
_ad=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
_ad=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=_ad+"px";
}
};
})(_ab);
_ae();
var _b3=dojo.animateProperty(dojo.mixin({properties:{top:{end:_aa.top||0},left:{end:_aa.left||0}}},_aa));
dojo.connect(_b3,"beforeBegin",_b3,_ae);
return _b3;
};
}
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 _b4=dojo.global;
var _b5=dojo.doc;
if(_b5.selection){
return !_b5.selection.createRange().text;
}else{
var _b6=_b4.getSelection();
if(dojo.isString(_b6)){
return !_b6;
}else{
return _b6.isCollapsed||!_b6.toString();
}
}
},getBookmark:function(){
var _b7,_b8=dojo.doc.selection;
if(_b8){
var _b9=_b8.createRange();
if(_b8.type.toUpperCase()=="CONTROL"){
if(_b9.length){
_b7=[];
var i=0,len=_b9.length;
while(i<len){
_b7.push(_b9.item(i++));
}
}else{
_b7=null;
}
}else{
_b7=_b9.getBookmark();
}
}else{
if(window.getSelection){
_b8=dojo.global.getSelection();
if(_b8){
_b9=_b8.getRangeAt(0);
_b7=_b9.cloneRange();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return _b7;
},moveToBookmark:function(_bc){
var _bd=dojo.doc;
if(_bd.selection){
var _be;
if(dojo.isArray(_bc)){
_be=_bd.body.createControlRange();
dojo.forEach(_bc,"range.addElement(item)");
}else{
_be=_bd.selection.createRange();
_be.moveToBookmark(_bc);
}
_be.select();
}else{
var _bf=dojo.global.getSelection&&dojo.global.getSelection();
if(_bf&&_bf.removeAllRanges){
_bf.removeAllRanges();
_bf.addRange(_bc);
}else{
console.warn("No idea how to restore selection for this browser!");
}
}
},getFocus:function(_c0,_c1){
return {node:_c0&&dojo.isDescendant(dijit._curFocus,_c0.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_c1||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_c1||dojo.global,dijit.getBookmark):null,openedForWindow:_c1};
},focus:function(_c2){
if(!_c2){
return;
}
var _c3="node" in _c2?_c2.node:_c2,_c4=_c2.bookmark,_c5=_c2.openedForWindow;
if(_c3){
var _c6=(_c3.tagName.toLowerCase()=="iframe")?_c3.contentWindow:_c3;
if(_c6&&_c6.focus){
try{
_c6.focus();
}
catch(e){
}
}
dijit._onFocusNode(_c3);
}
if(_c4&&dojo.withGlobal(_c5||dojo.global,dijit.isCollapsed)){
if(_c5){
_c5.focus();
}
try{
dojo.withGlobal(_c5||dojo.global,dijit.moveToBookmark,null,[_c4]);
}
catch(e){
}
}
},_activeStack:[],registerWin:function(_c7){
if(!_c7){
_c7=window;
}
dojo.connect(_c7.document,"onmousedown",function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
dijit._onTouchNode(evt.target||evt.srcElement);
});
var _c9=_c7.document.body||_c7.document.getElementsByTagName("body")[0];
if(_c9){
if(dojo.isIE){
_c9.attachEvent("onactivate",function(evt){
if(evt.srcElement.tagName.toLowerCase()!="body"){
dijit._onFocusNode(evt.srcElement);
}
});
_c9.attachEvent("ondeactivate",function(evt){
dijit._onBlurNode(evt.srcElement);
});
}else{
_c9.addEventListener("focus",function(evt){
dijit._onFocusNode(evt.target);
},true);
_c9.addEventListener("blur",function(evt){
dijit._onBlurNode(evt.target);
},true);
}
}
_c9=null;
},_onBlurNode:function(_ce){
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(_cf){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _d0=[];
try{
while(_cf){
if(_cf.dijitPopupParent){
_cf=dijit.byId(_cf.dijitPopupParent).domNode;
}else{
if(_cf.tagName&&_cf.tagName.toLowerCase()=="body"){
if(_cf===dojo.body()){
break;
}
_cf=dijit.getDocumentWindow(_cf.ownerDocument).frameElement;
}else{
var id=_cf.getAttribute&&_cf.getAttribute("widgetId");
if(id){
_d0.unshift(id);
}
_cf=_cf.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_d0);
},_onFocusNode:function(_d2){
if(_d2&&_d2.tagName&&_d2.tagName.toLowerCase()=="body"){
return;
}
dijit._onTouchNode(_d2);
if(_d2==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=_d2;
dojo.publish("focusNode",[_d2]);
},_setStack:function(_d3){
var _d4=dijit._activeStack;
dijit._activeStack=_d3;
for(var _d5=0;_d5<Math.min(_d4.length,_d3.length);_d5++){
if(_d4[_d5]!=_d3[_d5]){
break;
}
}
for(var i=_d4.length-1;i>=_d5;i--){
var _d7=dijit.byId(_d4[i]);
if(_d7){
_d7._focused=false;
_d7._hasBeenBlurred=true;
if(_d7._onBlur){
_d7._onBlur();
}
if(_d7._setStateClass){
_d7._setStateClass();
}
dojo.publish("widgetBlur",[_d7]);
}
}
for(i=_d5;i<_d3.length;i++){
_d7=dijit.byId(_d3[i]);
if(_d7){
_d7._focused=true;
if(_d7._onFocus){
_d7._onFocus();
}
if(_d7._setStateClass){
_d7._setStateClass();
}
dojo.publish("widgetFocus",[_d7]);
}
}
}});
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(_d8){
if(this._hash[_d8.id]){
throw new Error("Tried to register widget with id=="+_d8.id+" but that id is already registered");
}
this._hash[_d8.id]=_d8;
},remove:function(id){
delete this._hash[id];
},forEach:function(_da){
for(var id in this._hash){
_da(this._hash[id]);
}
},filter:function(_dc){
var res=new dijit.WidgetSet();
this.forEach(function(_de){
if(_dc(_de)){
res.add(_de);
}
});
return res;
},byId:function(id){
return this._hash[id];
},byClass:function(cls){
return this.filter(function(_e1){
return _e1.declaredClass==cls;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_e2){
var id;
do{
id=_e2+"_"+(_e2 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_e2]:dijit._widgetTypeCtr[_e2]=0);
}while(dijit.byId(id));
return id;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
dijit.registry.forEach(function(_e4){
_e4.destroy();
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(_e6){
return dijit.registry.byId(_e6.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(_e7){
while(_e7){
if(_e7.getAttribute&&_e7.getAttribute("widgetId")){
return dijit.registry.byId(_e7.getAttribute("widgetId"));
}
_e7=_e7.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(_e8){
var _e9=dojo.style(_e8);
return (_e9.visibility!="hidden")&&(_e9.visibility!="collapsed")&&(_e9.display!="none");
};
dijit.isTabNavigable=function(_ea){
if(dojo.hasAttr(_ea,"disabled")){
return false;
}
var _eb=dojo.hasAttr(_ea,"tabindex");
var _ec=dojo.attr(_ea,"tabindex");
if(_eb&&_ec>=0){
return true;
}
var _ed=_ea.nodeName.toLowerCase();
if(((_ed=="a"&&dojo.hasAttr(_ea,"href"))||dijit._tabElements[_ed])&&(!_eb||_ec>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(_ee){
var _ef,_f0,_f1,_f2,_f3,_f4;
var _f5=function(_f6){
dojo.query("> *",_f6).forEach(function(_f7){
var _f8=dijit._isElementShown(_f7);
if(_f8&&dijit.isTabNavigable(_f7)){
var _f9=dojo.attr(_f7,"tabindex");
if(!dojo.hasAttr(_f7,"tabindex")||_f9==0){
if(!_ef){
_ef=_f7;
}
_f0=_f7;
}else{
if(_f9>0){
if(!_f1||_f9<_f2){
_f2=_f9;
_f1=_f7;
}
if(!_f3||_f9>=_f4){
_f4=_f9;
_f3=_f7;
}
}
}
}
if(_f8){
_f5(_f7);
}
});
};
if(dijit._isElementShown(_ee)){
_f5(_ee);
}
return {first:_ef,last:_f0,lowest:_f1,highest:_f3};
};
dijit.getFirstInTabbingOrder=function(_fa){
var _fb=dijit._getTabNavigable(dojo.byId(_fa));
return _fb.lowest?_fb.lowest:_fb.first;
};
dijit.getLastInTabbingOrder=function(_fc){
var _fd=dijit._getTabNavigable(dojo.byId(_fc));
return _fd.last?_fd.last:_fd.highest;
};
}
if(!dojo._hasResource["dijit._base.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");
dijit.getViewport=function(){
var _fe=dojo.global;
var _ff=dojo.doc;
var w=0,h=0;
var de=_ff.documentElement;
var dew=de.clientWidth,deh=de.clientHeight;
if(dojo.isMozilla){
var minw,minh,maxw,maxh;
var dbw=_ff.body.clientWidth;
if(dbw>dew){
minw=dew;
maxw=dbw;
}else{
maxw=dew;
minw=dbw;
}
var dbh=_ff.body.clientHeight;
if(dbh>deh){
minh=deh;
maxh=dbh;
}else{
maxh=deh;
minh=dbh;
}
w=(maxw>_fe.innerWidth)?minw:maxw;
h=(maxh>_fe.innerHeight)?minh:maxh;
}else{
if(!dojo.isOpera&&_fe.innerWidth){
w=_fe.innerWidth;
h=_fe.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 _10b=dojo._docScroll();
return {w:w,h:h,l:_10b.x,t:_10b.y};
};
dijit.placeOnScreen=function(node,pos,_10e,_10f){
var _110=dojo.map(_10e,function(_111){
return {corner:_111,pos:pos};
});
return dijit._place(node,_110);
};
dijit._place=function(node,_113,_114){
var view=dijit.getViewport();
if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(node);
}
var best=null;
dojo.some(_113,function(_117){
var _118=_117.corner;
var pos=_117.pos;
if(_114){
_114(node,_117.aroundCorner,_118);
}
var _11a=node.style;
var _11b=_11a.display;
var _11c=_11a.visibility;
_11a.visibility="hidden";
_11a.display="";
var mb=dojo.marginBox(node);
_11a.display=_11b;
_11a.visibility=_11c;
var _11e=(_118.charAt(1)=="L"?pos.x:Math.max(view.l,pos.x-mb.w)),_11f=(_118.charAt(0)=="T"?pos.y:Math.max(view.t,pos.y-mb.h)),endX=(_118.charAt(1)=="L"?Math.min(view.l+view.w,_11e+mb.w):pos.x),endY=(_118.charAt(0)=="T"?Math.min(view.t+view.h,_11f+mb.h):pos.y),_122=endX-_11e,_123=endY-_11f,_124=(mb.w-_122)+(mb.h-_123);
if(best==null||_124<best.overflow){
best={corner:_118,aroundCorner:_117.aroundCorner,x:_11e,y:_11f,w:_122,h:_123,overflow:_124};
}
return !_124;
});
node.style.left=best.x+"px";
node.style.top=best.y+"px";
if(best.overflow&&_114){
_114(node,best.aroundCorner,best.corner);
}
return best;
};
dijit.placeOnScreenAroundElement=function(node,_126,_127,_128){
_126=dojo.byId(_126);
var _129=_126.style.display;
_126.style.display="";
var _12a=_126.offsetWidth;
var _12b=_126.offsetHeight;
var _12c=dojo.coords(_126,true);
_126.style.display=_129;
var _12d=[];
for(var _12e in _127){
_12d.push({aroundCorner:_12e,corner:_127[_12e],pos:{x:_12c.x+(_12e.charAt(1)=="L"?0:_12a),y:_12c.y+(_12e.charAt(0)=="T"?0:_12b)}});
}
return dijit._place(node,_12d,_128);
};
}
if(!dojo._hasResource["dijit._base.window"]){
dojo._hasResource["dijit._base.window"]=true;
dojo.provide("dijit._base.window");
dijit.getDocumentWindow=function(doc){
if(dojo.isSafari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
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 _134=[],_135=1000,_136=1;
this.prepare=function(node){
dojo.body().appendChild(node);
var s=node.style;
if(s.display=="none"){
s.display="";
}
s.visibility="hidden";
s.position="absolute";
s.top="-9999px";
};
this.open=function(args){
var _13a=args.popup,_13b=args.orient||{"BL":"TL","TL":"BL"},_13c=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_136++);
var _13e=dojo.doc.createElement("div");
dijit.setWaiRole(_13e,"presentation");
_13e.id=id;
_13e.className="dijitPopup";
_13e.style.zIndex=_135+_134.length;
_13e.style.visibility="hidden";
if(args.parent){
_13e.dijitPopupParent=args.parent.id;
}
dojo.body().appendChild(_13e);
var s=_13a.domNode.style;
s.display="";
s.visibility="";
s.position="";
_13e.appendChild(_13a.domNode);
var _140=new dijit.BackgroundIframe(_13e);
var best=_13c?dijit.placeOnScreenAroundElement(_13e,_13c,_13b,_13a.orient?dojo.hitch(_13a,"orient"):null):dijit.placeOnScreen(_13e,args,_13b=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);
_13e.style.visibility="visible";
var _142=[];
var _143=function(){
for(var pi=_134.length-1;pi>0&&_134[pi].parent===_134[pi-1].widget;pi--){
}
return _134[pi];
};
_142.push(dojo.connect(_13e,"onkeypress",this,function(evt){
if(evt.keyCode==dojo.keys.ESCAPE&&args.onCancel){
dojo.stopEvent(evt);
args.onCancel();
}else{
if(evt.keyCode==dojo.keys.TAB){
dojo.stopEvent(evt);
var _146=_143();
if(_146&&_146.onCancel){
_146.onCancel();
}
}
}
}));
if(_13a.onCancel){
_142.push(dojo.connect(_13a,"onCancel",null,args.onCancel));
}
_142.push(dojo.connect(_13a,_13a.onExecute?"onExecute":"onChange",null,function(){
var _147=_143();
if(_147&&_147.onExecute){
_147.onExecute();
}
}));
_134.push({wrapper:_13e,iframe:_140,widget:_13a,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_142});
if(_13a.onOpen){
_13a.onOpen(best);
}
return best;
};
this.close=function(_148){
while(dojo.some(_134,function(elem){
return elem.widget==_148;
})){
var top=_134.pop(),_14b=top.wrapper,_14c=top.iframe,_14d=top.widget,_14e=top.onClose;
if(_14d.onClose){
_14d.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(!_14d||!_14d.domNode){
return;
}
this.prepare(_14d.domNode);
_14c.destroy();
dojo._destroyElement(_14b);
if(_14e){
_14e();
}
}
};
}();
dijit._frames=new function(){
var _14f=[];
this.pop=function(){
var _150;
if(_14f.length){
_150=_14f.pop();
_150.style.display="";
}else{
if(dojo.isIE){
var html="<iframe src='javascript:\"\"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_150=dojo.doc.createElement(html);
}else{
_150=dojo.doc.createElement("iframe");
_150.src="javascript:\"\"";
_150.className="dijitBackgroundIframe";
}
_150.tabIndex=-1;
dojo.body().appendChild(_150);
}
return _150;
};
this.push=function(_152){
_152.style.display="";
if(dojo.isIE){
_152.style.removeExpression("width");
_152.style.removeExpression("height");
}
_14f.push(_152);
};
}();
if(dojo.isIE&&dojo.isIE<7){
dojo.addOnLoad(function(){
var f=dijit._frames;
dojo.forEach([f.pop()],f.push);
});
}
dijit.BackgroundIframe=function(node){
if(!node.id){
throw new Error("no id");
}
if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){
var _155=dijit._frames.pop();
node.appendChild(_155);
if(dojo.isIE){
_155.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");
_155.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");
}
this.iframe=_155;
}
};
dojo.extend(dijit.BackgroundIframe,{destroy:function(){
if(this.iframe){
dijit._frames.push(this.iframe);
delete this.iframe;
}
}});
}
if(!dojo._hasResource["dijit._base.scroll"]){
dojo._hasResource["dijit._base.scroll"]=true;
dojo.provide("dijit._base.scroll");
dijit.scrollIntoView=function(node){
var _157=node.parentNode;
var _158=_157.scrollTop+dojo.marginBox(_157).h;
var _159=node.offsetTop+dojo.marginBox(node).h;
if(_158<_159){
_157.scrollTop+=(_159-_158);
}else{
if(_157.scrollTop>node.offsetTop){
_157.scrollTop-=(_157.scrollTop-node.offsetTop);
}
}
};
}
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 _15c=d.isOpera;
var maj=Math.floor;
var ff=d.isFF;
var _15f={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_15c,dj_opera8:maj(_15c)==8,dj_opera9:maj(_15c)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2};
for(var p in _15f){
if(_15f[p]){
var html=dojo.doc.documentElement;
if(html.className){
html.className+=" "+p;
}else{
html.className=p;
}
}
}
})();
}
if(!dojo._hasResource["dijit._base.bidi"]){
dojo._hasResource["dijit._base.bidi"]=true;
dojo.provide("dijit._base.bidi");
dojo.addOnLoad(function(){
if(!dojo._isBodyLtr()){
dojo.addClass(dojo.body(),"dijitRtl");
}
});
}
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,_163,node,_165,obj,_167,_168){
if(obj!=this._obj){
this.stop();
this._initialDelay=_168||500;
this._subsequentDelay=_167||0.9;
this._obj=obj;
this._evt=evt;
this._node=node;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_163,_165);
this._fireEventAndReload();
}
},stop:function(){
if(this._timer){
clearTimeout(this._timer);
this._timer=null;
}
if(this._obj){
this._callback(-1,this._node,this._evt);
this._obj=null;
}
},addKeyListener:function(node,_16a,_16b,_16c,_16d,_16e){
return [dojo.connect(node,"onkeypress",this,function(evt){
if(evt.keyCode==_16a.keyCode&&(!_16a.charCode||_16a.charCode==evt.charCode)&&(_16a.ctrlKey===undefined||_16a.ctrlKey==evt.ctrlKey)&&(_16a.altKey===undefined||_16a.altKey==evt.ctrlKey)&&(_16a.shiftKey===undefined||_16a.shiftKey==evt.ctrlKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(_16a,_16b,node,_16c,_16a,_16d,_16e);
}else{
if(dijit.typematic._obj==_16a){
dijit.typematic.stop();
}
}
}),dojo.connect(node,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_16a){
dijit.typematic.stop();
}
})];
},addMouseListener:function(node,_172,_173,_174,_175){
var dc=dojo.connect;
return [dc(node,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_172,node,_173,node,_174,_175);
}),dc(node,"mouseup",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(node,"mouseout",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(node,"mousemove",this,function(evt){
dojo.stopEvent(evt);
}),dc(node,"dblclick",this,function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt,_172,node,_173,node,_174,_175);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_17c,_17d,_17e,_17f,_180,_181,_182){
return this.addKeyListener(_17d,_17e,_17f,_180,_181,_182).concat(this.addMouseListener(_17c,_17f,_180,_181,_182));
}};
}
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.moduleUrl("dojo","resources/blank.gif")+"\");";
dojo.body().appendChild(div);
var cs=dojo.getComputedStyle(div);
if(cs){
var _185=cs.backgroundImage;
var _186=(cs.borderTopColor==cs.borderRightColor)||(_185!=null&&(_185=="none"||_185=="url(invalid-url:)"));
dojo[_186?"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,{hasWaiRole:function(elem){
return elem.hasAttribute?elem.hasAttribute("role"):!!elem.getAttribute("role");
},getWaiRole:function(elem){
var _189=elem.getAttribute("role");
if(_189){
var _18a=_189.indexOf(":");
return _18a==-1?_189:_189.substring(_18a+1);
}else{
return "";
}
},setWaiRole:function(elem,role){
elem.setAttribute("role",(dojo.isFF&&dojo.isFF<3)?"wairole:"+role:role);
},removeWaiRole:function(elem){
elem.removeAttribute("role");
},hasWaiState:function(elem,_18f){
if(dojo.isFF&&dojo.isFF<3){
return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_18f);
}else{
return elem.hasAttribute?elem.hasAttribute("aria-"+_18f):!!elem.getAttribute("aria-"+_18f);
}
},getWaiState:function(elem,_191){
if(dojo.isFF&&dojo.isFF<3){
return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_191);
}else{
var _192=elem.getAttribute("aria-"+_191);
return _192?_192:"";
}
},setWaiState:function(elem,_194,_195){
if(dojo.isFF&&dojo.isFF<3){
elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_194,_195);
}else{
elem.setAttribute("aria-"+_194,_195);
}
},removeWaiState:function(elem,_197){
if(dojo.isFF&&dojo.isFF<3){
elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_197);
}else{
elem.removeAttribute("aria-"+_197);
}
}});
}
if(!dojo._hasResource["dijit._base"]){
dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");
if(dojo.isSafari){
dojo.connect(window,"load",function(){
window.resizeBy(1,0);
setTimeout(function(){
window.resizeBy(-1,0);
},10);
});
}
}
if(!dojo._hasResource["dijit._Widget"]){
dojo._hasResource["dijit._Widget"]=true;
dojo.provide("dijit._Widget");
dojo.require("dijit._base");
dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},postscript:function(_198,_199){
this.create(_198,_199);
},create:function(_19a,_19b){
this.srcNodeRef=dojo.byId(_19b);
this._connects=[];
this._attaches=[];
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_19a){
this.params=_19a;
dojo.mixin(this,_19a);
}
this.postMixInProperties();
if(!this.id){
this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
if(this.domNode){
for(var attr in this.attributeMap){
var _19d=this[attr];
if(typeof _19d!="object"&&((_19d!==""&&_19d!==false)||(_19a&&_19a[attr]))){
this.setAttribute(attr,_19d);
}
}
}
if(this.domNode){
this.domNode.setAttribute("widgetId",this.id);
}
this.postCreate();
if(this.srcNodeRef&&!this.srcNodeRef.parentNode){
delete this.srcNodeRef;
}
},postMixInProperties:function(){
},buildRendering:function(){
this.domNode=this.srcNodeRef||dojo.doc.createElement("div");
},postCreate:function(){
},startup:function(){
this._started=true;
},destroyRecursive:function(_19e){
this.destroyDescendants();
this.destroy();
},destroy:function(_19f){
this.uninitialize();
dojo.forEach(this._connects,function(_1a0){
dojo.forEach(_1a0,dojo.disconnect);
});
dojo.forEach(this._supportingWidgets||[],function(w){
w.destroy();
});
this.destroyRendering(_19f);
dijit.registry.remove(this.id);
},destroyRendering:function(_1a2){
if(this.bgIframe){
this.bgIframe.destroy();
delete this.bgIframe;
}
if(this.domNode){
dojo._destroyElement(this.domNode);
delete this.domNode;
}
if(this.srcNodeRef){
dojo._destroyElement(this.srcNodeRef);
delete this.srcNodeRef;
}
},destroyDescendants:function(){
dojo.forEach(this.getDescendants(),function(_1a3){
_1a3.destroy();
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},setAttribute:function(attr,_1a6){
var _1a7=this[this.attributeMap[attr]||"domNode"];
this[attr]=_1a6;
switch(attr){
case "class":
dojo.addClass(_1a7,_1a6);
break;
case "style":
if(_1a7.style.cssText){
_1a7.style.cssText+="; "+_1a6;
}else{
_1a7.style.cssText=_1a6;
}
break;
default:
if(/^on[A-Z]/.test(attr)){
attr=attr.toLowerCase();
}
if(typeof _1a6=="function"){
_1a6=dojo.hitch(this,_1a6);
}
dojo.attr(_1a7,attr,_1a6);
}
},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,_1aa,_1ab){
var _1ac=[];
if(_1aa=="ondijitclick"){
if(!this.nodesWithKeyClick[obj.nodeName]){
_1ac.push(dojo.connect(obj,"onkeydown",this,function(e){
if(e.keyCode==dojo.keys.ENTER){
return (dojo.isString(_1ab))?this[_1ab](e):_1ab.call(this,e);
}else{
if(e.keyCode==dojo.keys.SPACE){
dojo.stopEvent(e);
}
}
}));
_1ac.push(dojo.connect(obj,"onkeyup",this,function(e){
if(e.keyCode==dojo.keys.SPACE){
return dojo.isString(_1ab)?this[_1ab](e):_1ab.call(this,e);
}
}));
}
_1aa="onclick";
}
_1ac.push(dojo.connect(obj,_1aa,this,_1ab));
this._connects.push(_1ac);
return _1ac;
},disconnect:function(_1af){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_1af){
dojo.forEach(_1af,dojo.disconnect);
this._connects.splice(i,1);
return;
}
}
},isLeftToRight:function(){
if(!("_ltr" in this)){
this._ltr=dojo.getComputedStyle(this.domNode).direction!="rtl";
}
return this._ltr;
},isFocusable:function(){
return this.focus&&(dojo.style(this.domNode,"display")!="none");
}});
}
if(!dojo._hasResource["dojo.string"]){
dojo._hasResource["dojo.string"]=true;
dojo.provide("dojo.string");
dojo.string.pad=function(text,size,ch,end){
var out=String(text);
if(!ch){
ch="0";
}
while(out.length<size){
if(end){
out+=ch;
}else{
out=ch+out;
}
}
return out;
};
dojo.string.substitute=function(_1b6,map,_1b8,_1b9){
return _1b6.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_1ba,key,_1bc){
var _1bd=dojo.getObject(key,false,map);
if(_1bc){
_1bd=dojo.getObject(_1bc,false,_1b9)(_1bd);
}
if(_1b8){
_1bd=_1b8(_1bd,key);
}
return _1bd.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["dojo.date.stamp"]){
dojo._hasResource["dojo.date.stamp"]=true;
dojo.provide("dojo.date.stamp");
dojo.date.stamp.fromISOString=function(_1c0,_1c1){
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 _1c2=dojo.date.stamp._isoRegExp.exec(_1c0);
var _1c3=null;
if(_1c2){
_1c2.shift();
if(_1c2[1]){
_1c2[1]--;
}
if(_1c2[6]){
_1c2[6]*=1000;
}
if(_1c1){
_1c1=new Date(_1c1);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){
return _1c1["get"+prop]();
}).forEach(function(_1c5,_1c6){
if(_1c2[_1c6]===undefined){
_1c2[_1c6]=_1c5;
}
});
}
_1c3=new Date(_1c2[0]||1970,_1c2[1]||0,_1c2[2]||1,_1c2[3]||0,_1c2[4]||0,_1c2[5]||0,_1c2[6]||0);
var _1c7=0;
var _1c8=_1c2[7]&&_1c2[7].charAt(0);
if(_1c8!="Z"){
_1c7=((_1c2[8]||0)*60)+(Number(_1c2[9])||0);
if(_1c8!="-"){
_1c7*=-1;
}
}
if(_1c8){
_1c7-=_1c3.getTimezoneOffset();
}
if(_1c7){
_1c3.setTime(_1c3.getTime()+_1c7*60000);
}
}
return _1c3;
};
dojo.date.stamp.toISOString=function(_1c9,_1ca){
var _=function(n){
return (n<10)?"0"+n:n;
};
_1ca=_1ca||{};
var _1cd=[];
var _1ce=_1ca.zulu?"getUTC":"get";
var date="";
if(_1ca.selector!="time"){
var year=_1c9[_1ce+"FullYear"]();
date=["0000".substr((year+"").length)+year,_(_1c9[_1ce+"Month"]()+1),_(_1c9[_1ce+"Date"]())].join("-");
}
_1cd.push(date);
if(_1ca.selector!="date"){
var time=[_(_1c9[_1ce+"Hours"]()),_(_1c9[_1ce+"Minutes"]()),_(_1c9[_1ce+"Seconds"]())].join(":");
var _1d2=_1c9[_1ce+"Milliseconds"]();
if(_1ca.milliseconds){
time+="."+(_1d2<100?"0":"")+_(_1d2);
}
if(_1ca.zulu){
time+="Z";
}else{
if(_1ca.selector!="time"){
var _1d3=_1c9.getTimezoneOffset();
var _1d4=Math.abs(_1d3);
time+=(_1d3>0?"-":"+")+_(Math.floor(_1d4/60))+":"+_(_1d4%60);
}
}
_1cd.push(time);
}
return _1cd.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _1d6=d._scopeName+"Type";
var qry="["+_1d6+"]";
function val2type(_1d8){
if(d.isString(_1d8)){
return "string";
}
if(typeof _1d8=="number"){
return "number";
}
if(typeof _1d8=="boolean"){
return "boolean";
}
if(d.isFunction(_1d8)){
return "function";
}
if(d.isArray(_1d8)){
return "array";
}
if(_1d8 instanceof Date){
return "date";
}
if(_1d8 instanceof d._Url){
return "url";
}
return "object";
};
function str2obj(_1d9,type){
switch(type){
case "string":
return _1d9;
case "number":
return _1d9.length?Number(_1d9):NaN;
case "boolean":
return typeof _1d9=="boolean"?_1d9:!(_1d9.toLowerCase()=="false");
case "function":
if(d.isFunction(_1d9)){
_1d9=_1d9.toString();
_1d9=d.trim(_1d9.substring(_1d9.indexOf("{")+1,_1d9.length-1));
}
try{
if(_1d9.search(/[^\w\.]+/i)!=-1){
_1d9=d.parser._nameAnonFunc(new Function(_1d9),this);
}
return d.getObject(_1d9,false);
}
catch(e){
return new Function();
}
case "array":
return _1d9.split(/\s*,\s*/);
case "date":
switch(_1d9){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_1d9);
}
case "url":
return d.baseUrl+_1d9;
default:
return d.fromJson(_1d9);
}
};
var _1db={};
function getClassInfo(_1dc){
if(!_1db[_1dc]){
var cls=d.getObject(_1dc);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_1dc+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _1de=cls.prototype;
var _1df={};
for(var name in _1de){
if(name.charAt(0)=="_"){
continue;
}
var _1e1=_1de[name];
_1df[name]=val2type(_1e1);
}
_1db[_1dc]={cls:cls,params:_1df};
}
return _1db[_1dc];
};
this._functionFromScript=function(_1e2){
var _1e3="";
var _1e4="";
var _1e5=_1e2.getAttribute("args");
if(_1e5){
d.forEach(_1e5.split(/\s*,\s*/),function(part,idx){
_1e3+="var "+part+" = arguments["+idx+"]; ";
});
}
var _1e8=_1e2.getAttribute("with");
if(_1e8&&_1e8.length){
d.forEach(_1e8.split(/\s*,\s*/),function(part){
_1e3+="with("+part+"){";
_1e4+="}";
});
}
return new Function(_1e3+_1e2.innerHTML+_1e4);
};
this.instantiate=function(_1ea){
var _1eb=[];
d.forEach(_1ea,function(node){
if(!node){
return;
}
var type=node.getAttribute(_1d6);
if((!type)||(!type.length)){
return;
}
var _1ee=getClassInfo(type);
var _1ef=_1ee.cls;
var ps=_1ef._noScript||_1ef.prototype._noScript;
var _1f1={};
var _1f2=node.attributes;
for(var name in _1ee.params){
var item=_1f2.getNamedItem(name);
if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){
continue;
}
var _1f5=item.value;
switch(name){
case "class":
_1f5=node.className;
break;
case "style":
_1f5=node.style&&node.style.cssText;
}
var _1f6=_1ee.params[name];
_1f1[name]=str2obj(_1f5,_1f6);
}
if(!ps){
var _1f7=[],_1f8=[];
d.query("> script[type^='dojo/']",node).orphan().forEach(function(_1f9){
var _1fa=_1f9.getAttribute("event"),type=_1f9.getAttribute("type"),nf=d.parser._functionFromScript(_1f9);
if(_1fa){
if(type=="dojo/connect"){
_1f7.push({event:_1fa,func:nf});
}else{
_1f1[_1fa]=nf;
}
}else{
_1f8.push(nf);
}
});
}
var _1fc=_1ef["markupFactory"];
if(!_1fc&&_1ef["prototype"]){
_1fc=_1ef.prototype["markupFactory"];
}
var _1fd=_1fc?_1fc(_1f1,node,_1ef):new _1ef(_1f1,node);
_1eb.push(_1fd);
var _1fe=node.getAttribute("jsId");
if(_1fe){
d.setObject(_1fe,_1fd);
}
if(!ps){
d.forEach(_1f7,function(_1ff){
d.connect(_1fd,_1ff.event,null,_1ff.func);
});
d.forEach(_1f8,function(func){
func.call(_1fd);
});
}
});
d.forEach(_1eb,function(_201){
if(_201&&_201.startup&&!_201._started&&(!_201.getParent||!_201.getParent())){
_201.startup();
}
});
return _1eb;
};
this.parse=function(_202){
var list=d.query(qry,_202);
var _204=this.instantiate(list);
return _204;
};
}();
(function(){
var _205=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,_205);
}else{
dojo._loaders.unshift(_205);
}
})();
dojo.parser._anonCtr=0;
dojo.parser._anon={};
dojo.parser._nameAnonFunc=function(_206,_207){
var jpn="$joinpoint";
var nso=(_207||dojo.parser._anon);
if(dojo.isIE){
var cn=_206["__dojoNameCache"];
if(cn&&nso[cn]===_206){
return _206["__dojoNameCache"];
}
}
var ret="__"+dojo.parser._anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.parser._anonCtr++;
}
nso[ret]=_206;
return ret;
};
}
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,containerNode:null,_skipNodeCache:false,_stringRepl:function(tmpl){
var _20d=this.declaredClass,_20e=this;
return dojo.string.substitute(tmpl,this,function(_20f,key){
if(key.charAt(0)=="!"){
_20f=_20e[key.substr(1)];
}
if(typeof _20f=="undefined"){
throw new Error(_20d+" template:"+key);
}
if(!_20f){
return "";
}
return key.charAt(0)=="!"?_20f:_20f.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _211=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_211)){
node=dijit._Templated._createNodesFromText(this._stringRepl(_211))[0];
}else{
node=_211.cloneNode(true);
}
this._attachTemplateNodes(node);
var _213=this.srcNodeRef;
if(_213&&_213.parentNode){
_213.parentNode.replaceChild(node,_213);
}
this.domNode=node;
if(this.widgetsInTemplate){
var cw=this._supportingWidgets=dojo.parser.parse(node);
this._attachTemplateNodes(cw,function(n,p){
return n[p];
});
}
this._fillContent(_213);
},_fillContent:function(_217){
var dest=this.containerNode;
if(_217&&dest){
while(_217.hasChildNodes()){
dest.appendChild(_217.firstChild);
}
}
},_attachTemplateNodes:function(_219,_21a){
_21a=_21a||function(n,p){
return n.getAttribute(p);
};
var _21d=dojo.isArray(_219)?_219:(_219.all||_219.getElementsByTagName("*"));
var x=dojo.isArray(_219)?0:-1;
for(;x<_21d.length;x++){
var _21f=(x==-1)?_219:_21d[x];
if(this.widgetsInTemplate&&_21a(_21f,"dojoType")){
continue;
}
var _220=_21a(_21f,"dojoAttachPoint");
if(_220){
var _221,_222=_220.split(/\s*,\s*/);
while((_221=_222.shift())){
if(dojo.isArray(this[_221])){
this[_221].push(_21f);
}else{
this[_221]=_21f;
}
}
}
var _223=_21a(_21f,"dojoAttachEvent");
if(_223){
var _224,_225=_223.split(/\s*,\s*/);
var trim=dojo.trim;
while((_224=_225.shift())){
if(_224){
var _227=null;
if(_224.indexOf(":")!=-1){
var _228=_224.split(":");
_224=trim(_228[0]);
_227=trim(_228[1]);
}else{
_224=trim(_224);
}
if(!_227){
_227=_224;
}
this.connect(_21f,_224,_227);
}
}
}
var role=_21a(_21f,"waiRole");
if(role){
dijit.setWaiRole(_21f,role);
}
var _22a=_21a(_21f,"waiState");
if(_22a){
dojo.forEach(_22a.split(/\s*,\s*/),function(_22b){
if(_22b.indexOf("-")!=-1){
var pair=_22b.split("-");
dijit.setWaiState(_21f,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_22d,_22e,_22f){
var _230=dijit._Templated._templateCache;
var key=_22e||_22d;
var _232=_230[key];
if(_232){
return _232;
}
if(!_22e){
_22e=dijit._Templated._sanitizeTemplateString(dojo._getText(_22d));
}
_22e=dojo.string.trim(_22e);
if(_22f||_22e.match(/\$\{([^\}]+)\}/g)){
return (_230[key]=_22e);
}else{
return (_230[key]=dijit._Templated._createNodesFromText(_22e)[0]);
}
};
dijit._Templated._sanitizeTemplateString=function(_233){
if(_233){
_233=_233.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _234=_233.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_234){
_233=_234[1];
}
}else{
_233="";
}
return _233;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
var _235=dijit._Templated._templateCache;
for(var key in _235){
var _237=_235[key];
if(!isNaN(_237.nodeType)){
dojo._destroyElement(_237);
}
delete _235[key];
}
});
}
(function(){
var _238={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=dojo.doc.createElement("div");
tn.style.display="none";
dojo.body().appendChild(tn);
}
var _23b="none";
var _23c=text.replace(/^\s+/,"");
for(var type in _238){
var map=_238[type];
if(map.re.test(_23c)){
_23b=type;
text=map.pre+text+map.post;
break;
}
}
tn.innerHTML=text;
if(tn.normalize){
tn.normalize();
}
var tag={cell:"tr",row:"tbody",section:"table"}[_23b];
var _240=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;
var _241=[];
while(_240.firstChild){
_241.push(_240.removeChild(_240.firstChild));
}
tn.innerHTML="";
return _241;
};
})();
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
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],{isLayoutContainer:true,postCreate:function(){
dojo.addClass(this.domNode,"dijitContainer");
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_242){
_242.startup();
});
if(!this.getParent||!this.getParent()){
this.resize();
this.connect(window,"onresize",function(){
this.resize();
});
}
this.inherited(arguments);
},resize:function(args){
var node=this.domNode;
if(args){
dojo.marginBox(node,args);
if(args.t){
node.style.top=args.t+"px";
}
if(args.l){
node.style.left=args.l+"px";
}
}
var mb=dojo.mixin(dojo.marginBox(node),args||{});
this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
this.layout();
},layout:function(){
}});
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 _24b=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_24e,dim){
_24e.resize?_24e.resize(dim):dojo.marginBox(_24e.domNode,dim);
dojo.mixin(_24e,dojo.marginBox(_24e.domNode));
dojo.mixin(_24e,dim);
};
dijit.layout.layoutChildren=function(_250,dim,_252){
dim=dojo.mixin({},dim);
dojo.addClass(_250,"dijitLayoutContainer");
_252=dojo.filter(_252,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_252,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_252,function(_255){
var elm=_255.domNode,pos=_255.layoutAlign;
var _258=elm.style;
_258.left=dim.l+"px";
_258.top=dim.t+"px";
_258.bottom=_258.right="auto";
dojo.addClass(elm,"dijitAlign"+_24b(pos));
if(pos=="top"||pos=="bottom"){
size(_255,{w:dim.w});
dim.h-=_255.h;
if(pos=="top"){
dim.t+=_255.h;
}else{
_258.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_255,{h:dim.h});
dim.w-=_255.w;
if(pos=="left"){
dim.l+=_255.w;
}else{
_258.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_255,dim);
}
}
}
});
};
})();
}
if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_259,_25a,_25b){
_25b=dojo.i18n.normalizeLocale(_25b);
var _25c=_25b.split("-");
var _25d=[_259,"nls",_25a].join(".");
var _25e=dojo._loadedModules[_25d];
if(_25e){
var _25f;
for(var i=_25c.length;i>0;i--){
var loc=_25c.slice(0,i).join("_");
if(_25e[loc]){
_25f=_25e[loc];
break;
}
}
if(!_25f){
_25f=_25e.ROOT;
}
if(_25f){
var _262=function(){
};
_262.prototype=_25f;
return new _262();
}
}
throw new Error("Bundle not found: "+_25a+" in "+_259+" , locale="+_25b);
};
dojo.i18n.normalizeLocale=function(_263){
var _264=_263?_263.toLowerCase():dojo.locale;
if(_264=="root"){
_264="ROOT";
}
return _264;
};
dojo.i18n._requireLocalization=function(_265,_266,_267,_268){
var _269=dojo.i18n.normalizeLocale(_267);
var _26a=[_265,"nls",_266].join(".");
var _26b="";
if(_268){
var _26c=_268.split(",");
for(var i=0;i<_26c.length;i++){
if(_269.indexOf(_26c[i])==0){
if(_26c[i].length>_26b.length){
_26b=_26c[i];
}
}
}
if(!_26b){
_26b="ROOT";
}
}
var _26e=_268?_26b:_269;
var _26f=dojo._loadedModules[_26a];
var _270=null;
if(_26f){
if(dojo.config.localizationComplete&&_26f._built){
return;
}
var _271=_26e.replace(/-/g,"_");
var _272=_26a+"."+_271;
_270=dojo._loadedModules[_272];
}
if(!_270){
_26f=dojo["provide"](_26a);
var syms=dojo._getModuleSymbols(_265);
var _274=syms.concat("nls").join("/");
var _275;
dojo.i18n._searchLocalePath(_26e,_268,function(loc){
var _277=loc.replace(/-/g,"_");
var _278=_26a+"."+_277;
var _279=false;
if(!dojo._loadedModules[_278]){
dojo["provide"](_278);
var _27a=[_274];
if(loc!="ROOT"){
_27a.push(loc);
}
_27a.push(_266);
var _27b=_27a.join("/")+".js";
_279=dojo._loadPath(_27b,null,function(hash){
var _27d=function(){
};
_27d.prototype=_275;
_26f[_277]=new _27d();
for(var j in hash){
_26f[_277][j]=hash[j];
}
});
}else{
_279=true;
}
if(_279&&_26f[_277]){
_275=_26f[_277];
}else{
_26f[_277]=_275;
}
if(_268){
return true;
}
});
}
if(_268&&_269!=_26b){
_26f[_269.replace(/-/g,"_")]=_26f[_26b.replace(/-/g,"_")];
}
};
(function(){
var _27f=dojo.config.extraLocale;
if(_27f){
if(!_27f instanceof Array){
_27f=[_27f];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_283,_284){
req(m,b,_283,_284);
if(_283){
return;
}
for(var i=0;i<_27f.length;i++){
req(m,b,_27f[i],_284);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_286,down,_288){
_286=dojo.i18n.normalizeLocale(_286);
var _289=_286.split("-");
var _28a=[];
for(var i=_289.length;i>0;i--){
_28a.push(_289.slice(0,i).join("-"));
}
_28a.push(false);
if(down){
_28a.reverse();
}
for(var j=_28a.length-1;j>=0;j--){
var loc=_28a[j]||"ROOT";
var stop=_288(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_28f,_290){
function preload(_291){
_291=dojo.i18n.normalizeLocale(_291);
dojo.i18n._searchLocalePath(_291,true,function(loc){
for(var i=0;i<_290.length;i++){
if(_290[i]==loc){
dojo["require"](_28f+"_"+loc);
return true;
}
}
return false;
});
};
preload();
var _294=dojo.config.extraLocale||[];
for(var i=0;i<_294.length;i++){
preload(_294[i]);
}
};
}
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,"class":"dijitContentPane",doLayout:"auto",postCreate:function(){
this.domNode.title="";
if(!this.containerNode){
this.containerNode=this.domNode;
}
if(this.preload){
this._loadCheck();
}
var _296=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_296);
this.errorMessage=dojo.string.substitute(this.errorMessage,_296);
var _297=dijit.getWaiRole(this.domNode);
if(!_297){
dijit.setWaiRole(this.domNode,"group");
}
dojo.addClass(this.domNode,this["class"]);
},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 _298=dojo.query(">",this.containerNode||this.domNode),_299=_298.filter("[widgetId]");
if(_298.length==1&&_299.length==1){
this.isContainer=true;
this._singleChild=dijit.byNode(_299[0]);
}else{
delete this.isContainer;
delete this._singleChild;
}
},refresh:function(){
return this._prepareLoad(true);
},setHref:function(href){
this.href=href;
return this._prepareLoad();
},setContent:function(data){
if(!this._isDownloaded){
this.href="";
this._onUnloadHandler();
}
this._setContent(data||"");
this._isDownloaded=false;
if(this.parseOnLoad){
this._createSubWidgets();
}
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild&&this._singleChild.resize){
this._singleChild.startup();
this._singleChild.resize(this._contentBox||dojo.contentBox(this.containerNode||this.domNode));
}
}
this._onLoadHandler();
},cancel:function(){
if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
this._xhrDfd.cancel();
}
delete this._xhrDfd;
},destroy:function(){
if(this._beingDestroyed){
return;
}
this._onUnloadHandler();
this._beingDestroyed=true;
this.inherited("destroy",arguments);
},resize:function(size){
dojo.marginBox(this.domNode,size);
var node=this.containerNode||this.domNode,mb=dojo.mixin(dojo.marginBox(node),size||{});
this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize(this._contentBox);
}
},_prepareLoad:function(_29f){
this.cancel();
this.isLoaded=false;
this._loadCheck(_29f);
},_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(_2a1){
var _2a2=this._isShown();
if(this.href&&(_2a1||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_2a2&&!this._xhrDfd)||(!this.isLoaded&&_2a2&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._onUnloadHandler();
this._setContent(this.onDownloadStart.call(this));
var self=this;
var _2a4={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_2a4,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_2a4);
hand.addCallback(function(html){
try{
self.onDownloadEnd.call(self);
self._isDownloaded=true;
self.setContent.call(self,html);
}
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");
}
},_setContent:function(cont){
this.destroyDescendants();
try{
var node=this.containerNode||this.domNode;
while(node.firstChild){
dojo._destroyElement(node.firstChild);
}
if(typeof cont=="string"){
if(this.extractContent){
match=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(match){
cont=match[1];
}
}
node.innerHTML=cont;
}else{
if(cont.nodeType){
node.appendChild(cont);
}else{
dojo.forEach(cont,function(n){
node.appendChild(n.cloneNode(true));
});
}
}
}
catch(e){
var _2ab=this.onContentError(e);
try{
node.innerHTML=_2ab;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
}
},_onError:function(type,err,_2ae){
var _2af=this["on"+type+"Error"].call(this,err);
if(_2ae){
console.error(_2ae,err);
}else{
if(_2af){
this._setContent.call(this,_2af);
}
}
},_createSubWidgets:function(){
var _2b0=this.containerNode||this.domNode;
try{
dojo.parser.parse(_2b0,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(_2b3){
},onDownloadError:function(_2b4){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
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(_2b5){
if(_2b5.reset){
_2b5.reset();
}
});
},validate:function(){
var _2b6=false;
return dojo.every(dojo.map(this.getDescendants(),function(_2b7){
_2b7._hasBeenBlurred=true;
var _2b8=!_2b7.validate||_2b7.validate();
if(!_2b8&&!_2b6){
dijit.scrollIntoView(_2b7.containerNode||_2b7.domNode);
_2b7.focus();
_2b6=true;
}
return _2b8;
}),"return item;");
},setValues:function(obj){
var map={};
dojo.forEach(this.getDescendants(),function(_2bb){
if(!_2bb.name){
return;
}
var _2bc=map[_2bb.name]||(map[_2bb.name]=[]);
_2bc.push(_2bb);
});
for(var name in map){
var _2be=map[name],_2bf=dojo.getObject(name,false,obj);
if(!dojo.isArray(_2bf)){
_2bf=[_2bf];
}
if(typeof _2be[0].checked=="boolean"){
dojo.forEach(_2be,function(w,i){
w.setValue(dojo.indexOf(_2bf,w.value)!=-1);
});
}else{
if(_2be[0]._multiValue){
_2be[0].setValue(_2bf);
}else{
dojo.forEach(_2be,function(w,i){
w.setValue(_2bf[i]);
});
}
}
}
},getValues:function(){
var obj={};
dojo.forEach(this.getDescendants(),function(_2c5){
var name=_2c5.name;
if(!name){
return;
}
var _2c7=(_2c5.getValue&&!_2c5._getValueDeprecated)?_2c5.getValue():_2c5.value;
if(typeof _2c5.checked=="boolean"){
if(/Radio/.test(_2c5.declaredClass)){
if(_2c7!==false){
dojo.setObject(name,_2c7,obj);
}
}else{
var ary=dojo.getObject(name,false,obj);
if(!ary){
ary=[];
dojo.setObject(name,ary,obj);
}
if(_2c7!==false){
ary.push(_2c7);
}
}
}else{
dojo.setObject(name,_2c7,obj);
}
});
return obj;
},isValid:function(){
return dojo.every(this.getDescendants(),function(_2c9){
return !_2c9.isValid||_2c9.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(_2ca){
},onExecute:function(){
},setAttribute:function(attr,_2cc){
this.inherited(arguments);
switch(attr){
case "encType":
if(dojo.isIE){
this.domNode.encoding=_2cc;
}
}
},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.setAttribute("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 _2d4=dijit.getViewport();
var is=this.node.style,os=this.domNode.style;
os.top=_2d4.t+"px";
os.left=_2d4.l+"px";
is.width=_2d4.w+"px";
is.height=_2d4.h+"px";
var _2d7=dijit.getViewport();
if(_2d4.w!=_2d7.w){
is.width=_2d7.w+"px";
}
if(_2d4.h!=_2d7.h){
is.height=_2d7.h+"px";
}
},show:function(){
this.domNode.style.display="block";
this.layout();
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
this._resizeHandler=this.connect(window,"onresize","layout");
},hide:function(){
this.domNode.style.display="none";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
this.disconnect(this._resizeHandler);
},uninitialize:function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
}});
dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_2d8){
},onCancel:function(){
},onExecute:function(){
},_onSubmit:function(){
this.onExecute();
this.execute(this.getValues());
},_getFocusItems:function(_2d9){
var _2da=dijit.getFirstInTabbingOrder(_2d9);
this._firstFocusItem=_2da?_2da:_2d9;
_2da=dijit.getLastInTabbingOrder(_2d9);
this._lastFocusItem=_2da?_2da:this._firstFocusItem;
if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){
dojo.attr(_2d9,"tabindex","0");
this._firstFocusItem=_2d9;
}
}});
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\">${title}</span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n",open:false,duration:400,refocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:"titleBar"}),postCreate:function(){
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
var _2db=dojo.i18n.getLocalization("dijit","common");
if(this.closeButtonNode){
this.closeButtonNode.setAttribute("title",_2db.buttonCancel);
}
if(this.closeText){
this.closeText.setAttribute("title",_2db.buttonCancel);
}
var s=this.domNode.style;
s.visibility="hidden";
s.position="absolute";
s.display="";
s.top="-9999px";
this.connect(this,"onExecute","hide");
this.connect(this,"onCancel","hide");
this._modalconnects=[];
},onLoad:function(){
this._position();
this.inherited(arguments);
},_setup:function(){
if(this.titleBar){
this._moveable=new dojo.dnd.TimedMoveable(this.domNode,{handle:this.titleBar,timeout:0});
}
this._underlay=new dijit.DialogUnderlay({id:this.id+"_underlay","class":dojo.map(this["class"].split(/\s/),function(s){
return s+"_underlay";
}).join(" ")});
var node=this.domNode;
this._fadeIn=dojo.fx.combine([dojo.fadeIn({node:node,duration:this.duration}),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.visibility="hidden";
node.style.top="-9999px";
}}),dojo.fadeOut({node:this._underlay.domNode,duration:this.duration,onEnd:dojo.hitch(this._underlay,"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();
}
},_position:function(){
if(dojo.hasClass(dojo.body(),"dojoMove")){
return;
}
var _2df=dijit.getViewport();
var mb=dojo.marginBox(this.domNode);
var _2e1=this.domNode.style;
_2e1.left=Math.floor((_2df.l+(_2df.w-mb.w)/2))+"px";
_2e1.top=Math.floor((_2df.t+(_2df.h-mb.h)/2))+"px";
},_onKey:function(evt){
if(evt.keyCode){
var node=evt.target;
if(evt.keyCode==dojo.keys.TAB){
this._getFocusItems(this.domNode);
}
var _2e4=(this._firstFocusItem==this._lastFocusItem);
if(node==this._firstFocusItem&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){
if(!_2e4){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.keyCode==dojo.keys.TAB&&!evt.shiftKey){
if(!_2e4){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
while(node){
if(node==this.domNode){
if(evt.keyCode==dojo.keys.ESCAPE){
this.hide();
}else{
return;
}
}
node=node.parentNode;
}
if(evt.keyCode!=dojo.keys.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(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
dojo.style(this.domNode,"opacity",0);
this.domNode.style.visibility="";
this.open=true;
this._loadCheck();
this._position();
this._fadeIn.play();
this._savedFocus=dijit.getFocus(this);
this._getFocusItems(this.domNode);
setTimeout(dojo.hitch(this,function(){
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));
}
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){
var fo=this._savedFocus;
setTimeout(dojo.hitch(dijit,"focus",fo),25);
}
this.inherited(arguments);
}});
dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:"<div class=\"dijitTooltipDialog\" 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=\"presenation\"></div>\n</div>\n",postCreate:function(){
this.inherited(arguments);
this.connect(this.containerNode,"onkeypress","_onKey");
this.containerNode.title=this.title;
},orient:function(node,_2e7,_2e8){
this.domNode.className="dijitTooltipDialog "+" dijitTooltipAB"+(_2e8.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_2e8.charAt(0)=="T"?"Below":"Above");
},onOpen:function(pos){
this._getFocusItems(this.containerNode);
this.orient(this.domNode,pos.aroundCorner,pos.corner);
this._loadCheck();
dijit.focus(this._firstFocusItem);
},_onKey:function(evt){
var node=evt.target;
if(evt.keyCode==dojo.keys.TAB){
this._getFocusItems(this.containerNode);
}
var _2ec=(this._firstFocusItem==this._lastFocusItem);
if(evt.keyCode==dojo.keys.ESCAPE){
this.onCancel();
}else{
if(node==this._firstFocusItem&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){
if(!_2ec){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.keyCode==dojo.keys.TAB&&!evt.shiftKey){
if(!_2ec){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
if(evt.keyCode==dojo.keys.TAB){
evt.stopPropagation();
}
}
}
}
}});
}
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"}),setAttribute:function(attr,_2ee){
this.inherited(arguments);
switch(attr){
case "disabled":
var _2ef=this[this.attributeMap["tabIndex"]||"domNode"];
if(_2ee){
this._hovering=false;
this._active=false;
_2ef.removeAttribute("tabIndex");
}else{
_2ef.setAttribute("tabIndex",this.tabIndex);
}
dijit.setWaiState(this[this.attributeMap["disabled"]||"domNode"],"disabled",_2ee);
this._setStateClass();
}
},setDisabled:function(_2f0){
dojo.deprecated("setDisabled("+_2f0+") is deprecated. Use setAttribute('disabled',"+_2f0+") instead.","","2.0");
this.setAttribute("disabled",_2f0);
},_onMouse:function(_2f1){
var _2f2=_2f1.currentTarget;
if(_2f2&&_2f2.getAttribute){
this.stateModifier=_2f2.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_2f1.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 _2f3=this.connect(dojo.body(),"onmouseup",function(){
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_2f3);
});
if(this.isFocusable()){
this.focus();
}
break;
}
this._setStateClass();
}
},isFocusable:function(){
return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");
},focus:function(){
setTimeout(dojo.hitch(this,dijit.focus,this.focusNode),0);
},_setStateClass:function(){
if(!("staticClass" in this)){
this.staticClass=(this.stateNode||this.domNode).className;
}
var _2f4=[this.baseClass];
function multiply(_2f5){
_2f4=_2f4.concat(dojo.map(_2f4,function(c){
return c+_2f5;
}),"dijit"+_2f5);
};
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");
}
}
}
}
(this.stateNode||this.domNode).className=this.staticClass+" "+_2f4.join(" ");
},onChange:function(_2f7){
},_onChangeMonitor:"value",_onChangeActive:false,_handleOnChange:function(_2f8,_2f9){
this._lastValue=_2f8;
if(this._lastValueReported==undefined&&(_2f9===null||!this._onChangeActive)){
this._resetValue=this._lastValueReported=_2f8;
}
if((this.intermediateChanges||_2f9||_2f9===undefined)&&((_2f8&&_2f8.toString)?_2f8.toString():_2f8)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
this._lastValueReported=_2f8;
if(this._onChangeActive){
this.onChange(_2f8);
}
}
},reset:function(){
this._hasBeenBlurred=false;
if(this.setValue&&!this._getValueDeprecated){
this.setValue(this._resetValue,true);
}else{
if(this._onChangeMonitor){
this.setAttribute(this._onChangeMonitor,(this._resetValue!==undefined&&this._resetValue!==null)?this._resetValue:"");
}
}
},create:function(){
this.inherited(arguments);
this._onChangeActive=true;
this._setStateClass();
},destroy:function(){
if(this._layoutHackHandle){
clearTimeout(this._layoutHackHandle);
}
this.inherited(arguments);
},setValue:function(_2fa){
dojo.deprecated("dijit.form._FormWidget:setValue("+_2fa+") is deprecated.  Use setAttribute('value',"+_2fa+") instead.","","2.0");
this.setAttribute("value",_2fa);
},_getValueDeprecated:true,getValue:function(){
dojo.deprecated("dijit.form._FormWidget:getValue() is deprecated.  Use widget.value instead.","","2.0");
return this.value;
},_layoutHack:function(){
if(dojo.isFF==2){
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(){
this.setValue(this.value,null);
},setValue:function(_2fd,_2fe){
this.value=_2fd;
this._handleOnChange(_2fd,_2fe);
},_getValueDeprecated:false,getValue:function(){
return this._lastValue;
},undo:function(){
this.setValue(this._lastValueReported,false);
},_valueChanged:function(){
var v=this.getValue();
var lv=this._lastValueReported;
return ((v!==null&&(v!==undefined)&&v.toString)?v.toString():"")!==((lv!==null&&(lv!==undefined)&&lv.toString)?lv.toString():"");
},_onKeyPress:function(e){
if(e.keyCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){
if(this._valueChanged()){
this.undo();
dojo.stopEvent(e);
return false;
}
}
return true;
}});
}
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:"<div class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\twaiRole=\"presentation\"\n\t><button class=\"dijitReset dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\n\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t><span class=\"dijitReset dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \n \t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span \n\t\t></span\n\t\t><div class=\"dijitReset dijitInline\"><center class=\"dijitReset dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</center></div\n\t></button\n></div>\n",_onChangeMonitor:"",_onClick:function(e){
if(this.disabled||this.readOnly){
dojo.stopEvent(e);
return false;
}
this._clicked();
return this.onClick(e);
},_onButtonClick:function(e){
if(this._onClick(e)===false){
dojo.stopEvent(e);
}else{
if(this.type=="submit"&&!this.focusNode.form){
for(var node=this.domNode;node.parentNode;node=node.parentNode){
var _305=dijit.byNode(node);
if(_305&&typeof _305._onSubmit=="function"){
_305._onSubmit(e);
break;
}
}
}
}
},postCreate:function(){
if(this.showLabel==false){
var _306="";
this.label=this.containerNode.innerHTML;
_306=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
this.titleNode.title=_306;
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
dojo.setSelectable(this.focusNode,false);
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_309){
this.containerNode.innerHTML=this.label=_309;
this._layoutHack();
if(this.showLabel==false){
this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
}
}});
dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<div class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\twaiRole=\"presentation\"\n\t><div class='dijitReset dijitRight' waiRole=\"presentation\"\n\t><button class=\"dijitReset dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t><div class=\"dijitReset dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t><div class=\"dijitReset dijitInline dijitButtonText\"  dojoAttachPoint=\"containerNode,popupStateNode\" waiRole=\"presentation\"\n\t\t\tid=\"${id}_label\">${label}</div\n\t\t><div class=\"dijitReset dijitInline dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t><div class=\"dijitReset dijitInline dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t></button\n></div></div>\n",_fillContent:function(){
if(this.srcNodeRef){
var _30a=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_30a[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
if(!this.dropDown){
var _30b=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_30b);
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 _30e=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_30e||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.keyCode==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 _312=this.dropDown;
if(!_312){
return;
}
if(!this._opened){
if(_312.href&&!_312.isLoaded){
var self=this;
var _314=dojo.connect(_312,"onLoad",function(){
dojo.disconnect(_314);
self._openDropDown();
});
_312._loadCheck(true);
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _315=this.dropDown;
var _316=_315.domNode.style.width;
var self=this;
dijit.popup.open({parent:this,popup:_315,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(){
_315.domNode.style.width=_316;
self.popupStateNode.removeAttribute("popupActive");
this._opened=false;
}});
if(this.domNode.offsetWidth>_315.domNode.offsetWidth){
var _318=null;
if(!this.isLeftToRight()){
_318=_315.domNode.parentNode;
var _319=_318.offsetLeft+_318.offsetWidth;
}
dojo.marginBox(_315.domNode,{w:this.domNode.offsetWidth});
if(_318){
_318.style.left=_319-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_315.focus){
_315.focus();
}
},_closeDropDown:function(_31a){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_31a){
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\tclass=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\ttabIndex=\"${tabIndex}\"\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 ${iconClass}\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\">${label}</div\n\t\t></td\n\t\t><td class='dijitReset dijitStretch 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._FormWidget.prototype.attributeMap),{id:"",name:""}),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,_onChangeMonitor:"checked",attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){
this.setAttribute("checked",!this.checked);
},setAttribute:function(attr,_323){
this.inherited(arguments);
switch(attr){
case "checked":
dijit.setWaiState(this.focusNode||this.domNode,"pressed",this.checked);
this._setStateClass();
this._handleOnChange(this.checked,true);
}
},setChecked:function(_324){
dojo.deprecated("setChecked("+_324+") is deprecated. Use setAttribute('checked',"+_324+") instead.","","2.0");
this.setAttribute("checked",_324);
},postCreate:function(){
this.inherited(arguments);
this.setAttribute("checked",this.checked);
}});
}
if(!dojo._hasResource["dijit.form.CheckBox"]){
dojo._hasResource["dijit.form.CheckBox"]=true;
dojo.provide("dijit.form.CheckBox");
dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:"<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \ttype=\"${type}\" name=\"${name}\"\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></div>\n",baseClass:"dijitCheckBox",type:"checkbox",value:"on",setValue:function(_325){
if(typeof _325=="string"){
this.setAttribute("value",_325);
_325=true;
}
this.setAttribute("checked",_325);
},_getValueDeprecated:false,getValue:function(){
return (this.checked?this.value:false);
},reset:function(){
this.inherited(arguments);
this.setAttribute("value",this._resetValueAttr);
},postCreate:function(){
this.inherited(arguments);
this._resetValueAttr=this.value;
}});
dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_groups:{},postCreate:function(){
(this._groups[this.name]=this._groups[this.name]||[]).push(this);
this.inherited(arguments);
},uninitialize:function(){
dojo.forEach(this._groups[this.name],function(_326,i,arr){
if(_326===this){
arr.splice(i,1);
return;
}
},this);
},setAttribute:function(attr,_32a){
this.inherited(arguments);
switch(attr){
case "checked":
if(this.checked){
dojo.forEach(this._groups[this.name],function(_32b){
if(_32b!=this&&_32b.checked){
_32b.setAttribute("checked",false);
}
},this);
}
}
},_clicked:function(e){
if(!this.checked){
this.setAttribute("checked",true);
}
}});
}
if(!dojo._hasResource["dijit.form.TextBox"]){
dojo._hasResource["dijit.form.TextBox"]=true;
dojo.provide("dijit.form.TextBox");
dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",templateString:"<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse,onblur:_onMouse,onkeypress:_onKeyPress,onkeyup'\n\tautocomplete=\"off\" type=\"${type}\"\n\t/>\n",baseClass:"dijitTextBox",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormValueWidget.prototype.attributeMap),{maxLength:"focusNode"}),getDisplayedValue:function(){
return this.filter(this.textbox.value);
},getValue:function(){
return this.parse(this.getDisplayedValue(),this.constraints);
},setValue:function(_32d,_32e,_32f){
var _330=this.filter(_32d);
if((((typeof _330==typeof _32d)&&(_32d!==undefined))||(_32d===null))&&(_32f==null||_32f==undefined)){
_32f=this.format(_330,this.constraints);
}
if(_32f!=null&&_32f!=undefined){
this.textbox.value=_32f;
}
dijit.form.TextBox.superclass.setValue.call(this,_330,_32e);
},setDisplayedValue:function(_331,_332){
this.textbox.value=_331;
this.setValue(this.getValue(),_332);
},format:function(_333,_334){
return ((_333==null||_333==undefined)?"":(_333.toString?_333.toString():_333));
},parse:function(_335,_336){
return _335;
},postCreate:function(){
this.textbox.setAttribute("value",this.getDisplayedValue());
this.inherited(arguments);
this._layoutHack();
},filter:function(val){
if(val===null||val===undefined){
return "";
}else{
if(typeof val!="string"){
return val;
}
}
if(this.trim){
val=dojo.trim(val);
}
if(this.uppercase){
val=val.toUpperCase();
}
if(this.lowercase){
val=val.toLowerCase();
}
if(this.propercase){
val=val.replace(/[^\s]+/g,function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
});
}
return val;
},_setBlurValue:function(){
this.setValue(this.getValue(),(this.isValid?this.isValid():true));
},_onBlur:function(){
this._setBlurValue();
this.inherited(arguments);
},onkeyup:function(){
}});
dijit.selectInputText=function(_339,_33a,stop){
var _33c=dojo.global;
var _33d=dojo.doc;
_339=dojo.byId(_339);
if(isNaN(_33a)){
_33a=0;
}
if(isNaN(stop)){
stop=_339.value?_339.value.length:0;
}
_339.focus();
if(_33d["selection"]&&dojo.body()["createTextRange"]){
if(_339.createTextRange){
var _33e=_339.createTextRange();
with(_33e){
collapse(true);
moveStart("character",_33a);
moveEnd("character",stop);
select();
}
}
}else{
if(_33c["getSelection"]){
var _33f=_33c.getSelection();
if(_339.setSelectionRange){
_339.setSelectionRange(_33a,stop);
}
}
}
};
}
if(!dojo._hasResource["dijit.Tooltip"]){
dojo._hasResource["dijit.Tooltip"]=true;
dojo.provide("dijit.Tooltip");
dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:200,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(_340,_341,_342){
if(this.aroundNode&&this.aroundNode===_341){
return;
}
if(this.fadeOut.status()=="playing"){
this._onDeck=arguments;
return;
}
this.containerNode.innerHTML=_340;
this.domNode.style.top=(this.domNode.offsetTop+1)+"px";
var _343={};
var ltr=this.isLeftToRight();
dojo.forEach((_342&&_342.length)?_342:dijit.Tooltip.defaultPosition,function(pos){
switch(pos){
case "after":
_343[ltr?"BR":"BL"]=ltr?"BL":"BR";
break;
case "before":
_343[ltr?"BL":"BR"]=ltr?"BR":"BL";
break;
case "below":
_343[ltr?"BL":"BR"]=ltr?"TL":"TR";
_343[ltr?"BR":"BL"]=ltr?"TR":"TL";
break;
case "above":
default:
_343[ltr?"TL":"TR"]=ltr?"BL":"BR";
_343[ltr?"TR":"TL"]=ltr?"BR":"BL";
break;
}
});
var pos=dijit.placeOnScreenAroundElement(this.domNode,_341,_343,dojo.hitch(this,"orient"));
dojo.style(this.domNode,"opacity",0);
this.fadeIn.play();
this.isShowingNow=true;
this.aroundNode=_341;
},orient:function(node,_348,_349){
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"}[_348+"-"+_349];
},_onShow:function(){
if(dojo.isIE){
this.domNode.style.filter="";
}
},hide:function(_34a){
if(!this.aroundNode||this.aroundNode!==_34a){
return;
}
if(this._onDeck){
this._onDeck=null;
return;
}
this.fadeIn.stop();
this.isShowingNow=false;
this.aroundNode=null;
this.fadeOut.play();
},_onHide:function(){
this.domNode.style.cssText="";
if(this._onDeck){
this.show.apply(this,this._onDeck);
this._onDeck=null;
}
}});
dijit.showTooltip=function(_34b,_34c,_34d){
if(!dijit._masterTT){
dijit._masterTT=new dijit._MasterTooltip();
}
return dijit._masterTT.show(_34b,_34c,_34d);
};
dijit.hideTooltip=function(_34e){
if(!dijit._masterTT){
dijit._masterTT=new dijit._MasterTooltip();
}
return dijit._masterTT.hide(_34e);
};
dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],postCreate:function(){
if(this.srcNodeRef){
this.srcNodeRef.style.display="none";
}
this._connectNodes=[];
dojo.forEach(this.connectId,function(id){
var node=dojo.byId(id);
if(node){
this._connectNodes.push(node);
dojo.forEach(["onMouseOver","onMouseOut","onFocus","onBlur","onHover","onUnHover"],function(_351){
this.connect(node,_351.toLowerCase(),"_"+_351);
},this);
if(dojo.isIE){
node.style.zoom=1;
}
}
},this);
},_onMouseOver:function(e){
this._onHover(e);
},_onMouseOut:function(e){
if(dojo.isDescendant(e.relatedTarget,e.target)){
return;
}
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 _357=e.target;
this._showTimer=setTimeout(dojo.hitch(this,function(){
this.open(_357);
}),this.showDelay);
}
},_onUnHover:function(e){
if(this._focus){
return;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
this.close();
},open:function(_359){
_359=_359||this._connectNodes[0];
if(!_359){
return;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
dijit.showTooltip(this.label||this.domNode.innerHTML,_359,this.position);
this._connectNode=_359;
},close:function(){
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["dijit.form.ValidationTextBox"]){
dojo._hasResource["dijit.form.ValidationTextBox"]=true;
dojo.provide("dijit.form.ValidationTextBox");
dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:"<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' dojoAttachEvent='onfocus:_update,onkeyup:_onkeyup,onblur:_onMouse,onkeypress:_onKeyPress' autocomplete=\"off\"\n\t\t\ttype='${type}' name='${name}'\n\t\t/></div\n\t></div\n></div>\n",baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(_35a){
return this.regExp;
},state:"",tooltipPosition:[],setValue:function(){
this.inherited(arguments);
this.validate(this._focused);
},validator:function(_35b,_35c){
return (new RegExp("^("+this.regExpGen(_35c)+")"+(this.required?"":"?")+"$")).test(_35b)&&(!this.required||!this._isEmpty(_35b))&&(this._isEmpty(_35b)||this.parse(_35b,_35c)!==undefined);
},isValid:function(_35d){
return this.validator(this.textbox.value,this.constraints);
},_isEmpty:function(_35e){
return /^\s*$/.test(_35e);
},getErrorMessage:function(_35f){
return this.invalidMessage;
},getPromptMessage:function(_360){
return this.promptMessage;
},validate:function(_361){
var _362="";
var _363=this.isValid(_361);
var _364=this._isEmpty(this.textbox.value);
this.state=(_363||(!this._hasBeenBlurred&&_364))?"":"Error";
this._setStateClass();
dijit.setWaiState(this.focusNode,"invalid",_363?"false":"true");
if(_361){
if(_364){
_362=this.getPromptMessage(true);
}
if(!_362&&this.state=="Error"){
_362=this.getErrorMessage(true);
}
}
this.displayMessage(_362);
return _363;
},_message:"",displayMessage:function(_365){
if(this._message==_365){
return;
}
this._message=_365;
dijit.hideTooltip(this.domNode);
if(_365){
dijit.showTooltip(_365,this.domNode,this.tooltipPosition);
}
},_refreshState:function(){
this.validate(this._focused);
},_update:function(e){
this._refreshState();
this._onMouse(e);
},_onkeyup:function(e){
this._update(e);
this.onkeyup(e);
},constructor:function(){
this.constraints={};
},postMixInProperties:function(){
this.inherited(arguments);
this.constraints.locale=this.lang;
this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);
if(this.invalidMessage=="$_unset_$"){
this.invalidMessage=this.messages.invalidMessage;
}
var p=this.regExpGen(this.constraints);
this.regExp=p;
}});
dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{serialize:function(val,_36a){
return val.toString?val.toString():"";
},toString:function(){
var val=this.filter(this.getValue());
return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";
},validate:function(){
this.valueNode.value=this.toString();
return this.inherited(arguments);
},setAttribute:function(attr,_36d){
this.inherited(arguments);
switch(attr){
case "disabled":
if(this.valueNode){
this.valueNode.disabled=this.disabled;
}
}
},postCreate:function(){
var _36e=this.textbox;
var _36f=(this.valueNode=dojo.doc.createElement("input"));
_36f.setAttribute("type",_36e.type);
_36f.setAttribute("value",this.toString());
dojo.style(_36f,"display","none");
_36f.name=this.textbox.name;
_36f.disabled=this.textbox.disabled;
this.textbox.name=this.textbox.name+"_displayed_";
this.textbox.removeAttribute("name");
dojo.place(_36f,_36e,"after");
this.inherited(arguments);
}});
dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",compare:function(val1,val2){
return val1-val2;
},rangeCheck:function(_372,_373){
var _374="min" in _373;
var _375="max" in _373;
if(_374||_375){
return (!_374||this.compare(_372,_373.min)>=0)&&(!_375||this.compare(_372,_373.max)<=0);
}
return true;
},isInRange:function(_376){
return this.rangeCheck(this.getValue(),this.constraints);
},isValid:function(_377){
return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_377));
},getErrorMessage:function(_378){
if(dijit.form.RangeBoundTextBox.superclass.isValid.call(this,false)&&!this.isInRange(_378)){
return this.rangeMessage;
}
return this.inherited(arguments);
},postMixInProperties:function(){
this.inherited(arguments);
if(!this.rangeMessage){
this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);
this.rangeMessage=this.messages.rangeMessage;
}
},postCreate:function(){
this.inherited(arguments);
if(this.constraints.min!==undefined){
dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min);
}
if(this.constraints.max!==undefined){
dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max);
}
},setValue:function(_379,_37a){
dijit.setWaiState(this.focusNode,"valuenow",_379);
this.inherited("setValue",arguments);
}});
}
if(!dojo._hasResource["dijit.form.ComboBox"]){
dojo._hasResource["dijit.form.ComboBox"]=true;
dojo.provide("dijit.form.ComboBox");
dojo.declare("dijit.form.ComboBoxMixin",null,{item:null,pageSize:Infinity,store:null,query:{},autoComplete:true,searchDelay:100,searchAttr:"name",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:"<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" dojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input type=\"text\" autocomplete=\"off\" name=\"${name}\" class='dijitReset'\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress, onfocus:_update, compositionend,onkeyup\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n",baseClass:"dijitComboBox",_getCaretPos:function(_37b){
var pos=0;
if(typeof (_37b.selectionStart)=="number"){
pos=_37b.selectionStart;
}else{
if(dojo.isIE){
var tr=dojo.doc.selection.createRange().duplicate();
var ntr=_37b.createTextRange();
tr.move("character",0);
ntr.move("character",0);
try{
ntr.setEndPoint("EndToEnd",tr);
pos=String(ntr.text).replace(/\r/g,"").length;
}
catch(e){
}
}
}
return pos;
},_setCaretPos:function(_37f,_380){
_380=parseInt(_380);
dijit.selectInputText(_37f,_380,_380);
},_setAttribute:function(attr,_382){
if(attr=="disabled"){
dijit.setWaiState(this.comboNode,"disabled",_382);
}
},_onKeyPress:function(evt){
if(evt.altKey||(evt.ctrlKey&&evt.charCode!=118)){
return;
}
var _384=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(evt);
}
switch(evt.keyCode){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_384=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _387;
if(this._isShowingNow&&(_387=pw.getHighlightedOption())){
if(_387==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_387==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}
}
}else{
this.setDisplayedValue(this.getDisplayedValue());
}
evt.preventDefault();
case dk.TAB:
var _388=this.getDisplayedValue();
if(pw&&(_388==pw._messages["previousMessage"]||_388==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.setValue({target:pw.getHighlightedOption()},true);
}
this._hideResultList();
}
break;
case dk.SPACE:
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(this._isShowingNow&&pw.getHighlightedOption()){
dojo.stopEvent(evt);
this._selectOption();
this._hideResultList();
}else{
_384=true;
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
this.inherited(arguments);
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_384=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(dojo.isIE||evt.charCode!=0){
_384=true;
}
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_384){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_autoCompleteText:function(text){
var fn=this.focusNode;
dijit.selectInputText(fn,fn.value.length);
var _38b=this.ignoreCase?"toLowerCase":"substr";
if(text[_38b](0).indexOf(this.focusNode.value[_38b](0))==0){
var cpos=this._getCaretPos(fn);
if((cpos+1)>fn.value.length){
fn.value=text;
dijit.selectInputText(fn,cpos);
}
}else{
fn.value=text;
dijit.selectInputText(fn);
}
},_openResultList:function(_38d,_38e){
if(this.disabled||this.readOnly||(_38e.query[this.searchAttr]!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_38d.length){
this._hideResultList();
return;
}
var _38f=new String(this.store.getValue(_38d[0],this.searchAttr));
if(_38f&&this.autoComplete&&!this._prev_key_backspace&&(_38e.query[this.searchAttr]!="*")){
this._autoCompleteText(_38f);
}
this._popupWidget.createOptions(_38d,_38e,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_38e.direction){
if(1==_38e.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_38e.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_showResultList:function(){
this._hideResultList();
var _390=this._popupWidget.getItems(),_391=Math.min(_390.length,this.maxListLength);
this._arrowPressed();
this.displayMessage("");
with(this._popupWidget.domNode.style){
width="";
height="";
}
var best=this.open();
var _393=dojo.marginBox(this._popupWidget.domNode);
this._popupWidget.domNode.style.overflow=((best.h==_393.h)&&(best.w==_393.w))?"hidden":"auto";
var _394=best.w;
if(best.h<this._popupWidget.domNode.scrollHeight){
_394+=16;
}
dojo.marginBox(this._popupWidget.domNode,{h:best.h,w:Math.max(_394,this.domNode.offsetWidth)});
dijit.setWaiState(this.comboNode,"expanded","true");
},_hideResultList:function(){
if(this._isShowingNow){
dijit.popup.close(this._popupWidget);
this._arrowIdle();
this._isShowingNow=false;
dijit.setWaiState(this.comboNode,"expanded","false");
dijit.removeWaiState(this.focusNode,"activedescendant");
}
},_setBlurValue:function(){
var _395=this.getDisplayedValue();
var pw=this._popupWidget;
if(pw&&(_395==pw._messages["previousMessage"]||_395==pw._messages["nextMessage"])){
this.setValue(this._lastValueReported,true);
}else{
this.setDisplayedValue(_395);
}
},_onBlur:function(){
this._hideResultList();
this._arrowIdle();
this.inherited(arguments);
},_announceOption:function(node){
if(node==null){
return;
}
var _398;
if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){
_398=node.innerHTML;
}else{
_398=this.store.getValue(node.item,this.searchAttr);
}
this.focusNode.value=this.focusNode.value.substring(0,this._getCaretPos(this.focusNode));
dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(node,"id"));
this._autoCompleteText(_398);
},_selectOption:function(evt){
var tgt=null;
if(!evt){
evt={target:this._popupWidget.getHighlightedOption()};
}
if(!evt.target){
this.setDisplayedValue(this.getDisplayedValue());
return;
}else{
tgt=evt.target;
}
if(!evt.noHide){
this._hideResultList();
this._setCaretPos(this.focusNode,this.store.getValue(tgt.item,this.searchAttr).length);
}
this._doSelect(tgt);
},_doSelect:function(tgt){
this.item=tgt.item;
this.setValue(this.store.getValue(tgt.item,this.searchAttr),true);
},_onArrowMouseDown:function(evt){
if(this.disabled||this.readOnly){
return;
}
dojo.stopEvent(evt);
this.focus();
if(this._isShowingNow){
this._hideResultList();
}else{
this._startSearch("");
}
},_startSearchFromInput:function(){
this._startSearch(this.focusNode.value);
},_getQueryString:function(text){
return dojo.string.substitute(this.queryExpr,[text]);
},_startSearch:function(key){
if(!this._popupWidget){
var _39f=this.id+"_popup";
this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_39f});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_39f);
}
this.item=null;
var _3a0=dojo.clone(this.query);
this._lastQuery=_3a0[this.searchAttr]=this._getQueryString(key);
this.searchTimer=setTimeout(dojo.hitch(this,function(_3a1,_3a2){
var _3a3=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_3a1,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_3a4){
console.error("dijit.form.ComboBox: "+_3a4);
dojo.hitch(_3a2,"_hideResultList")();
},start:0,count:this.pageSize});
var _3a5=function(_3a6,_3a7){
_3a6.start+=_3a6.count*_3a7;
_3a6.direction=_3a7;
this.store.fetch(_3a6);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_3a5,_3a3);
},_3a0,this),this.searchDelay);
},_getValueField:function(){
return this.searchAttr;
},_arrowPressed:function(){
if(!this.disabled&&!this.readOnly&&this.hasDownArrow){
dojo.addClass(this.downArrowNode,"dijitArrowButtonActive");
}
},_arrowIdle:function(){
if(!this.disabled&&!this.readOnly&&this.hasDownArrow){
dojo.removeClass(this.downArrowNode,"dojoArrowButtonPushed");
}
},compositionend:function(evt){
this.onkeypress({charCode:-1});
},constructor:function(){
this.query={};
},postMixInProperties:function(){
if(!this.hasDownArrow){
this.baseClass="dijitTextBox";
}
if(!this.store){
var _3a9=this.srcNodeRef;
this.store=new dijit.form._ComboBoxDataStore(_3a9);
if(!this.value||((typeof _3a9.selectedIndex=="number")&&_3a9.selectedIndex.toString()===this.value)){
var item=this.store.fetchSelectedItem();
if(item){
this.value=this.store.getValue(item,this._getValueField());
}
}
}
},_postCreate:function(){
var _3ab=dojo.query("label[for=\""+this.id+"\"]");
if(_3ab.length){
_3ab[0].id=(this.id+"_label");
var cn=this.comboNode;
dijit.setWaiState(cn,"labelledby",_3ab[0].id);
dijit.setWaiState(cn,"disabled",this.disabled);
}
},uninitialize:function(){
if(this._popupWidget){
this._hideResultList();
this._popupWidget.destroy();
}
},_getMenuLabelFromItem:function(item){
return {html:false,label:this.store.getValue(item,this.searchAttr)};
},open:function(){
this._isShowingNow=true;
return dijit.popup.open({popup:this._popupWidget,around:this.domNode,parent:this});
},reset:function(){
this.item=null;
this.inherited(arguments);
}});
dojo.declare("dijit.form._ComboBoxMenu",[dijit._Widget,dijit._Templated],{templateString:"<ul class='dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' tabIndex='-1' style='overflow:\"auto\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></li>"+"</ul>",_messages:null,postMixInProperties:function(){
this._messages=dojo.i18n.getLocalization("dijit.form","ComboBox",this.lang);
this.inherited("postMixInProperties",arguments);
},setValue:function(_3ae){
this.value=_3ae;
this.onChange(_3ae);
},onChange:function(_3af){
},onPage:function(_3b0){
},postCreate:function(){
this.previousButton.innerHTML=this._messages["previousMessage"];
this.nextButton.innerHTML=this._messages["nextMessage"];
this.inherited("postCreate",arguments);
},onClose:function(){
this._blurOptionNode();
},_createOption:function(item,_3b2){
var _3b3=_3b2(item);
var _3b4=dojo.doc.createElement("li");
dijit.setWaiRole(_3b4,"option");
if(_3b3.html){
_3b4.innerHTML=_3b3.label;
}else{
_3b4.appendChild(dojo.doc.createTextNode(_3b3.label));
}
if(_3b4.innerHTML==""){
_3b4.innerHTML="&nbsp;";
}
_3b4.item=item;
return _3b4;
},createOptions:function(_3b5,_3b6,_3b7){
this.previousButton.style.display=(_3b6.start==0)?"none":"";
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_3b5,function(item,i){
var _3ba=this._createOption(item,_3b7);
_3ba.className="dijitMenuItem";
dojo.attr(_3ba,"id",this.id+i);
this.domNode.insertBefore(_3ba,this.nextButton);
},this);
this.nextButton.style.display=(_3b6.count==_3b5.length)?"":"none";
dojo.attr(this.nextButton,"id",this.id+"_next");
},clearResultList:function(){
while(this.domNode.childNodes.length>2){
this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);
}
},getItems:function(){
return this.domNode.childNodes;
},getListLength:function(){
return this.domNode.childNodes.length-2;
},_onMouseDown:function(evt){
dojo.stopEvent(evt);
},_onMouseUp:function(evt){
if(evt.target===this.domNode){
return;
}else{
if(evt.target==this.previousButton){
this.onPage(-1);
}else{
if(evt.target==this.nextButton){
this.onPage(1);
}else{
var tgt=evt.target;
while(!tgt.item){
tgt=tgt.parentNode;
}
this.setValue({target:tgt},true);
}
}
}
},_onMouseOver:function(evt){
if(evt.target===this.domNode){
return;
}
var tgt=evt.target;
if(!(tgt==this.previousButton||tgt==this.nextButton)){
while(!tgt.item){
tgt=tgt.parentNode;
}
}
this._focusOptionNode(tgt);
},_onMouseOut:function(evt){
if(evt.target===this.domNode){
return;
}
this._blurOptionNode();
},_focusOptionNode:function(node){
if(this._highlighted_option!=node){
this._blurOptionNode();
this._highlighted_option=node;
dojo.addClass(this._highlighted_option,"dijitMenuItemHover");
}
},_blurOptionNode:function(){
if(this._highlighted_option){
dojo.removeClass(this._highlighted_option,"dijitMenuItemHover");
this._highlighted_option=null;
}
},_highlightNextOption:function(){
var fc=this.domNode.firstChild;
if(!this.getHighlightedOption()){
this._focusOptionNode(fc.style.display=="none"?fc.nextSibling:fc);
}else{
var ns=this._highlighted_option.nextSibling;
if(ns&&ns.style.display!="none"){
this._focusOptionNode(ns);
}
}
dijit.scrollIntoView(this._highlighted_option);
},highlightFirstOption:function(){
this._focusOptionNode(this.domNode.firstChild.nextSibling);
dijit.scrollIntoView(this._highlighted_option);
},highlightLastOption:function(){
this._focusOptionNode(this.domNode.lastChild.previousSibling);
dijit.scrollIntoView(this._highlighted_option);
},_highlightPrevOption:function(){
var lc=this.domNode.lastChild;
if(!this.getHighlightedOption()){
this._focusOptionNode(lc.style.display=="none"?lc.previousSibling:lc);
}else{
var ps=this._highlighted_option.previousSibling;
if(ps&&ps.style.display!="none"){
this._focusOptionNode(ps);
}
}
dijit.scrollIntoView(this._highlighted_option);
},_page:function(up){
var _3c7=0;
var _3c8=this.domNode.scrollTop;
var _3c9=dojo.style(this.domNode,"height");
if(!this.getHighlightedOption()){
this._highlightNextOption();
}
while(_3c7<_3c9){
if(up){
if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){
break;
}
this._highlightPrevOption();
}else{
if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){
break;
}
this._highlightNextOption();
}
var _3ca=this.domNode.scrollTop;
_3c7+=(_3ca-_3c8)*(up?-1:1);
_3c8=_3ca;
}
},pageUp:function(){
this._page(true);
},pageDown:function(){
this._page(false);
},getHighlightedOption:function(){
var ho=this._highlighted_option;
return (ho&&ho.parentNode)?ho:null;
},handleKey:function(evt){
switch(evt.keyCode){
case dojo.keys.DOWN_ARROW:
this._highlightNextOption();
break;
case dojo.keys.PAGE_DOWN:
this.pageDown();
break;
case dojo.keys.UP_ARROW:
this._highlightPrevOption();
break;
case dojo.keys.PAGE_UP:
this.pageUp();
break;
}
}});
dojo.declare("dijit.form.ComboBox",[dijit.form.ValidationTextBox,dijit.form.ComboBoxMixin],{postMixInProperties:function(){
dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this,arguments);
dijit.form.ValidationTextBox.prototype.postMixInProperties.apply(this,arguments);
},postCreate:function(){
dijit.form.ComboBoxMixin.prototype._postCreate.apply(this,arguments);
dijit.form.ValidationTextBox.prototype.postCreate.apply(this,arguments);
},setAttribute:function(attr,_3ce){
dijit.form.ValidationTextBox.prototype.setAttribute.apply(this,arguments);
dijit.form.ComboBoxMixin.prototype._setAttribute.apply(this,arguments);
}});
dojo.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(root){
this.root=root;
},getValue:function(item,_3d1,_3d2){
return (_3d1=="value")?item.value:(item.innerText||item.textContent||"");
},isItemLoaded:function(_3d3){
return true;
},fetch:function(args){
var _3d5="^"+args.query.name.replace(/([\\\|\(\)\[\{\^\$\+\?\.\<\>])/g,"\\$1").replace("*",".*")+"$",_3d6=new RegExp(_3d5,args.queryOptions.ignoreCase?"i":""),_3d7=dojo.query("> option",this.root).filter(function(_3d8){
return (_3d8.innerText||_3d8.textContent||"").match(_3d6);
});
var _3d9=args.start||0,end=("count" in args&&args.count!=Infinity)?(_3d9+args.count):_3d7.length;
args.onComplete(_3d7.slice(_3d9,end),args);
return args;
},close:function(_3db){
return;
},getLabel:function(item){
return item.innerHTML;
},getIdentity:function(item){
return dojo.attr(item,"value");
},fetchItemByIdentity:function(args){
var item=dojo.query("option[value='"+args.identity+"']",this.root)[0];
args.onItem(item);
},fetchSelectedItem:function(){
var root=this.root,si=root.selectedIndex;
return dojo.query("> option:nth-child("+(si!=-1?si+1:1)+")",root)[0];
}});
}
if(!dojo._hasResource["dijit.form.SimpleTextarea"]){
dojo._hasResource["dijit.form.SimpleTextarea"]=true;
dojo.provide("dijit.form.SimpleTextarea");
dojo.declare("dijit.form.SimpleTextarea",dijit.form._FormValueWidget,{baseClass:"dijitTextArea",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormValueWidget.prototype.attributeMap),{rows:"focusNode",cols:"focusNode"}),rows:"",cols:"",templateString:"<textarea name='${name}' dojoAttachPoint='focusNode,containerNode'>",postMixInProperties:function(){
if(this.srcNodeRef){
this.value=this.srcNodeRef.value;
}
},setValue:function(val){
this.domNode.value=val;
this.inherited(arguments);
},getValue:function(){
return this.domNode.value.replace(/\r/g,"");
}});
}
if(!dojo._hasResource["dojo.regexp"]){
dojo._hasResource["dojo.regexp"]=true;
dojo.provide("dojo.regexp");
dojo.regexp.escapeString=function(str,_3e4){
return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
if(_3e4&&_3e4.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.regexp.buildGroupRE=function(arr,re,_3e8){
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("|"),_3e8);
};
dojo.regexp.group=function(_3eb,_3ec){
return "("+(_3ec?"?:":"")+_3eb+")";
};
}
if(!dojo._hasResource["dojo.cookie"]){
dojo._hasResource["dojo.cookie"]=true;
dojo.provide("dojo.cookie");
dojo.cookie=function(name,_3ee,_3ef){
var c=document.cookie;
if(arguments.length==1){
var _3f1=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));
return _3f1?decodeURIComponent(_3f1[1]):undefined;
}else{
_3ef=_3ef||{};
var exp=_3ef.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_3ef.expires=d;
}
if(exp&&exp.toUTCString){
_3ef.expires=exp.toUTCString();
}
_3ee=encodeURIComponent(_3ee);
var _3f4=name+"="+_3ee;
for(propName in _3ef){
_3f4+="; "+propName;
var _3f5=_3ef[propName];
if(_3f5!==true){
_3f4+="="+_3f5;
}
}
document.cookie=_3f4;
}
};
dojo.cookie.isSupported=function(){
if(!("cookieEnabled" in navigator)){
this("__djCookieTest__","CookiesAllowed");
navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";
if(navigator.cookieEnabled){
this("__djCookieTest__","",{expires:-1});
}
}
return navigator.cookieEnabled;
};
}
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(_3f6,node){
return new dojo.dnd.move.constrainedMoveable(node,_3f6);
},constructor:function(node,_3f9){
if(!_3f9){
_3f9={};
}
this.constraints=_3f9.constraints;
this.within=_3f9.within;
},onFirstMove:function(_3fa){
var c=this.constraintBox=this.constraints.call(this,_3fa);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(this.within){
var mb=dojo.marginBox(_3fa.node);
c.r-=mb.w;
c.b-=mb.h;
}
},onMove:function(_3fd,_3fe){
var c=this.constraintBox,s=_3fd.node.style;
s.left=(_3fe.l<c.l?c.l:c.r<_3fe.l?c.r:_3fe.l)+"px";
s.top=(_3fe.t<c.t?c.t:c.b<_3fe.t?c.b:_3fe.t)+"px";
}});
dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_401,node){
return new dojo.dnd.move.boxConstrainedMoveable(node,_401);
},constructor:function(node,_404){
var box=_404&&_404.box;
this.constraints=function(){
return box;
};
}});
dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_406,node){
return new dojo.dnd.move.parentConstrainedMoveable(node,_406);
},constructor:function(node,_409){
var area=_409&&_409.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,_410){
dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
var _411=function(node,e,_414){
dojo.dnd.Mover.call(this,node,e,_414);
};
dojo.extend(_411,dojo.dnd.Mover.prototype);
dojo.extend(_411,{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(_410){
var mb=dojo.marginBox(this.node);
c.r-=mb.w;
c.b-=mb.h;
}
}});
return _411;
};
dojo.dnd.move.boxConstrainedMover=function(box,_41d){
dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
return dojo.dnd.move.constrainedMover(function(){
return box;
},_41d);
};
dojo.dnd.move.parentConstrainedMover=function(area,_41f){
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,_41f);
};
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.colors"]){
dojo._hasResource["dojo.colors"]=true;
dojo.provide("dojo.colors");
(function(){
var _425=function(m1,m2,h){
if(h<0){
++h;
}
if(h>1){
--h;
}
var h6=6*h;
if(h6<1){
return m1+(m2-m1)*h6;
}
if(2*h<1){
return m2;
}
if(3*h<2){
return m1+(m2-m1)*(2/3-h)*6;
}
return m1;
};
dojo.colorFromRgb=function(_42a,obj){
var m=_42a.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);
if(m){
var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1];
if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){
var r=c[0];
if(r.charAt(r.length-1)=="%"){
var a=dojo.map(c,function(x){
return parseFloat(x)*2.56;
});
if(l==4){
a[3]=c[3];
}
return dojo.colorFromArray(a,obj);
}
return dojo.colorFromArray(c,obj);
}
if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){
var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2,a=[_425(m1,m2,H+1/3)*256,_425(m1,m2,H)*256,_425(m1,m2,H-1/3)*256,1];
if(l==4){
a[3]=c[3];
}
return dojo.colorFromArray(a,obj);
}
}
return null;
};
var _438=function(c,low,high){
c=Number(c);
return isNaN(c)?high:c<low?low:c>high?high:c;
};
dojo.Color.prototype.sanitize=function(){
var t=this;
t.r=Math.round(_438(t.r,0,255));
t.g=Math.round(_438(t.g,0,255));
t.b=Math.round(_438(t.b,0,255));
t.a=_438(t.a,0,1);
return this;
};
})();
dojo.colors.makeGrey=function(g,a){
return dojo.colorFromArray([g,g,g,a]);
};
dojo.Color.named=dojo.mixin({aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]},dojo.Color.named);
}
if(!dojo._hasResource["dojox.color._base"]){
dojo._hasResource["dojox.color._base"]=true;
dojo.provide("dojox.color._base");
dojox.color.Color=dojo.Color;
dojox.color.blend=dojo.blendColors;
dojox.color.fromRgb=dojo.colorFromRgb;
dojox.color.fromHex=dojo.colorFromHex;
dojox.color.fromArray=dojo.colorFromArray;
dojox.color.fromString=dojo.colorFromString;
dojox.color.greyscale=dojo.colors.makeGrey;
dojo.mixin(dojox.color,{fromCmy:function(cyan,_440,_441){
if(dojo.isArray(cyan)){
_440=cyan[1],_441=cyan[2],cyan=cyan[0];
}else{
if(dojo.isObject(cyan)){
_440=cyan.m,_441=cyan.y,cyan=cyan.c;
}
}
cyan/=100,_440/=100,_441/=100;
var r=1-cyan,g=1-_440,b=1-_441;
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromCmyk:function(cyan,_446,_447,_448){
if(dojo.isArray(cyan)){
_446=cyan[1],_447=cyan[2],_448=cyan[3],cyan=cyan[0];
}else{
if(dojo.isObject(cyan)){
_446=cyan.m,_447=cyan.y,_448=cyan.b,cyan=cyan.c;
}
}
cyan/=100,_446/=100,_447/=100,_448/=100;
var r,g,b;
r=1-Math.min(1,cyan*(1-_448)+_448);
g=1-Math.min(1,_446*(1-_448)+_448);
b=1-Math.min(1,_447*(1-_448)+_448);
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromHsl:function(hue,_44d,_44e){
if(dojo.isArray(hue)){
_44d=hue[1],_44e=hue[2],hue=hue[0];
}else{
if(dojo.isObject(hue)){
_44d=hue.s,_44e=hue.l,hue=hue.h;
}
}
_44d/=100;
_44e/=100;
while(hue<0){
hue+=360;
}
while(hue>=360){
hue-=360;
}
var r,g,b;
if(hue<120){
r=(120-hue)/60,g=hue/60,b=0;
}else{
if(hue<240){
r=0,g=(240-hue)/60,b=(hue-120)/60;
}else{
r=(hue-240)/60,g=0,b=(360-hue)/60;
}
}
r=2*_44d*Math.min(r,1)+(1-_44d);
g=2*_44d*Math.min(g,1)+(1-_44d);
b=2*_44d*Math.min(b,1)+(1-_44d);
if(_44e<0.5){
r*=_44e,g*=_44e,b*=_44e;
}else{
r=(1-_44e)*r+2*_44e-1;
g=(1-_44e)*g+2*_44e-1;
b=(1-_44e)*b+2*_44e-1;
}
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromHsv:function(hue,_453,_454){
if(dojo.isArray(hue)){
_453=hue[1],_454=hue[2],hue=hue[0];
}else{
if(dojo.isObject(hue)){
_453=hue.s,_454=hue.v,hue=hue.h;
}
}
if(hue==360){
hue=0;
}
_453/=100;
_454/=100;
var r,g,b;
if(_453==0){
r=_454,b=_454,g=_454;
}else{
var _458=hue/60,i=Math.floor(_458),f=_458-i;
var p=_454*(1-_453);
var q=_454*(1-(_453*f));
var t=_454*(1-(_453*(1-f)));
switch(i){
case 0:
r=_454,g=t,b=p;
break;
case 1:
r=q,g=_454,b=p;
break;
case 2:
r=p,g=_454,b=t;
break;
case 3:
r=p,g=q,b=_454;
break;
case 4:
r=t,g=p,b=_454;
break;
case 5:
r=_454,g=p,b=q;
break;
}
}
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
}});
dojo.extend(dojox.color.Color,{toCmy:function(){
var cyan=1-(this.r/255),_45f=1-(this.g/255),_460=1-(this.b/255);
return {c:Math.round(cyan*100),m:Math.round(_45f*100),y:Math.round(_460*100)};
},toCmyk:function(){
var cyan,_462,_463,_464;
var r=this.r/255,g=this.g/255,b=this.b/255;
_464=Math.min(1-r,1-g,1-b);
cyan=(1-r-_464)/(1-_464);
_462=(1-g-_464)/(1-_464);
_463=(1-b-_464)/(1-_464);
return {c:Math.round(cyan*100),m:Math.round(_462*100),y:Math.round(_463*100),b:Math.round(_464*100)};
},toHsl:function(){
var r=this.r/255,g=this.g/255,b=this.b/255;
var min=Math.min(r,b,g),max=Math.max(r,g,b);
var _46d=max-min;
var h=0,s=0,l=(min+max)/2;
if(l>0&&l<1){
s=_46d/((l<0.5)?(2*l):(2-2*l));
}
if(_46d>0){
if(max==r&&max!=g){
h+=(g-b)/_46d;
}
if(max==g&&max!=b){
h+=(2+(b-r)/_46d);
}
if(max==b&&max!=r){
h+=(4+(r-g)/_46d);
}
h*=60;
}
return {h:h,s:Math.round(s*100),l:Math.round(l*100)};
},toHsv:function(){
var r=this.r/255,g=this.g/255,b=this.b/255;
var min=Math.min(r,b,g),max=Math.max(r,g,b);
var _476=max-min;
var h=null,s=(max==0)?0:(_476/max);
if(s==0){
h=0;
}else{
if(r==max){
h=60*(g-b)/_476;
}else{
if(g==max){
h=120+60*(b-r)/_476;
}else{
h=240+60*(r-g)/_476;
}
}
if(h<0){
h+=360;
}
}
return {h:h,s:Math.round(s*100),v:Math.round(max*100)};
}});
}
if(!dojo._hasResource["dojox.color"]){
dojo._hasResource["dojox.color"]=true;
dojo.provide("dojox.color");
}
if(!dojo._hasResource["dojox.fx.easing"]){
dojo._hasResource["dojox.fx.easing"]=true;
dojo.provide("dojox.fx.easing");
dojox.fx.easing={linear:function(n){
return n;
},quadIn:function(n){
return Math.pow(n,2);
},quadOut:function(n){
return n*(n-2)*-1;
},quadInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,2)/2;
}
return -1*((--n)*(n-2)-1)/2;
},cubicIn:function(n){
return Math.pow(n,3);
},cubicOut:function(n){
return Math.pow(n-1,3)+1;
},cubicInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,3)/2;
}
n-=2;
return (Math.pow(n,3)+2)/2;
},quartIn:function(n){
return Math.pow(n,4);
},quartOut:function(n){
return -1*(Math.pow(n-1,4)-1);
},quartInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,4)/2;
}
n-=2;
return -1/2*(Math.pow(n,4)-2);
},quintIn:function(n){
return Math.pow(n,5);
},quintOut:function(n){
return Math.pow(n-1,5)+1;
},quintInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,5)/2;
}
n-=2;
return (Math.pow(n,5)+2)/2;
},sineIn:function(n){
return -1*Math.cos(n*(Math.PI/2))+1;
},sineOut:function(n){
return Math.sin(n*(Math.PI/2));
},sineInOut:function(n){
return -1*(Math.cos(Math.PI*n)-1)/2;
},expoIn:function(n){
return (n==0)?0:Math.pow(2,10*(n-1));
},expoOut:function(n){
return (n==1)?1:(-1*Math.pow(2,-10*n)+1);
},expoInOut:function(n){
if(n==0){
return 0;
}
if(n==1){
return 1;
}
n=n*2;
if(n<1){
return Math.pow(2,10*(n-1))/2;
}
--n;
return (-1*Math.pow(2,-10*n)+2)/2;
},circIn:function(n){
return -1*(Math.sqrt(1-Math.pow(n,2))-1);
},circOut:function(n){
n=n-1;
return Math.sqrt(1-Math.pow(n,2));
},circInOut:function(n){
n=n*2;
if(n<1){
return -1/2*(Math.sqrt(1-Math.pow(n,2))-1);
}
n-=2;
return 1/2*(Math.sqrt(1-Math.pow(n,2))+1);
},backIn:function(n){
var s=1.70158;
return Math.pow(n,2)*((s+1)*n-s);
},backOut:function(n){
n=n-1;
var s=1.70158;
return Math.pow(n,2)*((s+1)*n+s)+1;
},backInOut:function(n){
var s=1.70158*1.525;
n=n*2;
if(n<1){
return (Math.pow(n,2)*((s+1)*n-s))/2;
}
n-=2;
return (Math.pow(n,2)*((s+1)*n+s)+2)/2;
},elasticIn:function(n){
if(n==0){
return 0;
}
if(n==1){
return 1;
}
var p=0.3;
var s=p/4;
n=n-1;
return -1*Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p);
},elasticOut:function(n){
if(n==0){
return 0;
}
if(n==1){
return 1;
}
var p=0.3;
var s=p/4;
return Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p)+1;
},elasticInOut:function(n){
if(n==0){
return 0;
}
n=n*2;
if(n==2){
return 1;
}
var p=0.3*1.5;
var s=p/4;
if(n<1){
n-=1;
return -0.5*(Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p));
}
n-=1;
return 0.5*(Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p))+1;
},bounceIn:function(n){
return (1-dojox.fx.easing.bounceOut(1-n));
},bounceOut:function(n){
var s=7.5625;
var p=2.75;
var l;
if(n<(1/p)){
l=s*Math.pow(n,2);
}else{
if(n<(2/p)){
n-=(1.5/p);
l=s*Math.pow(n,2)+0.75;
}else{
if(n<(2.5/p)){
n-=(2.25/p);
l=s*Math.pow(n,2)+0.9375;
}else{
n-=(2.625/p);
l=s*Math.pow(n,2)+0.984375;
}
}
}
return l;
},bounceInOut:function(n){
if(n<0.5){
return dojox.fx.easing.bounceIn(n*2)/2;
}
return (dojox.fx.easing.bounceOut(n*2-1)/2)+0.5;
}};
}
if(!dojo._hasResource["dojox.json.ref"]){
dojo._hasResource["dojox.json.ref"]=true;
dojo.provide("dojox.json.ref");
dojox.json.ref={resolveJson:function(root,args){
args=args||{};
var _4a6=args.idAttribute||"id";
var _4a7=args.idPrefix||"/";
var _4a8=args.assignAbsoluteIds;
var _4a9=args.index||{};
var ref,_4ab=[];
var _4ac=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/;
var _4ad=this._addProp;
function walk(it,stop,_4b0,_4b1){
var _4b2,val,id=it[_4a6]||_4b0;
if(id!==undefined){
id=(_4a7+id).replace(_4ac,"$2$3");
}
var _4b5=_4b1||it;
if(id!==undefined){
if(_4a8){
it.__id=id;
}
if(_4a9[id]&&((it instanceof Array)==(_4a9[id] instanceof Array))){
_4b5=_4a9[id];
delete _4b5.$ref;
_4b2=true;
}else{
var _4b6=args.schemas&&(!(it instanceof Array))&&(val=id.match(/^(.+\/)[^\.\[]*$/))&&(val=args.schemas[val[1]])&&val.prototype;
if(_4b6){
var F=function(){
};
F.prototype=_4b6;
_4b5=new F();
}
}
_4a9[id]=_4b5;
}
for(var i in it){
if(it.hasOwnProperty(i)){
if((typeof (val=it[i])=="object")&&val){
ref=val.$ref;
if(ref){
var _4b9=ref.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
if(/[\w\[\]\.\$# \/\r\n\t]/.test(_4b9)&&!/\=|((^|\W)new\W)/.test(_4b9)){
delete it[i];
var path=ref.match(/(^([^\[]*\/)?[^\.\[]*)([\.\[].*)?/);
if((ref=(path[1]=="$"||path[1]=="this"||path[1]=="#")?root:_4a9[(_4a7+path[1]).replace(_4ac,"$2$3")])){
try{
ref=path[3]?eval("ref"+path[3].replace(/^#/,"").replace(/^([^\[\.])/,".$1").replace(/\.([\w$_]+)/g,"[\"$1\"]")):ref;
}
catch(e){
ref=null;
}
}
if(ref){
val=ref;
}else{
if(!stop){
var _4bb;
if(!_4bb){
_4ab.push(_4b5);
}
_4bb=true;
}else{
val=walk(val,false,val.$ref);
val._loadObject=args.loader;
}
}
}
}else{
if(!stop){
val=walk(val,_4ab==it,id&&_4ad(id,i),_4b5!=it&&typeof _4b5[i]=="object"&&_4b5[i]);
}
}
}
it[i]=val;
if(_4b5!=it){
var old=_4b5[i];
_4b5[i]=val;
if(_4b2&&val!==old){
if(_4a9.onUpdate){
_4a9.onUpdate(_4b5,i,old,val);
}
}
}
}
}
if(_4b2){
for(i in _4b5){
if(!it.hasOwnProperty(i)&&i!="__id"&&i!="__clientId"&&!(_4b5 instanceof Array&&isNaN(i))){
if(_4a9.onUpdate){
_4a9.onUpdate(_4b5,i,_4b5[i],undefined);
}
delete _4b5[i];
while(_4b5 instanceof Array&&_4b5.length&&_4b5[_4b5.length-1]===undefined){
_4b5.length--;
}
}
}
}else{
if(_4a9.onLoad){
_4a9.onLoad(_4b5);
}
}
return _4b5;
};
if(root&&typeof root=="object"){
root=walk(root,false,args.defaultId);
walk(_4ab,false);
}
return root;
},fromJson:function(str,args){
function ref(_4bf){
return {$ref:_4bf};
};
var root=eval("("+str+")");
if(root){
return this.resolveJson(root,args);
}
return root;
},toJson:function(it,_4c2,_4c3,_4c4){
var _4c5=this._useRefs;
var _4c6=this._addProp;
_4c3=_4c3||"";
var _4c7=_4c4||{};
function serialize(it,path,_4ca){
if(typeof it=="object"&&it){
var _4cb;
if(it instanceof Date){
return "\""+dojo.date.stamp.toISOString(it,{zulu:true})+"\"";
}
var id=it.__id;
if(id){
if(path!="#"&&(_4c5||_4c7[id])){
var ref=id;
if(id.charAt(0)!="#"){
if(id.substring(0,_4c3.length)==_4c3){
ref=id.substring(_4c3.length);
}else{
ref=id;
}
}
return serialize({$ref:ref},"#");
}
path=id;
}else{
it.__id=path;
_4c7[path]=it;
}
_4ca=_4ca||"";
var _4ce=_4c2?_4ca+dojo.toJsonIndentStr:"";
var _4cf=_4c2?"\n":"";
var sep=_4c2?" ":"";
if(it instanceof Array){
var res=dojo.map(it,function(obj,i){
var val=serialize(obj,_4c6(path,i),_4ce);
if(typeof val!="string"){
val="undefined";
}
return _4cf+_4ce+val;
});
return "["+res.join(","+sep)+_4cf+_4ca+"]";
}
var _4d5=[];
for(var i in it){
if(it.hasOwnProperty(i)){
var _4d7;
if(typeof i=="number"){
_4d7="\""+i+"\"";
}else{
if(typeof i=="string"&&i.charAt(0)!="_"){
_4d7=dojo._escapeString(i);
}else{
continue;
}
}
var val=serialize(it[i],_4c6(path,i),_4ce);
if(typeof val!="string"){
continue;
}
_4d5.push(_4cf+_4ce+_4d7+":"+sep+val);
}
}
return "{"+_4d5.join(","+sep)+_4cf+_4ca+"}";
}else{
if(typeof it=="function"&&dojox.json.ref.serializeFunctions){
return it.toString();
}
}
return dojo.toJson(it);
};
var json=serialize(it,"#","");
if(!_4c4){
for(i in _4c7){
delete _4c7[i].__id;
}
}
return json;
},_addProp:function(id,prop){
return id+(id.match(/#/)?"":"#")+(typeof prop=="string"?prop.match(/^[a-zA-Z]\w*$/)?("."+prop):("["+dojo._escapeString(prop).replace(/"/g,"'")+"]"):("["+prop+"]"));
},_useRefs:false,serializeFunctions:false};
}
if(!dojo._hasResource["dojox.jsonPath.query"]){
dojo._hasResource["dojox.jsonPath.query"]=true;
dojo.provide("dojox.jsonPath.query");
dojox.jsonPath.query=function(obj,expr,arg){
var re=dojox.jsonPath._regularExpressions;
if(!arg){
arg={};
}
var strs=[];
function _str(i){
return strs[i];
};
var acc;
if(arg.resultType=="PATH"&&arg.evalType=="RESULT"){
throw Error("RESULT based evaluation not supported with PATH based results");
}
var P={resultType:arg.resultType||"VALUE",normalize:function(expr){
var subx=[];
expr=expr.replace(/'([^']|'')*'/g,function(t){
return "_str("+(strs.push(eval(t))-1)+")";
});
var ll=-1;
while(ll!=subx.length){
ll=subx.length;
expr=expr.replace(/(\??\([^\(\)]*\))/g,function($0){
return "#"+(subx.push($0)-1);
});
}
expr=expr.replace(/[\['](#[0-9]+)[\]']/g,"[$1]").replace(/'?\.'?|\['?/g,";").replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"");
ll=-1;
while(ll!=expr){
ll=expr;
expr=expr.replace(/#([0-9]+)/g,function($0,$1){
return subx[$1];
});
}
return expr.split(";");
},asPaths:function(_4eb){
for(var j=0;j<_4eb.length;j++){
var p="$";
var x=_4eb[j];
for(var i=1,n=x.length;i<n;i++){
p+=/^[0-9*]+$/.test(x[i])?("["+x[i]+"]"):("['"+x[i]+"']");
}
_4eb[j]=p;
}
return _4eb;
},exec:function(locs,val,rb){
var path=["$"];
var _4f5=rb?val:[val];
var _4f6=[path];
function add(v,p,def){
if(v&&v.hasOwnProperty(p)&&P.resultType!="VALUE"){
_4f6.push(path.concat([p]));
}
if(def){
_4f5=v[p];
}else{
if(v&&v.hasOwnProperty(p)){
_4f5.push(v[p]);
}
}
};
function desc(v){
_4f5.push(v);
_4f6.push(path);
P.walk(v,function(i){
if(typeof v[i]==="object"){
var _4fc=path;
path=path.concat(i);
desc(v[i]);
path=_4fc;
}
});
};
function slice(loc,val){
if(val instanceof Array){
var len=val.length,_500=0,end=len,step=1;
loc.replace(/^(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)$/g,function($0,$1,$2,$3){
_500=parseInt($1||_500);
end=parseInt($2||end);
step=parseInt($3||step);
});
_500=(_500<0)?Math.max(0,_500+len):Math.min(len,_500);
end=(end<0)?Math.max(0,end+len):Math.min(len,end);
for(var i=_500;i<end;i+=step){
add(val,i);
}
}
};
function repStr(str){
var i=loc.match(/^_str\(([0-9]+)\)$/);
return i?strs[i[1]]:str;
};
function oper(val){
if(/^\(.*?\)$/.test(loc)){
add(val,P.eval(loc,val),rb);
}else{
if(loc==="*"){
P.walk(val,rb&&val instanceof Array?function(i){
P.walk(val[i],function(j){
add(val[i],j);
});
}:function(i){
add(val,i);
});
}else{
if(loc===".."){
desc(val);
}else{
if(/,/.test(loc)){
for(var s=loc.split(/'?,'?/),i=0,n=s.length;i<n;i++){
add(val,repStr(s[i]));
}
}else{
if(/^\?\(.*?\)$/.test(loc)){
P.walk(val,function(i){
if(P.eval(loc.replace(/^\?\((.*?)\)$/,"$1"),val[i])){
add(val,i);
}
});
}else{
if(/^(-?[0-9]*):(-?[0-9]*):?([0-9]*)$/.test(loc)){
slice(loc,val);
}else{
loc=repStr(loc);
if(rb&&val instanceof Array&&!/^[0-9*]+$/.test(loc)){
P.walk(val,function(i){
add(val[i],loc);
});
}else{
add(val,loc,rb);
}
}
}
}
}
}
}
};
while(locs.length){
var loc=locs.shift();
if((val=_4f5)===null||val===undefined){
return val;
}
_4f5=[];
var _514=_4f6;
_4f6=[];
if(rb){
oper(val);
}else{
P.walk(val,function(i){
path=_514[i]||path;
oper(val[i]);
});
}
}
if(P.resultType=="BOTH"){
_4f6=P.asPaths(_4f6);
var _516=[];
for(var i=0;i<_4f6.length;i++){
_516.push({path:_4f6[i],value:_4f5[i]});
}
return _516;
}
return P.resultType=="PATH"?P.asPaths(_4f6):_4f5;
},walk:function(val,f){
if(val instanceof Array){
for(var i=0,n=val.length;i<n;i++){
if(i in val){
f(i);
}
}
}else{
if(typeof val==="object"){
for(var m in val){
if(val.hasOwnProperty(m)){
f(m);
}
}
}
}
},eval:function(x,_v){
try{
return $&&_v&&eval(x.replace(/@/g,"_v"));
}
catch(e){
throw new SyntaxError("jsonPath: "+e.message+": "+x.replace(/@/g,"_v").replace(/\^/g,"_a"));
}
}};
var $=obj;
if(expr&&obj){
return P.exec(P.normalize(expr).slice(1),obj,arg.evalType=="RESULT");
}
return false;
};
}
if(!dojo._hasResource["dojo.number"]){
dojo._hasResource["dojo.number"]=true;
dojo.provide("dojo.number");
dojo.number.format=function(_520,_521){
_521=dojo.mixin({},_521||{});
var _522=dojo.i18n.normalizeLocale(_521.locale);
var _523=dojo.i18n.getLocalization("dojo.cldr","number",_522);
_521.customs=_523;
var _524=_521.pattern||_523[(_521.type||"decimal")+"Format"];
if(isNaN(_520)){
return null;
}
return dojo.number._applyPattern(_520,_524,_521);
};
dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;
dojo.number._applyPattern=function(_525,_526,_527){
_527=_527||{};
var _528=_527.customs.group;
var _529=_527.customs.decimal;
var _52a=_526.split(";");
var _52b=_52a[0];
_526=_52a[(_525<0)?1:0]||("-"+_52b);
if(_526.indexOf("%")!=-1){
_525*=100;
}else{
if(_526.indexOf("‰")!=-1){
_525*=1000;
}else{
if(_526.indexOf("¤")!=-1){
_528=_527.customs.currencyGroup||_528;
_529=_527.customs.currencyDecimal||_529;
_526=_526.replace(/\u00a4{1,3}/,function(_52c){
var prop=["symbol","currency","displayName"][_52c.length-1];
return _527[prop]||_527.currency||"";
});
}else{
if(_526.indexOf("E")!=-1){
throw new Error("exponential notation not supported");
}
}
}
}
var _52e=dojo.number._numberPatternRE;
var _52f=_52b.match(_52e);
if(!_52f){
throw new Error("unable to find a number expression in pattern: "+_526);
}
return _526.replace(_52e,dojo.number._formatAbsolute(_525,_52f[0],{decimal:_529,group:_528,places:_527.places}));
};
dojo.number.round=function(_530,_531,_532){
var _533=String(_530).split(".");
var _534=(_533[1]&&_533[1].length)||0;
if(_534>_531){
var _535=Math.pow(10,_531);
if(_532>0){
_535*=10/_532;
_531++;
}
_530=Math.round(_530*_535)/_535;
_533=String(_530).split(".");
_534=(_533[1]&&_533[1].length)||0;
if(_534>_531){
_533[1]=_533[1].substr(0,_531);
_530=Number(_533.join("."));
}
}
return _530;
};
dojo.number._formatAbsolute=function(_536,_537,_538){
_538=_538||{};
if(_538.places===true){
_538.places=0;
}
if(_538.places===Infinity){
_538.places=6;
}
var _539=_537.split(".");
var _53a=(_538.places>=0)?_538.places:(_539[1]&&_539[1].length)||0;
if(!(_538.round<0)){
_536=dojo.number.round(_536,_53a,_538.round);
}
var _53b=String(Math.abs(_536)).split(".");
var _53c=_53b[1]||"";
if(_538.places){
_53b[1]=dojo.string.pad(_53c.substr(0,_538.places),_538.places,"0",true);
}else{
if(_539[1]&&_538.places!==0){
var pad=_539[1].lastIndexOf("0")+1;
if(pad>_53c.length){
_53b[1]=dojo.string.pad(_53c,pad,"0",true);
}
var _53e=_539[1].length;
if(_53e<_53c.length){
_53b[1]=_53c.substr(0,_53e);
}
}else{
if(_53b[1]){
_53b.pop();
}
}
}
var _53f=_539[0].replace(",","");
pad=_53f.indexOf("0");
if(pad!=-1){
pad=_53f.length-pad;
if(pad>_53b[0].length){
_53b[0]=dojo.string.pad(_53b[0],pad);
}
if(_53f.indexOf("#")==-1){
_53b[0]=_53b[0].substr(_53b[0].length-pad);
}
}
var _540=_539[0].lastIndexOf(",");
var _541,_542;
if(_540!=-1){
_541=_539[0].length-_540-1;
var _543=_539[0].substr(0,_540);
_540=_543.lastIndexOf(",");
if(_540!=-1){
_542=_543.length-_540-1;
}
}
var _544=[];
for(var _545=_53b[0];_545;){
var off=_545.length-_541;
_544.push((off>0)?_545.substr(off):_545);
_545=(off>0)?_545.slice(0,off):"";
if(_542){
_541=_542;
delete _542;
}
}
_53b[0]=_544.reverse().join(_538.group||",");
return _53b.join(_538.decimal||".");
};
dojo.number.regexp=function(_547){
return dojo.number._parseInfo(_547).regexp;
};
dojo.number._parseInfo=function(_548){
_548=_548||{};
var _549=dojo.i18n.normalizeLocale(_548.locale);
var _54a=dojo.i18n.getLocalization("dojo.cldr","number",_549);
var _54b=_548.pattern||_54a[(_548.type||"decimal")+"Format"];
var _54c=_54a.group;
var _54d=_54a.decimal;
var _54e=1;
if(_54b.indexOf("%")!=-1){
_54e/=100;
}else{
if(_54b.indexOf("‰")!=-1){
_54e/=1000;
}else{
var _54f=_54b.indexOf("¤")!=-1;
if(_54f){
_54c=_54a.currencyGroup||_54c;
_54d=_54a.currencyDecimal||_54d;
}
}
}
var _550=_54b.split(";");
if(_550.length==1){
_550.push("-"+_550[0]);
}
var re=dojo.regexp.buildGroupRE(_550,function(_552){
_552="(?:"+dojo.regexp.escapeString(_552,".")+")";
return _552.replace(dojo.number._numberPatternRE,function(_553){
var _554={signed:false,separator:_548.strict?_54c:[_54c,""],fractional:_548.fractional,decimal:_54d,exponent:false};
var _555=_553.split(".");
var _556=_548.places;
if(_555.length==1||_556===0){
_554.fractional=false;
}else{
if(_556===undefined){
_556=_555[1].lastIndexOf("0")+1;
}
if(_556&&_548.fractional==undefined){
_554.fractional=true;
}
if(!_548.places&&(_556<_555[1].length)){
_556+=","+_555[1].length;
}
_554.places=_556;
}
var _557=_555[0].split(",");
if(_557.length>1){
_554.groupSize=_557.pop().length;
if(_557.length>1){
_554.groupSize2=_557.pop().length;
}
}
return "("+dojo.number._realNumberRegexp(_554)+")";
});
},true);
if(_54f){
re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_558,_559,_55a,_55b){
var prop=["symbol","currency","displayName"][_55a.length-1];
var _55d=dojo.regexp.escapeString(_548[prop]||_548.currency||"");
_559=_559?"\\s":"";
_55b=_55b?"\\s":"";
if(!_548.strict){
if(_559){
_559+="*";
}
if(_55b){
_55b+="*";
}
return "(?:"+_559+_55d+_55b+")?";
}
return _559+_55d+_55b;
});
}
return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_54c,decimal:_54d,factor:_54e};
};
dojo.number.parse=function(_55e,_55f){
var info=dojo.number._parseInfo(_55f);
var _561=(new RegExp("^"+info.regexp+"$")).exec(_55e);
if(!_561){
return NaN;
}
var _562=_561[1];
if(!_561[1]){
if(!_561[2]){
return NaN;
}
_562=_561[2];
info.factor*=-1;
}
_562=_562.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");
return Number(_562)*info.factor;
};
dojo.number._realNumberRegexp=function(_563){
_563=_563||{};
if(!("places" in _563)){
_563.places=Infinity;
}
if(typeof _563.decimal!="string"){
_563.decimal=".";
}
if(!("fractional" in _563)||/^0/.test(_563.places)){
_563.fractional=[true,false];
}
if(!("exponent" in _563)){
_563.exponent=[true,false];
}
if(!("eSigned" in _563)){
_563.eSigned=[true,false];
}
var _564=dojo.number._integerRegexp(_563);
var _565=dojo.regexp.buildGroupRE(_563.fractional,function(q){
var re="";
if(q&&(_563.places!==0)){
re="\\"+_563.decimal;
if(_563.places==Infinity){
re="(?:"+re+"\\d+)?";
}else{
re+="\\d{"+_563.places+"}";
}
}
return re;
},true);
var _568=dojo.regexp.buildGroupRE(_563.exponent,function(q){
if(q){
return "([eE]"+dojo.number._integerRegexp({signed:_563.eSigned})+")";
}
return "";
});
var _56a=_564+_565;
if(_565){
_56a="(?:(?:"+_56a+")|(?:"+_565+"))";
}
return _56a+_568;
};
dojo.number._integerRegexp=function(_56b){
_56b=_56b||{};
if(!("signed" in _56b)){
_56b.signed=[true,false];
}
if(!("separator" in _56b)){
_56b.separator="";
}else{
if(!("groupSize" in _56b)){
_56b.groupSize=3;
}
}
var _56c=dojo.regexp.buildGroupRE(_56b.signed,function(q){
return q?"[-+]":"";
},true);
var _56e=dojo.regexp.buildGroupRE(_56b.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=_56b.groupSize,grp2=_56b.groupSize2;
if(grp2){
var _572="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";
return ((grp-grp2)>0)?"(?:"+_572+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_572;
}
return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";
},true);
return _56c+_56e;
};
}
if(!dojo._hasResource["dojox.validate.regexp"]){
dojo._hasResource["dojox.validate.regexp"]=true;
dojo.provide("dojox.validate.regexp");
dojox.regexp={ca:{},us:{}};
dojox.regexp.tld=function(_573){
_573=(typeof _573=="object")?_573:{};
if(typeof _573.allowCC!="boolean"){
_573.allowCC=true;
}
if(typeof _573.allowInfra!="boolean"){
_573.allowInfra=true;
}
if(typeof _573.allowGeneric!="boolean"){
_573.allowGeneric=true;
}
var _574="arpa";
var _575="aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post";
var ccRE="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|"+"bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|"+"ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|"+"gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|"+"la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|"+"my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|"+"re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|"+"tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw";
var a=[];
if(_573.allowInfra){
a.push(_574);
}
if(_573.allowGeneric){
a.push(_575);
}
if(_573.allowCC){
a.push(ccRE);
}
var _578="";
if(a.length>0){
_578="("+a.join("|")+")";
}
return _578;
};
dojox.regexp.ipAddress=function(_579){
_579=(typeof _579=="object")?_579:{};
if(typeof _579.allowDottedDecimal!="boolean"){
_579.allowDottedDecimal=true;
}
if(typeof _579.allowDottedHex!="boolean"){
_579.allowDottedHex=true;
}
if(typeof _579.allowDottedOctal!="boolean"){
_579.allowDottedOctal=true;
}
if(typeof _579.allowDecimal!="boolean"){
_579.allowDecimal=true;
}
if(typeof _579.allowHex!="boolean"){
_579.allowHex=true;
}
if(typeof _579.allowIPv6!="boolean"){
_579.allowIPv6=true;
}
if(typeof _579.allowHybrid!="boolean"){
_579.allowHybrid=true;
}
var _57a="((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
var _57b="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
var _57c="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
var _57d="(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|"+"4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";
var _57e="0[xX]0*[\\da-fA-F]{1,8}";
var _57f="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
var _580="([\\da-fA-F]{1,4}\\:){6}"+"((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
var a=[];
if(_579.allowDottedDecimal){
a.push(_57a);
}
if(_579.allowDottedHex){
a.push(_57b);
}
if(_579.allowDottedOctal){
a.push(_57c);
}
if(_579.allowDecimal){
a.push(_57d);
}
if(_579.allowHex){
a.push(_57e);
}
if(_579.allowIPv6){
a.push(_57f);
}
if(_579.allowHybrid){
a.push(_580);
}
var _582="";
if(a.length>0){
_582="("+a.join("|")+")";
}
return _582;
};
dojox.regexp.host=function(_583){
_583=(typeof _583=="object")?_583:{};
if(typeof _583.allowIP!="boolean"){
_583.allowIP=true;
}
if(typeof _583.allowLocal!="boolean"){
_583.allowLocal=false;
}
if(typeof _583.allowPort!="boolean"){
_583.allowPort=true;
}
if(typeof _583.allowNamed!="boolean"){
_583.allowNamed=false;
}
var _584="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojox.regexp.tld(_583);
var _585=_583.allowPort?"(\\:\\d+)?":"";
var _586=_584;
if(_583.allowIP){
_586+="|"+dojox.regexp.ipAddress(_583);
}
if(_583.allowLocal){
_586+="|localhost";
}
if(_583.allowNamed){
_586+="|^[^-][a-zA-Z0-9_-]*";
}
return "("+_586+")"+_585;
};
dojox.regexp.url=function(_587){
_587=(typeof _587=="object")?_587:{};
if(!("scheme" in _587)){
_587.scheme=[true,false];
}
var _588=dojo.regexp.buildGroupRE(_587.scheme,function(q){
if(q){
return "(https?|ftps?)\\://";
}
return "";
});
var _58a="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";
return _588+dojox.regexp.host(_587)+_58a;
};
dojox.regexp.emailAddress=function(_58b){
_58b=(typeof _58b=="object")?_58b:{};
if(typeof _58b.allowCruft!="boolean"){
_58b.allowCruft=false;
}
_58b.allowPort=false;
var _58c="([\\da-zA-Z]+[-._+&'])*[\\da-zA-Z]+";
var _58d=_58c+"@"+dojox.regexp.host(_58b);
if(_58b.allowCruft){
_58d="<?(mailto\\:)?"+_58d+">?";
}
return _58d;
};
dojox.regexp.emailAddressList=function(_58e){
_58e=(typeof _58e=="object")?_58e:{};
if(typeof _58e.listSeparator!="string"){
_58e.listSeparator="\\s;,";
}
var _58f=dojox.regexp.emailAddress(_58e);
var _590="("+_58f+"\\s*["+_58e.listSeparator+"]\\s*)*"+_58f+"\\s*["+_58e.listSeparator+"]?\\s*";
return _590;
};
dojox.regexp.us.state=function(_591){
_591=(typeof _591=="object")?_591:{};
if(typeof _591.allowTerritories!="boolean"){
_591.allowTerritories=true;
}
if(typeof _591.allowMilitary!="boolean"){
_591.allowMilitary=true;
}
var _592="AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|"+"NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";
var _593="AS|FM|GU|MH|MP|PW|PR|VI";
var _594="AA|AE|AP";
if(_591.allowTerritories){
_592+="|"+_593;
}
if(_591.allowMilitary){
_592+="|"+_594;
}
return "("+_592+")";
};
dojox.regexp.ca.postalCode=function(){
var _595="[A-Z][0-9][A-Z] [0-9][A-Z][0-9]";
return "("+_595+")";
};
dojox.regexp.ca.province=function(){
var _596="AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT";
return "("+statesRE+")";
};
dojox.regexp.numberFormat=function(_597){
_597=(typeof _597=="object")?_597:{};
if(typeof _597.format=="undefined"){
_597.format="###-###-####";
}
var _598=function(_599){
_599=dojo.regexp.escapeString(_599,"?");
_599=_599.replace(/\?/g,"\\d?");
_599=_599.replace(/#/g,"\\d");
return _599;
};
return dojo.regexp.buildGroupRE(_597.format,_598);
};
}
if(!dojo._hasResource["dojox.validate._base"]){
dojo._hasResource["dojox.validate._base"]=true;
dojo.provide("dojox.validate._base");
dojox.validate.isText=function(_59a,_59b){
_59b=(typeof _59b=="object")?_59b:{};
if(/^\s*$/.test(_59a)){
return false;
}
if(typeof _59b.length=="number"&&_59b.length!=_59a.length){
return false;
}
if(typeof _59b.minlength=="number"&&_59b.minlength>_59a.length){
return false;
}
if(typeof _59b.maxlength=="number"&&_59b.maxlength<_59a.length){
return false;
}
return true;
};
dojox.validate._isInRangeCache={};
dojox.validate.isInRange=function(_59c,_59d){
_59c=dojo.number.parse(_59c,_59d);
if(isNaN(_59c)){
return false;
}
_59d=(typeof _59d=="object")?_59d:{};
var max=(typeof _59d.max=="number")?_59d.max:Infinity;
var min=(typeof _59d.min=="number")?_59d.min:-Infinity;
var dec=(typeof _59d.decimal=="string")?_59d.decimal:".";
var _5a1=dojox.validate._isInRangeCache;
var _5a2=_59c+"max"+max+"min"+min+"dec"+dec;
if(typeof _5a1[_5a2]!="undefined"){
return _5a1[_5a2];
}
if(_59c<min||_59c>max){
_5a1[_5a2]=false;
return false;
}
_5a1[_5a2]=true;
return true;
};
dojox.validate.isNumberFormat=function(_5a3,_5a4){
var re=new RegExp("^"+dojox.regexp.numberFormat(_5a4)+"$","i");
return re.test(_5a3);
};
dojox.validate.isValidLuhn=function(_5a6){
var sum,_5a8,_5a9;
if(typeof _5a6!="string"){
_5a6=String(_5a6);
}
_5a6=_5a6.replace(/[- ]/g,"");
_5a8=_5a6.length%2;
sum=0;
for(var i=0;i<_5a6.length;i++){
_5a9=parseInt(_5a6.charAt(i));
if(i%2==_5a8){
_5a9*=2;
}
if(_5a9>9){
_5a9-=9;
}
sum+=_5a9;
}
return !(sum%10);
};
}
if(!dojo._hasResource["dojox.validate.check"]){
dojo._hasResource["dojox.validate.check"]=true;
dojo.provide("dojox.validate.check");
dojox.validate.check=function(form,_5ac){
var _5ad=[];
var _5ae=[];
var _5af={isSuccessful:function(){
return (!this.hasInvalid()&&!this.hasMissing());
},hasMissing:function(){
return (_5ad.length>0);
},getMissing:function(){
return _5ad;
},isMissing:function(_5b0){
for(var i=0;i<_5ad.length;i++){
if(_5b0==_5ad[i]){
return true;
}
}
return false;
},hasInvalid:function(){
return (_5ae.length>0);
},getInvalid:function(){
return _5ae;
},isInvalid:function(_5b2){
for(var i=0;i<_5ae.length;i++){
if(_5b2==_5ae[i]){
return true;
}
}
return false;
}};
var _5b4=function(name,_5b6){
return (typeof _5b6[name]=="undefined");
};
if(_5ac.trim instanceof Array){
for(var i=0;i<_5ac.trim.length;i++){
var elem=form[_5ac.trim[i]];
if(_5b4("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/(^\s*|\s*$)/g,"");
}
}
if(_5ac.uppercase instanceof Array){
for(var i=0;i<_5ac.uppercase.length;i++){
var elem=form[_5ac.uppercase[i]];
if(_5b4("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.toUpperCase();
}
}
if(_5ac.lowercase instanceof Array){
for(var i=0;i<_5ac.lowercase.length;i++){
var elem=form[_5ac.lowercase[i]];
if(_5b4("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.toLowerCase();
}
}
if(_5ac.ucfirst instanceof Array){
for(var i=0;i<_5ac.ucfirst.length;i++){
var elem=form[_5ac.ucfirst[i]];
if(_5b4("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/\b\w+\b/g,function(word){
return word.substring(0,1).toUpperCase()+word.substring(1).toLowerCase();
});
}
}
if(_5ac.digit instanceof Array){
for(var i=0;i<_5ac.digit.length;i++){
var elem=form[_5ac.digit[i]];
if(_5b4("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/\D/g,"");
}
}
if(_5ac.required instanceof Array){
for(var i=0;i<_5ac.required.length;i++){
if(!dojo.isString(_5ac.required[i])){
continue;
}
var elem=form[_5ac.required[i]];
if(!_5b4("type",elem)&&(elem.type=="text"||elem.type=="textarea"||elem.type=="password"||elem.type=="file")&&/^\s*$/.test(elem.value)){
_5ad[_5ad.length]=elem.name;
}else{
if(!_5b4("type",elem)&&(elem.type=="select-one"||elem.type=="select-multiple")&&(elem.selectedIndex==-1||/^\s*$/.test(elem.options[elem.selectedIndex].value))){
_5ad[_5ad.length]=elem.name;
}else{
if(elem instanceof Array){
var _5ba=false;
for(var j=0;j<elem.length;j++){
if(elem[j].checked){
_5ba=true;
}
}
if(!_5ba){
_5ad[_5ad.length]=elem[0].name;
}
}
}
}
}
}
if(_5ac.required instanceof Array){
for(var i=0;i<_5ac.required.length;i++){
if(!dojo.isObject(_5ac.required[i])){
continue;
}
var elem,_5bc;
for(var name in _5ac.required[i]){
elem=form[name];
_5bc=_5ac.required[i][name];
}
if(elem instanceof Array){
var _5ba=0;
for(var j=0;j<elem.length;j++){
if(elem[j].checked){
_5ba++;
}
}
if(_5ba<_5bc){
_5ad[_5ad.length]=elem[0].name;
}
}else{
if(!_5b4("type",elem)&&elem.type=="select-multiple"){
var _5be=0;
for(var j=0;j<elem.options.length;j++){
if(elem.options[j].selected&&!/^\s*$/.test(elem.options[j].value)){
_5be++;
}
}
if(_5be<_5bc){
_5ad[_5ad.length]=elem.name;
}
}
}
}
}
if(dojo.isObject(_5ac.dependencies)){
for(name in _5ac.dependencies){
var elem=form[name];
if(_5b4("type",elem)){
continue;
}
if(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
if(/\S+/.test(elem.value)){
continue;
}
if(_5af.isMissing(elem.name)){
continue;
}
var _5bf=form[_5ac.dependencies[name]];
if(_5bf.type!="text"&&_5bf.type!="textarea"&&_5bf.type!="password"){
continue;
}
if(/^\s*$/.test(_5bf.value)){
continue;
}
_5ad[_5ad.length]=elem.name;
}
}
if(dojo.isObject(_5ac.constraints)){
for(name in _5ac.constraints){
var elem=form[name];
if(!elem){
continue;
}
if(!_5b4("tagName",elem)&&(elem.tagName.toLowerCase().indexOf("input")>=0||elem.tagName.toLowerCase().indexOf("textarea")>=0)&&/^\s*$/.test(elem.value)){
continue;
}
var _5c0=true;
if(dojo.isFunction(_5ac.constraints[name])){
_5c0=_5ac.constraints[name](elem.value);
}else{
if(dojo.isArray(_5ac.constraints[name])){
if(dojo.isArray(_5ac.constraints[name][0])){
for(var i=0;i<_5ac.constraints[name].length;i++){
_5c0=dojox.validate.evaluateConstraint(_5ac,_5ac.constraints[name][i],name,elem);
if(!_5c0){
break;
}
}
}else{
_5c0=dojox.validate.evaluateConstraint(_5ac,_5ac.constraints[name],name,elem);
}
}
}
if(!_5c0){
_5ae[_5ae.length]=elem.name;
}
}
}
if(dojo.isObject(_5ac.confirm)){
for(name in _5ac.confirm){
var elem=form[name];
var _5bf=form[_5ac.confirm[name]];
if(_5b4("type",elem)||_5b4("type",_5bf)||(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password")||(_5bf.type!=elem.type)||(_5bf.value==elem.value)||(_5af.isInvalid(elem.name))||(/^\s*$/.test(_5bf.value))){
continue;
}
_5ae[_5ae.length]=elem.name;
}
}
return _5af;
};
dojox.validate.evaluateConstraint=function(_5c1,_5c2,_5c3,elem){
var _5c5=_5c2[0];
var _5c6=_5c2.slice(1);
_5c6.unshift(elem.value);
if(typeof _5c5!="undefined"){
return _5c5.apply(null,_5c6);
}
return false;
};
}
if(!dojo._hasResource["generic._base"]){
dojo._hasResource["generic._base"]=true;
dojo.provide("generic._base");
generic.popup=function(args){
var _5c8=dojo.byId(args.activator);
if(!_5c8){
return false;
}
var _5c9=["height","width","top","left","resizable","scrollbars","status","toolbar","menubar","location"];
var _5ca={url:null,height:500,width:500,top:25,left:25,resizable:"yes",scrollbars:"yes",status:"no",toolbar:"no",menubar:"no",location:"no",name:"pop"};
var _5cb="";
for(var i=0;i<_5c9.length;i++){
var val;
var attr=_5c9[i];
if(args[attr]&&args[attr]!="undefined"){
val=args[attr];
}else{
val=_5ca[attr];
}
_5cb+=attr+"="+val+",";
}
var open=function(){
dojo.publish("/page/status/overlayOpened",[]);
_5cb=_5cb.substring(0,_5cb.length-1);
var win=window.open(args.url,args.name,_5cb);
if(!win){
alert("Unable to open new window.  Please allow popups for this domain.");
}
};
var _5d1=[dojo.connect(_5c8,"onclick",open)];
return true;
};
generic.uniq=function(arr){
var a=[],i,l=arr.length;
for(i=0;i<l;i++){
if(a.indexOf(arr[i],0)<0){
a.push(arr[i]);
}
}
return a;
};
}
if(!dojo._hasResource["generic.progress"]){
dojo._hasResource["generic.progress"]=true;
dojo.provide("generic.progress");
dojo.declare("generic.progress",null,{progressNode:null,containerNode:null,constructor:function(args){
this.containerNode=dojo.byId(args.containerId);
this.progressNode=dojo.byId(args.progressId);
if(args.matchDimensions){
this._setDimensions();
}
this.onStart=(args.onStart?args.onStart:this.onStart);
this.onClear=(args.onClear?args.onClear:this.onClear);
},start:function(){
if(!this.progressNode||!this.containerNode){
return;
}
this.containerNode.style.display="none";
this.progressNode.style.display="block";
this.onStart();
},clear:function(){
if(!this.progressNode||!this.containerNode){
return;
}
this.containerNode.style.display="block";
this.progressNode.style.display="none";
this.onClear();
},onStart:function(){
},onClear:function(){
},onComplete:function(){
this.clear();
},onException:function(){
this.clear();
},onFailure:function(){
this.clear();
},onTimeout:function(){
this.clear();
},_setDimensions:function(){
var _5d7=dojo.coords(this.containerNode);
this.progressNode.style.width=_5d7.w+"px";
this.progressNode.style.height=_5d7.h+"px";
}});
dojo.declare("generic.progressOverlay",generic.progress,{offset:{w:0,h:0},constructor:function(args){
this.containerNode=dojo.byId(args.containerId);
this.progressNode=dojo.byId(args.progressId);
if(args.offset){
this.offset=args.offset;
}
var _5d9=dojo.coords(this.containerNode);
this.progressNode.style.width=(_5d9.w+this.offset.w)+"px";
this.progressNode.style.height=(_5d9.h+this.offset.h)+"px";
this.onStart=(args.onStart?args.onStart:this.onStart);
this.onClear=(args.onClear?args.onClear:this.onClear);
},start:function(){
if(!this.progressNode){
return;
}
this.progressNode.style.display="block";
this.onStart();
},clear:function(){
if(!this.progressNode){
return;
}
this.progressNode.style.display="none";
this.onClear();
}});
}
if(!dojo._hasResource["generic.checkoutPageHandler"]){
dojo._hasResource["generic.checkoutPageHandler"]=true;
dojo.provide("generic.checkoutPageHandler");
dojo.declare("generic.checkoutPageHandler",null,{handlers:[],constructor:function(){
},refreshInclude:function(args){
var _5db=new generic.jsonrpc();
var _5dc=[{"logic":[{"path":args.logicPath}],"tmpl":[{"path":args.tmplPath}]}];
var d=_5db.callRemote("include",_5dc);
var self=this;
d.addCallback(function(_5df){
if(args.callbackArgs.progress){
args.callbackArgs.progress.clear();
}
self.toggleSubmitButton(true);
var _5e0=_5df.result.output;
var node=dojo.byId(args.nodeId);
if(node){
node.innerHTML=_5e0[args.tmplPath];
if(args.parse){
self.reloadWidgets(node);
}
}
if(args.callbackArgs.error!==undefined){
dojo.mixin(_5df.error,args.callbackArgs.error);
self.showErrors(_5df.error);
}
if(args.onReloadCallback!==undefined){
args.onReloadCallback();
}
});
d.addErrback(function(err){
console.log("error = "+err);
});
},submitValuesRpc:function(args){
var _5e4=new generic.jsonrpc();
var d=_5e4.callRemote(args.method,args.params);
if(args.progressArgs!==undefined){
var _5e6=new generic.progress(args.progressArgs);
_5e6.start();
}
this.toggleSubmitButton(false);
var self=this;
d.addCallback(function(_5e8){
if(args.callback){
var _5e9;
if(args.hasErrorChecking){
_5e9={progress:_5e6,error:_5e8.error};
}else{
_5e9={progress:_5e6};
}
args.callback(_5e9);
}else{
_5e6.clear();
self.toggleSubmitButton(true);
}
});
d.addErrback(function(err){
console.log("===errBack===");
});
},initRpcHandler:function(_5eb){
var self=this;
var send=function(){
var _5ee=new Object();
var val="";
dojo.forEach(_5eb.fields,function(_5f0){
var node=dojo.byId(_5f0.id);
if(node){
switch(_5f0.inputType){
case "text":
val=node.value;
break;
case "radio":
if(!node.checked&&node.value&&node.value!==""){
val=node.value;
}
break;
default:
val=node.value;
}
}
_5ee[_5f0.reqKey]=val;
});
if(_5eb.params[0].logic!==undefined){
_5eb.params[0].logic[0].args=_5ee;
}else{
_5eb.params[0]=_5ee;
}
self.submitValuesRpc(_5eb);
};
var _5f2=dojo.byId(_5eb.submitEvent.nodeId);
var _5f3=_5eb.submitEvent.eventName;
if(_5f2){
this.handlers.push([dojo.connect(_5f2,_5f3,send)]);
}
},reloadWidgets:function(_5f4){
dojo.query(".destroy_onreload",_5f4).forEach(function(node){
var _5f6=dijit.byId(node.id);
if(!_5f6){
_5f6=dijit.byId(node.id+".display");
}
if(_5f6){
_5f6.destroyRecursive();
}
});
dojo.parser.parse(_5f4);
},showErrors:function(_5f7){
var _5f8="";
var _5f9=false;
var self=this;
var _5fb=dojo.byId("error_panel");
if(_5f7.messages.length>0){
_5f8="<div class='form_errors' id='errors_json'><ul class='err_list'>";
dojo.forEach(_5f7.messages,function(_5fc){
_5f8+="<li>"+_5fc.text+"</li>";
if(_5fc.severity==="MESSAGE"){
_5f9=true;
self.toggleSubmitButton(false);
dojo.publish("/jsonrpc/error/message",[_5fc]);
}
});
_5f8+="</ul></div>";
if(_5fb){
var _5fd=dojo.byId("errors_include");
if(_5fd){
_5fd.style.display="none";
}
}
_5fb.style.display="block";
_5fb.innerHTML=_5f8;
}else{
if(_5fb){
var _5fd=dojo.byId("errors_include");
if(_5fd){
_5fd.style.display="block";
}
var _5fe=dojo.byId("errors_json");
if(_5fe){
_5fe.style.display="none";
}
}
}
if(!_5f9){
this.toggleSubmitButton(true);
}
},toggleSubmitButton:function(_5ff){
var _600=dojo.query(".checkout_submit");
var _601=dojo.query(".checkout_submit_disabled");
var _602="block";
var _603="none";
if(!_5ff){
_602="none";
_603="block";
}
dojo.forEach(_600,function(btn){
btn.style.display=_602;
});
dojo.forEach(_601,function(btn){
btn.style.display=_603;
});
}});
}
if(!dojo._hasResource["dojox.flash._base"]){
dojo._hasResource["dojox.flash._base"]=true;
dojo.provide("dojox.flash._base");
dojox.flash=function(){
};
dojox.flash={ready:false,url:null,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(url,_607){
this.url=url;
if(typeof _607!="undefined"){
this._visible=_607;
}
this._initialize();
},addLoadedListener:function(_608){
this._loadedListeners.push(_608);
},addInstallingListener:function(_609){
this._installingListeners.push(_609);
},loaded:function(){
dojox.flash.ready=true;
if(dojox.flash._loadedListeners.length>0){
for(var i=0;i<dojox.flash._loadedListeners.length;i++){
dojox.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(dojox.flash._installingListeners.length>0){
for(var i=0;i<dojox.flash._installingListeners.length;i++){
dojox.flash._installingListeners[i].call(null);
}
}
},_initialize:function(){
var _60c=new dojox.flash.Install();
dojox.flash.installer=_60c;
if(_60c.needed()==true){
_60c.install();
}else{
dojox.flash.obj=new dojox.flash.Embed(this._visible);
dojox.flash.obj.write();
dojox.flash.comm=new dojox.flash.Communicator();
}
}};
dojox.flash.Info=function(){
if(dojo.isIE){
document.write(["<script language=\"VBScript\" type=\"text/vbscript\">","Function VBGetSwfVer(i)","  on error resume next","  Dim swControl, swVersion","  swVersion = 0","  set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))","  if (IsObject(swControl)) then","    swVersion = swControl.GetVariable(\"$version\")","  end if","  VBGetSwfVer = swVersion","End Function","</script>"].join("\r\n"));
}
this._detectVersion();
};
dojox.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,installing:false,isVersionOrAbove:function(_60d,_60e,_60f){
_60f=parseFloat("."+_60f);
if(this.versionMajor>=_60d&&this.versionMinor>=_60e&&this.versionRevision>=_60f){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _610;
for(var _611=25;_611>0;_611--){
if(dojo.isIE){
_610=VBGetSwfVer(_611);
}else{
_610=this._JSFlashInfo(_611);
}
if(_610==-1){
this.capable=false;
return;
}else{
if(_610!=0){
var _612;
if(dojo.isIE){
var _613=_610.split(" ");
var _614=_613[1];
_612=_614.split(",");
}else{
_612=_610.split(".");
}
this.versionMajor=_612[0];
this.versionMinor=_612[1];
this.versionRevision=_612[2];
var _615=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_615);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_616){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _617=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _618=navigator.plugins["Shockwave Flash"+_617].description;
var _619=_618.split(" ");
var _61a=_619[2].split(".");
var _61b=_61a[0];
var _61c=_61a[1];
if(_619[3]!=""){
var _61d=_619[3].split("r");
}else{
var _61d=_619[4].split("r");
}
var _61e=_61d[1]>0?_61d[1]:0;
var _61f=_61b+"."+_61c+"."+_61e;
return _61f;
}
}
return -1;
}};
dojox.flash.Embed=function(_620){
this._visible=_620;
};
dojox.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){
switch(window.location.protocol){
case "https:":
return "https";
break;
default:
return "http";
break;
}
},write:function(_621){
var _622="";
_622+=("width: "+this.width+"px; ");
_622+=("height: "+this.height+"px; ");
if(!this._visible){
_622+="position: absolute; z-index: 10000; top: -1000px; left: -1000px; ";
}
var _623;
var _624=dojox.flash.url;
var _625=_624;
var _626=_624;
var _627=dojo.baseUrl;
if(_621){
var _628=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _629=escape(document.title);
_625+="?MMredirectURL="+_628+"&MMplayerType=ActiveX"+"&MMdoctitle="+_629+"&baseUrl="+escape(_627);
_626+="?MMredirectURL="+_628+"&MMplayerType=PlugIn"+"&baseUrl="+escape(_627);
}else{
_625+="?cachebust="+new Date().getTime();
}
if(_626.indexOf("?")==-1){
_626+="?baseUrl="+escape(_627);
}else{
_626+="&baseUrl="+escape(_627);
}
_623="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\""+this.protocol()+"://fpdownload.macromedia.com/pub/shockwave/cabs/flash/"+"swflash.cab#version=8,0,0,0\"\n "+"width=\""+this.width+"\"\n "+"height=\""+this.height+"\"\n "+"id=\""+this.id+"\"\n "+"name=\""+this.id+"\"\n "+"align=\"middle\">\n "+"<param name=\"allowScriptAccess\" value=\"sameDomain\"></param>\n "+"<param name=\"movie\" value=\""+_625+"\"></param>\n "+"<param name=\"quality\" value=\"high\"></param>\n "+"<param name=\"bgcolor\" value=\"#ffffff\"></param>\n "+"<embed src=\""+_626+"\" "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"Embed"+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"sameDomain\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\" "+"></embed>\n"+"</object>\n";
dojo.connect(dojo,"loaded",dojo.hitch(this,function(){
var div=document.createElement("div");
div.setAttribute("id",this.id+"Container");
div.setAttribute("style",_622);
div.innerHTML=_623;
var body=document.getElementsByTagName("body");
if(!body||!body.length){
throw new Error("No body tag for this page");
}
body=body[0];
body.appendChild(div);
}));
},get:function(){
if(dojo.isIE||dojo.isSafari){
return document.getElementById(this.id);
}else{
return document[this.id+"Embed"];
}
},setVisible:function(_62c){
var _62d=dojo.byId(this.id+"Container");
if(_62c==true){
_62d.style.position="absolute";
_62d.style.visibility="visible";
}else{
_62d.style.position="absolute";
_62d.style.x="-1000px";
_62d.style.y="-1000px";
_62d.style.visibility="hidden";
}
},center:function(){
var _62e=this.width;
var _62f=this.height;
var _630=dijit.getViewport();
var x=_630.l+(_630.w-_62e)/2;
var y=_630.t+(_630.h-_62f)/2;
var _633=dojo.byId(this.id+"Container");
_633.style.top=y+"px";
_633.style.left=x+"px";
}};
dojox.flash.Communicator=function(){
};
dojox.flash.Communicator.prototype={_addExternalInterfaceCallback:function(_634){
var _635=dojo.hitch(this,function(){
var _636=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_636[i]=this._encodeData(arguments[i]);
}
var _638=this._execFlash(_634,_636);
_638=this._decodeData(_638);
return _638;
});
this[_634]=_635;
},_encodeData:function(data){
if(!data||typeof data!="string"){
return data;
}
var _63a=/\&([^;]*)\;/g;
data=data.replace(_63a,"&amp;$1;");
data=data.replace(/</g,"&lt;");
data=data.replace(/>/g,"&gt;");
data=data.replace("\\","&custom_backslash;");
data=data.replace(/\0/g,"\\0");
data=data.replace(/\"/g,"&quot;");
return data;
},_decodeData:function(data){
if(data&&data.length&&typeof data!="string"){
data=data[0];
}
if(!data||typeof data!="string"){
return data;
}
data=data.replace(/\&custom_lt\;/g,"<");
data=data.replace(/\&custom_gt\;/g,">");
data=data.replace(/\&custom_backslash\;/g,"\\");
data=data.replace(/\\0/g," ");
return data;
},_execFlash:function(_63c,_63d){
var _63e=dojox.flash.obj.get();
_63d=(_63d)?_63d:[];
for(var i=0;i<_63d;i++){
if(typeof _63d[i]=="string"){
_63d[i]=this._encodeData(_63d[i]);
}
}
var _640=function(){
return eval(_63e.CallFunction("<invoke name=\""+_63c+"\" returntype=\"javascript\">"+__flash__argumentsToXML(_63d,0)+"</invoke>"));
};
var _641=_640.call(_63d);
if(typeof _641=="string"){
_641=this._decodeData(_641);
}
return _641;
}};
dojox.flash.Install=function(){
};
dojox.flash.Install.prototype={needed:function(){
if(dojox.flash.info.capable==false){
return true;
}
if(!dojox.flash.info.isVersionOrAbove(8,0,0)){
return true;
}
return false;
},install:function(){
dojox.flash.info.installing=true;
dojox.flash.installing();
if(dojox.flash.info.capable==false){
var _642=new dojox.flash.Embed(false);
_642.write();
}else{
if(dojox.flash.info.isVersionOrAbove(6,0,65)){
var _642=new dojox.flash.Embed(false);
_642.write(true);
_642.setVisible(true);
_642.center();
}else{
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=+dojox.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}
}
},_onInstallStatus:function(msg){
if(msg=="Download.Complete"){
dojox.flash._initialize();
}else{
if(msg=="Download.Cancelled"){
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=dojox.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}else{
if(msg=="Download.Failed"){
alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin.");
}
}
}
}};
dojox.flash.info=new dojox.flash.Info();
}
if(!dojo._hasResource["dojo.io.script"]){
dojo._hasResource["dojo.io.script"]=true;
dojo.provide("dojo.io.script");
dojo.io.script={get:function(args){
var dfd=this._makeScriptDeferred(args);
var _646=dfd.ioArgs;
dojo._ioAddQueryToUrl(_646);
this.attach(_646.id,_646.url,args.frameDoc);
dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);
return dfd;
},attach:function(id,url,_649){
var doc=(_649||dojo.doc);
var _64b=doc.createElement("script");
_64b.type="text/javascript";
_64b.src=url;
_64b.id=id;
doc.getElementsByTagName("head")[0].appendChild(_64b);
},remove:function(id){
dojo._destroyElement(dojo.byId(id));
if(this["jsonp_"+id]){
delete this["jsonp_"+id];
}
},_makeScriptDeferred:function(args){
var dfd=dojo._ioSetArgs(args,this._deferredCancel,this._deferredOk,this._deferredError);
var _64f=dfd.ioArgs;
_64f.id=dojo._scopeName+"IoScript"+(this._counter++);
_64f.canDelete=false;
if(args.callbackParamName){
_64f.query=_64f.query||"";
if(_64f.query.length>0){
_64f.query+="&";
}
_64f.query+=args.callbackParamName+"="+(args.frameDoc?"parent.":"")+"dojo.io.script.jsonp_"+_64f.id+"._jsonpCallback";
_64f.canDelete=true;
dfd._jsonpCallback=this._jsonpCallback;
this["jsonp_"+_64f.id]=dfd;
}
return dfd;
},_deferredCancel:function(dfd){
dfd.canceled=true;
if(dfd.ioArgs.canDelete){
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
},_deferredOk:function(dfd){
if(dfd.ioArgs.canDelete){
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
if(dfd.ioArgs.json){
return dfd.ioArgs.json;
}else{
return dfd.ioArgs;
}
},_deferredError:function(_652,dfd){
if(dfd.ioArgs.canDelete){
if(_652.dojoType=="timeout"){
dojo.io.script.remove(dfd.ioArgs.id);
}else{
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
}
console.debug("dojo.io.script error",_652);
return _652;
},_deadScripts:[],_counter:1,_validCheck:function(dfd){
var _655=dojo.io.script;
var _656=_655._deadScripts;
if(_656&&_656.length>0){
for(var i=0;i<_656.length;i++){
_655.remove(_656[i]);
}
dojo.io.script._deadScripts=[];
}
return true;
},_ioCheck:function(dfd){
if(dfd.ioArgs.json){
return true;
}
var _659=dfd.ioArgs.args.checkString;
if(_659&&eval("typeof("+_659+") != 'undefined'")){
return true;
}
return false;
},_resHandle:function(dfd){
if(dojo.io.script._ioCheck(dfd)){
dfd.callback(dfd);
}else{
dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));
}
},_jsonpCallback:function(json){
this.ioArgs.json=json;
}};
}
if(!dojo._hasResource["generic.flash._base"]){
dojo._hasResource["generic.flash._base"]=true;
dojo.provide("generic.flash._base");
generic.flash=function(){
};
generic.flash={ready:false,id:null,so:null,_loadedListeners:[],_installingListeners:[],_isSwfObject:false,_swfObjectArr:{},_swfObjectArgs:{},_noflashDefault:"<span id='noflash'><h1>Please Download Flash</h1><p><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player'/></a></p></span>",setSwfObject:function(id){
generic.flash.id=id;
generic.flash.so=swfobject;
generic.flash._initialize();
},embedSwfObject:function(_65d){
console.log("embedSwfObject()");
generic.flash._isSwfObject=true;
generic.flash._swfObjectArgs=_65d;
generic.flash.so=swfobject;
generic.flash._initialize();
},removeSwfObject:function(id){
var o=dojo.byId(id);
o.id="removeSWF::"+o.id;
if(dojo.isIE&&(o.readyState!==4)){
generic.flash._swfObjectArr[o.id]=setInterval(function(){
if(o.readyState===4){
clearInterval(generic.flash._swfObjectArr[o.id]);
generic.flash.remove(o.id);
}
},100);
}else{
generic.flash.remove(o.id);
}
},scriptHandler:function(resp,_661){
var err=resp instanceof Error;
generic.flash.so=swfobject;
generic.flash._initialize();
},addLoadedListener:function(_663){
this._loadedListeners.push(_663);
},addInstallingListener:function(_664){
this._installingListeners.push(_664);
},loaded:function(){
console.log("dojox.flash.loaded called!!");
generic.flash.ready=true;
if(generic.flash._loadedListeners.length>0){
for(var i=0;i<generic.flash._loadedListeners.length;i++){
generic.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(generic.flash._installingListeners.length>0){
for(var i=0;i<generic.flash._installingListeners.length;i++){
generic.flash._installingListeners[i].call(null);
}
}
},remove:function(id){
var o=dojo.byId(id);
if(o&&(o.nodeName==="EMBED"||o.nodeName==="OBJECT")){
if(dojo.isIE){
if(o.readyState==4){
generic.flash.removeIE(o.id);
}else{
window.attachEvent("onload",function(){
generic.flash.removeIE(o.id);
});
}
}else{
o.parentNode.removeChild(o);
}
}
},removeIE:function(id){
var o=dojo.byId(id);
if(o){
for(i in o){
if(typeof o[i]=="function"){
o[i]=null;
}
}
o.parentNode.removeChild(o);
}
},_initialize:function(){
console.log("g.f._init()");
var _66b=new dojox.flash.Install();
generic.flash.installer=_66b;
if(_66b.needed()===true){
console.log("Installer needed!");
if(!dojo.byId("noflash")){
var oa=generic.flash._swfObjectArgs;
dojo.byId(oa.eid).innerHTML=generic.flash._noflashDefault;
}
var nf=dojo.byId("noflash");
dojo.style(nf,"display","block");
dojo.addClass(nf,"clickable");
dojo.connect(nf,"onclick",this,function(){
window.location="http://www.adobe.com/go/getflashplayer";
});
if(dojo.isIE){
console.log("IE lt 7");
}else{
console.log("Not IE, run install()");
_66b.install();
}
}else{
dojox.flash.obj=new generic.flash.Embed(generic.flash._isSwfObject);
generic.flash.comm=dojox.flash.comm=new dojox.flash.Communicator();
}
}};
dojox.flash.loaded=generic.flash.loaded;
generic.flash.Embed=function(_66e){
console.log("generic.flash.Embed");
if(_66e){
var oa=generic.flash._swfObjectArgs;
this.id=oa.attributes.id;
generic.flash.so.addDomLoadEvent(function(){
var fo=generic.flash.so.createSWF(oa.attributes,oa.params,oa.eid);
});
}else{
this.id=generic.flash.id;
generic.flash.so.addDomLoadEvent(function(){
var fo=generic.flash.so.registerObject(this.id,"8.0.0","/flash/expressInstall.swf");
});
}
};
generic.flash.Embed.prototype={get:function(){
if(generic.flash._isSwfObject){
return document.getElementById(this.id);
}else{
if(dojo.isIE||dojo.isSafari){
return document.getElementById(this.id);
}else{
return document[this.id+"Embed"];
}
}
}};
generic.flash.info=new dojox.flash.Info();
dojo.provide("generic.flash.loader");
generic.flash.loader=new function(){
this.items={};
this.so=null;
this.addLoadItem=function(attr,_673,_674){
item={id:_674,attributes:attr,params:_673,obj:null};
this.items[_674]=item;
};
this.loadItems=function(){
if(this.so===null){
if(typeof swfobject=="undefined"){
return;
}
this.so=swfobject;
}
var self=this;
for(var i in this.items){
if(this.items[i]){
var item=this.items[i];
console.log("loading: "+item.id);
self.so.createSWF(item.attributes,item.params,item.id);
}
}
};
};
dojo.addOnLoad(function(){
generic.flash.loader.loadItems();
});
}
if(!dojo._hasResource["generic.flash"]){
dojo._hasResource["generic.flash"]=true;
dojo.provide("generic.flash");
}
if(!dojo._hasResource["generic.cookie"]){
dojo._hasResource["generic.cookie"]=true;
dojo.provide("generic.cookie");
dojo.mixin(dojo.cookie,{update:function(name,val,_67a){
_67a=_67a||{};
var exp=_67a.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_67a.expires=d;
}
if(exp&&exp.toUTCString){
_67a.expires=exp.toUTCString();
}
var _67d=name+"="+val;
for(var i in _67a){
var key=i;
var val=_67a[i];
_67d+="; "+key+"="+val;
}
document.cookie=_67d;
},serialize:function(_680,to){
if(_680){
if(to&&to!=="undefined"){
if(to=="perl"){
return this.toPerl(_680);
}else{
return dojo.toJson(_680);
}
}else{
try{
return dojo.toJson(_680);
}
catch(e){
throw new Error("json serialize failed, trying perl.");
return this.toPerl(_680);
}
}
}
},toPerl:function(_682){
if(_682){
var str="";
for(var i in _682){
if(_682[i]){
if(str!==""){
str+="&";
}
str+=i+"&"+_682[i];
}
}
return str;
}
},deserialize:function(_685,from){
if(_685){
if(from&&from!=="undefined"){
if(from=="perl"){
return this.fromPerl(_685);
}else{
return dojo.fromJson(_685);
}
}else{
try{
return this.fromPerl(_685);
}
catch(e){
throw new Error("deserialize fromPerl failed, trying fromJson");
return dojo.fromJson(_685);
}
}
}
},fromPerl:function(_687){
if(_687){
var _688={};
var _689=_687.split("&");
for(var i=0;i<_689.length;i+=2){
var key=_689[i];
var val=_689[i+1];
if(key&&val&&typeof (val)!=="undefined"){
_688[key]=val;
}
}
return _688;
}
},fromJson:function(_68d){
if(_68d){
return dojo.fromJson(_68d);
}
},destroy:function(){
}});
}
if(!dojo._hasResource["dojo.rpc.RpcService"]){
dojo._hasResource["dojo.rpc.RpcService"]=true;
dojo.provide("dojo.rpc.RpcService");
dojo.declare("dojo.rpc.RpcService",null,{constructor:function(args){
if(args){
if((dojo.isString(args))||(args instanceof dojo._Url)){
if(args instanceof dojo._Url){
var url=args+"";
}else{
url=args;
}
var def=dojo.xhrGet({url:url,handleAs:"json-comment-optional",sync:true});
def.addCallback(this,"processSmd");
def.addErrback(function(){
throw new Error("Unable to load SMD from "+args);
});
}else{
if(args.smdStr){
this.processSmd(dojo.eval("("+args.smdStr+")"));
}else{
if(args.serviceUrl){
this.serviceUrl=args.serviceUrl;
}
this.timeout=args.timeout||3000;
if("strictArgChecks" in args){
this.strictArgChecks=args.strictArgChecks;
}
this.processSmd(args);
}
}
}
},strictArgChecks:true,serviceUrl:"",parseResults:function(obj){
return obj;
},errorCallback:function(_692){
return function(data){
_692.errback(new Error(data.message));
};
},resultCallback:function(_694){
var tf=dojo.hitch(this,function(obj){
if(obj.error!=null){
var err;
if(typeof obj.error=="object"){
err=new Error(obj.error.message);
err.code=obj.error.code;
err.error=obj.error.error;
}else{
err=new Error(obj.error);
}
err.id=obj.id;
err.errorObject=obj;
_694.errback(err);
}else{
_694.callback(this.parseResults(obj));
}
});
return tf;
},generateMethod:function(_698,_699,url){
return dojo.hitch(this,function(){
var _69b=new dojo.Deferred();
if((this.strictArgChecks)&&(_699!=null)&&(arguments.length!=_699.length)){
throw new Error("Invalid number of parameters for remote method.");
}else{
this.bind(_698,dojo._toArray(arguments),_69b,url);
}
return _69b;
});
},processSmd:function(_69c){
if(_69c.methods){
dojo.forEach(_69c.methods,function(m){
if(m&&m.name){
this[m.name]=this.generateMethod(m.name,m.parameters,m.url||m.serviceUrl||m.serviceURL);
if(!dojo.isFunction(this[m.name])){
throw new Error("RpcService: Failed to create"+m.name+"()");
}
}
},this);
}
this.serviceUrl=_69c.serviceUrl||_69c.serviceURL;
this.required=_69c.required;
this.smd=_69c;
}});
}
if(!dojo._hasResource["generic.jsonrpc"]){
dojo._hasResource["generic.jsonrpc"]=true;
dojo.provide("generic.jsonrpc");
dojo.declare("generic.jsonrpc",dojo.rpc.RpcService,{constructor:function(args){
var opts=["serviceUrl","contentType","handleAs","timeout"];
if(args&&args!="undefined"){
for(var i in opts){
if(args[i]){
this[i]=args[i];
}
}
}
this._cache={};
this._prevRequests={};
this._id=generic.jsonrpc.prototype._id++;
},_id:0,_reqId:0,_cache:null,_prevRequests:null,serviceUrl:"/jsonrpc.logic",contentType:"application/x-www-form-urlencoded",handleAs:"json-comment-optional",timeout:120*1000,bustCache:false,callRemote:function(_6a1,args){
var _6a3=new dojo.Deferred();
this.bind(_6a1,args,_6a3);
return _6a3;
},bind:function(_6a4,_6a5,_6a6,url){
var def=dojo.rawXhrPost({url:url||this.serviceUrl,postData:this.createRequest(_6a4,_6a5),contentType:this.contentType,timeout:this.timeout,handleAs:this.handleAs});
def.addCallbacks(this.resultCallback(_6a6),this.errorCallback(_6a6));
},createRequest:function(_6a9,_6aa){
var req=[{"method":_6a9,"params":_6aa,"id":++this._reqId}];
var d=dojo.toJson(req);
var data="JSONRPC="+encodeURIComponent(d);
console.log("JsonService: id: "+this._reqId+" JSON-RPC Request: "+data);
this._prevRequests[this._reqId]=data;
this._cache[data]="in progress";
return data;
},parseResults:function(obj){
var _6af=0;
var _6b0=null;
if(dojo.isObject(obj)){
if(obj[1]){
if("tags" in obj[1]){
if(frames[0]){
if(frames["datacoremetrics"]){
CMframe=frames["datacoremetrics"];
CMframe.document.open();
for(var i=0;i<=obj[1].tags.length-1;i++){
CMframe.document.write(obj[1].tags[i]);
}
CMframe.document.close();
}else{
console.log("datacoremetrics Frame is misnamed");
}
}else{
console.log("datacoremetrics Frame is missing");
}
}
}
_6b0=obj[0];
if("id" in obj[0]){
_6af=obj[0].id;
}
if("result" in obj[0]){
if(_6af!=0){
var _6b2=this._prevRequests[_6af];
this._cache[_6b2]=obj[0].result;
}
_6b0.result=obj[0].result;
}
if("error" in obj[0]){
_6b0.error=obj[0].error;
}
return _6b0;
}
return obj;
}});
}
if(!dojo._hasResource["generic.back"]){
dojo._hasResource["generic.back"]=true;
dojo.provide("generic.back");
(function(){
var back=generic.back;
function getHash(){
var h=window.location.hash;
if(h.charAt(0)=="#"){
h=h.substring(1);
}
return dojo.isMozilla?h:decodeURIComponent(h);
};
function setHash(h){
if(!h){
h="";
}
window.location.hash=h;
_6b6=history.length;
};
if(dojo.exists("tests.back-hash")){
back.getHash=getHash;
back.setHash=setHash;
}
var _6b7=(typeof (window)!=="undefined")?window.location.href:"";
var _6b8=(typeof (window)!=="undefined")?getHash():"";
var _6b9=null;
var _6ba=null;
var _6bb=null;
var _6bc=null;
var _6bd=[];
var _6be=[];
var _6bf=false;
var _6c0=false;
var _6b6;
function handleBackButton(){
var _6c1=_6be.pop();
if(!_6c1){
return;
}
var last=_6be[_6be.length-1];
if(!last&&_6be.length==0){
last=_6b9;
}
if(last){
if(last.kwArgs["back"]){
last.kwArgs["back"]();
}else{
if(last.kwArgs["backButton"]){
last.kwArgs["backButton"]();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("back");
}
}
}
}
_6bd.push(_6c1);
};
back.goBack=handleBackButton;
function handleForwardButton(){
var last=_6bd.pop();
if(!last){
return;
}
if(last.kwArgs["forward"]){
last.kwArgs.forward();
}else{
if(last.kwArgs["forwardButton"]){
last.kwArgs.forwardButton();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("forward");
}
}
}
_6be.push(last);
};
back.goForward=handleForwardButton;
function createState(url,args,hash){
return {"url":url,"kwArgs":args,"urlHash":hash};
};
function getUrlQuery(url){
var _6c8=url.split("?");
if(_6c8.length<2){
return null;
}else{
return _6c8[1];
}
};
function loadIframeHistory(){
var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();
_6bf=true;
if(_6bc){
dojo.isSafari?_6bc.location=url:window.frames[_6bc.name].location=url;
}else{
}
return url;
};
function checkLocation(){
if(!_6c0){
var hsl=_6be.length;
var hash=getHash();
if((hash===_6b8||window.location.href==_6b7)&&(hsl==1)){
handleBackButton();
return;
}
if(_6bd.length>0){
if(_6bd[_6bd.length-1].urlHash===hash){
handleForwardButton();
return;
}
}
if((hsl>=2)&&(_6be[hsl-2])){
if(_6be[hsl-2].urlHash===hash){
handleBackButton();
return;
}
}
if(dojo.isSafari&&dojo.isSafari<3){
var _6cc=history.length;
if(_6cc>_6b6){
handleForwardButton();
}else{
if(_6cc<_6b6){
handleBackButton();
}
}
_6b6=_6cc;
}
}
};
back.init=function(){
console.log("back.init() !!!!!");
if(dojo.byId("dj_history")){
return;
}
var src=dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html");
document.write("<iframe style=\"border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;\" name=\"dj_history\" id=\"dj_history\" src=\""+src+"\"></iframe>");
};
back.setInitialState=function(args){
_6b9=createState(_6b7,args,_6b8);
};
back.addToHistory=function(args){
_6bd=[];
var hash=null;
var url=null;
if(!_6bc){
if(dojo.config["useXDomain"]&&!dojo.config["dojoIframeHistoryUrl"]){
console.debug("generic.back: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
_6bc=window.frames["dj_history"];
}
if(!_6bb){
_6bb=document.createElement("a");
dojo.body().appendChild(_6bb);
_6bb.style.display="none";
}
if(args["changeUrl"]){
hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(_6be.length==0&&_6b9.urlHash==hash){
_6b9=createState(url,args,hash);
return;
}else{
if(_6be.length>0&&_6be[_6be.length-1].urlHash==hash){
_6be[_6be.length-1]=createState(url,args,hash);
return;
}
}
_6c0=true;
setTimeout(function(){
setHash(hash);
_6c0=false;
},1);
_6bb.href=hash;
if(dojo.isIE){
url=loadIframeHistory();
var _6d2=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_6d4){
if(getHash()!=""){
setTimeout(function(){
setHash(hash);
},1);
}
_6d2.apply(this,[_6d4]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _6d5=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_6d7){
if(getHash()!=""){
setHash(hash);
}
if(_6d5){
_6d5.apply(this,[_6d7]);
}
};
if(args["forward"]){
args.forward=tfw;
}else{
if(args["forwardButton"]){
args.forwardButton=tfw;
}else{
if(args["handle"]){
args.handle=tfw;
}
}
}
}else{
if(!dojo.isIE){
if(!_6ba){
_6ba=setInterval(checkLocation,200);
}
}
}
}else{
url=loadIframeHistory();
}
_6be.push(createState(url,args,hash));
};
back.getStack=function(){
return _6be;
};
back._iframeLoaded=function(evt,_6d9){
var _6da=getUrlQuery(_6d9.href);
if(_6da==null){
if(_6be.length==1){
handleBackButton();
}
return;
}
if(_6bf){
_6bf=false;
return;
}
if(_6be.length>=2&&_6da==getUrlQuery(_6be[_6be.length-2].url)){
handleBackButton();
}else{
if(_6bd.length>0&&_6da==getUrlQuery(_6bd[_6bd.length-1].url)){
handleForwardButton();
}
}
};
})();
}
if(!dojo._hasResource["generic.flash.State"]){
dojo._hasResource["generic.flash.State"]=true;
dojo.provide("generic.flash.State");
generic.flash.State=function(_6db){
this.changeUrl=_6db;
};
dojo.extend(generic.flash.State,{back:function(){
console.log("back: ",this.changeUrl);
var resp=generic.flash.Api.flashCall("state",this.changeUrl);
generic.flash.State.showHistory();
},forward:function(){
console.log("forward: ",this.changeUrl);
var resp=generic.flash.Api.flashCall("state",this.changeUrl);
generic.flash.State.showHistory();
}});
generic.flash.State.getFragment=function(){
var f=window.location.href.split("#")[1];
return f?f:"/";
};
generic.flash.State.showHistory=function(){
if(dojo.byId("history_stack")){
var _6df=dojo.back.getStack();
var out="<b>History Stack:</b><br/>";
for(var i=0;i<_6df.length;i++){
var bm=_6df[i].urlHash;
out+="<span>"+bm+"</span><br/>";
}
dojo.byId("history_stack").innerHTML=out;
}else{
console.log("History Stack: ",dojo.back.getStack());
}
};
dojo.back=generic.back;
dojo.addOnLoad(function(){
if(dojo.global.generic.flash.Api.enableHistory){
var _6e3=generic.flash.State.getFragment();
dojo.back.setInitialState(new generic.flash.State(_6e3));
generic.flash.addLoadedListener(dojo.hitch(this,function(){
var resp=dojo.global.generic.flash.Api.flashCall("state",_6e3);
console.log("Sent flash initFragment: ",resp);
}));
}
});
}
if(!dojo._hasResource["generic.flash.ApiMethods"]){
dojo._hasResource["generic.flash.ApiMethods"]=true;
dojo.provide("generic.flash.ApiMethods");
dojo.declare("generic.flash.ApiMethods",null,{response:null,message:function(mess){
alert("message: "+mess);
return this.response.createResponse(1,mess);
},state:function(){
var args=arguments[0][0];
if(dojo.exists(args.action,dojo.back)){
var resp;
console.log("calling state["+args.action+"]");
if(args.fragment){
resp=dojo.back[args.action](new generic.flash.State(args.fragment));
}else{
if(args.action=="goBack"){
resp=window.history.go(-1);
}else{
if(args.action=="goForward"){
resp=window.history.go(1);
}
}
}
generic.flash.State.showHistory();
return this.response.createResponse(1,generic.flash.State.getFragment());
}else{
return this.response.createResponse(0,"Action "+args.action+" not allowed on history object.");
}
},cuePoint:function(){
var args=arguments[0];
console.log("publishing topic /flash/event/cuePoint with data: ",args);
dojo.publish("/flash/event/cuePoint",[args]);
var inc=dojo.toJson(args,true);
this.response.createResponse(1,args);
},cuePointProduct:function(args){
var _6eb=args[0].actions[0];
this.cuePoint(_6eb);
},alterCart:function(){
var args=arguments[0];
var _6ed=args[0].actions[0];
var _6ee="Cart.alterCart";
var self=this;
self.cartAction=_6ed.action;
self.actionPath=_6ed.path;
var req=new generic.jsonrpc();
dojo.publish("/page/cart/preAlterCart",[]);
var def=req.callRemote(_6ee,args);
def.addBoth(function(resp){
dojo.publish("/page/cart/alterCart",[args]);
console.log("publishing /page/cart/alterCart from flash api");
if(self.cartAction=="add"){
var _6f3=dojo.cookie("page_data");
if(_6f3&&_6f3!==null){
var _6f4=dojo.cookie.deserialize(_6f3);
var _6f5="cart.lpath";
_6f4[_6f5]=self.actionPath;
var nstr=dojo.cookie.serialize(_6f4,"perl");
try{
dojo.cookie.update("page_data",nstr,{path:"/"});
}
catch(e){
throw new Error("could not append to cookie 'page_data': "+e||e.message);
}
}
}
});
return this.response.createResponse(1,args);
},pageData:function(_6f7){
var args=_6f7[0];
var _6f9;
var pd=parent.page_data;
if(args&&args.query){
console.log("retrieving page_data with query: "+args.query);
var path=args.query.split(".");
var _6fc=path.length;
var _6fd=pd;
for(var i=0;i<_6fc;i++){
var key=path.shift();
_6fd=_6fd[key];
}
_6f9=_6fd;
}else{
_6f9=pd;
}
return this.response.createResponse(1,_6f9);
},popup:function(_700){
var args=_700[0];
console.log("creating popup");
var _702=["height","width","top","left","resizable","scrollbars","status","toolbar","menubar","location"];
var _703={location:null,height:500,width:500,top:25,left:25,resizable:"yes",scrollbars:"yes",status:"no",toolbar:"no",menubar:"no",name:"flash pop"};
var _704="";
for(var i=0;i<_702.length;i++){
var val;
var attr=_702[i];
if(args[attr]&&args[attr]!="undefined"){
val=args[attr];
}else{
val=_703[attr];
}
_704+=attr+"="+val+",";
}
_704=_704.substring(0,_704.length-1);
var win=window.open(args.location,args.name,_704);
if(!win){
alert("Unable to open new window.  Please allow popups for this domain.");
}
return this.response.createResponse(1,args.location);
},setElementSize:function(_709){
var args=_709[0];
function setSize(id,w,h){
var node=dojo.byId(id);
if(node){
node.style.width=w;
node.style.height=h;
}
console.log("node to resize: ",node);
var _70f=dojo.coords(node);
console.log("new w & h = ",_70f.w,", ",_70f.h);
};
function getType(_710){
var type="default";
var v=_710.toString();
if(v.search(/[0-9]%/)>0){
type="percent";
}else{
if(v=="window"||v=="document"){
type=v;
}
}
return type;
};
function getValueStr(_713,axis){
var type=getType(_713);
var _716;
switch(type){
case "percent":
_716=_713;
console.log("percent: valstr = "+_716+" for axis "+axis);
break;
case "window":
var _717;
if(axis=="w"){
if(typeof window.innerWidth!="undefined"){
_717=document.documentElement.clientWidth;
}else{
}
}else{
if(typeof window.innerHeight!="undefined"){
_717=window.innerHeight;
}else{
_717=document.documentElement.clientHeight;
}
}
_716=_717+"px";
console.log("window: valstr = "+_716+" for axis "+axis);
break;
case "document":
var _717;
if(axis=="w"){
_717=dojo.body().scrollWidth;
}else{
_717=dojo.body().scrollHeight;
}
_716=_717+"px";
console.log("document: valstr = "+_716+" for axis "+axis);
break;
default:
_716=_713+"px";
console.log("default: valstr = "+_716+" for axis "+axis);
}
return _716;
};
if(args.id=="productBrowser_resize"){
var vp=dijit.getViewport();
console.log("incoming h: ",args.h," viewport h: ",vp.h);
args.h=(vp.h>args.h)?vp.h:args.h;
console.log("final set h: ",args.h);
}
var wval=getValueStr(args.w,"w");
var hval=getValueStr(args.h,"h");
setSize(args.id,wval,hval);
return this.response.createResponse(1,args);
},cmCreatePageviewTag:function(args){
console.log("creating pageview tag: ",args);
var resp=dojo.global.cmCreatePageviewTag(args[0],args[1],args[2],args[3]);
console.log("cm response:");
return this.response.createResponse(1,"pageview tag created");
},cmCreateManualLinkClickTag:function(args){
dojo.global.cmCreateManualLinkClickTag(args[0],args[1],args[2]);
return this.response.createResponse(1,"link click tag created");
},cmCreatePageElementTag:function(args){
console.log("creating pageelement tag: ",args);
var resp=dojo.global.cmCreatePageElementTag(args[0],args[1],args[2],args[3],args[4]);
console.log("cm response:");
return this.response.createResponse(1,"Page Element tag created");
},cmCreateProductElementTag:function(args){
dojo.global.cmCreatePageElementTag(args[0],args[1],args[2],args[3],args[4]);
return this.response.createResponse(1,"Product Element tag created");
},cmCreateProductviewTag:function(args){
dojo.global.cmCreateProductviewTag(args[0],args[1],args[2]);
return this.response.createResponse(1,"productview tag created");
},cmCreateConversionEventTag:function(args){
dojo.global.cmCreateConversionEventTag(args[0],args[1],args[2],args[3]);
return this.response.createResponse(1,"conversion event tag created");
},__process:function(_723,args){
this.response=new generic.flash.ApiResponse({method:_723,req_args:args});
var resp=this[_723](args);
return resp;
}});
dojo.provide("generic.flash.ApiResponse");
dojo.declare("generic.flash.ApiResponse",null,{id:0,request:{},results:null,success:false,constructor:function(req){
this.request=req;
this.id=this.__genId();
},createResponse:function(_727,_728){
this.success=(_727)?true:false;
if(_728){
this.results=_728;
}else{
this.results=(this.success)?"Method call successful":"Method call failed";
}
var resp={id:this.id,success:this.success,request:this.request,results:this.results};
return resp;
},__genId:function(){
var d=new Date();
var uid=(d.getTime()).toString();
return uid;
}});
}
if(!dojo._hasResource["generic.flash.Api"]){
dojo._hasResource["generic.flash.Api"]=true;
dojo.provide("generic.flash.Api");
generic.flash.Api=new function(){
this.id=null;
this.initialized=false;
this.enableHistory=false;
this._flashReady=false;
this._pageReady=false;
this._initListeners=new Array();
this._isSwfObject=false;
this._swfObjectArgs=new Object();
this.registerSwf=function(id){
this.id=id;
this._initialize();
};
this.embedSwf=function(attr,_72e,eid,_730){
var rel=dojo.byId(eid);
if(!rel){
console.log("Element doesnt exist");
return;
}
console.log("g.f.A.embedSwf()");
this._isSwfObject=true;
this._flashReady=_730||this._flashReady;
this.id=eid;
this._swfObjectArgs={attributes:attr,params:_72e,eid:eid};
this._initialize();
};
this.removeSwf=function(){
var fid=this._swfObjectArgs.attributes.id;
console.log("remove event: ",fid);
generic.flash.removeSwfObject(fid);
};
this.isReady=function(){
return this._flashReady&&this._pageReady;
};
this.addOnInit=function(_733){
this._initListeners.push(_733);
};
this._initialize=function(){
console.log("g.f.A._initialize()!!");
generic.flash.addLoadedListener(dojo.hitch(this,function(){
console.log("flash ready");
this._flashReady=true;
if(this.isReady()){
this._loaded();
}
}));
if(this._isSwfObject){
generic.flash.embedSwfObject(this._swfObjectArgs);
}else{
generic.flash.setSwfObject(this.id);
}
dojo.connect(dojo,"loaded",this,function(){
this._pageReady=true;
if(this.isReady()){
this._loaded();
}
});
var self=this;
dojo.connect(window,"onunload",this,function(){
var fid=self._swfObjectArgs.attributes.id;
console.log("onunload event: ",fid);
generic.flash.removeSwfObject(fid);
},true);
};
this._loaded=function(){
this.initialized=true;
if(this._initListeners.length>0){
for(var i=0;i<this._initListeners.length;i++){
this._initListeners[i].call(null);
}
}
};
};
generic.flash.ApiMethods=new generic.flash.ApiMethods();
generic.flash.Api.jsCall=function(_737,args){
console.log("flash calling js method: ",_737," with args: ",args);
if(dojo.exists(_737,generic.flash.ApiMethods)){
var resp=generic.flash.ApiMethods.__process(_737,args);
console.log("method exsited, response is:");
return resp;
}else{
console.log(_737+": No such method exists");
return {success:false,results:"No such method exists"};
}
};
generic.flash.Api.flashCall=function(_73a,args){
var db="js calling flash method: "+_73a;
console.log(db);
var _73d=generic.flash.comm.flashCall(_73a,args);
return _73d;
};
generic.flash.Api.enableHistory=false;
}
if(!dojo._hasResource["dojox.flash"]){
dojo._hasResource["dojox.flash"]=true;
dojo.provide("dojox.flash");
}
if(!dojo._hasResource["generic.flashx._base"]){
dojo._hasResource["generic.flashx._base"]=true;
dojo.provide("generic.flashx._base");
generic.flashx=function(){
this._bkcompat=true;
this._objargs={};
this.xist={file:"/flash/expressInstall.swf",url:"http://www.adobe.com/go/getflashplayer",image:"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"};
this.attrDefaults={id:"flashhome",name:"flashhome",width:"100%",height:"100%",playerversion:"9.0.28"};
var self=this;
this.so=dojo.global.swfobject;
if(!this.so){
return;
}
this.so.customEmbed=function(_73f,_740,_741){
if(!_73f.data){
return;
}
var pd=dojo.global.page_data;
if(pd.env&&pd.env.maturity&&pd.env.maturity=="eng"){
_73f.data=_73f.data+"?t="+(new Date().getTime()).toString();
}
self._objargs.attrs=dojo.mixin(self.attrDefaults,_73f);
self._objargs.id=self._objargs.attrs.id;
self._objargs.params=_740;
self._objargs.repid=_741;
if(self.so.hasFlashPlayerVersion(self._objargs.attrs.playerversion)){
self.obj=self.so.createSWF(self._objargs.attrs,self._objargs.params,self._objargs.repid);
}else{
var _743=self._objargs.attrs.altcontentid;
var _744=dojo.query(".noflash",dojo.byId(_741));
var _745=_743?(dojo.byId(_743)?dojo.byId(_743):false):(!!_744.length?_744[0]:false);
if(_745){
_745.style.visibility="visible";
_745.style.display="block";
}
}
if(self.obj){
return true;
}
};
};
generic.flashx.prototype={flashLoaded:false,pageLoaded:false,enableHistory:false,embedSwf:function(_746,_747,_748){
if(!_746.data||!_748){
return;
}
dojo.connect(dojox.flash,"loaded",dojo.hitch(this,function(){
this.flashLoaded=true;
try{
}
catch(e){
console.log(e.message||e);
}
}));
this.so.addDomLoadEvent(dojo.hitch(this,function(){
this.pageLoaded=true;
var _749=this.so.customEmbed(_746,_747,_748);
if(_749){
dojox.flash.obj=this._objargs;
dojox.flash.obj.get=function(){
return dojo.byId(dojox.flash.obj.id);
};
dojox.flash.comm=new dojox.flash.Communicator();
}
}));
if(!dojo.exists("alterCart",generic.flash.ApiMethods)){
try{
generic.flash.ApiMethods=new generic.flash.ApiMethods();
}
catch(e){
console.log(e||e.message);
}
}
},jsCall:function(_74a,args){
if(dojo.exists(_74a,generic.flash.ApiMethods)){
try{
var resp=generic.flash.ApiMethods.__process(_74a,args);
return resp;
}
catch(e){
console.log(e.message||e);
}
}else{
return {success:false,results:"No such method exists"};
}
},flashCall:function(_74d,args){
var _74f=dojox.flash.comm.flashCall(_74d,args);
return _74f;
}};
dojo.setObject("generic.flash.Api",new generic.flashx());
}
if(!dojo._hasResource["generic.flashx"]){
dojo._hasResource["generic.flashx"]=true;
dojo.provide("generic.flashx");
}
if(!dojo._hasResource["generic.form.contextualOptions"]){
dojo._hasResource["generic.form.contextualOptions"]=true;
dojo.provide("generic.form.contextualOptions");
dojo.declare("generic.form.contextualOptions",null,{srcSelect:null,targetSelect:null,valueKey:null,labelKey:null,targetSelectOptions:new Object(),_selectsAreWidgets:false,constructor:function(args){
var _751=dijit.byId(args.srcSelectId);
var _752=dijit.byId(args.targetSelectId);
if(_751&&_752){
this._selectsAreWidgets=true;
var self=this;
_751.onChangeCallback=function(){
self.onChange();
};
}else{
_751=dojo.byId(args.srcSelectId);
_752=dojo.byId(args.targetSelectId);
if(_751&&_752){
this.handlers=[dojo.connect(this.srcSelect,"onchange",this,"onChange")];
}else{
console.log("site.form.contextualOptions: select element not found");
return false;
}
}
this.srcSelect=_751;
this.targetSelect=_752;
this.targetSelectOptions=args.targetSelectOptions;
if(args.valueKey){
this.valueKey=args.valueKey;
}
if(args.labelKey){
this.labelKey=args.labelKey;
}
},onChange:function(){
var _754=this.srcSelect.value;
var _755=this.targetSelect;
if(_754===""||_754===null){
return false;
}
this.removeOptions(_755);
this.addOptions(_755);
_755.updateIndices();
},getNewOptions:function(){
var _756=this.srcSelect.value;
return this.targetSelectOptions[_756];
},addOptions:function(_757){
var _758=this._selectsAreWidgets;
var _759=this.getNewOptions();
var _75a=(this.labelKey?this.labelKey:0);
var _75b=(this.valueKey?this.valueKey:1);
dojo.forEach(_759,function(_75c,ix){
if(_758){
_757.addOption(_75c[_75b],_75c[_75a]);
}else{
_757.options[ix]=new Option(_75c[_75a],_75c[_75b]);
}
});
},removeOptions:function(_75e){
var _75f=this._selectsAreWidgets;
if(_75f){
dojo.forEach(_75e.options,function(_760){
if(_760.value!==""){
_75e.removeOption(_760.value);
}
});
}else{
var l=(_75e.options.length-1);
var i;
for(i=l;i>=0;i--){
if(_75e.options[i].value!==""){
_75e.options[i]=null;
}
}
}
}});
}
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(_763){
_763.startup();
});
this.startupKeyNavChildren();
this.inherited(arguments);
},onExecute:function(){
},onCancel:function(_764){
},_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.keyCode){
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(_76d){
var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_76d))||dijit.Menu._iframeContentDocument(_76d)["__parent__"]||(_76d.name&&dojo.doc.frames[_76d.name])||null;
return win;
},_iframeContentDocument:function(_76f){
var doc=_76f.contentDocument||(_76f.contentWindow&&_76f.contentWindow.document)||(_76f.name&&dojo.doc.frames[_76f.name]&&dojo.doc.frames[_76f.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(_774){
var node=dojo.byId(_774);
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 _77e=dojo.coords(e.target,true);
x=_77e.x+10;
y=_77e.y+10;
}
var self=this;
var _780=dijit.getFocus(this);
function closeAndRestoreFocus(){
dijit.focus(_780);
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 _782=this.focusedChild;
var _783=_782.popup;
if(_783.isShowingNow){
return;
}
_783.parentMenu=this;
var self=this;
dijit.popup.open({parent:this,popup:_783,around:_782.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){
dijit.popup.close(_783);
_782.focus();
self.currentPopup=null;
}});
this.currentPopup=_783;
if(_783.focus){
_783.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\" "+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\"><div class=\"dijitMenuItemIcon ${iconClass}\" dojoAttachPoint=\"iconNode\"></div></td>"+"<td tabIndex=\"-1\" class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode,focusNode\" waiRole=\"menuitem\"></td>"+"<td class=\"dijitReset\" dojoAttachPoint=\"arrowCell\">"+"<div class=\"dijitMenuExpand\" dojoAttachPoint=\"expand\" style=\"display:none\">"+"<span class=\"dijitInline dijitArrowNode dijitMenuExpandInner\">+</span>"+"</div>"+"</td>"+"</tr>",label:"",iconClass:"",disabled:false,postCreate:function(){
dojo.setSelectable(this.domNode,false);
this.setDisabled(this.disabled);
if(this.label){
this.setLabel(this.label);
}
},_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.containerNode);
}
catch(e){
}
},_blur:function(){
dojo.removeClass(this.domNode,"dijitMenuItemHover");
},setLabel:function(_787){
this.containerNode.innerHTML=this.label=_787;
},setDisabled:function(_788){
this.disabled=_788;
dojo[_788?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.containerNode,"disabled",_788?"true":"false");
}});
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _789=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_789[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.addClass(this.expand,"dijitMenuExpandEnabled");
dojo.style(this.expand,"display","");
dijit.setWaiState(this.containerNode,"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;
}});
}
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(_78b,_78c){
var rxp="^";
var c=null;
for(var i=0;i<_78b.length;i++){
c=_78b.charAt(i);
switch(c){
case "\\":
rxp+=c;
i++;
rxp+=_78b.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(_78c){
return new RegExp(rxp,"i");
}else{
return new RegExp(rxp);
}
};
}
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(_793,_794){
var _795=[];
function createSortFunction(attr,dir){
return function(_798,_799){
var a=_794.getValue(_798,attr);
var b=_794.getValue(_799,attr);
var _79c=null;
if(_794.comparatorMap){
if(typeof attr!=="string"){
attr=_794.getIdentity(attr);
}
_79c=_794.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
}
_79c=_79c||dojo.data.util.sorter.basicComparator;
return dir*_79c(a,b);
};
};
for(var i=0;i<_793.length;i++){
sortAttribute=_793[i];
if(sortAttribute.attribute){
var _79e=(sortAttribute.descending)?-1:1;
_795.push(createSortFunction(sortAttribute.attribute,_79e));
}
}
return function(rowA,rowB){
var i=0;
while(i<_795.length){
var ret=_795[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(_7a3){
_7a3=_7a3||{};
if(!_7a3.store){
_7a3.store=this;
}
var self=this;
var _7a5=function(_7a6,_7a7){
if(_7a7.onError){
var _7a8=_7a7.scope||dojo.global;
_7a7.onError.call(_7a8,_7a6,_7a7);
}
};
var _7a9=function(_7aa,_7ab){
var _7ac=_7ab.abort||null;
var _7ad=false;
var _7ae=_7ab.start?_7ab.start:0;
var _7af=_7ab.count?(_7ae+_7ab.count):_7aa.length;
_7ab.abort=function(){
_7ad=true;
if(_7ac){
_7ac.call(_7ab);
}
};
var _7b0=_7ab.scope||dojo.global;
if(!_7ab.store){
_7ab.store=self;
}
if(_7ab.onBegin){
_7ab.onBegin.call(_7b0,_7aa.length,_7ab);
}
if(_7ab.sort){
_7aa.sort(dojo.data.util.sorter.createSortFunction(_7ab.sort,self));
}
if(_7ab.onItem){
for(var i=_7ae;(i<_7aa.length)&&(i<_7af);++i){
var item=_7aa[i];
if(!_7ad){
_7ab.onItem.call(_7b0,item,_7ab);
}
}
}
if(_7ab.onComplete&&!_7ad){
var _7b3=null;
if(!_7ab.onItem){
_7b3=_7aa.slice(_7ae,_7af);
}
_7ab.onComplete.call(_7b0,_7b3,_7ab);
}
};
this._fetchItems(_7a3,_7a9,_7a5);
return _7a3;
};
}
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(_7b4){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_7b4.url;
this._jsonData=_7b4.data;
this._datatypeMap=_7b4.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_7b5){
return dojo.date.stamp.fromISOString(_7b5);
}};
}
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=[];
},url:"",_assertIsItem:function(item){
if(!this.isItem(item)){
throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
}
},_assertIsAttribute:function(_7b7){
if(typeof _7b7!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(item,_7b9,_7ba){
var _7bb=this.getValues(item,_7b9);
return (_7bb.length>0)?_7bb[0]:_7ba;
},getValues:function(item,_7bd){
this._assertIsItem(item);
this._assertIsAttribute(_7bd);
return item[_7bd]||[];
},getAttributes:function(item){
this._assertIsItem(item);
var _7bf=[];
for(var key in item){
if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){
_7bf.push(key);
}
}
return _7bf;
},hasAttribute:function(item,_7c2){
return this.getValues(item,_7c2).length>0;
},containsValue:function(item,_7c4,_7c5){
var _7c6=undefined;
if(typeof _7c5==="string"){
_7c6=dojo.data.util.filter.patternToRegExp(_7c5,false);
}
return this._containsValue(item,_7c4,_7c5,_7c6);
},_containsValue:function(item,_7c8,_7c9,_7ca){
return dojo.some(this.getValues(item,_7c8),function(_7cb){
if(_7cb!==null&&!dojo.isObject(_7cb)&&_7ca){
if(_7cb.toString().match(_7ca)){
return true;
}
}else{
if(_7c9===_7cb){
return true;
}
}
});
},isItem:function(_7cc){
if(_7cc&&_7cc[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_7cc[this._itemNumPropName]]===_7cc){
return true;
}
}
return false;
},isItemLoaded:function(_7cd){
return this.isItem(_7cd);
},loadItem:function(_7ce){
this._assertIsItem(_7ce.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(_7d1,_7d2,_7d3){
var self=this;
var _7d5=function(_7d6,_7d7){
var _7d8=[];
if(_7d6.query){
var _7d9=_7d6.queryOptions?_7d6.queryOptions.ignoreCase:false;
var _7da={};
for(var key in _7d6.query){
var _7dc=_7d6.query[key];
if(typeof _7dc==="string"){
_7da[key]=dojo.data.util.filter.patternToRegExp(_7dc,_7d9);
}
}
for(var i=0;i<_7d7.length;++i){
var _7de=true;
var _7df=_7d7[i];
if(_7df===null){
_7de=false;
}else{
for(var key in _7d6.query){
var _7dc=_7d6.query[key];
if(!self._containsValue(_7df,key,_7dc,_7da[key])){
_7de=false;
}
}
}
if(_7de){
_7d8.push(_7df);
}
}
_7d2(_7d8,_7d6);
}else{
for(var i=0;i<_7d7.length;++i){
var item=_7d7[i];
if(item!==null){
_7d8.push(item);
}
}
_7d2(_7d8,_7d6);
}
};
if(this._loadFinished){
_7d5(_7d1,this._getItemsArray(_7d1.queryOptions));
}else{
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_7d1,filter:_7d5});
}else{
this._loadInProgress=true;
var _7e1={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _7e2=dojo.xhrGet(_7e1);
_7e2.addCallback(function(data){
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
_7d5(_7d1,self._getItemsArray(_7d1.queryOptions));
self._handleQueuedFetches();
}
catch(e){
self._loadFinished=true;
self._loadInProgress=false;
_7d3(e,_7d1);
}
});
_7e2.addErrback(function(_7e4){
self._loadInProgress=false;
_7d3(_7e4,_7d1);
});
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_7d5(_7d1,this._getItemsArray(_7d1.queryOptions));
}
catch(e){
_7d3(e,_7d1);
}
}else{
_7d3(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_7d1);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _7e6=this._queuedFetches[i];
var _7e7=_7e6.args;
var _7e8=_7e6.filter;
if(_7e8){
_7e8(_7e7,this._getItemsArray(_7e7.queryOptions));
}else{
this.fetchItemByIdentity(_7e7);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_7e9){
if(_7e9&&_7e9.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_7ea){
},_getItemsFromLoadedData:function(_7eb){
function valueIsAnItem(_7ec){
var _7ed=((_7ec!=null)&&(typeof _7ec=="object")&&(!dojo.isArray(_7ec))&&(!dojo.isFunction(_7ec))&&(_7ec.constructor==Object)&&(typeof _7ec._reference=="undefined")&&(typeof _7ec._type=="undefined")&&(typeof _7ec._value=="undefined"));
return _7ed;
};
var self=this;
function addItemAndSubItemsToArrayOfAllItems(_7ef){
self._arrayOfAllItems.push(_7ef);
for(var _7f0 in _7ef){
var _7f1=_7ef[_7f0];
if(_7f1){
if(dojo.isArray(_7f1)){
var _7f2=_7f1;
for(var k=0;k<_7f2.length;++k){
var _7f4=_7f2[k];
if(valueIsAnItem(_7f4)){
addItemAndSubItemsToArrayOfAllItems(_7f4);
}
}
}else{
if(valueIsAnItem(_7f1)){
addItemAndSubItemsToArrayOfAllItems(_7f1);
}
}
}
}
};
this._labelAttr=_7eb.label;
var i;
var item;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_7eb.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
item=this._arrayOfTopLevelItems[i];
addItemAndSubItemsToArrayOfAllItems(item);
item[this._rootItemPropName]=true;
}
var _7f7={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
for(key in item){
if(key!==this._rootItemPropName){
var _7f9=item[key];
if(_7f9!==null){
if(!dojo.isArray(_7f9)){
item[key]=[_7f9];
}
}else{
item[key]=[null];
}
}
_7f7[key]=key;
}
}
while(_7f7[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_7f7[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_7f7[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _7fa;
var _7fb=_7eb.identifier;
if(_7fb){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_7fb;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
_7fa=item[_7fb];
var _7fc=_7fa[0];
if(!this._itemsByIdentity[_7fc]){
this._itemsByIdentity[_7fc]=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: ["+_7fb+"].  Value collided: ["+_7fc+"]");
}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: ["+_7fb+"].  Value collided: ["+_7fc+"]");
}
}
}
}
}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){
_7fa=item[key];
for(var j=0;j<_7fa.length;++j){
_7f9=_7fa[j];
if(_7f9!==null&&typeof _7f9=="object"){
if(_7f9._type&&_7f9._value){
var type=_7f9._type;
var _7ff=this._datatypeMap[type];
if(!_7ff){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");
}else{
if(dojo.isFunction(_7ff)){
_7fa[j]=new _7ff(_7f9._value);
}else{
if(dojo.isFunction(_7ff.deserialize)){
_7fa[j]=_7ff.deserialize(_7f9._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(_7f9._reference){
var _800=_7f9._reference;
if(!dojo.isObject(_800)){
_7fa[j]=this._itemsByIdentity[_800];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _802=this._arrayOfAllItems[k];
var _803=true;
for(var _804 in _800){
if(_802[_804]!=_800[_804]){
_803=false;
}
}
if(_803){
_7fa[j]=_802;
}
}
}
if(this.referenceIntegrity){
var _805=_7fa[j];
if(this.isItem(_805)){
this._addReferenceToMap(_805,item,key);
}
}
}else{
if(this.isItem(_7f9)){
if(this.referenceIntegrity){
this._addReferenceToMap(_7f9,item,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_806,_807,_808){
},getIdentity:function(item){
var _80a=this._features["dojo.data.api.Identity"];
if(_80a===Number){
return item[this._itemNumPropName];
}else{
var _80b=item[_80a];
if(_80b){
return _80b[0];
}
}
return null;
},fetchItemByIdentity:function(_80c){
if(!this._loadFinished){
var self=this;
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_80c});
}else{
this._loadInProgress=true;
var _80e={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _80f=dojo.xhrGet(_80e);
_80f.addCallback(function(data){
var _811=_80c.scope?_80c.scope:dojo.global;
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
var item=self._getItemByIdentity(_80c.identity);
if(_80c.onItem){
_80c.onItem.call(_811,item);
}
self._handleQueuedFetches();
}
catch(error){
self._loadInProgress=false;
if(_80c.onError){
_80c.onError.call(_811,error);
}
}
});
_80f.addErrback(function(_813){
self._loadInProgress=false;
if(_80c.onError){
var _814=_80c.scope?_80c.scope:dojo.global;
_80c.onError.call(_814,_813);
}
});
}
}else{
if(this._jsonData){
self._getItemsFromLoadedData(self._jsonData);
self._jsonData=null;
self._loadFinished=true;
var item=self._getItemByIdentity(_80c.identity);
if(_80c.onItem){
var _816=_80c.scope?_80c.scope:dojo.global;
_80c.onItem.call(_816,item);
}
}
}
}else{
var item=this._getItemByIdentity(_80c.identity);
if(_80c.onItem){
var _816=_80c.scope?_80c.scope:dojo.global;
_80c.onItem.call(_816,item);
}
}
},_getItemByIdentity:function(_817){
var item=null;
if(this._itemsByIdentity){
item=this._itemsByIdentity[_817];
}else{
item=this._arrayOfAllItems[_817];
}
if(item===undefined){
item=null;
}
return item;
},getIdentityAttributes:function(item){
var _81a=this._features["dojo.data.api.Identity"];
if(_81a===Number){
return null;
}else{
return [_81a];
}
},_forceLoad:function(){
var self=this;
if(this._jsonFileUrl){
var _81c={url:self._jsonFileUrl,handleAs:"json-comment-optional",sync:true};
var _81d=dojo.xhrGet(_81c);
_81d.addCallback(function(data){
try{
if(self._loadInProgress!==true&&!self._loadFinished){
self._getItemsFromLoadedData(data);
self._loadFinished=true;
}
}
catch(e){
console.log(e);
throw e;
}
});
_81d.addErrback(function(_81f){
throw _81f;
});
}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["dojo.data.ItemFileWriteStore"]){
dojo._hasResource["dojo.data.ItemFileWriteStore"]=true;
dojo.provide("dojo.data.ItemFileWriteStore");
dojo.declare("dojo.data.ItemFileWriteStore",dojo.data.ItemFileReadStore,{constructor:function(_820){
this._features["dojo.data.api.Write"]=true;
this._features["dojo.data.api.Notification"]=true;
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
if(!this._datatypeMap["Date"].serialize){
this._datatypeMap["Date"].serialize=function(obj){
return dojo.date.stamp.toISOString(obj,{zulu:true});
};
}
if(_820&&(_820.referenceIntegrity===false)){
this.referenceIntegrity=false;
}
this._saveInProgress=false;
},referenceIntegrity:true,_assert:function(_822){
if(!_822){
throw new Error("assertion failed in ItemFileWriteStore");
}
},_getIdentifierAttribute:function(){
var _823=this.getFeatures()["dojo.data.api.Identity"];
return _823;
},newItem:function(_824,_825){
this._assert(!this._saveInProgress);
if(!this._loadFinished){
this._forceLoad();
}
if(typeof _824!="object"&&typeof _824!="undefined"){
throw new Error("newItem() was passed something other than an object");
}
var _826=null;
var _827=this._getIdentifierAttribute();
if(_827===Number){
_826=this._arrayOfAllItems.length;
}else{
_826=_824[_827];
if(typeof _826==="undefined"){
throw new Error("newItem() was not passed an identity for the new item");
}
if(dojo.isArray(_826)){
throw new Error("newItem() was not passed an single-valued identity");
}
}
if(this._itemsByIdentity){
this._assert(typeof this._itemsByIdentity[_826]==="undefined");
}
this._assert(typeof this._pending._newItems[_826]==="undefined");
this._assert(typeof this._pending._deletedItems[_826]==="undefined");
var _828={};
_828[this._storeRefPropName]=this;
_828[this._itemNumPropName]=this._arrayOfAllItems.length;
if(this._itemsByIdentity){
this._itemsByIdentity[_826]=_828;
_828[_827]=[_826];
}
this._arrayOfAllItems.push(_828);
var _829=null;
if(_825&&_825.parent&&_825.attribute){
_829={item:_825.parent,attribute:_825.attribute,oldValue:undefined};
var _82a=this.getValues(_825.parent,_825.attribute);
if(_82a&&_82a.length>0){
var _82b=_82a.slice(0,_82a.length);
if(_82a.length===1){
_829.oldValue=_82a[0];
}else{
_829.oldValue=_82a.slice(0,_82a.length);
}
_82b.push(_828);
this._setValueOrValues(_825.parent,_825.attribute,_82b,false);
_829.newValue=this.getValues(_825.parent,_825.attribute);
}else{
this._setValueOrValues(_825.parent,_825.attribute,_828,false);
_829.newValue=_828;
}
}else{
_828[this._rootItemPropName]=true;
this._arrayOfTopLevelItems.push(_828);
}
this._pending._newItems[_826]=_828;
for(var key in _824){
if(key===this._storeRefPropName||key===this._itemNumPropName){
throw new Error("encountered bug in ItemFileWriteStore.newItem");
}
var _82d=_824[key];
if(!dojo.isArray(_82d)){
_82d=[_82d];
}
_828[key]=_82d;
if(this.referenceIntegrity){
for(var i=0;i<_82d.length;i++){
var val=_82d[i];
if(this.isItem(val)){
this._addReferenceToMap(val,_828,key);
}
}
}
}
this.onNew(_828,_829);
return _828;
},_removeArrayElement:function(_830,_831){
var _832=dojo.indexOf(_830,_831);
if(_832!=-1){
_830.splice(_832,1);
return true;
}
return false;
},deleteItem:function(item){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
var _834=item[this._itemNumPropName];
var _835=this.getIdentity(item);
if(this.referenceIntegrity){
var _836=this.getAttributes(item);
if(item[this._reverseRefMap]){
item["backup_"+this._reverseRefMap]=dojo.clone(item[this._reverseRefMap]);
}
dojo.forEach(_836,function(_837){
dojo.forEach(this.getValues(item,_837),function(_838){
if(this.isItem(_838)){
if(!item["backupRefs_"+this._reverseRefMap]){
item["backupRefs_"+this._reverseRefMap]=[];
}
item["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(_838),attr:_837});
this._removeReferenceFromMap(_838,item,_837);
}
},this);
},this);
var _839=item[this._reverseRefMap];
if(_839){
for(var _83a in _839){
var _83b=null;
if(this._itemsByIdentity){
_83b=this._itemsByIdentity[_83a];
}else{
_83b=this._arrayOfAllItems[_83a];
}
if(_83b){
for(var _83c in _839[_83a]){
var _83d=this.getValues(_83b,_83c)||[];
var _83e=dojo.filter(_83d,function(_83f){
return !(this.isItem(_83f)&&this.getIdentity(_83f)==_835);
},this);
this._removeReferenceFromMap(item,_83b,_83c);
if(_83e.length<_83d.length){
this.setValues(_83b,_83c,_83e);
}
}
}
}
}
}
this._arrayOfAllItems[_834]=null;
item[this._storeRefPropName]=null;
if(this._itemsByIdentity){
delete this._itemsByIdentity[_835];
}
this._pending._deletedItems[_835]=item;
if(item[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,item);
}
this.onDelete(item);
return true;
},setValue:function(item,_841,_842){
return this._setValueOrValues(item,_841,_842,true);
},setValues:function(item,_844,_845){
return this._setValueOrValues(item,_844,_845,true);
},unsetAttribute:function(item,_847){
return this._setValueOrValues(item,_847,[],true);
},_setValueOrValues:function(item,_849,_84a,_84b){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
this._assert(dojo.isString(_849));
this._assert(typeof _84a!=="undefined");
var _84c=this._getIdentifierAttribute();
if(_849==_84c){
throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
}
var _84d=this._getValueOrValues(item,_849);
var _84e=this.getIdentity(item);
if(!this._pending._modifiedItems[_84e]){
var _84f={};
for(var key in item){
if((key===this._storeRefPropName)||(key===this._itemNumPropName)||(key===this._rootItemPropName)){
_84f[key]=item[key];
}else{
if(key===this._reverseRefMap){
_84f[key]=dojo.clone(item[key]);
}else{
_84f[key]=item[key].slice(0,item[key].length);
}
}
}
this._pending._modifiedItems[_84e]=_84f;
}
var _851=false;
if(dojo.isArray(_84a)&&_84a.length===0){
_851=delete item[_849];
_84a=undefined;
if(this.referenceIntegrity&&_84d){
var _852=_84d;
if(!dojo.isArray(_852)){
_852=[_852];
}
for(var i=0;i<_852.length;i++){
var _854=_852[i];
if(this.isItem(_854)){
this._removeReferenceFromMap(_854,item,_849);
}
}
}
}else{
var _855;
if(dojo.isArray(_84a)){
var _856=_84a;
_855=_84a.slice(0,_84a.length);
}else{
_855=[_84a];
}
if(this.referenceIntegrity){
if(_84d){
var _852=_84d;
if(!dojo.isArray(_852)){
_852=[_852];
}
var map={};
dojo.forEach(_852,function(_858){
if(this.isItem(_858)){
var id=this.getIdentity(_858);
map[id.toString()]=true;
}
},this);
dojo.forEach(_855,function(_85a){
if(this.isItem(_85a)){
var id=this.getIdentity(_85a);
if(map[id.toString()]){
delete map[id.toString()];
}else{
this._addReferenceToMap(_85a,item,_849);
}
}
},this);
for(var rId in map){
var _85d;
if(this._itemsByIdentity){
_85d=this._itemsByIdentity[rId];
}else{
_85d=this._arrayOfAllItems[rId];
}
this._removeReferenceFromMap(_85d,item,_849);
}
}else{
for(var i=0;i<_855.length;i++){
var _854=_855[i];
if(this.isItem(_854)){
this._addReferenceToMap(_854,item,_849);
}
}
}
}
item[_849]=_855;
_851=true;
}
if(_84b){
this.onSet(item,_849,_84d,_84a);
}
return _851;
},_addReferenceToMap:function(_85e,_85f,_860){
var _861=this.getIdentity(_85f);
var _862=_85e[this._reverseRefMap];
if(!_862){
_862=_85e[this._reverseRefMap]={};
}
var _863=_862[_861];
if(!_863){
_863=_862[_861]={};
}
_863[_860]=true;
},_removeReferenceFromMap:function(_864,_865,_866){
var _867=this.getIdentity(_865);
var _868=_864[this._reverseRefMap];
var _869;
if(_868){
for(_869 in _868){
if(_869==_867){
delete _868[_869][_866];
if(this._isEmpty(_868[_869])){
delete _868[_869];
}
}
}
if(this._isEmpty(_868)){
delete _864[this._reverseRefMap];
}
}
},_dumpReferenceMap:function(){
var i;
for(i=0;i<this._arrayOfAllItems.length;i++){
var item=this._arrayOfAllItems[i];
if(item&&item[this._reverseRefMap]){
console.log("Item: ["+this.getIdentity(item)+"] is referenced by: "+dojo.toJson(item[this._reverseRefMap]));
}
}
},_getValueOrValues:function(item,_86d){
var _86e=undefined;
if(this.hasAttribute(item,_86d)){
var _86f=this.getValues(item,_86d);
if(_86f.length==1){
_86e=_86f[0];
}else{
_86e=_86f;
}
}
return _86e;
},_flatten:function(_870){
if(this.isItem(_870)){
var item=_870;
var _872=this.getIdentity(item);
var _873={_reference:_872};
return _873;
}else{
if(typeof _870==="object"){
for(var type in this._datatypeMap){
var _875=this._datatypeMap[type];
if(dojo.isObject(_875)&&!dojo.isFunction(_875)){
if(_870 instanceof _875.type){
if(!_875.serialize){
throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: ["+type+"]");
}
return {_type:type,_value:_875.serialize(_870)};
}
}else{
if(_870 instanceof _875){
return {_type:type,_value:_870.toString()};
}
}
}
}
return _870;
}
},_getNewFileContentString:function(){
var _876={};
var _877=this._getIdentifierAttribute();
if(_877!==Number){
_876.identifier=_877;
}
if(this._labelAttr){
_876.label=this._labelAttr;
}
_876.items=[];
for(var i=0;i<this._arrayOfAllItems.length;++i){
var item=this._arrayOfAllItems[i];
if(item!==null){
var _87a={};
for(var key in item){
if(key!==this._storeRefPropName&&key!==this._itemNumPropName){
var _87c=key;
var _87d=this.getValues(item,_87c);
if(_87d.length==1){
_87a[_87c]=this._flatten(_87d[0]);
}else{
var _87e=[];
for(var j=0;j<_87d.length;++j){
_87e.push(this._flatten(_87d[j]));
_87a[_87c]=_87e;
}
}
}
}
_876.items.push(_87a);
}
}
var _880=true;
return dojo.toJson(_876,_880);
},_isEmpty:function(_881){
var _882=true;
if(dojo.isObject(_881)){
var i;
for(i in _881){
_882=false;
break;
}
}else{
if(dojo.isArray(_881)){
if(_881.length>0){
_882=false;
}
}
}
return _882;
},save:function(_884){
this._assert(!this._saveInProgress);
this._saveInProgress=true;
var self=this;
var _886=function(){
self._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
self._saveInProgress=false;
if(_884&&_884.onComplete){
var _887=_884.scope||dojo.global;
_884.onComplete.call(_887);
}
};
var _888=function(){
self._saveInProgress=false;
if(_884&&_884.onError){
var _889=_884.scope||dojo.global;
_884.onError.call(_889);
}
};
if(this._saveEverything){
var _88a=this._getNewFileContentString();
this._saveEverything(_886,_888,_88a);
}
if(this._saveCustom){
this._saveCustom(_886,_888);
}
if(!this._saveEverything&&!this._saveCustom){
_886();
}
},revert:function(){
this._assert(!this._saveInProgress);
var _88b;
for(_88b in this._pending._newItems){
var _88c=this._pending._newItems[_88b];
_88c[this._storeRefPropName]=null;
this._arrayOfAllItems[_88c[this._itemNumPropName]]=null;
if(_88c[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,_88c);
}
if(this._itemsByIdentity){
delete this._itemsByIdentity[_88b];
}
}
for(_88b in this._pending._modifiedItems){
var _88d=this._pending._modifiedItems[_88b];
var _88e=null;
if(this._itemsByIdentity){
_88e=this._itemsByIdentity[_88b];
}else{
_88e=this._arrayOfAllItems[_88b];
}
_88d[this._storeRefPropName]=this;
_88e[this._storeRefPropName]=null;
var _88f=_88e[this._itemNumPropName];
this._arrayOfAllItems[_88f]=_88d;
if(_88e[this._rootItemPropName]){
var i;
for(i=0;i<this._arrayOfTopLevelItems.length;i++){
var _891=this._arrayOfTopLevelItems[i];
if(this.getIdentity(_891)==_88b){
this._arrayOfTopLevelItems[i]=_88d;
break;
}
}
}
if(this._itemsByIdentity){
this._itemsByIdentity[_88b]=_88d;
}
}
var _892;
for(_88b in this._pending._deletedItems){
_892=this._pending._deletedItems[_88b];
_892[this._storeRefPropName]=this;
var _893=_892[this._itemNumPropName];
if(_892["backup_"+this._reverseRefMap]){
_892[this._reverseRefMap]=_892["backup_"+this._reverseRefMap];
delete _892["backup_"+this._reverseRefMap];
}
this._arrayOfAllItems[_893]=_892;
if(this._itemsByIdentity){
this._itemsByIdentity[_88b]=_892;
}
if(_892[this._rootItemPropName]){
this._arrayOfTopLevelItems.push(_892);
}
}
for(_88b in this._pending._deletedItems){
_892=this._pending._deletedItems[_88b];
if(_892["backupRefs_"+this._reverseRefMap]){
dojo.forEach(_892["backupRefs_"+this._reverseRefMap],function(_894){
var _895;
if(this._itemsByIdentity){
_895=this._itemsByIdentity[_894.id];
}else{
_895=this._arrayOfAllItems[_894.id];
}
this._addReferenceToMap(_895,_892,_894.attr);
},this);
delete _892["backupRefs_"+this._reverseRefMap];
}
}
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
return true;
},isDirty:function(item){
if(item){
var _897=this.getIdentity(item);
return new Boolean(this._pending._newItems[_897]||this._pending._modifiedItems[_897]||this._pending._deletedItems[_897]);
}else{
if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)){
return true;
}
return false;
}
},onSet:function(item,_899,_89a,_89b){
},onNew:function(_89c,_89d){
},onDelete:function(_89e){
}});
}
if(!dojo._hasResource["dojox.form.DropDownSelect"]){
dojo._hasResource["dojox.form.DropDownSelect"]=true;
dojo.provide("dojox.form.DropDownSelect");
dojo.declare("dojox.form.DropDownSelect",dijit.form.DropDownButton,{baseClass:"dojoxDropDownSelect",options:null,emptyLabel:"",_isPopulated:false,_addMenuItem:function(_89f){
var menu=this.dropDown;
if(!_89f.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _8a1=dojo.hitch(this,"setAttribute","value",_89f);
var mi=new dijit.MenuItem({id:this.id+"_item_"+_89f.value,label:_89f.label,onClick:_8a1});
menu.addChild(mi);
}
},_resetButtonState:function(){
var len=this.options.length;
var _8a4=this.dropDown;
dojo.forEach(_8a4.getChildren(),function(_8a5){
_8a5.destroyRecursive();
});
this._isPopulated=false;
this.setAttribute("readOnly",(len===1));
this.setAttribute("disabled",(len===0));
this.setAttribute("value",this.value);
},_updateSelectedState:function(){
var val=this.value;
if(val){
var _8a7=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_8a8){
dojo[_8a8.id===_8a7?"addClass":"removeClass"](_8a8.domNode,this.baseClass+"SelectedOption");
},this);
}
},addOption:function(_8a9,_8aa){
this.options.push(_8a9.value?_8a9:{value:_8a9,label:_8aa});
},removeOption:function(_8ab){
this.options=dojo.filter(this.options,function(node,idx){
return !((typeof _8ab==="number"&&idx===_8ab)||(typeof _8ab==="string"&&node.value===_8ab)||(_8ab.value&&node.value===_8ab.value));
});
},setOptionLabel:function(_8ae,_8af){
dojo.forEach(this.options,function(node){
if(node.value===_8ae){
node.label=_8af;
}
});
},destroy:function(){
if(this._labelHackHandle){
clearTimeout(this._labelHackHandle);
}
this.inherited(arguments);
},setLabel:function(_8b1){
_8b1="<div class=\" "+this.baseClass+"Label\">"+_8b1+"</div>";
if(this._labelHackHandle){
clearTimeout(this._labelHackHandle);
}
if(dojo.isFF===2){
this._labelHackHandle=setTimeout(dojo.hitch(this,function(){
this._labelHackHandle=null;
dijit.form.DropDownButton.prototype.setLabel.call(this,_8b1);
}),0);
}else{
this.inherited(arguments);
}
},setAttribute:function(attr,_8b3){
if(attr==="value"){
if(typeof _8b3==="string"){
_8b3=dojo.filter(this.options,function(node){
return node.value===_8b3;
})[0];
}
if(!_8b3){
_8b3=this.options[0]||{value:"",label:""};
}
this.value=_8b3.value;
if(this._started){
this.setLabel(_8b3.label||this.emptyLabel||"&nbsp;");
}
this._handleOnChange(_8b3.value);
_8b3=this.value;
}else{
this.inherited(arguments);
}
},_fillContent:function(){
var opts=this.options;
if(!opts){
opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){
if(node.getAttribute("type")==="separator"){
return {value:"",label:""};
}
return {value:node.getAttribute("value"),label:String(node.innerHTML)};
},this):[];
}
if(opts.length&&!this.value){
var si=this.srcNodeRef.selectedIndex;
this.value=opts[si!=-1?si:0].value;
}
this.dropDown=new dijit.Menu();
},postCreate:function(){
this.inherited(arguments);
var fx=function(){
dojo[this._opened?"addClass":"removeClass"](this.focusNode,this.baseClass+"ButtonOpened");
};
this.connect(this,"_openDropDown",fx);
this.connect(this,"_closeDropDown",fx);
this.connect(this,"onChange","_updateSelectedState");
this.connect(this,"addOption","_resetButtonState");
this.connect(this,"removeOption","_resetButtonState");
this.connect(this,"setOptionLabel","_resetButtonState");
},startup:function(){
this.inherited(arguments);
if(dojo.isFF===2){
setTimeout(dojo.hitch(this,this._resetButtonState),0);
}else{
this._resetButtonState();
}
},_populate:function(_8b9){
var _8ba=this.dropDown;
dojo.forEach(this.options,this._addMenuItem,this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
this._isPopulated=true;
if(_8b9){
_8b9.call(this);
}
},_toggleDropDown:function(){
var _8bb=this.dropDown;
if(_8bb&&!_8bb.isShowingNow&&!this._isPopulated){
this._populate(dojox.form.DropDownSelect.superclass._toggleDropDown);
}else{
this.inherited(arguments);
}
}});
}
if(!dojo._hasResource["generic.form.DropDownSelect"]){
dojo._hasResource["generic.form.DropDownSelect"]=true;
dojo.provide("generic.form.DropDownSelect");
dojo.declare("generic.form.DropDownSelect",dojox.form.DropDownSelect,{baseClass:"select_dropdown",width:"140",maxHeightIE:300,handlers:[],templateString:null,templateString:"<div id=\"${id}_container\" dojoAttachEvent=\"onkeydown:_onDropDownKeydown,onkeypress:_onKey\" waiRole=\"presentation\">\n    <div class=\"select_button\" type=\"${type}\" dojoAttachPoint=\"focusNode,titleNode\" dojoAttachEvent=\"onclick:_onDropDownClick,onmousedown:_onMouseDown,onblur:_onDropDownBlur\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\" tabIndex=0>\n        <div id=\"${id}_select_container\">\n            <div class=\"select_dropdown_arrow\" waiRole=\"presentation\"> </div>\n            <div dojoAttachPoint=\"containerNode,popupStateNode\" waiRole=\"presentation\" id=\"${id}_label\">\n                <div class=\"select_dropdownLabel\">${label}</div>\n            </div>\n        </div>\n    </div>\n    ${hiddenFieldString}\n</div>\n",templatePathMenu:dojo.moduleUrl("site","form/templates/Menu.html"),templatePathMenuItem:dojo.moduleUrl("site","form/templates/MenuItem.html"),anchors:null,_menuItems:[],indices:{},_selectedIdx:-1,useHiddenField:false,hiddenFieldId:"",hiddenFieldString:"",constructor:function(args){
if(args.width){
this.width=args.width;
}
this.useHiddenField=args.useHiddenField;
this.id=args.id;
this.name=(args.name?args.name:args.id);
},postMixInProperties:function(){
if(this.useHiddenField){
this.initHiddenField();
}
},initHiddenField:function(){
this.hiddenFieldId=this.id;
this.hiddenFieldString="<input value='' name='"+this.name+"' type='hidden' id='"+this.hiddenFieldId+"' />";
this.id=this.id+".display";
},postCreate:function(){
this.inherited(arguments);
this._setLabelWidth();
if(this.useHiddenField){
this.passValueToHidden();
}
},startup:function(){
this.inherited(arguments);
var _8bd=dojo.byId(this.dropDown.id);
_8bd.style.width=this.width+"px";
},onChange:function(){
this.inherited(arguments);
if(this.value&&this.value.length>0){
this._selectedIdx=this.indices[this.value];
}
if(this.useHiddenField){
this.passValueToHidden();
}
this.onChangeCallback();
},onChangeCallback:function(){
},_setLabelWidth:function(){
var node=dojo.byId(this.id+"_container");
node.style.width=(parseInt(this.width,10)+1)+"px";
var _8bf=this.width;
var _8c0=dojo.byId(this.id+"_select_container");
var _8c1=_8c0.childNodes.length;
for(var i=0;i<_8c1;i++){
var node=_8c0.childNodes[i];
if(dojo.hasClass(node,"field_left")||dojo.hasClass(node,"select_right")){
_8bf-=node.offsetWidth;
}
}
dojo.byId(this.id+"_label").style.width=_8bf+"px";
},passValueToHidden:function(){
var _8c3=dojo.byId(this.hiddenFieldId);
if(_8c3&&this.value&&(this.value!=="")){
_8c3.value=this.value;
}
},passValueFromHidden:function(){
var _8c4=dojo.byId(this.hiddenFieldId);
if(_8c4){
if(_8c4.value!==""&&_8c4.value!==null){
this.setAttribute("value",_8c4.value);
}
}
},_fillContent:function(){
var opts=this.options;
var _8c6={};
var _8c7={};
var idx=0;
var val="";
var _8ca="";
var akey="";
if(!opts){
opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){
val=node.getAttribute("value");
_8ca=String(node.innerHTML);
if(node.getAttribute("type")==="separator"||val.length==0||_8ca.length==0){
val="";
if(_8ca.length>0&&idx==0){
this.emptyLabel=_8ca;
}
}else{
akey=_8ca.substring(0,1).toLowerCase();
if(typeof (_8c6[akey])==="undefined"){
_8c6[akey]=idx;
}
_8c7[val]=idx;
}
idx++;
return {value:val,label:_8ca};
},this):[];
}
this.anchors=_8c6;
this.indices=_8c7;
if(opts.length&&!this.value){
var si=this.srcNodeRef.selectedIndex;
this.value=opts[si!=-1?si:0].value;
this._selectedIdx=si;
}
var _8ce=dojo.hitch(this,"_onMenuKey");
this.dropDown=new dijit.Menu({id:this.id+"_menu",templateString:null,templatePath:this.templatePathMenu,_onKeyPress:_8ce});
this.dropDown.menuOnClose=this.dropDown.onClose;
var _8cf=dojo.hitch(this,"_onMenuClose");
this.dropDown.onClose=function(e){
this.menuOnClose(e);
_8cf(e);
};
},updateIndices:function(){
var opts=this.options;
var _8d2={};
var _8d3={};
var akey="";
dojo.forEach(opts,function(opt,idx){
akey=opt.label.substring(0,1).toLowerCase();
if(typeof (_8d2[akey])==="undefined"){
_8d2[akey]=idx;
}
_8d3[val]=idx;
});
this.anchors=_8d2;
this.indices=_8d3;
},_resetButtonState:function(){
var len=this.options.length;
var _8d8=this.dropDown;
dojo.forEach(_8d8.getChildren(),function(_8d9){
_8d9.destroyRecursive();
});
this._isPopulated=false;
this.setAttribute("readOnly",(len===0));
this.setAttribute("disabled",(len===0));
this.setAttribute("value",this.value);
},_updateSelectedState:function(){
var val=this._selectedIdx;
if(val>=0){
var _8db=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_8dc){
dojo[_8dc.id===_8db?"addClass":"removeClass"](_8dc.domNode,this.baseClass+"SelectedOption");
},this);
}
},_populate:function(_8dd){
var _8de=this.dropDown;
dojo.forEach(this.options,function(_8df,idx){
this._addMenuItem(_8df,idx);
},this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
if(dojo.isIE==6){
var _8e1=dojo.byId(this.dropDown.id+"_container");
var _8e2=dojo.coords(_8e1);
if(_8e2.h>this.maxHeightIE){
_8e1.style.height=this.maxHeightIE+"px";
}
}
this._isPopulated=true;
if(_8dd){
_8dd.call(this);
}
},_addMenuItem:function(_8e3,idx){
var menu=this.dropDown;
if(!_8e3.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _8e6=dojo.hitch(this,"setAttribute","value",_8e3);
var _8e7=dojo.hitch(this,"_onMenuItemKey",idx);
var mi=new dijit.MenuItem({id:this.id+"_item_"+idx,label:_8e3.label,onClick:_8e6,templateString:null,templatePath:this.templatePathMenuItem,_onKeyPress:_8e7});
menu.addChild(mi);
this._menuItems[idx]=mi.id;
}
},_onDropDownClick:function(e){
var _8ea=true;
if(dojo.isIE>=7&&e.type!=="mousedown"){
_8ea=false;
}
if(_8ea){
this.inherited(arguments);
}
},_onMouseDown:function(e){
this._onMouse(e);
if(dojo.isIE>=7){
this._onDropDownClick(e);
}
},_onKey:function(e){
this.inherited(arguments);
this._getAnchor(e);
},_onMenuKey:function(e){
var _8ee=this._getAnchor(e);
if(_8ee>=0){
var item=dijit.byId(this._menuItems[_8ee]);
this.dropDown.focusChild(item);
}
},_onMenuItemKey:function(idx,e){
if(!e||typeof (e)==="undefined"){
return;
}
var _8f2;
switch(e.keyCode){
case dojo.keys.DOWN_ARROW:
_8f2=this._getNextFocusableIdx(idx,1);
this.setSelected(_8f2);
break;
case dojo.keys.UP_ARROW:
_8f2=this._getNextFocusableIdx(idx,-1);
this.setSelected(_8f2);
break;
}
},_getNextFocusableIdx:function(idx,_8f4,_8f5){
var _8f6;
var _8f7=idx+_8f4;
var _8f8=(this.options.length-1);
var _8f9=10;
var _8f5=(_8f5?_8f5:0);
if(_8f5>=_8f9){
return 0;
}
_8f5++;
if(_8f7>_8f8&&_8f4==1){
_8f7=0;
}else{
if(_8f7<0&&_8f4==-1){
_8f7=_8f8;
}
}
if(this.options[_8f7].value){
_8f6=_8f7;
}else{
_8f6=this._getNextFocusableIdx(_8f7,_8f4,_8f5);
}
return _8f6;
},_getAnchor:function(e){
var _8fb=this.anchors[e.keyChar];
if(_8fb>=0&&this.options[_8fb]){
if(this._started){
this.setSelected(_8fb);
}
return _8fb;
}else{
return -1;
}
},_onDropDownBlur:function(e){
this.inherited(arguments);
this.saveSelected();
},_onMenuClose:function(e){
this.saveSelected();
dojo.removeClass(this.domNode,this.baseClass+"Focused");
},setSelected:function(idx){
if(this.options[idx]){
this._selectedIdx=idx;
this.setLabel(this.options[idx].label);
}
},saveSelected:function(){
if(this._selectedIdx>=0&&this.options[this._selectedIdx]){
this.setAttribute("value",this.options[this._selectedIdx].value);
}
},reset:function(){
this._selectedIdx=0;
this.setAttribute("value",this.options[0].value);
if(this.useHiddenField&&this.value===""){
var _8ff=dojo.byId(this.hiddenFieldId);
_8ff.value="";
}
}});
}
if(!dojo._hasResource["generic.img"]){
dojo._hasResource["generic.img"]=true;
dojo.provide("generic.img");
dojo.declare("generic.img",null,{constructor:function(_900,_901){
this.node=_900;
var src=this.node.src;
var bits=src.match(/^(.*)_(on|off|sel|dis)\.(.*?)$/);
if(bits==null){
return false;
}
this.srcBase=bits[1];
this.srcExt=bits[3];
this.states=_901;
this.preload();
},preload:function(){
if(!this.states){
return;
}
for(var i=0;i<this.states.length;i++){
var _905=(this.states[i]!==""?"_":"");
var _906=this.srcBase+_905+this.states[i]+"."+this.srcExt;
if(this.states[i]!=="off"){
var pl=new Image();
pl.src=_906;
}
}
},changeSrc:function(_908){
if(!this.srcBase){
return;
}
this.node.src=this.srcBase+"_"+_908+"."+this.srcExt;
}});
dojo.provide("generic.rollover");
dojo.declare("generic.rollover",null,{constructor:function(_909,_90a){
var _90b=(_90a==null?_909:_90b);
this.img=new generic.img(_909,["off","on"]);
this.handlers=[dojo.connect(_90b,"onmouseover",this,"onMouseOver"),dojo.connect(_90b,"onmouseout",this,"onMouseOut")];
},onMouseOver:function(e){
if(!dojo.hasClass(e.currentTarget,"disable_rollover")){
this.img.changeSrc("on");
}
},onMouseOut:function(e){
if(!dojo.hasClass(e.currentTarget,"disable_rollover")){
this.img.changeSrc("off");
}
}});
}
if(!dojo._hasResource["dojox.layout.ContentPane"]){
dojo._hasResource["dojox.layout.ContentPane"]=true;
dojo.provide("dojox.layout.ContentPane");
(function(){
if(dojo.isIE){
var _90e=/(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;
}
var _90f=/(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;
function adjustCssPaths(_910,_911){
if(!_911||!_910){
return;
}
if(_90e){
_911=_911.replace(_90e,function(_912,pre,_914,url,post){
return pre+(new dojo._Url(_910,"./"+url).toString())+post;
});
}
return _911.replace(_90f,function(_917,_918,_919,_91a,_91b,_91c){
if(_919){
return "@import \""+(new dojo._Url(_910,"./"+_919).toString())+"\""+_91c;
}else{
return "url("+(new dojo._Url(_910,"./"+_91b).toString())+")"+_91c;
}
});
};
var _91d=/(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;
function adjustHtmlPaths(_91e,cont){
var url=_91e||"./";
return cont.replace(_91d,function(tag,_922,name,_924,_925,_926,_927,end){
return _922+(name?(name+"="+_924+(new dojo._Url(url,_925).toString())+_924):("style="+_926+adjustCssPaths(url,_927)+_926))+end;
});
};
function secureForInnerHtml(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
function snarfStyles(_92a,cont,_92c){
_92c.attributes=[];
return cont.replace(/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,function(_92d,_92e,_92f,_930,_931,href){
var i,attr=(_92e||_930||"").replace(/^\s*([\s\S]*?)\s*$/i,"$1");
if(_92f){
i=_92c.push(_92a?adjustCssPaths(_92a,_92f):_92f);
}else{
i=_92c.push("@import \""+href+"\";");
attr=attr.replace(/\s*(?:rel|href)=(['"])?[^\s]*\1\s*/gi,"");
}
if(attr){
attr=attr.split(/\s+/);
var _935={},tmp;
for(var j=0,e=attr.length;j<e;j++){
tmp=attr[j].split("=");
_935[tmp[0]]=tmp[1].replace(/^\s*['"]?([\s\S]*?)['"]?\s*$/,"$1");
}
_92c.attributes[i-1]=_935;
}
return "";
});
};
function snarfScripts(cont,_93a){
_93a.code="";
function download(src){
if(_93a.downloadRemote){
dojo.xhrGet({url:src,sync:true,load:function(code){
_93a.code+=code+";";
},error:_93a.errBack});
}
};
return cont.replace(/<script\s*(?![^>]*type=['"]?dojo)(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,function(_93d,_93e,src,code){
if(src){
download(src);
}else{
_93a.code+=code;
}
return "";
});
};
function evalInGlobal(code,_942){
_942=_942||dojo.doc.body;
var n=_942.ownerDocument.createElement("script");
n.type="text/javascript";
_942.appendChild(n);
n.text=code;
};
dojo.declare("dojox.layout.ContentPane",dijit.layout.ContentPane,{adjustPaths:false,cleanContent:false,renderStyles:false,executeScripts:true,scriptHasHooks:false,constructor:function(){
this.ioArgs={};
this.ioMethod=dojo.xhrGet;
this.onLoadDeferred=new dojo.Deferred();
this.onUnloadDeferred=new dojo.Deferred();
},postCreate:function(){
this._setUpDeferreds();
dijit.layout.ContentPane.prototype.postCreate.apply(this,arguments);
},onExecError:function(e){
},setContent:function(data){
if(!this._isDownloaded){
var _946=this._setUpDeferreds();
}
dijit.layout.ContentPane.prototype.setContent.apply(this,arguments);
return _946;
},cancel:function(){
if(this._xhrDfd&&this._xhrDfd.fired==-1){
this.onUnloadDeferred=null;
}
dijit.layout.ContentPane.prototype.cancel.apply(this,arguments);
},_setUpDeferreds:function(){
var _t=this,_948=function(){
_t.cancel();
};
var _949=(_t.onLoadDeferred=new dojo.Deferred());
var _94a=(_t._nextUnloadDeferred=new dojo.Deferred());
return {cancel:_948,addOnLoad:function(func){
_949.addCallback(func);
},addOnUnload:function(func){
_94a.addCallback(func);
}};
},_onLoadHandler:function(){
dijit.layout.ContentPane.prototype._onLoadHandler.apply(this,arguments);
if(this.onLoadDeferred){
this.onLoadDeferred.callback(true);
}
},_onUnloadHandler:function(){
this.isLoaded=false;
this.cancel();
if(this.onUnloadDeferred){
this.onUnloadDeferred.callback(true);
}
dijit.layout.ContentPane.prototype._onUnloadHandler.apply(this,arguments);
if(this._nextUnloadDeferred){
this.onUnloadDeferred=this._nextUnloadDeferred;
}
},_onError:function(type,err){
dijit.layout.ContentPane.prototype._onError.apply(this,arguments);
if(this.onLoadDeferred){
this.onLoadDeferred.errback(err);
}
},_prepareLoad:function(_94f){
var _950=this._setUpDeferreds();
dijit.layout.ContentPane.prototype._prepareLoad.apply(this,arguments);
return _950;
},_setContent:function(cont){
var _952=[];
if(dojo.isString(cont)){
if(this.adjustPaths&&this.href){
cont=adjustHtmlPaths(this.href,cont);
}
if(this.cleanContent){
cont=secureForInnerHtml(cont);
}
if(this.renderStyles||this.cleanContent){
cont=snarfStyles(this.href,cont,_952);
}
if(this.executeScripts){
var _t=this,code,_955={downloadRemote:true,errBack:function(e){
_t._onError.call(_t,"Exec","Error downloading remote script in \""+_t.id+"\"",e);
}};
cont=snarfScripts(cont,_955);
code=_955.code;
}
var node=(this.containerNode||this.domNode),pre=post="",walk=0;
switch(node.nodeName.toLowerCase()){
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);
cont=n.childNodes;
}
}
dijit.layout.ContentPane.prototype._setContent.call(this,cont);
if(this._styleNodes&&this._styleNodes.length){
while(this._styleNodes.length){
dojo._destroyElement(this._styleNodes.pop());
}
}
if(this.renderStyles&&_952&&_952.length){
this._renderStyles(_952);
}
if(this.executeScripts&&code){
if(this.cleanContent){
code=code.replace(/(<!--|(?:\/\/)?-->|<!\[CDATA\[|\]\]>)/g,"");
}
if(this.scriptHasHooks){
code=code.replace(/_container_(?!\s*=[^=])/g,dijit._scopeName+".byId('"+this.id+"')");
}
try{
evalInGlobal(code,(this.containerNode||this.domNode));
}
catch(e){
this._onError("Exec","Error eval script in "+this.id+", "+e.message,e);
}
}
},_renderStyles:function(_95b){
this._styleNodes=[];
var st,att,_95e,doc=this.domNode.ownerDocument;
var head=doc.getElementsByTagName("head")[0];
for(var i=0,e=_95b.length;i<e;i++){
_95e=_95b[i];
att=_95b.attributes[i];
st=doc.createElement("style");
st.setAttribute("type","text/css");
for(var x in att){
st.setAttribute(x,att[x]);
}
this._styleNodes.push(st);
head.appendChild(st);
if(st.styleSheet){
st.styleSheet.cssText=_95e;
}else{
st.appendChild(doc.createTextNode(_95e));
}
}
}});
})();
}
if(!dojo._hasResource["generic.layout.FixedPane"]){
dojo._hasResource["generic.layout.FixedPane"]=true;
dojo.provide("generic.layout.FixedPane");
dojo.declare("generic.layout.FixedPane",[dojox.layout.ContentPane,dijit._Templated],{parentNode:null,locusNode:null,position:null,closable:true,modal:true,modalMaskNode:null,_modalMask:null,fadeDuration:0,preloadMode:false,_showAnim:null,_hideAnim:null,_allFPs:[],_startZ:100,adjustPaths:false,extractContent:false,executeScripts:false,templateString:null,postCreate:function(){
this.inherited(arguments);
if(!this.srcNodeRef||this.srcNodeRef==null){
if(this.parentNode||this.parentNode!=null){
this.parentNode.appendChild(this.domNode);
}else{
dojo.body().appendChild(this.domNode);
}
}
if(!this.closable){
this.closeNode.style.display="none";
}
this._allFPs.push(this);
this.handlers=[dojo.connect(this,"onLoad",this,"_onLoad")];
},startup:function(){
if(this._started){
return;
}
this.inherited(arguments);
this._started=true;
this.absPosition=this.getPosition();
var s=this.domNode.style;
s.position="absolute";
s.top="-5000px";
s.left=this.absPosition.left;
if(s.display=="none"){
s.display="";
}
if(this.modal){
this.setModalMask();
var self=this;
dojo.connect(this._modalMask.domNode,"onclick",function(e){
self.close();
});
}else{
this.connect(this.domNode,"onmousedown","bringToTop");
}
if(!this.preloadMode){
s.top=this.absPosition.top;
dojo.publish("/page/status/overlayOpened",["open"]);
}
},_onLoad:function(){
},close:function(){
if(!this.closable){
return;
}
this.hide();
if(this.modal){
this._modalMask.hide();
}
dojo.publish("/page/status/overlayClosed",["close"]);
},hide:function(_967){
var s=this.domNode.style;
s.top="-5000px";
},show:function(_969){
var s=this.domNode.style;
s.top=this.absPosition.top;
if(this.modal){
this._modalMask.show();
}
dojo.publish("/page/status/overlayOpened",["open"]);
},getPosition:function(){
var pos={top:0,left:0};
if(this.position!=null){
pos=this.position;
}
if(this.locusNode){
var _96c=dojo.coords(this.locusNode);
pos.top+=_96c.y;
pos.left+=_96c.x;
if(this.parentNode||this.parentNode!=null){
var _96d=dojo.coords(this.parentNode);
pos.top-=_96d.y;
pos.left-=_96d.x;
}
}
var t=pos.top+"px";
var l=pos.left+"px";
return {top:t,left:l};
},setModalMask:function(){
if(!this.modalMaskNode){
return;
}
this._modalMask=new generic.layout._modalMask({domNode:this.modalMaskNode,paneParent:this.parentNode});
var s=this.domNode.style;
var nz=s.zIndex;
var _972=(this._startZ*10);
if(nz<_972||!nz||nz===""){
s.zIndex=_972;
}
this.modalMaskNode.style.zIndex=(s.zIndex-1);
this._modalMask.startup(this.preloadMode);
},bringToTop:function(){
var _973=dojo.filter(this._allFPs,function(i){
return i!==this;
},this);
_973.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_973.push(this);
dojo.forEach(_973,function(w,x){
w.domNode.style.zIndex=this._startZ+(x*2);
dojo.removeClass(w.domNode,"fixedPaneFocused");
},this);
dojo.addClass(this.domNode,"fixedPaneFocused");
},destroy:function(){
this._allFPs.splice(dojo.indexOf(this._allFPs,this),1);
this.inherited(arguments);
}});
dojo.declare("generic.layout._modalMask",null,{domNode:null,constructor:function(args){
this.domNode=args.domNode;
if(dojo.isIE&&(args.paneParent||args.paneParent!=null)){
this.paneParent=args.paneParent;
}
},getPageSize:function(){
var _97a,_97b;
if(window.innerHeight&&window.scrollMaxY){
_97a=document.body.scrollWidth;
_97b=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_97a=document.body.scrollWidth;
_97b=document.body.scrollHeight;
}else{
_97a=document.body.offsetWidth;
_97b=document.body.offsetHeight;
}
}
var _97c,_97d;
if(self.innerHeight){
_97c=self.innerWidth;
_97d=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_97c=document.documentElement.clientWidth;
_97d=document.documentElement.clientHeight;
}else{
if(document.body){
_97c=document.body.clientWidth;
_97d=document.body.clientHeight;
}
}
}
if(_97b<_97d){
pageHeight=_97d;
}else{
pageHeight=_97b;
}
if(_97a<_97c){
pageWidth=_97c;
}else{
pageWidth=_97a;
}
arrayPageSize=new Array(pageWidth,pageHeight,_97c,_97d);
return arrayPageSize;
},getPageScroll:function(){
var _97e;
if(self.pageYOffset){
_97e=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
_97e=document.documentElement.scrollTop;
}else{
if(document.body){
_97e=document.body.scrollTop;
}
}
}
arrayPageScroll=new Array("",_97e);
return arrayPageScroll;
},startup:function(_97f){
var s=this.domNode.style;
var _981=this.getPageSize();
if(dojo.isIE&&(this.paneParent||this.paneParent!=null)&&!this.domNode_IE){
this.domNode_IE=dojo.clone(this.domNode);
this.domNode.style.zIndex=0;
this.paneParent.style.zIndex=2;
this.paneParent.appendChild(this.domNode_IE);
var s_ie=this.domNode_IE.style;
s_ie.height=(_981[1]+"px");
if(!_97f){
s_ie.display="block";
}
}
s.height=(_981[1]+"px");
if(!_97f){
s.display="block";
}
},show:function(){
this.domNode.style.display="block";
if(this.domNode_IE){
this.domNode_IE.style.display="block";
}
},hide:function(){
this.domNode.style.display="none";
if(this.domNode_IE){
this.domNode_IE.style.display="none";
}
}});
}
if(!dojo._hasResource["generic.layout.IFramePane"]){
dojo._hasResource["generic.layout.IFramePane"]=true;
dojo.provide("generic.layout.IFramePane");
dojo.declare("generic.layout.IFramePane",generic.layout.FixedPane,{isLoaded:false,templateString:"<div id=\"${id}\">\n    <div dojoAttachPoint=\"canvas\">\n        <div dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n        </div>\n    </div>\n</div>\n",iframeHref:"",constructor:function(){
this.modal=true;
this.modalMaskNode=dojo.byId("modal_mask");
},startup:function(){
this.inherited(arguments);
var _983="<iframe id=\""+this.id+"_iframe\" name=\""+this.id+"_iframe\" allowTransparency=\"true\" src=\""+this.iframeHref+"\" frameborder=0></iframe>";
this.setContent(_983);
},postCreate:function(){
this.inherited(arguments);
},hide:function(_984){
var _985=frames[this.id+"_iframe"];
if(this.reloadIFrame){
_985.location.href=this.iframeHref;
}
this.inherited(arguments);
}});
dojo.provide("generic.layout.iFramePaneLink");
dojo.declare("generic.layout.iFramePaneLink",[dijit._Widget,dijit._Templated],{widgetsInTemplate:false,parentNode:null,linkId:"",iframeHref:"",position:{},size:{},displayText:"",popupClass:"popup",_enabled:true,templateString:"",templateString:"<a dojoAttachPoint=\"linkNode\" dojoAttachEvent=\"onclick:_onClick\" class=\"clickable\">${displayText}</a>\n",constructor:function(args){
if(args){
dojo.mixin(this,args);
}
this._init();
},_onClick:function(e){
if(!this._enabled){
return;
}
var _988=this.iFramePane.id+"_iframe";
var self=this;
if(!this.iFramePane._started){
this.iFramePane.startup();
var h=(dojo.isIE==0?((self.size.height-45)+"px"):"100%");
dojo.style(_988,{width:"100%",height:h});
dojo.addClass(dojo.byId(_988),this.popupClass);
dojo.publish("/page/status/iFramePaneSize",[self.size]);
}else{
this.iFramePane.show();
}
},_init:function(){
if(this.size.width===undefined){
this.size.width=dijit.getViewport().w-100;
}
if(this.size.height===undefined){
this.size.height=dijit.getViewport().h-100;
}
if(this.position.left===undefined){
this.position.left=dijit.getViewport().w/2-(this.size.width/2);
if(this.position.left<0){
this.position.left=0;
}
}
if(this.position.top===undefined){
this.position.top=dijit.getViewport().h/2-(this.size.height/2);
if(this.position.top<0){
this.position.top=0;
}
}
if(this.parentNode===undefined){
this.parentNode=dojo.query("body")[0];
}
if(this.reloadIFrame===undefined){
this.reloadIFrame=false;
}
var self=this;
this.iFramePane=new generic.layout.IFramePaneStyled({id:self.id+"_pane",position:self.position,iframeHref:self.iframeHref,parentNode:self.parentNode,reloadIFrame:self.reloadIFrame,locusNode:self.parentNode});
},destroyRecursive:function(){
this.iFramePane.destroyRecursive();
this.inherited(arguments);
}});
dojo.provide("generic.layout.IFramePaneStyled");
dojo.declare("generic.layout.IFramePaneStyled",generic.layout.IFramePane,{templateString:"",postMixInProperties:function(){
this.inherited(arguments);
this.hideStyle={position:"absolute",top:"-9999px"};
},paneSizeHandler:function(size){
this.domNode.style.width=size.width+"px";
this.domNode.style.height=size.height+"px";
if(dojo.isIE>6||dojo.isIE==0){
this.domNode.style.position="fixed";
}
},postCreate:function(){
this.inherited(arguments);
dojo.style(this.domNode,this.hideStyle);
dojo.subscribe("/page/status/iFramePaneSize",this,"paneSizeHandler");
},_onCloseClick:function(e){
this.close();
}});
}
if(!dojo._hasResource["generic.menu"]){
dojo._hasResource["generic.menu"]=true;
dojo.provide("generic.menu");
dojo.declare("generic.menu",null,{targetId:"",menuId:"",timer:null,timerDuration:300,constructor:function(args){
this.menuId=args.menu;
var _98f=dojo.byId(args.target);
var menu=dojo.byId(this.menuId);
if(menu&&_98f){
this.handlers=[dojo.connect(_98f,"onmouseover",this,"show"),dojo.connect(_98f,"onmouseout",this,"startHide"),dojo.connect(menu,"onmouseover",this,"keepMenu"),dojo.connect(menu,"onmouseout",this,"startHide")];
}
},show:function(e){
this.keepMenu(e);
var menu=dojo.byId(this.menuId);
dojo.removeClass(menu,"hidden");
},startHide:function(e){
this.timer=setTimeout(dojo.hitch(this,this.hide),this.timerDuration);
dojo.stopEvent(e);
},keepMenu:function(e){
clearTimeout(this.timer);
dojo.stopEvent(e);
},hide:function(){
var menu=dojo.byId(this.menuId);
dojo.addClass(menu,"hidden");
}});
dojo.declare("generic.menuItem",null,{domNode:null,rolloverClass:"",constructor:function(args){
this.domNode=args.domNode;
this.rolloverClass=args.rolloverClass;
if(this.domNode){
this.handlers=[dojo.connect(this.domNode,"onmouseover",this,"_onMouseOver"),dojo.connect(this.domNode,"onmouseout",this,"_onMouseOut")];
}
},_onMouseOver:function(e){
dojo.addClass(this.domNode,this.rolloverClass);
},_onMouseOut:function(e){
dojo.removeClass(this.domNode,this.rolloverClass);
}});
}
if(!dojo._hasResource["generic.pager"]){
dojo._hasResource["generic.pager"]=true;
dojo.provide("generic.pager");
dojo.declare("generic.pager",null,{list:[],current:1,per_page:10,constructor:function(args){
if(!args.list){
return;
}
dojo.mixin(this,args);
this._init();
},_init:function(){
this.pages=Math.ceil(this.list.length/this.per_page);
this.first=1;
this.last=this.pages;
var self=this;
this.from=(function(){
return (self.current-1)*self.per_page;
})();
this.to=(function(){
var tmp=self.from+self.per_page;
return (tmp<=self.list.length)?tmp:self.list.length;
})();
this.prev=(function(){
return self.hasPrev()?self.current-1:self.current;
})();
this.next=(function(){
return self.hasNext()?self.current+1:self.current;
})();
},setPage:function(p){
if(p&&typeof (p)=="string"){
p=parseInt(p);
}
if(p&&p!==this.current){
this.current=p;
this._init();
return this.getPage();
}
},getPage:function(){
return this.list.slice(this.from,this.to);
},hasNext:function(){
return (this.current<this.pages);
},hasPrev:function(){
return (this.current>1);
}});
}
if(!dojo._hasResource["site.bottomFixed"]){
dojo._hasResource["site.bottomFixed"]=true;
dojo.provide("site.bottomFixed");
dojo.declare("site.bottomFixed",null,{node:null,minTop:0,isLoaded:false,constructor:function(args){
if(!args.node){
return false;
}
this.node=args.node;
this.s=this.node.style;
this.fromBottom=parseInt(dojo.getComputedStyle(this.node).bottom,10);
if(args.minTop){
this.minTop=args.minTop;
this.hasMinTop=true;
}else{
this.hasMinTop=false;
}
this.position();
this.s.visibility="visible";
this.s.bottom="";
dojo.connect(window,"onscroll",this,"onScroll");
dojo.connect(window,"onresize",this,"onScroll");
this.loaded();
},loaded:function(){
this.isLoaded=true;
},position:function(){
var h=window.pageYOffset||document.documentElement.scrollTop;
h=(h?h:0);
var _99f=((h+document.documentElement.clientHeight)-(this.node.offsetHeight+this.fromBottom));
if(this.currentY!=_99f){
var _9a0=_99f;
if(this.hasMinTop&&(_9a0<=this.minTop)){
_9a0=this.minTop;
}
this.currentY=_9a0;
this.s.top=(_9a0+"px");
}
},onScroll:function(){
this.position();
}});
}
if(!dojo._hasResource["site.cart"]){
dojo._hasResource["site.cart"]=true;
dojo.provide("site.cart");
dojo.declare("site.cart",null,{confirmDuration:4000,constructor:function(){
},callRemote:function(_9a1,args,cb,eb){
var self=this;
var _9a6=new generic.jsonrpc();
var d=_9a6.callRemote(_9a1,args);
if(!eb){
d.addBoth(function(resp){
cb(resp);
});
}else{
d.addCallback(function(resp){
cb(resp);
});
d.addErrback(function(resp){
eb(resp);
});
}
},add:function(args){
args.action="add";
this.alter(args);
},remove:function(args){
args.action="remove";
this.alter(args);
},qty:function(args){
args.action="qty";
this.alter(args);
},alter:function(args){
if(!args.action||!args.cart){
return;
}
var _9af=[];
var self=this;
var _9b1=(args.type?args.type:"sku");
if(_9b1==="sku"){
dojo.forEach(args.skus,function(sku,idx){
_9af[idx]={action:args.action,cart:args.cart,type:"sku",path:sku};
if(args.action==="qty"&&args.qtys){
_9af[idx].qty=args.qtys[sku];
}
});
}else{
var _9b4;
if(_9b1==="giftcard"){
_9b4="giftcard_id";
}
dojo.forEach(args.skus,function(item,idx){
_9af[idx]={action:args.action,cart:args.cart,type:_9b1};
_9af[idx][_9b4]=item;
});
}
var _9b7=[{"actions":_9af}];
var _9b8=function(_9b9){
args.callback(_9b9);
var _9ba=window.parent||window;
_9ba.dojo.publish("/page/cart/alterCart",[{action:args.action,cartType:args.cart,resp:_9b9}]);
};
var _9bb=function(err){
args.errback(err);
var _9bd=window.parent||window;
_9bd.dojo.publish("/page/cart/alterCart",[{action:args.action,cartType:args.cart,resp:err}]);
};
this.callRemote("Cart.alterCart",_9b7,_9b8,_9bb);
},alterCartActOnList:function(args){
if(!args.action||!args.cart){
return;
}
var _9bf=[];
var self=this;
var _9c1=(args.type?args.type:"sku");
dojo.forEach(args.skus,function(sku,idx){
_9bf[idx]={path:sku};
});
var _9c4=[{"defaults":{"action":args.action,"cart":args.cart,"type":_9c1},"actions":_9bf}];
var _9c5=function(_9c6){
args.callback(_9c6);
var _9c7=window.parent||window;
_9c7.dojo.publish("/page/cart/alterCart",[{resp:_9c6}]);
};
var _9c8=function(err){
args.errback(err);
var _9ca=window.parent||window;
_9ca.dojo.publish("/page/cart/alterCart",[{resp:err}]);
};
this.callRemote("Cart.alterCartActOnList",_9c4,_9c5,_9c8);
},getContents:function(_9cb){
var self=this;
var _9cd=[{"cart":"checkout","params":{"item":["qty","total"],"sku":["path","sku_id","price","label","hexValue","product.shaded","product.product_id","product.name","product.subName","product.tagline","product.uri_spp","product.image_url_medium","product.image_url_small","category.category_id","product.www_pcode","product.short_desc"]}}];
var _9ce=function(_9cf){
_9cb(_9cf);
};
var _9d0=_9ce;
this.callRemote("Cart.contents",_9cd,_9ce,_9d0);
},getItemCount:function(type){
var t=(type==="favorites"?type:"order");
var _9d3=0;
var _9d4="cart."+t+".tqty";
var str=num="";
var _9d6=dojo.cookie("page_data");
try{
str=_9d6.split(_9d4)[1];
num=str.split("&")[1];
if(parseInt(num)){
_9d3=num;
}
}
catch(err){
}
console.log("cookie = "+_9d6+" itemCount = "+_9d3+" for type "+t);
return _9d3;
}});
}
if(!dojo._hasResource["site.checkoutItemHandler"]){
dojo._hasResource["site.checkoutItemHandler"]=true;
var controlWindow=window.parent||window;
dojo.provide("site.checkoutItemHandler");
dojo.declare("site.checkoutItemHandler",null,{cartType:"checkout",itemType:"sku",handlers:[],_removeIsEnabled:true,_updateQtyIsEnabled:true,selectQtyId:"",skuPath:"",_updateQtyIsEnabled:true,constructor:function(args){
this.selectQtyId=args.selectQty;
this.skuPath=args.skuPath;
this.itemType=(args.itemType?args.itemType:this.itemType);
var _9d8=dojo.byId(args.buttonRemove);
var _9d9=dojo.byId(this.selectQtyId);
if(_9d8){
this.handlers.push([dojo.connect(_9d8,"onclick",this,"_remove")]);
this.progress=new generic.progressOverlay({containerId:args.itemContainer,progressId:args.progressIndicator,offset:args.progressOffset});
}
if(_9d9){
var _9da=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_9da){
var self=this;
_9da.onChange=function(){
self._updateQty();
};
}else{
this.handlers.push([dojo.connect(_9d9,"onchange",this,"_updateQty")]);
}
}
},_remove:function(){
if(this._removeIsEnabled){
var self=this;
var cart=global.cartHandler;
var skus=[];
this.progress.start();
this._removeIsEnabled=false;
skus[0]=this.skuPath;
var _9df=function(_9e0){
controlWindow.dojo.publish("/checkout/cart/alterCart",[{actionType:"remove",callbackArgs:_9e0}]);
};
var _9e1=function(err){
self.progress.clear();
self._removeIsEnabled=true;
};
cart.remove({skus:skus,callback:_9df,errback:_9e1,cart:self.cartType,type:self.itemType});
}
},_updateQty:function(){
if(this._updateQtyIsEnabled){
var self=this;
var cart=global.cartHandler;
var skus=[];
var qtys={};
this.progress.start();
this._updateQtyIsEnabled=false;
skus[0]=this.skuPath;
var qty=this._getQty();
qtys[this.skuPath]=qty;
var _9e8=function(_9e9){
controlWindow.dojo.publish("/checkout/cart/alterCart",[{actionType:"qty",callbackArgs:_9e9}]);
};
var _9ea=function(err){
self.progress.clear();
self._updateQtyIsEnabled=true;
};
cart.qty({skus:skus,qtys:qtys,callback:_9e8,errback:_9ea,cart:self.cartType});
}
},_getQty:function(){
var qty="";
var _9ed=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_9ed){
qty=_9ed.value;
}else{
var _9ee=dojo.byId(this.selectQtyId);
qty=_9ee.options[_9ee.selectedIndex].value;
}
return qty;
}});
}
if(!dojo._hasResource["site.checkoutPageHandler"]){
dojo._hasResource["site.checkoutPageHandler"]=true;
dojo.provide("site.checkoutPageHandler");
dojo.declare("site.checkoutPageHandler",generic.checkoutPageHandler,{context:"content",submitValuesRpc:function(args){
var _9f0=new generic.jsonrpc();
var d=_9f0.callRemote(args.method,args.params);
var _9f2=(args.hasErrorChecking?args.hasErrorChecking:true);
if(args.progressArgs!==undefined){
var _9f3=new generic.progress(args.progressArgs);
_9f3.start();
}
this.toggleSubmitButton(false);
var self=this;
d.addCallback(function(_9f5){
if(args.callback){
var _9f6;
if(_9f2){
_9f6={progress:_9f3,error:_9f5.error,result:_9f5.result};
}else{
_9f6={progress:_9f3};
}
args.callback(_9f6);
}else{
_9f3.clear();
self.toggleSubmitButton(true);
}
});
d.addErrback(function(err){
console.log("===errBack===");
});
},showErrors:function(_9f8,_9f9,_9fa){
var _9fb={};
var _9fc=false;
var _9fd=this.getAltContext();
var _9fe=false;
try{
_9fe=_9fd.window.pghandler;
}
catch(error){
}
if(_9f8.messages.length>0){
var _9ff="<ul>";
var self=this;
var _a01={};
var _a02=dojo.byId("error_list");
var _a03=false;
var _a04=[];
var _a05=0;
_9fb.messages=[];
dojo.forEach(_9f8.messages,function(_a06,_a07){
_a03=false;
var _a08=(_a06.display_locations.length>0?_a06.display_locations:[self.context]);
dojo.forEach(_a08,function(_a09,_a0a){
if(_a09===self.context){
_a03=true;
}else{
if(_a09===_9fd.id){
_a04.push(_a07);
}
}
});
if(_a03){
_a05++;
_9ff+="<li>"+_a06.text+"</li>";
if(_a06.severity==="MESSAGE"){
_9fc=true;
dojo.publish("/jsonrpc/error/message",[_a06]);
}
}
_9fb.messages[_a07]={tag:_a06.tag,key:_a06.key};
});
_9ff+="</ul>";
if(_a05>0){
this.toggleErrorContainer(true);
_a02.innerHTML=_9ff;
}
if(!_9f9){
_a01.messages=[];
dojo.forEach(_a04,function(ix){
var er=_9f8.messages[ix];
_a01.messages.push(er);
});
if(_9fe&&_a01.messages.length>0){
_9fe.showErrors(_a01,this.context);
}
}
}else{
this.toggleErrorContainer(false);
if(!_9f9&&_9fe){
_9fe.toggleErrorContainer(false);
}
}
if(_9fc){
_9fb.blockingErrorFound=_9fc;
}else{
if(this.context==="content"){
this.toggleSubmitButton(true);
}else{
if(_9fe){
_9fe.toggleSubmitButton(true);
}
}
}
return _9fb;
},toggleErrorContainer:function(_a0d){
var node=dojo.byId("error_container");
if(!node){
return false;
}
var s=node.style;
if(_a0d){
s.display="block";
}else{
s.display="none";
}
},getAltContext:function(){
var c={};
if(this.context==="cart"){
c={id:"content",window:dojo.global.iframeHandler.frame};
}else{
if(this.context==="content"){
c={id:"cart",window:parent};
}
}
return c;
}});
}
if(!dojo._hasResource["site.form.DropDownSelect"]){
dojo._hasResource["site.form.DropDownSelect"]=true;
dojo.provide("site.form.DropDownSelect");
dojo.declare("site.form.DropDownSelect",generic.form.DropDownSelect,{_setLabelWidth:function(){
}});
}
if(!dojo._hasResource["site.form.Form"]){
dojo._hasResource["site.form.Form"]=true;
dojo.provide("site.form.Form");
dojo.declare("site.form.Form",null,{formId:"",hasFieldsLabeledByValue:false,fieldObjs:{},constructor:function(args){
this.formId=args.id;
this.hasFieldsLabeledByValue=this.initFieldLabels(args.labeledByValueClass);
var form=dojo.byId(this.formId);
if(!form){
return;
}
var self=this;
form.onsubmit=function(){
try{
return self._onSubmit(this);
}
catch(err){
console.log("err = "+err);
return false;
}
};
},initFieldLabels:function(_a14){
var _a15=dojo.query("."+_a14,this.formId);
var self=this;
var _a17=(_a15.length>0?true:false);
dojo.forEach(_a15,function(_a18){
if(_a18.type==="text"||_a18.type==="password"){
var val=_a18.value;
var _a1a=_a18.title;
self.fieldObjs[_a18.id]=new site.form.FieldLabel({field:_a18,label:_a1a});
}
});
return _a17;
},_onSubmit:function(form){
var _a1c=this.fieldObjs;
for(var id in _a1c){
var _a1e=dojo.byId(id);
var _a1f=_a1c[id].label;
if(_a1e.value===_a1f){
_a1e.value="";
}
}
},resetLabels:function(){
var _a20=this.fieldObjs;
for(var id in _a20){
_a20[id].setLabelState();
}
}});
dojo.declare("site.form.FieldLabel",null,{field:null,fieldPswdDisplay:null,label:"",ftype:"text",hasValue:false,_hasMaxlengthDisplay:false,_maxlength:null,constructor:function(args){
this.field=args.field;
this.label=args.label;
var _a23=this.field;
this.ftype=dojo.attr(this.field,"type");
if(this.ftype==="password"){
this.fieldPswdDisplay=dojo.byId(this.field.id+".label");
if(!this.fieldPswdDisplay){
return;
}
_a23=this.fieldPswdDisplay;
}
var _a24=this.field.maxLength;
var _a25=this.label.length;
if((_a24>0)&&(_a24<_a25)){
this._maxlength={};
this._hasMaxlengthDisplay=true;
this._maxlength.data=_a24;
this._maxlength.display=_a25;
}
this.handlers=[dojo.connect(_a23,"onfocus",this,"_onFocus"),dojo.connect(this.field,"onblur",this,"_onBlur")];
this.setLabelState();
},setLabelState:function(){
var val=this.field.value;
if((val.length>0)&&(val!==" ")&&(val!==this.label)){
this.hasValue=true;
}else{
this.hasValue=false;
this.showLabel();
}
},_onFocus:function(){
if(!this.hasValue){
this.clearField();
}
},_onBlur:function(){
this.setLabelState();
},showLabel:function(){
if(this.ftype==="password"){
this.field.style.display="none";
this.fieldPswdDisplay.style.display="block";
}else{
if(this._hasMaxlengthDisplay){
this.field.maxLength=this._maxlength.display;
}
this.field.value=this.label;
}
},clearField:function(){
if(this.ftype==="password"){
this.field.style.display="block";
this.field.focus();
this.fieldPswdDisplay.style.display="none";
}else{
this.field.value="";
if(this._hasMaxlengthDisplay){
this.field.maxLength=this._maxlength.data;
}
}
}});
}
if(!dojo._hasResource["site.globalnav.Accordion"]){
dojo._hasResource["site.globalnav.Accordion"]=true;
dojo.provide("site.globalnav.Accordion");
dojo.declare("site.globalnav.Accordion",[dijit._Widget,dijit._Container,dijit._Contained,dijit._Templated],{templateString:"<li id=\"${id}\">\n\t<img src=\"${hdPath}\" alt=\"${displayName}\" id=\"${id}_hd\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,ondijitclick:onClick\" class=\"accordion_hd clickable\" height=\"18\"><br />\n\t<ul id=\"${id}_sub\" class=\"accordion_content\" style=\"display:none;\" dojoAttachPoint=\"containerNode\">\n\t</ul>\n</li>\n",templateType:"",isContainer:true,hasLoaded:false,parentId:"",displayName:"",hdPath:"",hdImg:{},isOpen:false,activeSubItemId:"",durationOpen:400,durationClose:300,durationFade:300,postMixInProperties:function(){
if(this.templateType&&this.templateType!==""){
var path="globalnav/templates/"+this.templateType+".html";
this.templatePath=dojo.moduleUrl("site",path);
}
this.inherited(arguments);
},postCreate:function(){
var _a28=this.getParent();
if(this.hasLoaded){
if(_a28){
_a28.addChild(this.id);
}
this.startup();
}
},startup:function(){
var _a29=dojo.byId(this.id+"_hd");
this.hdImg=new generic.img(_a29,["off","on","sel"]);
},getParent:function(){
var _a2a=(dijit.byId(this.parentId));
var _a2b=(_a2a!=null?_a2a:this.inherited(arguments));
return _a2b;
},addSubItem:function(node){
dojo.place(node,this.containerNode,"last");
},onClick:function(){
var _a2d=this.getParent();
if(_a2d){
_a2d.onChildClick(this.id);
}
if(this.isOpen){
this.close();
}else{
this.open();
}
},open:function(){
if(this.hdImg){
this.hdImg.changeSrc("sel");
}
this._showSubNav();
this._setActive(true);
dojo.publish("/panelnav/event/show",[{type:"accordion",id:this.id,parentId:this.parentId,displayName:this.displayName}]);
},close:function(_a2e){
if(this.activeSubItemId){
var item=dijit.byId(this.activeSubItemId);
item.close();
}
if(this.id!==_a2e){
if(this.hdImg){
this.hdImg.changeSrc("off");
}
this._hideSubNav();
this._setActive(false);
dojo.publish("/panelnav/event/hide",[{type:"accordion",id:this.id,parentId:this.parentId}]);
}
},_setActive:function(_a30){
var _a31=this.getParent();
this.isOpen=_a30;
if(_a31){
if(_a30==true){
_a31.activeItemId=this.id;
}else{
if(_a31.activeItemId===this.id){
_a31.activeItemId="";
}
}
}
},_showSubNav:function(){
var node=this.containerNode;
var s=node.style;
dojo.fx.chain([dojo.animateProperty({node:node,duration:this.durationOpen,beforeBegin:function(){
dojo.style(node,"opacity","0");
},properties:{height:{start:function(){
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s.height="1px";
s.display="";
s.visibility="";
return 1;
}else{
var h=dojo.style(node,"height");
return Math.max(h,1);
}
},end:function(){
return node.scrollHeight;
},unit:"px"}}}),dojo.fadeIn({node:node,duration:this.durationFade})]).play();
},_hideSubNav:function(){
var node=this.containerNode;
var s=node.style;
dojo.fadeOut({node:node,duration:this.durationFade}).play();
dojo.animateProperty({node:node,duration:this.durationClose,properties:{height:{start:function(){
return s.height;
},end:function(){
s.overflow="hidden";
return 1;
}}},onEnd:function(){
s.display="none";
}}).play();
},_onMouseOver:function(e){
if(dojo.exists("changeSrc",this.hdImg)){
if(!this.isOpen){
this.hdImg.changeSrc("on");
}
}
},_onMouseOut:function(e){
if(dojo.exists("changeSrc",this.hdImg)){
if(!this.isOpen){
this.hdImg.changeSrc("off");
}
}
}});
}
if(!dojo._hasResource["site.productButton"]){
dojo._hasResource["site.productButton"]=true;
dojo.provide("site.productButton");
dojo.declare("site.productButton",null,{cartType:"checkout",cartAction:"add",cartHandler:"",skus:[],valueField:null,_enabled:true,constructor:function(args){
if(args){
dojo.mixin(this,args);
}
if((typeof (args.syndicated)!="undefined")&&args.syndicated==1){
this.cartType="syndicated";
}
this.cartHandler=global.cartHandler;
var _a3a=(args.method?args.method:"alterCart");
if(args.node&&this[_a3a]){
dojo.connect(args.node,"click",this,_a3a);
}
if(args.progressIndicator){
this.progress=new generic.progress({containerId:args.node.id,progressId:args.progressIndicator});
}
},alterCart:function(e){
if(!this._enabled){
return;
}
var self=this;
var sku=(this.valueField?this.valueField.value:e.target.value);
if(sku){
this._enabled=false;
if(this.progress){
this.progress.start();
}
var _a3e=function(resp){
self.callback(resp);
self._enabled=true;
if(self.progress){
self.progress.clear();
}
};
var _a40=function(err){
console.log("error adding to bag: "+err);
self.errback(err);
self._enabled=true;
if(self.progress){
self.progress.clear();
}
};
this.cartHandler.alter({action:this.cartAction,cart:this.cartType,skus:[sku],callback:_a3e,errback:_a40});
}
},alterCartActOnList:function(){
if(!this._enabled){
return;
}
if(this.skus.length<1){
return;
}
var self=this;
this._enabled=false;
if(this.progress){
this.progress.start();
}
var _a43=function(resp){
self.callback(resp);
self._enabled=true;
if(self.progress){
self.progress.clear();
}
};
var _a45=function(err){
self.errback(err);
console.log("error adding to bag: "+err);
self._enabled=true;
if(self.progress){
self.progress.clear();
}
};
this.cartHandler.alterCartActOnList({action:this.cartAction,cart:this.cartType,skus:this.skus,callback:_a43,errback:_a45});
},callback:function(){
},errback:function(){
}});
}
if(!dojo._hasResource["site.popupMessage"]){
dojo._hasResource["site.popupMessage"]=true;
dojo.provide("site.popupMessage");
dojo.declare("site.popupMessage",null,{is_open:false,displayDuration:null,position:{},constructor:function(args){
if(!args.popup){
return false;
}
this.popup=args.popup;
this.displayDuration=args.displayDuration;
if(args.trigger){
dojo.connect(args.trigger,"onclick",this,"show");
}
if(args.buttonClose){
this.buttonClose=(args.buttonClose?args.buttonClose:null);
dojo.connect(this.buttonClose,"onclick",this,"close");
}
if(args.position){
if(args.position.top){
this.position.top=args.position.top;
}
if(args.position.left){
this.position.left=args.position.left;
}
}
},open:function(){
if(this.is_open){
return;
}
var t=(this.position.top?this.position.top:"0");
var l=(this.position.left?this.position.left:"0");
dojo.style(this.popup,"top",t);
dojo.style(this.popup,"left",l);
this.is_open=true;
},show:function(){
if(this.is_open){
return;
}
this.open();
if(this.displayDuration){
var self=this;
var _a4b=function(){
clearTimeout(_a4c);
self.close();
};
var _a4d=this.displayDuration;
var _a4c=setTimeout(_a4b,_a4d);
}
},close:function(){
dojo.style(this.popup,"left","-10000px");
this.is_open=false;
}});
}
if(!dojo._hasResource["site.layout.ProductMessage"]){
dojo._hasResource["site.layout.ProductMessage"]=true;
dojo.provide("site.layout.ProductMessage");
dojo.declare("site.layout.ProductMessage",[dijit._Widget,dijit._Templated,site.popupMessage],{templateString:"",baseClass:"",widgetsInTemplate:false,itemCount:0,constructor:function(){
},postCreate:function(){
this.popup=this.containerNode;
},show:function(resp){
if(this.is_open){
return;
}
this._updateDisplay(resp);
var t=this._getTop();
this.position={top:t};
this.inherited(arguments);
},_getTop:function(){
var t,h=0;
h=this.containerNode.offsetHeight;
t=(h*-1);
t=t.toString()+"px";
return t;
},getErrors:function(_a52){
var _a53;
var key;
if(_a52&&_a52.error){
_a53={};
var _a55=_a52.error.messages;
for(var i=0;i<_a55.length;i++){
if(_a55[i].text){
key=_a55[i].key;
_a53[key]=_a55[i];
}
}
}
return _a53;
}});
dojo.declare("site.layout.CartAdd",site.layout.ProductMessage,{templateString:"<div class=\"pop_wrapper\">\n\t<div class=\"pop_prod pop_container\" dojoattachpoint=\"containerNode\">\n\t<img src=\"${smooshPath}\" width=\"56\" height=\"56\" alt=\"\" class=\"thumb\" id=\"smooshImg_${id}\"  style=\"background-color: ${hex};\" />\n\t\t<div class=\"pop_desc\">\n\t\t\t<span class=\"pop_title\">${prodName}</span>\n            <span dojoattachpoint=\"inventoryStatusNode\" class=\"pop_inv_status\"></span>\n\t\t\t<p>\n                <span dojoattachpoint=\"swatchTitleNode\"> </span> \n                <span dojoattachpoint=\"finishNameNode\"> </span>\n            </p>\t\t\n\t\t\t${price}\n\t\t</div>\n\t\t<a href=\"javascript:void(0);\" dojoattachevent=\"onclick:close\" class=\"pop_close\"></a>\n\t\t<div class=\"pop_btn_container\">\n\t\t\t<input class=\"pop_remove_btn hidden\" type=\"image\" src=\"/account/images/btn/btn_pop_remove_off.gif\" width=\"64\" height=\"13\" alt=\"Remove\" name=\"btn_favorites_remove_${id}\" id=\"btn_favorites_remove_${id}\" value=\"\" dojoattachpoint=\"removeNode\" />\n\t\t\t<input class=\"pop_add_btn\" type=\"image\" src=\"/images/popup/btn_add_to_bag.gif\" width=\"93\" height=\"22\" alt=\"Add to Bag\" name=\"prod_sku_${id}\" id=\"prod_sku_${id}\" value=\"\" dojoattachpoint=\"addToBagNode\" />\n\t\t</div>\n\t</div>\n</div>\n",is_shaded:false,_enabled:true,sku:null,prodName:"",smooshPath:"",hex:"",price:"",postCreate:function(){
this.inherited(arguments);
this.smooshNode=dojo.byId(this.smooshId);
var _a57=dojo.byId(this.skuFieldId);
var self=this;
if(_a57){
var _a59=new site.productButton({node:_a57,callback:function(resp){
if(self.callback){
self.callback(resp);
}
self.close();
self.cartConfirm.show(resp);
}});
}
dojo.subscribe("/productmessage/cartadd/show",this,function(){
if(self.is_open){
self.close();
}
});
},setConfirmProperties:function(args){
this.cartConfirm.setDisplayProperties(args);
},show:function(){
dojo.publish("/productmessage/cartadd/show");
this.inherited(arguments);
},_updateDisplay:function(){
if(this.smooshNode){
this.smooshNode.style.backgroundColor=this.sku.color[0];
var _a5c=this.sku.smoosh;
this.smooshNode.src=_a5c.replace(/168x168/g,"56x56");
}
this.swatchTitleNode.innerHTML=this.sku.shade_name;
var _a5d=this.sku.inventory_status;
if(_a5d==1){
this.inventoryStatusNode.innerHTML="";
this.addToBagNode.style.display="";
this.containerNode.style.paddingBottom=0;
}else{
if(_a5d==2||_a5d==3||_a5d==7){
this.inventoryStatusNode.innerHTML=this.sku.inventory_status_message;
this.addToBagNode.style.display="none";
this.containerNode.style.paddingBottom=7+"px";
}else{
this.inventoryStatusNode.innerHTML="";
this.addToBagNode.style.display="none";
this.containerNode.style.paddingBottom=7+"px";
}
}
this.finishNameNode.innerHTML=(this.sku.finish?"("+this.sku.finish+")":"");
}});
dojo.declare("site.layout.CartAddFromFavorites",site.layout.CartAdd,{isRemovable:true,postCreate:function(){
this.inherited(arguments);
if(this.isRemovable){
var self=this;
var _a5f=new site.productButton({node:self.removeNode,valueField:dojo.byId(self.skuFieldId),cartType:"favorites",cartAction:"remove",callback:function(resp){
if(self.callbackRemoveButton){
self.callbackRemoveButton(resp);
}
self.close();
}});
dojo.toggleClass(this.removeNode,"hidden",false);
}
}});
dojo.declare("site.layout.CartConfirm",site.layout.ProductMessage,{templateString:"<div class=\"pop_wrapper\">\n    <div class=\"pop_message pop_container\" dojoAttachPoint=\"containerNode\">\n        <a href=\"javascript:void(0);\" dojoAttachEvent=\"onclick:close\" class=\"pop_close\"></a>\n        <div dojoAttachPoint=\"cartConfirmDisplayNode\">\n            <div class=\"pop_desc\">\n                <span class=\"pop_title\"><img src=\"/images/popup/title_thank_you.gif\" alt=\"Thank You\" /></span>\n                <p><span dojoAttachPoint=\"prodNameNode\"></span> - <span dojoAttachPoint=\"shadeNameNode\"></span>&nbsp;<span dojoAttachPoint=\"addedMessageNode\"></span></p>       \n            </div>\n            <div class=\"clearfix\"></div>\n            <div class=\"cart_item_count\"><span dojoAttachPoint=\"itemCountNode\">0</span> <span dojoAttachPoint=\"itemCountCopyNode\"></span></div>\n            <span dojoAttachPoint=\"buttonNodeCheckout\"><a href=\"/checkout/cart.tmpl\"><img src=\"/images/popup/btn_checkout.gif\" width=\"93\" height=\"22\" alt=\"Checkout\" class=\"pop_btn\" /></a></span>\n            <span dojoAttachPoint=\"buttonNodeFavorites\" class=\"hidden\"><a href=\"/account/favorites.tmpl\"><img src=\"/images/popup/btn_favourites.gif\" width=\"93\" height=\"22\" alt=\"Favourites\" class=\"pop_btn\" /></a></span>\n        </div>\n        <div class=\"pop_desc hidden\" dojoAttachPoint=\"cartConfirmErrorNode\">\n            <span class=\"pop_title\"><img src=\"/images/popup/title_sorry.gif\" alt=\"Sorry\" /></span>\n            <p><span dojoAttachPoint=\"errorMessageNode\"></span></p>      \n        </div>\n        <div class=\"clearfix\"></div>\n    </div>\n</div>\n",is_shaded:false,displayDuration:5000,sku:null,prodName:"",addedMessage:"",itemCountCopy:"",itemCountCopySingular:"",type:"order",postCreate:function(){
this.inherited(arguments);
this.cartHandler=new site.cart();
this.addedMessage=page_data.resource.added_to_bag;
this.itemCountCopy=page_data.resource.items_in_bag_1;
this.itemCountCopySingular=page_data.resource.items_in_bag_2;
},setDisplayProperties:function(args){
dojo.mixin(this,args);
},_updateDisplay:function(resp){
var _a63=this.getErrors(resp);
var _a64=false;
if(_a63){
if(_a63["cart.qty_limit"]){
this.errorMessageNode.innerHTML=_a63["cart.qty_limit"].text;
_a64=true;
}
}
if(_a64){
dojo.toggleClass(this.cartConfirmErrorNode,"hidden",false);
dojo.toggleClass(this.cartConfirmDisplayNode,"hidden",true);
}else{
this.itemCount=this.cartHandler.getItemCount(this.type);
this.itemCountNode.innerHTML=this.itemCount.toString();
this.prodNameNode.innerHTML=this.prodName;
if(this.is_shaded){
this.shadeNameNode.innerHTML=this.sku.shade_name;
}
this.addedMessageNode.innerHTML=this.addedMessage;
this.itemCountCopyNode.innerHTML=(this.itemCount==1?this.itemCountCopySingular:this.itemCountCopy);
if(this.type==="favorites"){
dojo.toggleClass(this.buttonNodeCheckout,"hidden",true);
dojo.toggleClass(this.buttonNodeFavorites,"hidden",false);
}else{
dojo.toggleClass(this.buttonNodeCheckout,"hidden",false);
dojo.toggleClass(this.buttonNodeFavorites,"hidden",true);
}
}
}});
}
if(!dojo._hasResource["site.globalnav.Detail"]){
dojo._hasResource["site.globalnav.Detail"]=true;
dojo.provide("site.globalnav.Detail");
dojo.declare("site.globalnav.Detail",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"panelnav_link ${baseClass}\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\"><div class=\"panelnav_detail\">\n        <div class=\"panelnav_detail_text\">\n            <h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" alt=\"${displayName}\" class=\"panelnav_detail_hd\" /></h3>\n            <p class=\"panelnav_detail_descr\">${description}</p>\n        </div>\n        <div class=\"panelnav_thumb\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"\" id=\"${id}_thumb\" /></div>\n    </div></a>\n</div>\n",templateType:"detail",simpleDetailPath:dojo.moduleUrl("site","globalnav/templates/SimpleDetail.html"),discontinuedDetailPath:dojo.moduleUrl("site","globalnav/templates/DiscontinuedDetail.html"),searchProductDetailPath:dojo.moduleUrl("site","globalnav/templates/DiscontinuedSearchProductDetail.html"),parentId:null,displayName:"",hdPath:"",thumbPath:"",thumbRolloverPath:null,description:"",url:"",isdefault:false,isInDefaultCategory:false,baseClass:"",offImg:"off",postMixInProperties:function(){
if(this.template){
console.log("HAS TEMPLATE!");
var t=this.template;
if(t.detail){
console.log("HAS DETAIL");
var type=t.detail.type;
if(type){
this.templateType=type;
console.log("TYPE = "+this.templateType);
}
var _a67=t.detail.baseClass;
if(_a67){
this.baseClass=_a67;
console.log("baseClass = "+this.baseClass);
}else{
this.baseClass="panelnav_cell_category";
}
var _a68=t.detail.headerStates;
if(_a68){
this.hdStates=_a68;
}
}
}
if(this.templateType!=="detail"){
var tmpl=this[this.templateType+"Path"];
if(tmpl){
this.templateString="";
this.templatePath=tmpl;
}
dojo.mixin(this,this.templatePath);
}
},startup:function(){
var _a6a=dojo.byId(this.id+"_hd");
this.hdImg=new generic.img(_a6a,["off","on","sel"]);
if(this.isInDefaultCategory){
if(this.isdefault){
this.setDefaultState();
}else{
this.offImg="sel";
this.setDefaultCategoryState();
}
}
var _a6b=dojo.byId(this.id+"_thumb");
if(this.thumbRolloverPath&&_a6b){
this.thumbImg=_a6b;
var _a6c=new Image();
_a6c.src=this.thumbRolloverPath;
}
},_onMouseOver:function(e){
if(this.hdImg){
this.hdImg.changeSrc("on");
}
if(this.thumbImg){
this.thumbImg.src=this.thumbRolloverPath;
}
dojo.addClass(e.currentTarget,"panelnav_link_on");
},_onMouseOut:function(e){
if(this.hdImg){
this.hdImg.changeSrc(this.offImg);
}
if(this.thumbImg){
this.thumbImg.src=this.thumbPath;
}
dojo.removeClass(e.currentTarget,"panelnav_link_on");
},_onClick:function(e){
if(this.url&&dojo.isIE){
location.href=this.url;
}
},setDefaultState:function(){
this._onMouseOver=function(){
};
this._onMouseOut=function(){
};
this._onClick=function(){
};
if(this.hdImg){
this.hdImg.changeSrc("on");
}
dojo.addClass(this.domNode,"panelnav_default");
var n=dojo.query("a",this.domNode);
var _a71=n[0];
_a71.removeAttribute("href");
},setDefaultCategoryState:function(){
if(this.hdImg){
this.hdImg.changeSrc(this.offImg);
}
}});
dojo.declare("site.globalnav.ProductCategoryDetail",site.globalnav.Detail,{templateString:"<div id=\"${id}\" class=\"panelnav_link ${baseClass}\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,ondijitclick:_onClick\">\n    <div class=\"panelnav_detail\">\n        <div class=\"panelnav_detail_text\">\n            <h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"18\" alt=\"${displayName}\" class=\"panelnav_catdetail_hd\" /></h3>\n            <p class=\"panelnav_detail_descr\">${description}</p>\n        </div>\n        <div class=\"panelnav_thumb\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"\" /></div>\n    </div>\n</div>\n",containerNode:null,accordionId:null,startup:function(){
if(this.containerNode){
dojo.place(this.domNode,this.containerNode,"last");
}
this.inherited(arguments);
},_onClick:function(e){
this.containerNode.style.display="none";
dijit.byId(this.parentId).getAccordion(this.accordionId);
}});
dojo.declare("site.globalnav.CollectionCategoryDetail",[site.globalnav.ProductCategoryDetail,dijit._Container,dijit._Contained],{templateString:"<div id=\"${id}\">\n\t<div id=\"${id}_cat\" dojoAttachPoint=\"categoryDetailNode\" class=\"panelnav_link\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,ondijitclick:_onClick\">\n\t\t<div class=\"panelnav_detail\">\n\t\t\t<div class=\"panelnav_detail_text\">\n\t\t\t\t<h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"18\" alt=\"${displayName}\" /></h3>\n\t\t\t\t<p>${description}</p>\n\t\t\t</div>\n\t\t\t<div class=\"panelnav_thumb\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"\" /></div>\n\t\t</div>\n\t</div>\n\t\n\t<div class=\"clear\"><br /></div>\n\t<ul id=\"${id}_catlist\" class=\"hidden\" dojoAttachPoint=\"accordionContainerNode\">\n\t</ul>\n</div>\n",isContainer:true,startup:function(){
this.containerNode=dojo.byId(this.parentId);
this.accordionId=this.id+"_accordion";
this.inherited(arguments);
this.parent=dijit.byId(this.parentId);
},_onClick:function(e){
this.categoryDetailNode.style.display="none";
this.parent.getAccordion(this.accordionId);
},onChildClick:function(_a74){
}});
dojo.declare("site.globalnav.DiscontinuedDetail",[site.globalnav.ProductCategoryDetail,dijit._Container,dijit._Contained],{templateString:"<div>\n    <img id=\"${id}_hd\" class=\"discImg\" src=\"/discontinued/images/headers/h_discontinued_prods.gif\" width=\"250\" alt=\"Goodbyes\" />\n    <p class=\"discP\">${panel_description}</p>\n    <ul>\n        <li class=\"panelnav_link\">\n            <a href=\"/product/featured_goodbyes.tmpl\">\n                <div class=\"panelnav_detail\">\n                    <div style=\"width: 204px;\" class=\"panelnav_detail_text\">\n                        <h3 style=\"margin-bottom: 0pt;\">\n                            <img alt=\"Going, Going, Gone\" onclick=\"window.location = '/product/featured_goodbyes.tmpl';\" src=\"/discontinued/images/headers/pnav_featured_goodbyes_250x18_off.gif\" />\n                        </h3>\n                        <p style=\"width:200px;\">${description}</p>\n                    </div>\n                </div>\n            </a>\n        </li>\n    </ul>\n</div>\n",header:"",isContainer:true});
dojo.declare("site.globalnav.StoreLocationDetail",[site.globalnav.CollectionCategoryDetail,dijit._Container,dijit._Contained],{templateString:"<div id=\"resultrow_${DOOR_ID}\" class=\"panelnav_link\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\">\n\t<a href=\"javascript:void(0)\" id=\"resultrow_maplink_${DOOR_ID}\" onclick=\"dojo.publish('/locator/results/maplinkClick',[${DOOR_ID}]);\">\n\t\t<div class=\"panelnav_detail\">\n        \t<div class=\"panelnav_detail_text\">\n\t\t\t\t<h3>${DOORNAME}</h3>\n\t\t\t\t<dl>\n                                        <dd>${ZIP_OR_POSTAL}</dd>\n\t\t\t\t\t<dd>${ADDRESS}</dd>\n\t\t\t\t\t<dd>${CITY}</dd>\n\t\t\t\t\t<dd>${phone}</dd>\n\t\t\t\t</dl>\n\t        </div>\n\t\t\t<div class=\"result_marker\" id=\"ico_marker_${DOOR_ID}\"></div>\n\t\t\t<div class=\"\"></div>\n\t\t</div>\n\t</a>\n</div>\n",header:"",isContainer:true,door:null,autoload:true,phone:"",hours:"",sdist:"",baseClass:"result_row",postMixInProperties:function(){
dojo.mixin(this,this.door);
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
},_onMouseOver:function(e){
if(this.hdImg instanceof generic.img){
this.hdImg.changeSrc("on");
}
dojo.addClass(e.currentTarget,"panelnav_link_on");
},_onMouseOut:function(e){
if(this.hdImg instanceof generic.img){
this.hdImg.changeSrc("off");
}
dojo.removeClass(e.currentTarget,"panelnav_link_on");
}});
dojo.declare("site.globalnav.EventLocationDetail",[site.globalnav.CollectionCategoryDetail,dijit._Container,dijit._Contained],{templateString:"<div id=\"eventrow_${DOOR_ID}\" class=\"panelnav_link\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\">\n\t<a href=\"javascript:void(0)\" id=\"eventrow_maplink_${DOOR_ID}\" onclick=\"dojo.publish('/locator/results/maplinkClick',[${DOOR_ID}]);\">\n\t\t<div class=\"panelnav_detail\">\n        \t<div class=\"panelnav_detail_text\">\n\t\t\t\t<h3>${EVENT_NAME} @ ${DOORNAME}</h3>\n\t\t\t\t<dl>\n\t\t\t\t\t<dd>${event_start} ${event_end}</dd>\n\t\t\t\t\t<dd>${ADDRESS}</dd>\n\t\t\t\t\t<dd>${CITY}, ${STATE_OR_PROVINCE} ${ZIP_OR_POSTAL}</dd>\n\t\t\t\t\t<dd>${phone}</dd>\n\t\t\t\t</dl>\n\t        </div>\n\t\t\t<div class=\"result_marker\" id=\"evt_ico_marker_${DOOR_ID}\">A</div>\n\t\t\t<div class=\"${is_pro}\"></div>\n\t\t</div>\n\t</a>\n</div>\n",header:"",isContainer:true,door:null,autoload:true,phone:"",hours:"",sdist:"",event_start:"",event_end:"",baseClass:"result_row",postMixInProperties:function(){
dojo.mixin(this,this.door);
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
},_onMouseOver:function(e){
if(this.hdImg instanceof generic.img){
this.hdImg.changeSrc("on");
}
dojo.addClass(e.currentTarget,"panelnav_link_on");
},_onMouseOut:function(e){
if(this.hdImg instanceof generic.img){
this.hdImg.changeSrc("off");
}
dojo.removeClass(e.currentTarget,"panelnav_link_on");
}});
dojo.declare("site.globalnav.SearchProductDetail",[dijit._Widget,dijit._Templated],{templateString:"<li class=\"panelnav_link\" style=\"margin-bottom: -2px;position:relative;\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\">\n\n        <div class=\"panelnav_detail\" dojoAttachPoint=\"panelDetailNode\">\n            <a href=\"${url}\">\n                <div class=\"panelnav_detail_text\" style=\"width:204px;\">\n                    <h3 style=\"margin-bottom: 0\">\n                        <img src=\"${hdPath}\" width=\"200\" height=\"12\" alt=\"${displayName}\" dojoAttachPoint=\"productNameNode\" />\n                    </h3>\n                    <p style=\"color:#AAAAAA;display:${shadeDisplay}\">${shadename}</p>              \n                    <p style=\"clear:both; width: 180px;\" dojoAttachPoint=\"descriptionNode\">${description}</p>\n                </div>\n                <div class=\"smoosh_small\" style=\"overflow: hidden; height: 56px; width: 56px;background-color: ${hex};\">\n                    <span class=\"small_smoosh_span\"  style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${thumbPath}')\">\n                        <img class=\"thumb small_smoosh_thumb\" src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" />\n                    </span>\n                </div>\n            </a>\n            <div dojoAttachPoint=\"cartConfirmNode\"></div>\n            <div dojoAttachPoint=\"actionNode\" class=\"search_result_action\"></div>\n        </div>\n</li>\n",url:"",hdPath:"",displayName:"",shadeDisplay:"",shadename:"",description:"",hex:"",thumbPath:"",shadedResult:false,path:"",actionImage:null,time:"",cartConfirmMsg:null,inventory_status_message:"",shaded:false,postCreate:function(){
this.inherited(arguments);
var self=this;
self.actionImage=dojo.doc.createElement("img");
dojo.style(self.actionImage,{paddingTop:"2px"});
if(dojo.isIE==6){
dojo.style(self.panelDetailNode,{paddingBottom:"0px"});
}
self.time=(new Date()).getTime();
if(self.shadedResult){
self.descriptionNode.style.display="none";
self._attachCartConfirm();
}else{
if(!self.shaded){
self._attachCartConfirm();
}else{
self.actionImage.src="/search/images/btn_view_shades_off.gif";
dojo.connect(self.actionNode,"onclick",function(){
window.location=self.url;
});
self.actionNode.appendChild(self.actionImage);
}
}
var top=((self.shadedResult||!self.shaded)&&self.shoppable?"40px":"52px");
var left=((self.shadedResult||!self.shaded)&&self.shoppable?"7px":"13px");
dojo.style(self.actionNode,{position:"absolute",top:top,left:left});
},_onMouseOver:function(e){
dojo.addClass(e.currentTarget,"panelnav_link_on");
this.productNameNode.src=this.productNameNode.src.replace("off","on");
if(this.shaded&&!this.shadedResult){
this.actionImage.src=(this.actionImage!=""?this.actionImage.src.replace("off","on"):"");
}
},_onMouseOut:function(e){
dojo.removeClass(e.currentTarget,"panelnav_link_on");
this.productNameNode.src=this.productNameNode.src.replace("on","off");
if(this.shaded&&!this.shadedResult){
this.actionImage.src=(this.actionImage!=""?this.actionImage.src.replace("on","off"):"");
}
},_attachAddToBagEvent:function(args){
var self=this;
var _a80=dojo.byId("cart_confirm_placeholder-"+self.path+"-"+self.time);
if(!self.cartConfirmMsg){
self.cartConfirmMsg=new site.layout.CartConfirm({id:"cart_confirm-"+self.path+"-"+self.time,is_shaded:args.shaded,prodName:self.displayName},_a80);
}
var sku={shade_name:self.shadename||""};
self.cartConfirmMsg.sku=sku;
var _a82=function(resp){
self._enabled=true;
self.cartConfirmMsg.show();
};
var _a84=function(err){
console.log("error adding to bag: "+err);
self._enabled=true;
};
global.cartHandler.alter({action:"add",cart:"checkout",skus:[self.path],callback:_a82,errback:_a84});
},_attachCartConfirm:function(){
var self=this;
var _a87=(self.shaded?true:false);
if(self.shoppable){
self.actionImage.src="/discontinued/images/btn_add_to_bag.gif";
self.actionNode.id=self.path;
self.actionNode.style.height="23px";
var _a88=dojo.doc.createElement("div");
_a88.id="cart_confirm_placeholder-"+self.path+"-"+self.time;
self.cartConfirmNode.appendChild(_a88);
dojo.connect(self.actionNode,"onclick",function(e){
self._attachAddToBagEvent({shaded:_a87});
});
self.actionNode.appendChild(self.actionImage);
}else{
var p=dojo.doc.createElement("p");
p.innerHTML=self.inventory_status_message;
dojo.style(p,{fontWeight:"bold",paddingLeft:"0px"});
self.actionNode.appendChild(p);
}
}});
}
if(!dojo._hasResource["site.globalnav.Panel"]){
dojo._hasResource["site.globalnav.Panel"]=true;
dojo.provide("site.globalnav.Panel");
dojo.declare("site.globalnav.PanelNavSet",[dijit._Widget,dijit._Container],{isContainer:true,parentId:null,isPanelSet:true,panelId:"",activeItemId:"",postCreate:function(){
this.panelId=this._addPanel();
},setActiveItem:function(_a8b){
this.activeItemId=_a8b;
var _a8c=dijit.byId(this.parentId);
_a8c.activeSubItemId=_a8b;
},onChildClick:function(_a8d){
if(this.activeItemId&&(this.activeItemId!==_a8d)){
this.hideItem(this.activeItemId);
}
},_addPanel:function(){
var _a8e=new site.layout.Panel({id:this.id+"_panel",parentId:this.id});
return _a8e.id;
},fadeInSubNav:function(id){
var node=dojo.byId(id);
this.toggleSubNav(id,0);
dojo.style(node,"opacity",0);
this.toggleSubNav(id,1);
dojo.fadeIn({node:node,duration:300}).play();
},hideItem:function(_a91){
var item=dijit.byId(_a91);
if(item.hdImg){
item.hdImg.changeSrc("off");
}
this.toggleSubNav(item.subId,0);
item._setActive(false);
},toggleSubNav:function(id,_a94){
var node=dojo.byId(id);
var s=node.style;
if(_a94==1){
s.display="";
}else{
s.display="none";
}
}});
dojo.declare("site.globalnav.PanelNav",[dijit._Widget,dijit._Contained,dijit._Templated],{templateString:"<li id=\"${id}\" class=\"globalnav_hd clickable\" dojoAttachPoint=\"containerNode\">\n\t<img src=\"${hdPath}\" alt=\"${displayName}\" id=\"${id}_hd\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,ondijitclick:_onClick\"><br />\n</li>\n",hasPanelSiblings:false,hasLoaded:false,panelId:"",parentId:"",subId:"",sectionId:"",itemId:"",displayName:"",hdPath:"",hdImg:{},isActive:false,postCreate:function(){
var _a97=this.getParent();
this.hasPanelSiblings=(_a97.isPanelSet?true:false);
this.panelId=this._addPanel(_a97);
if(this.hasLoaded){
console.log("adding panelnav "+this.id+" to parent "+_a97.id+" via declarative instance");
_a97.addChild(this.id);
this.startup();
}
},startup:function(){
var _a98=dojo.byId(this.id+"_hd");
this.hdImg=new generic.img(_a98,["off","on","sel"]);
},getParent:function(){
var _a99=(dijit.byId(this.parentId));
var _a9a=(_a99!=null?_a99:this.inherited(arguments));
return _a9a;
},testTalkDown:function(){
console.log("talking down to panelnav level: "+this.id);
},addSubNav:function(_a9b){
this.subId=_a9b.id;
dijit.byId(this.panelId).addChild(_a9b);
if(this.hasPanelSiblings){
if(dojo.byId(this.subId)){
var node=dojo.byId(this.subId);
node.style.display="none";
}
}
},_addPanel:function(_a9d){
var id;
if(this.hasPanelSiblings){
id=_a9d.panelId;
}else{
panel=new site.layout.Panel({id:this.id+"_panel",parentId:this.id});
id=panel.id;
}
return id;
},_setActive:function(_a9f){
this.isActive=_a9f;
var _aa0=this.getParent();
if(_a9f==true){
_aa0.setActiveItem(this.id);
}else{
if(_aa0.activeItemId===this.id){
_aa0.setActiveItem("");
}
}
},_onClick:function(e){
this.getParent().onChildClick(this.id);
var _aa2=dijit.byId(this.subId);
if(this.isActive){
this.hideItem();
}else{
if(_aa2){
_aa2.onParentClick();
this.showPanel();
if(!_aa2.hasLoaded||!_aa2.cache){
if(!_aa2.hasLoaded&&_aa2.progressNode){
_aa2.progressNode.style.display="block";
}
var s=this.sectionId;
var d=this.itemId;
var g=function(){
dojo.publish("/panelnav/event/click",[{psubnav:_aa2,sectionId:s,itemId:d}]);
};
setTimeout(g,400);
}
}
}
},close:function(){
this.hideItem();
},showPanel:function(){
var _aa6=dijit.byId(this.panelId);
if(this.hasPanelSiblings){
if(this.hdImg){
this.hdImg.changeSrc("sel");
}
var _aa7=this.getParent();
if(_aa6.isOpen){
_aa7.fadeInSubNav(this.subId);
}else{
_aa7.toggleSubNav(this.subId,1);
_aa6.open();
}
}else{
if(this.hdImg){
this.hdImg.changeSrc("on");
}
_aa6.open();
}
this._setActive(true);
dojo.publish("/panelnav/event/show",[{type:"panel",id:this.panelId,itemId:this.itemId,subId:this.subId,sectionId:this.sectionId,displayName:this.displayName,parentId:this.parentId}]);
},hideItem:function(){
if(this.hdImg){
this.hdImg.changeSrc("off");
}
var _aa8=dijit.byId(this.panelId);
_aa8.close();
if(this.hasPanelSiblings){
this.getParent().toggleSubNav(this.subId,0);
}
this._setActive(false);
dojo.publish("/panelnav/event/hide",[{type:"panel",id:this.panelId,itemId:this.itemId,subId:this.subId}]);
},_onMouseOver:function(e){
if(this.hdImg){
if(!this.isActive){
this.hdImg.changeSrc("on");
}
}
},_onMouseOut:function(e){
if(this.hdImg){
if(!this.isActive){
this.hdImg.changeSrc("off");
}
}
}});
dojo.declare("site.layout.Panel",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"panel\" id=\"${id}\">\n    <div class=\"panelnav_container\">\n        <div id=\"${id}_close\" dojoAttachEvent=\"ondijitclick:_onClickClose\" class=\"closelight\">Close Panel</div>\n        <div dojoAttachPoint=\"containerNode\"></div>\n    </div>\n    <div class=\"panel_btm clear\"><br/></div>\n</div>\n",isOpen:false,parentId:"",closedpx:-96,openpx:192,durationOpen:400,durationClose:300,postCreate:function(){
var _aab=dojo.byId("panel_container");
dojo.place(this.domNode,_aab,"last");
},_onClickClose:function(){
var _aac=dijit.byId(this.parentId);
console.log(_aac);
if(_aac.isPanelSet){
var _aad=dijit.byId(_aac.activeItemId);
_aad.hideItem();
}else{
_aac.hideItem();
}
},open:function(){
var node=dojo.byId(this.id);
dojo.addClass(this.id,"panel_active");
this._slide(1,node);
this.isOpen=true;
if(dijit.byId("pnav_search_panel").isOpen&&this.id!="pnav_search_panel"){
dijit.byId("pnav_search_panel").close();
}
},close:function(){
var node=dojo.byId(this.id);
dojo.removeClass(this.id,"panel_active");
this._slide(0,node);
this.isOpen=false;
},_slide:function(_ab0,node){
var _ab2,_ab3,end,_ab5;
if(_ab0==1){
_ab3=this.closedpx;
end=this.openpx;
_ab2=this.durationOpen;
node.style.display="block";
_ab5=null;
}else{
_ab3=this.openpx;
end=this.closedpx;
_ab2=this.durationClose;
display="none";
_ab5=function(){
node.style.display="none";
};
}
dojo.anim(node,{left:{start:_ab3,end:end,unit:"px"}},_ab2,dojox.fx.easing.easeOut,_ab5);
}});
}
if(!dojo._hasResource["site.globalnav.PanelSubNav"]){
dojo._hasResource["site.globalnav.PanelSubNav"]=true;
dojo.provide("site.globalnav.PanelSubNav");
dojo.declare("site.globalnav.PanelSubNav",[dijit._Widget,dijit._Container,dijit._Contained,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"panelnav_subnav panelnav_detail_container\">"+"<div dojoAttachPoint=\"containerNode\">"+"<div dojoAttachPoint=\"progressNode\" class=\"progress\"><br></div>"+"</div></div>\n",isContainer:true,parentId:"",activeItemId:"",dataId:"",content:null,isDefaultPanel:false,hasLoaded:false,cache:true,constructor:function(){
dojo.connect(this,"onChildClick",null,site.globalnav.Coremetrics.SubNavChildClick);
},postCreate:function(){
if(this.isDefaultPanel){
var _ab6=dojo.byId("panel_open");
dojo.place(this.domNode,_ab6,"last");
}else{
var _ab7=dijit.byId(this.parentId);
if(!_ab7){
try{
var gset=dijit.byId(dojo.global.globalNavSetId);
_ab7=gset.getChild(this.parentId);
_ab7.addSubNav(this);
}
catch(err){
}
}else{
_ab7.addSubNav(this);
}
}
if(this.hasLoaded){
this.showProgress(false);
this.domNode.style.display="block";
}
},addSubItem:function(item){
var node=item;
if(typeof (item)==="string"){
node=dojo.doc.createElement("div");
node.innerHTML=item;
this.hasLoaded=true;
}
try{
dojo.place(node,this.domNode,"last");
}
catch(err){
}
},onChildClick:function(_abb){
if(this.activeItemId&&(this.activeItemId!==_abb)){
var _abc=dijit.byId(this.activeItemId);
_abc.close();
}
},onParentClick:function(){
},showProgress:function(_abd){
var s=this.progressNode.style;
if(_abd){
s.display="block";
}else{
s.display="none";
}
},setDefaultState:function(){
dojo.addClass(this.domNode,"panelnav_category_default");
}});
dojo.declare("site.globalnav.ProductSubNav",site.globalnav.PanelSubNav,{templateString:null,templateString:"<div id=\"${id}\" class=\"panelnav_subnav\">\n       <div dojoAttachPoint=\"progressNode\" class=\"progress\"><br></div>\n\n       <div id=\"${id}_cat\" class=\"panelnav_detail_container\" dojoAttachPoint=\"detailContainerNode\">\n       </div>\n       <ul id=\"${id}_catlist\" class=\"panelnav_accordion_container hidden\" dojoAttachPoint=\"accordionContainerNode\">\n       </ul>\n\n</div>\n",inAccordionMode:false,activeAccordionId:"",addCategoryDetail:function(args){
args.parentId=this.id;
args.containerNode=this.detailContainerNode;
args.accordionId=args.id+"_accordion";
var _ac0=new site.globalnav.ProductCategoryDetail(args);
_ac0.startup();
return _ac0;
},addCategoryAccordion:function(args){
args.accordionId=args.id+"_accordion";
var _ac2=new site.globalnav.Accordion({id:args.accordionId,templateString:"<li id=\"${id}\">\n\t<img src=\"${hdPath}\" width=\"250\" height=\"18\" alt=\"${displayName}\" id=\"${id}_hd\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,ondijitclick:onClick\" class=\"accordion_hd\">\n\t<ul id=\"${id}_sub\" style=\"display:none;\" dojoAttachPoint=\"containerNode\" class=\"accordion_content\">\n\t</ul>\n</li>\n",displayName:args.displayName,hdPath:args.hdPath,parentId:this.id});
dojo.place(_ac2.domNode,this.accordionContainerNode,"last");
_ac2.startup();
return _ac2;
},addSearchAccordion:function(args){
args.accordionId=args.id+"_accordion";
var _ac4=new site.globalnav.Accordion({id:args.accordionId,templateString:"<li id=\"${id}\" style=\"display:inline;\">\n\t<img src=\"${hdPath}\" class=\"disc_prod_header_img\" width=\"250\" height=\"18\" alt=\"${displayName}\" id=\"${id}_hd\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\" class=\"accordion_hd\">\n    <div id=\"discontinued_search\" style=\"position:relative;\">\n        <p style=\"padding-left:4px;margin-top: 2px;\">${description}</p>\n        <form onsubmit=\"javascript:return false;\">\n            <input type=\"text\" id=\"discontinued_search_input\" class=\"text_field\" />\n            <input type=\"image\" class=\"btn\" id=\"discontinued_search_submit\" src=\"/images/forms/btn_input.gif\"/>\n        </form>\n        <div id=\"disc_prog\"></div>\n    </div>\n    <ul id=\"${id}_sub\" style=\"display:none;\" dojoAttachPoint=\"containerNode\" class=\"accordion_content\">\n\t</ul>\n</li>\n\n",displayName:args.displayName,hdPath:args.hdPath,parentId:this.id,description:args.description});
dojo.place(_ac4.domNode,this.accordionContainerNode,"last");
_ac4.startup();
return _ac4;
},setPageState:function(_ac5,_ac6,_ac7){
dojo.removeClass(this.accordionContainerNode,"hidden");
if(_ac6){
_ac5.open();
if(_ac7){
dojo.addClass(_ac5.domNode,"panelnav_category_default");
}
}
},getAccordion:function(id){
var _ac9=dijit.byId(id);
this.openAccordion(_ac9);
},openAccordion:function(_aca){
this.accordionContainerNode.style.display="block";
this.inAccordionMode=true;
_aca.open();
this.activeAccordionId=_aca.id;
},reset:function(){
if(this.inAccordionMode){
this.detailContainerNode.style.display="";
this.accordionContainerNode.style.display="";
dijit.byId(this.activeAccordionId).close();
this.inAccordionMode=false;
this.activeAccordionId="";
}
},onParentClick:function(){
this.reset();
}});
}
if(!dojo._hasResource["site.globalnav.Header"]){
dojo._hasResource["site.globalnav.Header"]=true;
dojo.provide("site.globalnav.Header");
dojo.declare("site.globalnav.Header",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"${id}\" class=\"link_hd\">"+"<a href=\"${url}\"><img src=\"${hdPath}\" height=\"18\" alt=\"${displayName}\" dojoAttachPoint=\"hdNode\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\"></a>"+"</div>",templateNoHref:"<div id=\"${id}\" class=\"link_hd\">"+"<img src=\"${hdPath}\" height=\"18\" alt=\"${displayName}\" dojoAttachPoint=\"hdNode\">"+"</div>",displayName:"",hdPath:"",description:"",url:"",isdefault:false,hasLoaded:false,parentId:"",constructor:function(args){
if(args.isdefault||!args.url){
this.templateString=this.templateNoHref;
}
},startup:function(){
if(!this.hasLoaded||!this.isdefault){
this.hdImg=new generic.img(this.hdNode,["off","on","sel"]);
if(this.isdefault){
this.hdImg.changeSrc("sel");
}
}
if(this.isdefault){
this.setDefaultState();
}
},_onMouseOver:function(e){
if(this.hdImg){
this.hdImg.changeSrc("on");
}
},_onMouseOut:function(e){
if(this.hdImg){
this.hdImg.changeSrc("off");
}
},_showDefault:function(_ace,_acf){
if(_acf.onChildClick&&(_acf.activeItemId!=="")){
_acf.onChildClick(_ace,true);
}
},setDefaultState:function(){
var _ad0=this.parentId;
if(_ad0.indexOf("psubnav")!=-1){
return;
}
var _ad1=dijit.byId(_ad0);
var _ad2="";
if(_ad0!=="globalnav_container"){
_ad2=_ad0;
_ad0=_ad1.parentId;
_ad1=dijit.byId(_ad0);
}
if(_ad0==="globalnav_container"){
dojo.addClass(this.domNode,"clickable");
var self=this;
var _ad4=function(){
self._showDefault(_ad2,_ad1);
};
dojo.connect(this.domNode,"onclick",_ad4);
}
}});
}
if(!dojo._hasResource["site.coremetrics.func"]){
dojo._hasResource["site.coremetrics.func"]=true;
dojo.provide("site.coremetrics.func");
dojo.declare("site.coremetrics.func",[dijit._Widget],{keyword:"",count:"",constructor:function(args){
},startup:function(){
var _ad6=this.id.match("[0-9]+")[0];
if(dojo.isIE){
if(_ad6==0){
cmCreatePageviewTag("search : search results",this.keyword,"2000",this.count);
}else{
if((_ad6%2)==0){
console.log("site_coremetrics_func_"+(_ad6-1));
var _ad7=dijit.byId("site_coremetrics_func_"+(_ad6-1));
_ad7.destroy();
cmCreatePageviewTag("search : search results",this.keyword,"2000",this.count);
}
}
}else{
cmCreatePageviewTag("search : search results",this.keyword,"2000",this.count);
}
}});
}
if(!dojo._hasResource["site.search"]){
dojo._hasResource["site.search"]=true;
dojo.provide("site.search");
dojo.declare("site.search",null,{url:"/search/includes/panel_nav.tmpl?query=",panel:"",isOpen:false,stayOpen:false,resultsNode:null,resultsMessageNode:null,constructor:function(args){
this.panel=dijit.byId("pnav_search_panel");
this.globalnavContainer=dijit.byId("globalnav_container");
this.isOpen=args.isOpen;
this.resultsNode=args.resultsNode;
this.resultsMessageNode=args.resultsMessageNode;
},execute:function(args){
var self=this;
self.query=args.query;
var left=parseInt(self.panel.domNode.style.left.replace("px",""));
if(!self.isOpen&&!self.stayOpen||left<0){
self.panel.open();
self.isOpen=true;
var _adc=self.globalnavContainer.activeItemId;
var _add=(dijit.byId(_adc)?dijit.byId(_adc).activeSubItemId:"");
var _ade=(_add?dijit.byId(_add):"");
if(_ade){
_ade.close();
}
}
console.log("PANEL INFO");
console.log(self.panel);
console.log(self.panel.domNode.style.left);
if(!dojo.isSafari){
dojo.doc.documentElement.scrollTop=0;
}else{
dojo.doc.body.scrollTop=0;
}
self.resultsNode.innerHTML="<div class='progress' style='margin-top:80px'></div>";
self.resultsMessageNode.innerHTML="";
var _adf={"id":"search_submit","content":{"url":"/search/includes/panel_nav.tmpl?query="+encodeURIComponent(self.query)}};
dojo.xhrGet({url:_adf.content.url,handleAs:"json-comment-optional",load:function(data){
self.resultsNode.innerHTML="";
self.resultsMessageNode.innerHTML=data.results_message;
dojo.forEach(data.products,function(_ae1,ix){
var _ae3=(_ae1.sku.shoppable=="1"?true:false);
var _ae4=new site.globalnav.SearchProductDetail({url:_ae1.uri,hdPath:_ae1.header,displayName:_ae1.name,shadeDisplay:(_ae1.shade_result?"block":"none"),shadename:(_ae1.shade_result?_ae1.sku.shade_name:""),description:_ae1.short_desc,hex:(_ae1.shade_result?_ae1.sku.color[0]:""),thumbPath:_ae1.thumb,shadedResult:(_ae1.shade_result?true:false),path:_ae1.sku.path,shoppable:_ae3,inventory_status_message:_ae1.sku.inventory_status_message,shaded:(_ae1.shaded?true:false)});
self.resultsNode.appendChild(_ae4.domNode);
});
var _ae5=data.count||"0";
cmCreatePageviewTag("search : search results",data.query,"2000",_ae5);
}});
}});
}
if(!dojo._hasResource["site.layout.SearchControl"]){
dojo._hasResource["site.layout.SearchControl"]=true;
dojo.provide("site.layout.SearchControl");
dojo.declare("site.layout.SearchControl",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"panel_search_control\">\n    <div dojoAttachPoint=\"resultsMessageNode\" class=\"results_message\"></div>\n    <div class=\"panel_search_products\">\n        <img src=\"/search/images/title_products_2.gif\" alt=\"Featured Products\" />\n    </div>\n    <div dojoAttachPoint=\"resultsNode\"></div>\n</div>\n",errorMessage:"",search:null,postCreate:function(){
this.inherited(arguments);
this.search=new site.search({resultsNode:this.resultsNode,resultsMessageNode:this.resultsMessageNode,stayOpen:true,isOpen:true});
},_onkeypress:function(e){
if(e.keyCode!=dojo.keys.ENTER){
return false;
}
this._search();
},_onclick:function(e){
this._search();
},_search:function(){
var _ae8=this.queryNode.value;
if(!_ae8||_ae8==dojo.global.page_data.panel_nav["default"].searchDefault){
var _ae9=new site.popupMessage({popup:dojo.byId("pop_search_invalid_control"),buttonClose:dojo.byId("pop_close_search_control"),displayDuration:5000,position:{top:"-55px",left:"11px"}});
_ae9.show();
return false;
}
this.search.execute({query:_ae8});
}});
}
if(!dojo._hasResource["generic.uri"]){
dojo._hasResource["generic.uri"]=true;
dojo.provide("generic.uri");
generic.uri=function(uri){
if(uri){
this.setUri(uri);
}else{
this.parse();
}
};
generic.uri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
dojo.extend(generic.uri,{_uri:window.location.href,_set:function(uri){
var t=this;
dojo.mixin(this,uri);
},_build:function(){
if(!this.source){
return;
}
var url=(this.protocol?this.protocol:"http")+"://"+this.authority+this.relative;
return url;
},setUri:function(uri){
if(dojo.isString(uri)){
this._uri=uri;
this.parse();
}else{
this._set(uri);
this.sanitize();
}
},sanitize:function(){
return this;
},parse:function(){
var str=this._uri;
var o=generic.uri.options;
var m=o.parser[o.strictMode?"strict":"loose"].exec(str);
var uri={};
var i=14;
while(i--){
uri[o.key[i]]=m[i]||"";
}
uri[o.q.name]={};
uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){
if($1){
uri[o.q.name][$1]=$2;
}
});
this._set(uri);
return this;
},setQuery:function(map){
if(!this.source){
this.parse();
}
var _af8=[];
var enc=encodeURIComponent;
for(var name in map){
var _afb=map[name];
var _afc=enc(name)+"=";
_af8.push(_afc+enc(_afb));
}
this.queryKey=map;
this.query=_af8.join("&");
this.relative=this.path+"?"+this.query;
var url=this._build();
return url;
},mergeQuery:function(map){
if(!this.source){
this.parse();
}
var _aff=dojo.mixin(this.queryKey,map);
var url=this.setQuery(_aff);
return url;
}});
}
if(!dojo._hasResource["site.globalnav.GlobalNav"]){
dojo._hasResource["site.globalnav.GlobalNav"]=true;
dojo.provide("site.globalnav.GlobalNav");
dojo.declare("site.globalnav.GlobalNav",null,{config:null,_configKeys:{},defaultState:{},defaultNavCreated:false,constructor:function(args){
this.config=args.config;
this.defaultState=args.defaultState;
dojo.subscribe("/panelnav/event/click",this,function(args){
this.getPanelContent(args);
});
this.initSections();
},initSections:function(){
var _b03=this.config.items;
var _b04=this.defaultState.id;
var self=this;
dojo.forEach(_b03,function(_b06,idx){
var _b08=false;
if(_b06.id===_b04){
_b08=true;
}
self._configKeys[_b06.id]={idx:idx,items:{}};
if(_b06.items&&(_b06.items.length>0)){
self.initPanelNavSet(_b06,_b08);
}else{
if(_b06.id==="search"){
self.initSearch(_b06,_b08);
}else{
if(!_b06.hasLoaded){
self.initPanelSubNav(_b06,_b08,_b06);
}
}
}
});
},initPanelNavSet:function(_b09,_b0a){
var _b0b=new site.globalnav.PanelNavSet({id:"pnavset_"+_b09.id,parentId:"gnav_"+_b09.id});
var _b0c=this.defaultState.item;
var _b0d=(_b0c?_b0c.id:null);
var _b0e=dijit.byId(_b0b.parentId);
var self=this;
dojo.forEach(_b09.items,function(_b10,ix){
self._configKeys[_b09.id].items[_b10.id]={ix:ix};
var _b12=false;
if(!self.defaultNavCreated&&(_b10.id===_b0d)){
_b12=true;
}
if(_b10.uri&&!_b10.content){
self.initHeader("pnav",_b10,_b12,_b0e);
}else{
if(_b12){
self.initHeader("pnav",_b10,_b12,_b0e);
}else{
var pnav=new site.globalnav.PanelNav({id:"pnav_"+_b10.id,parentId:"pnavset_"+_b09.id,displayName:_b10.name,hdPath:_b10.header,sectionId:_b09.id,itemId:_b10.id});
_b0e.addSubItem(pnav.domNode);
pnav.startup();
}
self.initPanelSubNav(_b10,_b12,_b09);
}
});
if(_b0a){
_b0e.open();
}
},initPanelSubNav:function(_b14,_b15,_b16){
var _b17=false;
if(_b16&&_b16.id==="products"||_b14.subnavType==="products"){
var _b18=(_b14.content?_b14.content:_b16.content);
var _b19=new site.globalnav.ProductSubNav({id:"psubnav_"+_b14.id,parentId:"pnav_"+_b14.id,isDefaultPanel:_b15,itemId:_b14.id,content:_b18});
}else{
var _b18=_b14.content;
var _b1a=false;
var _b1b=false;
if(_b18&&_b18.cms&&_b18.handleAs==="html"){
_b17=true;
_b1a=true;
if(_b15){
_b1b=true;
this.initCMSDisplay({isdefault:_b1b});
}
}
if(!_b1b){
var _b19=new site.globalnav.PanelSubNav({id:"psubnav_"+_b14.id,parentId:"pnav_"+_b14.id,isDefaultPanel:_b15,itemId:_b14.id,content:_b18});
}
}
if(_b15&&!_b17){
this.getPanelContent({psubnav:_b19,sectionId:_b16.id,itemId:_b14.id});
}
},getPanelContent:function(args){
var _b1d=args.psubnav;
var self=this;
if(args.psubnav.id==="psubnav_my_mac"){
dojo.publish("/globalnav/event/getcontent/my_mac",null);
}else{
var _b1f=(_b1d.content.handleAs==="html"?"text":"json-comment-optional");
var url=_b1d.content.url+(_b1d.content.param?("?"+_b1d.content.param+"="+_b1d.itemId):"");
dojo.xhrGet({url:url,handleAs:_b1f,load:function(data){
self.initPanelContent(data,args);
}});
}
},initPanelContent:function(data,_b23){
var _b24=_b23.psubnav;
if(_b24.content.handleAs==="html"){
_b24.addSubItem(data);
if(_b24.content.cms){
this.initCMSDisplay({scopeNode:_b24.id});
}
}else{
var _b25=_b23.sectionId;
var _b26=_b23.itemId;
_b24.domNode.style.visibility="hidden";
var _b27=data;
if(typeof (data)==="object"&&data.sections){
_b27=data.sections[0].items;
}
if(_b26==="discontinued"){
this.initDiscontinued(_b27,_b24);
}else{
if((_b25==="products"||_b26==="looks")&&(_b27[0]&&_b27[0].items)){
this.initProductCategories(_b27,_b24,_b25,_b26);
}else{
if(_b25===""){
_b25=_b26;
}
var _b28=false;
if(_b24.isDefaultPanel){
var _b29=this.getDefaultDetail();
_b28=dojo.some(_b27,function(_b2a){
return (_b2a.id===_b29.id);
});
if(_b28){
_b24.setDefaultState();
}
}
var self=this;
dojo.forEach(_b27,function(_b2c,ix){
if(_b2c.type==="header_link"){
var _b2e=false;
if(_b29&&(_b2c.id===_b29.id)){
_b2e=true;
}
self.initHeader("psubitem",_b2c,_b2e,_b24);
}else{
console.log("Crating "+_b26);
var _b2f=self.initDetail({item:_b2c,sectionId:_b25,pnavItemId:_b26,defaultItem:_b29,isInDefaultCategory:_b28,parentId:_b24.id,onCreate:function(d){
_b24.addSubItem(d.domNode);
}});
}
});
}
}
}
_b24.showProgress(false);
_b24.domNode.style.visibility="";
_b24.hasLoaded=true;
},initProductCategories:function(_b31,_b32,_b33,_b34){
var self=this;
var _b36=this.defaultState.item;
var _b37=(_b36?_b36.item:null);
var _b38=(_b37?_b37.id:null);
var _b39=false;
if(_b32.isDefaultPanel&&_b37){
var _b3a;
try{
_b3a=_b37.item;
}
catch(err){
}
}
dojo.forEach(_b31,function(_b3b,_b3c){
var _b3d=true;
if(!_b3b.items){
_b3d=false;
hasMixedDetail=true;
}
var _b3e=false;
var _b3f=false;
if(_b32.isDefaultPanel&&_b37){
_b39=true;
if(_b3b.id==_b38){
_b3e=true;
if(_b3a){
_b3f=dojo.some(_b3b.items,function(_b40){
return (_b40.id===_b3a.id);
});
}
}
}
var _b41={id:"psubcat_"+_b3b.id,displayName:_b3b.name,hdPath:_b3b.header,description:_b3b.description,thumbPath:_b3b.thumbnail};
if(!_b39){
var _b42=self.getAltTemplateConfig(_b3b);
if(_b42){
_b41.template=(_b41.template?_b41.template:{});
_b41.template.detail=(_b41.template.detail?_b41.template.detail:{});
dojo.mixin(_b41.template.detail,_b42);
}
console.log(_b42);
_b32.addCategoryDetail(_b41);
}
var img=_b3b.header.replace(/200/g,"250");
var _b44=_b32.addCategoryAccordion({id:"psubcat_"+_b3b.id,displayName:_b3b.name,hdPath:img,description:_b3b.description});
dojo.forEach(_b3b.items,function(_b45,ix){
var _b47=self.initDetail({item:_b45,sectionId:_b33,pnavItemId:_b34,defaultItem:_b3a,isInDefaultCategory:_b3f,parentId:_b32.id,onCreate:function(d){
_b44.addSubItem(d.domNode);
}});
});
if(_b39){
_b32.setPageState(_b44,_b3e,_b3f);
}
});
},initDetail:function(args){
var item=args.item;
var _b4b=args.sectionId;
var _b4c=args.pnavItemId;
var sk=(_b4b?this._configKeys[_b4b]:null);
var _b4e=(sk?this.config.items[sk.idx]:null);
var pnk=(_b4e?sk.items[_b4c]:null);
var _b50=(pnk?_b4e.items[pnk.idx]:_b4e);
var _b51="";
var _b52="";
if(item.header){
_b51=item.header;
}else{
if(item.image_base){
var _b53;
try{
_b53=_b4e.template.detail.hdDir;
if(_b50.template.detail.hdDir){
_b53=_b50.template.detail.hdDir;
}
}
catch(err){
}
_b51=_b53+"pnav_"+item.image_base+"_200x12_off.gif";
}
}
if(item.thumbnail){
_b52=item.thumbnail;
}else{
if(item.image_base){
var _b54;
try{
_b54=_b4e.template.detail.thumbDir;
if(_b50.template.detail.thumbDir){
_b54=_b50.template.detail.thumbDir;
}
}
catch(err){
}
_b52=_b54+item.image_base+".jpg";
}
}
var _b55=false;
var _b56=(args.defaultItem?args.defaultItem.id:null);
if(item.id==_b56){
_b55=true;
}
var _b57=(args.isInDefaultCategory?args.isInDefaultCategory:false);
item.uri+=(args.shaded_result?"&SKU_ID="+args.sku.sku_id:"");
var _b58=(item.name?item.name:"");
var _b59={id:"psubitem_"+item.id,displayName:_b58,hdPath:_b51,thumbPath:_b52,thumbRolloverPath:item.thumbnail_rollover,url:item.uri,isdefault:_b55,parentId:args.parentId,isInDefaultCategory:_b57};
_b59.description=(item.description?item.description:null);
var t;
if(args.template){
t=args.template;
if(t.detail.baseClass){
console.log(t.detail.baseClass);
}
}else{
if(_b50&&_b50.template){
t=_b50.template;
}else{
if(_b4e&&_b4e.template){
t=_b4e.template;
}
}
}
if(t){
_b59.template=dojo.clone(t);
}
var _b5b=this.getAltTemplateConfig(item);
if(_b5b){
_b59.template=(_b59.template?_b59.template:{});
_b59.template.detail=(_b59.template.detail?_b59.template.detail:{});
dojo.mixin(_b59.template.detail,_b5b);
}
var _b5c=new site.globalnav.Detail(_b59);
if(args.onCreate){
args.onCreate(_b5c);
}
_b5c.startup();
return _b5c;
},getAltTemplateConfig:function(item){
var _b5e=false;
if(item.type){
var _b5f=this.config.altTypes;
var ait=_b5f[item.type];
if(ait&&ait.detail){
_b5e=ait.detail;
}
}
return _b5e;
},initHeader:function(type,item,_b63,_b64){
var h=new site.globalnav.Header({id:type+"_"+item.id,displayName:item.name,hdPath:(item.header?item.header:""),url:(item.uri?item.uri:null),isdefault:_b63,parentId:_b64.id});
h.startup();
_b64.addSubItem(h.domNode);
},initSearch:function(_b66,_b67){
var _b68=dojo.byId(_b66.formFieldId);
var _b69=dojo.byId(_b66.formSubmitId);
if(!_b68||!_b69){
return;
}
var _b6a=dijit.byId("pnav_search_panel");
var _b6b=new site.layout.SearchControl({errorMessage:"Please enter a keyword to search."});
var _b6c=new site.search({isOpen:false,resultsNode:_b6b.resultsNode,resultsMessageNode:_b6b.resultsMessageNode});
_b6a.containerNode.appendChild(_b6b.domNode);
var _b6d=function(args){
var _b6f=args.query||_b68.value;
if(args.type==="keypress"){
if(args.keyCode!=dojo.keys.ENTER){
return false;
}
}
if(!_b6f){
var _b70=new site.popupMessage({popup:dojo.byId("pop_search_invalid"),buttonClose:dojo.byId("pop_close_search"),displayDuration:5000,position:{top:"-55px"}});
_b70.show();
return false;
}else{
if(_b6f===dojo.global.page_data.panel_nav["default"].searchDefault){
return false;
}
}
_b6c.execute({query:_b6f});
};
if(this.defaultState.item&&this.defaultState.item.id==="search"){
_b6d({query:this.defaultState.query});
}
dojo.connect(_b68,"onkeypress",_b6d);
dojo.connect(_b69,"onclick",_b6d);
if(_b67){
_b6a.open();
_b6c.isOpen=true;
}
},initDiscontinued:function(_b71,_b72){
var self=this;
var _b74=new site.globalnav.DiscontinuedDetail({header:_b71.header,description:_b71.featured_description,panel_description:_b71.panel_description});
var _b75=_b72.addSearchAccordion({id:"psubnav_CAT789_catlist",displayName:"Search Discontinued Products",hdPath:"/images/pnav/category/headers/pnav_search_disc_prods_250x18_off.gif",description:_b71.description});
var _b76=function(args){
var _b78=args.query||dojo.byId("discontinued_search_input").value;
if(!_b78){
return;
}
if(args.type=="keypress"){
if(args.keyCode!=dojo.keys.ENTER){
return false;
}
}
var _b79=dojo.byId("psubnav_CAT789_catlist_accordion_sub");
if(_b79.hasChildNodes()){
while(_b79.childNodes.length>=1){
_b79.removeChild(_b79.firstChild);
}
}
_b75.close();
dojo.byId("disc_prog").innerHTML="<img src='/images/common/icon_loading.gif' />";
dojo.xhrGet({url:"/discontinued/panel_nav.tmpl?dquery="+encodeURIComponent(_b78),handleAs:"json-comment-optional",load:function(data){
if(data.products.length==0){
var _b7b=dojo.doc.createElement("p");
_b7b.innerHTML="No results were found";
_b7b.style.paddingLeft=10+"px";
_b75.addSubItem(_b7b);
}else{
dojo.forEach(data.products,function(_b7c,ix){
var _b7e=self.initDetail({item:_b7c,sectionId:"products",pnavItemId:"discontinued",parentId:"discontinued",shaded_result:(_b7c.shade_result==1?true:false),categoryId:_b7c.category_id,productId:_b7c.product_id,sku:_b7c.sku,query:_b78,onCreate:function(d){
_b75.addSubItem(d.domNode);
}});
});
}
_b75.open();
dojo.byId("disc_prog").innerHTML="";
dojo.byId("discontinued_search").style.display="block";
}});
};
dojo.connect(dojo.byId("discontinued_search_input"),"onkeypress",_b76);
dojo.connect(dojo.byId("discontinued_search_submit"),"onclick",_b76);
if(this.defaultState.item&&this.defaultState.item.id==="discontinued"){
_b76({query:this.defaultState.query});
}
_b72.setPageState(_b75,true);
dojo.byId("discontinued_search").style.display="block";
dojo.byId("psubnav_discontinued_cat").innerHTML=_b74.domNode.innerHTML;
},getDefaultDetail:function(){
var d;
var _b81=this.defaultState.item;
if(_b81){
if(_b81.item){
d=_b81.item;
if(d.item){
d=d.item;
}
}else{
d=_b81;
}
}
return d;
},initCMSDisplay:function(args){
var _b83=(args.scopeNode?args.scopeNode:"panel_open");
var _b84=null;
var _b85;
var _b86;
if(args.isdefault){
var _b87=this.getDefaultDetail();
_b84="image_"+_b87.id;
}
dojo.query("#"+_b83+" a img").forEach(function(imgn){
if(imgn.id===_b84){
_b86=new generic.img(imgn,["off","sel"]);
_b86.changeSrc("sel");
}else{
_b85=new generic.rollover(imgn,null);
}
});
}});
dojo.provide("site.globalnav.GlobalSet");
dojo.declare("site.globalnav.GlobalSet",dijit._Widget,{activeItemId:"",_allSections:[],addChild:function(_b89){
this._allSections.push(_b89);
},addSubItem:function(item){
var node=item;
var _b8c=dojo.byId("globalnav");
try{
dojo.place(node,_b8c,"last");
}
catch(err){
}
},setActiveItem:function(_b8d){
this.activeItemId=_b8d;
},onChildClick:function(_b8e,_b8f){
if(this.activeItemId&&(this.activeItemId!==_b8e||_b8f)){
var _b90=dijit.byId(this.activeItemId);
var _b91=(_b8f?_b8e:"");
_b90.close(_b91);
}
}});
}
if(!dojo._hasResource["site.layout.MixableProduct"]){
dojo._hasResource["site.layout.MixableProduct"]=true;
dojo.provide("site.layout.MixableProduct");
dojo.declare("site.layout.MixableProduct",[dijit._Widget,dijit._Container,dijit._Contained,dijit._Templated],{templateString:"<div class=\"rel_prod_details\">\n    <a href=\"/product/spp.tmpl?CATEGORY_ID=${category_id}&PRODUCT_ID=${product_id}\">\n        <div class=\"smoosh_small\" style=\"background-color: #${hex};\">\n            <img src=\"${thumb}\" width=\"56\" height=\"56\" alt=\"${product_name}\" class=\"thumb\" style=\"padding-top:0px;\" />\n        </div>\n    </a>\n    <a href=\"/product/spp.tmpl?CATEGORY_ID=${category_id}&PRODUCT_ID=${product_id}\">\n\t    <img src=\"${header}\" width=\"200\" height=\"12\" alt=\"${product_name}\" class=\"rel_prod_head rollover\" />\n    </a>\n\t<p class=\"color\">${shade_name}</p>\n\t<p>${description}</p>\n\t<p class=\"color_swatches\"><a href=\"#\" class=\"selected\" style=\"background-color: #c82b42; border-color: #ffffff;\"><div></div></a></p>\n</div>\n",isContainer:true,hasLoaded:false,product_name:"",postCreate:function(){
if(this.hasLoaded){
this.startup();
}
},startup:function(){
}});
}
if(!dojo._hasResource["site.layout.MixableReplacements"]){
dojo._hasResource["site.layout.MixableReplacements"]=true;
dojo.provide("site.layout.MixableReplacements");
dojo.declare("site.layout.MixableReplacements",[dijit._Widget,dijit._Container,dijit._Contained,dijit._Templated],{templateString:"<div class=\"mixable_replacements_container\">\n    <div class=\"mixable_rel_top\">\n        <div title=\"Mixable Replacement Product\" class=\"disc_rel_head rel_head\" style=\"padding-top:6px;\">\n            <img class=\"mix_prod_img\" width=\"150\" height=\"8\" alt=\"Mixable Replacement Product\" src=\"/discontinued/images/title_mixable_replacement.gif\"/>\n        </div>\n    </div>\n    \n    <div class=\"rel_content\" style=\"float:left;background:#181818;\">\n        <!-- product one -->\n        <div class=\"rel_prod last mixed\" style=\"position:relative;height:100%\" dojoAttachPoint=\"containerNode\">\n            <div class=\"rel_prod_add\">\n                <span dojoAttachPoint=\"priceNode\" class=\"mix_replacements_price_node\"></span>\n            </div>\n            \n            <div id=\"discontinued_prod\" style=\"position:absolute;left:345px;top:50px\">\n                <div id=\"mixable-cart_confirm-${path}-${time}\"></div>\n                <input id=\"mixable-prod-${path}-${time}\" type=\"image\" src=\"/discontinued/images/btn_add_to_bag.gif\" width=\"93\" height=\"23\" alt=\"Add to Bag\" class=\"form_btn_add_to_bag\" />  \n            </div>\n        </div><!-- /product two -->\n    </div><!--/ mixable replacement products -->\n    <div class=\"cross_sell_btm disc_cross_sell_btm\"></div><!-- /cross sell bottom -->\n</div>\n",isContainer:true,hasLoaded:false,product_name:"",productPrices:"",postCreate:function(){
if(this.hasLoaded){
this.startup();
}
},addItem:function(_b92){
dojo.place(_b92.domNode,this.containerNode,"last");
this.productPrices+=(this.productPrices=="")?_b92.price:" + "+_b92.price;
},addPrices:function(){
this.priceNode.innerHTML=this.productPrices;
if(dojo.isSafari){
dojo.style(this.priceNode,{textAlign:"left"});
}
},initButton:function(skus){
var _b94=new site.layout.CartConfirm({id:"cart_confirm_discontinued-"+this.path+"-"+this.time,is_shaded:false,prodName:"Each replacement product"},dojo.byId("mixable-cart_confirm-"+this.path+"-"+this.time));
var _b95=new site.productButton({node:dojo.byId("mixable-prod-"+this.path+"-"+this.time),skus:skus,method:"alterCartActOnList",callback:function(){
_b94.show();
}});
}});
}
if(!dojo._hasResource["site.layout.ReplacementProduct"]){
dojo._hasResource["site.layout.ReplacementProduct"]=true;
dojo.provide("site.layout.ReplacementProduct");
dojo.declare("site.layout.ReplacementProduct",[dijit._Widget,dijit._Container,dijit._Contained,dijit._Templated],{templateString:"<div class=\"replacement_prod_container\">\n    <div class=\"replace_prod_rel_top\">\n        <div title=\"Replacement Product\" class=\"rel_head\" style=\"padding-top:6px;padding-bottom:6px;\"><img width=\"104\" height=\"9\" alt=\"Replacement Product\" src=\"/discontinued/images/title_replacement_product.gif\"/></div>\n    </div>\n    <div class=\"rel_content\" style=\"background:#181818;\">\n        <div class=\"rel_prod last\">\n            <div class=\"rel_prod_details\" style=\"margin-bottom: 0px\">\n                <a href=\"/product/spp.tmpl?CATEGORY_ID=${category_id}&PRODUCT_ID=${product_id}\">\n                    <div class=\"smoosh_small\" style=\"background-color: #${hex};\">\n                        <img src=\"${thumb}\" width=\"56\" height=\"56\" alt=\"${product_name}\"  class=\"thumb\" style=\"padding-top:0px;\" />\n                    </div>\n                </a>\n                <a href=\"/product/spp.tmpl?CATEGORY_ID=${category_id}&PRODUCT_ID=${product_id}\">\n                    <img src=\"${header}\" width=\"200\" height=\"12\" alt=\"${product_name}\" class=\"rel_prod_head rollover\" />\n                </a>\n                <p class=\"color\">${shade_name}</p>\n                <p>${description}</p>\n                <div class=\"clear\"></div>\n            </div>\n            <div id=\"discontinued_prod\">\n                <span style=\"padding-bottom: 8px;float:right;color:#ffffff;font-weight:bold;\">${price}</span>\n                <div id=\"discontinued-cart_confirm-${path}-${time}\"></div>\n                <input id=\"discontinued-prod-${path}-${time}\" style=\"float:right\" type=\"image\" value=\"${path}\" src=\"/discontinued/images/btn_add_to_bag.gif\" width=\"93\" height=\"23\" alt=\"Add to Bag\" class=\"form_btn_add_to_bag\" />\n            </div>\n        </div>\n    </div>\n    <div class=\"cross_sell_btm\" ></div>\n</div>\n",isContainer:true,hasLoaded:false,product_name:"",postCreate:function(){
if(this.hasLoaded){
this.startup();
}
},initButton:function(){
var _b96=new site.layout.CartConfirm({id:"cart_confirm_discontinued-"+this.path+"-"+this.time,is_shaded:(this.is_shaded==1?true:false),prodName:this.product_name,sku:this.sku},dojo.byId("discontinued-cart_confirm-"+this.path+"-"+this.time));
var _b97=new site.productButton({node:dojo.byId("discontinued-prod-"+this.path+"-"+this.time),callback:function(){
_b96.show();
}});
}});
}
if(!dojo._hasResource["site.layout.SwatchContainer"]){
dojo._hasResource["site.layout.SwatchContainer"]=true;
dojo.provide("site.layout.SwatchContainer");
dojo.declare("site.layout.SwatchContainer",[dijit.layout.ContentPane,dijit._Templated,dijit._Container],{templateString:"<div class=\"swatch_by_color\"></div>",sortType:"",isContainer:true,isActive:false,_started:false,_loaded:null,_dataMethod:"sort",_dataParam:"",_activeSet:"",_initialized:0,_swatchSelected:false,initDefault:false,shadedType:"solo",isDiscontinued:false,selectedSkuPath:"",skuField:null,productType:"",skus:"",product:"",smooshImg:"",sorters:{},filters:{},smooshes:null,shadeDescriptions:null,postMixInProperties:function(){
this._loaded={};
this.skus=this.product.skus;
this.sortType=(this.sortType!==""?this.sortType:"color");
this._dataParam=this.sortType;
if(this.isSingleSku){
var sku=this.skus[0];
if(dojo.isArray(sku.smoosh)&&sku.smoosh.length>0){
this.smooshes={};
}
if(dojo.isArray(sku.shade_description)&&sku.shade_description.length>0){
this.shadeDescriptions={};
}
var _b99=this.product.product_id+"_"+this.productType;
for(var i=0;i<sku.color.length;i++){
var id="swatch_"+_b99+i.toString();
if(this.smooshes){
this.smooshes[id]=sku.smoosh[i];
}
if(this.shadeDescriptions){
this.shadeDescriptions[id]=sku.shade_description[i];
}
}
}else{
if(this.product.sorters){
this.sorters=this.product.sorters;
}else{
var set=[];
dojo.forEach(this.skus,function(sku,idx){
set[idx]=[idx];
});
this.sorters[this._dataParam]=set;
}
}
},postCreate:function(){
var _b9f=this.product.product_id+"_"+this.productType;
if(this.isSingleSku){
var sku=this.skus[0];
for(var i=0;i<sku.color.length;i++){
var cid="swatch_"+_b9f+i.toString();
var name=(sku.shade_name[i]?sku.shade_name[i]:"");
var hex=sku.color[i].toString();
var _ba5=new site.layout._Swatch({id:cid,sku:sku,hex:hex,name:name,containerId:this.id});
this.loadSwatch(_ba5);
}
}else{
for(var i=0;i<this.skus.length;i++){
var sku=this.skus[i];
var cid="swatch_"+sku.sku_id;
if(this.video_prod||dijit.byId(cid)){
this.video_prod=true;
cid="video_"+cid;
}
var idx=i.toString();
var hex=(sku.color[0]?sku.color[0].toString():null);
var _ba5=new site.layout._Swatch({id:cid,sku:sku,hex:hex,name:sku.shade_name,containerId:this.id,idx:idx});
this._loaded[i]=_ba5;
}
this.processData(this._dataMethod,this._dataParam);
}
if(this.initDefault){
this.isActive=true;
}
},setSwatch:function(_ba7,_ba8){
console.log("setSwatch: swatch args = "+_ba7.id+" sku path = "+_ba7.sku.path);
if(!_ba7||this.selectedChildWidget==_ba7){
this.onSelectCallback(_ba7);
return;
}
var sku=_ba7.sku;
if(this.smooshNode){
this._swatchDance({childid:_ba7.id,name:_ba7.name,sku:_ba7.sku,hex:_ba7.asHex[0]});
}
this._updateSelected(_ba7,this.selectedChildWidget);
this.selectedChildWidget=_ba7;
if(!this.isSingleSku){
this.skuField.value=_ba7.sku.path;
}
this.onSelectCallback(_ba7);
this._swatchSelected=true;
if(this.isDiscontinued){
this._setDiscontinued(sku);
}
if(_ba8!=="load"){
var cat=sku.path.match("CAT[0-9]*");
var prod=sku.path.match("PROD([0-9]*)");
var _bac=dojo.global.page_data.catalog;
if(typeof (_bac)!=="undefined"){
if(typeof (_bac.spp)==="undefined"){
cmCreateProductviewTag(prod[1],this.product.name,cat);
}
}
if(typeof (dojo.global.page_data.featured_goodbyes)!=="undefined"){
cmCreateProductviewTag(prod[1],this.product.name,cat);
}
}
},onSelectCallback:function(_bad){
},_swatchDance:function(args){
this.smooshNode.style.backgroundColor=args.hex;
var sku=args.sku;
var desc=(this.shadeDescriptions?this.shadeDescriptions[args.childid]:sku.shade_description);
var _bb1=(this.smooshes?this.smooshes[args.childid]:sku.smoosh);
if(args.name){
this.swatchTitle.innerHTML=args.name;
}
if(desc){
this.swatchDesc.innerHTML=desc;
}
this.smooshImg.src=_bb1;
productDisplay.sppInventoryStatus({sku:sku,shaded:true});
},processData:function(_bb2,_bb3){
if((this._dataMethod===_bb2&&this._dataParam===_bb3)&&this._started){
return;
}
this._dataMethod=_bb2;
this._dataParam=_bb3;
var set;
if(_bb2==="sort"){
if(_bb3==="status"){
var _bb5=this.sorters[_bb3];
for(var i=1;i<=4;i++){
var sub=_bb5[i.toString()];
if(!set){
set=sub;
}else{
set.concat(sub);
}
}
}else{
set=this.sorters[_bb3];
}
}else{
if(_bb3==="all"){
this._dataMethod="sort";
set=this.sorters[this.sortType];
}else{
var _bb8=this.filters;
if(_bb8[_bb3]){
set=_bb8[_bb3];
}
}
}
this._activeSet=set;
this._updateSet();
},_updateSet:function(){
var _bb9=this.getChildren();
if(_bb9&&this._initialized>0){
for(var i=0;i<_bb9.length;i++){
var _bbb=_bb9[i];
this.removeChild(_bbb);
}
}
this._initialized++;
var ids=this._activeSet;
if(ids){
for(var i=0;i<ids.length;i++){
var idx=ids[i];
var _bbe=this._loaded[idx];
this.loadSwatch(_bbe);
}
}
},loadSwatch:function(_bbf){
this.addChild(_bbf);
if(!this.selectedChildWidget&&this.initDefault){
if(this.selectedSkuPath){
if(this.selectedSkuPath==_bbf.sku.path){
this.setSwatch(_bbf,"load");
}
}else{
this.setSwatch(_bbf,"load");
}
}
},_updateSelected:function(_bc0,_bc1){
if(_bc1){
_bc1.selected=false;
_bc1.toggleSelectedState(false);
}
_bc0.selected=true;
_bc0.toggleSelectedState(true);
},_setDiscontinued:function(sku){
dojo.byId("prod_sku").style.display="none";
dojo.byId("add_to_bag_top").style.display="none";
var path=sku.path;
var _bc4=dojo.global.page_data.sku_replacements;
var _bc5=dojo.byId("discontinued_xs_container");
_bc5.innerHTML="";
var _bc6=_bc4[path].replacements[0];
if(_bc4[path].replacements[0].length==0){
_bc5.style.display="none";
dojo.style(dojo.byId("artist_recommendations"),{display:"none"});
}else{
_bc5.style.display="block";
dojo.style(dojo.byId("artist_recommendations"),{display:"block"});
dojo.forEach(_bc4[path].replacements,function(_bc7){
var time=(new Date()).getTime();
if(_bc7.length==1){
var sku=_bc7[0];
var _bca=new site.layout.ReplacementProduct({product_name:sku.product_name,category_id:sku.category_id,product_id:sku.product_id,path:sku.path,shade_name:sku.shade_name,description:sku.description,price:sku.price,thumb:sku.thumb,hex:sku.hex,header:sku.header,is_shaded:sku.is_shaded,sku:sku,time:time});
_bc5.appendChild(_bca.domNode);
_bca.initButton();
}else{
var _bcb=new site.layout.MixableReplacements({path:path,time:time});
var skus=[];
dojo.forEach([_bc7[0],_bc7[1]],function(_bcd){
var _bce=new site.layout.MixableProduct({product_name:_bcd.product_name,category_id:_bcd.category_id,product_id:_bcd.product_id,path:_bcd.path,shade_name:_bcd.shade_name,description:_bcd.description,price:_bcd.price,thumb:_bcd.thumb,hex:_bcd.hex,header:_bcd.header});
_bcb.addItem(_bce);
skus.push(_bcd.path);
});
_bc5.appendChild(_bcb.domNode);
_bcb.addPrices();
_bcb.initButton(skus);
}
});
}
}});
dojo.declare("site.layout._Swatch",[dijit._Widget,dijit._Templated,dijit._Contained],{_swatchPath:dojo.moduleUrl("site","layout/templates/_Swatch.html"),_swatchThumbPath:dojo.moduleUrl("site","layout/templates/_SwatchThumb.html"),_swatchString:""+"<div class=\"swatch_hex_container\" dojoAttachPoint=\"shadeContainerNode\" dojoAttachEvent=\"ondijitclick:_onClick\">"+"<div class=\"swatch_hex\" dojoAttachPoint=\"shadeNode\" dojoAttachEvent=\"onmouseover:_onMouseOver,onmouseout:_onMouseOut\" style=\"background-color: ${asHex};\"><br /></div>"+"<div class=\"swatch_tooltip\" dojoAttachPoint=\"tooltipNode\" style=\"background-color: ${asHex};\">${name} ${inventory_status}</div>"+"</div>",_swatchThumbString:""+"<div class=\"swatch_hex_container\" dojoAttachPoint=\"shadeContainerNode\" dojoAttachEvent=\"ondijitclick:_onClick\">"+"<div class=\"swatch_hex swatch_hex_smoosh\" dojoAttachPoint=\"shadeNode\" dojoAttachEvent=\"onmouseover:_onMouseOver,onmouseout:_onMouseOut\" style=\"background-color: ${asHex};\"><img src=\"${smooshThumb}\" width=\"12\" height=\"12\" alt=\"\"></div>"+"<div class=\"swatch_tooltip\" dojoAttachPoint=\"tooltipNode\" style=\"background-color: ${asHex};\">${shade_name} ${inventory_status}</div>"+"</div>",sku:null,hex:"",name:null,type:"solo",tmplValues:{},idx:null,shade:[],asHex:[],asRgb:[],selected:false,smooshThumb:null,swatchContainerSelectedClass:"swatch_hex_container_selected",swatchSelectedClass:"swatch_hex_selected",postMixInProperties:function(){
dojo.mixin(this,this.sku);
this.templateString=this._swatchString;
this.smooshThumb=this.sku.smoosh_thumb;
var _bcf=[];
var hex=[];
var rgb=[];
var _bd2={};
var _bd3=new dojox.color.Color(this.hex);
_bcf.push(_bd3);
hex.push(_bd3.toHex());
rgb.push(_bd3.toRgb());
_bd2["asHex"+i.toString()]=_bd3.toHex();
this.shade=_bcf;
this.asHex=hex;
this.asRgb=rgb;
if(this.sku.sku_multicolor_type){
this.type=this.sku.sku_multicolor_type;
}
if(this.type==="duo"||(this.type==="solo"&&this._isDark(this.asRgb[0]))){
this.templateString=this._swatchThumbString;
}
if(this.sku.inventory_status==2||this.sku.inventory_status==3||this.sku.inventory_status==7){
this.inventory_status="("+this.sku.inventory_status_message+")";
}else{
this.inventory_status="";
}
this.tmplValues=_bd2;
dojo.mixin(this,this.tmplValues);
},postCreate:function(){
if(this.asRgb[0]){
this._setTextColor(this.asRgb[0]);
}
},_onClick:function(e){
this.getParent().setSwatch(this);
},_onMouseOver:function(e){
if(this.name){
this.tooltipNode.style.visibility="visible";
this.shadeContainerNode.style.zIndex="10";
}
},_onMouseOut:function(e){
if(this.name){
this.tooltipNode.style.visibility="hidden";
this.shadeContainerNode.style.zIndex="1";
}
},toggleSelectedState:function(_bd7){
if(_bd7){
if(this.shadeContainerNode){
dojo.addClass(this.shadeContainerNode,this.swatchContainerSelectedClass);
}
dojo.addClass(this.shadeNode,this.swatchSelectedClass);
}else{
if(this.shadeContainerNode){
dojo.removeClass(this.shadeContainerNode,this.swatchContainerSelectedClass);
}
dojo.removeClass(this.shadeNode,this.swatchSelectedClass);
}
},_setTextColor:function(rgb){
if(!rgb){
return;
}
if(this._isBright(rgb)){
this.tooltipNode.style.color="#000";
}
},_getBrightness:function(rgb){
if(!rgb){
return;
}
var _bda=rgb[0]+rgb[1]+rgb[2];
return _bda;
},_isBright:function(rgb){
if(!rgb){
return;
}
var _bdc=this._getBrightness(rgb)>450;
return _bdc;
},_isDark:function(rgb){
if(!rgb){
return;
}
var _bde=this._getBrightness(rgb)<100;
return _bde;
}});
}
if(!dojo._hasResource["site.locator._Config"]){
dojo._hasResource["site.locator._Config"]=true;
dojo.provide("site.locator._Config");
dojo.declare("site.locator._Config",null,{_sortKey:"distance",_icoMarkers:[],_tempMarkers:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],_default_conf:{use:["map"],map:{node:"map_placeholder",_class:"generic.locator.GoogleMap"},results:{node:"results_placeholder",_class:"generic.locator.Results",preload:true},directions:{node:"directions_placeholder",show_default:false}},constructor:function(conf){
if(!conf.search_results){
return;
}
this.config=dojo.mixin(this._default_conf,conf);
console.log("_Config.constructor __config: ",this.config);
this.results=conf.search_results;
this._pager=new generic.pager({list:this.results.group[this._sortKey],per_page:5});
console.log("_Config.constructor __pager:",this._pager);
this._evt_pager=new generic.pager({list:this.results.group["events"],per_page:5});
for(var i=0;i<this.config.use.length;i++){
var name=this.config.use[i];
var _be2=this.config[name]._class;
console.log("_Config.constructor __className: ",_be2);
if(_be2){
try{
var test=(_be2!==null);
dojo.requireIf(test,_be2);
if(!this._loaded){
this._loaded={};
}
this._loaded[name]=true;
}
catch(e){
console.log("Failed loading ",_be2," >> ",e);
throw new Error("Unable to load class: "+_be2);
}
}
}
var _be4=[];
var _be5=this._tempMarkers;
for(var j=0;j<_be5.length;j++){
var subm=_be5[j]+"1";
_be4.push(subm);
}
this._icoMarkers=_be5.concat(_be4);
},pager:function(){
return this._pager;
},evt_pager:function(){
return this._evt_pager;
},loadedModules:function(){
return this._loaded?this._loaded:false;
},getClassObject:function(_be8,_be9){
if(this.config[_be8]&&this.config[_be8]._class){
if(_be9){
if(this._loaded&&this._loaded[_be8]){
return dojo.getObject(this.config[_be8]._class);
}
}else{
return dojo.getObject(this.config[_be8]._class);
}
}
},getConfig:function(_bea){
if(_bea&&this.config[_bea]){
return this.config[_bea];
}else{
return this.config;
}
},getSrcNode:function(_beb){
if(_beb&&this.config[_beb]){
return this.config[_beb].node;
}
},getQuery:function(){
return this.results.query;
},isLoaded:function(_bec){
return (this._loaded&&this._loaded[_bec]);
},doorByPosition:function(_bed,pos){
_bed=(typeof _bed!=="undefined")?_bed:this._sortKey;
pos=(typeof pos!=="undefined")?pos:0;
var id=this.results.group[_bed][pos];
return this.results.doors[id];
},doorById:function(id){
if(!id){
return;
}
return this.results.doors[id];
},groupByName:function(_bf1){
_bf1=(typeof _bf1!=="undefined")?_bf1:this._sortKey;
return this.results.group[_bf1];
}});
}
if(!dojo._hasResource["site.locator._google.CustomIcon"]){
dojo._hasResource["site.locator._google.CustomIcon"]=true;
dojo.provide("site.locator._google.CustomIcon");
dojo.declare("site.locator._google.CustomIcon",null,{baseUrl:"http://chart.apis.google.com/chart?cht=mm",width:32,height:32,strokeColor:"#000000",cornerColor:"#ffffff",primaryColor:"#ff0000",icon:null,iconUrl:null,transUrl:null,constructor:function(args){
console.log("CustomIcon.constructor: ",args);
dojo.mixin(this,args);
if(this.iconUrl===null){
this._buildIconUrls();
}
this.icon=new dojo.global.GIcon(G_DEFAULT_ICON);
},createIcon:function(){
var icon=this.icon;
icon.image=this.iconUrl;
icon.iconSize=new dojo.global.GSize(this.width,this.height);
icon.shadowSize=new dojo.global.GSize(Math.floor(this.width*1.6),this.height);
icon.iconAnchor=new dojo.global.GPoint(this.width/2,this.height);
icon.infoWindowAnchor=new dojo.global.GPoint(this.width/2,Math.floor(this.height/12));
icon.printImage=this.iconUrl+"&chof=gif";
icon.mozPrintImage=this.iconUrl+"&chf=bg,s,ECECD8"+"&chof=gif";
icon.transparent=this.transUrl;
icon.imageMap=[this.width/2,this.height,(7/16)*this.width,(5/8)*this.height,(5/16)*this.width,(7/16)*this.height,(7/32)*this.width,(5/16)*this.height,(5/16)*this.width,(1/8)*this.height,(1/2)*this.width,0,(11/16)*this.width,(1/8)*this.height,(25/32)*this.width,(5/16)*this.height,(11/16)*this.width,(7/16)*this.height,(9/16)*this.width,(5/8)*this.height];
for(var i=0;i<icon.imageMap.length;i++){
icon.imageMap[i]=parseInt(icon.imageMap[i],10);
}
this.icon=icon;
return this.icon;
},_buildIconUrls:function(){
this.iconUrl=this.baseUrl+"&chs="+this.width+"x"+this.height+"&chco="+this.cornerColor.replace("#","")+","+this.primaryColor.replace("#","")+","+this.strokeColor.replace("#","")+"&ext=.png";
this.transUrl=this.iconUrl.replace("&ext=.png","&chf=a,s,ffffff11&ext=.png");
}});
}
if(!dojo._hasResource["site.locator.Locator"]){
dojo._hasResource["site.locator.Locator"]=true;
dojo.provide("site.locator.Locator");
dojo.declare("site.locator.Locator",null,{_gmap:null,_gdir:null,_results:null,constructor:function(conf){
if(!conf){
return;
}
console.log("Locator.constructor: ",conf);
this._config=new site.locator._Config(conf);
},startup:function(){
console.log("Locator.startup()");
var _bf6=this._config.getClassObject("map",true);
console.log("Locator.startup __MapClass: ",_bf6);
if(_bf6){
console.log("loading map");
this._gmap=new _bf6(this._config);
}
var _bf7=this._config.getClassObject("results",true);
if(_bf7){
var src=this._config.getSrcNode("results");
console.log("results node: ",src);
this._results=new _bf7({_config:this._config},src);
}
}});
}
dojo.i18n._preloadLocalizations("site.nls.mackr_layer",["xx","ROOT","ko-kr","ko"]);
