
function simple_srch_check(oForm){
    if(oForm.elements.keyw.value=='' && oForm.elements.p1.selectedIndex==0 && oForm.elements.p2.selectedIndex==0){
            oForm.elements.keyw.focus();
            return false
    } else return true;
 }   


 function switch_groups(id){
                        var target=document.forms.searchform.elements.p2;
                        var m;
                   //alert(id)
                       for(m=target.options.length-1;m>=0;m--)target.options[m]=null;
                            target.options[0]=new Option('--all groups--',0);
                            if(id>0){
                                for(m=0;m<aSrch[id].length;m++)target.options[m+1]=new Option(aSrch[id][m][1],aSrch[id][m][0])
                            } else {
                            
                            }
                   }       
 function switch_aid(id){
                        var target=document.forms.addf.elements['form[abonament_id]'];
                        var m;
                   //alert(id)
                       for(m=target.options.length-1;m>=0;m--)target.options[m]=null;
                            //target.options[0]=new Option('--all groups--',0);
                          
                                for(m=0;m<aPos[id].length;m++)target.options[m]=new Option(aPos[id][m][1],aPos[id][m][0])
                           
                   }  

