/*
	Obtain seed from the clock. To reduce the likelihood of the seed being guessed, 
	we create the seed by combining the time of the request with the time the page 
	was loaded. We then use that composite value to seed an auxiliary generator, which 
	is cycled between one and 32 times based on the time derived initial seed, with 
	the output of the generator fed back into the seed we use to generate the pad.
	
	Adapted from John Walker's implementation at http://www.fourmilab.ch/onetime/otpjs.html
*/
function ClockSeed() {
	var n, j, ran0;
	loadTime = (new Date()).getTime();
	seed = Math.round((new Date()).getTime() % Math.pow(2, 31));
	ran0 = new LEcuyer((seed ^ Math.round(loadTime % Math.pow(2, 31))) & 0x7FFFFFFF);
	for (j = 0; j < (5 + ((seed >> 3) & 0xF)); j++)
		n = ran0.nextInt(31);
	while (n-- >= 0)
		seed = ((seed << 11) | (seed >>> (32 - 11))) ^ ran0.next();
	seed &= 0x7FFFFFFF;
	return seed;	
}
