AdfDhtmlPivotTablePeer.prototype._displayStatus=function(a,b){void 0==b&&(b=!1);var c=this._ptUtils._fetchStatus;this._appendSpaceToStatus=!this._appendSpaceToStatus;c.innerHTML=a+(this._appendSpaceToStatus?" ":"");var d=c.style;if(""==d.display||"none"==d.display){d.zIndex=5;d.visibility="hidden";d.display="block";if(b)d.top=Math.floor((this._maxHeight-c.offsetHeight)/2)+"px",d.left=Math.floor((this._maxWidth-c.offsetWidth)/2)+"px";else{var e=AdfAgent.AGENT.getElementPosition(this.getDomElement());
this._oldMousePos&&(d.top=Math.max(0,this._oldMousePos.y-e.y-c.offsetHeight-16)+"px",d.left=Math.max(0,this._oldMousePos.x-e.x-c.offsetWidth-16)+"px")}d.visibility="visible"}};AdfDhtmlPivotTablePeer.prototype._hideStatus=function(){this._ptUtils._fetchStatus.style.display="none"};AdfDhtmlPivotTablePeer.prototype._getElemBySubId=function(a){var b=this.getDomElement();return AdfDhtmlPivotTablePeer._getChildBySubId(b,a)};
AdfDhtmlPivotTablePeer._getChildBySubId=function(a,b){return AdfDhtmlPivotTablePeer._getChildById(a,a.id+"::"+b)};AdfDhtmlPivotTablePeer._getChildById=function(a,b){for(var c=a.childNodes,d=0;d<c.length;d++)if(b==c[d].id)return c[d];return null};AdfDhtmlPivotTablePeer._getChildByIdPrefix=function(a,b){for(var c=a.childNodes,d=0;d<c.length;d++)if(c[d].id&&0==c[d].id.indexOf(b))return c[d];return null};
AdfDhtmlPivotTablePeer.prototype._getParentElement=function(a,b){for(var c=null,d=this.getDomElement();!c&&a&&a!=d&&1==a.nodeType;)a.tagName==b?c=a:a=a.parentNode;return c};AdfDhtmlPivotTablePeer.prototype._findElement=function(a,b){return null==a.parentNode||a.parentNode.id==this.getComponent().getClientId()?null:null!=AdfAgent.AGENT.getAttribute(a,b)?a:this._findElement(a.parentNode,b)};
AdfDhtmlPivotTablePeer.prototype._isAncestorOrSelf=function(a,b){for(var c=b,d=this.getDomElement();c;){if(c==a)return!0;if(c==d)break;c=c.parentNode}return!1};AdfDhtmlPivotTablePeer.prototype._focusElement=function(a){try{a.focus()}catch(b){}};AdfDhtmlPivotTablePeer._setCursor=function(a,b){a&&a.style.cursor!=b&&(a.style.cursor=b)};
AdfDhtmlPivotTablePeer.prototype._isInputElement=function(a){for(var b=AdfAgent.getAgent(),c,d=this.getDomElement(),e=/^INPUT|SELECT|OPTION|TEXTAREA/;null!=a&&a!=d&&"TD"!=(c=b.getNodeName(a))&&"TH"!=c;){if(c.match(e)&&!a.readOnly)return!0;a=a.parentNode}return!1};
AdfDhtmlPivotTablePeer.prototype._isNodeEditable=function(a){for(var b=AdfAgent.getAgent(),c,d=this.getDomElement(),e=AdfDhtmlPivotTablePeer._INPUT_REGEXP;null!=a&&a!=d&&"TD"!=(c=b.getNodeName(a))&&"TH"!=c;){if(c.match(e)&&-1!=a.tabIndex)return!0;a=a.parentNode}return!1};AdfDhtmlPivotTablePeer.prototype.isElementVisible=function(a,b){return void 0!=a.style&&"none"==a.style.display?!1:a==this.getDomElement()||void 0!=b&&a==b||void 0==a.parentNode?!0:this.isElementVisible(a.parentNode,b)};
AdfDhtmlPivotTablePeer.prototype._getInputElementsInNode=function(a){var b=AdfAgent.AGENT.getDomDocument(),c=[];if(b.evaluate)for(var b=b.evaluate(".//input|.//select|.//textarea|.//button|.//a|.//INPUT|.//SELECT|.//TEXTAREA|.//BUTTON|.//A",a,null,XPathResult.ANY_TYPE,null),d=b.iterateNext();d;)!d.disabled&&(!d.tabIndex||0<d.tabIndex)&&this.isElementVisible(d,a)&&c.push(d),d=b.iterateNext();else for(var b=a.getElementsByTagName("*"),e=b.length,f=/^INPUT|SELECT|BUTTON|^A\b|TEXTAREA/,g=0;g<e;g++)d=
b[g],d.tagName.match(f)&&!d.disabled&&(!d.tabIndex||0<d.tabIndex)&&this.isElementVisible(d,a)&&c.push(d);return c};AdfDhtmlPivotTablePeer.prototype._getCurrentInputElementIndex=function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1};AdfDhtmlPivotTablePeer.prototype.getCoordinates=function(a){var b=this.getParentBlock(a.parentNode);return this._getCoordinates(a,b)};
AdfDhtmlPivotTablePeer.prototype._getCoordinates=function(a,b){var c=a.parentNode,c=AdfAgent.AGENT.getIntAttribute(b,"_startRow")+c.rowIndex-1,d=AdfAgent.AGENT.getIntAttribute(b,"_startCol");return{row:c,col:d+a.cellIndex-1}};AdfDhtmlPivotTablePeer.prototype.getAbsoluteColumnIndex=function(a,b){return a.getIntAttribute(b,"_iCol",0)+1};AdfDhtmlPivotTablePeer.prototype.getAbsoluteRowIndex=function(a,b){return b.parentNode.rowIndex};
AdfDhtmlPivotTablePeer.prototype._getDataCellKeyAndCell=function(a){var b=this.getParentBlock(a),c=null,d=null;b&&this.getBlockType(b)==AdfDhtmlPivotTablePeer.DATABODY_COMPONENT&&(c=this._getDataCell(a))&&(d=this._getDataCellKey(c,b));return[d,c]};AdfDhtmlPivotTablePeer.prototype._getDataCellKey=function(a,b){var c=this._getCoordinates(a,b);return c.row+":"+c.col};
AdfDhtmlPivotTablePeer.prototype._getDataCell=function(a){for(var b=null,c=this._getStyleClass(AdfPivotTableUtils.DATABODY_CELL_STYLE),d=this._getStyleClass(AdfPivotTableUtils.DATABODY_CELL_SELECTED_STYLE),e=this._getStyleClass(AdfPivotTableUtils.DATABODY_CELL_FOCUSED_STYLE);!b&&a;)"TD"==a.tagName?AdfDhtmlCommonUtils.containsCSSClassName(a,c)||AdfDhtmlCommonUtils.containsCSSClassName(a,d)||AdfDhtmlCommonUtils.containsCSSClassName(a,e)?b=a:a=this._getParentElement(a.parentNode,"TD"):a=this._getParentElement(a,
"TD");return b};AdfDhtmlPivotTablePeer.prototype.getParentBlock=function(a){for(var b=AdfAgent.AGENT,c=null,d=this.getDomElement();!c&&a&&a!=d&&1==a.nodeType;)b.getAttribute(a,"_component")?c=a:a=a.parentNode;return c};AdfDhtmlPivotTablePeer.prototype.getBlockType=function(a){return AdfAgent.AGENT.getAttribute(a,"_component")};AdfDhtmlPivotTablePeer.prototype.getDatabodyBlockRowIndex=function(a,b){for(var c=a.length,d=0;d<c;d++)for(var e=a[d],f=e.length,g=0;g<f;g++)if(e[g]==b)return d;return-1};
AdfDhtmlPivotTablePeer.prototype.getHeaderBlockIndex=function(a,b){for(var c=a.length,d=-1,e=0;e<c;e++)a[e]==b&&(d=e);return d};AdfDhtmlPivotTablePeer.prototype._getFirstHeaderBlock=function(a){for(var b=a.length,c=0;c<b;c++){var d=a[c];if(!d._placeholder)return d}return null};
AdfDhtmlPivotTablePeer.prototype.moveBlocksHoriz=function(a,b,c){var d=this._ptUtils._colHeaderBuffers[a],e=d.length;for(i=b;i<e;i++){var f=d[i];f._placeholder||(this._ptUtils.setHorizPos(f._horizPos+c,f),this._ptUtils.setCanvasHorizPos(f._canvasHorizPos+c,f))}for(d=this._ptUtils._startPane[1];2>d;++d){var g=this._ptUtils._databodyBuffers[d][a],e=g.length;for(i=0;i<e;i++){var h=g[i],l=h.length;for(j=b;j<l;j++)if(f=h[j])this._ptUtils.setHorizPos(f._horizPos+c,f),this._ptUtils.setCanvasHorizPos(f._canvasHorizPos+
c,f)}}};AdfDhtmlPivotTablePeer.prototype._changeBlockWidth=function(a,b,c){this._changeBlockSize(0,a,b,c,0)};AdfDhtmlPivotTablePeer.prototype._changeBlockHeight=function(a,b,c,d){this._changeBlockSize(1,a,b,c,d)};AdfDhtmlPivotTablePeer.prototype._changeBlockSize=function(a,b,c,d,e){c+=d;this._ptUtils.setCachedSize(b.childNodes[0],c+e,a);this._ptUtils.setCachedSize(b,c,a)};
AdfDhtmlPivotTablePeer.prototype._getStyleClass=function(a){if(void 0==this._styleMap){var b=AdfAgent.AGENT;this._styleMap={};var c=this.getDomElement();this._styleMap[AdfPivotTableUtils.DATABODY_CELL_SELECTED_STYLE]=b.getAttribute(c,AdfPivotTableUtils.DATABODY_CELL_SELECTED_STYLE);this._styleMap[AdfPivotTableUtils.DATABODY_CELL_FOCUSED_STYLE]=b.getAttribute(c,AdfPivotTableUtils.DATABODY_CELL_FOCUSED_STYLE);this._styleMap[AdfPivotTableUtils.DATABODY_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.DATABODY_CELL_STYLE);
this._styleMap[AdfPivotTableUtils.ROW_HEADER_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_HEADER_CELL_STYLE);this._styleMap[AdfPivotTableUtils.COLUMN_HEADER_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COLUMN_HEADER_CELL_STYLE);this._styleMap[AdfPivotTableUtils.ROW_HEADER_CELL_SELECTED_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_HEADER_CELL_SELECTED_STYLE);this._styleMap[AdfPivotTableUtils.COLUMN_HEADER_CELL_SELECTED_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COLUMN_HEADER_CELL_SELECTED_STYLE);
this._styleMap[AdfPivotTableUtils.ROW_HEADER_CELL_FOCUSED_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_HEADER_CELL_FOCUSED_STYLE);this._styleMap[AdfPivotTableUtils.COLUMN_HEADER_CELL_FOCUSED_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COLUMN_HEADER_CELL_FOCUSED_STYLE);this._styleMap[AdfPivotTableUtils.ROW_PIVOT_IMAGE_CELL_LEFT_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_PIVOT_IMAGE_CELL_LEFT_STYLE);this._styleMap[AdfPivotTableUtils.ROW_PIVOT_IMAGE_CELL_RIGHT_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_PIVOT_IMAGE_CELL_RIGHT_STYLE);
this._styleMap[AdfPivotTableUtils.ROW_PIVOT_IMAGE_CELL_CENTER_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_PIVOT_IMAGE_CELL_CENTER_STYLE);this._styleMap[AdfPivotTableUtils.ROW_PIVOT_LABEL_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_PIVOT_LABEL_CELL_STYLE);this._styleMap[AdfPivotTableUtils.ROW_PIVOT_INDICATOR_HEADER_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.ROW_PIVOT_INDICATOR_HEADER_CELL_STYLE);this._styleMap[AdfPivotTableUtils.ROW_PIVOT_INDICATOR_PIVOT_HANDLE_STYLE]=b.getAttribute(c,
AdfPivotTableUtils.ROW_PIVOT_INDICATOR_PIVOT_HANDLE_STYLE);this._styleMap[AdfPivotTableUtils.COL_PIVOT_IMAGE_CELL_TOP_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COL_PIVOT_IMAGE_CELL_TOP_STYLE);this._styleMap[AdfPivotTableUtils.COL_PIVOT_LABEL_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COL_PIVOT_LABEL_CELL_STYLE);this._styleMap[AdfPivotTableUtils.COL_PIVOT_IMAGE_CELL_CENTER_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COL_PIVOT_IMAGE_CELL_CENTER_STYLE);this._styleMap[AdfPivotTableUtils.COL_PIVOT_IMAGE_CELL_BOTTOM_STYLE]=
b.getAttribute(c,AdfPivotTableUtils.COL_PIVOT_IMAGE_CELL_BOTTOM_STYLE);this._styleMap[AdfPivotTableUtils.COLUMN_PIVOT_INDICATOR_HEADER_CELL_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COLUMN_PIVOT_INDICATOR_HEADER_CELL_STYLE);this._styleMap[AdfPivotTableUtils.COLUMN_PIVOT_INDICATOR_PIVOT_HANDLE_STYLE]=b.getAttribute(c,AdfPivotTableUtils.COLUMN_PIVOT_INDICATOR_PIVOT_HANDLE_STYLE);this._styleMap[AdfPivotTableUtils.ROW_PIVOT_SWAP_DROP_TARGET]=b.getAttribute(c,AdfPivotTableUtils.ROW_PIVOT_SWAP_DROP_TARGET);
this._styleMap[AdfPivotTableUtils.COLUMN_PIVOT_SWAP_DROP_TARGET]=b.getAttribute(c,AdfPivotTableUtils.COLUMN_PIVOT_SWAP_DROP_TARGET);this._styleMap[AdfPivotTableUtils.SELECTED_STATE_CLASS]=b.getAttribute(c,AdfPivotTableUtils.SELECTED_STATE_CLASS);this._styleMap[AdfPivotTableUtils.DATABODY_FROZEN_STYLE]=b.getAttribute(c,AdfPivotTableUtils.DATABODY_FROZEN_STYLE)}return this._styleMap[a]};
AdfDhtmlPivotTablePeer.prototype.appendCSSClassName=function(a,b){var c=a.className;-1==AdfDhtmlCommonUtils._getCSSClassNameIndex(c,b)&&(a.className=c?c+" "+b:b)};AdfDhtmlPivotTablePeer.prototype.createCallback2=function(a,b,c){AdfAssert.assertFunction(a);var d=function(){return AdfDhtmlPivotTablePeer.callbackCaller(arguments)};d._owner=c?c:this;d._func=a;d._args=b;return d};
AdfDhtmlPivotTablePeer.callbackCaller=function(a){var b=a.callee;a=null==b._args||0==b._args.length?a:0==a.length?b._args:b._args.concat.apply(b._args,a);return b._func.apply(b._owner,a)};AdfDhtmlPivotTablePeer.prototype.shallowCopy=function(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};
AdfDhtmlPivotTablePeer.prototype.deepCopy=function(a){var b;if(null==a||a.constructor==String)b=a;else if(a.constructor==Array)b=a.map(this.deepCopy,this);else if("object"==typeof a){b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=this.deepCopy(a[c]))}else b=a;return b};AdfDhtmlPivotTablePeer.prototype.ctrlEquivalent=function(a){return AdfAgent.AGENT.getOS()==AdfAgent.MAC_OS?a.metaKey:a.ctrlKey};