/* Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/. Based on a script from http://www.kryogenix.org/code/browser/sorttable/. Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html . Copyright (c) 1997-2007 Stuart Langridge, Joost de Valk. Version 1.5.7 */ /* You can change these values */ var europeandate = true; var alternate_row_colors = true; /* Don't change anything below this unless you know what you're doing */ addEvent(window, "load", sortables_init); var SORT_COLUMN_INDEX; var thead = false; function sortables_init() { // Find all tables with class sortable and make them sortable if (!document.getElementsByTagName) return; tbls = document.getElementsByTagName("table"); for (ti=0;ti 0) { if (t.tHead && t.tHead.rows.length > 0) { var firstRow = t.tHead.rows[t.tHead.rows.length-1]; thead = true; } else { var firstRow = t.rows[0]; } } if (!firstRow) return; // We have a first row: assume it's the header, and make its contents clickable links for (var i=0;i'+txt+'  ↓'; } } if (alternate_row_colors) { alternate(t); } } function ts_getInnerText(el) { if (typeof el == "string") return el; if (typeof el == "undefined") { return el }; if (el.innerText) return el.innerText; //Not needed but it is faster var str = ""; var cs = el.childNodes; var l = cs.length; for (var i = 0; i < l; i++) { switch (cs[i].nodeType) { case 1: //ELEMENT_NODE str += ts_getInnerText(cs[i]); break; case 3: //TEXT_NODE str += cs[i].nodeValue; break; } } return str; } function ts_resortTable(lnk, clid) { var span; for (var ci=0;ci