/*
	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["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(_12e){
_12e.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 _137=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_13a,dim){
_13a.resize?_13a.resize(dim):dojo.marginBox(_13a.domNode,dim);
dojo.mixin(_13a,dojo.marginBox(_13a.domNode));
dojo.mixin(_13a,dim);
};
dijit.layout.layoutChildren=function(_13c,dim,_13e){
dim=dojo.mixin({},dim);
dojo.addClass(_13c,"dijitLayoutContainer");
_13e=dojo.filter(_13e,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_13e,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_13e,function(_141){
var elm=_141.domNode,pos=_141.layoutAlign;
var _144=elm.style;
_144.left=dim.l+"px";
_144.top=dim.t+"px";
_144.bottom=_144.right="auto";
dojo.addClass(elm,"dijitAlign"+_137(pos));
if(pos=="top"||pos=="bottom"){
size(_141,{w:dim.w});
dim.h-=_141.h;
if(pos=="top"){
dim.t+=_141.h;
}else{
_144.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_141,{h:dim.h});
dim.w-=_141.w;
if(pos=="left"){
dim.l+=_141.w;
}else{
_144.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_141,dim);
}
}
}
});
};
})();
}
if(!dojo._hasResource["dojo.date.stamp"]){
dojo._hasResource["dojo.date.stamp"]=true;
dojo.provide("dojo.date.stamp");
dojo.date.stamp.fromISOString=function(_145,_146){
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 _147=dojo.date.stamp._isoRegExp.exec(_145);
var _148=null;
if(_147){
_147.shift();
if(_147[1]){
_147[1]--;
}
if(_147[6]){
_147[6]*=1000;
}
if(_146){
_146=new Date(_146);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){
return _146["get"+prop]();
}).forEach(function(_14a,_14b){
if(_147[_14b]===undefined){
_147[_14b]=_14a;
}
});
}
_148=new Date(_147[0]||1970,_147[1]||0,_147[2]||1,_147[3]||0,_147[4]||0,_147[5]||0,_147[6]||0);
var _14c=0;
var _14d=_147[7]&&_147[7].charAt(0);
if(_14d!="Z"){
_14c=((_147[8]||0)*60)+(Number(_147[9])||0);
if(_14d!="-"){
_14c*=-1;
}
}
if(_14d){
_14c-=_148.getTimezoneOffset();
}
if(_14c){
_148.setTime(_148.getTime()+_14c*60000);
}
}
return _148;
};
dojo.date.stamp.toISOString=function(_14e,_14f){
var _=function(n){
return (n<10)?"0"+n:n;
};
_14f=_14f||{};
var _152=[];
var _153=_14f.zulu?"getUTC":"get";
var date="";
if(_14f.selector!="time"){
var year=_14e[_153+"FullYear"]();
date=["0000".substr((year+"").length)+year,_(_14e[_153+"Month"]()+1),_(_14e[_153+"Date"]())].join("-");
}
_152.push(date);
if(_14f.selector!="date"){
var time=[_(_14e[_153+"Hours"]()),_(_14e[_153+"Minutes"]()),_(_14e[_153+"Seconds"]())].join(":");
var _157=_14e[_153+"Milliseconds"]();
if(_14f.milliseconds){
time+="."+(_157<100?"0":"")+_(_157);
}
if(_14f.zulu){
time+="Z";
}else{
if(_14f.selector!="time"){
var _158=_14e.getTimezoneOffset();
var _159=Math.abs(_158);
time+=(_158>0?"-":"+")+_(Math.floor(_159/60))+":"+_(_159%60);
}
}
_152.push(time);
}
return _152.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _15b=d._scopeName+"Type";
var qry="["+_15b+"]";
function val2type(_15d){
if(d.isString(_15d)){
return "string";
}
if(typeof _15d=="number"){
return "number";
}
if(typeof _15d=="boolean"){
return "boolean";
}
if(d.isFunction(_15d)){
return "function";
}
if(d.isArray(_15d)){
return "array";
}
if(_15d instanceof Date){
return "date";
}
if(_15d instanceof d._Url){
return "url";
}
return "object";
};
function str2obj(_15e,type){
switch(type){
case "string":
return _15e;
case "number":
return _15e.length?Number(_15e):NaN;
case "boolean":
return typeof _15e=="boolean"?_15e:!(_15e.toLowerCase()=="false");
case "function":
if(d.isFunction(_15e)){
_15e=_15e.toString();
_15e=d.trim(_15e.substring(_15e.indexOf("{")+1,_15e.length-1));
}
try{
if(_15e.search(/[^\w\.]+/i)!=-1){
_15e=d.parser._nameAnonFunc(new Function(_15e),this);
}
return d.getObject(_15e,false);
}
catch(e){
return new Function();
}
case "array":
return _15e.split(/\s*,\s*/);
case "date":
switch(_15e){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_15e);
}
case "url":
return d.baseUrl+_15e;
default:
return d.fromJson(_15e);
}
};
var _160={};
function getClassInfo(_161){
if(!_160[_161]){
var cls=d.getObject(_161);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_161+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _163=cls.prototype;
var _164={};
for(var name in _163){
if(name.charAt(0)=="_"){
continue;
}
var _166=_163[name];
_164[name]=val2type(_166);
}
_160[_161]={cls:cls,params:_164};
}
return _160[_161];
};
this._functionFromScript=function(_167){
var _168="";
var _169="";
var _16a=_167.getAttribute("args");
if(_16a){
d.forEach(_16a.split(/\s*,\s*/),function(part,idx){
_168+="var "+part+" = arguments["+idx+"]; ";
});
}
var _16d=_167.getAttribute("with");
if(_16d&&_16d.length){
d.forEach(_16d.split(/\s*,\s*/),function(part){
_168+="with("+part+"){";
_169+="}";
});
}
return new Function(_168+_167.innerHTML+_169);
};
this.instantiate=function(_16f){
var _170=[];
d.forEach(_16f,function(node){
if(!node){
return;
}
var type=node.getAttribute(_15b);
if((!type)||(!type.length)){
return;
}
var _173=getClassInfo(type);
var _174=_173.cls;
var ps=_174._noScript||_174.prototype._noScript;
var _176={};
var _177=node.attributes;
for(var name in _173.params){
var item=_177.getNamedItem(name);
if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){
continue;
}
var _17a=item.value;
switch(name){
case "class":
_17a=node.className;
break;
case "style":
_17a=node.style&&node.style.cssText;
}
var _17b=_173.params[name];
_176[name]=str2obj(_17a,_17b);
}
if(!ps){
var _17c=[],_17d=[];
d.query("> script[type^='dojo/']",node).orphan().forEach(function(_17e){
var _17f=_17e.getAttribute("event"),type=_17e.getAttribute("type"),nf=d.parser._functionFromScript(_17e);
if(_17f){
if(type=="dojo/connect"){
_17c.push({event:_17f,func:nf});
}else{
_176[_17f]=nf;
}
}else{
_17d.push(nf);
}
});
}
var _181=_174["markupFactory"];
if(!_181&&_174["prototype"]){
_181=_174.prototype["markupFactory"];
}
var _182=_181?_181(_176,node,_174):new _174(_176,node);
_170.push(_182);
var _183=node.getAttribute("jsId");
if(_183){
d.setObject(_183,_182);
}
if(!ps){
d.forEach(_17c,function(_184){
d.connect(_182,_184.event,null,_184.func);
});
d.forEach(_17d,function(func){
func.call(_182);
});
}
});
d.forEach(_170,function(_186){
if(_186&&_186.startup&&!_186._started&&(!_186.getParent||!_186.getParent())){
_186.startup();
}
});
return _170;
};
this.parse=function(_187){
var list=d.query(qry,_187);
var _189=this.instantiate(list);
return _189;
};
}();
(function(){
var _18a=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,_18a);
}else{
dojo._loaders.unshift(_18a);
}
})();
dojo.parser._anonCtr=0;
dojo.parser._anon={};
dojo.parser._nameAnonFunc=function(_18b,_18c){
var jpn="$joinpoint";
var nso=(_18c||dojo.parser._anon);
if(dojo.isIE){
var cn=_18b["__dojoNameCache"];
if(cn&&nso[cn]===_18b){
return _18b["__dojoNameCache"];
}
}
var ret="__"+dojo.parser._anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.parser._anonCtr++;
}
nso[ret]=_18b;
return ret;
};
}
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(_196,map,_198,_199){
return _196.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_19a,key,_19c){
var _19d=dojo.getObject(key,false,map);
if(_19c){
_19d=dojo.getObject(_19c,false,_199)(_19d);
}
if(_198){
_19d=_198(_19d,key);
}
return _19d.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.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_1a0,_1a1,_1a2){
_1a2=dojo.i18n.normalizeLocale(_1a2);
var _1a3=_1a2.split("-");
var _1a4=[_1a0,"nls",_1a1].join(".");
var _1a5=dojo._loadedModules[_1a4];
if(_1a5){
var _1a6;
for(var i=_1a3.length;i>0;i--){
var loc=_1a3.slice(0,i).join("_");
if(_1a5[loc]){
_1a6=_1a5[loc];
break;
}
}
if(!_1a6){
_1a6=_1a5.ROOT;
}
if(_1a6){
var _1a9=function(){
};
_1a9.prototype=_1a6;
return new _1a9();
}
}
throw new Error("Bundle not found: "+_1a1+" in "+_1a0+" , locale="+_1a2);
};
dojo.i18n.normalizeLocale=function(_1aa){
var _1ab=_1aa?_1aa.toLowerCase():dojo.locale;
if(_1ab=="root"){
_1ab="ROOT";
}
return _1ab;
};
dojo.i18n._requireLocalization=function(_1ac,_1ad,_1ae,_1af){
var _1b0=dojo.i18n.normalizeLocale(_1ae);
var _1b1=[_1ac,"nls",_1ad].join(".");
var _1b2="";
if(_1af){
var _1b3=_1af.split(",");
for(var i=0;i<_1b3.length;i++){
if(_1b0.indexOf(_1b3[i])==0){
if(_1b3[i].length>_1b2.length){
_1b2=_1b3[i];
}
}
}
if(!_1b2){
_1b2="ROOT";
}
}
var _1b5=_1af?_1b2:_1b0;
var _1b6=dojo._loadedModules[_1b1];
var _1b7=null;
if(_1b6){
if(dojo.config.localizationComplete&&_1b6._built){
return;
}
var _1b8=_1b5.replace(/-/g,"_");
var _1b9=_1b1+"."+_1b8;
_1b7=dojo._loadedModules[_1b9];
}
if(!_1b7){
_1b6=dojo["provide"](_1b1);
var syms=dojo._getModuleSymbols(_1ac);
var _1bb=syms.concat("nls").join("/");
var _1bc;
dojo.i18n._searchLocalePath(_1b5,_1af,function(loc){
var _1be=loc.replace(/-/g,"_");
var _1bf=_1b1+"."+_1be;
var _1c0=false;
if(!dojo._loadedModules[_1bf]){
dojo["provide"](_1bf);
var _1c1=[_1bb];
if(loc!="ROOT"){
_1c1.push(loc);
}
_1c1.push(_1ad);
var _1c2=_1c1.join("/")+".js";
_1c0=dojo._loadPath(_1c2,null,function(hash){
var _1c4=function(){
};
_1c4.prototype=_1bc;
_1b6[_1be]=new _1c4();
for(var j in hash){
_1b6[_1be][j]=hash[j];
}
});
}else{
_1c0=true;
}
if(_1c0&&_1b6[_1be]){
_1bc=_1b6[_1be];
}else{
_1b6[_1be]=_1bc;
}
if(_1af){
return true;
}
});
}
if(_1af&&_1b0!=_1b2){
_1b6[_1b0.replace(/-/g,"_")]=_1b6[_1b2.replace(/-/g,"_")];
}
};
(function(){
var _1c6=dojo.config.extraLocale;
if(_1c6){
if(!_1c6 instanceof Array){
_1c6=[_1c6];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_1ca,_1cb){
req(m,b,_1ca,_1cb);
if(_1ca){
return;
}
for(var i=0;i<_1c6.length;i++){
req(m,b,_1c6[i],_1cb);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_1cd,down,_1cf){
_1cd=dojo.i18n.normalizeLocale(_1cd);
var _1d0=_1cd.split("-");
var _1d1=[];
for(var i=_1d0.length;i>0;i--){
_1d1.push(_1d0.slice(0,i).join("-"));
}
_1d1.push(false);
if(down){
_1d1.reverse();
}
for(var j=_1d1.length-1;j>=0;j--){
var loc=_1d1[j]||"ROOT";
var stop=_1cf(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_1d6,_1d7){
function preload(_1d8){
_1d8=dojo.i18n.normalizeLocale(_1d8);
dojo.i18n._searchLocalePath(_1d8,true,function(loc){
for(var i=0;i<_1d7.length;i++){
if(_1d7[i]==loc){
dojo["require"](_1d6+"_"+loc);
return true;
}
}
return false;
});
};
preload();
var _1db=dojo.config.extraLocale||[];
for(var i=0;i<_1db.length;i++){
preload(_1db[i]);
}
};
}
if(!dojo._hasResource["dijit.layout.ContentPane"]){
dojo._hasResource["dijit.layout.ContentPane"]=true;
dojo.provide("dijit.layout.ContentPane");
dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,"class":"dijitContentPane",doLayout:"auto",postCreate:function(){
this.domNode.title="";
if(!this.containerNode){
this.containerNode=this.domNode;
}
if(this.preload){
this._loadCheck();
}
var _1dd=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_1dd);
this.errorMessage=dojo.string.substitute(this.errorMessage,_1dd);
var _1de=dijit.getWaiRole(this.domNode);
if(!_1de){
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 _1df=dojo.query(">",this.containerNode||this.domNode),_1e0=_1df.filter("[widgetId]");
if(_1df.length==1&&_1e0.length==1){
this.isContainer=true;
this._singleChild=dijit.byNode(_1e0[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(_1e6){
this.cancel();
this.isLoaded=false;
this._loadCheck(_1e6);
},_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(_1e8){
var _1e9=this._isShown();
if(this.href&&(_1e8||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_1e9&&!this._xhrDfd)||(!this.isLoaded&&_1e9&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._onUnloadHandler();
this._setContent(this.onDownloadStart.call(this));
var self=this;
var _1eb={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_1eb,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_1eb);
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 _1f2=this.onContentError(e);
try{
node.innerHTML=_1f2;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
}
},_onError:function(type,err,_1f5){
var _1f6=this["on"+type+"Error"].call(this,err);
if(_1f5){
console.error(_1f5,err);
}else{
if(_1f6){
this._setContent.call(this,_1f6);
}
}
},_createSubWidgets:function(){
var _1f7=this.containerNode||this.domNode;
try{
dojo.parser.parse(_1f7,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(_1fa){
},onDownloadError:function(_1fb){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
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 _1fd=this.declaredClass,_1fe=this;
return dojo.string.substitute(tmpl,this,function(_1ff,key){
if(key.charAt(0)=="!"){
_1ff=_1fe[key.substr(1)];
}
if(typeof _1ff=="undefined"){
throw new Error(_1fd+" template:"+key);
}
if(!_1ff){
return "";
}
return key.charAt(0)=="!"?_1ff:_1ff.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _201=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_201)){
node=dijit._Templated._createNodesFromText(this._stringRepl(_201))[0];
}else{
node=_201.cloneNode(true);
}
this._attachTemplateNodes(node);
var _203=this.srcNodeRef;
if(_203&&_203.parentNode){
_203.parentNode.replaceChild(node,_203);
}
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(_203);
},_fillContent:function(_207){
var dest=this.containerNode;
if(_207&&dest){
while(_207.hasChildNodes()){
dest.appendChild(_207.firstChild);
}
}
},_attachTemplateNodes:function(_209,_20a){
_20a=_20a||function(n,p){
return n.getAttribute(p);
};
var _20d=dojo.isArray(_209)?_209:(_209.all||_209.getElementsByTagName("*"));
var x=dojo.isArray(_209)?0:-1;
for(;x<_20d.length;x++){
var _20f=(x==-1)?_209:_20d[x];
if(this.widgetsInTemplate&&_20a(_20f,"dojoType")){
continue;
}
var _210=_20a(_20f,"dojoAttachPoint");
if(_210){
var _211,_212=_210.split(/\s*,\s*/);
while((_211=_212.shift())){
if(dojo.isArray(this[_211])){
this[_211].push(_20f);
}else{
this[_211]=_20f;
}
}
}
var _213=_20a(_20f,"dojoAttachEvent");
if(_213){
var _214,_215=_213.split(/\s*,\s*/);
var trim=dojo.trim;
while((_214=_215.shift())){
if(_214){
var _217=null;
if(_214.indexOf(":")!=-1){
var _218=_214.split(":");
_214=trim(_218[0]);
_217=trim(_218[1]);
}else{
_214=trim(_214);
}
if(!_217){
_217=_214;
}
this.connect(_20f,_214,_217);
}
}
}
var role=_20a(_20f,"waiRole");
if(role){
dijit.setWaiRole(_20f,role);
}
var _21a=_20a(_20f,"waiState");
if(_21a){
dojo.forEach(_21a.split(/\s*,\s*/),function(_21b){
if(_21b.indexOf("-")!=-1){
var pair=_21b.split("-");
dijit.setWaiState(_20f,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_21d,_21e,_21f){
var _220=dijit._Templated._templateCache;
var key=_21e||_21d;
var _222=_220[key];
if(_222){
return _222;
}
if(!_21e){
_21e=dijit._Templated._sanitizeTemplateString(dojo._getText(_21d));
}
_21e=dojo.string.trim(_21e);
if(_21f||_21e.match(/\$\{([^\}]+)\}/g)){
return (_220[key]=_21e);
}else{
return (_220[key]=dijit._Templated._createNodesFromText(_21e)[0]);
}
};
dijit._Templated._sanitizeTemplateString=function(_223){
if(_223){
_223=_223.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _224=_223.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_224){
_223=_224[1];
}
}else{
_223="";
}
return _223;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
var _225=dijit._Templated._templateCache;
for(var key in _225){
var _227=_225[key];
if(!isNaN(_227.nodeType)){
dojo._destroyElement(_227);
}
delete _225[key];
}
});
}
(function(){
var _228={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 _22b="none";
var _22c=text.replace(/^\s+/,"");
for(var type in _228){
var map=_228[type];
if(map.re.test(_22c)){
_22b=type;
text=map.pre+text+map.post;
break;
}
}
tn.innerHTML=text;
if(tn.normalize){
tn.normalize();
}
var tag={cell:"tr",row:"tbody",section:"table"}[_22b];
var _230=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;
var _231=[];
while(_230.firstChild){
_231.push(_230.removeChild(_230.firstChild));
}
tn.innerHTML="";
return _231;
};
})();
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
if(!dojo._hasResource["dojo.regexp"]){
dojo._hasResource["dojo.regexp"]=true;
dojo.provide("dojo.regexp");
dojo.regexp.escapeString=function(str,_233){
return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
if(_233&&_233.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.regexp.buildGroupRE=function(arr,re,_237){
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("|"),_237);
};
dojo.regexp.group=function(_23a,_23b){
return "("+(_23b?"?:":"")+_23a+")";
};
}
if(!dojo._hasResource["dojo.cookie"]){
dojo._hasResource["dojo.cookie"]=true;
dojo.provide("dojo.cookie");
dojo.cookie=function(name,_23d,_23e){
var c=document.cookie;
if(arguments.length==1){
var _240=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));
return _240?decodeURIComponent(_240[1]):undefined;
}else{
_23e=_23e||{};
var exp=_23e.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_23e.expires=d;
}
if(exp&&exp.toUTCString){
_23e.expires=exp.toUTCString();
}
_23d=encodeURIComponent(_23d);
var _243=name+"="+_23d;
for(propName in _23e){
_243+="; "+propName;
var _244=_23e[propName];
if(_244!==true){
_243+="="+_244;
}
}
document.cookie=_243;
}
};
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["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,_246){
this.inherited(arguments);
switch(attr){
case "disabled":
var _247=this[this.attributeMap["tabIndex"]||"domNode"];
if(_246){
this._hovering=false;
this._active=false;
_247.removeAttribute("tabIndex");
}else{
_247.setAttribute("tabIndex",this.tabIndex);
}
dijit.setWaiState(this[this.attributeMap["disabled"]||"domNode"],"disabled",_246);
this._setStateClass();
}
},setDisabled:function(_248){
dojo.deprecated("setDisabled("+_248+") is deprecated. Use setAttribute('disabled',"+_248+") instead.","","2.0");
this.setAttribute("disabled",_248);
},_onMouse:function(_249){
var _24a=_249.currentTarget;
if(_24a&&_24a.getAttribute){
this.stateModifier=_24a.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_249.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 _24b=this.connect(dojo.body(),"onmouseup",function(){
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_24b);
});
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 _24c=[this.baseClass];
function multiply(_24d){
_24c=_24c.concat(dojo.map(_24c,function(c){
return c+_24d;
}),"dijit"+_24d);
};
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+" "+_24c.join(" ");
},onChange:function(_24f){
},_onChangeMonitor:"value",_onChangeActive:false,_handleOnChange:function(_250,_251){
this._lastValue=_250;
if(this._lastValueReported==undefined&&(_251===null||!this._onChangeActive)){
this._resetValue=this._lastValueReported=_250;
}
if((this.intermediateChanges||_251||_251===undefined)&&((_250&&_250.toString)?_250.toString():_250)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
this._lastValueReported=_250;
if(this._onChangeActive){
this.onChange(_250);
}
}
},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(_252){
dojo.deprecated("dijit.form._FormWidget:setValue("+_252+") is deprecated.  Use setAttribute('value',"+_252+") instead.","","2.0");
this.setAttribute("value",_252);
},_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(_255,_256){
this.value=_255;
this._handleOnChange(_255,_256);
},_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 _25d=dijit.byNode(node);
if(_25d&&typeof _25d._onSubmit=="function"){
_25d._onSubmit(e);
break;
}
}
}
}
},postCreate:function(){
if(this.showLabel==false){
var _25e="";
this.label=this.containerNode.innerHTML;
_25e=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
this.titleNode.title=_25e;
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
dojo.setSelectable(this.focusNode,false);
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_261){
this.containerNode.innerHTML=this.label=_261;
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 _262=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_262[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
if(!this.dropDown){
var _263=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_263);
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 _266=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_266||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 _26a=this.dropDown;
if(!_26a){
return;
}
if(!this._opened){
if(_26a.href&&!_26a.isLoaded){
var self=this;
var _26c=dojo.connect(_26a,"onLoad",function(){
dojo.disconnect(_26c);
self._openDropDown();
});
_26a._loadCheck(true);
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _26d=this.dropDown;
var _26e=_26d.domNode.style.width;
var self=this;
dijit.popup.open({parent:this,popup:_26d,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(){
_26d.domNode.style.width=_26e;
self.popupStateNode.removeAttribute("popupActive");
this._opened=false;
}});
if(this.domNode.offsetWidth>_26d.domNode.offsetWidth){
var _270=null;
if(!this.isLeftToRight()){
_270=_26d.domNode.parentNode;
var _271=_270.offsetLeft+_270.offsetWidth;
}
dojo.marginBox(_26d.domNode,{w:this.domNode.offsetWidth});
if(_270){
_270.style.left=_271-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_26d.focus){
_26d.focus();
}
},_closeDropDown:function(_272){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_272){
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,_27b){
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(_27c){
dojo.deprecated("setChecked("+_27c+") is deprecated. Use setAttribute('checked',"+_27c+") instead.","","2.0");
this.setAttribute("checked",_27c);
},postCreate:function(){
this.inherited(arguments);
this.setAttribute("checked",this.checked);
}});
}
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(_27d){
_27d.startup();
});
this.startupKeyNavChildren();
this.inherited(arguments);
},onExecute:function(){
},onCancel:function(_27e){
},_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(_287){
var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_287))||dijit.Menu._iframeContentDocument(_287)["__parent__"]||(_287.name&&dojo.doc.frames[_287.name])||null;
return win;
},_iframeContentDocument:function(_289){
var doc=_289.contentDocument||(_289.contentWindow&&_289.contentWindow.document)||(_289.name&&dojo.doc.frames[_289.name]&&dojo.doc.frames[_289.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(_28e){
var node=dojo.byId(_28e);
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 _298=dojo.coords(e.target,true);
x=_298.x+10;
y=_298.y+10;
}
var self=this;
var _29a=dijit.getFocus(this);
function closeAndRestoreFocus(){
dijit.focus(_29a);
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 _29c=this.focusedChild;
var _29d=_29c.popup;
if(_29d.isShowingNow){
return;
}
_29d.parentMenu=this;
var self=this;
dijit.popup.open({parent:this,popup:_29d,around:_29c.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){
dijit.popup.close(_29d);
_29c.focus();
self.currentPopup=null;
}});
this.currentPopup=_29d;
if(_29d.focus){
_29d.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(_2a1){
this.containerNode.innerHTML=this.label=_2a1;
},setDisabled:function(_2a2){
this.disabled=_2a2;
dojo[_2a2?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.containerNode,"disabled",_2a2?"true":"false");
}});
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _2a3=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_2a3[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(_2a5,_2a6){
var rxp="^";
var c=null;
for(var i=0;i<_2a5.length;i++){
c=_2a5.charAt(i);
switch(c){
case "\\":
rxp+=c;
i++;
rxp+=_2a5.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(_2a6){
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(_2ad,_2ae){
var _2af=[];
function createSortFunction(attr,dir){
return function(_2b2,_2b3){
var a=_2ae.getValue(_2b2,attr);
var b=_2ae.getValue(_2b3,attr);
var _2b6=null;
if(_2ae.comparatorMap){
if(typeof attr!=="string"){
attr=_2ae.getIdentity(attr);
}
_2b6=_2ae.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
}
_2b6=_2b6||dojo.data.util.sorter.basicComparator;
return dir*_2b6(a,b);
};
};
for(var i=0;i<_2ad.length;i++){
sortAttribute=_2ad[i];
if(sortAttribute.attribute){
var _2b8=(sortAttribute.descending)?-1:1;
_2af.push(createSortFunction(sortAttribute.attribute,_2b8));
}
}
return function(rowA,rowB){
var i=0;
while(i<_2af.length){
var ret=_2af[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(_2bd){
_2bd=_2bd||{};
if(!_2bd.store){
_2bd.store=this;
}
var self=this;
var _2bf=function(_2c0,_2c1){
if(_2c1.onError){
var _2c2=_2c1.scope||dojo.global;
_2c1.onError.call(_2c2,_2c0,_2c1);
}
};
var _2c3=function(_2c4,_2c5){
var _2c6=_2c5.abort||null;
var _2c7=false;
var _2c8=_2c5.start?_2c5.start:0;
var _2c9=_2c5.count?(_2c8+_2c5.count):_2c4.length;
_2c5.abort=function(){
_2c7=true;
if(_2c6){
_2c6.call(_2c5);
}
};
var _2ca=_2c5.scope||dojo.global;
if(!_2c5.store){
_2c5.store=self;
}
if(_2c5.onBegin){
_2c5.onBegin.call(_2ca,_2c4.length,_2c5);
}
if(_2c5.sort){
_2c4.sort(dojo.data.util.sorter.createSortFunction(_2c5.sort,self));
}
if(_2c5.onItem){
for(var i=_2c8;(i<_2c4.length)&&(i<_2c9);++i){
var item=_2c4[i];
if(!_2c7){
_2c5.onItem.call(_2ca,item,_2c5);
}
}
}
if(_2c5.onComplete&&!_2c7){
var _2cd=null;
if(!_2c5.onItem){
_2cd=_2c4.slice(_2c8,_2c9);
}
_2c5.onComplete.call(_2ca,_2cd,_2c5);
}
};
this._fetchItems(_2bd,_2c3,_2bf);
return _2bd;
};
}
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(_2ce){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_2ce.url;
this._jsonData=_2ce.data;
this._datatypeMap=_2ce.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_2cf){
return dojo.date.stamp.fromISOString(_2cf);
}};
}
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(_2d1){
if(typeof _2d1!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(item,_2d3,_2d4){
var _2d5=this.getValues(item,_2d3);
return (_2d5.length>0)?_2d5[0]:_2d4;
},getValues:function(item,_2d7){
this._assertIsItem(item);
this._assertIsAttribute(_2d7);
return item[_2d7]||[];
},getAttributes:function(item){
this._assertIsItem(item);
var _2d9=[];
for(var key in item){
if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){
_2d9.push(key);
}
}
return _2d9;
},hasAttribute:function(item,_2dc){
return this.getValues(item,_2dc).length>0;
},containsValue:function(item,_2de,_2df){
var _2e0=undefined;
if(typeof _2df==="string"){
_2e0=dojo.data.util.filter.patternToRegExp(_2df,false);
}
return this._containsValue(item,_2de,_2df,_2e0);
},_containsValue:function(item,_2e2,_2e3,_2e4){
return dojo.some(this.getValues(item,_2e2),function(_2e5){
if(_2e5!==null&&!dojo.isObject(_2e5)&&_2e4){
if(_2e5.toString().match(_2e4)){
return true;
}
}else{
if(_2e3===_2e5){
return true;
}
}
});
},isItem:function(_2e6){
if(_2e6&&_2e6[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_2e6[this._itemNumPropName]]===_2e6){
return true;
}
}
return false;
},isItemLoaded:function(_2e7){
return this.isItem(_2e7);
},loadItem:function(_2e8){
this._assertIsItem(_2e8.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(_2eb,_2ec,_2ed){
var self=this;
var _2ef=function(_2f0,_2f1){
var _2f2=[];
if(_2f0.query){
var _2f3=_2f0.queryOptions?_2f0.queryOptions.ignoreCase:false;
var _2f4={};
for(var key in _2f0.query){
var _2f6=_2f0.query[key];
if(typeof _2f6==="string"){
_2f4[key]=dojo.data.util.filter.patternToRegExp(_2f6,_2f3);
}
}
for(var i=0;i<_2f1.length;++i){
var _2f8=true;
var _2f9=_2f1[i];
if(_2f9===null){
_2f8=false;
}else{
for(var key in _2f0.query){
var _2f6=_2f0.query[key];
if(!self._containsValue(_2f9,key,_2f6,_2f4[key])){
_2f8=false;
}
}
}
if(_2f8){
_2f2.push(_2f9);
}
}
_2ec(_2f2,_2f0);
}else{
for(var i=0;i<_2f1.length;++i){
var item=_2f1[i];
if(item!==null){
_2f2.push(item);
}
}
_2ec(_2f2,_2f0);
}
};
if(this._loadFinished){
_2ef(_2eb,this._getItemsArray(_2eb.queryOptions));
}else{
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_2eb,filter:_2ef});
}else{
this._loadInProgress=true;
var _2fb={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _2fc=dojo.xhrGet(_2fb);
_2fc.addCallback(function(data){
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
_2ef(_2eb,self._getItemsArray(_2eb.queryOptions));
self._handleQueuedFetches();
}
catch(e){
self._loadFinished=true;
self._loadInProgress=false;
_2ed(e,_2eb);
}
});
_2fc.addErrback(function(_2fe){
self._loadInProgress=false;
_2ed(_2fe,_2eb);
});
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_2ef(_2eb,this._getItemsArray(_2eb.queryOptions));
}
catch(e){
_2ed(e,_2eb);
}
}else{
_2ed(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_2eb);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _300=this._queuedFetches[i];
var _301=_300.args;
var _302=_300.filter;
if(_302){
_302(_301,this._getItemsArray(_301.queryOptions));
}else{
this.fetchItemByIdentity(_301);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_303){
if(_303&&_303.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_304){
},_getItemsFromLoadedData:function(_305){
function valueIsAnItem(_306){
var _307=((_306!=null)&&(typeof _306=="object")&&(!dojo.isArray(_306))&&(!dojo.isFunction(_306))&&(_306.constructor==Object)&&(typeof _306._reference=="undefined")&&(typeof _306._type=="undefined")&&(typeof _306._value=="undefined"));
return _307;
};
var self=this;
function addItemAndSubItemsToArrayOfAllItems(_309){
self._arrayOfAllItems.push(_309);
for(var _30a in _309){
var _30b=_309[_30a];
if(_30b){
if(dojo.isArray(_30b)){
var _30c=_30b;
for(var k=0;k<_30c.length;++k){
var _30e=_30c[k];
if(valueIsAnItem(_30e)){
addItemAndSubItemsToArrayOfAllItems(_30e);
}
}
}else{
if(valueIsAnItem(_30b)){
addItemAndSubItemsToArrayOfAllItems(_30b);
}
}
}
}
};
this._labelAttr=_305.label;
var i;
var item;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_305.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
item=this._arrayOfTopLevelItems[i];
addItemAndSubItemsToArrayOfAllItems(item);
item[this._rootItemPropName]=true;
}
var _311={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
for(key in item){
if(key!==this._rootItemPropName){
var _313=item[key];
if(_313!==null){
if(!dojo.isArray(_313)){
item[key]=[_313];
}
}else{
item[key]=[null];
}
}
_311[key]=key;
}
}
while(_311[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_311[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_311[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _314;
var _315=_305.identifier;
if(_315){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_315;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
_314=item[_315];
var _316=_314[0];
if(!this._itemsByIdentity[_316]){
this._itemsByIdentity[_316]=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: ["+_315+"].  Value collided: ["+_316+"]");
}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: ["+_315+"].  Value collided: ["+_316+"]");
}
}
}
}
}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){
_314=item[key];
for(var j=0;j<_314.length;++j){
_313=_314[j];
if(_313!==null&&typeof _313=="object"){
if(_313._type&&_313._value){
var type=_313._type;
var _319=this._datatypeMap[type];
if(!_319){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");
}else{
if(dojo.isFunction(_319)){
_314[j]=new _319(_313._value);
}else{
if(dojo.isFunction(_319.deserialize)){
_314[j]=_319.deserialize(_313._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(_313._reference){
var _31a=_313._reference;
if(!dojo.isObject(_31a)){
_314[j]=this._itemsByIdentity[_31a];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _31c=this._arrayOfAllItems[k];
var _31d=true;
for(var _31e in _31a){
if(_31c[_31e]!=_31a[_31e]){
_31d=false;
}
}
if(_31d){
_314[j]=_31c;
}
}
}
if(this.referenceIntegrity){
var _31f=_314[j];
if(this.isItem(_31f)){
this._addReferenceToMap(_31f,item,key);
}
}
}else{
if(this.isItem(_313)){
if(this.referenceIntegrity){
this._addReferenceToMap(_313,item,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_320,_321,_322){
},getIdentity:function(item){
var _324=this._features["dojo.data.api.Identity"];
if(_324===Number){
return item[this._itemNumPropName];
}else{
var _325=item[_324];
if(_325){
return _325[0];
}
}
return null;
},fetchItemByIdentity:function(_326){
if(!this._loadFinished){
var self=this;
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_326});
}else{
this._loadInProgress=true;
var _328={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _329=dojo.xhrGet(_328);
_329.addCallback(function(data){
var _32b=_326.scope?_326.scope:dojo.global;
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
var item=self._getItemByIdentity(_326.identity);
if(_326.onItem){
_326.onItem.call(_32b,item);
}
self._handleQueuedFetches();
}
catch(error){
self._loadInProgress=false;
if(_326.onError){
_326.onError.call(_32b,error);
}
}
});
_329.addErrback(function(_32d){
self._loadInProgress=false;
if(_326.onError){
var _32e=_326.scope?_326.scope:dojo.global;
_326.onError.call(_32e,_32d);
}
});
}
}else{
if(this._jsonData){
self._getItemsFromLoadedData(self._jsonData);
self._jsonData=null;
self._loadFinished=true;
var item=self._getItemByIdentity(_326.identity);
if(_326.onItem){
var _330=_326.scope?_326.scope:dojo.global;
_326.onItem.call(_330,item);
}
}
}
}else{
var item=this._getItemByIdentity(_326.identity);
if(_326.onItem){
var _330=_326.scope?_326.scope:dojo.global;
_326.onItem.call(_330,item);
}
}
},_getItemByIdentity:function(_331){
var item=null;
if(this._itemsByIdentity){
item=this._itemsByIdentity[_331];
}else{
item=this._arrayOfAllItems[_331];
}
if(item===undefined){
item=null;
}
return item;
},getIdentityAttributes:function(item){
var _334=this._features["dojo.data.api.Identity"];
if(_334===Number){
return null;
}else{
return [_334];
}
},_forceLoad:function(){
var self=this;
if(this._jsonFileUrl){
var _336={url:self._jsonFileUrl,handleAs:"json-comment-optional",sync:true};
var _337=dojo.xhrGet(_336);
_337.addCallback(function(data){
try{
if(self._loadInProgress!==true&&!self._loadFinished){
self._getItemsFromLoadedData(data);
self._loadFinished=true;
}
}
catch(e){
console.log(e);
throw e;
}
});
_337.addErrback(function(_339){
throw _339;
});
}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(_33a){
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(_33a&&(_33a.referenceIntegrity===false)){
this.referenceIntegrity=false;
}
this._saveInProgress=false;
},referenceIntegrity:true,_assert:function(_33c){
if(!_33c){
throw new Error("assertion failed in ItemFileWriteStore");
}
},_getIdentifierAttribute:function(){
var _33d=this.getFeatures()["dojo.data.api.Identity"];
return _33d;
},newItem:function(_33e,_33f){
this._assert(!this._saveInProgress);
if(!this._loadFinished){
this._forceLoad();
}
if(typeof _33e!="object"&&typeof _33e!="undefined"){
throw new Error("newItem() was passed something other than an object");
}
var _340=null;
var _341=this._getIdentifierAttribute();
if(_341===Number){
_340=this._arrayOfAllItems.length;
}else{
_340=_33e[_341];
if(typeof _340==="undefined"){
throw new Error("newItem() was not passed an identity for the new item");
}
if(dojo.isArray(_340)){
throw new Error("newItem() was not passed an single-valued identity");
}
}
if(this._itemsByIdentity){
this._assert(typeof this._itemsByIdentity[_340]==="undefined");
}
this._assert(typeof this._pending._newItems[_340]==="undefined");
this._assert(typeof this._pending._deletedItems[_340]==="undefined");
var _342={};
_342[this._storeRefPropName]=this;
_342[this._itemNumPropName]=this._arrayOfAllItems.length;
if(this._itemsByIdentity){
this._itemsByIdentity[_340]=_342;
_342[_341]=[_340];
}
this._arrayOfAllItems.push(_342);
var _343=null;
if(_33f&&_33f.parent&&_33f.attribute){
_343={item:_33f.parent,attribute:_33f.attribute,oldValue:undefined};
var _344=this.getValues(_33f.parent,_33f.attribute);
if(_344&&_344.length>0){
var _345=_344.slice(0,_344.length);
if(_344.length===1){
_343.oldValue=_344[0];
}else{
_343.oldValue=_344.slice(0,_344.length);
}
_345.push(_342);
this._setValueOrValues(_33f.parent,_33f.attribute,_345,false);
_343.newValue=this.getValues(_33f.parent,_33f.attribute);
}else{
this._setValueOrValues(_33f.parent,_33f.attribute,_342,false);
_343.newValue=_342;
}
}else{
_342[this._rootItemPropName]=true;
this._arrayOfTopLevelItems.push(_342);
}
this._pending._newItems[_340]=_342;
for(var key in _33e){
if(key===this._storeRefPropName||key===this._itemNumPropName){
throw new Error("encountered bug in ItemFileWriteStore.newItem");
}
var _347=_33e[key];
if(!dojo.isArray(_347)){
_347=[_347];
}
_342[key]=_347;
if(this.referenceIntegrity){
for(var i=0;i<_347.length;i++){
var val=_347[i];
if(this.isItem(val)){
this._addReferenceToMap(val,_342,key);
}
}
}
}
this.onNew(_342,_343);
return _342;
},_removeArrayElement:function(_34a,_34b){
var _34c=dojo.indexOf(_34a,_34b);
if(_34c!=-1){
_34a.splice(_34c,1);
return true;
}
return false;
},deleteItem:function(item){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
var _34e=item[this._itemNumPropName];
var _34f=this.getIdentity(item);
if(this.referenceIntegrity){
var _350=this.getAttributes(item);
if(item[this._reverseRefMap]){
item["backup_"+this._reverseRefMap]=dojo.clone(item[this._reverseRefMap]);
}
dojo.forEach(_350,function(_351){
dojo.forEach(this.getValues(item,_351),function(_352){
if(this.isItem(_352)){
if(!item["backupRefs_"+this._reverseRefMap]){
item["backupRefs_"+this._reverseRefMap]=[];
}
item["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(_352),attr:_351});
this._removeReferenceFromMap(_352,item,_351);
}
},this);
},this);
var _353=item[this._reverseRefMap];
if(_353){
for(var _354 in _353){
var _355=null;
if(this._itemsByIdentity){
_355=this._itemsByIdentity[_354];
}else{
_355=this._arrayOfAllItems[_354];
}
if(_355){
for(var _356 in _353[_354]){
var _357=this.getValues(_355,_356)||[];
var _358=dojo.filter(_357,function(_359){
return !(this.isItem(_359)&&this.getIdentity(_359)==_34f);
},this);
this._removeReferenceFromMap(item,_355,_356);
if(_358.length<_357.length){
this.setValues(_355,_356,_358);
}
}
}
}
}
}
this._arrayOfAllItems[_34e]=null;
item[this._storeRefPropName]=null;
if(this._itemsByIdentity){
delete this._itemsByIdentity[_34f];
}
this._pending._deletedItems[_34f]=item;
if(item[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,item);
}
this.onDelete(item);
return true;
},setValue:function(item,_35b,_35c){
return this._setValueOrValues(item,_35b,_35c,true);
},setValues:function(item,_35e,_35f){
return this._setValueOrValues(item,_35e,_35f,true);
},unsetAttribute:function(item,_361){
return this._setValueOrValues(item,_361,[],true);
},_setValueOrValues:function(item,_363,_364,_365){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
this._assert(dojo.isString(_363));
this._assert(typeof _364!=="undefined");
var _366=this._getIdentifierAttribute();
if(_363==_366){
throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
}
var _367=this._getValueOrValues(item,_363);
var _368=this.getIdentity(item);
if(!this._pending._modifiedItems[_368]){
var _369={};
for(var key in item){
if((key===this._storeRefPropName)||(key===this._itemNumPropName)||(key===this._rootItemPropName)){
_369[key]=item[key];
}else{
if(key===this._reverseRefMap){
_369[key]=dojo.clone(item[key]);
}else{
_369[key]=item[key].slice(0,item[key].length);
}
}
}
this._pending._modifiedItems[_368]=_369;
}
var _36b=false;
if(dojo.isArray(_364)&&_364.length===0){
_36b=delete item[_363];
_364=undefined;
if(this.referenceIntegrity&&_367){
var _36c=_367;
if(!dojo.isArray(_36c)){
_36c=[_36c];
}
for(var i=0;i<_36c.length;i++){
var _36e=_36c[i];
if(this.isItem(_36e)){
this._removeReferenceFromMap(_36e,item,_363);
}
}
}
}else{
var _36f;
if(dojo.isArray(_364)){
var _370=_364;
_36f=_364.slice(0,_364.length);
}else{
_36f=[_364];
}
if(this.referenceIntegrity){
if(_367){
var _36c=_367;
if(!dojo.isArray(_36c)){
_36c=[_36c];
}
var map={};
dojo.forEach(_36c,function(_372){
if(this.isItem(_372)){
var id=this.getIdentity(_372);
map[id.toString()]=true;
}
},this);
dojo.forEach(_36f,function(_374){
if(this.isItem(_374)){
var id=this.getIdentity(_374);
if(map[id.toString()]){
delete map[id.toString()];
}else{
this._addReferenceToMap(_374,item,_363);
}
}
},this);
for(var rId in map){
var _377;
if(this._itemsByIdentity){
_377=this._itemsByIdentity[rId];
}else{
_377=this._arrayOfAllItems[rId];
}
this._removeReferenceFromMap(_377,item,_363);
}
}else{
for(var i=0;i<_36f.length;i++){
var _36e=_36f[i];
if(this.isItem(_36e)){
this._addReferenceToMap(_36e,item,_363);
}
}
}
}
item[_363]=_36f;
_36b=true;
}
if(_365){
this.onSet(item,_363,_367,_364);
}
return _36b;
},_addReferenceToMap:function(_378,_379,_37a){
var _37b=this.getIdentity(_379);
var _37c=_378[this._reverseRefMap];
if(!_37c){
_37c=_378[this._reverseRefMap]={};
}
var _37d=_37c[_37b];
if(!_37d){
_37d=_37c[_37b]={};
}
_37d[_37a]=true;
},_removeReferenceFromMap:function(_37e,_37f,_380){
var _381=this.getIdentity(_37f);
var _382=_37e[this._reverseRefMap];
var _383;
if(_382){
for(_383 in _382){
if(_383==_381){
delete _382[_383][_380];
if(this._isEmpty(_382[_383])){
delete _382[_383];
}
}
}
if(this._isEmpty(_382)){
delete _37e[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,_387){
var _388=undefined;
if(this.hasAttribute(item,_387)){
var _389=this.getValues(item,_387);
if(_389.length==1){
_388=_389[0];
}else{
_388=_389;
}
}
return _388;
},_flatten:function(_38a){
if(this.isItem(_38a)){
var item=_38a;
var _38c=this.getIdentity(item);
var _38d={_reference:_38c};
return _38d;
}else{
if(typeof _38a==="object"){
for(var type in this._datatypeMap){
var _38f=this._datatypeMap[type];
if(dojo.isObject(_38f)&&!dojo.isFunction(_38f)){
if(_38a instanceof _38f.type){
if(!_38f.serialize){
throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: ["+type+"]");
}
return {_type:type,_value:_38f.serialize(_38a)};
}
}else{
if(_38a instanceof _38f){
return {_type:type,_value:_38a.toString()};
}
}
}
}
return _38a;
}
},_getNewFileContentString:function(){
var _390={};
var _391=this._getIdentifierAttribute();
if(_391!==Number){
_390.identifier=_391;
}
if(this._labelAttr){
_390.label=this._labelAttr;
}
_390.items=[];
for(var i=0;i<this._arrayOfAllItems.length;++i){
var item=this._arrayOfAllItems[i];
if(item!==null){
var _394={};
for(var key in item){
if(key!==this._storeRefPropName&&key!==this._itemNumPropName){
var _396=key;
var _397=this.getValues(item,_396);
if(_397.length==1){
_394[_396]=this._flatten(_397[0]);
}else{
var _398=[];
for(var j=0;j<_397.length;++j){
_398.push(this._flatten(_397[j]));
_394[_396]=_398;
}
}
}
}
_390.items.push(_394);
}
}
var _39a=true;
return dojo.toJson(_390,_39a);
},_isEmpty:function(_39b){
var _39c=true;
if(dojo.isObject(_39b)){
var i;
for(i in _39b){
_39c=false;
break;
}
}else{
if(dojo.isArray(_39b)){
if(_39b.length>0){
_39c=false;
}
}
}
return _39c;
},save:function(_39e){
this._assert(!this._saveInProgress);
this._saveInProgress=true;
var self=this;
var _3a0=function(){
self._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
self._saveInProgress=false;
if(_39e&&_39e.onComplete){
var _3a1=_39e.scope||dojo.global;
_39e.onComplete.call(_3a1);
}
};
var _3a2=function(){
self._saveInProgress=false;
if(_39e&&_39e.onError){
var _3a3=_39e.scope||dojo.global;
_39e.onError.call(_3a3);
}
};
if(this._saveEverything){
var _3a4=this._getNewFileContentString();
this._saveEverything(_3a0,_3a2,_3a4);
}
if(this._saveCustom){
this._saveCustom(_3a0,_3a2);
}
if(!this._saveEverything&&!this._saveCustom){
_3a0();
}
},revert:function(){
this._assert(!this._saveInProgress);
var _3a5;
for(_3a5 in this._pending._newItems){
var _3a6=this._pending._newItems[_3a5];
_3a6[this._storeRefPropName]=null;
this._arrayOfAllItems[_3a6[this._itemNumPropName]]=null;
if(_3a6[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,_3a6);
}
if(this._itemsByIdentity){
delete this._itemsByIdentity[_3a5];
}
}
for(_3a5 in this._pending._modifiedItems){
var _3a7=this._pending._modifiedItems[_3a5];
var _3a8=null;
if(this._itemsByIdentity){
_3a8=this._itemsByIdentity[_3a5];
}else{
_3a8=this._arrayOfAllItems[_3a5];
}
_3a7[this._storeRefPropName]=this;
_3a8[this._storeRefPropName]=null;
var _3a9=_3a8[this._itemNumPropName];
this._arrayOfAllItems[_3a9]=_3a7;
if(_3a8[this._rootItemPropName]){
var i;
for(i=0;i<this._arrayOfTopLevelItems.length;i++){
var _3ab=this._arrayOfTopLevelItems[i];
if(this.getIdentity(_3ab)==_3a5){
this._arrayOfTopLevelItems[i]=_3a7;
break;
}
}
}
if(this._itemsByIdentity){
this._itemsByIdentity[_3a5]=_3a7;
}
}
var _3ac;
for(_3a5 in this._pending._deletedItems){
_3ac=this._pending._deletedItems[_3a5];
_3ac[this._storeRefPropName]=this;
var _3ad=_3ac[this._itemNumPropName];
if(_3ac["backup_"+this._reverseRefMap]){
_3ac[this._reverseRefMap]=_3ac["backup_"+this._reverseRefMap];
delete _3ac["backup_"+this._reverseRefMap];
}
this._arrayOfAllItems[_3ad]=_3ac;
if(this._itemsByIdentity){
this._itemsByIdentity[_3a5]=_3ac;
}
if(_3ac[this._rootItemPropName]){
this._arrayOfTopLevelItems.push(_3ac);
}
}
for(_3a5 in this._pending._deletedItems){
_3ac=this._pending._deletedItems[_3a5];
if(_3ac["backupRefs_"+this._reverseRefMap]){
dojo.forEach(_3ac["backupRefs_"+this._reverseRefMap],function(_3ae){
var _3af;
if(this._itemsByIdentity){
_3af=this._itemsByIdentity[_3ae.id];
}else{
_3af=this._arrayOfAllItems[_3ae.id];
}
this._addReferenceToMap(_3af,_3ac,_3ae.attr);
},this);
delete _3ac["backupRefs_"+this._reverseRefMap];
}
}
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
return true;
},isDirty:function(item){
if(item){
var _3b1=this.getIdentity(item);
return new Boolean(this._pending._newItems[_3b1]||this._pending._modifiedItems[_3b1]||this._pending._deletedItems[_3b1]);
}else{
if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)){
return true;
}
return false;
}
},onSet:function(item,_3b3,_3b4,_3b5){
},onNew:function(_3b6,_3b7){
},onDelete:function(_3b8){
}});
}
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(_3b9){
var menu=this.dropDown;
if(!_3b9.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _3bb=dojo.hitch(this,"setAttribute","value",_3b9);
var mi=new dijit.MenuItem({id:this.id+"_item_"+_3b9.value,label:_3b9.label,onClick:_3bb});
menu.addChild(mi);
}
},_resetButtonState:function(){
var len=this.options.length;
var _3be=this.dropDown;
dojo.forEach(_3be.getChildren(),function(_3bf){
_3bf.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 _3c1=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_3c2){
dojo[_3c2.id===_3c1?"addClass":"removeClass"](_3c2.domNode,this.baseClass+"SelectedOption");
},this);
}
},addOption:function(_3c3,_3c4){
this.options.push(_3c3.value?_3c3:{value:_3c3,label:_3c4});
},removeOption:function(_3c5){
this.options=dojo.filter(this.options,function(node,idx){
return !((typeof _3c5==="number"&&idx===_3c5)||(typeof _3c5==="string"&&node.value===_3c5)||(_3c5.value&&node.value===_3c5.value));
});
},setOptionLabel:function(_3c8,_3c9){
dojo.forEach(this.options,function(node){
if(node.value===_3c8){
node.label=_3c9;
}
});
},destroy:function(){
if(this._labelHackHandle){
clearTimeout(this._labelHackHandle);
}
this.inherited(arguments);
},setLabel:function(_3cb){
_3cb="<div class=\" "+this.baseClass+"Label\">"+_3cb+"</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,_3cb);
}),0);
}else{
this.inherited(arguments);
}
},setAttribute:function(attr,_3cd){
if(attr==="value"){
if(typeof _3cd==="string"){
_3cd=dojo.filter(this.options,function(node){
return node.value===_3cd;
})[0];
}
if(!_3cd){
_3cd=this.options[0]||{value:"",label:""};
}
this.value=_3cd.value;
if(this._started){
this.setLabel(_3cd.label||this.emptyLabel||"&nbsp;");
}
this._handleOnChange(_3cd.value);
_3cd=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(_3d3){
var _3d4=this.dropDown;
dojo.forEach(this.options,this._addMenuItem,this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
this._isPopulated=true;
if(_3d3){
_3d3.call(this);
}
},_toggleDropDown:function(){
var _3d5=this.dropDown;
if(_3d5&&!_3d5.isShowingNow&&!this._isPopulated){
this._populate(dojox.form.DropDownSelect.superclass._toggleDropDown);
}else{
this.inherited(arguments);
}
}});
}
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(_3e5){
for(var j=0;j<_3e5.length;j++){
var p="$";
var x=_3e5[j];
for(var i=1,n=x.length;i<n;i++){
p+=/^[0-9*]+$/.test(x[i])?("["+x[i]+"]"):("['"+x[i]+"']");
}
_3e5[j]=p;
}
return _3e5;
},exec:function(locs,val,rb){
var path=["$"];
var _3ef=rb?val:[val];
var _3f0=[path];
function add(v,p,def){
if(v&&v.hasOwnProperty(p)&&P.resultType!="VALUE"){
_3f0.push(path.concat([p]));
}
if(def){
_3ef=v[p];
}else{
if(v&&v.hasOwnProperty(p)){
_3ef.push(v[p]);
}
}
};
function desc(v){
_3ef.push(v);
_3f0.push(path);
P.walk(v,function(i){
if(typeof v[i]==="object"){
var _3f6=path;
path=path.concat(i);
desc(v[i]);
path=_3f6;
}
});
};
function slice(loc,val){
if(val instanceof Array){
var len=val.length,_3fa=0,end=len,step=1;
loc.replace(/^(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)$/g,function($0,$1,$2,$3){
_3fa=parseInt($1||_3fa);
end=parseInt($2||end);
step=parseInt($3||step);
});
_3fa=(_3fa<0)?Math.max(0,_3fa+len):Math.min(len,_3fa);
end=(end<0)?Math.max(0,end+len):Math.min(len,end);
for(var i=_3fa;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=_3ef)===null||val===undefined){
return val;
}
_3ef=[];
var _40e=_3f0;
_3f0=[];
if(rb){
oper(val);
}else{
P.walk(val,function(i){
path=_40e[i]||path;
oper(val[i]);
});
}
}
if(P.resultType=="BOTH"){
_3f0=P.asPaths(_3f0);
var _410=[];
for(var i=0;i<_3f0.length;i++){
_410.push({path:_3f0[i],value:_3ef[i]});
}
return _410;
}
return P.resultType=="PATH"?P.asPaths(_3f0):_3ef;
},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["dojox.jsonPath"]){
dojo._hasResource["dojox.jsonPath"]=true;
dojo.provide("dojox.jsonPath");
}
if(!dojo._hasResource["dojo.number"]){
dojo._hasResource["dojo.number"]=true;
dojo.provide("dojo.number");
dojo.number.format=function(_41a,_41b){
_41b=dojo.mixin({},_41b||{});
var _41c=dojo.i18n.normalizeLocale(_41b.locale);
var _41d=dojo.i18n.getLocalization("dojo.cldr","number",_41c);
_41b.customs=_41d;
var _41e=_41b.pattern||_41d[(_41b.type||"decimal")+"Format"];
if(isNaN(_41a)){
return null;
}
return dojo.number._applyPattern(_41a,_41e,_41b);
};
dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;
dojo.number._applyPattern=function(_41f,_420,_421){
_421=_421||{};
var _422=_421.customs.group;
var _423=_421.customs.decimal;
var _424=_420.split(";");
var _425=_424[0];
_420=_424[(_41f<0)?1:0]||("-"+_425);
if(_420.indexOf("%")!=-1){
_41f*=100;
}else{
if(_420.indexOf("‰")!=-1){
_41f*=1000;
}else{
if(_420.indexOf("¤")!=-1){
_422=_421.customs.currencyGroup||_422;
_423=_421.customs.currencyDecimal||_423;
_420=_420.replace(/\u00a4{1,3}/,function(_426){
var prop=["symbol","currency","displayName"][_426.length-1];
return _421[prop]||_421.currency||"";
});
}else{
if(_420.indexOf("E")!=-1){
throw new Error("exponential notation not supported");
}
}
}
}
var _428=dojo.number._numberPatternRE;
var _429=_425.match(_428);
if(!_429){
throw new Error("unable to find a number expression in pattern: "+_420);
}
return _420.replace(_428,dojo.number._formatAbsolute(_41f,_429[0],{decimal:_423,group:_422,places:_421.places}));
};
dojo.number.round=function(_42a,_42b,_42c){
var _42d=String(_42a).split(".");
var _42e=(_42d[1]&&_42d[1].length)||0;
if(_42e>_42b){
var _42f=Math.pow(10,_42b);
if(_42c>0){
_42f*=10/_42c;
_42b++;
}
_42a=Math.round(_42a*_42f)/_42f;
_42d=String(_42a).split(".");
_42e=(_42d[1]&&_42d[1].length)||0;
if(_42e>_42b){
_42d[1]=_42d[1].substr(0,_42b);
_42a=Number(_42d.join("."));
}
}
return _42a;
};
dojo.number._formatAbsolute=function(_430,_431,_432){
_432=_432||{};
if(_432.places===true){
_432.places=0;
}
if(_432.places===Infinity){
_432.places=6;
}
var _433=_431.split(".");
var _434=(_432.places>=0)?_432.places:(_433[1]&&_433[1].length)||0;
if(!(_432.round<0)){
_430=dojo.number.round(_430,_434,_432.round);
}
var _435=String(Math.abs(_430)).split(".");
var _436=_435[1]||"";
if(_432.places){
_435[1]=dojo.string.pad(_436.substr(0,_432.places),_432.places,"0",true);
}else{
if(_433[1]&&_432.places!==0){
var pad=_433[1].lastIndexOf("0")+1;
if(pad>_436.length){
_435[1]=dojo.string.pad(_436,pad,"0",true);
}
var _438=_433[1].length;
if(_438<_436.length){
_435[1]=_436.substr(0,_438);
}
}else{
if(_435[1]){
_435.pop();
}
}
}
var _439=_433[0].replace(",","");
pad=_439.indexOf("0");
if(pad!=-1){
pad=_439.length-pad;
if(pad>_435[0].length){
_435[0]=dojo.string.pad(_435[0],pad);
}
if(_439.indexOf("#")==-1){
_435[0]=_435[0].substr(_435[0].length-pad);
}
}
var _43a=_433[0].lastIndexOf(",");
var _43b,_43c;
if(_43a!=-1){
_43b=_433[0].length-_43a-1;
var _43d=_433[0].substr(0,_43a);
_43a=_43d.lastIndexOf(",");
if(_43a!=-1){
_43c=_43d.length-_43a-1;
}
}
var _43e=[];
for(var _43f=_435[0];_43f;){
var off=_43f.length-_43b;
_43e.push((off>0)?_43f.substr(off):_43f);
_43f=(off>0)?_43f.slice(0,off):"";
if(_43c){
_43b=_43c;
delete _43c;
}
}
_435[0]=_43e.reverse().join(_432.group||",");
return _435.join(_432.decimal||".");
};
dojo.number.regexp=function(_441){
return dojo.number._parseInfo(_441).regexp;
};
dojo.number._parseInfo=function(_442){
_442=_442||{};
var _443=dojo.i18n.normalizeLocale(_442.locale);
var _444=dojo.i18n.getLocalization("dojo.cldr","number",_443);
var _445=_442.pattern||_444[(_442.type||"decimal")+"Format"];
var _446=_444.group;
var _447=_444.decimal;
var _448=1;
if(_445.indexOf("%")!=-1){
_448/=100;
}else{
if(_445.indexOf("‰")!=-1){
_448/=1000;
}else{
var _449=_445.indexOf("¤")!=-1;
if(_449){
_446=_444.currencyGroup||_446;
_447=_444.currencyDecimal||_447;
}
}
}
var _44a=_445.split(";");
if(_44a.length==1){
_44a.push("-"+_44a[0]);
}
var re=dojo.regexp.buildGroupRE(_44a,function(_44c){
_44c="(?:"+dojo.regexp.escapeString(_44c,".")+")";
return _44c.replace(dojo.number._numberPatternRE,function(_44d){
var _44e={signed:false,separator:_442.strict?_446:[_446,""],fractional:_442.fractional,decimal:_447,exponent:false};
var _44f=_44d.split(".");
var _450=_442.places;
if(_44f.length==1||_450===0){
_44e.fractional=false;
}else{
if(_450===undefined){
_450=_44f[1].lastIndexOf("0")+1;
}
if(_450&&_442.fractional==undefined){
_44e.fractional=true;
}
if(!_442.places&&(_450<_44f[1].length)){
_450+=","+_44f[1].length;
}
_44e.places=_450;
}
var _451=_44f[0].split(",");
if(_451.length>1){
_44e.groupSize=_451.pop().length;
if(_451.length>1){
_44e.groupSize2=_451.pop().length;
}
}
return "("+dojo.number._realNumberRegexp(_44e)+")";
});
},true);
if(_449){
re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_452,_453,_454,_455){
var prop=["symbol","currency","displayName"][_454.length-1];
var _457=dojo.regexp.escapeString(_442[prop]||_442.currency||"");
_453=_453?"\\s":"";
_455=_455?"\\s":"";
if(!_442.strict){
if(_453){
_453+="*";
}
if(_455){
_455+="*";
}
return "(?:"+_453+_457+_455+")?";
}
return _453+_457+_455;
});
}
return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_446,decimal:_447,factor:_448};
};
dojo.number.parse=function(_458,_459){
var info=dojo.number._parseInfo(_459);
var _45b=(new RegExp("^"+info.regexp+"$")).exec(_458);
if(!_45b){
return NaN;
}
var _45c=_45b[1];
if(!_45b[1]){
if(!_45b[2]){
return NaN;
}
_45c=_45b[2];
info.factor*=-1;
}
_45c=_45c.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");
return Number(_45c)*info.factor;
};
dojo.number._realNumberRegexp=function(_45d){
_45d=_45d||{};
if(!("places" in _45d)){
_45d.places=Infinity;
}
if(typeof _45d.decimal!="string"){
_45d.decimal=".";
}
if(!("fractional" in _45d)||/^0/.test(_45d.places)){
_45d.fractional=[true,false];
}
if(!("exponent" in _45d)){
_45d.exponent=[true,false];
}
if(!("eSigned" in _45d)){
_45d.eSigned=[true,false];
}
var _45e=dojo.number._integerRegexp(_45d);
var _45f=dojo.regexp.buildGroupRE(_45d.fractional,function(q){
var re="";
if(q&&(_45d.places!==0)){
re="\\"+_45d.decimal;
if(_45d.places==Infinity){
re="(?:"+re+"\\d+)?";
}else{
re+="\\d{"+_45d.places+"}";
}
}
return re;
},true);
var _462=dojo.regexp.buildGroupRE(_45d.exponent,function(q){
if(q){
return "([eE]"+dojo.number._integerRegexp({signed:_45d.eSigned})+")";
}
return "";
});
var _464=_45e+_45f;
if(_45f){
_464="(?:(?:"+_464+")|(?:"+_45f+"))";
}
return _464+_462;
};
dojo.number._integerRegexp=function(_465){
_465=_465||{};
if(!("signed" in _465)){
_465.signed=[true,false];
}
if(!("separator" in _465)){
_465.separator="";
}else{
if(!("groupSize" in _465)){
_465.groupSize=3;
}
}
var _466=dojo.regexp.buildGroupRE(_465.signed,function(q){
return q?"[-+]":"";
},true);
var _468=dojo.regexp.buildGroupRE(_465.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=_465.groupSize,grp2=_465.groupSize2;
if(grp2){
var _46c="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";
return ((grp-grp2)>0)?"(?:"+_46c+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_46c;
}
return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";
},true);
return _466+_468;
};
}
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(_46d){
_46d=(typeof _46d=="object")?_46d:{};
if(typeof _46d.allowCC!="boolean"){
_46d.allowCC=true;
}
if(typeof _46d.allowInfra!="boolean"){
_46d.allowInfra=true;
}
if(typeof _46d.allowGeneric!="boolean"){
_46d.allowGeneric=true;
}
var _46e="arpa";
var _46f="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(_46d.allowInfra){
a.push(_46e);
}
if(_46d.allowGeneric){
a.push(_46f);
}
if(_46d.allowCC){
a.push(ccRE);
}
var _472="";
if(a.length>0){
_472="("+a.join("|")+")";
}
return _472;
};
dojox.regexp.ipAddress=function(_473){
_473=(typeof _473=="object")?_473:{};
if(typeof _473.allowDottedDecimal!="boolean"){
_473.allowDottedDecimal=true;
}
if(typeof _473.allowDottedHex!="boolean"){
_473.allowDottedHex=true;
}
if(typeof _473.allowDottedOctal!="boolean"){
_473.allowDottedOctal=true;
}
if(typeof _473.allowDecimal!="boolean"){
_473.allowDecimal=true;
}
if(typeof _473.allowHex!="boolean"){
_473.allowHex=true;
}
if(typeof _473.allowIPv6!="boolean"){
_473.allowIPv6=true;
}
if(typeof _473.allowHybrid!="boolean"){
_473.allowHybrid=true;
}
var _474="((\\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 _475="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
var _476="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
var _477="(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 _478="0[xX]0*[\\da-fA-F]{1,8}";
var _479="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
var _47a="([\\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(_473.allowDottedDecimal){
a.push(_474);
}
if(_473.allowDottedHex){
a.push(_475);
}
if(_473.allowDottedOctal){
a.push(_476);
}
if(_473.allowDecimal){
a.push(_477);
}
if(_473.allowHex){
a.push(_478);
}
if(_473.allowIPv6){
a.push(_479);
}
if(_473.allowHybrid){
a.push(_47a);
}
var _47c="";
if(a.length>0){
_47c="("+a.join("|")+")";
}
return _47c;
};
dojox.regexp.host=function(_47d){
_47d=(typeof _47d=="object")?_47d:{};
if(typeof _47d.allowIP!="boolean"){
_47d.allowIP=true;
}
if(typeof _47d.allowLocal!="boolean"){
_47d.allowLocal=false;
}
if(typeof _47d.allowPort!="boolean"){
_47d.allowPort=true;
}
if(typeof _47d.allowNamed!="boolean"){
_47d.allowNamed=false;
}
var _47e="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojox.regexp.tld(_47d);
var _47f=_47d.allowPort?"(\\:\\d+)?":"";
var _480=_47e;
if(_47d.allowIP){
_480+="|"+dojox.regexp.ipAddress(_47d);
}
if(_47d.allowLocal){
_480+="|localhost";
}
if(_47d.allowNamed){
_480+="|^[^-][a-zA-Z0-9_-]*";
}
return "("+_480+")"+_47f;
};
dojox.regexp.url=function(_481){
_481=(typeof _481=="object")?_481:{};
if(!("scheme" in _481)){
_481.scheme=[true,false];
}
var _482=dojo.regexp.buildGroupRE(_481.scheme,function(q){
if(q){
return "(https?|ftps?)\\://";
}
return "";
});
var _484="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";
return _482+dojox.regexp.host(_481)+_484;
};
dojox.regexp.emailAddress=function(_485){
_485=(typeof _485=="object")?_485:{};
if(typeof _485.allowCruft!="boolean"){
_485.allowCruft=false;
}
_485.allowPort=false;
var _486="([\\da-zA-Z]+[-._+&'])*[\\da-zA-Z]+";
var _487=_486+"@"+dojox.regexp.host(_485);
if(_485.allowCruft){
_487="<?(mailto\\:)?"+_487+">?";
}
return _487;
};
dojox.regexp.emailAddressList=function(_488){
_488=(typeof _488=="object")?_488:{};
if(typeof _488.listSeparator!="string"){
_488.listSeparator="\\s;,";
}
var _489=dojox.regexp.emailAddress(_488);
var _48a="("+_489+"\\s*["+_488.listSeparator+"]\\s*)*"+_489+"\\s*["+_488.listSeparator+"]?\\s*";
return _48a;
};
dojox.regexp.us.state=function(_48b){
_48b=(typeof _48b=="object")?_48b:{};
if(typeof _48b.allowTerritories!="boolean"){
_48b.allowTerritories=true;
}
if(typeof _48b.allowMilitary!="boolean"){
_48b.allowMilitary=true;
}
var _48c="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 _48d="AS|FM|GU|MH|MP|PW|PR|VI";
var _48e="AA|AE|AP";
if(_48b.allowTerritories){
_48c+="|"+_48d;
}
if(_48b.allowMilitary){
_48c+="|"+_48e;
}
return "("+_48c+")";
};
dojox.regexp.ca.postalCode=function(){
var _48f="[A-Z][0-9][A-Z] [0-9][A-Z][0-9]";
return "("+_48f+")";
};
dojox.regexp.ca.province=function(){
var _490="AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT";
return "("+statesRE+")";
};
dojox.regexp.numberFormat=function(_491){
_491=(typeof _491=="object")?_491:{};
if(typeof _491.format=="undefined"){
_491.format="###-###-####";
}
var _492=function(_493){
_493=dojo.regexp.escapeString(_493,"?");
_493=_493.replace(/\?/g,"\\d?");
_493=_493.replace(/#/g,"\\d");
return _493;
};
return dojo.regexp.buildGroupRE(_491.format,_492);
};
}
if(!dojo._hasResource["dojox.validate._base"]){
dojo._hasResource["dojox.validate._base"]=true;
dojo.provide("dojox.validate._base");
dojox.validate.isText=function(_494,_495){
_495=(typeof _495=="object")?_495:{};
if(/^\s*$/.test(_494)){
return false;
}
if(typeof _495.length=="number"&&_495.length!=_494.length){
return false;
}
if(typeof _495.minlength=="number"&&_495.minlength>_494.length){
return false;
}
if(typeof _495.maxlength=="number"&&_495.maxlength<_494.length){
return false;
}
return true;
};
dojox.validate._isInRangeCache={};
dojox.validate.isInRange=function(_496,_497){
_496=dojo.number.parse(_496,_497);
if(isNaN(_496)){
return false;
}
_497=(typeof _497=="object")?_497:{};
var max=(typeof _497.max=="number")?_497.max:Infinity;
var min=(typeof _497.min=="number")?_497.min:-Infinity;
var dec=(typeof _497.decimal=="string")?_497.decimal:".";
var _49b=dojox.validate._isInRangeCache;
var _49c=_496+"max"+max+"min"+min+"dec"+dec;
if(typeof _49b[_49c]!="undefined"){
return _49b[_49c];
}
if(_496<min||_496>max){
_49b[_49c]=false;
return false;
}
_49b[_49c]=true;
return true;
};
dojox.validate.isNumberFormat=function(_49d,_49e){
var re=new RegExp("^"+dojox.regexp.numberFormat(_49e)+"$","i");
return re.test(_49d);
};
dojox.validate.isValidLuhn=function(_4a0){
var sum,_4a2,_4a3;
if(typeof _4a0!="string"){
_4a0=String(_4a0);
}
_4a0=_4a0.replace(/[- ]/g,"");
_4a2=_4a0.length%2;
sum=0;
for(var i=0;i<_4a0.length;i++){
_4a3=parseInt(_4a0.charAt(i));
if(i%2==_4a2){
_4a3*=2;
}
if(_4a3>9){
_4a3-=9;
}
sum+=_4a3;
}
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,_4a6){
var _4a7=[];
var _4a8=[];
var _4a9={isSuccessful:function(){
return (!this.hasInvalid()&&!this.hasMissing());
},hasMissing:function(){
return (_4a7.length>0);
},getMissing:function(){
return _4a7;
},isMissing:function(_4aa){
for(var i=0;i<_4a7.length;i++){
if(_4aa==_4a7[i]){
return true;
}
}
return false;
},hasInvalid:function(){
return (_4a8.length>0);
},getInvalid:function(){
return _4a8;
},isInvalid:function(_4ac){
for(var i=0;i<_4a8.length;i++){
if(_4ac==_4a8[i]){
return true;
}
}
return false;
}};
var _4ae=function(name,_4b0){
return (typeof _4b0[name]=="undefined");
};
if(_4a6.trim instanceof Array){
for(var i=0;i<_4a6.trim.length;i++){
var elem=form[_4a6.trim[i]];
if(_4ae("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/(^\s*|\s*$)/g,"");
}
}
if(_4a6.uppercase instanceof Array){
for(var i=0;i<_4a6.uppercase.length;i++){
var elem=form[_4a6.uppercase[i]];
if(_4ae("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.toUpperCase();
}
}
if(_4a6.lowercase instanceof Array){
for(var i=0;i<_4a6.lowercase.length;i++){
var elem=form[_4a6.lowercase[i]];
if(_4ae("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.toLowerCase();
}
}
if(_4a6.ucfirst instanceof Array){
for(var i=0;i<_4a6.ucfirst.length;i++){
var elem=form[_4a6.ucfirst[i]];
if(_4ae("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(_4a6.digit instanceof Array){
for(var i=0;i<_4a6.digit.length;i++){
var elem=form[_4a6.digit[i]];
if(_4ae("type",elem)||elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
elem.value=elem.value.replace(/\D/g,"");
}
}
if(_4a6.required instanceof Array){
for(var i=0;i<_4a6.required.length;i++){
if(!dojo.isString(_4a6.required[i])){
continue;
}
var elem=form[_4a6.required[i]];
if(!_4ae("type",elem)&&(elem.type=="text"||elem.type=="textarea"||elem.type=="password"||elem.type=="file")&&/^\s*$/.test(elem.value)){
_4a7[_4a7.length]=elem.name;
}else{
if(!_4ae("type",elem)&&(elem.type=="select-one"||elem.type=="select-multiple")&&(elem.selectedIndex==-1||/^\s*$/.test(elem.options[elem.selectedIndex].value))){
_4a7[_4a7.length]=elem.name;
}else{
if(elem instanceof Array){
var _4b4=false;
for(var j=0;j<elem.length;j++){
if(elem[j].checked){
_4b4=true;
}
}
if(!_4b4){
_4a7[_4a7.length]=elem[0].name;
}
}
}
}
}
}
if(_4a6.required instanceof Array){
for(var i=0;i<_4a6.required.length;i++){
if(!dojo.isObject(_4a6.required[i])){
continue;
}
var elem,_4b6;
for(var name in _4a6.required[i]){
elem=form[name];
_4b6=_4a6.required[i][name];
}
if(elem instanceof Array){
var _4b4=0;
for(var j=0;j<elem.length;j++){
if(elem[j].checked){
_4b4++;
}
}
if(_4b4<_4b6){
_4a7[_4a7.length]=elem[0].name;
}
}else{
if(!_4ae("type",elem)&&elem.type=="select-multiple"){
var _4b8=0;
for(var j=0;j<elem.options.length;j++){
if(elem.options[j].selected&&!/^\s*$/.test(elem.options[j].value)){
_4b8++;
}
}
if(_4b8<_4b6){
_4a7[_4a7.length]=elem.name;
}
}
}
}
}
if(dojo.isObject(_4a6.dependencies)){
for(name in _4a6.dependencies){
var elem=form[name];
if(_4ae("type",elem)){
continue;
}
if(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password"){
continue;
}
if(/\S+/.test(elem.value)){
continue;
}
if(_4a9.isMissing(elem.name)){
continue;
}
var _4b9=form[_4a6.dependencies[name]];
if(_4b9.type!="text"&&_4b9.type!="textarea"&&_4b9.type!="password"){
continue;
}
if(/^\s*$/.test(_4b9.value)){
continue;
}
_4a7[_4a7.length]=elem.name;
}
}
if(dojo.isObject(_4a6.constraints)){
for(name in _4a6.constraints){
var elem=form[name];
if(!elem){
continue;
}
if(!_4ae("tagName",elem)&&(elem.tagName.toLowerCase().indexOf("input")>=0||elem.tagName.toLowerCase().indexOf("textarea")>=0)&&/^\s*$/.test(elem.value)){
continue;
}
var _4ba=true;
if(dojo.isFunction(_4a6.constraints[name])){
_4ba=_4a6.constraints[name](elem.value);
}else{
if(dojo.isArray(_4a6.constraints[name])){
if(dojo.isArray(_4a6.constraints[name][0])){
for(var i=0;i<_4a6.constraints[name].length;i++){
_4ba=dojox.validate.evaluateConstraint(_4a6,_4a6.constraints[name][i],name,elem);
if(!_4ba){
break;
}
}
}else{
_4ba=dojox.validate.evaluateConstraint(_4a6,_4a6.constraints[name],name,elem);
}
}
}
if(!_4ba){
_4a8[_4a8.length]=elem.name;
}
}
}
if(dojo.isObject(_4a6.confirm)){
for(name in _4a6.confirm){
var elem=form[name];
var _4b9=form[_4a6.confirm[name]];
if(_4ae("type",elem)||_4ae("type",_4b9)||(elem.type!="text"&&elem.type!="textarea"&&elem.type!="password")||(_4b9.type!=elem.type)||(_4b9.value==elem.value)||(_4a9.isInvalid(elem.name))||(/^\s*$/.test(_4b9.value))){
continue;
}
_4a8[_4a8.length]=elem.name;
}
}
return _4a9;
};
dojox.validate.evaluateConstraint=function(_4bb,_4bc,_4bd,elem){
var _4bf=_4bc[0];
var _4c0=_4bc.slice(1);
_4c0.unshift(elem.value);
if(typeof _4bf!="undefined"){
return _4bf.apply(null,_4c0);
}
return false;
};
}
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(_4c5){
return function(data){
_4c5.errback(new Error(data.message));
};
},resultCallback:function(_4c7){
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;
_4c7.errback(err);
}else{
_4c7.callback(this.parseResults(obj));
}
});
return tf;
},generateMethod:function(_4cb,_4cc,url){
return dojo.hitch(this,function(){
var _4ce=new dojo.Deferred();
if((this.strictArgChecks)&&(_4cc!=null)&&(arguments.length!=_4cc.length)){
throw new Error("Invalid number of parameters for remote method.");
}else{
this.bind(_4cb,dojo._toArray(arguments),_4ce,url);
}
return _4ce;
});
},processSmd:function(_4cf){
if(_4cf.methods){
dojo.forEach(_4cf.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=_4cf.serviceUrl||_4cf.serviceURL;
this.required=_4cf.required;
this.smd=_4cf;
}});
}
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(_4d4,args){
var _4d6=new dojo.Deferred();
this.bind(_4d4,args,_4d6);
return _4d6;
},bind:function(_4d7,_4d8,_4d9,url){
var def=dojo.rawXhrPost({url:url||this.serviceUrl,postData:this.createRequest(_4d7,_4d8),contentType:this.contentType,timeout:this.timeout,handleAs:this.handleAs});
def.addCallbacks(this.resultCallback(_4d9),this.errorCallback(_4d9));
},createRequest:function(_4dc,_4dd){
var req=[{"method":_4dc,"params":_4dd,"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 _4e2=0;
var _4e3=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");
}
}
}
_4e3=obj[0];
if("id" in obj[0]){
_4e2=obj[0].id;
}
if("result" in obj[0]){
if(_4e2!=0){
var _4e5=this._prevRequests[_4e2];
this._cache[_4e5]=obj[0].result;
}
_4e3.result=obj[0].result;
}
if("error" in obj[0]){
_4e3.error=obj[0].error;
}
return _4e3;
}
return obj;
}});
}
if(!dojo._hasResource["generic.cart"]){
dojo._hasResource["generic.cart"]=true;
dojo.provide("generic.cart");
dojo.declare("generic.cart",null,{showConfirmDuration:4000,constructor:function(){
},callRemote:function(_4e6,args,_4e8,_4e9){
var self=this;
var _4eb=new generic.jsonrpc();
var d=_4eb.callRemote(_4e6,args);
d.addCallback(function(_4ed){
_4e8(_4ed);
});
d.addErrback(function(err){
_4e9(err);
self.errHandler(err,_4eb);
});
},add:function(skus,_4f0,_4f1){
this.alter({action:"add",skus:skus,callback:_4f0,errback:_4f1});
},remove:function(skus,_4f3,_4f4){
this.alter({action:"remove",skus:skus,callback:_4f3,errback:_4f4});
},qty:function(skus,qtys,_4f7,_4f8){
this.alter({action:"qty",skus:skus,qtys:qtys,callback:_4f7,errback:_4f8});
},alter:function(args){
var self=this;
var _4fb=[];
dojo.forEach(args.skus,function(_4fc,ix){
_4fb[ix]={action:args.action,cart:"checkout",type:"sku",path:_4fc};
if(args.action==="qty"&&args.qtys){
_4fb[ix].qty=args.qtys[_4fc];
}
});
var _4fe=[{"actions":_4fb}];
var _4ff=function(_500){
args.callback(_500);
self.updateStatus();
};
var _501=args.errback;
this.callRemote("Cart.alterCart",_4fe,_4ff,_501);
},getContents:function(_502){
var self=this;
console.log("IN THE CART");
var _504=[{"cart":"checkout","params":{"item":["qty","total"],"sku":["path","sku_id","price","label","hexValue","product.shaded","product.sized","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 _505=function(_506){
_502(_506);
};
var _507=function(){
};
this.callRemote("Cart.contents",_504,_505,_507);
},getCount:function(_508){
var self=this;
var _50a=[{"cart":"checkout","params":{"item":["qty"]}}];
var _50b=function(_50c){
var _50d=0;
dojo.forEach(_50c.result.contents,function(_50e){
var c=parseInt(_50e.item.qty);
_50d+=(isNaN(c)?0:c);
});
_508(_50d);
};
var _510=function(){
};
this.callRemote("Cart.contents",_50a,_50b,_510);
},errHandler:function(err,_512){
console.log("err = "+err);
},showConfirm:function(_513,_514){
this.replaceContent(_513,_514);
var self=this;
var _516=function(){
clearTimeout(_517);
self.replaceContent(_514,_513);
};
var _518=this.showConfirmDuration;
var _517=setTimeout(_516,_518);
},replaceContent:function(_519,_51a){
var _51b=dojo.byId(_519);
var _51c=dojo.byId(_51a);
_51c.style.display="none";
_51b.style.display="block";
},showError:function(err,_51e){
var _51f=dojo.byId(_51e);
_51f.innerHTML="Error: "+err;
},disableButton:function(btn){
var node=dojo.byId(btn);
dojo.removeClass(node,"clickable");
},enableButton:function(btn){
var node=dojo.byId(btn);
dojo.addClass(node,"clickable");
},updateStatus:function(){
}});
}
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 _525=dojo.coords(this.containerNode);
this.progressNode.style.width=_525.w+"px";
this.progressNode.style.height=_525.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 _527=dojo.coords(this.containerNode);
this.progressNode.style.width=(_527.w+this.offset.w)+"px";
this.progressNode.style.height=(_527.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 _529=new generic.jsonrpc();
var _52a=[{"logic":[{"path":args.logicPath}],"tmpl":[{"path":args.tmplPath}]}];
var d=_529.callRemote("include",_52a);
var self=this;
d.addCallback(function(_52d){
if(args.callbackArgs.progress){
args.callbackArgs.progress.clear();
}
self.toggleSubmitButton(true);
var _52e=_52d.result.output;
var node=dojo.byId(args.nodeId);
if(node){
node.innerHTML=_52e[args.tmplPath];
if(args.parse){
self.reloadWidgets(node);
}
}
if(args.callbackArgs.error!==undefined){
dojo.mixin(_52d.error,args.callbackArgs.error);
self.showErrors(_52d.error);
}
if(args.onReloadCallback!==undefined){
args.onReloadCallback(_52d);
}
});
d.addErrback(function(err){
console.log("error = "+err);
});
},submitValuesRpc:function(args){
var _532=new generic.jsonrpc();
var d=_532.callRemote(args.method,args.params);
if(args.progressArgs!==undefined){
var _534=new generic.progress(args.progressArgs);
_534.start();
}
this.toggleSubmitButton(false);
var self=this;
d.addCallback(function(_536){
if(args.callback){
var _537;
if(args.hasErrorChecking){
_537={progress:_534,error:_536.error};
}else{
_537={progress:_534};
}
args.callback(_537);
}else{
_534.clear();
self.toggleSubmitButton(true);
}
});
d.addErrback(function(err){
console.log("===errBack===");
});
},initRpcHandler:function(_539){
var self=this;
var send=function(){
var _53c=new Object();
var val="";
dojo.forEach(_539.fields,function(_53e){
var node=dojo.byId(_53e.id);
if(node){
switch(_53e.inputType){
case "text":
val=node.value;
break;
case "radio":
if(!node.checked&&node.value&&node.value!==""){
val=node.value;
}
break;
default:
val=node.value;
}
}
_53c[_53e.reqKey]=val;
});
if(_539.params[0].logic!==undefined){
_539.params[0].logic[0].args=_53c;
}else{
_539.params[0]=_53c;
}
self.submitValuesRpc(_539);
};
var _540=dojo.byId(_539.submitEvent.nodeId);
var _541=_539.submitEvent.eventName;
if(_540){
this.handlers.push([dojo.connect(_540,_541,send)]);
}
},reloadWidgets:function(_542){
dojo.query(".destroy_onreload",_542).forEach(function(node){
var _544=dijit.byId(node.id);
if(!_544){
_544=dijit.byId(node.id+".display");
}
if(_544){
_544.destroyRecursive();
}
});
dojo.parser.parse(_542);
},showErrors:function(_545){
var _546="";
var _547=false;
var self=this;
var _549=dojo.byId("error_panel");
if(_545.messages.length>0){
_546="<div class='form_errors' id='errors_json'><ul class='err_list'>";
dojo.forEach(_545.messages,function(_54a){
_546+="<li>"+_54a.text+"</li>";
if(_54a.severity==="MESSAGE"){
_547=true;
self.toggleSubmitButton(false);
dojo.publish("/jsonrpc/error/message",[_54a]);
}
});
_546+="</ul></div>";
if(_549){
var _54b=dojo.byId("errors_include");
if(_54b){
_54b.style.display="none";
}
}
_549.style.display="block";
_549.innerHTML=_546;
}else{
if(_549){
var _54b=dojo.byId("errors_include");
if(_54b){
_54b.style.display="block";
}
var _54c=dojo.byId("errors_json");
if(_54c){
_54c.style.display="none";
}
}
}
if(!_547){
this.toggleSubmitButton(true);
}
},toggleSubmitButton:function(_54d){
var _54e=dojo.query(".checkout_submit");
var _54f=dojo.query(".checkout_submit_disabled");
var _550="block";
var _551="none";
if(!_54d){
_550="none";
_551="block";
}
dojo.forEach(_54e,function(btn){
btn.style.display=_550;
});
dojo.forEach(_54f,function(btn){
btn.style.display=_551;
});
}});
}
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,_555){
this.url=url;
if(typeof _555!="undefined"){
this._visible=_555;
}
this._initialize();
},addLoadedListener:function(_556){
this._loadedListeners.push(_556);
},addInstallingListener:function(_557){
this._installingListeners.push(_557);
},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 _55a=new dojox.flash.Install();
dojox.flash.installer=_55a;
if(_55a.needed()==true){
_55a.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(_55b,_55c,_55d){
_55d=parseFloat("."+_55d);
if(this.versionMajor>=_55b&&this.versionMinor>=_55c&&this.versionRevision>=_55d){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _55e;
for(var _55f=25;_55f>0;_55f--){
if(dojo.isIE){
_55e=VBGetSwfVer(_55f);
}else{
_55e=this._JSFlashInfo(_55f);
}
if(_55e==-1){
this.capable=false;
return;
}else{
if(_55e!=0){
var _560;
if(dojo.isIE){
var _561=_55e.split(" ");
var _562=_561[1];
_560=_562.split(",");
}else{
_560=_55e.split(".");
}
this.versionMajor=_560[0];
this.versionMinor=_560[1];
this.versionRevision=_560[2];
var _563=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_563);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_564){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _565=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _566=navigator.plugins["Shockwave Flash"+_565].description;
var _567=_566.split(" ");
var _568=_567[2].split(".");
var _569=_568[0];
var _56a=_568[1];
if(_567[3]!=""){
var _56b=_567[3].split("r");
}else{
var _56b=_567[4].split("r");
}
var _56c=_56b[1]>0?_56b[1]:0;
var _56d=_569+"."+_56a+"."+_56c;
return _56d;
}
}
return -1;
}};
dojox.flash.Embed=function(_56e){
this._visible=_56e;
};
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(_56f){
var _570="";
_570+=("width: "+this.width+"px; ");
_570+=("height: "+this.height+"px; ");
if(!this._visible){
_570+="position: absolute; z-index: 10000; top: -1000px; left: -1000px; ";
}
var _571;
var _572=dojox.flash.url;
var _573=_572;
var _574=_572;
var _575=dojo.baseUrl;
if(_56f){
var _576=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _577=escape(document.title);
_573+="?MMredirectURL="+_576+"&MMplayerType=ActiveX"+"&MMdoctitle="+_577+"&baseUrl="+escape(_575);
_574+="?MMredirectURL="+_576+"&MMplayerType=PlugIn"+"&baseUrl="+escape(_575);
}else{
_573+="?cachebust="+new Date().getTime();
}
if(_574.indexOf("?")==-1){
_574+="?baseUrl="+escape(_575);
}else{
_574+="&baseUrl="+escape(_575);
}
_571="<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=\""+_573+"\"></param>\n "+"<param name=\"quality\" value=\"high\"></param>\n "+"<param name=\"bgcolor\" value=\"#ffffff\"></param>\n "+"<embed src=\""+_574+"\" "+"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",_570);
div.innerHTML=_571;
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(_57a){
var _57b=dojo.byId(this.id+"Container");
if(_57a==true){
_57b.style.position="absolute";
_57b.style.visibility="visible";
}else{
_57b.style.position="absolute";
_57b.style.x="-1000px";
_57b.style.y="-1000px";
_57b.style.visibility="hidden";
}
},center:function(){
var _57c=this.width;
var _57d=this.height;
var _57e=dijit.getViewport();
var x=_57e.l+(_57e.w-_57c)/2;
var y=_57e.t+(_57e.h-_57d)/2;
var _581=dojo.byId(this.id+"Container");
_581.style.top=y+"px";
_581.style.left=x+"px";
}};
dojox.flash.Communicator=function(){
};
dojox.flash.Communicator.prototype={_addExternalInterfaceCallback:function(_582){
var _583=dojo.hitch(this,function(){
var _584=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_584[i]=this._encodeData(arguments[i]);
}
var _586=this._execFlash(_582,_584);
_586=this._decodeData(_586);
return _586;
});
this[_582]=_583;
},_encodeData:function(data){
if(!data||typeof data!="string"){
return data;
}
var _588=/\&([^;]*)\;/g;
data=data.replace(_588,"&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(_58a,_58b){
var _58c=dojox.flash.obj.get();
_58b=(_58b)?_58b:[];
for(var i=0;i<_58b;i++){
if(typeof _58b[i]=="string"){
_58b[i]=this._encodeData(_58b[i]);
}
}
var _58e=function(){
return eval(_58c.CallFunction("<invoke name=\""+_58a+"\" returntype=\"javascript\">"+__flash__argumentsToXML(_58b,0)+"</invoke>"));
};
var _58f=_58e.call(_58b);
if(typeof _58f=="string"){
_58f=this._decodeData(_58f);
}
return _58f;
}};
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 _590=new dojox.flash.Embed(false);
_590.write();
}else{
if(dojox.flash.info.isVersionOrAbove(6,0,65)){
var _590=new dojox.flash.Embed(false);
_590.write(true);
_590.setVisible(true);
_590.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 _594=dfd.ioArgs;
dojo._ioAddQueryToUrl(_594);
this.attach(_594.id,_594.url,args.frameDoc);
dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);
return dfd;
},attach:function(id,url,_597){
var doc=(_597||dojo.doc);
var _599=doc.createElement("script");
_599.type="text/javascript";
_599.src=url;
_599.id=id;
doc.getElementsByTagName("head")[0].appendChild(_599);
},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 _59d=dfd.ioArgs;
_59d.id=dojo._scopeName+"IoScript"+(this._counter++);
_59d.canDelete=false;
if(args.callbackParamName){
_59d.query=_59d.query||"";
if(_59d.query.length>0){
_59d.query+="&";
}
_59d.query+=args.callbackParamName+"="+(args.frameDoc?"parent.":"")+"dojo.io.script.jsonp_"+_59d.id+"._jsonpCallback";
_59d.canDelete=true;
dfd._jsonpCallback=this._jsonpCallback;
this["jsonp_"+_59d.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(_5a0,dfd){
if(dfd.ioArgs.canDelete){
if(_5a0.dojoType=="timeout"){
dojo.io.script.remove(dfd.ioArgs.id);
}else{
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
}
console.debug("dojo.io.script error",_5a0);
return _5a0;
},_deadScripts:[],_counter:1,_validCheck:function(dfd){
var _5a3=dojo.io.script;
var _5a4=_5a3._deadScripts;
if(_5a4&&_5a4.length>0){
for(var i=0;i<_5a4.length;i++){
_5a3.remove(_5a4[i]);
}
dojo.io.script._deadScripts=[];
}
return true;
},_ioCheck:function(dfd){
if(dfd.ioArgs.json){
return true;
}
var _5a7=dfd.ioArgs.args.checkString;
if(_5a7&&eval("typeof("+_5a7+") != '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(_5ab){
console.log("embedSwfObject()");
generic.flash._isSwfObject=true;
generic.flash._swfObjectArgs=_5ab;
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,_5af){
var err=resp instanceof Error;
generic.flash.so=swfobject;
generic.flash._initialize();
},addLoadedListener:function(_5b1){
this._loadedListeners.push(_5b1);
},addInstallingListener:function(_5b2){
this._installingListeners.push(_5b2);
},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 _5b9=new dojox.flash.Install();
generic.flash.installer=_5b9;
if(_5b9.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()");
_5b9.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(_5bc){
console.log("generic.flash.Embed");
if(_5bc){
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,_5c1,_5c2){
item={id:_5c2,attributes:attr,params:_5c1,obj:null};
this.items[_5c2]=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,_5c8){
_5c8=_5c8||{};
var exp=_5c8.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_5c8.expires=d;
}
if(exp&&exp.toUTCString){
_5c8.expires=exp.toUTCString();
}
var _5cb=name+"="+val;
for(var i in _5c8){
var key=i;
var val=_5c8[i];
_5cb+="; "+key+"="+val;
}
document.cookie=_5cb;
},serialize:function(_5ce,to){
if(_5ce){
if(to&&to!=="undefined"){
if(to=="perl"){
return this.toPerl(_5ce);
}else{
return dojo.toJson(_5ce);
}
}else{
try{
return dojo.toJson(_5ce);
}
catch(e){
throw new Error("json serialize failed, trying perl.");
return this.toPerl(_5ce);
}
}
}
},toPerl:function(_5d0){
if(_5d0){
var str="";
for(var i in _5d0){
if(_5d0[i]){
if(str!==""){
str+="&";
}
str+=i+"&"+_5d0[i];
}
}
return str;
}
},deserialize:function(_5d3,from){
if(_5d3){
if(from&&from!=="undefined"){
if(from=="perl"){
return this.fromPerl(_5d3);
}else{
return dojo.fromJson(_5d3);
}
}else{
try{
return this.fromPerl(_5d3);
}
catch(e){
throw new Error("deserialize fromPerl failed, trying fromJson");
return dojo.fromJson(_5d3);
}
}
}
},fromPerl:function(_5d5){
if(_5d5){
var _5d6={};
var _5d7=_5d5.split("&");
for(var i=0;i<_5d7.length;i+=2){
var key=_5d7[i];
var val=escape(_5d7[i+1]);
if(key&&val&&typeof (val)!=="undefined"){
_5d6[key]=val;
}
}
return _5d6;
}
},fromJson:function(_5db){
if(_5db){
return dojo.fromJson(_5db);
}
},destroy:function(){
}});
}
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;
_5df=history.length;
};
if(dojo.exists("tests.back-hash")){
back.getHash=getHash;
back.setHash=setHash;
}
var _5e0=(typeof (window)!=="undefined")?window.location.href:"";
var _5e1=(typeof (window)!=="undefined")?getHash():"";
var _5e2=null;
var _5e3=null;
var _5e4=null;
var _5e5=null;
var _5e6=[];
var _5e7=[];
var _5e8=false;
var _5e9=false;
var _5df;
function handleBackButton(){
var _5ea=_5e7.pop();
if(!_5ea){
return;
}
var last=_5e7[_5e7.length-1];
if(!last&&_5e7.length==0){
last=_5e2;
}
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");
}
}
}
}
_5e6.push(_5ea);
};
back.goBack=handleBackButton;
function handleForwardButton(){
var last=_5e6.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");
}
}
}
_5e7.push(last);
};
back.goForward=handleForwardButton;
function createState(url,args,hash){
return {"url":url,"kwArgs":args,"urlHash":hash};
};
function getUrlQuery(url){
var _5f1=url.split("?");
if(_5f1.length<2){
return null;
}else{
return _5f1[1];
}
};
function loadIframeHistory(){
var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();
_5e8=true;
if(_5e5){
dojo.isSafari?_5e5.location=url:window.frames[_5e5.name].location=url;
}else{
}
return url;
};
function checkLocation(){
if(!_5e9){
var hsl=_5e7.length;
var hash=getHash();
if((hash===_5e1||window.location.href==_5e0)&&(hsl==1)){
handleBackButton();
return;
}
if(_5e6.length>0){
if(_5e6[_5e6.length-1].urlHash===hash){
handleForwardButton();
return;
}
}
if((hsl>=2)&&(_5e7[hsl-2])){
if(_5e7[hsl-2].urlHash===hash){
handleBackButton();
return;
}
}
if(dojo.isSafari&&dojo.isSafari<3){
var _5f5=history.length;
if(_5f5>_5df){
handleForwardButton();
}else{
if(_5f5<_5df){
handleBackButton();
}
}
_5df=_5f5;
}
}
};
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){
_5e2=createState(_5e0,args,_5e1);
};
back.addToHistory=function(args){
_5e6=[];
var hash=null;
var url=null;
if(!_5e5){
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");
}
_5e5=window.frames["dj_history"];
}
if(!_5e4){
_5e4=document.createElement("a");
dojo.body().appendChild(_5e4);
_5e4.style.display="none";
}
if(args["changeUrl"]){
hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(_5e7.length==0&&_5e2.urlHash==hash){
_5e2=createState(url,args,hash);
return;
}else{
if(_5e7.length>0&&_5e7[_5e7.length-1].urlHash==hash){
_5e7[_5e7.length-1]=createState(url,args,hash);
return;
}
}
_5e9=true;
setTimeout(function(){
setHash(hash);
_5e9=false;
},1);
_5e4.href=hash;
if(dojo.isIE){
url=loadIframeHistory();
var _5fb=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_5fd){
if(getHash()!=""){
setTimeout(function(){
setHash(hash);
},1);
}
_5fb.apply(this,[_5fd]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _5fe=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_600){
if(getHash()!=""){
setHash(hash);
}
if(_5fe){
_5fe.apply(this,[_600]);
}
};
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(!_5e3){
_5e3=setInterval(checkLocation,200);
}
}
}
}else{
url=loadIframeHistory();
}
_5e7.push(createState(url,args,hash));
};
back.getStack=function(){
return _5e7;
};
back._iframeLoaded=function(evt,_602){
var _603=getUrlQuery(_602.href);
if(_603==null){
if(_5e7.length==1){
handleBackButton();
}
return;
}
if(_5e8){
_5e8=false;
return;
}
if(_5e7.length>=2&&_603==getUrlQuery(_5e7[_5e7.length-2].url)){
handleBackButton();
}else{
if(_5e6.length>0&&_603==getUrlQuery(_5e6[_5e6.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(_604){
this.changeUrl=_604;
};
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 _608=dojo.back.getStack();
var out="<b>History Stack:</b><br/>";
for(var i=0;i<_608.length;i++){
var bm=_608[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 _60c=generic.flash.State.getFragment();
dojo.back.setInitialState(new generic.flash.State(_60c));
generic.flash.addLoadedListener(dojo.hitch(this,function(){
var resp=dojo.global.generic.flash.Api.flashCall("state",_60c);
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 _614=args[0].actions[0];
this.cuePoint(_614);
},alterCart:function(){
var args=arguments[0];
var _616=args[0].actions[0];
var _617="Cart.alterCart";
args[0].mostRecent=1;
var self=this;
self.cartAction=_616.action;
self.actionPath=_616.path;
var req=new generic.jsonrpc();
dojo.publish("/page/cart/preAlterCart",[]);
var def=req.callRemote(_617,args);
def.addBoth(function(resp){
args.resp=resp;
dojo.publish("/page/cart/alterCart",[args]);
if(self.cartAction=="add"){
var _61c=dojo.cookie("page_data");
if(_61c&&_61c!==null){
var _61d=dojo.cookie.deserialize(_61c);
var _61e="cart.lpath";
_61d[_61e]=self.actionPath;
var nstr=dojo.cookie.serialize(_61d,"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(_620){
var args=_620[0];
var _622=false;
if(typeof args=="undefined"){
try{
if(_620["query"]&&_620["query"]=="palette"){
_622=true;
args=_620;
}
}
catch(e){
}
}
var _623;
var pd=parent.page_data;
if(args&&args.query){
var path=args.query.split(".");
var _626=path.length;
var _627=pd;
for(var i=0;i<_626;i++){
var key=path.shift();
_627=_627[key];
}
_623=_627;
}else{
_623=pd;
}
if(_622){
try{
if(page_data.palette.kit){
_623={palette:_623};
return _623;
}
}
catch(e){
}
}
return this.response.createResponse(1,_623);
},popup:function(_62a){
var args=_62a[0];
var _62c=["height","width","top","left","resizable","scrollbars","status","toolbar","menubar","location"];
var _62d={location:null,height:500,width:500,top:25,left:25,resizable:"yes",scrollbars:"yes",status:"no",toolbar:"no",menubar:"no",name:"flash pop"};
var _62e="";
for(var i=0;i<_62c.length;i++){
var val;
var attr=_62c[i];
if(args[attr]&&args[attr]!="undefined"){
val=args[attr];
}else{
val=_62d[attr];
}
_62e+=attr+"="+val+",";
}
_62e=_62e.substring(0,_62e.length-1);
var win=window.open(args.location,args.name,_62e);
if(!win){
alert("Unable to open new window.  Please allow popups for this domain.");
}
return this.response.createResponse(1,args.location);
},notifyEvent:function(_633){
try{
eval(_633.func+"('"+_633.event+"')");
}
catch(e){
}
},setElementSize:function(_634){
var args=_634[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 _63a=dojo.coords(node);
console.log(node.id+" "+node.style.height+" "+h);
};
function getType(_63b){
var type="default";
var v=_63b.toString();
if(v.search(/[0-9]%/)>0){
type="percent";
}else{
if(v=="window"||v=="document"){
type=v;
}
}
return type;
};
function getValueStr(_63e,axis){
var type=getType(_63e);
var _641;
switch(type){
case "percent":
_641=_63e;
break;
case "window":
var _642;
if(axis=="w"){
if(typeof window.innerWidth!="undefined"){
_642=document.documentElement.clientWidth;
}else{
}
}else{
if(typeof window.innerHeight!="undefined"){
_642=window.innerHeight;
}else{
_642=document.documentElement.clientHeight;
}
}
_641=_642+"px";
break;
case "document":
var _642;
if(axis=="w"){
_642=dojo.body().scrollWidth;
}else{
_642=dojo.body().scrollHeight;
}
_641=_642+"px";
break;
default:
_641=_63e+"px";
}
return _641;
};
if(args.id=="productBrowser_resize"){
var vp=dijit.getViewport();
console.log("incoming h: ",args.h," viewport h: ",vp.h);
args.h=(vp.h>args.h)?vp.h:args.h;
console.log("final set h: ",args.h);
}
var wval=getValueStr(args.w,"w");
var hval=getValueStr(args.h,"h");
setSize(args.id,wval,hval);
return this.response.createResponse(1,args);
},cmCreatePageviewTag:function(args){
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(_64e,args){
this.response=new generic.flash.ApiResponse({method:_64e,req_args:args});
var resp=this[_64e](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(_652,_653){
this.success=(_652)?true:false;
if(_653){
this.results=_653;
}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,_659,eid,_65b){
var rel=dojo.byId(eid);
if(!rel){
console.log("Element doesnt exist");
return;
}
this._isSwfObject=true;
this._flashReady=_65b||this._flashReady;
this.id=eid;
this._swfObjectArgs={attributes:attr,params:_659,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(_65e){
this._initListeners.push(_65e);
};
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(_662,args){
console.log("flash calling js method: ",_662," with args: ",args);
if(dojo.exists(_662,generic.flash.ApiMethods)){
var resp=generic.flash.ApiMethods.__process(_662,args);
console.log("method exsited, response is:");
return resp;
}else{
console.log(_662+": No such method exists");
return {success:false,results:"No such method exists"};
}
};
generic.flash.Api.flashCall=function(_665,args){
var db="js calling flash method: "+_665;
console.log(db);
var _668=generic.flash.comm.flashCall(_665,args);
return _668;
};
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(_66a,_66b,_66c){
if(!_66a.data){
return;
}
var pd=dojo.global.page_data;
if(pd.env&&pd.env.maturity&&pd.env.maturity=="eng"){
_66a.data=_66a.data+"?t="+(new Date().getTime()).toString();
}
self._objargs.attrs=dojo.mixin(self.attrDefaults,_66a);
self._objargs.id=self._objargs.attrs.id;
self._objargs.params=_66b;
self._objargs.repid=_66c;
if(self.so.hasFlashPlayerVersion(self._objargs.attrs.playerversion)){
self.obj=self.so.createSWF(self._objargs.attrs,self._objargs.params,self._objargs.repid);
}else{
var _66e=self._objargs.attrs.altcontentid;
var _66f=dojo.query(".noflash",dojo.byId(_66c));
var _670=_66e?(dojo.byId(_66e)?dojo.byId(_66e):false):(!!_66f.length?_66f[0]:false);
if(_670){
_670.style.visibility="visible";
_670.style.display="block";
}
}
if(self.obj){
return true;
}
};
};
generic.flashx.prototype={flashLoaded:false,pageLoaded:false,enableHistory:false,embedSwf:function(_671,_672,_673){
if(!_671.data||!_673){
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 _674=this.so.customEmbed(_671,_672,_673);
if(_674){
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(_675,args){
if(dojo.exists(_675,generic.flash.ApiMethods)){
try{
var resp=generic.flash.ApiMethods.__process(_675,args);
return resp;
}
catch(e){
console.log(e.message||e);
}
}else{
return {success:false,results:"No such method exists"};
}
},flashCall:function(_678,args){
var _67a=dojox.flash.comm.flashCall(_678,args);
return _67a;
}};
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.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=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\" waiRole=\"presentation\">\n\t<div class=\"nopadding\" waiRole=\"presentation\">\n\t\t<div class=\"drop_select_button\" type=\"${type}\" dojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\">\n\t  \t<div id=\"${id}_select_container\">\n\t\t\t\t<div class=\"field_mid\" dojoAttachPoint=\"containerNode,popupStateNode\" waiRole=\"presentation\" id=\"${id}_label\">\n\t\t\t\t\t<div class=\"select_dropdownLabel\">${label}</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"select_right\"><a class=\"filter_control\"><img src=\"/images/controls/ico_arr_dn.gif\"></a></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t${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 _67c=dojo.byId(this.dropDown.id);
_67c.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 _67e=this.width;
var _67f=dojo.byId(this.id+"_select_container");
var _680=_67f.childNodes.length;
for(var i=0;i<_680;i++){
var node=_67f.childNodes[i];
if(dojo.hasClass(node,"field_left")||dojo.hasClass(node,"select_right")){
_67e-=node.offsetWidth;
}
}
dojo.byId(this.id+"_label").style.width=_67e+"px";
},passValueToHidden:function(){
var _682=dojo.byId(this.hiddenFieldId);
if(_682&&this.value&&(this.value!=="")){
_682.value=this.value;
}
},passValueFromHidden:function(){
var _683=dojo.byId(this.hiddenFieldId);
if(_683){
if(_683.value!==""&&_683.value!==null){
this.setAttribute("value",_683.value);
}
}
},_fillContent:function(){
var opts=this.options;
var _685={};
var _686={};
var idx=0;
var val="";
var _689="";
var akey="";
if(!opts){
opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){
val=node.getAttribute("value");
_689=String(node.innerHTML);
if(node.getAttribute("type")==="separator"||val.length==0||_689.length==0){
val="";
if(_689.length>0&&idx==0){
this.emptyLabel=_689;
}
}else{
akey=_689.substring(0,1).toLowerCase();
if(typeof (_685[akey])==="undefined"){
_685[akey]=idx;
}
_686[val]=idx;
}
idx++;
return {value:val,label:_689};
},this):[];
}
this.anchors=_685;
this.indices=_686;
if(opts.length&&!this.value){
var si=this.srcNodeRef.selectedIndex;
this.value=opts[si!=-1?si:0].value;
this._selectedIdx=si;
}
var _68d=dojo.hitch(this,"_onMenuKey");
this.dropDown=new dijit.Menu({id:this.id+"_menu",templateString:null,templatePath:this.templatePathMenu,_onKeyPress:_68d});
this.dropDown.menuOnClose=this.dropDown.onClose;
var _68e=dojo.hitch(this,"_onMenuClose");
this.dropDown.onClose=function(e){
this.menuOnClose(e);
_68e(e);
};
},updateIndices:function(){
var opts=this.options;
var _691={};
var _692={};
var akey="";
dojo.forEach(opts,function(opt,idx){
akey=opt.label.substring(0,1).toLowerCase();
if(typeof (_691[akey])==="undefined"){
_691[akey]=idx;
}
_692[val]=idx;
});
this.anchors=_691;
this.indices=_692;
},_resetButtonState:function(){
var len=this.options.length;
var _697=this.dropDown;
dojo.forEach(_697.getChildren(),function(_698){
_698.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 _69a=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_69b){
dojo[_69b.id===_69a?"addClass":"removeClass"](_69b.domNode,this.baseClass+"SelectedOption");
},this);
}
},_populate:function(_69c){
var _69d=this.dropDown;
dojo.forEach(this.options,function(_69e,idx){
this._addMenuItem(_69e,idx);
},this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
if(dojo.isIE==6){
var _6a0=dojo.byId(this.dropDown.id+"_container");
var _6a1=dojo.coords(_6a0);
if(_6a1.h>this.maxHeightIE){
_6a0.style.height=this.maxHeightIE+"px";
}
}
this._isPopulated=true;
if(_69c){
_69c.call(this);
}
},_addMenuItem:function(_6a2,idx){
var menu=this.dropDown;
if(!_6a2.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _6a5=dojo.hitch(this,"setAttribute","value",_6a2);
var _6a6=dojo.hitch(this,"_onMenuItemKey",idx);
var mi=new dijit.MenuItem({id:this.id+"_item_"+idx,label:_6a2.label,onClick:_6a5,templateString:null,templatePath:this.templatePathMenuItem,_onKeyPress:_6a6});
menu.addChild(mi);
this._menuItems[idx]=mi.id;
}
},_onDropDownClick:function(e){
var _6a9=true;
if(dojo.isIE>=7&&e.type!=="mousedown"){
_6a9=false;
}
if(_6a9){
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 _6ad=this._getAnchor(e);
if(_6ad>=0){
var item=dijit.byId(this._menuItems[_6ad]);
this.dropDown.focusChild(item);
}
},_onMenuItemKey:function(idx,e){
if(!e||typeof (e)==="undefined"){
return;
}
var _6b1;
switch(e.keyCode){
case dojo.keys.DOWN_ARROW:
_6b1=this._getNextFocusableIdx(idx,1);
this.setSelected(_6b1);
break;
case dojo.keys.UP_ARROW:
_6b1=this._getNextFocusableIdx(idx,-1);
this.setSelected(_6b1);
break;
}
},_getNextFocusableIdx:function(idx,_6b3,_6b4){
var _6b5;
var _6b6=idx+_6b3;
var _6b7=(this.options.length-1);
var _6b8=10;
var _6b4=(_6b4?_6b4:0);
if(_6b4>=_6b8){
return 0;
}
_6b4++;
if(_6b6>_6b7&&_6b3==1){
_6b6=0;
}else{
if(_6b6<0&&_6b3==-1){
_6b6=_6b7;
}
}
if(this.options[_6b6].value){
_6b5=_6b6;
}else{
_6b5=this._getNextFocusableIdx(_6b6,_6b3,_6b4);
}
return _6b5;
},_getAnchor:function(e){
var _6ba=this.anchors[e.keyChar];
if(_6ba>=0&&this.options[_6ba]){
if(this._started){
this.setSelected(_6ba);
}
return _6ba;
}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 _6be=dojo.byId(this.hiddenFieldId);
_6be.value="";
}
}});
}
if(!dojo._hasResource["generic.form.fieldPopulator"]){
dojo._hasResource["generic.form.fieldPopulator"]=true;
dojo.provide("generic.form.fieldPopulator");
dojo.declare("generic.form.fieldPopulator",null,{fieldData:null,fieldPrefix:"",fieldSuffixes:[],fieldCase:"lower",toggleByNode:null,constructor:function(args){
this.fieldData=args.fieldData;
this.fieldPrefix=(args.fieldPrefix?args.fieldPrefix:"");
this.form=dojo.byId(args.formName);
this.fieldSuffixes=(args.fieldSuffixes?args.fieldSuffixes:[]);
this.fieldCase=args.fieldCase;
this.onChange=(args.onChange?args.onChange:this.onChange);
this.getStatus=(args.getStatus?args.getStatus:this.getStatus);
this.onChangeCallback=(args.onChangeCallback?args.onChangeCallback:this.onChangeCallback);
if(args.toggleById){
this.startup(args);
}else{
return false;
}
},startup:function(args){
this.toggleByNode=dojo.byId(args.toggleById);
var _6c1=(args.toggleByEvent?args.toggleByEvent:"onclick");
if(this.toggleByNode){
dojo.connect(this.toggleByNode,_6c1,this,"onChange");
}else{
return;
}
if(this.getStatus()){
this.setFields(true,this.fieldData);
}
},setFields:function(_6c2,data){
var _6c4,_6c5,_6c6,val,_6c8;
for(_6c4 in data){
if(this.fieldCase==="upper"){
_6c5=_6c4.toUpperCase();
}else{
_6c5=_6c4.toLowerCase();
}
for(var i=0;i<this.fieldSuffixes.length;i++){
var sfx=this.fieldSuffixes[i];
var _6cb=this.form.elements[_6c5+sfx];
if(_6cb){
continue;
}
}
_6c8=_6cb||this.form.elements[_6c5];
if(_6c8){
if(data[_6c4]===null||!_6c2){
val="";
}else{
val=data[_6c4];
}
if(_6c8.type==="text"||_6c8.type==="textarea"){
_6c8.value=val;
}else{
if(typeof (_6c8.type)==="undefined"&&_6c8[0]){
if(_6c2){
var self=this;
dojo.forEach(_6c8,function(_6cd){
if(_6cd.value===val){
_6c6=self.getWidget(_6cd.id);
if(_6c6){
_6c6.setValue(true);
}else{
_6cd.checked=true;
}
}
});
}else{
_6c8[0].checked=true;
}
}else{
if(_6c8.type==="checkbox"){
}else{
if(_6c8.type==="hidden"){
_6c6=this.getWidget(this.fieldPrefix+_6c5+".display");
if(_6c6){
if(_6c2){
_6c6.setAttribute("value",val);
_6c8.value=val;
}else{
_6c6.reset();
}
}else{
_6c8.value=val;
}
}else{
if(_6c8.type==="select-one"){
_6c8.value=val;
}else{
console.log("unknown field: "+_6c8);
}
}
}
}
}
}
}
},onChange:function(e){
var _6cf=this.getStatus();
this.setFields(_6cf,this.fieldData);
this.onChangeCallback(_6cf);
},getStatus:function(){
var _6d0=false;
if(this.toggleByNode.checked){
_6d0=true;
}
return _6d0;
},onChangeCallback:function(_6d1){
},getWidget:function(id){
if(dijit.byId){
return dijit.byId(id);
}else{
return false;
}
}});
dojo.provide("generic.form.savedAddressPopulator");
dojo.declare("generic.form.savedAddressPopulator",generic.form.fieldPopulator,{toggleByEl:null,findByKey:"ADDRESS_ID",startup:function(args){
this.toggleByEl=this.getToggle(args.toggleById);
if(!this.toggleByEl){
return false;
}
this.findByKey=(args.findByKey?args.findByKey:this.findByKey);
},getToggle:function(id){
var el;
var self=this;
if(id){
el=self.getWidget(id);
if(el&&el.onChangeCallback){
el.onChangeCallback=function(e){
self.onChange(e,el.value);
};
}else{
el=dojo.byId(id);
if(el&&el.type==="select-one"){
el.onchange=function(e){
self.onChange(e,el.value);
};
}else{
console.log("unknown toggle element found");
return false;
}
}
return el;
}else{
return false;
}
},onChange:function(e,_6da){
var self=this;
dojo.forEach(this.fieldData,function(_6dc){
if(_6da===_6dc[self.findByKey]){
self.setFields(true,_6dc);
return;
}
});
this.onChangeCallback(e,_6da);
}});
}
if(!dojo._hasResource["generic.img"]){
dojo._hasResource["generic.img"]=true;
dojo.provide("generic.img");
dojo.declare("generic.img",null,{constructor:function(_6dd,_6de){
this.node=_6dd;
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=(_6de?_6de:["off","on"]);
this.preload();
},preload:function(){
if(!this.states){
return;
}
for(var i=0;i<this.states.length;i++){
var _6e2=this.states[i];
var _6e3=(_6e2!==""?"_":"");
var _6e4=this.srcBase+_6e3+_6e2+"."+this.srcExt;
var pl=new Image();
pl.src=_6e4;
this.preloaded[_6e2]=pl;
}
},changeSrc:function(_6e6){
var p=this.preloaded[_6e6];
if(!this.srcBase){
return;
}
if(p){
this.node.src=p.src;
}else{
this.node.src=this.srcBase+"_"+_6e6+"."+this.srcExt;
}
}});
dojo.provide("generic.rollover");
dojo.declare("generic.rollover",null,{constructor:function(_6e8,_6e9){
var _6ea=(_6e9==null?_6e8:_6ea);
this.img=new generic.img(_6e8,["off","on"]);
this.handlers=[dojo.connect(_6ea,"onmouseover",this,"onMouseOver"),dojo.connect(_6ea,"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 _6ed=/(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;
}
var _6ee=/(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;
function adjustCssPaths(_6ef,_6f0){
if(!_6f0||!_6ef){
return;
}
if(_6ed){
_6f0=_6f0.replace(_6ed,function(_6f1,pre,_6f3,url,post){
return pre+(new dojo._Url(_6ef,"./"+url).toString())+post;
});
}
return _6f0.replace(_6ee,function(_6f6,_6f7,_6f8,_6f9,_6fa,_6fb){
if(_6f8){
return "@import \""+(new dojo._Url(_6ef,"./"+_6f8).toString())+"\""+_6fb;
}else{
return "url("+(new dojo._Url(_6ef,"./"+_6fa).toString())+")"+_6fb;
}
});
};
var _6fc=/(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;
function adjustHtmlPaths(_6fd,cont){
var url=_6fd||"./";
return cont.replace(_6fc,function(tag,_701,name,_703,_704,_705,_706,end){
return _701+(name?(name+"="+_703+(new dojo._Url(url,_704).toString())+_703):("style="+_705+adjustCssPaths(url,_706)+_705))+end;
});
};
function secureForInnerHtml(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
function snarfStyles(_709,cont,_70b){
_70b.attributes=[];
return cont.replace(/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,function(_70c,_70d,_70e,_70f,_710,href){
var i,attr=(_70d||_70f||"").replace(/^\s*([\s\S]*?)\s*$/i,"$1");
if(_70e){
i=_70b.push(_709?adjustCssPaths(_709,_70e):_70e);
}else{
i=_70b.push("@import \""+href+"\";");
attr=attr.replace(/\s*(?:rel|href)=(['"])?[^\s]*\1\s*/gi,"");
}
if(attr){
attr=attr.split(/\s+/);
var _714={},tmp;
for(var j=0,e=attr.length;j<e;j++){
tmp=attr[j].split("=");
_714[tmp[0]]=tmp[1].replace(/^\s*['"]?([\s\S]*?)['"]?\s*$/,"$1");
}
_70b.attributes[i-1]=_714;
}
return "";
});
};
function snarfScripts(cont,_719){
_719.code="";
function download(src){
if(_719.downloadRemote){
dojo.xhrGet({url:src,sync:true,load:function(code){
_719.code+=code+";";
},error:_719.errBack});
}
};
return cont.replace(/<script\s*(?![^>]*type=['"]?dojo)(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,function(_71c,_71d,src,code){
if(src){
download(src);
}else{
_719.code+=code;
}
return "";
});
};
function evalInGlobal(code,_721){
_721=_721||dojo.doc.body;
var n=_721.ownerDocument.createElement("script");
n.type="text/javascript";
_721.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 _725=this._setUpDeferreds();
}
dijit.layout.ContentPane.prototype.setContent.apply(this,arguments);
return _725;
},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,_727=function(){
_t.cancel();
};
var _728=(_t.onLoadDeferred=new dojo.Deferred());
var _729=(_t._nextUnloadDeferred=new dojo.Deferred());
return {cancel:_727,addOnLoad:function(func){
_728.addCallback(func);
},addOnUnload:function(func){
_729.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(_72e){
var _72f=this._setUpDeferreds();
dijit.layout.ContentPane.prototype._prepareLoad.apply(this,arguments);
return _72f;
},_setContent:function(cont){
var _731=[];
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,_731);
}
if(this.executeScripts){
var _t=this,code,_734={downloadRemote:true,errBack:function(e){
_t._onError.call(_t,"Exec","Error downloading remote script in \""+_t.id+"\"",e);
}};
cont=snarfScripts(cont,_734);
code=_734.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&&_731&&_731.length){
this._renderStyles(_731);
}
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(_73a){
this._styleNodes=[];
var st,att,_73d,doc=this.domNode.ownerDocument;
var head=doc.getElementsByTagName("head")[0];
for(var i=0,e=_73a.length;i<e;i++){
_73d=_73a[i];
att=_73a.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=_73d;
}else{
st.appendChild(doc.createTextNode(_73d));
}
}
}});
})();
}
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(_746){
var s=this.domNode.style;
s.top="-5000px";
},show:function(_748){
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 _74b=dojo.coords(this.locusNode);
pos.top+=_74b.y;
pos.left+=_74b.x;
if(this.parentNode||this.parentNode!=null){
var _74c=dojo.coords(this.parentNode);
pos.top-=_74c.y;
pos.left-=_74c.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 _751=(this._startZ*10);
if(nz<_751||!nz||nz===""){
s.zIndex=_751;
}
this.modalMaskNode.style.zIndex=(s.zIndex-1);
this._modalMask.startup(this.preloadMode);
},bringToTop:function(){
var _752=dojo.filter(this._allFPs,function(i){
return i!==this;
},this);
_752.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_752.push(this);
dojo.forEach(_752,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 _759,_75a;
if(window.innerHeight&&window.scrollMaxY){
_759=document.body.scrollWidth;
_75a=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_759=document.body.scrollWidth;
_75a=document.body.scrollHeight;
}else{
_759=document.body.offsetWidth;
_75a=document.body.offsetHeight;
}
}
var _75b,_75c;
if(self.innerHeight){
_75b=self.innerWidth;
_75c=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_75b=document.documentElement.clientWidth;
_75c=document.documentElement.clientHeight;
}else{
if(document.body){
_75b=document.body.clientWidth;
_75c=document.body.clientHeight;
}
}
}
if(_75a<_75c){
pageHeight=_75c;
}else{
pageHeight=_75a;
}
if(_759<_75b){
pageWidth=_75b;
}else{
pageWidth=_759;
}
arrayPageSize=new Array(pageWidth,pageHeight,_75b,_75c);
return arrayPageSize;
},getPageScroll:function(){
var _75d;
if(self.pageYOffset){
_75d=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
_75d=document.documentElement.scrollTop;
}else{
if(document.body){
_75d=document.body.scrollTop;
}
}
}
arrayPageScroll=new Array("",_75d);
return arrayPageScroll;
},startup:function(_75e){
var s=this.domNode.style;
var _760=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=(_760[1]+"px");
if(!_75e){
s_ie.display="block";
}
}
s.height=(_760[1]+"px");
if(!_75e){
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 _762="<iframe id=\""+this.id+"_iframe\" name=\""+this.id+"_iframe\" allowTransparency=\"true\" src=\""+this.iframeHref+"\" frameborder=0></iframe>";
this.setContent(_762);
},postCreate:function(){
this.inherited(arguments);
},hide:function(_763){
var _764=frames[this.id+"_iframe"];
if(this.reloadIFrame){
_764.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 _767=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(_767,{width:"100%",height:h});
dojo.addClass(dojo.byId(_767),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:"<div id=\"sample_detail_layer\" class=\"container shadow_container shadow_container_bg\">\n\t<div class=\"popup_close_btn_container\">\n\t<a href=\"javascript:void(0)\" class=\"close_btn\" dojoattachevent=\"onclick:_onCloseClick\" dojoattachpoint=\"closeBtnNode\">Close</a>\n\t</div>\n \t<div class=\"container_inner\">\n\t\t<div id=\"${id}\">\n\t\t    <div dojoAttachPoint=\"canvas\">\n\t\t        <div dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n\t\t        </div>\n\t\t    </div>\n\t\t</div>\n\t</div>\n</div>\n",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.layout.InlineTemplate"]){
dojo._hasResource["generic.layout.InlineTemplate"]=true;
dojo.provide("generic.layout.InlineTemplate");
dojo.declare("generic.layout.InlineTemplate",[dijit._Widget,dijit._Templated],{buildRendering:function(){
this.domNode=this.srcNodeRef;
this._attachTemplateNodes(this.domNode);
},startup:function(){
var node=this.domNode;
this._supportingWidgets=[];
dojo.query("[widgetId]",node).forEach(function(n,idx){
if(n==node){
return;
}
var id=dojo.attr(n,"widgetId");
if(!id){
return;
}
this._supportingWidgets.push(dijit.byId(id));
},this);
this._attachTemplateNodes(this._supportingWidgets,function(n,p){
return n[p];
});
}});
}
if(!dojo._hasResource["dojo.colors"]){
dojo._hasResource["dojo.colors"]=true;
dojo.provide("dojo.colors");
(function(){
var _773=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(_778,obj){
var m=_778.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=[_773(m1,m2,H+1/3)*256,_773(m1,m2,H)*256,_773(m1,m2,H-1/3)*256,1];
if(l==4){
a[3]=c[3];
}
return dojo.colorFromArray(a,obj);
}
}
return null;
};
var _786=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(_786(t.r,0,255));
t.g=Math.round(_786(t.g,0,255));
t.b=Math.round(_786(t.b,0,255));
t.a=_786(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,_78e,_78f){
if(dojo.isArray(cyan)){
_78e=cyan[1],_78f=cyan[2],cyan=cyan[0];
}else{
if(dojo.isObject(cyan)){
_78e=cyan.m,_78f=cyan.y,cyan=cyan.c;
}
}
cyan/=100,_78e/=100,_78f/=100;
var r=1-cyan,g=1-_78e,b=1-_78f;
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromCmyk:function(cyan,_794,_795,_796){
if(dojo.isArray(cyan)){
_794=cyan[1],_795=cyan[2],_796=cyan[3],cyan=cyan[0];
}else{
if(dojo.isObject(cyan)){
_794=cyan.m,_795=cyan.y,_796=cyan.b,cyan=cyan.c;
}
}
cyan/=100,_794/=100,_795/=100,_796/=100;
var r,g,b;
r=1-Math.min(1,cyan*(1-_796)+_796);
g=1-Math.min(1,_794*(1-_796)+_796);
b=1-Math.min(1,_795*(1-_796)+_796);
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromHsl:function(hue,_79b,_79c){
if(dojo.isArray(hue)){
_79b=hue[1],_79c=hue[2],hue=hue[0];
}else{
if(dojo.isObject(hue)){
_79b=hue.s,_79c=hue.l,hue=hue.h;
}
}
_79b/=100;
_79c/=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*_79b*Math.min(r,1)+(1-_79b);
g=2*_79b*Math.min(g,1)+(1-_79b);
b=2*_79b*Math.min(b,1)+(1-_79b);
if(_79c<0.5){
r*=_79c,g*=_79c,b*=_79c;
}else{
r=(1-_79c)*r+2*_79c-1;
g=(1-_79c)*g+2*_79c-1;
b=(1-_79c)*b+2*_79c-1;
}
return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});
},fromHsv:function(hue,_7a1,_7a2){
if(dojo.isArray(hue)){
_7a1=hue[1],_7a2=hue[2],hue=hue[0];
}else{
if(dojo.isObject(hue)){
_7a1=hue.s,_7a2=hue.v,hue=hue.h;
}
}
if(hue==360){
hue=0;
}
_7a1/=100;
_7a2/=100;
var r,g,b;
if(_7a1==0){
r=_7a2,b=_7a2,g=_7a2;
}else{
var _7a6=hue/60,i=Math.floor(_7a6),f=_7a6-i;
var p=_7a2*(1-_7a1);
var q=_7a2*(1-(_7a1*f));
var t=_7a2*(1-(_7a1*(1-f)));
switch(i){
case 0:
r=_7a2,g=t,b=p;
break;
case 1:
r=q,g=_7a2,b=p;
break;
case 2:
r=p,g=_7a2,b=t;
break;
case 3:
r=p,g=q,b=_7a2;
break;
case 4:
r=t,g=p,b=_7a2;
break;
case 5:
r=_7a2,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),_7ad=1-(this.g/255),_7ae=1-(this.b/255);
return {c:Math.round(cyan*100),m:Math.round(_7ad*100),y:Math.round(_7ae*100)};
},toCmyk:function(){
var cyan,_7b0,_7b1,_7b2;
var r=this.r/255,g=this.g/255,b=this.b/255;
_7b2=Math.min(1-r,1-g,1-b);
cyan=(1-r-_7b2)/(1-_7b2);
_7b0=(1-g-_7b2)/(1-_7b2);
_7b1=(1-b-_7b2)/(1-_7b2);
return {c:Math.round(cyan*100),m:Math.round(_7b0*100),y:Math.round(_7b1*100),b:Math.round(_7b2*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 _7bb=max-min;
var h=0,s=0,l=(min+max)/2;
if(l>0&&l<1){
s=_7bb/((l<0.5)?(2*l):(2-2*l));
}
if(_7bb>0){
if(max==r&&max!=g){
h+=(g-b)/_7bb;
}
if(max==g&&max!=b){
h+=(2+(b-r)/_7bb);
}
if(max==b&&max!=r){
h+=(4+(r-g)/_7bb);
}
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 _7c4=max-min;
var h=null,s=(max==0)?0:(_7c4/max);
if(s==0){
h=0;
}else{
if(r==max){
h=60*(g-b)/_7c4;
}else{
if(g==max){
h=120+60*(b-r)/_7c4;
}else{
h=240+60*(r-g)/_7c4;
}
}
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["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
dojo.provide("dojo.fx.Toggler");
(function(){
var _7c7={_fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,args||[]);
}
return this;
}};
var _7ca=function(_7cb){
this._index=-1;
this._animations=_7cb||[];
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(_7ca,{_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(_7cd,_7ce){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_7ce&&this._current.status()=="playing"){
return this;
}
var _7cf=dojo.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_7d0=dojo.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_7d2=dojo.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
dojo.disconnect(_7cf);
dojo.disconnect(_7d0);
dojo.disconnect(_7d2);
});
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(_7d6,_7d7){
this.pause();
var _7d8=this.duration*_7d6;
this._current=null;
dojo.some(this._animations,function(a){
if(a.duration<=_7d8){
this._current=a;
return true;
}
_7d8-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_7d8/_current.duration,_7d7);
}
return this;
},stop:function(_7da){
if(this._current){
if(_7da){
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(_7ca,_7c7);
dojo.fx.chain=function(_7dd){
return new _7ca(_7dd);
};
var _7de=function(_7df){
this._animations=_7df||[];
this._connects=[];
this._finished=0;
this.duration=0;
dojo.forEach(_7df,function(a){
var _7e1=a.duration;
if(a.delay){
_7e1+=a.delay;
}
if(this.duration<_7e1){
this.duration=_7e1;
}
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(_7de,{_doAction:function(_7e3,args){
dojo.forEach(this._animations,function(a){
a[_7e3].apply(a,args);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_7e6,args){
var t=this._pseudoAnimation;
t[_7e6].apply(t,args);
},play:function(_7e9,_7ea){
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(_7eb,_7ec){
var ms=this.duration*_7eb;
dojo.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_7ec);
});
this._call("gotoProcent",arguments);
return this;
},stop:function(_7ef){
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(_7de,_7c7);
dojo.fx.combine=function(_7f0){
return new _7de(_7f0);
};
})();
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(_7f3){
return this.showAnim.play(_7f3||0);
},hide:function(_7f4){
return this.hideAnim.play(_7f4||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 _7f9=dojo.style(node,"height");
return Math.max(_7f9,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.NodeList-fx"]){
dojo._hasResource["dojo.NodeList-fx"]=true;
dojo.provide("dojo.NodeList-fx");
dojo.extend(dojo.NodeList,{_anim:function(obj,_809,args){
args=args||{};
return dojo.fx.combine(this.map(function(item){
var _80c={node:item};
dojo.mixin(_80c,args);
return obj[_809](_80c);
}));
},wipeIn:function(args){
return this._anim(dojo.fx,"wipeIn",args);
},wipeOut:function(args){
return this._anim(dojo.fx,"wipeOut",args);
},slideTo:function(args){
return this._anim(dojo.fx,"slideTo",args);
},fadeIn:function(args){
return this._anim(dojo,"fadeIn",args);
},fadeOut:function(args){
return this._anim(dojo,"fadeOut",args);
},animateProperty:function(args){
return this._anim(dojo,"animateProperty",args);
},anim:function(_813,_814,_815,_816,_817){
var _818=dojo.fx.combine(this.map(function(item){
return dojo.animateProperty({node:item,properties:_813,duration:_814||350,easing:_815});
}));
if(_816){
dojo.connect(_818,"onEnd",_816);
}
return _818.play(_817||0);
}});
}
if(!dojo._hasResource["dojox.fx.Shadow"]){
dojo._hasResource["dojox.fx.Shadow"]=true;
dojo.provide("dojox.fx.Shadow");
dojo.experimental("dojox.fx.Shadow");
dojo.declare("dojox.fx.Shadow",dijit._Widget,{shadowPng:dojo.moduleUrl("dojox.fx","resources/shadow"),shadowThickness:7,shadowOffset:3,opacity:0.75,animate:false,node:null,startup:function(){
this.inherited(arguments);
this.node.style.position="relative";
this.pieces={};
var x1=-1*this.shadowThickness;
var y0=this.shadowOffset;
var y1=this.shadowOffset+this.shadowThickness;
this._makePiece("tl","top",y0,"left",x1);
this._makePiece("l","top",y1,"left",x1,"scale");
this._makePiece("tr","top",y0,"left",0);
this._makePiece("r","top",y1,"left",0,"scale");
this._makePiece("bl","top",0,"left",x1);
this._makePiece("b","top",0,"left",0,"crop");
this._makePiece("br","top",0,"left",0);
this.nodeList=dojo.query(".shadowPiece",this.node);
this.setOpacity(this.opacity);
this.resize();
},_makePiece:function(name,_81e,_81f,_820,_821,_822){
var img;
var url=this.shadowPng+name.toUpperCase()+".png";
if((dojo.isIE)&&(dojo.isIE<7)){
img=document.createElement("div");
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+(_822?", sizingMethod='"+_822+"'":"")+")";
}else{
img=document.createElement("img");
img.src=url;
}
img.style.position="absolute";
img.style[_81e]=_81f+"px";
img.style[_820]=_821+"px";
img.style.width=this.shadowThickness+"px";
img.style.height=this.shadowThickness+"px";
dojo.addClass(img,"shadowPiece");
this.pieces[name]=img;
this.node.appendChild(img);
},setOpacity:function(n,_826){
if(dojo.isIE){
return;
}
if(!_826){
_826={};
}
if(this.animate){
var _827=[];
this.nodeList.forEach(function(node){
_827.push(dojo._fade(dojo.mixin(_826,{node:node,end:n})));
});
dojo.fx.combine(_827).play();
}else{
this.nodeList.style("opacity",n);
}
},setDisabled:function(_829){
if(_829){
if(this.disabled){
return;
}
if(this.animate){
this.nodeList.fadeOut().play();
}else{
this.nodeList.style("visibility","hidden");
}
this.disabled=true;
}else{
if(!this.disabled){
return;
}
if(this.animate){
this.nodeList.fadeIn().play();
}else{
this.nodeList.style("visibility","visible");
}
this.disabled=false;
}
},resize:function(args){
var x;
var y;
if(args){
x=args.x;
y=args.y;
}else{
var co=dojo._getBorderBox(this.node);
x=co.w;
y=co.h;
}
var _82e=y-(this.shadowOffset+this.shadowThickness);
if(_82e<0){
_82e=0;
}
if(y<1){
y=1;
}
if(x<1){
x=1;
}
with(this.pieces){
l.style.height=_82e+"px";
r.style.height=_82e+"px";
b.style.width=x+"px";
bl.style.top=y+"px";
b.style.top=y+"px";
br.style.top=y+"px";
tr.style.left=x+"px";
r.style.left=x+"px";
br.style.left=x+"px";
}
}});
}
if(!dojo._hasResource["generic.layout.SwatchContainer"]){
dojo._hasResource["generic.layout.SwatchContainer"]=true;
dojo.provide("generic.layout.SwatchContainer");
var cm_el_ok=0;
dojo.declare("generic.layout.SwatchContainer",[dijit.layout.ContentPane,dijit._Templated,dijit._Container],{templateString:"",templateString:"<div class=\"swatch_list\">\n\t<div class=\"scrollpane\" dojoAttachPoint=\"scrollPaneNode\" id=\"scrollpane\">\n\t\t<div class=\"scrollable\" dojoAttachPoint=\"scrollViewNode\">\n\t\t\t<div class=\"scrollable_inner\" dojoAttachPoint=\"scrollAreaNode\" dojoAttachEvent=\"onmouseleave:_onMouse\">\n\t\t\t\t<div class=\"shade_selector\" dojoAttachPoint=\"containerNode\"></div>\n\t\t\t</div>\n\t\t</div>\n    <div class=\"divDottedNode\" dojoAttachPoint=\"divDottedNode\"></div>\n    <span dojoAttachPoint=\"scrollMessageNode\" class=\"swatch_container_scroll_message\" style=\"font-size: 11px;color: #20558A;\">\n      <a dojoAttachPoint=\"viewAllAnchorNode\" href=\"javascript:void(0);\" style=\"font-size: 10px; color: #20558A; text-transform: uppercase;\">View All <span dojoAttachPoint=\"swatchCountNode\"></span> Shades</a> &raquo;\n    </span>\n\t</div>\n</div>\n",_started:false,_loaded:{},_dataMethod:"sort",_dataParam:"names",_activeSet:"",_defSmoosh:"",_initialized:0,swatchWidget:"generic.layout._Swatch",swatchClass:"shade",swatchSelectedClass:"sel_shade",changeAddToBagStateCb:null,selectedColorDescId:"selected_color_desc",selectedInventoryStatusId:"selected_color_inventory_message",swatchPrefix:"swatch_",mainProdBgId:"main_prod_bg",prodSkuId:"prod_sku",selectChildEventName:"/swatchcontainer/event/selectChild",swatchEventOnClickName:"/swatch/event/onclick",swatchEventOnmouseName:"/swatch/event/onmouse",swatchEventOnFocusBlurName:"/swatch/event/onfocusblur",swatchContainerEventStartUpName:"/swatchcontainer/event/startup",swatchContainerEventAddChild:"/swatchcontainer/event/addChild",swatchEventOnMouse:"/swatch/event/onmouse",filterControlsEventChangeName:"/filtercontrols/event/change",shortMessaging:false,viewAllLink:true,shippingNode:null,toggleShipping:false,swatchHoverNodeId:"swatch_hover_node",popup_reference:null,rowsAdjusted:0,_handle:null,_pane:null,skus:"",product:"",smooshImg:"",medImg:"",type:"",sorters:{},filters:{},postMixInProperties:function(){
this.inherited(arguments);
this.skus=(this.product.sku_subset)?this.product.sku_subset:this.product.skus;
this.sorters=this.product.sorters;
this.filters=this.product.filters;
dojo.subscribe(this.swatchEventOnClickName,this,function(args){
this._swatchDance(args);
var cid=args.swatch.id;
this.selectChild(cid);
});
dojo.subscribe(this.swatchEventOnmouseName,this,function(args){
this._swatchDance(args);
});
},postCreate:function(){
this.inherited(arguments);
this._loaded=[];
var _832=dojo.getObject(this.swatchWidget);
var _833=this.skus[0].cat_id||undefined;
var _834=this.skus[0].prod_id||undefined;
var _835=[];
if(this.type==="all_shades"){
this._dataParam="names_as";
}
for(var i=0;i<this.skus.length;i++){
var wid=this.swatchPrefix+i.toString();
var sku=this.skus[i];
var _839=false;
for(var j=0;j<_835.length;j++){
if(sku.sku_id==_835[j]){
_839=true;
break;
}
}
if(!_839&&_835.length>0){
continue;
}
var _83b={2:"OUT OF STOCK",3:"COMING SOON",7:"SOLD OUT"};
var _83c="";
var _83d="";
if(dojo.isIE){
_83c="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+sku.smoosh_thumb+"',sizingMethod='scale')";
_83d="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
}
var _83e=new _832({id:wid,containerId:this.id,baseClass:this.swatchClass,sku:sku,defSmoosh:sku.smoosh_thumb,medImage:sku.image,skuLength:this.skus.length,ie6SpanStyle:_83c,ie6ImageStyle:_83d,inventoryStatus:_83b[sku.sku_data.inventory_status]||"",inventoryStyle:"note alert",disabled:(_83b[sku.sku_data.inventory_status])?"-disable-"+sku.sku_data.inventory_status+"-"+i.toString():"",changeAddToBagStateCb:this.changeAddToBagStateCb,prodSkuId:this.prodSkuId,selectedColorDescId:this.selectedColorDescId,selectedInventoryStatusId:this.selectedInventoryStatusId,selectChildEventName:this.selectChildEventName,swatchEventOnClickName:this.swatchEventOnClickName,swatchEventOnmouseName:this.swatchEventOnmouseName,swatchEventOnFocusBlurName:this.swatchEventOnFocusBlurName,shortMessaging:this.shortMessaging,shippingNode:this.shippingNode,toggleShipping:this.toggleShipping,swatchHoverNodeId:this.swatchHoverNodeId,type:this.type,container:this});
this._loaded[i]=_83e;
}
var _83f=10;
var solo=(this.skus[0].color.length==1)?true:false;
if(this.skus.length>_83f&&this.viewAllLink&&solo){
this.swatchCountNode.innerHTML=this.skus.length;
if(dojo.isIE){
this.swatchCountNode.innerHTML+="&nbsp;";
}
}else{
if(this.scrollMessageNode){
dojo.style(this.scrollMessageNode,{display:"none"});
}
if(this.divDottedNode){
dojo.style(this.divDottedNode,{display:"none"});
}
}
this._processData(this._dataMethod,this._dataParam);
var self=this;
dojo.subscribe(this.filterControlsEventChangeName,this,function(args){
self._processData(args.method,args.param,args.filterBy,args.columns);
});
if(this.selectedChildWidget.status_text!=""){
this.changeAddToBagStateCb({state:"disable",id:this.prodSkuId});
dojo.byId(this.selectedInventoryStatusId).innerHTML="<span class=\"note alert\">"+this.selectedChildWidget.status_text+"</span>";
if(this.toggleShipping){
dojo.style(this.shippingNode,{display:"none"});
}
}
var _843=dojo.query(".shade .swatch",this.domNode);
for(var i=0;i<_843.length;i++){
_843[i].onmouseover=function(){
var _844=["first","last","solo"];
this.over_class="over";
for(var x=0;x<_844.length;x++){
if(this.className.match(_844[x])){
this.over_class=_844[x]+"_over";
break;
}
}
this.className+=" "+this.over_class;
cm_el_ok=1;
};
_843[i].onmouseout=function(){
this.className=this.className.replace(this.over_class,"");
};
}
if(_83e.type=="duo"||_83e.type=="quad"||_83e.type=="quin"||_83e.type=="sext"){
var _846;
if(_83e.type=="duo"){
_846="sel_shade_duos";
}else{
if(_83e.type=="quad"){
_846="sel_shade_quads";
}else{
if(_83e.type=="quin"){
_846="sel_shade_quins";
}else{
if(_83e.type=="sext"){
_846="sel_shade_sext";
}
}
}
}
var sets=dojo.query(".shade .set_item",this.domNode);
for(var i=0;i<sets.length;i++){
sets[i].onmouseover=function(){
if(this.className&&this.className.match("last")){
dojo.addClass(this.parentNode,"lastSelected");
}else{
if(this.className&&this.className.match("first")){
dojo.addClass(this.parentNode,"firstSelected");
}
}
};
sets[i].onmouseout=function(){
if(this.className&&this.className.match("last")){
dojo.removeClass(this.parentNode,"lastSelected");
}else{
if(this.className&&this.className.match("first")){
dojo.removeClass(this.parentNode,"firstSelected");
}
}
};
}
}
if(this.type=="solo"||this.type=="all_shades"){
this._shadeNameLengthCheck();
}
},startup:function(){
if(this._started){
return;
}
var _848=this.getChildren();
dojo.some(_848,function(_849){
if(_849.selected){
this.selectedChildWidget=_849;
}
return _849.selected;
},this);
var _84a=this.selectedChildWidget;
if(!_84a&&_848[0]){
_84a=this.selectedChildWidget=_848[0];
_84a.selected=true;
}
dojo.publish(this.swatchContainerEventStartUpName,[{children:_848,selected:_84a}]);
this.inherited(arguments);
},selectChild:function(_84b){
_84b=dijit.byId(_84b);
if(this.selectedChildWidget!=_84b){
this._updateSelected(_84b,this.selectedChildWidget);
this.selectedChildWidget=_84b;
dojo.publish(this.selectChildEventName,[_84b]);
}
},_swatchDance:function(args){
var _84d=args.swatch||this.selectedChildWidget;
var _84e;
var _84f;
if(args.etype=="mouseout"||args.etype=="mouseleave"){
this._normalizeShade();
if(_84d.type=="solo"){
_84e="solo";
_84f=this.selectedChildWidget.asHex[0];
}else{
if(_84d.type=="duo"){
_84e="duo";
_84f="url('"+_84d.sku.overlay+"')";
}else{
_84f="url('"+_84d.sku.overlay+"')";
}
}
}
if(args.etype=="mouseover"||args.etype=="mouseenter"||args.etype=="click"){
if(this.smooshNode){
this.smooshNode.style.backgroundColor=_84d.selectedColor?_84d.selectedColor:_84d.sku.color[0];
}
if(_84d.type=="solo"||_84d.type=="all_shades"){
_84e="solo";
_84f=_84d.sku.color[0];
}else{
if(_84d.type=="duo"){
_84e="duo";
_84f="url('"+_84d.sku.overlay+"')";
}else{
_84f="url('"+_84d.sku.overlay+"')";
}
}
}
if(!this.prodBgNode){
this.prodBgNode=dojo.byId("main_prod_bg");
}
if(_84e=="solo"){
this.prodBgNode.style.backgroundColor=_84f;
}else{
if(_84f){
this.prodBgNode.style.backgroundImage=_84f;
}
}
},_processData:function(_850,_851,_852,_853){
if((this._dataMethod==_850)&&this._started){
return;
}
this._dataMethod=_850;
this._dataParam=_851;
var set;
if(this._dataMethod=="sort"){
if(_851=="status"){
var tmp=this.sorters[this._dataParam];
for(var i=1;i<=4;i++){
var sub=tmp[i.toString()];
if(!set){
set=sub;
}else{
set.concat(sub);
}
}
}else{
if(this._dataParam=="all"){
set=_853==3?this.sorters["display_order_as"]:this.sorters["display_order"];
}else{
set=this.sorters[this._dataParam];
}
}
}else{
if(this._dataMethod=="filter"){
if(_851=="all"){
set=_853==3?this.sorters["display_order_as"]:this.sorters["display_order"];
}else{
if(_852=="color_family"){
set=this.filters.color_family[this._dataParam];
}else{
if(_852=="finishes"){
set=this.filters.finishes[this._dataParam];
}
}
}
}else{
if(_851=="all"){
this._dataMethod="sort";
this._dataParam="names";
set=_853==3?this.sorters[this._dataParam+"_as"]:this.sorters[this._dataParam];
}else{
var tmp=this.filters;
for(var i in tmp){
if(dojo.exists(_851,tmp[i])){
set=tmp[i][_851];
}
}
}
}
}
this._activeSet=set;
this._updateSet();
},_updateSet:function(){
var _858=this.getChildren();
if(_858){
for(var i=0;i<_858.length;i++){
var _85a=_858[i];
this.removeChild(_85a);
}
}
this._initialized++;
var ids=this._activeSet;
if(ids){
for(var i=0;i<ids.length;i++){
var idx=ids[i];
var _85d=this._loaded[idx];
if(_85d){
this.addChild(_85d);
dojo.publish(this.swatchContainerEventAddChild,[_85d]);
if(!this.selectedChildWidget){
this.selectChild(_85d.id);
}
}
}
this._setShadeHeightForRow();
}
},_setShadeHeightForRow:function(){
var _85e=this.getChildren();
var _85f=_85e.length;
var _860=(this.type==="all_shades")?3:2;
var rows=Math.ceil(_85f/_860);
this._resetShadeHeight();
this.rowsAdjusted=0;
for(var i=0;i<_85f;i+=_860){
var _863=_85e[i];
var _864=_85e[i+1];
if(!_864){
break;
}
var _865=(_860==3)?_85e[i+2]:null;
var row=(_865)?[_863,_864,_865]:[_863,_864];
for(var j=0;j<row.length;j++){
if(row[j].hasMultiLinedShadeName()&&row[j].hasSubtext()||row[j].hasThreeLinedShadeName()){
this.rowsAdjusted++;
dojo.style(_863.domNode,{"height":"30px"});
dojo.style(_864.domNode,{"height":"30px"});
if(_865){
dojo.style(_865.domNode,{"height":"30px"});
}
break;
}
}
}
},_resetShadeHeight:function(){
var _868=this.getChildren();
dojo.forEach(_868,function(c){
dojo.style(c.domNode,{height:"25px"});
});
},_updateSelected:function(_86a,_86b){
if(!_86a){
return;
}
if(_86b){
_86b.selected=false;
if(_86b.type=="sext"){
dojo.removeClass(_86b.domNode,"sel_shade_sexts");
}else{
if(_86b.type=="quin"){
dojo.removeClass(_86b.domNode,"sel_shade_quins");
}else{
if(_86b.type=="quad"){
dojo.removeClass(_86b.domNode,"sel_shade_quads");
}else{
if(_86b.type=="duo"){
dojo.removeClass(_86b.domNode,"sel_shade_duos");
}else{
dojo.removeClass(_86b.domNode,this.swatchSelectedClass);
if(dojo.isIE==6){
dojo.addClass(_86b.swatchImgNode,"over");
dojo.removeClass(_86b.swatchImgNode,"over");
}
}
}
}
}
if(_86b.type=="quin"||_86b.type=="sext"){
if(dojo.isIE==6){
dojo.query(".swatch",_86b.domNode).forEach(function(n){
dojo.trigger(n,"onmouseout");
});
}
}
}
_86a.selected=true;
if(_86a.type=="sext"){
dojo.addClass(_86a.domNode,"sel_shade_sexts");
}else{
if(_86a.type=="quin"){
dojo.addClass(_86a.domNode,"sel_shade_quins");
}else{
if(_86a.type=="quad"){
dojo.addClass(_86a.domNode,"sel_shade_quads");
}else{
if(_86a.type=="duo"){
dojo.addClass(_86a.domNode,"sel_shade_duos");
}else{
dojo.addClass(_86a.domNode,this.swatchSelectedClass);
}
}
}
}
if(_86a.type=="quin"||_86a.type=="sext"){
if(dojo.isIE==6){
dojo.query(".swatch",_86a.domNode).forEach(function(n){
dojo.trigger(n,"onmouseover");
});
}
}
},_shadeBordersOnOff:function(){
},_normalizeShade:function(){
this.smooshNode.style.backgroundColor=this.selectedChildWidget.revertColor?this.selectedChildWidget.revertColor:this.selectedChildWidget.selectedColor;
if(!this.prodBgNode){
this.prodBgNode=dojo.byId("main_prod_bg");
}
if(this.selectedChildWidget.type=="solo"){
this.prodBgNode.style.backgroundColor=this.selectedChildWidget.sku.color[0];
}else{
if(this.selectedChildWidget.type=="duo"){
this.prodBgNode.style.backgroundImage="url('"+this.selectedChildWidget.sku.overlay+"')";
}else{
this.prodBgNode.style.backgroundImage="url('"+this.selectedChildWidget.sku.overlay+"')";
}
}
},_onMouse:function(e){
dojo.publish(this.swatchEventOnMouse,[{etype:e.type,swatch:null}]);
dojo.publish(this.selectChildEventName,[this.selectedChildWidget]);
},destroy:function(){
this._beingDestroyed=true;
this.inherited(arguments);
},_shadeNameLengthCheck:function(){
dojo.query(".shade_info a strong").forEach(function(node){
var _870=node.innerHTML.split(" ");
if(_870.length>1&&_870[0].length>10){
node.style.letterSpacing="0.3px";
}
});
}});
dojo.declare("generic.layout._Swatch",[dijit._Widget,dijit._Templated],{templateString:"",templatePath:"",_singlePath:dojo.moduleUrl("site","layout/templates/_Swatch.html"),_duoPath:dojo.moduleUrl("site","layout/templates/_Duo.html"),_quadPath:dojo.moduleUrl("site","layout/templates/_Quad.html"),_quinPath:dojo.moduleUrl("site","layout/templates/_Quin.html"),_sextPath:dojo.moduleUrl("site","layout/templates/_Sext.html"),_singlePathAllShades:dojo.moduleUrl("site","layout/templates/_SwatchAllShades.html"),baseClass:"shade",changeAddToBagStateCb:null,sku:null,type:"solo",tmplValues:{},shade:[],asHex:[],asRgb:[],selected:false,selectedColor:"",revertColor:"",selectedStatus:"",revertStatus:"",shortMessaging:false,isAllShades:false,statusMessages:{2:"OUT OF STOCK - If you purchase this item you will be notified of the expected ship date via email.",3:"COMING SOON",7:"SOLD OUT"},constructor:function(){
this.colorToSwatch={};
},postMixInProperties:function(){
dojo.mixin(this,this.sku);
this.templatePath=this._singlePath;
var _871=[];
var hex=[];
var rgb=[];
var _874={};
var _875=this.sku.color;
this.singleShade=(_875.length==1)?true:false;
if(this.type==="all_shades"){
this.isAllShades=true;
}
if(_875){
for(var i=0;i<_875.length;i++){
if(i==1){
this.type="duo";
this.templatePath=this._duoPath;
}
if(i==3){
this.type="quad";
this.templatePath=this._quadPath;
}
if(i==4){
this.type="quin";
this.templatePath=this._quinPath;
}
if(i==5){
this.type="sext";
this.templatePath=this._sextPath;
}
if(i==0&&this.type=="all_shades"){
this.type="solo";
this.templatePath=this._singlePathAllShades;
}
var _877=new dojox.color.Color(this.sku.color[i]);
_871.push(_877);
hex.push(_877.toHex());
rgb.push(_877.toRgb());
_874["asHex"+i.toString()]=_877.toHex();
}
}
this.shade=_871;
this.asHex=hex;
this.asRgb=rgb;
this.tmplValues=_874;
dojo.mixin(this,this.tmplValues);
this.revertColor=this.asHex[0];
this.revertStatus=dojo.byId(this.selectedInventoryStatusId).innerHTML;
for(var i=0;i<this.sku.color.length;i++){
this.colorToSwatch[this.sku.color[i].toUpperCase()]=i;
}
this.inherited(arguments);
},postCreate:function(){
var self=this;
if(this.sku.flag&&this.statusNode.innerHTML==""){
for(var i in this.sku.flag_images){
this.statusNode&&dojo.style(this.statusNode,{color:"#C8A051"});
if(this.sku.flag_images["4"]!=undefined){
var _87a=this.sku.flag_images["4"];
this.statusNode.innerHTML=_87a.alt;
break;
}else{
var _87a=this.sku.flag_images[i];
this.statusNode.innerHTML+=(this.statusNode.innerHTML==""?"":", ");
this.statusNode.innerHTML+=_87a.alt;
}
}
}
if(this.shortMessaging){
this.statusMessages[2]="OUT OF STOCK";
}
this._placeSwatchHovers();
if(this.swatchImgNode&&dojo.isIE>=7){
dojo.style(this.swatchImgNode,{overflow:"visible"});
}
this.inherited(arguments);
},_onSwatchClick:function(e){
var _87c;
var _87d=this.domNode;
var _87e=this.targetImageNode;
if(_87e){
_87c=(dojo.isIE==6?_87e.parentNode.childNodes[0].style.backgroundColor:_87e.parentNode.style.backgroundColor);
}else{
_87c=this.asHex[0];
}
this.selectedColor=_87c;
this.revertColor=_87c;
dojo.publish(this.swatchEventOnClickName,[{etype:e.type,swatch:this}]);
var _87f;
if(dojo.isIE){
_87f=_87d.childNodes[0].id;
}else{
_87f=_87d.childNodes[1].id;
}
var _880=dojo.byId(this.prodSkuId);
var _881="";
var _882;
if(cm_el_ok==1){
if(page_data.catalog.quickview&&typeof page_data.catalog.quickview[this.cat_id+"PROD"+this.prod_id]!="undefined"){
_881=page_data.catalog.quickview[this.cat_id+"PROD"+this.prod_id];
_882="QV : ";
}else{
if(page_data.catalog.spp&&page_data.catalog.spp.product){
_881=page_data.catalog.spp.product;
_882="";
}
}
if(page_data.catalog||page_data.catalog.quickview){
cmCreatePageElementTag(this.shade_name,_882+"SWATCH : "+_881.product_id);
}
}
cm_el_ok=0;
var _883=dojo.byId(this.selectedInventoryStatusId);
if(_87f.indexOf("disable")>=0){
var _884=_87f.split("-")[2];
if(_884!=2){
this.changeAddToBagStateCb({state:"disable",id:_880.id});
}else{
this.changeAddToBagStateCb({state:"enable",id:_880.id});
}
_883.innerHTML="<span class=\"note alert\" style=\"text-transform: none\">"+this.statusMessages[_884]+"</span>";
if(this.toggleShipping){
this._toggleShippingMessage();
}
this.selectedStatus=_883.innerHTML;
this.revertStatus=_883.innerHTML;
}else{
this.changeAddToBagStateCb({state:"enable",id:_880.id});
_883.innerHTML="";
if(this.toggleShipping){
this._toggleShippingMessage();
}
this.selectedStatus=_883.innerHTML;
this.revertStatus=_883.innerHTML;
}
},_onMouse:function(e){
if(e.type=="mouseout"||e.type=="mouseleave"){
dojo.byId(this.selectedInventoryStatusId).innerHTML=this.revertStatus;
if(this.toggleShipping){
this._toggleShippingMessage();
}
if(this.singleShade){
dojo.removeClass(this.swatchImgNode,"over");
}
return;
}
if(this.singleShade){
dojo.addClass(this.swatchImgNode,"over");
}
var _886=e.currentTarget;
var _887;
var _888;
if(dojo.isIE){
_887=_886.childNodes[0].id;
}else{
_887=_886.childNodes[1].id;
}
if(_887.indexOf("disable")>=0){
var _889=_887.split("-")[2];
_888="<span class=\"note alert\" style=\"text-transform: none\">"+this.statusMessages[_889]+"</span>";
}else{
_888="";
}
var _88a;
if(e.currentTarget.className=="swatch_ico"){
var _88b=e.currentTarget.id;
_88a=dojo.byId(_88b).style.backgroundColor;
dojo.byId(this.selectedInventoryStatusId).innerHTML=_888;
}else{
_88a=this.selectedColor?this.selectedColor:this.asHex[0];
dojo.byId(this.selectedInventoryStatusId).innerHTML=this.selectedStatus?this.selectedStatus:_888;
}
if(this.toggleShipping){
this._toggleShippingMessage();
}
this.selectedColor=_88a;
this.selectedStatus=_888;
dojo.publish(this.swatchEventOnMouse,[{etype:e.type,swatch:this}]);
dojo.publish(this.selectChildEventName,[this]);
},_handleFocus:function(e){
dojo.publish(this.swatchEventOnFocusBlurName,[{type:e.type,swatch:this}]);
},hasMultiLinedShadeName:function(){
var _88d=this.sku.shade_name;
var _88e=_88d.length;
if(this.isAllShades){
return _88e>=12;
}else{
return _88e>=18;
}
},hasSubtext:function(){
return this.statusNode.innerHTML.length>0;
},_toggleShippingMessage:function(){
if(dojo.byId(this.selectedInventoryStatusId).innerHTML!=""){
dojo.style(this.shippingNode,{display:"none"});
}else{
dojo.style(this.shippingNode,{display:"block"});
}
},hasThreeLinedShadeName:function(){
var _88f=this.sku.shade_name;
var _890=_88f.length;
return _890>=18;
},_placeSwatchHovers:function(){
var self=this;
var _892=this.isAllShades;
var _893=this.sku.color.length==1;
if(_893){
var _894=new site.layout.SwatchHoverLarge({shade_name:this.shade_name,shade_desc:this.shade_desc,smooshImg:this.smoosh,color:this.sku.color[0],positioningNode:this.domNode,boxNode:this.domNode,swatch:this,sku:this.sku});
dojo.byId(this.swatchHoverNodeId).appendChild(_894.domNode);
dojo.connect(this.domNode,"onmouseover",function(e){
_894.show({event:e});
});
dojo.connect(this.domNode,"onmouseout",function(e){
_894.hide({event:e,minYComp:-1});
});
}else{
var _894=new site.layout.SwatchHoverLargeMulti({shade_name:this.shade_name,shade_desc:this.shade_desc,smooshImg:this.smoosh,color:this.sku.color[0],positioningNode:this.domNode,boxNode:this.domNode,swatch:this,sku:this.sku});
dojo.byId(this.swatchHoverNodeId).appendChild(_894.domNode);
var _897=dojo.query(".swatch_ico",this.domNode);
dojo.forEach(_897,function(_898){
dojo.connect(_898,"onmouseover",function(e){
var _89a=e.currentTarget;
var _89b=_89a.style.backgroundColor;
var _89c=new dojox.color.Color(_89b);
var _89d=self.colorToSwatch[_89c.toHex().toUpperCase()];
_894.changeColor(_89c.toHex());
_894.positioningNode=this.parentNode;
_894.boxNode=this;
_894.show({event:e});
});
dojo.connect(_898,"onmouseout",function(e){
_894.hide({event:e});
});
});
}
}});
dojo.declare("site.layout.SwatchHover",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"shade_layover_wrapper shadow_container_shade_layover swatch_hover\" dojoAttachEvent=\"onclick:_onHoverClick,onmouseenter:_onHoverMouseEnter,onmouseleave:_onHoverMouseLeave\" dojoAttachPoint=\"shadeLayoverWrapper\" style=\"display:none;\">\n    <div style=\"width:101px\">\n        <div class=\"shade_layover\" dojoAttachPoint=\"shadeLayover\"></div>\n        <div class=\"shade_layover_description sld_width\">\n            <div class=\"layover_shade_name\">${shade_name}</div>\n            <div class=\"layover_desc\" dojoAttachPoint=\"descriptionOne\">${shade_desc}</div>\n            \n        </div>\n        <div class=\"hover_image_wrapper\" style=\"height: 92px;width:95px;\">\n            <img class=\"hover_image\" id=\"hover_as_img\" style=\"background-color: ${color}\" dojoAttachPoint=\"hoverImage\" src=\"${smooshImg}\" />\n        </div>\n    </div>\n</div>  \n",smooshImg:"",appendString:"",hidePending:false,shadowCreated:false,shadow:null,heightSet:false,swatch:null,path:"",shoppable:true,statusText:"",constructor:function(args){
this.path=args.sku.sku_data.path;
if(args.sku.sku_data.inventory_status==="3"||args.sku.sku_data.inventory_status==="7"){
this.shoppable=false;
this.statusText=args.sku.sku_data.status_text;
}
this.price=args.sku.price;
},postMixInProperties:function(){
this.inherited(arguments);
this.quickview=this.swatch.container.popup_reference;
},postCreate:function(){
this.inherited(arguments);
var self=this;
this._setHeight();
if(dojo.isIE&&dojo.isIE<=6){
this._applyIEFilter();
}
dojo.connect(this.domNode,"onmouseout",function(e){
if(!self._insideBox({x:e.clientX,y:e.clientY,minYComp:-1,box:self.domNode})){
self.hide({event:e,minYComp:-1});
}
});
if(this.shoppable){
var _8a2=new site.productButtons({cartAction:"add",cartName:"checkout",buttonNode:this.addToBag,onAdd:function(){
self._hide();
self.quickview&&self.quickview._hide();
}});
}else{
dojo.style(this.addToBagContainer,{display:"none"});
dojo.style(this.inventoryStatusMessageNode,{display:"block"});
var _8a3=(this.shade_desc)?true:false;
if(_8a3){
dojo.removeClass(this.domNode,"w_a2b");
dojo.addClass(this.domNode,"single_line_large_w_inventory_status");
}else{
dojo.removeClass(this.domNode,"w_a2b");
dojo.addClass(this.domNode,"wo_a2b");
}
}
if(this._doubleLineDescription()){
this.descriptionOne.innerHTML=this.sku.short_shade_desc;
}
},show:function(args){
this._position();
dojo.style(this.shadeLayoverWrapper,{display:"block"});
if(!this.shadowCreated){
this._createShadow();
}
},hide:function(args){
var _8a6=args.event;
var _8a7=args.minYComp||0;
if(!this._insideBox({x:_8a6.clientX,y:_8a6.clientY,minYComp:_8a7})){
this._hide();
}
},_hide:function(){
dojo.style(this.shadeLayoverWrapper,{display:"none"});
},_xCompensation:function(){
return 22;
},_yCompensation:function(){
return 12;
},_setHeight:function(){
var _8a8=(this.shade_desc)?true:false;
if(_8a8){
dojo.addClass(this.shadeLayoverWrapper,"single_line"+this.appendString);
}else{
dojo.style(this.descriptionOne,{display:"none"});
}
},_insideBox:function(args){
var box=args.box||this.boxNode;
var _8ab=dojo.coords(box);
var x=args.x;
var y=args.y;
var minX=_8ab.x;
var maxX=_8ab.x+_8ab.w;
var minY=_8ab.y;
var maxY=_8ab.y+_8ab.h;
var _8b2=args.minYComp;
if((x<maxX&&x>minX)&&(y<(maxY-3)&&y>(minY-_8b2))){
return true;
}else{
return false;
}
},_onHoverClick:function(e){
dojo.trigger(this.swatch.domNode,"onclick");
if(dojo.isIE==6){
dojo.addClass(this.swatch.swatchImgNode,"over");
}
},_onHoverMouseEnter:function(e){
var _8b5=(dojo.isIE)?"onmouseenter":"on"+e.type;
dojo.trigger(this.swatch.domNode,_8b5);
},_onHoverMouseLeave:function(e){
var _8b7=(dojo.isIE)?"onmouseleave":"on"+e.type;
dojo.trigger(this.swatch.domNode,_8b7);
dojo.trigger(this.swatch.container.scrollAreaNode,_8b7);
},_position:function(){
var _8b8=dojo.coords(this.positioningNode,true);
var _8b9=this._xCompensation();
var _8ba=this._yCompensation();
var _8bb=dojo.style(this.shadeLayoverWrapper,"height");
dojo.style(this.domNode,{left:(_8b8.x+_8b9)+"px",top:(_8b8.y-(_8bb-_8ba))+"px"});
},_applyIEFilter:function(){
var _8bc="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.smooshImg+"',sizingMethod='scale')";
var _8bd="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
dojo.style(this.hoverImage.parentNode,{filter:_8bc,backgroundColor:this.color});
dojo.style(this.hoverImage,{filter:_8bd});
},_createShadow:function(){
var n=(dojo.isIE)?this.domNode.childNodes[0]:this.domNode.childNodes[1];
this.shadow=new dojox.fx.Shadow({node:n,shadowPng:"/images/shadow/shade_hover/shadow",shadowThickness:4});
this.shadowCreated=true;
this.shadow.startup();
}});
dojo.declare("site.layout.SwatchHoverLarge",site.layout.SwatchHover,{templateString:"<div class=\"shade_layover_wrapper_large w_a2b\" dojoAttachEvent=\"onclick:_onHoverClick,onmouseenter:_onHoverMouseEnter,onmouseleave:_onHoverMouseLeave\" dojoAttachPoint=\"shadeLayoverWrapper\" style=\"display:none;\">\n    <div>\n        <div class=\"shade_layover_large\" dojoAttachPoint=\"shadeLayover\"></div>\n        <div class=\"shade_layover_description sld_width_large\">\n            <div class=\"layover_shade_name\">${shade_name}</div>\n            <div class=\"layover_desc\" dojoAttachPoint=\"descriptionOne\">${shade_desc}</div>\n            \n        </div>\n        <div class=\"hover_image_wrapper\">\n            <img class=\"hover_image_large\" id=\"hover_as_img\" style=\"background-color: ${color}\" dojoAttachPoint=\"hoverImage\" src=\"${smooshImg}\" />\n        </div>\n        <div class=\"hover_buy_button\" dojoAttachPoint=\"addToBagContainer\">\n            <input dojoAttachPoint=\"addToBag\" class=\"form_submit\" type=\"image\" src=\"/images/btn/btn_xsell_addtobag.png\" alt=\"Add to Bag\" value=\"${path}\" />\n            <span class=\"price\">${price}</span>\n        </div>\n        <div dojoAttachPoint=\"inventoryStatusMessageNode\" class=\"swatch_hover_inventory_status\">\n            <span class=\"note alert\">${statusText}</span>\n        </div>\n    </div>\n</div> \n",appendString:"_large",postMixInProperties:function(){
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
},_doubleLineDescription:function(){
return this.shade_desc.length>30;
}});
dojo.declare("site.layout.SwatchHoverLargeMulti",site.layout.SwatchHoverLarge,{postMixInProperties:function(){
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
},changeColor:function(_8bf){
this.color=_8bf;
this._applyIEFilter();
dojo.style(this.hoverImage,{backgroundColor:_8bf});
},_xCompensation:function(){
var _8c0=this.swatch.color.length;
return (this.swatch.selected&&_8c0>4)?14:17;
},_yCompensation:function(){
var _8c1=this.swatch.color.length;
if(this.swatch.selected&&_8c1>4){
return 8;
}else{
if(this.swatch.selected&&_8c1<=4){
return 10;
}else{
return 12;
}
}
},_onHoverMouseEnter:function(e){
if(dojo.isIE){
dojo.addClass(this.positioningNode,"over");
}
var _8c3=(dojo.isIE)?"onmouseenter":"on"+e.type;
dojo.trigger(this.boxNode,_8c3);
},_onHoverMouseLeave:function(e){
dojo.removeClass(this.positioningNode,"over");
var _8c5=(dojo.isIE)?"onmouseleave":"on"+e.type;
dojo.trigger(this.boxNode,_8c5);
dojo.trigger(this.swatch.container.scrollAreaNode,_8c5);
},_onHoverClick:function(e){
dojo.trigger(this.swatch.domNode,"onclick");
}});
}
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["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 _8d9=[];
var enc=encodeURIComponent;
for(var name in map){
var _8dc=map[name];
var _8dd=enc(name)+"=";
_8d9.push(_8dd+enc(_8dc));
}
this.queryKey=map;
this.query=_8d9.join("&");
this.relative=this.path+"?"+this.query;
var url=this._build();
return url;
},mergeQuery:function(map){
if(!this.source){
this.parse();
}
var _8e0=dojo.mixin(this.queryKey,map);
var url=this.setQuery(_8e0);
return url;
}});
}
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(_8e2,args,cb,eb){
var self=this;
var _8e7=new generic.jsonrpc();
var d=_8e7.callRemote(_8e2,args);
if(!eb){
d.addBoth(function(resp){
cb(resp);
});
}else{
d.addCallback(function(resp){
cb(resp);
});
d.addErrback(function(resp){
eb(resp);
});
}
},alter:function(args){
if(!args.action||!args.cart){
return;
}
var _8ed=[];
dojo.forEach(args.skus,function(sku,idx){
_8ed[idx]={action:args.action,cart:args.cart,type:"sku",path:sku};
if(args.action==="qty"&&args.qtys){
_8ed[ix].qty=args.qtys[sku];
}
});
var _8f0=[{"actions":_8ed,"mostRecent":args.mostRecent}];
var _8f1=function(_8f2){
args.callback(_8f2);
};
var _8f3=function(err){
args.errback(err);
};
dojo.publish("/page/cart/preAlterCart",[{skus:args.skus}]);
this.callRemote("Cart.alterCart",_8f0,_8f1,_8f3);
},getContents:function(_8f5){
var self=this;
var _8f7=[{"cart":"checkout","params":{"item":["qty","total"],"sku":["path","sku_id","price","label","hexValue","color","size","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 _8f8=function(_8f9){
_8f5(_8f9);
};
var _8fa=_8f8;
this.callRemote("Cart.contents",_8f7,_8f8,_8fa);
}});
}
if(!dojo._hasResource["site.checkoutItemHandler"]){
dojo._hasResource["site.checkoutItemHandler"]=true;
var controlWindow=window.parent||window;
dojo.provide("site.checkoutItemHandler");
dojo.declare("site.checkoutItemHandler",null,{cartName:"checkout",handlers:[],onAlterCallback:null,_removeIsEnabled:true,_updateQtyIsEnabled:true,selectQtyId:"",skuPath:"",_updateQtyIsEnabled:true,constructor:function(args){
this.selectQtyId=args.selectQty;
this.skuPath=args.skuPath;
this.onAlterCallback=args.onAlterCallback;
var _8fc=dojo.byId(args.buttonRemove);
var _8fd=dojo.byId(this.selectQtyId);
if(_8fc){
this.handlers.push([dojo.connect(_8fc,"onclick",this,"_remove")]);
this.removeProgress=new generic.progress({containerId:args.buttonRemove,progressId:args.removeProgressIndicator});
}
if(_8fd){
var _8fe=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_8fe){
var self=this;
_8fe.onChange=function(){
self._updateQty();
};
}else{
this.handlers.push([dojo.connect(_8fd,"onchange",this,"_updateQty")]);
}
this.qtyProgress=new generic.progress({containerId:args.selectQtyContainer,progressId:args.qtyProgressIndicator});
}
},_remove:function(){
if(this._removeIsEnabled){
var self=this;
var cart=global.cartHandler;
var skus=[];
this.removeProgress.start();
this._removeIsEnabled=false;
skus[0]=this.skuPath;
var _903=function(_904){
self.onAlterCallback("remove",_904.error);
controlWindow.dojo.publish("/page/cart/alterCart/qty",[null]);
};
var _905=function(err){
self.removeProgress.clear();
self._removeIsEnabled=true;
};
cart.remove(skus,_903,_905);
}
},_updateQty:function(){
if(this._updateQtyIsEnabled){
var self=this;
var cart=global.cartHandler;
var skus=[];
var qtys={};
this.qtyProgress.start();
this._updateQtyIsEnabled=false;
skus[0]=this.skuPath;
var qty=this._getQty();
qtys[this.skuPath]=qty;
var _90c=function(_90d){
self.onAlterCallback("qty",_90d.error);
controlWindow.dojo.publish("/page/cart/alterCart/qty",[null]);
};
var _90e=function(err){
self.qtyProgress.clear();
self._updateQtyIsEnabled=true;
};
cart.qty(skus,qtys,_90c,_90e);
}
},_getQty:function(){
var qty="";
var _911=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_911){
qty=_911.value;
}else{
var _912=dojo.byId(this.selectQtyId);
qty=_912.options[_912.selectedIndex].value;
}
return qty;
}});
}
if(!dojo._hasResource["site.form.DropDownSelect"]){
dojo._hasResource["site.form.DropDownSelect"]=true;
dojo.provide("site.form.DropDownSelect");
dojo.declare("site.form.DropDownSelect",dojox.form.DropDownSelect,{_origId:null,_origNode:null,separatorTemplate:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\">${label}</div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",constructor:function(args){
console.log("constructor");
var src=dojo.byId(args.id);
if(src.nodeName=="SELECT"){
this._origNode=dojo.clone(src);
}
},postMixInProperties:function(){
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
var orig=this._origNode;
if(orig){
orig.attributes.removeNamedItem("dojoType");
orig.id=this.id+"_orig";
dojo.style(orig,{display:"none",visibility:"hidden",position:"absolute",top:"-999px"});
if(dojo.place(orig,this.id,"after")){
this._origNode=orig;
this._origId=orig.id;
}
}
this._setup();
},_addMenuItem:function(_916){
if(!_916.value){
var menu=this.dropDown;
var _918=(_916.label)?_916.label:"";
var sep=new dijit.MenuSeparator({templateString:this.separatorTemplate,label:_918});
menu.addChild(sep);
}else{
this.inherited(arguments);
}
},_setup:function(){
var self=this;
this.connect(this,"_openDropDown",function(e){
var pops=dojo.query(".dijitPopup");
console.log("pops: ",pops);
dojo.connect(pops[0],"onmouseleave",function(){
self._closeDropDown();
});
});
this.connect(this,"onChange",function(v){
self._handleChange(v);
});
},_handleChange:function(v){
var node=this._origNode;
var opts=node.options;
for(var i=0;i<opts.length;i++){
if(v==opts[i].value){
node.selectedIndex=i;
}
}
}});
}
if(!dojo._hasResource["site.layout.ShoppingBagUtilNav"]){
dojo._hasResource["site.layout.ShoppingBagUtilNav"]=true;
dojo.provide("site.layout.ShoppingBagUtilNav");
dojo.declare("site.layout.ShoppingBagUtilNav",[dijit._Widget,dijit._Templated],{templateString:"",templateString:"<li id=\"utilnav_shoppingbag\" class=\"menu_item\" dojoAttachPoint=\"containerNode\" dojoAttachEvent=\"onmouseenter:open\">\n\n\t<a href=\"/checkout/cart.tmpl\">Shopping Bag</a>: \n\t<span id=\"shoppingbag_size_section\" dojoAttachPoint=\"itemsTextNode\">0 items</span>\n\n\t<div id=\"shoppingbag_layer\" class=\"overlay_layer\" dojoAttachPoint=\"shoppingBagLayerNode\" dojoAttachEvent=\"onmouseleave:close\">\n\t\t<div class=\"shoppingbag_wrapper\">\n\t\t\t<div class=\"shoppingbag_container hidden\" id=\"shoppingbag_hide\" dojoAttachPoint=\"shoppingBagLoadingNode\">\n\t\t\t\t<img src=\"/images/common/one_moment.gif\" alt=\"loading ...\" style=\"margin:0px auto;\" />\n\t\t\t</div>\n\t\t\t<div class=\"shoppingbag_container\" id=\"shoppingbag_display\" dojoAttachPoint=\"shoppingBagDisplayNode\">\n\t\t\t\t<a href=\"javascript:void(0)\" class=\"close_btn\" dojoAttachEvent=\"onclick:close\">Close</a>\n\t\t\t\t<div class=\"action_btn\">\n\t\t\t\t\t<span class=\"shoppingbag_size\">Last item added to your bag</span>\n\t\t\t\t</div>\n\n\t\t\t\t<table class=\"shoppingbag_contents\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t<col class=\"col_prod_item\">\n\t\t\t\t\t\t<col class=\"col_prod_qty\">\n\t\t\t\t\t\t<col class=\"col_prod_total\">\n\t\t\t\t\t</colgroup>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class=\"prod_item\">\n\t\t\t\t\t\t\t\t<div class=\"prod_container\">\n\t\t\t\t\t\t\t\t\t<div class=\"prod_image\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"#\" dojoAttachPoint=\"prodImgLinkNode\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"swatch_ico\" id=\"shopping_cart_shade\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"/images/common/s.gif\" alt=\"\" dojoAttachPoint=\"swatchIcoNode\">\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"prod_thumb\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"/images/common/s.gif\" alt=\"\" dojoAttachPoint=\"prodThumbNode\">\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"prod_details\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"prod_title\">\n\t\t\t\t\t\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\" dojoAttachPoint=\"prodNameLinkNode\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"prod_title_primary\" style=\"font-weight: bold;\" dojoAttachPoint=\"prodNameNode\"></span><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"prod_title_secondary\" dojoAttachPoint=\"prodSubNameNode\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"prod_options\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"shade\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"note\" dojoAttachPoint=\"attrNameNode\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"shadeNameNode\"></span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div><!-- /prod_details -->\n\t\t\t\t\t\t\t\t</div><!-- /prod_container -->\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<td class=\"prod_qty\">\n\t\t\t\t\t\t\t\t<div class=\"filter_controls\" id=\"shoppingbag_qtyfilter\">\n\t\t\t\t\t\t\t\t\t<select id=\"shoppingbag_item1_qty\" class=\"orig_select\" dojoAttachPoint=\"prodQtyNode\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"prod_total\">\n\t\t\t\t\t\t\t\t<div class=\"prod_price\" dojoAttachPoint=\"prodPriceNode\"></div>\n\t\t\t\t\t\t\t\t<div class=\"action_btn\">\n\t\t\t\t\t\t\t\t\t<a href=\"javascript:void(0)\" dojoAttachPoint=\"rmLinkNode\" dojoAttachEvent=\"onclick:_remove\">remove</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table><!-- /shoppingbag_contents -->\n\n\t\t\t\t<div class=\"shoppingbag_footer\">\n\t\t\t\t\t<div class=\"shoppingbag_subtotal\">\n\t\t\t\t\t\t<span class=\"subtotal\">Subtotal <span class=\"subtotal_val\" dojoAttachPoint=\"subTotalNode\"></span></span>\n\t\t\t\t\t\t<div class=\"submit_btn\" dojoAttachEvent=\"onclick:_updateForCheckout\">\n\t\t\t\t\t\t\t<input class=\"form_submit form_btn_checkout\" type=\"image\" src=\"/images/btn/btn_checkout.png\" alt=\"Checkout\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"shoppingbag_details\">\n\t\t\t\t\t\t<dfn class=\"note alert\" dojoAttachPoint=\"noteAlertNode\"></dfn>\n\t\t\t\t\t\t<div class=\"action_btn\">\n\t\t\t\t\t\t\t<a href=\"/checkout/cart.tmpl\">View Bag</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\n\t\t\t\t\t<!--\n\t\t\t\t\t<ul class=\"rel_container\">\n\t\t\t\t\t\t<li class=\"rel_prod\">\n\t\t\t\t\t\t\t<div class=\"prod_container\">\n\t\t\t\t\t\t\t\t<div class=\"prod_image\">\n\t\t\t\t\t\t\t\t\t<a href=\"#\" dojoAttachPoint=\"wwwImgLinkNode\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"prod_thumb\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"/product/images/product/92x92/pholder_asd_02.gif\" alt=\"\" dojoAttachPoint=\"wwwProdImgNode\">\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"prod_details\">\n\t\t\t\t\t\t\t\t\t<div class=\"prod_title\">\n\t\t\t\t\t\t\t\t\t\t<dfn class=\"note\"><img src=\"/images/gnav/bag_hdr_rel.gif\" alt=\"Works Well With:\"></dfn>\n\t\t\t\t\t\t\t\t\t\t<h4>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\" dojoAttachPoint=\"wwwNameLinkNode\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"prod_title_primary\" dojoAttachPoint=\"wwwNameNode\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"prod_title_secondary\" dojoAttachPoint=\"wwwSubNameNode\"></span>\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"prod_options\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"shade\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"note\">Shade:</span>\n\t\t\t\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"wwwShadeNameNode\"></span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"action_btn\">\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_submit form_btn_add_to_bag\" type=\"image\" src=\"/images/btn/btn_add_to_bag.gif\" width=\"90\" height=\"22\" alt=\"Add to Bag\" dojoAttachEvent=\"onclick:_wwwAddToBag\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t//-->\n\n\n\t\t\t\t</div><!-- /shoppingbag_footer -->\n\t\t\t</div><!-- /shoppingbag_container -->\n\t\t</div><!-- /shoppingbag_wrapper -->\n\t</div><!-- /shoppingbag_layer -->\n\n</li>\n<!-- /SHOPPING_BAG -->\n",noteAlerts:{shipping:"Get Free Standard Shipping:<br> you're just ${lesscash} away.",congrats:"Congratulations! You qualify for Free Standard Shipping.",blank:" "},baseClass:"",widgetsInTemplate:false,itemCount:0,pricedItemCount:0,subtotal:0,displayItem:null,cartHandler:null,cartContents:null,cartProgress:null,is_open:false,is_empty:false,is_reload:false,originalTop:"45px",_fetching:false,_lastItemPath:"",is_propped:false,is_suppressed:false,constructor:function(){
this.cartProgress=new site.layout.QuickViewCartProgress();
},postMixInProperties:function(){
this.cartHandler=new generic.cart();
this._getItemCount();
this.is_suppressed=(dojo.global.SECTION=="checkout");
},postCreate:function(){
this.inherited(arguments);
console.log("post create");
this._updateDisplay();
var self=this;
dojo.style(this.shoppingBagLayerNode,"marginTop","auto");
dojo.subscribe("/page/cart/preAlterCart",this,function(args){
console.log("pre alter cart subscription event");
var dn=self.shoppingBagDisplayNode;
var ln=self.shoppingBagLoadingNode;
dojo.toggleClass(dn,"hidden",true);
dojo.toggleClass(ln,"hidden",false);
self.propOpen(true);
self.cartProgress.show();
});
dojo.subscribe("/page/cart/alterCart",this,function(args){
console.log("alter cart subscription event");
var resp=args.resp;
var _928=(resp.result.length>1)?true:false;
var _929=(_928)?resp.result[resp.result.length-1]:resp.result[0];
var _92a;
self.cartProgress.close();
if(_928){
_92a=new site.layout.QuickViewCartRegimen({items:resp.result,bagSubtotal:_929.subtotal,cart_qty:_929.cart_qty});
}else{
var www=_929.data.www;
_92a=new site.layout.QuickViewCart({www:www,items:resp.result,bagSubtotal:_929.subtotal,cart_qty:_929.cart_qty,xs_header:_929.data.xs_header});
}
_92a.show({modal:true});
self.is_reload=true;
self._updateDisplay();
});
dojo.subscribe("/page/cart/alterCart/qty",this,function(resp){
self._getItemCount();
});
},startup:function(){
if(this._started){
return;
}
if(this.cartContents===null&&!this._fetching){
this._fetchContents();
}
},open:function(){
if((this.is_open&&!this.is_propped)||(this.is_suppressed)){
return;
}
console.log("is_empty: "+this.is_empty," is_propped: ",this.is_propped," pricedItemCount: ",this.pricedItemCount);
if((!this.is_empty&&this.pricedItemCount>0)||this.is_propped){
var node=(window.quickViewPopup?top.document.getElementById(this.shoppingBagLayerNode.id):this.shoppingBagLayerNode);
dojo.style(node,"top",this.originalTop);
this.is_open=true;
if(this.cartContents===null&&!this._fetching){
this._fetchContents();
}
}
},propOpen:function(set){
if(set){
if(!this.is_open||!this.is_propped||window.quickViewPopup){
this.is_propped=true;
this.open();
}
}else{
if(this.is_open||this.is_propped){
this.is_propped=false;
this.close();
}
}
},close:function(){
if(this.is_propped){
return;
}
dojo.style(this.shoppingBagLayerNode,"top","-999em");
this.is_open=false;
},reload:function(){
console.log("reload bag util");
this._fetchContents();
},cbHandler:function(resp){
this._fetchContents();
},_getItemCount:function(){
var _930=dojo.cookie("page_data");
console.log("cart_cookie: ",_930);
var _931=dojo.cookie.deserialize(_930);
this.is_empty=true;
if(_930){
this.itemCount=_931["cart.order.tqty"]||0;
this.is_empty=false;
if(this.itemsTextNode!==undefined){
var _932=(this.itemCount&&this.itemCount==1)?" item":" items";
var _933=this.itemCount.toString()||0;
if(_933.length==0){
_933=0;
}
this.itemsTextNode.innerHTML=_933+_932;
}
}
},_fetchContents:function(){
console.log("fetch cart contents");
var self=this;
this._fetching=true;
var _935=page_data.initial_rpc["Cart.contents"].contents;
var _936=0;
var _937=0;
var _938=0;
var _939=dojo.cookie("page_data");
var _93a=dojo.cookie.deserialize(_939);
self.cartContents=_935;
for(var i=0;i<self.cartContents.length;i++){
var idx=self.cartContents[i];
_936+=parseInt(idx.item.qty);
_937+=parseFloat(idx.item.total);
if(_93a["cart.lpath"]){
if(idx.obj.path==_93a["cart.lpath"]){
_938=i;
}
}
}
self.pricedItemCount=_936;
console.log("pricedItemCount = "+this.pricedItemCount);
self.subtotal=_937;
if(self.subtotal<50){
self.lesscash=parseFloat(50-self.subtotal);
self.notename="shipping";
}else{
if(self.subtotal>=50){
self.lesscash=0;
self.notename="congrats";
}
}
var _93d=self.noteAlerts[self.notename];
if(self.lesscash){
var _93e=self._formatPrice(self.lesscash);
self.showNoteAlert=dojo.string.substitute(_93d,{lesscash:_93e});
}else{
self.showNoteAlert=_93d;
}
self.is_empty=false;
self.displayItem=self.cartContents[_938];
if(!self.displayItem){
self.is_empty=true;
}
self._updateDisplay();
self._fetching=false;
},_updateDisplay:function(){
var _d=this.displayItem;
this._getItemCount();
console.log("display item: ",_d);
if(_d){
var _do=_d.obj;
var _di=_d.item;
this.prodThumbNode.src=_do["product.image_url_medium"];
if(_do.hexValue){
this.swatchIcoNode.style.display="";
this.swatchIcoNode.style.backgroundColor=_do.hexValue;
}else{
this.swatchIcoNode.style.display="none";
}
console.log("SHADED? "+_do["product.shaded"]);
console.log("SIZED? "+_do["product.sized"]);
if(_do["product.shaded"]==1){
this.swatchIcoNode.style.backgroundColor="#"+_do.hexValue;
if(dojo.byId("shopping_cart_shade")){
dojo.byId("shopping_cart_shade").style.display="block";
}
}else{
if(dojo.byId("shopping_cart_shade")){
dojo.byId("shopping_cart_shade").style.display="none";
}
}
this.prodNameNode.innerHTML=_do["product.name"]?_do["product.name"]:"";
this.prodSubNameNode.innerHTML=_do["product.subName"]?_do["product.subName"]:"";
if(!_do["product.shaded"]&&!_do["product.sized"]){
this.attrNameNode.innerHTML="";
}else{
this.attrNameNode.innerHTML=_do["product.shaded"]?"Shade:":"Size:";
}
this.shadeNameNode.innerHTML=_do.label?_do.label:"";
this.prodPriceNode.innerHTML=this._formatPrice(_do.price);
this.subTotalNode.innerHTML=this._formatPrice(this.subtotal);
this.noteAlertNode.innerHTML=this.showNoteAlert;
this.prodImgLinkNode.href=_do["product.uri_spp"];
this.prodNameLinkNode.href=_do["product.uri_spp"];
this.prodQtyNode.selectedIndex=parseInt(_di.qty-1);
console.log("display updated, open? "+this.is_reload);
if(this.is_reload){
dojo.toggleClass(this.shoppingBagLoadingNode,"hidden",true);
dojo.toggleClass(this.shoppingBagDisplayNode,"hidden",false);
this.is_propped=false;
this.is_reload=false;
}
}
},_formatPrice:function(_942){
var spl=_942.toString().split(".");
var flt=spl[1]||"";
for(var i=flt.length;i<2;i++){
flt+="0";
}
var _946=spl[0]+"."+flt;
var _942="$"+_946;
return _942;
},_remove:function(){
console.log("remove displayItem from cart: ",this.displayItem);
var req={actions:[{action:"remove",cart:"checkout",type:"sku",path:this.displayItem.obj.path}]};
var self=this;
this.cartHandler.remove([this.displayItem.obj.path],dojo.hitch(this,"cbHandler"),dojo.hitch(this,"cbHandler"));
},_wwwAddToBag:function(){
console.log("add current www to bag");
},_updateForCheckout:function(){
console.log("check for qty changes then submit to checkout.");
window.location="/checkout/cart.tmpl";
},_deserialize:function(_949){
if(_949){
console.log("deserialize cookie: ",_949);
var _94a={};
var _94b=_949.split("&");
console.log("split cookie: ",_94b);
for(var i=0;i<_94b.length;i+=2){
console.log("cookie item: ",_94b[i],_94b[i+1]);
_94a[_94b[i]]=_94b[i+1];
}
console.log("returning items: ",_94a);
return _94a;
}
},_gotContents:function(_94d){
this.cartContents=_94d;
}});
}
if(!dojo._hasResource["site.layout.VideoCatalog"]){
dojo._hasResource["site.layout.VideoCatalog"]=true;
dojo.provide("site.layout.VideoCatalog");
dojo.declare("site.layout.VideoCatalog",generic.layout.InlineTemplate,{baseClass:"",_loaded:{},_active:{},_ready:false,_prodid:"",_catid:"",_abconfig:{btn_id:"add_to_bag_button"},product:"",title:"",desc:"",postMixInProperties:function(){
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
dojo.subscribe("/videotips/event/loadVideo",this,"updateVideo");
dojo.subscribe("/flash/event/cuePoint",this,"updateProduct");
var self=this;
var _94f=dojo.byId(this._abconfig.btn_id);
_94f.style.display="";
if(!this._started){
this.startup();
}
},startup:function(){
if(this._started){
return;
}
this.videoTitleNode.innerHTML="<strong>HOW TO GET YOUR<br>"+this.title+"</strong>";
this.videoDescNode.innerHTML=this.desc;
this._ready=true;
},updateVideo:function(args){
this.product=args.product;
this.title=args.title;
this.desc=args.desc;
this.videoTitleNode.innerHTML="<strong>HOW TO GET YOUR<br>"+this.title+"</strong>";
this.videoDescNode.innerHTML=this.desc;
},fetchProduct:function(){
this._splitProd();
console.log("cat: ",this._catid," prod: ",this._prodid);
var _951=[{"category":[this._catid],"product":[this._prodid],"category_fields":["category_id","category","product"],"product_fields":["product_id","sku","image_url_medium","image_url_small","name","subname","uri_spp","short_desc","attribute_label","attribute_desc","description","prod_rgn_subheading","family_code"],"sku_fields":["sku_id","path","inventory_status","price","size","color","shadename","shade_description","subname","product_code"]}];
var self=this;
var _953=function(resp){
self._handleResults(resp);
};
var _955=function(err){
self._handleErr(err);
};
this._call("ProductCatalog.manyByPath",_951,_953,_955);
},updateProduct:function(args){
console.log("updating product to: ",args[0]);
this.product=args[0];
this.fetchProduct();
},updateDisplay:function(){
var p=this._active.product;
var s=this._active.sku;
this.prodImageLinkNode.href=p.uri_spp;
this.prodTitleLinkNode.href=p.uri_spp;
this.prodImageNode.src="/flash/video/images/"+p.family_code+"_82x92.jpg";
this.prodMainTitle.innerHTML=p.name;
this.prodSubTitle.innerHTML=p.prod_rgn_subheading!==null?p.prod_rgn_subheading:"";
var _95a="";
for(var i=0;i<p.attribute_desc.length;i++){
var desc=p.attribute_desc[i];
var _95d=p.attribute_label[i]||"";
_95a+="<dt>"+_95d+"</dt><dd>"+desc+"</dd>";
}
if(s.shadename!==null){
this.prodUnitNode.innerHTML=s.shadename;
}else{
if(s.size!==null){
this.prodUnitNode.innerHTML=s.size;
}else{
this.prodUnitNode.innerHTML=" ";
}
}
var _95e=new Number(s.price);
this.prodPriceNode.innerHTML="$"+_95e.toFixed(2);
this.prodButtonNode.value=s.path;
this.prodButtonNode.style.display="";
this._loaded=true;
},_handleResults:function(resp){
console.log("_handleResults");
this._active.set=resp.result;
this._active.product=resp.result.product[this.product];
var _960=this._active.product.sku[0];
console.log("topsku: ",_960);
this._active.sku=resp.result.sku[_960];
this.updateDisplay();
},_handleErr:function(err){
console.log("_handleErr");
console.log(err.stack);
},_splitProd:function(){
var p=this.product;
this._catid=p.slice(0,6);
this._prodid=p.slice(6);
},_call:function(_963,args,cb,eb){
var self=this;
var r=new generic.jsonrpc();
var d=r.callRemote(_963,args);
if(!eb){
d.addBoth(function(resp){
cb(resp);
});
}else{
d.addCallback(function(resp){
cb(resp);
});
d.addErrback(function(err){
eb(err);
});
}
}});
}
if(!dojo._hasResource["site.layout.VideoPlaylist"]){
dojo._hasResource["site.layout.VideoPlaylist"]=true;
dojo.provide("site.layout.VideoPlaylist");
dojo.declare("site.layout.VideoPlaylist",generic.layout.InlineTemplate,{videos:[],videoPath:"",videoIndex:"",imageClass:"",_templateNode:null,_templateItem:null,_selectedItem:null,postCreate:function(){
this.inherited(arguments);
this.videos=this.config.videos;
this.videoPath=this.config.videoPath;
this.videoIndex=this.config.vindex;
var self=this;
var _96e=this.domNode.childNodes;
for(var i=0;i<_96e.length;i++){
var n=_96e[i];
if(n.nodeType==1){
this._templateNode=n;
n.style.display="none";
}
}
this.startup();
},startup:function(){
this.inherited(arguments);
var self=this;
for(var i=0;i<this.videos.length;i++){
var v=this.videos[i];
var file=v.file;
var name=v.name;
var _976=v.title;
var _977=v.showfirst;
var node=dojo.clone(this._templateNode);
node.style.display="";
var _979={};
var _97a=false;
if(i==this.videoIndex){
_97a=true;
_979.bclass="";
_979.img=v.name+"_off.jpg";
}else{
_979.bclass="thumb_margin_top";
_979.img=v.name+"_off.jpg";
}
node.id="video_playlist_item"+i.toString();
var item=new site.layout._VideoPlaylistItem({baseClass:_979.bclass,imagePath:"/flash/video/images/"+_979.img,imageClass:"playlist_rollover",filePath:"/flash/video/tips/"+v.file,videoName:v.name,videoTitle:v.title,videoDesc:v.desc,showFirst:v.showfirst},node);
if(_97a){
self._selectedItem=item;
item.rollover.img.changeSrc("on");
dojo.toggleClass(item.thumbNode,"disable_rollover",true);
}
dojo.connect(item.domNode,"onclick",this,function(e){
var tid=e.currentTarget.id;
var _97e=dijit.byId(tid);
if(self._nowPlaying&&self._nowPlaying==_97e.filePath){
return;
}
self.setVideo(_97e);
});
this.domNode.appendChild(node);
}
},setIndex:function(idx){
var self=this;
var tid="video_playlist_item"+idx.toString();
var _982=dijit.byId(tid);
if(self._nowPlaying&&self._nowPlaying==_982.filePath){
return;
}
self.setVideo(_982);
},setVideo:function(_983){
var self=this;
var _old=self._selectedItem;
dojo.toggleClass(_old.thumbNode,"disable_rollover",false);
_old.rollover.img.changeSrc("off");
_983.rollover.img.changeSrc("on");
dojo.toggleClass(_983.thumbNode,"disable_rollover",true);
self._selectedItem=_983;
dojo.publish("/videotips/event/loadVideo",[{product:_983.showFirst,title:_983.videoTitle,desc:_983.videoDesc}]);
generic.flash.Api.flashCall("loadVideo",_983.filePath);
this._nowPlaying=_983.filePath;
}});
dojo.declare("site.layout._VideoPlaylistItem",generic.layout.InlineTemplate,{baseClass:"",imagePath:"",imageClass:"",filePath:"",videoName:"",videoTitle:"",videoDesc:"",showFirst:"",rollover:"",postCreate:function(){
this.inherited(arguments);
if(this.baseClass){
dojo.addClass(this.srcNodeRef,this.baseClass);
}
if(this.imageClass){
dojo.addClass(this.thumbNode,this.imageClass);
}
this.thumbNode.src=this.imagePath;
this.thumbNode.id=this.videoName+"_rimage";
this.titleNode.innerHTML=this.videoTitle+" &#187;";
this.rollover=new generic.rollover(this.thumbNode);
}});
}
if(!dojo._hasResource["site.productButtons"]){
dojo._hasResource["site.productButtons"]=true;
dojo.provide("site.productButtons");
dojo.declare("site.productButtons",null,{buttonClass:"form_btn_add_to_bag",buttonNode:null,cartName:"checkout",cartAction:"add",cartHandler:"",onAdd:null,onPostAdd:null,_enabled:true,wMostRecent:true,constructor:function(args){
if(args){
dojo.mixin(this,args);
}
this.cartHandler=new site.cart();
this._init();
},handleButtonClick:function(e){
if(!this._enabled){
return;
}
var self=this;
self.onAdd&&self.onAdd();
var sku=e.target.value;
var _98a=sku.split(",");
var _98b=(self.wMostRecent?1:0);
if(sku){
this._enabled=false;
this.sku=_98a[_98a.length-1];
var _98c=function(resp){
var _98e=window.parent||window;
_98e.dojo.publish("/page/cart/alterCart",[{resp:resp}]);
self._enabled=true;
self.onPostAdd&&self.onPostAdd();
if(self.cartAction=="add"){
var _98f=dojo.cookie("page_data");
if(_98f&&_98f!==null){
var _990=dojo.cookie.deserialize(_98f);
var _991="cart.lpath";
_990["cart.lpath"]=self.sku;
var nstr=dojo.cookie.serialize(_990,"perl");
try{
dojo.cookie.update("page_data",nstr,{path:"/"});
}
catch(e){
throw new Error("could not append to cookie 'page_data': "+e||e.message);
}
}
}
};
var _993=function(err){
var _995=window.parent||window;
_995.dojo.publish("/page/cart/alterCart",[{resp:resp}]);
self._enabled=true;
};
this.cartHandler.alter({action:this.cartAction,cart:this.cartName,skus:_98a,callback:_98c,errback:_993,mostRecent:_98b});
}
},_init:function(){
var self=this;
if(self.buttonNode){
dojo.connect(self.buttonNode,"click",self,self.handleButtonClick);
}else{
dojo.query("."+this.buttonClass).forEach(function(node,idx){
dojo.connect(node,"click",self,self.handleButtonClick);
});
}
dojo.subscribe("/page/event/prodButtonAdded",this,function(args){
if(args.onAdd){
self.onAdd=args.onAdd;
}
if(args.onPostAdd){
self.onPostAdd=args.onPostAdd;
}
if(args.wMostRecent){
self.wMostRecent=true;
}
dojo.connect(args.node,"click",self,self.handleButtonClick);
});
}});
}
if(!dojo._hasResource["site.layout.xsContainer"]){
dojo._hasResource["site.layout.xsContainer"]=true;
dojo.provide("site.layout.xsContainer");
dojo.declare("site.layout.xsContainer",[dijit.layout.ContentPane,dijit._Templated,dijit._Container],{templateString:"",templateString:"<div class=\"cross_sell_container cross_sell_container_addition\">\n    <div class=\"rel_container\">\n        <h3><img src=\"${xs_header_img}\" alt=\"${xs_header_img}\" dojoAttachPoint=\"xsHeaderImageNode\"></h3>\n        <ul dojoAttachPoint=\"containerNode\">\n        </ul>\n    </div><!-- class=\"rel_container\" -->\n</div><!-- class=\"cross_sell_container\" -->\n",itemWidget:"site.layout._xsItem",_loaded:{},_activeSku:"",postMixInProperties:function(){
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
},setActiveSku:function(sku){
var path=sku.sku_data.path;
if(this._loaded[path]){
if(path!=this._activeSku){
this._removeChildren();
this._addChildren(path);
this._activeSku=path;
}
}else{
var _99c=[];
var _99d=sku.cross_sell;
var _99e=dojo.getObject(this.itemWidget);
for(var i=0;i<_99d.length;i++){
var item=_99d[i];
var _9a1=new _99e({item:item,total:_99d.length});
var last=i==_99d.length-1;
dojo.removeClass(_9a1.domNode,"last");
if(last){
dojo.addClass(_9a1.domNode,"last");
}
_99c.push(_9a1);
}
this._loaded[path]=_99c;
this._removeChildren();
this._addChildren(path);
this._activeSku=path;
}
},_addChildren:function(_9a3){
if(!this._loaded[_9a3]){
return;
}
var _9a4=this._loaded[_9a3];
for(var i=0;i<_9a4.length;i++){
var _9a6=_9a4[i];
this.addChild(_9a6);
}
},_removeChildren:function(){
if(this.hasChildren()){
var _9a7=this.getChildren();
for(var i=0;i<_9a7.length;i++){
var _9a9=_9a7[i];
this.removeChild(_9a9);
}
}
}});
dojo.declare("site.layout._xsItem",[dijit._Widget,dijit._Templated],{templateString:"",templateString:"            <li class=\"rel_prod\">\n                <!-- note - prod_title appears outside of the prod_container within the rel_prod -->\n                <div class=\"xs_prod_title_wrapper\" dojoAttachPoint=\"xsTitleWrapper\">\n                    <h4 class=\"prod_title\" style=\"line-height: 13px;\">\n                        <a href=\"${uri}\">\n                            <span class=\"prod_title_primary\">${prod_name}</span><br/>\n                            <div class=\"prod_title_secondary_container\" dojoAttachPoint=\"titleSecondaryContainer\">\n                                <span class=\"prod_title_secondary\">${prod_subname}</span>\n                            </div>\n                        </a>\n                    </h4>\n                </div>\n                <div class=\"prod_container\" dojoAttachPoint=\"quickViewNode\">\n                    <div class=\"prod_image\">\n                        <span dojoAttachPoint=\"imageContainerNode\">\n                       \n                            <div style=\"height: 92px; width: 92px; cursor: pointer;\" class=\"hover_div\">\n                                <div id=\"${quickview_id}\">\n                                    <img alt=\"Quick View\" src=\"/images/btn/btn_trans.gif\" style=\"left: 0px; top: 0px;\" class=\"form_submit form_btn_quick_buy quickview_mouseover\"/>\n                                </div>\n                            </div>\n                            \n                            <span class=\"prod_thumb\"><img src=\"${image}\" alt=\"\"></span>\n                        </span>\n                    </div>\n                    <div class=\"prod_details\">\n                        <div class=\"prod_options\" dojoAttachPoint=\"prodOptionsNode\">\n                            <!-- Attach shades -->\n                            <div class=\"cross_sell_swatch_container\" dojoAttachPoint=\"xsSwatchContNode\"></div>\n                            <!-- /Attach shades -->\n                            <div class=\"shade\" dojoAttachPoint=\"prodUnitNode\">\n                                <span class=\"note\" dojoAttachPoint=\"ssUnitNode\">${ss_unit}</span>\n                                <span dojoAttachPoint=\"ssValueNode\" style=\"color:#666666\">${ss_value}</span>\n                            </div>                            \n                            \n                            <div class=\"prod_price\" dojoAttachPoint=\"prodPriceNode\">${prod_price}</div>\n                            <div class=\"action_btn\">\n                                <div id=\"${quickview_id}\">\n\t\t\t\t\t\t\t\t    <img dojoAttachPoint=\"prodButtonNode\" class=\"form_submit ${btn_class}\" src=\"/images/btn/btn_${btn_image}\" alt=\"${btn_alt}\" />\n\t\t\t\t\t\t\t        <span dojoAttachPoint=\"inventoryStatusNode\" class=\"note alert\" style=\"display:none;\"></span>\n                                </div>\n                            </div>\n                        </div>\n                    </div><!-- /prod_details -->\n                </div><!-- /prod_container -->\n            </li><!-- /rel_prod -->\n",postMixInProperties:function(){
dojo.mixin(this,this.item);
dojo.mixin(this,this.item.sku_data);
this.ss_unit="";
this.ss_value=this.shade_name||"&nbsp;";
this.prod_price=this.price;
if(this.sku_image_1&&!this.use_cat_prod_pattern){
this.image="/product/images/92x92/"+this.sku_image_1+"_92x92.jpg";
}
var _9aa="";
if(page_data.ABTEST){
_9aa=page_data.ABTEST;
}
this.btn_class="form_btn_quick_buy";
this.btn_image="quick_view"+_9aa+".gif";
this.btn_alt="Quick View";
this.quickview_id="quickbuy."+this.cat_id+"."+this.prod_id+"."+this.quickview.instance;
if(this.shaded===0){
if(this.skin_type_text){
this.ss_unit="Skintype:";
this.ss_value=this.skin_type_text;
}else{
this.ss_value="";
if(this.ssUnitNode){
dojo.style(this.ssUnitNode,{visibility:"hidden"});
}
}
}
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
var self=this;
if(!this.quickview.sku_subset||this.quickview.sku_subset.length>1){
dojo.style(this.xsSwatchContNode,{visibility:"hidden"});
dojo.style(this.prodUnitNode,{visibility:"hidden"});
if(!this.shaded){
dojo.style(this.prodPriceNode,{visibility:"hidden"});
}
}
if(this.shaded===0){
this.xsSwatchContNode.style.display="none";
if(this.size===null){
this.prodUnitNode.style.visibility="hidden";
}else{
this.prodPriceNode.innerHTML="<span style=\"float: left\">"+this.size+"</span>"+"<span style=\"float: right\">"+this.price+"</span>";
}
this._nonshadedCompensations();
}else{
this._placeShades();
this._shadedCompensations();
}
if(this.inventory_status=="3"){
dojo.style(this.prodButtonNode,{display:"none"});
this.inventoryStatusNode.innerHTML=this.status_text;
dojo.style(this.inventoryStatusNode,{display:"block"});
}
if(dojo.isIE){
dojo.style(this.imageContainerNode,{position:"relative",top:(dojo.isIE>=7)?"-50px":"-30%"});
}
quick_view.parse({rootNode:self.quickViewNode,product:this.quickview});
},_placeShades:function(){
if(this.prodUnitNode.style.visibility==="hidden"){
return;
}
var self=this;
var _9ad=this.color.length;
var _9ae;
if(_9ad===6){
_9ae=["tl","tm","tr","bl","bm","br"];
}else{
if(_9ad===5){
_9ae=["tl","tm","tr","bl","br"];
}else{
_9ae=["tl","tr","bl","br"];
}
}
var _9af;
switch(_9ad){
case 1:
_9af="single";
break;
case 2:
_9af="duo";
break;
case 4:
_9af="quad";
break;
case 5:
_9af="quin";
break;
case 6:
_9af="sext";
break;
default:
_9af="single";
break;
}
dojo.addClass(this.xsSwatchContNode,_9af);
dojo.addClass(this.prodUnitNode,"shade_container_"+_9af);
var span=this.ssValueNode;
dojo.addClass(span,_9af+"_shade_name");
dojo.forEach(this.color,function(c){
var _9b2=self._createSwatch({color:c,spanClass:_9ae.shift()});
self.xsSwatchContNode.appendChild(_9b2);
});
},_createSwatch:function(args){
var span=dojo.doc.createElement("span");
var _9b5={backgroundColor:args.color};
dojo.addClass(span,"swatch_ico "+args.spanClass);
dojo.style(span,_9b5);
var img=dojo.doc.createElement("img");
img.src=(dojo.isIE&&dojo.isIE<=6)?"/product/images/swatches/25x25/trans_25x25.gif":this.smoosh;
span.appendChild(img);
return span;
},_shadedCompensations:function(){
var _9b7=this.color.length;
var _9b8=_9b7==1;
var duo=_9b7==2;
var quad=_9b7==4;
dojo.style(this.prodOptionsNode,{paddingTop:"0px"});
if(this.prodUnitNode.style.visibility==="hidden"){
dojo.style(this.prodUnitNode,{marginBottom:"36px"});
}
if(this.ss_value.length>=17){
dojo.style(this.xsTitleWrapper,{height:"40px"});
}
if(_9b8){
dojo.addClass(this.quickViewNode,"prod_container_single_shade");
}
},_nonshadedCompensations:function(){
if(!this.skin_type_text){
dojo.addClass(this.prodOptionsNode,"prod_options_wo_skintype");
dojo.addClass(this.quickViewNode,"prod_container_wo_skintype");
}
if(this.skin_type_text){
dojo.addClass(this.prodOptionsNode,"prod_options_w_skintype");
dojo.addClass(this.quickViewNode,"prod_container_w_skintype");
}
}});
}
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:10});
console.log("_Config.constructor __pager:",this._pager);
for(var i=0;i<this.config.use.length;i++){
var name=this.config.use[i];
var _9be=this.config[name]._class;
console.log("_Config.constructor __className: ",_9be);
if(_9be){
try{
var test=(_9be!==null);
dojo.requireIf(test,_9be);
if(!this._loaded){
this._loaded={};
}
this._loaded[name]=true;
}
catch(e){
console.log("Failed loading ",_9be," >> ",e);
throw new Error("Unable to load class: "+_9be);
}
}
}
var _9c0=[];
var _9c1=this._tempMarkers;
for(var j=0;j<_9c1.length;j++){
var subm=_9c1[j]+"1";
_9c0.push(subm);
}
this._icoMarkers=_9c1.concat(_9c0);
},pager:function(){
return this._pager;
},loadedModules:function(){
return this._loaded?this._loaded:false;
},getClassObject:function(_9c4,_9c5){
if(this.config[_9c4]&&this.config[_9c4]._class){
if(_9c5){
if(this._loaded&&this._loaded[_9c4]){
return dojo.getObject(this.config[_9c4]._class);
}
}else{
return dojo.getObject(this.config[_9c4]._class);
}
}
},getConfig:function(_9c6){
if(_9c6&&this.config[_9c6]){
return this.config[_9c6];
}else{
return this.config;
}
},getSrcNode:function(_9c7){
if(_9c7&&this.config[_9c7]){
return this.config[_9c7].node;
}
},getQuery:function(){
return this.results.query;
},isLoaded:function(_9c8){
return (this._loaded&&this._loaded[_9c8]);
},doorByPosition:function(_9c9,pos){
_9c9=(typeof _9c9!=="undefined")?_9c9:this._sortKey;
pos=(typeof pos!=="undefined")?pos:0;
var id=this.results.group[_9c9][pos];
return this.results.doors[id];
},doorById:function(id){
if(!id){
return;
}
return this.results.doors[id];
},groupByName:function(_9cd){
_9cd=(typeof _9cd!=="undefined")?_9cd:this._sortKey;
return this.results.group[_9cd];
}});
}
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 _9d2=this._config.getClassObject("map",true);
console.log("Locator.startup __MapClass: ",_9d2);
if(_9d2){
console.log("loading map");
this._gmap=new _9d2(this._config);
}
var _9d3=this._config.getClassObject("results",true);
if(_9d3){
var src=this._config.getSrcNode("results");
console.log("results node: ",src);
this._results=new _9d3({_config:this._config},src);
}
}});
}
if(!dojo._hasResource["site.jsonrpc"]){
dojo._hasResource["site.jsonrpc"]=true;
dojo.provide("site.jsonrpc");
dojo.declare("site.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=site.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(_9d8,args){
var _9da=new dojo.Deferred();
this.bind(_9d8,args,_9da);
return _9da;
},bind:function(_9db,_9dc,_9dd,url){
var def=dojo.rawXhrPost({url:url||this.serviceUrl,postData:this.createRequest(_9db,_9dc),contentType:this.contentType,timeout:this.timeout,handleAs:this.handleAs});
def.addCallbacks(this.resultCallback(_9dd),this.errorCallback(_9dd));
},createRequest:function(_9e0,_9e1){
var req=[{"method":_9e0,"params":_9e1,"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 _9e6=0;
var _9e7=null;
if(dojo.isObject(obj)){
if(obj[1]){
if("tags" in obj[1]){
for(var i=0;i<=obj[1].tags.length-1;i++){
var _9e9=obj[1].tags[i];
cmCreateShopAction5Tag(_9e9["prod_id"],_9e9["prod_name"],_9e9["sku_id"],_9e9["sku_name"],_9e9["qty"],_9e9["price"],_9e9["cat"]);
}
cmDisplayShop5s();
}
}
_9e7=obj[0];
if("id" in obj[0]){
_9e6=obj[0].id;
}
if("result" in obj[0]){
if(_9e6!=0){
var _9ea=this._prevRequests[_9e6];
this._cache[_9ea]=obj[0].result;
}
_9e7.result=obj[0].result;
}
if("error" in obj[0]){
_9e7.error=obj[0].error;
}
return _9e7;
}
return obj;
}});
}
dojo.i18n._preloadLocalizations("site.nls.esteelauder_layer",["xx","ROOT","en","en-us"]);
