Javascript - Dropping Focus() if user is typing

home ~ tools ~ song quotes ~ podcast ~ song lyric trivia ~ docs ~ links ~ archives ~ search ~ lycii ~ mail
internetbumperstickers.com
from a newsgroup, also found here.
	<html>
	<head>
	<script type="text/javascript">
	<!-- Hide

	var formInUse = false;

	function setFocus()
	{
		if(!formInUse) {
			document.theForm.text1.focus();
		}
	}

	// Dunhidin -->
	</script>
	</head>

	<body onload="setFocus()">
	<form name="theForm">
	<input type="text" name="text1" onfocus="formInUse = true;">
	<input type="text" name="text2" onfocus="formInUse = true;">
	<input type="text" name="text3" onfocus="formInUse = true;">
	</form>
	<img src="images/hugePicture.jpg" alt="huge image to slow down the loading process!">
	</body>
	</html>