JUST WHEN you thought beauty pageant movies had run their course, along comes "Happy, Texas," a winner's bouquet of funniness. Imagine an engaging combination of "Raising Arizona," "Smile" and "In & Out." Then imagine funnier.

The movie, directed by Mark Illsley (who wrote this with Ed Stone and Phil Reeves) starts with scores of chain-gang prisoners on a lonely Texas highway, picking up roadkill. A diminutive prisoner (Steve Zahn) with a Yosemite Sam mustache -- name of Wayne Wayne Wayne Jr. -- picks up a dead armadillo from the road and says, "Why did the armadillo cross the road?"

His chained partners, Harry (Jeremy Northam) and the burly Bob (M.C. Gainey), are stumped.

"It didn't," says Wayne with a gimpy little chuckle. Prison humor.

This particular shackled trio doesn't know it yet, but, in a few moments, they are about to make a jailbreak, courtesy of a fight that breaks out between Wayne and Bob, which causes the guard to drive them back to prison, only to be distracted by another scuffle in the back and another armadillo in the road, which then causes him to drive the bus right off the road and -- you know how these things go.

Harry and Wayne find themselves free in Happy, Tex., where they commandeer an RV, hoping to lie low until the heat dies down. They get their wish, but not quite in the way they anticipated.

When the sheriff of Happy (Macy) sees that RV, he rounds up Harry and Wayne, but not for escaping. It seems that vehicle belongs to pageant producers Steven and David, who are expected to train a bevy of preteen aspirants for the statewide Little Miss Squeezed Pageant.

The sheriff, Chappy to his friends, escorts the shocked prisoners straight to the girls in question, who are all waiting for instruction, along with teacher- supervisor Miss Schaefer (Illeana Douglas).

As if playing pageant official wasn't enough, Harry and Wayne learn that Messrs. Steven and Bob are, you know, an item. But when Harry suggests they get into character, as it were, Wayne is extremely resistant. So he applies himself to the task of teaching song-and-dance routines to the girls, while Harry -- the schemer of the duo -- hobnobs with the townsfolk.

It's tough on both of them. Wayne is dance-challenged, to say the least; and he has the social charisma of an amoeba. As for Harry, his smooth, easygoing manner is about to land him in hot water. Suddenly everyone wants to solicit his sage advice in matters of the heart because he's got that, well, inside perspective.

Their plan: get through this alive and rob the Happy bank on the way out. Their problem: Harry's attracted to Josephine (Ally Walker), an attractive, intelligent and responsive woman who happens to own the bank. Actually, that's only one of Harry's problems, but we have to stop the show right there to preserve those mid-movie surprises.

Macy, whose nervous intensity lit up his roles in "Boogie Nights," "Fargo" and many other movies, invests Chappy with an amazing depth of tenderness for a comedy.

When he initially spots the parked RV and peers into the driver's window to find our beloved cons in a seemingly compromising position, his "Oh my!" has to be heard to be enjoyed. And here's a teaser for you: He delivers the funniest line in the movie when he tells a waiter just how raw he wants his steak.

Zahn, terrifically funny in "That Thing You Do!" and "subUrbia," stakes the funniest claim on this movie, however. He suggests an agitated, inbred Jesse James -- his wild-eyed glare almost lost under all that hair and mustache -- as he strenuously attempts to get with the new program. With tremulous voice and sudden bursts of pent-up energy, he supplies some of the movie's finest moments, ranging from teaching the girls his own spasmodic, white-guy's breakdance to sitting behind a sewing machine, bandanna around his head, trying to figure out the right way to attach a sparkly heart to beauty costumes. And when he's finally figured things out, you'd swear there was no finer pageant producer than Wayne Wayne Wayne Jr.

HAPPY, TEXAS (PG-13, 100 minutes) -- Contains sexual scenes, major innuendo and strong language. Cineplex Odeon Dupont Circle.