Il concetto è questo, e arrivo a scriverti un modello; provalo un po' con diversi Navigatori e a combinarlo nel "quanto" del tuo sistema ...
codice:
<html><head>
<script type="text/javascript">

function moveFocus(){

 document.getElementsByName("msg")[0].focus();

 };

</script>
</head>
<body onload="moveFocus();">

<input name="msg" type="text">
</body></html>
Per individuare l' Elemento su cui JS deve intervenire,
ho usato:

document.getElementsByName

ma non è l' unico:

document.getElementById

e, se l' input di testo è in un FORM:

document.forms['nome_form'].msg