1. It doesn't matter if it's illegal or not, nobody should ever have to put up with any of that crap.
2. Same as with bullying, nobody should ever tolerate this bullshit.
3. Flirting is harassment if the other party is not interested in flirting. At that point I don't think it's flirting anymore, but harassment.
4. It does suck indeed, and I'll seek for a new job.