Implementation of feature request 1410. Firefox fix in javascript file