function sortByLength (a) {
  var weights = {
    '&frac12 day' : 0,
    '1 hour' : 1,
    '2 hours' : 2,
    '3 hours' : 3,
    '4 hours' : 4,
    '6 hours' : 5,
    '1 day' : 6,
    '8 hours' : 7,
    '1&frac12 days' : 8,
    '2 days' : 9,
    '2&frac12 days' : 10,
    '3 days' : 11,
    '3&frac12 days' : 12,
    '2 nights/2 days' : 13,
    '2 nights/4 days' : 14,
    '4 days' : 15,
    '5 days' : 16,
    '6 days' : 17,
    '6 nights' : 18,
    '6 sessions' : 19,
    '7 days' : 20,
    '2 weeks' : 21,
    'See Detail' : 22
  }
  return weights[a]
}

// structure that describes columns of the table and their type
var TABLE_CAPT = [
	{
		'name' : 'Park<br /><font size="1.2em">Click park name for description<br />Click column title to sort</font>', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	},
	{
		'name' : 'Town', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	},
		{
		'name' : 'Zone', // columns titles
		'type' : NUM // standard types (STR, NUM) or custom compare function
	},
		
	{
		'name' : 'Fall Bow Dates', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	},
	
	{
		'name' : 'Permit Bow Dates', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	},
		{
		'name' : 'Winter Bow Dates', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	},
		{
		'name' : 'Permit Shotgun Dates', // columns titles
		'type' : STR // standard types (STR, NUM) or custom compare function
	}
];

// 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
	'structure' : [0, 2, 4, 5],
	'params' : [3, 0], // [cellpadding,cellspacing]
	'colors' : {
		'even'    : 'white',
		'odd'     : '#e5fad3',
		'hovered' : '#aedc85',
		'marked'  : '#86c251'
	},
	'freeze' : [0,0], // how many rows to skip [at_the_top, at_the_bottom] when applying effects
	'multy_mark' : false,
	'paging' : {
		'by' : 15, // page size (0 - no paging)
		'pp' : ' Previous', // html for previous page link
		'pn' : 'Next ', // html for next page link
		'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' : {
		// HTML for ascending sorted state icon
		'as' : '<img src=../../images/asc.gif border=0 height=4 width=8 alt="sort descending">',
		// HTML for descending sorted state icon
		'ds' : '<img src=../../images/desc.gif border=0 height=4 width=8 alt="sort ascending">',
		'no' : '<img src=../../images/asds.gif border=0 height=9 width=8 alt="sort ascending">',
    'cl' : 0,
    'or' : false
	},
	'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', 'Wed', '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."
};