var adv_x=50,adv_y=60,adv_xin=true,adv_yin=true; function floatAdv(objname,step) { var obj=document.getElementById(objname); var L=T=0; var R= document.documentElement.clientWidth-obj.offsetWidth; var B = document.documentElement.clientHeight-obj.offsetHeight; obj.style.left = adv_x + document.body.scrollLeft + 'px'; obj.style.top = adv_y + document.body.scrollTop + 'px'; adv_x = adv_x + step*(adv_xin?1:-1); if (adv_x < L) { adv_xin = true; adv_x = L;} if (adv_x > R){ adv_xin = false; adv_x = R;} adv_y = adv_y + step*(adv_yin?1:-1); if (adv_y < T) { adv_yin = true; adv_y = T;} if (adv_y > B) { adv_yin = false; adv_y = B;} } function showAdv(step,delay){ var obj=document.getElementById("floatadv"); var itl= setInterval("floatAdv('floatadv',"+step+")", delay); obj.onmouseover=function(){clearInterval(itl);}; obj.onmouseout=function(){itl=setInterval("floatAdv('floatadv',"+step+")", delay)}; } function hiddenAdv(obj){ obj.style.display="none"; } document.write('
关闭

');showAdv(1,20);