Forget working weekends, doing unpaid overtime and pumping up profits. For some, the secret to workplace success is a sexy smile.

There's a school of thought that says a little harmless flirting on the job can help some people become more well-liked, move up the corporate ladder and even lead to love and marriage.

But office flirtation isn't always playful and painless. You're playing with fire, and crossing the line between flirty and dirty could steer you right out of your job — or, worse, into court.

“Flirting can often make the other person feel uncomfortable. Uncomfortable soon becomes harassed and harassed can become big-buck losses,” said relationship mentor Peta Heskell, author of “Flirt Coach” and director of findtheloveyouwant.com.

Philip Connolly, former marketing director of a prominent beverage brand, found out the hard way that being "friendly" can spin you into a scary saga.

“I managed a lot of women whom I always had a very strong professional relationship with,” said the San Francisco-based executive. “My approach was always to be friendly and fun to motivate my team, but before I knew it, the harassment hearsays were happening.”

Connolly left his position before any official claims were made, but he admits that that the accusations have polluted his professional reputation.

“Two years later the rumor mill is still churning,” he said. “I’m being punished for being a personal pal to my former female staff.”

But even if flirting doesn’t go as far as the courtroom, it may cause you to fall out of fashion with your fellow colleagues.

“If you’re flirting with the boss to curry your favor, you also risk currying the envy, anger and similar undesirable feelings toward you from your co-workers,” Heskell said.

And sometimes there's an even bigger price to pay.

“You risk being labeled a no-talent wannabe,” said Kate Southam, editor of careerone.com.au, a site that specializes in recruitment. “And if you flirt with the boss you also risk being fired, or being taken up on your offer. And then what?”

If you’re the boss in the office, don’t think you can get away with crossing the line. According to Southam, flirty managers can make life miserable for staff who feel pressured, vulnerable and unsafe — and, of course, the underlings can sue.

So what should you do if office flirting is affecting your job?

“Let the culprits know how their actions are impacting others,” suggested Southam. “Try the positive/negative approach. Tell the flirt you think it is great that they’re so confident and caring, but admit that you feel a little put off by it all.”

And if it doesn't stop there, inform your manager.

However, a little career coquetting can actually be very constructive in climbing up the corporate ladder.

“The skillful flirt is really just a charmer after all, and everyone wants to work and do business with people who make them look and feel good,” said Southam. “The skillful flirt also engages in a lot of non-sexual flirting which can help them get noticed, promoted and rewarded.”

Communications specialist Kellie Cox is one such woman who uses a little laughter and lingering looks to successfully get ahead.

“Of course I’m good at my job, but making other people feel special is my subtle secret to success,” said the 32-year-old New Yorker. “I’ve been promoted twice this year already, and I credit that to my charisma.”

Cox’s talent for teasing has even taken her into the trade of true love. She fell for her current colleague-turned-fiance over a few Friday afternoon beverages, but insists they keep their romance under wraps between 9 and 5.

“Most people have dated someone they have met through work and it almost always starts with flirting,” said Rich Milgram, CEO of online career networking site beyond.com. “Nobody should stand in the way of love; it’s a natural part of life. Who's a corporation to say it is wrong?”

Last year, men’s magazine Best Life conducted an online poll for both males and females, and over 50 percent confessed to having "crushes" in their jobs.

While different companies have different rules about office romances, Southam says that it is pretty hard for corporations to openly police co-worker dating, and when people work long hours in close proximity, romance is hard to avoid.

But be warned: where you stand on the corporate ladder could hamper your happiness together.

“Lovers talk — no matter what they claim — so management do get nervous when a senior executive dates a junior member of staff,” said Southam. “Distributing information to staff is usually something that needs to be carefully managed. A junior member of staff passing on hearsay news from above to colleagues is downright dangerous for the organization as it can lead to rumors, leaks to competitors, low morale and resignations.”

But if you do fall for someone in the workplace, experts advise distinctly separating the personal and professional parts of your life. Don’t send e-mails via the office system, don’t confide in anyone in the office and most importantly, don’t let it affect your work in any way.

Managers also need to be clear about the boundaries and behaviors they expect from their staff, and should let discreet, professional working couples know their approach is appreciated.

“It is the responsibility of both the individual and corporation to ensure a comfortable working environment,” said Milgram. “Companies should have clear policies and monitor all employees, while the employees themselves should know how to bond without breaking the boundaries.”

So if you want to add flirt finesse to your resume, just remember that it needs to be kept canny and clean.

“Flirt with everyone, both the same and opposite sex,” suggested Heskell. “Be friendly with people on all levels and from all areas. Don’t just flirt with the babe; flirt with the Ugly Betty or Bruce in the office too. Who knows? You could very well make a friend for life.”

But flirt at your own risk.

“Even if he or she is doing it innocently, the danger of a sexual harassment allegation is always there,” Heskell warned.