lastscrolly = 0; function plug_qq(){ var diffy; if (document.documentelement && document.documentelement.scrolltop) diffy = document.documentelement.scrolltop; else if (document.body) diffy = document.body.scrolltop else {} percent=.1*(diffy-lastscrolly); if(percent>0)percent=math.ceil(percent); else percent=math.floor(percent); document.getelementbyid("plugqq").style.top = parseint(document.getelementbyid("plugqq").style.top)+percent+"px"; lastscrolly=lastscrolly+percent; } window.setinterval("plug_qq()",1);