This is a implementation of Mersenne Twister in JavaScript, based on a C# implementation from Akihilo Kramot (Takel).
Sadly, Math.random() isn't as random as you would need it to be in certain cases that needs a little bit more randomness.
Most of the MT implementations (including the reference) are distributed under a BSD license, which couldn't be used in a specific use case where I couldn't display the necessary copyright information.
This is distributed under the Artistic License 2.0.
var mt = new MersenneTwister();
mt.init(); // You can optionally provide a seed as a parameter
mt.nextInt(1, 100); // Between 1 to 100
mt.nextInt(); // Implicit means random within valid range
mt.nextInt(100); // One parameter means 0 to 100
mt.next() // Same functionality, but returns floats