/* jshint eqeqeq: false */ /* jshint evil: true */ /* jshint -W041, -W098, -W117, -W120 */ /** * ページ先頭へスクロール */ function ReturnToTop() { var w = window, d = document.documentElement || document.body; var x = Math.max(d.scrollLeft || 0, w.scrollX || 0); var y = Math.max(d.scrollTop || 0, w.scrollY || 0); w.scrollTo(Math.floor(x / 1.25), Math.floor(y / 1.25)); if (x > 0 || y > 0) { w.setTimeout("ReturnToTop()", 25); } }