Prova con

<input type="text" name="cod1" id="cod1" onkeyup="if (this.value.length==2) document.getElementById('cod2').focus()" />

<input type="text" name="cod2" id="cod2" />