//>>built
define("dojox/grid/util",["../main","dojo/_base/lang","dojo/dom","dojo/_base/sniff"],function(p,q,r,k){var d=q.getObject("grid.util",!0,p);d.na="...";d.rowIndexTag="gridRowIndex";d.gridViewTag="gridView";d.fire=function(a,b,c){function e(h,l){if(null==h)return null;var m=l?"Width":"Height";return h["scroll"+m]>h["client"+m]?h:e(h.parentNode,l)}var f;if(k("webkit")&&"focus"==b){var g=a.domNode?a.domNode:a;if(f=e(g,!1))var t=f.scrollTop;if(g=e(g,!0))var u=g.scrollLeft}var n=a&&b&&a[b];a=n&&(c?n.apply(a,
c):a[b]());k("webkit")&&"focus"==b&&(f&&(f.scrollTop=t),g&&(g.scrollLeft=u));return a};d.setStyleHeightPx=function(a,b){if(0<=b){var c=a.style,e=b+"px";a&&c.height!=e&&(c.height=e)}};d.mouseEvents="mouseover mouseout mousedown mouseup click dblclick contextmenu".split(" ");d.keyEvents=["keyup","keydown","keypress"];d.funnelEvents=function(a,b,c,e){e=e?e:d.mouseEvents.concat(d.keyEvents);for(var f=0,g=e.length;f<g;f++)b.connect(a,"on"+e[f],c)};d.removeNode=function(a){(a=r.byId(a))&&a.parentNode&&
a.parentNode.removeChild(a);return a};d.arrayCompare=function(a,b){for(var c=0,e=a.length;c<e;c++)if(a[c]!=b[c])return!1;return a.length==b.length};d.arrayInsert=function(a,b,c){a.length<=b?a[b]=c:a.splice(b,0,c)};d.arrayRemove=function(a,b){a.splice(b,1)};d.arraySwap=function(a,b,c){var e=a[b];a[b]=a[c];a[c]=e};return d});