added code for interoperability with Mozilla browsers