Dan Lerner's electric blue running shoes pad softly across the earth-colored carpet as he moves from student to student in the bright, sunlit schoolroom.

He stops to coach a 12-year-old struggling with "factorials" on a pocket calculator, moves on to watch a cluster of teenagers finish up a hot Scrabble game and pauses to help a wiry six-footer with his English assignment.

It's a typical morning in this not-so-typical classroom at the Alfred D. Noyes Children's Center in Gaithersburg. The dozen students are all juveniles awaiting trial or placement in a prison.

The 17-year-old boy hunched over a schoolbook is an ex-drug addict arrested for breaking and entering. he has been in and out of institutions since he was 13. Seated on his left is a bespectacled runaway arrested for shoplifting, and across the tables sits a lanky 15-year-old who has been arrested seven times in three years, most recently for stealing a car.

Noyes is the county's first and only juvenile detention center. Named after the man who served as a Montgomery County juvenile judge for 25 years and who originally proposed building the facility, the $1.2 million children's center underwent seven years of planning and several delays before its doors were opened last summer.

While most youths are from Montgomery County, Noyes also houses juveniles from Allegany, Frederick, Garrett and Washington counties. Before Noyes was built, there was only the overcrowded Thomas J. Waxter Children's Center in Anne Arundel County, near Laurel.

Although Noyes' population is all male now, the facility can house both boys and girls.

"Noyes is a holding facility for youngsters waiting for a court hearing or for placement after a court hearing but who can't live in their homes during that period of time," said administrator Bruce Butts. "Our purpose is not treatment or punishment, but to keep the youngsters securely to appear before court."

Since Noyes' major responsiblity is to contain juveniles, the center tries to make their stay "as light as possible," said Butts. "That's why we have education."

"The challenge for me is in somehow getting through to youngsters who are anti-school and anti-establishment that learning something new can be worthwhile," said Lerner, the well-liked instructor who maintains a mellow but no-nonsense attitude.

The sole teacher for the class, which fluctuates in size from about 10 to 33 students, Lerner tests each pupil who enters Noyes and sets the youngster on an independent study program high-lighting particularly weak academic areas.

Most of the students are bright, but the average youngster is three to five years behind his or her grade level, said Lerner. Study programs are geared to increases English and math abilities by learning "life skills" such as finding information in a newspaper or legibly addressing an envelope.

One of the biggest problems in teaching at Noyes is that students may stay anywhere from overnight to 90 days. Just as a student is beginning to work, he or she may leave.

"I try to assign work so that something can be accomplished each day," Lerner said. "They should be able to finish what they started, because they may not be here tomorrow."

In addition to the education program, a group of 17 volunteers, including a construction worker, a police officer, a homemaker and a social worker, help set up programs that meet the youngsters' nonacademic needs.

An ex-alcoholic runs a monthly workshop on kicking the drinking habit, and local artists run arts and crafts workshops. Several disc jockeys from local radio stations have talked about broadcasting careers, and members of the Red Cross have taught life saving techniques.

"A detention center can be a place where kids are told to "Shut up, sit down and do as you're told,' or it can be an experiential learning opportunity," said volunteer Dave Westerman.

A computer operator who spends an average of 24 hours a week volunteering at Noyes, Westerman has a special interest in the facility. In and out of foster homes and institutions from the age of 2 to 18, Westerman said he still bears emotional scars of the hurt inflicted by dehumanizing institutions.

"We try to deal with kids in a humanistic way here," he said. "Many of these kids have gone to great extremes to get attention. We try to listen to them and give them that attention."

Othe Noyes fans include some of the juveniles housed there.

"I like the atmosphere, and that I'm able to study for my G.E.D. (high school equivalency)," said a youngster arrested for robbery.

"I wouldn't be here 40 days if I didn't like it," boasted a 15-year-old runaway.

The man for whom Noyes is named, described by admirers as a grandfatherly figure, also says he approves of the center.

"I'm keeping in touch by sitting on the advisory board," said Noyes, who is retired and living in Barnesville. "I'm pleased with the facilities and the staff."