top.js 709 B

123456789101112131415161718192021222324
  1. <!--
  2. function KB_keepItInIE(theName,theWantTop,theWantLeft) {
  3. theRealTop=parseInt(document.body.scrollTop)
  4. theTrueTop=theWantTop+theRealTop
  5. document.all[theName].style.top=theTrueTop
  6. theRealLeft=parseInt(document.body.scrollLeft)
  7. theTrueLeft=theWantLeft+theRealLeft
  8. document.all[theName].style.left=theTrueLeft
  9. }
  10. function KB_keepItInNN(theName,theWantX,theWantY) {
  11. theRealLay=document.layers[theName]
  12. theBadX=self.pageYOffset
  13. theBadY=self.pageXOffset
  14. theRealX=theBadX+theWantX
  15. theRealY=theBadY+theWantY
  16. theRealLay.moveTo(theRealY,theRealX)
  17. }
  18. IE4=(document.all)?1:0
  19. NN4=(document.layers)?1:0
  20. if (IE4)
  21. setInterval('KB_keepItInIE("KBStatic",0,0)',1)
  22. if (NN4)
  23. setInterval('KB_keepItInNN("KBStatic",0,0)',1)
  24. //-->