defined functions pre Ajax call for FF