try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {} function open_close() { var sidebar_all = document.getElementById('sidebar_all'); var obj_sidebar = document.getElementById('sidebar'); var btn_open = document.getElementById('sidebar_open'); var btn_close = document.getElementById('sidebar_close'); btn_open.onclick = function() { btn_open.style.display='none'; obj_sidebar.style.display='block'; btn_close.style.display='inline'; sidebar_all.style.height = 'auto'; } btn_close.onclick = function() { btn_close.style.display ='none'; btn_open.style.display ='inline'; obj_sidebar.style.display ='none'; sidebar_all.style.height = '19px'; } } function A2YSlide(name,id,range,sec,tb,margin){ this.name = name; this.obj = document.getElementById(id); this.range = range; this.sec = sec; this.tb = tb; this.margin = margin; this.Timer(); } A2YSlide.prototype.Move = function A2YSlide_Move(fix_y){ objY = parseInt(this.obj.style.top); if(objY != fix_y){ this.obj.style.top = (objY + this.GetMoveValue(objY,fix_y)) + 'px'; } this.Timer(); } A2YSlide.prototype.GetMoveValue = function A2YSlide_GetMoveValue(start, end){ return (end - start) * this.range; } A2YSlide.prototype.GetDocTnB = function A2YSlide_GetDocTnB(bTB){ return ((bTB)?document.documentElement.clientHeight:0) + document.documentElement.scrollTop; } A2YSlide.prototype.Timer = function A2YSlide_Timer(){ setTimeout(this.name + '.Move('+(this.GetDocTnB(this.tb)+this.margin)+')',this.sec); } function A2Wzd_YSlide(id,range,sec,tb,margin){ eval('C'+id+" = new A2YSlide('C"+id+"','"+id+"',"+range+","+sec+","+tb+","+margin+');'); } function scroll_ing() { A2Wzd_YSlide('paging',0.2,10,0,220); } if (typeof window.addEventListener != 'undefined') { window.addEventListener("load", open_close, false); window.addEventListener("load", scroll_ing, false); } else if (typeof window.attachEvent != 'undefined') { window.attachEvent("onload", open_close); window.attachEvent("onload", scroll_ing); }

티스토리 툴바