function UR(rec)
{
        if(rec){
                TTREGS = rec;
        } else {
                return false;
        }
        TTREGS=rec;

        opt=document.bengine.elements["region"].options;
        opt[0].value=-1;opt[0].text="beliebig";

        opt=document.bengine.elements["ziel"].options;
        opt[0].value=-1;opt[0].text="beliebig";

        found=1;
        for(i=0;i<TTREGS.length;i++){
                sr=TTREGS[i].split("|");
                if(sr[1]>=10000){
                        if(found>=opt.length){
                                opt[found++]=new Option(sr[0],sr[1]);
                        } else {
                                opt[found].text=sr[0];
                                opt[found++].value=sr[1];
                        }
                }
        }
        while(opt.length > found){
                opt[opt.length-1]=null;
        }
        FixRSel();
}

function UR_erde(rec)
{
        if(rec){
                TTREGS = rec;
        } else {
                return false;
        }
        TTREGS=rec;
        uthema=(document.bengine.uthema.options[document.bengine.uthema.selectedIndex].value);
        HBit=uthema.split("_");

        opt=document.bengine.elements["region"].options;
        opt[0].value=-1;opt[0].text="beliebig";

        opt=document.bengine.elements["ziel"].options;
        opt[0].value=-1;opt[0].text="beliebig";

        if(HBit[0]==1){
            tmp_val=3;
            tmp_HBit=1;

        }
        else{
            tmp_val=4;
            tmp_HBit=2;
        }
        found=1;
        for(i=0;i<TTREGS.length;i++){
                sr=TTREGS[i].split("|");
                if(sr[1]>=10000){
                    if( (sr[tmp_val]&(1<<HBit[1]-1)&& HBit[0]==tmp_HBit)  ||  uthema==''){
                        if(found>=opt.length){
                                opt[found++]=new Option(sr[0],sr[1]);
                        } else {
                                opt[found].text=sr[0];
                                opt[found++].value=sr[1];
                        }
                    }
                }
        }
        while(opt.length > found){
                opt[opt.length-1]=null;
        }
        FixRSel();
}