Код выглядит так
function getClientHeight(){
return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
function getBodyScrollTop(){
return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}
function getClientCenterY(){
return parseInt(getClientHeight()/2)+getBodyScrollTop();
}
function scrollEvent() {
document.getElementById("button").style.top = getClientCenterY()-60;
document.getElementById("button").style.left = 0;
}