I would use JQuery
You can do it quite neatly in the client.
I haven't tested it so it may need tweaking.
$("input[type='text']").change(function() {
var max = parseInt($(this).attr("maxlength"), 10);
var len = $(this).val().length;
if(len == max)
{
var tab = parseInt($(this).attr("tabindex"), 10);
$("input[tabindex='" + (tab + 1) + "']").focus();
}
});