Here is a good study guide for the Four Elements Meditation practice.
Nanda's Vision, translated from the Pali by Thanissaro Bhikkhu
From the Therigatha (Verses of the Elder Nuns) 82-86
Sick, putrid, unclean:
look, Nanda, at this physical heap.
Through contemplation of the foul, develop your mind,
make it one, well-centered.
As this [your body], so that. As that, so this.
It gives off a foul stench, the delight of fools.
Considering it thus, untiring, both day & night, I, with my own discernment dissecting it, saw.
And as I, heedful, examined it aptly, this body — as it actually is — was seen inside & out.
Then was I disenchanted with the body & dispassionate within: Heedful, detached, calmed was I. Unbound.
This meditation from the Satipatthana Sutta aids in breaking one's attachment to one's body and to the bodies of others. As long as there is any attachment, there will be suffering. With these contemplations, one realizes that oneself and everyone else will come to the same end. After viewing the corpse, one applies that consideration to one's own body. It breaks or shatters that complacent thought: "I'm going to live forever." "This body will continue on for all eternity." When that happens, irritation or anxiety arises. Then, a sense of detachment arises -- a realization that the body is based on causes and conditions and it will be gone when those causes and conditions are no longer present. The end result of this meditation is sense of lightness or happiness; that one is not bound up forever with this body.
The following pictures of a corpse in various stages of decomposition may be used in applying The Nine Cemetery Contemplations: http://silentmindopenheart.org/docs/cemetery/Death.html
Talk on Corpse Reflection by Temple Smith
Follow link for Venerable Soma Thera's section on the nine cemetery contemplations taken from his book: The Way of Mindfulness The Satipatthana Sutta and Its Commentary