Code
< Script Type = " Text/JavaScript " >
Function hidead ()
{Document. getelementbyid ( " Ad " ). Style. Display = " None " ;}
</ Script >
< Div ID = " Ad " Style = " Position: absolute " >
< A href = " # " Target = " _ Blank " >
< IMG SRC = " 38. gif " Width = " 200 " Border = " 0 " >
</ A >
< Div onclick = " Hidead (); " Style = " Font-size: 9pt; cursor: Hand " Align = Right > Close advertisement × </ Div > </ Div >
< Script >
VaR x = 50 , Y = 60
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 < L) {Xin = True ; X = L}
If (X > R) {Xin = False ; X = R}
Y = Y + Step * (Yin ? 1 : - 1 )
If (Y < T) {Yin = True ; Y = T}
If (Y > B) {Yin = False ; Y = B}
}
VaR itl = Setinterval ( " Floatad () " , Delay)
OBJ. onmouseover = Function () {clearinterval (ITL )}
OBJ. onmouseout = Function () {itl = Setinterval ( " Floatad () " , Delay )}
</ Script >