﻿// JScript File
//Code to validate checkbox that is required.
function checkcbIAgreeBox(source,args)
{
    //var InputEligible = document.getElementById("cboMedicareEligible").value;
    //var InputElig = document.getElementById(<%=cbIAgree.ClientID%>).getElementsByTagName('input');
    //alert(InputElig)
    alert(args.Value)
    alert(source.Value)
    //alert(<%=cbIAgree.ClientID%>)
    alert(document.RegForm.cbIAgree.checked)
    //if (document.form1.cbIAgree.checked == false)
    if (document.form1.cbIAgree.checked == false)
    {
        return args.IsValid = false;
    }
}
function checkCheckBoxList1(source,args)
{
    var chkBoxList = document.getElementById("CheckBoxList1");
    var chkBoxCount= chkBoxList.getElementsByTagName("input");

    for(var i=0;i<chkBoxCount.length;i++) 
    {
        alert(chkBoxCount[i].checked);
        chkBoxCount[i].checked = !chkBoxCount[i].checked;
    }
}

