Designed by QDesigns <!-- This script has been in the http://www.javascripts.com Javascript Public Library! --> <!-- Note that though this material may have been in a public depository, certain author copyright restrictions may apply. --> <html> <head> <title>EarthQuake</title> <SCRIPT LANGUAGE="JavaScript1.2"> function shake_xy(n) { if(n==''){ alert('Please enter a value on the Richter Scale') } if (self.moveBy) { for (i = 10; i > 0; i--) { for (j = n; j > 0; j--) { self.moveBy(0,i); self.moveBy(i,0); self.moveBy(0,-i); self.moveBy(-i,0); } } } } function shake_x(n) { if(n==''){ alert('Please enter a value on the Richter Scale') } if (self.moveBy) { for (i = 10; i > 0; i--) { for (j = n; j > 0; j--) { self.moveBy(i,0); self.moveBy(-i,0); } } } } function shake_y(n) { if(n==''){ alert('Please enter a value on the Richter Scale') } if (self.moveBy) { for (i = 10; i > 0; i--) { for (j = n; j > 0; j--) { self.moveBy(0,i); self.moveBy(0,-i); } } } } //--> </SCRIPT> </head> <body onLoad="shake_x(3)"> <form name="form"> Richter Scale: <input name="intensity" size="1" maxlength="1"><br> </form> <button onClick="shake_xy(document.form.intensity.value)">Mayhem (my favorite)</button><br> <button onClick="shake_x(document.form.intensity.value)">Side 2 Side</button><br> <button onClick="shake_y(document.form.intensity.value)">Up & Down</button> <p>Designed by <a href="http://www.qdesigns.cjb.net">QDesigns</a> </body> </html>