With my new insight into the Google searches that bring people here, I can see that quite a few people drop by every week trying to find out something about thoughts that are, quite literally, stuck in their heads. I assume they are talking about something worse than a song virus (a song you hear that plays over and over and over in your brain so you hum or sing it to someone else to tell them about it and then it gets stuck in THEIR head and they curse you for the evil, song-disease-ridden plague that you are). So I went wikipediaing (that's a word, right? like googling?) to find out something about obsessive thoughts.
What I found was an article on Intrusive Thoughts. "Intrusive thoughts, urges, and images are of inappropriate things at inappropriate times, usually falling into three categories: inappropriate aggressive thoughts, inappropriate sexual thoughts, or blasphemous religious thoughts. Most people experience these thoughts; when they are associated with obsessive-compulsive disorder (OCD) or depression, they may become paralyzing, anxiety-provoking, and persistent." If you think that you have Intrusive Thoughts then check out their treatment section.
I have to say, though, that "Intrusive Thoughts" is a great book title if I ever get together a "best of" book for TTGSiMH.