Русский
<!-- http://www.downcodes.com --> <!-- bbs http://bbs.downcodes.com --> <!--Требуется 2 шага: Первый шаг: добавьте следующий код в < head>В области -> <head><style type="text/css"> #floater {позиция: абсолютное слева: 500; ширина: 125; видимость: z-index: 10; </style> </head> <!-Второй шаг — добавить следующий код в область <body> --> <body> <div ID="floater" style="left: 590px; top: 158px "> <p align="center"><img SRC="/u/info_img/2009-06/20/8044_logo.gif" alt="Добро пожаловать в Академию создания веб-сайтов" WIDTH="125" HEIGHT="60" " ><br> <font color="#FF8040">Академия создания веб-сайтов</font></p> </div><script LANGUAGE="JavaScript"> self.onError=null; currentX = currentY = 0; thatIt = null ;lastScrollX = 0;lastScrollY = 0; NS = (document.layers) ? 1: 0; IE = (document.all) ? <!-- СТАЛКЕР-КОД --> функция heartBeat() { if (IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != LastScrollY) { процент = . 1 * (diffY - LastScrollY); if(percent > 0) процент = Math.ceil(percent); else процент = Math.floor(percent); if(IE) document.all.floater.style.pixelTop += процент; if( NS) document.floater.top += процент; (процент); else процент = Math.floor(percent); if(IE) document.all.floater.style.pixelLeft += процент; if(NS) document.floater.left += процент; } } <!-- /STALKER CODE --> <!-- DRAG DROP CODE --> function checkFocus(x,y) { salterx = document.floater.pageX; saltery = document.floater.pageY; floater. clip.width; salterheight = document.floater.clip.height; if( (x > Stalkerx && x < (stalkerx+stalkerwidth)) && (y > Stalkery && y < (stalkery+stalkerheight))) return true; return false } function GrabIt(e) { if(IE) { WhichIt = event.srcElement; while (whatIt.id.indexOf("floater") == -1) { WhichIt = thatIt.parentElement; if (thatIt ==) null) { return true; } } thatIt.style.pixelLeft = thatIt.offsetLeft; thatIt.style.pixelTop = thatIt.offsetTop; currentX = (event.clientX + document.body.scrollLeft); currentY = (event.clientY + document). .body .scrollTop); } else { window.captureEvents(Event.MOUSEMOVE); if(checkFocus (e.pageX,e.pageY)) { WhichIt = document.floater; e.pageX-document.floater.pageX; StalkerTouchedY = e.pageY-document.floater.pageY; } } return true; } function moveIt(e) { if (thatIt == null) { return false } if (IE) { newX = (event.clientX + document. body.scrollLeft); newY = (event.body.scrollTop); distanceX = (newX - currentX); currentX = newX; thatIt.style.pixelLeft += distanceX; thatIt.style.pixelTop += distanceY; if(whatIt.style.pixelTop < document.body.scrollTop) thatIt.style.pixelTop = document.body.scrollTop; if(whatIt.style.pixelLeft < document.body.scrollTop); ) thatIt .style.pixelLeft = document.body.scrollLeft; if(whatIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - thatIt.style.pixelWidth - 20) thatIt.style.pixelLeft = document.body .offsetWidth - thatIt.style.pixelWidth - 20; if(whatIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - thatIt.style.pixelHeight - 5) thatIt.style.pixelTop = document.body.offsetHeight + document .body.scrollTop - thatIt.style.pixelHeight - 5; event.returnValue = false; } else { thatIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY); if(whatIt.left < 0+self); .pageXOffset ) thatIt.left = 0+self.pageXOffset; if(whatIt.top < 0+self.pageYOffset) thatIt.top = 0+self.pageYOffset; if( (whatIt.left + thatIt.clip.width) >= (window .innerWidth+self.pageXOffset-17)) thatIt.left = ((window.innerWidth+self.pageXOffset)-thatIt.clip.width)-17; if( (whatIt.top + WhichIt.clip.height) > = ( window.innerHeight+self.pageYOffset-17)) thatIt.top = ((window.innerHeight+self.pageYOffset)-whatIt.clip.height)-17 } return false } function dropIt() {; thatIt = null; if(NS) window.releaseEvents (Event.MOUSEMOVE); return true } <!-- ПЕРЕТАЧИВАНИЕ КОДА --> if(NS) { window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN); .onmousedown = GrabIt; = окно .setInterval("heartBeat()",1); </script> </boyd>;