Obscene jokes are probably the most insidious form of sexual harassment. If you laugh, you're encouraging them. If not, you're a prude and they laugh at you. It's a no-win situation.
So you have to write everything down, with dates and times, and locations. It's a pain in the neck, but it may be the only way not only to prove your case and get HR to take you seriously, but to show the perpetrators that you really mean business and you won't be fobbed off.