function floatAdv(objname,step) { var adv_x = "adv_x_"+objname; var adv_y = "adv_y_"+objname; var adv_xin = "adv_xin_"+objname; var adv_yin = "adv_yin_"+objname; 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 = window[adv_x] + document.body.scrollLeft + 'px'; obj.style.top = window[adv_y] + document.body.scrollTop + 'px'; window[adv_x] = window[adv_x] + step*(window[adv_xin]?1:-1); if (window[adv_x] < L) { window[adv_xin] = true; window[adv_x] = L;} if (window[adv_x] > R){ window[adv_xin] = false; window[adv_x] = R;} window[adv_y] = window[adv_y] + step*(window[adv_yin]?1:-1); if (window[adv_y] < T) { window[adv_yin] = true; window[adv_y] = T;} if (window[adv_y] > B) { window[adv_yin] = false; window[adv_y] = B;} } function showAdv(step,id,delay){ var adv_x = "adv_x_"+id; var adv_y = "adv_y_"+id; var adv_xin = "adv_xin_"+id; var adv_yin = "adv_yin_"+id; window.window[adv_x]=Math.random()*100; window.window[adv_y]=Math.random()*100; window.window[adv_xin]=true; window.window[adv_yin]=true; var itl= setInterval("floatAdv('"+id+"',"+step+")", delay); var obj=document.getElementById(id); obj.onmouseover=function(){clearInterval(itl);}; obj.onmouseout=function(){itl=setInterval("floatAdv('"+id+"',"+step+")", delay)}; } function hiddenAdv(obj){ obj.style.display="none"; } document.write('
关闭

');showAdv(1,'floatadv_ecd69402909a45e2b985115fd2bf7439',20);