I run CPM ads on one of my informational, non-transactional sites, and would like to sell that ad space directly to advertisers instead of sharing revenue with a middle man. I've had some offers from people wanting to run banner ads for items like health supplements. I've turned them down because my understanding from a few years ago was that even being associated with health supplements (or gambling) could get you in trouble with Google.
Today it dawned on me that I don't recall where I got that information, or whether it's remotely accurate. Maybe they were only talking about text links?
I realize you want to avoid ads for disreputable companies and so on, not just for Google rankings but to keep your reputation intact with your visitors. What I'm specifically asking is: if I post a banner ad with a link, will Google possibly lower my rankings if they don't think I should be linking to that site, either because the niche is spammy OR because they think it's irrelevant to my site*? What if I wrap the ad in javascript so that there's no actual link to the advertised site within my source code?
*A lot of the CPM ads I get are not for products in my niche, but they are of interest to my visitors. I don't consider "relevance" as important as "is this what my demographic is into", but Google seems to view things differently.