<!--
// Title:       jsRandomNum.js
// Description: Generates a random number between 0 and n-1
// Date:        11 June 2000
// Author:      T Vincent Banks
// E-Mail:      Todd.Banks@att.net
// Modified By: 


// The functions 'qrand' and 'qinit' below are my random number generator.
// You must call qinit() once at the beginning of your script's execution.
// Then call qrand(n) to generate a random number from 0 to n-1.

function qrand(n) {
	RandSeed = (RandMultiplier * RandSeed + RandIncrement) % 0x7fffffff
	return (RandSeed >> 16) % n
}

function qinit() {
	RandMultiplier = 0x015a4e35
	RandIncrement = 1

	// Initialize using the computer's date and time...
	var now = new Date()
	RandSeed = now.getTime() % 0xffffffff
	FirstSentence = 1
	FirstAmerica = 1
}

qinit();

// -->
