function autoTab() {
	if(this.value.length >= $(this).attr('maxlength'))
	{
		var index = -1, i = 0;
		while (i < this.form.length && index == -1)
			if (this.form[i] == this)
				index = i;
			else
				i++;
		
		this.form[(index+1) % this.form.length].focus();
	}
}

$(function(){
	$('.autotab').keyup(autoTab);
});
