var TABLE_CAPT = [
  // 0-th column definition
  {
    // title
    'name' : 'brand',
    // standard type (STR, NUM, DATE, CURRENCY) or custom cast function
    'type' : STR 
  },
  // 1-st column definition
  {
    'name' : 'description',
    // if the column is hidden
    'type' : STR
  },
  // 2-nd column definition
  {
    'name'         : 'Current',
    'type'         : STR
  },
  // 3-rd column definition
  {
    'name'   : 'Price',
    'type'   : CURRENCY
  },
  // 4-th column definition
  {
    'name'   : 'Lens Type',
    'type'   : STR   
  },
  // 5-th column definition
  {
    'name'   : 'max aperture',
    'type'   : STR,
    'hide'   : true   
  },
  // 6-th column definition
  {
    'name'   : 'detail link',
    'type'   : STR,
    'hide'   : true   
  },
  // 7-th column definition
  {
    'name'   : 'FL Sort',
    'type'   : NUM,
    'hide'   : true   
  }
];


// structure that describes visual aspects of the table
var TABLE_LOOK = {
	// 0 - caption,
	// 1 - header rows to be skipped at the top when applying effects,
	// 2 - body,
	// 3 - footer rows to be skipped at the bottom when applying effects,
	// 4 - paging,
	// 5 - filters
	
	'key' : 6,
	'onclick' : function (marked_all, marked_one) {load(marked_one);},
	'structure' : [0, 1, 2, 3, 4, 5],
	'params' : [3, 0], // [cellpadding,cellspacing]
	'colors' : {
		'even'    : 'white',
		'odd'     : '#E8EFF5',
		'hovered' : '#ffffcc',
		'marked'  : '#ffcc66'
	},
	'freeze' : [0, 0], // how many rows to skip [at_the_top, at_the_bottom] when applying effects
	'paging' : {
		'by' : 16, // page size (0 - no paging)
		'tt' : '&nbsp;Page %ind of %pgs&nbsp;',
		'pf' : '<<&nbsp&nbsp',
		'pp' : '<',
		'pn' : '>',
		'pl' : '&nbsp&nbsp>>' 
		 

/* in this line you can use the following variables 1-bazed:
  %pgs total pages index
  %ind current page index
  %rcs total records found
*/
	},
	'sorting' : {
		// HTML for ascending sorted state icon
		'as' : '<img src=img/asc.gif border=0 height=4 width=8 alt="sort descending">',
		// HTML for descending sorted state icon
		'ds' : '<img src=img/desc.gif border=0 height=4 width=8 alt="sort ascending">',
		'no' : '<img src=img/asds.gif border=0 height=9 width=8 alt="sort ascending">'
	},
	'filter' :{
		'type':0
	},
	'css' : {
		'main'     : 'tabTable',
		'body'     : ['tabBodyCol0','tabBodyCol1','tabBodyCol2','tabBodyCol3','tabBodyCol4','tabBodyCol5'],
		'captCell' : 'tabCaptionCell',
		'captText' : 'tabCaptionLink',
		'head'     : 'tabHeadCell',
		'foot'     : 'tabFootCell',
		'pagnCell' : 'tabPaging',
		'pagnText' : 'tabPagingText',
		'pagnPict' : 'tabPagingArrowCell',
		'filtCell' : 'tabFilter',
		'filtPatt' : 'tabFilterPattern',
		'filtSelc' : 'tabFilterSelect'
	}
};

