Toymaker Mattel (NYSE:MAT) must be feeling lately a lot like Ken, the jilted boyfriend of the company's iconic Barbie doll. After 40 years of dating, the dolls had a much-heralded breakup, while investors have been kicking the stock to the curb as well. Back in August, it was sitting some 23% off its 52-week high.

In the spring, the company saw earnings per share fall 71% below last year's results, and the 5% increase it recorded in sales was due entirely to currency fluctuations.

Besides its financial woes, Mattel has been beset by legal woes of its own making. It has been recognized as having one (two, actually) of the top five frivolous corporate lawsuits: It sued an artist for photographing a Barbie doll in positions that defamed her character (it's a doll, right?) and sued MCA recording artist Aqua for recording a song called "Barbie Girl." Needless to say, it lost both cases. In the first suit, it had to pay the artist $1.8 million in legal fees; for the second, it's hammered out a recording contract for the doll. Well, not exactly the doll, but a stable of acts from MCA, a unit of Vivendi (NYSE:V). The new album, to be titled "Barbie Girls," will feature songs from Christina Milian, Girls Aloud, and Sugababes and will be released in Europe in November.

Bad financial results, bad press, down-on-its-luck stock. It's a value investor's feeding trough! The new Motley Fool Inside Value newsletter found all that dour news and more to like about Mattel when it chose the Magic 8 Ball maker in its inaugural issue.

Mattel has been trying to keep Barbie -- and its bottom line -- up with the times. Alyce Lomax noted that the nauseatingly pink-themed doll (um, my words, not Alyce's) has had an infusion of Marketing 101: movies, perfume, an adult-sized clothing line to be featured at Nordstrom (NYSE:JWN). The doll chalked up $3.6 billion in sales in 2003.

Yet Mattel is more than just Barbie. It also claims ownership of Fisher-Price, Hot Wheels, Matchbox, Tyco, and the American Girl brand. It also licenses Harry Potter, Batman, Nickelodeon, Blues Clues, and the Olsen twins, Mary-Kate and Ashley. With a new Harry Potter movie due out next year from Time Warner's (NYSE:TWX) Warner Brothers studio; merchandising of Batman, Disney, and Sesame Street characters; the fact that toys, in general, hold up better than other discretionary items during recessions and difficult market conditions; and the fact that the toymaker is still producing more than $32 million in free cash flow in the latest quarter, there is still a bright future ahead.

New management, repositioned products, and one-third of the "Hot Dozen" toys heading into the Christmas season should really give Barbie something to sing about.

Interested in value investing? Take a free, no-obligation trial to Motley Fool Inside Value today.

Fool contributor Rich Duprey dislikes Barbie almost as much as Barney. He owns shares of Mattel but not of any of the stocks mentioned in this article.