passing event into function for firefox