BANGKOK — NIGHTLY, amid rush-hour din and dirt, hundreds of Thai commuters pause at a favorite Bangkok spirit house.Crowding the small Erawan Shrine at a congested city crossroads, they leave incense sticks, carved wooden elephants, and flower garlands for the Hindu deity. In return, they seek good fortune: passing an exam, winning the lottery or a beauty contest, bearing a male child. In gratitude, they may also make a contribution to Thai classical dancers who float and weave nearby to music tinkling above the urban tumult. Although mostly Buddhist, Thais nurture a deep belief in spirits. Predating Buddhism's arrival in the 13th century, animism has mixed with Hindu, Brahman, and Buddhist traditions to give Thai religion a syncretic quality, Thai observers say. But, like Thai Buddhism in general, the animist tradition is being buffeted by rapid economic growth and Westernization. "It's losing power and energy among the younger generation," says Chatsumarn Kabilsingh, a professor of religion at Thammasat University in Bangkok. "We're losing out to consumerism and materialism." Still for many Thais, spirits, or phis, both good and bad, figure prominently in everyday life. Homes, farms, rice paddies, offices, government buildings - even night clubs in Bangkok's red-light district - sport tiny doll-like houses where good spirits are said to reside. "In Buddhism, there is nothing against this kind of belief," Mr. Chatsumarn says. "Before I go out, I tell my spirit to please take care of my house and kids for me. It's a kind of living together." To avoid trouble, a spirit must live in its own abode, called in Thai phra phum, and not in the real house. That means the spirit house, which usually sits atop a pole, must be comfortable and not fall in the shadow of the main structure. In crowded Bangkok, the spirit house often ends up on the roof. If the main house is enlarged, so is the spirit house. Around Thailand, the spirit house tradition can vary. Among Thai families, the spirit may be represented by a figurine. To make the spirit comfortable, there are often other figures of servants, horses, and elephants to assist the phi. Food, flowers, and incense are provided daily to make the spirit feel at home. Among residents of Chinese descent, a distinctive community in Thailand, the miniature house is lighted and placed on the ground because it is said to shelter the spirit of the land. Chinese merchants light a stick of incense each day in the belief that it will ensure good business. The easygoing Thais have easily synthesized Buddhism with other religious traditions. Buddhism, founded in India, came to Thailand via what is now Sri Lanka, Malaysia, and Cambodia. As a result, honoring the four-faced Hindu deity at Erawan has become a popular extension of Thai religious custom. Among the status-conscious middle class in Bangkok, no longer is a spirit satisfied with only a one-pole house. Keeping up with the Joneses - Bangkok-style - means luring the spirit with a four-pole abode. To traditionalists, money-consciousness also shows its ugly face in the plastic fruits and flowers made as offerings. Yet a tray with a hamburger, shake, and French fries offered at a spirit house near a McDonald's is not out of sync. "Anything that is good for you is good for the spirit," says Chatsumarn. "Now local people eat McDonald's. So the god has to be modern too and accept a modern offering."