Despite being toned down amid a shaky economy, sensitized by sexual harassment cases and sobered by the dangers of drunk driving, those parties are a minefield of potential embarrassments and worse.

Hoping to keep bad behavior at bay, companies may host a party in an art gallery, perhaps during the day, experts say. Even the food has gotten healthier and the portions smaller.

“You want it to be fun. It’s always a balance between managing your legal risks and also having a fun party,” said Michael Johnson of Global Compliance, an ethics training and compliance firm.

Behind much of that conscience is the threat of legal liability, be it for employees driving home drunk or bosses harassing underlings, workplace experts say.

“There’s some obvious things, like I don’t think many clients are suggesting hanging mistletoe or suggesting, ‘Oh, let’s have a game of Twister,’ kind of obvious danger zones,” said Johnson.

Despite the pitfalls, almost 80 percent of companies throw holiday parties, a recent survey showed. The study, by executive search firm Amrop Battalia Winston, revealed that the number of companies having parties was down to its lowest level in 22 years to 79 percent, and two-thirds are restricted to employees only.

“Parties aren’t going away,” said Dale Winston of Battalia Winston, who noted they are less about entertaining clients and drumming up new business than rewarding employees.

But workers, when asked in another survey if they would rather receive a bonus than swill beverages at an office party, overwhelmingly chose cash. The survey of 1,008 people for Randstad US, a worldwide staffing company, found 93 percent of respondents would ditch the year-end party for more money.

And with research showing companies are planning to spend no more than last year, it is more likely than not a company will host the festivities in its own building.

Although the office party may no longer be an extravaganza, it is still important to relax, mingle and have a good time, experts say.

“This is the last vestige where people can just show up and socialize,” said Winston.

“Too many people let loose,” said Barbara Pachter, a workplace behavior expert. “The bottom line is the holiday party is a business event, and people forget that.”