The first time it happens, you're in a panic. Your child comes home looking, sounding or acting like some other kid. And it's not just any kid. It's a kid you believe is filling your innocent child's head full of nasty ideas. A kid you think is a bad influence.

When your children are toddlers or grade-schoolers, the problem is easier to manage -- you still have control over most aspects of their lives. But it's more troubling when they become adolescents. They're on their own more and it's a lot harder to exert your influence.

Besides, adolescence is the time to let kids experiment a bit and become more independent. You can't do that by over-controlling who they see and the friends they choose. But therein lies the dilemma for most parents: You want to loosen up, but there's still that urge to protect them. After all, you've been doing it all their lives.

So what should you do if your adolescent is "hanging around" with a friend you don't like? Here's what parents, child-development experts and "ex-kids" who remember their "bad-influence" friends advise.

Learning how to become a social being while maintaining your individuality is one of the great lessons of adolescence, say Jane Norman and Myron Harris, authors of The Private Life of the American Teenager (Rawson, Wade Publishers; 1981). But kids can only test that skill by befriending many different kinds of people.

"Deciding whether to go along with or resist what a friend is doing is solid training for building one's own set of standards," say Norman and Harris, a teacher and a child psychologist, respectively. "Without that opportunity, children run the danger of either rigidly following parental thinking or automatically opposing it in order to express their feelings of independence."

Nearly every "ex-kid" interviewed for this story said that, even though their bad-influence friends did plenty of questionable things, it didn't mean that they automatically went along. "My friend was dating, sexually active and smoking pot in ninth grade," said one ex-kid. "But that didn't mean I did it. I still went along at my own pace."

Recalled another ex-kid: "I was really shocked when, on a double date, I saw my 'fast' friend doing things with a boy she'd only just met. They were things I still wasn't doing with my steady boyfriend!"

But how do you know if you've got one of those kids with the inner self-control and discipline to resist being overly influenced by a "bad" friend? Much depends on how you raise your kids. And part lies in helping your kids evaluate their friendships and experiences. For that you need to be a skilled parent/communicator.

"It's a good idea for your kids to experience different kinds of friends while they still have their parents to talk it over with," says Paul Welter, a professor of counseling and school psychology at Kearney State College in Nebraska. "Then you can help them interpret the consequences of those friendships -- both good and bad." To do that, however, you have to approach kids in a helpful, constructive manner. As any parent with a teen-ager knows, that isn't easy when your kids are going through the "I'll resist anything my parents say" stage.

Have you examined your motives for not liking your child's friends? Is there a sexist, racist or religious prejudice behind your disapproval? Kids will sense this, says Ellen Rosenberg, author of Getting Closer (Berkley Books, 1985).

Or is your child's friend simply different in background, interests or appearance? Your child may have different friendship needs than you do and may reach out to a kind of person you just can't relate to. Maybe he or she is hanging around with someone who seems the opposite just to learn what that kind of a person is like. Maybe he wants to help someone he thinks is less fortunate.

Some parents resist their kids' friends because they're afraid of their children growing up and being less dependent on them, says Sven Wahlroos, a Van Nuys, Calif., family psychologist.

Prohibiting your adolescent from seeing a friend, especially when your motives are like the ones we just described, is usually a no-win proposition. A poll of more than 160,000 teen-agers taken by Norman and Harris found that 88 percent of teen- agers will see their friends regardless of what their parents say.

That's not to say you can't discuss your concerns about a certain friend, if you think he or she may be badly influencing your child. "Most children have said they'd like to have their parents caution them and tell them why they think any certain friend is not a good influence, and then let them make up their own minds," says Rosenberg.

Probably most of us agree on the definition of a friend who could truly bring harm to your child. A friend who's into drugs, alcohol, stealing, early sexual experiences or other illegal or overly sophisticated behavior is a friend to treat with extra caution. That doesn't mean you have to forbid your child from hanging around with his friend (remember, 88 percent of kids polled said they wouldn't listen anyway). But it may mean a frank discussion is in order.

It's a good idea to first establish with your child that your disapproval of a friend doesn't mean you think your child is necessarily engaging in the same harmful behavior. Kids feel wounded when they think their parents regard them as mindless followers, according to many experts.

You can let them know you trust them, but still give helpful advice. "I was left in emotional situations I felt I couldn't handle," says a mother and an educational consultant, upon remembering her own adolescence. "I felt my parents were under-involved -- I could have used more guidance.

"I know I'll be stricter with my own kids," she says. "But I communicate more with my kids anyway, so I think it'll be easier to talk with them."

If you have reason to believe that your child is participating in truly bad behavior with a questionable friend, and you want to forbid her from going out with this friend, do it in a way that still leaves the door open for further discussion, advises Rosenberg. She suggests that you say something along the lines of, "If you have any reason why you feel I'm being totally unfair, I can't promise I'll change my mind, but I'd like to listen and consider what you have to say."

The solution to your kids' problems with bad-influence friends may be simply to pay more attention to their comings and goings and give them more guidelines and supervision, advises Gail Melson, a professor of child development at Purdue University.

Kids who are into bad behavior may not be "cured" by prohibiting them from seeing certain friends, say Norman and Harris. They're likely to pick up with new but similar friends tomorrow. Better to uncover and deal with the real issues of your adolescents' needs and inner feelings, they advise.

Finally, don't drag your feet about seeking professional counseling for your child if you see real contempt and defiance in his dealings with all authority figures, advises Wahlroos. "One of the frustrations for counselors is that people come when their kids are too far gone," he says.

But, chances are, your kids aren't at that stage. "I find that eventually my daughter comes to recognize the same problems I see in some of her friends, then she drifts away from them all on her own," says one mother of a teen.

The ex-kids we spoke to seem to agree. Most have no ties to their former "bad-influence" friends and they look back with some amusement at their temporary fascination with such kids. "I thought my friend was just the funniest, sharpest, coolest person I'd ever met," says one. "I found out pretty quickly that she was a shallow, domineering person ... You live and learn." Reprinted by permission of Rodale's Children magazine.

1987, Rodale Press, Inc. North America/Times of London Syndicate Inc.