Those flags are called "Co Ngu Hanh" (Cờ Ngũ Hành), which mean "Five Elements Flag". The colors of the flag symbolize the Five Elements, the basis of the universe according to ancient Chinese philosophy. Since Vietnamese taste doesn't like the black color (representing Water), the black is usually replaced by the dark blue.
See Wikipedia
Tri Nguyen, 16 August 2006