Replacing the isrelated function seems to have stopped the error in firefox. thanks.
(*) Discounts available for the above products!