Sorry about the cutoff, I had to shorten it to 10,000 chars.HTML Code:<script type="text/javascript"> var xobjectsize = 144 var yobjectsize = 52 var xstep = (Math.round(Math.random(new Date().getMilliseconds()))*600)-300 var ystep = 600 var degstep = 2 var xstepsize = "big" var ystepsize = "big" var circledeg = -90 var clicked = "no" if (typeof document.body.scrollTop !== "undefined") { imagescrollpos = document.body.scrollTop-2000 heightwindow = document.body.offsetHeight widthwindow = document.body.offsetWidth } if (typeof window.pageYOffset !== "undefined") { imagescrollpos = window.pageYOffset-2000 heightwindow = innerHeight widthwindow = innerWidth } function circledraw() { var circlerad = (circledeg*(2*Math.PI/360))*degstep var sindraw=Math.round(Math.sin(circlerad)*ystep)+(heightwindow/2)-(xobjectsize/2) var cosdraw=Math.round(Math.cos(circlerad)*xstep)+(widthwindow/2)-(xobjectsize/2) if (typeof document.body.scrollTop !== "undefined") { scrolloffset = document.body.scrollTop heightwindow = document.body.offsetHeight widthwindow = document.body.offsetWidth } if (typeof window.pageYOffset !== "undefined") { scrolloffset = window.pageYOffset heightwindow = innerHeight widthwindow = innerWidth } if (imagescrollpos<scrolloffset) { imagescrollpos += (Math.ceil((scrolloffset-imagescrollpos)/50)) } if (imagescrollpos>scrolloffset) { imagescrollpos -= (Math.ceil((imagescrollpos-scrolloffset)/50)) } var es = document.getElementById("spaceship") es.style.visibility = "visible" es.style.left=cosdraw es.style.top=sindraw + imagescrollpos liftoff = sindraw + imagescrollpos wobble = cosdraw circledeg++ if (xstep>=widthwindow/2) { xstepsize = "small" } if (ystep>=heightwindow/2) { ystepsize = "small" } if (xstep<=-widthwindow/2) { xstepsize = "big" } if (ystep<=-heightwindow/2) { ystepsize = "big" } if (xstepsize=="big") { xstep++ } else { xstep-- } if (ystepsize=="big") { ystep++ } else { ystep-- } if (clicked=="no") { setTimeout(circledraw, 50) } } setTimeout(circledraw, 1000) function goaway() { clicked = "yes" var es = document.getElementById("spaceship") es.style.top = liftoff es.style.left = wobble + Math.round(Math.random(new Date().getMilliseconds())*20)-10 liftoff-=5 if (liftoff>=-100) { setTimeout(goaway, 50) } else { es.style.visibility = "hidden" } } </script> <script type="text/javascript"> document.write('<div id="body">'); for (ytesttext=1 ; ytesttext <=2000 ; ytesttext++) { document.write("Test text " + ytesttext + " the webpage goes here, the webpage goes here, the webpage goes here, the webpage goes here, the webpage goes here, the webpage goes here. <br>") } document.write('</div>'); </script></body></html>(Why do they have that requirement?)
I haven't tried it yet and it disables the horizontal scrollbar.
The second code comes after the first.![]()



(Why do they have that requirement?) 

Reply With Quote
Bookmarks