<!-- Original: Michael Tartaglia <stonedstan@hotmail.com> -->
<!-- Web Site:  http://www.geocities.com/SiliconValley/Horizon/5235 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function s() {
msg = new Array("Computers are the medium of the future.",
"My favorite food is beans on toast.",
"I believe that you can type well!",
"Who was the first president of America?",
"The capital city of Ireland is Dublin.",
"My favorite soap has to be Eastenders.",
"Manchester United won the treble in 1999.",
"Tony Blair became Prime Minister in 1997.",
"Ted Hughes was a twentieth century poet.",
"What is the name of your teacher?")
word = 7
}
function m() {
msg = new Array("My brother lives in London with his new wife, Jenny.",
"I don't really like eating when people are watching me.",
"Does the rain in Spain fall mainly on the plain?",
"In which year did man walk on the moon's surface?",
"Do you prefer to drink tea or coffee at breakfast?",
"Steven Spielberg directed Indiana Jones and the Temple of Doom.",
"Michael Schumacher is a very successful Formula One racing driver.",
"The Gregorian Calendar has been used in Britain since 1752.",
"Astronomy is the name for the study of celestial bodies.",
"It's every schoolboy's dream to play football for his country!")
word = 10
}
function e() {
msg = new Array("If you can correctly, and quickly, type this perplexing sentence, you are one superb typist!",
"You are one superb typist if you can correctly, and quickly, type this long sentence.",
"Andante is a term which instructs a musician to play at a moderately slow tempo.",
"The first compact disc was bought in 1979. Nowadays almost everyone owns a CD player.",
"Saint Andrew is the patron saint of Scotland. Saint Andrew's Day is on 30th November.",
"Petrol stations in the UK sell all sorts of things, from newspapers to hot food.",
"Asia is the largest continent in the world, closely followed by the Americas, then Africa.",
"In the summer of 2004, the Olympic Games were held in Athens, Greece.",
"I believe you're a good typist, so I believe you will correctly copy this statement!",
"Because this is not a fairly simple sentence, could you swiftly, and precisely, copy it?")
word = 15
}
function beginIt() {
	randNum = Math.floor((Math.random() * 10)) % 10
	msgType = msg[randNum]
	day = new Date();
	startType = day.getTime();
	document.theForm.given.value = msgType
	document.theForm.typed.focus();
	document.theForm.typed.select();
}
function cheat() {
	alert("You cannot change that!");
	document.theForm.typed.focus();
}
function done() {
	if (document.form.given.value != document.form.typed.value) {
		alert("You made an error!\nGame NOT over!")
	}
	else (stop())
}
function stopIt() {
	dayTwo = new Date();
	endType = dayTwo.getTime();
	totalTime = ((endType - startType) / 1000)
	spd = Math.round((word/totalTime) * 60)
	if (document.theForm.typed.value == document.theForm.given.value) {
	alert("\nYou typed a " + word + " word sentence in " 
	+ totalTime + " seconds, a speed of about " + spd + " words per minute!")
}
else {
	alert("You made an error, but typed at a speed of " + spd + " words per minute.")
   }
}
// End -->