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

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

		http://dojotoolkit.org
*/

if(!dojo._hasResource["dojo.window"]){dojo._hasResource["dojo.window"]=true;dojo.provide("dojo.window");dojo.window.getBox=function(){var _1=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _2=dojo._docScroll();return {w:_1.clientWidth,h:_1.clientHeight,l:_2.x,t:_2.y};};dojo.window.get=function(_3){if(dojo.isIE&&window!==document.parentWindow){_3.parentWindow.execScript("document._parentWindow = window;","Javascript");var _4=_3._parentWindow;_3._parentWindow=null;return _4;}return _3.parentWindow||_3.defaultView;};dojo.window.scrollIntoView=function(_5,_6){try{_5=dojo.byId(_5);var _7=_5.ownerDocument||dojo.doc,_8=_7.body||dojo.body(),_9=_7.documentElement||_8.parentNode,_a=dojo.isIE,_b=dojo.isWebKit;if((!(dojo.isMoz||_a||_b||dojo.isOpera)||_5==_8||_5==_9)&&(typeof _5.scrollIntoView!="undefined")){_5.scrollIntoView(false);return;}var _c=_7.compatMode=="BackCompat",_d=_c?_8:_9,_e=_b?_8:_d,_f=_d.clientWidth,_10=_d.clientHeight,rtl=!dojo._isBodyLtr(),_11=_6||dojo.position(_5),el=_5.parentNode,_12=function(el){return ((_a<=6||(_a&&_c))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_12(_5)){return;}while(el){if(el==_8){el=_e;}var _13=dojo.position(el),_14=_12(el);if(el==_e){_13.w=_f;_13.h=_10;if(_e==_9&&_a&&rtl){_13.x+=_e.offsetWidth-_13.w;}if(_13.x<0||!_a){_13.x=0;}if(_13.y<0||!_a){_13.y=0;}}else{var pb=dojo._getPadBorderExtents(el);_13.w-=pb.w;_13.h-=pb.h;_13.x+=pb.l;_13.y+=pb.t;}if(el!=_e){var _15=el.clientWidth,_16=_13.w-_15;if(_15>0&&_16>0){_13.w=_15;if(_a&&rtl){_13.x+=_16;}}_15=el.clientHeight;_16=_13.h-_15;if(_15>0&&_16>0){_13.h=_15;}}if(_14){if(_13.y<0){_13.h+=_13.y;_13.y=0;}if(_13.x<0){_13.w+=_13.x;_13.x=0;}if(_13.y+_13.h>_10){_13.h=_10-_13.y;}if(_13.x+_13.w>_f){_13.w=_f-_13.x;}}var l=_11.x-_13.x,t=_11.y-Math.max(_13.y,0),r=l+_11.w-_13.w,bot=t+_11.h-_13.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);_11.x+=el.scrollLeft;el.scrollLeft+=(_a>=8&&!_c&&rtl)?-s:s;_11.x-=el.scrollLeft;}if(bot*t>0){_11.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_11.y-=el.scrollTop;}el=(el!=_e)&&!_14&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_5.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_17){if(this._hash[_17.id]){throw new Error("Tried to register widget with id=="+_17.id+" but that id is already registered");}this._hash[_17.id]=_17;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_18,_19){_19=_19||dojo.global;var i=0,id;for(id in this._hash){_18.call(_19,this._hash[id],i++,this._hash);}return this;},filter:function(_1a,_1b){_1b=_1b||dojo.global;var res=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_1a.call(_1b,w,i++,this._hash)){res.add(w);}}return res;},byId:function(id){return this._hash[id];},byClass:function(cls){var res=new dijit.WidgetSet(),id,_1c;for(id in this._hash){_1c=this._hash[id];if(_1c.declaredClass==cls){res.add(_1c);}}return res;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_1d,_1e){return dojo.map(this.toArray(),_1d,_1e);},every:function(_1f,_20){_20=_20||dojo.global;var x=0,i;for(i in this._hash){if(!_1f.call(_20,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_21,_22){_22=_22||dojo.global;var x=0,i;for(i in this._hash){if(_21.call(_22,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){dijit.registry=new dijit.WidgetSet();var _23=dijit.registry._hash,_24=dojo.attr,_25=dojo.hasAttr,_26=dojo.style;dijit.byId=function(id){return typeof id=="string"?_23[id]:id;};var _27={};dijit.getUniqueId=function(_28){var id;do{id=_28+"_"+(_28 in _27?++_27[_28]:_27[_28]=0);}while(_23[id]);return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;};dijit.findWidgets=function(_29){var _2a=[];function _2b(_2c){for(var _2d=_2c.firstChild;_2d;_2d=_2d.nextSibling){if(_2d.nodeType==1){var _2e=_2d.getAttribute("widgetId");if(_2e){_2a.push(_23[_2e]);}else{_2b(_2d);}}}};_2b(_29);return _2a;};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(_2f){if(!_2f._destroyed){if(_2f.destroyRecursive){_2f.destroyRecursive();}else{if(_2f.destroy){_2f.destroy();}}}});};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll();});}dijit.byNode=function(_30){return _23[_30.getAttribute("widgetId")];};dijit.getEnclosingWidget=function(_31){while(_31){var id=_31.getAttribute&&_31.getAttribute("widgetId");if(id){return _23[id];}_31=_31.parentNode;}return null;};var _32=(dijit._isElementShown=function(_33){var s=_26(_33);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_24(_33,"type")!="hidden");});dijit.hasDefaultTabStop=function(_34){switch(_34.nodeName.toLowerCase()){case "a":return _25(_34,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":if(dojo.isMoz){try{return _34.contentDocument.designMode=="on";}catch(err){return false;}}else{if(dojo.isWebKit){var doc=_34.contentDocument,_35=doc&&doc.body;return _35&&_35.contentEditable=="true";}else{try{doc=_34.contentWindow.document;_35=doc&&doc.body;return _35&&_35.firstChild&&_35.firstChild.contentEditable=="true";}catch(e){return false;}}}default:return _34.contentEditable=="true";}};var _36=(dijit.isTabNavigable=function(_37){if(_24(_37,"disabled")){return false;}else{if(_25(_37,"tabIndex")){return _24(_37,"tabIndex")>=0;}else{return dijit.hasDefaultTabStop(_37);}}});dijit._getTabNavigable=function(_38){var _39,_3a,_3b,_3c,_3d,_3e;var _3f=function(_40){dojo.query("> *",_40).forEach(function(_41){if((dojo.isIE&&_41.scopeName!=="HTML")||!_32(_41)){return;}if(_36(_41)){var _42=_24(_41,"tabIndex");if(!_25(_41,"tabIndex")||_42==0){if(!_39){_39=_41;}_3a=_41;}else{if(_42>0){if(!_3b||_42<_3c){_3c=_42;_3b=_41;}if(!_3d||_42>=_3e){_3e=_42;_3d=_41;}}}}if(_41.nodeName.toUpperCase()!="SELECT"){_3f(_41);}});};if(_32(_38)){_3f(_38);}return {first:_39,last:_3a,lowest:_3b,highest:_3d};};dijit.getFirstInTabbingOrder=function(_43){var _44=dijit._getTabNavigable(dojo.byId(_43));return _44.lowest?_44.lowest:_44.first;};dijit.getLastInTabbingOrder=function(_45){var _46=dijit._getTabNavigable(dojo.byId(_45));return _46.last?_46.last:_46.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;})();}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{console.warn("No idea how to store the current selection for this browser!");}}return bm;},moveToBookmark:function(_47){var _48=dojo.doc,_49=_47.mark;if(_49){if(dojo.global.getSelection){var sel=dojo.global.getSelection();if(sel&&sel.removeAllRanges){if(_49.pRange){var r=_49;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end;}else{sel.removeAllRanges();sel.addRange(_49);}}else{console.warn("No idea how to restore selection for this browser!");}}else{if(_48.selection&&_49){var rg;if(_49.pRange){rg=_49.range;}else{if(dojo.isArray(_49)){rg=_48.body.createControlRange();dojo.forEach(_49,function(n){rg.addElement(n);});}else{rg=_48.body.createTextRange();rg.moveToBookmark(_49);}}rg.select();}}}},getFocus:function(_4a,_4b){var _4c=!dijit._curFocus||(_4a&&dojo.isDescendant(dijit._curFocus,_4a.domNode))?dijit._prevFocus:dijit._curFocus;return {node:_4c,bookmark:(_4c==dijit._curFocus)&&dojo.withGlobal(_4b||dojo.global,dijit.getBookmark),openedForWindow:_4b};},focus:function(_4d){if(!_4d){return;}var _4e="node" in _4d?_4d.node:_4d,_4f=_4d.bookmark,_50=_4d.openedForWindow,_51=_4f?_4f.isCollapsed:false;if(_4e){var _52=(_4e.tagName.toLowerCase()=="iframe")?_4e.contentWindow:_4e;if(_52&&_52.focus){try{_52.focus();}catch(e){}}dijit._onFocusNode(_4e);}if(_4f&&dojo.withGlobal(_50||dojo.global,dijit.isCollapsed)&&!_51){if(_50){_50.focus();}try{dojo.withGlobal(_50||dojo.global,dijit.moveToBookmark,null,[_4f]);}catch(e2){}}},_activeStack:[],registerIframe:function(_53){return dijit.registerWin(_53.contentWindow,_53);},unregisterIframe:function(_54){dijit.unregisterWin(_54);},registerWin:function(_55,_56){var _57=function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);if(dojo.isIE&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}dijit._onTouchNode(_56||evt.target||evt.srcElement,"mouse");};var doc=dojo.isIE?_55.document.documentElement:_55.document;if(doc){if(dojo.isIE){doc.attachEvent("onmousedown",_57);var _58=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){dijit._onFocusNode(_56||evt.srcElement);}else{dijit._onTouchNode(_56||evt.srcElement);}};doc.attachEvent("onactivate",_58);var _59=function(evt){dijit._onBlurNode(_56||evt.srcElement);};doc.attachEvent("ondeactivate",_59);return function(){doc.detachEvent("onmousedown",_57);doc.detachEvent("onactivate",_58);doc.detachEvent("ondeactivate",_59);doc=null;};}else{doc.addEventListener("mousedown",_57,true);var _5a=function(evt){dijit._onFocusNode(_56||evt.target);};doc.addEventListener("focus",_5a,true);var _5b=function(evt){dijit._onBlurNode(_56||evt.target);};doc.addEventListener("blur",_5b,true);return function(){doc.removeEventListener("mousedown",_57,true);doc.removeEventListener("focus",_5a,true);doc.removeEventListener("blur",_5b,true);doc=null;};}}},unregisterWin:function(_5c){_5c&&_5c();},_onBlurNode:function(_5d){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(_5e,by){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _5f=[];try{while(_5e){var _60=dojo.attr(_5e,"dijitPopupParent");if(_60){_5e=dijit.byId(_60).domNode;}else{if(_5e.tagName&&_5e.tagName.toLowerCase()=="body"){if(_5e===dojo.body()){break;}_5e=dojo.window.get(_5e.ownerDocument).frameElement;}else{var id=_5e.getAttribute&&_5e.getAttribute("widgetId"),_61=id&&dijit.byId(id);if(_61&&!(by=="mouse"&&_61.get("disabled"))){_5f.unshift(id);}_5e=_5e.parentNode;}}}}catch(e){}dijit._setStack(_5f,by);},_onFocusNode:function(_62){if(!_62){return;}if(_62.nodeType==9){return;}dijit._onTouchNode(_62);if(_62==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_62;dojo.publish("focusNode",[_62]);},_setStack:function(_63,by){var _64=dijit._activeStack;dijit._activeStack=_63;for(var _65=0;_65<Math.min(_64.length,_63.length);_65++){if(_64[_65]!=_63[_65]){break;}}var _66;for(var i=_64.length-1;i>=_65;i--){_66=dijit.byId(_64[i]);if(_66){_66._focused=false;_66._hasBeenBlurred=true;if(_66._onBlur){_66._onBlur(by);}dojo.publish("widgetBlur",[_66,by]);}}for(i=_65;i<_63.length;i++){_66=dijit.byId(_63[i]);if(_66){_66._focused=true;if(_66._onFocus){_66._onFocus(by);}dojo.publish("widgetFocus",[_66,by]);}}}});dojo.addOnLoad(function(){var _67=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_67);_67=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_68){this.pairs=[];this.returnWrappers=_68||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_69,_6a,_6b,_6c,_6d){this.pairs[((_6d)?"unshift":"push")]([_69,_6a,_6b,_6c]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _6e=this.pairs[i];if(_6e[1].apply(this,arguments)){if((_6e[3])||(this.returnWrappers)){return _6e[2];}else{return _6e[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_6f){for(var i=0;i<this.pairs.length;i++){var _70=this.pairs[i];if(_70[0]==_6f){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){return dojo.window.getBox();};dijit.placeOnScreen=function(_71,pos,_72,_73){var _74=dojo.map(_72,function(_75){var c={corner:_75,pos:{x:pos.x,y:pos.y}};if(_73){c.pos.x+=_75.charAt(1)=="L"?_73.x:-_73.x;c.pos.y+=_75.charAt(0)=="T"?_73.y:-_73.y;}return c;});return dijit._place(_71,_74);};dijit._place=function(_76,_77,_78){var _79=dojo.window.getBox();if(!_76.parentNode||String(_76.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_76);}var _7a=null;dojo.some(_77,function(_7b){var _7c=_7b.corner;var pos=_7b.pos;if(_78){_78(_76,_7b.aroundCorner,_7c);}var _7d=_76.style;var _7e=_7d.display;var _7f=_7d.visibility;_7d.visibility="hidden";_7d.display="";var mb=dojo.marginBox(_76);_7d.display=_7e;_7d.visibility=_7f;var _80=Math.max(_79.l,_7c.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_81=Math.max(_79.t,_7c.charAt(0)=="T"?pos.y:(pos.y-mb.h)),_82=Math.min(_79.l+_79.w,_7c.charAt(1)=="L"?(_80+mb.w):pos.x),_83=Math.min(_79.t+_79.h,_7c.charAt(0)=="T"?(_81+mb.h):pos.y),_84=_82-_80,_85=_83-_81,_86=(mb.w-_84)+(mb.h-_85);if(_7a==null||_86<_7a.overflow){_7a={corner:_7c,aroundCorner:_7b.aroundCorner,x:_80,y:_81,w:_84,h:_85,overflow:_86};}return !_86;});_76.style.left=_7a.x+"px";_76.style.top=_7a.y+"px";if(_7a.overflow&&_78){_78(_76,_7a.aroundCorner,_7a.corner);}return _7a;};dijit.placeOnScreenAroundNode=function(_87,_88,_89,_8a){_88=dojo.byId(_88);var _8b=_88.style.display;_88.style.display="";var _8c=dojo.position(_88,true);_88.style.display=_8b;return dijit._placeOnScreenAroundRect(_87,_8c.x,_8c.y,_8c.w,_8c.h,_89,_8a);};dijit.placeOnScreenAroundRectangle=function(_8d,_8e,_8f,_90){return dijit._placeOnScreenAroundRect(_8d,_8e.x,_8e.y,_8e.width,_8e.height,_8f,_90);};dijit._placeOnScreenAroundRect=function(_91,x,y,_92,_93,_94,_95){var _96=[];for(var _97 in _94){_96.push({aroundCorner:_97,corner:_94[_97],pos:{x:x+(_97.charAt(1)=="L"?0:_92),y:y+(_97.charAt(0)=="T"?0:_93)}});}return dijit._place(_91,_96,_95);};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(_98,_99,_9a,_9b){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};dijit.getPopupAroundAlignment=function(_9c,_9d){var _9e={};dojo.forEach(_9c,function(pos){switch(pos){case "after":_9e[_9d?"BR":"BL"]=_9d?"BL":"BR";break;case "before":_9e[_9d?"BL":"BR"]=_9d?"BR":"BL";break;case "below":_9e[_9d?"BL":"BR"]=_9d?"TL":"TR";_9e[_9d?"BR":"BL"]=_9d?"TR":"TL";break;case "above":default:_9e[_9d?"TL":"TR"]=_9d?"BL":"BR";_9e[_9d?"TR":"TL"]=_9d?"BR":"BL";break;}});return _9e;};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){return dojo.window.get(doc);};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup={_stack:[],_beginZIndex:1000,_idGen:1,moveOffScreen:function(_9f){var _a0=_9f.parentNode;if(!_a0||!dojo.hasClass(_a0,"dijitPopup")){_a0=dojo.create("div",{"class":"dijitPopup",style:{visibility:"hidden",top:"-9999px"}},dojo.body());dijit.setWaiRole(_a0,"presentation");_a0.appendChild(_9f);}var s=_9f.style;s.display="";s.visibility="";s.position="";s.top="0px";dojo.style(_a0,{visibility:"hidden",top:"-9999px"});},getTopPopup:function(){var _a1=this._stack;for(var pi=_a1.length-1;pi>0&&_a1[pi].parent===_a1[pi-1].widget;pi--){}return _a1[pi];},open:function(_a2){var _a3=this._stack,_a4=_a2.popup,_a5=_a2.orient||((_a2.parent?_a2.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_a6=_a2.around,id=(_a2.around&&_a2.around.id)?(_a2.around.id+"_dropdown"):("popup_"+this._idGen++);var _a7=_a4.domNode.parentNode;if(!_a7||!dojo.hasClass(_a7,"dijitPopup")){this.moveOffScreen(_a4.domNode);_a7=_a4.domNode.parentNode;}dojo.attr(_a7,{id:id,style:{zIndex:this._beginZIndex+_a3.length},"class":"dijitPopup "+(_a4.baseClass||_a4["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:_a2.parent?_a2.parent.id:""});if(dojo.isIE||dojo.isMoz){var _a8=_a7.childNodes[1];if(!_a8){_a8=new dijit.BackgroundIframe(_a7);}}var _a9=_a6?dijit.placeOnScreenAroundElement(_a7,_a6,_a5,_a4.orient?dojo.hitch(_a4,"orient"):null):dijit.placeOnScreen(_a7,_a2,_a5=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_a2.padding);_a7.style.visibility="visible";_a4.domNode.style.visibility="visible";var _aa=[];_aa.push(dojo.connect(_a7,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_a2.onCancel){dojo.stopEvent(evt);_a2.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _ab=this.getTopPopup();if(_ab&&_ab.onCancel){_ab.onCancel();}}}}));if(_a4.onCancel){_aa.push(dojo.connect(_a4,"onCancel",_a2.onCancel));}_aa.push(dojo.connect(_a4,_a4.onExecute?"onExecute":"onChange",this,function(){var _ac=this.getTopPopup();if(_ac&&_ac.onExecute){_ac.onExecute();}}));_a3.push({wrapper:_a7,iframe:_a8,widget:_a4,parent:_a2.parent,onExecute:_a2.onExecute,onCancel:_a2.onCancel,onClose:_a2.onClose,handlers:_aa});if(_a4.onOpen){_a4.onOpen(_a9);}return _a9;},close:function(_ad){var _ae=this._stack;while(dojo.some(_ae,function(_af){return _af.widget==_ad;})){var top=_ae.pop(),_b0=top.wrapper,_b1=top.iframe,_b2=top.widget,_b3=top.onClose;if(_b2.onClose){_b2.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_b2&&_b2.domNode){this.moveOffScreen(_b2.domNode);}else{dojo.destroy(_b0);}if(_b3){_b3();}}}};dijit._frames=new function(){var _b4=[];this.pop=function(){var _b5;if(_b4.length){_b5=_b4.pop();_b5.style.display="";}else{if(dojo.isIE){var _b6=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _b7="<iframe src='"+_b6+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_b5=dojo.doc.createElement(_b7);}else{_b5=dojo.create("iframe");_b5.src="javascript:\"\"";_b5.className="dijitBackgroundIframe";dojo.style(_b5,"opacity",0.1);}_b5.tabIndex=-1;dijit.setWaiRole(_b5,"presentation");}return _b5;};this.push=function(_b8){_b8.style.display="none";_b4.push(_b8);};}();dijit.BackgroundIframe=function(_b9){if(!_b9.id){throw new Error("no id");}if(dojo.isIE||dojo.isMoz){var _ba=dijit._frames.pop();_b9.appendChild(_ba);if(dojo.isIE<7){this.resize(_b9);this._conn=dojo.connect(_b9,"onresize",this,function(){this.resize(_b9);});}else{dojo.style(_ba,{width:"100%",height:"100%"});}this.iframe=_ba;}};dojo.extend(dijit.BackgroundIframe,{resize:function(_bb){if(this.iframe&&dojo.isIE<7){dojo.style(this.iframe,{width:_bb.offsetWidth+"px",height:_bb.offsetHeight+"px"});}},destroy:function(){if(this._conn){dojo.disconnect(this._conn);this._conn=null;}if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_bc,pos){dojo.window.scrollIntoView(_bc,pos);};}if(!dojo._hasResource["dojo.uacss"]){dojo._hasResource["dojo.uacss"]=true;dojo.provide("dojo.uacss");(function(){var d=dojo,_bd=d.doc.documentElement,ie=d.isIE,_be=d.isOpera,maj=Math.floor,ff=d.isFF,_bf=d.boxModel.replace(/-/,""),_c0={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_quirks:d.isQuirks,dj_iequirks:ie&&d.isQuirks,dj_opera:_be,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};_c0["dj_"+_bf]=true;var _c1="";for(var clz in _c0){if(_c0[clz]){_c1+=clz+" ";}}_bd.className=d.trim(_bd.className+" "+_c1);dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){var _c2="dj_rtl dijitRtl "+_c1.replace(/ /g,"-rtl ");_bd.className=d.trim(_bd.className+" "+_c2);}});})();}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_c3,_c4,_c5,obj,_c6,_c7,_c8){if(obj!=this._obj){this.stop();this._initialDelay=_c7||500;this._subsequentDelay=_c6||0.9;this._minDelay=_c8||10;this._obj=obj;this._evt=evt;this._node=_c4;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_c3,_c5);this._fireEventAndReload();this._evt=dojo.mixin({faux:true},evt);}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_c9,_ca,_cb,_cc,_cd,_ce,_cf){if(_ca.keyCode){_ca.charOrCode=_ca.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_ca.charCode){_ca.charOrCode=String.fromCharCode(_ca.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_c9,"onkeypress",this,function(evt){if(evt.charOrCode==_ca.charOrCode&&(_ca.ctrlKey===undefined||_ca.ctrlKey==evt.ctrlKey)&&(_ca.altKey===undefined||_ca.altKey==evt.altKey)&&(_ca.metaKey===undefined||_ca.metaKey==(evt.metaKey||false))&&(_ca.shiftKey===undefined||_ca.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_cb,_c9,_cc,_ca,_cd,_ce,_cf);}else{if(dijit.typematic._obj==_ca){dijit.typematic.stop();}}}),dojo.connect(_c9,"onkeyup",this,function(evt){if(dijit.typematic._obj==_ca){dijit.typematic.stop();}})];},addMouseListener:function(_d0,_d1,_d2,_d3,_d4,_d5){var dc=dojo.connect;return [dc(_d0,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_d1,_d0,_d2,_d0,_d3,_d4,_d5);}),dc(_d0,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_d0,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_d0,"mousemove",this,function(evt){evt.preventDefault();}),dc(_d0,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_d1,_d0,_d2,_d0,_d3,_d4,_d5);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_d6,_d7,_d8,_d9,_da,_db,_dc,_dd){return this.addKeyListener(_d7,_d8,_d9,_da,_db,_dc,_dd).concat(this.addMouseListener(_d6,_d9,_da,_db,_dc,_dd));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());var cs=dojo.getComputedStyle(div);if(cs){var _de=cs.backgroundImage;var _df=(cs.borderTopColor==cs.borderRightColor)||(_de!=null&&(_de=="none"||_de=="url(invalid-url:)"));dojo[_df?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(_e0,_e1){var _e2=this.getWaiRole(_e0);return _e1?(_e2.indexOf(_e1)>-1):(_e2.length>0);},getWaiRole:function(_e3){return dojo.trim((dojo.attr(_e3,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(_e4,_e5){var _e6=dojo.attr(_e4,"role")||"";if(!this._XhtmlRoles.test(_e6)){dojo.attr(_e4,"role",_e5);}else{if((" "+_e6+" ").indexOf(" "+_e5+" ")<0){var _e7=dojo.trim(_e6.replace(this._XhtmlRoles,""));var _e8=dojo.trim(_e6.replace(_e7,""));dojo.attr(_e4,"role",_e8+(_e8?" ":"")+_e5);}}},removeWaiRole:function(_e9,_ea){var _eb=dojo.attr(_e9,"role");if(!_eb){return;}if(_ea){var t=dojo.trim((" "+_eb+" ").replace(" "+_ea+" "," "));dojo.attr(_e9,"role",t);}else{_e9.removeAttribute("role");}},hasWaiState:function(_ec,_ed){return _ec.hasAttribute?_ec.hasAttribute("aria-"+_ed):!!_ec.getAttribute("aria-"+_ed);},getWaiState:function(_ee,_ef){return _ee.getAttribute("aria-"+_ef)||"";},setWaiState:function(_f0,_f1,_f2){_f0.setAttribute("aria-"+_f1,_f2);},removeWaiState:function(_f3,_f4){_f3.removeAttribute("aria-"+_f4);}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_f5,_f6){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 _f7=dojo.date.stamp._isoRegExp.exec(_f5),_f8=null;if(_f7){_f7.shift();if(_f7[1]){_f7[1]--;}if(_f7[6]){_f7[6]*=1000;}if(_f6){_f6=new Date(_f6);dojo.forEach(dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_f9){return _f6["get"+_f9]();}),function(_fa,_fb){_f7[_fb]=_f7[_fb]||_fa;});}_f8=new Date(_f7[0]||1970,_f7[1]||0,_f7[2]||1,_f7[3]||0,_f7[4]||0,_f7[5]||0,_f7[6]||0);if(_f7[0]<100){_f8.setFullYear(_f7[0]||1970);}var _fc=0,_fd=_f7[7]&&_f7[7].charAt(0);if(_fd!="Z"){_fc=((_f7[8]||0)*60)+(Number(_f7[9])||0);if(_fd!="-"){_fc*=-1;}}if(_fd){_fc-=_f8.getTimezoneOffset();}if(_fc){_f8.setTime(_f8.getTime()+_fc*60000);}}return _f8;};dojo.date.stamp.toISOString=function(_fe,_ff){var _100=function(n){return (n<10)?"0"+n:n;};_ff=_ff||{};var _101=[],_102=_ff.zulu?"getUTC":"get",date="";if(_ff.selector!="time"){var year=_fe[_102+"FullYear"]();date=["0000".substr((year+"").length)+year,_100(_fe[_102+"Month"]()+1),_100(_fe[_102+"Date"]())].join("-");}_101.push(date);if(_ff.selector!="date"){var time=[_100(_fe[_102+"Hours"]()),_100(_fe[_102+"Minutes"]()),_100(_fe[_102+"Seconds"]())].join(":");var _103=_fe[_102+"Milliseconds"]();if(_ff.milliseconds){time+="."+(_103<100?"0":"")+_100(_103);}if(_ff.zulu){time+="Z";}else{if(_ff.selector!="time"){var _104=_fe.getTimezoneOffset();var _105=Math.abs(_104);time+=(_104>0?"-":"+")+_100(Math.floor(_105/60))+":"+_100(_105%60);}}_101.push(time);}return _101.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");new Date("X");dojo.parser=new function(){var d=dojo;this._attrName=d._scopeName+"Type";this._query="["+this._attrName+"]";function _106(_107){if(d.isString(_107)){return "string";}if(typeof _107=="number"){return "number";}if(typeof _107=="boolean"){return "boolean";}if(d.isFunction(_107)){return "function";}if(d.isArray(_107)){return "array";}if(_107 instanceof Date){return "date";}if(_107 instanceof d._Url){return "url";}return "object";};function _108(_109,type){switch(type){case "string":return _109;case "number":return _109.length?Number(_109):NaN;case "boolean":return typeof _109=="boolean"?_109:!(_109.toLowerCase()=="false");case "function":if(d.isFunction(_109)){_109=_109.toString();_109=d.trim(_109.substring(_109.indexOf("{")+1,_109.length-1));}try{if(_109===""||_109.search(/[^\w\.]+/i)!=-1){return new Function(_109);}else{return d.getObject(_109,false)||new Function(_109);}}catch(e){return new Function();}case "array":return _109?_109.split(/\s*,\s*/):[];case "date":switch(_109){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_109);}case "url":return d.baseUrl+_109;default:return d.fromJson(_109);}};var _10a={};dojo.connect(dojo,"extend",function(){_10a={};});function _10b(_10c){if(!_10a[_10c]){var cls=d.getObject(_10c);if(!cls){return null;}var _10d=cls.prototype;var _10e={},_10f={};for(var name in _10d){if(name.charAt(0)=="_"){continue;}if(name in _10f){continue;}var _110=_10d[name];_10e[name]=_106(_110);}_10a[_10c]={cls:cls,params:_10e};}return _10a[_10c];};this._functionFromScript=function(_111){var _112="";var _113="";var _114=_111.getAttribute("args");if(_114){d.forEach(_114.split(/\s*,\s*/),function(part,idx){_112+="var "+part+" = arguments["+idx+"]; ";});}var _115=_111.getAttribute("with");if(_115&&_115.length){d.forEach(_115.split(/\s*,\s*/),function(part){_112+="with("+part+"){";_113+="}";});}return new Function(_112+_111.innerHTML+_113);};this.instantiate=function(_116,_117,args){var _118=[],dp=dojo.parser;_117=_117||{};args=args||{};d.forEach(_116,function(obj){if(!obj){return;}var node,type,_119,_11a,_11b;if(obj.node){node=obj.node;type=obj.type;_119=obj.clsInfo||(type&&_10b(type));_11a=_119&&_119.cls;_11b=obj.scripts;}else{node=obj;type=dp._attrName in _117?_117[dp._attrName]:node.getAttribute(dp._attrName);_119=type&&_10b(type);_11a=_119&&_119.cls;_11b=(_11a&&(_11a._noScript||_11a.prototype._noScript)?[]:d.query("> script[type^='dojo/']",node));}if(!_119){throw new Error("Could not load class '"+type);}var _11c={},_11d=node.attributes;if(args.defaults){dojo.mixin(_11c,args.defaults);}if(obj.inherited){dojo.mixin(_11c,obj.inherited);}for(var name in _119.params){var item=name in _117?{value:_117[name],specified:true}:_11d.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _11e=item.value;switch(name){case "class":_11e="className" in _117?_117.className:node.className;break;case "style":_11e="style" in _117?_117.style:(node.style&&node.style.cssText);}var _11f=_119.params[name];if(typeof _11e=="string"){_11c[name]=_108(_11e,_11f);}else{_11c[name]=_11e;}}var _120=[],_121=[];d.forEach(_11b,function(_122){node.removeChild(_122);var _123=_122.getAttribute("event"),type=_122.getAttribute("type"),nf=d.parser._functionFromScript(_122);if(_123){if(type=="dojo/connect"){_120.push({event:_123,func:nf});}else{_11c[_123]=nf;}}else{_121.push(nf);}});var _124=_11a.markupFactory||_11a.prototype&&_11a.prototype.markupFactory;var _125=_124?_124(_11c,node,_11a):new _11a(_11c,node);_118.push(_125);var _126=node.getAttribute("jsId");if(_126){d.setObject(_126,_125);}d.forEach(_120,function(_127){d.connect(_125,_127.event,null,_127.func);});d.forEach(_121,function(func){func.call(_125);});});if(!_117._started){d.forEach(_118,function(_128){if(!args.noStart&&_128&&_128.startup&&!_128._started&&(!_128.getParent||!_128.getParent())){_128.startup();}});}return _118;};this.parse=function(_129,args){var root;if(!args&&_129&&_129.rootNode){args=_129;root=args.rootNode;}else{root=_129;}var _12a=this._attrName;function scan(_12b,list){var _12c=dojo.clone(_12b.inherited);dojo.forEach(["dir","lang"],function(name){var val=_12b.node.getAttribute(name);if(val){_12c[name]=val;}});var _12d=_12b.scripts;var _12e=!_12b.clsInfo||!_12b.clsInfo.cls.prototype.stopParser;for(var _12f=_12b.node.firstChild;_12f;_12f=_12f.nextSibling){if(_12f.nodeType==1){var type=_12e&&_12f.getAttribute(_12a);if(type){var _130={"type":type,clsInfo:_10b(type),node:_12f,scripts:[],inherited:_12c};list.push(_130);scan(_130,list);}else{if(_12d&&_12f.nodeName.toLowerCase()=="script"){type=_12f.getAttribute("type");if(type&&/^dojo\//i.test(type)){_12d.push(_12f);}}else{if(_12e){scan({node:_12f,inherited:_12c},list);}}}}}};var list=[];scan({node:root?dojo.byId(root):dojo.body(),inherited:(args&&args.inherited)||{dir:dojo._isBodyLtr()?"ltr":"rtl"}},list);return this.instantiate(list,null,args);};}();(function(){var _131=function(){if(dojo.config.parseOnLoad){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_131);}else{dojo._loaders.unshift(_131);}})();}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"_connect",function(_132,_133){if(_132&&dojo.isFunction(_132._onConnect)){_132._onConnect(_133);}});dijit._connectOnUseEventHandler=function(_134){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var _135=function(evt){dijit._lastKeyDownNode=evt.srcElement;};dojo.doc.attachEvent("onkeydown",_135);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",_135);});})();}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target;},true);}(function(){var _136={},_137=function(_138){var dc=_138.declaredClass;if(!_136[dc]){var r=[],_139,_13a=_138.constructor.prototype;for(var _13b in _13a){if(dojo.isFunction(_13a[_13b])&&(_139=_13b.match(/^_set([a-zA-Z]*)Attr$/))&&_139[1]){r.push(_139[1].charAt(0).toLowerCase()+_139[1].substr(1));}}_136[dc]=r;}return _136[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_13c,_13d){this.create(_13c,_13d);},create:function(_13e,_13f){this.srcNodeRef=dojo.byId(_13f);this._connects=[];this._subscribes=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_13e){this.params=_13e;dojo.mixin(this,_13e);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _140=this.srcNodeRef;if(_140&&_140.parentNode){_140.parentNode.replaceChild(this.domNode,_140);}for(attr in this.params){this._onConnect(attr);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _141=function(attr,_142){if((_142.params&&attr in _142.params)||_142[attr]){_142.set(attr,_142[attr]);}};for(var attr in this.attributeMap){_141(attr,this);}dojo.forEach(_137(this),function(a){if(!(a in this.attributeMap)){_141(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){if(this.baseClass){var _143=this.baseClass.split(" ");if(!this.isLeftToRight()){_143=_143.concat(dojo.map(_143,function(name){return name+"Rtl";}));}dojo.addClass(this.domNode,_143);}},startup:function(){this._started=true;},destroyRecursive:function(_144){this._beingDestroyed=true;this.destroyDescendants(_144);this.destroy(_144);},destroy:function(_145){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_146){dfe(_146,d.disconnect);});dfe(this._subscribes,function(_147){dun(_147);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_145);dijit.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_148){if(this.bgIframe){this.bgIframe.destroy(_148);delete this.bgIframe;}if(this.domNode){if(_148){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_148){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_149){dojo.forEach(this.getChildren(),function(_14a){if(_14a.destroyRecursive){_14a.destroyRecursive(_149);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_14b){if(_14b in this._deferredConnects){var _14c=this[this._deferredConnects[_14b]||"domNode"];this.connect(_14c,_14b.toLowerCase(),_14b);delete this._deferredConnects[_14b];}},_setClassAttr:function(_14d){var _14e=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_14e,this["class"]);this["class"]=_14d;dojo.addClass(_14e,_14d);},_setStyleAttr:function(_14f){var _150=this[this.attributeMap.style||"domNode"];if(dojo.isObject(_14f)){dojo.style(_150,_14f);}else{if(_150.style.cssText){_150.style.cssText+="; "+_14f;}else{_150.style.cssText=_14f;}}this.style=_14f;},setAttribute:function(attr,_151){dojo.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_151);},_attrToDom:function(attr,_152){var _153=this.attributeMap[attr];dojo.forEach(dojo.isArray(_153)?_153:[_153],function(_154){var _155=this[_154.node||_154||"domNode"];var type=_154.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_152)){_152=dojo.hitch(this,_152);}var _156=_154.attribute?_154.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(_155,_156,_152);break;case "innerText":_155.innerHTML="";_155.appendChild(dojo.doc.createTextNode(_152));break;case "innerHTML":_155.innerHTML=_152;break;case "class":dojo.removeClass(_155,this[attr]);dojo.addClass(_155,_152);break;}},this);this[attr]=_152;},attr:function(name,_157){if(dojo.config.isDebug){var _158=arguments.callee._ach||(arguments.callee._ach={}),_159=(arguments.callee.caller||"unknown caller").toString();if(!_158[_159]){dojo.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_159,"","2.0");_158[_159]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},get:function(name){var _15a=this._getAttrNames(name);return this[_15a.g]?this[_15a.g]():this[name];},set:function(name,_15b){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _15c=this._getAttrNames(name);if(this[_15c.s]){var _15d=this[_15c.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(name in this.attributeMap){this._attrToDom(name,_15b);}var _15e=this[name];this[name]=_15b;}return _15d||this;},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];},getChildren:function(){return this.containerNode?dijit.findWidgets(this.containerNode):[];},nodesWithKeyClick:["input","button"],connect:function(obj,_15f,_160){var d=dojo,dc=d._connect,_161=[];if(_15f=="ondijitclick"){if(dojo.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){var m=d.hitch(this,_160);_161.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=e.target;e.preventDefault();}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=null;return m(e);}}));}_15f="onclick";}_161.push(dc(obj,_15f,this,_160));this._connects.push(_161);return _161;},disconnect:function(_162){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_162){dojo.forEach(_162,dojo.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_163,_164){var d=dojo,_165=d.subscribe(_163,this,_164);this._subscribes.push(_165);return _165;},unsubscribe:function(_166){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_166){dojo.unsubscribe(_166);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_167,_168){if(_167.declaredClass&&_167.addChild){_167.addChild(this,_168);}else{dojo.place(this.domNode,_167,_168);}return this;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});})();}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_169,map,_16a,_16b){_16b=_16b||dojo.global;_16a=_16a?dojo.hitch(_16b,_16a):function(v){return v;};return _169.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_16c,key,_16d){var _16e=dojo.getObject(key,false,map);if(_16d){_16e=dojo.getObject(_16d,false,_16b).call(_16b,_16e,key);}return _16a(_16e,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.cache"]){dojo._hasResource["dojo.cache"]=true;dojo.provide("dojo.cache");(function(){var _16f={};dojo.cache=function(_170,url,_171){if(typeof _170=="string"){var _172=dojo.moduleUrl(_170,url);}else{_172=_170;_171=url;}var key=_172.toString();var val=_171;if(_171!=undefined&&!dojo.isString(_171)){val=("value" in _171?_171.value:undefined);}var _173=_171&&_171.sanitize?true:false;if(typeof val=="string"){val=_16f[key]=_173?dojo.cache._sanitize(val):val;}else{if(val===null){delete _16f[key];}else{if(!(key in _16f)){val=dojo._getText(key);_16f[key]=_173?dojo.cache._sanitize(val):val;}val=_16f[key];}}return val;};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _174=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_174){val=_174[1];}}else{val="";}return val;};})();}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];},_stringRepl:function(tmpl){var _175=this.declaredClass,_176=this;return dojo.string.substitute(tmpl,this,function(_177,key){if(key.charAt(0)=="!"){_177=dojo.getObject(key.substr(1),false,_176);}if(typeof _177=="undefined"){throw new Error(_175+" template:"+key);}if(_177==null){return "";}return key.charAt(0)=="!"?_177:_177.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _178=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_178)){node=dojo._toDom(this._stringRepl(_178));if(node.nodeType!=1){throw new Error("Invalid template: "+_178);}}else{node=_178.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _179=dojo.parser,qry,attr;if(_179._query!="[dojoType]"){qry=_179._query;attr=_179._attrName;_179._query="[dojoType]";_179._attrName="dojoType";}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}}));if(qry){_179._query=qry;_179._attrName=attr;}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_17a){var dest=this.containerNode;if(_17a&&dest){while(_17a.hasChildNodes()){dest.appendChild(_17a.firstChild);}}},_attachTemplateNodes:function(_17b,_17c){_17c=_17c||function(n,p){return n.getAttribute(p);};var _17d=dojo.isArray(_17b)?_17b:(_17b.all||_17b.getElementsByTagName("*"));var x=dojo.isArray(_17b)?0:-1;for(;x<_17d.length;x++){var _17e=(x==-1)?_17b:_17d[x];if(this.widgetsInTemplate&&_17c(_17e,"dojoType")){continue;}var _17f=_17c(_17e,"dojoAttachPoint");if(_17f){var _180,_181=_17f.split(/\s*,\s*/);while((_180=_181.shift())){if(dojo.isArray(this[_180])){this[_180].push(_17e);}else{this[_180]=_17e;}this._attachPoints.push(_180);}}var _182=_17c(_17e,"dojoAttachEvent");if(_182){var _183,_184=_182.split(/\s*,\s*/);var trim=dojo.trim;while((_183=_184.shift())){if(_183){var _185=null;if(_183.indexOf(":")!=-1){var _186=_183.split(":");_183=trim(_186[0]);_185=trim(_186[1]);}else{_183=trim(_183);}if(!_185){_185=_183;}this.connect(_17e,_183,_185);}}}var role=_17c(_17e,"waiRole");if(role){dijit.setWaiRole(_17e,role);}var _187=_17c(_17e,"waiState");if(_187){dojo.forEach(_187.split(/\s*,\s*/),function(_188){if(_188.indexOf("-")!=-1){var pair=_188.split("-");dijit.setWaiState(_17e,pair[0],pair[1]);}});}}},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){dojo.forEach(this._attachPoints,function(_189){delete this[_189];},this);this._attachPoints=[];this.inherited(arguments);}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_18a,_18b,_18c){var _18d=dijit._Templated._templateCache;var key=_18b||_18a;var _18e=_18d[key];if(_18e){try{if(!_18e.ownerDocument||_18e.ownerDocument==dojo.doc){return _18e;}}catch(e){}dojo.destroy(_18e);}if(!_18b){_18b=dojo.cache(_18a,{sanitize:true});}_18b=dojo.string.trim(_18b);if(_18c||_18b.match(/\$\{([^\}]+)\}/g)){return (_18d[key]=_18b);}else{var node=dojo._toDom(_18b);if(node.nodeType!=1){throw new Error("Invalid template: "+_18b);}return (_18d[key]=node);}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _18f=dijit._Templated._templateCache;for(var key in _18f){var _190=_18f[key];if(typeof _190=="object"){dojo.destroy(_190);}delete _18f[key];}});}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_191,_192){var _193=this.containerNode;if(_192&&typeof _192=="number"){var _194=this.getChildren();if(_194&&_194.length>=_192){_193=_194[_192-1].domNode;_192="after";}}dojo.place(_191.domNode,_193,_192);if(this._started&&!_191._started){_191.startup();}},removeChild:function(_195){if(typeof _195=="number"&&_195>0){_195=this.getChildren()[_195];}if(_195){var node=_195.domNode;if(node&&node.parentNode){node.parentNode.removeChild(node);}}},hasChildren:function(){return this.getChildren().length>0;},destroyDescendants:function(_196){dojo.forEach(this.getChildren(),function(_197){_197.destroyRecursive(_196);});},_getSiblingOfChild:function(_198,dir){var node=_198.domNode,_199=(dir>0?"nextSibling":"previousSibling");do{node=node[_199];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node&&dijit.byNode(node);},getIndexOfChild:function(_19a){return dojo.indexOf(this.getChildren(),_19a);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_19b){_19b.startup();});this.inherited(arguments);}});}if(!dojo._hasResource["dijit._Contained"]){dojo._hasResource["dijit._Contained"]=true;dojo.provide("dijit._Contained");dojo.declare("dijit._Contained",null,{getParent:function(){var _19c=dijit.getEnclosingWidget(this.domNode.parentNode);return _19c&&_19c.isContainer?_19c:null;},_getSibling:function(_19d){var node=this.domNode;do{node=node[_19d+"Sibling"];}while(node&&node.nodeType!=1);return node&&dijit.byNode(node);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");this.inherited(arguments);},startup:function(){if(this._started){return;}this.inherited(arguments);var _19e=this.getParent&&this.getParent();if(!(_19e&&_19e.isLayoutContainer)){this.resize();this.connect(dojo.isIE?this.domNode:dojo.global,"onresize",function(){this.resize();});}},resize:function(_19f,_1a0){var node=this.domNode;if(_19f){dojo.marginBox(node,_19f);if(_19f.t){node.style.top=_19f.t+"px";}if(_19f.l){node.style.left=_19f.l+"px";}}var mb=_1a0||{};dojo.mixin(mb,_19f||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(node),mb);}var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var be=dojo._getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=dojo._getPadExtents(node,cs);this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_1a1){dojo.addClass(_1a1.domNode,this.baseClass+"-child");if(_1a1.baseClass){dojo.addClass(_1a1.domNode,this.baseClass+"-"+_1a1.baseClass);}},addChild:function(_1a2,_1a3){this.inherited(arguments);if(this._started){this._setupChild(_1a2);}},removeChild:function(_1a4){dojo.removeClass(_1a4.domNode,this.baseClass+"-child");if(_1a4.baseClass){dojo.removeClass(_1a4.domNode,this.baseClass+"-"+_1a4.baseClass);}this.inherited(arguments);}});dijit.layout.marginBox2contentBox=function(node,mb){var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var pb=dojo._getPadBorderExtents(node,cs);return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};};(function(){var _1a5=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_1a6,dim){_1a6.resize?_1a6.resize(dim):dojo.marginBox(_1a6.domNode,dim);dojo.mixin(_1a6,dojo.marginBox(_1a6.domNode));dojo.mixin(_1a6,dim);};dijit.layout.layoutChildren=function(_1a7,dim,_1a8){dim=dojo.mixin({},dim);dojo.addClass(_1a7,"dijitLayoutContainer");_1a8=dojo.filter(_1a8,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_1a8,function(item){return item.layoutAlign=="client";}));dojo.forEach(_1a8,function(_1a9){var elm=_1a9.domNode,pos=_1a9.layoutAlign;var _1aa=elm.style;_1aa.left=dim.l+"px";_1aa.top=dim.t+"px";_1aa.bottom=_1aa.right="auto";dojo.addClass(elm,"dijitAlign"+_1a5(pos));if(pos=="top"||pos=="bottom"){size(_1a9,{w:dim.w});dim.h-=_1a9.h;if(pos=="top"){dim.t+=_1a9.h;}else{_1aa.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_1a9,{h:dim.h});dim.w-=_1a9.w;if(pos=="left"){dim.l+=_1a9.w;}else{_1aa.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_1a9,dim);}}}});};})();}if(!dojo._hasResource["dijit._CssStateMixin"]){dojo._hasResource["dijit._CssStateMixin"]=true;dojo.provide("dijit._CssStateMixin");dojo.declare("dijit._CssStateMixin",[],{cssStateNodes:{},postCreate:function(){this.inherited(arguments);dojo.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){this.connect(this.domNode,e,"_cssMouseEvent");},this);this.connect(this,"set",function(name,_1ab){if(arguments.length>=2&&{disabled:true,readOnly:true,checked:true,selected:true}[name]){this._setStateClass();}});dojo.forEach(["_onFocus","_onBlur"],function(ap){this.connect(this,ap,"_setStateClass");},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._setStateClass();},_cssMouseEvent:function(_1ac){if(!this.disabled){switch(_1ac.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseleave":case "mouseout":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _1ad=this.connect(dojo.body(),"onmouseup",function(){this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_1ad);});break;}this._setStateClass();}},_setStateClass:function(){var _1ae=this.baseClass.split(" ");function _1af(_1b0){_1ae=_1ae.concat(dojo.map(_1ae,function(c){return c+_1b0;}),"dijit"+_1b0);};if(!this.isLeftToRight()){_1af("Rtl");}if(this.checked){_1af("Checked");}if(this.state){_1af(this.state);}if(this.selected){_1af("Selected");}if(this.disabled){_1af("Disabled");}else{if(this.readOnly){_1af("ReadOnly");}else{if(this._active){_1af("Active");}else{if(this._hovering){_1af("Hover");}}}}if(this._focused){_1af("Focused");}var tn=this.stateNode||this.domNode,_1b1={};dojo.forEach(tn.className.split(" "),function(c){_1b1[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _1b1[c];});}dojo.forEach(_1ae,function(c){_1b1[c]=true;});var _1b2=[];for(var c in _1b1){_1b2.push(c);}tn.className=_1b2.join(" ");this._stateClasses=_1ae;},_trackMouseState:function(node,_1b3){var _1b4=false,_1b5=false,_1b6=false;var self=this,cn=dojo.hitch(this,"connect",node);function _1b7(){var _1b8=("disabled" in self&&self.disabled)||("readonly" in self&&self.readonly);dojo.toggleClass(node,_1b3+"Hover",_1b4&&!_1b5&&!_1b8);dojo.toggleClass(node,_1b3+"Active",_1b5&&!_1b8);dojo.toggleClass(node,_1b3+"Focused",_1b6&&!_1b8);};cn("onmouseenter",function(){_1b4=true;_1b7();});cn("onmouseleave",function(){_1b4=false;_1b5=false;_1b7();});cn("onmousedown",function(){_1b5=true;_1b7();});cn("onmouseup",function(){_1b5=false;_1b7();});cn("onfocus",function(){_1b6=true;_1b7();});cn("onblur",function(){_1b6=false;_1b7();});this.connect(this,"set",function(name,_1b9){if(name=="disabled"||name=="readOnly"){_1b7();}});}});}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,dijit._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name=\""+this.name.replace(/'/g,"&quot;")+"\""):"";this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousedown","_onMouseDown");},_setDisabledAttr:function(_1ba){this.disabled=_1ba;dojo.attr(this.focusNode,"disabled",_1ba);if(this.valueNode){dojo.attr(this.valueNode,"disabled",_1ba);}dijit.setWaiState(this.focusNode,"disabled",_1ba);if(_1ba){this._hovering=false;this._active=false;var _1bb="tabIndex" in this.attributeMap?this.attributeMap.tabIndex:"focusNode";dojo.forEach(dojo.isArray(_1bb)?_1bb:[_1bb],function(_1bc){var node=this[_1bc];if(dojo.isWebKit||dijit.hasDefaultTabStop(node)){node.setAttribute("tabIndex","-1");}else{node.removeAttribute("tabIndex");}},this);}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}},setDisabled:function(_1bd){dojo.deprecated("setDisabled("+_1bd+") is deprecated. Use set('disabled',"+_1bd+") instead.","","2.0");this.set("disabled",_1bd);},_onFocus:function(e){if(this.scrollOnFocus){dojo.window.scrollIntoView(this.domNode);}this.inherited(arguments);},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},compare:function(val1,val2){if(typeof val1=="number"&&typeof val2=="number"){return (isNaN(val1)&&isNaN(val2))?0:val1-val2;}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_1be){},_onChangeActive:false,_handleOnChange:function(_1bf,_1c0){this._lastValue=_1bf;if(this._lastValueReported==undefined&&(_1c0===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_1bf;}if((this.intermediateChanges||_1c0||_1c0===undefined)&&((typeof _1bf!=typeof this._lastValueReported)||this.compare(_1bf,this._lastValueReported)!=0)){this._lastValueReported=_1bf;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);}this._onChangeHandle=setTimeout(dojo.hitch(this,function(){this._onChangeHandle=null;this.onChange(_1bf);}),0);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported);}this.inherited(arguments);},setValue:function(_1c1){dojo.deprecated("dijit.form._FormWidget:setValue("+_1c1+") is deprecated.  Use set('value',"+_1c1+") instead.","","2.0");this.set("value",_1c1);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value");},_onMouseDown:function(e){if(!e.ctrlKey&&this.isFocusable()){var _1c2=this.connect(dojo.body(),"onmouseup",function(){if(this.isFocusable()){this.focus();}this.disconnect(_1c2);});}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_1c3){this.readOnly=_1c3;dojo.attr(this.focusNode,"readOnly",_1c3);dijit.setWaiState(this.focusNode,"readonly",_1c3);},postCreate:function(){this.inherited(arguments);if(dojo.isIE){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_1c4,_1c5){this.value=_1c4;this._handleOnChange(_1c4,_1c5);},_getValueAttr:function(){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}}},_layoutHackIE7:function(){if(dojo.isIE==7){var _1c6=this.domNode;var _1c7=_1c6.parentNode;var _1c8=_1c6.firstChild||_1c6;var _1c9=_1c8.style.filter;var _1ca=this;while(_1c7&&_1c7.clientHeight==0){(function ping(){var _1cb=_1ca.connect(_1c7,"onscroll",function(e){_1ca.disconnect(_1cb);_1c8.style.filter=(new Date()).getMilliseconds();setTimeout(function(){_1c8.style.filter=_1c9;},0);});})();_1c7=_1c7.parentNode;}}}});}if(!dojo._hasResource["dijit.dijit"]){dojo._hasResource["dijit.dijit"]=true;dojo.provide("dijit.dijit");}if(!dojo._hasResource["dijit._KeyNavContainer"]){dojo._hasResource["dijit._KeyNavContainer"]=true;dojo.provide("dijit._KeyNavContainer");dojo.declare("dijit._KeyNavContainer",dijit._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_1cc,_1cd){var _1ce=(this._keyNavCodes={});var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_1cc,function(code){_1ce[code]=prev;});dojo.forEach(_1cd,function(code){_1ce[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_1cf,_1d0){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_1cf);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){var _1d1=this._getFirstFocusableChild();if(_1d1){this.focusChild(_1d1);}},focusNext:function(){var _1d2=this._getNextFocusableChild(this.focusedChild,1);this.focusChild(_1d2);},focusPrev:function(){var _1d3=this._getNextFocusableChild(this.focusedChild,-1);this.focusChild(_1d3,true);},focusChild:function(_1d4,last){if(this.focusedChild&&_1d4!==this.focusedChild){this._onChildBlur(this.focusedChild);}_1d4.focus(last?"end":"start");this.focusedChild=_1d4;},_startupChild:function(_1d5){_1d5.set("tabIndex","-1");this.connect(_1d5,"_onFocus",function(){_1d5.set("tabIndex",this.tabIndex);});this.connect(_1d5,"_onBlur",function(){_1d5.set("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode){return;}this.focusFirstChild();dojo.attr(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabIndex",this.tabIndex);}this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();dojo.stopEvent(evt);}},_onChildBlur:function(_1d6){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_1d7,dir){if(_1d7){_1d7=this._getSiblingOfChild(_1d7,dir);}var _1d8=this.getChildren();for(var i=0;i<_1d8.length;i++){if(!_1d7){_1d7=_1d8[(dir>0)?0:(_1d8.length-1)];}if(_1d7.isFocusable()){return _1d7;}_1d7=this._getSiblingOfChild(_1d7,dir);}return null;}});}if(!dojo._hasResource["dijit.MenuItem"]){dojo._hasResource["dijit.MenuItem"]=true;dojo.provide("dijit.MenuItem");dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained,dijit._CssStateMixin],{templateString:dojo.cache("dijit","templates/MenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",accelKey:"",disabled:false,_fillContent:function(_1d9){if(_1d9&&!("label" in this.params)){this.set("label",_1d9.innerHTML);}},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.domNode,false);var _1da=this.id+"_text";dojo.attr(this.containerNode,"id",_1da);if(this.accelKeyNode){dojo.attr(this.accelKeyNode,"id",this.id+"_accel");_1da+=" "+this.id+"_accel";}dijit.setWaiState(this.domNode,"labelledby",_1da);},_onHover:function(){this.getParent().onItemHover(this);},_onUnhover:function(){this.getParent().onItemUnhover(this);this._hovering=false;this._setStateClass();},_onClick:function(evt){this.getParent().onItemClick(this,evt);dojo.stopEvent(evt);},onClick:function(evt){},focus:function(){try{if(dojo.isIE==8){this.containerNode.focus();}dijit.focus(this.focusNode);}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_1db){dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_1db);},setLabel:function(_1dc){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_1dc);},setDisabled:function(_1dd){dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_1dd);},_setDisabledAttr:function(_1de){this.disabled=_1de;dijit.setWaiState(this.focusNode,"disabled",_1de?"true":"false");},_setAccelKeyAttr:function(_1df){this.accelKey=_1df;this.accelKeyNode.style.display=_1df?"":"none";this.accelKeyNode.innerHTML=_1df;dojo.attr(this.containerNode,"colSpan",_1df?"1":"2");}});}if(!dojo._hasResource["dijit.PopupMenuItem"]){dojo._hasResource["dijit.PopupMenuItem"]=true;dojo.provide("dijit.PopupMenuItem");dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _1e0=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_1e0[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.startup();this.popup.domNode.style.display="none";if(this.arrowWrapper){dojo.style(this.arrowWrapper,"visibility","");}dijit.setWaiState(this.focusNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){if(!this.popup._destroyed){this.popup.destroyRecursive();}delete this.popup;}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.CheckedMenuItem"]){dojo._hasResource["dijit.CheckedMenuItem"]=true;dojo.provide("dijit.CheckedMenuItem");dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:dojo.cache("dijit","templates/CheckedMenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">&nbsp;</td>\n</tr>\n"),checked:false,_setCheckedAttr:function(_1e1){dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_1e1);dijit.setWaiState(this.domNode,"checked",_1e1);this.checked=_1e1;},onChange:function(_1e2){},_onClick:function(e){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked);}this.inherited(arguments);}});}if(!dojo._hasResource["dijit.MenuSeparator"]){dojo._hasResource["dijit.MenuSeparator"]=true;dojo.provide("dijit.MenuSeparator");dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:dojo.cache("dijit","templates/MenuSeparator.html","<tr class=\"dijitMenuSeparator\">\n\t<td class=\"dijitMenuSeparatorIconCell\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n\t<td colspan=\"3\" class=\"dijitMenuSeparatorLabelCell\">\n\t\t<div class=\"dijitMenuSeparatorTop dijitMenuSeparatorLabel\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n</tr>\n"),postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!dojo._hasResource["dijit.Menu"]){dojo._hasResource["dijit.Menu"]=true;dojo.provide("dijit.Menu");dojo.declare("dijit._MenuBase",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_1e3){_1e3.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_1e4){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _1e5=this._getTopMenu();if(_1e5&&_1e5._isMenuBar){_1e5.focusNext();}}},_onPopupHover:function(evt){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _1e6=this.currentPopup.parentMenu;if(_1e6.focusedChild){_1e6.focusedChild._setSelected(false);}_1e6.focusedChild=this.currentPopup.from_item;_1e6.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _1e7=item.popup;if(_1e7){this._stopPendingCloseTimer(_1e7);_1e7._pendingClose_timer=setTimeout(function(){_1e7._pendingClose_timer=null;if(_1e7.parentMenu){_1e7.parentMenu.currentPopup=null;}dijit.popup.close(_1e7);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_stopPendingCloseTimer:function(_1e8){if(_1e8._pendingClose_timer){clearTimeout(_1e8._pendingClose_timer);_1e8._pendingClose_timer=null;}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.disabled){return false;}if(item.popup){this._openPopup();}else{this.onExecute();item.onClick(evt);}},_openPopup:function(){this._stopPopupTimer();var _1e9=this.focusedChild;if(!_1e9){return;}var _1ea=_1e9.popup;if(_1ea.isShowingNow){return;}if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);dijit.popup.close(this.currentPopup);}_1ea.parentMenu=this;_1ea.from_item=_1e9;var self=this;dijit.popup.open({parent:this,popup:_1ea,around:_1e9.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR","BR":"BL","BL":"BR"}:{"TL":"TR","TR":"TL","BL":"BR","BR":"BL"}),onCancel:function(){self.focusChild(_1e9);self._cleanUp();_1e9._setSelected(true);self.focusedChild=_1e9;},onExecute:dojo.hitch(this,"_cleanUp")});this.currentPopup=_1ea;_1ea.connect(_1ea.domNode,"onmouseenter",dojo.hitch(self,"_onPopupHover"));if(_1ea.focus){_1ea._focus_timer=setTimeout(dojo.hitch(_1ea,function(){this._focus_timer=null;this.focus();}),0);}},_markActive:function(){this.isActive=true;dojo.addClass(this.domNode,"dijitMenuActive");dojo.removeClass(this.domNode,"dijitMenuPassive");},onOpen:function(e){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;dojo.removeClass(this.domNode,"dijitMenuActive");dojo.addClass(this.domNode,"dijitMenuPassive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null;}if(this.currentPopup){dijit.popup.close(this.currentPopup);this.currentPopup=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this._hoveredChild._onUnhover();}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});dojo.declare("dijit.Menu",dijit._MenuBase,{constructor:function(){this._bindings=[];},templateString:dojo.cache("dijit","templates/Menu.html","<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\" cellspacing=0>\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(dojo.body());}else{dojo.forEach(this.targetNodeIds,this.bindDomNode,this);}var k=dojo.keys,l=this.isLeftToRight();this._openSubMenuKey=l?k.RIGHT_ARROW:k.LEFT_ARROW;this._closeSubMenuKey=l?k.LEFT_ARROW:k.RIGHT_ARROW;this.connectKeyNavHandlers([k.UP_ARROW],[k.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);dojo.stopEvent(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{dojo.stopEvent(evt);}break;}},_iframeContentWindow:function(_1eb){var win=dojo.window.get(this._iframeContentDocument(_1eb))||this._iframeContentDocument(_1eb)["__parent__"]||(_1eb.name&&dojo.doc.frames[_1eb.name])||null;return win;},_iframeContentDocument:function(_1ec){var doc=_1ec.contentDocument||(_1ec.contentWindow&&_1ec.contentWindow.document)||(_1ec.name&&dojo.doc.frames[_1ec.name]&&dojo.doc.frames[_1ec.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var cn;if(node.tagName.toLowerCase()=="iframe"){var _1ed=node,win=this._iframeContentWindow(_1ed);cn=dojo.withGlobal(win,dojo.body);}else{cn=(node==dojo.body()?dojo.doc.documentElement:node);}var _1ee={node:node,iframe:_1ed};dojo.attr(node,"_dijitMenu"+this.id,this._bindings.push(_1ee));var _1ef=dojo.hitch(this,function(cn){return [dojo.connect(cn,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(evt){dojo.stopEvent(evt);this._scheduleOpen(evt.target,_1ed,{x:evt.pageX,y:evt.pageY});}),dojo.connect(cn,"onkeydown",this,function(evt){if(evt.shiftKey&&evt.keyCode==dojo.keys.F10){dojo.stopEvent(evt);this._scheduleOpen(evt.target,_1ed);}})];});_1ee.connects=cn?_1ef(cn):[];if(_1ed){_1ee.onloadHandler=dojo.hitch(this,function(){var win=this._iframeContentWindow(_1ed);cn=dojo.withGlobal(win,dojo.body);_1ee.connects=_1ef(cn);});if(_1ed.addEventListener){_1ed.addEventListener("load",_1ee.onloadHandler,false);}else{_1ed.attachEvent("onload",_1ee.onloadHandler);}}},unBindDomNode:function(_1f0){var node;try{node=dojo.byId(_1f0);}catch(e){return;}var _1f1="_dijitMenu"+this.id;if(node&&dojo.hasAttr(node,_1f1)){var bid=dojo.attr(node,_1f1)-1,b=this._bindings[bid];dojo.forEach(b.connects,dojo.disconnect);var _1f2=b.iframe;if(_1f2){if(_1f2.removeEventListener){_1f2.removeEventListener("load",b.onloadHandler,false);}else{_1f2.detachEvent("onload",b.onloadHandler);}}dojo.removeAttr(node,_1f1);delete this._bindings[bid];}},_scheduleOpen:function(_1f3,_1f4,_1f5){if(!this._openTimer){this._openTimer=setTimeout(dojo.hitch(this,function(){delete this._openTimer;this._openMyself({target:_1f3,iframe:_1f4,coords:_1f5});}),1);}},_openMyself:function(args){var _1f6=args.target,_1f7=args.iframe,_1f8=args.coords;if(_1f8){if(_1f7){var od=_1f6.ownerDocument,ifc=dojo.position(_1f7,true),win=this._iframeContentWindow(_1f7),_1f9=dojo.withGlobal(win,"_docScroll",dojo);var cs=dojo.getComputedStyle(_1f7),tp=dojo._toPixelValue,left=(dojo.isIE&&dojo.isQuirks?0:tp(_1f7,cs.paddingLeft))+(dojo.isIE&&dojo.isQuirks?tp(_1f7,cs.borderLeftWidth):0),top=(dojo.isIE&&dojo.isQuirks?0:tp(_1f7,cs.paddingTop))+(dojo.isIE&&dojo.isQuirks?tp(_1f7,cs.borderTopWidth):0);_1f8.x+=ifc.x+left-_1f9.x;_1f8.y+=ifc.y+top-_1f9.y;}}else{_1f8=dojo.position(_1f6,true);_1f8.x+=10;_1f8.y+=10;}var self=this;var _1fa=dijit.getFocus(this);function _1fb(){if(self.refocus){dijit.focus(_1fa);}dijit.popup.close(self);};dijit.popup.open({popup:this,x:_1f8.x,y:_1f8.y,onExecute:_1fb,onCancel:_1fb,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},uninitialize:function(){dojo.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});}if(!dojo._hasResource["dojox.html.metrics"]){dojo._hasResource["dojox.html.metrics"]=true;dojo.provide("dojox.html.metrics");(function(){var dhm=dojox.html.metrics;dhm.getFontMeasurements=function(){var _1fc={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};if(dojo.isIE){dojo.doc.documentElement.style.fontSize="100%";}var div=dojo.doc.createElement("div");var ds=div.style;ds.position="absolute";ds.left="-100px";ds.top="0";ds.width="30px";ds.height="1000em";ds.borderWidth="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";dojo.body().appendChild(div);for(var p in _1fc){ds.fontSize=p;_1fc[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}dojo.body().removeChild(div);div=null;return _1fc;};var _1fd=null;dhm.getCachedFontMeasurements=function(_1fe){if(_1fe||!_1fd){_1fd=dhm.getFontMeasurements();}return _1fd;};var _1ff=null,_200={};dhm.getTextBox=function(text,_201,_202){var m,s;if(!_1ff){m=_1ff=dojo.doc.createElement("div");var c=dojo.doc.createElement("div");c.appendChild(m);s=c.style;s.overflow="scroll";s.position="absolute";s.left="0px";s.top="-10000px";s.width="1px";s.height="1px";s.visibility="hidden";s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";dojo.body().appendChild(c);}else{m=_1ff;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_201){for(var i in _201){if(i in _200){continue;}s[i]=_201[i];}}if(arguments.length>2&&_202){m.className=_202;}m.innerHTML=text;var box=dojo.position(m);box.w=m.parentNode.scrollWidth;return box;};var _203={w:16,h:16};dhm.getScrollbar=function(){return {w:_203.w,h:_203.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_204){var f=dhm._fontResizeNode=dojo.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";if(dojo.isIE){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=f.contentWindow.parent[dojox._scopeName].html.metrics._fontresize;}};}else{f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[dojox._scopeName].html.metrics._fontresize;};}f.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}</script></head><body></body></html>'");dojo.body().appendChild(f);dhm.initOnFontResize=function(){};};dhm.onFontResize=function(){};dhm._fontresize=function(){dhm.onFontResize();};dojo.addOnUnload(function(){var f=dhm._fontResizeNode;if(f){if(dojo.isIE&&f.onresize){f.onresize=null;}else{if(f.contentWindow&&f.contentWindow.onresize){f.contentWindow.onresize=null;}}dhm._fontResizeNode=null;}});dojo.addOnLoad(function(){try{var n=dojo.doc.createElement("div");n.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";dojo.body().appendChild(n);_203.w=n.offsetWidth-n.clientWidth;_203.h=n.offsetHeight-n.clientHeight;dojo.body().removeChild(n);delete n;}catch(e){}if("fontSizeWatch" in dojo.config&&!!dojo.config.fontSizeWatch){dhm.initOnFontResize();}});})();}if(!dojo._hasResource["dojox.grid.util"]){dojo._hasResource["dojox.grid.util"]=true;dojo.provide("dojox.grid.util");(function(){var dgu=dojox.grid.util;dgu.na="...";dgu.rowIndexTag="gridRowIndex";dgu.gridViewTag="gridView";dgu.fire=function(ob,ev,args){var fn=ob&&ev&&ob[ev];return fn&&(args?fn.apply(ob,args):ob[ev]());};dgu.setStyleHeightPx=function(_205,_206){if(_206>=0){var s=_205.style;var v=_206+"px";if(_205&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_207,_208,_209,_20a){var evts=(_20a?_20a:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_208.connect(_207,"on"+evts[i],_209);}};dgu.removeNode=function(_20b){_20b=dojo.byId(_20b);_20b&&_20b.parentNode&&_20b.parentNode.removeChild(_20b);return _20b;};dgu.arrayCompare=function(inA,inB){for(var i=0,l=inA.length;i<l;i++){if(inA[i]!=inB[i]){return false;}}return (inA.length==inB.length);};dgu.arrayInsert=function(_20c,_20d,_20e){if(_20c.length<=_20d){_20c[_20d]=_20e;}else{_20c.splice(_20d,0,_20e);}};dgu.arrayRemove=function(_20f,_210){_20f.splice(_210,1);};dgu.arraySwap=function(_211,inI,inJ){var _212=_211[inI];_211[inI]=_211[inJ];_211[inJ]=_212;};})();}if(!dojo._hasResource["dojox.grid._Scroller"]){dojo._hasResource["dojox.grid._Scroller"]=true;dojo.provide("dojox.grid._Scroller");(function(){var _213=function(_214){var i=0,n,p=_214.parentNode;while((n=p.childNodes[i++])){if(n==_214){return i-1;}}return -1;};var _215=function(_216){if(!_216){return;}var _217=function(inW){return inW.domNode&&dojo.isDescendant(inW.domNode,_216,true);};var ws=dijit.registry.filter(_217);for(var i=0,w;(w=ws[i]);i++){w.destroy();}delete ws;};var _218=function(_219){var node=dojo.byId(_219);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _21a=function(_21b,_21c){var _21d=[];var i=0,n;while((n=_21b.childNodes[i])){i++;if(_218(n)==_21c){_21d.push(n);}}return _21d;};var _21e=function(_21f){return _21a(_21f,"div");};dojo.declare("dojox.grid._Scroller",null,{constructor:function(_220){this.setContentNodes(_220);this.pageHeights=[];this.pageNodes=[];this.stack=[];},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(_221,_222,_223){switch(arguments.length){case 3:this.rowsPerPage=_223;case 2:this.keepRows=_222;case 1:this.rowCount=_221;default:break;}this.defaultPageHeight=this.defaultRowHeight*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=dojo.hitch(this,"onscroll");}},_getPageCount:function(_224,_225){return _224?(Math.ceil(_224/_225)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_226){this.keepRows=_226;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_227){this.contentNodes=_227;this.colCount=(this.contentNodes?this.contentNodes.length:0);this.pageNodes=[];for(var i=0;i<this.colCount;i++){this.pageNodes[i]=[];}},getDefaultNodes:function(){return this.pageNodes[0]||[];},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();this._invalidating=false;},updateRowCount:function(_228){this.invalidateNodes();this.rowCount=_228;var _229=this.pageCount;if(_229===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_229){for(var i=_229-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_229){this.height+=this.defaultPageHeight*(this.pageCount-_229-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_22a){return Boolean(this.getDefaultPageNode(_22a));},measurePage:function(_22b){if(this.grid.rowHeight){var _22c=this.grid.rowHeight+1;return ((_22b+1)*this.rowsPerPage>this.rowCount?this.rowCount-_22b*this.rowsPerPage:this.rowsPerPage)*_22c;}var n=this.getDefaultPageNode(_22b);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_22d,_22e){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_22d].style.top=_22e+"px";}},repositionPages:function(_22f){var _230=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=_230[_22f];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_22f):0);for(var p=_22f+1;p<=last;p++){n=_230[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_231){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_231]);}},preparePage:function(_232,_233){var p=(_233?this.popPage():null);for(var i=0;i<this.colCount;i++){var _234=this.pageNodes[i];var _235=(p===null?this.createPageNode():this.invalidatePageNode(p,_234));_235.pageIndex=_232;_234[_232]=_235;}},renderPage:function(_236){var _237=[];var i,j;for(i=0;i<this.colCount;i++){_237[i]=this.pageNodes[i][_236];}for(i=0,j=_236*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_237);}},removePage:function(_238){for(var i=0,j=_238*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_239){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_239,this.pageNodes[i]);if(n){dojo.destroy(n);}}},pacify:function(_23a){},pacifying:false,pacifyTicks:200,setPacifying:function(_23b){if(this.pacifying!=_23b){this.pacifying=_23b;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _23c=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _23c;},endPacify:function(){this.setPacifying(false);},resize:function(){if(this.scrollboxNode){this.windowHeight=this.scrollboxNode.clientHeight;}for(var i=0;i<this.colCount;i++){dojox.grid.util.setStyleHeightPx(this.contentNodes[i],Math.max(1,this.height));}var _23d=(!this._invalidating);if(!_23d){var ah=this.grid.attr("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_23d=true;}}if(_23d){this.needPage(this.page,this.pageTop);}var _23e=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _23f=this.getPageHeight(this.page);this.averageRowHeight=(_23f>0&&_23e>0)?(_23f/_23e):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _240=this.pageCount-1;var _241=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_240]=_241;return _241;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_242,_243){if(this.pageExists(_242)){var oh=this.getPageHeight(_242);var h=(this.measurePage(_242));if(h===undefined){h=oh;}this.pageHeights[_242]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.attr("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_243)){this.grid.sizeChange();}else{this.repositionPages(_242);}}return h;}return 0;},rowHeightChanged:function(_244){this.updatePageHeight(Math.floor(_244/this.rowsPerPage),false);},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");dojo.attr(p,"role","presentation");p.style.position="absolute";p.style[dojo._isBodyLtr()?"left":"right"]="0";return p;},getPageHeight:function(_245){var ph=this.pageHeights[_245];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_246){return this.stack.push(_246);},popPage:function(){return this.stack.shift();},findPage:function(_247){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_247){break;}}this.page=i;this.pageTop=h;},buildPage:function(_248,_249,_24a){this.preparePage(_248,_249);this.positionPage(_248,_24a);this.installPage(_248);this.renderPage(_248);this.pushPage(_248);},needPage:function(_24b,_24c){var h=this.getPageHeight(_24b),oh=h;if(!this.pageExists(_24b)){this.buildPage(_24b,this.keepPages&&(this.stack.length>=this.keepPages),_24c);h=this.updatePageHeight(_24b,true);}else{this.positionPage(_24b,_24c);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_24d){this.grid.scrollTop=_24d;if(this.colCount){this.startPacify();this.findPage(_24d);var h=this.height;var b=this.getScrollBottom(_24d);for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){y+=this.needPage(p,y);}this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,_24d);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_24e){return (this.windowHeight>=0?_24e+this.windowHeight:-1);},processNodeEvent:function(e,_24f){var t=e.target;while(t&&(t!=_24f)&&t.parentNode&&(t.parentNode.parentNode!=_24f)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_24f)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_213(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_250,_251){},removeRow:function(_252){},getDefaultPageNode:function(_253){return this.getDefaultNodes()[_253];},positionPageNode:function(_254,_255){},getPageNodePosition:function(_256){return _256.offsetTop;},invalidatePageNode:function(_257,_258){var p=_258[_257];if(p){delete _258[_257];this.removePage(_257,p);_215(p);p.innerHTML="";}return p;},getPageRow:function(_259){return _259*this.rowsPerPage;},getLastPageRow:function(_25a){return Math.min(this.rowCount,this.getPageRow(_25a+1))-1;},getFirstVisibleRow:function(_25b,_25c,_25d){if(!this.pageExists(_25b)){return 0;}var row=this.getPageRow(_25b);var _25e=this.getDefaultNodes();var rows=_21e(_25e[_25b]);for(var i=0,l=rows.length;i<l&&_25c<_25d;i++,row++){_25c+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_25f,_260,_261){if(!this.pageExists(_25f)){return 0;}var _262=this.getDefaultNodes();var row=this.getLastPageRow(_25f);var rows=_21e(_262[_25f]);for(var i=rows.length-1;i>=0&&_260>_261;i--,row--){_260-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_263){var _264=this.getDefaultNodes();var rows=_21e(_264[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_263){this.offset=h-(t-_263);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_265){var _266=Math.floor(_265/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_266;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.needPage(_266,this.pageTop);var _267=this.getDefaultNodes();var rows=_21e(_267[_266]);var r=_265-this.rowsPerPage*_266;for(i=0,l=rows.length;i<l&&i<r;i++){t+=rows[i].offsetHeight;}return t;},dummy:0});})();}if(!dojo._hasResource["dojox.grid.cells._base"]){dojo._hasResource["dojox.grid.cells._base"]=true;dojo.provide("dojox.grid.cells._base");dojo.declare("dojox.grid._DeferredTextWidget",dijit._Widget,{deferred:null,_destroyOnRemove:true,postCreate:function(){if(this.deferred){this.deferred.addBoth(dojo.hitch(this,function(text){if(this.domNode){this.domNode.innerHTML=text;}}));}}});(function(){var _268=function(_269){try{dojox.grid.util.fire(_269,"focus");dojox.grid.util.fire(_269,"select");}catch(e){}};var _26a=function(){setTimeout(dojo.hitch.apply(dojo,arguments),0);};var dgc=dojox.grid.cells;dojo.declare("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_26b){this._props=_26b||{};dojo.mixin(this,_26b);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_26c,_26d){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_26c!=this.defaultValue&&f)?f.apply(s,_26d):_26c;if(typeof v=="undefined"){return this.defaultValue;}if(v&&v.addBoth){v=new dojox.grid._DeferredTextWidget({deferred:v},dojo.create("span",{innerHTML:this.defaultValue}));}if(v&&v.declaredClass&&v.startup){return "<div class='dojoxGridStubNode' linkWidget='"+v.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";}return v;},format:function(_26e,_26f){var f,i=this.grid.edit.info,d=this.get?this.get(_26e,_26f):(this.value||this.defaultValue);d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&/g,"&amp;").replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_26e&&i.cell==this))){return this.formatEditing(d,_26e);}else{return this._defaultFormat(d,[d,_26e,this]);}},formatEditing:function(_270,_271){},getNode:function(_272){return this.view.getCellNode(_272,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_273){return (this.getNode(_273)||0).firstChild||0;},canResize:function(){var uw=this.unitWidth;return uw&&(uw!=="auto");},isFlex:function(){var uw=this.unitWidth;return uw&&dojo.isString(uw)&&(uw=="auto"||uw.slice(-1)=="%");},applyEdit:function(_274,_275){this.grid.edit.applyCellEdit(_274,this,_275);},cancelEdit:function(_276){this.grid.doCancelEdit(_276);},_onEditBlur:function(_277){if(this.grid.edit.isEditCell(_277,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_278,_279){if(this.commitOnBlur){dojo.connect(_278,"onblur",function(e){setTimeout(dojo.hitch(this,"_onEditBlur",_279),250);});}},needFormatNode:function(_27a,_27b){this._formatPending=true;_26a(this,"_formatNode",_27a,_27b);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_27c,_27d){if(this._formatPending){this._formatPending=false;dojo.setSelectable(this.grid.domNode,true);this.formatNode(this.getEditNode(_27d),_27c,_27d);}},formatNode:function(_27e,_27f,_280){if(dojo.isIE){_26a(this,"focus",_280,_27e);}else{this.focus(_280,_27e);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_281){return this.getEditNode(_281)[this._valueProp];},setValue:function(_282,_283){var n=this.getEditNode(_282);if(n){n[this._valueProp]=_283;}},focus:function(_284,_285){_268(_285||this.getEditNode(_284));},save:function(_286){this.value=this.value||this.getValue(_286);},restore:function(_287){this.setValue(_287,this.value);},_finish:function(_288){dojo.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_289){this.applyEdit(this.getValue(_289),_289);this._finish(_289);},cancel:function(_28a){this.cancelEdit(_28a);this._finish(_28a);}});dgc._Base.markupFactory=function(node,_28b){var d=dojo;var _28c=d.trim(d.attr(node,"formatter")||"");if(_28c){_28b.formatter=dojo.getObject(_28c)||_28c;}var get=d.trim(d.attr(node,"get")||"");if(get){_28b.get=dojo.getObject(get);}var _28d=function(attr,cell,_28e){var _28f=d.trim(d.attr(node,attr)||"");if(_28f){cell[_28e||attr]=!(_28f.toLowerCase()=="false");}};_28d("sortDesc",_28b);_28d("editable",_28b);_28d("alwaysEditing",_28b);_28d("noresize",_28b);_28d("draggable",_28b);var _290=d.trim(d.attr(node,"loadingText")||d.attr(node,"defaultValue")||"");if(_290){_28b.defaultValue=_290;}var _291=function(attr,cell,_292){var _293=d.trim(d.attr(node,attr)||"")||undefined;if(_293){cell[_292||attr]=_293;}};_291("styles",_28b);_291("headerStyles",_28b);_291("cellStyles",_28b);_291("classes",_28b);_291("headerClasses",_28b);_291("cellClasses",_28b);};dojo.declare("dojox.grid.cells.Cell",dgc._Base,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_294,_295){this.needFormatNode(_294,_295);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_294+"\">";},formatNode:function(_296,_297,_298){this.inherited(arguments);this.registerOnBlur(_296,_298);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){dojo.stopEvent(e);}}},_finish:function(_299){this.inherited(arguments);var n=this.getEditNode(_299);try{dojox.grid.util.fire(n,"blur");}catch(e){}}});dgc.Cell.markupFactory=function(node,_29a){dgc._Base.markupFactory(node,_29a);var d=dojo;var _29b=d.trim(d.attr(node,"keyFilter")||"");if(_29b){_29a.keyFilter=new RegExp(_29b);}};dojo.declare("dojox.grid.cells.RowIndex",dgc.Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_29c){return _29c+1;}});dgc.RowIndex.markupFactory=function(node,_29d){dgc.Cell.markupFactory(node,_29d);};dojo.declare("dojox.grid.cells.Select",dgc.Cell,{options:null,values:null,returnIndex:-1,constructor:function(_29e){this.values=this.values||this.options;},formatEditing:function(_29f,_2a0){this.needFormatNode(_29f,_2a0);var h=["<select class=\"dojoxGridSelect\">"];for(var i=0,o,v;((o=this.options[i])!==undefined)&&((v=this.values[i])!==undefined);i++){h.push("<option",(_29f==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},getValue:function(_2a1){var n=this.getEditNode(_2a1);if(n){var i=n.selectedIndex,o=n.options[i];return this.returnIndex>-1?i:o.value||o.innerHTML;}}});dgc.Select.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);var d=dojo;var _2a2=d.trim(d.attr(node,"options")||"");if(_2a2){var o=_2a2.split(",");if(o[0]!=_2a2){cell.options=o;}}var _2a3=d.trim(d.attr(node,"values")||"");if(_2a3){var v=_2a3.split(",");if(v[0]!=_2a3){cell.values=v;}}};dojo.declare("dojox.grid.cells.AlwaysEdit",dgc.Cell,{alwaysEditing:true,_formatNode:function(_2a4,_2a5){this.formatNode(this.getEditNode(_2a5),_2a4,_2a5);},applyStaticValue:function(_2a6){var e=this.grid.edit;e.applyCellEdit(this.getValue(_2a6),this,_2a6);e.start(this,_2a6,true);}});dgc.AlwaysEdit.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);};dojo.declare("dojox.grid.cells.Bool",dgc.AlwaysEdit,{_valueProp:"checked",formatEditing:function(_2a7,_2a8){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_2a7?" checked=\"checked\"":"")+" style=\"width: auto\" />";},doclick:function(e){if(e.target.tagName=="INPUT"){this.applyStaticValue(e.rowIndex);}}});dgc.Bool.markupFactory=function(node,cell){dgc.AlwaysEdit.markupFactory(node,cell);};})();}if(!dojo._hasResource["dojox.grid.cells"]){dojo._hasResource["dojox.grid.cells"]=true;dojo.provide("dojox.grid.cells");}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd.getCopyKeyState=dojo.isCopyKey;dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo.position(n,true);var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;if(dojo.isWebKit||dojo.isOpera){rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;}if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}}var _2a9=n.scrollLeft,_2aa=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_2a9!=n.scrollLeft||_2aa!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){this.node=dojo.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=this.host=host,d=node.ownerDocument,_2ab=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_2ab];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY},e);dojo.stopEvent(e);},onMouseUp:function(e){if(dojo.isWebKit&&dojo.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}dojo.stopEvent(e);},onFirstMove:function(e){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left))||0;t=Math.round(parseFloat(s.top))||0;break;default:s.position="absolute";var m=dojo.marginBox(this.node);var b=dojo.doc.body;var bs=dojo.getComputedStyle(b);var bm=dojo._getMarginBox(b,bs);var bc=dojo._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this,e);}dojo.disconnect(this.events.pop());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,_2ac){this.node=dojo.byId(node);if(!_2ac){_2ac={};}this.handle=_2ac.handle?dojo.byId(_2ac.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_2ac.delay>0?_2ac.delay:0;this.skip=_2ac.skip;this.mover=_2ac.mover?_2ac.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_2ad,node){return new dojo.dnd.Moveable(node,_2ad);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}dojo.stopEvent(e);},onMouseUp:function(e){for(var i=0;i<2;++i){dojo.disconnect(this.events.pop());}dojo.stopEvent(e);},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_2ae){dojo.publish("/dnd/move/start",[_2ae]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_2af){dojo.publish("/dnd/move/stop",[_2af]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_2b0,e){},onMove:function(_2b1,_2b2,e){this.onMoving(_2b1,_2b2);var s=_2b1.node.style;s.left=_2b2.l+"px";s.top=_2b2.t+"px";this.onMoved(_2b1,_2b2);},onMoving:function(_2b3,_2b4){},onMoved:function(_2b5,_2b6){}});}if(!dojo._hasResource["dojox.grid._Builder"]){dojo._hasResource["dojox.grid._Builder"]=true;dojo.provide("dojox.grid._Builder");(function(){var dg=dojox.grid;var _2b7=function(td){return td.cellIndex>=0?td.cellIndex:dojo.indexOf(td.parentNode.cells,td);};var _2b8=function(tr){return tr.rowIndex>=0?tr.rowIndex:dojo.indexOf(tr.parentNode.childNodes,tr);};var _2b9=function(_2ba,_2bb){return _2ba&&((_2ba.rows||0)[_2bb]||_2ba.childNodes[_2bb]);};var _2bc=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _2bd=function(_2be,_2bf){for(var n=_2be;n&&_2bf(n);n=n.parentNode){}return n;};var _2c0=function(_2c1){var name=_2c1.toUpperCase();return function(node){return node.tagName!=name;};};var _2c2=dojox.grid.util.rowIndexTag;var _2c3=dojox.grid.util.gridViewTag;dg._Builder=dojo.extend(function(view){if(view){this.view=view;this.grid=view.grid;}},{view:null,_table:"<table class=\"dojoxGridRowTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"",getTableArray:function(){var html=[this._table];if(this.view.viewWidth){html.push([" style=\"width:",this.view.viewWidth,";\""].join(""));}html.push(">");return html;},generateCellMarkup:function(_2c4,_2c5,_2c6,_2c7){var _2c8=[],html;if(_2c7){var _2c9=_2c4.index!=_2c4.grid.getSortIndex()?"":_2c4.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_2c4.id){_2c4.id=this.grid.id+"Hdr"+_2c4.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_2c9,"id=\"",_2c4.id,"\""];}else{var _2ca=this.grid.editable&&!_2c4.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_2ca];}if(_2c4.colSpan){html.push(" colspan=\"",_2c4.colSpan,"\"");}if(_2c4.rowSpan){html.push(" rowspan=\"",_2c4.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_2c4.classes){html.push(_2c4.classes," ");}if(_2c6){html.push(_2c6," ");}_2c8.push(html.join(""));_2c8.push("");html=["\" idx=\"",_2c4.index,"\" style=\""];if(_2c5&&_2c5[_2c5.length-1]!=";"){_2c5+=";";}html.push(_2c4.styles,_2c5||"",_2c4.hidden?"display:none;":"");if(_2c4.unitWidth){html.push("width:",_2c4.unitWidth,";");}_2c8.push(html.join(""));_2c8.push("");html=["\""];if(_2c4.attrs){html.push(" ",_2c4.attrs);}html.push(">");_2c8.push(html.join(""));_2c8.push("");_2c8.push(_2c7?"</th>":"</td>");return _2c8;},isCellNode:function(_2cb){return Boolean(_2cb&&_2cb!=dojo.doc&&dojo.attr(_2cb,"idx"));},getCellNodeIndex:function(_2cc){return _2cc?Number(dojo.attr(_2cc,"idx")):-1;},getCellNode:function(_2cd,_2ce){for(var i=0,row;(row=_2b9(_2cd.firstChild,i));i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_2ce){return cell;}}}return null;},findCellTarget:function(_2cf,_2d0){var n=_2cf;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_2c3 in n.offsetParent.parentNode&&n.offsetParent.parentNode[_2c3]!=this.view.id))&&(n!=_2d0)){n=n.parentNode;}return n!=_2d0?n:null;},baseDecorateEvent:function(e){e.dispatch="do"+e.type;e.grid=this.grid;e.sourceView=this.view;e.cellNode=this.findCellTarget(e.target,e.rowNode);e.cellIndex=this.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);},findTarget:function(_2d1,_2d2){var n=_2d1;while(n&&(n!=this.domNode)&&(!(_2d2 in n)||(_2c3 in n&&n[_2c3]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_2d3){return this.findTarget(_2d3,_2c2);},isIntraNodeEvent:function(e){try{return (e.cellNode&&e.relatedTarget&&dojo.isDescendant(e.relatedTarget,e.cellNode));}catch(x){return false;}},isIntraRowEvent:function(e){try{var row=e.relatedTarget&&this.findRowTarget(e.relatedTarget);return !row&&(e.rowIndex==-1)||row&&(e.rowIndex==row.gridRowIndex);}catch(x){return false;}},dispatchEvent:function(e){if(e.dispatch in this){return this[e.dispatch](e);}return false;},domouseover:function(e){if(e.cellNode&&(e.cellNode!=this.lastOverCellNode)){this.lastOverCellNode=e.cellNode;this.grid.onMouseOver(e);}this.grid.onMouseOverRow(e);},domouseout:function(e){if(e.cellNode&&(e.cellNode==this.lastOverCellNode)&&!this.isIntraNodeEvent(e,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(e);if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}},domousedown:function(e){if(e.cellNode){this.grid.onMouseDown(e);}this.grid.onMouseDownRow(e);}});dg._ContentBuilder=dojo.extend(function(view){dg._Builder.call(this,view);},dg._Builder.prototype,{update:function(){this.prepareHtml();},prepareHtml:function(){var _2d4=this.grid.get,_2d5=this.view.structure.cells;for(var j=0,row;(row=_2d5[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_2d4;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_2d6,_2d7){var html=this.getTableArray(),v=this.view,_2d8=v.structure.cells,item=this.grid.getItem(_2d7);dojox.grid.util.fire(this.view,"onBeforeRow",[_2d7,_2d8]);for(var j=0,row;(row=_2d8[j]);j++){if(row.hidden||row.header){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,m,cc,cs;(cell=row[i]);i++){m=cell.markup;cc=cell.customClasses=[];cs=cell.customStyles=[];m[5]=cell.format(_2d7,item);m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_2c2];this.baseDecorateEvent(e);e.cell=this.grid.getCell(e.cellIndex);return true;}});dg._HeaderBuilder=dojo.extend(function(view){this.moveable=null;dg._Builder.call(this,view);},dg._Builder.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap){this.tableMap.mapRows(this.view.structure.cells);}else{this.tableMap=new dg._TableMap(this.view.structure.cells);}},generateHtml:function(_2d9,_2da){var html=this.getTableArray(),_2db=this.view.structure.cells;dojox.grid.util.fire(this.view,"onBeforeRow",[-1,_2db]);for(var j=0,row;(row=_2db[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_2dc;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){if(cell.draggable){if(cell.headerClasses){if(cell.headerClasses.indexOf("dojoDndItem")==-1){cell.headerClasses+=" dojoDndItem";}}else{cell.headerClasses="dojoDndItem";}}if(cell.attrs){if(cell.attrs.indexOf("dndType='gridColumn_")==-1){cell.attrs+=" dndType='gridColumn_"+this.grid.id+"'";}}else{cell.attrs="dndType='gridColumn_"+this.grid.id+"'";}}_2dc=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_2dc[5]=(_2da!=undefined?_2da:_2d9(cell));_2dc[3]=cell.customStyles.join(";");_2dc[1]=cell.customClasses.join(" ");html.push(_2dc.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(dojo.isMoz){n=_2bd(e.target,_2c0("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!dojo._isBodyLtr()){table=_2bd(n,_2c0("table"));x-=(table&&table.offsetLeft)||0;}}n=_2bd(e.target,function(){if(!n||n==e.cellNode){return false;}x+=(n.offsetLeft<0?0:n.offsetLeft);return true;});return x;},decorateEvent:function(e){this.baseDecorateEvent(e);e.rowIndex=-1;e.cellX=this.getCellX(e);return true;},prepareResize:function(e,mod){do{var i=_2b7(e.cellNode);e.cellNode=(i?e.cellNode.parentNode.cells[i+mod]:null);e.cellIndex=(e.cellNode?this.getCellNodeIndex(e.cellNode):-1);}while(e.cellNode&&e.cellNode.style.display=="none");return Boolean(e.cellNode);},canResize:function(e){if(!e.cellNode||e.cellNode.colSpan>1){return false;}var cell=this.grid.getCell(e.cellIndex);return !cell.noresize&&cell.canResize();},overLeftResizeArea:function(e){if(dojo.hasClass(dojo.body(),"dojoDndMove")){return false;}if(dojo.isIE){var tN=e.target;if(dojo.hasClass(tN,"dojoxGridArrowButtonNode")||dojo.hasClass(tN,"dojoxGridArrowButtonChar")){return false;}}if(dojo._isBodyLtr()){return (e.cellIndex>0)&&(e.cellX<this.overResizeWidth)&&this.prepareResize(e,-1);}var t=e.cellNode&&(e.cellX<this.overResizeWidth);return t;},overRightResizeArea:function(e){if(dojo.hasClass(dojo.body(),"dojoDndMove")){return false;}if(dojo.isIE){var tN=e.target;if(dojo.hasClass(tN,"dojoxGridArrowButtonNode")||dojo.hasClass(tN,"dojoxGridArrowButtonChar")){return false;}}if(dojo._isBodyLtr()){return e.cellNode&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth);}return (e.cellIndex>0)&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth)&&this.prepareResize(e,-1);},domousemove:function(e){if(!this.moveable){var c=(this.overRightResizeArea(e)?"dojoxGridColResize":(this.overLeftResizeArea(e)?"dojoxGridColResize":""));if(c&&!this.canResize(e)){c="dojoxGridColNoResize";}dojo.toggleClass(e.sourceView.headerNode,"dojoxGridColNoResize",(c=="dojoxGridColNoResize"));dojo.toggleClass(e.sourceView.headerNode,"dojoxGridColResize",(c=="dojoxGridColResize"));if(dojo.isIE){var t=e.sourceView.headerNode.scrollLeft;e.sourceView.headerNode.scrollLeft=t;}if(c){dojo.stopEvent(e);}}},domousedown:function(e){if(!this.moveable){if((this.overRightResizeArea(e)||this.overLeftResizeArea(e))&&this.canResize(e)){this.beginColumnResize(e);}else{this.grid.onMouseDown(e);this.grid.onMouseOverRow(e);}}},doclick:function(e){if(this._skipBogusClicks){dojo.stopEvent(e);return true;}return false;},colResizeSetup:function(e,_2dd){var _2de=dojo.contentBox(e.sourceView.headerNode);if(_2dd){this.lineDiv=document.createElement("div");var vw=(dojo.position||dojo._abs)(e.sourceView.headerNode,true);var _2df=dojo.contentBox(e.sourceView.domNode);var l=e.clientX;if(!dojo._isBodyLtr()&&dojo.isIE<8){l-=dojox.html.metrics.getScrollbar().w;}dojo.style(this.lineDiv,{top:vw.y+"px",left:l+"px",height:(_2df.h+_2de.h)+"px"});dojo.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;dojo.body().appendChild(this.lineDiv);}var _2e0=[],_2e1=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_2e1[i]);i++){_2e0.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=dojo._isBodyLtr()?1:-1;var _2e2=e.grid.views.views;var _2e3=[];for(var j=view.idx+adj,_2e4;(_2e4=_2e2[j]);j=j+adj){_2e3.push({node:_2e4.headerNode,left:window.parseInt(_2e4.headerNode.style.left)});}var _2e5=view.headerContentNode.firstChild;var drag={scrollLeft:e.sourceView.headerNode.scrollLeft,view:view,node:e.cellNode,index:e.cellIndex,w:dojo.contentBox(e.cellNode).w,vw:_2de.w,table:_2e5,tw:dojo.contentBox(_2e5).w,spanners:_2e0,followers:_2e3};return drag;},beginColumnResize:function(e){this.moverDiv=document.createElement("div");dojo.style(this.moverDiv,{position:"absolute",left:0});dojo.body().appendChild(this.moverDiv);dojo.addClass(this.grid.domNode,"dojoxGridColumnResizing");var m=(this.moveable=new dojo.dnd.Moveable(this.moverDiv));var drag=this.colResizeSetup(e,true);m.onMove=dojo.hitch(this,"doResizeColumn",drag);dojo.connect(m,"onMoveStop",dojo.hitch(this,function(){this.endResizeColumn(drag);if(drag.node.releaseCapture){drag.node.releaseCapture();}this.moveable.destroy();delete this.moveable;this.moveable=null;dojo.removeClass(this.grid.domNode,"dojoxGridColumnResizing");}));if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_2e6,_2e7,_2e8){var _2e9=_2e8.l;var data={deltaX:_2e9,w:_2e6.w+(dojo._isBodyLtr()?_2e9:-_2e9),vw:_2e6.vw+_2e9,tw:_2e6.tw+_2e9};this.dragRecord={inDrag:_2e6,mover:_2e7,leftTop:_2e8};if(data.w>=this.minColWidth){if(!_2e7){this.doResizeNow(_2e6,data);}else{dojo.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_2ea){if(this.dragRecord){var _2eb=this.dragRecord.leftTop;var _2ec=dojo._isBodyLtr()?_2eb.l:-_2eb.l;_2ec+=Math.max(_2ea.w+_2ec,this.minColWidth)-(_2ea.w+_2ec);if(dojo.isWebKit&&_2ea.spanners.length){_2ec+=dojo._getPadBorderExtents(_2ea.spanners[0].node).w;}var data={deltaX:_2ec,w:_2ea.w+_2ec,vw:_2ea.vw+_2ec,tw:_2ea.tw+_2ec};this.doResizeNow(_2ea,data);}dojo.destroy(this.lineDiv);dojo.destroy(this.moverDiv);dojo.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_2ea.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_2ea.index);},doResizeNow:function(_2ed,data){_2ed.view.convertColPctToFixed();if(_2ed.view.flexCells&&!_2ed.view.testFlexCells()){var t=_2bc(_2ed.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_2ed.spanners[i]);i++){sw=s.width+data.deltaX;s.node.style.width=sw+"px";_2ed.view.setColWidth(s.index,sw);}if(dojo._isBodyLtr()||!dojo.isIE){for(i=0;(f=_2ed.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_2ed.node.style.width=data.w+"px";_2ed.view.setColWidth(_2ed.index,data.w);_2ed.view.headerNode.style.width=data.vw+"px";_2ed.view.setColumnsWidth(data.tw);if(!dojo._isBodyLtr()){_2ed.view.headerNode.scrollLeft=_2ed.scrollLeft+data.deltaX;}}});dg._TableMap=dojo.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_2ee){var _2ef=_2ee.length;if(!_2ef){return;}this.map=[];var row;for(var k=0;(row=_2ee[k]);k++){this.map[k]=[];}for(var j=0;(row=_2ee[j]);j++){for(var i=0,x=0,cell,_2f0,_2f1;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_2f1=cell.rowSpan||1;_2f0=cell.colSpan||1;for(var y=0;y<_2f1;y++){for(var s=0;s<_2f0;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_2f0;}}},dumpMap:function(){for(var j=0,row,h="";(row=this.map[j]);j++,h=""){for(var i=0,cell;(cell=row[i]);i++){h+=cell.r+","+cell.c+"   ";}}},getMapCoords:function(_2f2,_2f3){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_2f3&&cell.r==_2f2){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_2f4,_2f5,_2f6){var row=_2f4&&_2f4.rows[_2f5];return row&&row.cells[_2f6];},_findOverlappingNodes:function(_2f7,_2f8,_2f9){var _2fa=[];var m=this.getMapCoords(_2f8,_2f9);for(var j=0,row;(row=this.map[j]);j++){if(j==m.j){continue;}var rw=row[m.i];var n=(rw?this.getNode(_2f7,rw.r,rw.c):null);if(n){_2fa.push(n);}}return _2fa;},findOverlappingNodes:function(_2fb){return this._findOverlappingNodes(_2bc(_2fb),_2b8(_2fb.parentNode),_2b7(_2fb));}});})();}if(!dojo._hasResource["dojo.dnd.Container"]){dojo._hasResource["dojo.dnd.Container"]=true;dojo.provide("dojo.dnd.Container");dojo.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(node,_2fc){this.node=dojo.byId(node);if(!_2fc){_2fc={};}this.creator=_2fc.creator||null;this.skipForm=_2fc.skipForm;this.parent=_2fc.dropParent&&dojo.byId(_2fc.dropParent);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_2fc&&_2fc._skipStartup)){this.startup();}this.events=[dojo.connect(this.node,"onmouseover",this,"onMouseOver"),dojo.connect(this.node,"onmouseout",this,"onMouseOut"),dojo.connect(this.node,"ondragstart",this,"onSelectStart"),dojo.connect(this.node,"onselectstart",this,"onSelectStart")];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||dojo.global;var m=this.map,e=dojo.dnd._empty;for(var i in m){if(i in e){continue;}f.call(o,m[i],i,this);}return o;},clearItems:function(){this.map={};},getAllNodes:function(){return dojo.query("> .dojoDndItem",this.parent);},sync:function(){var map={};this.getAllNodes().forEach(function(node){if(node.id){var item=this.getItem(node.id);if(item){map[node.id]=item;return;}}else{node.id=dojo.dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");map[node.id]={data:data||node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]};},this);this.map=map;return this;},insertNodes:function(data,_2fd,_2fe){if(!this.parent.firstChild){_2fe=null;}else{if(_2fd){if(!_2fe){_2fe=this.parent.firstChild;}}else{if(_2fe){_2fe=_2fe.nextSibling;}}}if(_2fe){for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.insertBefore(t.node,_2fe);}}else{for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.clearItems();this.node=this.parent=this.current=null;},markupFactory:function(_2ff,node){_2ff._skipStartup=true;return new dojo.dnd.Container(node,_2ff);},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}}this.defaultCreator=dojo.dnd._defaultCreator(this.parent);this.sync();},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_300){var _301="dojoDnd"+type;var _302=type.toLowerCase()+"State";dojo.removeClass(this.node,_301+this[_302]);dojo.addClass(this.node,_301+_300);this[_302]=_300;},_addItemClass:function(node,type){dojo.addClass(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){dojo.removeClass(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _303=node.parentNode;_303;node=_303,_303=node.parentNode){if(_303==this.parent&&dojo.hasClass(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator||this.defaultCreator).call(this,item,hint);if(!dojo.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=dojo.dnd.getUniqueId();}dojo.addClass(t.node,"dojoDndItem");return t;}});dojo.dnd._createNode=function(tag){if(!tag){return dojo.dnd._createSpan;}return function(text){return dojo.create(tag,{innerHTML:text});};};dojo.dnd._createTrTd=function(text){var tr=dojo.create("tr");dojo.create("td",{innerHTML:text},tr);return tr;};dojo.dnd._createSpan=function(text){return dojo.create("span",{innerHTML:text});};dojo.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};dojo.dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="tbody"||tag=="thead"?dojo.dnd._createTrTd:dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]);return function(item,hint){var _304=item&&dojo.isObject(item),data,type,n;if(_304&&item.tagName&&item.nodeType&&item.getAttribute){data=item.getAttribute("dndData")||item.innerHTML;type=item.getAttribute("dndType");type=type?type.split(/\s*,\s*/):["text"];n=item;}else{data=(_304&&item.data)?item.data:item;type=(_304&&item.type)?item.type:["text"];n=(hint=="avatar"?dojo.dnd._createSpan:c)(String(data));}if(!n.id){n.id=dojo.dnd.getUniqueId();}return {node:n,data:data,type:type};};};}if(!dojo._hasResource["dojo.dnd.Selector"]){dojo._hasResource["dojo.dnd.Selector"]=true;dojo.provide("dojo.dnd.Selector");dojo.declare("dojo.dnd.Selector",dojo.dnd.Container,{constructor:function(node,_305){if(!_305){_305={};}this.singular=_305.singular;this.autoSync=_305.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(dojo.connect(this.node,"onmousedown",this,"onMouseDown"),dojo.connect(this.node,"onmouseup",this,"onMouseUp"));},singular:false,getSelectedNodes:function(){var t=new dojo.NodeList();var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(dojo.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(dojo.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=dojo.byId(i);this.delItem(i);dojo.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||dojo.global;var s=this.selection,e=dojo.dnd._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){dojo.dnd.Selector.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}dojo.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_306,data,_307,_308){var _309=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_309.call(this,item,hint);if(_306){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};dojo.dnd.Selector.superclass.insertNodes.call(this,data,_307,_308);this._normalizedCreator=_309;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_30a,node){_30a._skipStartup=true;return new dojo.dnd.Selector(node,_30a);},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!dojo.isCopyKey(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(e.button===dojo.mouseButtons.LEFT){dojo.stopEvent(e);}return;}if(!this.singular&&e.shiftKey){if(!dojo.isCopyKey(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0;for(;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(dojo.isCopyKey(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dojo.isCopyKey(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}dojo.stopEvent(e);},onMouseUp:function(e){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(e){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=dojo.connect(this.node,"onmousemove",this,"onMouseMove");},onOutEvent:function(){dojo.disconnect(this.onmousemoveEvent);delete this.onmousemoveEvent;},_removeSelection:function(){var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=dojo.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});}if(!dojo._hasResource["dojo.dnd.Avatar"]){dojo._hasResource["dojo.dnd.Avatar"]=true;dojo.provide("dojo.dnd.Avatar");dojo.declare("dojo.dnd.Avatar",null,{constructor:function(_30b){this.manager=_30b;this.construct();},construct:function(){this.isA11y=dojo.hasClass(dojo.body(),"dijit_a11y");var a=dojo.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_30c=this.manager.source,node,b=dojo.create("tbody",null,a),tr=dojo.create("tr",null,b),td=dojo.create("td",null,tr),icon=this.isA11y?dojo.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td):null,span=dojo.create("span",{innerHTML:_30c.generateText?this._generateText():""},td),k=Math.min(5,this.manager.nodes.length),i=0;dojo.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_30c.creator){node=_30c._normalizedCreator(_30c.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _30d=dojo.create("table"),_30e=dojo.create("tbody",null,_30d);_30e.appendChild(node);node=_30d;}}node.id="";tr=dojo.create("tr",null,b);td=dojo.create("td",null,tr);td.appendChild(node);dojo.attr(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){dojo.destroy(this.node);this.node=false;},update:function(){dojo[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");if(this.isA11y){var icon=dojo.byId("a11yIcon");var text="+";if(this.manager.canDropFlag&&!this.manager.copy){text="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){text="o";}else{if(!this.manager.canDropFlag){text="x";}}}icon.innerHTML=text;}dojo.query(("tr.dojoDndAvatarHeader td span"+(this.isA11y?" span":"")),this.node).forEach(function(node){node.innerHTML=this._generateText();},this);},_generateText:function(){return this.manager.nodes.length.toString();}});}if(!dojo._hasResource["dojo.dnd.Manager"]){dojo._hasResource["dojo.dnd.Manager"]=true;dojo.provide("dojo.dnd.Manager");dojo.declare("dojo.dnd.Manager",null,{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:16,OFFSET_Y:16,overSource:function(_30f){if(this.avatar){this.target=(_30f&&_30f.targetState!="Disabled")?_30f:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}dojo.publish("/dnd/source/over",[_30f]);},outSource:function(_310){if(this.avatar){if(this.target==_310){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_311,_312,copy){this.source=_311;this.nodes=_312;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_311,_312,this.copy]);this.events=[dojo.connect(dojo.doc,"onmousemove",this,"onMouseMove"),dojo.connect(dojo.doc,"onmouseup",this,"onMouseUp"),dojo.connect(dojo.doc,"onkeydown",this,"onKeyDown"),dojo.connect(dojo.doc,"onkeyup",this,"onKeyUp"),dojo.connect(dojo.doc,"ondragstart",dojo.stopEvent),dojo.connect(dojo.body(),"onselectstart",dojo.stopEvent)];var c="dojoDnd"+(copy?"Copy":"Move");dojo.addClass(dojo.body(),c);},canDrop:function(flag){var _313=Boolean(this.target&&flag);if(this.canDropFlag!=_313){this.canDropFlag=_313;this.avatar.update();}},stopDrag:function(){dojo.removeClass(dojo.body(),"dojoDndCopy");dojo.removeClass(dojo.body(),"dojoDndMove");dojo.forEach(this.events,dojo.disconnect);this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new dojo.dnd.Avatar(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){dojo.dnd.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var copy=Boolean(this.source.copyState(dojo.isCopyKey(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(dojo.isCopyKey(e))),_314=[this.source,this.nodes,copy,this.target,e];dojo.publish("/dnd/drop/before",_314);dojo.publish("/dnd/drop",_314);}else{dojo.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case dojo.keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case dojo.keys.ESCAPE:dojo.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==dojo.keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();dojo.removeClass(dojo.body(),"dojoDnd"+(this.copy?"Move":"Copy"));dojo.addClass(dojo.body(),"dojoDnd"+(this.copy?"Copy":"Move"));}});dojo.dnd._manager=null;dojo.dnd.manager=function(){if(!dojo.dnd._manager){dojo.dnd._manager=new dojo.dnd.Manager();}return dojo.dnd._manager;};}if(!dojo._hasResource["dojo.dnd.Source"]){dojo._hasResource["dojo.dnd.Source"]=true;dojo.provide("dojo.dnd.Source");dojo.declare("dojo.dnd.Source",dojo.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(node,_315){dojo.mixin(this,dojo.mixin({},_315));var type=this.accept;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){dojo.addClass(this.node,"dojoDndSource");}this.targetState="";if(this.accept){dojo.addClass(this.node,"dojoDndTarget");}if(this.horizontal){dojo.addClass(this.node,"dojoDndHorizontal");}this.topics=[dojo.subscribe("/dnd/source/over",this,"onDndSourceOver"),dojo.subscribe("/dnd/start",this,"onDndStart"),dojo.subscribe("/dnd/drop",this,"onDndDrop"),dojo.subscribe("/dnd/cancel",this,"onDndCancel")];},checkAcceptance:function(_316,_317){if(this==_316){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_317.length;++i){var type=_316.getItem(_317[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_318,self){if(_318){return true;}if(arguments.length<2){self=this==dojo.dnd.manager().target;}if(self){if(this.copyOnly){return this.selfCopy;}}else{return this.copyOnly;}return false;},destroy:function(){dojo.dnd.Source.superclass.destroy.call(this);dojo.forEach(this.topics,dojo.unsubscribe);this.targetAnchor=null;},markupFactory:function(_319,node){_319._skipStartup=true;return new dojo.dnd.Source(node,_319);},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}dojo.dnd.Source.superclass.onMouseMove.call(this,e);var m=dojo.dnd.manager();if(!this.isDragging){if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _31a=this.getSelectedNodes();if(_31a.length){m.startDrag(this,_31a,this.copyState(dojo.isCopyKey(e),true));}}}if(this.isDragging){var _31b=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=dojo.position(this.current,true);}if(this.horizontal){_31b=(e.pageX-this.targetBox.x)<(this.targetBox.w/2);}else{_31b=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_31b!=this.before){this._markTargetAnchor(_31b);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}},onMouseDown:function(e){if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){this.mouseDown=true;this._lastX=e.pageX;this._lastY=e.pageY;dojo.dnd.Source.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;dojo.dnd.Source.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_31c){if(this!=_31c){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=dojo.dnd.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_31d,_31e,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_31d?(copy?"Copied":"Moved"):"");}var _31f=this.accept&&this.checkAcceptance(_31d,_31e);this._changeState("Target",_31f?"":"Disabled");if(this==_31d){dojo.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_320,_321,copy,_322){if(this==_322){this.onDrop(_320,_321,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_323,_324,copy){if(this!=_323){this.onDropExternal(_323,_324,copy);}else{this.onDropInternal(_324,copy);}},onDropExternal:function(_325,_326,copy){var _327=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _327.call(this,_325.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_325.getItem(node.id);var n=node.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node,hint){var t=_325.getItem(node.id);_325.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_325.selectNone();}this.insertNodes(true,_326,this.before,this.current);if(!copy&&this.creator){_325.deleteSelectedNodes();}this._normalizedCreator=_327;},onDropInternal:function(_328,copy){var _329=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _329.call(this,this.getItem(node.id).data,hint);};}else{this._normalizedCreator=function(node,hint){var t=this.getItem(node.id);var n=node.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}}else{if(!this.current){return;}this._normalizedCreator=function(node,hint){var t=this.getItem(node.id);return {node:node,data:t.data,type:t.type};};}this._removeSelection();this.insertNodes(true,_328,this.before,this.current);this._normalizedCreator=_329;},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){dojo.dnd.Source.superclass.onOverEvent.call(this);dojo.dnd.manager().overSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOver();}},onOutEvent:function(){dojo.dnd.Source.superclass.onOutEvent.call(this);dojo.dnd.manager().outSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOut();}},_markTargetAnchor:function(_32a){if(this.current==this.targetAnchor&&this.before==_32a){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_32a;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(!dojo.mouseButtons.isLeft(e)){return false;}if(!this.withHandles){return true;}for(var node=e.target;node&&node!==this.node;node=node.parentNode){if(dojo.hasClass(node,"dojoDndHandle")){return true;}if(dojo.hasClass(node,"dojoDndItem")||dojo.hasClass(node,"dojoDndIgnore")){break;}}return false;}});dojo.declare("dojo.dnd.Target",dojo.dnd.Source,{constructor:function(node,_32b){this.isSource=false;dojo.removeClass(this.node,"dojoDndSource");},markupFactory:function(_32c,node){_32c._skipStartup=true;return new dojo.dnd.Target(node,_32c);}});dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(node,_32d){this.autoSync=true;},markupFactory:function(_32e,node){_32e._skipStartup=true;return new dojo.dnd.AutoSource(node,_32e);}});}if(!dojo._hasResource["dojox.grid._View"]){dojo._hasResource["dojox.grid._View"]=true;dojo.provide("dojox.grid._View");(function(){var _32f=function(_330,_331){return _330.style.cssText==undefined?_330.getAttribute("style"):_330.style.cssText;};dojo.declare("dojox.grid._View",[dijit._Widget,dijit._Templated],{defaultWidth:"18em",viewWidth:"",templateString:"<div class=\"dojoxGridView\" wairole=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" wairole=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" wairole=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" wairole=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" wairole=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" wairole=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" wairole=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" wairole=\"presentation\"></div>\n\t</div>\n</div>\n",themeable:false,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:dojox.grid._HeaderBuilder,_contentBuilderClass:dojox.grid._ContentBuilder,postMixInProperties:function(){this.rowNodes={};},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");dojox.grid.util.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);dojox.grid.util.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!dojo._isBodyLtr()){this.headerNodeContainer.style.width="";}},destroy:function(){dojo.destroy(this.headerNode);delete this.headerNode;for(var i in this.rowNodes){dojo.destroy(this.rowNodes[i]);}this.rowNodes={};if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(dojo.isIE||dojo.isWebKit||dojo.isOpera){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_332){var vs=(this.structure=_332);if(vs.width&&!isNaN(vs.width)){this.viewWidth=vs.width+"em";}else{this.viewWidth=vs.width||(vs.noscroll?"auto":this.viewWidth);}this._onBeforeRow=vs.onBeforeRow||function(){};this._onAfterRow=vs.onAfterRow||function(){};this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},_cleanupRowWidgets:function(_333){if(_333){dojo.forEach(dojo.query("[widgetId]",_333).map(dijit.byNode),function(w){if(w._destroyOnRemove){w.destroy();delete w;}else{if(w.domNode&&w.domNode.parentNode){w.domNode.parentNode.removeChild(w.domNode);}}});}},onBeforeRow:function(_334,_335){this._onBeforeRow(_334,_335);if(_334>=0){this._cleanupRowWidgets(this.getRowNode(_334));}},onAfterRow:function(_336,_337,_338){this._onAfterRow(_336,_337,_338);var g=this.grid;dojo.forEach(dojo.query(".dojoxGridStubNode",_338),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _339=window.parseInt(dojo.attr(n,"cellIdx"),10);var _33a=g.getCell(_339);var w=dijit.byId(lw);if(w){n.parentNode.replaceChild(w.domNode,n);if(!w._started){w.startup();}}else{n.innerHTML="";}}},this);},testFlexCells:function(){this.flexCells=false;for(var j=0,row;(row=this.structure.cells[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.view=this;this.flexCells=this.flexCells||cell.isFlex();}}return this.flexCells;},updateStructure:function(){this.header.update();this.content.update();},getScrollbarWidth:function(){var _33b=this.hasVScrollbar();var _33c=dojo.style(this.scrollboxNode,"overflow");if(this.noscroll||!_33c||_33c=="hidden"){_33b=false;}else{if(_33c=="scroll"){_33b=true;}}return (_33b?dojox.html.metrics.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?h.firstChild.offsetWidth:0;},setColumnsWidth:function(_33d){this.headerContentNode.firstChild.style.width=_33d+"px";if(this.viewWidth){this.viewWidth=_33d+"px";}},getWidth:function(){return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";},getContentWidth:function(){return Math.max(0,dojo._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1;}var _33e=this.grid.layout.cells;var _33f=dojo.hitch(this,function(node,_340){!dojo._isBodyLtr()&&(_340=!_340);var inc=_340?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_33e[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_33e[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _341="dojoxGrid_bottomMarker";var _342="dojoxGrid_topMarker";if(this.bottomMarker){dojo.destroy(this.bottomMarker);}this.bottomMarker=dojo.byId(_341);if(this.topMarker){dojo.destroy(this.topMarker);}this.topMarker=dojo.byId(_342);if(!this.bottomMarker){this.bottomMarker=dojo.create("div",{"id":_341,"class":"dojoxGridColPlaceBottom"},dojo.body());this._hide(this.bottomMarker);this.topMarker=dojo.create("div",{"id":_342,"class":"dojoxGridColPlaceTop"},dojo.body());this._hide(this.topMarker);}this.arrowDim=dojo.contentBox(this.bottomMarker);var _343=dojo.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new dojo.dnd.Source(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:dojo.hitch(this,function(e){this.header.decorateEvent(e);if((this.header.overRightResizeArea(e)||this.header.overLeftResizeArea(e))&&this.header.canResize(e)&&!this.header.moveable){this.header.beginColumnResize(e);}else{if(this.grid.headerMenu){this.grid.headerMenu.onCancel(true);}if(e.button===(dojo.isIE?1:0)){dojo.dnd.Source.prototype.onMouseDown.call(this.source,e);}}}),onMouseOver:dojo.hitch(this,function(e){var src=this.source;if(src._getChildByEvent(e)){dojo.dnd.Source.prototype.onMouseOver.apply(src,arguments);}}),_markTargetAnchor:dojo.hitch(this,function(_344){var src=this.source;if(src.current==src.targetAnchor&&src.before==_344){return;}if(src.targetAnchor&&_33f(src.targetAnchor,src.before)){src._removeItemClass(_33f(src.targetAnchor,src.before),src.before?"After":"Before");}dojo.dnd.Source.prototype._markTargetAnchor.call(src,_344);var _345=_344?src.targetAnchor:_33f(src.targetAnchor,src.before);var _346=0;if(!_345){_345=src.targetAnchor;_346=dojo.contentBox(_345).w+this.arrowDim.w/2+2;}var pos=(dojo.position||dojo._abs)(_345,true);var left=Math.floor(pos.x-this.arrowDim.w/2+_346);dojo.style(this.bottomMarker,"visibility","visible");dojo.style(this.topMarker,"visibility","visible");dojo.style(this.bottomMarker,{"left":left+"px","top":(_343+pos.y)+"px"});dojo.style(this.topMarker,{"left":left+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_33f(src.targetAnchor,src.before)){src._addItemClass(_33f(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:dojo.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_33f(src.targetAnchor,src.before)){src._removeItemClass(_33f(src.targetAnchor,src.before),src.before?"After":"Before");}this._hide(this.bottomMarker);this._hide(this.topMarker);dojo.dnd.Source.prototype._unmarkTargetAnchor.call(src);}),destroy:dojo.hitch(this,function(){dojo.disconnect(this._source_conn);dojo.unsubscribe(this._source_sub);dojo.dnd.Source.prototype.destroy.call(this.source);if(this.bottomMarker){dojo.destroy(this.bottomMarker);delete this.bottomMarker;}if(this.topMarker){dojo.destroy(this.topMarker);delete this.topMarker;}}),onDndCancel:dojo.hitch(this,function(){dojo.dnd.Source.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker);})});this._source_conn=dojo.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=dojo.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_hide:function(node){dojo.style(node,{left:"-10000px",top:"-10000px","visibility":"hidden"});},_onDndDropBefore:function(_347,_348,copy){if(dojo.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _349=this.grid.views.views;var _34a=_349[_347.viewIndex];var _34b=_349[this.index];if(_34b!=_34a){_34a.convertColPctToFixed();_34b.convertColPctToFixed();}},_onDndDrop:function(_34c,_34d,copy){if(dojo.dnd.manager().target!==this.source){if(dojo.dnd.manager().source===this.source){this._removingColumn=true;}return;}this._hide(this.bottomMarker);this._hide(this.topMarker);var _34e=function(n){return n?dojo.attr(n,"idx"):null;};var w=dojo.marginBox(_34d[0]).w;if(_34c.viewIndex!==this.index){var _34f=this.grid.views.views;var _350=_34f[_34c.viewIndex];var _351=_34f[this.index];if(_350.viewWidth&&_350.viewWidth!="auto"){_350.setColumnsWidth(_350.getColumnsWidth()-w);}if(_351.viewWidth&&_351.viewWidth!="auto"){_351.setColumnsWidth(_351.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!dojo._isBodyLtr()&&(stb=!stb);var _352=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_352.moveColumn(_34c.viewIndex,idx,_34e(_34d[0]),_34e(stn),stb);},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}dojox.grid.util.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode]);},_getHeaderContent:function(_353){var n=_353.name||_353.grid.getCellName(_353);var ret=["<div class=\"dojoxGridSortNode"];if(_353.index!=_353.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_353.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_353.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\"presentation\"></div>","<div class=\"dojoxGridColCaption\">"]);}ret=ret.concat([n,"</div></div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_354){var _355=this._hasHScroll||false;if(this._hasHScroll==undefined||_354){if(this.noscroll){this._hasHScroll=false;}else{var _356=dojo.style(this.scrollboxNode,"overflow");if(_356=="hidden"){this._hasHScroll=false;}else{if(_356=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_355!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_357){var _358=this._hasVScroll||false;if(this._hasVScroll==undefined||_357){if(this.noscroll){this._hasVScroll=false;}else{var _359=dojo.style(this.scrollboxNode,"overflow");if(_359=="hidden"){this._hasVScroll=false;}else{if(_359=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_358!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _35a=false;this.grid.initialWidth="";var _35b=dojo.query("th",this.headerContentNode);var _35c=dojo.map(_35b,function(c,vIdx){var w=c.style.width;dojo.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_35a=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return dojo.contentBox(c).w;});if(_35a){dojo.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _35d=cell.view.getHeaderCellNode(cell.index);if(_35d&&dojo.hasAttr(_35d,"vIdx")){var vIdx=window.parseInt(dojo.attr(_35d,"vIdx"));this.setColWidth(idx,_35c[vIdx]);dojo.removeAttr(_35d,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_35e){if(!this.grid._autoHeight){var h=(this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10))||this.domNode.clientHeight;var self=this;var _35f=function(){var v;for(var i in self.grid.views.views){v=self.grid.views.views[i];if(v!==self&&v.hasHScrollbar()){return true;}}return false;};if(_35e||(this.noscroll&&_35f())){h-=dojox.html.metrics.getScrollbar().h;}dojox.grid.util.setStyleHeightPx(this.scrollboxNode,h);}this.hasVScrollbar(true);},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();if(!this._removingColumn){w=Math.max(w,this.getColumnsWidth())+"px";}else{w=Math.min(w,this.getColumnsWidth())+"px";this._removingColumn=false;}var cn=this.contentNode;cn.style.width=w;this.hasHScrollbar(true);},setSize:function(w,h){var ds=this.domNode.style;var hs=this.headerNode.style;if(w){ds.width=w;hs.width=w;}ds.height=(h>=0?h+"px":"");},renderRow:function(_360){var _361=this.createRowNode(_360);this.buildRow(_360,_361);this.grid.edit.restore(this,_360);return _361;},createRowNode:function(_362){var node=document.createElement("div");node.className=this.classTag+"Row";if(this instanceof dojox.grid._RowSelector){dojo.attr(node,"role","presentation");}else{dojo.attr(node,"role","row");if(this.grid.selectionMode!="none"){dojo.attr(node,"aria-selected","false");}}node[dojox.grid.util.gridViewTag]=this.id;node[dojox.grid.util.rowIndexTag]=_362;this.rowNodes[_362]=node;return node;},buildRow:function(_363,_364){this.buildRowContent(_363,_364);this.styleRow(_363,_364);},buildRowContent:function(_365,_366){_366.innerHTML=this.content.generateHtml(_365,_365);if(this.flexCells&&this.contentWidth){_366.firstChild.style.width=this.contentWidth;}dojox.grid.util.fire(this,"onAfterRow",[_365,this.structure.cells,_366]);},rowRemoved:function(_367){if(_367>=0){this._cleanupRowWidgets(this.getRowNode(_367));}this.grid.edit.save(this,_367);delete this.rowNodes[_367];},getRowNode:function(_368){return this.rowNodes[_368];},getCellNode:function(_369,_36a){var row=this.getRowNode(_369);if(row){return this.content.getCellNode(row,_36a);}},getHeaderCellNode:function(_36b){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_36b);}},styleRow:function(_36c,_36d){_36d._style=_32f(_36d);this.styleRowNode(_36c,_36d);},styleRowNode:function(_36e,_36f){if(_36f){this.doStyleRowNode(_36e,_36f);}},doStyleRowNode:function(_370,_371){this.grid.styleRowNode(_370,_371);},updateRow:function(_372){var _373=this.getRowNode(_372);if(_373){_373.style.height="";this.buildRow(_372,_373);}return _373;},updateRowStyles:function(_374){this.styleRowNode(_374,this.getRowNode(_374));},lastTop:0,firstScroll:0,doscroll:function(_375){var _376=dojo._isBodyLtr();if(this.firstScroll<2){if((!_376&&this.firstScroll==1)||(_376&&this.firstScroll===0)){var s=dojo.marginBox(this.headerNodeContainer);if(dojo.isIE){this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";}else{if(dojo.isMoz){this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=_376?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;}}}this.firstScroll++;}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;var top=this.scrollboxNode.scrollTop;if(top!==this.lastTop){this.grid.scrollTo(top);}},setScrollTop:function(_377){this.lastTop=_377;this.scrollboxNode.scrollTop=_377;return this.scrollboxNode.scrollTop;},doContentEvent:function(e){if(this.content.decorateEvent(e)){this.grid.onContentEvent(e);}},doHeaderEvent:function(e){if(this.header.decorateEvent(e)){this.grid.onHeaderEvent(e);}},dispatchContentEvent:function(e){return this.content.dispatchEvent(e);},dispatchHeaderEvent:function(e){return this.header.dispatchEvent(e);},setColWidth:function(_378,_379){this.grid.setCellWidth(_378,_379+"px");},update:function(){if(!this.domNode){return;}this.content.update();this.grid.update();var left=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=left;this.headerNode.scrollLeft=left;}});dojo.declare("dojox.grid._GridAvatar",dojo.dnd.Avatar,{construct:function(){var dd=dojo.doc;var a=dd.createElement("table");a.cellPadding=a.cellSpacing="0";a.className="dojoxGridDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dd.createElement("tbody");var tr=dd.createElement("tr");var td=dd.createElement("td");var img=dd.createElement("td");tr.className="dojoxGridDndAvatarItem";img.className="dojoxGridDndAvatarItemImage";img.style.width="16px";var _37a=this.manager.source,node;if(_37a.creator){node=_37a._normalizedCreator(_37a.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);var _37b,_37c;if(node.tagName.toLowerCase()=="tr"){_37b=dd.createElement("table");_37c=dd.createElement("tbody");_37c.appendChild(node);_37b.appendChild(_37c);node=_37b;}else{if(node.tagName.toLowerCase()=="th"){_37b=dd.createElement("table");_37c=dd.createElement("tbody");var r=dd.createElement("tr");_37b.cellPadding=_37b.cellSpacing="0";r.appendChild(node);_37c.appendChild(r);_37b.appendChild(_37c);node=_37b;}}}node.id="";td.appendChild(node);tr.appendChild(img);tr.appendChild(td);dojo.style(tr,"opacity",0.9);b.appendChild(tr);a.appendChild(b);this.node=a;var m=dojo.dnd.manager();this.oldOffsetY=m.OFFSET_Y;m.OFFSET_Y=1;},destroy:function(){dojo.dnd.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments);}});var _37d=dojo.dnd.manager().makeAvatar;dojo.dnd.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined&&!dojo.hasClass(dojo.body(),"dijit_a11y")){return new dojox.grid._GridAvatar(this);}return _37d.call(dojo.dnd.manager());};})();}if(!dojo._hasResource["dojox.grid._RowSelector"]){dojo._hasResource["dojox.grid._RowSelector"]=true;dojo.provide("dojox.grid._RowSelector");dojo.declare("dojox.grid._RowSelector",dojox.grid._View,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden";},getWidth:function(){return this.viewWidth||this.defaultWidth;},buildRowContent:function(_37e,_37f){var w=this.contentWidth||0;_37f.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){if(!("contentWidth" in this)&&this.contentNode){this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth;}},doStyleRowNode:function(_380,_381){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_380)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_380)){n.push("dojoxGridRowbarSelected");}_381.className=n.join(" ");},domouseover:function(e){this.grid.onMouseOverRow(e);},domouseout:function(e){if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}});}if(!dojo._hasResource["dojox.grid._Layout"]){dojo._hasResource["dojox.grid._Layout"]=true;dojo.provide("dojox.grid._Layout");dojo.declare("dojox.grid._Layout",null,{constructor:function(_382){this.grid=_382;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_383,_384,_385,_386,_387){var _388=this.structure[_383].cells[0];var _389=this.structure[_384].cells[0];var cell=null;var _38a=0;var _38b=0;for(var i=0,c;c=_388[i];i++){if(c.index==_385){_38a=i;break;}}cell=_388.splice(_38a,1)[0];cell.view=this.grid.views.views[_384];for(i=0,c=null;c=_389[i];i++){if(c.index==_386){_38b=i;break;}}if(!_387){_38b+=1;}_389.splice(_38b,0,cell);var _38c=this.grid.getCell(this.grid.getSortIndex());if(_38c){_38c._currentlySorted=this.grid.getSortAsc();}this.cells=[];_385=0;var v;for(i=0;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0;c=cs[k];k++){c.index=_385;this.cells.push(c);if("_currentlySorted" in c){var si=_385+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_385++;}}}this.grid.setupHeaderMenu();},setColumnVisibility:function(_38d,_38e){var cell=this.cells[_38d];if(cell.hidden==_38e){cell.hidden=!_38e;var v=cell.view,w=v.viewWidth;if(w&&w!="auto"){v._togglingColumn=dojo.marginBox(cell.getHeaderNode()).w||0;}v.update();return true;}else{return false;}},addCellDef:function(_38f,_390,_391){var self=this;var _392=function(_393){var w=0;if(_393.colSpan>1){w=0;}else{w=_393.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _394={grid:this.grid,subrow:_38f,layoutIndex:_390,index:this.cells.length};if(_391&&_391 instanceof dojox.grid.cells._Base){var _395=dojo.clone(_391);_394.unitWidth=_392(_395._props);_395=dojo.mixin(_395,this._defaultCellProps,_391._props,_394);return _395;}var _396=_391.type||this._defaultCellProps.type||dojox.grid.cells.Cell;_394.unitWidth=_392(_391);return new _396(dojo.mixin({},this._defaultCellProps,_391,_394));},addRowDef:function(_397,_398){var _399=[];var _39a=0,_39b=0,_39c=true;for(var i=0,def,cell;(def=_398[i]);i++){cell=this.addCellDef(_397,i,def);_399.push(cell);this.cells.push(cell);if(_39c&&cell.relWidth){_39a+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_39b+=window.parseInt(w,10);}else{if(w=="auto"){_39c=false;}}}}}if(_39a&&_39c){dojo.forEach(_399,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_39a)*(100-_39b))+"%";}});}return _399;},addRowsDef:function(_39d){var _39e=[];if(dojo.isArray(_39d)){if(dojo.isArray(_39d[0])){for(var i=0,row;_39d&&(row=_39d[i]);i++){_39e.push(this.addRowDef(i,row));}}else{_39e.push(this.addRowDef(0,_39d));}}return _39e;},addViewDef:function(_39f){this._defaultCellProps=_39f.defaultCell||{};if(_39f.width&&_39f.width=="auto"){delete _39f.width;}return dojo.mixin({},_39f,{cells:this.addRowsDef(_39f.rows||_39f.cells)});},setStructure:function(_3a0){this.fieldIndex=0;this.cells=[];var s=this.structure=[];if(this.grid.rowSelector){var sel={type:dojox._scopeName+".grid._RowSelector"};if(dojo.isString(this.grid.rowSelector)){var _3a1=this.grid.rowSelector;if(_3a1=="false"){sel=null;}else{if(_3a1!="true"){sel["width"]=_3a1;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _3a2=function(def){return ("name" in def||"field" in def||"get" in def);};var _3a3=function(def){if(dojo.isArray(def)){if(dojo.isArray(def[0])||_3a2(def[0])){return true;}}return false;};var _3a4=function(def){return (def!==null&&dojo.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_3a2(def))));};if(dojo.isArray(_3a0)){var _3a5=false;for(var i=0,st;(st=_3a0[i]);i++){if(_3a4(st)){_3a5=true;break;}}if(!_3a5){s.push(this.addViewDef({cells:_3a0}));}else{for(i=0;(st=_3a0[i]);i++){if(_3a3(st)){s.push(this.addViewDef({cells:st}));}else{if(_3a4(st)){s.push(this.addViewDef(st));}}}}}else{if(_3a4(_3a0)){s.push(this.addViewDef(_3a0));}}this.cellCount=this.cells.length;this.grid.setupHeaderMenu();}});}if(!dojo._hasResource["dojox.grid._ViewManager"]){dojo._hasResource["dojox.grid._ViewManager"]=true;dojo.provide("dojox.grid._ViewManager");dojo.declare("dojox.grid._ViewManager",null,{constructor:function(_3a6){this.grid=_3a6;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_3a7){_3a7.idx=this.views.length;this.views.push(_3a7);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _3a8=[];for(var i=0,v;v=this.views[i];i++){_3a8.push(v.contentNode);}return _3a8;},forEach:function(_3a9){for(var i=0,v;v=this.views[i];i++){_3a9(v,i);}},onEach:function(_3aa,_3ab){_3ab=_3ab||[];for(var i=0,v;v=this.views[i];i++){if(_3aa in v){v[_3aa].apply(v,_3ab);}}},normalizeHeaderNodeHeight:function(){var _3ac=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_3ac.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_3ac);},normalizeRowNodeHeights:function(_3ad){var h=0;var _3ae=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_3ad.length<=1){return;}for(var i=0,n;(n=_3ad[i]);i++){if(!dojo.hasClass(n,"dojoxGridNonNormalizedCell")){_3ae[i]=n.firstChild.offsetHeight;h=Math.max(h,_3ae[i]);}}h=(h>=0?h:0);if(dojo.isMoz&&h){h++;}}for(i=0;(n=_3ad[i]);i++){if(_3ae[i]!=h){n.firstChild.style.height=h+"px";}}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_3af){var _3b0=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_3af));i++){n.firstChild.style.height="";_3b0.push(n);}this.normalizeRowNodeHeights(_3b0);},getViewWidth:function(_3b1){return this.views[_3b1].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_3b2){_3b2.headerContentNode.style.height="";});var h=0;this.forEach(function(_3b3){h=Math.max(_3b3.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_3b4){h=Math.max(_3b4.domNode.offsetHeight,h);});return h;},findClient:function(_3b5){var c=this.grid.elasticView||-1;if(c<0){for(var i=1,v;(v=this.views[i]);i++){if(v.viewWidth){for(i=1;(v=this.views[i]);i++){if(!v.viewWidth){c=i;break;}}break;}}}if(c<0){c=Math.floor(this.views.length/2);}return c;},arrange:function(l,w){var i,v,vw,len=this.views.length;var c=(w<=0?len:this.findClient());var _3b6=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!dojo._isBodyLtr()){ds.right=l+"px";if(dojo.isMoz){hs.right=l+v.getScrollbarWidth()+"px";hs.width=parseInt(hs.width,10)-v.getScrollbarWidth()+"px";}else{hs.right=l+"px";}}else{ds.left=l+"px";hs.left=l+"px";}ds.top=0+"px";hs.top=0;};for(i=0;(v=this.views[i])&&(i<c);i++){vw=this.getViewWidth(i);v.setSize(vw,0);_3b6(v,l);if(v.headerContentNode&&v.headerContentNode.firstChild){vw=v.getColumnsWidth()+v.getScrollbarWidth();}else{vw=v.domNode.offsetWidth;}l+=vw;}i++;var r=w;for(var j=len-1;(v=this.views[j])&&(i<=j);j--){vw=this.getViewWidth(j);v.setSize(vw,0);vw=v.domNode.offsetWidth;r-=vw;_3b6(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_3b6(v,l);}return l;},renderRow:function(_3b7,_3b8,_3b9){var _3ba=[];for(var i=0,v,n,_3bb;(v=this.views[i])&&(n=_3b8[i]);i++){_3bb=v.renderRow(_3b7);n.appendChild(_3bb);_3ba.push(_3bb);}if(!_3b9){this.normalizeRowNodeHeights(_3ba);}},rowRemoved:function(_3bc){this.onEach("rowRemoved",[_3bc]);},updateRow:function(_3bd,_3be){for(var i=0,v;v=this.views[i];i++){v.updateRow(_3bd);}if(!_3be){this.renormalizeRow(_3bd);}},updateRowStyles:function(_3bf){this.onEach("updateRowStyles",[_3bf]);},setScrollTop:function(_3c0){var top=_3c0;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_3c0);if(dojo.isIE&&v.headerNode&&v.scrollboxNode){v.headerNode.scrollLeft=v.scrollboxNode.scrollLeft;}}return top;},getFirstScrollingView:function(){for(var i=0,v;(v=this.views[i]);i++){if(v.hasHScrollbar()||v.hasVScrollbar()){return v;}}return null;}});}if(!dojo._hasResource["dojox.grid._RowManager"]){dojo._hasResource["dojox.grid._RowManager"]=true;dojo.provide("dojox.grid._RowManager");(function(){var _3c1=function(_3c2,_3c3){if(_3c2.style.cssText==undefined){_3c2.setAttribute("style",_3c3);}else{_3c2.style.cssText=_3c3;}};dojo.declare("dojox.grid._RowManager",null,{constructor:function(_3c4){this.grid=_3c4;},linesToEms:2,overRow:-2,prepareStylingRow:function(_3c5,_3c6){return {index:_3c5,node:_3c6,odd:Boolean(_3c5&1),selected:!!this.grid.selection.isSelected(_3c5),over:this.isOver(_3c5),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_3c7,_3c8){var row=this.prepareStylingRow(_3c7,_3c8);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_3c9){var i=_3c9;i.node.className=i.customClasses;var h=i.node.style.height;_3c1(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_3ca){this.grid.updateRowStyles(_3ca);},setOverRow:function(_3cb){var last=this.overRow;this.overRow=_3cb;if((last!=this.overRow)&&(dojo.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_3cc){return (this.overRow==_3cc&&!dojo.hasClass(this.grid.domNode,"dojoxGridColumnResizing"));}});})();}if(!dojo._hasResource["dojox.grid._FocusManager"]){dojo._hasResource["dojox.grid._FocusManager"]=true;dojo.provide("dojox.grid._FocusManager");dojo.declare("dojox.grid._FocusManager",null,{constructor:function(_3cd){this.grid=_3cd;this.cell=null;this.rowIndex=-1;this._connects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(dojo.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(dojo.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(dojo.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(dojo.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(dojo.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(dojo.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(dojo.connect(this.grid,"postrender",this,"_delayedHeaderFocus"));},destroy:function(){dojo.forEach(this._connects,dojo.disconnect);delete this.grid;delete this.cell;},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView;this._initColumnHeaders();},isFocusCell:function(_3ce,_3cf){return (this.cell==_3ce)&&(this.rowIndex==_3cf);},isLastFocusCell:function(){if(this.cell){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);}return false;},isFirstFocusCell:function(){if(this.cell){return (this.rowIndex===0)&&(this.cell.index===0);}return false;},isNoFocusCell:function(){return (this.rowIndex<0)||!this.cell;},isNavHeader:function(){return (!!this._colHeadNode);},getHeaderIndex:function(){if(this._colHeadNode){return dojo.indexOf(this._findHeaderCells(),this._colHeadNode);}else{return -1;}},_focusifyCellNode:function(_3d0){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){dojo.toggleClass(n,this.focusClass,_3d0);if(_3d0){var sl=this.scrollIntoView();try{if(!this.grid.edit.isEditing()){dojox.grid.util.fire(n,"focus");if(sl){this.cell.view.scrollboxNode.scrollLeft=sl;}}}catch(e){}}}},_delayedCellFocus:function(){if(this.isNavHeader()||!this.grid._focused){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){dojo.toggleClass(n,this.focusClass,true);this.blurHeader();dojox.grid.util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();this.grid.domNode.focus();}},_initColumnHeaders:function(){var _3d1=this._findHeaderCells();for(var i=0;i<_3d1.length;i++){this._connects.push(dojo.connect(_3d1[i],"onfocus",this,"doColHeaderFocus"));this._connects.push(dojo.connect(_3d1[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _3d2=dojo.query("th",this.grid.viewsHeaderNode);var _3d3=[];for(var i=0;i<_3d2.length;i++){var _3d4=_3d2[i];var _3d5=dojo.hasAttr(_3d4,"tabIndex");var _3d6=dojo.attr(_3d4,"tabIndex");if(_3d5&&_3d6<0){_3d3.push(_3d4);}}return _3d3;},_setActiveColHeader:function(_3d7,_3d8,_3d9){dojo.attr(this.grid.domNode,"aria-activedescendant",_3d7.id);if(_3d9!=null&&_3d9>=0&&_3d9!=_3d8){dojo.toggleClass(this._findHeaderCells()[_3d9],this.focusClass,false);}dojo.toggleClass(_3d7,this.focusClass,true);this._colHeadNode=_3d7;this._colHeadFocusIdx=_3d8;this._scrollHeader(this._colHeadFocusIdx);},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info||!info.s){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);if(info.n&&info.sr){if(info.n.offsetLeft+info.n.offsetWidth>info.sr.l+info.sr.w){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}}}if(info.r&&info.sr){if(rt+info.r.offsetHeight>info.sr.t+info.sr.h){this.grid.setScrollTop(rt+info.r.offsetHeight-info.sr.h);}else{if(rt<info.sr.t){this.grid.setScrollTop(rt);}}}return info.s.scrollLeft;},_scrollInfo:function(cell,_3da){if(cell){var cl=cell,sbn=cl.view.scrollboxNode,sbnr={w:sbn.clientWidth,l:sbn.scrollLeft,t:sbn.scrollTop,h:sbn.clientHeight},rn=cl.view.getRowNode(this.rowIndex);return {c:cl,s:sbn,sr:sbnr,n:(_3da?_3da:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_3db){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_3db);info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _3dc=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_3dc){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}else{if(dojo.isIE<=7&&cell&&cell.view.headerNode){cell.view.headerNode.scrollLeft=info.s.scrollLeft;}}}}},_isHeaderHidden:function(){var _3dd=this.focusView;if(!_3dd){for(var i=0,_3de;(_3de=this.grid.views.views[i]);i++){if(_3de.headerNode){_3dd=_3de;break;}}}return (_3dd&&dojo.getComputedStyle(_3dd.headerNode).display=="none");},colSizeAdjust:function(e,_3df,_3e0){var _3e1=this._findHeaderCells();var view=this.focusView;if(!view){for(var i=0,_3e2;(_3e2=this.grid.views.views[i]);i++){if(_3e2.header.tableMap.map){view=_3e2;break;}}}var _3e3=_3e1[_3df];if(!view||(_3df==_3e1.length-1&&_3df===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_3e3;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _3e4={l:_3e0};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_3e4);view.update();}},styleRow:function(_3e5){return;},setFocusIndex:function(_3e6,_3e7){this.setFocusCell(this.grid.getCell(_3e7),_3e6);},setFocusCell:function(_3e8,_3e9){if(_3e8&&!this.isFocusCell(_3e8,_3e9)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_3e8;this.rowIndex=_3e9;this._focusifyCellNode(true);}if(dojo.isOpera){setTimeout(dojo.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);}else{this.grid.onCellFocus(this.cell,this.rowIndex);}},next:function(){if(this.cell){var row=this.rowIndex,col=this.cell.index+1,cc=this.grid.layout.cellCount-1,rc=this.grid.rowCount-1;if(col>cc){col=0;row++;}if(row>rc){col=cc;row=rc;}if(this.grid.edit.isEditing()){var _3ea=this.grid.getCell(col);if(!this.isLastFocusCell()&&!_3ea.editable){this.cell=_3ea;this.rowIndex=row;this.next();return;}}this.setFocusIndex(row,col);}},previous:function(){if(this.cell){var row=(this.rowIndex||0),col=(this.cell.index||0)-1;if(col<0){col=this.grid.layout.cellCount-1;row--;}if(row<0){row=0;col=0;}if(this.grid.edit.isEditing()){var _3eb=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_3eb.editable){this.cell=_3eb;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_3ec,_3ed){var _3ee=_3ed<0?-1:1;if(this.isNavHeader()){var _3ef=this._findHeaderCells();var _3f0=currentIdx=dojo.indexOf(_3ef,this._colHeadNode);currentIdx+=_3ed;while(currentIdx>=0&&currentIdx<_3ef.length&&_3ef[currentIdx].style.display=="none"){currentIdx+=_3ee;}if((currentIdx>=0)&&(currentIdx<_3ef.length)){this._setActiveColHeader(_3ef[currentIdx],currentIdx,_3f0);}}else{if(this.cell){var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_3ec));if(_3ec){if(_3ec>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_3ec<0){if(row<=sc.getPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop-sc.findScrollTop(r)-sc.findScrollTop(row));}}}}var cc=this.grid.layout.cellCount-1,i=this.cell.index,col=Math.min(cc,Math.max(0,i+_3ed));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_3ee;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}this.setFocusIndex(row,col);if(_3ec){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){dojo.stopEvent(e);this.previous();}else{if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();dojo.stopEvent(e);}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){dojo.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null;}this._focusifyCellNode(false);}}},nextKey:function(e){var _3f1=(this.grid.rowCount===0);if(e.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();dojo.stopEvent(e);}else{if(this.isNavHeader()){this.blurHeader();if(!this.findAndFocusGridCell()){this.tabOut(this.grid.lastFocusNode);}this._colHeadNode=this._colHeadFocusIdx=null;}else{if(this.grid.edit.isEditing()){dojo.stopEvent(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_3f2){this.tabbingOut=true;_3f2.focus();},focusGridView:function(){dojox.grid.util.fire(this.focusView,"focus");},focusGrid:function(_3f3){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _3f4=true;var _3f5=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_3f5){var _3f6=0;var cell=this.grid.getCell(_3f6);if(cell.hidden){_3f6=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_3f6);}else{if(this.cell&&!_3f5){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_3f4=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _3f4;},focusHeader:function(){var _3f7=this._findHeaderCells();var _3f8=this._colHeadFocusIdx;if(this._isHeaderHidden()){this.findAndFocusGridCell();}else{if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}}this._colHeadNode=_3f7[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_3f7.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_3f7[this._colHeadFocusIdx];}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode;}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,_3f8);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false);}else{this.findAndFocusGridCell();}},blurHeader:function(){dojo.removeClass(this._colHeadNode,this.focusClass);dojo.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var _3f9=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_3f9);this._contextMenuBindNode=_3f9;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){dojo.stopEvent(e);return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;dojo.stopEvent(e);},doBlur:function(e){dojo.stopEvent(e);},doContextMenu:function(e){if(!this.headerMenu){dojo.stopEvent(e);}},doLastNodeFocus:function(e){if(this.tabbingOut){this._focusifyCellNode(false);}else{if(this.grid.rowCount>0){if(this.isNoFocusCell()){this.setFocusIndex(0,0);}this._focusifyCellNode(true);}else{this.focusHeader();}}this.tabbingOut=false;dojo.stopEvent(e);},doLastNodeBlur:function(e){dojo.stopEvent(e);},doColHeaderFocus:function(e){this._setActiveColHeader(e.target,dojo.attr(e.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());dojo.stopEvent(e);},doColHeaderBlur:function(e){dojo.toggleClass(e.target,this.focusClass,false);}});}if(!dojo._hasResource["dojox.grid._EditManager"]){dojo._hasResource["dojox.grid._EditManager"]=true;dojo.provide("dojox.grid._EditManager");dojo.declare("dojox.grid._EditManager",null,{constructor:function(_3fa){this.grid=_3fa;this.connections=[];if(dojo.isIE){this.connections.push(dojo.connect(document.body,"onfocus",dojo.hitch(this,"_boomerangFocus")));}},info:{},destroy:function(){dojo.forEach(this.connections,dojo.disconnect);},cellFocus:function(_3fb,_3fc){if(this.grid.singleClickEdit||this.isEditRow(_3fc)){this.setEditCell(_3fb,_3fc);}else{this.apply();}if(this.isEditing()||(_3fb&&_3fb.editable&&_3fb.alwaysEditing)){this._focusEditor(_3fb,_3fc);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_3fd){if(_3fd.index==this.info.rowIndex){_3fd.customClasses+=" dojoxGridRowEditing";}},dispatchEvent:function(e){var c=e.cell,ed=(c&&c["editable"])?c:0;return ed&&ed.dispatchEvent(e.dispatch,e);},isEditing:function(){return this.info.rowIndex!==undefined;},isEditCell:function(_3fe,_3ff){return (this.info.rowIndex===_3fe)&&(this.info.cell.index==_3ff);},isEditRow:function(_400){return this.info.rowIndex===_400;},setEditCell:function(_401,_402){if(!this.isEditCell(_402,_401.index)&&this.grid.canEdit&&this.grid.canEdit(_401,_402)){this.start(_401,_402,this.isEditRow(_402)||_401.editable);}},_focusEditor:function(_403,_404){dojox.grid.util.fire(_403,"focus",[_404]);},focusEditor:function(){if(this.isEditing()){this._focusEditor(this.info.cell,this.info.rowIndex);}},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>new Date().getTime();},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();this._catchBoomerang=0;}},_doCatchBoomerang:function(){if(dojo.isIE){this._catchBoomerang=new Date().getTime()+this._boomerangWindow;}},start:function(_405,_406,_407){this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_406)){this.applyRowEdit();this.grid.updateRow(_406);}if(_407){this.info={cell:_405,rowIndex:_406};this.grid.doStartEdit(_405,_406);this.grid.updateRow(_406);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_405,_406);this._doCatchBoomerang();},_editorDo:function(_408){var c=this.info.cell;if(c&&c.editable){c[_408](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_409,_40a,_40b){if(this.grid.canEdit(_40a,_40b)){this.grid.doApplyCellEdit(_409,_40b,_40a.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_40c,_40d){var c=this.info.cell;if(this.isEditRow(_40c)&&(!_40d||c.view==_40d)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_40e,_40f){var c=this.info.cell;if(this.isEditRow(_40f)&&c.view==_40e&&c.editable){c.restore(c,this.info.rowIndex);}}});}if(!dojo._hasResource["dojox.grid.Selection"]){dojo._hasResource["dojox.grid.Selection"]=true;dojo.provide("dojox.grid.Selection");dojo.declare("dojox.grid.Selection",null,{constructor:function(_410){this.grid=_410;this.selected=[];this.setMode(_410.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_411){return this.grid.onCanSelect(_411);},onCanDeselect:function(_412){return this.grid.onCanDeselect(_412);},onSelected:function(_413){},onDeselected:function(_414){},onChanging:function(){},onChanged:function(){},isSelected:function(_415){if(this.mode=="none"){return false;}return this.selected[_415];},getFirstSelected:function(){if(!this.selected.length||this.mode=="none"){return -1;}for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getNextSelected:function(_416){if(this.mode=="none"){return -1;}for(var i=_416+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _417=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_417.push(i);}}return _417;},getSelectedCount:function(){var c=0;for(var i=0;i<this.selected.length;i++){if(this.selected[i]){c++;}}return c;},_beginUpdate:function(){if(this.updating===0){this.onChanging();}this.updating++;},_endUpdate:function(){this.updating--;if(this.updating===0){this.onChanged();}},select:function(_418){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_418);this.addToSelection(_418);}else{this.toggleSelect(_418);}},addToSelection:function(_419){if(this.mode=="none"){return;}if(dojo.isArray(_419)){dojo.forEach(_419,this.addToSelection,this);return;}_419=Number(_419);if(this.selected[_419]){this.selectedIndex=_419;}else{if(this.onCanSelect(_419)!==false){this.selectedIndex=_419;var _41a=this.grid.getRowNode(_419);if(_41a){dojo.attr(_41a,"aria-selected","true");}this._beginUpdate();this.selected[_419]=true;this.onSelected(_419);this._endUpdate();}}},deselect:function(_41b){if(this.mode=="none"){return;}if(dojo.isArray(_41b)){dojo.forEach(_41b,this.deselect,this);return;}_41b=Number(_41b);if(this.selectedIndex==_41b){this.selectedIndex=-1;}if(this.selected[_41b]){if(this.onCanDeselect(_41b)===false){return;}var _41c=this.grid.getRowNode(_41b);if(_41c){dojo.attr(_41c,"aria-selected","false");}this._beginUpdate();delete this.selected[_41b];this.onDeselected(_41b);this._endUpdate();}},setSelected:function(_41d,_41e){this[(_41e?"addToSelection":"deselect")](_41d);},toggleSelect:function(_41f){if(dojo.isArray(_41f)){dojo.forEach(_41f,this.toggleSelect,this);return;}this.setSelected(_41f,!this.selected[_41f]);},_range:function(_420,inTo,func){var s=(_420>=0?_420:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_421,inTo){this._range(_421,inTo,dojo.hitch(this,"addToSelection"));},deselectRange:function(_422,inTo){this._range(_422,inTo,dojo.hitch(this,"deselect"));},insert:function(_423){this.selected.splice(_423,0,false);if(this.selectedIndex>=_423){this.selectedIndex++;}},remove:function(_424){this.selected.splice(_424,1);if(this.selectedIndex>=_424){this.selectedIndex--;}},deselectAll:function(_425){for(var i in this.selected){if((i!=_425)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_426,_427,_428){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_426);}else{var _429=this.selectedIndex;if(!_427){this.deselectAll(_426);}if(_428){this.selectRange(_429,_426);}else{if(_427){this.toggleSelect(_426);}else{this.addToSelection(_426);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey);},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate();}});}if(!dojo._hasResource["dojox.grid._Events"]){dojo._hasResource["dojox.grid._Events"]=true;dojo.provide("dojox.grid._Events");dojo.declare("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(e){this.dispatchKeyEvent(e);},onContentEvent:function(e){this.dispatchContentEvent(e);},onHeaderEvent:function(e){this.dispatchHeaderEvent(e);},onStyleRow:function(_42a){var i=_42a;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_42a);this.edit.styleRow(_42a);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var dk=dojo.keys;var _42b;switch(e.keyCode){case dk.ESCAPE:this.edit.cancel();break;case dk.ENTER:if(!this.edit.isEditing()){_42b=this.focus.getHeaderIndex();if(_42b>=0){this.setSortIndex(_42b);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}dojo.stopEvent(e);}if(!e.shiftKey){var _42c=this.edit.isEditing();this.edit.apply();if(!_42c){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _42d=this.focus.focusView||this.views.views[0];_42d.content.decorateEvent(e);this.onRowClick(e);}break;case dk.SPACE:if(!this.edit.isEditing()){_42b=this.focus.getHeaderIndex();if(_42b>=0){this.setSortIndex(_42b);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}dojo.stopEvent(e);}break;case dk.TAB:this.focus[e.shiftKey?"previousKey":"nextKey"](e);break;case dk.LEFT_ARROW:case dk.RIGHT_ARROW:if(!this.edit.isEditing()){var _42e=e.keyCode;dojo.stopEvent(e);_42b=this.focus.getHeaderIndex();if(_42b>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_42b,(_42e==dk.LEFT_ARROW?-1:1)*5);}else{var _42f=(_42e==dk.LEFT_ARROW)?1:-1;if(dojo._isBodyLtr()){_42f*=-1;}this.focus.move(0,_42f);}}break;case dk.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){dojo.stopEvent(e);this.focus.move(-1,0);}break;case dk.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){dojo.stopEvent(e);this.focus.move(1,0);}break;case dk.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){dojo.stopEvent(e);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1){this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0);}}break;case dk.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){dojo.stopEvent(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;default:break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){dojo.addClass(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){dojo.removeClass(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}this.onRowClick(e);},onCellDblClick:function(e){if(this._click.length>1&&dojo.isIE){this.edit.setEditCell(this._click[1].cell,this._click[1].rowIndex);}else{if(this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex){this.edit.setEditCell(this._click[0].cell,this._click[0].rowIndex);}else{this.edit.setEditCell(e.cell,e.rowIndex);}}this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_430,_431){this.edit.cellFocus(_430,_431);},onRowClick:function(e){this.edit.rowClick(e);this.selection.clickSelectEvent(e);},onRowDblClick:function(e){},onRowMouseOver:function(e){},onRowMouseOut:function(e){},onRowMouseDown:function(e){},onRowContextMenu:function(e){dojo.stopEvent(e);},onHeaderMouseOver:function(e){},onHeaderMouseOut:function(e){},onHeaderCellMouseOver:function(e){if(e.cellNode){dojo.addClass(e.cellNode,this.cellOverClass);}},onHeaderCellMouseOut:function(e){if(e.cellNode){dojo.removeClass(e.cellNode,this.cellOverClass);}},onHeaderCellMouseDown:function(e){},onHeaderClick:function(e){},onHeaderCellClick:function(e){this.setSortIndex(e.cell.index);this.onHeaderClick(e);},onHeaderDblClick:function(e){},onHeaderCellDblClick:function(e){this.onHeaderDblClick(e);},onHeaderCellContextMenu:function(e){this.onHeaderContextMenu(e);},onHeaderContextMenu:function(e){if(!this.headerMenu){dojo.stopEvent(e);}},onStartEdit:function(_432,_433){},onApplyCellEdit:function(_434,_435,_436){},onCancelEdit:function(_437){},onApplyEdit:function(_438){},onCanSelect:function(_439){return true;},onCanDeselect:function(_43a){return true;},onSelected:function(_43b){this.updateRowStyles(_43b);},onDeselected:function(_43c){this.updateRowStyles(_43c);},onSelectionChanged:function(){}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_43d,_43e,_43f){_43f=dojo.i18n.normalizeLocale(_43f);var _440=_43f.split("-");var _441=[_43d,"nls",_43e].join(".");var _442=dojo._loadedModules[_441];if(_442){var _443;for(var i=_440.length;i>0;i--){var loc=_440.slice(0,i).join("_");if(_442[loc]){_443=_442[loc];break;}}if(!_443){_443=_442.ROOT;}if(_443){var _444=function(){};_444.prototype=_443;return new _444();}}throw new Error("Bundle not found: "+_43e+" in "+_43d+" , locale="+_43f);};dojo.i18n.normalizeLocale=function(_445){var _446=_445?_445.toLowerCase():dojo.locale;if(_446=="root"){_446="ROOT";}return _446;};dojo.i18n._requireLocalization=function(_447,_448,_449,_44a){var _44b=dojo.i18n.normalizeLocale(_449);var _44c=[_447,"nls",_448].join(".");var _44d="";if(_44a){var _44e=_44a.split(",");for(var i=0;i<_44e.length;i++){if(_44b["indexOf"](_44e[i])==0){if(_44e[i].length>_44d.length){_44d=_44e[i];}}}if(!_44d){_44d="ROOT";}}var _44f=_44a?_44d:_44b;var _450=dojo._loadedModules[_44c];var _451=null;if(_450){if(dojo.config.localizationComplete&&_450._built){return;}var _452=_44f.replace(/-/g,"_");var _453=_44c+"."+_452;_451=dojo._loadedModules[_453];}if(!_451){_450=dojo["provide"](_44c);var syms=dojo._getModuleSymbols(_447);var _454=syms.concat("nls").join("/");var _455;dojo.i18n._searchLocalePath(_44f,_44a,function(loc){var _456=loc.replace(/-/g,"_");var _457=_44c+"."+_456;var _458=false;if(!dojo._loadedModules[_457]){dojo["provide"](_457);var _459=[_454];if(loc!="ROOT"){_459.push(loc);}_459.push(_448);var _45a=_459.join("/")+".js";_458=dojo._loadPath(_45a,null,function(hash){var _45b=function(){};_45b.prototype=_455;_450[_456]=new _45b();for(var j in hash){_450[_456][j]=hash[j];}});}else{_458=true;}if(_458&&_450[_456]){_455=_450[_456];}else{_450[_456]=_455;}if(_44a){return true;}});}if(_44a&&_44b!=_44d){_450[_44b.replace(/-/g,"_")]=_450[_44d.replace(/-/g,"_")];}};(function(){var _45c=dojo.config.extraLocale;if(_45c){if(!_45c instanceof Array){_45c=[_45c];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_45d,_45e){req(m,b,_45d,_45e);if(_45d){return;}for(var i=0;i<_45c.length;i++){req(m,b,_45c[i],_45e);}};}})();dojo.i18n._searchLocalePath=function(_45f,down,_460){_45f=dojo.i18n.normalizeLocale(_45f);var _461=_45f.split("-");var _462=[];for(var i=_461.length;i>0;i--){_462.push(_461.slice(0,i).join("-"));}_462.push(false);if(down){_462.reverse();}for(var j=_462.length-1;j>=0;j--){var loc=_462[j]||"ROOT";var stop=_460(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_463,_464){function _465(_466){_466=dojo.i18n.normalizeLocale(_466);dojo.i18n._searchLocalePath(_466,true,function(loc){for(var i=0;i<_464.length;i++){if(_464[i]==loc){dojo["require"](_463+"_"+loc);return true;}}return false;});};_465();var _467=dojo.config.extraLocale||[];for(var i=0;i<_467.length;i++){_465(_467[i]);}};}if(!dojo._hasResource["dojox.grid._Grid"]){dojo._hasResource["dojox.grid._Grid"]=true;dojo.provide("dojox.grid._Grid");(function(){if(!dojo.isCopyKey){dojo.isCopyKey=dojo.dnd.getCopyKeyState;}dojo.declare("dojox.grid._Grid",[dijit._Widget,dijit._Templated,dojox.grid._Events],{templateString:"<div hidefocus=\"hidefocus\" wairole=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" wairole=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" wairole=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n",classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,sortInfo:0,themeable:true,_placeholders:null,_layoutClass:dojox.grid._Layout,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex")){this.domNode.tabIndex="0";}this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");dojox.html.metrics.initOnFontResize();this.connect(dojox.html.metrics,"onFontResize","textSizeChanged");dojox.grid.util.funnelEvents(this.domNode,this,"doKeyEvent",dojox.grid.util.keyEvents);if(this.selectionMode!="none"){dojo.attr(this.domNode,"aria-multiselectable",this.selectionMode=="single"?"false":"true");}dojo.addClass(this.domNode,this.classTag);if(!this.isLeftToRight()){dojo.addClass(this.domNode,this.classTag+"Rtl");}},postMixInProperties:function(){this.inherited(arguments);var _468=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_468);this.errorMessage=dojo.string.substitute(this.errorMessage,_468);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0;},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);if(this.domNode&&this.autoWidth&&this.initialWidth){this.domNode.style.width=this.initialWidth;}if(this.domNode&&!this.editable){dojo.attr(this.domNode,"aria-readonly","true");}},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.scroller){this.scroller.destroy();delete this.scroller;}if(this.focus){this.focus.destroy();delete this.focus;}if(this.headerMenu&&this._placeholders.length){dojo.forEach(this._placeholders,function(p){p.unReplace(true);});this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.inherited(arguments);},_setAutoHeightAttr:function(ah,_469){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);}}}if(typeof ah=="number"){if(isNaN(ah)){ah=false;}if(ah<0){ah=true;}else{if(ah===0){ah=false;}}}this.autoHeight=ah;if(typeof ah=="boolean"){this._autoHeight=ah;}else{if(typeof ah=="number"){this._autoHeight=(ah>=this.get("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_469){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},textSizeChanged:function(){this.render();},sizeChange:function(){this.update();},createManagers:function(){this.rows=new dojox.grid._RowManager(this);this.focus=new dojox.grid._FocusManager(this);this.edit=new dojox.grid._EditManager(this);},createSelection:function(){this.selection=new dojox.grid.Selection(this);},createScroller:function(){this.scroller=new dojox.grid._Scroller();this.scroller.grid=this;this.scroller.renderRow=dojo.hitch(this,"renderRow");this.scroller.removeRow=dojo.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.render();},onResizeColumn:function(_46a){},createViews:function(){this.views=new dojox.grid._ViewManager(this);this.views.createView=dojo.hitch(this,"createView");},createView:function(_46b,idx){var c=dojo.getObject(_46b);var view=new c({grid:this,index:idx});this.viewsNode.appendChild(view.domNode);this.viewsHeaderNode.appendChild(view.headerNode);this.views.addView(view);return view;},buildViews:function(){for(var i=0,vs;(vs=this.layout.structure[i]);i++){this.createView(vs.type||dojox._scopeName+".grid._View",i).setStructure(vs);}this.scroller.setContentNodes(this.views.getContentNodes());},_setStructureAttr:function(_46c){var s=_46c;if(s&&dojo.isString(s)){dojo.deprecated("dojox.grid._Grid.attr('structure', 'objVar')","use dojox.grid._Grid.attr('structure', objVar) instead","2.0");s=dojo.getObject(s);}this.structure=s;if(!s){if(this.layout.structure){s=this.layout.structure;}else{return;}}this.views.destroyViews();if(s!==this.layout.structure){this.layout.setStructure(s);}this._structureChanged();},setStructure:function(_46d){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.attr('structure', obj) instead.","2.0");this._setStructureAttr(_46d);},getColumnTogglingItems:function(){return dojo.map(this.layout.cells,function(cell){if(!cell.menuItems){cell.menuItems=[];}var self=this;var item=new dijit.CheckedMenuItem({label:cell.name,checked:!cell.hidden,_gridCell:cell,onChange:function(_46e){if(self.layout.setColumnVisibility(this._gridCell.index,_46e)){var _46f=this._gridCell.menuItems;if(_46f.length>1){dojo.forEach(_46f,function(item){if(item!==this){item.setAttribute("checked",_46e);}},this);}_46e=dojo.filter(self.layout.cells,function(c){if(c.menuItems.length>1){dojo.forEach(c.menuItems,"item.attr('disabled', false);");}else{c.menuItems[0].attr("disabled",false);}return !c.hidden;});if(_46e.length==1){dojo.forEach(_46e[0].menuItems,"item.attr('disabled', true);");}}},destroy:function(){var _470=dojo.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_470,1);delete this._gridCell;dijit.CheckedMenuItem.prototype.destroy.apply(this,arguments);}});cell.menuItems.push(item);return item;},this);},_setHeaderMenuAttr:function(menu){if(this._placeholders&&this._placeholders.length){dojo.forEach(this._placeholders,function(p){p.unReplace(true);});this._placeholders=[];}if(this.headerMenu){this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.headerMenu=menu;if(!menu){return;}this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders){this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel);}},setHeaderMenu:function(menu){dojo.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.attr('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(menu);},setupHeaderMenu:function(){if(this._placeholders&&this._placeholders.length){dojo.forEach(this._placeholders,function(p){if(p._replaced){p.unReplace(true);}p.replace(this.getColumnTogglingItems());},this);}},_fetch:function(_471){this.setScrollTop(0);},getItem:function(_472){return null;},showMessage:function(_473){if(_473){this.messagesNode.innerHTML=_473;this.messagesNode.style.display="";}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none";}},_structureChanged:function(){this.buildViews();if(this.autoRender&&this._started){this.render();}},hasLayout:function(){return this.layout.cells.length;},resize:function(_474,_475){this._pendingChangeSize=_474;this._pendingResultSize=_475;this.sizeChange();},_getPadBorder:function(){this._padBorder=this._padBorder||dojo._getPadBorderExtents(this.domNode);return this._padBorder;},_getHeaderHeight:function(){var vns=this.viewsHeaderNode.style,t=vns.display=="none"?0:this.views.measureHeader();vns.height=t+"px";this.views.normalizeHeaderNodeHeight();return t;},_resize:function(_476,_477){_476=_476||this._pendingChangeSize;_477=_477||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(!this.domNode){return;}var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _478=this._getPadBorder();var hh=undefined;var h;if(this._autoHeight){this.domNode.style.height="auto";this.viewsNode.style.height="";}else{if(typeof this.autoHeight=="number"){h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.domNode.clientHeight<=_478.h){if(pn==document.body){this.domNode.style.height=this.defaultHeight;}else{if(this.height){this.domNode.style.height=this.height;}else{this.fitTo="parent";}}}}}if(_477){_476=_477;}if(_476){dojo.marginBox(this.domNode,_476);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){h=this._parentContentBoxHeight=this._parentContentBoxHeight||dojo._getContentBox(pn).h;this.domNode.style.height=Math.max(0,h)+"px";}}var _479=dojo.some(this.views.views,function(v){return v.flexCells;});if(!this._autoHeight&&(h||dojo._getContentBox(this.domNode).h)===0){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";if(!_479&&hh===undefined){hh=this._getHeaderHeight();}}if(_479){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _47a=(!this.initialWidth&&this.autoWidth);var w=_47a?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_47a){this.domNode.style.width=vw+"px";}},adaptHeight:function(_47b){var t=_47b===undefined?this._getHeaderHeight():_47b;var h=(this._autoHeight?-1:Math.max(this.domNode.clientHeight-t,0)||0);this.views.onEach("setSize",[0,h]);this.views.onEach("adaptHeight");if(!this._autoHeight){var _47c=0,_47d=0;var _47e=dojo.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_47c++;}else{_47d++;}return (!has);});if(_47c>0&&_47d>0){dojo.forEach(_47e,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount"))){this.scroller.windowHeight=h;}else{this.scroller.windowHeight=Math.max(this.domNode.clientHeight-t,0);}},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.autoRender){this.render();}},render:function(){if(!this.domNode){return;}if(!this._started){return;}if(!this.hasLayout()){this.scroller.init(0,this.keepRows,this.rowsPerPage);return;}this.update=this.defaultUpdate;this._render();},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender();},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize();},postrender:function(){this.postresize();this.focus.initFocusView();dojo.setSelectable(this.domNode,this.selectable);},postresize:function(){if(this._autoHeight){var size=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=size;}},renderRow:function(_47f,_480){this.views.renderRow(_47f,_480,this._skipRowRenormalize);},rowRemoved:function(_481){this.views.rowRemoved(_481);},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true;},endUpdate:function(){this.updating=false;var i=this.invalidated,r;if(i.all){this.update();}else{if(i.rowCount!=undefined){this.updateRowCount(i.rowCount);}else{for(r in i){this.updateRow(Number(r));}}}this.invalidated=[];},defaultUpdate:function(){if(!this.domNode){return;}if(this.updating){this.invalidated.all=true;return;}this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(this.lastScrollTop);this.postrender();},update:function(){this.render();},updateRow:function(_482){_482=Number(_482);if(this.updating){this.invalidated[_482]=true;}else{this.views.updateRow(_482);this.scroller.rowHeightChanged(_482);}},updateRows:function(_483,_484){_483=Number(_483);_484=Number(_484);var i;if(this.updating){for(i=0;i<_484;i++){this.invalidated[i+_483]=true;}}else{for(i=0;i<_484;i++){this.views.updateRow(i+_483,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_483);}},updateRowCount:function(_485){if(this.updating){this.invalidated.rowCount=_485;}else{this.rowCount=_485;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_485);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_486){this.views.updateRowStyles(_486);},getRowNode:function(_487){if(this.focus.focusView&&!(this.focus.focusView instanceof dojox.grid._RowSelector)){return this.focus.focusView.rowNodes[_487];}else{for(var i=0,_488;(_488=this.views.views[i]);i++){if(!(_488 instanceof dojox.grid._RowSelector)){return _488.rowNodes[_487];}}}return null;},rowHeightChanged:function(_489){this.views.renormalizeRow(_489);this.scroller.rowHeightChanged(_489);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(dojo.isIE?100:50),scrollTo:function(_48a){if(!this.fastScroll){this.setScrollTop(_48a);return;}var _48b=Math.abs(this.lastScrollTop-_48a);this.lastScrollTop=_48a;if(_48b>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_48a;this.views.setScrollTop(_48a);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _48c=this;this._pendingScroll=window.setTimeout(function(){delete _48c._pendingScroll;_48c.finishScrollJob();},200);}else{this.setScrollTop(_48a);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_48d){this.scroller.scroll(this.views.setScrollTop(_48d));},scrollToRow:function(_48e){this.setScrollTop(this.scroller.findScrollTop(_48e)+1);},styleRowNode:function(_48f,_490){if(_490){this.rows.styleRowNode(_48f,_490);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_491){return this.layout.cells[_491];},setCellWidth:function(_492,_493){this.getCell(_492).unitWidth=_493;},getCellName:function(_494){return "Cell "+_494.index;},canSort:function(_495){},sort:function(){},getSortAsc:function(_496){_496=_496==undefined?this.sortInfo:_496;return Boolean(_496>0);},getSortIndex:function(_497){_497=_497==undefined?this.sortInfo:_497;return Math.abs(_497)-1;},setSortIndex:function(_498,_499){var si=_498+1;if(_499!=undefined){si*=(_499?1:-1);}else{if(this.getSortIndex()==_498){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_49a){if(this.canSort(_49a)){this.sortInfo=_49a;this.sort();this.update();}},doKeyEvent:function(e){e.dispatch="do"+e.type;this.onKeyEvent(e);},_dispatch:function(m,e){if(m in this){return this[m](e);}return false;},dispatchKeyEvent:function(e){this._dispatch(e.dispatch,e);},dispatchContentEvent:function(e){this.edit.dispatchEvent(e)||e.sourceView.dispatchContentEvent(e)||this._dispatch(e.dispatch,e);},dispatchHeaderEvent:function(e){e.sourceView.dispatchHeaderEvent(e)||this._dispatch("doheader"+e.type,e);},dokeydown:function(e){this.onKeyDown(e);},doclick:function(e){if(e.cellNode){this.onCellClick(e);}else{this.onRowClick(e);}},dodblclick:function(e){if(e.cellNode){this.onCellDblClick(e);}else{this.onRowDblClick(e);}},docontextmenu:function(e){if(e.cellNode){this.onCellContextMenu(e);}else{this.onRowContextMenu(e);}},doheaderclick:function(e){if(e.cellNode){this.onHeaderCellClick(e);}else{this.onHeaderClick(e);}},doheaderdblclick:function(e){if(e.cellNode){this.onHeaderCellDblClick(e);}else{this.onHeaderDblClick(e);}},doheadercontextmenu:function(e){if(e.cellNode){this.onHeaderCellContextMenu(e);}else{this.onHeaderContextMenu(e);}},doStartEdit:function(_49b,_49c){this.onStartEdit(_49b,_49c);},doApplyCellEdit:function(_49d,_49e,_49f){this.onApplyCellEdit(_49d,_49e,_49f);},doCancelEdit:function(_4a0){this.onCancelEdit(_4a0);},doApplyEdit:function(_4a1){this.onApplyEdit(_4a1);},addRow:function(){this.updateRowCount(this.get("rowCount")+1);},removeSelectedRows:function(){if(this.allItemsSelected){this.updateRowCount(0);}else{this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));}this.selection.clear();}});dojox.grid._Grid.markupFactory=function(_4a2,node,ctor,_4a3){var d=dojo;var _4a4=function(n){var w=d.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w,10)+"px";}return w;};if(!_4a2.structure&&node.nodeName.toLowerCase()=="table"){_4a2.structure=d.query("> colgroup",node).map(function(cg){var sv=d.attr(cg,"span");var v={noscroll:(d.attr(cg,"noscroll")=="true")?true:false,__span:(!!sv?parseInt(sv,10):1),cells:[]};if(d.hasAttr(cg,"width")){v.width=_4a4(cg);}return v;});if(!_4a2.structure.length){_4a2.structure.push({__span:Infinity,cells:[]});}d.query("thead > tr",node).forEach(function(tr,_4a5){var _4a6=0;var _4a7=0;var _4a8;var _4a9=null;d.query("> th",tr).map(function(th){if(!_4a9){_4a8=0;_4a9=_4a2.structure[0];}else{if(_4a6>=(_4a8+_4a9.__span)){_4a7++;_4a8+=_4a9.__span;var _4aa=_4a9;_4a9=_4a2.structure[_4a7];}}var cell={name:d.trim(d.attr(th,"name")||th.innerHTML),colSpan:parseInt(d.attr(th,"colspan")||1,10),type:d.trim(d.attr(th,"cellType")||""),id:d.trim(d.attr(th,"id")||"")};_4a6+=cell.colSpan;var _4ab=d.attr(th,"rowspan");if(_4ab){cell.rowSpan=_4ab;}if(d.hasAttr(th,"width")){cell.width=_4a4(th);}if(d.hasAttr(th,"relWidth")){cell.relWidth=window.parseInt(dojo.attr(th,"relWidth"),10);}if(d.hasAttr(th,"hidden")){cell.hidden=d.attr(th,"hidden")=="true";}if(_4a3){_4a3(th,cell);}cell.type=cell.type?dojo.getObject(cell.type):dojox.grid.cells.Cell;if(cell.type&&cell.type.markupFactory){cell.type.markupFactory(th,cell);}if(!_4a9.cells[_4a5]){_4a9.cells[_4a5]=[];}_4a9.cells[_4a5].push(cell);});});}return new ctor(_4a2,node);};})();}if(!dojo._hasResource["dojox.grid.DataSelection"]){dojo._hasResource["dojox.grid.DataSelection"]=true;dojo.provide("dojox.grid.DataSelection");dojo.declare("dojox.grid.DataSelection",dojox.grid.Selection,{getFirstSelected:function(){var idx=dojox.grid.Selection.prototype.getFirstSelected.call(this);if(idx==-1){return null;}return this.grid.getItem(idx);},getNextSelected:function(_4ac){var _4ad=this.grid.getItemIndex(_4ac);var idx=dojox.grid.Selection.prototype.getNextSelected.call(this,_4ad);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _4ae=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_4ae.push(this.grid.getItem(i));}}return _4ae;},addToSelection:function(_4af){if(this.mode=="none"){return;}var idx=null;if(typeof _4af=="number"||typeof _4af=="string"){idx=_4af;}else{idx=this.grid.getItemIndex(_4af);}dojox.grid.Selection.prototype.addToSelection.call(this,idx);},deselect:function(_4b0){if(this.mode=="none"){return;}var idx=null;if(typeof _4b0=="number"||typeof _4b0=="string"){idx=_4b0;}else{idx=this.grid.getItemIndex(_4b0);}dojox.grid.Selection.prototype.deselect.call(this,idx);},deselectAll:function(_4b1){var idx=null;if(_4b1||typeof _4b1=="number"){if(typeof _4b1=="number"||typeof _4b1=="string"){idx=_4b1;}else{idx=this.grid.getItemIndex(_4b1);}dojox.grid.Selection.prototype.deselectAll.call(this,idx);}else{this.inherited(arguments);}}});}if(!dojo._hasResource["dojox.grid.DataGrid"]){dojo._hasResource["dojox.grid.DataGrid"]=true;dojo.provide("dojox.grid.DataGrid");dojo.declare("dojox.grid.DataGrid",dojox.grid._Grid,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty={};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments);},createSelection:function(){this.selection=new dojox.grid.DataSelection(this);},get:function(_4b2,_4b3){if(_4b3&&this.field=="_item"&&!this.fields){return _4b3;}else{if(_4b3&&this.fields){var ret=[];var s=this.grid.store;dojo.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_4b3,f));});return ret;}else{if(!_4b3&&typeof _4b2==="string"){return this.inherited(arguments);}}}return (!_4b3?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_4b3:this.grid.store.getValue(_4b3,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _4b4=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_4b4=true;}if(!this.updating){this.beginUpdate();_4b4=true;}if(_4b4){var _4b5=this;this._endUpdateDelay=setTimeout(function(){delete _4b5._endUpdateDelay;_4b5.endUpdate();},this.updateDelay);}}},_onSet:function(item,_4b6,_4b7,_4b8){this._checkUpdateStatus();var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_createItem:function(item,_4b9){var idty=this._hasIdentity?this.store.getIdentity(item):dojo.toJson(this.query)+":idx:"+_4b9+":sort:"+dojo.toJson(this.getSortProps());var o=this._by_idty[idty]={idty:idty,item:item};return o;},_addItem:function(item,_4ba,_4bb){this._by_idx[_4ba]=this._createItem(item,_4ba);if(!_4bb){this.updateRow(_4ba);}},_onNew:function(item,_4bc){this._checkUpdateStatus();var _4bd=this.get("rowCount");this._addingItem=true;this.updateRowCount(_4bd+1);this._addingItem=false;this._addItem(item,_4bd);this.showMessage();},_onDelete:function(item){this._checkUpdateStatus();var idx=this._getItemIndex(item,true);if(idx>=0){this._pages=[];this._bop=-1;this._eop=-1;var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.get("rowCount")-1);if(this.get("rowCount")===0){this.showMessage(this.noDataMessage);}}},_onRevert:function(){this._refresh();},setStore:function(_4be,_4bf,_4c0){this._setQuery(_4bf,_4c0);this._setStore(_4be);this._refresh(true);},setQuery:function(_4c1,_4c2){this._setQuery(_4c1,_4c2);this._refresh(true);},setItems:function(_4c3){this.items=_4c3;this._setStore(this.store);this._refresh(true);},_setQuery:function(_4c4,_4c5){this.query=_4c4;this.queryOptions=_4c5||this.queryOptions;},_setStore:function(_4c6){if(this.store&&this._store_connects){dojo.forEach(this._store_connects,function(arr){dojo.forEach(arr,dojo.disconnect);});}this.store=_4c6;if(this.store){var f=this.store.getFeatures();var h=[];this._canEdit=!!f["dojo.data.api.Write"]&&!!f["dojo.data.api.Identity"];this._hasIdentity=!!f["dojo.data.api.Identity"];if(!!f["dojo.data.api.Notification"]&&!this.items){h.push(this.connect(this.store,"onSet","_onSet"));h.push(this.connect(this.store,"onNew","_onNew"));h.push(this.connect(this.store,"onDelete","_onDelete"));}if(this._canEdit){h.push(this.connect(this.store,"revert","_onRevert"));}this._store_connects=h;}},_onFetchBegin:function(size,req){if(!this.scroller){return;}if(this.rowCount!=size){if(req.isRender){this.scroller.init(size,this.keepRows,this.rowsPerPage);this.rowCount=size;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false;}else{this.updateRowCount(size);}}if(!size){this.views.render();this._resize();this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}},_onFetchComplete:function(_4c7,req){if(!this.scroller){return;}if(_4c7&&_4c7.length>0){dojo.forEach(_4c7,function(item,idx){this._addItem(item,req.start+idx,true);},this);if(this._autoHeight){this._skipRowRenormalize=true;}this.updateRows(req.start,_4c7.length);if(this._autoHeight){this._skipRowRenormalize=false;}if(req.isRender){this.setScrollTop(0);this.postrender();}else{if(this._lastScrollTop){this.setScrollTop(this._lastScrollTop);}}}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;}this._pending_requests[req.start]=false;},_onFetchError:function(err,req){delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage);}this._pending_requests[req.start]=false;this.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_4c8,_4c9){_4c8=_4c8||0;if(this.store&&!this._pending_requests[_4c8]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_4c8]=true;try{if(this.items){var _4ca=this.items;var _4cb=this.store;this.rowsPerPage=_4ca.length;var req={start:_4c8,count:this.rowsPerPage,isRender:_4c9};this._onFetchBegin(_4ca.length,req);var _4cc=0;dojo.forEach(_4ca,function(i){if(!_4cb.isItemLoaded(i)){_4cc++;}});if(_4cc===0){this._onFetchComplete(_4ca,req);}else{var _4cd=function(item){_4cc--;if(_4cc===0){this._onFetchComplete(_4ca,req);}};dojo.forEach(_4ca,function(i){if(!_4cb.isItemLoaded(i)){_4cb.loadItem({item:i,onItem:_4cd,scope:this});}},this);}}else{this.store.fetch({start:_4c8,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_4c9,onBegin:dojo.hitch(this,"_onFetchBegin"),onComplete:dojo.hitch(this,"_onFetchComplete"),onError:dojo.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_4c8,count:this.rowsPerPage});}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoaded=false;this._isLoading=false;},getItem:function(idx){var data=this._by_idx[idx];if(!data||(data&&!data.item)){this._preparePage(idx);return null;}return data.item;},getItemIndex:function(item){return this._getItemIndex(item,false);},_getItemIndex:function(item,_4ce){if(!_4ce&&!this.store.isItem(item)){return -1;}var idty=this._hasIdentity?this.store.getIdentity(item):null;for(var i=0,l=this._by_idx.length;i<l;i++){var d=this._by_idx[i];if(d&&((idty&&d.idty==idty)||(d.item===item))){return i;}}return -1;},filter:function(_4cf,_4d0){this.query=_4cf;if(_4d0){this._clearData();}this._fetch();},_getItemAttr:function(idx,attr){var item=this.getItem(idx);return (!item?this.fetchText:this.store.getValue(item,attr));},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_4d1){return this._pending_requests[_4d1];},_rowToPage:function(_4d2){return (this.rowsPerPage?Math.floor(_4d2/this.rowsPerPage):_4d2);},_pageToRow:function(_4d3){return (this.rowsPerPage?this.rowsPerPage*_4d3:_4d3);},_preparePage:function(_4d4){if((_4d4<this._bop||_4d4>=this._eop)&&!this._addingItem){var _4d5=this._rowToPage(_4d4);this._needPage(_4d5);this._bop=_4d5*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_4d6){if(!this._pages[_4d6]){this._pages[_4d6]=true;this._requestPage(_4d6);}},_requestPage:function(_4d7){var row=this._pageToRow(_4d7);var _4d8=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_4d8>0){this._requests++;if(!this._requestsPending(row)){setTimeout(dojo.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_4d9){return _4d9.field;},_refresh:function(_4da){this._clearData();this._fetch(0,_4da);},sort:function(){this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){if(this.sortFields){return this.sortFields;}return null;}else{var desc=c["sortDesc"];var si=!(this.sortInfo>0);if(typeof desc=="undefined"){desc=si;}else{desc=si?!desc:desc;}return [{attribute:c.field,descending:desc}];}},styleRowState:function(_4db){if(this.store&&this.store.getState){var _4dc=this.store.getState(_4db.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_4dc[s]){c=" dojoxGridRow-"+s;break;}}_4db.customClasses+=c;}},onStyleRow:function(_4dd){this.styleRowState(_4dd);this.inherited(arguments);},canEdit:function(_4de,_4df){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _4e0={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_4e1,_4e2){if(!this._cache[_4e2]){this._cache[_4e2]=this._copyAttr(_4e2,_4e1.field);}this.onStartEdit(_4e1,_4e2);},doApplyCellEdit:function(_4e3,_4e4,_4e5){this.store.fetchItemByIdentity({identity:this._by_idx[_4e4].idty,onItem:dojo.hitch(this,function(item){var _4e6=this.store.getValue(item,_4e5);if(typeof _4e6=="number"){_4e3=isNaN(_4e3)?_4e3:parseFloat(_4e3);}else{if(typeof _4e6=="boolean"){_4e3=_4e3=="true"?true:_4e3=="false"?false:_4e3;}else{if(_4e6 instanceof Date){var _4e7=new Date(_4e3);_4e3=isNaN(_4e7.getTime())?_4e3:_4e7;}}}this.store.setValue(item,_4e5,_4e3);this.onApplyCellEdit(_4e3,_4e4,_4e5);})});},doCancelEdit:function(_4e8){var _4e9=this._cache[_4e8];if(_4e9){this.updateRow(_4e8);delete this._cache[_4e8];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_4ea,_4eb){var _4ec=this._cache[_4ea];this.onApplyEdit(_4ea);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=dojo.hitch(this,function(_4ed){if(_4ed.length){dojo.forEach(_4ed,this.store.deleteItem,this.store);this.selection.clear();}});if(this.allItemsSelected){this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:fx});}else{fx(this.selection.getSelected());}}}});dojox.grid.DataGrid.cell_markupFactory=function(_4ee,node,_4ef){var _4f0=dojo.trim(dojo.attr(node,"field")||"");if(_4f0){_4ef.field=_4f0;}_4ef.field=_4ef.field||_4ef.name;var _4f1=dojo.trim(dojo.attr(node,"fields")||"");if(_4f1){_4ef.fields=_4f1.split(",");}if(_4ee){_4ee(node,_4ef);}};dojox.grid.DataGrid.markupFactory=function(_4f2,node,ctor,_4f3){return dojox.grid._Grid.markupFactory(_4f2,node,ctor,dojo.partial(dojox.grid.DataGrid.cell_markupFactory,_4f3));};}dojo.i18n._preloadLocalizations("dojox.grid.nls.DataGrid",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
