Java Script added to sort buttons