<SCRIPT LANGUAGE="JavaScript">
////////////////////////VARIABLES
//Verander hier de variables
var speed = 1 //Snelheid van aardbeving (Minder is sneller)
var ecount = 100 //Hoe lag de aardbeving standhoud
var violence = 50 //Hoe gewelddadig de aardbeving is
var T = 0; //counter variable
var num_x; //X movement
var num_y; //Y movement
var positivity_x; //positivity of X movement
var positivity_y; //positivity of Y movement
/////////////////////////RANDOM NUMBERS FUNCTION USED FOR MOVEMENT
function randomnums() //creates two random numbers, num_x & num_y
{
positivity_x
= Math
.round(Math
.random
()); //positive or negative num_xpositivity_y
= Math
.round(Math
.random
()); //positive or negative num_ynum_x
= Math
.round(violence
* Math
.random
()); //X movementnum_y
= Math
.round(violence
* Math
.random
()); //Y movement
if (positivity_x == 1){ //positive or negative X
}
else
{
num_x = -num_x;
}
if (positivity_y == 1){ //positive or negative Y
}
else
{
num_y = -num_y;
}
}
////////////////////////////////////MAIN FUNCTION
function equake() {
if (T >= ecount) {stop = true}
else {
setTimeout("window.moveBy(-num_x,-num_y)", speed);
randomnums(); //MAKE FRESH RANDOM NUMS USING FUNCTION
//choose one:
//window.resizeBy(num_x,num_y)//resize BROWSER BY (X,Y)
setTimeout("window.moveBy(num_x,num_y)", -speed);//MOVE BROWSER BY (X,Y)
//self.scroll(num_x,num_y); //SCROLL (X,Y)
T
= eval(T
+ 1); //add one to timer setTimeout("equake()", speed); //speed OF EARTHQUAKE
}
}
//////////////////////////////////
</SCRIPT>
<!-- Dit is de boodschap
die de bezoeker krijgt
, in de body tags
-->
<SCRIPT LANGUAGE="javascript">
if (confirm ("Onder de tafels!")){
equake();
window.status="Onder de tafels!"
}
else {window.status="Met annuleren werkt hij niet!"}
</script>