/*
	Copyright (c) 2004-2012, 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=(_a>=9&&_5.ownerDocument.parentWindow.frameElement)?((_9.clientHeight>0&&_9.clientWidth>0&&(_8.clientHeight==0||_8.clientWidth==0||_8.clientHeight>_9.clientHeight||_8.clientWidth>_9.clientWidth))?_9:_8):(_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;var _15=el.clientWidth,_16=_13.w-_15;if(_15>0&&_16>0){_13.w=_15;_13.x+=(rtl&&(_a||el.clientLeft>pb.l))?_16:0;}_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);if(rtl&&((_a==8&&!_c)||_a>=9)){s=-s;}_11.x+=el.scrollLeft;el.scrollLeft+=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<=9&&_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};if(sel.rangeCount){bm.mark=sel.getRangeAt(0).cloneRange();}}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.declaredClass?_9f._popupWrapper:(dojo.hasClass(_9f.parentNode,"dijitPopup")&&_9f.parentNode),_a1=_9f.domNode||_9f;if(_a0){dojo.style(_a0,{visibility:"hidden",top:"-9999px"});}else{_a0=dojo.create("div",{"class":"dijitPopup",style:{visibility:"hidden",top:"-9999px"},role:"presentation"},dojo.body());_a0.appendChild(_a1);var s=_a1.style;s.display="";s.visibility="";s.position="";s.top="0px";if(_9f.declaredClass){_9f._popupWrapper=_a0;dojo.connect(_9f,"destroy",function(){dojo.destroy(_a0);delete _9f._popupWrapper;});}}},getTopPopup:function(){var _a2=this._stack;for(var pi=_a2.length-1;pi>0&&_a2[pi].parent===_a2[pi-1].widget;pi--){}return _a2[pi];},open:function(_a3){var _a4=this._stack,_a5=_a3.popup,_a6=_a3.orient||((_a3.parent?_a3.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_a7=_a3.around,id=(_a3.around&&_a3.around.id)?(_a3.around.id+"_dropdown"):("popup_"+this._idGen++);if(!_a5._popupWrapper){this.moveOffScreen(_a5);}var _a8=_a5._popupWrapper;dojo.attr(_a8,{id:id,style:{zIndex:this._beginZIndex+_a4.length},"class":"dijitPopup "+(_a5.baseClass||_a5["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:_a3.parent?_a3.parent.id:""});if(dojo.isIE||dojo.isMoz){if(!_a5.bgIframe){_a5.bgIframe=new dijit.BackgroundIframe(_a8);}}var _a9=_a7?dijit.placeOnScreenAroundElement(_a8,_a7,_a6,_a5.orient?dojo.hitch(_a5,"orient"):null):dijit.placeOnScreen(_a8,_a3,_a6=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_a3.padding);_a8.style.visibility="visible";_a5.domNode.style.visibility="visible";var _aa=[];_aa.push(dojo.connect(_a8,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_a3.onCancel){dojo.stopEvent(evt);_a3.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _ab=this.getTopPopup();if(_ab&&_ab.onCancel){_ab.onCancel();}}}}));if(_a5.onCancel){_aa.push(dojo.connect(_a5,"onCancel",_a3.onCancel));}_aa.push(dojo.connect(_a5,_a5.onExecute?"onExecute":"onChange",this,function(){var _ac=this.getTopPopup();if(_ac&&_ac.onExecute){_ac.onExecute();}}));_a4.push({widget:_a5,parent:_a3.parent,onExecute:_a3.onExecute,onCancel:_a3.onCancel,onClose:_a3.onClose,handlers:_aa});if(_a5.onOpen){_a5.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.widget,_b1=top.onClose;if(_b0.onClose){_b0.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_b0&&_b0.domNode){this.moveOffScreen(_b0);}if(_b1){_b1();}}}};dijit._frames=new function(){var _b2=[];this.pop=function(){var _b3;if(_b2.length){_b3=_b2.pop();_b3.style.display="";}else{if(dojo.isIE<9){var _b4=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _b5="<iframe src='"+_b4+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_b3=dojo.doc.createElement(_b5);}else{_b3=dojo.create("iframe");_b3.src="javascript:\"\"";_b3.className="dijitBackgroundIframe";dojo.style(_b3,"opacity",0.1);}_b3.tabIndex=-1;dijit.setWaiRole(_b3,"presentation");}return _b3;};this.push=function(_b6){_b6.style.display="none";_b2.push(_b6);};}();dijit.BackgroundIframe=function(_b7){if(!_b7.id){throw new Error("no id");}if(dojo.isIE||dojo.isMoz){var _b8=dijit._frames.pop();_b7.appendChild(_b8);if(dojo.isIE<7){this.resize(_b7);this._conn=dojo.connect(_b7,"onresize",this,function(){this.resize(_b7);});}else{dojo.style(_b8,{width:"100%",height:"100%"});}this.iframe=_b8;}};dojo.extend(dijit.BackgroundIframe,{resize:function(_b9){if(this.iframe&&dojo.isIE<7){dojo.style(this.iframe,{width:_b9.offsetWidth+"px",height:_b9.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(_ba,pos){dojo.window.scrollIntoView(_ba,pos);};}if(!dojo._hasResource["dojo.uacss"]){dojo._hasResource["dojo.uacss"]=true;dojo.provide("dojo.uacss");(function(){var d=dojo,_bb=d.doc.documentElement,ie=d.isIE,_bc=d.isOpera,maj=Math.floor,ff=d.isFF,_bd=d.boxModel.replace(/-/,""),_be={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_ie9:maj(ie)==9,dj_quirks:d.isQuirks,dj_iequirks:ie&&d.isQuirks,dj_opera:_bc,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};_be["dj_"+_bd]=true;var _bf="";for(var clz in _be){if(_be[clz]){_bf+=clz+" ";}}_bb.className=d.trim(_bb.className+" "+_bf);dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){var _c0="dj_rtl dijitRtl "+_bf.replace(/ /g,"-rtl ");_bb.className=d.trim(_bb.className+" "+_c0);}});})();}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,_c1,_c2,_c3,obj,_c4,_c5,_c6){if(obj!=this._obj){this.stop();this._initialDelay=_c5||500;this._subsequentDelay=_c4||0.9;this._minDelay=_c6||10;this._obj=obj;this._evt=evt;this._node=_c2;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_c1,_c3);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(_c7,_c8,_c9,_ca,_cb,_cc,_cd){if(_c8.keyCode){_c8.charOrCode=_c8.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_c8.charCode){_c8.charOrCode=String.fromCharCode(_c8.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_c7,"onkeypress",this,function(evt){if(evt.charOrCode==_c8.charOrCode&&(_c8.ctrlKey===undefined||_c8.ctrlKey==evt.ctrlKey)&&(_c8.altKey===undefined||_c8.altKey==evt.altKey)&&(_c8.metaKey===undefined||_c8.metaKey==(evt.metaKey||false))&&(_c8.shiftKey===undefined||_c8.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_c9,_c7,_ca,_c8,_cb,_cc,_cd);}else{if(dijit.typematic._obj==_c8){dijit.typematic.stop();}}}),dojo.connect(_c7,"onkeyup",this,function(evt){if(dijit.typematic._obj==_c8){dijit.typematic.stop();}})];},addMouseListener:function(_ce,_cf,_d0,_d1,_d2,_d3){var dc=dojo.connect;return [dc(_ce,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_cf,_ce,_d0,_ce,_d1,_d2,_d3);}),dc(_ce,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_ce,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_ce,"mousemove",this,function(evt){evt.preventDefault();}),dc(_ce,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_cf,_ce,_d0,_ce,_d1,_d2,_d3);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_d4,_d5,_d6,_d7,_d8,_d9,_da,_db){return this.addKeyListener(_d5,_d6,_d7,_d8,_d9,_da,_db).concat(this.addMouseListener(_d4,_d7,_d8,_d9,_da,_db));}};}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 _dc=cs.backgroundImage;var _dd=(cs.borderTopColor==cs.borderRightColor)||(_dc!=null&&(_dc=="none"||_dc=="url(invalid-url:)"));dojo[_dd?"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(_de,_df){var _e0=this.getWaiRole(_de);return _df?(_e0.indexOf(_df)>-1):(_e0.length>0);},getWaiRole:function(_e1){return dojo.trim((dojo.attr(_e1,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(_e2,_e3){var _e4=dojo.attr(_e2,"role")||"";if(!this._XhtmlRoles.test(_e4)){dojo.attr(_e2,"role",_e3);}else{if((" "+_e4+" ").indexOf(" "+_e3+" ")<0){var _e5=dojo.trim(_e4.replace(this._XhtmlRoles,""));var _e6=dojo.trim(_e4.replace(_e5,""));dojo.attr(_e2,"role",_e6+(_e6?" ":"")+_e3);}}},removeWaiRole:function(_e7,_e8){var _e9=dojo.attr(_e7,"role");if(!_e9){return;}if(_e8){var t=dojo.trim((" "+_e9+" ").replace(" "+_e8+" "," "));dojo.attr(_e7,"role",t);}else{_e7.removeAttribute("role");}},hasWaiState:function(_ea,_eb){return _ea.hasAttribute?_ea.hasAttribute("aria-"+_eb):!!_ea.getAttribute("aria-"+_eb);},getWaiState:function(_ec,_ed){return _ec.getAttribute("aria-"+_ed)||"";},setWaiState:function(_ee,_ef,_f0){_ee.setAttribute("aria-"+_ef,_f0);},removeWaiState:function(_f1,_f2){_f1.removeAttribute("aria-"+_f2);}});}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(_f3,_f4){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 _f5=dojo.date.stamp._isoRegExp.exec(_f3),_f6=null;if(_f5){_f5.shift();if(_f5[1]){_f5[1]--;}if(_f5[6]){_f5[6]*=1000;}if(_f4){_f4=new Date(_f4);dojo.forEach(dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_f7){return _f4["get"+_f7]();}),function(_f8,_f9){_f5[_f9]=_f5[_f9]||_f8;});}_f6=new Date(_f5[0]||1970,_f5[1]||0,_f5[2]||1,_f5[3]||0,_f5[4]||0,_f5[5]||0,_f5[6]||0);if(_f5[0]<100){_f6.setFullYear(_f5[0]||1970);}var _fa=0,_fb=_f5[7]&&_f5[7].charAt(0);if(_fb!="Z"){_fa=((_f5[8]||0)*60)+(Number(_f5[9])||0);if(_fb!="-"){_fa*=-1;}}if(_fb){_fa-=_f6.getTimezoneOffset();}if(_fa){_f6.setTime(_f6.getTime()+_fa*60000);}}return _f6;};dojo.date.stamp.toISOString=function(_fc,_fd){var _fe=function(n){return (n<10)?"0"+n:n;};_fd=_fd||{};var _ff=[],_100=_fd.zulu?"getUTC":"get",date="";if(_fd.selector!="time"){var year=_fc[_100+"FullYear"]();date=["0000".substr((year+"").length)+year,_fe(_fc[_100+"Month"]()+1),_fe(_fc[_100+"Date"]())].join("-");}_ff.push(date);if(_fd.selector!="date"){var time=[_fe(_fc[_100+"Hours"]()),_fe(_fc[_100+"Minutes"]()),_fe(_fc[_100+"Seconds"]())].join(":");var _101=_fc[_100+"Milliseconds"]();if(_fd.milliseconds){time+="."+(_101<100?"0":"")+_fe(_101);}if(_fd.zulu){time+="Z";}else{if(_fd.selector!="time"){var _102=_fc.getTimezoneOffset();var _103=Math.abs(_102);time+=(_102>0?"-":"+")+_fe(Math.floor(_103/60))+":"+_fe(_103%60);}}_ff.push(time);}return _ff.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 _104(_105){if(d.isString(_105)){return "string";}if(typeof _105=="number"){return "number";}if(typeof _105=="boolean"){return "boolean";}if(d.isFunction(_105)){return "function";}if(d.isArray(_105)){return "array";}if(_105 instanceof Date){return "date";}if(_105 instanceof d._Url){return "url";}return "object";};function _106(_107,type){switch(type){case "string":return _107;case "number":return _107.length?Number(_107):NaN;case "boolean":return typeof _107=="boolean"?_107:!(_107.toLowerCase()=="false");case "function":if(d.isFunction(_107)){_107=_107.toString();_107=d.trim(_107.substring(_107.indexOf("{")+1,_107.length-1));}try{if(_107===""||_107.search(/[^\w\.]+/i)!=-1){return new Function(_107);}else{return d.getObject(_107,false)||new Function(_107);}}catch(e){return new Function();}case "array":return _107?_107.split(/\s*,\s*/):[];case "date":switch(_107){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_107);}case "url":return d.baseUrl+_107;default:return d.fromJson(_107);}};var _108={};dojo.connect(dojo,"extend",function(){_108={};});function _109(_10a){if(!_108[_10a]){var cls=d.getObject(_10a);if(!cls){return null;}var _10b=cls.prototype;var _10c={},_10d={};for(var name in _10b){if(name.charAt(0)=="_"){continue;}if(name in _10d){continue;}var _10e=_10b[name];_10c[name]=_104(_10e);}_108[_10a]={cls:cls,params:_10c};}return _108[_10a];};this._functionFromScript=function(_10f){var _110="";var _111="";var _112=_10f.getAttribute("args");if(_112){d.forEach(_112.split(/\s*,\s*/),function(part,idx){_110+="var "+part+" = arguments["+idx+"]; ";});}var _113=_10f.getAttribute("with");if(_113&&_113.length){d.forEach(_113.split(/\s*,\s*/),function(part){_110+="with("+part+"){";_111+="}";});}return new Function(_110+_10f.innerHTML+_111);};this.instantiate=function(_114,_115,args){var _116=[],dp=dojo.parser;_115=_115||{};args=args||{};d.forEach(_114,function(obj){if(!obj){return;}var node,type,_117,_118,_119;if(obj.node){node=obj.node;type=obj.type;_117=obj.clsInfo||(type&&_109(type));_118=_117&&_117.cls;_119=obj.scripts;}else{node=obj;type=dp._attrName in _115?_115[dp._attrName]:node.getAttribute(dp._attrName);_117=type&&_109(type);_118=_117&&_117.cls;_119=(_118&&(_118._noScript||_118.prototype._noScript)?[]:d.query("> script[type^='dojo/']",node));}if(!_117){throw new Error("Could not load class '"+type);}var _11a={},_11b=node.attributes;if(args.defaults){dojo.mixin(_11a,args.defaults);}if(obj.inherited){dojo.mixin(_11a,obj.inherited);}for(var name in _117.params){var item=name in _115?{value:_115[name],specified:true}:_11b.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _11c=item.value;switch(name){case "class":_11c="className" in _115?_115.className:node.className;break;case "style":_11c="style" in _115?_115.style:(node.style&&node.style.cssText);}var _11d=_117.params[name];if(typeof _11c=="string"){_11a[name]=_106(_11c,_11d);}else{_11a[name]=_11c;}}var _11e=[],_11f=[];d.forEach(_119,function(_120){node.removeChild(_120);var _121=_120.getAttribute("event"),type=_120.getAttribute("type"),nf=d.parser._functionFromScript(_120);if(_121){if(type=="dojo/connect"){_11e.push({event:_121,func:nf});}else{_11a[_121]=nf;}}else{_11f.push(nf);}});var _122=_118.markupFactory||_118.prototype&&_118.prototype.markupFactory;var _123=_122?_122(_11a,node,_118):new _118(_11a,node);_116.push(_123);var _124=node.getAttribute("jsId");if(_124){d.setObject(_124,_123);}d.forEach(_11e,function(_125){d.connect(_123,_125.event,null,_125.func);});d.forEach(_11f,function(func){func.call(_123);});});if(!_115._started){d.forEach(_116,function(_126){if(!args.noStart&&_126&&_126.startup&&!_126._started&&(!_126.getParent||!_126.getParent())){_126.startup();}});}return _116;};this.parse=function(_127,args){var root;if(!args&&_127&&_127.rootNode){args=_127;root=args.rootNode;}else{root=_127;}var _128=this._attrName;function scan(_129,list){var _12a=dojo.clone(_129.inherited);dojo.forEach(["dir","lang"],function(name){var val=_129.node.getAttribute(name);if(val){_12a[name]=val;}});var _12b=_129.clsInfo&&!_129.clsInfo.cls.prototype._noScript?_129.scripts:null;var _12c=!_129.clsInfo||!_129.clsInfo.cls.prototype.stopParser;for(var _12d=_129.node.firstChild;_12d;_12d=_12d.nextSibling){if(_12d.nodeType==1){var type=_12c&&_12d.getAttribute(_128);if(type){var _12e={"type":type,clsInfo:_109(type),node:_12d,scripts:[],inherited:_12a};list.push(_12e);scan(_12e,list);}else{if(_12b&&_12d.nodeName.toLowerCase()=="script"){type=_12d.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_12b.push(_12d);}}else{if(_12c){scan({node:_12d,inherited:_12a},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 _12f=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,_12f);}else{dojo._loaders.unshift(_12f);}})();}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"_connect",function(_130,_131){if(_130&&dojo.isFunction(_130._onConnect)){_130._onConnect(_131);}});dijit._connectOnUseEventHandler=function(_132){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var _133=function(evt){dijit._lastKeyDownNode=evt.srcElement;};dojo.doc.attachEvent("onkeydown",_133);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",_133);});})();}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target;},true);}(function(){var _134={},_135=function(_136){var dc=_136.declaredClass;if(!_134[dc]){var r=[],_137,_138=_136.constructor.prototype;for(var _139 in _138){if(dojo.isFunction(_138[_139])&&(_137=_139.match(/^_set([a-zA-Z]*)Attr$/))&&_137[1]){r.push(_137[1].charAt(0).toLowerCase()+_137[1].substr(1));}}_134[dc]=r;}return _134[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(_13a,_13b){this.create(_13a,_13b);},create:function(_13c,_13d){this.srcNodeRef=dojo.byId(_13d);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(_13c){this.params=_13c;dojo.mixin(this,_13c);}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 _13e=this.srcNodeRef;if(_13e&&_13e.parentNode){_13e.parentNode.replaceChild(this.domNode,_13e);}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 _13f=function(attr,_140){if((_140.params&&attr in _140.params)||_140[attr]){_140.set(attr,_140[attr]);}};for(var attr in this.attributeMap){_13f(attr,this);}dojo.forEach(_135(this),function(a){if(!(a in this.attributeMap)){_13f(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){if(this.baseClass){var _141=this.baseClass.split(" ");if(!this.isLeftToRight()){_141=_141.concat(dojo.map(_141,function(name){return name+"Rtl";}));}dojo.addClass(this.domNode,_141);}},startup:function(){this._started=true;},destroyRecursive:function(_142){this._beingDestroyed=true;this.destroyDescendants(_142);this.destroy(_142);},destroy:function(_143){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_144){dfe(_144,d.disconnect);});dfe(this._subscribes,function(_145){dun(_145);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_143);dijit.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_146){if(this.bgIframe){this.bgIframe.destroy(_146);delete this.bgIframe;}if(this.domNode){if(_146){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_146){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_147){dojo.forEach(this.getChildren(),function(_148){if(_148.destroyRecursive){_148.destroyRecursive(_147);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_149){if(_149 in this._deferredConnects){var _14a=this[this._deferredConnects[_149]||"domNode"];this.connect(_14a,_149.toLowerCase(),_149);delete this._deferredConnects[_149];}},_setClassAttr:function(_14b){var _14c=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_14c,this["class"]);this["class"]=_14b;dojo.addClass(_14c,_14b);},_setStyleAttr:function(_14d){var _14e=this[this.attributeMap.style||"domNode"];if(dojo.isObject(_14d)){dojo.style(_14e,_14d);}else{if(_14e.style.cssText){_14e.style.cssText+="; "+_14d;}else{_14e.style.cssText=_14d;}}this.style=_14d;},setAttribute:function(attr,_14f){dojo.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_14f);},_attrToDom:function(attr,_150){var _151=this.attributeMap[attr];dojo.forEach(dojo.isArray(_151)?_151:[_151],function(_152){var _153=this[_152.node||_152||"domNode"];var type=_152.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_150)){_150=dojo.hitch(this,_150);}var _154=_152.attribute?_152.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(_153,_154,_150);break;case "innerText":_153.innerHTML="";_153.appendChild(dojo.doc.createTextNode(_150));break;case "innerHTML":_153.innerHTML=_150;break;case "class":dojo.removeClass(_153,this[attr]);dojo.addClass(_153,_150);break;}},this);this[attr]=_150;},attr:function(name,_155){if(dojo.config.isDebug){var _156=arguments.callee._ach||(arguments.callee._ach={}),_157=(arguments.callee.caller||"unknown caller").toString();if(!_156[_157]){dojo.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_157,"","2.0");_156[_157]=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 _158=this._getAttrNames(name);return this[_158.g]?this[_158.g]():this[name];},set:function(name,_159){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _15a=this._getAttrNames(name);if(this[_15a.s]){var _15b=this[_15a.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(name in this.attributeMap){this._attrToDom(name,_159);}var _15c=this[name];this[name]=_159;}return _15b||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,_15d,_15e){var d=dojo,dc=d._connect,_15f=[];if(_15d=="ondijitclick"){if(dojo.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){var m=d.hitch(this,_15e);_15f.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);}}));}_15d="onclick";}_15f.push(dc(obj,_15d,this,_15e));this._connects.push(_15f);return _15f;},disconnect:function(_160){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_160){dojo.forEach(_160,dojo.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_161,_162){var d=dojo,_163=d.subscribe(_161,this,_162);this._subscribes.push(_163);return _163;},unsubscribe:function(_164){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_164){dojo.unsubscribe(_164);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(_165,_166){if(_165.declaredClass&&_165.addChild){_165.addChild(this,_166);}else{dojo.place(this.domNode,_165,_166);}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(_167,map,_168,_169){_169=_169||dojo.global;_168=_168?dojo.hitch(_169,_168):function(v){return v;};return _167.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_16a,key,_16b){var _16c=dojo.getObject(key,false,map);if(_16b){_16c=dojo.getObject(_16b,false,_169).call(_169,_16c,key);}return _168(_16c,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 _16d={};dojo.cache=function(_16e,url,_16f){if(typeof _16e=="string"){var _170=dojo.moduleUrl(_16e,url);}else{_170=_16e;_16f=url;}var key=_170.toString();var val=_16f;if(_16f!=undefined&&!dojo.isString(_16f)){val=("value" in _16f?_16f.value:undefined);}var _171=_16f&&_16f.sanitize?true:false;if(typeof val=="string"){val=_16d[key]=_171?dojo.cache._sanitize(val):val;}else{if(val===null){delete _16d[key];}else{if(!(key in _16d)){val=dojo._getText(key);_16d[key]=_171?dojo.cache._sanitize(val):val;}val=_16d[key];}}return val;};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _172=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_172){val=_172[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 _173=this.declaredClass,_174=this;return dojo.string.substitute(tmpl,this,function(_175,key){if(key.charAt(0)=="!"){_175=dojo.getObject(key.substr(1),false,_174);}if(typeof _175=="undefined"){throw new Error(_173+" template:"+key);}if(_175==null){return "";}return key.charAt(0)=="!"?_175:_175.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _176=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_176)){node=dojo._toDom(this._stringRepl(_176));if(node.nodeType!=1){throw new Error("Invalid template: "+_176);}}else{node=_176.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var _177=dojo.parser,qry,attr;if(_177._query!="[dojoType]"){qry=_177._query;attr=_177._attrName;_177._query="[dojoType]";_177._attrName="dojoType";}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}}));if(qry){_177._query=qry;_177._attrName=attr;}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_178){var dest=this.containerNode;if(_178&&dest){while(_178.hasChildNodes()){dest.appendChild(_178.firstChild);}}},_attachTemplateNodes:function(_179,_17a){_17a=_17a||function(n,p){return n.getAttribute(p);};var _17b=dojo.isArray(_179)?_179:(_179.all||_179.getElementsByTagName("*"));var x=dojo.isArray(_179)?0:-1;for(;x<_17b.length;x++){var _17c=(x==-1)?_179:_17b[x];if(this.widgetsInTemplate&&_17a(_17c,"dojoType")){continue;}var _17d=_17a(_17c,"dojoAttachPoint");if(_17d){var _17e,_17f=_17d.split(/\s*,\s*/);while((_17e=_17f.shift())){if(dojo.isArray(this[_17e])){this[_17e].push(_17c);}else{this[_17e]=_17c;}this._attachPoints.push(_17e);}}var _180=_17a(_17c,"dojoAttachEvent");if(_180){var _181,_182=_180.split(/\s*,\s*/);var trim=dojo.trim;while((_181=_182.shift())){if(_181){var _183=null;if(_181.indexOf(":")!=-1){var _184=_181.split(":");_181=trim(_184[0]);_183=trim(_184[1]);}else{_181=trim(_181);}if(!_183){_183=_181;}this.connect(_17c,_181,_183);}}}var role=_17a(_17c,"waiRole");if(role){dijit.setWaiRole(_17c,role);}var _185=_17a(_17c,"waiState");if(_185){dojo.forEach(_185.split(/\s*,\s*/),function(_186){if(_186.indexOf("-")!=-1){var pair=_186.split("-");dijit.setWaiState(_17c,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(_187){delete this[_187];},this);this._attachPoints=[];this.inherited(arguments);}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_188,_189,_18a){var _18b=dijit._Templated._templateCache;var key=_189||_188;var _18c=_18b[key];if(_18c){try{if(!_18c.ownerDocument||_18c.ownerDocument==dojo.doc){return _18c;}}catch(e){}dojo.destroy(_18c);}if(!_189){_189=dojo.cache(_188,{sanitize:true});}_189=dojo.string.trim(_189);if(_18a||_189.match(/\$\{([^\}]+)\}/g)){return (_18b[key]=_189);}else{var node=dojo._toDom(_189);if(node.nodeType!=1){throw new Error("Invalid template: "+_189);}return (_18b[key]=node);}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _18d=dijit._Templated._templateCache;for(var key in _18d){var _18e=_18d[key];if(typeof _18e=="object"){dojo.destroy(_18e);}delete _18d[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(_18f,_190){var _191=this.containerNode;if(_190&&typeof _190=="number"){var _192=this.getChildren();if(_192&&_192.length>=_190){_191=_192[_190-1].domNode;_190="after";}}dojo.place(_18f.domNode,_191,_190);if(this._started&&!_18f._started){_18f.startup();}},removeChild:function(_193){if(typeof _193=="number"&&_193>0){_193=this.getChildren()[_193];}if(_193){var node=_193.domNode;if(node&&node.parentNode){node.parentNode.removeChild(node);}}},hasChildren:function(){return this.getChildren().length>0;},destroyDescendants:function(_194){dojo.forEach(this.getChildren(),function(_195){_195.destroyRecursive(_194);});},_getSiblingOfChild:function(_196,dir){var node=_196.domNode,_197=(dir>0?"nextSibling":"previousSibling");do{node=node[_197];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node&&dijit.byNode(node);},getIndexOfChild:function(_198){return dojo.indexOf(this.getChildren(),_198);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_199){_199.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 _19a=dijit.getEnclosingWidget(this.domNode.parentNode);return _19a&&_19a.isContainer?_19a:null;},_getSibling:function(_19b){var node=this.domNode;do{node=node[_19b+"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 _19c=this.getParent&&this.getParent();if(!(_19c&&_19c.isLayoutContainer)){this.resize();this.connect(dojo.isIE?this.domNode:dojo.global,"onresize",function(){this.resize();});}},resize:function(_19d,_19e){var node=this.domNode;if(_19d){dojo.marginBox(node,_19d);if(_19d.t){node.style.top=_19d.t+"px";}if(_19d.l){node.style.left=_19d.l+"px";}}var mb=_19e||{};dojo.mixin(mb,_19d||{});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(_19f){dojo.addClass(_19f.domNode,this.baseClass+"-child");if(_19f.baseClass){dojo.addClass(_19f.domNode,this.baseClass+"-"+_19f.baseClass);}},addChild:function(_1a0,_1a1){this.inherited(arguments);if(this._started){this._setupChild(_1a0);}},removeChild:function(_1a2){dojo.removeClass(_1a2.domNode,this.baseClass+"-child");if(_1a2.baseClass){dojo.removeClass(_1a2.domNode,this.baseClass+"-"+_1a2.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 _1a3=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_1a4,dim){var _1a5=_1a4.resize?_1a4.resize(dim):dojo.marginBox(_1a4.domNode,dim);if(_1a5){dojo.mixin(_1a4,_1a5);}else{dojo.mixin(_1a4,dojo.marginBox(_1a4.domNode));dojo.mixin(_1a4,dim);}};dijit.layout.layoutChildren=function(_1a6,dim,_1a7){dim=dojo.mixin({},dim);dojo.addClass(_1a6,"dijitLayoutContainer");_1a7=dojo.filter(_1a7,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_1a7,function(item){return item.layoutAlign=="client";}));dojo.forEach(_1a7,function(_1a8){var elm=_1a8.domNode,pos=_1a8.layoutAlign;var _1a9=elm.style;_1a9.left=dim.l+"px";_1a9.top=dim.t+"px";_1a9.position="absolute";dojo.addClass(elm,"dijitAlign"+_1a3(pos));if(pos=="top"||pos=="bottom"){size(_1a8,{w:dim.w});dim.h-=_1a8.h;if(pos=="top"){dim.t+=_1a8.h;}else{_1a9.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_1a8,{h:dim.h});dim.w-=_1a8.w;if(pos=="left"){dim.l+=_1a8.w;}else{_1a9.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_1a8,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,_1aa){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(_1ab){if(!this.disabled){switch(_1ab.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 _1ac=this.connect(dojo.body(),"onmouseup",function(){this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_1ac);});break;}this._setStateClass();}},_setStateClass:function(){var _1ad=this.baseClass.split(" ");function _1ae(_1af){_1ad=_1ad.concat(dojo.map(_1ad,function(c){return c+_1af;}),"dijit"+_1af);};if(!this.isLeftToRight()){_1ae("Rtl");}if(this.checked){_1ae("Checked");}if(this.state){_1ae(this.state);}if(this.selected){_1ae("Selected");}if(this.disabled){_1ae("Disabled");}else{if(this.readOnly){_1ae("ReadOnly");}else{if(this._active){_1ae("Active");}else{if(this._hovering){_1ae("Hover");}}}}if(this._focused){_1ae("Focused");}var tn=this.stateNode||this.domNode,_1b0={};dojo.forEach(tn.className.split(" "),function(c){_1b0[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _1b0[c];});}dojo.forEach(_1ad,function(c){_1b0[c]=true;});var _1b1=[];for(var c in _1b0){_1b1.push(c);}tn.className=_1b1.join(" ");this._stateClasses=_1ad;},_trackMouseState:function(node,_1b2){var _1b3=false,_1b4=false,_1b5=false;var self=this,cn=dojo.hitch(this,"connect",node);function _1b6(){var _1b7=("disabled" in self&&self.disabled)||("readonly" in self&&self.readonly);dojo.toggleClass(node,_1b2+"Hover",_1b3&&!_1b4&&!_1b7);dojo.toggleClass(node,_1b2+"Active",_1b4&&!_1b7);dojo.toggleClass(node,_1b2+"Focused",_1b5&&!_1b7);};cn("onmouseenter",function(){_1b3=true;_1b6();});cn("onmouseleave",function(){_1b3=false;_1b4=false;_1b6();});cn("onmousedown",function(){_1b4=true;_1b6();});cn("onmouseup",function(){_1b4=false;_1b6();});cn("onfocus",function(){_1b5=true;_1b6();});cn("onblur",function(){_1b5=false;_1b6();});this.connect(this,"set",function(name,_1b8){if(name=="disabled"||name=="readOnly"){_1b6();}});}});}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(_1b9){this.disabled=_1b9;dojo.attr(this.focusNode,"disabled",_1b9);if(this.valueNode){dojo.attr(this.valueNode,"disabled",_1b9);}dijit.setWaiState(this.focusNode,"disabled",_1b9);if(_1b9){this._hovering=false;this._active=false;var _1ba="tabIndex" in this.attributeMap?this.attributeMap.tabIndex:"focusNode";dojo.forEach(dojo.isArray(_1ba)?_1ba:[_1ba],function(_1bb){var node=this[_1bb];if(dojo.isWebKit||dijit.hasDefaultTabStop(node)){node.setAttribute("tabIndex","-1");}else{node.removeAttribute("tabIndex");}},this);}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}},setDisabled:function(_1bc){dojo.deprecated("setDisabled("+_1bc+") is deprecated. Use set('disabled',"+_1bc+") instead.","","2.0");this.set("disabled",_1bc);},_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(_1bd){},_onChangeActive:false,_handleOnChange:function(_1be,_1bf){this._lastValue=_1be;if(this._lastValueReported==undefined&&(_1bf===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_1be;}if((this.intermediateChanges||_1bf||_1bf===undefined)&&((typeof _1be!=typeof this._lastValueReported)||this.compare(_1be,this._lastValueReported)!=0)){this._lastValueReported=_1be;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);}this._onChangeHandle=setTimeout(dojo.hitch(this,function(){this._onChangeHandle=null;this.onChange(_1be);}),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(_1c0){dojo.deprecated("dijit.form._FormWidget:setValue("+_1c0+") is deprecated.  Use set('value',"+_1c0+") instead.","","2.0");this.set("value",_1c0);},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 _1c1=this.connect(dojo.body(),"onmouseup",function(){if(this.isFocusable()){this.focus();}this.disconnect(_1c1);});}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_1c2){this.readOnly=_1c2;dojo.attr(this.focusNode,"readOnly",_1c2);dijit.setWaiState(this.focusNode,"readonly",_1c2);},postCreate:function(){this.inherited(arguments);if(dojo.isIE<9||(dojo.isIE&&dojo.isQuirks)){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_1c3,_1c4){this.value=_1c3;this._handleOnChange(_1c3,_1c4);},_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 _1c5=this.domNode;var _1c6=_1c5.parentNode;var _1c7=_1c5.firstChild||_1c5;var _1c8=_1c7.style.filter;var _1c9=this;while(_1c6&&_1c6.clientHeight==0){(function ping(){var _1ca=_1c9.connect(_1c6,"onscroll",function(e){_1c9.disconnect(_1ca);_1c7.style.filter=(new Date()).getMilliseconds();setTimeout(function(){_1c7.style.filter=_1c8;},0);});})();_1c6=_1c6.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(_1cb,_1cc){var _1cd=(this._keyNavCodes={});var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_1cb,function(code){_1cd[code]=prev;});dojo.forEach(_1cc,function(code){_1cd[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(_1ce,_1cf){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_1ce);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){var _1d0=this._getFirstFocusableChild();if(_1d0){this.focusChild(_1d0);}},focusNext:function(){var _1d1=this._getNextFocusableChild(this.focusedChild,1);this.focusChild(_1d1);},focusPrev:function(){var _1d2=this._getNextFocusableChild(this.focusedChild,-1);this.focusChild(_1d2,true);},focusChild:function(_1d3,last){if(this.focusedChild&&_1d3!==this.focusedChild){this._onChildBlur(this.focusedChild);}_1d3.focus(last?"end":"start");this.focusedChild=_1d3;},_startupChild:function(_1d4){_1d4.set("tabIndex","-1");this.connect(_1d4,"_onFocus",function(){_1d4.set("tabIndex",this.tabIndex);});this.connect(_1d4,"_onBlur",function(){_1d4.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(_1d5){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_1d6,dir){if(_1d6){_1d6=this._getSiblingOfChild(_1d6,dir);}var _1d7=this.getChildren();for(var i=0;i<_1d7.length;i++){if(!_1d6){_1d6=_1d7[(dir>0)?0:(_1d7.length-1)];}if(_1d6.isFocusable()){return _1d6;}_1d6=this._getSiblingOfChild(_1d6,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(_1d8){if(_1d8&&!("label" in this.params)){this.set("label",_1d8.innerHTML);}},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.domNode,false);var _1d9=this.id+"_text";dojo.attr(this.containerNode,"id",_1d9);if(this.accelKeyNode){dojo.attr(this.accelKeyNode,"id",this.id+"_accel");_1d9+=" "+this.id+"_accel";}dijit.setWaiState(this.domNode,"labelledby",_1d9);},_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(_1da){dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_1da);},setLabel:function(_1db){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_1db);},setDisabled:function(_1dc){dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_1dc);},_setDisabledAttr:function(_1dd){this.disabled=_1dd;dijit.setWaiState(this.focusNode,"disabled",_1dd?"true":"false");},_setAccelKeyAttr:function(_1de){this.accelKey=_1de;this.accelKeyNode.style.display=_1de?"":"none";this.accelKeyNode.innerHTML=_1de;dojo.attr(this.containerNode,"colSpan",_1de?"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 _1df=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_1df[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(_1e0){dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_1e0);dijit.setWaiState(this.domNode,"checked",_1e0);this.checked=_1e0;},onChange:function(_1e1){},_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(_1e2){_1e2.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_1e3){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _1e4=this._getTopMenu();if(_1e4&&_1e4._isMenuBar){_1e4.focusNext();}}},_onPopupHover:function(evt){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _1e5=this.currentPopup.parentMenu;if(_1e5.focusedChild){_1e5.focusedChild._setSelected(false);}_1e5.focusedChild=this.currentPopup.from_item;_1e5.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 _1e6=item.popup;if(_1e6){this._stopPendingCloseTimer(_1e6);_1e6._pendingClose_timer=setTimeout(function(){_1e6._pendingClose_timer=null;if(_1e6.parentMenu){_1e6.parentMenu.currentPopup=null;}dijit.popup.close(_1e6);},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(_1e7){if(_1e7._pendingClose_timer){clearTimeout(_1e7._pendingClose_timer);_1e7._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 _1e8=this.focusedChild;if(!_1e8){return;}var _1e9=_1e8.popup;if(_1e9.isShowingNow){return;}if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);dijit.popup.close(this.currentPopup);}_1e9.parentMenu=this;_1e9.from_item=_1e8;var self=this;dijit.popup.open({parent:this,popup:_1e9,around:_1e8.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(_1e8);self._cleanUp();_1e8._setSelected(true);self.focusedChild=_1e8;},onExecute:dojo.hitch(this,"_cleanUp")});this.currentPopup=_1e9;_1e9.connect(_1e9.domNode,"onmouseenter",dojo.hitch(self,"_onPopupHover"));if(_1e9.focus){_1e9._focus_timer=setTimeout(dojo.hitch(_1e9,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(_1ea){var win=dojo.window.get(this._iframeContentDocument(_1ea))||this._iframeContentDocument(_1ea)["__parent__"]||(_1ea.name&&dojo.doc.frames[_1ea.name])||null;return win;},_iframeContentDocument:function(_1eb){var doc=_1eb.contentDocument||(_1eb.contentWindow&&_1eb.contentWindow.document)||(_1eb.name&&dojo.doc.frames[_1eb.name]&&dojo.doc.frames[_1eb.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var cn;if(node.tagName.toLowerCase()=="iframe"){var _1ec=node,win=this._iframeContentWindow(_1ec);cn=dojo.withGlobal(win,dojo.body);}else{cn=(node==dojo.body()?dojo.doc.documentElement:node);}var _1ed={node:node,iframe:_1ec};dojo.attr(node,"_dijitMenu"+this.id,this._bindings.push(_1ed));var _1ee=dojo.hitch(this,function(cn){return [dojo.connect(cn,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(evt){dojo.stopEvent(evt);this._scheduleOpen(evt.target,_1ec,{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,_1ec);}})];});_1ed.connects=cn?_1ee(cn):[];if(_1ec){_1ed.onloadHandler=dojo.hitch(this,function(){var win=this._iframeContentWindow(_1ec);cn=dojo.withGlobal(win,dojo.body);_1ed.connects=_1ee(cn);});if(_1ec.addEventListener){_1ec.addEventListener("load",_1ed.onloadHandler,false);}else{_1ec.attachEvent("onload",_1ed.onloadHandler);}}},unBindDomNode:function(_1ef){var node;try{node=dojo.byId(_1ef);}catch(e){return;}var _1f0="_dijitMenu"+this.id;if(node&&dojo.hasAttr(node,_1f0)){var bid=dojo.attr(node,_1f0)-1,b=this._bindings[bid];dojo.forEach(b.connects,dojo.disconnect);var _1f1=b.iframe;if(_1f1){if(_1f1.removeEventListener){_1f1.removeEventListener("load",b.onloadHandler,false);}else{_1f1.detachEvent("onload",b.onloadHandler);}}dojo.removeAttr(node,_1f0);delete this._bindings[bid];}},_scheduleOpen:function(_1f2,_1f3,_1f4){if(!this._openTimer){this._openTimer=setTimeout(dojo.hitch(this,function(){delete this._openTimer;this._openMyself({target:_1f2,iframe:_1f3,coords:_1f4});}),1);}},_openMyself:function(args){var _1f5=args.target,_1f6=args.iframe,_1f7=args.coords;if(_1f7){if(_1f6){var od=_1f5.ownerDocument,ifc=dojo.position(_1f6,true),win=this._iframeContentWindow(_1f6),_1f8=dojo.withGlobal(win,"_docScroll",dojo);var cs=dojo.getComputedStyle(_1f6),tp=dojo._toPixelValue,left=(dojo.isIE&&dojo.isQuirks?0:tp(_1f6,cs.paddingLeft))+(dojo.isIE&&dojo.isQuirks?tp(_1f6,cs.borderLeftWidth):0),top=(dojo.isIE&&dojo.isQuirks?0:tp(_1f6,cs.paddingTop))+(dojo.isIE&&dojo.isQuirks?tp(_1f6,cs.borderTopWidth):0);_1f7.x+=ifc.x+left-_1f8.x;_1f7.y+=ifc.y+top-_1f8.y;}}else{_1f7=dojo.position(_1f5,true);_1f7.x+=10;_1f7.y+=10;}var self=this;var _1f9=dijit.getFocus(this);function _1fa(){if(self.refocus){dijit.focus(_1f9);}dijit.popup.close(self);};dijit.popup.open({popup:this,x:_1f7.x,y:_1f7.y,onExecute:_1fa,onCancel:_1fa,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 _1fb={"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 _1fb){ds.fontSize=p;_1fb[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}dojo.body().removeChild(div);div=null;return _1fb;};var _1fc=null;dhm.getCachedFontMeasurements=function(_1fd){if(_1fd||!_1fc){_1fc=dhm.getFontMeasurements();}return _1fc;};var _1fe=null,_1ff={};dhm.getTextBox=function(text,_200,_201){var m,s;if(!_1fe){m=_1fe=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=_1fe;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_200){for(var i in _200){if(i in _1ff){continue;}s[i]=_200[i];}}if(arguments.length>2&&_201){m.className=_201;}m.innerHTML=text;var box=dojo.position(m);box.w=m.parentNode.scrollWidth;return box;};var _202={w:16,h:16};dhm.getScrollbar=function(){return {w:_202.w,h:_202.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_203){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);_202.w=n.offsetWidth-n.clientWidth;_202.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(_204,_205){if(_205>=0){var s=_204.style;var v=_205+"px";if(_204&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_206,_207,_208,_209){var evts=(_209?_209:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_207.connect(_206,"on"+evts[i],_208);}};dgu.removeNode=function(_20a){_20a=dojo.byId(_20a);_20a&&_20a.parentNode&&_20a.parentNode.removeChild(_20a);return _20a;};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(_20b,_20c,_20d){if(_20b.length<=_20c){_20b[_20c]=_20d;}else{_20b.splice(_20c,0,_20d);}};dgu.arrayRemove=function(_20e,_20f){_20e.splice(_20f,1);};dgu.arraySwap=function(_210,inI,inJ){var _211=_210[inI];_210[inI]=_210[inJ];_210[inJ]=_211;};})();}if(!dojo._hasResource["dojox.grid._Scroller"]){dojo._hasResource["dojox.grid._Scroller"]=true;dojo.provide("dojox.grid._Scroller");(function(){var _212=function(_213){var i=0,n,p=_213.parentNode;while((n=p.childNodes[i++])){if(n==_213){return i-1;}}return -1;};var _214=function(_215){if(!_215){return;}var _216=function(inW){return inW.domNode&&dojo.isDescendant(inW.domNode,_215,true);};var ws=dijit.registry.filter(_216);for(var i=0,w;(w=ws[i]);i++){w.destroy();}delete ws;};var _217=function(_218){var node=dojo.byId(_218);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _219=function(_21a,_21b){var _21c=[];var i=0,n;while((n=_21a.childNodes[i])){i++;if(_217(n)==_21b){_21c.push(n);}}return _21c;};var _21d=function(_21e){return _219(_21e,"div");};dojo.declare("dojox.grid._Scroller",null,{constructor:function(_21f){this.setContentNodes(_21f);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(_220,_221,_222){switch(arguments.length){case 3:this.rowsPerPage=_222;case 2:this.keepRows=_221;case 1:this.rowCount=_220;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(_223,_224){return _223?(Math.ceil(_223/_224)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_225){this.keepRows=_225;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_226){this.contentNodes=_226;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(_227){this.invalidateNodes();this.rowCount=_227;var _228=this.pageCount;if(_228===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_228){for(var i=_228-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_228){this.height+=this.defaultPageHeight*(this.pageCount-_228-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_229){return Boolean(this.getDefaultPageNode(_229));},measurePage:function(_22a){if(this.grid.rowHeight){var _22b=this.grid.rowHeight+1;return ((_22a+1)*this.rowsPerPage>this.rowCount?this.rowCount-_22a*this.rowsPerPage:this.rowsPerPage)*_22b;}var n=this.getDefaultPageNode(_22a);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_22c,_22d){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_22c].style.top=_22d+"px";}},repositionPages:function(_22e){var _22f=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=_22f[_22e];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_22e):0);for(var p=_22e+1;p<=last;p++){n=_22f[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_230){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_230]);}},preparePage:function(_231,_232){var p=(_232?this.popPage():null);for(var i=0;i<this.colCount;i++){var _233=this.pageNodes[i];var _234=(p===null?this.createPageNode():this.invalidatePageNode(p,_233));_234.pageIndex=_231;_233[_231]=_234;}},renderPage:function(_235){var _236=[];var i,j;for(i=0;i<this.colCount;i++){_236[i]=this.pageNodes[i][_235];}for(i=0,j=_235*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_236);}},removePage:function(_237){for(var i=0,j=_237*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_238){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_238,this.pageNodes[i]);if(n){dojo.destroy(n);}}},pacify:function(_239){},pacifying:false,pacifyTicks:200,setPacifying:function(_23a){if(this.pacifying!=_23a){this.pacifying=_23a;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _23b=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _23b;},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 _23c=(!this._invalidating);if(!_23c){var ah=this.grid.attr("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_23c=true;}}if(_23c){this.needPage(this.page,this.pageTop);}var _23d=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _23e=this.getPageHeight(this.page);this.averageRowHeight=(_23e>0&&_23d>0)?(_23e/_23d):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _23f=this.pageCount-1;var _240=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_23f]=_240;return _240;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_241,_242){if(this.pageExists(_241)){var oh=this.getPageHeight(_241);var h=(this.measurePage(_241));if(h===undefined){h=oh;}this.pageHeights[_241]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.attr("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_242)){this.grid.sizeChange();}else{this.repositionPages(_241);}}return h;}return 0;},rowHeightChanged:function(_243){this.updatePageHeight(Math.floor(_243/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(_244){var ph=this.pageHeights[_244];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_245){return this.stack.push(_245);},popPage:function(){return this.stack.shift();},findPage:function(_246){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_246){break;}}this.page=i;this.pageTop=h;},buildPage:function(_247,_248,_249){this.preparePage(_247,_248);this.positionPage(_247,_249);this.installPage(_247);this.renderPage(_247);this.pushPage(_247);},needPage:function(_24a,_24b){var h=this.getPageHeight(_24a),oh=h;if(!this.pageExists(_24a)){this.buildPage(_24a,this.keepPages&&(this.stack.length>=this.keepPages),_24b);h=this.updatePageHeight(_24a,true);}else{this.positionPage(_24a,_24b);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_24c){this.grid.scrollTop=_24c;if(this.colCount){this.startPacify();this.findPage(_24c);var h=this.height;var b=this.getScrollBottom(_24c);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,_24c);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_24d){return (this.windowHeight>=0?_24d+this.windowHeight:-1);},processNodeEvent:function(e,_24e){var t=e.target;while(t&&(t!=_24e)&&t.parentNode&&(t.parentNode.parentNode!=_24e)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_24e)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_212(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_24f,_250){},removeRow:function(_251){},getDefaultPageNode:function(_252){return this.getDefaultNodes()[_252];},positionPageNode:function(_253,_254){},getPageNodePosition:function(_255){return _255.offsetTop;},invalidatePageNode:function(_256,_257){var p=_257[_256];if(p){delete _257[_256];this.removePage(_256,p);_214(p);p.innerHTML="";}return p;},getPageRow:function(_258){return _258*this.rowsPerPage;},getLastPageRow:function(_259){return Math.min(this.rowCount,this.getPageRow(_259+1))-1;},getFirstVisibleRow:function(_25a,_25b,_25c){if(!this.pageExists(_25a)){return 0;}var row=this.getPageRow(_25a);var _25d=this.getDefaultNodes();var rows=_21d(_25d[_25a]);for(var i=0,l=rows.length;i<l&&_25b<_25c;i++,row++){_25b+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_25e,_25f,_260){if(!this.pageExists(_25e)){return 0;}var _261=this.getDefaultNodes();var row=this.getLastPageRow(_25e);var rows=_21d(_261[_25e]);for(var i=rows.length-1;i>=0&&_25f>_260;i--,row--){_25f-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_262){var _263=this.getDefaultNodes();var rows=_21d(_263[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_262){this.offset=h-(t-_262);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_264){var _265=Math.floor(_264/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_265;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.needPage(_265,this.pageTop);var _266=this.getDefaultNodes();var rows=_21d(_266[_265]);var r=_264-this.rowsPerPage*_265;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 _267=function(_268){try{dojox.grid.util.fire(_268,"focus");dojox.grid.util.fire(_268,"select");}catch(e){}};var _269=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(_26a){this._props=_26a||{};dojo.mixin(this,_26a);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_26b,_26c){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_26b!=this.defaultValue&&f)?f.apply(s,_26c):_26b;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(_26d,_26e){var f,i=this.grid.edit.info,d=this.get?this.get(_26d,_26e):(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==_26d&&i.cell==this))){return this.formatEditing(d,_26d);}else{return this._defaultFormat(d,[d,_26d,this]);}},formatEditing:function(_26f,_270){},getNode:function(_271){return this.view.getCellNode(_271,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_272){return (this.getNode(_272)||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(_273,_274){this.grid.edit.applyCellEdit(_273,this,_274);},cancelEdit:function(_275){this.grid.doCancelEdit(_275);},_onEditBlur:function(_276){if(this.grid.edit.isEditCell(_276,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_277,_278){if(this.commitOnBlur){dojo.connect(_277,"onblur",function(e){setTimeout(dojo.hitch(this,"_onEditBlur",_278),250);});}},needFormatNode:function(_279,_27a){this._formatPending=true;_269(this,"_formatNode",_279,_27a);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_27b,_27c){if(this._formatPending){this._formatPending=false;dojo.setSelectable(this.grid.domNode,true);this.formatNode(this.getEditNode(_27c),_27b,_27c);}},formatNode:function(_27d,_27e,_27f){if(dojo.isIE){_269(this,"focus",_27f,_27d);}else{this.focus(_27f,_27d);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_280){return this.getEditNode(_280)[this._valueProp];},setValue:function(_281,_282){var n=this.getEditNode(_281);if(n){n[this._valueProp]=_282;}},focus:function(_283,_284){_267(_284||this.getEditNode(_283));},save:function(_285){this.value=this.value||this.getValue(_285);},restore:function(_286){this.setValue(_286,this.value);},_finish:function(_287){dojo.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_288){this.applyEdit(this.getValue(_288),_288);this._finish(_288);},cancel:function(_289){this.cancelEdit(_289);this._finish(_289);}});dgc._Base.markupFactory=function(node,_28a){var d=dojo;var _28b=d.trim(d.attr(node,"formatter")||"");if(_28b){_28a.formatter=dojo.getObject(_28b)||_28b;}var get=d.trim(d.attr(node,"get")||"");if(get){_28a.get=dojo.getObject(get);}var _28c=function(attr,cell,_28d){var _28e=d.trim(d.attr(node,attr)||"");if(_28e){cell[_28d||attr]=!(_28e.toLowerCase()=="false");}};_28c("sortDesc",_28a);_28c("editable",_28a);_28c("alwaysEditing",_28a);_28c("noresize",_28a);_28c("draggable",_28a);var _28f=d.trim(d.attr(node,"loadingText")||d.attr(node,"defaultValue")||"");if(_28f){_28a.defaultValue=_28f;}var _290=function(attr,cell,_291){var _292=d.trim(d.attr(node,attr)||"")||undefined;if(_292){cell[_291||attr]=_292;}};_290("styles",_28a);_290("headerStyles",_28a);_290("cellStyles",_28a);_290("classes",_28a);_290("headerClasses",_28a);_290("cellClasses",_28a);};dojo.declare("dojox.grid.cells.Cell",dgc._Base,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_293,_294){this.needFormatNode(_293,_294);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_293+"\">";},formatNode:function(_295,_296,_297){this.inherited(arguments);this.registerOnBlur(_295,_297);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){dojo.stopEvent(e);}}},_finish:function(_298){this.inherited(arguments);var n=this.getEditNode(_298);try{dojox.grid.util.fire(n,"blur");}catch(e){}}});dgc.Cell.markupFactory=function(node,_299){dgc._Base.markupFactory(node,_299);var d=dojo;var _29a=d.trim(d.attr(node,"keyFilter")||"");if(_29a){_299.keyFilter=new RegExp(_29a);}};dojo.declare("dojox.grid.cells.RowIndex",dgc.Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_29b){return _29b+1;}});dgc.RowIndex.markupFactory=function(node,_29c){dgc.Cell.markupFactory(node,_29c);};dojo.declare("dojox.grid.cells.Select",dgc.Cell,{options:null,values:null,returnIndex:-1,constructor:function(_29d){this.values=this.values||this.options;},formatEditing:function(_29e,_29f){this.needFormatNode(_29e,_29f);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",(_29e==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},getValue:function(_2a0){var n=this.getEditNode(_2a0);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 _2a1=d.trim(d.attr(node,"options")||"");if(_2a1){var o=_2a1.split(",");if(o[0]!=_2a1){cell.options=o;}}var _2a2=d.trim(d.attr(node,"values")||"");if(_2a2){var v=_2a2.split(",");if(v[0]!=_2a2){cell.values=v;}}};dojo.declare("dojox.grid.cells.AlwaysEdit",dgc.Cell,{alwaysEditing:true,_formatNode:function(_2a3,_2a4){this.formatNode(this.getEditNode(_2a4),_2a3,_2a4);},applyStaticValue:function(_2a5){var e=this.grid.edit;e.applyCellEdit(this.getValue(_2a5),this,_2a5);e.start(this,_2a5,true);}});dgc.AlwaysEdit.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);};dojo.declare("dojox.grid.cells.Bool",dgc.AlwaysEdit,{_valueProp:"checked",formatEditing:function(_2a6,_2a7){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_2a6?" 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 _2a8=n.scrollLeft,_2a9=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_2a8!=n.scrollLeft||_2a9!=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,_2aa=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),_2aa];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,_2ab){this.node=dojo.byId(node);if(!_2ab){_2ab={};}this.handle=_2ab.handle?dojo.byId(_2ab.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_2ab.delay>0?_2ab.delay:0;this.skip=_2ab.skip;this.mover=_2ab.mover?_2ab.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(_2ac,node){return new dojo.dnd.Moveable(node,_2ac);},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(_2ad){dojo.publish("/dnd/move/start",[_2ad]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_2ae){dojo.publish("/dnd/move/stop",[_2ae]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_2af,e){},onMove:function(_2b0,_2b1,e){this.onMoving(_2b0,_2b1);var s=_2b0.node.style;s.left=_2b1.l+"px";s.top=_2b1.t+"px";this.onMoved(_2b0,_2b1);},onMoving:function(_2b2,_2b3){},onMoved:function(_2b4,_2b5){}});}if(!dojo._hasResource["dojox.grid._Builder"]){dojo._hasResource["dojox.grid._Builder"]=true;dojo.provide("dojox.grid._Builder");(function(){var dg=dojox.grid;var _2b6=function(td){return td.cellIndex>=0?td.cellIndex:dojo.indexOf(td.parentNode.cells,td);};var _2b7=function(tr){return tr.rowIndex>=0?tr.rowIndex:dojo.indexOf(tr.parentNode.childNodes,tr);};var _2b8=function(_2b9,_2ba){return _2b9&&((_2b9.rows||0)[_2ba]||_2b9.childNodes[_2ba]);};var _2bb=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _2bc=function(_2bd,_2be){for(var n=_2bd;n&&_2be(n);n=n.parentNode){}return n;};var _2bf=function(_2c0){var name=_2c0.toUpperCase();return function(node){return node.tagName!=name;};};var _2c1=dojox.grid.util.rowIndexTag;var _2c2=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(_2c3,_2c4,_2c5,_2c6){var _2c7=[],html;if(_2c6){var _2c8=_2c3.index!=_2c3.grid.getSortIndex()?"":_2c3.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_2c3.id){_2c3.id=this.grid.id+"Hdr"+_2c3.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_2c8,"id=\"",_2c3.id,"\""];}else{var _2c9=this.grid.editable&&!_2c3.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_2c9];}if(_2c3.colSpan){html.push(" colspan=\"",_2c3.colSpan,"\"");}if(_2c3.rowSpan){html.push(" rowspan=\"",_2c3.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_2c3.classes){html.push(_2c3.classes," ");}if(_2c5){html.push(_2c5," ");}_2c7.push(html.join(""));_2c7.push("");html=["\" idx=\"",_2c3.index,"\" style=\""];if(_2c4&&_2c4[_2c4.length-1]!=";"){_2c4+=";";}html.push(_2c3.styles,_2c4||"",_2c3.hidden?"display:none;":"");if(_2c3.unitWidth){html.push("width:",_2c3.unitWidth,";");}_2c7.push(html.join(""));_2c7.push("");html=["\""];if(_2c3.attrs){html.push(" ",_2c3.attrs);}html.push(">");_2c7.push(html.join(""));_2c7.push("");_2c7.push(_2c6?"</th>":"</td>");return _2c7;},isCellNode:function(_2ca){return Boolean(_2ca&&_2ca!=dojo.doc&&dojo.attr(_2ca,"idx"));},getCellNodeIndex:function(_2cb){return _2cb?Number(dojo.attr(_2cb,"idx")):-1;},getCellNode:function(_2cc,_2cd){for(var i=0,row;(row=_2b8(_2cc.firstChild,i));i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_2cd){return cell;}}}return null;},findCellTarget:function(_2ce,_2cf){var n=_2ce;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_2c2 in n.offsetParent.parentNode&&n.offsetParent.parentNode[_2c2]!=this.view.id))&&(n!=_2cf)){n=n.parentNode;}return n!=_2cf?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(_2d0,_2d1){var n=_2d0;while(n&&(n!=this.domNode)&&(!(_2d1 in n)||(_2c2 in n&&n[_2c2]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_2d2){return this.findTarget(_2d2,_2c1);},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 _2d3=this.grid.get,_2d4=this.view.structure.cells;for(var j=0,row;(row=_2d4[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_2d3;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_2d5,_2d6){var html=this.getTableArray(),v=this.view,_2d7=v.structure.cells,item=this.grid.getItem(_2d6);dojox.grid.util.fire(this.view,"onBeforeRow",[_2d6,_2d7]);for(var j=0,row;(row=_2d7[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(_2d6,item);if(dojo.isIE<8&&(m[5]===null||m[5]===""||/^\s+$/.test(m[5]))){m[5]="&nbsp;";}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[_2c1];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(_2d8,_2d9){var html=this.getTableArray(),_2da=this.view.structure.cells;dojox.grid.util.fire(this.view,"onBeforeRow",[-1,_2da]);for(var j=0,row;(row=_2da[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_2db;(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+"'";}}_2db=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_2db[5]=(_2d9!=undefined?_2d9:_2d8(cell));_2db[3]=cell.customStyles.join(";");_2db[1]=cell.customClasses.join(" ");html.push(_2db.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(dojo.isMoz||dojo.isIE>=9){n=_2bc(e.target,_2bf("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!dojo._isBodyLtr()){table=_2bc(n,_2bf("table"));x-=(table&&table.offsetLeft)||0;}}n=_2bc(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=_2b6(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,_2dc){var _2dd=dojo.contentBox(e.sourceView.headerNode);if(_2dc){this.lineDiv=document.createElement("div");var vw=(dojo.position||dojo._abs)(e.sourceView.headerNode,true);var _2de=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:(_2de.h+_2dd.h)+"px"});dojo.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;dojo.body().appendChild(this.lineDiv);}var _2df=[],_2e0=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_2e0[i]);i++){_2df.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=dojo._isBodyLtr()?1:-1;var _2e1=e.grid.views.views;var _2e2=[];for(var j=view.idx+adj,_2e3;(_2e3=_2e1[j]);j=j+adj){_2e2.push({node:_2e3.headerNode,left:window.parseInt(_2e3.headerNode.style.left)});}var _2e4=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:_2dd.w,table:_2e4,tw:dojo.contentBox(_2e4).w,spanners:_2df,followers:_2e2};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(_2e5,_2e6,_2e7){var _2e8=_2e7.l;var data={deltaX:_2e8,w:_2e5.w+(dojo._isBodyLtr()?_2e8:-_2e8),vw:_2e5.vw+_2e8,tw:_2e5.tw+_2e8};this.dragRecord={inDrag:_2e5,mover:_2e6,leftTop:_2e7};if(data.w>=this.minColWidth){if(!_2e6){this.doResizeNow(_2e5,data);}else{dojo.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_2e9){if(this.dragRecord){var _2ea=this.dragRecord.leftTop;var _2eb=dojo._isBodyLtr()?_2ea.l:-_2ea.l;_2eb+=Math.max(_2e9.w+_2eb,this.minColWidth)-(_2e9.w+_2eb);if(dojo.isWebKit&&_2e9.spanners.length){_2eb+=dojo._getPadBorderExtents(_2e9.spanners[0].node).w;}var data={deltaX:_2eb,w:_2e9.w+_2eb,vw:_2e9.vw+_2eb,tw:_2e9.tw+_2eb};this.doResizeNow(_2e9,data);}dojo.destroy(this.lineDiv);dojo.destroy(this.moverDiv);dojo.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_2e9.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_2e9.index);},doResizeNow:function(_2ec,data){_2ec.view.convertColPctToFixed();if(_2ec.view.flexCells&&!_2ec.view.testFlexCells()){var t=_2bb(_2ec.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_2ec.spanners[i]);i++){sw=s.width+data.deltaX;s.node.style.width=sw+"px";_2ec.view.setColWidth(s.index,sw);}if(dojo._isBodyLtr()||!dojo.isIE){for(i=0;(f=_2ec.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_2ec.node.style.width=data.w+"px";_2ec.view.setColWidth(_2ec.index,data.w);_2ec.view.headerNode.style.width=data.vw+"px";_2ec.view.setColumnsWidth(data.tw);if(!dojo._isBodyLtr()){_2ec.view.headerNode.scrollLeft=_2ec.scrollLeft+data.deltaX;}}});dg._TableMap=dojo.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_2ed){var _2ee=_2ed.length;if(!_2ee){return;}this.map=[];var row;for(var k=0;(row=_2ed[k]);k++){this.map[k]=[];}for(var j=0;(row=_2ed[j]);j++){for(var i=0,x=0,cell,_2ef,_2f0;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_2f0=cell.rowSpan||1;_2ef=cell.colSpan||1;for(var y=0;y<_2f0;y++){for(var s=0;s<_2ef;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_2ef;}}},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(_2f1,_2f2){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_2f2&&cell.r==_2f1){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_2f3,_2f4,_2f5){var row=_2f3&&_2f3.rows[_2f4];return row&&row.cells[_2f5];},_findOverlappingNodes:function(_2f6,_2f7,_2f8){var _2f9=[];var m=this.getMapCoords(_2f7,_2f8);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(_2f6,rw.r,rw.c):null);if(n){_2f9.push(n);}}return _2f9;},findOverlappingNodes:function(_2fa){return this._findOverlappingNodes(_2bb(_2fa),_2b7(_2fa.parentNode),_2b6(_2fa));}});})();}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,_2fb){this.node=dojo.byId(node);if(!_2fb){_2fb={};}this.creator=_2fb.creator||null;this.skipForm=_2fb.skipForm;this.parent=_2fb.dropParent&&dojo.byId(_2fb.dropParent);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_2fb&&_2fb._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,_2fc,_2fd){if(!this.parent.firstChild){_2fd=null;}else{if(_2fc){if(!_2fd){_2fd=this.parent.firstChild;}}else{if(_2fd){_2fd=_2fd.nextSibling;}}}if(_2fd){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,_2fd);}}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(_2fe,node){_2fe._skipStartup=true;return new dojo.dnd.Container(node,_2fe);},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,_2ff){var _300="dojoDnd"+type;var _301=type.toLowerCase()+"State";dojo.removeClass(this.node,_300+this[_301]);dojo.addClass(this.node,_300+_2ff);this[_301]=_2ff;},_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 _302=node.parentNode;_302;node=_302,_302=node.parentNode){if(_302==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 _303=item&&dojo.isObject(item),data,type,n;if(_303&&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=(_303&&item.data)?item.data:item;type=(_303&&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,_304){if(!_304){_304={};}this.singular=_304.singular;this.autoSync=_304.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(_305,data,_306,_307){var _308=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_308.call(this,item,hint);if(_305){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,_306,_307);this._normalizedCreator=_308;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_309,node){_309._skipStartup=true;return new dojo.dnd.Selector(node,_309);},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(_30a){this.manager=_30a;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"}}),_30b=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:_30b.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(_30b.creator){node=_30b._normalizedCreator(_30b.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _30c=dojo.create("table"),_30d=dojo.create("tbody",null,_30c);_30d.appendChild(node);node=_30c;}}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(_30e){if(this.avatar){this.target=(_30e&&_30e.targetState!="Disabled")?_30e:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}dojo.publish("/dnd/source/over",[_30e]);},outSource:function(_30f){if(this.avatar){if(this.target==_30f){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_310,_311,copy){this.source=_310;this.nodes=_311;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_310,_311,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 _312=Boolean(this.target&&flag);if(this.canDropFlag!=_312){this.canDropFlag=_312;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))),_313=[this.source,this.nodes,copy,this.target,e];dojo.publish("/dnd/drop/before",_313);dojo.publish("/dnd/drop",_313);}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,_314){dojo.mixin(this,dojo.mixin({},_314));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(_315,_316){if(this==_315){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_316.length;++i){var type=_315.getItem(_316[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(_317,self){if(_317){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(_318,node){_318._skipStartup=true;return new dojo.dnd.Source(node,_318);},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 _319=this.getSelectedNodes();if(_319.length){m.startDrag(this,_319,this.copyState(dojo.isCopyKey(e),true));}}}if(this.isDragging){var _31a=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=dojo.position(this.current,true);}if(this.horizontal){_31a=(e.pageX-this.targetBox.x)<(this.targetBox.w/2);}else{_31a=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_31a!=this.before){this._markTargetAnchor(_31a);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(_31b){if(this!=_31b){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(_31c,_31d,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_31c?(copy?"Copied":"Moved"):"");}var _31e=this.accept&&this.checkAcceptance(_31c,_31d);this._changeState("Target",_31e?"":"Disabled");if(this==_31c){dojo.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_31f,_320,copy,_321){if(this==_321){this.onDrop(_31f,_320,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(_322,_323,copy){if(this!=_322){this.onDropExternal(_322,_323,copy);}else{this.onDropInternal(_323,copy);}},onDropExternal:function(_324,_325,copy){var _326=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _326.call(this,_324.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_324.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=_324.getItem(node.id);_324.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_324.selectNone();}this.insertNodes(true,_325,this.before,this.current);if(!copy&&this.creator){_324.deleteSelectedNodes();}this._normalizedCreator=_326;},onDropInternal:function(_327,copy){var _328=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _328.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,_327,this.before,this.current);this._normalizedCreator=_328;},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(_329){if(this.current==this.targetAnchor&&this.before==_329){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_329;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,_32a){this.isSource=false;dojo.removeClass(this.node,"dojoDndSource");},markupFactory:function(_32b,node){_32b._skipStartup=true;return new dojo.dnd.Target(node,_32b);}});dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(node,_32c){this.autoSync=true;},markupFactory:function(_32d,node){_32d._skipStartup=true;return new dojo.dnd.AutoSource(node,_32d);}});}if(!dojo._hasResource["dojox.grid._View"]){dojo._hasResource["dojox.grid._View"]=true;dojo.provide("dojox.grid._View");(function(){var _32e=function(_32f,_330){return _32f.style.cssText==undefined?_32f.getAttribute("style"):_32f.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(_331){var vs=(this.structure=_331);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(_332){if(_332){dojo.forEach(dojo.query("[widgetId]",_332).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(_333,_334){this._onBeforeRow(_333,_334);if(_333>=0){this._cleanupRowWidgets(this.getRowNode(_333));}},onAfterRow:function(_335,_336,_337){this._onAfterRow(_335,_336,_337);var g=this.grid;dojo.forEach(dojo.query(".dojoxGridStubNode",_337),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _338=window.parseInt(dojo.attr(n,"cellIdx"),10);var _339=g.getCell(_338);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 _33a=this.hasVScrollbar();var _33b=dojo.style(this.scrollboxNode,"overflow");if(this.noscroll||!_33b||_33b=="hidden"){_33a=false;}else{if(_33b=="scroll"){_33a=true;}}return (_33a?dojox.html.metrics.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?h.firstChild.offsetWidth:0;},setColumnsWidth:function(_33c){this.headerContentNode.firstChild.style.width=_33c+"px";if(this.viewWidth){this.viewWidth=_33c+"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 _33d=this.grid.layout.cells;var _33e=dojo.hitch(this,function(node,_33f){!dojo._isBodyLtr()&&(_33f=!_33f);var inc=_33f?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_33d[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_33d[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _340="dojoxGrid_bottomMarker";var _341="dojoxGrid_topMarker";if(this.bottomMarker){dojo.destroy(this.bottomMarker);}this.bottomMarker=dojo.byId(_340);if(this.topMarker){dojo.destroy(this.topMarker);}this.topMarker=dojo.byId(_341);if(!this.bottomMarker){this.bottomMarker=dojo.create("div",{"id":_340,"class":"dojoxGridColPlaceBottom"},dojo.body());this._hide(this.bottomMarker);this.topMarker=dojo.create("div",{"id":_341,"class":"dojoxGridColPlaceTop"},dojo.body());this._hide(this.topMarker);}this.arrowDim=dojo.contentBox(this.bottomMarker);var _342=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(_343){var src=this.source;if(src.current==src.targetAnchor&&src.before==_343){return;}if(src.targetAnchor&&_33e(src.targetAnchor,src.before)){src._removeItemClass(_33e(src.targetAnchor,src.before),src.before?"After":"Before");}dojo.dnd.Source.prototype._markTargetAnchor.call(src,_343);var _344=_343?src.targetAnchor:_33e(src.targetAnchor,src.before);var _345=0;if(!_344){_344=src.targetAnchor;_345=dojo.contentBox(_344).w+this.arrowDim.w/2+2;}var pos=(dojo.position||dojo._abs)(_344,true);var left=Math.floor(pos.x-this.arrowDim.w/2+_345);dojo.style(this.bottomMarker,"visibility","visible");dojo.style(this.topMarker,"visibility","visible");dojo.style(this.bottomMarker,{"left":left+"px","top":(_342+pos.y)+"px"});dojo.style(this.topMarker,{"left":left+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_33e(src.targetAnchor,src.before)){src._addItemClass(_33e(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:dojo.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_33e(src.targetAnchor,src.before)){src._removeItemClass(_33e(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(_346,_347,copy){if(dojo.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _348=this.grid.views.views;var _349=_348[_346.viewIndex];var _34a=_348[this.index];if(_34a!=_349){_349.convertColPctToFixed();_34a.convertColPctToFixed();}},_onDndDrop:function(_34b,_34c,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 _34d=function(n){return n?dojo.attr(n,"idx"):null;};var w=dojo.marginBox(_34c[0]).w;if(_34b.viewIndex!==this.index){var _34e=this.grid.views.views;var _34f=_34e[_34b.viewIndex];var _350=_34e[this.index];if(_34f.viewWidth&&_34f.viewWidth!="auto"){_34f.setColumnsWidth(_34f.getColumnsWidth()-w);}if(_350.viewWidth&&_350.viewWidth!="auto"){_350.setColumnsWidth(_350.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!dojo._isBodyLtr()&&(stb=!stb);var _351=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_351.moveColumn(_34b.viewIndex,idx,_34d(_34c[0]),_34d(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(_352){var n=_352.name||_352.grid.getCellName(_352);var ret=["<div class=\"dojoxGridSortNode"];if(_352.index!=_352.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_352.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_352.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(_353){var _354=this._hasHScroll||false;if(this._hasHScroll==undefined||_353){if(this.noscroll){this._hasHScroll=false;}else{var _355=dojo.style(this.scrollboxNode,"overflow");if(_355=="hidden"){this._hasHScroll=false;}else{if(_355=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_354!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_356){var _357=this._hasVScroll||false;if(this._hasVScroll==undefined||_356){if(this.noscroll){this._hasVScroll=false;}else{var _358=dojo.style(this.scrollboxNode,"overflow");if(_358=="hidden"){this._hasVScroll=false;}else{if(_358=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_357!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _359=false;this.grid.initialWidth="";var _35a=dojo.query("th",this.headerContentNode);var _35b=dojo.map(_35a,function(c,vIdx){var w=c.style.width;dojo.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_359=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return dojo.contentBox(c).w;});if(_359){dojo.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _35c=cell.view.getHeaderCellNode(cell.index);if(_35c&&dojo.hasAttr(_35c,"vIdx")){var vIdx=window.parseInt(dojo.attr(_35c,"vIdx"));this.setColWidth(idx,_35b[vIdx]);dojo.removeAttr(_35c,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_35d){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 _35e=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(_35d||(this.noscroll&&_35e())){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(_35f){var _360=this.createRowNode(_35f);this.buildRow(_35f,_360);this.grid.edit.restore(this,_35f);return _360;},createRowNode:function(_361){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]=_361;this.rowNodes[_361]=node;return node;},buildRow:function(_362,_363){this.buildRowContent(_362,_363);this.styleRow(_362,_363);},buildRowContent:function(_364,_365){_365.innerHTML=this.content.generateHtml(_364,_364);if(this.flexCells&&this.contentWidth){_365.firstChild.style.width=this.contentWidth;}dojox.grid.util.fire(this,"onAfterRow",[_364,this.structure.cells,_365]);},rowRemoved:function(_366){if(_366>=0){this._cleanupRowWidgets(this.getRowNode(_366));}this.grid.edit.save(this,_366);delete this.rowNodes[_366];},getRowNode:function(_367){return this.rowNodes[_367];},getCellNode:function(_368,_369){var row=this.getRowNode(_368);if(row){return this.content.getCellNode(row,_369);}},getHeaderCellNode:function(_36a){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_36a);}},styleRow:function(_36b,_36c){_36c._style=_32e(_36c);this.styleRowNode(_36b,_36c);},styleRowNode:function(_36d,_36e){if(_36e){this.doStyleRowNode(_36d,_36e);}},doStyleRowNode:function(_36f,_370){this.grid.styleRowNode(_36f,_370);},updateRow:function(_371){var _372=this.getRowNode(_371);if(_372){_372.style.height="";this.buildRow(_371,_372);}return _372;},updateRowStyles:function(_373){this.styleRowNode(_373,this.getRowNode(_373));},lastTop:0,firstScroll:0,doscroll:function(_374){var _375=dojo._isBodyLtr();if(this.firstScroll<2){if((!_375&&this.firstScroll==1)||(_375&&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=_375?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(_376){this.lastTop=_376;this.scrollboxNode.scrollTop=_376;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(_377,_378){this.grid.setCellWidth(_377,_378+"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 _379=this.manager.source,node;if(_379.creator){node=_379._normalizedCreator(_379.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);var _37a,_37b;if(node.tagName.toLowerCase()=="tr"){_37a=dd.createElement("table");_37b=dd.createElement("tbody");_37b.appendChild(node);_37a.appendChild(_37b);node=_37a;}else{if(node.tagName.toLowerCase()=="th"){_37a=dd.createElement("table");_37b=dd.createElement("tbody");var r=dd.createElement("tr");_37a.cellPadding=_37a.cellSpacing="0";r.appendChild(node);_37b.appendChild(r);_37a.appendChild(_37b);node=_37a;}}}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 _37c=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 _37c.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(_37d,_37e){var w=this.contentWidth||0;_37e.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(_37f,_380){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_37f)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_37f)){n.push("dojoxGridRowbarSelected");}_380.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(_381){this.grid=_381;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_382,_383,_384,_385,_386){var _387=this.structure[_382].cells[0];var _388=this.structure[_383].cells[0];var cell=null;var _389=0;var _38a=0;for(var i=0,c;c=_387[i];i++){if(c.index==_384){_389=i;break;}}cell=_387.splice(_389,1)[0];cell.view=this.grid.views.views[_383];for(i=0,c=null;c=_388[i];i++){if(c.index==_385){_38a=i;break;}}if(!_386){_38a+=1;}_388.splice(_38a,0,cell);var _38b=this.grid.getCell(this.grid.getSortIndex());if(_38b){_38b._currentlySorted=this.grid.getSortAsc();}this.cells=[];_384=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=_384;this.cells.push(c);if("_currentlySorted" in c){var si=_384+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_384++;}}}this.grid.setupHeaderMenu();},setColumnVisibility:function(_38c,_38d){var cell=this.cells[_38c];if(cell.hidden==_38d){cell.hidden=!_38d;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(_38e,_38f,_390){var self=this;var _391=function(_392){var w=0;if(_392.colSpan>1){w=0;}else{w=_392.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _393={grid:this.grid,subrow:_38e,layoutIndex:_38f,index:this.cells.length};if(_390&&_390 instanceof dojox.grid.cells._Base){var _394=dojo.clone(_390);_393.unitWidth=_391(_394._props);_394=dojo.mixin(_394,this._defaultCellProps,_390._props,_393);return _394;}var _395=_390.type||this._defaultCellProps.type||dojox.grid.cells.Cell;_393.unitWidth=_391(_390);return new _395(dojo.mixin({},this._defaultCellProps,_390,_393));},addRowDef:function(_396,_397){var _398=[];var _399=0,_39a=0,_39b=true;for(var i=0,def,cell;(def=_397[i]);i++){cell=this.addCellDef(_396,i,def);_398.push(cell);this.cells.push(cell);if(_39b&&cell.relWidth){_399+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_39a+=window.parseInt(w,10);}else{if(w=="auto"){_39b=false;}}}}}if(_399&&_39b){dojo.forEach(_398,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_399)*(100-_39a))+"%";}});}return _398;},addRowsDef:function(_39c){var _39d=[];if(dojo.isArray(_39c)){if(dojo.isArray(_39c[0])){for(var i=0,row;_39c&&(row=_39c[i]);i++){_39d.push(this.addRowDef(i,row));}}else{_39d.push(this.addRowDef(0,_39c));}}return _39d;},addViewDef:function(_39e){this._defaultCellProps=_39e.defaultCell||{};if(_39e.width&&_39e.width=="auto"){delete _39e.width;}return dojo.mixin({},_39e,{cells:this.addRowsDef(_39e.rows||_39e.cells)});},setStructure:function(_39f){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 _3a0=this.grid.rowSelector;if(_3a0=="false"){sel=null;}else{if(_3a0!="true"){sel["width"]=_3a0;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _3a1=function(def){return ("name" in def||"field" in def||"get" in def);};var _3a2=function(def){if(dojo.isArray(def)){if(dojo.isArray(def[0])||_3a1(def[0])){return true;}}return false;};var _3a3=function(def){return (def!==null&&dojo.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_3a1(def))));};if(dojo.isArray(_39f)){var _3a4=false;for(var i=0,st;(st=_39f[i]);i++){if(_3a3(st)){_3a4=true;break;}}if(!_3a4){s.push(this.addViewDef({cells:_39f}));}else{for(i=0;(st=_39f[i]);i++){if(_3a2(st)){s.push(this.addViewDef({cells:st}));}else{if(_3a3(st)){s.push(this.addViewDef(st));}}}}}else{if(_3a3(_39f)){s.push(this.addViewDef(_39f));}}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(_3a5){this.grid=_3a5;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_3a6){_3a6.idx=this.views.length;this.views.push(_3a6);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _3a7=[];for(var i=0,v;v=this.views[i];i++){_3a7.push(v.contentNode);}return _3a7;},forEach:function(_3a8){for(var i=0,v;v=this.views[i];i++){_3a8(v,i);}},onEach:function(_3a9,_3aa){_3aa=_3aa||[];for(var i=0,v;v=this.views[i];i++){if(_3a9 in v){v[_3a9].apply(v,_3aa);}}},normalizeHeaderNodeHeight:function(){var _3ab=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_3ab.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_3ab);},normalizeRowNodeHeights:function(_3ac){var h=0;var _3ad=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_3ac.length<=1){return;}for(var i=0,n;(n=_3ac[i]);i++){if(!dojo.hasClass(n,"dojoxGridNonNormalizedCell")){_3ad[i]=n.firstChild.offsetHeight;h=Math.max(h,_3ad[i]);}}h=(h>=0?h:0);if(dojo.isMoz&&h){h++;}}for(i=0;(n=_3ac[i]);i++){if(_3ad[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(_3ae){var _3af=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_3ae));i++){n.firstChild.style.height="";_3af.push(n);}this.normalizeRowNodeHeights(_3af);},getViewWidth:function(_3b0){return this.views[_3b0].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_3b1){_3b1.headerContentNode.style.height="";});var h=0;this.forEach(function(_3b2){h=Math.max(_3b2.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_3b3){h=Math.max(_3b3.domNode.offsetHeight,h);});return h;},findClient:function(_3b4){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 _3b5=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);_3b5(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;_3b5(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_3b5(v,l);}return l;},renderRow:function(_3b6,_3b7,_3b8){var _3b9=[];for(var i=0,v,n,_3ba;(v=this.views[i])&&(n=_3b7[i]);i++){_3ba=v.renderRow(_3b6);n.appendChild(_3ba);_3b9.push(_3ba);}if(!_3b8){this.normalizeRowNodeHeights(_3b9);}},rowRemoved:function(_3bb){this.onEach("rowRemoved",[_3bb]);},updateRow:function(_3bc,_3bd){for(var i=0,v;v=this.views[i];i++){v.updateRow(_3bc);}if(!_3bd){this.renormalizeRow(_3bc);}},updateRowStyles:function(_3be){this.onEach("updateRowStyles",[_3be]);},setScrollTop:function(_3bf){var top=_3bf;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_3bf);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 _3c0=function(_3c1,_3c2){if(_3c1.style.cssText==undefined){_3c1.setAttribute("style",_3c2);}else{_3c1.style.cssText=_3c2;}};dojo.declare("dojox.grid._RowManager",null,{constructor:function(_3c3){this.grid=_3c3;},linesToEms:2,overRow:-2,prepareStylingRow:function(_3c4,_3c5){return {index:_3c4,node:_3c5,odd:Boolean(_3c4&1),selected:!!this.grid.selection.isSelected(_3c4),over:this.isOver(_3c4),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_3c6,_3c7){var row=this.prepareStylingRow(_3c6,_3c7);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_3c8){var i=_3c8;i.node.className=i.customClasses;var h=i.node.style.height;_3c0(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_3c9){this.grid.updateRowStyles(_3c9);},setOverRow:function(_3ca){var last=this.overRow;this.overRow=_3ca;if((last!=this.overRow)&&(dojo.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_3cb){return (this.overRow==_3cb&&!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(_3cc){this.grid=_3cc;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,"mousedown",this,"_mouseDown"));this._connects.push(dojo.connect(this.grid.domNode,"mouseup",this,"_mouseUp"));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(_3cd,_3ce){return (this.cell==_3cd)&&(this.rowIndex==_3ce);},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(_3cf){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){dojo.toggleClass(n,this.focusClass,_3cf);if(_3cf){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 _3d0=this._findHeaderCells();for(var i=0;i<_3d0.length;i++){this._connects.push(dojo.connect(_3d0[i],"onfocus",this,"doColHeaderFocus"));this._connects.push(dojo.connect(_3d0[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _3d1=dojo.query("th",this.grid.viewsHeaderNode);var _3d2=[];for(var i=0;i<_3d1.length;i++){var _3d3=_3d1[i];var _3d4=dojo.hasAttr(_3d3,"tabIndex");var _3d5=dojo.attr(_3d3,"tabIndex");if(_3d4&&_3d5<0){_3d2.push(_3d3);}}return _3d2;},_setActiveColHeader:function(_3d6,_3d7,_3d8){dojo.attr(this.grid.domNode,"aria-activedescendant",_3d6.id);if(_3d8!=null&&_3d8>=0&&_3d8!=_3d7){dojo.toggleClass(this._findHeaderCells()[_3d8],this.focusClass,false);}dojo.toggleClass(_3d6,this.focusClass,true);this._colHeadNode=_3d6;this._colHeadFocusIdx=_3d7;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,_3d9){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:(_3d9?_3d9:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_3da){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_3da);if(!cell){return;}info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _3db=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_3db){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 _3dc=this.focusView;if(!_3dc){for(var i=0,_3dd;(_3dd=this.grid.views.views[i]);i++){if(_3dd.headerNode){_3dc=_3dd;break;}}}return (_3dc&&dojo.getComputedStyle(_3dc.headerNode).display=="none");},colSizeAdjust:function(e,_3de,_3df){var _3e0=this._findHeaderCells();var view=this.focusView;if(!view){for(var i=0,_3e1;(_3e1=this.grid.views.views[i]);i++){if(_3e1.header.tableMap.map){view=_3e1;break;}}}var _3e2=_3e0[_3de];if(!view||(_3de==_3e0.length-1&&_3de===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_3e2;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _3e3={l:_3df};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_3e3);view.update();}},styleRow:function(_3e4){return;},setFocusIndex:function(_3e5,_3e6){this.setFocusCell(this.grid.getCell(_3e6),_3e5);},setFocusCell:function(_3e7,_3e8){if(_3e7&&!this.isFocusCell(_3e7,_3e8)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_3e7;this.rowIndex=_3e8;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 _3e9=this.grid.getCell(col);if(!this.isLastFocusCell()&&!_3e9.editable){this.cell=_3e9;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 _3ea=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_3ea.editable){this.cell=_3ea;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_3eb,_3ec){var _3ed=_3ec<0?-1:1;if(this.isNavHeader()){var _3ee=this._findHeaderCells();var _3ef=currentIdx=dojo.indexOf(_3ee,this._colHeadNode);currentIdx+=_3ec;while(currentIdx>=0&&currentIdx<_3ee.length&&_3ee[currentIdx].style.display=="none"){currentIdx+=_3ed;}if((currentIdx>=0)&&(currentIdx<_3ee.length)){this._setActiveColHeader(_3ee[currentIdx],currentIdx,_3ef);}}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+_3eb));if(_3eb){if(_3eb>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_3eb<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+_3ec));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_3ed;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}this.setFocusIndex(row,col);if(_3eb){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 _3f0=(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(_3f1){this.tabbingOut=true;_3f1.focus();},focusGridView:function(){dojox.grid.util.fire(this.focusView,"focus");},focusGrid:function(_3f2){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _3f3=true;var _3f4=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_3f4){var _3f5=0;var cell=this.grid.getCell(_3f5);if(cell.hidden){_3f5=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_3f5);}else{if(this.cell&&!_3f4){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_3f3=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _3f3;},focusHeader:function(){var _3f6=this._findHeaderCells();var _3f7=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=_3f6[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_3f6.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_3f6[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,_3f7);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 _3f8=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_3f8);this._contextMenuBindNode=_3f8;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){dojo.stopEvent(e);return;}if(this._clickFocus){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);},_mouseDown:function(e){this._clickFocus=dojo.some(this.grid.views.views,function(v){return v.scrollboxNode===e.target;});},_mouseUp:function(e){this._clickFocus=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(_3f9){this.grid=_3f9;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(_3fa,_3fb){if(this.grid.singleClickEdit||this.isEditRow(_3fb)){this.setEditCell(_3fa,_3fb);}else{this.apply();}if(this.isEditing()||(_3fa&&_3fa.editable&&_3fa.alwaysEditing)){this._focusEditor(_3fa,_3fb);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_3fc){if(_3fc.index==this.info.rowIndex){_3fc.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(_3fd,_3fe){return (this.info.rowIndex===_3fd)&&(this.info.cell.index==_3fe);},isEditRow:function(_3ff){return this.info.rowIndex===_3ff;},setEditCell:function(_400,_401){if(!this.isEditCell(_401,_400.index)&&this.grid.canEdit&&this.grid.canEdit(_400,_401)){this.start(_400,_401,this.isEditRow(_401)||_400.editable);}},_focusEditor:function(_402,_403){dojox.grid.util.fire(_402,"focus",[_403]);},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(_404,_405,_406){if(!this._isValidInput()){return;}if(dojo.isIE&&this.grid._autoHeight){this._avoidUpdate();}this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_405)){this.applyRowEdit();this.grid.updateRow(_405);}if(_406){this.info={cell:_404,rowIndex:_405};this.grid.doStartEdit(_404,_405);this.grid.updateRow(_405);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_404,_405);this._doCatchBoomerang();},_editorDo:function(_407){var c=this.info.cell;if(c&&c.editable){c[_407](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_408,_409,_40a){if(this.grid.canEdit(_409,_40a)){this.grid.doApplyCellEdit(_408,_40a,_409.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()&&this._isValidInput()){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(_40b,_40c){var c=this.info.cell;if(this.isEditRow(_40b)&&(!_40c||c.view==_40c)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_40d,_40e){var c=this.info.cell;if(this.isEditRow(_40e)&&c.view==_40d&&c.editable){c.restore(c,this.info.rowIndex);}},_isValidInput:function(){var w=(this.info.cell||{}).widget;if(!w||!w.isValid){return true;}w.focused=true;return w.isValid(true);},_avoidUpdate:function(){var self=this;self._noUpdate=true;if(self._avoidUpdateHandler){clearTimeout(self._avoidUpdateHandler);}self._avoidUpdateHandler=setTimeout(function(){self._noUpdate=false;},100);}});}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(_40f){this.grid=_40f;this.selected=[];this.setMode(_40f.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-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(_410){return this.grid.onCanSelect(_410);},onCanDeselect:function(_411){return this.grid.onCanDeselect(_411);},onSelected:function(_412){},onDeselected:function(_413){},onChanging:function(){},onChanged:function(){},isSelected:function(_414){if(this.mode=="none"){return false;}return this.selected[_414];},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(_415){if(this.mode=="none"){return -1;}for(var i=_415+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _416=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_416.push(i);}}return _416;},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(_417){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_417);this.addToSelection(_417);}else{this.toggleSelect(_417);}},addToSelection:function(_418){if(this.mode=="none"){return;}if(dojo.isArray(_418)){dojo.forEach(_418,this.addToSelection,this);return;}_418=Number(_418);if(this.selected[_418]){this.selectedIndex=_418;}else{if(this.onCanSelect(_418)!==false){this.selectedIndex=_418;var _419=this.grid.getRowNode(_418);if(_419){dojo.attr(_419,"aria-selected","true");}this._beginUpdate();this.selected[_418]=true;this.onSelected(_418);this._endUpdate();}}},deselect:function(_41a){if(this.mode=="none"){return;}if(dojo.isArray(_41a)){dojo.forEach(_41a,this.deselect,this);return;}_41a=Number(_41a);if(this.selectedIndex==_41a){this.selectedIndex=-1;}if(this.selected[_41a]){if(this.onCanDeselect(_41a)===false){return;}var _41b=this.grid.getRowNode(_41a);if(_41b){dojo.attr(_41b,"aria-selected","false");}this._beginUpdate();delete this.selected[_41a];this.onDeselected(_41a);this._endUpdate();}},setSelected:function(_41c,_41d){this[(_41d?"addToSelection":"deselect")](_41c);},toggleSelect:function(_41e){if(dojo.isArray(_41e)){dojo.forEach(_41e,this.toggleSelect,this);return;}this.setSelected(_41e,!this.selected[_41e]);},_range:function(_41f,inTo,func){var s=(_41f>=0?_41f:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_420,inTo){this._range(_420,inTo,dojo.hitch(this,"addToSelection"));},deselectRange:function(_421,inTo){this._range(_421,inTo,dojo.hitch(this,"deselect"));},insert:function(_422){this.selected.splice(_422,0,false);if(this.selectedIndex>=_422){this.selectedIndex++;}},remove:function(_423){this.selected.splice(_423,1);if(this.selectedIndex>=_423){this.selectedIndex--;}},deselectAll:function(_424){for(var i in this.selected){if((i!=_424)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_425,_426,_427){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_425);}else{if(!_427||this.rangeStartIndex<0){this.rangeStartIndex=_425;}if(!_426){this.deselectAll(_425);}if(_427){this.selectRange(this.rangeStartIndex,_425);}else{if(_426){this.toggleSelect(_425);}else{this.addToSelection(_425);}}}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(_428){var i=_428;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_428);this.edit.styleRow(_428);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var dk=dojo.keys;var _429;switch(e.keyCode){case dk.ESCAPE:this.edit.cancel();break;case dk.ENTER:if(!this.edit.isEditing()){_429=this.focus.getHeaderIndex();if(_429>=0){this.setSortIndex(_429);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}dojo.stopEvent(e);}if(!e.shiftKey){var _42a=this.edit.isEditing();this.edit.apply();if(!_42a){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _42b=this.focus.focusView||this.views.views[0];_42b.content.decorateEvent(e);this.onRowClick(e);}break;case dk.SPACE:if(!this.edit.isEditing()){_429=this.focus.getHeaderIndex();if(_429>=0){this.setSortIndex(_429);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 _42c=e.keyCode;dojo.stopEvent(e);_429=this.focus.getHeaderIndex();if(_429>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_429,(_42c==dk.LEFT_ARROW?-1:1)*5);}else{var _42d=(_42c==dk.LEFT_ARROW)?1:-1;if(dojo._isBodyLtr()){_42d*=-1;}this.focus.move(0,_42d);}}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(_42e,_42f){this.edit.cellFocus(_42e,_42f);},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(_430,_431){},onApplyCellEdit:function(_432,_433,_434){},onCancelEdit:function(_435){},onApplyEdit:function(_436){},onCanSelect:function(_437){return true;},onCanDeselect:function(_438){return true;},onSelected:function(_439){this.updateRowStyles(_439);},onDeselected:function(_43a){this.updateRowStyles(_43a);},onSelectionChanged:function(){}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_43b,_43c,_43d){_43d=dojo.i18n.normalizeLocale(_43d);var _43e=_43d.split("-");var _43f=[_43b,"nls",_43c].join(".");var _440=dojo._loadedModules[_43f];if(_440){var _441;for(var i=_43e.length;i>0;i--){var loc=_43e.slice(0,i).join("_");if(_440[loc]){_441=_440[loc];break;}}if(!_441){_441=_440.ROOT;}if(_441){var _442=function(){};_442.prototype=_441;return new _442();}}throw new Error("Bundle not found: "+_43c+" in "+_43b+" , locale="+_43d);};dojo.i18n.normalizeLocale=function(_443){var _444=_443?_443.toLowerCase():dojo.locale;if(_444=="root"){_444="ROOT";}return _444;};dojo.i18n._requireLocalization=function(_445,_446,_447,_448){var _449=dojo.i18n.normalizeLocale(_447);var _44a=[_445,"nls",_446].join(".");var _44b="";if(_448){var _44c=_448.split(",");for(var i=0;i<_44c.length;i++){if(_449["indexOf"](_44c[i])==0){if(_44c[i].length>_44b.length){_44b=_44c[i];}}}if(!_44b){_44b="ROOT";}}var _44d=_448?_44b:_449;var _44e=dojo._loadedModules[_44a];var _44f=null;if(_44e){if(dojo.config.localizationComplete&&_44e._built){return;}var _450=_44d.replace(/-/g,"_");var _451=_44a+"."+_450;_44f=dojo._loadedModules[_451];}if(!_44f){_44e=dojo["provide"](_44a);var syms=dojo._getModuleSymbols(_445);var _452=syms.concat("nls").join("/");var _453;dojo.i18n._searchLocalePath(_44d,_448,function(loc){var _454=loc.replace(/-/g,"_");var _455=_44a+"."+_454;var _456=false;if(!dojo._loadedModules[_455]){dojo["provide"](_455);var _457=[_452];if(loc!="ROOT"){_457.push(loc);}_457.push(_446);var _458=_457.join("/")+".js";_456=dojo._loadPath(_458,null,function(hash){var _459=function(){};_459.prototype=_453;_44e[_454]=new _459();for(var j in hash){_44e[_454][j]=hash[j];}});}else{_456=true;}if(_456&&_44e[_454]){_453=_44e[_454];}else{_44e[_454]=_453;}if(_448){return true;}});}if(_448&&_449!=_44b){_44e[_449.replace(/-/g,"_")]=_44e[_44b.replace(/-/g,"_")];}};(function(){var _45a=dojo.config.extraLocale;if(_45a){if(!_45a instanceof Array){_45a=[_45a];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_45b,_45c){req(m,b,_45b,_45c);if(_45b){return;}for(var i=0;i<_45a.length;i++){req(m,b,_45a[i],_45c);}};}})();dojo.i18n._searchLocalePath=function(_45d,down,_45e){_45d=dojo.i18n.normalizeLocale(_45d);var _45f=_45d.split("-");var _460=[];for(var i=_45f.length;i>0;i--){_460.push(_45f.slice(0,i).join("-"));}_460.push(false);if(down){_460.reverse();}for(var j=_460.length-1;j>=0;j--){var loc=_460[j]||"ROOT";var stop=_45e(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_461,_462){function _463(_464){_464=dojo.i18n.normalizeLocale(_464);dojo.i18n._searchLocalePath(_464,true,function(loc){for(var i=0;i<_462.length;i++){if(_462[i]==loc){dojo["require"](_461+"_"+loc);return true;}}return false;});};_463();var _465=dojo.config.extraLocale||[];for(var i=0;i<_465.length;i++){_463(_465[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 _466=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_466);this.errorMessage=dojo.string.substitute(this.errorMessage,_466);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,_467){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&&!_467){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(_468){},createViews:function(){this.views=new dojox.grid._ViewManager(this);this.views.createView=dojo.hitch(this,"createView");},createView:function(_469,idx){var c=dojo.getObject(_469);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(_46a){var s=_46a;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(_46b){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.attr('structure', obj) instead.","2.0");this._setStructureAttr(_46b);},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(_46c){if(self.layout.setColumnVisibility(this._gridCell.index,_46c)){var _46d=this._gridCell.menuItems;if(_46d.length>1){dojo.forEach(_46d,function(item){if(item!==this){item.setAttribute("checked",_46c);}},this);}_46c=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(_46c.length==1){dojo.forEach(_46c[0].menuItems,"item.attr('disabled', true);");}}},destroy:function(){var _46e=dojo.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_46e,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(_46f){this.setScrollTop(0);},getItem:function(_470){return null;},showMessage:function(_471){if(_471){this.messagesNode.innerHTML=_471;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(_472,_473){this._pendingChangeSize=_472;this._pendingResultSize=_473;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(_474,_475){_474=_474||this._pendingChangeSize;_475=_475||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 _476=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<=_476.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(_475){_474=_475;}if(_474){dojo.marginBox(this.domNode,_474);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 _477=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(!_477&&hh===undefined){hh=this._getHeaderHeight();}}if(_477){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _478=(!this.initialWidth&&this.autoWidth);var w=_478?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_478){this.domNode.style.width=vw+"px";}},adaptHeight:function(_479){var t=_479===undefined?this._getHeaderHeight():_479;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 _47a=0,_47b=0;var _47c=dojo.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_47a++;}else{_47b++;}return (!has);});if(_47a>0&&_47b>0){dojo.forEach(_47c,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(_47d,_47e){this.views.renderRow(_47d,_47e,this._skipRowRenormalize);},rowRemoved:function(_47f){this.views.rowRemoved(_47f);},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||this.edit._noUpdate){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(_480){_480=Number(_480);if(this.updating){this.invalidated[_480]=true;}else{this.views.updateRow(_480);this.scroller.rowHeightChanged(_480);}},updateRows:function(_481,_482){_481=Number(_481);_482=Number(_482);var i;if(this.updating){for(i=0;i<_482;i++){this.invalidated[i+_481]=true;}}else{for(i=0;i<_482;i++){this.views.updateRow(i+_481,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_481);}},updateRowCount:function(_483){if(this.updating){this.invalidated.rowCount=_483;}else{this.rowCount=_483;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_483);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_484){this.views.updateRowStyles(_484);},getRowNode:function(_485){if(this.focus.focusView&&!(this.focus.focusView instanceof dojox.grid._RowSelector)){return this.focus.focusView.rowNodes[_485];}else{for(var i=0,_486;(_486=this.views.views[i]);i++){if(!(_486 instanceof dojox.grid._RowSelector)){return _486.rowNodes[_485];}}}return null;},rowHeightChanged:function(_487){this.views.renormalizeRow(_487);this.scroller.rowHeightChanged(_487);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(dojo.isIE?100:50),scrollTo:function(_488){if(!this.fastScroll){this.setScrollTop(_488);return;}var _489=Math.abs(this.lastScrollTop-_488);this.lastScrollTop=_488;if(_489>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_488;this.views.setScrollTop(_488);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _48a=this;this._pendingScroll=window.setTimeout(function(){delete _48a._pendingScroll;_48a.finishScrollJob();},200);}else{this.setScrollTop(_488);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_48b){this.scroller.scroll(this.views.setScrollTop(_48b));},scrollToRow:function(_48c){this.setScrollTop(this.scroller.findScrollTop(_48c)+1);},styleRowNode:function(_48d,_48e){if(_48e){this.rows.styleRowNode(_48d,_48e);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_48f){return this.layout.cells[_48f];},setCellWidth:function(_490,_491){this.getCell(_490).unitWidth=_491;},getCellName:function(_492){return "Cell "+_492.index;},canSort:function(_493){},sort:function(){},getSortAsc:function(_494){_494=_494==undefined?this.sortInfo:_494;return Boolean(_494>0);},getSortIndex:function(_495){_495=_495==undefined?this.sortInfo:_495;return Math.abs(_495)-1;},setSortIndex:function(_496,_497){var si=_496+1;if(_497!=undefined){si*=(_497?1:-1);}else{if(this.getSortIndex()==_496){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_498){if(this.canSort(_498)){this.sortInfo=_498;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(_499,_49a){this.onStartEdit(_499,_49a);},doApplyCellEdit:function(_49b,_49c,_49d){this.onApplyCellEdit(_49b,_49c,_49d);},doCancelEdit:function(_49e){this.onCancelEdit(_49e);},doApplyEdit:function(_49f){this.onApplyEdit(_49f);},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(_4a0,node,ctor,_4a1){var d=dojo;var _4a2=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(!_4a0.structure&&node.nodeName.toLowerCase()=="table"){_4a0.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=_4a2(cg);}return v;});if(!_4a0.structure.length){_4a0.structure.push({__span:Infinity,cells:[]});}d.query("thead > tr",node).forEach(function(tr,_4a3){var _4a4=0;var _4a5=0;var _4a6;var _4a7=null;d.query("> th",tr).map(function(th){if(!_4a7){_4a6=0;_4a7=_4a0.structure[0];}else{if(_4a4>=(_4a6+_4a7.__span)){_4a5++;_4a6+=_4a7.__span;var _4a8=_4a7;_4a7=_4a0.structure[_4a5];}}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")||"")};_4a4+=cell.colSpan;var _4a9=d.attr(th,"rowspan");if(_4a9){cell.rowSpan=_4a9;}if(d.hasAttr(th,"width")){cell.width=_4a2(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(_4a1){_4a1(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(!_4a7.cells[_4a3]){_4a7.cells[_4a3]=[];}_4a7.cells[_4a3].push(cell);});});}return new ctor(_4a0,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(_4aa){var _4ab=this.grid.getItemIndex(_4aa);var idx=dojox.grid.Selection.prototype.getNextSelected.call(this,_4ab);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _4ac=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_4ac.push(this.grid.getItem(i));}}return _4ac;},addToSelection:function(_4ad){if(this.mode=="none"){return;}var idx=null;if(typeof _4ad=="number"||typeof _4ad=="string"){idx=_4ad;}else{idx=this.grid.getItemIndex(_4ad);}dojox.grid.Selection.prototype.addToSelection.call(this,idx);},deselect:function(_4ae){if(this.mode=="none"){return;}var idx=null;if(typeof _4ae=="number"||typeof _4ae=="string"){idx=_4ae;}else{idx=this.grid.getItemIndex(_4ae);}dojox.grid.Selection.prototype.deselect.call(this,idx);},deselectAll:function(_4af){var idx=null;if(_4af||typeof _4af=="number"){if(typeof _4af=="number"||typeof _4af=="string"){idx=_4af;}else{idx=this.grid.getItemIndex(_4af);}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(_4b0,_4b1){if(_4b1&&this.field=="_item"&&!this.fields){return _4b1;}else{if(_4b1&&this.fields){var ret=[];var s=this.grid.store;dojo.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_4b1,f));});return ret;}else{if(!_4b1&&typeof _4b0==="string"){return this.inherited(arguments);}}}return (!_4b1?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_4b1:this.grid.store.getValue(_4b1,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _4b2=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_4b2=true;}if(!this.updating){this.beginUpdate();_4b2=true;}if(_4b2){var _4b3=this;this._endUpdateDelay=setTimeout(function(){delete _4b3._endUpdateDelay;_4b3.endUpdate();},this.updateDelay);}}},_onSet:function(item,_4b4,_4b5,_4b6){this._checkUpdateStatus();var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_createItem:function(item,_4b7){var idty=this._hasIdentity?this.store.getIdentity(item):dojo.toJson(this.query)+":idx:"+_4b7+":sort:"+dojo.toJson(this.getSortProps());var o=this._by_idty[idty]={idty:idty,item:item};return o;},_addItem:function(item,_4b8,_4b9){this._by_idx[_4b8]=this._createItem(item,_4b8);if(!_4b9){this.updateRow(_4b8);}},_onNew:function(item,_4ba){this._checkUpdateStatus();var _4bb=this.get("rowCount");this._addingItem=true;this.updateRowCount(_4bb+1);this._addingItem=false;this._addItem(item,_4bb);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(_4bc,_4bd,_4be){this._setQuery(_4bd,_4be);this._setStore(_4bc);this._refresh(true);},setQuery:function(_4bf,_4c0){this._setQuery(_4bf,_4c0);this._refresh(true);},setItems:function(_4c1){this.items=_4c1;this._setStore(this.store);this._refresh(true);},_setQuery:function(_4c2,_4c3){this.query=_4c2;this.queryOptions=_4c3||this.queryOptions;},_setStore:function(_4c4){if(this.store&&this._store_connects){dojo.forEach(this._store_connects,function(arr){dojo.forEach(arr,dojo.disconnect);});}this.store=_4c4;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(_4c5,req){if(!this.scroller){return;}if(_4c5&&_4c5.length>0){dojo.forEach(_4c5,function(item,idx){this._addItem(item,req.start+idx,true);},this);if(this._autoHeight){this._skipRowRenormalize=true;}this.updateRows(req.start,_4c5.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(_4c6,_4c7){_4c6=_4c6||0;if(this.store&&!this._pending_requests[_4c6]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_4c6]=true;try{if(this.items){var _4c8=this.items;var _4c9=this.store;this.rowsPerPage=_4c8.length;var req={start:_4c6,count:this.rowsPerPage,isRender:_4c7};this._onFetchBegin(_4c8.length,req);var _4ca=0;dojo.forEach(_4c8,function(i){if(!_4c9.isItemLoaded(i)){_4ca++;}});if(_4ca===0){this._onFetchComplete(_4c8,req);}else{var _4cb=function(item){_4ca--;if(_4ca===0){this._onFetchComplete(_4c8,req);}};dojo.forEach(_4c8,function(i){if(!_4c9.isItemLoaded(i)){_4c9.loadItem({item:i,onItem:_4cb,scope:this});}},this);}}else{this.store.fetch({start:_4c6,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_4c7,onBegin:dojo.hitch(this,"_onFetchBegin"),onComplete:dojo.hitch(this,"_onFetchComplete"),onError:dojo.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_4c6,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,_4cc){if(!_4cc&&!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(_4cd,_4ce){this.query=_4cd;if(_4ce){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(_4cf){return this._pending_requests[_4cf];},_rowToPage:function(_4d0){return (this.rowsPerPage?Math.floor(_4d0/this.rowsPerPage):_4d0);},_pageToRow:function(_4d1){return (this.rowsPerPage?this.rowsPerPage*_4d1:_4d1);},_preparePage:function(_4d2){if((_4d2<this._bop||_4d2>=this._eop)&&!this._addingItem){var _4d3=this._rowToPage(_4d2);this._needPage(_4d3);this._bop=_4d3*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_4d4){if(!this._pages[_4d4]){this._pages[_4d4]=true;this._requestPage(_4d4);}},_requestPage:function(_4d5){var row=this._pageToRow(_4d5);var _4d6=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_4d6>0){this._requests++;if(!this._requestsPending(row)){setTimeout(dojo.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_4d7){return _4d7.field;},_refresh:function(_4d8){this._clearData();this._fetch(0,_4d8);},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(_4d9){if(this.store&&this.store.getState){var _4da=this.store.getState(_4d9.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_4da[s]){c=" dojoxGridRow-"+s;break;}}_4d9.customClasses+=c;}},onStyleRow:function(_4db){this.styleRowState(_4db);this.inherited(arguments);},canEdit:function(_4dc,_4dd){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _4de={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_4df,_4e0){if(!this._cache[_4e0]){this._cache[_4e0]=this._copyAttr(_4e0,_4df.field);}this.onStartEdit(_4df,_4e0);},doApplyCellEdit:function(_4e1,_4e2,_4e3){this.store.fetchItemByIdentity({identity:this._by_idx[_4e2].idty,onItem:dojo.hitch(this,function(item){var _4e4=this.store.getValue(item,_4e3);if(typeof _4e4=="number"){_4e1=isNaN(_4e1)?_4e1:parseFloat(_4e1);}else{if(typeof _4e4=="boolean"){_4e1=_4e1=="true"?true:_4e1=="false"?false:_4e1;}else{if(_4e4 instanceof Date){var _4e5=new Date(_4e1);_4e1=isNaN(_4e5.getTime())?_4e1:_4e5;}}}this.store.setValue(item,_4e3,_4e1);this.onApplyCellEdit(_4e1,_4e2,_4e3);})});},doCancelEdit:function(_4e6){var _4e7=this._cache[_4e6];if(_4e7){this.updateRow(_4e6);delete this._cache[_4e6];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_4e8,_4e9){var _4ea=this._cache[_4e8];this.onApplyEdit(_4e8);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=dojo.hitch(this,function(_4eb){if(_4eb.length){dojo.forEach(_4eb,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(_4ec,node,_4ed){var _4ee=dojo.trim(dojo.attr(node,"field")||"");if(_4ee){_4ed.field=_4ee;}_4ed.field=_4ed.field||_4ed.name;var _4ef=dojo.trim(dojo.attr(node,"fields")||"");if(_4ef){_4ed.fields=_4ef.split(",");}if(_4ec){_4ec(node,_4ed);}};dojox.grid.DataGrid.markupFactory=function(_4f0,node,ctor,_4f1){return dojox.grid._Grid.markupFactory(_4f0,node,ctor,dojo.partial(dojox.grid.DataGrid.cell_markupFactory,_4f1));};}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"]);
