Prova cosi:
codice:
if (parseInt(obj.value)<0 || parseInt(obj.value) > parseInt(document.getElementById('qui_ci_metti_id_del_campo_max').value))