var isie6 = window.xmlhttprequest ? false : true; function newtoponload() { var c = document.getelementbyid("top"); function b() { var a = document.documentelement.scrolltop || window.pageyoffset || document.body.scrolltop; if (a > 0) { if (isie6) { c.style.display = "none"; cleartimeout(window.show); window.show = settimeout(function () { var d = document.documentelement.scrolltop || window.pageyoffset || document.body.scrolltop; if (d > 0) { c.style.display = "block"; c.style.top = (400 + d) + "px" } }, 300) } else { c.style.display = "block" } } else { c.style.display = "none" } } if (isie6) { c.style.position = "absolute" } window.onscroll = b; b() } if (window.attachevent) { window.attachevent("onload", newtoponload) } else { window.addeventlistener("load", newtoponload, false) } document.getelementbyid("top").onclick = function () { window.scrollto(0, 0) };