﻿/**************************************************************************************************************/
/***                                                                                                        ***/
/***  Name: confirmReferralCancel                                                                           ***/
/***                                                                                                        ***/
/// <summary>
/// Confirms the cancel of the addition of a referral.
/// </summary>
/***                                                                                                        ***/
/**************************************************************************************************************/

function confirmReferralCancel()
{
    if (confirm("Are you sure you want to cancel the addition of this referral?") == true)
    {
        return true;
    }
    else
    {
        return false;
    }
}

/**************************************************************************************************************/
/***                                                                                                        ***/
/***  Name: changeSicknessCertificate                                                                       ***/
/***                                                                                                        ***/
/// <summary>
/// Turns the certificate controls on/off.
/// </summary>
/***                                                                                                        ***/
/**************************************************************************************************************/

function changeSicknessCertificate(rblCertId, ulSicknessCertId)
{
    /**********************************************************************************************************/
    /***  Get the certificate controls                                                                      ***/
    /**********************************************************************************************************/

    var rblCert = document.getElementById(rblCertId);
    var ulSicknessCert = document.getElementById(ulSicknessCertId);
    
    /**********************************************************************************************************/
    /***  Turn the certificate controls on if the radio button is Yes                                       ***/
    /**********************************************************************************************************/

    if (rblCert.childNodes[0].checked == true)
    {
        ulSicknessCert.style.display = '';
    }
    else
    {
        ulSicknessCert.style.display = 'none';
    }
}