context: function hop_sorttable_sort( lnk ) {   var td = lnk.parentNode;   var arrow = lnk.lastChild;   var column = td.cellIndex;   var table = get_parent( td, 'TABLE' );   if( table.rows.length <= 1 ) return;   SORT_COLUMN_INDEX = column;   var newRows = new Array();   var itm = hop_sorttable_getInnerText( table.rows[1].cells[ column ] );       for( j = 1; j < table.rows.length; j++ ) {      var o = new Object();      var l = table.rows[ j ].cells[ column ].getAttribute( "lang" );      if( typeof l == "string" ) {	 o.key = l;	 itm = false;      } else {	 o.key = hop_sorttable_getInnerText( table.rows[ j ].cells[ column ] );      }      o.val = table.rows[ j ];      newRows[ j - 1 ] = o;   }       if( !itm ) {      newRows.sort( hop_sorttable_sort_default );   } else {      if( itm.match(/^[\d\.]+$/) ) {	 newRows.sort( hop_sorttable_sort_numeric );      } else {	 newRows.sort( hop_sorttable_sort_default );      }   }       if( lnk.getAttribute( "sortdir" ) != 'down' ) {      newRows.reverse();      arrow.innerHTML = "&#8593;";      lnk.setAttribute( 'sortdir', 'down' );   } else {      arrow.innerHTML = "&#8595;";      lnk.setAttribute( 'sortdir', 'up' );   }       for( i = 0; i < newRows.length; i++ ) {      table.tBodies[ 0 ].appendChild( newRows[ i ].val );   }}
meta: 4636	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/50d23244ae8f05017ea74699cae93b1b1fcadba6/hop-sorttable.js/buggy/share/hop-sorttable.js