Adrenal glands are present right next to the kidneys. Based on two different types of tissues of which they are made, they are divided into two parts. The cortex is the outer portion that originates from glandular tissues while the medulla is the inner portion that originates from nerve tissues. As they differ in their origination, they differ in their function too. Cortex is responsible for secreting sex hormones (e.g., estrogens and androgens), regulating the immune system, and maintaining salt and sugar metabolism by secreting aldosterone and cortisol respectively. The adrenal medulla secretes epinephrine and norepinephrine during fight or flight conditions and is under neurologic control. Adrenal gland abnormalities are suspected when the quantity of hormones produced is either too low or too high. Treatment involves hormone replacement therapy in which the quantity of hormone produced is restored to normal. When hormones are produced in excess, they may be treated medically. In some cases, surgical removal of the adrenal gland may be required to maintain the normal concentration of the hormone.