﻿// JScript File

 function displayContractMessage(radBroadbandYesID, radInContractYesID)
    {
        var radBroadbandYes = document.getElementById(radBroadbandYesID);
        var radInContractYes = document.getElementById(radInContractYesID);
        
        var haveBroadband = radBroadbandYes.checked;
        var inContract;
        
        if (haveBroadband)
        {
            inContract = radInContractYes.checked;
        }
        else
        {
            inContract = false;
        }
        
        if (haveBroadband)
        {
            if (inContract)
            {
                window.alert("Because you are still under contract with your existing provider, you may incur a cancellation fee if you choose to switch.\n\nTo switch your broadband, your new supplier will need a Migration Authorisation Code (MAC).\nYour current supplier can provide you with this code.\n\nClick OK to view the great deals that are available to you");
            }
            else
            {
                window.alert("To switch your broadband, your new supplier will need a Migration Authorisation Code (MAC).\nYour current supplier can provide you with this code.\n\nClick OK to view the great deals that are available to you.");
            }
        }
    }