A simple javascript function for setting focus to field of your choice. It requires knowing form name and field name:
<script type="text/javascript">
function focus_field(form_name, field_name)
{
document.form_name.field_name.focus();
document.form_name.field_name.selectionStart=0;
document.form_name.field_name.selectionEnd=0;
}
</script>
Then in body tag:
<body onload="focus_field(form_name, field_name)">
reference:
houseoffusion.com