function sort() { var items = document.getElementById("items"); for(var i=1,length=items.cells.length;i