
function CheckSMS(sSelId,sChkId,sChkLblId,sTxtId, sTxtLblId){
    var objCnt = document.getElementById(sSelId);

    if((objCnt[objCnt.selectedIndex].value.substring(0,2) == 'uk') || (objCnt[objCnt.selectedIndex].value == '  '))
    {
        document.getElementById(sChkId).disabled = false;
        
        document.getElementById(sTxtId).disabled = false;  
        
       document.getElementById(sChkLblId).style.color = '';
       document.getElementById(sTxtLblId).style.color = '';
    }
    else
    {
        document.getElementById(sChkId).disabled = true;
        document.getElementById(sChkId).checked = false;
        
        document.getElementById(sTxtId).disabled = true;
        document.getElementById(sTxtId).checked = false;
        
        document.getElementById(sChkLblId).style.color = '#999999';
        document.getElementById(sTxtLblId).style.color = '#999999';
    }
}

function CheckGroupToggle(aBrushHeads, sToggleChk, sBrushAdd)
{
    if(aBrushHeads.length)
    {
        if(document.getElementById(sToggleChk).checked)
        {
            //disable all controls and grey out associated labels supplied in the array
            for(var i=0;i<aBrushHeads.length;i++)
            {
                document.getElementById(aBrushHeads[i]).disabled = true;
                document.getElementById(aBrushHeads[i]).checked = false;
                
                document.getElementById(aBrushHeads[i] + '_label').style.color = '#999999';
            }
            
            document.getElementById(sBrushAdd).disabled = true;
            document.getElementById(sBrushAdd + '_label').style.color = '#999999';
            document.getElementById(sBrushAdd).selectedIndex = 0;
        }
        else
        {
            //enable all controls and grey out associated labels supplied in the array
            for(var i=0;i<aBrushHeads.length;i++)
            {
                document.getElementById(aBrushHeads[i]).disabled = false;

                document.getElementById(aBrushHeads[i] + '_label').style.color = '';
            }  
            
            document.getElementById(sBrushAdd).disabled = false;
            document.getElementById(sBrushAdd + '_label').style.color = '';
        } 
    }
}