/*
	Copyright (c) 2004-2009, 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 a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1=dojo.doc;if(_1.selection){var s=_1.selection;if(s.type=="Text"){return !s.createRange().htmlText.length;}else{return !s.createRange().length;}}else{var _3=dojo.global;var _4=_3.getSelection();if(dojo.isString(_4)){return !_4;}else{return !_4||_4.isCollapsed||!_4.toString();}}},getBookmark:function(){var _5,_6=dojo.doc.selection;if(_6){var _7=_6.createRange();if(_6.type.toUpperCase()=="CONTROL"){if(_7.length){_5=[];var i=0,_9=_7.length;while(i<_9){_5.push(_7.item(i++));}}else{_5=null;}}else{_5=_7.getBookmark();}}else{if(window.getSelection){_6=dojo.global.getSelection();if(_6){_7=_6.getRangeAt(0);_5=_7.cloneRange();}}else{console.warn("No idea how to store the current selection for this browser!");}}return _5;},moveToBookmark:function(_a){var _b=dojo.doc;if(_b.selection){var _c;if(dojo.isArray(_a)){_c=_b.body.createControlRange();dojo.forEach(_a,function(n){_c.addElement(n);});}else{_c=_b.selection.createRange();_c.moveToBookmark(_a);}_c.select();}else{var _e=dojo.global.getSelection&&dojo.global.getSelection();if(_e&&_e.removeAllRanges){_e.removeAllRanges();_e.addRange(_a);}else{console.warn("No idea how to restore selection for this browser!");}}},getFocus:function(_f,_10){return {node:_f&&dojo.isDescendant(dijit._curFocus,_f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_10||dojo.global,dijit.getBookmark):null,openedForWindow:_10};},focus:function(_11){if(!_11){return;}var _12="node" in _11?_11.node:_11,_13=_11.bookmark,_14=_11.openedForWindow;if(_12){var _15=(_12.tagName.toLowerCase()=="iframe")?_12.contentWindow:_12;if(_15&&_15.focus){try{_15.focus();}catch(e){}}dijit._onFocusNode(_12);}if(_13&&dojo.withGlobal(_14||dojo.global,dijit.isCollapsed)){if(_14){_14.focus();}try{dojo.withGlobal(_14||dojo.global,dijit.moveToBookmark,null,[_13]);}catch(e){}}},_activeStack:[],registerIframe:function(_16){dijit.registerWin(_16.contentWindow,_16);},registerWin:function(_17,_18){dojo.connect(_17.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(_18||evt.target||evt.srcElement);});var doc=_17.document;if(doc){if(dojo.isIE){doc.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(_18||evt.srcElement);}});doc.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(_18||evt.srcElement);});}else{doc.addEventListener("focus",function(evt){dijit._onFocusNode(_18||evt.target);},true);doc.addEventListener("blur",function(evt){dijit._onBlurNode(_18||evt.target);},true);}}doc=null;},_onBlurNode:function(_1f){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(_20){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _21=[];try{while(_20){if(_20.dijitPopupParent){_20=dijit.byId(_20.dijitPopupParent).domNode;}else{if(_20.tagName&&_20.tagName.toLowerCase()=="body"){if(_20===dojo.body()){break;}_20=dijit.getDocumentWindow(_20.ownerDocument).frameElement;}else{var id=_20.getAttribute&&_20.getAttribute("widgetId");if(id){_21.unshift(id);}_20=_20.parentNode;}}}}catch(e){}dijit._setStack(_21);},_onFocusNode:function(_23){if(!_23){return;}if(_23.nodeType==9){return;}dijit._onTouchNode(_23);if(_23==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_23;dojo.publish("focusNode",[_23]);},_setStack:function(_24){var _25=dijit._activeStack;dijit._activeStack=_24;for(var _26=0;_26<Math.min(_25.length,_24.length);_26++){if(_25[_26]!=_24[_26]){break;}}for(var i=_25.length-1;i>=_26;i--){var _28=dijit.byId(_25[i]);if(_28){_28._focused=false;_28._hasBeenBlurred=true;if(_28._onBlur){_28._onBlur();}if(_28._setStateClass){_28._setStateClass();}dojo.publish("widgetBlur",[_28]);}}for(i=_26;i<_24.length;i++){_28=dijit.byId(_24[i]);if(_28){_28._focused=true;if(_28._onFocus){_28._onFocus();}if(_28._setStateClass){_28._setStateClass();}dojo.publish("widgetFocus",[_28]);}}}});dojo.addOnLoad(function(){dijit.registerWin(window);});}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_29){if(this._hash[_29.id]){throw new Error("Tried to register widget with id=="+_29.id+" but that id is already registered");}this._hash[_29.id]=_29;},remove:function(id){delete this._hash[id];},forEach:function(_2b){for(var id in this._hash){_2b(this._hash[id]);}},filter:function(_2d){var res=new dijit.WidgetSet();this.forEach(function(_2f){if(_2d(_2f)){res.add(_2f);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_32){return _32.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_33){var id;do{id=_33+"_"+(_33 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_33]:dijit._widgetTypeCtr[_33]=0);}while(dijit.byId(id));return id;};dijit.findWidgets=function(_35){var _36=[];function _37(_38){var _39=dojo.isIE?_38.children:_38.childNodes,i=0,_3b;while(_3b=_39[i++]){if(_3b.nodeType!=1){continue;}var _3c=_3b.getAttribute("widgetId");if(_3c){var _3d=dijit.byId(_3c);_36.push(_3d);}else{_37(_3b);}}};_37(_35);return _36;};if(dojo.isIE){dojo.addOnWindowUnload(function(){dojo.forEach(dijit.findWidgets(dojo.body()),function(_3e){if(_3e.destroyRecursive){_3e.destroyRecursive();}else{if(_3e.destroy){_3e.destroy();}}});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_40){return dijit.registry.byId(_40.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_41){while(_41){if(_41.getAttribute&&_41.getAttribute("widgetId")){return dijit.registry.byId(_41.getAttribute("widgetId"));}_41=_41.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_42){var _43=dojo.style(_42);return (_43.visibility!="hidden")&&(_43.visibility!="collapsed")&&(_43.display!="none")&&(dojo.attr(_42,"type")!="hidden");};dijit.isTabNavigable=function(_44){if(dojo.hasAttr(_44,"disabled")){return false;}var _45=dojo.hasAttr(_44,"tabindex");var _46=dojo.attr(_44,"tabindex");if(_45&&_46>=0){return true;}var _47=_44.nodeName.toLowerCase();if(((_47=="a"&&dojo.hasAttr(_44,"href"))||dijit._tabElements[_47])&&(!_45||_46>=0)){return true;}return false;};dijit._getTabNavigable=function(_48){var _49,_4a,_4b,_4c,_4d,_4e;var _4f=function(_50){dojo.query("> *",_50).forEach(function(_51){var _52=dijit._isElementShown(_51);if(_52&&dijit.isTabNavigable(_51)){var _53=dojo.attr(_51,"tabindex");if(!dojo.hasAttr(_51,"tabindex")||_53==0){if(!_49){_49=_51;}_4a=_51;}else{if(_53>0){if(!_4b||_53<_4c){_4c=_53;_4b=_51;}if(!_4d||_53>=_4e){_4e=_53;_4d=_51;}}}}if(_52&&_51.nodeName.toUpperCase()!="SELECT"){_4f(_51);}});};if(dijit._isElementShown(_48)){_4f(_48);}return {first:_49,last:_4a,lowest:_4b,highest:_4d};};dijit.getFirstInTabbingOrder=function(_54){var _55=dijit._getTabNavigable(dojo.byId(_54));return _55.lowest?_55.lowest:_55.first;};dijit.getLastInTabbingOrder=function(_56){var _57=dijit._getTabNavigable(dojo.byId(_56));return _57.last?_57.last:_57.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_58){this.pairs=[];this.returnWrappers=_58||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_59,_5a,_5b,_5c,_5d){this.pairs[((_5d)?"unshift":"push")]([_59,_5a,_5b,_5c]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _5f=this.pairs[i];if(_5f[1].apply(this,arguments)){if((_5f[3])||(this.returnWrappers)){return _5f[2];}else{return _5f[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_60){for(var i=0;i<this.pairs.length;i++){var _62=this.pairs[i];if(_62[0]==_60){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(){var _63=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _64=dojo._docScroll();return {w:_63.clientWidth,h:_63.clientHeight,l:_64.x,t:_64.y};};dijit.placeOnScreen=function(_65,pos,_67,_68){var _69=dojo.map(_67,function(_6a){var c={corner:_6a,pos:{x:pos.x,y:pos.y}};if(_68){c.pos.x+=_6a.charAt(1)=="L"?_68.x:-_68.x;c.pos.y+=_6a.charAt(0)=="T"?_68.y:-_68.y;}return c;});return dijit._place(_65,_69);};dijit._place=function(_6c,_6d,_6e){var _6f=dijit.getViewport();if(!_6c.parentNode||String(_6c.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_6c);}var _70=null;dojo.some(_6d,function(_71){var _72=_71.corner;var pos=_71.pos;if(_6e){_6e(_6c,_71.aroundCorner,_72);}var _74=_6c.style;var _75=_74.display;var _76=_74.visibility;_74.visibility="hidden";_74.display="";var mb=dojo.marginBox(_6c);_74.display=_75;_74.visibility=_76;var _78=(_72.charAt(1)=="L"?pos.x:Math.max(_6f.l,pos.x-mb.w)),_79=(_72.charAt(0)=="T"?pos.y:Math.max(_6f.t,pos.y-mb.h)),_7a=(_72.charAt(1)=="L"?Math.min(_6f.l+_6f.w,_78+mb.w):pos.x),_7b=(_72.charAt(0)=="T"?Math.min(_6f.t+_6f.h,_79+mb.h):pos.y),_7c=_7a-_78,_7d=_7b-_79,_7e=(mb.w-_7c)+(mb.h-_7d);if(_70==null||_7e<_70.overflow){_70={corner:_72,aroundCorner:_71.aroundCorner,x:_78,y:_79,w:_7c,h:_7d,overflow:_7e};}return !_7e;});_6c.style.left=_70.x+"px";_6c.style.top=_70.y+"px";if(_70.overflow&&_6e){_6e(_6c,_70.aroundCorner,_70.corner);}return _70;};dijit.placeOnScreenAroundNode=function(_7f,_80,_81,_82){_80=dojo.byId(_80);var _83=_80.style.display;_80.style.display="";var _84=_80.offsetWidth;var _85=_80.offsetHeight;var _86=dojo.coords(_80,true);_80.style.display=_83;return dijit._placeOnScreenAroundRect(_7f,_86.x,_86.y,_84,_85,_81,_82);};dijit.placeOnScreenAroundRectangle=function(_87,_88,_89,_8a){return dijit._placeOnScreenAroundRect(_87,_88.x,_88.y,_88.width,_88.height,_89,_8a);};dijit._placeOnScreenAroundRect=function(_8b,x,y,_8e,_8f,_90,_91){var _92=[];for(var _93 in _90){_92.push({aroundCorner:_93,corner:_90[_93],pos:{x:x+(_93.charAt(1)=="L"?0:_8e),y:y+(_93.charAt(0)=="T"?0:_8f)}});}return dijit._place(_8b,_92,_91);};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);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _9e=[],_9f=1000,_a0=1;this.prepare=function(_a1){var s=_a1.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}dojo.body().appendChild(_a1);};this.open=function(_a3){var _a4=_a3.popup,_a5=_a3.orient||{"BL":"TL","TL":"BL"},_a6=_a3.around,id=(_a3.around&&_a3.around.id)?(_a3.around.id+"_dropdown"):("popup_"+_a0++);var _a8=dojo.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_9f+_9e.length,visibility:"hidden"}},dojo.body());dijit.setWaiRole(_a8,"presentation");_a8.style.left=_a8.style.top="0px";if(_a3.parent){_a8.dijitPopupParent=_a3.parent.id;}var s=_a4.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_a8.appendChild(_a4.domNode);var _aa=new dijit.BackgroundIframe(_a8);var _ab=_a6?dijit.placeOnScreenAroundElement(_a8,_a6,_a5,_a4.orient?dojo.hitch(_a4,"orient"):null):dijit.placeOnScreen(_a8,_a3,_a5=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_a3.padding);_a8.style.visibility="visible";var _ac=[];var _ad=function(){for(var pi=_9e.length-1;pi>0&&_9e[pi].parent===_9e[pi-1].widget;pi--){}return _9e[pi];};_ac.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 _b0=_ad();if(_b0&&_b0.onCancel){_b0.onCancel();}}}}));if(_a4.onCancel){_ac.push(dojo.connect(_a4,"onCancel",null,_a3.onCancel));}_ac.push(dojo.connect(_a4,_a4.onExecute?"onExecute":"onChange",null,function(){var _b1=_ad();if(_b1&&_b1.onExecute){_b1.onExecute();}}));_9e.push({wrapper:_a8,iframe:_aa,widget:_a4,parent:_a3.parent,onExecute:_a3.onExecute,onCancel:_a3.onCancel,onClose:_a3.onClose,handlers:_ac});if(_a4.onOpen){_a4.onOpen(_ab);}return _ab;};this.close=function(_b2){while(dojo.some(_9e,function(_b3){return _b3.widget==_b2;})){var top=_9e.pop(),_b5=top.wrapper,_b6=top.iframe,_b7=top.widget,_b8=top.onClose;if(_b7.onClose){_b7.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_b7||!_b7.domNode){return;}this.prepare(_b7.domNode);_b6.destroy();dojo.destroy(_b5);if(_b8){_b8();}}};}();dijit._frames=new function(){var _b9=[];this.pop=function(){var _ba;if(_b9.length){_ba=_b9.pop();_ba.style.display="";}else{if(dojo.isIE){var _bb=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _bc="<iframe src='"+_bb+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_ba=dojo.doc.createElement(_bc);}else{_ba=dojo.create("iframe");_ba.src="javascript:\"\"";_ba.className="dijitBackgroundIframe";}_ba.tabIndex=-1;dojo.body().appendChild(_ba);}return _ba;};this.push=function(_bd){_bd.style.display="none";if(dojo.isIE){_bd.style.removeExpression("width");_bd.style.removeExpression("height");}_b9.push(_bd);};}();dijit.BackgroundIframe=function(_be){if(!_be.id){throw new Error("no id");}if(dojo.isIE<7||(dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _bf=dijit._frames.pop();_be.appendChild(_bf);if(dojo.isIE){_bf.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_be.id+"').offsetWidth");_bf.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_be.id+"').offsetHeight");}this.iframe=_bf;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_c0){try{_c0=dojo.byId(_c0);var doc=dojo.doc;var _c2=dojo.body();var _c3=_c2.parentNode;if((!(dojo.isFF>=3||dojo.isIE||dojo.isWebKit)||_c0==_c2||_c0==_c3)&&(typeof _c0.scrollIntoView=="function")){_c0.scrollIntoView(false);return;}var ltr=dojo._isBodyLtr();var _c5=dojo.isIE>=8&&!_c6;var rtl=!ltr&&!_c5;var _c8=_c2;var _c6=doc.compatMode=="BackCompat";if(_c6){_c3._offsetWidth=_c3._clientWidth=_c2._offsetWidth=_c2.clientWidth;_c3._offsetHeight=_c3._clientHeight=_c2._offsetHeight=_c2.clientHeight;}else{if(dojo.isWebKit){_c2._offsetWidth=_c2._clientWidth=_c3.clientWidth;_c2._offsetHeight=_c2._clientHeight=_c3.clientHeight;}else{_c8=_c3;}_c3._offsetHeight=_c3.clientHeight;_c3._offsetWidth=_c3.clientWidth;}function _c9(_ca){var ie=dojo.isIE;return ((ie<=6||(ie>=7&&_c6))?false:(dojo.style(_ca,"position").toLowerCase()=="fixed"));};function _cc(_cd){var _ce=_cd.parentNode;var _cf=_cd.offsetParent;if(_cf==null||_c9(_cd)){_cf=_c3;_ce=(_cd==_c2)?_c3:null;}_cd._offsetParent=_cf;_cd._parent=_ce;var bp=dojo._getBorderExtents(_cd);_cd._borderStart={H:(_c5&&!ltr)?(bp.w-bp.l):bp.l,V:bp.t};_cd._borderSize={H:bp.w,V:bp.h};_cd._scrolledAmount={H:_cd.scrollLeft,V:_cd.scrollTop};_cd._offsetSize={H:_cd._offsetWidth||_cd.offsetWidth,V:_cd._offsetHeight||_cd.offsetHeight};_cd._offsetStart={H:(_c5&&!ltr)?_cf.clientWidth-_cd.offsetLeft-_cd._offsetSize.H:_cd.offsetLeft,V:_cd.offsetTop};_cd._clientSize={H:_cd._clientWidth||_cd.clientWidth,V:_cd._clientHeight||_cd.clientHeight};if(_cd!=_c2&&_cd!=_c3&&_cd!=_c0){for(var dir in _cd._offsetSize){var _d2=_cd._offsetSize[dir]-_cd._clientSize[dir]-_cd._borderSize[dir];var _d3=_cd._clientSize[dir]>0&&_d2>0;if(_d3){_cd._offsetSize[dir]-=_d2;if(dojo.isIE&&rtl&&dir=="H"){_cd._offsetStart[dir]+=_d2;}}}}};var _d4=_c0;while(_d4!=null){if(_c9(_d4)){_c0.scrollIntoView(false);return;}_cc(_d4);_d4=_d4._parent;}if(dojo.isIE&&_c0._parent){var _d5=_c0._offsetParent;_c0._offsetStart.H+=_d5._borderStart.H;_c0._offsetStart.V+=_d5._borderStart.V;}if(dojo.isIE>=7&&_c8==_c3&&rtl&&_c2._offsetStart&&_c2._offsetStart.H==0){var _d6=_c3.scrollWidth-_c3._offsetSize.H;if(_d6>0){_c2._offsetStart.H=-_d6;}}if(dojo.isIE<=6&&!_c6){_c3._offsetSize.H+=_c3._borderSize.H;_c3._offsetSize.V+=_c3._borderSize.V;}if(rtl&&_c2._offsetStart&&_c8==_c3&&_c3._scrolledAmount){var ofs=_c2._offsetStart.H;if(ofs<0){_c3._scrolledAmount.H+=ofs;_c2._offsetStart.H=0;}}_d4=_c0;while(_d4){var _d8=_d4._parent;if(!_d8){break;}if(_d8.tagName=="TD"){var _d9=_d8._parent._parent._parent;if(_d8!=_d4._offsetParent&&_d8._offsetParent!=_d4._offsetParent){_d8=_d9;}}var _da=_d4._offsetParent==_d8;for(var dir in _d4._offsetStart){var _dc=dir=="H"?"V":"H";if(rtl&&dir=="H"&&(_d8!=_c3)&&(_d8!=_c2)&&(dojo.isIE||dojo.isWebKit)&&_d8._clientSize.H>0&&_d8.scrollWidth>_d8._clientSize.H){var _dd=_d8.scrollWidth-_d8._clientSize.H;if(_dd>0){_d8._scrolledAmount.H-=_dd;}}if(_d8._offsetParent.tagName=="TABLE"){if(dojo.isIE){_d8._offsetStart[dir]-=_d8._offsetParent._borderStart[dir];_d8._borderStart[dir]=_d8._borderSize[dir]=0;}else{_d8._offsetStart[dir]+=_d8._offsetParent._borderStart[dir];}}if(dojo.isIE){_d8._offsetStart[dir]+=_d8._offsetParent._borderStart[dir];}var _de=_d4._offsetStart[dir]-_d8._scrolledAmount[dir]-(_da?0:_d8._offsetStart[dir])-_d8._borderStart[dir];var _df=_de+_d4._offsetSize[dir]-_d8._offsetSize[dir]+_d8._borderSize[dir];var _e0=(dir=="H")?"scrollLeft":"scrollTop";var _e1=dir=="H"&&rtl;var _e2=_e1?-_df:_de;var _e3=_e1?-_de:_df;var _e4=(_e2*_e3<=0)?0:Math[(_e2<0)?"max":"min"](_e2,_e3);if(_e4!=0){var _e5=_d8[_e0];_d8[_e0]+=(_e1)?-_e4:_e4;var _e6=_d8[_e0]-_e5;}if(_da){_d4._offsetStart[dir]+=_d8._offsetStart[dir];}_d4._offsetStart[dir]-=_d8[_e0];}_d4._parent=_d8._parent;_d4._offsetParent=_d8._offsetParent;}_d8=_c0;var _e7;while(_d8&&_d8.removeAttribute){_e7=_d8.parentNode;_d8.removeAttribute("_offsetParent");_d8.removeAttribute("_parent");_d8=_e7;}}catch(error){console.error("scrollIntoView: "+error);_c0.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo,_e9=d.doc.documentElement,ie=d.isIE,_eb=d.isOpera,maj=Math.floor,ff=d.isFF,_ee=d.boxModel.replace(/-/,""),_ef={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_eb,dj_opera8:maj(_eb)==8,dj_opera9:maj(_eb)==9,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};_ef["dj_"+_ee]=true;for(var p in _ef){if(_ef[p]){if(_e9.className){_e9.className+=" "+p;}else{_e9.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){_e9.className+=" dijitRtl";for(var p in _ef){if(_ef[p]){_e9.className+=" "+p+"-rtl";}}}});})();}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_f3,_f4,_f5,obj,_f7,_f8){if(obj!=this._obj){this.stop();this._initialDelay=_f8||500;this._subsequentDelay=_f7||0.9;this._obj=obj;this._evt=evt;this._node=_f4;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_f3,_f5);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_f9,_fa,_fb,_fc,_fd,_fe){if(_fa.keyCode){_fa.charOrCode=_fa.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_fa.charCode){_fa.charOrCode=String.fromCharCode(_fa.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_f9,"onkeypress",this,function(evt){if(evt.charOrCode==_fa.charOrCode&&(_fa.ctrlKey===undefined||_fa.ctrlKey==evt.ctrlKey)&&(_fa.altKey===undefined||_fa.altKey==evt.ctrlKey)&&(_fa.shiftKey===undefined||_fa.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_fa,_fb,_f9,_fc,_fa,_fd,_fe);}else{if(dijit.typematic._obj==_fa){dijit.typematic.stop();}}}),dojo.connect(_f9,"onkeyup",this,function(evt){if(dijit.typematic._obj==_fa){dijit.typematic.stop();}})];},addMouseListener:function(node,_102,_103,_104,_105){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_102,node,_103,node,_104,_105);}),dc(node,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_102,node,_103,node,_104,_105);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_10c,_10d,_10e,_10f,_110,_111,_112){return this.addKeyListener(_10d,_10e,_10f,_110,_111,_112).concat(this.addMouseListener(_10c,_10f,_110,_111,_112));}};}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 _115=cs.backgroundImage;var _116=(cs.borderTopColor==cs.borderRightColor)||(_115!=null&&(_115=="none"||_115=="url(invalid-url:)"));dojo[_116?"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(elem,role){var _119=this.getWaiRole(elem);return role?(_119.indexOf(role)>-1):(_119.length>0);},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _11d=dojo.attr(elem,"role")||"";if(dojo.isFF<3||!this._XhtmlRoles.test(_11d)){dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);}else{if((" "+_11d+" ").indexOf(" "+role+" ")<0){var _11e=dojo.trim(_11d.replace(this._XhtmlRoles,""));var _11f=dojo.trim(_11d.replace(_11e,""));dojo.attr(elem,"role",_11f+(_11f?" ":"")+role);}}},removeWaiRole:function(elem,role){var _122=dojo.attr(elem,"role");if(!_122){return;}if(role){var _123=dojo.isFF<3?"wairole:"+role:role;var t=dojo.trim((" "+_122+" ").replace(" "+_123+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_126){if(dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_126);}return elem.hasAttribute?elem.hasAttribute("aria-"+_126):!!elem.getAttribute("aria-"+_126);},getWaiState:function(elem,_128){if(dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_128);}return elem.getAttribute("aria-"+_128)||"";},setWaiState:function(elem,_12a,_12b){if(dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_12a,_12b);}else{elem.setAttribute("aria-"+_12a,_12b);}},removeWaiState:function(elem,_12d){if(dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_12d);}else{elem.removeAttribute("aria-"+_12d);}}});}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(_12e,_12f){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 _130=dojo.date.stamp._isoRegExp.exec(_12e);var _131=null;if(_130){_130.shift();if(_130[1]){_130[1]--;}if(_130[6]){_130[6]*=1000;}if(_12f){_12f=new Date(_12f);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _12f["get"+prop]();}).forEach(function(_133,_134){if(_130[_134]===undefined){_130[_134]=_133;}});}_131=new Date(_130[0]||1970,_130[1]||0,_130[2]||1,_130[3]||0,_130[4]||0,_130[5]||0,_130[6]||0);var _135=0;var _136=_130[7]&&_130[7].charAt(0);if(_136!="Z"){_135=((_130[8]||0)*60)+(Number(_130[9])||0);if(_136!="-"){_135*=-1;}}if(_136){_135-=_131.getTimezoneOffset();}if(_135){_131.setTime(_131.getTime()+_135*60000);}}return _131;};dojo.date.stamp.toISOString=function(_137,_138){var _=function(n){return (n<10)?"0"+n:n;};_138=_138||{};var _13b=[];var _13c=_138.zulu?"getUTC":"get";var date="";if(_138.selector!="time"){var year=_137[_13c+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_137[_13c+"Month"]()+1),_(_137[_13c+"Date"]())].join("-");}_13b.push(date);if(_138.selector!="date"){var time=[_(_137[_13c+"Hours"]()),_(_137[_13c+"Minutes"]()),_(_137[_13c+"Seconds"]())].join(":");var _140=_137[_13c+"Milliseconds"]();if(_138.milliseconds){time+="."+(_140<100?"0":"")+_(_140);}if(_138.zulu){time+="Z";}else{if(_138.selector!="time"){var _141=_137.getTimezoneOffset();var _142=Math.abs(_141);time+=(_141>0?"-":"+")+_(Math.floor(_142/60))+":"+_(_142%60);}}_13b.push(time);}return _13b.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _144=d._scopeName+"Type";var qry="["+_144+"]";var _146=0,_147={};var _148=function(_149,_14a){var nso=_14a||_147;if(dojo.isIE){var cn=_149["__dojoNameCache"];if(cn&&nso[cn]===_149){return cn;}}var name;do{name="__"+_146++;}while(name in nso);nso[name]=_149;return name;};function _14e(_14f){if(d.isString(_14f)){return "string";}if(typeof _14f=="number"){return "number";}if(typeof _14f=="boolean"){return "boolean";}if(d.isFunction(_14f)){return "function";}if(d.isArray(_14f)){return "array";}if(_14f instanceof Date){return "date";}if(_14f instanceof d._Url){return "url";}return "object";};function _150(_151,type){switch(type){case "string":return _151;case "number":return _151.length?Number(_151):NaN;case "boolean":return typeof _151=="boolean"?_151:!(_151.toLowerCase()=="false");case "function":if(d.isFunction(_151)){_151=_151.toString();_151=d.trim(_151.substring(_151.indexOf("{")+1,_151.length-1));}try{if(_151.search(/[^\w\.]+/i)!=-1){_151=_148(new Function(_151),this);}return d.getObject(_151,false);}catch(e){return new Function();}case "array":return _151?_151.split(/\s*,\s*/):[];case "date":switch(_151){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_151);}case "url":return d.baseUrl+_151;default:return d.fromJson(_151);}};var _153={};function _154(_155){if(!_153[_155]){var cls=d.getObject(_155);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_155+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _157=cls.prototype;var _158={},_159={};for(var name in _157){if(name.charAt(0)=="_"){continue;}if(name in _159){continue;}var _15b=_157[name];_158[name]=_14e(_15b);}_153[_155]={cls:cls,params:_158};}return _153[_155];};this._functionFromScript=function(_15c){var _15d="";var _15e="";var _15f=_15c.getAttribute("args");if(_15f){d.forEach(_15f.split(/\s*,\s*/),function(part,idx){_15d+="var "+part+" = arguments["+idx+"]; ";});}var _162=_15c.getAttribute("with");if(_162&&_162.length){d.forEach(_162.split(/\s*,\s*/),function(part){_15d+="with("+part+"){";_15e+="}";});}return new Function(_15d+_15c.innerHTML+_15e);};this.instantiate=function(_164,_165){var _166=[];_165=_165||{};d.forEach(_164,function(node){if(!node){return;}var type=_144 in _165?_165[_144]:node.getAttribute(_144);if(!type||!type.length){return;}var _169=_154(type),_16a=_169.cls,ps=_16a._noScript||_16a.prototype._noScript;var _16c={},_16d=node.attributes;for(var name in _169.params){var item=name in _165?{value:_165[name],specified:true}:_16d.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _170=item.value;switch(name){case "class":_170="className" in _165?_165.className:node.className;break;case "style":_170="style" in _165?_165.style:(node.style&&node.style.cssText);}var _171=_169.params[name];if(typeof _170=="string"){_16c[name]=_150(_170,_171);}else{_16c[name]=_170;}}if(!ps){var _172=[],_173=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_174){var _175=_174.getAttribute("event"),type=_174.getAttribute("type"),nf=d.parser._functionFromScript(_174);if(_175){if(type=="dojo/connect"){_172.push({event:_175,func:nf});}else{_16c[_175]=nf;}}else{_173.push(nf);}});}var _177=_16a["markupFactory"];if(!_177&&_16a["prototype"]){_177=_16a.prototype["markupFactory"];}var _178=_177?_177(_16c,node,_16a):new _16a(_16c,node);_166.push(_178);var _179=node.getAttribute("jsId");if(_179){d.setObject(_179,_178);}if(!ps){d.forEach(_172,function(_17a){d.connect(_178,_17a.event,null,_17a.func);});d.forEach(_173,function(func){func.call(_178);});}});d.forEach(_166,function(_17c){if(_17c&&_17c.startup&&!_17c._started&&(!_17c.getParent||!_17c.getParent())){_17c.startup();}});return _166;};this.parse=function(_17d){var list=d.query(qry,_17d);var _17f=this.instantiate(list);return _17f;};}();(function(){var _180=function(){if(dojo.config["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_180);}else{dojo._loaders.unshift(_180);}})();}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"connect",function(_181,_182){if(_181&&dojo.isFunction(_181._onConnect)){_181._onConnect(_182);}});dijit._connectOnUseEventHandler=function(_183){};(function(){var _184={};var _185=function(dc){if(!_184[dc]){var r=[];var _188;var _189=dojo.getObject(dc).prototype;for(var _18a in _189){if(dojo.isFunction(_189[_18a])&&(_188=_18a.match(/^_set([a-zA-Z]*)Attr$/))&&_188[1]){r.push(_188[1].charAt(0).toLowerCase()+_188[1].substr(1));}}_184[dc]=r;}return _184[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",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")),postscript:function(_18b,_18c){this.create(_18b,_18c);},create:function(_18d,_18e){this.srcNodeRef=dojo.byId(_18e);this._connects=[];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(_18d){this.params=_18d;dojo.mixin(this,_18d);}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 _190=this.srcNodeRef;if(_190&&_190.parentNode){_190.parentNode.replaceChild(this.domNode,_190);}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 _191=function(attr,_193){if((_193.params&&attr in _193.params)||_193[attr]){_193.attr(attr,_193[attr]);}};for(var attr in this.attributeMap){_191(attr,this);}dojo.forEach(_185(this.declaredClass),function(a){if(!(a in this.attributeMap)){_191(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_196){this.destroyDescendants(_196);this.destroy(_196);},destroy:function(_197){this.uninitialize();dojo.forEach(this._connects,function(_198){dojo.forEach(_198,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){if(w.destroy){w.destroy();}});this.destroyRendering(_197);dijit.registry.remove(this.id);},destroyRendering:function(_19a){if(this.bgIframe){this.bgIframe.destroy(_19a);delete this.bgIframe;}if(this.domNode){if(_19a){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_19a){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_19b){dojo.forEach(this.getChildren(),function(_19c){if(_19c.destroyRecursive){_19c.destroyRecursive(_19b);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_19e){if(_19e in this._deferredConnects){var _19f=this[this._deferredConnects[_19e]||"domNode"];this.connect(_19f,_19e.toLowerCase(),_19e);delete this._deferredConnects[_19e];}},_setClassAttr:function(_1a0){var _1a1=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_1a1,this["class"]);this["class"]=_1a0;dojo.addClass(_1a1,_1a0);},_setStyleAttr:function(_1a2){var _1a3=this[this.attributeMap["style"]||"domNode"];if(dojo.isObject(_1a2)){dojo.style(_1a3,_1a2);}else{if(_1a3.style.cssText){_1a3.style.cssText+="; "+_1a2;}else{_1a3.style.cssText=_1a2;}}this["style"]=_1a2;},setAttribute:function(attr,_1a5){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_1a5);},_attrToDom:function(attr,_1a7){var _1a8=this.attributeMap[attr];dojo.forEach(dojo.isArray(_1a8)?_1a8:[_1a8],function(_1a9){var _1aa=this[_1a9.node||_1a9||"domNode"];var type=_1a9.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_1a7)){_1a7=dojo.hitch(this,_1a7);}if(/^on[A-Z][a-zA-Z]*$/.test(attr)){attr=attr.toLowerCase();}dojo.attr(_1aa,attr,_1a7);break;case "innerHTML":_1aa.innerHTML=_1a7;break;case "class":dojo.removeClass(_1aa,this[attr]);dojo.addClass(_1aa,_1a7);break;}},this);this[attr]=_1a7;},attr:function(name,_1ad){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _1b0=this._getAttrNames(name);if(args==2){if(this[_1b0.s]){return this[_1b0.s](_1ad)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_1ad);}this[name]=_1ad;}return this;}else{if(this[_1b0.g]){return this[_1b0.g]();}else{return this[name];}}},_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(){if(this.containerNode){var list=dojo.query("[widgetId]",this.containerNode);return list.map(dijit.byNode);}else{return [];}},getChildren:function(){if(this.containerNode){return dijit.findWidgets(this.containerNode);}else{return [];}},nodesWithKeyClick:["input","button"],connect:function(obj,_1b6,_1b7){var d=dojo;var dc=dojo.connect;var _1ba=[];if(_1b6=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){var m=d.hitch(this,_1b7);_1ba.push(dc(obj,"onkeydown",this,function(e){if(!d.isFF&&e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}else{if(e.keyCode==d.keys.SPACE){d.stopEvent(e);}}}),dc(obj,"onkeyup",this,function(e){if(e.keyCode==d.keys.SPACE&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));if(d.isFF){_1ba.push(dc(obj,"onkeypress",this,function(e){if(e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));}}_1b6="onclick";}_1ba.push(dc(obj,_1b6,this,_1b7));this._connects.push(_1ba);return _1ba;},disconnect:function(_1bf){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_1bf){dojo.forEach(_1bf,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_1c1,_1c2){if(_1c1["declaredClass"]&&_1c1["addChild"]){_1c1.addChild(this,_1c2);}else{dojo.place(this.domNode,_1c1,_1c2);}return this;}});})();}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(_1cc,map,_1ce,_1cf){_1cf=_1cf||dojo.global;_1ce=(!_1ce)?function(v){return v;}:dojo.hitch(_1cf,_1ce);return _1cc.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_1d1,key,_1d3){var _1d4=dojo.getObject(key,false,map);if(_1d3){_1d4=dojo.getObject(_1d3,false,_1cf).call(_1cf,_1d4,key);}return _1ce(_1d4,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["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){var _1d8=this.declaredClass,_1d9=this;return dojo.string.substitute(tmpl,this,function(_1da,key){if(key.charAt(0)=="!"){_1da=dojo.getObject(key.substr(1),false,_1d9);}if(typeof _1da=="undefined"){throw new Error(_1d8+" template:"+key);}if(_1da==null){return "";}return key.charAt(0)=="!"?_1da:_1da.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _1dc=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_1dc)){node=dojo._toDom(this._stringRepl(_1dc));}else{node=_1dc.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var cw=(this._supportingWidgets=dojo.parser.parse(node));this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_1e1){var dest=this.containerNode;if(_1e1&&dest){while(_1e1.hasChildNodes()){dest.appendChild(_1e1.firstChild);}}},_attachTemplateNodes:function(_1e3,_1e4){_1e4=_1e4||function(n,p){return n.getAttribute(p);};var _1e7=dojo.isArray(_1e3)?_1e3:(_1e3.all||_1e3.getElementsByTagName("*"));var x=dojo.isArray(_1e3)?0:-1;for(;x<_1e7.length;x++){var _1e9=(x==-1)?_1e3:_1e7[x];if(this.widgetsInTemplate&&_1e4(_1e9,"dojoType")){continue;}var _1ea=_1e4(_1e9,"dojoAttachPoint");if(_1ea){var _1eb,_1ec=_1ea.split(/\s*,\s*/);while((_1eb=_1ec.shift())){if(dojo.isArray(this[_1eb])){this[_1eb].push(_1e9);}else{this[_1eb]=_1e9;}}}var _1ed=_1e4(_1e9,"dojoAttachEvent");if(_1ed){var _1ee,_1ef=_1ed.split(/\s*,\s*/);var trim=dojo.trim;while((_1ee=_1ef.shift())){if(_1ee){var _1f1=null;if(_1ee.indexOf(":")!=-1){var _1f2=_1ee.split(":");_1ee=trim(_1f2[0]);_1f1=trim(_1f2[1]);}else{_1ee=trim(_1ee);}if(!_1f1){_1f1=_1ee;}this.connect(_1e9,_1ee,_1f1);}}}var role=_1e4(_1e9,"waiRole");if(role){dijit.setWaiRole(_1e9,role);}var _1f4=_1e4(_1e9,"waiState");if(_1f4){dojo.forEach(_1f4.split(/\s*,\s*/),function(_1f5){if(_1f5.indexOf("-")!=-1){var pair=_1f5.split("-");dijit.setWaiState(_1e9,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_1f7,_1f8,_1f9){var _1fa=dijit._Templated._templateCache;var key=_1f8||_1f7;var _1fc=_1fa[key];if(_1fc){if(!_1fc.ownerDocument||_1fc.ownerDocument==dojo.doc){return _1fc;}dojo.destroy(_1fc);}if(!_1f8){_1f8=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(_1f7)));}_1f8=dojo.string.trim(_1f8);if(_1f9||_1f8.match(/\$\{([^\}]+)\}/g)){return (_1fa[key]=_1f8);}else{return (_1fa[key]=dojo._toDom(_1f8));}};dijit._Templated._sanitizeTemplateString=function(_1fd){if(_1fd){_1fd=_1fd.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _1fe=_1fd.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_1fe){_1fd=_1fe[1];}}else{_1fd="";}return _1fd;};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _1ff=dijit._Templated._templateCache;for(var key in _1ff){var _201=_1ff[key];if(!isNaN(_201.nodeType)){dojo.destroy(_201);}delete _1ff[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(_202,_203){var _204=this.containerNode;if(_203&&typeof _203=="number"){var _205=this.getChildren();if(_205&&_205.length>=_203){_204=_205[_203-1].domNode;_203="after";}}dojo.place(_202.domNode,_204,_203);if(this._started&&!_202._started){_202.startup();}},removeChild:function(_206){if(typeof _206=="number"&&_206>0){_206=this.getChildren()[_206];}if(!_206||!_206.domNode){return;}var node=_206.domNode;node.parentNode.removeChild(node);},_nextElement:function(node){do{node=node.nextSibling;}while(node&&node.nodeType!=1);return node;},_firstElement:function(node){node=node.firstChild;if(node&&node.nodeType!=1){node=this._nextElement(node);}return node;},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);},hasChildren:function(){return !!this._firstElement(this.containerNode);},destroyDescendants:function(_20a){dojo.forEach(this.getChildren(),function(_20b){_20b.destroyRecursive(_20a);});},_getSiblingOfChild:function(_20c,dir){var node=_20c.domNode;var _20f=(dir>0?"nextSibling":"previousSibling");do{node=node[_20f];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node?dijit.byNode(node):null;},getIndexOfChild:function(_210){var _211=this.getChildren();for(var i=0,c;c=_211[i];i++){if(c==_210){return i;}}return -1;}});}if(!dojo._hasResource["dijit._Contained"]){dojo._hasResource["dijit._Contained"]=true;dojo.provide("dijit._Contained");dojo.declare("dijit._Contained",null,{getParent:function(){for(var p=this.domNode.parentNode;p;p=p.parentNode){var id=p.getAttribute&&p.getAttribute("widgetId");if(id){var _216=dijit.byId(id);return _216.isContainer?_216:null;}}return null;},_getSibling:function(_217){var node=this.domNode;do{node=node[_217+"Sibling"];}while(node&&node.nodeType!=1);if(!node){return null;}var id=node.getAttribute("widgetId");return dijit.byId(id);},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");dojo.addClass(this.domNode,this.baseClass);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_21b){_21b.startup();});if(!this.getParent||!this.getParent()){this.resize();this._viewport=dijit.getViewport();this.connect(dojo.global,"onresize",function(){var _21c=dijit.getViewport();if(_21c.w!=this._viewport.w||_21c.h!=this._viewport.h){this._viewport=_21c;this.resize();}});}this.inherited(arguments);},resize:function(_21d,_21e){var node=this.domNode;if(_21d){dojo.marginBox(node,_21d);if(_21d.t){node.style.top=_21d.t+"px";}if(_21d.l){node.style.left=_21d.l+"px";}}var mb=_21e||{};dojo.mixin(mb,_21d||{});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(_226){dojo.addClass(_226.domNode,this.baseClass+"-child");if(_226.baseClass){dojo.addClass(_226.domNode,this.baseClass+"-"+_226.baseClass);}},addChild:function(_227,_228){this.inherited(arguments);if(this._started){this._setupChild(_227);}},removeChild:function(_229){dojo.removeClass(_229.domNode,this.baseClass+"-child");if(_229.baseClass){dojo.removeClass(_229.domNode,this.baseClass+"-"+_229.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 _22f=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_232,dim){_232.resize?_232.resize(dim):dojo.marginBox(_232.domNode,dim);dojo.mixin(_232,dojo.marginBox(_232.domNode));dojo.mixin(_232,dim);};dijit.layout.layoutChildren=function(_234,dim,_236){dim=dojo.mixin({},dim);dojo.addClass(_234,"dijitLayoutContainer");_236=dojo.filter(_236,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_236,function(item){return item.layoutAlign=="client";}));dojo.forEach(_236,function(_239){var elm=_239.domNode,pos=_239.layoutAlign;var _23c=elm.style;_23c.left=dim.l+"px";_23c.top=dim.t+"px";_23c.bottom=_23c.right="auto";dojo.addClass(elm,"dijitAlign"+_22f(pos));if(pos=="top"||pos=="bottom"){size(_239,{w:dim.w});dim.h-=_239.h;if(pos=="top"){dim.t+=_239.h;}else{_23c.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_239,{h:dim.h});dim.w-=_239.w;if(pos=="left"){dim.l+=_239.w;}else{_23c.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_239,dim);}}}});};})();}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments);},_setDisabledAttr:function(_23d){this.disabled=_23d;dojo.attr(this.focusNode,"disabled",_23d);dijit.setWaiState(this.focusNode,"disabled",_23d);if(_23d){this._hovering=false;this._active=false;this.focusNode.removeAttribute("tabIndex");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_23e){dojo.deprecated("setDisabled("+_23e+") is deprecated. Use attr('disabled',"+_23e+") instead.","","2.0");this.attr("disabled",_23e);},_onFocus:function(e){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode);}this.inherited(arguments);},_onMouse:function(_240){var _241=_240.currentTarget;if(_241&&_241.getAttribute){this.stateModifier=_241.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_240.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _242=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_242);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _243=this.baseClass.split(" ");function _244(_245){_243=_243.concat(dojo.map(_243,function(c){return c+_245;}),"dijit"+_245);};if(this.checked){_244("Checked");}if(this.state){_244(this.state);}if(this.selected){_244("Selected");}if(this.disabled){_244("Disabled");}else{if(this.readOnly){_244("ReadOnly");}else{if(this._active){_244(this.stateModifier+"Active");}else{if(this._focused){_244("Focused");}if(this._hovering){_244(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_248={};dojo.forEach(tn.className.split(" "),function(c){_248[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _248[c];});}dojo.forEach(_243,function(c){_248[c]=true;});var _24c=[];for(var c in _248){_24c.push(c);}tn.className=_24c.join(" ");this._stateClasses=_243;},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(_250){},_onChangeActive:false,_handleOnChange:function(_251,_252){this._lastValue=_251;if(this._lastValueReported==undefined&&(_252===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_251;}if((this.intermediateChanges||_252||_252===undefined)&&((typeof _251!=typeof this._lastValueReported)||this.compare(_251,this._lastValueReported)!=0)){this._lastValueReported=_251;if(this._onChangeActive){this.onChange(_251);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._layoutHackHandle){clearTimeout(this._layoutHackHandle);}this.inherited(arguments);},setValue:function(_253){dojo.deprecated("dijit.form._FormWidget:setValue("+_253+") is deprecated.  Use attr('value',"+_253+") instead.","","2.0");this.attr("value",_253);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},_layoutHack:function(){if(dojo.isFF==2&&!this._layoutHackHandle){var node=this.domNode;var old=node.style.opacity;node.style.opacity="0.999";this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){this._layoutHackHandle=null;node.style.opacity=old;}),0);}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:""}),postCreate:function(){if(dojo.isIE||dojo.isWebKit){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_256,_257){this.value=_256;this._handleOnChange(_256,_257);},_getValueAttr:function(_258){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){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}else{if(dojo.isWebKit){te=document.createEvent("Events");te.initEvent("keypress",true,true);te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.target.dispatchEvent(te);}}}}});}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(_25b,_25c){var _25d=this._keyNavCodes={};var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_25b,function(code){_25d[code]=prev;});dojo.forEach(_25c,function(code){_25d[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(_262,_263){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_262);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusNext:function(){if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){this.focusedChild.focusNext();return;}var _264=this._getNextFocusableChild(this.focusedChild,1);if(_264.getFocalNodes){this.focusChild(_264,_264.getFocalNodes()[0]);}else{this.focusChild(_264);}},focusPrev:function(){if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){this.focusedChild.focusPrev();return;}var _265=this._getNextFocusableChild(this.focusedChild,-1);if(_265.getFocalNodes){var _266=_265.getFocalNodes();this.focusChild(_265,_266[_266.length-1]);}else{this.focusChild(_265);}},focusChild:function(_267,node){if(_267){if(this.focusedChild&&_267!==this.focusedChild){this._onChildBlur(this.focusedChild);}this.focusedChild=_267;if(node&&_267.focusFocalNode){_267.focusFocalNode(node);}else{_267.focus();}}},_startupChild:function(_269){if(_269.getFocalNodes){dojo.forEach(_269.getFocalNodes(),function(node){dojo.attr(node,"tabindex",-1);this._connectNode(node);},this);}else{var node=_269.focusNode||_269.domNode;if(_269.isFocusable()){dojo.attr(node,"tabindex",-1);}this._connectNode(node);}},_connectNode:function(node){this.connect(node,"onfocus","_onNodeFocus");this.connect(node,"onblur","_onNodeBlur");},_onContainerFocus:function(evt){if(evt.target!==this.domNode){return;}this.focusFirstChild();dojo.removeAttr(this.domNode,"tabIndex");},_onBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabindex",this.tabIndex);}},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();dojo.stopEvent(evt);}},_onNodeFocus:function(evt){var _272=dijit.getEnclosingWidget(evt.target);if(_272&&_272.isFocusable()){this.focusedChild=_272;}dojo.stopEvent(evt);},_onNodeBlur:function(evt){dojo.stopEvent(evt);},_onChildBlur:function(_274){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_275,dir){if(_275){_275=this._getSiblingOfChild(_275,dir);}var _277=this.getChildren();for(var i=0;i<_277.length;i++){if(!_275){_275=_277[(dir>0)?0:(_277.length-1)];}if(_275.isFocusable()){return _275;}_275=this._getSiblingOfChild(_275,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],{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"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"}}),label:"",iconClass:"",accelKey:"",disabled:false,_fillContent:function(_279){if(_279&&!("label" in this.params)){this.attr("label",_279.innerHTML);}},postCreate:function(){dojo.setSelectable(this.domNode,false);dojo.attr(this.containerNode,"id",this.id+"_text");dijit.setWaiState(this.domNode,"labelledby",this.id+"_text");},_onHover:function(){dojo.addClass(this.domNode,"dijitMenuItemHover");this.getParent().onItemHover(this);},_onUnhover:function(){dojo.removeClass(this.domNode,"dijitMenuItemHover");this.getParent().onItemUnhover(this);},_onClick:function(evt){this.getParent().onItemClick(this,evt);dojo.stopEvent(evt);},onClick:function(evt){},focus:function(){try{dijit.focus(this.focusNode);}catch(e){}},_onFocus:function(){this._setSelected(true);},_setSelected:function(_27c){dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_27c);},setLabel:function(_27d){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_27d);},setDisabled:function(_27e){dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use attr('disabled', bool) instead.","","2.0");this.attr("disabled",_27e);},_setDisabledAttr:function(_27f){this.disabled=_27f;dojo[_27f?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.focusNode,"disabled",_27f?"true":"false");},_setAccelKeyAttr:function(_280){this.accelKey=_280;this.accelKeyNode.style.display=_280?"":"none";this.accelKeyNode.innerHTML=_280;dojo.attr(this.containerNode,"colSpan",_280?"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 _281=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_281[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var node=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(node);}dojo.body().appendChild(this.popup.domNode);this.popup.domNode.style.display="none";if(this.arrowWrapper){dojo.style(this.arrowWrapper,"visibility","");}dijit.setWaiState(this.focusNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){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:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" 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\">\n\t</td>\n</tr>\n",checked:false,_setCheckedAttr:function(_283){dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_283);dijit.setWaiState(this.domNode,"checked",_283);this.checked=_283;},onChange:function(_284){},_onClick:function(e){if(!this.disabled){this.attr("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:"<tr class=\"dijitMenuSeparator\">\n\t<td colspan=\"4\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></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(_286){_286.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_287){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _289=this._getTopMenu();if(_289&&_289._isMenuBar){_289.focusNext();}}},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);}}},_onChildBlur:function(item){item._setSelected(false);dijit.popup.close(item.popup);this._stopPopupTimer();},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(item.disabled){return false;}this.focusChild(item);if(item.popup){if(!this.is_open){this._openPopup();}}else{this.onExecute();item.onClick(evt);}},_openPopup:function(){this._stopPopupTimer();var _290=this.focusedChild;var _291=_290.popup;if(_291.isShowingNow){return;}_291.parentMenu=this;var self=this;dijit.popup.open({parent:this,popup:_291,around:_290.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"}),onCancel:function(){dijit.popup.close(_291);_290.focus();self.currentPopup=null;},onExecute:dojo.hitch(this,"_onDescendantExecute")});this.currentPopup=_291;if(_291.focus){setTimeout(dojo.hitch(_291,"focus"),0);}},onOpen:function(e){this.isShowingNow=true;},onClose:function(){this._stopPopupTimer();this.parentMenu=null;this.isShowingNow=false;this.currentPopup=null;if(this.focusedChild){this._onChildBlur(this.focusedChild);this.focusedChild=null;}},_onFocus:function(){this.isActive=true;dojo.addClass(this.domNode,"dijitMenuActive");dojo.removeClass(this.domNode,"dijitMenuPassive");this.inherited(arguments);},_onBlur:function(){this.isActive=false;dojo.removeClass(this.domNode,"dijitMenuActive");dojo.addClass(this.domNode,"dijitMenuPassive");this.onClose();this.inherited(arguments);},_onDescendantExecute:function(){this.onClose();}});dojo.declare("dijit.Menu",dijit._MenuBase,{constructor:function(){this._bindings=[];},templateString:"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,_contextMenuWithMouse:false,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(_297){var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_297))||dijit.Menu._iframeContentDocument(_297)["__parent__"]||(_297.name&&dojo.doc.frames[_297.name])||null;return win;},_iframeContentDocument:function(_299){var doc=_299.contentDocument||(_299.contentWindow&&_299.contentWindow.document)||(_299.name&&dojo.doc.frames[_299.name]&&dojo.doc.frames[_299.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var win=dijit.getDocumentWindow(node.ownerDocument);if(node.tagName.toLowerCase()=="iframe"){win=this._iframeContentWindow(node);node=dojo.withGlobal(win,dojo.body);}var cn=(node==dojo.body()?dojo.doc:node);node[this.id]=this._bindings.push([dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);},unBindDomNode:function(_29e){var node=dojo.byId(_29e);if(node){var bid=node[this.id]-1,b=this._bindings[bid];dojo.forEach(b,dojo.disconnect);delete this._bindings[bid];}},_contextKey:function(e){this._contextMenuWithMouse=false;if(e.keyCode==dojo.keys.F10){dojo.stopEvent(e);if(e.shiftKey&&e.type=="keydown"){var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};_e.preventDefault=_e.stopPropagation=function(){};window.setTimeout(dojo.hitch(this,function(){this._openMyself(_e);}),1);}}},_contextMouse:function(e){this._contextMenuWithMouse=true;},_openMyself:function(e){if(this.leftClickToOpen&&e.button>0){return;}dojo.stopEvent(e);var x,y;if(dojo.isSafari||this._contextMenuWithMouse){x=e.pageX;y=e.pageY;}else{var _2a8=dojo.coords(e.target,true);x=_2a8.x+10;y=_2a8.y+10;}var self=this;var _2aa=dijit.getFocus(this);function _2ab(){dijit.focus(_2aa);dijit.popup.close(self);};dijit.popup.open({popup:this,x:x,y:y,onExecute:_2ab,onCancel:_2ab,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},uninitialize:function(){dojo.forEach(this.targetNodeIds,this.unBindDomNode,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 _2ad={"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.border="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";dojo.body().appendChild(div);for(var p in _2ad){ds.fontSize=p;_2ad[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}dojo.body().removeChild(div);div=null;return _2ad;};var _2b1=null;dhm.getCachedFontMeasurements=function(_2b2){if(_2b2||!_2b1){_2b1=dhm.getFontMeasurements();}return _2b1;};var _2b3=null,_2b4={};dhm.getTextBox=function(text,_2b6,_2b7){var m;if(!_2b3){m=_2b3=dojo.doc.createElement("div");m.style.position="absolute";m.style.left="-10000px";m.style.top="0";dojo.body().appendChild(m);}else{m=_2b3;}m.className="";m.style.border="0";m.style.margin="0";m.style.padding="0";m.style.outline="0";if(arguments.length>1&&_2b6){for(var i in _2b6){if(i in _2b4){continue;}m.style[i]=_2b6[i];}}if(arguments.length>2&&_2b7){m.className=_2b7;}m.innerHTML=text;return dojo.marginBox(m);};var _2ba={w:16,h:16};dhm.getScrollbar=function(){return {w:_2ba.w,h:_2ba.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_2bb){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);_2ba.w=n.offsetWidth-n.clientWidth;_2ba.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(_2c5,_2c6){if(_2c6>=0){var s=_2c5.style;var v=_2c6+"px";if(_2c5&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_2c9,_2ca,_2cb,_2cc){var evts=(_2cc?_2cc:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_2ca.connect(_2c9,"on"+evts[i],_2cb);}},dgu.removeNode=function(_2d0){_2d0=dojo.byId(_2d0);_2d0&&_2d0.parentNode&&_2d0.parentNode.removeChild(_2d0);return _2d0;};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(_2d5,_2d6,_2d7){if(_2d5.length<=_2d6){_2d5[_2d6]=_2d7;}else{_2d5.splice(_2d6,0,_2d7);}};dgu.arrayRemove=function(_2d8,_2d9){_2d8.splice(_2d9,1);};dgu.arraySwap=function(_2da,inI,inJ){var _2dd=_2da[inI];_2da[inI]=_2da[inJ];_2da[inJ]=_2dd;};})();}if(!dojo._hasResource["dojox.grid._Scroller"]){dojo._hasResource["dojox.grid._Scroller"]=true;dojo.provide("dojox.grid._Scroller");(function(){var _2de=function(_2df){var i=0,n,p=_2df.parentNode;while((n=p.childNodes[i++])){if(n==_2df){return i-1;}}return -1;};var _2e3=function(_2e4){if(!_2e4){return;}var _2e5=function(inW){return inW.domNode&&dojo.isDescendant(inW.domNode,_2e4,true);};var ws=dijit.registry.filter(_2e5);for(var i=0,w;(w=ws[i]);i++){w.destroy();}delete ws;};var _2ea=function(_2eb){var node=dojo.byId(_2eb);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _2ed=function(_2ee,_2ef){var _2f0=[];var i=0,n;while((n=_2ee.childNodes[i++])){if(_2ea(n)==_2ef){_2f0.push(n);}}return _2f0;};var _2f3=function(_2f4){return _2ed(_2f4,"div");};dojo.declare("dojox.grid._Scroller",null,{constructor:function(_2f5){this.setContentNodes(_2f5);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(_2f6,_2f7,_2f8){switch(arguments.length){case 3:this.rowsPerPage=_2f8;case 2:this.keepRows=_2f7;case 1:this.rowCount=_2f6;}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(_2f9,_2fa){return _2f9?(Math.ceil(_2f9/_2fa)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_2fb){this.keepRows=_2fb;this.keepPages=!this.keepRows?this.keepRows:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_2fc){this.contentNodes=_2fc;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.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();},updateRowCount:function(_2fe){this.invalidateNodes();this.rowCount=_2fe;var _2ff=this.pageCount;if(_2ff===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_2ff){for(var i=_2ff-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_2ff){this.height+=this.defaultPageHeight*(this.pageCount-_2ff-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_301){return Boolean(this.getDefaultPageNode(_301));},measurePage:function(_302){var n=this.getDefaultPageNode(_302);return (n&&n.innerHTML)?n.offsetHeight:0;},positionPage:function(_304,_305){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_304].style.top=_305+"px";}},repositionPages:function(_307){var _308=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=_308[_307];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_307):0);for(var p=_307+1;p<=last;p++){n=_308[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_30e){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_30e]);}},preparePage:function(_310,_311){var p=(_311?this.popPage():null);for(var i=0;i<this.colCount;i++){var _314=this.pageNodes[i];var _315=(p===null?this.createPageNode():this.invalidatePageNode(p,_314));_315.pageIndex=_310;_315.id=(this._pageIdPrefix||"")+"page-"+_310;_314[_310]=_315;}},renderPage:function(_316){var _317=[];for(var i=0;i<this.colCount;i++){_317[i]=this.pageNodes[i][_316];}for(var i=0,j=_316*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_317);}},removePage:function(_31a){for(var i=0,j=_31a*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_31d){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_31d,this.pageNodes[i]);if(n){dojo.destroy(n);}}},pacify:function(_320){},pacifying:false,pacifyTicks:200,setPacifying:function(_321){if(this.pacifying!=_321){this.pacifying=_321;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _322=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _322;},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));}this.needPage(this.page,this.pageTop);var _324=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _325=this.getPageHeight(this.page);this.averageRowHeight=(_325>0&&_324>0)?(_325/_324):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _326=this.pageCount-1;var _327=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_326]=_327;return _327;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_329){if(this.pageExists(_329)){var oh=this.getPageHeight(_329);var h=(this.measurePage(_329))||(oh);this.pageHeights[_329]=h;if((h)&&(oh!=h)){this.updateContentHeight(h-oh);this.repositionPages(_329);}}},rowHeightChanged:function(_32c){this.updatePageHeight(Math.floor(_32c/this.rowsPerPage));},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(_32e){var ph=this.pageHeights[_32e];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_330){return this.stack.push(_330);},popPage:function(){return this.stack.shift();},findPage:function(_331){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_331){break;}}this.page=i;this.pageTop=h;},buildPage:function(_335,_336,_337){this.preparePage(_335,_336);this.positionPage(_335,_337);this.installPage(_335);this.renderPage(_335);this.pushPage(_335);},needPage:function(_338,_339){var h=this.getPageHeight(_338),oh=h;if(!this.pageExists(_338)){this.buildPage(_338,this.keepPages&&(this.stack.length>=this.keepPages),_339);h=this.measurePage(_338)||h;this.pageHeights[_338]=h;if(h&&(oh!=h)){this.updateContentHeight(h-oh);}}else{this.positionPage(_338,_339);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_33c){this.grid.scrollTop=_33c;if(this.colCount){this.startPacify();this.findPage(_33c);var h=this.height;var b=this.getScrollBottom(_33c);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,_33c);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_341){return (this.windowHeight>=0?_341+this.windowHeight:-1);},processNodeEvent:function(e,_343){var t=e.target;while(t&&(t!=_343)&&t.parentNode&&(t.parentNode.parentNode!=_343)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_343)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_2de(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_347,_348){},removeRow:function(_349){},getDefaultPageNode:function(_34a){return this.getDefaultNodes()[_34a];},positionPageNode:function(_34b,_34c){},getPageNodePosition:function(_34d){return _34d.offsetTop;},invalidatePageNode:function(_34e,_34f){var p=_34f[_34e];if(p){delete _34f[_34e];this.removePage(_34e,p);_2e3(p);p.innerHTML="";}return p;},getPageRow:function(_351){return _351*this.rowsPerPage;},getLastPageRow:function(_352){return Math.min(this.rowCount,this.getPageRow(_352+1))-1;},getFirstVisibleRow:function(_353,_354,_355){if(!this.pageExists(_353)){return 0;}var row=this.getPageRow(_353);var _357=this.getDefaultNodes();var rows=_2f3(_357[_353]);for(var i=0,l=rows.length;i<l&&_354<_355;i++,row++){_354+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_35b,_35c,_35d){if(!this.pageExists(_35b)){return 0;}var _35e=this.getDefaultNodes();var row=this.getLastPageRow(_35b);var rows=_2f3(_35e[_35b]);for(var i=rows.length-1;i>=0&&_35c>_35d;i--,row--){_35c-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_362){var _363=this.getDefaultNodes();var rows=_2f3(_363[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_362){this.offset=h-(t-_362);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_369){var _36a=Math.floor(_369/this.rowsPerPage);var t=0;for(var i=0;i<_36a;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.needPage(_36a,this.pageTop);var _36d=this.getDefaultNodes();var rows=_2f3(_36d[_36a]);var r=_369-this.rowsPerPage*_36a;for(var 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");(function(){var _371=function(_372){try{dojox.grid.util.fire(_372,"focus");dojox.grid.util.fire(_372,"select");}catch(e){}};var _373=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,_valueProp:"value",_formatPending:false,constructor:function(_375){this._props=_375||{};dojo.mixin(this,_375);},format:function(_376,_377){var f,i=this.grid.edit.info,d=this.get?this.get(_376,_377):(this.value||this.defaultValue);d=(d&&d.replace)?d.replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_376&&i.cell==this))){return this.formatEditing(d,_376);}else{var v=(d!=this.defaultValue&&(f=this.formatter))?f.call(this,d,_376):d;return (typeof v=="undefined"?this.defaultValue:v);}},formatEditing:function(_37c,_37d){},getNode:function(_37e){return this.view.getCellNode(_37e,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_37f){return (this.getNode(_37f)||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(_382,_383){this.grid.edit.applyCellEdit(_382,this,_383);},cancelEdit:function(_384){this.grid.doCancelEdit(_384);},_onEditBlur:function(_385){if(this.grid.edit.isEditCell(_385,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_386,_387){if(this.commitOnBlur){dojo.connect(_386,"onblur",function(e){setTimeout(dojo.hitch(this,"_onEditBlur",_387),250);});}},needFormatNode:function(_389,_38a){this._formatPending=true;_373(this,"_formatNode",_389,_38a);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_38b,_38c){if(this._formatPending){this._formatPending=false;dojo.setSelectable(this.grid.domNode,true);this.formatNode(this.getEditNode(_38c),_38b,_38c);}},formatNode:function(_38d,_38e,_38f){if(dojo.isIE){_373(this,"focus",_38f,_38d);}else{this.focus(_38f,_38d);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_392){return this.getEditNode(_392)[this._valueProp];},setValue:function(_393,_394){var n=this.getEditNode(_393);if(n){n[this._valueProp]=_394;}},focus:function(_396,_397){_371(_397||this.getEditNode(_396));},save:function(_398){this.value=this.value||this.getValue(_398);},restore:function(_399){this.setValue(_399,this.value);},_finish:function(_39a){dojo.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_39b){this.applyEdit(this.getValue(_39b),_39b);this._finish(_39b);},cancel:function(_39c){this.cancelEdit(_39c);this._finish(_39c);}});dgc._Base.markupFactory=function(node,_39e){var d=dojo;var _3a0=d.trim(d.attr(node,"formatter")||"");if(_3a0){_39e.formatter=dojo.getObject(_3a0);}var get=d.trim(d.attr(node,"get")||"");if(get){_39e.get=dojo.getObject(get);}var _3a2=function(attr){var _3a4=d.trim(d.attr(node,attr)||"");return _3a4?!(_3a4.toLowerCase()=="false"):undefined;};_39e.sortDesc=_3a2("sortDesc");_39e.editable=_3a2("editable");_39e.alwaysEditing=_3a2("alwaysEditing");_39e.noresize=_3a2("noresize");var _3a5=d.trim(d.attr(node,"loadingText")||d.attr(node,"defaultValue")||"");if(_3a5){_39e.defaultValue=_3a5;}var _3a6=function(attr){return d.trim(d.attr(node,attr)||"")||undefined;};_39e.styles=_3a6("styles");_39e.headerStyles=_3a6("headerStyles");_39e.cellStyles=_3a6("cellStyles");_39e.classes=_3a6("classes");_39e.headerClasses=_3a6("headerClasses");_39e.cellClasses=_3a6("cellClasses");};dojo.declare("dojox.grid.cells.Cell",dgc._Base,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_3a8,_3a9){this.needFormatNode(_3a8,_3a9);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_3a8+"\">";},formatNode:function(_3aa,_3ab,_3ac){this.inherited(arguments);this.registerOnBlur(_3aa,_3ac);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){dojo.stopEvent(e);}}},_finish:function(_3af){this.inherited(arguments);var n=this.getEditNode(_3af);try{dojox.grid.util.fire(n,"blur");}catch(e){}}});dgc.Cell.markupFactory=function(node,_3b2){dgc._Base.markupFactory(node,_3b2);var d=dojo;var _3b4=d.trim(d.attr(node,"keyFilter")||"");if(_3b4){_3b2.keyFilter=new RegExp(_3b4);}};dojo.declare("dojox.grid.cells.RowIndex",dgc.Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_3b5){return _3b5+1;}});dgc.RowIndex.markupFactory=function(node,_3b7){dgc.Cell.markupFactory(node,_3b7);};dojo.declare("dojox.grid.cells.Select",dgc.Cell,{options:null,values:null,returnIndex:-1,constructor:function(_3b8){this.values=this.values||this.options;},formatEditing:function(_3b9,_3ba){this.needFormatNode(_3b9,_3ba);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",(_3b9==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},getValue:function(_3bf){var n=this.getEditNode(_3bf);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 _3c6=d.trim(d.attr(node,"options")||"");if(_3c6){var o=_3c6.split(",");if(o[0]!=_3c6){cell.options=o;}}var _3c8=d.trim(d.attr(node,"values")||"");if(_3c8){var v=_3c8.split(",");if(v[0]!=_3c8){cell.values=v;}}};dojo.declare("dojox.grid.cells.AlwaysEdit",dgc.Cell,{alwaysEditing:true,_formatNode:function(_3ca,_3cb){this.formatNode(this.getEditNode(_3cb),_3ca,_3cb);},applyStaticValue:function(_3cc){var e=this.grid.edit;e.applyCellEdit(this.getValue(_3cc),this,_3cc);e.start(this,_3cc,true);}});dgc.AlwaysEdit.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);};dojo.declare("dojox.grid.cells.Bool",dgc.AlwaysEdit,{_valueProp:"checked",formatEditing:function(_3d0,_3d1){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_3d0?" 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._isMac=navigator.appVersion.indexOf("Macintosh")>=0;dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};dojo.dnd._lmb=dojo.isIE?1:0;dojo.dnd._isLmbPressed=dojo.isIE?function(e){return e.button&1;}:function(e){return e.button===0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);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 _3ee=n.scrollLeft,_3ef=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_3ee!=n.scrollLeft||_3ef!=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,_3f5=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),_3f5];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});dojo.stopEvent(e);},onMouseUp:function(e){if(dojo.isWebKit&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}dojo.stopEvent(e);},onFirstMove:function(){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left));t=Math.round(parseFloat(s.top));break;default:s.position="absolute";var m=dojo.marginBox(this.node);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);}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,_404){this.node=dojo.byId(node);if(!_404){_404={};}this.handle=_404.handle?dojo.byId(_404.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_404.delay>0?_404.delay:0;this.skip=_404.skip;this.mover=_404.mover?_404.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(_405,node){return new dojo.dnd.Moveable(node,_405);},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(_40d){dojo.publish("/dnd/move/start",[_40d]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_40e){dojo.publish("/dnd/move/stop",[_40e]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_40f){},onMove:function(_410,_411){this.onMoving(_410,_411);var s=_410.node.style;s.left=_411.l+"px";s.top=_411.t+"px";this.onMoved(_410,_411);},onMoving:function(_413,_414){},onMoved:function(_415,_416){}});}if(!dojo._hasResource["dojox.grid._Builder"]){dojo._hasResource["dojox.grid._Builder"]=true;dojo.provide("dojox.grid._Builder");(function(){var dg=dojox.grid;var _418=function(td){return td.cellIndex>=0?td.cellIndex:dojo.indexOf(td.parentNode.cells,td);};var _41a=function(tr){return tr.rowIndex>=0?tr.rowIndex:dojo.indexOf(tr.parentNode.childNodes,tr);};var _41c=function(_41d,_41e){return _41d&&((_41d.rows||0)[_41e]||_41d.childNodes[_41e]);};var _41f=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _422=function(_423,_424){for(var n=_423;n&&_424(n);n=n.parentNode){}return n;};var _426=function(_427){var name=_427.toUpperCase();return function(node){return node.tagName!=name;};};var _42a=dojox.grid.util.rowIndexTag;var _42b=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=\""+(dojo.isFF<3?"wairole:":"")+"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(_42e,_42f,_430,_431){var _432=[],html;var _434=dojo.isFF<3?"wairole:":"";if(_431){var _435=_42e.index!=_42e.grid.getSortIndex()?"":_42e.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";html=["<th tabIndex=\"-1\" role=\"",_434,"columnheader\"",_435];}else{html=["<td tabIndex=\"-1\" role=\"",_434,"gridcell\""];}_42e.colSpan&&html.push(" colspan=\"",_42e.colSpan,"\"");_42e.rowSpan&&html.push(" rowspan=\"",_42e.rowSpan,"\"");html.push(" class=\"dojoxGridCell ");_42e.classes&&html.push(_42e.classes," ");_430&&html.push(_430," ");_432.push(html.join(""));_432.push("");html=["\" idx=\"",_42e.index,"\" style=\""];if(_42f&&_42f[_42f.length-1]!=";"){_42f+=";";}html.push(_42e.styles,_42f||"",_42e.hidden?"display:none;":"");_42e.unitWidth&&html.push("width:",_42e.unitWidth,";");_432.push(html.join(""));_432.push("");html=["\""];_42e.attrs&&html.push(" ",_42e.attrs);html.push(">");_432.push(html.join(""));_432.push("");_432.push(_431?"</th>":"</td>");return _432;},isCellNode:function(_436){return Boolean(_436&&_436!=dojo.doc&&dojo.attr(_436,"idx"));},getCellNodeIndex:function(_437){return _437?Number(dojo.attr(_437,"idx")):-1;},getCellNode:function(_438,_439){for(var i=0,row;row=_41c(_438.firstChild,i);i++){for(var j=0,cell;cell=row.cells[j];j++){if(this.getCellNodeIndex(cell)==_439){return cell;}}}},findCellTarget:function(_43e,_43f){var n=_43e;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_42b in n.offsetParent.parentNode&&n.offsetParent.parentNode[_42b]!=this.view.id))&&(n!=_43f)){n=n.parentNode;}return n!=_43f?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(_442,_443){var n=_442;while(n&&(n!=this.domNode)&&(!(_443 in n)||(_42b in n&&n[_42b]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_445){return this.findTarget(_445,_42a);},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);}},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 _44e=this.grid.get,_44f=this.view.structure.cells;for(var j=0,row;(row=_44f[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_44e;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);}}},generateHtml:function(_454,_455){var html=this.getTableArray(),v=this.view,_458=v.structure.cells,item=this.grid.getItem(_455);dojox.grid.util.fire(this.view,"onBeforeRow",[_455,_458]);for(var j=0,row;(row=_458[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(_455,item);m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_42a];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(_463,_464){var html=this.getTableArray(),_466=this.view.structure.cells;dojox.grid.util.fire(this.view,"onBeforeRow",[-1,_466]);for(var j=0,row;(row=_466[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_46b;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){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+"'";}}_46b=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_46b[5]=(_464!=undefined?_464:_463(cell));_46b[3]=cell.customStyles.join(";");_46b[1]=cell.customClasses.join(" ");html.push(_46b.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var x=e.layerX;if(dojo.isMoz){var n=_422(e.target,_426("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!dojo._isBodyLtr()&&e.sourceView.headerNode.scrollLeft<t){x-=t;}}var n=_422(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=_418(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.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.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)?"e-resize":(this.overLeftResizeArea(e)?"w-resize":""));if(c&&!this.canResize(e)){c="not-allowed";}if(dojo.isIE){var t=e.sourceView.headerNode.scrollLeft;e.sourceView.headerNode.style.cursor=c||"";e.sourceView.headerNode.scrollLeft=t;}else{e.sourceView.headerNode.style.cursor=c||"";}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;}},beginColumnResize:function(e){this.moverDiv=document.createElement("div");dojo.style(this.moverDiv,{position:"absolute",left:0});dojo.body().appendChild(this.moverDiv);var m=this.moveable=new dojo.dnd.Moveable(this.moverDiv);var _482=[],_483=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_483[i]);i++){_482.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=dojo._isBodyLtr()?1:-1;var _488=e.grid.views.views;var _489=[];for(var i=view.idx+adj,_48a;(_48a=_488[i]);i=i+adj){_489.push({node:_48a.headerNode,left:window.parseInt(_48a.headerNode.style.left)});}var _48b=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:dojo.contentBox(view.headerNode).w,table:_48b,tw:dojo.contentBox(_48b).w,spanners:_482,followers:_489};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;}));view.convertColPctToFixed();if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_48d,_48e,_48f){var _490=dojo._isBodyLtr();var _491=_490?_48f.l:-_48f.l;var w=_48d.w+_491;var vw=_48d.vw+_491;var tw=_48d.tw+_491;if(w>=this.minColWidth){for(var i=0,s,sw;(s=_48d.spanners[i]);i++){sw=s.width+_491;s.node.style.width=sw+"px";_48d.view.setColWidth(s.index,sw);}for(var i=0,f,fl;(f=_48d.followers[i]);i++){fl=f.left+_491;f.node.style.left=fl+"px";}_48d.node.style.width=w+"px";_48d.view.setColWidth(_48d.index,w);_48d.view.headerNode.style.width=vw+"px";_48d.view.setColumnsWidth(tw);if(!_490){_48d.view.headerNode.scrollLeft=_48d.scrollLeft+_491;}}if(_48d.view.flexCells&&!_48d.view.testFlexCells()){var t=_41f(_48d.node);t&&(t.style.width="");}},endResizeColumn:function(_49b){dojo.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;var conn=dojo.connect(_49b.view,"update",this,function(){dojo.disconnect(conn);this._skipBogusClicks=false;});setTimeout(dojo.hitch(_49b.view,"update"),50);}});dg._TableMap=dojo.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_49e){var _49f=_49e.length;if(!_49f){return;}this.map=[];for(var j=0,row;(row=_49e[j]);j++){this.map[j]=[];}for(var j=0,row;(row=_49e[j]);j++){for(var i=0,x=0,cell,_4a5,_4a6;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_4a6=cell.rowSpan||1;_4a5=cell.colSpan||1;for(var y=0;y<_4a6;y++){for(var s=0;s<_4a5;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_4a5;}}},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(_4ae,_4af){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_4af&&cell.r==_4ae){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_4b4,_4b5,_4b6){var row=_4b4&&_4b4.rows[_4b5];return row&&row.cells[_4b6];},_findOverlappingNodes:function(_4b8,_4b9,_4ba){var _4bb=[];var m=this.getMapCoords(_4b9,_4ba);var row=this.map[m.j];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(_4b8,rw.r,rw.c):null);if(n){_4bb.push(n);}}return _4bb;},findOverlappingNodes:function(_4c1){return this._findOverlappingNodes(_41f(_4c1),_41a(_4c1.parentNode),_418(_4c1));}});})();}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,_4c3){this.node=dojo.byId(node);if(!_4c3){_4c3={};}this.creator=_4c3.creator||null;this.skipForm=_4c3.skipForm;this.parent=_4c3.dropParent&&dojo.byId(_4c3.dropParent);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_4c3&&_4c3._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,_4d3,_4d4){if(!this.parent.firstChild){_4d4=null;}else{if(_4d3){if(!_4d4){_4d4=this.parent.firstChild;}}else{if(_4d4){_4d4=_4d4.nextSibling;}}}if(_4d4){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,_4d4);}}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(_4d7,node){_4d7._skipStartup=true;return new dojo.dnd.Container(node,_4d7);},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,_4e0){var _4e1="dojoDnd"+type;var _4e2=type.toLowerCase()+"State";dojo.removeClass(this.node,_4e1+this[_4e2]);dojo.addClass(this.node,_4e1+_4e0);this[_4e2]=_4e0;},_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 _4e9=node.parentNode;_4e9;node=_4e9,_4e9=node.parentNode){if(_4e9==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 _4f7=item&&dojo.isObject(item),data,type,n;if(_4f7&&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=(_4f7&&item.data)?item.data:item;type=(_4f7&&item.type)?item.type:["text"];n=(hint=="avatar"?dojo.dnd._createSpan:c)(String(data));}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,_4fc){if(!_4fc){_4fc={};}this.singular=_4fc.singular;this.autoSync=_4fc.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(_50e,data,_510,_511){var _512=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_512.call(this,item,hint);if(_50e){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,_510,_511);this._normalizedCreator=_512;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_516,node){_516._skipStartup=true;return new dojo.dnd.Selector(node,_516);},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!dojo.dnd.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(e.button===dojo.dnd._lmb){dojo.stopEvent(e);}return;}if(!this.singular&&e.shiftKey){if(!dojo.dnd.getCopyKeyState(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.dnd.getCopyKeyState(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dojo.dnd.getCopyKeyState(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(_521){this.manager=_521;this.construct();},construct:function(){var a=dojo.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),b=dojo.create("tbody",null,a),tr=dojo.create("tr",null,b),td=dojo.create("td",{innerHTML:this._generateText()},tr),k=Math.min(5,this.manager.nodes.length),i=0,_528=this.manager.source,node;dojo.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_528.creator){node=_528._normalizedCreator(_528.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _52a=dojo.create("table"),_52b=dojo.create("tbody",null,_52a);_52b.appendChild(node);node=_52a;}}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");dojo.query("tr.dojoDndAvatarHeader td",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(_52d){if(this.avatar){this.target=(_52d&&_52d.targetState!="Disabled")?_52d:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}dojo.publish("/dnd/source/over",[_52d]);},outSource:function(_52e){if(this.avatar){if(this.target==_52e){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_52f,_530,copy){this.source=_52f;this.nodes=_530;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_52f,_530,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 _534=Boolean(this.target&&flag);if(this.canDropFlag!=_534){this.canDropFlag=_534;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.dnd.getCopyKeyState(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.dnd.getCopyKeyState(e))),_53b=[this.source,this.nodes,copy,this.target];dojo.publish("/dnd/drop/before",_53b);dojo.publish("/dnd/drop",_53b);}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"],constructor:function(node,_542){dojo.mixin(this,dojo.mixin({},_542));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(_545,_546){if(this==_545){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_546.length;++i){var type=_545.getItem(_546[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(_54b,self){if(_54b){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(_54d,node){_54d._skipStartup=true;return new dojo.dnd.Source(node,_54d);},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){var _551=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox={xy:dojo.coords(this.current,true),w:this.current.offsetWidth,h:this.current.offsetHeight};}if(this.horizontal){_551=(e.pageX-this.targetBox.xy.x)<(this.targetBox.w/2);}else{_551=(e.pageY-this.targetBox.xy.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_551!=this.before){this._markTargetAnchor(_551);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}else{if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _552=this.getSelectedNodes();if(_552.length){m.startDrag(this,_552,this.copyState(dojo.dnd.getCopyKeyState(e),true));}}}},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(_555){if(this!=_555){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(_557,_558,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_557?(copy?"Copied":"Moved"):"");}var _55a=this.accept&&this.checkAcceptance(_557,_558);this._changeState("Target",_55a?"":"Disabled");if(this==_557){dojo.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_55b,_55c,copy,_55e){if(this==_55e){this.onDrop(_55b,_55c,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(_55f,_560,copy){if(this!=_55f){this.onDropExternal(_55f,_560,copy);}else{this.onDropInternal(_560,copy);}},onDropExternal:function(_562,_563,copy){var _565=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _565.call(this,_562.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_562.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=_562.getItem(node.id);_562.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_562.selectNone();}this.insertNodes(true,_563,this.before,this.current);if(!copy&&this.creator){_562.deleteSelectedNodes();}this._normalizedCreator=_565;},onDropInternal:function(_56f,copy){var _571=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _571.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,_56f,this.before,this.current);this._normalizedCreator=_571;},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(_57b){if(this.current==this.targetAnchor&&this.before==_57b){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_57b;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.dnd._isLmbPressed(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")){break;}}return false;}});dojo.declare("dojo.dnd.Target",dojo.dnd.Source,{constructor:function(node,_580){this.isSource=false;dojo.removeClass(this.node,"dojoDndSource");},markupFactory:function(_581,node){_581._skipStartup=true;return new dojo.dnd.Target(node,_581);}});dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(node,_584){this.autoSync=true;},markupFactory:function(_585,node){_585._skipStartup=true;return new dojo.dnd.AutoSource(node,_585);}});}if(!dojo._hasResource["dojox.grid._View"]){dojo._hasResource["dojox.grid._View"]=true;dojo.provide("dojox.grid._View");(function(){var _587=function(_588,_589){return _588.style.cssText==undefined?_588.getAttribute("style"):_588.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,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 dojox.grid._ContentBuilder(this);this.header=new dojox.grid._HeaderBuilder(this);if(!dojo._isBodyLtr()){this.headerNodeContainer.style.width="";}},destroy:function(){dojo.destroy(this.headerNode);delete this.headerNode;dojo.forEach(this.rowNodes,dojo.destroy);this.rowNodes=[];if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(dojo.isWebKit||dojo.isOpera){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_58a){var vs=(this.structure=_58a);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;this.onAfterRow=vs.onAfterRow;this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},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 _590=this.hasVScrollbar();var _591=dojo.style(this.scrollboxNode,"overflow");if(this.noscroll||!_591||_591=="hidden"){_590=false;}else{if(_591=="scroll"){_590=true;}}return (_590?dojox.html.metrics.getScrollbar().w:0);},getColumnsWidth:function(){return this.headerContentNode.firstChild.offsetWidth;},setColumnsWidth:function(_592){this.headerContentNode.firstChild.style.width=_592+"px";if(this.viewWidth){this.viewWidth=_592+"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 _593=this.grid.layout.cells;var _594=dojo.hitch(this,function(node,_596){var inc=_596?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_593[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_593[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}this.source=new dojo.dnd.Source(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,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);}}}),_markTargetAnchor:dojo.hitch(this,function(_59b){var src=this.source;if(src.current==src.targetAnchor&&src.before==_59b){return;}if(src.targetAnchor&&_594(src.targetAnchor,src.before)){src._removeItemClass(_594(src.targetAnchor,src.before),src.before?"After":"Before");}dojo.dnd.Source.prototype._markTargetAnchor.call(src,_59b);if(src.targetAnchor&&_594(src.targetAnchor,src.before)){src._addItemClass(_594(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:dojo.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_594(src.targetAnchor,src.before)){src._removeItemClass(_594(src.targetAnchor,src.before),src.before?"After":"Before");}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);})});this._source_conn=dojo.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=dojo.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_onDndDropBefore:function(_59e,_59f,copy){if(dojo.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _5a1=this.grid.views.views;var _5a2=_5a1[_59e.viewIndex];var _5a3=_5a1[this.index];if(_5a3!=_5a2){var s=_5a2.convertColPctToFixed();var t=_5a3.convertColPctToFixed();if(s||t){setTimeout(function(){_5a2.update();_5a3.update();},50);}}},_onDndDrop:function(_5a6,_5a7,copy){if(dojo.dnd.manager().target!==this.source){if(dojo.dnd.manager().source===this.source){this._removingColumn=true;}return;}var _5a9=function(n){return n?dojo.attr(n,"idx"):null;};var w=dojo.marginBox(_5a7[0]).w;if(_5a6.viewIndex!==this.index){var _5ac=this.grid.views.views;var _5ad=_5ac[_5a6.viewIndex];var _5ae=_5ac[this.index];if(_5ad.viewWidth&&_5ad.viewWidth!="auto"){_5ad.setColumnsWidth(_5ad.getColumnsWidth()-w);}if(_5ae.viewWidth&&_5ae.viewWidth!="auto"){_5ae.setColumnsWidth(_5ae.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;var _5b1=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;window.setTimeout(function(){_5b1.moveColumn(_5a6.viewIndex,idx,_5a9(_5a7[0]),_5a9(stn),stb);},1);},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(_5b3){var n=_5b3.name||_5b3.grid.getCellName(_5b3);var ret=["<div class=\"dojoxGridSortNode"];if(_5b3.index!=_5b3.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_5b3.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_5b3.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\""+(dojo.isFF<3?"wairole:":"")+"presentation\"></div>"]);}ret=ret.concat([n,"</div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_5b6){if(this._hasHScroll==undefined||_5b6){if(this.noscroll){this._hasHScroll=false;}else{var _5b7=dojo.style(this.scrollboxNode,"overflow");if(_5b7=="hidden"){this._hasHScroll=false;}else{if(_5b7=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth<this.contentNode.offsetWidth);}}}}return this._hasHScroll;},hasVScrollbar:function(_5b8){if(this._hasVScroll==undefined||_5b8){if(this.noscroll){this._hasVScroll=false;}else{var _5b9=dojo.style(this.scrollboxNode,"overflow");if(_5b9=="hidden"){this._hasVScroll=false;}else{if(_5b9=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.offsetHeight<this.contentNode.offsetHeight);}}}}return this._hasVScroll;},convertColPctToFixed:function(){var _5ba=false;var _5bb=dojo.query("th",this.headerContentNode);var _5bc=dojo.map(_5bb,function(c,vIdx){var w=c.style.width;dojo.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_5ba=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return dojo.contentBox(c).w;});if(_5ba){dojo.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _5c2=cell.view.getHeaderCellNode(cell.index);if(_5c2&&dojo.hasAttr(_5c2,"vIdx")){var vIdx=window.parseInt(dojo.attr(_5c2,"vIdx"));this.setColWidth(idx,_5bc[vIdx]);_5bb[vIdx].style.width=cell.unitWidth;dojo.removeAttr(_5c2,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_5c4){if(!this.grid._autoHeight){var h=this.domNode.clientHeight;if(_5c4){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(_5cc){var _5cd=this.createRowNode(_5cc);this.buildRow(_5cc,_5cd);this.grid.edit.restore(this,_5cc);if(this._pendingUpdate){window.clearTimeout(this._pendingUpdate);}this._pendingUpdate=window.setTimeout(dojo.hitch(this,function(){window.clearTimeout(this._pendingUpdate);delete this._pendingUpdate;this.grid._resize();}),50);return _5cd;},createRowNode:function(_5ce){var node=document.createElement("div");node.className=this.classTag+"Row";dojo.attr(node,"role","row");node[dojox.grid.util.gridViewTag]=this.id;node[dojox.grid.util.rowIndexTag]=_5ce;this.rowNodes[_5ce]=node;return node;},buildRow:function(_5d0,_5d1){this.buildRowContent(_5d0,_5d1);this.styleRow(_5d0,_5d1);},buildRowContent:function(_5d2,_5d3){_5d3.innerHTML=this.content.generateHtml(_5d2,_5d2);if(this.flexCells&&this.contentWidth){_5d3.firstChild.style.width=this.contentWidth;}dojox.grid.util.fire(this,"onAfterRow",[_5d2,this.structure.cells,_5d3]);},rowRemoved:function(_5d4){this.grid.edit.save(this,_5d4);delete this.rowNodes[_5d4];},getRowNode:function(_5d5){return this.rowNodes[_5d5];},getCellNode:function(_5d6,_5d7){var row=this.getRowNode(_5d6);if(row){return this.content.getCellNode(row,_5d7);}},getHeaderCellNode:function(_5d9){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_5d9);}},styleRow:function(_5da,_5db){_5db._style=_587(_5db);this.styleRowNode(_5da,_5db);},styleRowNode:function(_5dc,_5dd){if(_5dd){this.doStyleRowNode(_5dc,_5dd);}},doStyleRowNode:function(_5de,_5df){this.grid.styleRowNode(_5de,_5df);},updateRow:function(_5e0){var _5e1=this.getRowNode(_5e0);if(_5e1){_5e1.style.height="";this.buildRow(_5e0,_5e1);}return _5e1;},updateRowStyles:function(_5e2){this.styleRowNode(_5e2,this.getRowNode(_5e2));},lastTop:0,firstScroll:0,doscroll:function(_5e3){var _5e4=dojo._isBodyLtr();if(this.firstScroll<2){if((!_5e4&&this.firstScroll==1)||(_5e4&&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=_5e4?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(_5e7){this.lastTop=_5e7;this.scrollboxNode.scrollTop=_5e7;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(_5ec,_5ed){this.grid.setCellWidth(_5ec,_5ed+"px");},update:function(){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 _5f5=this.manager.source,node;if(_5f5.creator){node=_5f5._normailzedCreator(_5f5.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _5f7=dd.createElement("table"),_5f8=dd.createElement("tbody");_5f8.appendChild(node);_5f7.appendChild(_5f8);node=_5f7;}else{if(node.tagName.toLowerCase()=="th"){var _5f7=dd.createElement("table"),_5f8=dd.createElement("tbody"),r=dd.createElement("tr");_5f7.cellPadding=_5f7.cellSpacing="0";r.appendChild(node);_5f8.appendChild(r);_5f7.appendChild(_5f8);node=_5f7;}}}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 _5fb=dojo.dnd.manager().makeAvatar;dojo.dnd.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined){return new dojox.grid._GridAvatar(this);}return _5fb.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(_5fd,_5fe){var w=this.contentNode.offsetWidth-this.padBorderWidth;_5fe.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\""+(dojo.isFF<3?"wairole:":"")+"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){},doStyleRowNode:function(_600,_601){var n=["dojoxGridRowbar"];if(this.grid.rows.isOver(_600)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_600)){n.push("dojoxGridRowbarSelected");}_601.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(_605){this.grid=_605;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_606,_607,_608,_609,_60a){var _60b=this.structure[_606].cells[0];var _60c=this.structure[_607].cells[0];var cell=null;var _60e=0;var _60f=0;for(var i=0,c;c=_60b[i];i++){if(c.index==_608){_60e=i;break;}}cell=_60b.splice(_60e,1)[0];cell.view=this.grid.views.views[_607];for(i=0,c=null;c=_60c[i];i++){if(c.index==_609){_60f=i;break;}}if(!_60a){_60f+=1;}_60c.splice(_60f,0,cell);var _612=this.grid.getCell(this.grid.getSortIndex());if(_612){_612._currentlySorted=this.grid.getSortAsc();}this.cells=[];var _608=0;for(var i=0,v;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0,c;c=cs[k];k++){c.index=_608;this.cells.push(c);if("_currentlySorted" in c){var si=_608+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_608++;}}}this.grid.setupHeaderMenu();},setColumnVisibility:function(_618,_619){var cell=this.cells[_618];if(cell.hidden==_619){cell.hidden=!_619;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(_61d,_61e,_61f){var self=this;var _621=function(_622){var w=0;if(_622.colSpan>1){w=0;}else{w=_622.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _624={grid:this.grid,subrow:_61d,layoutIndex:_61e,index:this.cells.length};if(_61f&&_61f instanceof dojox.grid.cells._Base){var _625=dojo.clone(_61f);_624.unitWidth=_621(_625._props);_625=dojo.mixin(_625,this._defaultCellProps,_61f._props,_624);return _625;}var _626=_61f.type||this._defaultCellProps.type||dojox.grid.cells.Cell;_624.unitWidth=_621(_61f);return new _626(dojo.mixin({},this._defaultCellProps,_61f,_624));},addRowDef:function(_627,_628){var _629=[];var _62a=0,_62b=0,_62c=true;for(var i=0,def,cell;(def=_628[i]);i++){cell=this.addCellDef(_627,i,def);_629.push(cell);this.cells.push(cell);if(_62c&&cell.relWidth){_62a+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_62b+=window.parseInt(w,10);}else{if(w=="auto"){_62c=false;}}}}}if(_62a&&_62c){dojo.forEach(_629,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_62a)*(100-_62b))+"%";}});}return _629;},addRowsDef:function(_632){var _633=[];if(dojo.isArray(_632)){if(dojo.isArray(_632[0])){for(var i=0,row;_632&&(row=_632[i]);i++){_633.push(this.addRowDef(i,row));}}else{_633.push(this.addRowDef(0,_632));}}return _633;},addViewDef:function(_636){this._defaultCellProps=_636.defaultCell||{};if(_636.width&&_636.width=="auto"){delete _636.width;}return dojo.mixin({},_636,{cells:this.addRowsDef(_636.rows||_636.cells)});},setStructure:function(_637){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 _63a=this.grid.rowSelector;if(_63a=="false"){sel=null;}else{if(_63a!="true"){sel["width"]=_63a;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _63b=function(def){return ("name" in def||"field" in def||"get" in def);};var _63d=function(def){if(dojo.isArray(def)){if(dojo.isArray(def[0])||_63b(def[0])){return true;}}return false;};var _63f=function(def){return (def!=null&&dojo.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_63b(def))));};if(dojo.isArray(_637)){var _641=false;for(var i=0,st;(st=_637[i]);i++){if(_63f(st)){_641=true;break;}}if(!_641){s.push(this.addViewDef({cells:_637}));}else{for(var i=0,st;(st=_637[i]);i++){if(_63d(st)){s.push(this.addViewDef({cells:st}));}else{if(_63f(st)){s.push(this.addViewDef(st));}}}}}else{if(_63f(_637)){s.push(this.addViewDef(_637));}}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(_644){this.grid=_644;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_645){_645.idx=this.views.length;this.views.push(_645);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _648=[];for(var i=0,v;v=this.views[i];i++){_648.push(v.contentNode);}return _648;},forEach:function(_64b){for(var i=0,v;v=this.views[i];i++){_64b(v,i);}},onEach:function(_64e,_64f){_64f=_64f||[];for(var i=0,v;v=this.views[i];i++){if(_64e in v){v[_64e].apply(v,_64f);}}},normalizeHeaderNodeHeight:function(){var _652=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_652.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_652);},normalizeRowNodeHeights:function(_655){var h=0;for(var i=0,n,o;(n=_655[i]);i++){h=Math.max(h,dojo.marginBox(n.firstChild).h);}h=(h>=0?h:0);for(var i=0,n;(n=_655[i]);i++){dojo.marginBox(n.firstChild,{h:h});}if(_655&&_655[0]&&_655[0].parentNode){_655[0].parentNode.offsetHeight;}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_65d){var _65e=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_65d));i++){n.firstChild.style.height="";_65e.push(n);}this.normalizeRowNodeHeights(_65e);},getViewWidth:function(_662){return this.views[_662].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_663){_663.headerContentNode.style.height="";});var h=0;this.forEach(function(_665){h=Math.max(_665.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_667){h=Math.max(_667.domNode.offsetHeight,h);});return h;},findClient:function(_668){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 _673=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!dojo._isBodyLtr()){ds.right=l+"px";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);_673(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;_673(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_673(v,l);}return l;},renderRow:function(_67a,_67b){var _67c=[];for(var i=0,v,n,_680;(v=this.views[i])&&(n=_67b[i]);i++){_680=v.renderRow(_67a);n.appendChild(_680);_67c.push(_680);}this.normalizeRowNodeHeights(_67c);},rowRemoved:function(_681){this.onEach("rowRemoved",[_681]);},updateRow:function(_682){for(var i=0,v;v=this.views[i];i++){v.updateRow(_682);}this.renormalizeRow(_682);},updateRowStyles:function(_685){this.onEach("updateRowStyles",[_685]);},setScrollTop:function(_686){var top=_686;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_686);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;}}}});}if(!dojo._hasResource["dojox.grid._RowManager"]){dojo._hasResource["dojox.grid._RowManager"]=true;dojo.provide("dojox.grid._RowManager");(function(){var _68c=function(_68d,_68e){if(_68d.style.cssText==undefined){_68d.setAttribute("style",_68e);}else{_68d.style.cssText=_68e;}};dojo.declare("dojox.grid._RowManager",null,{constructor:function(_68f){this.grid=_68f;},linesToEms:2,overRow:-2,prepareStylingRow:function(_690,_691){return {index:_690,node:_691,odd:Boolean(_690&1),selected:this.grid.selection.isSelected(_690),over:this.isOver(_690),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_692,_693){var row=this.prepareStylingRow(_692,_693);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_695){var i=_695;i.node.className=i.customClasses;var h=i.node.style.height;_68c(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_698){this.grid.updateRowStyles(_698);},setOverRow:function(_699){var last=this.overRow;this.overRow=_699;if((last!=this.overRow)&&(last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_69b){return (this.overRow==_69b);}});})();}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(_69c){this.grid=_69c;this.cell=null;this.rowIndex=-1;this._connects=[];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.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,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView;this._initColumnHeaders();},isFocusCell:function(_69d,_69e){return (this.cell==_69d)&&(this.rowIndex==_69e);},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(_69f){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){dojo.toggleClass(n,this.focusClass,_69f);if(_69f){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()){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){dojo.toggleClass(n,this.focusClass,true);dojox.grid.util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();}},_initColumnHeaders:function(){this._connects.push(dojo.connect(this.grid.viewsHeaderNode,"onblur",this,"doBlurHeader"));var _6a3=this._findHeaderCells();for(var i=0;i<_6a3.length;i++){this._connects.push(dojo.connect(_6a3[i],"onfocus",this,"doColHeaderFocus"));this._connects.push(dojo.connect(_6a3[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _6a5=dojo.query("th",this.grid.viewsHeaderNode);var _6a6=[];for(var i=0;i<_6a5.length;i++){var _6a8=_6a5[i];var _6a9=dojo.hasAttr(_6a8,"tabindex");var _6aa=dojo.attr(_6a8,"tabindex");if(_6a9&&_6aa<0){_6a6.push(_6a8);}}return _6a6;},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,_6ae){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:(_6ae?_6ae:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_6b3){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_6b3);info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _6b6=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_6b6){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;}}}}},styleRow:function(_6b7){return;},setFocusIndex:function(_6b8,_6b9){this.setFocusCell(this.grid.getCell(_6b9),_6b8);},setFocusCell:function(_6ba,_6bb){if(_6ba&&!this.isFocusCell(_6ba,_6bb)){this.tabbingOut=false;this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_6ba;this.rowIndex=_6bb;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 _6c0=this.grid.getCell(col);if(!this.isLastFocusCell()&&!_6c0.editable){this.cell=_6c0;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 _6c3=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_6c3.editable){this.cell=_6c3;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_6c4,_6c5){if(this.isNavHeader()){var _6c6=this._findHeaderCells();var _6c7=dojo.indexOf(_6c6,this._colHeadNode);_6c7+=_6c5;if((_6c7>=0)&&(_6c7<_6c6.length)){this._colHeadNode=_6c6[_6c7];this._colHeadFocusIdx=_6c7;this._scrollHeader(_6c7);this._colHeadNode.focus();}}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+_6c4));if(_6c4){if(_6c4>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_6c4<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+_6c5));this.setFocusIndex(row,col);if(_6c4){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){dojo.stopEvent(e);this.previous();}else{if(!this.isNavHeader()){this.focusHeader();dojo.stopEvent(e);}else{this.tabOut(this.grid.domNode);}}},nextKey:function(e){var _6d1=this.grid.rowCount==0;if(e.target===this.grid.domNode){this.focusHeader();dojo.stopEvent(e);}else{if(this.isNavHeader()){this._colHeadNode=this._colHeadFocusIdx=null;if(this.isNoFocusCell()&&!_6d1){this.setFocusIndex(0,0);}else{if(this.cell&&!_6d1){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{this.tabOut(this.grid.lastFocusNode);}}}else{if(this.grid.edit.isEditing()){dojo.stopEvent(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_6d2){this.tabbingOut=true;_6d2.focus();},focusGridView:function(){dojox.grid.util.fire(this.focusView,"focus");},focusGrid:function(_6d3){this.focusGridView();this._focusifyCellNode(true);},focusHeader:function(){var _6d4=this._findHeaderCells();if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}this._colHeadNode=_6d4[this._colHeadFocusIdx];if(this._colHeadNode){dojox.grid.util.fire(this._colHeadNode,"focus");this._focusifyCellNode(false);}},doFocus:function(e){if(e&&e.target!=e.currentTarget){dojo.stopEvent(e);return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;dojo.stopEvent(e);},doBlur:function(e){dojo.stopEvent(e);},doBlurHeader:function(e){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){dojo.toggleClass(e.target,this.focusClass,true);this._scrollHeader(this.getHeaderIndex());},doColHeaderBlur:function(e){dojo.toggleClass(e.target,this.focusClass,false);}});}if(!dojo._hasResource["dojox.grid._EditManager"]){dojo._hasResource["dojox.grid._EditManager"]=true;dojo.provide("dojox.grid._EditManager");dojo.declare("dojox.grid._EditManager",null,{constructor:function(_6dc){this.grid=_6dc;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(_6dd,_6de){if(this.grid.singleClickEdit||this.isEditRow(_6de)){this.setEditCell(_6dd,_6de);}else{this.apply();}if(this.isEditing()||(_6dd&&_6dd.editable&&_6dd.alwaysEditing)){this._focusEditor(_6dd,_6de);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_6e0){if(_6e0.index==this.info.rowIndex){_6e0.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(_6e4,_6e5){return (this.info.rowIndex===_6e4)&&(this.info.cell.index==_6e5);},isEditRow:function(_6e6){return this.info.rowIndex===_6e6;},setEditCell:function(_6e7,_6e8){if(!this.isEditCell(_6e8,_6e7.index)&&this.grid.canEdit&&this.grid.canEdit(_6e7,_6e8)){this.start(_6e7,_6e8,this.isEditRow(_6e8)||_6e7.editable);}},_focusEditor:function(_6e9,_6ea){dojox.grid.util.fire(_6e9,"focus",[_6ea]);},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(_6eb,_6ec,_6ed){this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_6ec)){this.applyRowEdit();this.grid.updateRow(_6ec);}if(_6ed){this.info={cell:_6eb,rowIndex:_6ec};this.grid.doStartEdit(_6eb,_6ec);this.grid.updateRow(_6ec);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_6eb,_6ec);this._doCatchBoomerang();},_editorDo:function(_6ee){var c=this.info.cell;c&&c.editable&&c[_6ee](this.info.rowIndex);},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_6f0,_6f1,_6f2){if(this.grid.canEdit(_6f1,_6f2)){this.grid.doApplyCellEdit(_6f0,_6f2,_6f1.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_6f3,_6f4){var c=this.info.cell;if(this.isEditRow(_6f3)&&(!_6f4||c.view==_6f4)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_6f6,_6f7){var c=this.info.cell;if(this.isEditRow(_6f7)&&c.view==_6f6&&c.editable){c.restore(c,this.info.rowIndex);}}});}if(!dojo._hasResource["dojox.grid.Selection"]){dojo._hasResource["dojox.grid.Selection"]=true;dojo.provide("dojox.grid.Selection");dojo.declare("dojox.grid.Selection",null,{constructor:function(_6f9){this.grid=_6f9;this.selected=[];this.setMode(_6f9.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_6fb){return this.grid.onCanSelect(_6fb);},onCanDeselect:function(_6fc){return this.grid.onCanDeselect(_6fc);},onSelected:function(_6fd){},onDeselected:function(_6fe){},onChanging:function(){},onChanged:function(){},isSelected:function(_6ff){if(this.mode=="none"){return false;}return this.selected[_6ff];},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(_702){if(this.mode=="none"){return -1;}for(var i=_702+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _705=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_705.push(i);}}return _705;},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(_70a){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_70a);this.addToSelection(_70a);}else{this.toggleSelect(_70a);}},addToSelection:function(_70b){if(this.mode=="none"){return;}_70b=Number(_70b);if(this.selected[_70b]){this.selectedIndex=_70b;}else{if(this.onCanSelect(_70b)!==false){this.selectedIndex=_70b;this._beginUpdate();this.selected[_70b]=true;this.onSelected(_70b);this._endUpdate();}}},deselect:function(_70c){if(this.mode=="none"){return;}_70c=Number(_70c);if(this.selectedIndex==_70c){this.selectedIndex=-1;}if(this.selected[_70c]){if(this.onCanDeselect(_70c)===false){return;}this._beginUpdate();delete this.selected[_70c];this.onDeselected(_70c);this._endUpdate();}},setSelected:function(_70d,_70e){this[(_70e?"addToSelection":"deselect")](_70d);},toggleSelect:function(_70f){this.setSelected(_70f,!this.selected[_70f]);},_range:function(_710,inTo,func){var s=(_710>=0?_710:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_716,inTo){this._range(_716,inTo,dojo.hitch(this,"addToSelection"));},deselectRange:function(_718,inTo){this._range(_718,inTo,dojo.hitch(this,"deselect"));},insert:function(_71a){this.selected.splice(_71a,0,false);if(this.selectedIndex>=_71a){this.selectedIndex++;}},remove:function(_71b){this.selected.splice(_71b,1);if(this.selectedIndex>=_71b){this.selectedIndex--;}},deselectAll:function(_71c){for(var i in this.selected){if((i!=_71c)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_71e,_71f,_720){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_71e);}else{var _721=this.selectedIndex;if(!_71f){this.deselectAll(_71e);}if(_720){this.selectRange(_721,_71e);}else{if(_71f){this.toggleSelect(_71e);}else{this.addToSelection(_71e);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.dnd.getCopyKeyState(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(_726){var i=_726;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_726);this.edit.styleRow(_726);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var dk=dojo.keys;switch(e.keyCode){case dk.ESCAPE:this.edit.cancel();break;case dk.ENTER:if(!this.edit.isEditing()){var _72a=this.focus.getHeaderIndex();if(_72a>=0){this.setSortIndex(_72a);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}dojo.stopEvent(e);}if(!e.shiftKey){var _72b=this.edit.isEditing();this.edit.apply();if(!_72b){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _72c=this.focus.focusView||this.views.views[0];_72c.content.decorateEvent(e);this.onRowClick(e);}break;case dk.SPACE:if(!this.edit.isEditing()){var _72a=this.focus.getHeaderIndex();if(_72a>=0){this.setSortIndex(_72a);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(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()){dojo.stopEvent(e);var _72d=(e.keyCode==dk.LEFT_ARROW)?1:-1;if(dojo._isBodyLtr()){_72d*=-1;}this.focus.move(0,_72d);}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.store&&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;}},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(dojo.isIE){this.edit.setEditCell(this._click[1].cell,this._click[1].rowIndex);}else{if(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(_73a,_73b){this.edit.cellFocus(_73a,_73b);},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(_74d,_74e){},onApplyCellEdit:function(_74f,_750,_751){},onCancelEdit:function(_752){},onApplyEdit:function(_753){},onCanSelect:function(_754){return true;},onCanDeselect:function(_755){return true;},onSelected:function(_756){this.updateRowStyles(_756);},onDeselected:function(_757){this.updateRowStyles(_757);},onSelectionChanged:function(){}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_758,_759,_75a){_75a=dojo.i18n.normalizeLocale(_75a);var _75b=_75a.split("-");var _75c=[_758,"nls",_759].join(".");var _75d=dojo._loadedModules[_75c];if(_75d){var _75e;for(var i=_75b.length;i>0;i--){var loc=_75b.slice(0,i).join("_");if(_75d[loc]){_75e=_75d[loc];break;}}if(!_75e){_75e=_75d.ROOT;}if(_75e){var _761=function(){};_761.prototype=_75e;return new _761();}}throw new Error("Bundle not found: "+_759+" in "+_758+" , locale="+_75a);};dojo.i18n.normalizeLocale=function(_762){var _763=_762?_762.toLowerCase():dojo.locale;if(_763=="root"){_763="ROOT";}return _763;};dojo.i18n._requireLocalization=function(_764,_765,_766,_767){var _768=dojo.i18n.normalizeLocale(_766);var _769=[_764,"nls",_765].join(".");var _76a="";if(_767){var _76b=_767.split(",");for(var i=0;i<_76b.length;i++){if(_768["indexOf"](_76b[i])==0){if(_76b[i].length>_76a.length){_76a=_76b[i];}}}if(!_76a){_76a="ROOT";}}var _76d=_767?_76a:_768;var _76e=dojo._loadedModules[_769];var _76f=null;if(_76e){if(dojo.config.localizationComplete&&_76e._built){return;}var _770=_76d.replace(/-/g,"_");var _771=_769+"."+_770;_76f=dojo._loadedModules[_771];}if(!_76f){_76e=dojo["provide"](_769);var syms=dojo._getModuleSymbols(_764);var _773=syms.concat("nls").join("/");var _774;dojo.i18n._searchLocalePath(_76d,_767,function(loc){var _776=loc.replace(/-/g,"_");var _777=_769+"."+_776;var _778=false;if(!dojo._loadedModules[_777]){dojo["provide"](_777);var _779=[_773];if(loc!="ROOT"){_779.push(loc);}_779.push(_765);var _77a=_779.join("/")+".js";_778=dojo._loadPath(_77a,null,function(hash){var _77c=function(){};_77c.prototype=_774;_76e[_776]=new _77c();for(var j in hash){_76e[_776][j]=hash[j];}});}else{_778=true;}if(_778&&_76e[_776]){_774=_76e[_776];}else{_76e[_776]=_774;}if(_767){return true;}});}if(_767&&_768!=_76a){_76e[_768.replace(/-/g,"_")]=_76e[_76a.replace(/-/g,"_")];}};(function(){var _77e=dojo.config.extraLocale;if(_77e){if(!_77e instanceof Array){_77e=[_77e];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_782,_783){req(m,b,_782,_783);if(_782){return;}for(var i=0;i<_77e.length;i++){req(m,b,_77e[i],_783);}};}})();dojo.i18n._searchLocalePath=function(_785,down,_787){_785=dojo.i18n.normalizeLocale(_785);var _788=_785.split("-");var _789=[];for(var i=_788.length;i>0;i--){_789.push(_788.slice(0,i).join("-"));}_789.push(false);if(down){_789.reverse();}for(var j=_789.length-1;j>=0;j--){var loc=_789[j]||"ROOT";var stop=_787(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_78e,_78f){function _790(_791){_791=dojo.i18n.normalizeLocale(_791);dojo.i18n._searchLocalePath(_791,true,function(loc){for(var i=0;i<_78f.length;i++){if(_78f[i]==loc){dojo["require"](_78e+"_"+loc);return true;}}return false;});};_790();var _794=dojo.config.extraLocale||[];for(var i=0;i<_794.length;i++){_790(_794[i]);}};}if(!dojo._hasResource["dojox.grid._Grid"]){dojo._hasResource["dojox.grid._Grid"]=true;dojo.provide("dojox.grid._Grid");(function(){var jobs={cancel:function(_797){if(_797){clearTimeout(_797);}},jobs:[],job:function(_798,_799,_79a){jobs.cancelJob(_798);var job=function(){delete jobs.jobs[_798];_79a();};jobs.jobs[_798]=setTimeout(job,_799);},cancelJob:function(_79c){jobs.cancel(jobs.jobs[_79c]);}};dojo.declare("dojox.grid._Grid",[dijit._Widget,dijit._Templated,dojox.grid._Events],{templateString:"<div class=\"dojoxGrid\" hidefocus=\"hidefocus\" wairole=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" tabindex=\"-1\" 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",get:function(_79d){},rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,autoHeight:"",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:"",sortInfo:0,themeable:true,_placeholders:null,buildRendering:function(){this.inherited(arguments);if(this.get==dojox.grid._Grid.prototype.get){this.get=null;}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);this.connect(this,"onShow","renderOnIdle");},postMixInProperties:function(){this.inherited(arguments);var _79e=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_79e);this.errorMessage=dojo.string.substitute(this.errorMessage,_79e);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);},postCreate:function(){this.styleChanged=this._styleChanged;this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];},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,_7a1){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.attr("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_7a1){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},styleChanged:function(){this.setStyledClass(this.domNode,"");},_styleChanged:function(){this.styleChanged();this.update();},textSizeChanged:function(){setTimeout(dojo.hitch(this,"_textSizeChanged"),1);},_textSizeChanged:function(){if(this.domNode){this.views.forEach(function(v){v.content.update();});this.render();}},sizeChange:function(){jobs.job(this.id+"SizeChange",50,dojo.hitch(this,"update"));},renderOnIdle:function(){setTimeout(dojo.hitch(this,"render"),1);},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._pageIdPrefix=this.id+"-";this.scroller.renderRow=dojo.hitch(this,"renderRow");this.scroller.removeRow=dojo.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new dojox.grid._Layout(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.render();this._resize();},createViews:function(){this.views=new dojox.grid._ViewManager(this);this.views.createView=dojo.hitch(this,"createView");},createView:function(_7a3,idx){var c=dojo.getObject(_7a3);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(_7a9){var s=_7a9;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(_7ab){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.attr('structure', obj) instead.","2.0");this._setStructureAttr(_7ab);},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(_7af){if(self.layout.setColumnVisibility(this._gridCell.index,_7af)){var _7b0=this._gridCell.menuItems;if(_7b0.length>1){dojo.forEach(_7b0,function(item){if(item!==this){item.setAttribute("checked",_7af);}},this);}var _7af=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(_7af.length==1){dojo.forEach(_7af[0].menuItems,"item.attr('disabled', true);");}}},destroy:function(){var _7b3=dojo.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_7b3,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(_7b8){this.setScrollTop(0);},getItem:function(_7b9){return null;},showMessage:function(_7ba){if(_7ba){this.messagesNode.innerHTML=_7ba;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(_7bb,_7bc){this._resize(_7bb,_7bc);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(_7bf,_7c0){var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _7c2=this._getPadBorder();var hh=0;if(this._autoHeight){this.domNode.style.height="auto";this.viewsNode.style.height="";}else{if(typeof this.autoHeight=="number"){var h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.flex>0){}else{if(this.domNode.clientHeight<=_7c2.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(_7c0){_7bf=_7c0;}if(_7bf){dojo.marginBox(this.domNode,_7bf);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){var h=dojo._getContentBox(pn).h;dojo.marginBox(this.domNode,{h:Math.max(0,h)});}}var h=dojo._getContentBox(this.domNode).h;if(h==0&&!this._autoHeight){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";hh=this._getHeaderHeight();}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var w=this.autoWidth?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(this.autoWidth){this.domNode.style.width=vw+"px";}},adaptHeight:function(_7c7){var t=_7c7||this._getHeaderHeight();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 _7ca=0,_7cb=0;var _7cc=dojo.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_7ca++;}else{_7cb++;}return (!has);});if(_7ca>0&&_7cb>0){dojo.forEach(_7cc,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.attr("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.attr("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(_7d1,_7d2){this.views.renderRow(_7d1,_7d2);},rowRemoved:function(_7d3){this.views.rowRemoved(_7d3);},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=null;},defaultUpdate:function(){if(!this.domNode){return;}if(this.updating){this.invalidated.all=true;return;}var _7d6=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(_7d6);this.postrender();},update:function(){this.render();},updateRow:function(_7d7){_7d7=Number(_7d7);if(this.updating){this.invalidated[_7d7]=true;}else{this.views.updateRow(_7d7);this.scroller.rowHeightChanged(_7d7);}},updateRows:function(_7d8,_7d9){_7d8=Number(_7d8);_7d9=Number(_7d9);if(this.updating){for(var i=0;i<_7d9;i++){this.invalidated[i+_7d8]=true;}}else{for(var i=0;i<_7d9;i++){this.views.updateRow(i+_7d8);}this.scroller.rowHeightChanged(_7d8);}},updateRowCount:function(_7db){if(this.updating){this.invalidated.rowCount=_7db;}else{this.rowCount=_7db;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_7db);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_7dc){this.views.updateRowStyles(_7dc);},rowHeightChanged:function(_7dd){this.views.renormalizeRow(_7dd);this.scroller.rowHeightChanged(_7dd);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(dojo.isIE?100:50),scrollTo:function(_7de){if(!this.fastScroll){this.setScrollTop(_7de);return;}var _7df=Math.abs(this.lastScrollTop-_7de);this.lastScrollTop=_7de;if(_7df>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_7de;this.views.setScrollTop(_7de);jobs.job("dojoxGridScroll",200,dojo.hitch(this,"finishScrollJob"));}else{this.setScrollTop(_7de);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_7e0){this.scroller.scroll(this.views.setScrollTop(_7e0));},scrollToRow:function(_7e1){this.setScrollTop(this.scroller.findScrollTop(_7e1)+1);},styleRowNode:function(_7e2,_7e3){if(_7e3){this.rows.styleRowNode(_7e2,_7e3);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_7e5){return this.layout.cells[_7e5];},setCellWidth:function(_7e6,_7e7){this.getCell(_7e6).unitWidth=_7e7;},getCellName:function(_7e8){return "Cell "+_7e8.index;},canSort:function(_7e9){},sort:function(){},getSortAsc:function(_7ea){_7ea=_7ea==undefined?this.sortInfo:_7ea;return Boolean(_7ea>0);},getSortIndex:function(_7eb){_7eb=_7eb==undefined?this.sortInfo:_7eb;return Math.abs(_7eb)-1;},setSortIndex:function(_7ec,_7ed){var si=_7ec+1;if(_7ed!=undefined){si*=(_7ed?1:-1);}else{if(this.getSortIndex()==_7ec){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_7ef){if(this.canSort(_7ef)){this.sortInfo=_7ef;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);}},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(_7fd,_7fe){this.onStartEdit(_7fd,_7fe);},doApplyCellEdit:function(_7ff,_800,_801){this.onApplyCellEdit(_7ff,_800,_801);},doCancelEdit:function(_802){this.onCancelEdit(_802);},doApplyEdit:function(_803){this.onApplyEdit(_803);},addRow:function(){this.updateRowCount(this.attr("rowCount")+1);},removeSelectedRows:function(){this.updateRowCount(Math.max(0,this.attr("rowCount")-this.selection.getSelected().length));this.selection.clear();}});dojox.grid._Grid.markupFactory=function(_804,node,ctor,_807){var d=dojo;var _809=function(n){var w=d.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w)+"px";}return w;};if(!_804.structure&&node.nodeName.toLowerCase()=="table"){_804.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):1),cells:[]};if(d.hasAttr(cg,"width")){v.width=_809(cg);}return v;});if(!_804.structure.length){_804.structure.push({__span:Infinity,cells:[]});}d.query("thead > tr",node).forEach(function(tr,_810){var _811=0;var _812=0;var _813;var _814=null;d.query("> th",tr).map(function(th){if(!_814){_813=0;_814=_804.structure[0];}else{if(_811>=(_813+_814.__span)){_812++;_813+=_814.__span;var _816=_814;_814=_804.structure[_812];}}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")||"")};_811+=cell.colSpan;var _818=d.attr(th,"rowspan");if(_818){cell.rowSpan=_818;}if(d.hasAttr(th,"width")){cell.width=_809(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(_807){_807(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(!_814.cells[_810]){_814.cells[_810]=[];}_814.cells[_810].push(cell);});});}return new ctor(_804,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(_81a){var _81b=this.grid.getItemIndex(_81a);var idx=dojox.grid.Selection.prototype.getNextSelected.call(this,_81b);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _81d=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_81d.push(this.grid.getItem(i));}}return _81d;},addToSelection:function(_820){if(this.mode=="none"){return;}var idx=null;if(typeof _820=="number"||typeof _820=="string"){idx=_820;}else{idx=this.grid.getItemIndex(_820);}dojox.grid.Selection.prototype.addToSelection.call(this,idx);},deselect:function(_822){if(this.mode=="none"){return;}var idx=null;if(typeof _822=="number"||typeof _822=="string"){idx=_822;}else{idx=this.grid.getItemIndex(_822);}dojox.grid.Selection.prototype.deselect.call(this,idx);},deselectAll:function(_824){var idx=null;if(_824||typeof _824=="number"){if(typeof _824=="number"||typeof _824=="string"){idx=_824;}else{idx=this.grid.getItemIndex(_824);}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:"...",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(_826,_827){return (!_827?this.defaultValue:(!this.field?this.value:this.grid.store.getValue(_827,this.field)));},_onSet:function(item,_829,_82a,_82b){var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_addItem:function(item,_82e,_82f){var idty=this._hasIdentity?this.store.getIdentity(item):dojo.toJson(this.query)+":idx:"+_82e+":sort:"+dojo.toJson(this.getSortProps());var o={idty:idty,item:item};this._by_idty[idty]=this._by_idx[_82e]=o;if(!_82f){this.updateRow(_82e);}},_onNew:function(item,_833){var _834=this.attr("rowCount");this._addingItem=true;this.updateRowCount(_834+1);this._addingItem=false;this._addItem(item,_834);this.showMessage();},_onDelete:function(item){var idx=this._getItemIndex(item,true);if(idx>=0){var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.attr("rowCount")-1);if(this.attr("rowCount")===0){this.showMessage(this.noDataMessage);}}},_onRevert:function(){this._refresh();},setStore:function(_838,_839,_83a){this._setQuery(_839,_83a);this._setStore(_838);this._refresh(true);},setQuery:function(_83b,_83c){this._setQuery(_83b,_83c);this._refresh(true);},setItems:function(_83d){this.items=_83d;this._setStore(this.store);this._refresh(true);},_setQuery:function(_83e,_83f){this.query=_83e;this.queryOptions=_83f||this.queryOptions;},_setStore:function(_840){if(this.store&&this._store_connects){dojo.forEach(this._store_connects,function(arr){dojo.forEach(arr,dojo.disconnect);});}this.store=_840;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.rowCount!=size){if(req.isRender){this.scroller.init(size,this.keepRows,this.rowsPerPage);this.rowCount=size;this._setAutoHeightAttr(this.autoHeight,true);this.prerender();}else{this.updateRowCount(size);}}},_onFetchComplete:function(_846,req){if(_846&&_846.length>0){dojo.forEach(_846,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_846.length);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;if(!_846||!_846.length){this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}}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.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_84e,_84f){var _84e=_84e||0;if(this.store&&!this._pending_requests[_84e]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_84e]=true;try{if(this.items){var _850=this.items;var _851=this.store;this.rowsPerPage=_850.length;var req={start:_84e,count:this.rowsPerPage,isRender:_84f};this._onFetchBegin(_850.length,req);var _853=0;dojo.forEach(_850,function(i){if(!_851.isItemLoaded(i)){_853++;}});if(_853===0){this._onFetchComplete(_850,req);}else{var _855=function(item){_853--;if(_853===0){this._onFetchComplete(_850,req);}};dojo.forEach(_850,function(i){if(!_851.isItemLoaded(i)){_851.loadItem({item:i,onItem:_855,scope:this});}},this);}}else{this.store.fetch({start:_84e,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_84f,onBegin:dojo.hitch(this,"_onFetchBegin"),onComplete:dojo.hitch(this,"_onFetchComplete"),onError:dojo.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e);}}},_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,_85c){if(!_85c&&!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(_861,_862){this.query=_861;if(_862){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.attr("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_866){return this._pending_requests[_866];},_rowToPage:function(_867){return (this.rowsPerPage?Math.floor(_867/this.rowsPerPage):_867);},_pageToRow:function(_868){return (this.rowsPerPage?this.rowsPerPage*_868:_868);},_preparePage:function(_869){if((_869<this._bop||_869>=this._eop)&&!this._addingItem){var _86a=this._rowToPage(_869);this._needPage(_86a);this._bop=_86a*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.attr("rowCount"));}},_needPage:function(_86b){if(!this._pages[_86b]){this._pages[_86b]=true;this._requestPage(_86b);}},_requestPage:function(_86c){var row=this._pageToRow(_86c);var _86e=Math.min(this.rowsPerPage,this.attr("rowCount")-row);if(_86e>0){this._requests++;if(!this._requestsPending(row)){setTimeout(dojo.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_86f){return _86f.field;},_refresh:function(_870){this._clearData();this._fetch(0,_870);},sort:function(){this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){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(_874){if(this.store&&this.store.getState){var _875=this.store.getState(_874.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_875[s]){c=" dojoxGridRow-"+s;break;}}_874.customClasses+=c;}},onStyleRow:function(_87a){this.styleRowState(_87a);this.inherited(arguments);},canEdit:function(_87b,_87c){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _880={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_882,_883){if(!this._cache[_883]){this._cache[_883]=this._copyAttr(_883,_882.field);}this.onStartEdit(_882,_883);},doApplyCellEdit:function(_884,_885,_886){this.store.fetchItemByIdentity({identity:this._by_idx[_885].idty,onItem:dojo.hitch(this,function(item){var _888=this.store.getValue(item,_886);if(typeof _888=="number"){_884=isNaN(_884)?_884:parseFloat(_884);}else{if(typeof _888=="boolean"){_884=_884=="true"?true:_884=="false"?false:_884;}else{if(_888 instanceof Date){var _889=new Date(_884);_884=isNaN(_889.getTime())?_884:_889;}}}this.store.setValue(item,_886,_884);this.onApplyCellEdit(_884,_885,_886);})});},doCancelEdit:function(_88a){var _88b=this._cache[_88a];if(_88b){this.updateRow(_88a);delete this._cache[_88a];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_88c,_88d){var _88e=this._cache[_88c];this.onApplyEdit(_88c);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var _88f=this.selection.getSelected();if(_88f.length){dojo.forEach(_88f,this.store.deleteItem,this.store);this.selection.clear();}}}});dojox.grid.DataGrid.markupFactory=function(_890,node,ctor,_893){return dojox.grid._Grid.markupFactory(_890,node,ctor,function(node,_895){var _896=dojo.trim(dojo.attr(node,"field")||"");if(_896){_895.field=_896;}_895.field=_895.field||_895.name;if(_893){_893(node,_895);}});};}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","nl","nl-nl","no","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
