Javascript filtering of the table view