Inventory object: cross-browser, code cleanup

Changed the cross browser inv code to work with the new inventory
object.  Cleaned up some code: deleted dead stuff and commented out
some globals.