BEIJING -- Foreigners attending the Beijing Olympics better behave -- or else.
The Beijing Olympic organizing committee issued a stern, nine-page document Monday that covers 57 topics. Written in Chinese only and posted on the official Web site, the guide covers everything from a ban on sleeping outdoors to the need for government permission to stage a protest.
Visitors also should know this:
* Those with "mental diseases" or contagious conditions will be barred.
* Some parts of the country are closed to visitors -- one of them Tibet.
* Olympic tickets are no guarantee of a visa to enter China.
Fearing protests during the Aug. 8 through 24 Olympics, China's authoritarian government has tightened controls on visas and residence permits for foreigners. It has also promised a massive security presence at the games, which may include undercover agents dressed as volunteers.
The guide said Olympic ticket holders "still need to visit China embassies and consulates and apply for visas according to the related rules."
The government hopes to keep out activists and students who might stage pro-Tibet rallies that would be broadcast around the world. It also fears protests over China's oil and arms trade with Sudan, and any disquiet from predominantly Muslim regions in western China.
"In order to hold any public gathering, parade or protest the organizer must apply with the local police authorities. No such activity can be held unless a permit is given. ... Any illegal gatherings, parades and protests and refusal to comply are subject to administrative punishments or criminal prosecution."
The document also warns against the display of insulting slogans or banners at any sports venue. It also forbids any religious or political banner at an Olympic venue that "disturbs the public order."
The guidelines seem to clash with a pledge made two month ago by International Olympic Committee president Jacques Rogge, who said athletes could exercise freedom of speech in China. He asked only that athletes refrain from making political statements at certain official Olympics venues.
"Freedom of expression is something that is absolute," Rogge said in Beijing in April. "It's a human right. Athletes have it."
The detailed document is titled: "A guide to Chinese law for Foreigners coming to, leaving or staying in China during the Olympics." This appears under the slogan of the Beijing Olympics: "One World, One Dream."
For months Chinese authorities denied there had been any change to visa regulations, but recently acknowledged that rules had been amended. The changes may have little affect on some of the 500,000 foreigners expected to visit for the Olympics, many of whom will come on package tours with visas already arranged.
The rules published Monday say entry will be denied to those "who might conduct acts of terrorism, violence and government subversion ... and those who might engage in activities endangering China's national security and national interest."
The rules also bar entry to smugglers, drug traffickers, prostitutes and those with "mental diseases" or contagious conditions.
The document also warns foreigners that not all areas of the country are open to visitors. One such area is Tibet, which is also off limits to journalists.
"Not all of China is open to foreigners, and they shall not go to any venue not open to them," the statement said.
The guide also spells out a long list of items that cannot be brought into the country, including weapons, imitation weapons, ammunition, explosives, counterfeit currency, drugs and poisons. It also prohibits the entry of materials "that are harmful to China's politics, economics, culture and morals".
Foreigners staying with Chinese residents in urban areas must register at a local police station within 24 hours of arriving. The limit in rural areas is 72 hours.
The guide also threatens criminal prosecution against anyone "who burns, defaces ... insults or tramps on the national flag or insignia."
For those planning on sleeping outdoors to save a little money -- forget it. This is banned to "maintain public hygiene and the cultured image of the cities."