Does it matter for a search engine where your javascript is in the page? Would it ignore HTML links that appear after a javascript menu or is the positioning irrelevant?
It doesn't matter. Typically the engines don't see the JS. If you want it in there build a menu system using the noscript tag. That's not a bad idea anyway for folks who have their JS turned off.