2000-12-31 04:00:00 PDT Shanghai -- It wasn't so long ago that for good citizens of China, sex meant lying back and thinking of Mao.

The leaders of China's Communist revolution set out to eradicate not only the decadent "bourgeois evils" of pornography and prostitution, but to repress virtually all hints of sexuality. From the 1950s through the early 1980s, men and women wore drab, identical, loose-fitting pantsuits; some communes required husbands and wives to live separately; movies showed couples in the embrace of revolution, not passion; and at least officially, sex became an act cloaked in secrecy or shame, carried out mainly for procreation.

But sexual mores have changed dramatically since China's opening to the outside world two decades ago, a cultural shift evident in everything from the body-hugging fashions that have replaced the once-ubiquitous Mao suit, to a proliferation of shops selling sexual aids, and an urban nightclub pickup scene that rivals that of many cities in America.

One of the more subtle but significant changes has been in the communist leadership's attitude to the sexual revolution.

Take, for example, the authorities' gradual acceptance of Liu Dalin, a pioneering and outspoken Shanghai sexologist. Liu wants Chinese to accept sex as natural and healthy, and to be proud of their long history of "sexual culture." To that end, the prolific researcher has written more than 65 books since 1982, including last month's "Sexual Culture of Twentieth Century China, " in which he argues that the new, open-minded approach to sex is more in line with history than the uptight morality of the first 35 years of Communist China.

Nevertheless, it came as a surprise to him when city officials invited him last year to open a sex museum as a "cultural offering" in a busy shopping district -- after insisting for years that his personal collection of vintage Chinese erotica be kept under wraps and viewed only by appointment. There, in a quiet setting of muted lights and glass-fronted cases, Liu now showcases more than 1,000 items of antique sexual memorabilia -- from a 3,000-year-old stone phallus to a Qing Dynasty love-making chair -- with a few reproductions, condoms and sex aids for sale in the gift shop.

There are still limits, though. Officials asked him not to show "too much" and forbade him to advertise. They even made him remove a street sign pointing to the exhibition, tucked away on the eighth floor of an office building.

Ironically, when the increasingly independent state-controlled newspapers and television featured the sign-removal flap, museum attendance skyrocketed. City authorities also required that the most explicit paintings be kept in a room for "experts only," but Liu leaves the door open to any visitor, and officials have turned a blind eye.

"The door of sex is now open," said Liu, 68, a sprightly, spectacled former air force officer, factory worker and sociology professor, with a wink, but he acknowledges, "It's not fully open -- it's just half open."

Halfway or not, the speed of that opening has been dramatic. China's first shop for sexual aids, known as a "family-planning store," opened in 1993; today, they are all over China, with more than 1,000 in Shanghai alone. Married couples already receive free birth control from the government under its one-child policy, but authorities see the shops as another way to promote population control and to combat rising divorce rates by strengthening marriages.

Sex talk shows fill the radio airwaves, and well-meaning officials in some cities have sponsored adult education courses featuring a bizarre combination of hard-core Scandinavian pornography, medical documentaries and photos of venereal disease victims. Since 1988, Liu said, the central government has recommended sex education in middle schools, but it is not always taught.

There is a growing prevalence and acceptance of premarital sex and growing concern and public debate about the rise in extramarital sex and divorce. A study by the Shanghai Institute of Planned Parenthood Research in 1998 found 70 percent of women undergoing a premarriage physical admitted to premarital sex.

"Our society has become more and more open because of the open-door policy, and I think mainly that is a good thing, though maybe some bad things come with it," Liu said.

Mao claimed to have stamped out prostitution -- which existed for much of China's recorded history -- but it is back and thriving since the state began to encourage free enterprise. Sex workers ply their trade at late-night barber shops, karaoke bars and hotels, with high-living officials often among the customers and police sometimes on the take.

In a sign of the conflicting drives to stem resurgent "social evils" while promoting the new economy, high-profile anti-vice campaigns target the flesh trade.

In Beijing, where laws are often most harshly enforced to set an example, prostitutes have been shipped to prison and a madam sentenced to death in a high-profile case two years ago. In the third quarter of this year, authorities reported closing 50,000 karaoke clubs and massage parlors nationwide.

The Communist leadership also claimed to have wiped out sexually transmitted disease, but today the U.N. AIDS office in Beijing estimates there are at least 500,000 cases of HIV in China.

The first signs of the sexual revolution, good and bad, were spotted by Liu,

who was dubbed the "Kinsey of China" after his landmark survey of 20,000 people 10 years ago, conducted and financed without official permission.

Liu's most striking finding, he said, was the "mix of new and old sex ideas and habits" among modern Chinese, a revelation that inspired him to begin collecting sexual memorabilia from ancient times. He has amassed 1,500 items at a cost of 1 million yuan ($120,000), a fortune by Chinese standards, all from the royalties on his books.

The exhibits include ancient dowry paintings and porcelain paperweights with hidden images of copulating couples that parents gave to newlyweds, X- rated 19th century pop-up books and a second century B.C. carving showing group sex.

Without the right to advertise, and with a relatively steep admission price of 30 yuan ($3.60), the museum draws only 1,000 visitors a month, half of whom are foreigners.

Zhai Xiumei, a 40-year-old lawyer who visited recently after seeing the museum in a TV documentary, said she wanted "to better understand our history and our ancestors."

"We know so much about our tea culture; why do we not know about our sex culture?" she said. "Professor Liu has done a great service to this country by preserving all this. I don't know anyone who would think it is pornography."