//	EarthQuake script- © Dynamic Drive (www.dynamicdrive.com)
//configure the likelihood that an earthquake will occur (100% means always)
var chance_of_occurence="100%"
/////do NOT edit below this line/////////////
//variable used to store the equivalency of the 10 rector scales (in the form of 1, 3, 6...etc)
var rectorscale=new Array(1,3,6,9,12,15,18,21,24,27)
chance_of_occurence=parseInt(chance_of_occurence)
function earthquake(){
	//randomly assign a number from 1 to 10 to variable rectorindex
	rectorindex=Math.floor(Math.random()*10)
	//randomly assign one of element rectorscale into variable rector
	rector=rectorscale[rectorindex]
	//shake the browser's screen according to the random rector scale!
	for (i=0;i,i<20;i++){
		top.window.moveBy(0,rector)
		top.window.moveBy(rector,0)
		top.window.moveBy(0,-rector)
		top.window.moveBy(-rector,0)
	}
}
