function dyn_callback_reg(s){
    var dc = window.top.document;
    var selectControl = dc.getElementById('idRegionList');
    selectControl.options.length = 0;
    a1=s.split(';');
    selectControl.options[selectControl.options.length] = new Option(String('По всем регионам'),String(0),false,false);
    for(i = 0; i < a1.length-1; i++)
    {
      a2 = a1[i].split(':');
      selectControl.options[selectControl.options.length] = new Option(String(a2[1]),String(a2[0]),false,false);
    }
}

function dyn_callback_fil(s){
    var dc = window.top.document;
    var selectControl = dc.getElementById('idFilialList');
    selectControl.options.length = 0;
    a1=s.split(';');
    selectControl.options[selectControl.options.length] = new Option(String('По всем подразделениям'),String(0),false,false);
    for(i = 0; i < a1.length-1; i++)
    {
      a2 = a1[i].split(':');
      selectControl.options[selectControl.options.length] = new Option(String(a2[1]),String(a2[0]),false,false);
    }
}

function getRegionList(iOkrug){
    var dc = window.top.document;
    run('srvRegionList','dyn_callback_reg',iOkrug );
    run('srvFilialList','dyn_callback_fil',dc.getElementById('idFilialList').value)
}

function getRegionList2(iOkrug){
    var dc = window.top.document;
    run('srvRegionList','dyn_callback_reg',iOkrug );
}


function getFilialList(iRegion){
    run('srvFilialList','dyn_callback_fil',iRegion);
}