<html>
<head></head>
<body>
<form name="myform">
<input type="text" name="myinput1" />
<input type="text" name="myinput2" />
<input type="text" name="myinput3" />
<input type="text" name="myinput4" />
<input type="text" name="myinput5" />
</form>
<script type="text/javascript">
//<![CDATA[
document.forms[document.forms.length-1].myinput1.focus();
//]]>
</script>
</body>
</html>