Possible Duplicate:
Generating random numbers in Javascript
I have the following code var randomnumber=Math.floor(Math.random()*101);
that generates a random number for me between 1 and 100. What I would like to do is generate a random number between -100 and 100. I am not sure what to do exactly. Any help would be appreciated.
First, generate a random number between 1 - 200 then subtract 100:
var randomNumber = Math.floor(Math.random() * 201) - 100;