广东11选5

海门教育信息网

-->

var ggad = { ad: document.getElementById("ad"), speed: 20, statusX: 1, statusY: 1, x: 100, y: 300, winW: document.documentElement.clientWidth - document.getElementById("ad").offsetWidth, winH: document.documentElement.clientHeight - document.getElementById("ad").offsetHeight, Go: function () { this.ad.style.left = this.x + 'px'; this.ad.style.top = this.y + 'px'; this.x = this.x + (this.statusX ? -1 : 1) if (this.x < 0) { this.statusX = 0 } if (this.x > this.winW) { this.statusX = 1 } this.y = this.y + (this.statusY ? -1 : 1) if (this.y < 0) { this.statusY = 0 } if (this.y > this.winH) { this.statusY = 1 } } } var interval = setInterval("ggad.Go()", ggad.speed); ggad.ad.onmouseover = function () { clearInterval(interval) }; ggad.ad.onmouseout = function () { interval = setInterval("ggad.Go()", ggad.speed) };