function zxcWWHS(){
if (document.all){
zxcCur='hand';
zxcWH=document.documentElement.clientHeight;
zxcWW=document.documentElement.clientWidth;
zxcWS=document.documentElement.scrollTop; //ie trans & strict
if (zxcWH==0){
zxcWS=document.body.scrollTop; //ie trans & strict
zxcWH=document.body.clientHeight;
zxcWW=document.body.clientWidth;
}
}
else if (document.getElementById){
zxcCur='pointer';
zxcWH=window.innerHeight;
zxcWW=window.innerWidth;
zxcWS=window.pageYOffset;
}
zxcWC=Math.round(zxcWW/2);
return [zxcWW,zxcWH,zxcWS];
}

function zxcScrollTop(){
zxcS=0;
if (!document.all){ zxcST=window.pageYOffset; }
else if (!document.body.scrollTop){ zxcST=document.documentElement.scrollTop; }
else { zxcST=document.body.scrollTop; }
gtts.top=(zxcST+zxcWWHS()[1]-gtt.offsetHeight)+'px';
return zxcST;

}

window.onscroll=zxcScrollTop;

function gttPosition(){
gtt=document.getElementById('GotoTop');
gtts=gtt.style;
gtts.left=(zxcWWHS()[0]-gtt.offsetWidth-20)+'px';
//or the distance left you require
zxcScrollTop();
}

function Top(){
window.scroll(0,0);

}