prova così:

codice:
<input name="txtCap" type="text" size="10" maxlength="5" onBlur="testa_number(this.value)">
fammi sapere.