rewrite js-functions not supported by IE8