묻고답하기

레이어 위치 고정 자바스크립트는 아는데요..

그 명령어를 다 외우기는 어려운데..

드림위버에서 명령어 안치고 바로 하는 방법 없나요?

아래는 레이어고정 자바스크립트 입니다..


<script language="JavaScript">
<!--

self.onError=null;
currentX = currentY = 0;  
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
action = window.setInterval("heartBeat()",1);


function heartBeat() {

// combowidth=layer_right_bottom.offsetWidth
// comboheight=layer_right_bottom.offsetHeight

        diffY = document.body.scrollTop;
        diffX = 0;
        if (diffY != lastScrollY) {
                percent = .2 * (diffY - lastScrollY);
                if (percent > 0) {
                        percent = Math.ceil(percent);
                } else {
                        percent = Math.floor(percent);
                }
                document.all.layer_right.style.pixelTop += percent;
//                document.all.layer_right_bottom.style.pixelTop = document.body.scrollTop+document.body.clientHeight-comboheight+percent-50;
                lastScrollY = lastScrollY + percent;
        }
        if (diffX != lastScrollX) {
                percent = .2 * (diffX - lastScrollX);
                if (percent > 0) {
                        percent = Math.ceil(percent);
                } else {
                        percent = Math.floor(percent);
                }
                document.all.layer_right.style.pixelLeft += percent;
//                document.all.layer_right_bottom.style.pixelLeft += percent;
                lastScrollY = lastScrollY + percent;
        }        
}        
//-->
</script>

<div id="layer_right" style="width:165px; height:347px; position:absolute; left:781px; top:100px; z-index:10; visibility:visible;">
<table border='0' cellpadding='0' cellspacing='1' width='165'>
    <tr>
        <td align='right' height='50'>
                        <p><a href='클릭시 이동할 주소'  onfocus='this.blur()'><img src="원하는 그림" border='1' alt='날으는 돼지임당'></a></p>
                </td>
    </tr>
</table>
</div>