anchor.diff:          Inc(stavim);
          end;
   
  -      (Blk as TBlkVyhybka).SetPoloha(TVyhPoloha(Self.fproperties.Vyhybky[i].Poloha),
  -                                     true, false, Self.VyhPrestavenaNC, Self.VyhNeprestavenaNC);
  +      vyhybka.SetPoloha(TVyhPoloha(vyhZaver.Poloha),
  +                        true, false, Self.VyhPrestavenaNC, Self.VyhNeprestavenaNC);
        end;
   
       for i := 0 to Self.fproperties.Odvraty.Count-1 do
        begin
         // nastaveni odvratu
  -      Blky.GetBlkByID(Self.fproperties.Odvraty[i].Blok, Blk);
  -      if ((Blk as TBlkVyhybka).Poloha <> TVyhPoloha(Self.fproperties.Odvraty[i].Poloha)) then
  +      odvratZaver := Self.fproperties.Odvraty[i];
  +      Blky.GetBlkByID(odvratZaver.Blok, TBlk(vyhybka));
  +      if (vyhybka.Poloha <> TVyhPoloha(odvratZaver.Poloha)) then
          begin
           if (stavim >= _JC_MAX_VYH_STAVENI) then
            begin
  
positive.code:    12:begin
         writelog('Krok 12 : nastavuji redukci menu prislusenstvi',WR_VC);
  
         for i := 0 to Self.fproperties.Prisl.Count-1 do
          begin
           Blky.GetBlkByID(Self.fproperties.Prisl[i].Blok, Blk);
  
           case (Blk.typ) of
             _BLK_SCOM:begin
               //scom
               writelog('Krok 12 : scom '+Blk.name+' - redukuji menu', WR_VC);
               TBlkSCom(Blk).RedukujMenu();
               Blky.GetBlkByID(Self.fproperties.Prisl[i].ref_blk, Blk);
               TBlkUsek(Blk).AddChangeEvent(TBlkUsek(Blk).EventsOnZaverReleaseOrAB,
                 CreateChangeEvent(ceCaller.NullSComMenuReduction, Self.fproperties.Prisl[i].Blok));
             end;// _BLK_SCOM
           end;//case
          end;//for i
  
         // prejezdy
         uzavren_glob := false;
  
negative.code:    end;// case 14
  
     15:begin
       if (navestidlo.Navest > TBlkSCom._NAV_STUJ) then
        begin
         writelog('Krok 15 : navestidlo postaveno', WR_VC);
         Self.Krok := 16;
  