Googlebot has to make multiple passes on a page in order to parse and execute javascript (it doesn't get executed when Googlebot first sees a page), so any effect will be delayed. I've not seen any harmful effect from javascript generated links myself, but I'd always prefer links that are in the html source on page serve.