well it depends on your definition of legal. In terms of AIM TOS, no, its not allowed. In terms of the law, I would have to say that it is legal, however extremely annoying. This is probably one of the worst ways to market because anyone receiving your ad will automatically ignore it instantly. If they take glimpse at the website you were advertising forget them ever visiting it, even if they see a legit ad.
Don't even bother, this is the lowest form of marketing and really isnt even that profitable, if at all.