﻿// JScript File
function _getGroup(cmb,mtId,selval)
{
    try
    {
    var res=GetGroupList.GetGroups(mtId,selval,true);
    
    cmb.options.length=0;
    var opt1=document.createElement('OPTION');
    cmb.options.add(opt1);
    opt1.text='Loading...';
    opt1.value=-1;
    
    for(var i=1; i<=res.value.Tables[0].Rows.length; i++)
     {
        if(res.value.Tables[0].Rows[i]!=null)
        {
            var opt=document.createElement('OPTION');
            cmb.options.add(opt);
            opt.text=res.value.Tables[0].Rows[i].m_name;
            opt.value=res.value.Tables[0].Rows[i].m_id;
        }
     }
     opt1.text=res.value.Tables[0].Rows[0].m_name;
     opt1.value=res.value.Tables[0].Rows[i].m_id;
     }
     catch(e)
     {
     }
}

