Discuss in detail the functions of hormones secreted by cortex and medulla part of the adrenal glands