/*
	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["dijit._base.focus"]){
dojo._hasResource["dijit._base.focus"]=true;
dojo.provide("dijit._base.focus");
dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){
var _31=dojo.global;
var _32=dojo.doc;
if(_32.selection){
return !_32.selection.createRange().text;
}else{
var _33=_31.getSelection();
if(dojo.isString(_33)){
return !_33;
}else{
return _33.isCollapsed||!_33.toString();
}
}
},getBookmark:function(){
var _34,_35=dojo.doc.selection;
if(_35){
var _36=_35.createRange();
if(_35.type.toUpperCase()=="CONTROL"){
if(_36.length){
_34=[];
var i=0,len=_36.length;
while(i<len){
_34.push(_36.item(i++));
}
}else{
_34=null;
}
}else{
_34=_36.getBookmark();
}
}else{
if(window.getSelection){
_35=dojo.global.getSelection();
if(_35){
_36=_35.getRangeAt(0);
_34=_36.cloneRange();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return _34;
},moveToBookmark:function(_39){
var _3a=dojo.doc;
if(_3a.selection){
var _3b;
if(dojo.isArray(_39)){
_3b=_3a.body.createControlRange();
dojo.forEach(_39,"range.addElement(item)");
}else{
_3b=_3a.selection.createRange();
_3b.moveToBookmark(_39);
}
_3b.select();
}else{
var _3c=dojo.global.getSelection&&dojo.global.getSelection();
if(_3c&&_3c.removeAllRanges){
_3c.removeAllRanges();
_3c.addRange(_39);
}else{
console.warn("No idea how to restore selection for this browser!");
}
}
},getFocus:function(_3d,_3e){
return {node:_3d&&dojo.isDescendant(dijit._curFocus,_3d.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_3e||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_3e||dojo.global,dijit.getBookmark):null,openedForWindow:_3e};
},focus:function(_3f){
if(!_3f){
return;
}
var _40="node" in _3f?_3f.node:_3f,_41=_3f.bookmark,_42=_3f.openedForWindow;
if(_40){
var _43=(_40.tagName.toLowerCase()=="iframe")?_40.contentWindow:_40;
if(_43&&_43.focus){
try{
_43.focus();
}
catch(e){
}
}
dijit._onFocusNode(_40);
}
if(_41&&dojo.withGlobal(_42||dojo.global,dijit.isCollapsed)){
if(_42){
_42.focus();
}
try{
dojo.withGlobal(_42||dojo.global,dijit.moveToBookmark,null,[_41]);
}
catch(e){
}
}
},_activeStack:[],registerWin:function(_44){
if(!_44){
_44=window;
}
dojo.connect(_44.document,"onmousedown",function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
dijit._onTouchNode(evt.target||evt.srcElement);
});
var _46=_44.document.body||_44.document.getElementsByTagName("body")[0];
if(_46){
if(dojo.isIE){
_46.attachEvent("onactivate",function(evt){
if(evt.srcElement.tagName.toLowerCase()!="body"){
dijit._onFocusNode(evt.srcElement);
}
});
_46.attachEvent("ondeactivate",function(evt){
dijit._onBlurNode(evt.srcElement);
});
}else{
_46.addEventListener("focus",function(evt){
dijit._onFocusNode(evt.target);
},true);
_46.addEventListener("blur",function(evt){
dijit._onBlurNode(evt.target);
},true);
}
}
_46=null;
},_onBlurNode:function(_4b){
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(_4c){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _4d=[];
try{
while(_4c){
if(_4c.dijitPopupParent){
_4c=dijit.byId(_4c.dijitPopupParent).domNode;
}else{
if(_4c.tagName&&_4c.tagName.toLowerCase()=="body"){
if(_4c===dojo.body()){
break;
}
_4c=dijit.getDocumentWindow(_4c.ownerDocument).frameElement;
}else{
var id=_4c.getAttribute&&_4c.getAttribute("widgetId");
if(id){
_4d.unshift(id);
}
_4c=_4c.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_4d);
},_onFocusNode:function(_4f){
if(_4f&&_4f.tagName&&_4f.tagName.toLowerCase()=="body"){
return;
}
dijit._onTouchNode(_4f);
if(_4f==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=_4f;
dojo.publish("focusNode",[_4f]);
},_setStack:function(_50){
var _51=dijit._activeStack;
dijit._activeStack=_50;
for(var _52=0;_52<Math.min(_51.length,_50.length);_52++){
if(_51[_52]!=_50[_52]){
break;
}
}
for(var i=_51.length-1;i>=_52;i--){
var _54=dijit.byId(_51[i]);
if(_54){
_54._focused=false;
_54._hasBeenBlurred=true;
if(_54._onBlur){
_54._onBlur();
}
if(_54._setStateClass){
_54._setStateClass();
}
dojo.publish("widgetBlur",[_54]);
}
}
for(i=_52;i<_50.length;i++){
_54=dijit.byId(_50[i]);
if(_54){
_54._focused=true;
if(_54._onFocus){
_54._onFocus();
}
if(_54._setStateClass){
_54._setStateClass();
}
dojo.publish("widgetFocus",[_54]);
}
}
}});
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(_55){
if(this._hash[_55.id]){
throw new Error("Tried to register widget with id=="+_55.id+" but that id is already registered");
}
this._hash[_55.id]=_55;
},remove:function(id){
delete this._hash[id];
},forEach:function(_57){
for(var id in this._hash){
_57(this._hash[id]);
}
},filter:function(_59){
var res=new dijit.WidgetSet();
this.forEach(function(_5b){
if(_59(_5b)){
res.add(_5b);
}
});
return res;
},byId:function(id){
return this._hash[id];
},byClass:function(cls){
return this.filter(function(_5e){
return _5e.declaredClass==cls;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_5f){
var id;
do{
id=_5f+"_"+(_5f in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_5f]:dijit._widgetTypeCtr[_5f]=0);
}while(dijit.byId(id));
return id;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
dijit.registry.forEach(function(_61){
_61.destroy();
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(_63){
return dijit.registry.byId(_63.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(_64){
while(_64){
if(_64.getAttribute&&_64.getAttribute("widgetId")){
return dijit.registry.byId(_64.getAttribute("widgetId"));
}
_64=_64.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(_65){
var _66=dojo.style(_65);
return (_66.visibility!="hidden")&&(_66.visibility!="collapsed")&&(_66.display!="none");
};
dijit.isTabNavigable=function(_67){
if(dojo.hasAttr(_67,"disabled")){
return false;
}
var _68=dojo.hasAttr(_67,"tabindex");
var _69=dojo.attr(_67,"tabindex");
if(_68&&_69>=0){
return true;
}
var _6a=_67.nodeName.toLowerCase();
if(((_6a=="a"&&dojo.hasAttr(_67,"href"))||dijit._tabElements[_6a])&&(!_68||_69>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(_6b){
var _6c,_6d,_6e,_6f,_70,_71;
var _72=function(_73){
dojo.query("> *",_73).forEach(function(_74){
var _75=dijit._isElementShown(_74);
if(_75&&dijit.isTabNavigable(_74)){
var _76=dojo.attr(_74,"tabindex");
if(!dojo.hasAttr(_74,"tabindex")||_76==0){
if(!_6c){
_6c=_74;
}
_6d=_74;
}else{
if(_76>0){
if(!_6e||_76<_6f){
_6f=_76;
_6e=_74;
}
if(!_70||_76>=_71){
_71=_76;
_70=_74;
}
}
}
}
if(_75){
_72(_74);
}
});
};
if(dijit._isElementShown(_6b)){
_72(_6b);
}
return {first:_6c,last:_6d,lowest:_6e,highest:_70};
};
dijit.getFirstInTabbingOrder=function(_77){
var _78=dijit._getTabNavigable(dojo.byId(_77));
return _78.lowest?_78.lowest:_78.first;
};
dijit.getLastInTabbingOrder=function(_79){
var _7a=dijit._getTabNavigable(dojo.byId(_79));
return _7a.last?_7a.last:_7a.highest;
};
}
if(!dojo._hasResource["dijit._base.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");
dijit.getViewport=function(){
var _7b=dojo.global;
var _7c=dojo.doc;
var w=0,h=0;
var de=_7c.documentElement;
var dew=de.clientWidth,deh=de.clientHeight;
if(dojo.isMozilla){
var _82,_83,_84,_85;
var dbw=_7c.body.clientWidth;
if(dbw>dew){
_82=dew;
_84=dbw;
}else{
_84=dew;
_82=dbw;
}
var dbh=_7c.body.clientHeight;
if(dbh>deh){
_83=deh;
_85=dbh;
}else{
_85=deh;
_83=dbh;
}
w=(_84>_7b.innerWidth)?_82:_84;
h=(_85>_7b.innerHeight)?_83:_85;
}else{
if(!dojo.isOpera&&_7b.innerWidth){
w=_7b.innerWidth;
h=_7b.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 _88=dojo._docScroll();
return {w:w,h:h,l:_88.x,t:_88.y};
};
dijit.placeOnScreen=function(_89,pos,_8b,_8c){
var _8d=dojo.map(_8b,function(_8e){
return {corner:_8e,pos:pos};
});
return dijit._place(_89,_8d);
};
dijit._place=function(_8f,_90,_91){
var _92=dijit.getViewport();
if(!_8f.parentNode||String(_8f.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(_8f);
}
var _93=null;
dojo.some(_90,function(_94){
var _95=_94.corner;
var pos=_94.pos;
if(_91){
_91(_8f,_94.aroundCorner,_95);
}
var _97=_8f.style;
var _98=_97.display;
var _99=_97.visibility;
_97.visibility="hidden";
_97.display="";
var mb=dojo.marginBox(_8f);
_97.display=_98;
_97.visibility=_99;
var _9b=(_95.charAt(1)=="L"?pos.x:Math.max(_92.l,pos.x-mb.w)),_9c=(_95.charAt(0)=="T"?pos.y:Math.max(_92.t,pos.y-mb.h)),_9d=(_95.charAt(1)=="L"?Math.min(_92.l+_92.w,_9b+mb.w):pos.x),_9e=(_95.charAt(0)=="T"?Math.min(_92.t+_92.h,_9c+mb.h):pos.y),_9f=_9d-_9b,_a0=_9e-_9c,_a1=(mb.w-_9f)+(mb.h-_a0);
if(_93==null||_a1<_93.overflow){
_93={corner:_95,aroundCorner:_94.aroundCorner,x:_9b,y:_9c,w:_9f,h:_a0,overflow:_a1};
}
return !_a1;
});
_8f.style.left=_93.x+"px";
_8f.style.top=_93.y+"px";
if(_93.overflow&&_91){
_91(_8f,_93.aroundCorner,_93.corner);
}
return _93;
};
dijit.placeOnScreenAroundElement=function(_a2,_a3,_a4,_a5){
_a3=dojo.byId(_a3);
var _a6=_a3.style.display;
_a3.style.display="";
var _a7=_a3.offsetWidth;
var _a8=_a3.offsetHeight;
var _a9=dojo.coords(_a3,true);
_a3.style.display=_a6;
var _aa=[];
for(var _ab in _a4){
_aa.push({aroundCorner:_ab,corner:_a4[_ab],pos:{x:_a9.x+(_ab.charAt(1)=="L"?0:_a7),y:_a9.y+(_ab.charAt(0)=="T"?0:_a8)}});
}
return dijit._place(_a2,_aa,_a5);
};
}
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 _b1=[],_b2=1000,_b3=1;
this.prepare=function(_b4){
dojo.body().appendChild(_b4);
var s=_b4.style;
if(s.display=="none"){
s.display="";
}
s.visibility="hidden";
s.position="absolute";
s.top="-9999px";
};
this.open=function(_b6){
var _b7=_b6.popup,_b8=_b6.orient||{"BL":"TL","TL":"BL"},_b9=_b6.around,id=(_b6.around&&_b6.around.id)?(_b6.around.id+"_dropdown"):("popup_"+_b3++);
var _bb=dojo.doc.createElement("div");
dijit.setWaiRole(_bb,"presentation");
_bb.id=id;
_bb.className="dijitPopup";
_bb.style.zIndex=_b2+_b1.length;
_bb.style.visibility="hidden";
if(_b6.parent){
_bb.dijitPopupParent=_b6.parent.id;
}
dojo.body().appendChild(_bb);
var s=_b7.domNode.style;
s.display="";
s.visibility="";
s.position="";
_bb.appendChild(_b7.domNode);
var _bd=new dijit.BackgroundIframe(_bb);
var _be=_b9?dijit.placeOnScreenAroundElement(_bb,_b9,_b8,_b7.orient?dojo.hitch(_b7,"orient"):null):dijit.placeOnScreen(_bb,_b6,_b8=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);
_bb.style.visibility="visible";
var _bf=[];
var _c0=function(){
for(var pi=_b1.length-1;pi>0&&_b1[pi].parent===_b1[pi-1].widget;pi--){
}
return _b1[pi];
};
_bf.push(dojo.connect(_bb,"onkeypress",this,function(evt){
if(evt.keyCode==dojo.keys.ESCAPE&&_b6.onCancel){
dojo.stopEvent(evt);
_b6.onCancel();
}else{
if(evt.keyCode==dojo.keys.TAB){
dojo.stopEvent(evt);
var _c3=_c0();
if(_c3&&_c3.onCancel){
_c3.onCancel();
}
}
}
}));
if(_b7.onCancel){
_bf.push(dojo.connect(_b7,"onCancel",null,_b6.onCancel));
}
_bf.push(dojo.connect(_b7,_b7.onExecute?"onExecute":"onChange",null,function(){
var _c4=_c0();
if(_c4&&_c4.onExecute){
_c4.onExecute();
}
}));
_b1.push({wrapper:_bb,iframe:_bd,widget:_b7,parent:_b6.parent,onExecute:_b6.onExecute,onCancel:_b6.onCancel,onClose:_b6.onClose,handlers:_bf});
if(_b7.onOpen){
_b7.onOpen(_be);
}
return _be;
};
this.close=function(_c5){
while(dojo.some(_b1,function(_c6){
return _c6.widget==_c5;
})){
var top=_b1.pop(),_c8=top.wrapper,_c9=top.iframe,_ca=top.widget,_cb=top.onClose;
if(_ca.onClose){
_ca.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(!_ca||!_ca.domNode){
return;
}
this.prepare(_ca.domNode);
_c9.destroy();
dojo._destroyElement(_c8);
if(_cb){
_cb();
}
}
};
}();
dijit._frames=new function(){
var _cc=[];
this.pop=function(){
var _cd;
if(_cc.length){
_cd=_cc.pop();
_cd.style.display="";
}else{
if(dojo.isIE){
var _ce="<iframe src='javascript:\"\"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_cd=dojo.doc.createElement(_ce);
}else{
_cd=dojo.doc.createElement("iframe");
_cd.src="javascript:\"\"";
_cd.className="dijitBackgroundIframe";
}
_cd.tabIndex=-1;
dojo.body().appendChild(_cd);
}
return _cd;
};
this.push=function(_cf){
_cf.style.display="";
if(dojo.isIE){
_cf.style.removeExpression("width");
_cf.style.removeExpression("height");
}
_cc.push(_cf);
};
}();
if(dojo.isIE&&dojo.isIE<7){
dojo.addOnLoad(function(){
var f=dijit._frames;
dojo.forEach([f.pop()],f.push);
});
}
dijit.BackgroundIframe=function(_d1){
if(!_d1.id){
throw new Error("no id");
}
if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){
var _d2=dijit._frames.pop();
_d1.appendChild(_d2);
if(dojo.isIE){
_d2.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_d1.id+"').offsetWidth");
_d2.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_d1.id+"').offsetHeight");
}
this.iframe=_d2;
}
};
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(_d3){
var _d4=_d3.parentNode;
var _d5=_d4.scrollTop+dojo.marginBox(_d4).h;
var _d6=_d3.offsetTop+dojo.marginBox(_d3).h;
if(_d5<_d6){
_d4.scrollTop+=(_d6-_d5);
}else{
if(_d4.scrollTop>_d3.offsetTop){
_d4.scrollTop-=(_d4.scrollTop-_d3.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 _d9=d.isOpera;
var maj=Math.floor;
var ff=d.isFF;
var _dc={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_d9,dj_opera8:maj(_d9)==8,dj_opera9:maj(_d9)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2};
for(var p in _dc){
if(_dc[p]){
var _de=dojo.doc.documentElement;
if(_de.className){
_de.className+=" "+p;
}else{
_de.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,_e0,_e1,_e2,obj,_e4,_e5){
if(obj!=this._obj){
this.stop();
this._initialDelay=_e5||500;
this._subsequentDelay=_e4||0.9;
this._obj=obj;
this._evt=evt;
this._node=_e1;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_e0,_e2);
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(_e6,_e7,_e8,_e9,_ea,_eb){
return [dojo.connect(_e6,"onkeypress",this,function(evt){
if(evt.keyCode==_e7.keyCode&&(!_e7.charCode||_e7.charCode==evt.charCode)&&(_e7.ctrlKey===undefined||_e7.ctrlKey==evt.ctrlKey)&&(_e7.altKey===undefined||_e7.altKey==evt.ctrlKey)&&(_e7.shiftKey===undefined||_e7.shiftKey==evt.ctrlKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(_e7,_e8,_e6,_e9,_e7,_ea,_eb);
}else{
if(dijit.typematic._obj==_e7){
dijit.typematic.stop();
}
}
}),dojo.connect(_e6,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_e7){
dijit.typematic.stop();
}
})];
},addMouseListener:function(_ee,_ef,_f0,_f1,_f2){
var dc=dojo.connect;
return [dc(_ee,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_ef,_ee,_f0,_ee,_f1,_f2);
}),dc(_ee,"mouseup",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(_ee,"mouseout",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(_ee,"mousemove",this,function(evt){
dojo.stopEvent(evt);
}),dc(_ee,"dblclick",this,function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt,_ef,_ee,_f0,_ee,_f1,_f2);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_f9,_fa,_fb,_fc,_fd,_fe,_ff){
return this.addKeyListener(_fa,_fb,_fc,_fd,_fe,_ff).concat(this.addMouseListener(_f9,_fc,_fd,_fe,_ff));
}};
}
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 _102=cs.backgroundImage;
var _103=(cs.borderTopColor==cs.borderRightColor)||(_102!=null&&(_102=="none"||_102=="url(invalid-url:)"));
dojo[_103?"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 _106=elem.getAttribute("role");
if(_106){
var _107=_106.indexOf(":");
return _107==-1?_106:_106.substring(_107+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,_10c){
if(dojo.isFF&&dojo.isFF<3){
return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_10c);
}else{
return elem.hasAttribute?elem.hasAttribute("aria-"+_10c):!!elem.getAttribute("aria-"+_10c);
}
},getWaiState:function(elem,_10e){
if(dojo.isFF&&dojo.isFF<3){
return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_10e);
}else{
var _10f=elem.getAttribute("aria-"+_10e);
return _10f?_10f:"";
}
},setWaiState:function(elem,_111,_112){
if(dojo.isFF&&dojo.isFF<3){
elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_111,_112);
}else{
elem.setAttribute("aria-"+_111,_112);
}
},removeWaiState:function(elem,_114){
if(dojo.isFF&&dojo.isFF<3){
elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_114);
}else{
elem.removeAttribute("aria-"+_114);
}
}});
}
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(_115,_116){
this.create(_115,_116);
},create:function(_117,_118){
this.srcNodeRef=dojo.byId(_118);
this._connects=[];
this._attaches=[];
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_117){
this.params=_117;
dojo.mixin(this,_117);
}
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 _11a=this[attr];
if(typeof _11a!="object"&&((_11a!==""&&_11a!==false)||(_117&&_117[attr]))){
this.setAttribute(attr,_11a);
}
}
}
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(_11b){
this.destroyDescendants();
this.destroy();
},destroy:function(_11c){
this.uninitialize();
dojo.forEach(this._connects,function(_11d){
dojo.forEach(_11d,dojo.disconnect);
});
dojo.forEach(this._supportingWidgets||[],function(w){
w.destroy();
});
this.destroyRendering(_11c);
dijit.registry.remove(this.id);
},destroyRendering:function(_11f){
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(_120){
_120.destroy();
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},setAttribute:function(attr,_123){
var _124=this[this.attributeMap[attr]||"domNode"];
this[attr]=_123;
switch(attr){
case "class":
dojo.addClass(_124,_123);
break;
case "style":
if(_124.style.cssText){
_124.style.cssText+="; "+_123;
}else{
_124.style.cssText=_123;
}
break;
default:
if(/^on[A-Z]/.test(attr)){
attr=attr.toLowerCase();
}
if(typeof _123=="function"){
_123=dojo.hitch(this,_123);
}
dojo.attr(_124,attr,_123);
}
},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,_127,_128){
var _129=[];
if(_127=="ondijitclick"){
if(!this.nodesWithKeyClick[obj.nodeName]){
_129.push(dojo.connect(obj,"onkeydown",this,function(e){
if(e.keyCode==dojo.keys.ENTER){
return (dojo.isString(_128))?this[_128](e):_128.call(this,e);
}else{
if(e.keyCode==dojo.keys.SPACE){
dojo.stopEvent(e);
}
}
}));
_129.push(dojo.connect(obj,"onkeyup",this,function(e){
if(e.keyCode==dojo.keys.SPACE){
return dojo.isString(_128)?this[_128](e):_128.call(this,e);
}
}));
}
_127="onclick";
}
_129.push(dojo.connect(obj,_127,this,_128));
this._connects.push(_129);
return _129;
},disconnect:function(_12c){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_12c){
dojo.forEach(_12c,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(_133,map,_135,_136){
return _133.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_137,key,_139){
var _13a=dojo.getObject(key,false,map);
if(_139){
_13a=dojo.getObject(_139,false,_136)(_13a);
}
if(_135){
_13a=_135(_13a,key);
}
return _13a.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(_13d,_13e){
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 _13f=dojo.date.stamp._isoRegExp.exec(_13d);
var _140=null;
if(_13f){
_13f.shift();
if(_13f[1]){
_13f[1]--;
}
if(_13f[6]){
_13f[6]*=1000;
}
if(_13e){
_13e=new Date(_13e);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){
return _13e["get"+prop]();
}).forEach(function(_142,_143){
if(_13f[_143]===undefined){
_13f[_143]=_142;
}
});
}
_140=new Date(_13f[0]||1970,_13f[1]||0,_13f[2]||1,_13f[3]||0,_13f[4]||0,_13f[5]||0,_13f[6]||0);
var _144=0;
var _145=_13f[7]&&_13f[7].charAt(0);
if(_145!="Z"){
_144=((_13f[8]||0)*60)+(Number(_13f[9])||0);
if(_145!="-"){
_144*=-1;
}
}
if(_145){
_144-=_140.getTimezoneOffset();
}
if(_144){
_140.setTime(_140.getTime()+_144*60000);
}
}
return _140;
};
dojo.date.stamp.toISOString=function(_146,_147){
var _=function(n){
return (n<10)?"0"+n:n;
};
_147=_147||{};
var _14a=[];
var _14b=_147.zulu?"getUTC":"get";
var date="";
if(_147.selector!="time"){
var year=_146[_14b+"FullYear"]();
date=["0000".substr((year+"").length)+year,_(_146[_14b+"Month"]()+1),_(_146[_14b+"Date"]())].join("-");
}
_14a.push(date);
if(_147.selector!="date"){
var time=[_(_146[_14b+"Hours"]()),_(_146[_14b+"Minutes"]()),_(_146[_14b+"Seconds"]())].join(":");
var _14f=_146[_14b+"Milliseconds"]();
if(_147.milliseconds){
time+="."+(_14f<100?"0":"")+_(_14f);
}
if(_147.zulu){
time+="Z";
}else{
if(_147.selector!="time"){
var _150=_146.getTimezoneOffset();
var _151=Math.abs(_150);
time+=(_150>0?"-":"+")+_(Math.floor(_151/60))+":"+_(_151%60);
}
}
_14a.push(time);
}
return _14a.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _153=d._scopeName+"Type";
var qry="["+_153+"]";
function val2type(_155){
if(d.isString(_155)){
return "string";
}
if(typeof _155=="number"){
return "number";
}
if(typeof _155=="boolean"){
return "boolean";
}
if(d.isFunction(_155)){
return "function";
}
if(d.isArray(_155)){
return "array";
}
if(_155 instanceof Date){
return "date";
}
if(_155 instanceof d._Url){
return "url";
}
return "object";
};
function str2obj(_156,type){
switch(type){
case "string":
return _156;
case "number":
return _156.length?Number(_156):NaN;
case "boolean":
return typeof _156=="boolean"?_156:!(_156.toLowerCase()=="false");
case "function":
if(d.isFunction(_156)){
_156=_156.toString();
_156=d.trim(_156.substring(_156.indexOf("{")+1,_156.length-1));
}
try{
if(_156.search(/[^\w\.]+/i)!=-1){
_156=d.parser._nameAnonFunc(new Function(_156),this);
}
return d.getObject(_156,false);
}
catch(e){
return new Function();
}
case "array":
return _156.split(/\s*,\s*/);
case "date":
switch(_156){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_156);
}
case "url":
return d.baseUrl+_156;
default:
return d.fromJson(_156);
}
};
var _158={};
function getClassInfo(_159){
if(!_158[_159]){
var cls=d.getObject(_159);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_159+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _15b=cls.prototype;
var _15c={};
for(var name in _15b){
if(name.charAt(0)=="_"){
continue;
}
var _15e=_15b[name];
_15c[name]=val2type(_15e);
}
_158[_159]={cls:cls,params:_15c};
}
return _158[_159];
};
this._functionFromScript=function(_15f){
var _160="";
var _161="";
var _162=_15f.getAttribute("args");
if(_162){
d.forEach(_162.split(/\s*,\s*/),function(part,idx){
_160+="var "+part+" = arguments["+idx+"]; ";
});
}
var _165=_15f.getAttribute("with");
if(_165&&_165.length){
d.forEach(_165.split(/\s*,\s*/),function(part){
_160+="with("+part+"){";
_161+="}";
});
}
return new Function(_160+_15f.innerHTML+_161);
};
this.instantiate=function(_167){
var _168=[];
d.forEach(_167,function(node){
if(!node){
return;
}
var type=node.getAttribute(_153);
if((!type)||(!type.length)){
return;
}
var _16b=getClassInfo(type);
var _16c=_16b.cls;
var ps=_16c._noScript||_16c.prototype._noScript;
var _16e={};
var _16f=node.attributes;
for(var name in _16b.params){
var item=_16f.getNamedItem(name);
if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){
continue;
}
var _172=item.value;
switch(name){
case "class":
_172=node.className;
break;
case "style":
_172=node.style&&node.style.cssText;
}
var _173=_16b.params[name];
_16e[name]=str2obj(_172,_173);
}
if(!ps){
var _174=[],_175=[];
d.query("> script[type^='dojo/']",node).orphan().forEach(function(_176){
var _177=_176.getAttribute("event"),type=_176.getAttribute("type"),nf=d.parser._functionFromScript(_176);
if(_177){
if(type=="dojo/connect"){
_174.push({event:_177,func:nf});
}else{
_16e[_177]=nf;
}
}else{
_175.push(nf);
}
});
}
var _179=_16c["markupFactory"];
if(!_179&&_16c["prototype"]){
_179=_16c.prototype["markupFactory"];
}
var _17a=_179?_179(_16e,node,_16c):new _16c(_16e,node);
_168.push(_17a);
var _17b=node.getAttribute("jsId");
if(_17b){
d.setObject(_17b,_17a);
}
if(!ps){
d.forEach(_174,function(_17c){
d.connect(_17a,_17c.event,null,_17c.func);
});
d.forEach(_175,function(func){
func.call(_17a);
});
}
});
d.forEach(_168,function(_17e){
if(_17e&&_17e.startup&&!_17e._started&&(!_17e.getParent||!_17e.getParent())){
_17e.startup();
}
});
return _168;
};
this.parse=function(_17f){
var list=d.query(qry,_17f);
var _181=this.instantiate(list);
return _181;
};
}();
(function(){
var _182=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,_182);
}else{
dojo._loaders.unshift(_182);
}
})();
dojo.parser._anonCtr=0;
dojo.parser._anon={};
dojo.parser._nameAnonFunc=function(_183,_184){
var jpn="$joinpoint";
var nso=(_184||dojo.parser._anon);
if(dojo.isIE){
var cn=_183["__dojoNameCache"];
if(cn&&nso[cn]===_183){
return _183["__dojoNameCache"];
}
}
var ret="__"+dojo.parser._anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.parser._anonCtr++;
}
nso[ret]=_183;
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 _18a=this.declaredClass,_18b=this;
return dojo.string.substitute(tmpl,this,function(_18c,key){
if(key.charAt(0)=="!"){
_18c=_18b[key.substr(1)];
}
if(typeof _18c=="undefined"){
throw new Error(_18a+" template:"+key);
}
if(!_18c){
return "";
}
return key.charAt(0)=="!"?_18c:_18c.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _18e=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_18e)){
node=dijit._Templated._createNodesFromText(this._stringRepl(_18e))[0];
}else{
node=_18e.cloneNode(true);
}
this._attachTemplateNodes(node);
var _190=this.srcNodeRef;
if(_190&&_190.parentNode){
_190.parentNode.replaceChild(node,_190);
}
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(_190);
},_fillContent:function(_194){
var dest=this.containerNode;
if(_194&&dest){
while(_194.hasChildNodes()){
dest.appendChild(_194.firstChild);
}
}
},_attachTemplateNodes:function(_196,_197){
_197=_197||function(n,p){
return n.getAttribute(p);
};
var _19a=dojo.isArray(_196)?_196:(_196.all||_196.getElementsByTagName("*"));
var x=dojo.isArray(_196)?0:-1;
for(;x<_19a.length;x++){
var _19c=(x==-1)?_196:_19a[x];
if(this.widgetsInTemplate&&_197(_19c,"dojoType")){
continue;
}
var _19d=_197(_19c,"dojoAttachPoint");
if(_19d){
var _19e,_19f=_19d.split(/\s*,\s*/);
while((_19e=_19f.shift())){
if(dojo.isArray(this[_19e])){
this[_19e].push(_19c);
}else{
this[_19e]=_19c;
}
}
}
var _1a0=_197(_19c,"dojoAttachEvent");
if(_1a0){
var _1a1,_1a2=_1a0.split(/\s*,\s*/);
var trim=dojo.trim;
while((_1a1=_1a2.shift())){
if(_1a1){
var _1a4=null;
if(_1a1.indexOf(":")!=-1){
var _1a5=_1a1.split(":");
_1a1=trim(_1a5[0]);
_1a4=trim(_1a5[1]);
}else{
_1a1=trim(_1a1);
}
if(!_1a4){
_1a4=_1a1;
}
this.connect(_19c,_1a1,_1a4);
}
}
}
var role=_197(_19c,"waiRole");
if(role){
dijit.setWaiRole(_19c,role);
}
var _1a7=_197(_19c,"waiState");
if(_1a7){
dojo.forEach(_1a7.split(/\s*,\s*/),function(_1a8){
if(_1a8.indexOf("-")!=-1){
var pair=_1a8.split("-");
dijit.setWaiState(_19c,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_1aa,_1ab,_1ac){
var _1ad=dijit._Templated._templateCache;
var key=_1ab||_1aa;
var _1af=_1ad[key];
if(_1af){
return _1af;
}
if(!_1ab){
_1ab=dijit._Templated._sanitizeTemplateString(dojo._getText(_1aa));
}
_1ab=dojo.string.trim(_1ab);
if(_1ac||_1ab.match(/\$\{([^\}]+)\}/g)){
return (_1ad[key]=_1ab);
}else{
return (_1ad[key]=dijit._Templated._createNodesFromText(_1ab)[0]);
}
};
dijit._Templated._sanitizeTemplateString=function(_1b0){
if(_1b0){
_1b0=_1b0.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _1b1=_1b0.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_1b1){
_1b0=_1b1[1];
}
}else{
_1b0="";
}
return _1b0;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
var _1b2=dijit._Templated._templateCache;
for(var key in _1b2){
var _1b4=_1b2[key];
if(!isNaN(_1b4.nodeType)){
dojo._destroyElement(_1b4);
}
delete _1b2[key];
}
});
}
(function(){
var _1b5={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 _1b8="none";
var _1b9=text.replace(/^\s+/,"");
for(var type in _1b5){
var map=_1b5[type];
if(map.re.test(_1b9)){
_1b8=type;
text=map.pre+text+map.post;
break;
}
}
tn.innerHTML=text;
if(tn.normalize){
tn.normalize();
}
var tag={cell:"tr",row:"tbody",section:"table"}[_1b8];
var _1bd=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;
var _1be=[];
while(_1bd.firstChild){
_1be.push(_1bd.removeChild(_1bd.firstChild));
}
tn.innerHTML="";
return _1be;
};
})();
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
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,_1c0){
this.inherited(arguments);
switch(attr){
case "disabled":
var _1c1=this[this.attributeMap["tabIndex"]||"domNode"];
if(_1c0){
this._hovering=false;
this._active=false;
_1c1.removeAttribute("tabIndex");
}else{
_1c1.setAttribute("tabIndex",this.tabIndex);
}
dijit.setWaiState(this[this.attributeMap["disabled"]||"domNode"],"disabled",_1c0);
this._setStateClass();
}
},setDisabled:function(_1c2){
dojo.deprecated("setDisabled("+_1c2+") is deprecated. Use setAttribute('disabled',"+_1c2+") instead.","","2.0");
this.setAttribute("disabled",_1c2);
},_onMouse:function(_1c3){
var _1c4=_1c3.currentTarget;
if(_1c4&&_1c4.getAttribute){
this.stateModifier=_1c4.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_1c3.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 _1c5=this.connect(dojo.body(),"onmouseup",function(){
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_1c5);
});
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 _1c6=[this.baseClass];
function multiply(_1c7){
_1c6=_1c6.concat(dojo.map(_1c6,function(c){
return c+_1c7;
}),"dijit"+_1c7);
};
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+" "+_1c6.join(" ");
},onChange:function(_1c9){
},_onChangeMonitor:"value",_onChangeActive:false,_handleOnChange:function(_1ca,_1cb){
this._lastValue=_1ca;
if(this._lastValueReported==undefined&&(_1cb===null||!this._onChangeActive)){
this._resetValue=this._lastValueReported=_1ca;
}
if((this.intermediateChanges||_1cb||_1cb===undefined)&&((_1ca&&_1ca.toString)?_1ca.toString():_1ca)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
this._lastValueReported=_1ca;
if(this._onChangeActive){
this.onChange(_1ca);
}
}
},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(_1cc){
dojo.deprecated("dijit.form._FormWidget:setValue("+_1cc+") is deprecated.  Use setAttribute('value',"+_1cc+") instead.","","2.0");
this.setAttribute("value",_1cc);
},_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(_1cf,_1d0){
this.value=_1cf;
this._handleOnChange(_1cf,_1d0);
},_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 _1d7=dijit.byNode(node);
if(_1d7&&typeof _1d7._onSubmit=="function"){
_1d7._onSubmit(e);
break;
}
}
}
}
},postCreate:function(){
if(this.showLabel==false){
var _1d8="";
this.label=this.containerNode.innerHTML;
_1d8=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
this.titleNode.title=_1d8;
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
dojo.setSelectable(this.focusNode,false);
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_1db){
this.containerNode.innerHTML=this.label=_1db;
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 _1dc=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_1dc[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
if(!this.dropDown){
var _1dd=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_1dd);
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 _1e0=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_1e0||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 _1e4=this.dropDown;
if(!_1e4){
return;
}
if(!this._opened){
if(_1e4.href&&!_1e4.isLoaded){
var self=this;
var _1e6=dojo.connect(_1e4,"onLoad",function(){
dojo.disconnect(_1e6);
self._openDropDown();
});
_1e4._loadCheck(true);
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _1e7=this.dropDown;
var _1e8=_1e7.domNode.style.width;
var self=this;
dijit.popup.open({parent:this,popup:_1e7,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(){
_1e7.domNode.style.width=_1e8;
self.popupStateNode.removeAttribute("popupActive");
this._opened=false;
}});
if(this.domNode.offsetWidth>_1e7.domNode.offsetWidth){
var _1ea=null;
if(!this.isLeftToRight()){
_1ea=_1e7.domNode.parentNode;
var _1eb=_1ea.offsetLeft+_1ea.offsetWidth;
}
dojo.marginBox(_1e7.domNode,{w:this.domNode.offsetWidth});
if(_1ea){
_1ea.style.left=_1eb-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_1e7.focus){
_1e7.focus();
}
},_closeDropDown:function(_1ec){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_1ec){
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,_1f5){
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(_1f6){
dojo.deprecated("setChecked("+_1f6+") is deprecated. Use setAttribute('checked',"+_1f6+") instead.","","2.0");
this.setAttribute("checked",_1f6);
},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(_1f7){
if(typeof _1f7=="string"){
this.setAttribute("value",_1f7);
_1f7=true;
}
this.setAttribute("checked",_1f7);
},_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(_1f8,i,arr){
if(_1f8===this){
arr.splice(i,1);
return;
}
},this);
},setAttribute:function(attr,_1fc){
this.inherited(arguments);
switch(attr){
case "checked":
if(this.checked){
dojo.forEach(this._groups[this.name],function(_1fd){
if(_1fd!=this&&_1fd.checked){
_1fd.setAttribute("checked",false);
}
},this);
}
}
},_clicked:function(e){
if(!this.checked){
this.setAttribute("checked",true);
}
}});
}
if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_1ff,_200,_201){
_201=dojo.i18n.normalizeLocale(_201);
var _202=_201.split("-");
var _203=[_1ff,"nls",_200].join(".");
var _204=dojo._loadedModules[_203];
if(_204){
var _205;
for(var i=_202.length;i>0;i--){
var loc=_202.slice(0,i).join("_");
if(_204[loc]){
_205=_204[loc];
break;
}
}
if(!_205){
_205=_204.ROOT;
}
if(_205){
var _208=function(){
};
_208.prototype=_205;
return new _208();
}
}
throw new Error("Bundle not found: "+_200+" in "+_1ff+" , locale="+_201);
};
dojo.i18n.normalizeLocale=function(_209){
var _20a=_209?_209.toLowerCase():dojo.locale;
if(_20a=="root"){
_20a="ROOT";
}
return _20a;
};
dojo.i18n._requireLocalization=function(_20b,_20c,_20d,_20e){
var _20f=dojo.i18n.normalizeLocale(_20d);
var _210=[_20b,"nls",_20c].join(".");
var _211="";
if(_20e){
var _212=_20e.split(",");
for(var i=0;i<_212.length;i++){
if(_20f.indexOf(_212[i])==0){
if(_212[i].length>_211.length){
_211=_212[i];
}
}
}
if(!_211){
_211="ROOT";
}
}
var _214=_20e?_211:_20f;
var _215=dojo._loadedModules[_210];
var _216=null;
if(_215){
if(dojo.config.localizationComplete&&_215._built){
return;
}
var _217=_214.replace(/-/g,"_");
var _218=_210+"."+_217;
_216=dojo._loadedModules[_218];
}
if(!_216){
_215=dojo["provide"](_210);
var syms=dojo._getModuleSymbols(_20b);
var _21a=syms.concat("nls").join("/");
var _21b;
dojo.i18n._searchLocalePath(_214,_20e,function(loc){
var _21d=loc.replace(/-/g,"_");
var _21e=_210+"."+_21d;
var _21f=false;
if(!dojo._loadedModules[_21e]){
dojo["provide"](_21e);
var _220=[_21a];
if(loc!="ROOT"){
_220.push(loc);
}
_220.push(_20c);
var _221=_220.join("/")+".js";
_21f=dojo._loadPath(_221,null,function(hash){
var _223=function(){
};
_223.prototype=_21b;
_215[_21d]=new _223();
for(var j in hash){
_215[_21d][j]=hash[j];
}
});
}else{
_21f=true;
}
if(_21f&&_215[_21d]){
_21b=_215[_21d];
}else{
_215[_21d]=_21b;
}
if(_20e){
return true;
}
});
}
if(_20e&&_20f!=_211){
_215[_20f.replace(/-/g,"_")]=_215[_211.replace(/-/g,"_")];
}
};
(function(){
var _225=dojo.config.extraLocale;
if(_225){
if(!_225 instanceof Array){
_225=[_225];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_229,_22a){
req(m,b,_229,_22a);
if(_229){
return;
}
for(var i=0;i<_225.length;i++){
req(m,b,_225[i],_22a);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_22c,down,_22e){
_22c=dojo.i18n.normalizeLocale(_22c);
var _22f=_22c.split("-");
var _230=[];
for(var i=_22f.length;i>0;i--){
_230.push(_22f.slice(0,i).join("-"));
}
_230.push(false);
if(down){
_230.reverse();
}
for(var j=_230.length-1;j>=0;j--){
var loc=_230[j]||"ROOT";
var stop=_22e(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_235,_236){
function preload(_237){
_237=dojo.i18n.normalizeLocale(_237);
dojo.i18n._searchLocalePath(_237,true,function(loc){
for(var i=0;i<_236.length;i++){
if(_236[i]==loc){
dojo["require"](_235+"_"+loc);
return true;
}
}
return false;
});
};
preload();
var _23a=dojo.config.extraLocale||[];
for(var i=0;i<_23a.length;i++){
preload(_23a[i]);
}
};
}
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(_23c,_23d,_23e){
var _23f=this.filter(_23c);
if((((typeof _23f==typeof _23c)&&(_23c!==undefined))||(_23c===null))&&(_23e==null||_23e==undefined)){
_23e=this.format(_23f,this.constraints);
}
if(_23e!=null&&_23e!=undefined){
this.textbox.value=_23e;
}
dijit.form.TextBox.superclass.setValue.call(this,_23f,_23d);
},setDisplayedValue:function(_240,_241){
this.textbox.value=_240;
this.setValue(this.getValue(),_241);
},format:function(_242,_243){
return ((_242==null||_242==undefined)?"":(_242.toString?_242.toString():_242));
},parse:function(_244,_245){
return _244;
},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(_248,_249,stop){
var _24b=dojo.global;
var _24c=dojo.doc;
_248=dojo.byId(_248);
if(isNaN(_249)){
_249=0;
}
if(isNaN(stop)){
stop=_248.value?_248.value.length:0;
}
_248.focus();
if(_24c["selection"]&&dojo.body()["createTextRange"]){
if(_248.createTextRange){
var _24d=_248.createTextRange();
with(_24d){
collapse(true);
moveStart("character",_249);
moveEnd("character",stop);
select();
}
}
}else{
if(_24b["getSelection"]){
var _24e=_24b.getSelection();
if(_248.setSelectionRange){
_248.setSelectionRange(_249,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(_24f,_250,_251){
if(this.aroundNode&&this.aroundNode===_250){
return;
}
if(this.fadeOut.status()=="playing"){
this._onDeck=arguments;
return;
}
this.containerNode.innerHTML=_24f;
this.domNode.style.top=(this.domNode.offsetTop+1)+"px";
var _252={};
var ltr=this.isLeftToRight();
dojo.forEach((_251&&_251.length)?_251:dijit.Tooltip.defaultPosition,function(pos){
switch(pos){
case "after":
_252[ltr?"BR":"BL"]=ltr?"BL":"BR";
break;
case "before":
_252[ltr?"BL":"BR"]=ltr?"BR":"BL";
break;
case "below":
_252[ltr?"BL":"BR"]=ltr?"TL":"TR";
_252[ltr?"BR":"BL"]=ltr?"TR":"TL";
break;
case "above":
default:
_252[ltr?"TL":"TR"]=ltr?"BL":"BR";
_252[ltr?"TR":"TL"]=ltr?"BR":"BL";
break;
}
});
var pos=dijit.placeOnScreenAroundElement(this.domNode,_250,_252,dojo.hitch(this,"orient"));
dojo.style(this.domNode,"opacity",0);
this.fadeIn.play();
this.isShowingNow=true;
this.aroundNode=_250;
},orient:function(node,_257,_258){
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"}[_257+"-"+_258];
},_onShow:function(){
if(dojo.isIE){
this.domNode.style.filter="";
}
},hide:function(_259){
if(!this.aroundNode||this.aroundNode!==_259){
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(_25a,_25b,_25c){
if(!dijit._masterTT){
dijit._masterTT=new dijit._MasterTooltip();
}
return dijit._masterTT.show(_25a,_25b,_25c);
};
dijit.hideTooltip=function(_25d){
if(!dijit._masterTT){
dijit._masterTT=new dijit._MasterTooltip();
}
return dijit._masterTT.hide(_25d);
};
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(_260){
this.connect(node,_260.toLowerCase(),"_"+_260);
},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 _266=e.target;
this._showTimer=setTimeout(dojo.hitch(this,function(){
this.open(_266);
}),this.showDelay);
}
},_onUnHover:function(e){
if(this._focus){
return;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
this.close();
},open:function(_268){
_268=_268||this._connectNodes[0];
if(!_268){
return;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
dijit.showTooltip(this.label||this.domNode.innerHTML,_268,this.position);
this._connectNode=_268;
},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(_269){
return this.regExp;
},state:"",tooltipPosition:[],setValue:function(){
this.inherited(arguments);
this.validate(this._focused);
},validator:function(_26a,_26b){
return (new RegExp("^("+this.regExpGen(_26b)+")"+(this.required?"":"?")+"$")).test(_26a)&&(!this.required||!this._isEmpty(_26a))&&(this._isEmpty(_26a)||this.parse(_26a,_26b)!==undefined);
},isValid:function(_26c){
return this.validator(this.textbox.value,this.constraints);
},_isEmpty:function(_26d){
return /^\s*$/.test(_26d);
},getErrorMessage:function(_26e){
return this.invalidMessage;
},getPromptMessage:function(_26f){
return this.promptMessage;
},validate:function(_270){
var _271="";
var _272=this.isValid(_270);
var _273=this._isEmpty(this.textbox.value);
this.state=(_272||(!this._hasBeenBlurred&&_273))?"":"Error";
this._setStateClass();
dijit.setWaiState(this.focusNode,"invalid",_272?"false":"true");
if(_270){
if(_273){
_271=this.getPromptMessage(true);
}
if(!_271&&this.state=="Error"){
_271=this.getErrorMessage(true);
}
}
this.displayMessage(_271);
return _272;
},_message:"",displayMessage:function(_274){
if(this._message==_274){
return;
}
this._message=_274;
dijit.hideTooltip(this.domNode);
if(_274){
dijit.showTooltip(_274,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,_279){
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,_27c){
this.inherited(arguments);
switch(attr){
case "disabled":
if(this.valueNode){
this.valueNode.disabled=this.disabled;
}
}
},postCreate:function(){
var _27d=this.textbox;
var _27e=(this.valueNode=dojo.doc.createElement("input"));
_27e.setAttribute("type",_27d.type);
_27e.setAttribute("value",this.toString());
dojo.style(_27e,"display","none");
_27e.name=this.textbox.name;
_27e.disabled=this.textbox.disabled;
this.textbox.name=this.textbox.name+"_displayed_";
this.textbox.removeAttribute("name");
dojo.place(_27e,_27d,"after");
this.inherited(arguments);
}});
dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",compare:function(val1,val2){
return val1-val2;
},rangeCheck:function(_281,_282){
var _283="min" in _282;
var _284="max" in _282;
if(_283||_284){
return (!_283||this.compare(_281,_282.min)>=0)&&(!_284||this.compare(_281,_282.max)<=0);
}
return true;
},isInRange:function(_285){
return this.rangeCheck(this.getValue(),this.constraints);
},isValid:function(_286){
return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_286));
},getErrorMessage:function(_287){
if(dijit.form.RangeBoundTextBox.superclass.isValid.call(this,false)&&!this.isInRange(_287)){
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(_288,_289){
dijit.setWaiState(this.focusNode,"valuenow",_288);
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(_28a){
var pos=0;
if(typeof (_28a.selectionStart)=="number"){
pos=_28a.selectionStart;
}else{
if(dojo.isIE){
var tr=dojo.doc.selection.createRange().duplicate();
var ntr=_28a.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(_28e,_28f){
_28f=parseInt(_28f);
dijit.selectInputText(_28e,_28f,_28f);
},_setAttribute:function(attr,_291){
if(attr=="disabled"){
dijit.setWaiState(this.comboNode,"disabled",_291);
}
},_onKeyPress:function(evt){
if(evt.altKey||(evt.ctrlKey&&evt.charCode!=118)){
return;
}
var _293=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();
_293=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 _296;
if(this._isShowingNow&&(_296=pw.getHighlightedOption())){
if(_296==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_296==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}
}
}else{
this.setDisplayedValue(this.getDisplayedValue());
}
evt.preventDefault();
case dk.TAB:
var _297=this.getDisplayedValue();
if(pw&&(_297==pw._messages["previousMessage"]||_297==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{
_293=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;
_293=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){
_293=true;
}
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_293){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_autoCompleteText:function(text){
var fn=this.focusNode;
dijit.selectInputText(fn,fn.value.length);
var _29a=this.ignoreCase?"toLowerCase":"substr";
if(text[_29a](0).indexOf(this.focusNode.value[_29a](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(_29c,_29d){
if(this.disabled||this.readOnly||(_29d.query[this.searchAttr]!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_29c.length){
this._hideResultList();
return;
}
var _29e=new String(this.store.getValue(_29c[0],this.searchAttr));
if(_29e&&this.autoComplete&&!this._prev_key_backspace&&(_29d.query[this.searchAttr]!="*")){
this._autoCompleteText(_29e);
}
this._popupWidget.createOptions(_29c,_29d,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_29d.direction){
if(1==_29d.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_29d.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_showResultList:function(){
this._hideResultList();
var _29f=this._popupWidget.getItems(),_2a0=Math.min(_29f.length,this.maxListLength);
this._arrowPressed();
this.displayMessage("");
with(this._popupWidget.domNode.style){
width="";
height="";
}
var best=this.open();
var _2a2=dojo.marginBox(this._popupWidget.domNode);
this._popupWidget.domNode.style.overflow=((best.h==_2a2.h)&&(best.w==_2a2.w))?"hidden":"auto";
var _2a3=best.w;
if(best.h<this._popupWidget.domNode.scrollHeight){
_2a3+=16;
}
dojo.marginBox(this._popupWidget.domNode,{h:best.h,w:Math.max(_2a3,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 _2a4=this.getDisplayedValue();
var pw=this._popupWidget;
if(pw&&(_2a4==pw._messages["previousMessage"]||_2a4==pw._messages["nextMessage"])){
this.setValue(this._lastValueReported,true);
}else{
this.setDisplayedValue(_2a4);
}
},_onBlur:function(){
this._hideResultList();
this._arrowIdle();
this.inherited(arguments);
},_announceOption:function(node){
if(node==null){
return;
}
var _2a7;
if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){
_2a7=node.innerHTML;
}else{
_2a7=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(_2a7);
},_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 _2ae=this.id+"_popup";
this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_2ae});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_2ae);
}
this.item=null;
var _2af=dojo.clone(this.query);
this._lastQuery=_2af[this.searchAttr]=this._getQueryString(key);
this.searchTimer=setTimeout(dojo.hitch(this,function(_2b0,_2b1){
var _2b2=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_2b0,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_2b3){
console.error("dijit.form.ComboBox: "+_2b3);
dojo.hitch(_2b1,"_hideResultList")();
},start:0,count:this.pageSize});
var _2b4=function(_2b5,_2b6){
_2b5.start+=_2b5.count*_2b6;
_2b5.direction=_2b6;
this.store.fetch(_2b5);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_2b4,_2b2);
},_2af,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 _2b8=this.srcNodeRef;
this.store=new dijit.form._ComboBoxDataStore(_2b8);
if(!this.value||((typeof _2b8.selectedIndex=="number")&&_2b8.selectedIndex.toString()===this.value)){
var item=this.store.fetchSelectedItem();
if(item){
this.value=this.store.getValue(item,this._getValueField());
}
}
}
},_postCreate:function(){
var _2ba=dojo.query("label[for=\""+this.id+"\"]");
if(_2ba.length){
_2ba[0].id=(this.id+"_label");
var cn=this.comboNode;
dijit.setWaiState(cn,"labelledby",_2ba[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(_2bd){
this.value=_2bd;
this.onChange(_2bd);
},onChange:function(_2be){
},onPage:function(_2bf){
},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,_2c1){
var _2c2=_2c1(item);
var _2c3=dojo.doc.createElement("li");
dijit.setWaiRole(_2c3,"option");
if(_2c2.html){
_2c3.innerHTML=_2c2.label;
}else{
_2c3.appendChild(dojo.doc.createTextNode(_2c2.label));
}
if(_2c3.innerHTML==""){
_2c3.innerHTML="&nbsp;";
}
_2c3.item=item;
return _2c3;
},createOptions:function(_2c4,_2c5,_2c6){
this.previousButton.style.display=(_2c5.start==0)?"none":"";
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_2c4,function(item,i){
var _2c9=this._createOption(item,_2c6);
_2c9.className="dijitMenuItem";
dojo.attr(_2c9,"id",this.id+i);
this.domNode.insertBefore(_2c9,this.nextButton);
},this);
this.nextButton.style.display=(_2c5.count==_2c4.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 _2d6=0;
var _2d7=this.domNode.scrollTop;
var _2d8=dojo.style(this.domNode,"height");
if(!this.getHighlightedOption()){
this._highlightNextOption();
}
while(_2d6<_2d8){
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 _2d9=this.domNode.scrollTop;
_2d6+=(_2d9-_2d7)*(up?-1:1);
_2d7=_2d9;
}
},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,_2dd){
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,_2e0,_2e1){
return (_2e0=="value")?item.value:(item.innerText||item.textContent||"");
},isItemLoaded:function(_2e2){
return true;
},fetch:function(args){
var _2e4="^"+args.query.name.replace(/([\\\|\(\)\[\{\^\$\+\?\.\<\>])/g,"\\$1").replace("*",".*")+"$",_2e5=new RegExp(_2e4,args.queryOptions.ignoreCase?"i":""),_2e6=dojo.query("> option",this.root).filter(function(_2e7){
return (_2e7.innerText||_2e7.textContent||"").match(_2e5);
});
var _2e8=args.start||0,end=("count" in args&&args.count!=Infinity)?(_2e8+args.count):_2e6.length;
args.onComplete(_2e6.slice(_2e8,end),args);
return args;
},close:function(_2ea){
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["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(_2f2){
_2f2.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 _2fb=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_2fe,dim){
_2fe.resize?_2fe.resize(dim):dojo.marginBox(_2fe.domNode,dim);
dojo.mixin(_2fe,dojo.marginBox(_2fe.domNode));
dojo.mixin(_2fe,dim);
};
dijit.layout.layoutChildren=function(_300,dim,_302){
dim=dojo.mixin({},dim);
dojo.addClass(_300,"dijitLayoutContainer");
_302=dojo.filter(_302,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_302,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_302,function(_305){
var elm=_305.domNode,pos=_305.layoutAlign;
var _308=elm.style;
_308.left=dim.l+"px";
_308.top=dim.t+"px";
_308.bottom=_308.right="auto";
dojo.addClass(elm,"dijitAlign"+_2fb(pos));
if(pos=="top"||pos=="bottom"){
size(_305,{w:dim.w});
dim.h-=_305.h;
if(pos=="top"){
dim.t+=_305.h;
}else{
_308.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_305,{h:dim.h});
dim.w-=_305.w;
if(pos=="left"){
dim.l+=_305.w;
}else{
_308.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_305,dim);
}
}
}
});
};
})();
}
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 _309=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_309);
this.errorMessage=dojo.string.substitute(this.errorMessage,_309);
var _30a=dijit.getWaiRole(this.domNode);
if(!_30a){
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 _30b=dojo.query(">",this.containerNode||this.domNode),_30c=_30b.filter("[widgetId]");
if(_30b.length==1&&_30c.length==1){
this.isContainer=true;
this._singleChild=dijit.byNode(_30c[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(_312){
this.cancel();
this.isLoaded=false;
this._loadCheck(_312);
},_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(_314){
var _315=this._isShown();
if(this.href&&(_314||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_315&&!this._xhrDfd)||(!this.isLoaded&&_315&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._onUnloadHandler();
this._setContent(this.onDownloadStart.call(this));
var self=this;
var _317={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_317,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_317);
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 _31e=this.onContentError(e);
try{
node.innerHTML=_31e;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
}
},_onError:function(type,err,_321){
var _322=this["on"+type+"Error"].call(this,err);
if(_321){
console.error(_321,err);
}else{
if(_322){
this._setContent.call(this,_322);
}
}
},_createSubWidgets:function(){
var _323=this.containerNode||this.domNode;
try{
dojo.parser.parse(_323,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(_326){
},onDownloadError:function(_327){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
if(!dojo._hasResource["dojo.regexp"]){
dojo._hasResource["dojo.regexp"]=true;
dojo.provide("dojo.regexp");
dojo.regexp.escapeString=function(str,_329){
return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
if(_329&&_329.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.regexp.buildGroupRE=function(arr,re,_32d){
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("|"),_32d);
};
dojo.regexp.group=function(_330,_331){
return "("+(_331?"?:":"")+_330+")";
};
}
if(!dojo._hasResource["dojo.cookie"]){
dojo._hasResource["dojo.cookie"]=true;
dojo.provide("dojo.cookie");
dojo.cookie=function(name,_333,_334){
var c=document.cookie;
if(arguments.length==1){
var _336=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));
return _336?decodeURIComponent(_336[1]):undefined;
}else{
_334=_334||{};
var exp=_334.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_334.expires=d;
}
if(exp&&exp.toUTCString){
_334.expires=exp.toUTCString();
}
_333=encodeURIComponent(_333);
var _339=name+"="+_333;
for(propName in _334){
_339+="; "+propName;
var _33a=_334[propName];
if(_33a!==true){
_339+="="+_33a;
}
}
document.cookie=_339;
}
};
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.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 _352=n.scrollLeft,_353=n.scrollTop;
n.scrollLeft=n.scrollLeft+dx;
n.scrollTop=n.scrollTop+dy;
if(_352!=n.scrollLeft||_353!=n.scrollTop){
return;
}
}
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
dojo.dnd.autoScroll(e);
};
}
if(!dojo._hasResource["dojo.dnd.Mover"]){
dojo._hasResource["dojo.dnd.Mover"]=true;
dojo.provide("dojo.dnd.Mover");
dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){
this.node=dojo.byId(node);
this.marginBox={l:e.pageX,t:e.pageY};
this.mouseButton=e.button;
var h=this.host=host,d=node.ownerDocument,_359=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"),_359];
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(node,_363){
this.node=dojo.byId(node);
if(!_363){
_363={};
}
this.handle=_363.handle?dojo.byId(_363.handle):null;
if(!this.handle){
this.handle=this.node;
}
this.delay=_363.delay>0?_363.delay:0;
this.skip=_363.skip;
this.mover=_363.mover?_363.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(_364,node){
return new dojo.dnd.Moveable(node,_364);
},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(_36a){
dojo.publish("/dnd/move/start",[_36a]);
dojo.addClass(dojo.body(),"dojoMove");
dojo.addClass(this.node,"dojoMoveItem");
},onMoveStop:function(_36b){
dojo.publish("/dnd/move/stop",[_36b]);
dojo.removeClass(dojo.body(),"dojoMove");
dojo.removeClass(this.node,"dojoMoveItem");
},onFirstMove:function(_36c){
},onMove:function(_36d,_36e){
this.onMoving(_36d,_36e);
var s=_36d.node.style;
s.left=_36e.l+"px";
s.top=_36e.t+"px";
this.onMoved(_36d,_36e);
},onMoving:function(_370,_371){
},onMoved:function(_372,_373){
}});
}
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(_374,node){
return new dojo.dnd.move.constrainedMoveable(node,_374);
},constructor:function(node,_377){
if(!_377){
_377={};
}
this.constraints=_377.constraints;
this.within=_377.within;
},onFirstMove:function(_378){
var c=this.constraintBox=this.constraints.call(this,_378);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(this.within){
var mb=dojo.marginBox(_378.node);
c.r-=mb.w;
c.b-=mb.h;
}
},onMove:function(_37b,_37c){
var c=this.constraintBox,s=_37b.node.style;
s.left=(_37c.l<c.l?c.l:c.r<_37c.l?c.r:_37c.l)+"px";
s.top=(_37c.t<c.t?c.t:c.b<_37c.t?c.b:_37c.t)+"px";
}});
dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_37f,node){
return new dojo.dnd.move.boxConstrainedMoveable(node,_37f);
},constructor:function(node,_382){
var box=_382&&_382.box;
this.constraints=function(){
return box;
};
}});
dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_384,node){
return new dojo.dnd.move.parentConstrainedMoveable(node,_384);
},constructor:function(node,_387){
var area=_387&&_387.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,_38e){
dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
var _38f=function(node,e,_392){
dojo.dnd.Mover.call(this,node,e,_392);
};
dojo.extend(_38f,dojo.dnd.Mover.prototype);
dojo.extend(_38f,{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(_38e){
var mb=dojo.marginBox(this.node);
c.r-=mb.w;
c.b-=mb.h;
}
}});
return _38f;
};
dojo.dnd.move.boxConstrainedMover=function(box,_39b){
dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
return dojo.dnd.move.constrainedMover(function(){
return box;
},_39b);
};
dojo.dnd.move.parentConstrainedMover=function(area,_39d){
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,_39d);
};
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.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
dojo.provide("dojo.fx.Toggler");
(function(){
var _3a3={_fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,args||[]);
}
return this;
}};
var _3a6=function(_3a7){
this._index=-1;
this._animations=_3a7||[];
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(_3a6,{_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(_3a9,_3aa){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_3aa&&this._current.status()=="playing"){
return this;
}
var _3ab=dojo.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_3ac=dojo.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_3ae=dojo.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
dojo.disconnect(_3ab);
dojo.disconnect(_3ac);
dojo.disconnect(_3ae);
});
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(_3b2,_3b3){
this.pause();
var _3b4=this.duration*_3b2;
this._current=null;
dojo.some(this._animations,function(a){
if(a.duration<=_3b4){
this._current=a;
return true;
}
_3b4-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_3b4/_current.duration,_3b3);
}
return this;
},stop:function(_3b6){
if(this._current){
if(_3b6){
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(_3a6,_3a3);
dojo.fx.chain=function(_3b9){
return new _3a6(_3b9);
};
var _3ba=function(_3bb){
this._animations=_3bb||[];
this._connects=[];
this._finished=0;
this.duration=0;
dojo.forEach(_3bb,function(a){
var _3bd=a.duration;
if(a.delay){
_3bd+=a.delay;
}
if(this.duration<_3bd){
this.duration=_3bd;
}
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(_3ba,{_doAction:function(_3bf,args){
dojo.forEach(this._animations,function(a){
a[_3bf].apply(a,args);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_3c2,args){
var t=this._pseudoAnimation;
t[_3c2].apply(t,args);
},play:function(_3c5,_3c6){
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(_3c7,_3c8){
var ms=this.duration*_3c7;
dojo.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_3c8);
});
this._call("gotoProcent",arguments);
return this;
},stop:function(_3cb){
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(_3ba,_3a3);
dojo.fx.combine=function(_3cc){
return new _3ba(_3cc);
};
})();
dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){
var _t=this;
dojo.mixin(_t,args);
_t.node=args.node;
_t._showArgs=dojo.mixin({},args);
_t._showArgs.node=_t.node;
_t._showArgs.duration=_t.showDuration;
_t.showAnim=_t.showFunc(_t._showArgs);
_t._hideArgs=dojo.mixin({},args);
_t._hideArgs.node=_t.node;
_t._hideArgs.duration=_t.hideDuration;
_t.hideAnim=_t.hideFunc(_t._hideArgs);
dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));
dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));
},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_3cf){
return this.showAnim.play(_3cf||0);
},hide:function(_3d0){
return this.hideAnim.play(_3d0||0);
}});
dojo.fx.wipeIn=function(args){
args.node=dojo.byId(args.node);
var node=args.node,s=node.style;
var anim=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 _3d5=dojo.style(node,"height");
return Math.max(_3d5,1);
}
},end:function(){
return node.scrollHeight;
}}}},args));
dojo.connect(anim,"onEnd",function(){
s.height="auto";
});
return anim;
};
dojo.fx.wipeOut=function(args){
var node=args.node=dojo.byId(args.node);
var s=node.style;
var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));
dojo.connect(anim,"beforeBegin",function(){
s.overflow="hidden";
s.display="";
});
dojo.connect(anim,"onEnd",function(){
s.height="auto";
s.display="none";
});
return anim;
};
dojo.fx.slideTo=function(args){
var node=(args.node=dojo.byId(args.node));
var top=null;
var left=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));
dojo.connect(anim,"beforeBegin",anim,init);
return anim;
};
}
if(!dojo._hasResource["dojo.colors"]){
dojo._hasResource["dojo.colors"]=true;
dojo.provide("dojo.colors");
(function(){
var _3e4=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(_3e9,obj){
var m=_3e9.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=[_3e4(m1,m2,H+1/3)*256,_3e4(m1,m2,H)*256,_3e4(m1,m2,H-1/3)*256,1];
if(l==4){
a[3]=c[3];
}
return dojo.colorFromArray(a,obj);
}
}
return null;
};
var _3f7=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(_3f7(t.r,0,255));
t.g=Math.round(_3f7(t.g,0,255));
t.b=Math.round(_3f7(t.b,0,255));
t.a=_3f7(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,_3ff,_400){
if(dojo.isArray(cyan)){
_3ff=cyan[1],_400=cyan[2],cyan=cyan[0];
}else{
if(dojo.isObject(cyan)){
_3ff=cyan.m,_400=cyan.y,cyan=cyan.c;
}
}
cyan/=100,_3ff/=100,_400/=100;
var r=1-cyan,g=1-_3ff,b=1-_400;
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromCmyk:function(cyan,_405,_406,_407){
if(dojo.isArray(cyan)){
_405=cyan[1],_406=cyan[2],_407=cyan[3],cyan=cyan[0];
}else{
if(dojo.isObject(cyan)){
_405=cyan.m,_406=cyan.y,_407=cyan.b,cyan=cyan.c;
}
}
cyan/=100,_405/=100,_406/=100,_407/=100;
var r,g,b;
r=1-Math.min(1,cyan*(1-_407)+_407);
g=1-Math.min(1,_405*(1-_407)+_407);
b=1-Math.min(1,_406*(1-_407)+_407);
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromHsl:function(hue,_40c,_40d){
if(dojo.isArray(hue)){
_40c=hue[1],_40d=hue[2],hue=hue[0];
}else{
if(dojo.isObject(hue)){
_40c=hue.s,_40d=hue.l,hue=hue.h;
}
}
_40c/=100;
_40d/=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*_40c*Math.min(r,1)+(1-_40c);
g=2*_40c*Math.min(g,1)+(1-_40c);
b=2*_40c*Math.min(b,1)+(1-_40c);
if(_40d<0.5){
r*=_40d,g*=_40d,b*=_40d;
}else{
r=(1-_40d)*r+2*_40d-1;
g=(1-_40d)*g+2*_40d-1;
b=(1-_40d)*b+2*_40d-1;
}
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromHsv:function(hue,_412,_413){
if(dojo.isArray(hue)){
_412=hue[1],_413=hue[2],hue=hue[0];
}else{
if(dojo.isObject(hue)){
_412=hue.s,_413=hue.v,hue=hue.h;
}
}
if(hue==360){
hue=0;
}
_412/=100;
_413/=100;
var r,g,b;
if(_412==0){
r=_413,b=_413,g=_413;
}else{
var _417=hue/60,i=Math.floor(_417),f=_417-i;
var p=_413*(1-_412);
var q=_413*(1-(_412*f));
var t=_413*(1-(_412*(1-f)));
switch(i){
case 0:
r=_413,g=t,b=p;
break;
case 1:
r=q,g=_413,b=p;
break;
case 2:
r=p,g=_413,b=t;
break;
case 3:
r=p,g=q,b=_413;
break;
case 4:
r=t,g=p,b=_413;
break;
case 5:
r=_413,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),_41e=1-(this.g/255),_41f=1-(this.b/255);
return {c:Math.round(cyan*100),m:Math.round(_41e*100),y:Math.round(_41f*100)};
},toCmyk:function(){
var cyan,_421,_422,_423;
var r=this.r/255,g=this.g/255,b=this.b/255;
_423=Math.min(1-r,1-g,1-b);
cyan=(1-r-_423)/(1-_423);
_421=(1-g-_423)/(1-_423);
_422=(1-b-_423)/(1-_423);
return {c:Math.round(cyan*100),m:Math.round(_421*100),y:Math.round(_422*100),b:Math.round(_423*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 _42c=max-min;
var h=0,s=0,l=(min+max)/2;
if(l>0&&l<1){
s=_42c/((l<0.5)?(2*l):(2-2*l));
}
if(_42c>0){
if(max==r&&max!=g){
h+=(g-b)/_42c;
}
if(max==g&&max!=b){
h+=(2+(b-r)/_42c);
}
if(max==b&&max!=r){
h+=(4+(r-g)/_42c);
}
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 _435=max-min;
var h=null,s=(max==0)?0:(_435/max);
if(s==0){
h=0;
}else{
if(r==max){
h=60*(g-b)/_435;
}else{
if(g==max){
h=120+60*(b-r)/_435;
}else{
h=240+60*(r-g)/_435;
}
}
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 _465=args.idAttribute||"id";
var _466=args.idPrefix||"/";
var _467=args.assignAbsoluteIds;
var _468=args.index||{};
var ref,_46a=[];
var _46b=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/;
var _46c=this._addProp;
function walk(it,stop,_46f,_470){
var _471,val,id=it[_465]||_46f;
if(id!==undefined){
id=(_466+id).replace(_46b,"$2$3");
}
var _474=_470||it;
if(id!==undefined){
if(_467){
it.__id=id;
}
if(_468[id]&&((it instanceof Array)==(_468[id] instanceof Array))){
_474=_468[id];
delete _474.$ref;
_471=true;
}else{
var _475=args.schemas&&(!(it instanceof Array))&&(val=id.match(/^(.+\/)[^\.\[]*$/))&&(val=args.schemas[val[1]])&&val.prototype;
if(_475){
var F=function(){
};
F.prototype=_475;
_474=new F();
}
}
_468[id]=_474;
}
for(var i in it){
if(it.hasOwnProperty(i)){
if((typeof (val=it[i])=="object")&&val){
ref=val.$ref;
if(ref){
var _478=ref.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
if(/[\w\[\]\.\$# \/\r\n\t]/.test(_478)&&!/\=|((^|\W)new\W)/.test(_478)){
delete it[i];
var path=ref.match(/(^([^\[]*\/)?[^\.\[]*)([\.\[].*)?/);
if((ref=(path[1]=="$"||path[1]=="this"||path[1]=="#")?root:_468[(_466+path[1]).replace(_46b,"$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 _47a;
if(!_47a){
_46a.push(_474);
}
_47a=true;
}else{
val=walk(val,false,val.$ref);
val._loadObject=args.loader;
}
}
}
}else{
if(!stop){
val=walk(val,_46a==it,id&&_46c(id,i),_474!=it&&typeof _474[i]=="object"&&_474[i]);
}
}
}
it[i]=val;
if(_474!=it){
var old=_474[i];
_474[i]=val;
if(_471&&val!==old){
if(_468.onUpdate){
_468.onUpdate(_474,i,old,val);
}
}
}
}
}
if(_471){
for(i in _474){
if(!it.hasOwnProperty(i)&&i!="__id"&&i!="__clientId"&&!(_474 instanceof Array&&isNaN(i))){
if(_468.onUpdate){
_468.onUpdate(_474,i,_474[i],undefined);
}
delete _474[i];
while(_474 instanceof Array&&_474.length&&_474[_474.length-1]===undefined){
_474.length--;
}
}
}
}else{
if(_468.onLoad){
_468.onLoad(_474);
}
}
return _474;
};
if(root&&typeof root=="object"){
root=walk(root,false,args.defaultId);
walk(_46a,false);
}
return root;
},fromJson:function(str,args){
function ref(_47e){
return {$ref:_47e};
};
var root=eval("("+str+")");
if(root){
return this.resolveJson(root,args);
}
return root;
},toJson:function(it,_481,_482,_483){
var _484=this._useRefs;
var _485=this._addProp;
_482=_482||"";
var _486=_483||{};
function serialize(it,path,_489){
if(typeof it=="object"&&it){
var _48a;
if(it instanceof Date){
return "\""+dojo.date.stamp.toISOString(it,{zulu:true})+"\"";
}
var id=it.__id;
if(id){
if(path!="#"&&(_484||_486[id])){
var ref=id;
if(id.charAt(0)!="#"){
if(id.substring(0,_482.length)==_482){
ref=id.substring(_482.length);
}else{
ref=id;
}
}
return serialize({$ref:ref},"#");
}
path=id;
}else{
it.__id=path;
_486[path]=it;
}
_489=_489||"";
var _48d=_481?_489+dojo.toJsonIndentStr:"";
var _48e=_481?"\n":"";
var sep=_481?" ":"";
if(it instanceof Array){
var res=dojo.map(it,function(obj,i){
var val=serialize(obj,_485(path,i),_48d);
if(typeof val!="string"){
val="undefined";
}
return _48e+_48d+val;
});
return "["+res.join(","+sep)+_48e+_489+"]";
}
var _494=[];
for(var i in it){
if(it.hasOwnProperty(i)){
var _496;
if(typeof i=="number"){
_496="\""+i+"\"";
}else{
if(typeof i=="string"&&i.charAt(0)!="_"){
_496=dojo._escapeString(i);
}else{
continue;
}
}
var val=serialize(it[i],_485(path,i),_48d);
if(typeof val!="string"){
continue;
}
_494.push(_48e+_48d+_496+":"+sep+val);
}
}
return "{"+_494.join(","+sep)+_48e+_489+"}";
}else{
if(typeof it=="function"&&dojox.json.ref.serializeFunctions){
return it.toString();
}
}
return dojo.toJson(it);
};
var json=serialize(it,"#","");
if(!_483){
for(i in _486){
delete _486[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(_4aa){
for(var j=0;j<_4aa.length;j++){
var p="$";
var x=_4aa[j];
for(var i=1,n=x.length;i<n;i++){
p+=/^[0-9*]+$/.test(x[i])?("["+x[i]+"]"):("['"+x[i]+"']");
}
_4aa[j]=p;
}
return _4aa;
},exec:function(locs,val,rb){
var path=["$"];
var _4b4=rb?val:[val];
var _4b5=[path];
function add(v,p,def){
if(v&&v.hasOwnProperty(p)&&P.resultType!="VALUE"){
_4b5.push(path.concat([p]));
}
if(def){
_4b4=v[p];
}else{
if(v&&v.hasOwnProperty(p)){
_4b4.push(v[p]);
}
}
};
function desc(v){
_4b4.push(v);
_4b5.push(path);
P.walk(v,function(i){
if(typeof v[i]==="object"){
var _4bb=path;
path=path.concat(i);
desc(v[i]);
path=_4bb;
}
});
};
function slice(loc,val){
if(val instanceof Array){
var len=val.length,_4bf=0,end=len,step=1;
loc.replace(/^(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)$/g,function($0,$1,$2,$3){
_4bf=parseInt($1||_4bf);
end=parseInt($2||end);
step=parseInt($3||step);
});
_4bf=(_4bf<0)?Math.max(0,_4bf+len):Math.min(len,_4bf);
end=(end<0)?Math.max(0,end+len):Math.min(len,end);
for(var i=_4bf;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=_4b4)===null||val===undefined){
return val;
}
_4b4=[];
var _4d3=_4b5;
_4b5=[];
if(rb){
oper(val);
}else{
P.walk(val,function(i){
path=_4d3[i]||path;
oper(val[i]);
});
}
}
if(P.resultType=="BOTH"){
_4b5=P.asPaths(_4b5);
var _4d5=[];
for(var i=0;i<_4b5.length;i++){
_4d5.push({path:_4b5[i],value:_4b4[i]});
}
return _4d5;
}
return P.resultType=="PATH"?P.asPaths(_4b5):_4b4;
},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(_4df,_4e0){
_4e0=dojo.mixin({},_4e0||{});
var _4e1=dojo.i18n.normalizeLocale(_4e0.locale);
var _4e2=dojo.i18n.getLocalization("dojo.cldr","number",_4e1);
_4e0.customs=_4e2;
var _4e3=_4e0.pattern||_4e2[(_4e0.type||"decimal")+"Format"];
if(isNaN(_4df)){
return null;
}
return dojo.number._applyPattern(_4df,_4e3,_4e0);
};
dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;
dojo.number._applyPattern=function(_4e4,_4e5,_4e6){
_4e6=_4e6||{};
var _4e7=_4e6.customs.group;
var _4e8=_4e6.customs.decimal;
var _4e9=_4e5.split(";");
var _4ea=_4e9[0];
_4e5=_4e9[(_4e4<0)?1:0]||("-"+_4ea);
if(_4e5.indexOf("%")!=-1){
_4e4*=100;
}else{
if(_4e5.indexOf("‰")!=-1){
_4e4*=1000;
}else{
if(_4e5.indexOf("¤")!=-1){
_4e7=_4e6.customs.currencyGroup||_4e7;
_4e8=_4e6.customs.currencyDecimal||_4e8;
_4e5=_4e5.replace(/\u00a4{1,3}/,function(_4eb){
var prop=["symbol","currency","displayName"][_4eb.length-1];
return _4e6[prop]||_4e6.currency||"";
});
}else{
if(_4e5.indexOf("E")!=-1){
throw new Error("exponential notation not supported");
}
}
}
}
var _4ed=dojo.number._numberPatternRE;
var _4ee=_4ea.match(_4ed);
if(!_4ee){
throw new Error("unable to find a number expression in pattern: "+_4e5);
}
return _4e5.replace(_4ed,dojo.number._formatAbsolute(_4e4,_4ee[0],{decimal:_4e8,group:_4e7,places:_4e6.places}));
};
dojo.number.round=function(_4ef,_4f0,_4f1){
var _4f2=String(_4ef).split(".");
var _4f3=(_4f2[1]&&_4f2[1].length)||0;
if(_4f3>_4f0){
var _4f4=Math.pow(10,_4f0);
if(_4f1>0){
_4f4*=10/_4f1;
_4f0++;
}
_4ef=Math.round(_4ef*_4f4)/_4f4;
_4f2=String(_4ef).split(".");
_4f3=(_4f2[1]&&_4f2[1].length)||0;
if(_4f3>_4f0){
_4f2[1]=_4f2[1].substr(0,_4f0);
_4ef=Number(_4f2.join("."));
}
}
return _4ef;
};
dojo.number._formatAbsolute=function(_4f5,_4f6,_4f7){
_4f7=_4f7||{};
if(_4f7.places===true){
_4f7.places=0;
}
if(_4f7.places===Infinity){
_4f7.places=6;
}
var _4f8=_4f6.split(".");
var _4f9=(_4f7.places>=0)?_4f7.places:(_4f8[1]&&_4f8[1].length)||0;
if(!(_4f7.round<0)){
_4f5=dojo.number.round(_4f5,_4f9,_4f7.round);
}
var _4fa=String(Math.abs(_4f5)).split(".");
var _4fb=_4fa[1]||"";
if(_4f7.places){
_4fa[1]=dojo.string.pad(_4fb.substr(0,_4f7.places),_4f7.places,"0",true);
}else{
if(_4f8[1]&&_4f7.places!==0){
var pad=_4f8[1].lastIndexOf("0")+1;
if(pad>_4fb.length){
_4fa[1]=dojo.string.pad(_4fb,pad,"0",true);
}
var _4fd=_4f8[1].length;
if(_4fd<_4fb.length){
_4fa[1]=_4fb.substr(0,_4fd);
}
}else{
if(_4fa[1]){
_4fa.pop();
}
}
}
var _4fe=_4f8[0].replace(",","");
pad=_4fe.indexOf("0");
if(pad!=-1){
pad=_4fe.length-pad;
if(pad>_4fa[0].length){
_4fa[0]=dojo.string.pad(_4fa[0],pad);
}
if(_4fe.indexOf("#")==-1){
_4fa[0]=_4fa[0].substr(_4fa[0].length-pad);
}
}
var _4ff=_4f8[0].lastIndexOf(",");
var _500,_501;
if(_4ff!=-1){
_500=_4f8[0].length-_4ff-1;
var _502=_4f8[0].substr(0,_4ff);
_4ff=_502.lastIndexOf(",");
if(_4ff!=-1){
_501=_502.length-_4ff-1;
}
}
var _503=[];
for(var _504=_4fa[0];_504;){
var off=_504.length-_500;
_503.push((off>0)?_504.substr(off):_504);
_504=(off>0)?_504.slice(0,off):"";
if(_501){
_500=_501;
delete _501;
}
}
_4fa[0]=_503.reverse().join(_4f7.group||",");
return _4fa.join(_4f7.decimal||".");
};
dojo.number.regexp=function(_506){
return dojo.number._parseInfo(_506).regexp;
};
dojo.number._parseInfo=function(_507){
_507=_507||{};
var _508=dojo.i18n.normalizeLocale(_507.locale);
var _509=dojo.i18n.getLocalization("dojo.cldr","number",_508);
var _50a=_507.pattern||_509[(_507.type||"decimal")+"Format"];
var _50b=_509.group;
var _50c=_509.decimal;
var _50d=1;
if(_50a.indexOf("%")!=-1){
_50d/=100;
}else{
if(_50a.indexOf("‰")!=-1){
_50d/=1000;
}else{
var _50e=_50a.indexOf("¤")!=-1;
if(_50e){
_50b=_509.currencyGroup||_50b;
_50c=_509.currencyDecimal||_50c;
}
}
}
var _50f=_50a.split(";");
if(_50f.length==1){
_50f.push("-"+_50f[0]);
}
var re=dojo.regexp.buildGroupRE(_50f,function(_511){
_511="(?:"+dojo.regexp.escapeString(_511,".")+")";
return _511.replace(dojo.number._numberPatternRE,function(_512){
var _513={signed:false,separator:_507.strict?_50b:[_50b,""],fractional:_507.fractional,decimal:_50c,exponent:false};
var _514=_512.split(".");
var _515=_507.places;
if(_514.length==1||_515===0){
_513.fractional=false;
}else{
if(_515===undefined){
_515=_514[1].lastIndexOf("0")+1;
}
if(_515&&_507.fractional==undefined){
_513.fractional=true;
}
if(!_507.places&&(_515<_514[1].length)){
_515+=","+_514[1].length;
}
_513.places=_515;
}
var _516=_514[0].split(",");
if(_516.length>1){
_513.groupSize=_516.pop().length;
if(_516.length>1){
_513.groupSize2=_516.pop().length;
}
}
return "("+dojo.number._realNumberRegexp(_513)+")";
});
},true);
if(_50e){
re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_517,_518,_519,_51a){
var prop=["symbol","currency","displayName"][_519.length-1];
var _51c=dojo.regexp.escapeString(_507[prop]||_507.currency||"");
_518=_518?"\\s":"";
_51a=_51a?"\\s":"";
if(!_507.strict){
if(_518){
_518+="*";
}
if(_51a){
_51a+="*";
}
return "(?:"+_518+_51c+_51a+")?";
}
return _518+_51c+_51a;
});
}
return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_50b,decimal:_50c,factor:_50d};
};
dojo.number.parse=function(_51d,_51e){
var info=dojo.number._parseInfo(_51e);
var _520=(new RegExp("^"+info.regexp+"$")).exec(_51d);
if(!_520){
return NaN;
}
var _521=_520[1];
if(!_520[1]){
if(!_520[2]){
return NaN;
}
_521=_520[2];
info.factor*=-1;
}
_521=_521.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");
return Number(_521)*info.factor;
};
dojo.number._realNumberRegexp=function(_522){
_522=_522||{};
if(!("places" in _522)){
_522.places=Infinity;
}
if(typeof _522.decimal!="string"){
_522.decimal=".";
}
if(!("fractional" in _522)||/^0/.test(_522.places)){
_522.fractional=[true,false];
}
if(!("exponent" in _522)){
_522.exponent=[true,false];
}
if(!("eSigned" in _522)){
_522.eSigned=[true,false];
}
var _523=dojo.number._integerRegexp(_522);
var _524=dojo.regexp.buildGroupRE(_522.fractional,function(q){
var re="";
if(q&&(_522.places!==0)){
re="\\"+_522.decimal;
if(_522.places==Infinity){
re="(?:"+re+"\\d+)?";
}else{
re+="\\d{"+_522.places+"}";
}
}
return re;
},true);
var _527=dojo.regexp.buildGroupRE(_522.exponent,function(q){
if(q){
return "([eE]"+dojo.number._integerRegexp({signed:_522.eSigned})+")";
}
return "";
});
var _529=_523+_524;
if(_524){
_529="(?:(?:"+_529+")|(?:"+_524+"))";
}
return _529+_527;
};
dojo.number._integerRegexp=function(_52a){
_52a=_52a||{};
if(!("signed" in _52a)){
_52a.signed=[true,false];
}
if(!("separator" in _52a)){
_52a.separator="";
}else{
if(!("groupSize" in _52a)){
_52a.groupSize=3;
}
}
var _52b=dojo.regexp.buildGroupRE(_52a.signed,function(q){
return q?"[-+]":"";
},true);
var _52d=dojo.regexp.buildGroupRE(_52a.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=_52a.groupSize,grp2=_52a.groupSize2;
if(grp2){
var _531="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";
return ((grp-grp2)>0)?"(?:"+_531+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_531;
}
return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";
},true);
return _52b+_52d;
};
}
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(_532){
_532=(typeof _532=="object")?_532:{};
if(typeof _532.allowCC!="boolean"){
_532.allowCC=true;
}
if(typeof _532.allowInfra!="boolean"){
_532.allowInfra=true;
}
if(typeof _532.allowGeneric!="boolean"){
_532.allowGeneric=true;
}
var _533="arpa";
var _534="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(_532.allowInfra){
a.push(_533);
}
if(_532.allowGeneric){
a.push(_534);
}
if(_532.allowCC){
a.push(ccRE);
}
var _537="";
if(a.length>0){
_537="("+a.join("|")+")";
}
return _537;
};
dojox.regexp.ipAddress=function(_538){
_538=(typeof _538=="object")?_538:{};
if(typeof _538.allowDottedDecimal!="boolean"){
_538.allowDottedDecimal=true;
}
if(typeof _538.allowDottedHex!="boolean"){
_538.allowDottedHex=true;
}
if(typeof _538.allowDottedOctal!="boolean"){
_538.allowDottedOctal=true;
}
if(typeof _538.allowDecimal!="boolean"){
_538.allowDecimal=true;
}
if(typeof _538.allowHex!="boolean"){
_538.allowHex=true;
}
if(typeof _538.allowIPv6!="boolean"){
_538.allowIPv6=true;
}
if(typeof _538.allowHybrid!="boolean"){
_538.allowHybrid=true;
}
var _539="((\\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 _53a="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
var _53b="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
var _53c="(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 _53d="0[xX]0*[\\da-fA-F]{1,8}";
var _53e="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
var _53f="([\\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(_538.allowDottedDecimal){
a.push(_539);
}
if(_538.allowDottedHex){
a.push(_53a);
}
if(_538.allowDottedOctal){
a.push(_53b);
}
if(_538.allowDecimal){
a.push(_53c);
}
if(_538.allowHex){
a.push(_53d);
}
if(_538.allowIPv6){
a.push(_53e);
}
if(_538.allowHybrid){
a.push(_53f);
}
var _541="";
if(a.length>0){
_541="("+a.join("|")+")";
}
return _541;
};
dojox.regexp.host=function(_542){
_542=(typeof _542=="object")?_542:{};
if(typeof _542.allowIP!="boolean"){
_542.allowIP=true;
}
if(typeof _542.allowLocal!="boolean"){
_542.allowLocal=false;
}
if(typeof _542.allowPort!="boolean"){
_542.allowPort=true;
}
if(typeof _542.allowNamed!="boolean"){
_542.allowNamed=false;
}
var _543="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojox.regexp.tld(_542);
var _544=_542.allowPort?"(\\:\\d+)?":"";
var _545=_543;
if(_542.allowIP){
_545+="|"+dojox.regexp.ipAddress(_542);
}
if(_542.allowLocal){
_545+="|localhost";
}
if(_542.allowNamed){
_545+="|^[^-][a-zA-Z0-9_-]*";
}
return "("+_545+")"+_544;
};
dojox.regexp.url=function(_546){
_546=(typeof _546=="object")?_546:{};
if(!("scheme" in _546)){
_546.scheme=[true,false];
}
var _547=dojo.regexp.buildGroupRE(_546.scheme,function(q){
if(q){
return "(https?|ftps?)\\://";
}
return "";
});
var _549="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";
return _547+dojox.regexp.host(_546)+_549;
};
dojox.regexp.emailAddress=function(_54a){
_54a=(typeof _54a=="object")?_54a:{};
if(typeof _54a.allowCruft!="boolean"){
_54a.allowCruft=false;
}
_54a.allowPort=false;
var _54b="([\\da-zA-Z]+[-._+&'])*[\\da-zA-Z]+";
var _54c=_54b+"@"+dojox.regexp.host(_54a);
if(_54a.allowCruft){
_54c="<?(mailto\\:)?"+_54c+">?";
}
return _54c;
};
dojox.regexp.emailAddressList=function(_54d){
_54d=(typeof _54d=="object")?_54d:{};
if(typeof _54d.listSeparator!="string"){
_54d.listSeparator="\\s;,";
}
var _54e=dojox.regexp.emailAddress(_54d);
var _54f="("+_54e+"\\s*["+_54d.listSeparator+"]\\s*)*"+_54e+"\\s*["+_54d.listSeparator+"]?\\s*";
return _54f;
};
dojox.regexp.us.state=function(_550){
_550=(typeof _550=="object")?_550:{};
if(typeof _550.allowTerritories!="boolean"){
_550.allowTerritories=true;
}
if(typeof _550.allowMilitary!="boolean"){
_550.allowMilitary=true;
}
var _551="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 _552="AS|FM|GU|MH|MP|PW|PR|VI";
var _553="AA|AE|AP";
if(_550.allowTerritories){
_551+="|"+_552;
}
if(_550.allowMilitary){
_551+="|"+_553;
}
return "("+_551+")";
};
dojox.regexp.ca.postalCode=function(){
var _554="[A-Z][0-9][A-Z] [0-9][A-Z][0-9]";
return "("+_554+")";
};
dojox.regexp.ca.province=function(){
var _555="AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT";
return "("+statesRE+")";
};
dojox.regexp.numberFormat=function(_556){
_556=(typeof _556=="object")?_556:{};
if(typeof _556.format=="undefined"){
_556.format="###-###-####";
}
var _557=function(_558){
_558=dojo.regexp.escapeString(_558,"?");
_558=_558.replace(/\?/g,"\\d?");
_558=_558.replace(/#/g,"\\d");
return _558;
};
return dojo.regexp.buildGroupRE(_556.format,_557);
};
}
if(!dojo._hasResource["dojox.validate._base"]){
dojo._hasResource["dojox.validate._base"]=true;
dojo.provide("dojox.validate._base");
dojox.validate.isText=function(_559,_55a){
_55a=(typeof _55a=="object")?_55a:{};
if(/^\s*$/.test(_559)){
return false;
}
if(typeof _55a.length=="number"&&_55a.length!=_559.length){
return false;
}
if(typeof _55a.minlength=="number"&&_55a.minlength>_559.length){
return false;
}
if(typeof _55a.maxlength=="number"&&_55a.maxlength<_559.length){
return false;
}
return true;
};
dojox.validate._isInRangeCache={};
dojox.validate.isInRange=function(_55b,_55c){
_55b=dojo.number.parse(_55b,_55c);
if(isNaN(_55b)){
return false;
}
_55c=(typeof _55c=="object")?_55c:{};
var max=(typeof _55c.max=="number")?_55c.max:Infinity;
var min=(typeof _55c.min=="number")?_55c.min:-Infinity;
var dec=(typeof _55c.decimal=="string")?_55c.decimal:".";
var _560=dojox.validate._isInRangeCache;
var _561=_55b+"max"+max+"min"+min+"dec"+dec;
if(typeof _560[_561]!="undefined"){
return _560[_561];
}
if(_55b<min||_55b>max){
_560[_561]=false;
return false;
}
_560[_561]=true;
return true;
};
dojox.validate.isNumberFormat=function(_562,_563){
var re=new RegExp("^"+dojox.regexp.numberFormat(_563)+"$","i");
return re.test(_562);
};
dojox.validate.isValidLuhn=function(_565){
var sum,_567,_568;
if(typeof _565!="string"){
_565=String(_565);
}
_565=_565.replace(/[- ]/g,"");
_567=_565.length%2;
sum=0;
for(var i=0;i<_565.length;i++){
_568=parseInt(_565.charAt(i));
if(i%2==_567){
_568*=2;
}
if(_568>9){
_568-=9;
}
sum+=_568;
}
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,_56b){
var _56c=[];
var _56d=[];
var _56e={isSuccessful:function(){
return (!this.hasInvalid()&&!this.hasMissing());
},hasMissing:function(){
return (_56c.length>0);
},getMissing:function(){
return _56c;
},isMissing:function(_56f){
for(var i=0;i<_56c.length;i++){
if(_56f==_56c[i]){
return true;
}
}
return false;
},hasInvalid:function(){
return (_56d.length>0);
},getInvalid:function(){
return _56d;
},isInvalid:function(_571){
for(var i=0;i<_56d.length;i++){
if(_571==_56d[i]){
return true;
}
}
return false;
}};
var _573=function(name,_575){
return (typeof _575[name]=="undefined");
};
if(_56b.trim instanceof Array){
for(var i=0;i<_56b.trim.length;i++){
var elem=form[_56b.trim[i]];
if(_573("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/(^\s*|\s*$)/g,"");
}
}
if(_56b.uppercase instanceof Array){
for(var i=0;i<_56b.uppercase.length;i++){
var elem=form[_56b.uppercase[i]];
if(_573("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.toUpperCase();
}
}
if(_56b.lowercase instanceof Array){
for(var i=0;i<_56b.lowercase.length;i++){
var elem=form[_56b.lowercase[i]];
if(_573("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.toLowerCase();
}
}
if(_56b.ucfirst instanceof Array){
for(var i=0;i<_56b.ucfirst.length;i++){
var elem=form[_56b.ucfirst[i]];
if(_573("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(_56b.digit instanceof Array){
for(var i=0;i<_56b.digit.length;i++){
var elem=form[_56b.digit[i]];
if(_573("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/\D/g,"");
}
}
if(_56b.required instanceof Array){
for(var i=0;i<_56b.required.length;i++){
if(!dojo.isString(_56b.required[i])){
continue;
}
var elem=form[_56b.required[i]];
if(!_573("type",elem)&&(elem.type=="text"||elem.type=="textarea"||elem.type=="password"||elem.type=="file")&&/^\s*$/.test(elem.value)){
_56c[_56c.length]=elem.name;
}else{
if(!_573("type",elem)&&(elem.type=="select-one"||elem.type=="select-multiple")&&(elem.selectedIndex==-1||/^\s*$/.test(elem.options[elem.selectedIndex].value))){
_56c[_56c.length]=elem.name;
}else{
if(elem instanceof Array){
var _579=false;
for(var j=0;j<elem.length;j++){
if(elem[j].checked){
_579=true;
}
}
if(!_579){
_56c[_56c.length]=elem[0].name;
}
}
}
}
}
}
if(_56b.required instanceof Array){
for(var i=0;i<_56b.required.length;i++){
if(!dojo.isObject(_56b.required[i])){
continue;
}
var elem,_57b;
for(var name in _56b.required[i]){
elem=form[name];
_57b=_56b.required[i][name];
}
if(elem instanceof Array){
var _579=0;
for(var j=0;j<elem.length;j++){
if(elem[j].checked){
_579++;
}
}
if(_579<_57b){
_56c[_56c.length]=elem[0].name;
}
}else{
if(!_573("type",elem)&&elem.type=="select-multiple"){
var _57d=0;
for(var j=0;j<elem.options.length;j++){
if(elem.options[j].selected&&!/^\s*$/.test(elem.options[j].value)){
_57d++;
}
}
if(_57d<_57b){
_56c[_56c.length]=elem.name;
}
}
}
}
}
if(dojo.isObject(_56b.dependencies)){
for(name in _56b.dependencies){
var elem=form[name];
if(_573("type",elem)){
continue;
}
if(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
if(/\S+/.test(elem.value)){
continue;
}
if(_56e.isMissing(elem.name)){
continue;
}
var _57e=form[_56b.dependencies[name]];
if(_57e.type!="text"&&_57e.type!="textarea"&&_57e.type!="password"){
continue;
}
if(/^\s*$/.test(_57e.value)){
continue;
}
_56c[_56c.length]=elem.name;
}
}
if(dojo.isObject(_56b.constraints)){
for(name in _56b.constraints){
var elem=form[name];
if(!elem){
continue;
}
if(!_573("tagName",elem)&&(elem.tagName.toLowerCase().indexOf("input")>=0||elem.tagName.toLowerCase().indexOf("textarea")>=0)&&/^\s*$/.test(elem.value)){
continue;
}
var _57f=true;
if(dojo.isFunction(_56b.constraints[name])){
_57f=_56b.constraints[name](elem.value);
}else{
if(dojo.isArray(_56b.constraints[name])){
if(dojo.isArray(_56b.constraints[name][0])){
for(var i=0;i<_56b.constraints[name].length;i++){
_57f=dojox.validate.evaluateConstraint(_56b,_56b.constraints[name][i],name,elem);
if(!_57f){
break;
}
}
}else{
_57f=dojox.validate.evaluateConstraint(_56b,_56b.constraints[name],name,elem);
}
}
}
if(!_57f){
_56d[_56d.length]=elem.name;
}
}
}
if(dojo.isObject(_56b.confirm)){
for(name in _56b.confirm){
var elem=form[name];
var _57e=form[_56b.confirm[name]];
if(_573("type",elem)||_573("type",_57e)||(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password")||(_57e.type!=elem.type)||(_57e.value==elem.value)||(_56e.isInvalid(elem.name))||(/^\s*$/.test(_57e.value))){
continue;
}
_56d[_56d.length]=elem.name;
}
}
return _56e;
};
dojox.validate.evaluateConstraint=function(_580,_581,_582,elem){
var _584=_581[0];
var _585=_581.slice(1);
_585.unshift(elem.value);
if(typeof _584!="undefined"){
return _584.apply(null,_585);
}
return false;
};
}
if(!dojo._hasResource["generic._base"]){
dojo._hasResource["generic._base"]=true;
dojo.provide("generic._base");
generic.popup=function(args){
var _587=dojo.byId(args.activator);
if(!_587){
return false;
}
var _588=["height","width","top","left","resizable","scrollbars","status","toolbar","menubar","location"];
var _589={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 _58a="";
for(var i=0;i<_588.length;i++){
var val;
var attr=_588[i];
if(args[attr]&&args[attr]!="undefined"){
val=args[attr];
}else{
val=_589[attr];
}
_58a+=attr+"="+val+",";
}
var open=function(){
dojo.publish("/page/status/overlayOpened",[]);
_58a=_58a.substring(0,_58a.length-1);
var win=window.open(args.url,args.name,_58a);
if(!win){
alert("Unable to open new window.  Please allow popups for this domain.");
}
};
var _590=[dojo.connect(_587,"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();
}
},start:function(){
if(!this.progressNode||!this.containerNode){
return;
}
this.containerNode.style.display="none";
this.progressNode.style.display="block";
},clear:function(){
if(!this.progressNode||!this.containerNode){
return;
}
this.containerNode.style.display="block";
this.progressNode.style.display="none";
},onComplete:function(){
this.clear();
},onException:function(){
this.clear();
},onFailure:function(){
this.clear();
},onTimeout:function(){
this.clear();
},_setDimensions:function(){
var _596=dojo.coords(this.containerNode);
this.progressNode.style.width=_596.w+"px";
this.progressNode.style.height=_596.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 _598=dojo.coords(this.containerNode);
this.progressNode.style.width=(_598.w+this.offset.w)+"px";
this.progressNode.style.height=(_598.h+this.offset.h)+"px";
},start:function(){
if(!this.progressNode){
return;
}
this.progressNode.style.display="block";
},clear:function(){
if(!this.progressNode){
return;
}
this.progressNode.style.display="none";
}});
}
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 _59a=new generic.jsonrpc();
var _59b=[{"logic":[{"path":args.logicPath}],"tmpl":[{"path":args.tmplPath}]}];
var d=_59a.callRemote("include",_59b);
var self=this;
d.addCallback(function(_59e){
if(args.callbackArgs.progress){
args.callbackArgs.progress.clear();
}
self.toggleSubmitButton(true);
var _59f=_59e.result.output;
var node=dojo.byId(args.nodeId);
if(node){
node.innerHTML=_59f[args.tmplPath];
if(args.parse){
self.reloadWidgets(node);
}
}
if(args.callbackArgs.error!==undefined){
dojo.mixin(_59e.error,args.callbackArgs.error);
self.showErrors(_59e.error);
}
if(args.onReloadCallback!==undefined){
args.onReloadCallback(_59e);
}
});
d.addErrback(function(err){
console.log("error = "+err);
});
},submitValuesRpc:function(args){
var _5a3=new generic.jsonrpc();
var d=_5a3.callRemote(args.method,args.params);
if(args.progressArgs!==undefined){
var _5a5=new generic.progress(args.progressArgs);
_5a5.start();
}
this.toggleSubmitButton(false);
var self=this;
d.addCallback(function(_5a7){
if(args.callback){
var _5a8;
if(args.hasErrorChecking){
_5a8={progress:_5a5,error:_5a7.error};
}else{
_5a8={progress:_5a5};
}
args.callback(_5a8);
}else{
_5a5.clear();
self.toggleSubmitButton(true);
}
});
d.addErrback(function(err){
console.log("===errBack===");
});
},initRpcHandler:function(_5aa){
var self=this;
var send=function(){
var _5ad=new Object();
var val="";
dojo.forEach(_5aa.fields,function(_5af){
var node=dojo.byId(_5af.id);
if(node){
switch(_5af.inputType){
case "text":
val=node.value;
break;
case "radio":
if(!node.checked&&node.value&&node.value!==""){
val=node.value;
}
break;
default:
val=node.value;
}
}
_5ad[_5af.reqKey]=val;
});
if(_5aa.params[0].logic!==undefined){
_5aa.params[0].logic[0].args=_5ad;
}else{
_5aa.params[0]=_5ad;
}
self.submitValuesRpc(_5aa);
};
var _5b1=dojo.byId(_5aa.submitEvent.nodeId);
var _5b2=_5aa.submitEvent.eventName;
if(_5b1){
this.handlers.push([dojo.connect(_5b1,_5b2,send)]);
}
},reloadWidgets:function(_5b3){
dojo.query(".destroy_onreload",_5b3).forEach(function(node){
var _5b5=dijit.byId(node.id);
if(!_5b5){
_5b5=dijit.byId(node.id+".display");
}
if(_5b5){
_5b5.destroyRecursive();
}
});
dojo.parser.parse(_5b3);
},showErrors:function(_5b6){
var _5b7="";
var _5b8=false;
var self=this;
var _5ba=dojo.byId("error_panel");
if(_5b6.messages.length>0){
_5b7="<div class='form_errors' id='errors_json'><ul class='err_list'>";
dojo.forEach(_5b6.messages,function(_5bb){
_5b7+="<li>"+_5bb.text+"</li>";
if(_5bb.severity==="MESSAGE"){
_5b8=true;
self.toggleSubmitButton(false);
dojo.publish("/jsonrpc/error/message",[_5bb]);
}
});
_5b7+="</ul></div>";
if(_5ba){
var _5bc=dojo.byId("errors_include");
if(_5bc){
_5bc.style.display="none";
}
}
_5ba.style.display="block";
_5ba.innerHTML=_5b7;
}else{
if(_5ba){
var _5bc=dojo.byId("errors_include");
if(_5bc){
_5bc.style.display="block";
}
var _5bd=dojo.byId("errors_json");
if(_5bd){
_5bd.style.display="none";
}
}
}
if(!_5b8){
this.toggleSubmitButton(true);
}
},toggleSubmitButton:function(_5be){
var _5bf=dojo.query("div.checkout_submit");
var _5c0=dojo.query("div.checkout_submit_disabled");
var _5c1="block";
var _5c2="none";
if(!_5be){
_5c1="none";
_5c2="block";
}
dojo.forEach(_5bf,function(btn){
btn.style.display=_5c1;
});
dojo.forEach(_5c0,function(btn){
btn.style.display=_5c2;
});
}});
}
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,_5c6){
this.url=url;
if(typeof _5c6!="undefined"){
this._visible=_5c6;
}
this._initialize();
},addLoadedListener:function(_5c7){
this._loadedListeners.push(_5c7);
},addInstallingListener:function(_5c8){
this._installingListeners.push(_5c8);
},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 _5cb=new dojox.flash.Install();
dojox.flash.installer=_5cb;
if(_5cb.needed()==true){
_5cb.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(_5cc,_5cd,_5ce){
_5ce=parseFloat("."+_5ce);
if(this.versionMajor>=_5cc&&this.versionMinor>=_5cd&&this.versionRevision>=_5ce){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _5cf;
for(var _5d0=25;_5d0>0;_5d0--){
if(dojo.isIE){
_5cf=VBGetSwfVer(_5d0);
}else{
_5cf=this._JSFlashInfo(_5d0);
}
if(_5cf==-1){
this.capable=false;
return;
}else{
if(_5cf!=0){
var _5d1;
if(dojo.isIE){
var _5d2=_5cf.split(" ");
var _5d3=_5d2[1];
_5d1=_5d3.split(",");
}else{
_5d1=_5cf.split(".");
}
this.versionMajor=_5d1[0];
this.versionMinor=_5d1[1];
this.versionRevision=_5d1[2];
var _5d4=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_5d4);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_5d5){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _5d6=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _5d7=navigator.plugins["Shockwave Flash"+_5d6].description;
var _5d8=_5d7.split(" ");
var _5d9=_5d8[2].split(".");
var _5da=_5d9[0];
var _5db=_5d9[1];
if(_5d8[3]!=""){
var _5dc=_5d8[3].split("r");
}else{
var _5dc=_5d8[4].split("r");
}
var _5dd=_5dc[1]>0?_5dc[1]:0;
var _5de=_5da+"."+_5db+"."+_5dd;
return _5de;
}
}
return -1;
}};
dojox.flash.Embed=function(_5df){
this._visible=_5df;
};
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(_5e0){
var _5e1="";
_5e1+=("width: "+this.width+"px; ");
_5e1+=("height: "+this.height+"px; ");
if(!this._visible){
_5e1+="position: absolute; z-index: 10000; top: -1000px; left: -1000px; ";
}
var _5e2;
var _5e3=dojox.flash.url;
var _5e4=_5e3;
var _5e5=_5e3;
var _5e6=dojo.baseUrl;
if(_5e0){
var _5e7=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _5e8=escape(document.title);
_5e4+="?MMredirectURL="+_5e7+"&MMplayerType=ActiveX"+"&MMdoctitle="+_5e8+"&baseUrl="+escape(_5e6);
_5e5+="?MMredirectURL="+_5e7+"&MMplayerType=PlugIn"+"&baseUrl="+escape(_5e6);
}else{
_5e4+="?cachebust="+new Date().getTime();
}
if(_5e5.indexOf("?")==-1){
_5e5+="?baseUrl="+escape(_5e6);
}else{
_5e5+="&baseUrl="+escape(_5e6);
}
_5e2="<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=\""+_5e4+"\"></param>\n "+"<param name=\"quality\" value=\"high\"></param>\n "+"<param name=\"bgcolor\" value=\"#ffffff\"></param>\n "+"<embed src=\""+_5e5+"\" "+"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",_5e1);
div.innerHTML=_5e2;
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(_5eb){
var _5ec=dojo.byId(this.id+"Container");
if(_5eb==true){
_5ec.style.position="absolute";
_5ec.style.visibility="visible";
}else{
_5ec.style.position="absolute";
_5ec.style.x="-1000px";
_5ec.style.y="-1000px";
_5ec.style.visibility="hidden";
}
},center:function(){
var _5ed=this.width;
var _5ee=this.height;
var _5ef=dijit.getViewport();
var x=_5ef.l+(_5ef.w-_5ed)/2;
var y=_5ef.t+(_5ef.h-_5ee)/2;
var _5f2=dojo.byId(this.id+"Container");
_5f2.style.top=y+"px";
_5f2.style.left=x+"px";
}};
dojox.flash.Communicator=function(){
};
dojox.flash.Communicator.prototype={_addExternalInterfaceCallback:function(_5f3){
var _5f4=dojo.hitch(this,function(){
var _5f5=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_5f5[i]=this._encodeData(arguments[i]);
}
var _5f7=this._execFlash(_5f3,_5f5);
_5f7=this._decodeData(_5f7);
return _5f7;
});
this[_5f3]=_5f4;
},_encodeData:function(data){
if(!data||typeof data!="string"){
return data;
}
var _5f9=/\&([^;]*)\;/g;
data=data.replace(_5f9,"&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(_5fb,_5fc){
var _5fd=dojox.flash.obj.get();
_5fc=(_5fc)?_5fc:[];
for(var i=0;i<_5fc;i++){
if(typeof _5fc[i]=="string"){
_5fc[i]=this._encodeData(_5fc[i]);
}
}
var _5ff=function(){
return eval(_5fd.CallFunction("<invoke name=\""+_5fb+"\" returntype=\"javascript\">"+__flash__argumentsToXML(_5fc,0)+"</invoke>"));
};
var _600=_5ff.call(_5fc);
if(typeof _600=="string"){
_600=this._decodeData(_600);
}
return _600;
}};
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 _601=new dojox.flash.Embed(false);
_601.write();
}else{
if(dojox.flash.info.isVersionOrAbove(6,0,65)){
var _601=new dojox.flash.Embed(false);
_601.write(true);
_601.setVisible(true);
_601.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 _605=dfd.ioArgs;
dojo._ioAddQueryToUrl(_605);
this.attach(_605.id,_605.url,args.frameDoc);
dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);
return dfd;
},attach:function(id,url,_608){
var doc=(_608||dojo.doc);
var _60a=doc.createElement("script");
_60a.type="text/javascript";
_60a.src=url;
_60a.id=id;
doc.getElementsByTagName("head")[0].appendChild(_60a);
},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 _60e=dfd.ioArgs;
_60e.id=dojo._scopeName+"IoScript"+(this._counter++);
_60e.canDelete=false;
if(args.callbackParamName){
_60e.query=_60e.query||"";
if(_60e.query.length>0){
_60e.query+="&";
}
_60e.query+=args.callbackParamName+"="+(args.frameDoc?"parent.":"")+"dojo.io.script.jsonp_"+_60e.id+"._jsonpCallback";
_60e.canDelete=true;
dfd._jsonpCallback=this._jsonpCallback;
this["jsonp_"+_60e.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(_611,dfd){
if(dfd.ioArgs.canDelete){
if(_611.dojoType=="timeout"){
dojo.io.script.remove(dfd.ioArgs.id);
}else{
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
}
console.debug("dojo.io.script error",_611);
return _611;
},_deadScripts:[],_counter:1,_validCheck:function(dfd){
var _614=dojo.io.script;
var _615=_614._deadScripts;
if(_615&&_615.length>0){
for(var i=0;i<_615.length;i++){
_614.remove(_615[i]);
}
dojo.io.script._deadScripts=[];
}
return true;
},_ioCheck:function(dfd){
if(dfd.ioArgs.json){
return true;
}
var _618=dfd.ioArgs.args.checkString;
if(_618&&eval("typeof("+_618+") != '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(_61c){
console.log("embedSwfObject()");
generic.flash._isSwfObject=true;
generic.flash._swfObjectArgs=_61c;
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,_620){
var err=resp instanceof Error;
generic.flash.so=swfobject;
generic.flash._initialize();
},addLoadedListener:function(_622){
this._loadedListeners.push(_622);
},addInstallingListener:function(_623){
this._installingListeners.push(_623);
},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 _62a=new dojox.flash.Install();
generic.flash.installer=_62a;
if(_62a.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()");
_62a.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(_62d){
console.log("generic.flash.Embed");
if(_62d){
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,_632,_633){
item={id:_633,attributes:attr,params:_632,obj:null};
this.items[_633]=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,_639){
_639=_639||{};
var exp=_639.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_639.expires=d;
}
if(exp&&exp.toUTCString){
_639.expires=exp.toUTCString();
}
var _63c=name+"="+val;
for(var i in _639){
var key=i;
var val=_639[i];
_63c+="; "+key+"="+val;
}
document.cookie=_63c;
},serialize:function(_63f,to){
if(_63f){
if(to&&to!=="undefined"){
if(to=="perl"){
return this.toPerl(_63f);
}else{
return dojo.toJson(_63f);
}
}else{
try{
return dojo.toJson(_63f);
}
catch(e){
throw new Error("json serialize failed, trying perl.");
return this.toPerl(_63f);
}
}
}
},toPerl:function(_641){
if(_641){
var str="";
for(var i in _641){
if(_641[i]){
if(str!==""){
str+="&";
}
str+=i+"&"+_641[i];
}
}
return str;
}
},deserialize:function(_644,from){
if(_644){
if(from&&from!=="undefined"){
if(from=="perl"){
return this.fromPerl(_644);
}else{
return dojo.fromJson(_644);
}
}else{
try{
return this.fromPerl(_644);
}
catch(e){
throw new Error("deserialize fromPerl failed, trying fromJson");
return dojo.fromJson(_644);
}
}
}
},fromPerl:function(_646){
if(_646){
var _647={};
var _648=_646.split("&");
for(var i=0;i<_648.length;i+=2){
var key=_648[i];
var val=escape(_648[i+1]);
if(key&&val&&typeof (val)!=="undefined"){
_647[key]=val;
}
}
return _647;
}
},fromJson:function(_64c){
if(_64c){
return dojo.fromJson(_64c);
}
},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(_651){
return function(data){
_651.errback(new Error(data.message));
};
},resultCallback:function(_653){
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;
_653.errback(err);
}else{
_653.callback(this.parseResults(obj));
}
});
return tf;
},generateMethod:function(_657,_658,url){
return dojo.hitch(this,function(){
var _65a=new dojo.Deferred();
if((this.strictArgChecks)&&(_658!=null)&&(arguments.length!=_658.length)){
throw new Error("Invalid number of parameters for remote method.");
}else{
this.bind(_657,dojo._toArray(arguments),_65a,url);
}
return _65a;
});
},processSmd:function(_65b){
if(_65b.methods){
dojo.forEach(_65b.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=_65b.serviceUrl||_65b.serviceURL;
this.required=_65b.required;
this.smd=_65b;
}});
}
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(_660,args){
var _662=new dojo.Deferred();
this.bind(_660,args,_662);
return _662;
},bind:function(_663,_664,_665,url){
var def=dojo.rawXhrPost({url:url||this.serviceUrl,postData:this.createRequest(_663,_664),contentType:this.contentType,timeout:this.timeout,handleAs:this.handleAs});
def.addCallbacks(this.resultCallback(_665),this.errorCallback(_665));
},createRequest:function(_668,_669){
var req=[{"method":_668,"params":_669,"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 _66e=0;
var _66f=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");
}
}
}
_66f=obj[0];
if("id" in obj[0]){
_66e=obj[0].id;
}
if("result" in obj[0]){
if(_66e!=0){
var _671=this._prevRequests[_66e];
this._cache[_671]=obj[0].result;
}
_66f.result=obj[0].result;
}
if("error" in obj[0]){
_66f.error=obj[0].error;
}
return _66f;
}
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;
_675=history.length;
};
if(dojo.exists("tests.back-hash")){
back.getHash=getHash;
back.setHash=setHash;
}
var _676=(typeof (window)!=="undefined")?window.location.href:"";
var _677=(typeof (window)!=="undefined")?getHash():"";
var _678=null;
var _679=null;
var _67a=null;
var _67b=null;
var _67c=[];
var _67d=[];
var _67e=false;
var _67f=false;
var _675;
function handleBackButton(){
var _680=_67d.pop();
if(!_680){
return;
}
var last=_67d[_67d.length-1];
if(!last&&_67d.length==0){
last=_678;
}
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");
}
}
}
}
_67c.push(_680);
};
back.goBack=handleBackButton;
function handleForwardButton(){
var last=_67c.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");
}
}
}
_67d.push(last);
};
back.goForward=handleForwardButton;
function createState(url,args,hash){
return {"url":url,"kwArgs":args,"urlHash":hash};
};
function getUrlQuery(url){
var _687=url.split("?");
if(_687.length<2){
return null;
}else{
return _687[1];
}
};
function loadIframeHistory(){
var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();
_67e=true;
if(_67b){
dojo.isSafari?_67b.location=url:window.frames[_67b.name].location=url;
}else{
}
return url;
};
function checkLocation(){
if(!_67f){
var hsl=_67d.length;
var hash=getHash();
if((hash===_677||window.location.href==_676)&&(hsl==1)){
handleBackButton();
return;
}
if(_67c.length>0){
if(_67c[_67c.length-1].urlHash===hash){
handleForwardButton();
return;
}
}
if((hsl>=2)&&(_67d[hsl-2])){
if(_67d[hsl-2].urlHash===hash){
handleBackButton();
return;
}
}
if(dojo.isSafari&&dojo.isSafari<3){
var _68b=history.length;
if(_68b>_675){
handleForwardButton();
}else{
if(_68b<_675){
handleBackButton();
}
}
_675=_68b;
}
}
};
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){
_678=createState(_676,args,_677);
};
back.addToHistory=function(args){
_67c=[];
var hash=null;
var url=null;
if(!_67b){
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");
}
_67b=window.frames["dj_history"];
}
if(!_67a){
_67a=document.createElement("a");
dojo.body().appendChild(_67a);
_67a.style.display="none";
}
if(args["changeUrl"]){
hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(_67d.length==0&&_678.urlHash==hash){
_678=createState(url,args,hash);
return;
}else{
if(_67d.length>0&&_67d[_67d.length-1].urlHash==hash){
_67d[_67d.length-1]=createState(url,args,hash);
return;
}
}
_67f=true;
setTimeout(function(){
setHash(hash);
_67f=false;
},1);
_67a.href=hash;
if(dojo.isIE){
url=loadIframeHistory();
var _691=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_693){
if(getHash()!=""){
setTimeout(function(){
setHash(hash);
},1);
}
_691.apply(this,[_693]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _694=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_696){
if(getHash()!=""){
setHash(hash);
}
if(_694){
_694.apply(this,[_696]);
}
};
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(!_679){
_679=setInterval(checkLocation,200);
}
}
}
}else{
url=loadIframeHistory();
}
_67d.push(createState(url,args,hash));
};
back.getStack=function(){
return _67d;
};
back._iframeLoaded=function(evt,_698){
var _699=getUrlQuery(_698.href);
if(_699==null){
if(_67d.length==1){
handleBackButton();
}
return;
}
if(_67e){
_67e=false;
return;
}
if(_67d.length>=2&&_699==getUrlQuery(_67d[_67d.length-2].url)){
handleBackButton();
}else{
if(_67c.length>0&&_699==getUrlQuery(_67c[_67c.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(_69a){
this.changeUrl=_69a;
};
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 _69e=dojo.back.getStack();
var out="<b>History Stack:</b><br/>";
for(var i=0;i<_69e.length;i++){
var bm=_69e[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 _6a2=generic.flash.State.getFragment();
dojo.back.setInitialState(new generic.flash.State(_6a2));
generic.flash.addLoadedListener(dojo.hitch(this,function(){
var resp=dojo.global.generic.flash.Api.flashCall("state",_6a2);
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;
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];
dojo.publish("/flash/event/cuePoint",[args]);
var inc=dojo.toJson(args,true);
this.response.createResponse(1,args);
},cuePointProduct:function(args){
var _6aa=args[0].actions[0];
this.cuePoint(_6aa);
},alterCart:function(){
var args=arguments[0];
var _6ac=args[0].actions[0];
var _6ad="Cart.alterCart";
args[0].mostRecent=1;
var self=this;
self.cartAction=_6ac.action;
self.actionPath=_6ac.path;
var req=new generic.jsonrpc();
dojo.publish("/page/cart/preAlterCart",[]);
var def=req.callRemote(_6ad,args);
def.addBoth(function(resp){
args.resp=resp;
dojo.publish("/page/cart/alterCart",[args]);
if(self.cartAction=="add"){
var _6b2=dojo.cookie("page_data");
if(_6b2&&_6b2!==null){
var _6b3=dojo.cookie.deserialize(_6b2);
var _6b4="cart.lpath";
_6b3[_6b4]=self.actionPath;
var nstr=dojo.cookie.serialize(_6b3,"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(_6b6){
var args=_6b6[0];
var _6b8=false;
if(typeof args=="undefined"){
try{
if(_6b6["query"]&&_6b6["query"]=="palette"){
_6b8=true;
args=_6b6;
}
}
catch(e){
}
}
var _6b9;
var pd=parent.page_data;
if(args&&args.query){
var path=args.query.split(".");
var _6bc=path.length;
var _6bd=pd;
for(var i=0;i<_6bc;i++){
var key=path.shift();
_6bd=_6bd[key];
}
_6b9=_6bd;
}else{
_6b9=pd;
}
if(_6b8){
try{
if(page_data.palette.kit){
_6b9={palette:_6b9};
return _6b9;
}
}
catch(e){
}
}
return this.response.createResponse(1,_6b9);
},popup:function(_6c0){
var args=_6c0[0];
var _6c2=["height","width","top","left","resizable","scrollbars","status","toolbar","menubar","location"];
var _6c3={location:null,height:500,width:500,top:25,left:25,resizable:"yes",scrollbars:"yes",status:"no",toolbar:"no",menubar:"no",name:"flash pop"};
var _6c4="";
for(var i=0;i<_6c2.length;i++){
var val;
var attr=_6c2[i];
if(args[attr]&&args[attr]!="undefined"){
val=args[attr];
}else{
val=_6c3[attr];
}
_6c4+=attr+"="+val+",";
}
_6c4=_6c4.substring(0,_6c4.length-1);
var win=window.open(args.location,args.name,_6c4);
if(!win){
alert("Unable to open new window.  Please allow popups for this domain.");
}
return this.response.createResponse(1,args.location);
},notifyEvent:function(_6c9){
try{
eval(_6c9.func+"('"+_6c9.event+"')");
}
catch(e){
}
},setElementSize:function(_6ca){
var args=_6ca[0];
function setSize(id,w,h){
var node=dojo.byId(id);
if(id=="guideBrowser_resize"){
node=dojo.byId("productBrowser_resize");
}
if(node){
node.style.width=w;
node.style.height=h;
dojo.byId("main_content_td").style.height = h;  
dojo.byId("main_content").style.height = h;  
}
var _6d0=dojo.coords(node);
};
function getType(_6d1){
var type="default";
var v=_6d1.toString();
if(v.search(/[0-9]%/)>0){
type="percent";
}else{
if(v=="window"||v=="document"){
type=v;
}
}
return type;
};
function getValueStr(_6d4,axis){
var type=getType(_6d4);
var _6d7;
switch(type){
case "percent":
_6d7=_6d4;
break;
case "window":
var _6d8;
if(axis=="w"){
if(typeof window.innerWidth!="undefined"){
_6d8=document.documentElement.clientWidth;
}else{
}
}else{
if(typeof window.innerHeight!="undefined"){
_6d8=window.innerHeight;
}else{
_6d8=document.documentElement.clientHeight;
}
}
_6d7=_6d8+"px";
break;
case "document":
var _6d8;
if(axis=="w"){
_6d8=dojo.body().scrollWidth;
}else{
_6d8=dojo.body().scrollHeight;
}
_6d7=_6d8+"px";
break;
default:
_6d7=_6d4+"px";
}
return _6d7;
};
if(args.id=="productBrowser_resize"){
var vp=dijit.getViewport();
args.h=(vp.h>args.h)?vp.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){
var resp=dojo.global.cmCreatePageviewTag(args[0],args[1],args[2],args[3]);
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){
var resp=dojo.global.cmCreatePageElementTag(args[0],args[1],args[2],args[3],args[4]);
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(_6e4,args){
this.response=new generic.flash.ApiResponse({method:_6e4,req_args:args});
var resp=this[_6e4](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(_6e8,_6e9){
this.success=(_6e8)?true:false;
if(_6e9){
this.results=_6e9;
}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,_6ef,eid,_6f1){
var rel=dojo.byId(eid);
if(!rel){
console.log("Element doesnt exist");
return;
}
this._isSwfObject=true;
this._flashReady=_6f1||this._flashReady;
this.id=eid;
this._swfObjectArgs={attributes:attr,params:_6ef,eid:eid};
this._initialize();
};
this.removeSwf=function(){
var fid=this._swfObjectArgs.attributes.id;
generic.flash.removeSwfObject(fid);
};
this.isReady=function(){
return this._flashReady&&this._pageReady;
};
this.addOnInit=function(_6f4){
this._initListeners.push(_6f4);
};
this._initialize=function(){
generic.flash.addLoadedListener(dojo.hitch(this,function(){
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;
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(_6f8,args){
console.log("flash calling js method: ",_6f8," with args: ",args);
if(dojo.exists(_6f8,generic.flash.ApiMethods)){
var resp=generic.flash.ApiMethods.__process(_6f8,args);
console.log("method exsited, response is:");
return resp;
}else{
console.log(_6f8+": No such method exists");
return {success:false,results:"No such method exists"};
}
};
generic.flash.Api.flashCall=function(_6fb,args){
var db="js calling flash method: "+_6fb;
console.log(db);
var _6fe=generic.flash.comm.flashCall(_6fb,args);
return _6fe;
};
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(_700,_701,_702){
if(!_700.data){
return;
}
var pd=dojo.global.page_data;
if(pd.env&&pd.env.maturity&&pd.env.maturity=="eng"){
_700.data=_700.data+"?t="+(new Date().getTime()).toString();
}
self._objargs.attrs=dojo.mixin(self.attrDefaults,_700);
self._objargs.id=self._objargs.attrs.id;
self._objargs.params=_701;
self._objargs.repid=_702;
if(self.so.hasFlashPlayerVersion(self._objargs.attrs.playerversion)){
self.obj=self.so.createSWF(self._objargs.attrs,self._objargs.params,self._objargs.repid);
}else{
var _704=self._objargs.attrs.altcontentid;
var _705=dojo.query(".noflash",dojo.byId(_702));
var _706=_704?(dojo.byId(_704)?dojo.byId(_704):false):(!!_705.length?_705[0]:false);
if(_706){
_706.style.visibility="visible";
_706.style.display="block";
}
}
if(self.obj){
return true;
}
};
};
generic.flashx.prototype={flashLoaded:false,pageLoaded:false,enableHistory:false,embedSwf:function(_707,_708,_709){
if(!_707.data||!_709){
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 _70a=this.so.customEmbed(_707,_708,_709);
if(_70a){
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(_70b,args){
if(dojo.exists(_70b,generic.flash.ApiMethods)){
try{
var resp=generic.flash.ApiMethods.__process(_70b,args);
return resp;
}
catch(e){
console.log(e.message||e);
}
}else{
return {success:false,results:"No such method exists"};
}
},flashCall:function(_70e,args){
var _710=dojox.flash.comm.flashCall(_70e,args);
return _710;
}};
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 _712=dijit.byId(args.srcSelectId);
var _713=dijit.byId(args.targetSelectId);
if(_712&&_713){
this._selectsAreWidgets=true;
var self=this;
_712.onChangeCallback=function(){
self.onChange();
};
}else{
_712=dojo.byId(args.srcSelectId);
_713=dojo.byId(args.targetSelectId);
if(_712&&_713){
this.handlers=[dojo.connect(_712,"onchange",this,"onChange")];
}else{
console.log("site.form.contextualOptions: select element not found");
return false;
}
}
this.srcSelect=_712;
this.targetSelect=_713;
this.targetSelectOptions=args.targetSelectOptions;
if(args.valueKey){
this.valueKey=args.valueKey;
}
if(args.labelKey){
this.labelKey=args.labelKey;
}
},onChange:function(e){
var _716=this.srcSelect.value;
var _717=this.targetSelect;
if(_716===""||_716===null){
return false;
}
this.removeOptions(_717);
this.addOptions(_717);
if(_717.updateIndices){
_717.updateIndices();
}
},getNewOptions:function(){
var _718=this.srcSelect.value;
return this.targetSelectOptions[_718];
},addOptions:function(_719){
var _71a=this._selectsAreWidgets;
var _71b=this.getNewOptions();
var _71c=(this.labelKey?this.labelKey:0);
var _71d=(this.valueKey?this.valueKey:1);
dojo.forEach(_71b,function(_71e,ix){
if(_71a){
_719.addOption(_71e[_71d],_71e[_71c]);
}else{
_719.options[ix]=new Option(_71e[_71c],_71e[_71d]);
}
});
},removeOptions:function(_720){
var _721=this._selectsAreWidgets;
if(_721){
dojo.forEach(_720.options,function(_722){
if(_722.value!==""){
_720.removeOption(_722.value);
}
});
}else{
var l=(_720.options.length-1);
var i;
for(i=l;i>=0;i--){
if(_720.options[i].value!==""){
_720.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(_725){
_725.startup();
});
this.startupKeyNavChildren();
this.inherited(arguments);
},onExecute:function(){
},onCancel:function(_726){
},_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(_72f){
var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_72f))||dijit.Menu._iframeContentDocument(_72f)["__parent__"]||(_72f.name&&dojo.doc.frames[_72f.name])||null;
return win;
},_iframeContentDocument:function(_731){
var doc=_731.contentDocument||(_731.contentWindow&&_731.contentWindow.document)||(_731.name&&dojo.doc.frames[_731.name]&&dojo.doc.frames[_731.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(_736){
var node=dojo.byId(_736);
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 _740=dojo.coords(e.target,true);
x=_740.x+10;
y=_740.y+10;
}
var self=this;
var _742=dijit.getFocus(this);
function closeAndRestoreFocus(){
dijit.focus(_742);
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 _744=this.focusedChild;
var _745=_744.popup;
if(_745.isShowingNow){
return;
}
_745.parentMenu=this;
var self=this;
dijit.popup.open({parent:this,popup:_745,around:_744.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){
dijit.popup.close(_745);
_744.focus();
self.currentPopup=null;
}});
this.currentPopup=_745;
if(_745.focus){
_745.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(_749){
this.containerNode.innerHTML=this.label=_749;
},setDisabled:function(_74a){
this.disabled=_74a;
dojo[_74a?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.containerNode,"disabled",_74a?"true":"false");
}});
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _74b=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_74b[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(_74d,_74e){
var rxp="^";
var c=null;
for(var i=0;i<_74d.length;i++){
c=_74d.charAt(i);
switch(c){
case "\\":
rxp+=c;
i++;
rxp+=_74d.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(_74e){
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(_755,_756){
var _757=[];
function createSortFunction(attr,dir){
return function(_75a,_75b){
var a=_756.getValue(_75a,attr);
var b=_756.getValue(_75b,attr);
var _75e=null;
if(_756.comparatorMap){
if(typeof attr!=="string"){
attr=_756.getIdentity(attr);
}
_75e=_756.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
}
_75e=_75e||dojo.data.util.sorter.basicComparator;
return dir*_75e(a,b);
};
};
for(var i=0;i<_755.length;i++){
sortAttribute=_755[i];
if(sortAttribute.attribute){
var _760=(sortAttribute.descending)?-1:1;
_757.push(createSortFunction(sortAttribute.attribute,_760));
}
}
return function(rowA,rowB){
var i=0;
while(i<_757.length){
var ret=_757[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(_765){
_765=_765||{};
if(!_765.store){
_765.store=this;
}
var self=this;
var _767=function(_768,_769){
if(_769.onError){
var _76a=_769.scope||dojo.global;
_769.onError.call(_76a,_768,_769);
}
};
var _76b=function(_76c,_76d){
var _76e=_76d.abort||null;
var _76f=false;
var _770=_76d.start?_76d.start:0;
var _771=_76d.count?(_770+_76d.count):_76c.length;
_76d.abort=function(){
_76f=true;
if(_76e){
_76e.call(_76d);
}
};
var _772=_76d.scope||dojo.global;
if(!_76d.store){
_76d.store=self;
}
if(_76d.onBegin){
_76d.onBegin.call(_772,_76c.length,_76d);
}
if(_76d.sort){
_76c.sort(dojo.data.util.sorter.createSortFunction(_76d.sort,self));
}
if(_76d.onItem){
for(var i=_770;(i<_76c.length)&&(i<_771);++i){
var item=_76c[i];
if(!_76f){
_76d.onItem.call(_772,item,_76d);
}
}
}
if(_76d.onComplete&&!_76f){
var _775=null;
if(!_76d.onItem){
_775=_76c.slice(_770,_771);
}
_76d.onComplete.call(_772,_775,_76d);
}
};
this._fetchItems(_765,_76b,_767);
return _765;
};
}
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(_776){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_776.url;
this._jsonData=_776.data;
this._datatypeMap=_776.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_777){
return dojo.date.stamp.fromISOString(_777);
}};
}
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(_779){
if(typeof _779!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(item,_77b,_77c){
var _77d=this.getValues(item,_77b);
return (_77d.length>0)?_77d[0]:_77c;
},getValues:function(item,_77f){
this._assertIsItem(item);
this._assertIsAttribute(_77f);
return item[_77f]||[];
},getAttributes:function(item){
this._assertIsItem(item);
var _781=[];
for(var key in item){
if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){
_781.push(key);
}
}
return _781;
},hasAttribute:function(item,_784){
return this.getValues(item,_784).length>0;
},containsValue:function(item,_786,_787){
var _788=undefined;
if(typeof _787==="string"){
_788=dojo.data.util.filter.patternToRegExp(_787,false);
}
return this._containsValue(item,_786,_787,_788);
},_containsValue:function(item,_78a,_78b,_78c){
return dojo.some(this.getValues(item,_78a),function(_78d){
if(_78d!==null&&!dojo.isObject(_78d)&&_78c){
if(_78d.toString().match(_78c)){
return true;
}
}else{
if(_78b===_78d){
return true;
}
}
});
},isItem:function(_78e){
if(_78e&&_78e[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_78e[this._itemNumPropName]]===_78e){
return true;
}
}
return false;
},isItemLoaded:function(_78f){
return this.isItem(_78f);
},loadItem:function(_790){
this._assertIsItem(_790.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(_793,_794,_795){
var self=this;
var _797=function(_798,_799){
var _79a=[];
if(_798.query){
var _79b=_798.queryOptions?_798.queryOptions.ignoreCase:false;
var _79c={};
for(var key in _798.query){
var _79e=_798.query[key];
if(typeof _79e==="string"){
_79c[key]=dojo.data.util.filter.patternToRegExp(_79e,_79b);
}
}
for(var i=0;i<_799.length;++i){
var _7a0=true;
var _7a1=_799[i];
if(_7a1===null){
_7a0=false;
}else{
for(var key in _798.query){
var _79e=_798.query[key];
if(!self._containsValue(_7a1,key,_79e,_79c[key])){
_7a0=false;
}
}
}
if(_7a0){
_79a.push(_7a1);
}
}
_794(_79a,_798);
}else{
for(var i=0;i<_799.length;++i){
var item=_799[i];
if(item!==null){
_79a.push(item);
}
}
_794(_79a,_798);
}
};
if(this._loadFinished){
_797(_793,this._getItemsArray(_793.queryOptions));
}else{
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_793,filter:_797});
}else{
this._loadInProgress=true;
var _7a3={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _7a4=dojo.xhrGet(_7a3);
_7a4.addCallback(function(data){
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
_797(_793,self._getItemsArray(_793.queryOptions));
self._handleQueuedFetches();
}
catch(e){
self._loadFinished=true;
self._loadInProgress=false;
_795(e,_793);
}
});
_7a4.addErrback(function(_7a6){
self._loadInProgress=false;
_795(_7a6,_793);
});
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_797(_793,this._getItemsArray(_793.queryOptions));
}
catch(e){
_795(e,_793);
}
}else{
_795(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_793);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _7a8=this._queuedFetches[i];
var _7a9=_7a8.args;
var _7aa=_7a8.filter;
if(_7aa){
_7aa(_7a9,this._getItemsArray(_7a9.queryOptions));
}else{
this.fetchItemByIdentity(_7a9);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_7ab){
if(_7ab&&_7ab.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_7ac){
},_getItemsFromLoadedData:function(_7ad){
function valueIsAnItem(_7ae){
var _7af=((_7ae!=null)&&(typeof _7ae=="object")&&(!dojo.isArray(_7ae))&&(!dojo.isFunction(_7ae))&&(_7ae.constructor==Object)&&(typeof _7ae._reference=="undefined")&&(typeof _7ae._type=="undefined")&&(typeof _7ae._value=="undefined"));
return _7af;
};
var self=this;
function addItemAndSubItemsToArrayOfAllItems(_7b1){
self._arrayOfAllItems.push(_7b1);
for(var _7b2 in _7b1){
var _7b3=_7b1[_7b2];
if(_7b3){
if(dojo.isArray(_7b3)){
var _7b4=_7b3;
for(var k=0;k<_7b4.length;++k){
var _7b6=_7b4[k];
if(valueIsAnItem(_7b6)){
addItemAndSubItemsToArrayOfAllItems(_7b6);
}
}
}else{
if(valueIsAnItem(_7b3)){
addItemAndSubItemsToArrayOfAllItems(_7b3);
}
}
}
}
};
this._labelAttr=_7ad.label;
var i;
var item;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_7ad.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
item=this._arrayOfTopLevelItems[i];
addItemAndSubItemsToArrayOfAllItems(item);
item[this._rootItemPropName]=true;
}
var _7b9={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
for(key in item){
if(key!==this._rootItemPropName){
var _7bb=item[key];
if(_7bb!==null){
if(!dojo.isArray(_7bb)){
item[key]=[_7bb];
}
}else{
item[key]=[null];
}
}
_7b9[key]=key;
}
}
while(_7b9[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_7b9[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_7b9[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _7bc;
var _7bd=_7ad.identifier;
if(_7bd){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_7bd;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
_7bc=item[_7bd];
var _7be=_7bc[0];
if(!this._itemsByIdentity[_7be]){
this._itemsByIdentity[_7be]=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: ["+_7bd+"].  Value collided: ["+_7be+"]");
}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: ["+_7bd+"].  Value collided: ["+_7be+"]");
}
}
}
}
}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){
_7bc=item[key];
for(var j=0;j<_7bc.length;++j){
_7bb=_7bc[j];
if(_7bb!==null&&typeof _7bb=="object"){
if(_7bb._type&&_7bb._value){
var type=_7bb._type;
var _7c1=this._datatypeMap[type];
if(!_7c1){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");
}else{
if(dojo.isFunction(_7c1)){
_7bc[j]=new _7c1(_7bb._value);
}else{
if(dojo.isFunction(_7c1.deserialize)){
_7bc[j]=_7c1.deserialize(_7bb._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(_7bb._reference){
var _7c2=_7bb._reference;
if(!dojo.isObject(_7c2)){
_7bc[j]=this._itemsByIdentity[_7c2];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _7c4=this._arrayOfAllItems[k];
var _7c5=true;
for(var _7c6 in _7c2){
if(_7c4[_7c6]!=_7c2[_7c6]){
_7c5=false;
}
}
if(_7c5){
_7bc[j]=_7c4;
}
}
}
if(this.referenceIntegrity){
var _7c7=_7bc[j];
if(this.isItem(_7c7)){
this._addReferenceToMap(_7c7,item,key);
}
}
}else{
if(this.isItem(_7bb)){
if(this.referenceIntegrity){
this._addReferenceToMap(_7bb,item,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_7c8,_7c9,_7ca){
},getIdentity:function(item){
var _7cc=this._features["dojo.data.api.Identity"];
if(_7cc===Number){
return item[this._itemNumPropName];
}else{
var _7cd=item[_7cc];
if(_7cd){
return _7cd[0];
}
}
return null;
},fetchItemByIdentity:function(_7ce){
if(!this._loadFinished){
var self=this;
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_7ce});
}else{
this._loadInProgress=true;
var _7d0={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _7d1=dojo.xhrGet(_7d0);
_7d1.addCallback(function(data){
var _7d3=_7ce.scope?_7ce.scope:dojo.global;
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
var item=self._getItemByIdentity(_7ce.identity);
if(_7ce.onItem){
_7ce.onItem.call(_7d3,item);
}
self._handleQueuedFetches();
}
catch(error){
self._loadInProgress=false;
if(_7ce.onError){
_7ce.onError.call(_7d3,error);
}
}
});
_7d1.addErrback(function(_7d5){
self._loadInProgress=false;
if(_7ce.onError){
var _7d6=_7ce.scope?_7ce.scope:dojo.global;
_7ce.onError.call(_7d6,_7d5);
}
});
}
}else{
if(this._jsonData){
self._getItemsFromLoadedData(self._jsonData);
self._jsonData=null;
self._loadFinished=true;
var item=self._getItemByIdentity(_7ce.identity);
if(_7ce.onItem){
var _7d8=_7ce.scope?_7ce.scope:dojo.global;
_7ce.onItem.call(_7d8,item);
}
}
}
}else{
var item=this._getItemByIdentity(_7ce.identity);
if(_7ce.onItem){
var _7d8=_7ce.scope?_7ce.scope:dojo.global;
_7ce.onItem.call(_7d8,item);
}
}
},_getItemByIdentity:function(_7d9){
var item=null;
if(this._itemsByIdentity){
item=this._itemsByIdentity[_7d9];
}else{
item=this._arrayOfAllItems[_7d9];
}
if(item===undefined){
item=null;
}
return item;
},getIdentityAttributes:function(item){
var _7dc=this._features["dojo.data.api.Identity"];
if(_7dc===Number){
return null;
}else{
return [_7dc];
}
},_forceLoad:function(){
var self=this;
if(this._jsonFileUrl){
var _7de={url:self._jsonFileUrl,handleAs:"json-comment-optional",sync:true};
var _7df=dojo.xhrGet(_7de);
_7df.addCallback(function(data){
try{
if(self._loadInProgress!==true&&!self._loadFinished){
self._getItemsFromLoadedData(data);
self._loadFinished=true;
}
}
catch(e){
console.log(e);
throw e;
}
});
_7df.addErrback(function(_7e1){
throw _7e1;
});
}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(_7e2){
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(_7e2&&(_7e2.referenceIntegrity===false)){
this.referenceIntegrity=false;
}
this._saveInProgress=false;
},referenceIntegrity:true,_assert:function(_7e4){
if(!_7e4){
throw new Error("assertion failed in ItemFileWriteStore");
}
},_getIdentifierAttribute:function(){
var _7e5=this.getFeatures()["dojo.data.api.Identity"];
return _7e5;
},newItem:function(_7e6,_7e7){
this._assert(!this._saveInProgress);
if(!this._loadFinished){
this._forceLoad();
}
if(typeof _7e6!="object"&&typeof _7e6!="undefined"){
throw new Error("newItem() was passed something other than an object");
}
var _7e8=null;
var _7e9=this._getIdentifierAttribute();
if(_7e9===Number){
_7e8=this._arrayOfAllItems.length;
}else{
_7e8=_7e6[_7e9];
if(typeof _7e8==="undefined"){
throw new Error("newItem() was not passed an identity for the new item");
}
if(dojo.isArray(_7e8)){
throw new Error("newItem() was not passed an single-valued identity");
}
}
if(this._itemsByIdentity){
this._assert(typeof this._itemsByIdentity[_7e8]==="undefined");
}
this._assert(typeof this._pending._newItems[_7e8]==="undefined");
this._assert(typeof this._pending._deletedItems[_7e8]==="undefined");
var _7ea={};
_7ea[this._storeRefPropName]=this;
_7ea[this._itemNumPropName]=this._arrayOfAllItems.length;
if(this._itemsByIdentity){
this._itemsByIdentity[_7e8]=_7ea;
_7ea[_7e9]=[_7e8];
}
this._arrayOfAllItems.push(_7ea);
var _7eb=null;
if(_7e7&&_7e7.parent&&_7e7.attribute){
_7eb={item:_7e7.parent,attribute:_7e7.attribute,oldValue:undefined};
var _7ec=this.getValues(_7e7.parent,_7e7.attribute);
if(_7ec&&_7ec.length>0){
var _7ed=_7ec.slice(0,_7ec.length);
if(_7ec.length===1){
_7eb.oldValue=_7ec[0];
}else{
_7eb.oldValue=_7ec.slice(0,_7ec.length);
}
_7ed.push(_7ea);
this._setValueOrValues(_7e7.parent,_7e7.attribute,_7ed,false);
_7eb.newValue=this.getValues(_7e7.parent,_7e7.attribute);
}else{
this._setValueOrValues(_7e7.parent,_7e7.attribute,_7ea,false);
_7eb.newValue=_7ea;
}
}else{
_7ea[this._rootItemPropName]=true;
this._arrayOfTopLevelItems.push(_7ea);
}
this._pending._newItems[_7e8]=_7ea;
for(var key in _7e6){
if(key===this._storeRefPropName||key===this._itemNumPropName){
throw new Error("encountered bug in ItemFileWriteStore.newItem");
}
var _7ef=_7e6[key];
if(!dojo.isArray(_7ef)){
_7ef=[_7ef];
}
_7ea[key]=_7ef;
if(this.referenceIntegrity){
for(var i=0;i<_7ef.length;i++){
var val=_7ef[i];
if(this.isItem(val)){
this._addReferenceToMap(val,_7ea,key);
}
}
}
}
this.onNew(_7ea,_7eb);
return _7ea;
},_removeArrayElement:function(_7f2,_7f3){
var _7f4=dojo.indexOf(_7f2,_7f3);
if(_7f4!=-1){
_7f2.splice(_7f4,1);
return true;
}
return false;
},deleteItem:function(item){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
var _7f6=item[this._itemNumPropName];
var _7f7=this.getIdentity(item);
if(this.referenceIntegrity){
var _7f8=this.getAttributes(item);
if(item[this._reverseRefMap]){
item["backup_"+this._reverseRefMap]=dojo.clone(item[this._reverseRefMap]);
}
dojo.forEach(_7f8,function(_7f9){
dojo.forEach(this.getValues(item,_7f9),function(_7fa){
if(this.isItem(_7fa)){
if(!item["backupRefs_"+this._reverseRefMap]){
item["backupRefs_"+this._reverseRefMap]=[];
}
item["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(_7fa),attr:_7f9});
this._removeReferenceFromMap(_7fa,item,_7f9);
}
},this);
},this);
var _7fb=item[this._reverseRefMap];
if(_7fb){
for(var _7fc in _7fb){
var _7fd=null;
if(this._itemsByIdentity){
_7fd=this._itemsByIdentity[_7fc];
}else{
_7fd=this._arrayOfAllItems[_7fc];
}
if(_7fd){
for(var _7fe in _7fb[_7fc]){
var _7ff=this.getValues(_7fd,_7fe)||[];
var _800=dojo.filter(_7ff,function(_801){
return !(this.isItem(_801)&&this.getIdentity(_801)==_7f7);
},this);
this._removeReferenceFromMap(item,_7fd,_7fe);
if(_800.length<_7ff.length){
this.setValues(_7fd,_7fe,_800);
}
}
}
}
}
}
this._arrayOfAllItems[_7f6]=null;
item[this._storeRefPropName]=null;
if(this._itemsByIdentity){
delete this._itemsByIdentity[_7f7];
}
this._pending._deletedItems[_7f7]=item;
if(item[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,item);
}
this.onDelete(item);
return true;
},setValue:function(item,_803,_804){
return this._setValueOrValues(item,_803,_804,true);
},setValues:function(item,_806,_807){
return this._setValueOrValues(item,_806,_807,true);
},unsetAttribute:function(item,_809){
return this._setValueOrValues(item,_809,[],true);
},_setValueOrValues:function(item,_80b,_80c,_80d){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
this._assert(dojo.isString(_80b));
this._assert(typeof _80c!=="undefined");
var _80e=this._getIdentifierAttribute();
if(_80b==_80e){
throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
}
var _80f=this._getValueOrValues(item,_80b);
var _810=this.getIdentity(item);
if(!this._pending._modifiedItems[_810]){
var _811={};
for(var key in item){
if((key===this._storeRefPropName)||(key===this._itemNumPropName)||(key===this._rootItemPropName)){
_811[key]=item[key];
}else{
if(key===this._reverseRefMap){
_811[key]=dojo.clone(item[key]);
}else{
_811[key]=item[key].slice(0,item[key].length);
}
}
}
this._pending._modifiedItems[_810]=_811;
}
var _813=false;
if(dojo.isArray(_80c)&&_80c.length===0){
_813=delete item[_80b];
_80c=undefined;
if(this.referenceIntegrity&&_80f){
var _814=_80f;
if(!dojo.isArray(_814)){
_814=[_814];
}
for(var i=0;i<_814.length;i++){
var _816=_814[i];
if(this.isItem(_816)){
this._removeReferenceFromMap(_816,item,_80b);
}
}
}
}else{
var _817;
if(dojo.isArray(_80c)){
var _818=_80c;
_817=_80c.slice(0,_80c.length);
}else{
_817=[_80c];
}
if(this.referenceIntegrity){
if(_80f){
var _814=_80f;
if(!dojo.isArray(_814)){
_814=[_814];
}
var map={};
dojo.forEach(_814,function(_81a){
if(this.isItem(_81a)){
var id=this.getIdentity(_81a);
map[id.toString()]=true;
}
},this);
dojo.forEach(_817,function(_81c){
if(this.isItem(_81c)){
var id=this.getIdentity(_81c);
if(map[id.toString()]){
delete map[id.toString()];
}else{
this._addReferenceToMap(_81c,item,_80b);
}
}
},this);
for(var rId in map){
var _81f;
if(this._itemsByIdentity){
_81f=this._itemsByIdentity[rId];
}else{
_81f=this._arrayOfAllItems[rId];
}
this._removeReferenceFromMap(_81f,item,_80b);
}
}else{
for(var i=0;i<_817.length;i++){
var _816=_817[i];
if(this.isItem(_816)){
this._addReferenceToMap(_816,item,_80b);
}
}
}
}
item[_80b]=_817;
_813=true;
}
if(_80d){
this.onSet(item,_80b,_80f,_80c);
}
return _813;
},_addReferenceToMap:function(_820,_821,_822){
var _823=this.getIdentity(_821);
var _824=_820[this._reverseRefMap];
if(!_824){
_824=_820[this._reverseRefMap]={};
}
var _825=_824[_823];
if(!_825){
_825=_824[_823]={};
}
_825[_822]=true;
},_removeReferenceFromMap:function(_826,_827,_828){
var _829=this.getIdentity(_827);
var _82a=_826[this._reverseRefMap];
var _82b;
if(_82a){
for(_82b in _82a){
if(_82b==_829){
delete _82a[_82b][_828];
if(this._isEmpty(_82a[_82b])){
delete _82a[_82b];
}
}
}
if(this._isEmpty(_82a)){
delete _826[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,_82f){
var _830=undefined;
if(this.hasAttribute(item,_82f)){
var _831=this.getValues(item,_82f);
if(_831.length==1){
_830=_831[0];
}else{
_830=_831;
}
}
return _830;
},_flatten:function(_832){
if(this.isItem(_832)){
var item=_832;
var _834=this.getIdentity(item);
var _835={_reference:_834};
return _835;
}else{
if(typeof _832==="object"){
for(var type in this._datatypeMap){
var _837=this._datatypeMap[type];
if(dojo.isObject(_837)&&!dojo.isFunction(_837)){
if(_832 instanceof _837.type){
if(!_837.serialize){
throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: ["+type+"]");
}
return {_type:type,_value:_837.serialize(_832)};
}
}else{
if(_832 instanceof _837){
return {_type:type,_value:_832.toString()};
}
}
}
}
return _832;
}
},_getNewFileContentString:function(){
var _838={};
var _839=this._getIdentifierAttribute();
if(_839!==Number){
_838.identifier=_839;
}
if(this._labelAttr){
_838.label=this._labelAttr;
}
_838.items=[];
for(var i=0;i<this._arrayOfAllItems.length;++i){
var item=this._arrayOfAllItems[i];
if(item!==null){
var _83c={};
for(var key in item){
if(key!==this._storeRefPropName&&key!==this._itemNumPropName){
var _83e=key;
var _83f=this.getValues(item,_83e);
if(_83f.length==1){
_83c[_83e]=this._flatten(_83f[0]);
}else{
var _840=[];
for(var j=0;j<_83f.length;++j){
_840.push(this._flatten(_83f[j]));
_83c[_83e]=_840;
}
}
}
}
_838.items.push(_83c);
}
}
var _842=true;
return dojo.toJson(_838,_842);
},_isEmpty:function(_843){
var _844=true;
if(dojo.isObject(_843)){
var i;
for(i in _843){
_844=false;
break;
}
}else{
if(dojo.isArray(_843)){
if(_843.length>0){
_844=false;
}
}
}
return _844;
},save:function(_846){
this._assert(!this._saveInProgress);
this._saveInProgress=true;
var self=this;
var _848=function(){
self._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
self._saveInProgress=false;
if(_846&&_846.onComplete){
var _849=_846.scope||dojo.global;
_846.onComplete.call(_849);
}
};
var _84a=function(){
self._saveInProgress=false;
if(_846&&_846.onError){
var _84b=_846.scope||dojo.global;
_846.onError.call(_84b);
}
};
if(this._saveEverything){
var _84c=this._getNewFileContentString();
this._saveEverything(_848,_84a,_84c);
}
if(this._saveCustom){
this._saveCustom(_848,_84a);
}
if(!this._saveEverything&&!this._saveCustom){
_848();
}
},revert:function(){
this._assert(!this._saveInProgress);
var _84d;
for(_84d in this._pending._newItems){
var _84e=this._pending._newItems[_84d];
_84e[this._storeRefPropName]=null;
this._arrayOfAllItems[_84e[this._itemNumPropName]]=null;
if(_84e[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,_84e);
}
if(this._itemsByIdentity){
delete this._itemsByIdentity[_84d];
}
}
for(_84d in this._pending._modifiedItems){
var _84f=this._pending._modifiedItems[_84d];
var _850=null;
if(this._itemsByIdentity){
_850=this._itemsByIdentity[_84d];
}else{
_850=this._arrayOfAllItems[_84d];
}
_84f[this._storeRefPropName]=this;
_850[this._storeRefPropName]=null;
var _851=_850[this._itemNumPropName];
this._arrayOfAllItems[_851]=_84f;
if(_850[this._rootItemPropName]){
var i;
for(i=0;i<this._arrayOfTopLevelItems.length;i++){
var _853=this._arrayOfTopLevelItems[i];
if(this.getIdentity(_853)==_84d){
this._arrayOfTopLevelItems[i]=_84f;
break;
}
}
}
if(this._itemsByIdentity){
this._itemsByIdentity[_84d]=_84f;
}
}
var _854;
for(_84d in this._pending._deletedItems){
_854=this._pending._deletedItems[_84d];
_854[this._storeRefPropName]=this;
var _855=_854[this._itemNumPropName];
if(_854["backup_"+this._reverseRefMap]){
_854[this._reverseRefMap]=_854["backup_"+this._reverseRefMap];
delete _854["backup_"+this._reverseRefMap];
}
this._arrayOfAllItems[_855]=_854;
if(this._itemsByIdentity){
this._itemsByIdentity[_84d]=_854;
}
if(_854[this._rootItemPropName]){
this._arrayOfTopLevelItems.push(_854);
}
}
for(_84d in this._pending._deletedItems){
_854=this._pending._deletedItems[_84d];
if(_854["backupRefs_"+this._reverseRefMap]){
dojo.forEach(_854["backupRefs_"+this._reverseRefMap],function(_856){
var _857;
if(this._itemsByIdentity){
_857=this._itemsByIdentity[_856.id];
}else{
_857=this._arrayOfAllItems[_856.id];
}
this._addReferenceToMap(_857,_854,_856.attr);
},this);
delete _854["backupRefs_"+this._reverseRefMap];
}
}
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
return true;
},isDirty:function(item){
if(item){
var _859=this.getIdentity(item);
return new Boolean(this._pending._newItems[_859]||this._pending._modifiedItems[_859]||this._pending._deletedItems[_859]);
}else{
if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)){
return true;
}
return false;
}
},onSet:function(item,_85b,_85c,_85d){
},onNew:function(_85e,_85f){
},onDelete:function(_860){
}});
}
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(_861){
var menu=this.dropDown;
if(!_861.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _863=dojo.hitch(this,"setAttribute","value",_861);
var mi=new dijit.MenuItem({id:this.id+"_item_"+_861.value,label:_861.label,onClick:_863});
menu.addChild(mi);
}
},_resetButtonState:function(){
var len=this.options.length;
var _866=this.dropDown;
dojo.forEach(_866.getChildren(),function(_867){
_867.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 _869=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_86a){
dojo[_86a.id===_869?"addClass":"removeClass"](_86a.domNode,this.baseClass+"SelectedOption");
},this);
}
},addOption:function(_86b,_86c){
this.options.push(_86b.value?_86b:{value:_86b,label:_86c});
},removeOption:function(_86d){
this.options=dojo.filter(this.options,function(node,idx){
return !((typeof _86d==="number"&&idx===_86d)||(typeof _86d==="string"&&node.value===_86d)||(_86d.value&&node.value===_86d.value));
});
},setOptionLabel:function(_870,_871){
dojo.forEach(this.options,function(node){
if(node.value===_870){
node.label=_871;
}
});
},destroy:function(){
if(this._labelHackHandle){
clearTimeout(this._labelHackHandle);
}
this.inherited(arguments);
},setLabel:function(_873){
_873="<div class=\" "+this.baseClass+"Label\">"+_873+"</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,_873);
}),0);
}else{
this.inherited(arguments);
}
},setAttribute:function(attr,_875){
if(attr==="value"){
if(typeof _875==="string"){
_875=dojo.filter(this.options,function(node){
return node.value===_875;
})[0];
}
if(!_875){
_875=this.options[0]||{value:"",label:""};
}
this.value=_875.value;
if(this._started){
this.setLabel(_875.label||this.emptyLabel||"&nbsp;");
}
this._handleOnChange(_875.value);
_875=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(_87b){
var _87c=this.dropDown;
dojo.forEach(this.options,this._addMenuItem,this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
this._isPopulated=true;
if(_87b){
_87b.call(this);
}
},_toggleDropDown:function(){
var _87d=this.dropDown;
if(_87d&&!_87d.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 _87f=dojo.byId(this.dropDown.id);
_87f.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 _881=this.width;
var _882=dojo.byId(this.id+"_select_container");
var _883=_882.childNodes.length;
for(var i=0;i<_883;i++){
var node=_882.childNodes[i];
if(dojo.hasClass(node,"field_left")||dojo.hasClass(node,"select_right")){
_881-=node.offsetWidth;
}
}
dojo.byId(this.id+"_label").style.width=_881+"px";
},passValueToHidden:function(){
var _885=dojo.byId(this.hiddenFieldId);
if(_885&&this.value&&(this.value!=="")){
_885.value=this.value;
}
},passValueFromHidden:function(){
var _886=dojo.byId(this.hiddenFieldId);
if(_886){
if(_886.value!==""&&_886.value!==null){
this.setAttribute("value",_886.value);
}
}
},_fillContent:function(){
var opts=this.options;
var _888={};
var _889={};
var idx=0;
var val="";
var _88c="";
var akey="";
if(!opts){
opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){
val=node.getAttribute("value");
_88c=String(node.innerHTML);
if(node.getAttribute("type")==="separator"||val.length==0||_88c.length==0){
val="";
if(_88c.length>0&&idx==0){
this.emptyLabel=_88c;
}
}else{
akey=_88c.substring(0,1).toLowerCase();
if(typeof (_888[akey])==="undefined"){
_888[akey]=idx;
}
_889[val]=idx;
}
idx++;
return {value:val,label:_88c};
},this):[];
}
this.anchors=_888;
this.indices=_889;
if(opts.length&&!this.value){
var si=this.srcNodeRef.selectedIndex;
this.value=opts[si!=-1?si:0].value;
this._selectedIdx=si;
}
var _890=dojo.hitch(this,"_onMenuKey");
this.dropDown=new dijit.Menu({id:this.id+"_menu",templateString:null,templatePath:this.templatePathMenu,_onKeyPress:_890});
this.dropDown.menuOnClose=this.dropDown.onClose;
var _891=dojo.hitch(this,"_onMenuClose");
this.dropDown.onClose=function(e){
this.menuOnClose(e);
_891(e);
};
},updateIndices:function(){
var opts=this.options;
var _894={};
var _895={};
var akey="";
dojo.forEach(opts,function(opt,idx){
akey=opt.label.substring(0,1).toLowerCase();
if(typeof (_894[akey])==="undefined"){
_894[akey]=idx;
}
_895[val]=idx;
});
this.anchors=_894;
this.indices=_895;
},_resetButtonState:function(){
var len=this.options.length;
var _89a=this.dropDown;
dojo.forEach(_89a.getChildren(),function(_89b){
_89b.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 _89d=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_89e){
dojo[_89e.id===_89d?"addClass":"removeClass"](_89e.domNode,this.baseClass+"SelectedOption");
},this);
}
},_populate:function(_89f){
var _8a0=this.dropDown;
dojo.forEach(this.options,function(_8a1,idx){
this._addMenuItem(_8a1,idx);
},this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
if(dojo.isIE==6){
var _8a3=dojo.byId(this.dropDown.id+"_container");
var _8a4=dojo.coords(_8a3);
if(_8a4.h>this.maxHeightIE){
_8a3.style.height=this.maxHeightIE+"px";
}
}
this._isPopulated=true;
if(_89f){
_89f.call(this);
}
},_addMenuItem:function(_8a5,idx){
var menu=this.dropDown;
if(!_8a5.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _8a8=dojo.hitch(this,"setAttribute","value",_8a5);
var _8a9=dojo.hitch(this,"_onMenuItemKey",idx);
var mi=new dijit.MenuItem({id:this.id+"_item_"+idx,label:_8a5.label,onClick:_8a8,templateString:null,templatePath:this.templatePathMenuItem,_onKeyPress:_8a9});
menu.addChild(mi);
this._menuItems[idx]=mi.id;
}
},_onDropDownClick:function(e){
var _8ac=true;
if(dojo.isIE>=7&&e.type!=="mousedown"){
_8ac=false;
}
if(_8ac){
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 _8b0=this._getAnchor(e);
if(_8b0>=0){
var item=dijit.byId(this._menuItems[_8b0]);
this.dropDown.focusChild(item);
}
},_onMenuItemKey:function(idx,e){
if(!e||typeof (e)==="undefined"){
return;
}
var _8b4;
switch(e.keyCode){
case dojo.keys.DOWN_ARROW:
_8b4=this._getNextFocusableIdx(idx,1);
this.setSelected(_8b4);
break;
case dojo.keys.UP_ARROW:
_8b4=this._getNextFocusableIdx(idx,-1);
this.setSelected(_8b4);
break;
}
},_getNextFocusableIdx:function(idx,_8b6,_8b7){
var _8b8;
var _8b9=idx+_8b6;
var _8ba=(this.options.length-1);
var _8bb=10;
var _8b7=(_8b7?_8b7:0);
if(_8b7>=_8bb){
return 0;
}
_8b7++;
if(_8b9>_8ba&&_8b6==1){
_8b9=0;
}else{
if(_8b9<0&&_8b6==-1){
_8b9=_8ba;
}
}
if(this.options[_8b9].value){
_8b8=_8b9;
}else{
_8b8=this._getNextFocusableIdx(_8b9,_8b6,_8b7);
}
return _8b8;
},_getAnchor:function(e){
var _8bd=this.anchors[e.keyChar];
if(_8bd>=0&&this.options[_8bd]){
if(this._started){
this.setSelected(_8bd);
}
return _8bd;
}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 _8c1=dojo.byId(this.hiddenFieldId);
_8c1.value="";
}
}});
}
if(!dojo._hasResource["generic.img"]){
dojo._hasResource["generic.img"]=true;
dojo.provide("generic.img");
dojo.declare("generic.img",null,{constructor:function(_8c2,_8c3){
this.node=_8c2;
this.preloaded={};
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=(_8c3?_8c3:["off","on"]);
this.preload();
},preload:function(){
if(!this.states){
return;
}
for(var i=0;i<this.states.length;i++){
var _8c7=this.states[i];
var _8c8=(_8c7!==""?"_":"");
var _8c9=this.srcBase+_8c8+_8c7+"."+this.srcExt;
var pl=new Image();
pl.src=_8c9;
this.preloaded[_8c7]=pl;
}
},changeSrc:function(_8cb){
var p=this.preloaded[_8cb];
if(!this.srcBase){
return;
}
if(p){
this.node.src=p.src;
}else{
this.node.src=this.srcBase+"_"+_8cb+"."+this.srcExt;
}
}});
dojo.provide("generic.rollover");
dojo.declare("generic.rollover",null,{constructor:function(_8cd,_8ce){
var _8cf=(_8ce==null?_8cd:_8cf);
this.img=new generic.img(_8cd,["off","on"]);
this.handlers=[dojo.connect(_8cf,"onmouseover",this,"onMouseOver"),dojo.connect(_8cf,"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 _8d2=/(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;
}
var _8d3=/(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;
function adjustCssPaths(_8d4,_8d5){
if(!_8d5||!_8d4){
return;
}
if(_8d2){
_8d5=_8d5.replace(_8d2,function(_8d6,pre,_8d8,url,post){
return pre+(new dojo._Url(_8d4,"./"+url).toString())+post;
});
}
return _8d5.replace(_8d3,function(_8db,_8dc,_8dd,_8de,_8df,_8e0){
if(_8dd){
return "@import \""+(new dojo._Url(_8d4,"./"+_8dd).toString())+"\""+_8e0;
}else{
return "url("+(new dojo._Url(_8d4,"./"+_8df).toString())+")"+_8e0;
}
});
};
var _8e1=/(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;
function adjustHtmlPaths(_8e2,cont){
var url=_8e2||"./";
return cont.replace(_8e1,function(tag,_8e6,name,_8e8,_8e9,_8ea,_8eb,end){
return _8e6+(name?(name+"="+_8e8+(new dojo._Url(url,_8e9).toString())+_8e8):("style="+_8ea+adjustCssPaths(url,_8eb)+_8ea))+end;
});
};
function secureForInnerHtml(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
function snarfStyles(_8ee,cont,_8f0){
_8f0.attributes=[];
return cont.replace(/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,function(_8f1,_8f2,_8f3,_8f4,_8f5,href){
var i,attr=(_8f2||_8f4||"").replace(/^\s*([\s\S]*?)\s*$/i,"$1");
if(_8f3){
i=_8f0.push(_8ee?adjustCssPaths(_8ee,_8f3):_8f3);
}else{
i=_8f0.push("@import \""+href+"\";");
attr=attr.replace(/\s*(?:rel|href)=(['"])?[^\s]*\1\s*/gi,"");
}
if(attr){
attr=attr.split(/\s+/);
var _8f9={},tmp;
for(var j=0,e=attr.length;j<e;j++){
tmp=attr[j].split("=");
_8f9[tmp[0]]=tmp[1].replace(/^\s*['"]?([\s\S]*?)['"]?\s*$/,"$1");
}
_8f0.attributes[i-1]=_8f9;
}
return "";
});
};
function snarfScripts(cont,_8fe){
_8fe.code="";
function download(src){
if(_8fe.downloadRemote){
dojo.xhrGet({url:src,sync:true,load:function(code){
_8fe.code+=code+";";
},error:_8fe.errBack});
}
};
return cont.replace(/<script\s*(?![^>]*type=['"]?dojo)(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,function(_901,_902,src,code){
if(src){
download(src);
}else{
_8fe.code+=code;
}
return "";
});
};
function evalInGlobal(code,_906){
_906=_906||dojo.doc.body;
var n=_906.ownerDocument.createElement("script");
n.type="text/javascript";
_906.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 _90a=this._setUpDeferreds();
}
dijit.layout.ContentPane.prototype.setContent.apply(this,arguments);
return _90a;
},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,_90c=function(){
_t.cancel();
};
var _90d=(_t.onLoadDeferred=new dojo.Deferred());
var _90e=(_t._nextUnloadDeferred=new dojo.Deferred());
return {cancel:_90c,addOnLoad:function(func){
_90d.addCallback(func);
},addOnUnload:function(func){
_90e.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(_913){
var _914=this._setUpDeferreds();
dijit.layout.ContentPane.prototype._prepareLoad.apply(this,arguments);
return _914;
},_setContent:function(cont){
var _916=[];
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,_916);
}
if(this.executeScripts){
var _t=this,code,_919={downloadRemote:true,errBack:function(e){
_t._onError.call(_t,"Exec","Error downloading remote script in \""+_t.id+"\"",e);
}};
cont=snarfScripts(cont,_919);
code=_919.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&&_916&&_916.length){
this._renderStyles(_916);
}
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(_91f){
this._styleNodes=[];
var st,att,_922,doc=this.domNode.ownerDocument;
var head=doc.getElementsByTagName("head")[0];
for(var i=0,e=_91f.length;i<e;i++){
_922=_91f[i];
att=_91f.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=_922;
}else{
st.appendChild(doc.createTextNode(_922));
}
}
}});
})();
}
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(_92b){
var s=this.domNode.style;
s.top="-5000px";
},show:function(_92d){
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 _930=dojo.coords(this.locusNode);
pos.top+=_930.y;
pos.left+=_930.x;
if(this.parentNode||this.parentNode!=null){
var _931=dojo.coords(this.parentNode);
pos.top-=_931.y;
pos.left-=_931.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 _936=(this._startZ*10);
if(nz<_936||!nz||nz===""){
s.zIndex=_936;
}
this.modalMaskNode.style.zIndex=(s.zIndex-1);
this._modalMask.startup(this.preloadMode);
},bringToTop:function(){
var _937=dojo.filter(this._allFPs,function(i){
return i!==this;
},this);
_937.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_937.push(this);
dojo.forEach(_937,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 _93e,_93f;
if(window.innerHeight&&window.scrollMaxY){
_93e=document.body.scrollWidth;
_93f=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_93e=document.body.scrollWidth;
_93f=document.body.scrollHeight;
}else{
_93e=document.body.offsetWidth;
_93f=document.body.offsetHeight;
}
}
var _940,_941;
if(self.innerHeight){
_940=self.innerWidth;
_941=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_940=document.documentElement.clientWidth;
_941=document.documentElement.clientHeight;
}else{
if(document.body){
_940=document.body.clientWidth;
_941=document.body.clientHeight;
}
}
}
if(_93f<_941){
pageHeight=_941;
}else{
pageHeight=_93f;
}
if(_93e<_940){
pageWidth=_940;
}else{
pageWidth=_93e;
}
arrayPageSize=new Array(pageWidth,pageHeight,_940,_941);
return arrayPageSize;
},getPageScroll:function(){
var _942;
if(self.pageYOffset){
_942=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
_942=document.documentElement.scrollTop;
}else{
if(document.body){
_942=document.body.scrollTop;
}
}
}
arrayPageScroll=new Array("",_942);
return arrayPageScroll;
},startup:function(_943){
var s=this.domNode.style;
var _945=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=(_945[1]+"px");
if(!_943){
s_ie.display="block";
}
}
s.height=(_945[1]+"px");
if(!_943){
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 _947="<iframe id=\""+this.id+"_iframe\" name=\""+this.id+"_iframe\" allowTransparency=\"true\" src=\""+this.iframeHref+"\" frameborder=0></iframe>";
this.setContent(_947);
},postCreate:function(){
this.inherited(arguments);
},hide:function(_948){
var _949=frames[this.id+"_iframe"];
if(this.reloadIFrame){
_949.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 _94c=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(_94c,{width:"100%",height:h});
dojo.addClass(dojo.byId(_94c),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 _953=dojo.byId(args.target);
var menu=dojo.byId(this.menuId);
if(menu&&_953){
this.handlers=[dojo.connect(_953,"onmouseover",this,"show"),dojo.connect(_953,"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 _963=((h+document.documentElement.clientHeight)-(this.node.offsetHeight+this.fromBottom));
if(this.currentY!=_963){
var _964=_963;
if(this.hasMinTop&&(_964<=this.minTop)){
_964=this.minTop;
}
this.currentY=_964;
this.s.top=(_964+"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(_965,args,cb,eb){
var self=this;
var _96a=new generic.jsonrpc();
var d=_96a.callRemote(_965,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 _973=[];
var self=this;
var _975=(args.type?args.type:"sku");
if(_975==="giftcard"){
var _976;
if(_975==="giftcard"){
_976="giftcard_id";
}
dojo.forEach(args.skus,function(item,idx){
_973[idx]={action:args.action,cart:args.cart,type:_975};
_973[idx][_976]=item;
});
}else{
dojo.forEach(args.skus,function(item,idx){
_973[idx]={action:args.action,cart:args.cart,type:_975,path:item};
if(args.action==="qty"&&args.qtys){
_973[idx].qty=args.qtys[item];
}
});
}
var _97b=[{"actions":_973}];
var _97c=function(_97d){
args.callback(_97d);
var _97e=window.parent||window;
_97e.dojo.publish("/page/cart/alterCart",[{action:args.action,cartType:args.cart,resp:_97d}]);
};
var _97f=function(err){
args.errback(err);
var _981=window.parent||window;
_981.dojo.publish("/page/cart/alterCart",[{action:args.action,cartType:args.cart,resp:err}]);
};
this.callRemote("Cart.alterCart",_97b,_97c,_97f);
},alterCartActOnList:function(args){
if(!args.action||!args.cart){
return;
}
var _983=[];
var self=this;
var _985=(args.type?args.type:"sku");
dojo.forEach(args.skus,function(sku,idx){
_983[idx]={path:sku};
});
var _988=[{"defaults":{"action":args.action,"cart":args.cart,"type":_985},"actions":_983}];
var _989=function(_98a){
args.callback(_98a);
var _98b=window.parent||window;
_98b.dojo.publish("/page/cart/alterCart",[{resp:_98a}]);
};
var _98c=function(err){
args.errback(err);
var _98e=window.parent||window;
_98e.dojo.publish("/page/cart/alterCart",[{resp:err}]);
};
this.callRemote("Cart.alterCartActOnList",_988,_989,_98c);
},getContents:function(_98f){
var self=this;
var _991=[{"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 _992=function(_993){
_98f(_993);
};
var _994=_992;
this.callRemote("Cart.contents",_991,_992,_994);
},getItemCount:function(type){
var t=(type==="favorites"?type:"order");
var _997=0;
var _998="cart."+t+".tqty";
var str="";
var num="";
var _99b=dojo.cookie("page_data");
try{
str=_99b.split(_998)[1];
num=str.split("&")[1];
if(parseInt(num)){
_997=num;
}
}
catch(err){
}
return _997;
}});
}
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 _99c=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 _99d=new site.productButton({node:dojo.byId("discontinued-prod-"+this.path+"-"+this.time),callback:function(){
_99c.show();
}});
}});
}
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(_99e){
dojo.place(_99e.domNode,this.containerNode,"last");
this.productPrices+=(this.productPrices=="")?_99e.price:" + "+_99e.price;
},addPrices:function(){
this.priceNode.innerHTML=this.productPrices;
if(dojo.isSafari){
dojo.style(this.priceNode,{textAlign:"left"});
}
},initButton:function(skus){
var _9a0=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 _9a1=new site.productButton({node:dojo.byId("mixable-prod-"+this.path+"-"+this.time),skus:skus,method:"alterCartActOnList",callback:function(){
_9a0.show();
}});
}});
}
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.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 _9a3=(args.method?args.method:"alterCart");
if(args.node&&this[_9a3]){
dojo.connect(args.node,"click",this,_9a3);
}
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 _9a7=function(resp){
self.callback(resp);
self._enabled=true;
if(self.progress){
self.progress.clear();
}
};
var _9a9=function(err){
console.log("error1 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],type:this.type,callback:_9a7,errback:_9a9});
}
},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 _9ac=function(resp){
self.callback(resp);
self._enabled=true;
if(self.progress){
self.progress.clear();
}
};
var _9ae=function(err){
self.errback(err);
console.log("error2 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:_9ac,errback:_9ae});
},callback:function(){
},errback:function(){
}});
}
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 _9b1=this.product.product_id+"_"+this.productType;
for(var i=0;i<sku.color.length;i++){
var id="swatch_"+_9b1+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 _9b7=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_"+_9b7+i.toString();
var name=(sku.shade_name[i]?sku.shade_name[i]:"");
var hex=sku.color[i].toString();
var _9bd=new site.layout._Swatch({id:cid,sku:sku,hex:hex,name:name,containerId:this.id});
this.loadSwatch(_9bd);
}
}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 _9bd=new site.layout._Swatch({id:cid,sku:sku,hex:hex,name:sku.shade_name,containerId:this.id,idx:idx});
this._loaded[i]=_9bd;
}
this.processData(this._dataMethod,this._dataParam);
}
if(this.initDefault){
this.isActive=true;
}
},setSwatch:function(_9bf,_9c0){
if(!_9bf||this.selectedChildWidget==_9bf){
this.onSelectCallback(_9bf);
return;
}
var sku=_9bf.sku;
if(this.smooshNode){
this._swatchDance({childid:_9bf.id,name:_9bf.name,sku:_9bf.sku,hex:_9bf.asHex[0]});
}
this._updateSelected(_9bf,this.selectedChildWidget);
this.selectedChildWidget=_9bf;
if(!this.isSingleSku){
this.skuField.value=_9bf.sku.path;
}
this.onSelectCallback(_9bf);
this._swatchSelected=true;
if(this.isDiscontinued){
this._setDiscontinued(sku);
}
if(_9c0!=="load"){
var cat=sku.path.match("CAT[0-9]*");
var prod=sku.path.match("PROD([0-9]*)");
var _9c4=dojo.global.page_data.catalog;
if(typeof (_9c4)!=="undefined"){
if(typeof (_9c4.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);
}
if(typeof (dojo.global.page_data.reorder)!=="undefined"){
cmCreateProductviewTag(prod[1],this.product.name,cat);
}
}
},onSelectCallback:function(_9c5){
},_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 _9c9=(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=_9c9;
productDisplay.sppInventoryStatus({sku:sku,shaded:true});
},processData:function(_9ca,_9cb){
if((this._dataMethod===_9ca&&this._dataParam===_9cb)&&this._started){
return;
}
this._dataMethod=_9ca;
this._dataParam=_9cb;
var set;
if(_9ca==="sort"){
if(_9cb==="status"){
var _9cd=this.sorters[_9cb];
for(var i=1;i<=4;i++){
var sub=_9cd[i.toString()];
if(!set){
set=sub;
}else{
set.concat(sub);
}
}
}else{
set=this.sorters[_9cb];
}
}else{
if(_9cb==="all"){
this._dataMethod="sort";
set=this.sorters[this.sortType];
}else{
var _9d0=this.filters;
if(_9d0[_9cb]){
set=_9d0[_9cb];
}
}
}
this._activeSet=set;
this._updateSet();
},_updateSet:function(){
var _9d1=this.getChildren();
if(_9d1&&this._initialized>0){
for(var i=0;i<_9d1.length;i++){
var _9d3=_9d1[i];
this.removeChild(_9d3);
}
}
this._initialized++;
var ids=this._activeSet;
if(ids){
for(var i=0;i<ids.length;i++){
var idx=ids[i];
var _9d6=this._loaded[idx];
this.loadSwatch(_9d6);
}
}
},loadSwatch:function(_9d7){
this.addChild(_9d7);
if(!this.selectedChildWidget&&this.initDefault){
if(this.selectedSkuPath){
if(this.selectedSkuPath==_9d7.sku.path){
this.setSwatch(_9d7,"load");
}
}else{
this.setSwatch(_9d7,"load");
}
}
},_updateSelected:function(_9d8,_9d9){
if(_9d9){
_9d9.selected=false;
_9d9.toggleSelectedState(false);
}
_9d8.selected=true;
_9d8.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 _9dc=dojo.global.page_data.sku_replacements;
var _9dd=dojo.byId("discontinued_xs_container");
_9dd.innerHTML="";
if(_9dc[path].replacements.length==0||_9dc[path].replacements[0].length==0){
_9dd.style.display="none";
dojo.style(dojo.byId("artist_recommendations"),{display:"none"});
}else{
_9dd.style.display="block";
dojo.style(dojo.byId("artist_recommendations"),{display:"block"});
dojo.forEach(_9dc[path].replacements,function(_9de){
var time=(new Date()).getTime();
if(_9de.length==1){
var sku=_9de[0];
var _9e1=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});
_9dd.appendChild(_9e1.domNode);
_9e1.initButton();
}else{
var _9e2=new site.layout.MixableReplacements({path:path,time:time});
var skus=[];
dojo.forEach([_9de[0],_9de[1]],function(_9e4){
var _9e5=new site.layout.MixableProduct({product_name:_9e4.product_name,category_id:_9e4.category_id,product_id:_9e4.product_id,path:_9e4.path,shade_name:_9e4.shade_name,description:_9e4.description,price:_9e4.price,thumb:_9e4.thumb,hex:_9e4.hex,header:_9e4.header});
_9e2.addItem(_9e5);
skus.push(_9e4.path);
});
_9dd.appendChild(_9e2.domNode);
_9e2.addPrices();
_9e2.initButton(skus);
}
});
}
}});
dojo.declare("site.layout.CartColorGrid",[dijit.layout.ContentPane,dijit._Templated,dijit._Container],{id:"",skus:[],product:"",components:[],shadedType:"solo",templateString:"<div class='co_thumb swatch_by_color destroy_onreload'></div>",postMixInProperties:function(){
this._loaded={};
this.components=this.product.obj.components;
dojo.extend(site.layout._Swatch,{_isDark:function(rgb){
return false;
},_onClick:function(){
return;
}});
},postCreate:function(){
var _9e7={containerId:this.id,type:this.shadedType};
var _9e8=this.product.item.cart_item_id+"_";
this.total=0;
for(var i=0;i<this.components.length;i++){
var sku=this.components[i];
_9e7.sku=sku.path;
_9e7.hex="#"+sku.hexValue;
_9e7.name=sku.shadename;
for(var j=0;j<sku.qty;j++){
this.total++;
var key=i.toString()+"_"+j.toString();
_9e7.id="swatch_"+_9e8+key;
if(dijit.byId(_9e7.id)){
console.log("dijit already exists");
_9e7.id=_9e7.id+"_reloaded";
}else{
}
var _9ed=new site.layout._Swatch(_9e7);
this._loaded[key]=_9ed;
this.addChild(_9ed);
}
}
},_fixit:function(){
if(!dojo.byId("fixit")){
var div=dojo.doc.createElement("div");
dojo.style(div,{display:"block",width:"10px",height:"10px"});
div.id="fixit";
dojo.byId("my_mac_panel").appendChild(div);
window.clearTimeout(this.fix);
}
},_refresh:function(e){
this.refresh(this.domNode);
}});
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 _9f0=[];
var hex=[];
var rgb=[];
var _9f3={};
var _9f4=new dojox.color.Color(this.hex);
_9f0.push(_9f4);
hex.push(_9f4.toHex());
rgb.push(_9f4.toRgb());
this.shade=_9f0;
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=_9f3;
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(_9f8){
if(_9f8){
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 _9fb=rgb[0]+rgb[1]+rgb[2];
return _9fb;
},_isBright:function(rgb){
if(!rgb){
return;
}
var _9fd=this._getBrightness(rgb)>450;
return _9fd;
},_isDark:function(rgb){
if(!rgb){
return;
}
var _9ff=this._getBrightness(rgb)<100;
return _9ff;
}});
}
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.kitObj=args.kitObj?args.kitObj:"";
this.itemType=(args.itemType?args.itemType:this.itemType);
var _a01=dojo.byId(args.buttonRemove);
var _a02=dojo.byId(this.selectQtyId);
if(_a01){
this.handlers.push([dojo.connect(_a01,"onclick",this,"_remove")]);
this.progress=new generic.progressOverlay({containerId:args.itemContainer,progressId:args.progressIndicator,offset:args.progressOffset});
}
if(_a02){
var _a03=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_a03){
var self=this;
_a03.onChange=function(){
self._updateQty();
};
}else{
this.handlers.push([dojo.connect(_a02,"onchange",this,"_updateQty")]);
}
}
if(this.kitObj){
this.gridNode=dojo.byId("co_thumb-"+this.skuPath);
this.gridNode.innerHTML="";
if(dijit.byId("co_thumb-"+this.skuPath)){
this.color_grid=dijit.byId("co_thumb-"+this.skuPath);
this.color_grid.domNode=this.gridNode;
this.color_grid.startup();
}else{
this.color_grid=new site.layout.CartColorGrid({product:this.kitObj},this.gridNode);
}
}
},_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 _a08=function(_a09){
controlWindow.dojo.publish("/checkout/cart/alterCart",[{actionType:"remove",callbackArgs:_a09}]);
};
var _a0a=function(err){
self.progress.clear();
self._removeIsEnabled=true;
};
cart.remove({skus:skus,callback:_a08,errback:_a0a,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 _a11=function(_a12){
controlWindow.dojo.publish("/checkout/cart/alterCart",[{actionType:"qty",callbackArgs:_a12}]);
};
var _a13=function(err){
self.progress.clear();
self._updateQtyIsEnabled=true;
};
cart.qty({skus:skus,qtys:qtys,callback:_a11,errback:_a13,cart:self.cartType});
}
},_getQty:function(){
var qty="";
var _a16=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_a16){
qty=_a16.value;
}else{
var _a17=dojo.byId(this.selectQtyId);
qty=_a17.options[_a17.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",initRpcHandler:function(_a18){
var self=this;
var send=function(){
if(_a18.labelHandler){
_a18.labelHandler.beforeSubmit();
}
var _a1b=new Object();
var val="";
dojo.forEach(_a18.fields,function(_a1d){
var node=dojo.byId(_a1d.id);
if(node){
switch(_a1d.inputType){
case "text":
val=node.value;
break;
case "radio":
if(!node.checked&&node.value&&node.value!==""){
val=node.value;
}
break;
default:
val=node.value;
}
}
_a1b[_a1d.reqKey]=val;
});
if(_a18.params[0].logic!==undefined){
_a18.params[0].logic[0].args=_a1b;
}else{
_a18.params[0]=_a1b;
}
self.submitValuesRpc(_a18);
};
var _a1f=dojo.byId(_a18.submitEvent.nodeId);
var _a20=_a18.submitEvent.eventName;
if(_a1f){
this.handlers.push([dojo.connect(_a1f,_a20,send)]);
}
},submitValuesRpc:function(args){
var _a22=new generic.jsonrpc();
var d=_a22.callRemote(args.method,args.params);
var _a24=(args.hasErrorChecking?args.hasErrorChecking:true);
if(args.progressArgs!==undefined){
var _a25=new generic.progress(args.progressArgs);
_a25.start();
}
this.toggleSubmitButton(false);
var self=this;
d.addCallback(function(_a27){
if(args.callback){
var _a28;
if(_a24){
_a28={progress:_a25,error:_a27.error,result:_a27.result};
}else{
_a28={progress:_a25};
}
args.callback(_a28);
}else{
_a25.clear();
self.toggleSubmitButton(true);
}
});
d.addErrback(function(err){
console.log("===errBack===");
});
},showErrors:function(_a2a,_a2b,_a2c){
var _a2d={};
var _a2e=false;
var _a2f=this.getAltContext();
var _a30=false;
if(_a2f&&_a2f.window){
try{
_a30=_a2f.window.pghandler;
}
catch(error){
}
}
if(_a2a.messages.length>0){
var _a31="<ul>";
var self=this;
var _a33={};
var _a34=dojo.byId("error_list");
var _a35=false;
var _a36=[];
var _a37=0;
_a2d.messages=[];
var _a38=(this.context==="cart"?"":"!&nbsp;");
dojo.forEach(_a2a.messages,function(_a39,_a3a){
_a35=false;
var _a3b=(_a39.display_locations.length>0?_a39.display_locations:[self.context]);
dojo.forEach(_a3b,function(_a3c,_a3d){
if(_a3c===self.context){
_a35=true;
}else{
if(_a3c===_a2f.id){
_a36.push(_a3a);
}
}
});
if(_a35){
_a37++;
_a31+="<li>"+_a38+_a39.text+"</li>";
if(_a39.severity==="MESSAGE"){
_a2e=true;
dojo.publish("/jsonrpc/error/message",[_a39]);
}
}
_a2d.messages[_a3a]={tag:_a39.tag,key:_a39.key};
});
_a31+="</ul>";
if(_a37>0){
this.toggleErrorContainer(true);
_a34.innerHTML=_a31;
}
if(!_a2b){
_a33.messages=[];
dojo.forEach(_a36,function(ix){
var er=_a2a.messages[ix];
_a33.messages.push(er);
});
if(_a30&&_a33.messages.length>0){
_a30.showErrors(_a33,this.context);
}
}
}else{
this.toggleErrorContainer(false);
if(!_a2b&&_a30){
_a30.toggleErrorContainer(false);
}
}
if(_a2e){
_a2d.blockingErrorFound=_a2e;
}else{
if(this.context==="content"){
this.toggleSubmitButton(true);
}else{
if(_a30){
_a30.toggleSubmitButton(true);
}
}
}
return _a2d;
},toggleErrorContainer:function(_a40){
var node=dojo.byId("error_container");
if(!node){
return false;
}
var s=node.style;
if(_a40){
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(_a47){
var _a48=dojo.query("."+_a47,this.formId);
var self=this;
var _a4a=(_a48.length>0?true:false);
dojo.forEach(_a48,function(_a4b){
if(_a4b.type==="text"||_a4b.type==="password"){
var val=_a4b.value;
var _a4d=_a4b.title;
self.fieldObjs[_a4b.id]=new site.form.FieldLabel({field:_a4b,label:_a4d});
}
});
return _a4a;
},_onSubmit:function(form){
var _a4f=this.fieldObjs;
for(var id in _a4f){
_a4f[id].beforeSubmit();
}
},onSubmitCallback:function(){
},resetLabels:function(){
var _a51=this.fieldObjs;
for(var id in _a51){
_a51[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 _a54=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;
}
_a54=this.fieldPswdDisplay;
}
var _a55=this.field.maxLength;
var _a56=this.label.length;
if((_a55>0)&&(_a55<_a56)){
this._maxlength={};
this._hasMaxlengthDisplay=true;
this._maxlength.data=_a55;
this._maxlength.display=_a56;
}
this.handlers=[dojo.connect(_a54,"onfocus",this,"_onFocus"),dojo.connect(this.field,"onblur",this,"_onBlur")];
this.setLabelState();
},setLabelState:function(){
this.checkHasValue();
if(!this.hasValue){
this.showLabel();
}
},checkHasValue:function(){
var val=this.field.value;
if((val.length>0)&&(val!==" ")&&(val!==this.label)){
this.hasValue=true;
}else{
this.hasValue=false;
}
},beforeSubmit:function(){
if(!this.hasValue){
this.checkHasValue();
if(!this.hasValue){
this.field.value="";
}
}
},_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 _a59=this.getParent();
if(this.hasLoaded){
if(_a59){
_a59.addChild(this.id);
}
this.startup();
}
},startup:function(){
var _a5a=dojo.byId(this.id+"_hd");
this.hdImg=new generic.img(_a5a,["off","on","sel"]);
},getParent:function(){
var _a5b=(dijit.byId(this.parentId));
var _a5c=(_a5b!=null?_a5b:this.inherited(arguments));
return _a5c;
},addSubItem:function(node){
dojo.place(node,this.containerNode,"last");
},onClick:function(){
var _a5e=this.getParent();
if(_a5e){
_a5e.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(_a5f){
if(this.activeSubItemId){
var item=dijit.byId(this.activeSubItemId);
item.close();
}
if(this.id!==_a5f){
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(_a61){
var _a62=this.getParent();
this.isOpen=_a61;
if(_a62){
if(_a61==true){
_a62.activeItemId=this.id;
}else{
if(_a62.activeItemId===this.id){
_a62.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.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 _a6e=function(){
clearTimeout(_a6f);
self.close();
};
var _a70=this.displayDuration;
var _a6f=setTimeout(_a6e,_a70);
}
},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(_a75){
var _a76;
var key;
if(_a75&&_a75.error){
_a76={};
var _a78=_a75.error.messages;
for(var i=0;i<_a78.length;i++){
if(_a78[i].text){
key=_a78[i].key;
_a76[key]=_a78[i];
}
}
}
return _a76;
}});
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:"",type:"",postCreate:function(){
this.inherited(arguments);
this.smooshNode=dojo.byId(this.smooshId);
var _a7a=dojo.byId(this.skuFieldId);
var self=this;
if(_a7a){
var _a7c=new site.productButton({node:_a7a,type:this.type,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(resp){
if(this.smooshNode){
this.smooshNode.style.backgroundColor=this.sku.color[0];
var _a80=this.sku.smoosh;
this.smooshNode.src=_a80.replace(/168x168/g,"56x56");
}
this.swatchTitleNode.innerHTML=this.sku.shade_name;
var _a81=this.sku.inventory_status;
if(_a81==2||_a81==3||_a81==7){
if(_a81==3||_a81==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.sku.inventory_status_message;
this.addToBagNode.style.display="";
this.containerNode.style.paddingBottom=0;
}
}else{
this.inventoryStatusNode.innerHTML="";
this.addToBagNode.style.display="";
this.containerNode.style.paddingBottom=0;
}
this.finishNameNode.innerHTML=(this.sku.finish?"("+this.sku.finish+")":"");
}});
dojo.declare("site.layout.CartAddFromFavorites",site.layout.CartAdd,{isRemovable:true,type:"",postCreate:function(){
this.inherited(arguments);
if(this.isRemovable){
var self=this;
var _a83=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>&nbsp;-&nbsp;<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:"was added to your shopping bag.",itemCountCopy:"items in bag",itemCountCopySingular:"item in bag",type:"order",postCreate:function(){
this.inherited(arguments);
this.cartHandler=new site.cart();
},setDisplayProperties:function(args){
dojo.mixin(this,args);
},_updateDisplay:function(resp){
var _a87=this.getErrors(resp);
var _a88=false;
if(_a87){
if(_a87["cart.qty_limit"]){
this.errorMessageNode.innerHTML=_a87["cart.qty_limit"].text;
_a88=true;
}
}
if(_a88){
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.sku&&this.sku!==null){
if(this.is_shaded){
this.shadeNameNode.innerHTML=this.sku.shade_name;
}
if(this.sku.type=="kit"){
this.shadeNameNode.innerHTML=this.sku.short_desc;
}
}
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"),parentId:null,displayName:"",hdPath:"",hdStates:["off","on","sel"],thumbPath:"",thumbRolloverPath:null,description:"",url:"",isdefault:false,isInDefaultCategory:false,baseClass:"",offImg:"off",postMixInProperties:function(){
if(this.template){
var t=this.template;
if(t.detail){
var type=t.detail.type;
if(type){
this.templateType=type;
}
var _a8b=t.detail.baseClass;
if(_a8b){
this.baseClass=_a8b;
}
var _a8c=t.detail.headerStates;
if(_a8c){
this.hdStates=_a8c;
}
}
}
if(this.templateType!=="detail"){
var tmpl=this[this.templateType+"Path"];
if(tmpl){
this.templateString="";
this.templatePath=tmpl;
}
}
},startup:function(){
var _a8e=dojo.byId(this.id+"_hd");
if(_a8e){
this.hdImg=new generic.img(_a8e,this.hdStates);
}
if(this.isInDefaultCategory){
if(this.isdefault){
this.setDefaultState();
}else{
this.offImg="sel";
this.setDefaultCategoryState();
}
}
var _a8f=dojo.byId(this.id+"_thumb");
if(this.thumbRolloverPath&&_a8f){
this.thumbImg=_a8f;
this.thumbOver=new Image();
this.thumbOver.src=this.thumbRolloverPath;
}
},_onMouseOver:function(e){
if(this.hdImg){
this.hdImg.changeSrc("on");
}
if(this.thumbImg){
this.thumbImg.src=this.thumbOver.src;
}
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(){
};
if(this.hdImg){
var _a93="on";
dojo.some(this.hdStates,function(_a94){
if(_a94==="active"){
_a93=_a94;
return true;
}
});
this.hdImg.changeSrc(_a93);
}
dojo.addClass(this.domNode,"panelnav_default");
var loc=new generic.uri(window.location.href);
if(this.url.indexOf(loc.path)>-1){
var n=dojo.query("a",this.domNode);
var _a97=n[0];
_a97.removeAttribute("href");
this._onClick=function(){
};
dojo.addClass(this.domNode,"unclickable");
}
},setDefaultCategoryState:function(){
if(this.hdImg){
this.hdImg.changeSrc(this.offImg);
}
},reset:function(){
this.destroy();
}});
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(_a9a){
}});
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\t\t\t\t\t<dd>${ADDRESS}</dd>\n\t\t\t\t\t<dd>${CITY}, ${STATE_OR_PROVINCE} ${ZIP_OR_POSTAL}, ${COUNTRY}</dd>\n\t\t\t\t\t<dd>${phone}</dd>\n\t\t\t\t\t<dd>${sdist} miles</dd>\n\t\t\t\t</dl>\n\t        </div>\n\t\t\t<div class=\"result_marker\" id=\"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:"",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",site.globalnav.Detail,{templateString:"<div class=\"panelnav_link panelnav_link_search\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\">\n        <div class=\"panelnav_detail\" dojoAttachPoint=\"panelDetailNode\">\n            <div class=\"panelnav_detail_text\">\n                <h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"12\" alt=\"${displayName}\" /></h3>\n                <p>${description}</p>\n                <img src=\"/search/images/btn_view_shades_off.gif\" width=\"200\" height=\"12\" class=\"panelnav_btn_view_shades\" dojoAttachPoint=\"actionImgNode\">\n            </div>\n            <div class=\"smoosh_small\" style=\"background-color: ${hex};\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></div>\n        </div>\n    </a>\n</div>\n",hex:"",actionImg:null,startup:function(){
this.inherited(arguments);
this.actionImg=new generic.img(this.actionImgNode,["off","on"]);
},_onMouseOver:function(e){
this.inherited(arguments);
if(this.actionImg){
this.actionImg.changeSrc("on");
}
},_onMouseOut:function(e){
this.inherited(arguments);
if(this.actionImg){
this.actionImg.changeSrc("off");
}
},reset:function(){
this.destroy();
}});
dojo.declare("site.globalnav.SearchContentDetail",site.globalnav.Detail,{templateString:"<div id=\"${id}\" class=\"panelnav_link panelnav_link_search_content\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\"><div class=\"panelnav_detail nothumb\">\n        <div class=\"panelnav_detail_text\">\n            <p>${description}</p>\n        </div>\n        <div class=\"panelnav_hspacer\"><br /></div>\n    </div></a>\n</div>\n",hex:"",actionImg:null,startup:function(){
this.inherited(arguments);
if(this.actionImgNode){
this.actionImg=new generic.img(this.actionImgNode,["off","on"]);
}
},_onMouseOver:function(e){
this.inherited(arguments);
if(this.actionImg){
this.actionImg.changeSrc("on");
}
},_onMouseOut:function(e){
this.inherited(arguments);
if(this.actionImg){
this.actionImg.changeSrc("off");
}
},reset:function(){
this.destroy();
}});
dojo.declare("site.globalnav.SearchQuickBuyDetail",[site.globalnav.Detail,dijit._Container],{templateString:"<div class=\"panelnav_link panelnav_link_quickbuy\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\">\n    <div class=\"panelnav_detail\">\n        <div class=\"panelnav_detail_text\">\n            <h3><a href=\"${url}\"><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"12\" alt=\"${displayName}\" class=\"panelnav_detail_hd\" /></a></h3>\n            <a href=\"${url}\">\n            <p dojoAttachPoint=\"shadenameNode\" class=\"panelnav_shadename hidden\">${shadename}</p>\n            <p dojoattachpoint=\"descriptionNode\" class=\"hidden\">${description}</p>\n            </a>\n            <input type=\"image\" src=\"/product/images/btn/btn_add_to_bag_93.gif\" width=\"93\" height=\"23\" id=\"${id}_btn_add\" value=\"\" class=\"panelnav_btn_add\" />\n            <span dojoAttachPoint=\"inventoryStatusNode\" class=\"inventory_status\"></span>\n        </div>\n        <div class=\"smoosh_small\" style=\"background-color: ${hex};\"><a href=\"${url}\"><img class=\"thumb\" src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></a></div>\n        <div dojoAttachPoint=\"cartConfirmNode\"></div>\n    </div>\n</div>\n",isContainer:true,product:null,hex:"",skupath:"",cartConfirmMsg:null,shadedResult:false,shaded:false,postCreate:function(){
this.shadedResult=(this.product.shade_result?true:false),this.skupath=this.product.sku.path;
this.shaded=(this.product.shaded?true:false);
},startup:function(){
this.inherited(arguments);
if(this.shadedResult){
dojo.removeClass(this.shadenameNode,"hidden");
}else{
dojo.removeClass(this.descriptionNode,"hidden");
}
this._initCartAction();
},_initCartAction:function(){
var _aa3=(this.product.sku.shoppable==="1"?true:false);
var self=this;
if(_aa3){
this.cartConfirmMsg=new site.layout.CartConfirm({id:"search_cart_confirm-"+this.skupath,is_shaded:this.shaded,prodName:this.displayName,sku:this.product.sku},this.cartConfirmNode);
var _aa5=dojo.byId(this.id+"_btn_add");
_aa5.value=this.skupath;
var _aa6=new site.productButton({node:_aa5,callback:function(resp){
self.cartConfirmMsg.show(resp);
}});
}else{
var btn=dojo.byId(this.id+"_btn_add");
if(btn){
btn.style.display="none";
}
this.inventoryStatusNode.innerHTML=this.product.sku.inventory_status_message;
this.inventoryStatusNode.style.display="block";
}
},reset:function(){
if(this.cartConfirmMsg){
this.cartConfirmMsg.destroy();
}
this.destroy();
}});
dojo.declare("site.globalnav.DiscontinuedProductDetail",site.globalnav.Detail,{templateString:"<li id=\"${id}\" class=\"panelnav_link\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\">\n        <div class=\"panelnav_detail\">\n            <div class=\"panelnav_detail_text\">\n                <h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"12\" alt=\"${displayName}\" /></h3>\n                <p dojoAttachPoint=\"shadenameNode\" class=\"panelnav_shadename hidden\">${shadename}</p>             \n                <p dojoattachpoint=\"descriptionNode\">${description}</p>\n            </div>\n            <div class=\"smoosh_small\" style=\"background-color: ${hex};\"><img class=\"thumb\" src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></div>\n        </div>\n    </a>\n</li>\n",sku:null,hex:"",shadename:"",shadedResult:false,postMixInProperties:function(){
this.inherited(arguments);
if(this.shadedResult&&this.sku){
this.hex=this.sku.color[0];
this.shadename=this.sku.shade_name;
this.url+="&SKU_ID="+this.sku.sku_id;
}
},startup:function(){
this.inherited(arguments);
if(this.shadedResult){
dojo.removeClass(this.shadenameNode,"hidden");
}
},reset:function(){
this.destroy();
}});
}
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(_aa9){
this.activeItemId=_aa9;
var _aaa=dijit.byId(this.parentId);
_aaa.activeSubItemId=_aa9;
},onChildClick:function(_aab){
if(this.activeItemId&&(this.activeItemId!==_aab)){
this.hideItem(this.activeItemId);
}
},_addPanel:function(){
var _aac=new site.layout.Panel({id:this.id+"_panel",parentId:this.id});
return _aac.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(_aaf){
var item=dijit.byId(_aaf);
if(item.hdImg){
item.hdImg.changeSrc("off");
}
this.toggleSubNav(item.subId,0);
item._setActive(false);
},toggleSubNav:function(id,_ab2){
var node=dojo.byId(id);
var s=node.style;
if(_ab2==1){
s.display="";
}else{
s.display="none";
}
}});
dojo.declare("site.globalnav.panelManager",null,{hasPanelSiblings:false,panelId:"",parent:null,subId:"",sectionId:"",item:null,constructor:function(args){
this.id=args.id;
this.item=args.item;
this.parent=dijit.byId(args.parentId);
this.hasPanelSiblings=(this.parent.isPanelSet?true:false);
this.panelId=this._addPanel(this.parent);
},startup:function(){
this.parent.addChild(this);
},addSubNav:function(_ab6){
this.subId=_ab6.id;
dijit.byId(this.panelId).addChild(_ab6);
if(this.hasPanelSiblings){
if(dojo.byId(this.subId)){
var node=dojo.byId(this.subId);
node.style.display="none";
}
}
},_addPanel:function(_ab8){
var id;
if(this.hasPanelSiblings){
id=_ab8.panelId;
}else{
panel=new site.layout.Panel({id:this.id+"_panel",parentId:this.id});
id=panel.id;
}
return id;
},_setActive:function(_aba){
this.isActive=_aba;
if(_aba==true){
this.parent.setActiveItem(this.id);
}else{
if(this.parent.activeItemId===this.id){
this.parent.setActiveItem("");
}
}
},_onClick:function(e){
if(!this.isActive){
var _abc=dijit.byId(this.subId);
if(!_abc.hasLoaded||!_abc.cache){
var si=this.sectionId;
var d=this.item;
var di=this.itemId;
var g=function(){
dojo.publish("/panelnav/event/click",[{psubnav:_abc,sectionId:si,item:d,itemId:di}]);
};
setTimeout(g,400);
}
}
this.onTrigger(false);
},onTrigger:function(_ac1){
this.parent.onChildClick(this.id);
var _ac2=dijit.byId(this.subId);
if(this.isActive){
if(!_ac1){
this.hideItem();
}
}else{
_ac2.onParentClick();
this.showPanel();
if(!_ac2.hasLoaded||!_ac2.cache){
if(!_ac2.hasLoaded&&_ac2.progressNode){
_ac2.progressNode.style.display="block";
}
}
}
},close:function(){
this.hideItem();
},showPanel:function(){
var _ac3=dijit.byId(this.panelId);
if(this.hasPanelSiblings){
var _ac4=this.parent;
if(_ac3.isOpen){
_ac4.fadeInSubNav(this.subId);
}else{
_ac4.toggleSubNav(this.subId,1);
_ac3.open();
}
}else{
_ac3.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(){
var _ac5=dijit.byId(this.panelId);
_ac5.close();
if(this.hasPanelSiblings){
this.parent.toggleSubNav(this.subId,0);
}
this._setActive(false);
dojo.publish("/panelnav/event/hide",[{type:"panel",id:this.panelId,itemId:this.itemId,subId:this.subId}]);
}});
dojo.declare("site.globalnav.PanelNav",[dijit._Widget,dijit._Contained,dijit._Templated,site.globalnav.panelManager],{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",hasLoaded:false,parentId:"",displayName:"",hdPath:"",hdImg:{},isActive:false,itemId:"",postCreate:function(){
if(!this.parent){
console.log("PARENT NOT FOUND w/ dijit.byId");
this.parent=this.getParent();
}
if(this.hasLoaded){
this.parent.addChild(this.id);
this.startup();
}
if(this.itemId===""){
try{
this.itemId=this.item.id;
}
catch(err){
}
}
},startup:function(){
var _ac6=dojo.byId(this.id+"_hd");
this.hdImg=new generic.img(_ac6,["off","on","sel"]);
},showPanel:function(){
this.inherited(arguments);
if(this.hasPanelSiblings){
if(this.hdImg){
this.hdImg.changeSrc("sel");
}
}else{
if(this.hdImg){
this.hdImg.changeSrc("on");
}
}
},hideItem:function(){
this.inherited(arguments);
if(this.hdImg){
this.hdImg.changeSrc("off");
}
},_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 _ac9=dojo.byId("panel_container");
dojo.place(this.domNode,_ac9,"last");
},_onClickClose:function(){
var _aca=dijit.byId(this.parentId);
if(!_aca){
try{
var gset=dijit.byId(dojo.global.globalNavSetId);
_aca=gset.getChild(this.parentId);
}
catch(err){
}
}
if(_aca.isPanelSet){
var _acc=dijit.byId(_aca.activeItemId);
_acc.hideItem();
}else{
_aca.hideItem();
}
},open:function(){
var node=dojo.byId(this.id);
dojo.addClass(this.id,"panel_active");
this._slide(1,node);
this.isOpen=true;
},close:function(){
var node=dojo.byId(this.id);
dojo.removeClass(this.id,"panel_active");
this._slide(0,node);
this.isOpen=false;
},_slide:function(_acf,node){
var _ad1,_ad2,end,_ad4;
if(_acf==1){
_ad2=this.closedpx;
end=this.openpx;
_ad1=this.durationOpen;
node.style.display="block";
_ad4=null;
}else{
_ad2=this.openpx;
end=this.closedpx;
_ad1=this.durationClose;
display="none";
_ad4=function(){
node.style.display="none";
};
}
dojo.anim(node,{left:{start:_ad2,end:end,unit:"px"}},_ad1,dojox.fx.easing.easeOut,_ad4);
}});
}
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\">\n    <div dojoAttachPoint=\"progressNode\" class=\"progress\"><br></div>\n    <div dojoAttachPoint=\"containerNode\" class=\"invisible\">       \n    </div>\n</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 _ad5=dojo.byId("panel_open");
dojo.place(this.domNode,_ad5,"last");
}else{
var _ad6=dijit.byId(this.parentId);
if(!_ad6){
try{
var gset=dijit.byId(dojo.global.globalNavSetId);
_ad6=gset.getChild(this.parentId);
}
catch(err){
}
}
try{
_ad6.addSubNav(this);
}
catch(err){
console.log("ERROR: site.globalnav.PanelSubNav: missing parentNav for "+this.id);
}
}
if(this.hasLoaded){
this.showProgress(false);
dojo.removeClass(this.containerNode,"invisible");
}
},onChildrenLoaded:function(args){
this.showProgress(false);
dojo.removeClass(this.containerNode,"invisible");
if(args&&args.hasLoaded){
this.hasLoaded=true;
}
},addSubItem:function(item,_ada){
var _ada=_ada;
if(!_ada&&this.containerNode){
_ada=this.containerNode;
}else{
this.domNode;
}
var node=item;
if(typeof (item)==="string"){
node=dojo.doc.createElement("div");
node.innerHTML=item;
this.hasLoaded=true;
}
try{
dojo.place(node,_ada,"last");
}
catch(err){
}
},onChildClick:function(_adc){
if(this.activeItemId&&(this.activeItemId!==_adc)){
var _add=dijit.byId(this.activeItemId);
_add.close();
}
},onParentClick:function(){
},showProgress:function(_ade){
var s=this.progressNode.style;
if(_ade){
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 dojoAttachPoint=\"containerNode\" class=\"invisible\">\n        <div id=\"${id}_links\" class=\"panelnav_detaillink_container\" dojoAttachPoint=\"detailLinksContainerNode\">    \n        </div>\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    </div>\n\n</div>\n",inAccordionMode:false,activeAccordionId:"",addCategoryDetail:function(args){
args.parentId=this.id;
args.containerNode=this.detailContainerNode;
args.accordionId=args.id+"_accordion";
var _ae1=new site.globalnav.ProductCategoryDetail(args);
_ae1.startup();
return _ae1;
},addCategoryAccordion:function(args){
args.accordionId=args.id+"_accordion";
var _ae3=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<div id=\"${id}_sub\" style=\"display:none;\" dojoAttachPoint=\"containerNode\" class=\"accordion_content\">\n\t</div>\n</li>\n",displayName:args.displayName,hdPath:args.hdPath,parentId:this.id});
dojo.place(_ae3.domNode,this.accordionContainerNode,"last");
_ae3.startup();
return _ae3;
},getAccordion:function(id){
var _ae5=dijit.byId(id);
this.openAccordion(_ae5);
},openAccordion:function(_ae6){
this.accordionContainerNode.style.display="block";
this.inAccordionMode=true;
_ae6.open();
this.activeAccordionId=_ae6.id;
},setCategoryState:function(args){
if(args.isDefaultCat&&args.useAccordionMode){
dojo.removeClass(this.accordionContainerNode,"hidden");
var _ae8=args.accordion;
_ae8.open();
this.detailContainerNode.style.display="none";
if(args.hasItemInDefaultCategory){
dojo.addClass(_ae8.domNode,"panelnav_category_default");
}
}
},setPanelState:function(args){
if(args.hasMixed){
dojo.addClass(this.domNode,"panelnav_subnav_mixed");
this.detailLinksContainerNode.style.display="block";
}
},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();
}});
dojo.declare("site.globalnav.SectionDescSubNav",site.globalnav.PanelSubNav,{templateString:null,templateString:"<div id=\"${id}\" class=\"panelnav_subnav panelnav_detail_container\">\n    <div dojoAttachPoint=\"progressNode\" class=\"progress\"><br></div>\n    \n    <div dojoAttachPoint=\"contentNode\" class=\"invisible\">\n        <img dojoAttachPoint=\"hdNode\" class=\"panelnav_section_hd\" src=\"\" width=\"250\" alt=\"\" />\n        <p dojoAttachPoint=\"panelDescriptionNode\" class=\"panelnav_section_descr\"></p>\n\n        <div class=\"panelnav_detail_container\" dojoAttachPoint=\"containerNode\">    \n        </div>\n    \n    </div>\n</div>\n",hdAlt:"",description:"",setContent:function(args){
this.panelDescriptionNode.innerHTML=args.description;
this.hdNode.setAttribute("src",args.header);
this.hdNode.setAttribute("alt",args.header_alt);
},onChildrenLoaded:function(args){
this.showProgress(false);
dojo.removeClass(this.contentNode,"invisible");
this.hasLoaded=true;
}});
}
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],{templateGroup:{href:"<li id=\"${id}\" class=\"link_hd\">"+"<a href=\"${url}\"><img src=\"${hdPath}\" height=\"18\" alt=\"${displayName}\" dojoAttachPoint=\"hdNode\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\"></a>"+"</li>",noHref:"<li id=\"${id}\" class=\"link_hd\">"+"<img src=\"${hdPath}\" height=\"18\" alt=\"${displayName}\" dojoAttachPoint=\"hdNode\">"+"</li>"},templateGroupDIV:{href:"<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>",noHref:"<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){
var _aed=this.templateGroup;
var _aee=dojo.byId(args.id);
if(_aee){
var _aef=_aee.parentNode;
}else{
var _af0=dijit.byId(args.parentId);
if(_af0){
var _aef=(_af0.containerNode?_af0.containerNode:_af0.domNode);
}
}
if(_aef&&_aef.nodeName==="DIV"){
_aed=this.templateGroupDIV;
}
if(args.isdefault||!args.url){
this.templateString=_aed.noHref;
}else{
this.templateString=_aed.href;
}
},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(_af3,_af4){
if(_af4.onChildClick&&(_af4.activeItemId!=="")){
_af4.onChildClick(_af3,true);
}
},setDefaultState:function(){
var _af5=this.parentId;
if(_af5.indexOf("psubnav")!=-1){
return;
}
var _af6=dijit.byId(_af5);
var _af7="";
if(_af5!=="globalnav_container"){
_af7=_af5;
_af5=_af6.parentId;
_af6=dijit.byId(_af5);
}
if(_af5==="globalnav_container"){
dojo.addClass(this.domNode,"clickable");
var self=this;
var _af9=function(){
self._showDefault(_af7,_af6);
};
dojo.connect(this.domNode,"onclick",_af9);
}
}});
}
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 _afb=this.id.match("[0-9]+")[0];
if(dojo.isIE){
if(_afb==0){
cmCreatePageviewTag("search : search results",this.keyword,"2000",this.count);
}else{
if((_afb%2)==0){
console.log("site_coremetrics_func_"+(_afb-1));
var _afc=dijit.byId("site_coremetrics_func_"+(_afb-1));
_afc.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,{config:null,isDefaultPanel:false,resultsNode:null,contentResultsNode:null,progressNode:null,_hasContent:false,_children:[""],_defaultState:null,_isSearching:false,constructor:function(args){
if(!args.config||!args.config.search){
return;
}
for(var arg in args){
this[arg]=args[arg];
}
this.formField=dojo.byId(this.config.search.formFieldId);
var _aff=dojo.byId(this.config.search.formSubmitId);
if(!this.formField||!_aff){
return;
}
this._defaultState=dojo.global.page_data.panel_nav["default"];
var _b00=dijit.byId("psubnav_"+this.config.id);
this.resultsNode=_b00.resultsNode;
this.contentResultsNode=_b00.contentResultsNode;
this.progressNode=(this.progressNode?this.progressNode:_b00.progressNode);
dojo.connect(this.formField,"onkeypress",this,"_onkeypress");
dojo.connect(_aff,"onclick",this,"_onclick");
if(this.isDefaultPanel&&this._defaultState.query){
this.submit({query:this._defaultState.query});
}
var _b01=new site.form.FieldLabel({field:this.formField,label:this.formField.title});
},_onkeypress:function(e){
if(e.keyCode!=dojo.keys.ENTER){
return false;
}
this.submit(e);
},_onclick:function(e){
this.submit(e);
},submit:function(args){
if(this._isSearching){
return;
}
if(args&&args.query){
var _b05=args.query;
}else{
var _b05=this.formField.value;
}
if(!_b05||_b05===this._defaultState.searchDefault){
var _b06=this.config.search.errorPopup;
if(_b06){
var q=dojo.query("#"+_b06+".pop_close_search");
var btn=q[0];
var _b09=new site.popupMessage({popup:dojo.byId(_b06),buttonClose:btn,displayDuration:5000});
_b09.show();
}
return false;
}
this._execute({query:_b05});
},_execute:function(args){
this._isSearching=true;
var _b0b=dijit.byId("psubnav_"+this.config.id);
var _b0c=null;
this._showProgress(true);
_b0b.resultsMessageNode.innerHTML="";
if(_b0b.contentResultsContainer){
dojo.addClass(_b0b.contentResultsContainer,"hidden");
}
if(this.panelManagerId){
var gset=dijit.byId(this.parentId);
var _b0e=gset.getChild(this.panelManagerId);
}
if(this.isDefaultPanel){
_b0c=(this._defaultState.item.item?this._defaultState.item.item.id:null);
if(this.panelManagerId){
this._showDefault();
}
}else{
if(_b0e){
_b0e.onTrigger(true);
window.parent.scrollTo(0,0);
}
}
var self=this;
var _b10={query:args.query,psubnav:_b0b,defaultId:_b0c};
var _b11=function(){
var c=self.config.content;
dojo.xhrGet({url:c.url+"?"+c.param+"="+encodeURIComponent(args.query),handleAs:"json-comment-optional",load:function(data){
self.onLoad(data,_b10);
}});
};
setTimeout(_b11,400);
},onLoad:function(data,args){
this._isSearching=false;
var self=this;
var _b17=args.psubnav;
var _b18=data.products;
var _b19=false;
var _b1a=(_b18.length>0||(data.content_results&&data.content_results.length>0)?true:false);
if(this._hasContent){
this.reset();
}
if(data.results_message){
_b17.resultsMessageNode.innerHTML=data.results_message;
}else{
if(!_b1a&&data.no_results_message){
_b17.resultsMessageNode.innerHTML=data.no_results_message;
}
}
if(!_b1a){
this._showProgress(false);
return false;
}
if(this.isDefaultPanel){
if(this._defaultState.query===args.query){
_b19=dojo.some(_b18,function(item){
return (item.id===args.defaultId);
});
}
if(_b19){
dojo.addClass(this.resultsNode,"panelnav_category_default");
}else{
dojo.removeClass(this.resultsNode,"panelnav_category_default");
}
}
if(data.content_results&&data.content_results.length>0&&_b17.contentResultsContainer){
dojo.removeClass(_b17.contentResultsContainer,"hidden");
dojo.forEach(data.content_results,function(item,idx){
self._initSearchContentDetail({item:item,idx:idx,psubnav:_b17});
});
}
dojo.forEach(_b18,function(item,idx){
var _b20=false;
if(_b19&&(item.id===args.defaultId)){
_b20=true;
}
var id="psubitem_"+self.config.id+"_"+item.id;
var _b22={id:id,item:item,isdefault:_b20,isInDefaultCategory:_b19};
if(self.config.id==="discontinued"){
var _b23=self._initDiscontinuedDetail(_b22);
}else{
var _b23=self._initSearchDetail(_b22);
}
self._children.push(id);
_b17.addSubItem(_b23.domNode,self.resultsNode);
_b23.startup();
});
var pid;
if(this.config.id==="search"){
pid="pnav_search_panel";
}
dojo.publish("/globalnav/event/getcontent/onload",[{type:"panel",id:pid,parentId:_b17.parentId}]);
this._hasContent=true;
this._showProgress(false);
var _b25=data.count||"0";
cmCreatePageviewTag("search : search results",data.query,"2000",_b25);
},_initSearchDetail:function(args){
var item=args.item;
var _b28={id:args.id,url:item.uri,product:item,hdPath:item.header,displayName:item.name,description:item.short_desc,thumbPath:item.thumb,hex:(item.shade_result?item.sku.color[0]:""),shadename:(item.shade_result?item.sku.shade_name:""),isdefault:args.isdefault,isInDefaultCategory:args.isInDefaultCategory};
if(item.is_giftcard==1){
_b28.templateString="<div class=\"panelnav_link panelnav_link_search\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\">\n        <div class=\"panelnav_detail\" dojoAttachPoint=\"panelDetailNode\">\n            <div class=\"panelnav_detail_text\">\n                <h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"12\" alt=\"${displayName}\" /></h3>\n                <p>${description}</p>\n                <img src=\"/search/images/btn_view_select_value_off.gif\" width=\"200\" height=\"12\" class=\"panelnav_btn_view_shades\" dojoAttachPoint=\"actionImgNode\">\n            </div>\n            <div class=\"panelnav_thumb\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></div>\n        </div>\n    </a>\n</div>\n";
var _b29=new site.globalnav.SearchProductDetail(_b28);
}else{
if(item.is_custom_palette==1){
_b28.templateString="<div class=\"panelnav_link panelnav_link_search\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\">\n        <div class=\"panelnav_detail\" dojoAttachPoint=\"panelDetailNode\">\n            <div class=\"panelnav_detail_text\">\n                <h3><img id=\"${id}_hd\" src=\"${hdPath}\" width=\"200\" height=\"12\" alt=\"${displayName}\" /></h3>\n                <p>${description}</p>\n                <img src=\"/search/images/btn_custom_palette_off.gif\" width=\"200\" height=\"12\" class=\"panelnav_btn_view_shades\" dojoAttachPoint=\"actionImgNode\">\n            </div>\n            <div class=\"smoosh_small\" style=\"background-color: ${hex};\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></div>\n        </div>\n    </a>\n</div>\n";
var _b29=new site.globalnav.SearchProductDetail(_b28);
}else{
if(item.shade_result||!item.shaded){
if(item.is_alt_hdr_size==1){
_b28.templateString="<div class=\"panelnav_link panelnav_link_quickbuy\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut\">\n    <div class=\"panelnav_detail\">\n        <div class=\"panelnav_detail_text\">\n            <h3><a href=\"${url}\"><img id=\"${id}_hd\" src=\"${hdPath}\" height=\"24\" alt=\"${displayName}\" /></a></h3>\n            <a href=\"${url}\">\n            <p dojoAttachPoint=\"shadenameNode\" class=\"panelnav_shadename hidden\">${shadename}</p>\n            <div dojoattachpoint=\"descriptionNode\" class=\"hidden\" style=\"height: 8px;\"></div>\n            </a>\n            <input type=\"image\" src=\"/product/images/btn/btn_add_to_bag_93.gif\" width=\"93\" height=\"23\" id=\"${id}_btn_add\" value=\"\" class=\"panelnav_btn_add\" />\n            <span dojoAttachPoint=\"inventoryStatusNode\" class=\"inventory_status\"></span>\n        </div>\n        <div class=\"smoosh_small\" style=\"background-color: ${hex};\"><a href=\"${url}\"><img class=\"thumb\" src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></a></div>\n        <div dojoAttachPoint=\"cartConfirmNode\"></div>\n    </div>\n</div>\n";
}
var _b29=new site.globalnav.SearchQuickBuyDetail(_b28);
}else{
if(item.is_alt_hdr_size==1){
_b28.templateString="<div class=\"panelnav_link panelnav_link_search\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\">\n        <div class=\"panelnav_detail\" dojoAttachPoint=\"panelDetailNode\">\n            <div class=\"panelnav_detail_text\">\n                <h3><img id=\"${id}_hd\" src=\"${hdPath}\" height=\"24\" alt=\"${displayName}\" /></h3>\n                <p style=\"height: 20px;\"></p>\n                <img src=\"/search/images/btn_view_shades_off.gif\" width=\"200\" height=\"12\" class=\"panelnav_btn_view_shades\" dojoAttachPoint=\"actionImgNode\">\n            </div>\n            <div class=\"smoosh_small\" style=\"background-color: ${hex};\"><img src=\"${thumbPath}\" width=\"56\" height=\"56\" alt=\"${displayName}\" /></div>\n        </div>\n    </a>\n</div>\n";
}
var _b29=new site.globalnav.SearchProductDetail(_b28);
}
}
}
return _b29;
},_initSearchContentDetail:function(args){
var id="psubitem_"+this.config.id+"_content_"+args.idx;
var item=args.item;
var _b2d=new site.globalnav.Detail({id:id,templateString:"<div id=\"${id}\" class=\"panelnav_link panelnav_link_search_content\" dojoAttachEvent=\"onmouseenter:_onMouseOver,onmouseleave:_onMouseOut,onclick:_onClick\">\n    <a href=\"${url}\"><div class=\"panelnav_detail nothumb\">\n        <div class=\"panelnav_detail_text\">\n            <p>${description}</p>\n        </div>\n        <div class=\"panelnav_hspacer\"><br /></div>\n    </div></a>\n</div>\n",url:item.url,description:item.short_desc,isdefault:false,isInDefaultCategory:false});
this._children.push(id);
args.psubnav.addSubItem(_b2d.domNode,this.contentResultsNode);
_b2d.startup();
},_initDiscontinuedDetail:function(args){
var item=args.item;
var _b30=new site.globalnav.DiscontinuedProductDetail({id:args.id,url:item.uri,displayName:item.name,hdPath:item.header,thumbPath:item.thumbnail,description:item.description,sku:item.sku,shadedResult:(item.shade_result==1?true:false),isdefault:args.isdefault,isInDefaultCategory:args.isInDefaultCategory});
return _b30;
},_showProgress:function(_b31){
var s=this.progressNode.style;
if(_b31){
s.display="block";
this.resultsNode.style.display="none";
}else{
s.display="none";
this.resultsNode.style.display="block";
}
},reset:function(){
this._showProgress(true);
dojo.forEach(this._children,function(_b33,idx){
var c=dijit.byId(_b33);
if(c){
c.reset();
}
});
this._hasContent=false;
},_showDefault:function(){
var _b36=dijit.byId("globalnav_container");
if(_b36.onChildClick&&(_b36.activeItemId!=="")){
_b36.onChildClick(this.config.id,true);
}
}});
}
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 _b45=[];
var enc=encodeURIComponent;
for(var name in map){
var _b48=map[name];
var _b49=enc(name)+"=";
_b45.push(_b49+enc(_b48));
}
this.queryKey=map;
this.query=_b45.join("&");
this.relative=this.path+"?"+this.query;
var url=this._build();
return url;
},mergeQuery:function(map){
if(!this.source){
this.parse();
}
var _b4c=dojo.mixin(this.queryKey,map);
var url=this.setQuery(_b4c);
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,globalNavSetId:"",constructor:function(args){
this.config=args.config;
this.defaultState=args.defaultState;
this.globalNavSetId=args.globalNavSetId;
dojo.subscribe("/panelnav/event/click",this,function(args){
this.getPanelContent(args);
});
this.initSections();
},initSections:function(){
var _b50=this.config.items;
var _b51=this.defaultState.id;
var self=this;
dojo.forEach(_b50,function(_b53,idx){
var _b55=false;
if(_b53.id===_b51){
_b55=true;
}
self._configKeys[_b53.id]={idx:idx,items:{}};
if(_b53.items&&(_b53.items.length>0)){
self.initPanelNavSet(_b53,_b55);
}else{
if(_b53.id==="search"){
self.initSearch(_b53);
}else{
if(!_b53.hasLoaded){
self.initPanelSubNav(_b53,_b55,_b53);
}
}
}
});
},initPanelNavSet:function(_b56,_b57){
var _b58=new site.globalnav.PanelNavSet({id:"pnavset_"+_b56.id,parentId:"gnav_"+_b56.id});
var _b59=this.defaultState.item;
var _b5a=(_b59?_b59.id:null);
var _b5b=dijit.byId(_b58.parentId);
var self=this;
dojo.forEach(_b56.items,function(_b5d,idx){
self._configKeys[_b56.id].items[_b5d.id]={idx:idx};
var _b5f=false;
if(!self.defaultNavCreated&&(_b5d.id===_b5a)){
_b5f=true;
}
if(_b5d.uri&&!_b5d.content){
self.initHeader("pnav",_b5d,_b5f,_b5b);
}else{
if(_b5f){
self.initHeader("pnav",_b5d,_b5f,_b5b);
}else{
var pnav=new site.globalnav.PanelNav({id:"pnav_"+_b5d.id,parentId:"pnavset_"+_b56.id,displayName:_b5d.name,hdPath:_b5d.header,sectionId:_b56.id,item:_b5d});
_b5b.addSubItem(pnav.domNode);
pnav.startup();
}
self.initPanelSubNav(_b5d,_b5f,_b56);
}
});
if(_b57){
_b5b.open();
}
},initPanelSubNav:function(_b61,_b62,_b63){
var _b64=false;
var _b65={id:"psubnav_"+_b61.id,parentId:"pnav_"+_b61.id,isDefaultPanel:_b62,itemId:_b61.id};
if(_b61.id==="discontinued"){
_b65.content=_b61.content;
_b65.templateString="<div id=\"${id}\" class=\"panelnav_subnav panelnav_detail_container\">\n    <div dojoAttachPoint=\"progressNode\" class=\"progress\"><br></div>\n    <div dojoAttachPoint=\"containerNode\" class=\"invisible\">\n        <img id=\"${id}_hd\" class=\"panelnav_disc_hd\" src=\"/discontinued/images/headers/h_discontinued_prods.gif\" width=\"250\" alt=\"Goodbyes\" />\n        <p dojoAttachPoint=\"panelDescriptionNode\" class=\"panelnav_disc_descr\"></p>\n        <div dojoAttachPoint=\"featuredNode\">\n        </div>\n        <div id=\"discontinued_search\">\n            <img src=\"/images/pnav/category/headers/pnav_search_disc_prods_250x18_off.gif\" width=\"250\" height=\"18\" alt=\"Search Discontinued Products\" id=\"disc_search_hd\">\n            <p dojoAttachPoint=\"searchDescriptionNode\"></p>\n            <form onsubmit=\"return false;\">\n                <input type=\"text\" id=\"disc_search_input\" class=\"text_field\" />\n                <input type=\"image\" class=\"btn\" id=\"disc_search_submit\" src=\"/images/forms/btn_input.gif\" />\n            </form>         \n            <div id=\"disc_search_progress\" class=\"progress\"><br></div>          \n            <div class=\"clearfix\"></div>\n        </div>\n        <ul dojoAttachPoint=\"resultsNode\" class=\"search_results\">\n        </ul>\n        <div dojoAttachPoint=\"resultsMessageNode\" class=\"search_results_message\"></div>    \n    </div>\n</div>\n";
var _b66=new site.globalnav.PanelSubNav(_b65);
}else{
if(_b63&&_b63.id==="products"||_b61.content.widget==="ProductSubNav"){
_b65.content=(_b61.content?_b61.content:_b63.content);
var _b66=new site.globalnav.ProductSubNav(_b65);
}else{
var _b67=_b61.content;
var _b68=false;
var _b69=false;
var _b6a="PanelSubNav";
if(_b61.content.widget){
_b6a=_b61.content.widget;
}
if(_b67&&_b67.cms&&_b67.handleAs==="html"){
_b64=true;
_b68=true;
if(_b62){
_b69=true;
this.initCMSDisplay({isdefault:_b69});
}
}
if(!_b69){
_b65.content=_b67;
var _b66=new site.globalnav[_b6a](_b65);
}
}
}
if(_b62&&!_b64){
this.getPanelContent({psubnav:_b66,sectionId:_b63.id,item:_b61});
}
},getPanelContent:function(args){
var _b6c=args.psubnav;
var self=this;
if(_b6c.id==="psubnav_my_mac"){
dojo.removeClass(_b6c.domNode,"hidden");
dojo.publish("/globalnav/event/getcontent/my_mac",null);
}else{
var _b6e=(_b6c.content.handleAs==="html"?"text":"json-comment-optional");
var url=_b6c.content.url+(_b6c.content.param?("?"+_b6c.content.param+"="+_b6c.itemId):"");
dojo.xhrGet({url:url,handleAs:_b6e,load:function(data){
self.initPanelContent(data,args);
dojo.publish("/globalnav/event/getcontent/onload",[{type:"panel",parentId:_b6c.parentId}]);
}});
}
},initPanelContent:function(data,_b72){
var _b73=_b72.psubnav;
if(_b73.content.handleAs==="html"){
_b73.addSubItem(data);
if(_b73.content.cms){
this.initCMSDisplay({scopeNode:_b73.id});
}
}else{
var _b74=_b72.sectionId;
var _b75=(_b72.item?_b72.item.id:_b72.itemId);
var _b76=data;
if(typeof (data)==="object"){
if(data.sections){
_b76=data.sections[0].items;
}else{
if(data.items){
_b76=data.items;
if(typeof _b73.setContent==="function"){
_b73.setContent(data);
}
}
}
}
var _b77=false;
if(_b74==="products"||_b75==="looks"){
_b77=dojo.some(_b76,function(item){
if(item.items){
return true;
}else{
return false;
}
});
}
if(_b75==="discontinued"){
this.initDiscontinued(_b76,_b73,_b72.item);
}else{
if(_b77){
this.initProductCategories(_b76,_b73,_b74,_b75);
}else{
if(_b74===""){
_b74=_b75;
}
var _b79=false;
if(_b73.isDefaultPanel){
var _b7a=this.getDefaultDetail();
_b79=dojo.some(_b76,function(_b7b){
return (_b7b.id===_b7a.id);
});
if(_b79){
_b73.setDefaultState();
}
}
var self=this;
dojo.forEach(_b76,function(_b7d,idx){
if(_b7d.type==="header_link"){
var _b7f=false;
if(_b7a&&(_b7d.id===_b7a.id)){
_b7f=true;
}
self.initHeader("psubitem",_b7d,_b7f,_b73);
}else{
var _b80=self.initDetail({item:_b7d,sectionId:_b74,pnavItemId:_b75,defaultItem:_b7a,isInDefaultCategory:_b79,parentId:_b73.id,onCreate:function(d){
_b73.addSubItem(d.domNode);
}});
}
});
}
}
}
_b73.onChildrenLoaded({hasLoaded:true});
},initProductCategories:function(_b82,_b83,_b84,_b85){
var self=this;
var _b87=this.defaultState.item;
var _b88=(_b87?_b87.item:null);
var _b89=(_b88?_b88.id:null);
var _b8a=false;
var _b8b=false;
if(_b83.isDefaultPanel&&_b88){
var _b8c;
try{
_b8c=_b88.item;
}
catch(err){
}
}
dojo.forEach(_b82,function(_b8d,_b8e){
var _b8f=true;
if(!_b8d.items){
_b8f=false;
_b8b=true;
}
var _b90=false;
var _b91=false;
if(_b83.isDefaultPanel&&_b88){
_b8a=true;
if(_b8d.id==_b89){
_b90=true;
if(_b8c){
_b91=true;
}
}
}
if(!_b8a||!_b8f){
var _b92={id:"psubcat_"+_b8d.id,displayName:_b8d.name,hdPath:_b8d.header,description:_b8d.description,thumbPath:_b8d.thumbnail};
if(!_b8f){
_b92.item=_b8d;
_b92.isInDefaultCategory=_b91;
_b92.onCreate=function(d){
_b83.addSubItem(d.domNode,_b83.detailLinksContainerNode);
};
var _b94=self.initDetail(_b92);
return;
}else{
if(!_b8a){
var _b95=self.getAltTemplateConfig(_b8d);
if(_b95){
_b92.template=(_b92.template?_b92.template:{});
_b92.template.detail=(_b92.template.detail?_b92.template.detail:{});
dojo.mixin(_b92.template.detail,_b95);
}
_b83.addCategoryDetail(_b92);
}
}
}
var img=_b8d.header.replace(/200/g,"250");
var _b97=_b83.addCategoryAccordion({id:"psubcat_"+_b8d.id,displayName:_b8d.name,hdPath:img,description:_b8d.description});
dojo.forEach(_b8d.items,function(_b98,idx){
var _b9a=self.initDetail({item:_b98,sectionId:_b84,pnavItemId:_b85,defaultItem:_b8c,isInDefaultCategory:_b91,parentId:_b83.id,onCreate:function(d){
_b97.addSubItem(d.domNode);
}});
});
_b83.setCategoryState({accordion:_b97,useAccordionMode:_b8a,isDefaultCat:_b90,hasItemInDefaultCategory:_b91});
});
_b83.setPanelState({hasMixed:_b8b});
},initDetail:function(args){
var item=args.item;
var _b9e=args.sectionId;
var _b9f=args.pnavItemId;
var sk=(_b9e?this._configKeys[_b9e]:null);
var _ba1=(sk?this.config.items[sk.idx]:null);
var pnk=(_ba1?sk.items[_b9f]:null);
var _ba3=(pnk?_ba1.items[pnk.idx]:_ba1);
var _ba4="";
var _ba5="";
if(item.header){
_ba4=item.header;
}else{
if(item.image_base){
var _ba6;
try{
_ba6=_ba1.template.detail.hdDir;
if(_ba3.template.detail.hdDir){
_ba6=_ba3.template.detail.hdDir;
}
}
catch(err){
}
_ba4=_ba6+"pnav_"+item.image_base+"_200x12_off.gif";
}
}
if(item.thumbnail){
_ba5=item.thumbnail;
}else{
if(item.image_base){
var _ba7;
try{
_ba7=_ba1.template.detail.thumbDir;
if(_ba3.template.detail.thumbDir){
_ba7=_ba3.template.detail.thumbDir;
}
}
catch(err){
}
_ba5=_ba7+item.image_base+".jpg";
}
}
var _ba8=(args.isInDefaultCategory?args.isInDefaultCategory:false);
var _ba9=false;
if(_ba8){
if(args.isdefault){
_ba9=args.isdefault;
}else{
var _baa=(args.defaultItem?args.defaultItem.id:null);
if(item.id==_baa){
_ba9=true;
}
}
}
var _bab=(item.name?item.name:"");
var _bac={id:"psubitem_"+item.id,displayName:_bab,hdPath:_ba4,thumbPath:_ba5,thumbRolloverPath:item.thumbnail_rollover,url:item.uri,isdefault:_ba9,parentId:args.parentId,isInDefaultCategory:_ba8};
_bac.description=(item.description?item.description:null);
var t;
if(args.template){
t=args.template;
}else{
if(_ba3&&_ba3.template){
t=_ba3.template;
}else{
if(_ba1&&_ba1.template){
t=_ba1.template;
}
}
}
if(t){
_bac.template=dojo.clone(t);
}
var _bae=this.getAltTemplateConfig(item);
if(_bae){
_bac.template=(_bac.template?_bac.template:{});
_bac.template.detail=(_bac.template.detail?_bac.template.detail:{});
dojo.mixin(_bac.template.detail,_bae);
}
var _baf=new site.globalnav.Detail(_bac);
if(args.onCreate){
args.onCreate(_baf);
}
_baf.startup();
return _baf;
},getAltTemplateConfig:function(item){
var _bb1=false;
if(item.type){
var _bb2=this.config.altTypes;
var ait=_bb2[item.type];
if(ait&&ait.detail){
_bb1=ait.detail;
}
}
return _bb1;
},initHeader:function(type,item,_bb6,_bb7){
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:_bb6,parentId:_bb7.id});
h.startup();
_bb7.addSubItem(h.domNode);
},initSearch:function(_bb9){
var id=_bb9.id;
var _bbb=false;
if(this.defaultState.query&&(this.defaultState.item.id===id)){
_bbb=true;
}
if(!_bbb){
var _bbc=new site.globalnav.panelManager({id:"pnav_"+id,parentId:this.globalNavSetId,sectionId:id,item:_bb9});
_bbc.startup();
}
var _bbd=new site.globalnav.PanelSubNav({templateString:"<div id=\"${id}\" class=\"panelnav_subnav panelnav_detail_container\">\n    <div dojoAttachPoint=\"resultsMessageNode\" class=\"search_results_message\"></div>\n    <div dojoAttachPoint=\"contentResultsContainer\" class=\"hidden search_content_results\">\n        <!--<h2 class=\"search_content_results_hd\">Content Results</h2>-->\n\t\t<div dojoAttachPoint=\"contentResultsNode\">\n\t\t</div>\n\t\t<div class=\"clear\"><br></div>\n    </div>\n    <div class=\"search_results_hd\">\n        <img src=\"/search/images/title_products_2.gif\" alt=\"Featured Products\" />\n    </div>\n    <div dojoAttachPoint=\"progressNode\" class=\"progress\"><br></div>\n    <div dojoAttachPoint=\"resultsNode\">\n    </div>\n</div>\n",id:"psubnav_"+id,parentId:"pnav_"+id,isDefaultPanel:_bbb,itemId:id,cache:false});
var _bbe=new site.search({config:_bb9,panelManagerId:"pnav_"+id,parentId:this.globalNavSetId,isDefaultPanel:_bbb});
},initDiscontinued:function(_bbf,_bc0,_bc1){
var self=this;
_bc0.panelDescriptionNode.innerHTML=_bbf.panel_description;
_bc0.searchDescriptionNode.innerHTML=_bbf.description;
var _bc3=this.getDefaultDetail();
var _bc4=(_bc3.id==="featured_goodbyes"?true:false);
var _bc5=_bc1.content.featured;
_bc5.description=_bbf.featured_description;
var _bc6=self.initDetail({item:_bc5,template:_bc1.template,isdefault:_bc4,isInDefaultCategory:_bc4,parentId:_bc0.id,onCreate:function(_bc7){
_bc0.addSubItem(_bc7.domNode,_bc0.featuredNode);
}});
_bc0.onChildrenLoaded();
var _bc8=new site.search({config:_bc1,isDefaultPanel:_bc0.isDefaultPanel,progressNode:dojo.byId("disc_search_progress")});
},getDefaultDetail:function(args){
var d=p=this.defaultState;
var _bcb=this.defaultState.item;
var _bcc=((args&&args.includeParent)?args.includeParent:false);
if(_bcb){
if(_bcb.item){
d=_bcb.item;
p=_bcb;
if(d.item){
p=d;
d=d.item;
}
}else{
d=_bcb;
}
}
return (_bcc?{detail:d,parent:p}:d);
},initCMSDisplay:function(args){
var _bce=(args.scopeNode?args.scopeNode:"panel_open");
var _bcf=null;
var _bd0;
var _bd1;
if(args.isdefault){
var d=this.getDefaultDetail({includeParent:true});
_bcf="image_"+d.detail.id;
if(!dojo.byId(_bcf)){
var pId="image_"+d.parent.id;
if(dojo.byId(pId)){
_bcf="image_"+d.parent.id;
}
}
}
var imgs=dojo.query("#"+_bce+" a img");
dojo.query("#"+_bce+" a img").forEach(function(imgn){
if(imgn.id===_bcf){
_bd1=new generic.img(imgn,["off","sel"]);
_bd1.changeSrc("sel");
}else{
_bd0=new generic.rollover(imgn,null);
}
});
}});
dojo.provide("site.globalnav.GlobalSet");
dojo.declare("site.globalnav.GlobalSet",dijit._Widget,{activeItemId:"",_objChildren:{},addChild:function(_bd6){
this._objChildren[_bd6.id]=_bd6;
},getChild:function(_bd7){
var _bd8=this._objChildren[_bd7];
if(_bd8){
return _bd8;
}else{
return false;
}
},addSubItem:function(item){
var node=item;
var _bdb=dojo.byId("globalnav");
try{
dojo.place(node,_bdb,"last");
}
catch(err){
}
},setActiveItem:function(_bdc){
this.activeItemId=_bdc;
},onChildClick:function(_bdd,_bde){
if(this.activeItemId&&(this.activeItemId!==_bdd||_bde)){
var _bdf=dijit.byId(this.activeItemId);
if(!_bdf){
try{
var gset=dijit.byId(dojo.global.globalNavSetId);
_bdf=this.getChild(this.activeItemId);
}
catch(err){
}
}
var _be1=(_bde?_bdd:"");
_bdf.close(_be1);
}
}});
}
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 _be5=this.config[name]._class;
console.log("_Config.constructor __className: ",_be5);
if(_be5){
try{
var test=(_be5!==null);
dojo.requireIf(test,_be5);
if(!this._loaded){
this._loaded={};
}
this._loaded[name]=true;
}
catch(e){
console.log("Failed loading ",_be5," >> ",e);
throw new Error("Unable to load class: "+_be5);
}
}
}
var _be7=[];
var _be8=this._tempMarkers;
for(var j=0;j<_be8.length;j++){
var subm=_be8[j]+"1";
_be7.push(subm);
}
this._icoMarkers=_be8.concat(_be7);
},pager:function(){
return this._pager;
},evt_pager:function(){
return this._evt_pager;
},loadedModules:function(){
return this._loaded?this._loaded:false;
},getClassObject:function(_beb,_bec){
if(this.config[_beb]&&this.config[_beb]._class){
if(_bec){
if(this._loaded&&this._loaded[_beb]){
return dojo.getObject(this.config[_beb]._class);
}
}else{
return dojo.getObject(this.config[_beb]._class);
}
}
},getConfig:function(_bed){
if(_bed&&this.config[_bed]){
return this.config[_bed];
}else{
return this.config;
}
},getSrcNode:function(_bee){
if(_bee&&this.config[_bee]){
return this.config[_bee].node;
}
},getQuery:function(){
return this.results.query;
},isLoaded:function(_bef){
return (this._loaded&&this._loaded[_bef]);
},doorByPosition:function(_bf0,pos){
_bf0=(typeof _bf0!=="undefined")?_bf0:this._sortKey;
pos=(typeof pos!=="undefined")?pos:0;
var id=this.results.group[_bf0][pos];
return this.results.doors[id];
},doorById:function(id){
if(!id){
return;
}
return this.results.doors[id];
},groupByName:function(_bf4){
_bf4=(typeof _bf4!=="undefined")?_bf4:this._sortKey;
return this.results.group[_bf4];
}});
}
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 _bf9=this._config.getClassObject("map",true);
console.log("Locator.startup __MapClass: ",_bf9);
if(_bf9){
console.log("loading map");
this._gmap=new _bf9(this._config);
}
var _bfa=this._config.getClassObject("results",true);
if(_bfa){
var src=this._config.getSrcNode("results");
console.log("results node: ",src);
this._results=new _bfa({_config:this._config},src);
}
}});
}
dojo.i18n._preloadLocalizations("site.nls.maccosmetics_layer",["xx","ROOT","en","en-us"]);
