更多>>

特色专业

var ad=new AdMove("Div2"); ad.Run(); */ //////////////////////////////////////////////////////// var AdMoveConfig = new Object(); AdMoveConfig.IsInitialized = false; AdMoveConfig.AdCount = 0; AdMoveConfig.ScrollX = 0; AdMoveConfig.ScrollY = 0; AdMoveConfig.MoveWidth = 0; AdMoveConfig.MoveHeight = 0; AdMoveConfig.Resize = function () { var winsize = GetPageSize(); AdMoveConfig.MoveWidth = winsize[2]; AdMoveConfig.MoveHeight = winsize[3]; AdMoveConfig.Scroll(); }; AdMoveConfig.Scroll = function () { var winscroll = getPageScroll(); AdMoveConfig.ScrollX = winscroll[0]; AdMoveConfig.ScrollY = winscroll[1]; }; addEvent(window, "resize", AdMoveConfig.Resize); addEvent(window, "scroll", AdMoveConfig.Scroll); function AdMove(id, addCloseButton) { if (!AdMoveConfig.IsInitialized) { AdMoveConfig.Resize(); AdMoveConfig.IsInitialized = true; } AdMoveConfig.AdCount++; var obj = document.getElementById(id); obj.style.position = "absolute"; var W = AdMoveConfig.MoveWidth - obj.offsetWidth; var H = AdMoveConfig.MoveHeight - obj.offsetHeight; var x = W * Math.random(), y = H * Math.random(); var rad = (Math.random() + 1) * Math.PI / 6; var kx = Math.sin(rad), ky = Math.cos(rad); var dirx = (Math.random() W) { dirx = -1; x = W; kx = Math.sin(rad); ky = Math.cos(rad); } y = y + step * ky * diry; if (y H) { diry = -1; y = H; kx = Math.sin(rad); ky = Math.cos(rad); } }; this.SetLocation = function (vx, vy) { x = vx; y = vy; } this.SetDirection = function (vx, vy) { dirx = vx; diry = vy; } this.Run = function () { var delay = 20; interval = setInterval(obj.MoveHandler, delay); obj.onmouseover = function () { clearInterval(interval); } obj.onmouseout = function () { interval = setInterval(obj.MoveHandler, delay); } }; } // window.onload = function () { var alltabs = document.getElementById('tabs').getElementsByTagName('dl'); for (var i = 0; i