what im not doing: dwelling on it... javascript is as good as broken in some of its strange ways...
kept getting errors in simple math comparison... it occurred to me that one input was being treated as a string! so,
(parseInt(document.getElementById('whatever').value)<parseint(some_string_as_it_turns_out)))
and all was good again.