// JavaScript Document
Event.observe(window, 'load', function() {
	
	// If a default table style exists, set the body class to 'onecol'
	if($$('table.sortable').length > 0) {
		$$('body').first().addClassName('onecol');
	}
	
	// Initialize the sortable table
	var sortables = new Array();
	setTimeout(function() {
		$$('table.sortable').each(function(tableElem) {
			tableElem.select('tr').each(function(trElem,index) {
				trElem.removeClassName('alternate');
				if(index % 2 == 0) trElem.addClassName('even');
			});
			tableElem.select('td').each(function(tdElem) {
				// Remove BBDO class
				tdElem.removeClassName('empty');
			});
			sortables.push(new SortableTable(tableElem, 
				{initialSortColumn: tableElem.select('th.date-time').first()}));
		});
	}, 10);
	
	//sortables_init();
	
});