Ahhh! That's it -- thanks, Fotiman; once again, "you da man". (Sorry for missing your intent with the alert func -- told you my js is bad.)
Now...there's still one lingering problem. This whole script is running as an eternal file from my main script. For some reason, a function called from the main script, and defined here in the external script, runs fine; but a function called here in the external script, and defined in the main script returns a "function undefined" error.
Is there something I need to do to make functions "global" so they're available to an external file?