Does anyone know what's gone wrong here????
Thanks JON
<html>
<head>
<title>US States</title>
</head>
<body>
<SCRIPT Language = "JavaScript">
<!--
function getStateDate() {
var selectedState = document.entryForm.entry.value
for ( var i = 0; i < USStates.length; i++) {
if (USStates[i] == selectedState) {
break
}
}
alert("That state entered the union in " + stateEntered[i] + ".")
}

// -->
</SCRIPT>
<SCRIPT Language = "JavaScript">
<!--
var USStates = New Array(5)

USStates[0] = "Alaska"
USStates[1] = "Alabama"
USStates[2] = "Arizona"
USStates[3] = "Arkansas"
USStates[4] = "Wyoming"

Alert("the largest state is " + USStates[0] + ".")

var stateEntered = New Array(5)

stateEntered[0] = "1829"
stateEntered[1] = "1859"
stateEntered[2] = "1900"
stateEntered[3] = "1910"
stateEntered[4] = "1920"
//-->
</SCRIPT>
<form>
<input type="text" name="entryForm" value=" " size=14>
<input type="button" value="find" onClick="getStateDate()">
</form>
</body>
</html>