/*
	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){_37.focus();}},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,_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=d.trim(d.attr(node,"sortDesc")||"");if(_148){_144.sortDesc=!(_148.toLowerCase()=="false");}var _149=d.trim(d.attr(node,"loadingText")||d.attr(node,"defaultValue")||"");if(_149){_144.defaultValue=_149;}var _14a=d.trim(d.attr(node,"editable")||"");if(_14a){_144.editable=!(_14a.toLowerCase()=="false");}var _14b=d.trim(d.attr(node,"alwaysEditing")||"");if(_14b){_144.alwaysEditing=!(_14b.toLowerCase()=="false");}var _14c=d.trim(d.attr(node,"styles")||"");if(_14c){_144.styles=_14c;}var _14d=d.trim(d.attr(node,"classes")||"");if(_14d){_144.classes=_14d;}};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;};}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 _192=n.scrollLeft,_193=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_192!=n.scrollLeft||_193!=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,_199=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),_199];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,_1a8){this.node=dojo.byId(node);if(!_1a8){_1a8={};}this.handle=_1a8.handle?dojo.byId(_1a8.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_1a8.delay>0?_1a8.delay:0;this.skip=_1a8.skip;this.mover=_1a8.mover?_1a8.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(_1a9,node){return new dojo.dnd.Moveable(node,_1a9);},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(_1b1){dojo.publish("/dnd/move/start",[_1b1]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_1b2){dojo.publish("/dnd/move/stop",[_1b2]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_1b3){},onMove:function(_1b4,_1b5){this.onMoving(_1b4,_1b5);var s=_1b4.node.style;s.left=_1b5.l+"px";s.top=_1b5.t+"px";this.onMoved(_1b4,_1b5);},onMoving:function(_1b7,_1b8){},onMoved:function(_1b9,_1ba){}});}if(!dojo._hasResource["dojox.grid._Builder"]){dojo._hasResource["dojox.grid._Builder"]=true;dojo.provide("dojox.grid._Builder");(function(){var dg=dojox.grid;var _1bc=function(td){return td.cellIndex>=0?td.cellIndex:dojo.indexOf(td.parentNode.cells,td);};var _1be=function(tr){return tr.rowIndex>=0?tr.rowIndex:dojo.indexOf(tr.parentNode.childNodes,tr);};var _1c0=function(_1c1,_1c2){return _1c1&&((_1c1.rows||0)[_1c2]||_1c1.childNodes[_1c2]);};var _1c3=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _1c6=function(_1c7,_1c8){for(var n=_1c7;n&&_1c8(n);n=n.parentNode){}return n;};var _1ca=function(_1cb){var name=_1cb.toUpperCase();return function(node){return node.tagName!=name;};};var _1ce=dojox.grid.util.rowIndexTag;var _1cf=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(_1d2,_1d3,_1d4,_1d5){var _1d6=[],html;if(_1d5){html=["<th tabIndex=\"-1\" role=\"wairole:columnheader\""];}else{html=["<td tabIndex=\"-1\" role=\"wairole:gridcell\""];}_1d2.colSpan&&html.push(" colspan=\"",_1d2.colSpan,"\"");_1d2.rowSpan&&html.push(" rowspan=\"",_1d2.rowSpan,"\"");html.push(" class=\"dojoxGridCell ");_1d2.classes&&html.push(_1d2.classes," ");_1d4&&html.push(_1d4," ");_1d6.push(html.join(""));_1d6.push("");html=["\" idx=\"",_1d2.index,"\" style=\""];if(_1d3&&_1d3[_1d3.length-1]!=";"){_1d3+=";";}html.push(_1d2.styles,_1d3||"",_1d2.hidden?"display:none;":"");_1d2.unitWidth&&html.push("width:",_1d2.unitWidth,";");_1d6.push(html.join(""));_1d6.push("");html=["\""];_1d2.attrs&&html.push(" ",_1d2.attrs);html.push(">");_1d6.push(html.join(""));_1d6.push("");_1d6.push("</td>");return _1d6;},isCellNode:function(_1d8){return Boolean(_1d8&&_1d8!=dojo.doc&&dojo.attr(_1d8,"idx"));},getCellNodeIndex:function(_1d9){return _1d9?Number(dojo.attr(_1d9,"idx")):-1;},getCellNode:function(_1da,_1db){for(var i=0,row;row=_1c0(_1da.firstChild,i);i++){for(var j=0,cell;cell=row.cells[j];j++){if(this.getCellNodeIndex(cell)==_1db){return cell;}}}},findCellTarget:function(_1e0,_1e1){var n=_1e0;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_1cf in n.offsetParent.parentNode&&n.offsetParent.parentNode[_1cf]!=this.view.id))&&(n!=_1e1)){n=n.parentNode;}return n!=_1e1?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(_1e4,_1e5){var n=_1e4;while(n&&(n!=this.domNode)&&(!(_1e5 in n)||(_1cf in n&&n[_1cf]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_1e7){return this.findTarget(_1e7,_1ce);},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 _1f0=this.grid.get,_1f1=this.view.structure.cells;for(var j=0,row;(row=_1f1[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_1f0;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);}}},generateHtml:function(_1f6,_1f7){var html=this.getTableArray(),v=this.view,_1fa=v.structure.cells,item=this.grid.getItem(_1f7);dojox.grid.util.fire(this.view,"onBeforeRow",[_1f7,_1fa]);for(var j=0,row;(row=_1fa[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(_1f7,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[_1ce];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(_205,_206){var html=this.getTableArray(),_208=this.view.structure.cells;dojox.grid.util.fire(this.view,"onBeforeRow",[-1,_208]);for(var j=0,row;(row=_208[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_20d;(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+"'";}}_20d=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_20d[5]=(_206!=undefined?_206:_205(cell));_20d[3]=cell.customStyles.join(";");_20d[1]=cell.customClasses.join(" ");html.push(_20d.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var x=e.layerX;if(dojo.isMoz){var n=_1c6(e.target,_1ca("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!dojo._isBodyLtr()&&e.sourceView.headerNode.scrollLeft<t){x-=t;}}var n=_1c6(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=_1bc(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 _222=[],_223=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_223[i]);i++){_222.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=dojo._isBodyLtr()?1:-1;var _228=e.grid.views.views;var _229=[];for(var i=view.idx+adj,_22a;(_22a=_228[i]);i=i+adj){_229.push({node:_22a.headerNode,left:window.parseInt(_22a.headerNode.style.left)});}var _22b=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:_22b,tw:dojo.contentBox(_22b).w,spanners:_222,followers:_229};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(_22d,_22e,_22f){var _230=dojo._isBodyLtr();var _231=_230?_22f.l:-_22f.l;var w=_22d.w+_231;var vw=_22d.vw+_231;var tw=_22d.tw+_231;if(w>=this.minColWidth){for(var i=0,s,sw;(s=_22d.spanners[i]);i++){sw=s.width+_231;s.node.style.width=sw+"px";_22d.view.setColWidth(s.index,sw);}for(var i=0,f,fl;(f=_22d.followers[i]);i++){fl=f.left+_231;f.node.style.left=fl+"px";}_22d.node.style.width=w+"px";_22d.view.setColWidth(_22d.index,w);_22d.view.headerNode.style.width=vw+"px";_22d.view.setColumnsWidth(tw);if(!_230){_22d.view.headerNode.scrollLeft=_22d.scrollLeft+_231;}}if(_22d.view.flexCells&&!_22d.view.testFlexCells()){var t=_1c3(_22d.node);t&&(t.style.width="");}},endResizeColumn:function(_23b){dojo.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;var conn=dojo.connect(_23b.view,"update",this,function(){dojo.disconnect(conn);this._skipBogusClicks=false;});setTimeout(dojo.hitch(_23b.view,"update"),50);}});dg._TableMap=dojo.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_23e){var _23f=_23e.length;if(!_23f){return;}this.map=[];for(var j=0,row;(row=_23e[j]);j++){this.map[j]=[];}for(var j=0,row;(row=_23e[j]);j++){for(var i=0,x=0,cell,_245,_246;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_246=cell.rowSpan||1;_245=cell.colSpan||1;for(var y=0;y<_246;y++){for(var s=0;s<_245;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_245;}}},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(_24e,_24f){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_24f&&cell.r==_24e){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_254,_255,_256){var row=_254&&_254.rows[_255];return row&&row.cells[_256];},_findOverlappingNodes:function(_258,_259,_25a){var _25b=[];var m=this.getMapCoords(_259,_25a);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(_258,rw.r,rw.c):null);if(n){_25b.push(n);}}return _25b;},findOverlappingNodes:function(_261){return this._findOverlappingNodes(_1c3(_261),_1be(_261.parentNode),_1bc(_261));}});})();}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,_263){this.node=dojo.byId(node);if(!_263){_263={};}this.creator=_263.creator||null;this.skipForm=_263.skipForm;this.parent=_263.dropParent&&dojo.byId(_263.dropParent);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_263&&_263._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,_273,_274){if(!this.parent.firstChild){_274=null;}else{if(_273){if(!_274){_274=this.parent.firstChild;}}else{if(_274){_274=_274.nextSibling;}}}if(_274){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,_274);}}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(_277,node){_277._skipStartup=true;return new dojo.dnd.Container(node,_277);},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,_280){var _281="dojoDnd"+type;var _282=type.toLowerCase()+"State";dojo.removeClass(this.node,_281+this[_282]);dojo.addClass(this.node,_281+_280);this[_282]=_280;},_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 _289=node.parentNode;_289;node=_289,_289=node.parentNode){if(_289==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 _297=item&&dojo.isObject(item),data,type,n;if(_297&&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=(_297&&item.data)?item.data:item;type=(_297&&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,_29c){if(!_29c){_29c={};}this.singular=_29c.singular;this.autoSync=_29c.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(_2ae,data,_2b0,_2b1){var _2b2=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_2b2.call(this,item,hint);if(_2ae){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,_2b0,_2b1);this._normalizedCreator=_2b2;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_2b6,node){_2b6._skipStartup=true;return new dojo.dnd.Selector(node,_2b6);},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;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(_2c1){this.manager=_2c1;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,_2c8=this.manager.source,node;dojo.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_2c8.creator){node=_2c8._normalizedCreator(_2c8.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _2ca=dojo.create("table"),_2cb=dojo.create("tbody",null,_2ca);_2cb.appendChild(node);node=_2ca;}}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(_2cd){if(this.avatar){this.target=(_2cd&&_2cd.targetState!="Disabled")?_2cd:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}dojo.publish("/dnd/source/over",[_2cd]);},outSource:function(_2ce){if(this.avatar){if(this.target==_2ce){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_2cf,_2d0,copy){this.source=_2cf;this.nodes=_2d0;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_2cf,_2d0,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 _2d4=Boolean(this.target&&flag);if(this.canDropFlag!=_2d4){this.canDropFlag=_2d4;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&&(!("mouseButton" in this.source)||(dojo.isWebKit&&dojo.dnd._isMac&&this.source.mouseButton==2?e.button==0:this.source.mouseButton==e.button))){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e))),_2db=[this.source,this.nodes,copy,this.target];dojo.publish("/dnd/drop/before",_2db);dojo.publish("/dnd/drop",_2db);}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,_2e2){dojo.mixin(this,dojo.mixin({},_2e2));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(_2e5,_2e6){if(this==_2e5){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_2e6.length;++i){var type=_2e5.getItem(_2e6[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(_2eb,self){if(_2eb){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(_2ed,node){_2ed._skipStartup=true;return new dojo.dnd.Source(node,_2ed);},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 _2f1=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){_2f1=(e.pageX-this.targetBox.xy.x)<(this.targetBox.w/2);}else{_2f1=(e.pageY-this.targetBox.xy.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_2f1!=this.before){this._markTargetAnchor(_2f1);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 _2f2=this.getSelectedNodes();if(_2f2.length){m.startDrag(this,_2f2,this.copyState(dojo.dnd.getCopyKeyState(e),true));}}}},onMouseDown:function(e){if(this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){this.mouseDown=true;this.mouseButton=e.button;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(_2f5){if(this!=_2f5){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(_2f7,_2f8,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_2f7?(copy?"Copied":"Moved"):"");}var _2fa=this.accept&&this.checkAcceptance(_2f7,_2f8);this._changeState("Target",_2fa?"":"Disabled");if(this==_2f7){dojo.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_2fb,_2fc,copy,_2fe){if(this==_2fe){this.onDrop(_2fb,_2fc,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;delete this.mouseButton;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_2ff,_300,copy){if(this!=_2ff){this.onDropExternal(_2ff,_300,copy);}else{this.onDropInternal(_300,copy);}},onDropExternal:function(_302,_303,copy){var _305=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _305.call(this,_302.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_302.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=_302.getItem(node.id);_302.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_302.selectNone();}this.insertNodes(true,_303,this.before,this.current);if(!copy&&this.creator){_302.deleteSelectedNodes();}this._normalizedCreator=_305;},onDropInternal:function(_30f,copy){var _311=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _311.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,_30f,this.before,this.current);this._normalizedCreator=_311;},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(_31b){if(this.current==this.targetAnchor&&this.before==_31b){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_31b;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(!this.withHandles){return true;}for(var node=e.target;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,_320){this.isSource=false;dojo.removeClass(this.node,"dojoDndSource");},markupFactory:function(_321,node){_321._skipStartup=true;return new dojo.dnd.Target(node,_321);}});dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(node,_324){this.autoSync=true;},markupFactory:function(_325,node){_325._skipStartup=true;return new dojo.dnd.AutoSource(node,_325);}});}if(!dojo._hasResource["dojox.grid._View"]){dojo._hasResource["dojox.grid._View"]=true;dojo.provide("dojox.grid._View");(function(){var _327=function(_328,_329){return _328.style.cssText==undefined?_328.getAttribute("style"):_328.style.cssText;};dojo.declare("dojox.grid._View",[dijit._Widget,dijit._Templated],{defaultWidth:"18em",viewWidth:"",templateString:"<div class=\"dojoxGridView\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\"></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\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\"></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(_32a){var vs=(this.structure=_32a);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 _330=this.hasVScrollbar();var _331=dojo.style(this.scrollboxNode,"overflow");if(this.noscroll||!_331||_331=="hidden"){_330=false;}else{if(_331=="scroll"){_330=true;}}return (_330?dojox.html.metrics.getScrollbar().w:0);},getColumnsWidth:function(){return this.headerContentNode.firstChild.offsetWidth;},setColumnsWidth:function(_332){this.headerContentNode.firstChild.style.width=_332+"px";if(this.viewWidth){this.viewWidth=_332+"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 _333=this.grid.layout.cells;var _334=dojo.hitch(this,function(node,_336){var inc=_336?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_333[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_333[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(_33b){var src=this.source;if(src.current==src.targetAnchor&&src.before==_33b){return;}if(src.targetAnchor&&_334(src.targetAnchor,src.before)){src._removeItemClass(_334(src.targetAnchor,src.before),src.before?"After":"Before");}dojo.dnd.Source.prototype._markTargetAnchor.call(src,_33b);if(src.targetAnchor&&_334(src.targetAnchor,src.before)){src._addItemClass(_334(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:dojo.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_334(src.targetAnchor,src.before)){src._removeItemClass(_334(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(_33e,_33f,copy){if(dojo.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _341=this.grid.views.views;var _342=_341[_33e.viewIndex];var _343=_341[this.index];if(_343!=_342){var s=_342.convertColPctToFixed();var t=_343.convertColPctToFixed();if(s||t){setTimeout(function(){_342.update();_343.update();},50);}}},_onDndDrop:function(_346,_347,copy){if(dojo.dnd.manager().target!==this.source){if(dojo.dnd.manager().source===this.source){this._removingColumn=true;}return;}var _349=function(n){return n?dojo.attr(n,"idx"):null;};var w=dojo.marginBox(_347[0]).w;if(_346.viewIndex!==this.index){var _34c=this.grid.views.views;var _34d=_34c[_346.viewIndex];var _34e=_34c[this.index];if(_34d.viewWidth&&_34d.viewWidth!="auto"){_34d.setColumnsWidth(_34d.getColumnsWidth()-w);}if(_34e.viewWidth&&_34e.viewWidth!="auto"){_34e.setColumnsWidth(_34e.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;var _351=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;window.setTimeout(function(){_351.moveColumn(_346.viewIndex,idx,_349(_347[0]),_349(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(_353){var n=_353.name||_353.grid.getCellName(_353);var ret=["<div class=\"dojoxGridSortNode"];if(_353.index!=_353.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_353.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_353.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\"></div>"]);}ret=ret.concat([n,"</div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_356){if(this._hasHScroll==undefined||_356){if(this.noscroll){this._hasHScroll=false;}else{var _357=dojo.style(this.scrollboxNode,"overflow");if(_357=="hidden"){this._hasHScroll=false;}else{if(_357=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth<this.contentNode.offsetWidth);}}}}return this._hasHScroll;},hasVScrollbar:function(_358){if(this._hasVScroll==undefined||_358){if(this.noscroll){this._hasVScroll=false;}else{var _359=dojo.style(this.scrollboxNode,"overflow");if(_359=="hidden"){this._hasVScroll=false;}else{if(_359=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.offsetHeight<this.contentNode.offsetHeight);}}}}return this._hasVScroll;},convertColPctToFixed:function(){var _35a=false;var _35b=dojo.query("th",this.headerContentNode);var _35c=dojo.map(_35b,function(c){var w=c.style.width;if(w&&w.slice(-1)=="%"){_35a=true;return dojo.contentBox(c).w;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return -1;});if(_35a){dojo.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var vIdx=cell.layoutIndex;this.setColWidth(idx,_35c[vIdx]);_35b[vIdx].style.width=cell.unitWidth;}},this);return true;}return false;},adaptHeight:function(_362){if(!this.grid._autoHeight){var h=this.domNode.clientHeight;if(_362){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(_36a){var _36b=this.createRowNode(_36a);this.buildRow(_36a,_36b);this.grid.edit.restore(this,_36a);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 _36b;},createRowNode:function(_36c){var node=document.createElement("div");node.className=this.classTag+"Row";node[dojox.grid.util.gridViewTag]=this.id;node[dojox.grid.util.rowIndexTag]=_36c;this.rowNodes[_36c]=node;return node;},buildRow:function(_36e,_36f){this.buildRowContent(_36e,_36f);this.styleRow(_36e,_36f);},buildRowContent:function(_370,_371){_371.innerHTML=this.content.generateHtml(_370,_370);if(this.flexCells&&this.contentWidth){_371.firstChild.style.width=this.contentWidth;}dojox.grid.util.fire(this,"onAfterRow",[_370,this.structure.cells,_371]);},rowRemoved:function(_372){this.grid.edit.save(this,_372);delete this.rowNodes[_372];},getRowNode:function(_373){return this.rowNodes[_373];},getCellNode:function(_374,_375){var row=this.getRowNode(_374);if(row){return this.content.getCellNode(row,_375);}},getHeaderCellNode:function(_377){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_377);}},styleRow:function(_378,_379){_379._style=_327(_379);this.styleRowNode(_378,_379);},styleRowNode:function(_37a,_37b){if(_37b){this.doStyleRowNode(_37a,_37b);}},doStyleRowNode:function(_37c,_37d){this.grid.styleRowNode(_37c,_37d);},updateRow:function(_37e){var _37f=this.getRowNode(_37e);if(_37f){_37f.style.height="";this.buildRow(_37e,_37f);}return _37f;},updateRowStyles:function(_380){this.styleRowNode(_380,this.getRowNode(_380));},lastTop:0,firstScroll:0,doscroll:function(_381){var _382=dojo._isBodyLtr();if(this.firstScroll<2){if((!_382&&this.firstScroll==1)||(_382&&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=_382?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(_385){this.lastTop=_385;this.scrollboxNode.scrollTop=_385;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(_38a,_38b){this.grid.setCellWidth(_38a,_38b+"px");},update:function(){var left=this.scrollboxNode.scrollLeft;this.content.update();this.grid.update();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 _393=this.manager.source,node;if(_393.creator){node=_393._normailzedCreator(_393.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _395=dd.createElement("table"),_396=dd.createElement("tbody");_396.appendChild(node);_395.appendChild(_396);node=_395;}else{if(node.tagName.toLowerCase()=="th"){var _395=dd.createElement("table"),_396=dd.createElement("tbody"),r=dd.createElement("tr");_395.cellPadding=_395.cellSpacing="0";r.appendChild(node);_396.appendChild(r);_395.appendChild(_396);node=_395;}}}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 _399=dojo.dnd.manager().makeAvatar;dojo.dnd.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined){return new dojox.grid._GridAvatar(this);}return _399.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(_39b,_39c){var w=this.contentNode.offsetWidth-this.padBorderWidth;_39c.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"wairole:presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){},doStyleRowNode:function(_39e,_39f){var n=["dojoxGridRowbar"];if(this.grid.rows.isOver(_39e)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_39e)){n.push("dojoxGridRowbarSelected");}_39f.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(_3a3){this.grid=_3a3;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_3a4,_3a5,_3a6,_3a7,_3a8){var _3a9=this.structure[_3a4].cells[0];var _3aa=this.structure[_3a5].cells[0];var cell=null;var _3ac=0;var _3ad=0;for(var i=0,c;c=_3a9[i];i++){if(c.index==_3a6){_3ac=i;break;}}cell=_3a9.splice(_3ac,1)[0];cell.view=this.grid.views.views[_3a5];for(i=0,c=null;c=_3aa[i];i++){if(c.index==_3a7){_3ad=i;break;}}if(!_3a8){_3ad+=1;}_3aa.splice(_3ad,0,cell);var _3b0=this.grid.getCell(this.grid.getSortIndex());if(_3b0){_3b0._currentlySorted=this.grid.getSortAsc();}this.cells=[];var _3a6=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=_3a6;this.cells.push(c);if("_currentlySorted" in c){var si=_3a6+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_3a6++;}}}this.grid.setupHeaderMenu();},setColumnVisibility:function(_3b6,_3b7){var cell=this.cells[_3b6];if(cell.hidden==_3b7){cell.hidden=!_3b7;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(_3bb,_3bc,_3bd){var self=this;var _3bf=function(_3c0){var w=0;if(_3c0.colSpan>1){w=0;}else{w=_3c0.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _3c2={grid:this.grid,subrow:_3bb,layoutIndex:_3bc,index:this.cells.length};if(_3bd&&_3bd instanceof dojox.grid.cells._Base){var _3c3=dojo.clone(_3bd);_3c2.unitWidth=_3bf(_3c3._props);_3c3=dojo.mixin(_3c3,this._defaultCellProps,_3bd._props,_3c2);return _3c3;}var _3c4=_3bd.type||this._defaultCellProps.type||dojox.grid.cells.Cell;_3c2.unitWidth=_3bf(_3bd);return new _3c4(dojo.mixin({},this._defaultCellProps,_3bd,_3c2));},addRowDef:function(_3c5,_3c6){var _3c7=[];var _3c8=0,_3c9=0,_3ca=true;for(var i=0,def,cell;(def=_3c6[i]);i++){cell=this.addCellDef(_3c5,i,def);_3c7.push(cell);this.cells.push(cell);if(_3ca&&cell.relWidth){_3c8+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_3c9+=window.parseInt(w,10);}else{if(w=="auto"){_3ca=false;}}}}}if(_3c8&&_3ca){dojo.forEach(_3c7,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_3c8)*(100-_3c9))+"%";}});}return _3c7;},addRowsDef:function(_3d0){var _3d1=[];if(dojo.isArray(_3d0)){if(dojo.isArray(_3d0[0])){for(var i=0,row;_3d0&&(row=_3d0[i]);i++){_3d1.push(this.addRowDef(i,row));}}else{_3d1.push(this.addRowDef(0,_3d0));}}return _3d1;},addViewDef:function(_3d4){this._defaultCellProps=_3d4.defaultCell||{};if(_3d4.width&&_3d4.width=="auto"){delete _3d4.width;}return dojo.mixin({},_3d4,{cells:this.addRowsDef(_3d4.rows||_3d4.cells)});},setStructure:function(_3d5){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 _3d8=this.grid.rowSelector;if(_3d8=="false"){sel=null;}else{if(_3d8!="true"){sel["width"]=_3d8;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _3d9=function(def){return ("name" in def||"field" in def||"get" in def);};var _3db=function(def){if(dojo.isArray(def)){if(dojo.isArray(def[0])||_3d9(def[0])){return true;}}return false;};var _3dd=function(def){return (def!=null&&dojo.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_3d9(def))));};if(dojo.isArray(_3d5)){var _3df=false;for(var i=0,st;(st=_3d5[i]);i++){if(_3dd(st)){_3df=true;break;}}if(!_3df){s.push(this.addViewDef({cells:_3d5}));}else{for(var i=0,st;(st=_3d5[i]);i++){if(_3db(st)){s.push(this.addViewDef({cells:st}));}else{if(_3dd(st)){s.push(this.addViewDef(st));}}}}}else{if(_3dd(_3d5)){s.push(this.addViewDef(_3d5));}}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(_3e2){this.grid=_3e2;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_3e3){_3e3.idx=this.views.length;this.views.push(_3e3);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _3e6=[];for(var i=0,v;v=this.views[i];i++){_3e6.push(v.contentNode);}return _3e6;},forEach:function(_3e9){for(var i=0,v;v=this.views[i];i++){_3e9(v,i);}},onEach:function(_3ec,_3ed){_3ed=_3ed||[];for(var i=0,v;v=this.views[i];i++){if(_3ec in v){v[_3ec].apply(v,_3ed);}}},normalizeHeaderNodeHeight:function(){var _3f0=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_3f0.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_3f0);},normalizeRowNodeHeights:function(_3f3){var h=0;for(var i=0,n,o;(n=_3f3[i]);i++){h=Math.max(h,dojo.marginBox(n.firstChild).h);}h=(h>=0?h:0);for(var i=0,n;(n=_3f3[i]);i++){dojo.marginBox(n.firstChild,{h:h});}if(_3f3&&_3f3[0]&&_3f3[0].parentNode){_3f3[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(_3fb){var _3fc=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_3fb));i++){n.firstChild.style.height="";_3fc.push(n);}this.normalizeRowNodeHeights(_3fc);},getViewWidth:function(_400){return this.views[_400].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_401){_401.headerContentNode.style.height="";});var h=0;this.forEach(function(_403){h=Math.max(_403.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_405){h=Math.max(_405.domNode.offsetHeight,h);});return h;},findClient:function(_406){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 _411=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);_411(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;_411(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_411(v,l);}return l;},renderRow:function(_418,_419){var _41a=[];for(var i=0,v,n,_41e;(v=this.views[i])&&(n=_419[i]);i++){_41e=v.renderRow(_418);n.appendChild(_41e);_41a.push(_41e);}this.normalizeRowNodeHeights(_41a);},rowRemoved:function(_41f){this.onEach("rowRemoved",[_41f]);},updateRow:function(_420){for(var i=0,v;v=this.views[i];i++){v.updateRow(_420);}this.renormalizeRow(_420);},updateRowStyles:function(_423){this.onEach("updateRowStyles",[_423]);},setScrollTop:function(_424){var top=_424;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_424);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 _42a=function(_42b,_42c){if(_42b.style.cssText==undefined){_42b.setAttribute("style",_42c);}else{_42b.style.cssText=_42c;}};dojo.declare("dojox.grid._RowManager",null,{constructor:function(_42d){this.grid=_42d;},linesToEms:2,overRow:-2,prepareStylingRow:function(_42e,_42f){return {index:_42e,node:_42f,odd:Boolean(_42e&1),selected:this.grid.selection.isSelected(_42e),over:this.isOver(_42e),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_430,_431){var row=this.prepareStylingRow(_430,_431);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_433){var i=_433;i.node.className=i.customClasses;var h=i.node.style.height;_42a(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_436){this.grid.updateRowStyles(_436);},setOverRow:function(_437){var last=this.overRow;this.overRow=_437;if((last!=this.overRow)&&(last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_439){return (this.overRow==_439);}});})();}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(_43a){this.grid=_43a;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"));},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(_43b,_43c){return (this.cell==_43b)&&(this.rowIndex==_43c);},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(_43d){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){dojo.toggleClass(n,this.focusClass,_43d);if(_43d){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){}}}},_initColumnHeaders:function(){this._connects.push(dojo.connect(this.grid.viewsHeaderNode,"onblur",this,"doBlurHeader"));var _440=this._findHeaderCells();for(var i=0;i<_440.length;i++){this._connects.push(dojo.connect(_440[i],"onfocus",this,"doColHeaderFocus"));this._connects.push(dojo.connect(_440[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _442=dojo.query("th",this.grid.viewsHeaderNode);var _443=[];for(var i=0;i<_442.length;i++){var _445=_442[i];var _446=dojo.hasAttr(_445,"tabindex");var _447=dojo.attr(_445,"tabindex");if(_446&&_447<0){_443.push(_445);}}return _443;},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,_44b){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:(_44b?_44b:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_450){var info=null;if(this._colHeadNode){info=this._scrollInfo(this.grid.getCell(_450),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(_452){return;},setFocusIndex:function(_453,_454){this.setFocusCell(this.grid.getCell(_454),_453);},setFocusCell:function(_455,_456){if(_455&&!this.isFocusCell(_455,_456)){this.tabbingOut=false;this._colHeadNode=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_455;this.rowIndex=_456;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(_45d,_45e){if(this.isNavHeader()){var _45f=this._findHeaderCells();var _460=dojo.indexOf(_45f,this._colHeadNode);_460+=_45e;if((_460>=0)&&(_460<_45f.length)){this._colHeadNode=_45f[_460];this._colHeadNode.focus();this._scrollHeader(_460);}}else{var rc=this.grid.rowCount-1,cc=this.grid.layout.cellCount-1,r=this.rowIndex,i=this.cell.index,row=Math.min(rc,Math.max(0,r+_45d)),col=Math.min(cc,Math.max(0,i+_45e));this.setFocusIndex(row,col);if(_45d){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){if(e.target===this.grid.domNode){this.focusHeader();dojo.stopEvent(e);}else{if(this.isNavHeader()){this._colHeadNode=null;if(this.isNoFocusCell()){this.setFocusIndex(0,0);}else{if(this.cell){this.focusGrid();}}}else{if(this.grid.edit.isEditing()){dojo.stopEvent(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_469){this.tabbingOut=true;_469.focus();},focusGridView:function(){dojox.grid.util.fire(this.focusView,"focus");},focusGrid:function(_46a){this.focusGridView();this._focusifyCellNode(true);},focusHeader:function(){var _46b=this._findHeaderCells();if(this.isNoFocusCell()){this._colHeadNode=_46b[0];}else{this._colHeadNode=_46b[this.cell.index];}if(this._colHeadNode){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{this._focusifyCellNode(true);}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(_473){this.grid=_473;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(_474,_475){if(this.grid.singleClickEdit||this.isEditRow(_475)){this.setEditCell(_474,_475);}else{this.apply();}if(this.isEditing()||(_474&&_474.editable&&_474.alwaysEditing)){this._focusEditor(_474,_475);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_477){if(_477.index==this.info.rowIndex){_477.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(_47b,_47c){return (this.info.rowIndex===_47b)&&(this.info.cell.index==_47c);},isEditRow:function(_47d){return this.info.rowIndex===_47d;},setEditCell:function(_47e,_47f){if(!this.isEditCell(_47f,_47e.index)&&this.grid.canEdit&&this.grid.canEdit(_47e,_47f)){this.start(_47e,_47f,this.isEditRow(_47f)||_47e.editable);}},_focusEditor:function(_480,_481){dojox.grid.util.fire(_480,"focus",[_481]);},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(_482,_483,_484){this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_483)){this.applyRowEdit();this.grid.updateRow(_483);}if(_484){this.info={cell:_482,rowIndex:_483};this.grid.doStartEdit(_482,_483);this.grid.updateRow(_483);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_482,_483);this._doCatchBoomerang();},_editorDo:function(_485){var c=this.info.cell;c&&c.editable&&c[_485](this.info.rowIndex);},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_487,_488,_489){if(this.grid.canEdit(_488,_489)){this.grid.doApplyCellEdit(_487,_489,_488.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(_48a,_48b){var c=this.info.cell;if(this.isEditRow(_48a)&&(!_48b||c.view==_48b)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_48d,_48e){var c=this.info.cell;if(this.isEditRow(_48e)&&c.view==_48d&&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(_490){this.grid=_490;this.selected=[];this.setMode(_490.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(_492){return this.grid.onCanSelect(_492);},onCanDeselect:function(_493){return this.grid.onCanDeselect(_493);},onSelected:function(_494){},onDeselected:function(_495){},onChanging:function(){},onChanged:function(){},isSelected:function(_496){if(this.mode=="none"){return false;}return this.selected[_496];},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(_499){if(this.mode=="none"){return -1;}for(var i=_499+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _49c=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_49c.push(i);}}return _49c;},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(_4a1){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_4a1);this.addToSelection(_4a1);}else{this.toggleSelect(_4a1);}},addToSelection:function(_4a2){if(this.mode=="none"){return;}_4a2=Number(_4a2);if(this.selected[_4a2]){this.selectedIndex=_4a2;}else{if(this.onCanSelect(_4a2)!==false){this.selectedIndex=_4a2;this._beginUpdate();this.selected[_4a2]=true;this.onSelected(_4a2);this._endUpdate();}}},deselect:function(_4a3){if(this.mode=="none"){return;}_4a3=Number(_4a3);if(this.selectedIndex==_4a3){this.selectedIndex=-1;}if(this.selected[_4a3]){if(this.onCanDeselect(_4a3)===false){return;}this._beginUpdate();delete this.selected[_4a3];this.onDeselected(_4a3);this._endUpdate();}},setSelected:function(_4a4,_4a5){this[(_4a5?"addToSelection":"deselect")](_4a4);},toggleSelect:function(_4a6){this.setSelected(_4a6,!this.selected[_4a6]);},_range:function(_4a7,inTo,func){var s=(_4a7>=0?_4a7:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_4ad,inTo){this._range(_4ad,inTo,dojo.hitch(this,"addToSelection"));},deselectRange:function(_4af,inTo){this._range(_4af,inTo,dojo.hitch(this,"deselect"));},insert:function(_4b1){this.selected.splice(_4b1,0,false);if(this.selectedIndex>=_4b1){this.selectedIndex++;}},remove:function(_4b2){this.selected.splice(_4b2,1);if(this.selectedIndex>=_4b2){this.selectedIndex--;}},deselectAll:function(_4b3){for(var i in this.selected){if((i!=_4b3)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_4b5,_4b6,_4b7){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_4b5);}else{var _4b8=this.selectedIndex;if(!_4b6){this.deselectAll(_4b5);}if(_4b7){this.selectRange(_4b8,_4b5);}else{if(_4b6){this.toggleSelect(_4b5);}else{this.addToSelection(_4b5);}}}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(_4bd){var i=_4bd;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_4bd);this.edit.styleRow(_4bd);},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 _4c1=this.focus.getHeaderIndex();if(_4c1>=0){this.setSortIndex(_4c1);}else{this.selection.clickSelect(this.focus.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);}dojo.stopEvent(e);}if(!e.shiftKey){var _4c2=this.edit.isEditing();this.edit.apply();if(!_4c2){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}break;case dk.SPACE:if(!this.edit.isEditing()){var _4c1=this.focus.getHeaderIndex();if(_4c1>=0){this.setSortIndex(_4c1);}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 _4c3=(e.keyCode==dk.LEFT_ARROW)?1:-1;if(dojo._isBodyLtr()){_4c3*=-1;}this.focus.move(0,_4c3);}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);}}break;case dk.PAGE_DOWN:if(!this.edit.isEditing()&&this.store&&this.focus.rowIndex+1!=this.store.count){dojo.stopEvent(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){dojo.addClass(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){dojo.removeClass(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}this.onRowClick(e);},onCellDblClick:function(e){if(dojo.isIE){this.edit.setEditCell(this._click[1].cell,this._click[1].rowIndex);}else{if(this._click[0].rowIndex!=this._click[1].rowIndex){this.edit.setEditCell(this._click[0].cell,this._click[0].rowIndex);}else{this.edit.setEditCell(e.cell,e.rowIndex);}}this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_4d0,_4d1){this.edit.cellFocus(_4d0,_4d1);},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(_4e3,_4e4){},onApplyCellEdit:function(_4e5,_4e6,_4e7){},onCancelEdit:function(_4e8){},onApplyEdit:function(_4e9){},onCanSelect:function(_4ea){return true;},onCanDeselect:function(_4eb){return true;},onSelected:function(_4ec){this.updateRowStyles(_4ec);},onDeselected:function(_4ed){this.updateRowStyles(_4ed);},onSelectionChanged:function(){}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_4ee,_4ef,_4f0){_4f0=dojo.i18n.normalizeLocale(_4f0);var _4f1=_4f0.split("-");var _4f2=[_4ee,"nls",_4ef].join(".");var _4f3=dojo._loadedModules[_4f2];if(_4f3){var _4f4;for(var i=_4f1.length;i>0;i--){var loc=_4f1.slice(0,i).join("_");if(_4f3[loc]){_4f4=_4f3[loc];break;}}if(!_4f4){_4f4=_4f3.ROOT;}if(_4f4){var _4f7=function(){};_4f7.prototype=_4f4;return new _4f7();}}throw new Error("Bundle not found: "+_4ef+" in "+_4ee+" , locale="+_4f0);};dojo.i18n.normalizeLocale=function(_4f8){var _4f9=_4f8?_4f8.toLowerCase():dojo.locale;if(_4f9=="root"){_4f9="ROOT";}return _4f9;};dojo.i18n._requireLocalization=function(_4fa,_4fb,_4fc,_4fd){var _4fe=dojo.i18n.normalizeLocale(_4fc);var _4ff=[_4fa,"nls",_4fb].join(".");var _500="";if(_4fd){var _501=_4fd.split(",");for(var i=0;i<_501.length;i++){if(_4fe["indexOf"](_501[i])==0){if(_501[i].length>_500.length){_500=_501[i];}}}if(!_500){_500="ROOT";}}var _503=_4fd?_500:_4fe;var _504=dojo._loadedModules[_4ff];var _505=null;if(_504){if(dojo.config.localizationComplete&&_504._built){return;}var _506=_503.replace(/-/g,"_");var _507=_4ff+"."+_506;_505=dojo._loadedModules[_507];}if(!_505){_504=dojo["provide"](_4ff);var syms=dojo._getModuleSymbols(_4fa);var _509=syms.concat("nls").join("/");var _50a;dojo.i18n._searchLocalePath(_503,_4fd,function(loc){var _50c=loc.replace(/-/g,"_");var _50d=_4ff+"."+_50c;var _50e=false;if(!dojo._loadedModules[_50d]){dojo["provide"](_50d);var _50f=[_509];if(loc!="ROOT"){_50f.push(loc);}_50f.push(_4fb);var _510=_50f.join("/")+".js";_50e=dojo._loadPath(_510,null,function(hash){var _512=function(){};_512.prototype=_50a;_504[_50c]=new _512();for(var j in hash){_504[_50c][j]=hash[j];}});}else{_50e=true;}if(_50e&&_504[_50c]){_50a=_504[_50c];}else{_504[_50c]=_50a;}if(_4fd){return true;}});}if(_4fd&&_4fe!=_500){_504[_4fe.replace(/-/g,"_")]=_504[_500.replace(/-/g,"_")];}};(function(){var _514=dojo.config.extraLocale;if(_514){if(!_514 instanceof Array){_514=[_514];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_518,_519){req(m,b,_518,_519);if(_518){return;}for(var i=0;i<_514.length;i++){req(m,b,_514[i],_519);}};}})();dojo.i18n._searchLocalePath=function(_51b,down,_51d){_51b=dojo.i18n.normalizeLocale(_51b);var _51e=_51b.split("-");var _51f=[];for(var i=_51e.length;i>0;i--){_51f.push(_51e.slice(0,i).join("-"));}_51f.push(false);if(down){_51f.reverse();}for(var j=_51f.length-1;j>=0;j--){var loc=_51f[j]||"ROOT";var stop=_51d(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_524,_525){function _526(_527){_527=dojo.i18n.normalizeLocale(_527);dojo.i18n._searchLocalePath(_527,true,function(loc){for(var i=0;i<_525.length;i++){if(_525[i]==loc){dojo["require"](_524+"_"+loc);return true;}}return false;});};_526();var _52a=dojo.config.extraLocale||[];for(var i=0;i<_52a.length;i++){_526(_52a[i]);}};}if(!dojo._hasResource["dojox.grid._Grid"]){dojo._hasResource["dojox.grid._Grid"]=true;dojo.provide("dojox.grid._Grid");(function(){var jobs={cancel:function(_52d){if(_52d){clearTimeout(_52d);}},jobs:[],job:function(_52e,_52f,_530){jobs.cancelJob(_52e);var job=function(){delete jobs.jobs[_52e];_530();};jobs.jobs[_52e]=setTimeout(job,_52f);},cancelJob:function(_532){jobs.cancel(jobs.jobs[_532]);}};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(_533){},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 _534=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_534);this.errorMessage=dojo.string.substitute(this.errorMessage,_534);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,_537){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&&!_537){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(_539,idx){var c=dojo.getObject(_539);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(_53f){var s=_53f;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(_541){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.attr('structure', obj) instead.","2.0");this._setStructureAttr(_541);},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(_545){if(self.layout.setColumnVisibility(this._gridCell.index,_545)){var _546=this._gridCell.menuItems;if(_546.length>1){dojo.forEach(_546,function(item){if(item!==this){item.setAttribute("checked",_545);}},this);}var _545=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(_545.length==1){dojo.forEach(_545[0].menuItems,"item.attr('disabled', true);");}}},destroy:function(){var _549=dojo.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_549,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(_54e){this.setScrollTop(0);},getItem:function(_54f){return null;},showMessage:function(_550){if(_550){this.messagesNode.innerHTML=_550;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(_551,_552){this._resize(_551,_552);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(_555,_556){var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _558=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<=_558.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(_555){dojo.marginBox(this.domNode,_555);}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(_55d){var t=_55d||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 _560=0,_561=0;var _562=dojo.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_560++;}else{_561++;}return (!has);});if(_560>0&&_561>0){dojo.forEach(_562,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(_567,_568){this.views.renderRow(_567,_568);},rowRemoved:function(_569){this.views.rowRemoved(_569);},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 _56c=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(_56c);this.postrender();},update:function(){this.render();},updateRow:function(_56d){_56d=Number(_56d);if(this.updating){this.invalidated[_56d]=true;}else{this.views.updateRow(_56d);this.scroller.rowHeightChanged(_56d);}},updateRows:function(_56e,_56f){_56e=Number(_56e);_56f=Number(_56f);if(this.updating){for(var i=0;i<_56f;i++){this.invalidated[i+_56e]=true;}}else{for(var i=0;i<_56f;i++){this.views.updateRow(i+_56e);}this.scroller.rowHeightChanged(_56e);}},updateRowCount:function(_571){if(this.updating){this.invalidated.rowCount=_571;}else{this.rowCount=_571;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_571);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_572){this.views.updateRowStyles(_572);},rowHeightChanged:function(_573){this.views.renormalizeRow(_573);this.scroller.rowHeightChanged(_573);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(dojo.isIE?100:50),scrollTo:function(_574){if(!this.fastScroll){this.setScrollTop(_574);return;}var _575=Math.abs(this.lastScrollTop-_574);this.lastScrollTop=_574;if(_575>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_574;this.views.setScrollTop(_574);jobs.job("dojoxGridScroll",200,dojo.hitch(this,"finishScrollJob"));}else{this.setScrollTop(_574);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_576){this.scroller.scroll(this.views.setScrollTop(_576));},scrollToRow:function(_577){this.setScrollTop(this.scroller.findScrollTop(_577)+1);},styleRowNode:function(_578,_579){if(_579){this.rows.styleRowNode(_578,_579);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_57b){return this.layout.cells[_57b];},setCellWidth:function(_57c,_57d){this.getCell(_57c).unitWidth=_57d;},getCellName:function(_57e){return "Cell "+_57e.index;},canSort:function(_57f){},sort:function(){},getSortAsc:function(_580){_580=_580==undefined?this.sortInfo:_580;return Boolean(_580>0);},getSortIndex:function(_581){_581=_581==undefined?this.sortInfo:_581;return Math.abs(_581)-1;},setSortIndex:function(_582,_583){var si=_582+1;if(_583!=undefined){si*=(_583?1:-1);}else{if(this.getSortIndex()==_582){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_585){if(this.canSort(_585)){this.sortInfo=_585;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(_593,_594){this.onStartEdit(_593,_594);},doApplyCellEdit:function(_595,_596,_597){this.onApplyCellEdit(_595,_596,_597);},doCancelEdit:function(_598){this.onCancelEdit(_598);},doApplyEdit:function(_599){this.onApplyEdit(_599);},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(_59a,node,ctor,_59d){var d=dojo;var _59f=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(!_59a.structure&&node.nodeName.toLowerCase()=="table"){_59a.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=_59f(cg);}return v;});if(!_59a.structure.length){_59a.structure.push({__span:Infinity,cells:[]});}d.query("thead > tr",node).forEach(function(tr,_5a6){var _5a7=0;var _5a8=0;var _5a9;var _5aa=null;d.query("> th",tr).map(function(th){if(!_5aa){_5a9=0;_5aa=_59a.structure[0];}else{if(_5a7>=(_5a9+_5aa.__span)){_5a8++;_5a9+=_5aa.__span;var _5ac=_5aa;_5aa=_59a.structure[_5a8];}}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")||"")};_5a7+=cell.colSpan;var _5ae=d.attr(th,"rowspan");if(_5ae){cell.rowSpan=_5ae;}if(d.hasAttr(th,"width")){cell.width=_59f(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(_59d){_59d(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(!_5aa.cells[_5a6]){_5aa.cells[_5a6]=[];}_5aa.cells[_5a6].push(cell);});});}return new ctor(_59a,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(_5b0){var _5b1=this.grid.getItemIndex(_5b0);var idx=dojox.grid.Selection.prototype.getNextSelected.call(this,_5b1);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _5b3=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_5b3.push(this.grid.getItem(i));}}return _5b3;},addToSelection:function(_5b6){if(this.mode=="none"){return;}var idx=null;if(typeof _5b6=="number"||typeof _5b6=="string"){idx=_5b6;}else{idx=this.grid.getItemIndex(_5b6);}dojox.grid.Selection.prototype.addToSelection.call(this,idx);},deselect:function(_5b8){if(this.mode=="none"){return;}var idx=null;if(typeof _5b8=="number"||typeof _5b8=="string"){idx=_5b8;}else{idx=this.grid.getItemIndex(_5b8);}dojox.grid.Selection.prototype.deselect.call(this,idx);},deselectAll:function(_5ba){var idx=null;if(_5ba||typeof _5ba=="number"){if(typeof _5ba=="number"||typeof _5ba=="string"){idx=_5ba;}else{idx=this.grid.getItemIndex(_5ba);}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(_5bc,_5bd){return (!_5bd?this.defaultValue:(!this.field?this.value:this.grid.store.getValue(_5bd,this.field)));},_onSet:function(item,_5bf,_5c0,_5c1){var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_addItem:function(item,_5c4,_5c5){var idty=this._hasIdentity?this.store.getIdentity(item):dojo.toJson(this.query)+":idx:"+_5c4+":sort:"+dojo.toJson(this.getSortProps());var o={idty:idty,item:item};this._by_idty[idty]=this._by_idx[_5c4]=o;if(!_5c5){this.updateRow(_5c4);}},_onNew:function(item,_5c9){var _5ca=this.attr("rowCount");this._addingItem=true;this.updateRowCount(_5ca+1);this._addingItem=false;this._addItem(item,_5ca);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(_5ce,_5cf,_5d0){this._setQuery(_5cf,_5d0);this._setStore(_5ce);this._refresh(true);},setQuery:function(_5d1,_5d2){this._setQuery(_5d1,_5d2);this._refresh(true);},setItems:function(_5d3){this.items=_5d3;this._setStore(this.store);this._refresh(true);},_setQuery:function(_5d4,_5d5){this.query=_5d4;this.queryOptions=_5d5||this.queryOptions;},_setStore:function(_5d6){if(this.store&&this._store_connects){dojo.forEach(this._store_connects,function(arr){dojo.forEach(arr,dojo.disconnect);});}this.store=_5d6;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(_5dc,req){if(_5dc&&_5dc.length>0){dojo.forEach(_5dc,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_5dc.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(!_5dc||!_5dc.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(_5e4,_5e5){var _5e4=_5e4||0;if(this.store&&!this._pending_requests[_5e4]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_5e4]=true;try{if(this.items){var _5e6=this.items;var _5e7=this.store;this.rowsPerPage=_5e6.length;var req={start:_5e4,count:this.rowsPerPage,isRender:_5e5};this._onFetchBegin(_5e6.length,req);var _5e9=0;dojo.forEach(_5e6,function(i){if(!_5e7.isItemLoaded(i)){_5e9++;}});if(_5e9===0){this._onFetchComplete(_5e6,req);}else{var _5eb=function(item){_5e9--;if(_5e9===0){this._onFetchComplete(_5e6,req);}};dojo.forEach(_5e6,function(i){if(!_5e7.isItemLoaded(i)){_5e7.loadItem({item:i,onItem:_5eb,scope:this});}},this);}}else{this.store.fetch({start:_5e4,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_5e5,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,_5f2){if(!_5f2&&!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(_5f7,_5f8){this.query=_5f7;if(_5f8){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(_5fc){return this._pending_requests[_5fc];},_rowToPage:function(_5fd){return (this.rowsPerPage?Math.floor(_5fd/this.rowsPerPage):_5fd);},_pageToRow:function(_5fe){return (this.rowsPerPage?this.rowsPerPage*_5fe:_5fe);},_preparePage:function(_5ff){if((_5ff<this._bop||_5ff>=this._eop)&&!this._addingItem){var _600=this._rowToPage(_5ff);this._needPage(_600);this._bop=_600*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.attr("rowCount"));}},_needPage:function(_601){if(!this._pages[_601]){this._pages[_601]=true;this._requestPage(_601);}},_requestPage:function(_602){var row=this._pageToRow(_602);var _604=Math.min(this.rowsPerPage,this.attr("rowCount")-row);if(_604>0){this._requests++;if(!this._requestsPending(row)){setTimeout(dojo.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_605){return _605.field;},_refresh:function(_606){this._clearData();this._fetch(0,_606);},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(_60a){if(this.store&&this.store.getState){var _60b=this.store.getState(_60a.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_60b[s]){c=" dojoxGridRow-"+s;break;}}_60a.customClasses+=c;}},onStyleRow:function(_610){this.styleRowState(_610);this.inherited(arguments);},canEdit:function(_611,_612){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _616={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_618,_619){if(!this._cache[_619]){this._cache[_619]=this._copyAttr(_619,_618.field);}this.onStartEdit(_618,_619);},doApplyCellEdit:function(_61a,_61b,_61c){this.store.fetchItemByIdentity({identity:this._by_idx[_61b].idty,onItem:dojo.hitch(this,function(item){var _61e=this.store.getValue(item,_61c);if(typeof _61e=="number"){_61a=isNaN(_61a)?_61a:parseFloat(_61a);}else{if(typeof _61e=="boolean"){_61a=_61a=="true"?true:_61a=="false"?false:_61a;}else{if(_61e instanceof Date){var _61f=new Date(_61a);_61a=isNaN(_61f.getTime())?_61a:_61f;}}}this.store.setValue(item,_61c,_61a);this.onApplyCellEdit(_61a,_61b,_61c);})});},doCancelEdit:function(_620){var _621=this._cache[_620];if(_621){this.updateRow(_620);delete this._cache[_620];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_622,_623){var _624=this._cache[_622];this.onApplyEdit(_622);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var _625=this.selection.getSelected();if(_625.length){dojo.forEach(_625,this.store.deleteItem,this.store);this.selection.clear();}}}});dojox.grid.DataGrid.markupFactory=function(_626,node,ctor,_629){return dojox.grid._Grid.markupFactory(_626,node,ctor,function(node,_62b){var _62c=dojo.trim(dojo.attr(node,"field")||"");if(_62c){_62b.field=_62c;}_62b.field=_62b.field||_62b.name;if(_629){_629(node,_62b);}});};}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"]);
