javascript working for Firefox