in reply to function(function(noFunction?))

Yes, btrott, you answered my question exactly!
(The rest of my explanation... with the specific question that you ended up guessing and then answering, got cut off for some reason.)
Thanks for the advice about returning the HTML instead of explicitly printing it. That should help get me back on track!
I am returning to the programing thing after taking a break for several years, and I am definitely feeling a bit rusty.
One thing I am struggling with is finding the right balance between trying to write my code generically enough so that I can reuse it as much as possible and writing it specifically enough so that it actually does something.
I am sure I am not alone on that count though.
Thanks again mate. Hail, Larry!