Peritoneal cavity
The peritoneal cavity is a potential space between the  parietal peritoneum (the peritoneum that surrounds the abdominal wall) and visceral peritoneum (the peritoneum that surrounds the internal organs). The parietal and visceral peritonea are layers of the peritoneum named depending on their function/location. It is one of the spaces derived from the coelomic cavity of the embryo, the others being the pleural cavities around the lungs and the pericardial cavity around the heart.
It is the largest serosal sac, and the largest fluid-filled cavity, in the body and secretes approximately 50 ml of fluid per day. This fluid acts as a lubricant and has anti-inflammatory properties.
The peritoneal cavity is divided into two compartments – one above, and one below the transverse colon.

Compartments
The peritoneal cavity is divided by the transverse colon (and its mesocolon) into an upper supracolic compartment, and a lower infracolic compartment. The liver, spleen, stomach, and lesser omentum are contained within the supracolic compartment. The small intestine surrounded by the ascending, transverse, and descending colon, and the paracolic gutters are contained within the infracolic compartment.

Clinical significance
The peritoneal cavity is a common injection site, used in intraperitoneal injection.
An increase in the capillary pressure in the abdominal viscera can cause fluid to leave the interstitial space and enter the peritoneal cavity, a condition called ascites.
In cases where cerebrospinal fluid builds up, such as in hydrocephalus, the fluid is commonly diverted to the peritoneal cavity by use of a shunt placed by surgery.Body fluid sampling from the peritoneal cavity is called peritoneocentesis.
The peritoneal cavity is involved in peritoneal dialysis.

See also
Lesser sac
Greater sac

References
External links
peritoneum at The Anatomy Lesson by Wesley Norman (Georgetown University)