﻿// Registration Validators...

//--------------------------------------------------------------------------------

function checkTermsChecked(sender, args)
{
    // If The Terms CheckBox Is Ticked...
    
    if (document.getElementById('ctl00_cphMain_cbTerms').checked == true)
    {
        args.IsValid = true;
    }
    else
    {
        args.IsValid = false;
    }

    return;
}

//--------------------------------------------------------------------------------

function checkEmailAddress(sender, args)
{
    // Check The Email Address Contains Correct T.L.D...
    // ".nhs" or ".ac.uk"...

    if ((args.Value.match(".nhs") != null) || (args.Value.match(".ac.uk") != null))
    {
        args.IsValid = true;
    }
    else
    {
        args.IsValid = false;
    }

    return;
}

//--------------------------------------------------------------------------------
