CUMBERLAND, Md. (AP) _ Shock collars have replaced cow bells at Bob Greise's dairy farm.

Each of his 100 cows wears a loose-fitting leather choker with a pink plastic box that jolts the animal if it wanders near the eroding banks of Pea Vine Run.

The collars and buried wire are key components of a $120,000 taxpayer-funded project to reduce pollution in the Evitt's Creek watershed, a mountainous area on the Maryland-Pennsylvania border where periodic flooding makes conventional fences impractical.

Greise's cows are accustomed to wading through Pea Vine Run, which carries their waste and stream bank sediment into Evitt's Creek, the Potomac River and ultimately, to the Chesapeake Bay.

Conventional electric fencing would keep the cows from the stream, but only until periodic flash floods that turn gentle Pea Vine Run into a raging torrent washed the fence away.

``I've seen it raise three to four feet in about 20 minutes,'' said the ruddy-faced Greise whose father bought the Allegany County farm in 1943.

``A couple of weeks ago, this whole valley was under water. Conventional fence would have been in bad shape,'' Craig Hartsock, manager of the Allegany Soil Conservation District, said as he surveyed the low-lying pasture on Greise's 205-acre farm.

So when Greise agreed to participate in the state- and federal-funded watershed project, Hartsock suggested shock collars and buried fencing.

The collars, containing batteries that must be replaced every six to 12 months, beep as the cow approaches the buried wire. The beeps and fluorescent orange flags planted above the wire are supposed to help the cows learn their limits.

But if the cow keeps going, it gets a jolt.

``They zap pretty good,'' said Hartsock, who tried it on himself. ``You can feel it, you definitely can feel it.''

The system was originally designed for dogs, allowing them to chase crop-destroying deer as far as a farmer's property line, said Steve Monaghan, vice president of marketing for Clark Distributors in Chantilly, Va., the mid-Atlantic distributor for Invisible Fence products.

A jolt strong enough to stop a dog in full pursuit seems to be enough to get the attention of a lumbering, grass-munching cow.

Hartsock said the system has worked well since the watershed project was completed earlier this summer.

The watershed project also involved planting 500 trees and shrubs along stream banks and constructing three new concrete bridges and two spring-fed watering troughs.

Monaghan valued the Invisible Fence system at Greise's farm at $15,000 to $20,000, including installation, compared with about $15,500 for a comparable length of top-quality conventional fencing.

But unlike conventional electric fences, a system using buried wire and shock collars isn't eligible for the 87.5 percent state funding available for water quality improvement projects, Hartsock said.

The system at Greise's farm was financed by the federal Environmental Protection Agency. State money from the state Environment and Agriculture departments paid for the bridges and watering troughs.