Update js/m2.functions.js fixes #65