/*
	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._KeyNavContainer"]){dojo._hasResource["dijit._KeyNavContainer"]=true;dojo.provide("dijit._KeyNavContainer");dojo.declare("dijit._KeyNavContainer",[dijit._Container],{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_1,_2){var _3=this._keyNavCodes={};var _4=dojo.hitch(this,this.focusPrev);var _5=dojo.hitch(this,this.focusNext);dojo.forEach(_1,function(_6){_3[_6]=_4;});dojo.forEach(_2,function(_7){_3[_7]=_5;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_8,_9){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_8);},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 _a=this._getNextFocusableChild(this.focusedChild,1);if(_a.getFocalNodes){this.focusChild(_a,_a.getFocalNodes()[0]);}else{this.focusChild(_a);}},focusPrev:function(){if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){this.focusedChild.focusPrev();return;}var _b=this._getNextFocusableChild(this.focusedChild,-1);if(_b.getFocalNodes){var _c=_b.getFocalNodes();this.focusChild(_b,_c[_c.length-1]);}else{this.focusChild(_b);}},focusChild:function(_d,_e){if(_d){if(this.focusedChild&&_d!==this.focusedChild){this._onChildBlur(this.focusedChild);}this.focusedChild=_d;if(_e&&_d.focusFocalNode){_d.focusFocalNode(_e);}else{_d.focus();}}},_startupChild:function(_f){if(_f.getFocalNodes){dojo.forEach(_f.getFocalNodes(),function(_10){dojo.attr(_10,"tabindex",-1);this._connectNode(_10);},this);}else{var _11=_f.focusNode||_f.domNode;if(_f.isFocusable()){dojo.attr(_11,"tabindex",-1);}this._connectNode(_11);}},_connectNode:function(_12){this.connect(_12,"onfocus","_onNodeFocus");this.connect(_12,"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 _16=this._keyNavCodes[evt.charOrCode];if(_16){_16();dojo.stopEvent(evt);}},_onNodeFocus:function(evt){var _18=dijit.getEnclosingWidget(evt.target);if(_18&&_18.isFocusable()){this.focusedChild=_18;}dojo.stopEvent(evt);},_onNodeBlur:function(evt){dojo.stopEvent(evt);},_onChildBlur:function(_1a){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_1b,dir){if(_1b){_1b=this._getSiblingOfChild(_1b,dir);}var _1d=this.getChildren();for(var i=0;i<_1d.length;i++){if(!_1b){_1b=_1d[(dir>0)?0:(_1d.length-1)];}if(_1b.isFocusable()){return _1b;}_1b=this._getSiblingOfChild(_1b,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(_1f){if(_1f&&!("label" in this.params)){this.attr("label",_1f.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(_22){dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_22);},setLabel:function(_23){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_23);},setDisabled:function(_24){dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use attr('disabled', bool) instead.","","2.0");this.attr("disabled",_24);},_setDisabledAttr:function(_25){this.disabled=_25;dojo[_25?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.focusNode,"disabled",_25?"true":"false");},_setAccelKeyAttr:function(_26){this.accelKey=_26;this.accelKeyNode.style.display=_26?"":"none";this.accelKeyNode.innerHTML=_26;dojo.attr(this.containerNode,"colSpan",_26?"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 _27=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_27[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var _28=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(_28);}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(_29){dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_29);dijit.setWaiState(this.domNode,"checked",_29);this.checked=_29;},onChange:function(_2a){},_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(_2c){_2c.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_2d){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _2f=this._getTopMenu();if(_2f&&_2f._isMenuBar){_2f.focusNext();}}},onItemHover:function(_30){if(this.isActive){this.focusChild(_30);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}}},_onChildBlur:function(_31){_31._setSelected(false);dijit.popup.close(_31.popup);this._stopPopupTimer();},onItemUnhover:function(_32){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(_34,evt){if(_34.disabled){return false;}this.focusChild(_34);if(_34.popup){if(!this.is_open){this._openPopup();}}else{this.onExecute();_34.onClick(evt);}},_openPopup:function(){this._stopPopupTimer();var _36=this.focusedChild;var _37=_36.popup;if(_37.isShowingNow){return;}_37.parentMenu=this;var _38=this;dijit.popup.open({parent:this,popup:_37,around:_36.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"}),onCancel:function(){dijit.popup.close(_37);_36.focus();_38.currentPopup=null;},onExecute:dojo.hitch(this,"_onDescendantExecute")});this.currentPopup=_37;if(_37.focus){setTimeout(dojo.hitch(_37,"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(_3d){var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_3d))||dijit.Menu._iframeContentDocument(_3d)["__parent__"]||(_3d.name&&dojo.doc.frames[_3d.name])||null;return win;},_iframeContentDocument:function(_3f){var doc=_3f.contentDocument||(_3f.contentWindow&&_3f.contentWindow.document)||(_3f.name&&dojo.doc.frames[_3f.name]&&dojo.doc.frames[_3f.name].document)||null;return doc;},bindDomNode:function(_41){_41=dojo.byId(_41);var win=dijit.getDocumentWindow(_41.ownerDocument);if(_41.tagName.toLowerCase()=="iframe"){win=this._iframeContentWindow(_41);_41=dojo.withGlobal(win,dojo.body);}var cn=(_41==dojo.body()?dojo.doc:_41);_41[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(_44){var _45=dojo.byId(_44);if(_45){var bid=_45[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 _4e=dojo.coords(e.target,true);x=_4e.x+10;y=_4e.y+10;}var _4f=this;var _50=dijit.getFocus(this);function _51(){dijit.focus(_50);dijit.popup.close(_4f);};dijit.popup.open({popup:this,x:x,y:y,onExecute:_51,onCancel:_51,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 _53={"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 _53){ds.fontSize=p;_53[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}dojo.body().removeChild(div);div=null;return _53;};var _57=null;dhm.getCachedFontMeasurements=function(_58){if(_58||!_57){_57=dhm.getFontMeasurements();}return _57;};var _59=null,_5a={};dhm.getTextBox=function(_5b,_5c,_5d){var m;if(!_59){m=_59=dojo.doc.createElement("div");m.style.position="absolute";m.style.left="-10000px";m.style.top="0";dojo.body().appendChild(m);}else{m=_59;}m.className="";m.style.border="0";m.style.margin="0";m.style.padding="0";m.style.outline="0";if(arguments.length>1&&_5c){for(var i in _5c){if(i in _5a){continue;}m.style[i]=_5c[i];}}if(arguments.length>2&&_5d){m.className=_5d;}m.innerHTML=_5b;return dojo.marginBox(m);};var _60={w:16,h:16};dhm.getScrollbar=function(){return {w:_60.w,h:_60.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_61){var f=dhm._fontResizeNode=dojo.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";f.src=dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html");dojo.body().appendChild(f);if(dojo.isIE){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=Function("window.parent."+dojox._scopeName+".html.metrics._fontresize()");}};}else{f.onload=function(){f.contentWindow.onresize=Function("window.parent."+dojox._scopeName+".html.metrics._fontresize()");};}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);_60.w=n.offsetWidth-n.clientWidth;_60.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,_69){var fn=ob&&ev&&ob[ev];return fn&&(_69?fn.apply(ob,_69):ob[ev]());};dgu.setStyleHeightPx=function(_6b,_6c){if(_6c>=0){var s=_6b.style;var v=_6c+"px";if(_6b&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_6f,_70,_71,_72){var _73=(_72?_72:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=_73.length;i<l;i++){_70.connect(_6f,"on"+_73[i],_71);}},dgu.removeNode=function(_76){_76=dojo.byId(_76);_76&&_76.parentNode&&_76.parentNode.removeChild(_76);return _76;};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(_7b,_7c,_7d){if(_7b.length<=_7c){_7b[_7c]=_7d;}else{_7b.splice(_7c,0,_7d);}};dgu.arrayRemove=function(_7e,_7f){_7e.splice(_7f,1);};dgu.arraySwap=function(_80,inI,inJ){var _83=_80[inI];_80[inI]=_80[inJ];_80[inJ]=_83;};})();}if(!dojo._hasResource["dojox.grid._Scroller"]){dojo._hasResource["dojox.grid._Scroller"]=true;dojo.provide("dojox.grid._Scroller");(function(){var _84=function(_85){var i=0,n,p=_85.parentNode;while((n=p.childNodes[i++])){if(n==_85){return i-1;}}return -1;};var _89=function(_8a){if(!_8a){return;}var _8b=function(inW){return inW.domNode&&dojo.isDescendant(inW.domNode,_8a,true);};var ws=dijit.registry.filter(_8b);for(var i=0,w;(w=ws[i]);i++){w.destroy();}delete ws;};var _90=function(_91){var _92=dojo.byId(_91);return (_92&&_92.tagName?_92.tagName.toLowerCase():"");};var _93=function(_94,_95){var _96=[];var i=0,n;while((n=_94.childNodes[i++])){if(_90(n)==_95){_96.push(n);}}return _96;};var _99=function(_9a){return _93(_9a,"div");};dojo.declare("dojox.grid._Scroller",null,{constructor:function(_9b){this.setContentNodes(_9b);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(_9c,_9d,_9e){switch(arguments.length){case 3:this.rowsPerPage=_9e;case 2:this.keepRows=_9d;case 1:this.rowCount=_9c;}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(_9f,_a0){return _9f?(Math.ceil(_9f/_a0)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_a1){this.keepRows=_a1;this.keepPages=!this.keepRows?this.keepRows:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_a2){this.contentNodes=_a2;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(_a4){this.invalidateNodes();this.rowCount=_a4;var _a5=this.pageCount;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_a5){for(var i=_a5-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_a5){this.height+=this.defaultPageHeight*(this.pageCount-_a5-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_a7){return Boolean(this.getDefaultPageNode(_a7));},measurePage:function(_a8){var n=this.getDefaultPageNode(_a8);return (n&&n.innerHTML)?n.offsetHeight:0;},positionPage:function(_aa,_ab){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_aa].style.top=_ab+"px";}},repositionPages:function(_ad){var _ae=this.getDefaultNodes();var _af=0;for(var i=0;i<this.stack.length;i++){_af=Math.max(this.stack[i],_af);}var n=_ae[_ad];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_ad):0);for(var p=_ad+1;p<=_af;p++){n=_ae[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_b4){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_b4]);}},preparePage:function(_b6,_b7){var p=(_b7?this.popPage():null);for(var i=0;i<this.colCount;i++){var _ba=this.pageNodes[i];var _bb=(p===null?this.createPageNode():this.invalidatePageNode(p,_ba));_bb.pageIndex=_b6;_bb.id=(this._pageIdPrefix||"")+"page-"+_b6;_ba[_b6]=_bb;}},renderPage:function(_bc){var _bd=[];for(var i=0;i<this.colCount;i++){_bd[i]=this.pageNodes[i][_bc];}for(var i=0,j=_bc*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_bd);}},removePage:function(_c0){for(var i=0,j=_c0*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_c3){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_c3,this.pageNodes[i]);if(n){dojo.destroy(n);}}},pacify:function(_c6){},pacifying:false,pacifyTicks:200,setPacifying:function(_c7){if(this.pacifying!=_c7){this.pacifying=_c7;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _c8=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _c8;},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],this.height);}this.needPage(this.page,this.pageTop);var _ca=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _cb=this.getPageHeight(this.page);this.averageRowHeight=(_cb>0&&_ca>0)?(_cb/_ca):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _cc=this.pageCount-1;var _cd=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_cc]=_cd;return _cd;},updateContentHeight:function(_ce){this.height+=_ce;this.resize();},updatePageHeight:function(_cf){if(this.pageExists(_cf)){var oh=this.getPageHeight(_cf);var h=(this.measurePage(_cf))||(oh);this.pageHeights[_cf]=h;if((h)&&(oh!=h)){this.updateContentHeight(h-oh);this.repositionPages(_cf);}}},rowHeightChanged:function(_d2){this.updatePageHeight(Math.floor(_d2/this.rowsPerPage));},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");p.style.position="absolute";p.style[dojo._isBodyLtr()?"left":"right"]="0";return p;},getPageHeight:function(_d4){var ph=this.pageHeights[_d4];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_d6){return this.stack.push(_d6);},popPage:function(){return this.stack.shift();},findPage:function(_d7){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_d7){break;}}this.page=i;this.pageTop=h;},buildPage:function(_db,_dc,_dd){this.preparePage(_db,_dc);this.positionPage(_db,_dd);this.installPage(_db);this.renderPage(_db);this.pushPage(_db);},needPage:function(_de,_df){var h=this.getPageHeight(_de),oh=h;if(!this.pageExists(_de)){this.buildPage(_de,this.keepPages&&(this.stack.length>=this.keepPages),_df);h=this.measurePage(_de)||h;this.pageHeights[_de]=h;if(h&&(oh!=h)){this.updateContentHeight(h-oh);}}else{this.positionPage(_de,_df);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_e2){this.grid.scrollTop=_e2;if(this.colCount){this.startPacify();this.findPage(_e2);var h=this.height;var b=this.getScrollBottom(_e2);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,_e2);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_e7){return (this.windowHeight>=0?_e7+this.windowHeight:-1);},processNodeEvent:function(e,_e9){var t=e.target;while(t&&(t!=_e9)&&t.parentNode&&(t.parentNode.parentNode!=_e9)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_e9)){return false;}var _eb=t.parentNode;e.topRowIndex=_eb.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_84(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_ed,_ee){},removeRow:function(_ef){},getDefaultPageNode:function(_f0){return this.getDefaultNodes()[_f0];},positionPageNode:function(_f1,_f2){},getPageNodePosition:function(_f3){return _f3.offsetTop;},invalidatePageNode:function(_f4,_f5){var p=_f5[_f4];if(p){delete _f5[_f4];this.removePage(_f4,p);_89(p);p.innerHTML="";}return p;},getPageRow:function(_f7){return _f7*this.rowsPerPage;},getLastPageRow:function(_f8){return Math.min(this.rowCount,this.getPageRow(_f8+1))-1;},getFirstVisibleRow:function(_f9,_fa,_fb){if(!this.pageExists(_f9)){return 0;}var row=this.getPageRow(_f9);var _fd=this.getDefaultNodes();var _fe=_99(_fd[_f9]);for(var i=0,l=_fe.length;i<l&&_fa<_fb;i++,row++){_fa+=_fe[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_101,_102,_103){if(!this.pageExists(_101)){return 0;}var _104=this.getDefaultNodes();var row=this.getLastPageRow(_101);var rows=_99(_104[_101]);for(var i=rows.length-1;i>=0&&_102>_103;i--,row--){_102-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_108){var _109=this.getDefaultNodes();var rows=_99(_109[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_108){this.offset=h-(t-_108);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_10f){var _110=Math.floor(_10f/this.rowsPerPage);var t=0;for(var i=0;i<_110;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.needPage(_110,this.pageTop);var _113=this.getDefaultNodes();var rows=_99(_113[_110]);var r=_10f-this.rowsPerPage*_110;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 _117=function(_118){try{dojox.grid.util.fire(_118,"focus");dojox.grid.util.fire(_118,"select");}catch(e){}};var _119=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(_11b){this._props=_11b||{};dojo.mixin(this,_11b);},format:function(_11c,_11d){var f,i=this.grid.edit.info,d=this.get?this.get(_11c,_11d):(this.value||this.defaultValue);if(this.editable&&(this.alwaysEditing||(i.rowIndex==_11c&&i.cell==this))){return this.formatEditing(d,_11c);}else{var v=(d!=this.defaultValue&&(f=this.formatter))?f.call(this,d,_11c):d;return (typeof v=="undefined"?this.defaultValue:v);}},formatEditing:function(_122,_123){},getNode:function(_124){return this.view.getCellNode(_124,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_125){return (this.getNode(_125)||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(_128,_129){this.grid.edit.applyCellEdit(_128,this,_129);},cancelEdit:function(_12a){this.grid.doCancelEdit(_12a);},_onEditBlur:function(_12b){if(this.grid.edit.isEditCell(_12b,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_12c,_12d){if(this.commitOnBlur){dojo.connect(_12c,"onblur",function(e){setTimeout(dojo.hitch(this,"_onEditBlur",_12d),250);});}},needFormatNode:function(_12f,_130){this._formatPending=true;_119(this,"_formatNode",_12f,_130);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_131,_132){if(this._formatPending){this._formatPending=false;dojo.setSelectable(this.grid.domNode,true);this.formatNode(this.getEditNode(_132),_131,_132);}},formatNode:function(_133,_134,_135){if(dojo.isIE){_119(this,"focus",_135,_133);}else{this.focus(_135,_133);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_138){return this.getEditNode(_138)[this._valueProp];},setValue:function(_139,_13a){var n=this.getEditNode(_139);if(n){n[this._valueProp]=_13a;}},focus:function(_13c,_13d){_117(_13d||this.getEditNode(_13c));},save:function(_13e){this.value=this.value||this.getValue(_13e);},restore:function(_13f){this.setValue(_13f,this.value);},_finish:function(_140){dojo.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_141){this.applyEdit(this.getValue(_141),_141);this._finish(_141);},cancel:function(_142){this.cancelEdit(_142);this._finish(_142);}});dgc._Base.markupFactory=function(node,_144){var d=dojo;var _146=d.trim(d.attr(node,"formatter")||"");if(_146){_144.formatter=dojo.getObject(_146);}var get=d.trim(d.attr(node,"get")||"");if(get){_144.get=dojo.getObject(get);}var _148=function(attr){var _14a=d.trim(d.attr(node,attr)||"");return _14a?!(_14a.toLowerCase()=="false"):undefined;};_144.sortDesc=_148("sortDesc");_144.editable=_148("editable");_144.alwaysEditing=_148("alwaysEditing");_144.noresize=_148("noresize");var _14b=d.trim(d.attr(node,"loadingText")||d.attr(node,"defaultValue")||"");if(_14b){_144.defaultValue=_14b;}var _14c=function(attr){return d.trim(d.attr(node,attr)||"")||undefined;};_144.styles=_14c("styles");_144.headerStyles=_14c("headerStyles");_144.cellStyles=_14c("cellStyles");_144.classes=_14c("classes");_144.headerClasses=_14c("headerClasses");_144.cellClasses=_14c("cellClasses");};dojo.declare("dojox.grid.cells.Cell",dgc._Base,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_14e,_14f){this.needFormatNode(_14e,_14f);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_14e+"\">";},formatNode:function(_150,_151,_152){this.inherited(arguments);this.registerOnBlur(_150,_152);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){dojo.stopEvent(e);}}},_finish:function(_155){this.inherited(arguments);var n=this.getEditNode(_155);try{dojox.grid.util.fire(n,"blur");}catch(e){}}});dgc.Cell.markupFactory=function(node,_158){dgc._Base.markupFactory(node,_158);var d=dojo;var _15a=d.trim(d.attr(node,"keyFilter")||"");if(_15a){_158.keyFilter=new RegExp(_15a);}};dojo.declare("dojox.grid.cells.RowIndex",dgc.Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_15b){return _15b+1;}});dgc.RowIndex.markupFactory=function(node,_15d){dgc.Cell.markupFactory(node,_15d);};dojo.declare("dojox.grid.cells.Select",dgc.Cell,{options:null,values:null,returnIndex:-1,constructor:function(_15e){this.values=this.values||this.options;},formatEditing:function(_15f,_160){this.needFormatNode(_15f,_160);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",(_15f==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},getValue:function(_165){var n=this.getEditNode(_165);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 _16c=d.trim(d.attr(node,"options")||"");if(_16c){var o=_16c.split(",");if(o[0]!=_16c){cell.options=o;}}var _16e=d.trim(d.attr(node,"values")||"");if(_16e){var v=_16e.split(",");if(v[0]!=_16e){cell.values=v;}}};dojo.declare("dojox.grid.cells.AlwaysEdit",dgc.Cell,{alwaysEditing:true,_formatNode:function(_170,_171){this.formatNode(this.getEditNode(_171),_170,_171);},applyStaticValue:function(_172){var e=this.grid.edit;e.applyCellEdit(this.getValue(_172),this,_172);e.start(this,_172,true);}});dgc.AlwaysEdit.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);};dojo.declare("dojox.grid.cells.Bool",dgc.AlwaysEdit,{_valueProp:"checked",formatEditing:function(_176,_177){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_176?" 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 _194=n.scrollLeft,_195=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_194!=n.scrollLeft||_195!=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,_19b=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),_19b];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,_1aa){this.node=dojo.byId(node);if(!_1aa){_1aa={};}this.handle=_1aa.handle?dojo.byId(_1aa.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_1aa.delay>0?_1aa.delay:0;this.skip=_1aa.skip;this.mover=_1aa.mover?_1aa.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(_1ab,node){return new dojo.dnd.Moveable(node,_1ab);},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(_1b3){dojo.publish("/dnd/move/start",[_1b3]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_1b4){dojo.publish("/dnd/move/stop",[_1b4]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_1b5){},onMove:function(_1b6,_1b7){this.onMoving(_1b6,_1b7);var s=_1b6.node.style;s.left=_1b7.l+"px";s.top=_1b7.t+"px";this.onMoved(_1b6,_1b7);},onMoving:function(_1b9,_1ba){},onMoved:function(_1bb,_1bc){}});}if(!dojo._hasResource["dojox.grid._Builder"]){dojo._hasResource["dojox.grid._Builder"]=true;dojo.provide("dojox.grid._Builder");(function(){var dg=dojox.grid;var _1be=function(td){return td.cellIndex>=0?td.cellIndex:dojo.indexOf(td.parentNode.cells,td);};var _1c0=function(tr){return tr.rowIndex>=0?tr.rowIndex:dojo.indexOf(tr.parentNode.childNodes,tr);};var _1c2=function(_1c3,_1c4){return _1c3&&((_1c3.rows||0)[_1c4]||_1c3.childNodes[_1c4]);};var _1c5=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _1c8=function(_1c9,_1ca){for(var n=_1c9;n&&_1ca(n);n=n.parentNode){}return n;};var _1cc=function(_1cd){var name=_1cd.toUpperCase();return function(node){return node.tagName!=name;};};var _1d0=dojox.grid.util.rowIndexTag;var _1d1=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=\"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(_1d4,_1d5,_1d6,_1d7){var _1d8=[],html;var _1da=dojo.isFF<3?"wairole:":"";if(_1d7){html=["<th tabIndex=\"-1\" role=\"",_1da,"columnheader\""];}else{html=["<td tabIndex=\"-1\" role=\"",_1da,"gridcell\""];}_1d4.colSpan&&html.push(" colspan=\"",_1d4.colSpan,"\"");_1d4.rowSpan&&html.push(" rowspan=\"",_1d4.rowSpan,"\"");html.push(" class=\"dojoxGridCell ");_1d4.classes&&html.push(_1d4.classes," ");_1d6&&html.push(_1d6," ");_1d8.push(html.join(""));_1d8.push("");html=["\" idx=\"",_1d4.index,"\" style=\""];if(_1d5&&_1d5[_1d5.length-1]!=";"){_1d5+=";";}html.push(_1d4.styles,_1d5||"",_1d4.hidden?"display:none;":"");_1d4.unitWidth&&html.push("width:",_1d4.unitWidth,";");_1d8.push(html.join(""));_1d8.push("");html=["\""];_1d4.attrs&&html.push(" ",_1d4.attrs);html.push(">");_1d8.push(html.join(""));_1d8.push("");_1d8.push("</td>");return _1d8;},isCellNode:function(_1db){return Boolean(_1db&&_1db!=dojo.doc&&dojo.attr(_1db,"idx"));},getCellNodeIndex:function(_1dc){return _1dc?Number(dojo.attr(_1dc,"idx")):-1;},getCellNode:function(_1dd,_1de){for(var i=0,row;row=_1c2(_1dd.firstChild,i);i++){for(var j=0,cell;cell=row.cells[j];j++){if(this.getCellNodeIndex(cell)==_1de){return cell;}}}},findCellTarget:function(_1e3,_1e4){var n=_1e3;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_1d1 in n.offsetParent.parentNode&&n.offsetParent.parentNode[_1d1]!=this.view.id))&&(n!=_1e4)){n=n.parentNode;}return n!=_1e4?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(_1e7,_1e8){var n=_1e7;while(n&&(n!=this.domNode)&&(!(_1e8 in n)||(_1d1 in n&&n[_1d1]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_1ea){return this.findTarget(_1ea,_1d0);},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 _1f3=this.grid.get,_1f4=this.view.structure.cells;for(var j=0,row;(row=_1f4[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_1f3;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);}}},generateHtml:function(_1f9,_1fa){var html=this.getTableArray(),v=this.view,_1fd=v.structure.cells,item=this.grid.getItem(_1fa);dojox.grid.util.fire(this.view,"onBeforeRow",[_1fa,_1fd]);for(var j=0,row;(row=_1fd[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(_1fa,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[_1d0];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(_208,_209){var html=this.getTableArray(),_20b=this.view.structure.cells;dojox.grid.util.fire(this.view,"onBeforeRow",[-1,_20b]);for(var j=0,row;(row=_20b[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_210;(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+"'";}}_210=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_210[5]=(_209!=undefined?_209:_208(cell));_210[3]=cell.customStyles.join(";");_210[1]=cell.customClasses.join(" ");html.push(_210.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var x=e.layerX;if(dojo.isMoz){var n=_1c8(e.target,_1cc("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!dojo._isBodyLtr()&&e.sourceView.headerNode.scrollLeft<t){x-=t;}}var n=_1c8(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=_1be(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._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._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 _225=[],_226=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_226[i]);i++){_225.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=dojo._isBodyLtr()?1:-1;var _22b=e.grid.views.views;var _22c=[];for(var i=view.idx+adj,_22d;(_22d=_22b[i]);i=i+adj){_22c.push({node:_22d.headerNode,left:window.parseInt(_22d.headerNode.style.left)});}var _22e=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:_22e,tw:dojo.contentBox(_22e).w,spanners:_225,followers:_22c};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(_230,_231,_232){var _233=dojo._isBodyLtr();var _234=_233?_232.l:-_232.l;var w=_230.w+_234;var vw=_230.vw+_234;var tw=_230.tw+_234;if(w>=this.minColWidth){for(var i=0,s,sw;(s=_230.spanners[i]);i++){sw=s.width+_234;s.node.style.width=sw+"px";_230.view.setColWidth(s.index,sw);}for(var i=0,f,fl;(f=_230.followers[i]);i++){fl=f.left+_234;f.node.style.left=fl+"px";}_230.node.style.width=w+"px";_230.view.setColWidth(_230.index,w);_230.view.headerNode.style.width=vw+"px";_230.view.setColumnsWidth(tw);if(!_233){_230.view.headerNode.scrollLeft=_230.scrollLeft+_234;}}if(_230.view.flexCells&&!_230.view.testFlexCells()){var t=_1c5(_230.node);t&&(t.style.width="");}},endResizeColumn:function(_23e){dojo.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;var conn=dojo.connect(_23e.view,"update",this,function(){dojo.disconnect(conn);this._skipBogusClicks=false;});setTimeout(dojo.hitch(_23e.view,"update"),50);}});dg._TableMap=dojo.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_241){var _242=_241.length;if(!_242){return;}this.map=[];for(var j=0,row;(row=_241[j]);j++){this.map[j]=[];}for(var j=0,row;(row=_241[j]);j++){for(var i=0,x=0,cell,_248,_249;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_249=cell.rowSpan||1;_248=cell.colSpan||1;for(var y=0;y<_249;y++){for(var s=0;s<_248;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_248;}}},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(_251,_252){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_252&&cell.r==_251){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_257,_258,_259){var row=_257&&_257.rows[_258];return row&&row.cells[_259];},_findOverlappingNodes:function(_25b,_25c,_25d){var _25e=[];var m=this.getMapCoords(_25c,_25d);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(_25b,rw.r,rw.c):null);if(n){_25e.push(n);}}return _25e;},findOverlappingNodes:function(_264){return this._findOverlappingNodes(_1c5(_264),_1c0(_264.parentNode),_1be(_264));}});})();}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,_266){this.node=dojo.byId(node);if(!_266){_266={};}this.creator=_266.creator||null;this.skipForm=_266.skipForm;this.parent=_266.dropParent&&dojo.byId(_266.dropParent);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_266&&_266._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,_276,_277){if(!this.parent.firstChild){_277=null;}else{if(_276){if(!_277){_277=this.parent.firstChild;}}else{if(_277){_277=_277.nextSibling;}}}if(_277){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,_277);}}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(_27a,node){_27a._skipStartup=true;return new dojo.dnd.Container(node,_27a);},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,_283){var _284="dojoDnd"+type;var _285=type.toLowerCase()+"State";dojo.removeClass(this.node,_284+this[_285]);dojo.addClass(this.node,_284+_283);this[_285]=_283;},_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 _28c=node.parentNode;_28c;node=_28c,_28c=node.parentNode){if(_28c==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 _29a=item&&dojo.isObject(item),data,type,n;if(_29a&&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=(_29a&&item.data)?item.data:item;type=(_29a&&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,_29f){if(!_29f){_29f={};}this.singular=_29f.singular;this.autoSync=_29f.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(_2b1,data,_2b3,_2b4){var _2b5=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_2b5.call(this,item,hint);if(_2b1){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,_2b3,_2b4);this._normalizedCreator=_2b5;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_2b9,node){_2b9._skipStartup=true;return new dojo.dnd.Selector(node,_2b9);},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(_2c4){this.manager=_2c4;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,_2cb=this.manager.source,node;dojo.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_2cb.creator){node=_2cb._normalizedCreator(_2cb.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _2cd=dojo.create("table"),_2ce=dojo.create("tbody",null,_2cd);_2ce.appendChild(node);node=_2cd;}}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(_2d0){if(this.avatar){this.target=(_2d0&&_2d0.targetState!="Disabled")?_2d0:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}dojo.publish("/dnd/source/over",[_2d0]);},outSource:function(_2d1){if(this.avatar){if(this.target==_2d1){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_2d2,_2d3,copy){this.source=_2d2;this.nodes=_2d3;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_2d2,_2d3,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 _2d7=Boolean(this.target&&flag);if(this.canDropFlag!=_2d7){this.canDropFlag=_2d7;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))),_2de=[this.source,this.nodes,copy,this.target];dojo.publish("/dnd/drop/before",_2de);dojo.publish("/dnd/drop",_2de);}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,_2e5){dojo.mixin(this,dojo.mixin({},_2e5));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(_2e8,_2e9){if(this==_2e8){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_2e9.length;++i){var type=_2e8.getItem(_2e9[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(_2ee,self){if(_2ee){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(_2f0,node){_2f0._skipStartup=true;return new dojo.dnd.Source(node,_2f0);},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 _2f4=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){_2f4=(e.pageX-this.targetBox.xy.x)<(this.targetBox.w/2);}else{_2f4=(e.pageY-this.targetBox.xy.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_2f4!=this.before){this._markTargetAnchor(_2f4);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 _2f5=this.getSelectedNodes();if(_2f5.length){m.startDrag(this,_2f5,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(_2f8){if(this!=_2f8){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(_2fa,_2fb,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_2fa?(copy?"Copied":"Moved"):"");}var _2fd=this.accept&&this.checkAcceptance(_2fa,_2fb);this._changeState("Target",_2fd?"":"Disabled");if(this==_2fa){dojo.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_2fe,_2ff,copy,_301){if(this==_301){this.onDrop(_2fe,_2ff,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(_302,_303,copy){if(this!=_302){this.onDropExternal(_302,_303,copy);}else{this.onDropInternal(_303,copy);}},onDropExternal:function(_305,_306,copy){var _308=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _308.call(this,_305.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_305.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=_305.getItem(node.id);_305.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_305.selectNone();}this.insertNodes(true,_306,this.before,this.current);if(!copy&&this.creator){_305.deleteSelectedNodes();}this._normalizedCreator=_308;},onDropInternal:function(_312,copy){var _314=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _314.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,_312,this.before,this.current);this._normalizedCreator=_314;},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(_31e){if(this.current==this.targetAnchor&&this.before==_31e){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_31e;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,_323){this.isSource=false;dojo.removeClass(this.node,"dojoDndSource");},markupFactory:function(_324,node){_324._skipStartup=true;return new dojo.dnd.Target(node,_324);}});dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(node,_327){this.autoSync=true;},markupFactory:function(_328,node){_328._skipStartup=true;return new dojo.dnd.AutoSource(node,_328);}});}if(!dojo._hasResource["dojox.grid._View"]){dojo._hasResource["dojox.grid._View"]=true;dojo.provide("dojox.grid._View");(function(){var _32a=function(_32b,_32c){return _32b.style.cssText==undefined?_32b.getAttribute("style"):_32b.style.cssText;};dojo.declare("dojox.grid._View",[dijit._Widget,dijit._Templated],{defaultWidth:"18em",viewWidth:"",templateString:"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"presentation\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"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(_32d){var vs=(this.structure=_32d);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 _333=this.hasVScrollbar();var _334=dojo.style(this.scrollboxNode,"overflow");if(this.noscroll||!_334||_334=="hidden"){_333=false;}else{if(_334=="scroll"){_333=true;}}return (_333?dojox.html.metrics.getScrollbar().w:0);},getColumnsWidth:function(){return this.headerContentNode.firstChild.offsetWidth;},setColumnsWidth:function(_335){this.headerContentNode.firstChild.style.width=_335+"px";if(this.viewWidth){this.viewWidth=_335+"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 _336=this.grid.layout.cells;var _337=dojo.hitch(this,function(node,_339){var inc=_339?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_336[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_336[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(_33e){var src=this.source;if(src.current==src.targetAnchor&&src.before==_33e){return;}if(src.targetAnchor&&_337(src.targetAnchor,src.before)){src._removeItemClass(_337(src.targetAnchor,src.before),src.before?"After":"Before");}dojo.dnd.Source.prototype._markTargetAnchor.call(src,_33e);if(src.targetAnchor&&_337(src.targetAnchor,src.before)){src._addItemClass(_337(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:dojo.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_337(src.targetAnchor,src.before)){src._removeItemClass(_337(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(_341,_342,copy){if(dojo.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _344=this.grid.views.views;var _345=_344[_341.viewIndex];var _346=_344[this.index];if(_346!=_345){var s=_345.convertColPctToFixed();var t=_346.convertColPctToFixed();if(s||t){setTimeout(function(){_345.update();_346.update();},50);}}},_onDndDrop:function(_349,_34a,copy){if(dojo.dnd.manager().target!==this.source){if(dojo.dnd.manager().source===this.source){this._removingColumn=true;}return;}var _34c=function(n){return n?dojo.attr(n,"idx"):null;};var w=dojo.marginBox(_34a[0]).w;if(_349.viewIndex!==this.index){var _34f=this.grid.views.views;var _350=_34f[_349.viewIndex];var _351=_34f[this.index];if(_350.viewWidth&&_350.viewWidth!="auto"){_350.setColumnsWidth(_350.getColumnsWidth()-w);}if(_351.viewWidth&&_351.viewWidth!="auto"){_351.setColumnsWidth(_351.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;var _354=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;window.setTimeout(function(){_354.moveColumn(_349.viewIndex,idx,_34c(_34a[0]),_34c(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(_356){var n=_356.name||_356.grid.getCellName(_356);var ret=["<div class=\"dojoxGridSortNode"];if(_356.index!=_356.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_356.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_356.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\"></div>"]);}ret=ret.concat([n,"</div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_359){if(this._hasHScroll==undefined||_359){if(this.noscroll){this._hasHScroll=false;}else{var _35a=dojo.style(this.scrollboxNode,"overflow");if(_35a=="hidden"){this._hasHScroll=false;}else{if(_35a=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth<this.contentNode.offsetWidth);}}}}return this._hasHScroll;},hasVScrollbar:function(_35b){if(this._hasVScroll==undefined||_35b){if(this.noscroll){this._hasVScroll=false;}else{var _35c=dojo.style(this.scrollboxNode,"overflow");if(_35c=="hidden"){this._hasVScroll=false;}else{if(_35c=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.offsetHeight<this.contentNode.offsetHeight);}}}}return this._hasVScroll;},convertColPctToFixed:function(){var _35d=false;var _35e=dojo.query("th",this.headerContentNode);var _35f=dojo.map(_35e,function(c){var w=c.style.width;if(w&&w.slice(-1)=="%"){_35d=true;return dojo.contentBox(c).w;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return -1;});if(_35d){dojo.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var vIdx=cell.layoutIndex;this.setColWidth(idx,_35f[vIdx]);_35e[vIdx].style.width=cell.unitWidth;}},this);return true;}return false;},adaptHeight:function(_365){if(!this.grid._autoHeight){var h=this.domNode.clientHeight;if(_365){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(_36d){var _36e=this.createRowNode(_36d);this.buildRow(_36d,_36e);this.grid.edit.restore(this,_36d);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 _36e;},createRowNode:function(_36f){var node=document.createElement("div");node.className=this.classTag+"Row";node[dojox.grid.util.gridViewTag]=this.id;node[dojox.grid.util.rowIndexTag]=_36f;this.rowNodes[_36f]=node;return node;},buildRow:function(_371,_372){this.buildRowContent(_371,_372);this.styleRow(_371,_372);},buildRowContent:function(_373,_374){_374.innerHTML=this.content.generateHtml(_373,_373);if(this.flexCells&&this.contentWidth){_374.firstChild.style.width=this.contentWidth;}dojox.grid.util.fire(this,"onAfterRow",[_373,this.structure.cells,_374]);},rowRemoved:function(_375){this.grid.edit.save(this,_375);delete this.rowNodes[_375];},getRowNode:function(_376){return this.rowNodes[_376];},getCellNode:function(_377,_378){var row=this.getRowNode(_377);if(row){return this.content.getCellNode(row,_378);}},getHeaderCellNode:function(_37a){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_37a);}},styleRow:function(_37b,_37c){_37c._style=_32a(_37c);this.styleRowNode(_37b,_37c);},styleRowNode:function(_37d,_37e){if(_37e){this.doStyleRowNode(_37d,_37e);}},doStyleRowNode:function(_37f,_380){this.grid.styleRowNode(_37f,_380);},updateRow:function(_381){var _382=this.getRowNode(_381);if(_382){_382.style.height="";this.buildRow(_381,_382);}return _382;},updateRowStyles:function(_383){this.styleRowNode(_383,this.getRowNode(_383));},lastTop:0,firstScroll:0,doscroll:function(_384){var _385=dojo._isBodyLtr();if(this.firstScroll<2){if((!_385&&this.firstScroll==1)||(_385&&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=_385?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(_388){this.lastTop=_388;this.scrollboxNode.scrollTop=_388;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(_38d,_38e){this.grid.setCellWidth(_38d,_38e+"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 _396=this.manager.source,node;if(_396.creator){node=_396._normailzedCreator(_396.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _398=dd.createElement("table"),_399=dd.createElement("tbody");_399.appendChild(node);_398.appendChild(_399);node=_398;}else{if(node.tagName.toLowerCase()=="th"){var _398=dd.createElement("table"),_399=dd.createElement("tbody"),r=dd.createElement("tr");_398.cellPadding=_398.cellSpacing="0";r.appendChild(node);_399.appendChild(r);_398.appendChild(_399);node=_398;}}}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 _39c=dojo.dnd.manager().makeAvatar;dojo.dnd.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined){return new dojox.grid._GridAvatar(this);}return _39c.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(_39e,_39f){var w=this.contentNode.offsetWidth-this.padBorderWidth;_39f.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(_3a1,_3a2){var n=["dojoxGridRowbar"];if(this.grid.rows.isOver(_3a1)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_3a1)){n.push("dojoxGridRowbarSelected");}_3a2.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(_3a6){this.grid=_3a6;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_3a7,_3a8,_3a9,_3aa,_3ab){var _3ac=this.structure[_3a7].cells[0];var _3ad=this.structure[_3a8].cells[0];var cell=null;var _3af=0;var _3b0=0;for(var i=0,c;c=_3ac[i];i++){if(c.index==_3a9){_3af=i;break;}}cell=_3ac.splice(_3af,1)[0];cell.view=this.grid.views.views[_3a8];for(i=0,c=null;c=_3ad[i];i++){if(c.index==_3aa){_3b0=i;break;}}if(!_3ab){_3b0+=1;}_3ad.splice(_3b0,0,cell);var _3b3=this.grid.getCell(this.grid.getSortIndex());if(_3b3){_3b3._currentlySorted=this.grid.getSortAsc();}this.cells=[];var _3a9=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=_3a9;this.cells.push(c);if("_currentlySorted" in c){var si=_3a9+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_3a9++;}}}this.grid.setupHeaderMenu();},setColumnVisibility:function(_3b9,_3ba){var cell=this.cells[_3b9];if(cell.hidden==_3ba){cell.hidden=!_3ba;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(_3be,_3bf,_3c0){var self=this;var _3c2=function(_3c3){var w=0;if(_3c3.colSpan>1){w=0;}else{w=_3c3.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _3c5={grid:this.grid,subrow:_3be,layoutIndex:_3bf,index:this.cells.length};if(_3c0&&_3c0 instanceof dojox.grid.cells._Base){var _3c6=dojo.clone(_3c0);_3c5.unitWidth=_3c2(_3c6._props);_3c6=dojo.mixin(_3c6,this._defaultCellProps,_3c0._props,_3c5);return _3c6;}var _3c7=_3c0.type||this._defaultCellProps.type||dojox.grid.cells.Cell;_3c5.unitWidth=_3c2(_3c0);return new _3c7(dojo.mixin({},this._defaultCellProps,_3c0,_3c5));},addRowDef:function(_3c8,_3c9){var _3ca=[];var _3cb=0,_3cc=0,_3cd=true;for(var i=0,def,cell;(def=_3c9[i]);i++){cell=this.addCellDef(_3c8,i,def);_3ca.push(cell);this.cells.push(cell);if(_3cd&&cell.relWidth){_3cb+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_3cc+=window.parseInt(w,10);}else{if(w=="auto"){_3cd=false;}}}}}if(_3cb&&_3cd){dojo.forEach(_3ca,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_3cb)*(100-_3cc))+"%";}});}return _3ca;},addRowsDef:function(_3d3){var _3d4=[];if(dojo.isArray(_3d3)){if(dojo.isArray(_3d3[0])){for(var i=0,row;_3d3&&(row=_3d3[i]);i++){_3d4.push(this.addRowDef(i,row));}}else{_3d4.push(this.addRowDef(0,_3d3));}}return _3d4;},addViewDef:function(_3d7){this._defaultCellProps=_3d7.defaultCell||{};if(_3d7.width&&_3d7.width=="auto"){delete _3d7.width;}return dojo.mixin({},_3d7,{cells:this.addRowsDef(_3d7.rows||_3d7.cells)});},setStructure:function(_3d8){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 _3db=this.grid.rowSelector;if(_3db=="false"){sel=null;}else{if(_3db!="true"){sel["width"]=_3db;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _3dc=function(def){return ("name" in def||"field" in def||"get" in def);};var _3de=function(def){if(dojo.isArray(def)){if(dojo.isArray(def[0])||_3dc(def[0])){return true;}}return false;};var _3e0=function(def){return (def!=null&&dojo.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_3dc(def))));};if(dojo.isArray(_3d8)){var _3e2=false;for(var i=0,st;(st=_3d8[i]);i++){if(_3e0(st)){_3e2=true;break;}}if(!_3e2){s.push(this.addViewDef({cells:_3d8}));}else{for(var i=0,st;(st=_3d8[i]);i++){if(_3de(st)){s.push(this.addViewDef({cells:st}));}else{if(_3e0(st)){s.push(this.addViewDef(st));}}}}}else{if(_3e0(_3d8)){s.push(this.addViewDef(_3d8));}}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(_3e5){this.grid=_3e5;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_3e6){_3e6.idx=this.views.length;this.views.push(_3e6);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _3e9=[];for(var i=0,v;v=this.views[i];i++){_3e9.push(v.contentNode);}return _3e9;},forEach:function(_3ec){for(var i=0,v;v=this.views[i];i++){_3ec(v,i);}},onEach:function(_3ef,_3f0){_3f0=_3f0||[];for(var i=0,v;v=this.views[i];i++){if(_3ef in v){v[_3ef].apply(v,_3f0);}}},normalizeHeaderNodeHeight:function(){var _3f3=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_3f3.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_3f3);},normalizeRowNodeHeights:function(_3f6){var h=0;for(var i=0,n,o;(n=_3f6[i]);i++){h=Math.max(h,dojo.marginBox(n.firstChild).h);}h=(h>=0?h:0);for(var i=0,n;(n=_3f6[i]);i++){dojo.marginBox(n.firstChild,{h:h});}if(_3f6&&_3f6[0]&&_3f6[0].parentNode){_3f6[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(_3fe){var _3ff=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_3fe));i++){n.firstChild.style.height="";_3ff.push(n);}this.normalizeRowNodeHeights(_3ff);},getViewWidth:function(_403){return this.views[_403].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_404){_404.headerContentNode.style.height="";});var h=0;this.forEach(function(_406){h=Math.max(_406.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_408){h=Math.max(_408.domNode.offsetHeight,h);});return h;},findClient:function(_409){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 _414=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);_414(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;_414(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_414(v,l);}return l;},renderRow:function(_41b,_41c){var _41d=[];for(var i=0,v,n,_421;(v=this.views[i])&&(n=_41c[i]);i++){_421=v.renderRow(_41b);n.appendChild(_421);_41d.push(_421);}this.normalizeRowNodeHeights(_41d);},rowRemoved:function(_422){this.onEach("rowRemoved",[_422]);},updateRow:function(_423){for(var i=0,v;v=this.views[i];i++){v.updateRow(_423);}this.renormalizeRow(_423);},updateRowStyles:function(_426){this.onEach("updateRowStyles",[_426]);},setScrollTop:function(_427){var top=_427;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_427);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 _42d=function(_42e,_42f){if(_42e.style.cssText==undefined){_42e.setAttribute("style",_42f);}else{_42e.style.cssText=_42f;}};dojo.declare("dojox.grid._RowManager",null,{constructor:function(_430){this.grid=_430;},linesToEms:2,overRow:-2,prepareStylingRow:function(_431,_432){return {index:_431,node:_432,odd:Boolean(_431&1),selected:this.grid.selection.isSelected(_431),over:this.isOver(_431),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_433,_434){var row=this.prepareStylingRow(_433,_434);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_436){var i=_436;i.node.className=i.customClasses;var h=i.node.style.height;_42d(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_439){this.grid.updateRowStyles(_439);},setOverRow:function(_43a){var last=this.overRow;this.overRow=_43a;if((last!=this.overRow)&&(last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_43c){return (this.overRow==_43c);}});})();}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(_43d){this.grid=_43d;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,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView();this._initColumnHeaders();},isFocusCell:function(_43e,_43f){return (this.cell==_43e)&&(this.rowIndex==_43f);},isLastFocusCell:function(){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);},isFirstFocusCell:function(){return (this.rowIndex==0)&&(this.cell.index==0);},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(_440){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){dojo.toggleClass(n,this.focusClass,_440);if(_440){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 _444=this._findHeaderCells();for(var i=0;i<_444.length;i++){this._connects.push(dojo.connect(_444[i],"onfocus",this,"doColHeaderFocus"));this._connects.push(dojo.connect(_444[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _446=dojo.query("th",this.grid.viewsHeaderNode);var _447=[];for(var i=0;i<_446.length;i++){var _449=_446[i];var _44a=dojo.hasAttr(_449,"tabindex");var _44b=dojo.attr(_449,"tabindex");if(_44a&&_44b<0){_447.push(_449);}}return _447;},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);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(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,_44f){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:(_44f?_44f:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_454){var info=null;if(this._colHeadNode){info=this._scrollInfo(this.grid.getCell(_454),this._colHeadNode);}if(info){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;}}}},styleRow:function(_456){return;},setFocusIndex:function(_457,_458){this.setFocusCell(this.grid.getCell(_458),_457);},setFocusCell:function(_459,_45a){if(_459&&!this.isFocusCell(_459,_45a)){this.tabbingOut=false;this._colHeadNode=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_459;this.rowIndex=_45a;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(){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;}this.setFocusIndex(row,col);},previous:function(){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;}this.setFocusIndex(row,col);},move:function(_461,_462){if(this.isNavHeader()){var _463=this._findHeaderCells();var _464=dojo.indexOf(_463,this._colHeadNode);_464+=_462;if((_464>=0)&&(_464<_463.length)){this._colHeadNode=_463[_464];this._colHeadNode.focus();this._scrollHeader(_464);}}else{var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_461));if(_461){if(_461>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_461<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+_462));this.setFocusIndex(row,col);if(_461){this.grid.updateRow(r);}}},previousKey:function(e){if(!this.isNavHeader()){this.focusHeader();dojo.stopEvent(e);}else{if(this.grid.edit.isEditing()){dojo.stopEvent(e);this.previous();}else{this.tabOut(this.grid.domNode);}}},nextKey:function(e){var _46e=this.grid.rowCount==0;if(e.target===this.grid.domNode){this.focusHeader();dojo.stopEvent(e);}else{if(this.isNavHeader()){this._colHeadNode=null;if(this.isNoFocusCell()&&!_46e){this.setFocusIndex(0,0);if(!this.grid.selection.isSelected(0)){this.grid.selection.clickSelect(0,false,false);}}else{if(this.cell&&!_46e){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(_46f){this.tabbingOut=true;_46f.focus();},focusGridView:function(){dojox.grid.util.fire(this.focusView,"focus");},focusGrid:function(_470){this.focusGridView();this._focusifyCellNode(true);},focusHeader:function(){var _471=this._findHeaderCells();if(this.isNoFocusCell()){this._colHeadNode=_471[0];}else{this._colHeadNode=_471[this.cell.index];}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);},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(_479){this.grid=_479;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(_47a,_47b){if(this.grid.singleClickEdit||this.isEditRow(_47b)){this.setEditCell(_47a,_47b);}else{this.apply();}if(this.isEditing()||(_47a&&_47a.editable&&_47a.alwaysEditing)){this._focusEditor(_47a,_47b);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_47d){if(_47d.index==this.info.rowIndex){_47d.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(_481,_482){return (this.info.rowIndex===_481)&&(this.info.cell.index==_482);},isEditRow:function(_483){return this.info.rowIndex===_483;},setEditCell:function(_484,_485){if(!this.isEditCell(_485,_484.index)&&this.grid.canEdit&&this.grid.canEdit(_484,_485)){this.start(_484,_485,this.isEditRow(_485)||_484.editable);}},_focusEditor:function(_486,_487){dojox.grid.util.fire(_486,"focus",[_487]);},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(_488,_489,_48a){this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_489)){this.applyRowEdit();this.grid.updateRow(_489);}if(_48a){this.info={cell:_488,rowIndex:_489};this.grid.doStartEdit(_488,_489);this.grid.updateRow(_489);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_488,_489);this._doCatchBoomerang();},_editorDo:function(_48b){var c=this.info.cell;c&&c.editable&&c[_48b](this.info.rowIndex);},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_48d,_48e,_48f){if(this.grid.canEdit(_48e,_48f)){this.grid.doApplyCellEdit(_48d,_48f,_48e.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(_490,_491){var c=this.info.cell;if(this.isEditRow(_490)&&(!_491||c.view==_491)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_493,_494){var c=this.info.cell;if(this.isEditRow(_494)&&c.view==_493&&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(_496){this.grid=_496;this.selected=[];this.setMode(_496.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(_498){return this.grid.onCanSelect(_498);},onCanDeselect:function(_499){return this.grid.onCanDeselect(_499);},onSelected:function(_49a){},onDeselected:function(_49b){},onChanging:function(){},onChanged:function(){},isSelected:function(_49c){if(this.mode=="none"){return false;}return this.selected[_49c];},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(_49f){if(this.mode=="none"){return -1;}for(var i=_49f+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _4a2=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_4a2.push(i);}}return _4a2;},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(_4a7){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_4a7);this.addToSelection(_4a7);}else{this.toggleSelect(_4a7);}},addToSelection:function(_4a8){if(this.mode=="none"){return;}_4a8=Number(_4a8);if(this.selected[_4a8]){this.selectedIndex=_4a8;}else{if(this.onCanSelect(_4a8)!==false){this.selectedIndex=_4a8;this._beginUpdate();this.selected[_4a8]=true;this.onSelected(_4a8);this._endUpdate();}}},deselect:function(_4a9){if(this.mode=="none"){return;}_4a9=Number(_4a9);if(this.selectedIndex==_4a9){this.selectedIndex=-1;}if(this.selected[_4a9]){if(this.onCanDeselect(_4a9)===false){return;}this._beginUpdate();delete this.selected[_4a9];this.onDeselected(_4a9);this._endUpdate();}},setSelected:function(_4aa,_4ab){this[(_4ab?"addToSelection":"deselect")](_4aa);},toggleSelect:function(_4ac){this.setSelected(_4ac,!this.selected[_4ac]);},_range:function(_4ad,inTo,func){var s=(_4ad>=0?_4ad:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_4b3,inTo){this._range(_4b3,inTo,dojo.hitch(this,"addToSelection"));},deselectRange:function(_4b5,inTo){this._range(_4b5,inTo,dojo.hitch(this,"deselect"));},insert:function(_4b7){this.selected.splice(_4b7,0,false);if(this.selectedIndex>=_4b7){this.selectedIndex++;}},remove:function(_4b8){this.selected.splice(_4b8,1);if(this.selectedIndex>=_4b8){this.selectedIndex--;}},deselectAll:function(_4b9){for(var i in this.selected){if((i!=_4b9)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_4bb,_4bc,_4bd){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_4bb);}else{var _4be=this.selectedIndex;if(!_4bc){this.deselectAll(_4bb);}if(_4bd){this.selectRange(_4be,_4bb);}else{if(_4bc){this.toggleSelect(_4bb);}else{this.addToSelection(_4bb);}}}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(_4c3){var i=_4c3;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_4c3);this.edit.styleRow(_4c3);},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 _4c7=this.focus.getHeaderIndex();if(_4c7>=0){this.setSortIndex(_4c7);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}dojo.stopEvent(e);}if(!e.shiftKey){var _4c8=this.edit.isEditing();this.edit.apply();if(!_4c8){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _4c9=this.focus.focusView||this.views.views[0];_4c9.content.decorateEvent(e);this.onRowClick(e);}break;case dk.SPACE:if(!this.edit.isEditing()){var _4c7=this.focus.getHeaderIndex();if(_4c7>=0){this.setSortIndex(_4c7);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 _4ca=(e.keyCode==dk.LEFT_ARROW)?1:-1;if(dojo._isBodyLtr()){_4ca*=-1;}this.focus.move(0,_4ca);}break;case dk.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!=0){dojo.stopEvent(e);this.focus.move(-1,0);this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}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);this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}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);}this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}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);}this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}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(_4d7,_4d8){this.edit.cellFocus(_4d7,_4d8);},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(_4ea,_4eb){},onApplyCellEdit:function(_4ec,_4ed,_4ee){},onCancelEdit:function(_4ef){},onApplyEdit:function(_4f0){},onCanSelect:function(_4f1){return true;},onCanDeselect:function(_4f2){return true;},onSelected:function(_4f3){this.updateRowStyles(_4f3);},onDeselected:function(_4f4){this.updateRowStyles(_4f4);},onSelectionChanged:function(){}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_4f5,_4f6,_4f7){_4f7=dojo.i18n.normalizeLocale(_4f7);var _4f8=_4f7.split("-");var _4f9=[_4f5,"nls",_4f6].join(".");var _4fa=dojo._loadedModules[_4f9];if(_4fa){var _4fb;for(var i=_4f8.length;i>0;i--){var loc=_4f8.slice(0,i).join("_");if(_4fa[loc]){_4fb=_4fa[loc];break;}}if(!_4fb){_4fb=_4fa.ROOT;}if(_4fb){var _4fe=function(){};_4fe.prototype=_4fb;return new _4fe();}}throw new Error("Bundle not found: "+_4f6+" in "+_4f5+" , locale="+_4f7);};dojo.i18n.normalizeLocale=function(_4ff){var _500=_4ff?_4ff.toLowerCase():dojo.locale;if(_500=="root"){_500="ROOT";}return _500;};dojo.i18n._requireLocalization=function(_501,_502,_503,_504){var _505=dojo.i18n.normalizeLocale(_503);var _506=[_501,"nls",_502].join(".");var _507="";if(_504){var _508=_504.split(",");for(var i=0;i<_508.length;i++){if(_505["indexOf"](_508[i])==0){if(_508[i].length>_507.length){_507=_508[i];}}}if(!_507){_507="ROOT";}}var _50a=_504?_507:_505;var _50b=dojo._loadedModules[_506];var _50c=null;if(_50b){if(dojo.config.localizationComplete&&_50b._built){return;}var _50d=_50a.replace(/-/g,"_");var _50e=_506+"."+_50d;_50c=dojo._loadedModules[_50e];}if(!_50c){_50b=dojo["provide"](_506);var syms=dojo._getModuleSymbols(_501);var _510=syms.concat("nls").join("/");var _511;dojo.i18n._searchLocalePath(_50a,_504,function(loc){var _513=loc.replace(/-/g,"_");var _514=_506+"."+_513;var _515=false;if(!dojo._loadedModules[_514]){dojo["provide"](_514);var _516=[_510];if(loc!="ROOT"){_516.push(loc);}_516.push(_502);var _517=_516.join("/")+".js";_515=dojo._loadPath(_517,null,function(hash){var _519=function(){};_519.prototype=_511;_50b[_513]=new _519();for(var j in hash){_50b[_513][j]=hash[j];}});}else{_515=true;}if(_515&&_50b[_513]){_511=_50b[_513];}else{_50b[_513]=_511;}if(_504){return true;}});}if(_504&&_505!=_507){_50b[_505.replace(/-/g,"_")]=_50b[_507.replace(/-/g,"_")];}};(function(){var _51b=dojo.config.extraLocale;if(_51b){if(!_51b instanceof Array){_51b=[_51b];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_51f,_520){req(m,b,_51f,_520);if(_51f){return;}for(var i=0;i<_51b.length;i++){req(m,b,_51b[i],_520);}};}})();dojo.i18n._searchLocalePath=function(_522,down,_524){_522=dojo.i18n.normalizeLocale(_522);var _525=_522.split("-");var _526=[];for(var i=_525.length;i>0;i--){_526.push(_525.slice(0,i).join("-"));}_526.push(false);if(down){_526.reverse();}for(var j=_526.length-1;j>=0;j--){var loc=_526[j]||"ROOT";var stop=_524(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_52b,_52c){function _52d(_52e){_52e=dojo.i18n.normalizeLocale(_52e);dojo.i18n._searchLocalePath(_52e,true,function(loc){for(var i=0;i<_52c.length;i++){if(_52c[i]==loc){dojo["require"](_52b+"_"+loc);return true;}}return false;});};_52d();var _531=dojo.config.extraLocale||[];for(var i=0;i<_531.length;i++){_52d(_531[i]);}};}if(!dojo._hasResource["dojox.grid._Grid"]){dojo._hasResource["dojox.grid._Grid"]=true;dojo.provide("dojox.grid._Grid");(function(){var jobs={cancel:function(_534){if(_534){clearTimeout(_534);}},jobs:[],job:function(_535,_536,_537){jobs.cancelJob(_535);var job=function(){delete jobs.jobs[_535];_537();};jobs.jobs[_535]=setTimeout(job,_536);},cancelJob:function(_539){jobs.cancel(jobs.jobs[_539]);}};dojo.declare("dojox.grid._Grid",[dijit._Widget,dijit._Templated,dojox.grid._Events],{templateString:"<div class=\"dojoxGrid\" hidefocus=\"hidefocus\" role=\"wairole:grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" tabindex=\"-1\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\"></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(_53a){},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 _53b=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_53b);this.errorMessage=dojo.string.substitute(this.errorMessage,_53b);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,_53e){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);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&&!_53e){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(_540,idx){var c=dojo.getObject(_540);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(_546){var s=_546;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(_548){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.attr('structure', obj) instead.","2.0");this._setStructureAttr(_548);},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(_54c){if(self.layout.setColumnVisibility(this._gridCell.index,_54c)){var _54d=this._gridCell.menuItems;if(_54d.length>1){dojo.forEach(_54d,function(item){if(item!==this){item.setAttribute("checked",_54c);}},this);}var _54c=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(_54c.length==1){dojo.forEach(_54c[0].menuItems,"item.attr('disabled', true);");}}},destroy:function(){var _550=dojo.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_550,1);delete this._gridCell;dijit.CheckedMenuItem.prototype.destroy.apply(this,arguments);}});cell.menuItems.push(item);return item;},this);},_setHeaderMenuAttr:function(menu){if(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(_555){this.setScrollTop(0);},getItem:function(_556){return null;},showMessage:function(_557){if(_557){this.messagesNode.innerHTML=_557;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(_558,_559){this._resize(_558,_559);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(_55c,_55d){var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _55f=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<=_55f.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(_55d){_55c=_55d;}if(_55c){dojo.marginBox(this.domNode,_55c);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(_564){var t=_564||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 _567=0,_568=0;var _569=dojo.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_567++;}else{_568++;}return (!has);});if(_567>0&&_568>0){dojo.forEach(_569,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(_56e,_56f){this.views.renderRow(_56e,_56f);},rowRemoved:function(_570){this.views.rowRemoved(_570);},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 _573=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(_573);this.postrender();},update:function(){this.render();},updateRow:function(_574){_574=Number(_574);if(this.updating){this.invalidated[_574]=true;}else{this.views.updateRow(_574);this.scroller.rowHeightChanged(_574);}},updateRows:function(_575,_576){_575=Number(_575);_576=Number(_576);if(this.updating){for(var i=0;i<_576;i++){this.invalidated[i+_575]=true;}}else{for(var i=0;i<_576;i++){this.views.updateRow(i+_575);}this.scroller.rowHeightChanged(_575);}},updateRowCount:function(_578){if(this.updating){this.invalidated.rowCount=_578;}else{this.rowCount=_578;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_578);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_579){this.views.updateRowStyles(_579);},rowHeightChanged:function(_57a){this.views.renormalizeRow(_57a);this.scroller.rowHeightChanged(_57a);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(dojo.isIE?100:50),scrollTo:function(_57b){if(!this.fastScroll){this.setScrollTop(_57b);return;}var _57c=Math.abs(this.lastScrollTop-_57b);this.lastScrollTop=_57b;if(_57c>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_57b;this.views.setScrollTop(_57b);jobs.job("dojoxGridScroll",200,dojo.hitch(this,"finishScrollJob"));}else{this.setScrollTop(_57b);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_57d){this.scroller.scroll(this.views.setScrollTop(_57d));},scrollToRow:function(_57e){this.setScrollTop(this.scroller.findScrollTop(_57e)+1);},styleRowNode:function(_57f,_580){if(_580){this.rows.styleRowNode(_57f,_580);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_582){return this.layout.cells[_582];},setCellWidth:function(_583,_584){this.getCell(_583).unitWidth=_584;},getCellName:function(_585){return "Cell "+_585.index;},canSort:function(_586){},sort:function(){},getSortAsc:function(_587){_587=_587==undefined?this.sortInfo:_587;return Boolean(_587>0);},getSortIndex:function(_588){_588=_588==undefined?this.sortInfo:_588;return Math.abs(_588)-1;},setSortIndex:function(_589,_58a){var si=_589+1;if(_58a!=undefined){si*=(_58a?1:-1);}else{if(this.getSortIndex()==_589){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_58c){if(this.canSort(_58c)){this.sortInfo=_58c;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(_59a,_59b){this.onStartEdit(_59a,_59b);},doApplyCellEdit:function(_59c,_59d,_59e){this.onApplyCellEdit(_59c,_59d,_59e);},doCancelEdit:function(_59f){this.onCancelEdit(_59f);},doApplyEdit:function(_5a0){this.onApplyEdit(_5a0);},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(_5a1,node,ctor,_5a4){var d=dojo;var _5a6=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(!_5a1.structure&&node.nodeName.toLowerCase()=="table"){_5a1.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=_5a6(cg);}return v;});if(!_5a1.structure.length){_5a1.structure.push({__span:Infinity,cells:[]});}d.query("thead > tr",node).forEach(function(tr,_5ad){var _5ae=0;var _5af=0;var _5b0;var _5b1=null;d.query("> th",tr).map(function(th){if(!_5b1){_5b0=0;_5b1=_5a1.structure[0];}else{if(_5ae>=(_5b0+_5b1.__span)){_5af++;_5b0+=_5b1.__span;var _5b3=_5b1;_5b1=_5a1.structure[_5af];}}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")||"")};_5ae+=cell.colSpan;var _5b5=d.attr(th,"rowspan");if(_5b5){cell.rowSpan=_5b5;}if(d.hasAttr(th,"width")){cell.width=_5a6(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(_5a4){_5a4(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(!_5b1.cells[_5ad]){_5b1.cells[_5ad]=[];}_5b1.cells[_5ad].push(cell);});});}return new ctor(_5a1,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(_5b7){var _5b8=this.grid.getItemIndex(_5b7);var idx=dojox.grid.Selection.prototype.getNextSelected.call(this,_5b8);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _5ba=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_5ba.push(this.grid.getItem(i));}}return _5ba;},addToSelection:function(_5bd){if(this.mode=="none"){return;}var idx=null;if(typeof _5bd=="number"||typeof _5bd=="string"){idx=_5bd;}else{idx=this.grid.getItemIndex(_5bd);}dojox.grid.Selection.prototype.addToSelection.call(this,idx);},deselect:function(_5bf){if(this.mode=="none"){return;}var idx=null;if(typeof _5bf=="number"||typeof _5bf=="string"){idx=_5bf;}else{idx=this.grid.getItemIndex(_5bf);}dojox.grid.Selection.prototype.deselect.call(this,idx);},deselectAll:function(_5c1){var idx=null;if(_5c1||typeof _5c1=="number"){if(typeof _5c1=="number"||typeof _5c1=="string"){idx=_5c1;}else{idx=this.grid.getItemIndex(_5c1);}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(_5c3,_5c4){return (!_5c4?this.defaultValue:(!this.field?this.value:this.grid.store.getValue(_5c4,this.field)));},_onSet:function(item,_5c6,_5c7,_5c8){var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_addItem:function(item,_5cb,_5cc){var idty=this._hasIdentity?this.store.getIdentity(item):dojo.toJson(this.query)+":idx:"+_5cb+":sort:"+dojo.toJson(this.getSortProps());var o={idty:idty,item:item};this._by_idty[idty]=this._by_idx[_5cb]=o;if(!_5cc){this.updateRow(_5cb);}},_onNew:function(item,_5d0){var _5d1=this.attr("rowCount");this._addingItem=true;this.updateRowCount(_5d1+1);this._addingItem=false;this._addItem(item,_5d1);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(_5d5,_5d6,_5d7){this._setQuery(_5d6,_5d7);this._setStore(_5d5);this._refresh(true);},setQuery:function(_5d8,_5d9){this._setQuery(_5d8,_5d9);this._refresh(true);},setItems:function(_5da){this.items=_5da;this._setStore(this.store);this._refresh(true);},_setQuery:function(_5db,_5dc){this.query=_5db;this.queryOptions=_5dc||this.queryOptions;},_setStore:function(_5dd){if(this.store&&this._store_connects){dojo.forEach(this._store_connects,function(arr){dojo.forEach(arr,dojo.disconnect);});}this.store=_5dd;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(_5e3,req){if(_5e3&&_5e3.length>0){dojo.forEach(_5e3,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_5e3.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(!_5e3||!_5e3.length){this.showMessage(this.noDataMessage);}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(_5eb,_5ec){var _5eb=_5eb||0;if(this.store&&!this._pending_requests[_5eb]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_5eb]=true;try{if(this.items){var _5ed=this.items;var _5ee=this.store;this.rowsPerPage=_5ed.length;var req={start:_5eb,count:this.rowsPerPage,isRender:_5ec};this._onFetchBegin(_5ed.length,req);var _5f0=0;dojo.forEach(_5ed,function(i){if(!_5ee.isItemLoaded(i)){_5f0++;}});if(_5f0===0){this._onFetchComplete(_5ed,req);}else{var _5f2=function(item){_5f0--;if(_5f0===0){this._onFetchComplete(_5ed,req);}};dojo.forEach(_5ed,function(i){if(!_5ee.isItemLoaded(i)){_5ee.loadItem({item:i,onItem:_5f2,scope:this});}},this);}}else{this.store.fetch({start:_5eb,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_5ec,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,_5f9){if(!_5f9&&!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(_5fe,_5ff){this.query=_5fe;if(_5ff){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(_603){return this._pending_requests[_603];},_rowToPage:function(_604){return (this.rowsPerPage?Math.floor(_604/this.rowsPerPage):_604);},_pageToRow:function(_605){return (this.rowsPerPage?this.rowsPerPage*_605:_605);},_preparePage:function(_606){if((_606<this._bop||_606>=this._eop)&&!this._addingItem){var _607=this._rowToPage(_606);this._needPage(_607);this._bop=_607*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.attr("rowCount"));}},_needPage:function(_608){if(!this._pages[_608]){this._pages[_608]=true;this._requestPage(_608);}},_requestPage:function(_609){var row=this._pageToRow(_609);var _60b=Math.min(this.rowsPerPage,this.attr("rowCount")-row);if(_60b>0){this._requests++;if(!this._requestsPending(row)){setTimeout(dojo.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_60c){return _60c.field;},_refresh:function(_60d){this._clearData();this._fetch(0,_60d);},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(_611){if(this.store&&this.store.getState){var _612=this.store.getState(_611.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_612[s]){c=" dojoxGridRow-"+s;break;}}_611.customClasses+=c;}},onStyleRow:function(_617){this.styleRowState(_617);this.inherited(arguments);},canEdit:function(_618,_619){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _61d={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_61f,_620){if(!this._cache[_620]){this._cache[_620]=this._copyAttr(_620,_61f.field);}this.onStartEdit(_61f,_620);},doApplyCellEdit:function(_621,_622,_623){this.store.fetchItemByIdentity({identity:this._by_idx[_622].idty,onItem:dojo.hitch(this,function(item){var _625=this.store.getValue(item,_623);if(typeof _625=="number"){_621=isNaN(_621)?_621:parseFloat(_621);}else{if(typeof _625=="boolean"){_621=_621=="true"?true:_621=="false"?false:_621;}else{if(_625 instanceof Date){var _626=new Date(_621);_621=isNaN(_626.getTime())?_621:_626;}}}this.store.setValue(item,_623,_621);this.onApplyCellEdit(_621,_622,_623);})});},doCancelEdit:function(_627){var _628=this._cache[_627];if(_628){this.updateRow(_627);delete this._cache[_627];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_629,_62a){var _62b=this._cache[_629];this.onApplyEdit(_629);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var _62c=this.selection.getSelected();if(_62c.length){dojo.forEach(_62c,this.store.deleteItem,this.store);this.selection.clear();}}}});dojox.grid.DataGrid.markupFactory=function(_62d,node,ctor,_630){return dojox.grid._Grid.markupFactory(_62d,node,ctor,function(node,_632){var _633=dojo.trim(dojo.attr(node,"field")||"");if(_633){_632.field=_633;}_632.field=_632.field||_632.name;if(_630){_630(node,_632);}});};}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"]);
