Traversing an HTML table with JavaScript and DOM Interfaces