Lt; Script type = "text/JavaScript" gt;
Function hidead()
{document.getelementbyid ("ad") .style.display = "none"; }
Lt; /스크립트 gt;
Lt; Div id = "ad" style = "position: absolute" gt;
Lt; ! --광고 코드 배치---gt;; Lt; Div onclick = "hidead ();" Style = "font-size: 9pt; Cursor: hand "align = rightgt; 광고 닫기 × lt; /div gt; Lt; /div gt;
Lt; 스크립트 gt;
Var x = 80, y = 80
Var Xin = true, yin = true
Var step = 1
Var delay = 1
Var obj = document.getelementbyid ("ad")
Function floatAD() {
Var L=T=0
Var r = document.body.clientwidth-obj.offsetwidth
Var b = document.body.clientheight-obj.offsetheight
Obj.style.left = x+document.body.scrollleft
Obj.style.top = y+document.body.scrolltop
X = x+step*(xin? 1:-1)
If (x lt;; L) {Xin = true; X = L}
If (x gt;; R) {Xin = false; X = R}
Y = y+step*(yin? 1:-1)
If (y lt;; T) {yin = true; Y = T }
If (y gt;; B) {yin = false; Y = B }
}
Var itl= setInterval("floatAD () ",delay)
Obj.onmouseover = function () {clearinterval (ITL)}
Obj.onmouseout = function () {ITL = setinterval ("floatad ()", delay)}
Lt; /스크립트 gt;