Index: trunk/sorttable-klask.js
===================================================================
--- trunk/sorttable-klask.js	(revision 344)
+++ trunk/sorttable-klask.js	(revision 355)
@@ -4,5 +4,5 @@
   7th April 2007
   Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
-  
+
   Instructions:
   Download this file
@@ -10,5 +10,5 @@
   Add class="sortable" to any table you'd like to make sortable
   Click on the headers to sort
-  
+
   Thanks to many, many people for contributions and suggestions.
   Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
@@ -16,5 +16,5 @@
 */
 
- 
+
 var stIsIE = /*@cc_on!@*/false;
 
@@ -27,9 +27,9 @@
     // kill the timer
     if (_timer) clearInterval(_timer);
-    
+
     if (!document.createElement || !document.getElementsByTagName) return;
-    
+
     sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
-    
+
     forEach(document.getElementsByTagName('table'), function(table) {
       if (table.className.search(/\bsortable\b/) != -1) {
@@ -37,7 +37,7 @@
       }
     });
-    
-  },
-  
+
+  },
+
   makeSortable: function(table) {
     if (table.getElementsByTagName('thead').length == 0) {
@@ -50,7 +50,7 @@
     // Safari doesn't support table.tHead, sigh
     if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
-    
+
     if (table.tHead.rows.length != 1) return; // can't cope with two header rows
-    
+
     // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
     // "total" rows, for example). This is B&R, since what you're supposed
@@ -74,5 +74,5 @@
       delete sortbottomrows;
     }
-    
+
     // work through each column and calculate its type
     headrow = table.tHead.rows[0].cells;
@@ -93,5 +93,5 @@
 
           if (this.className.search(/\bsorttable_sorted\b/) != -1) {
-            // if we're already sorted by this column, just 
+            // if we're already sorted by this column, just
             // reverse the table, which is quicker
             sorttable.reverse(this.sorttable_tbody);
@@ -106,5 +106,5 @@
           }
           if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
-            // if we're already sorted by this column in reverse, just 
+            // if we're already sorted by this column in reverse, just
             // re-reverse the table, which is quicker
             sorttable.reverse(this.sorttable_tbody);
@@ -118,5 +118,5 @@
             return;
           }
-          
+
           // remove sorttable_sorted classes
           theadrow = this.parentNode;
@@ -131,5 +131,5 @@
           sortrevind = document.getElementById('sorttable_sortrevind');
           if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); }
-          
+
           this.className += ' sorttable_sorted';
           sortfwdind = document.createElement('span');
@@ -152,5 +152,5 @@
 	        /* and comment out this one */
 	        row_array.sort(this.sorttable_sortfunction);
-	        
+
 	        tb = this.sorttable_tbody;
 // gabriel
@@ -160,5 +160,5 @@
         // gabriel
 if ( memory != row_array[j][0] ) {
-  memory = row_array[j][0];  
+  memory = row_array[j][0];
   color = color =="odd" ? "even" : "odd";
   }
@@ -167,5 +167,5 @@
 	          tb.appendChild(row_array[j][1]);
 	        }
-	        
+
 	        delete row_array;
 	      });
@@ -173,5 +173,5 @@
     }
   },
-  
+
   guessType: function(table, column) {
     // guess the type of a column based on its first non-blank row
@@ -183,5 +183,5 @@
           return sorttable.sort_numeric;
         }
-        // check for a date: dd/mm/yyyy or dd/mm/yy 
+        // check for a date: dd/mm/yyyy or dd/mm/yy
         // can have / or . or - as separator
         // can be mm/dd as well
@@ -206,5 +206,5 @@
     return sortfn;
   },
-  
+
   getInnerText: function(node) {
     // gets the text we want to use for sorting for a cell.
@@ -213,8 +213,8 @@
     // for example, you can override the cell text with a customkey attribute.
     // it also gets .value for <input> fields.
-    
+
     hasInputs = (typeof node.getElementsByTagName == 'function') &&
                  node.getElementsByTagName('input').length;
-    
+
     if (node.getAttribute("sorttable_customkey") != null) {
       return node.getAttribute("sorttable_customkey");
@@ -251,5 +251,5 @@
     }
   },
-  
+
   reverse: function(tbody) {
     // reverse the rows in a tbody
@@ -263,5 +263,5 @@
     delete newrows;
   },
-  
+
   /* sort functions
      each sort function takes two parameters, a and b
@@ -270,5 +270,5 @@
     aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));
     if (isNaN(aa)) aa = 0;
-    bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); 
+    bb = parseFloat(b[0].replace(/[^0-9.-]/g,''));
     if (isNaN(bb)) bb = 0;
     return aa-bb;
@@ -309,5 +309,5 @@
     return 1;
   },
-  
+
   shaker_sort: function(list, comp_func) {
     // A stable sort function to allow multi-level sorting of data
@@ -339,5 +339,5 @@
 
     } // while(swap)
-  }  
+  }
 }
 
