/*
	Copyright (c) 2004-2011, 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
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.grid.enhanced.plugins.exporter.TableWriter"],["require","dojox.grid.enhanced.plugins.exporter._ExportWriter"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.grid.enhanced.plugins.exporter.TableWriter"]){_4._hasResource["dojox.grid.enhanced.plugins.exporter.TableWriter"]=true;_4.provide("dojox.grid.enhanced.plugins.exporter.TableWriter");_4.require("dojox.grid.enhanced.plugins.exporter._ExportWriter");_6.grid.enhanced.plugins.Exporter.registerWriter("table","dojox.grid.enhanced.plugins.exporter.TableWriter");_4.declare("dojox.grid.enhanced.plugins.exporter.TableWriter",_6.grid.enhanced.plugins.exporter._ExportWriter,{constructor:function(_7){this._viewTables=[];this._tableAttrs=_7||{};},_getTableAttrs:function(_8){var _9=this._tableAttrs[_8]||"";if(_9&&_9[0]!=" "){_9=" "+_9;}return _9;},_getRowClass:function(_a){return _a.isHeader?" grid_header":[" grid_row grid_row_",_a.rowIdx+1,_a.rowIdx%2?" grid_even_row":" grid_odd_row"].join("");},_getColumnClass:function(_b){var _c=_b.cell.index+_b.colOffset+1;return [" grid_column_",_c,_c%2?" grid_odd_column":" grid_even_column"].join("");},beforeView:function(_d){var _e=_d.viewIdx,_f=this._viewTables[_e],_10,_11,_12=_4.marginBox(_d.view.contentNode).w;if(!_f){var _13=0;for(var i=0;i<_e;++i){_13+=this._viewTables[i]._width;}_f=this._viewTables[_e]=["<table class=\"grid_view\" style=\"position: absolute; top: 0; left:",_13,"px;\"",this._getTableAttrs("table"),">"];}_f._width=_12;if(_d.isHeader){_10="thead";_11=_4.contentBox(_d.view.headerContentNode).h;}else{_10="tbody";var _14=_d.grid.getRowNode(_d.rowIdx);if(_14){_11=_4.contentBox(_14).h;}else{_11=_d.grid.scroller.averageRowHeight;}}_f.push("<",_10," style=\"height:",_11,"px; width:",_12,"px;\""," class=\"",this._getRowClass(_d),"\"",this._getTableAttrs(_10),">");return true;},afterView:function(_15){this._viewTables[_15.viewIdx].push(_15.isHeader?"</thead>":"</tbody>");},beforeSubrow:function(_16){this._viewTables[_16.viewIdx].push("<tr",this._getTableAttrs("tr"),">");return true;},afterSubrow:function(_17){this._viewTables[_17.viewIdx].push("</tr>");},handleCell:function(_18){var _19=_18.cell;if(_19.hidden||_4.indexOf(_18.spCols,_19.index)>=0){return;}var _1a=_18.isHeader?"th":"td",_1b=[_19.colSpan?" colspan=\""+_19.colSpan+"\"":"",_19.rowSpan?" rowspan=\""+_19.rowSpan+"\"":""," style=\"width: ",_4.contentBox(_19.getHeaderNode()).w,"px;\"",this._getTableAttrs(_1a)," class=\"",this._getColumnClass(_18),"\""].join(""),_1c=this._viewTables[_18.viewIdx];_1c.push("<",_1a,_1b,">");if(_18.isHeader){_1c.push(_19.name||_19.field);}else{_1c.push(this._getExportDataForCell(_18.rowIdx,_18.row,_19,_18.grid));}_1c.push("</",_1a,">");},afterContent:function(){_4.forEach(this._viewTables,function(_1d){_1d.push("</table>");});},toString:function(){var _1e=_4.map(this._viewTables,function(_1f){return _1f.join("");}).join("");return ["<div style=\"position: relative;\">",_1e,"</div>"].join("");}});}}};});