var tips; var thetop = 0; var old = thetop; var tips1; var thetop1 = 0; var old1 = thetop1; var tips2; var thetop2 = 0; var old2 = thetop2; window.onload = function () { var current = 0; var timer; function getdate(){ initfloattips(); initfloattips1(); }; function initfloattips() { tips = document.getelementbyid('ad1'); movetips(); }; function movetips() { var tt = 50; if (window.innerheight) { pos = window.pageyoffset; } else if (document.documentelement && document.documentelement.scrolltop) { pos = document.documentelement.scrolltop; } else if (document.body) { pos = document.body.scrolltop; } pos = pos - tips.offsettop + thetop; pos = tips.offsettop + pos / 10; if (pos < thetop) pos = thetop; if (pos != old) { tips.style.top = pos + "px"; tt = 10; } old = pos; settimeout(movetips, tt); }; function initfloattips1() { tips1 = document.getelementbyid('ad2'); movetips1(); }; function movetips1() { var tt1 = 90; if (window.innerheight) { pos1 = window.pageyoffset+300; } else if (document.documentelement && document.documentelement.scrolltop) { pos1 = document.documentelement.scrolltop; } else if (document.body) { pos1 = document.body.scrolltop; } pos1 = pos1 - tips1.offsettop + thetop1; pos1 = tips1.offsettop + pos1 / 10; if (pos1 < thetop1) pos1 = thetop1+300; if (pos1 != old1) { tips1.style.top = pos1+300 + "px"; tt1 = 50; } old1 = pos1; settimeout(movetips1, tt1); };