팝업창 스크립트
메인 윈도우 스크립트
var min = 350; // 레이어 top 초기 값 (레이어 top 값과 일치시킴)
var max = 0;
var moving_speed = 10 // 속도(낮을 수록 빠름)
var moving_amount = 10 // 움직임 (낮을 수록 부드러움)
var action_time = 500 // 반응시간 (*/1000 초 후에 반응)
function left_move_init() {
itm = document.getElementById("topButton");
//itm.set_pos = function(y){itm.style.top=y;}; 파폭에서 안됨
itm.set_pos = function(y){itm.style.top=y+"px";};
itm.y = min;
itm.set_pos(itm.y);
max = document.body.scrollHeight - itm.scrollHeight - min;
setTimeout("left_move_func()", moving_amount);
}
function left_move_func() {
tmp = document.body.scrollTop + min;
itm.y += Math.floor((tmp-itm.y)/moving_speed);
if( itm.y>max ) itm.y = max;
if( itm.y
function getStringLength(str){
return(str.length+(escape(str)+"%u").match(/%u/g).length-1);
}