Moved javascript in inventory.html to external file.