// structure that describes columns of the table and their type
var TABLE_CAPT = [
	{
		'name' : 'Key', // columns titles
		'type' : STR, // standard types (STR, NUM) or custom compare function
		'hide' : 'TRUE'
	},
 	{
    	'name' : 'Date', //columns title
		'type' : DATE, // standard types (STR, NUM) or custom compare function
		'format_input' : 'd-m-Y',
		'format_output' : 'M d Y'
	},
	{
		'name' : 'Category', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	},
	{
		'name' : 'Title', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	}
];

// onclick funtion for spawing data views - gets src from key value in col 0
function row_clck(marked_all, marked_one) {
window.open("../articles/"+marked_one+".htm",'mywindow');
}

// structure that describes visual aspects of the table
var TABLE_LOOK = {
	// select column zero for key value and pass with onclick function
      'key': 0, // field column to use as 'marked_one'
      'onclick': row_clck, // function to be called when a row is clicked
	// 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
	'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' : 6, // page size (0 - no paging)
		'tt' : '&nbsp;Page %ind of %pgs&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' : {
		'as' : '<img src=ttp_files/img/asc.gif border=0 height=4 width=8 alt="sort descending">',
		'ds' : '<img src=ttp_files/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">',
		'no' : '<img src=ttp_files/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'
	}
};

var ARR_STRINGS = {
	'long_days' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
	'short_days' : ['Sun', 'Mon', 'Tue', 'Wen', 'Thu', 'Fri', 'Sat'],
	'long_month' : ['January','February','March','April','May','June','July','August','September','October','November','December'],
	'short_month' : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
	'bad_month' : 'Parsing error: unknown month "%month_name"',
	'not_meet' : "Notice : Input date does not meet input date format."
};

