document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera document.body.scrollTop = 0; // For Safari
yOffset = window.pageYOffset;
window.scrollTo(xCoord, yCoord);