WINDOW TITLE "Návěstidlo světelné — konzola,krakorec,lávka"
@ 00, 12 GET Oznaceni PREFIX "Označení:" SIZE 0, 10  ONCHANGE=OnChange_VAR
@ 01, 12 GET jzm_popis PREFIX "Popis:"   SIZE 0, 32
@ 02, 12 GET jzm_km PREFIX "Kilometr:"   SIZE 0, 20
@ 02, 33 GET jzm_kmev SUFFIX "evid"      SIZE 0,2
@ 03, 12 GET jzm_neu PREFIX "+km:"       SIZE 0, 8

@ 4.2, 12 BUTTON FORM "UAP_TO.fmt" \\\
       SIZE 0,15 TITLE "Informace STI" \\\
       ID "VIS"

@ 06, 12 GET Vybava12 PREFIX "Pozice 12:"   SIZE 0, 30
@ 07, 12 GET Vybava11 PREFIX "Pozice 11:"   SIZE 0, 30
@ 08, 12 GET Vybava10 PREFIX "•Pozice 10:"  SIZE 0, 30 ONCHANGE = fn_NULUJod10
@ 09, 12 GET Vybava09 PREFIX "Pozice 9:"    SIZE 0, 30
@ 10, 12 GET Vybava08 PREFIX "Pozice 8:"    SIZE 0, 30
@ 11, 12 GET Vybava07 PREFIX "•Pozice 7:"   SIZE 0, 30 ONCHANGE = fn_NULUJod7
@ 11, 0 SAY "Výbavu návěstidla vytvořte pomocí objektu 10343" ID "LabelMSG1"
@ 12, 12 GET Vybava06 PREFIX "Pozice 6:"    SIZE 0, 30
@ 12, 0 SAY "'006 Návěstidlo (podstavec) na lávce nebo na trakční bráně'" ID "LabelMSG2"
@ 13, 12 GET Vybava05 PREFIX "Pozice 5:"    SIZE 0, 30
@ 14, 12 GET Vybava04 PREFIX "•Pozice 4:"   SIZE 0, 30 ONCHANGE = fn_NULUJod4
@ 15, 12 GET Vybava03 PREFIX "Pozice 3:"    SIZE 0, 30
@ 16, 12 GET Vybava02 PREFIX "Pozice 2:"    SIZE 0, 30
@ 17, 12 GET Vybava01 PREFIX "•Pozice 1:"   SIZE 0, 30 ONCHANGE = fn_NULUJVSE


Function fn_NULUJod10
  IF Vybava10 = ""
    CHANGESTATE ID=Vybava11 VALUE=""
    CHANGESTATE ID=Vybava12 VALUE=""
  ENDIF
EndFunction

Function fn_NULUJod7
  IF Vybava07 = ""
    CHANGESTATE ID=Vybava08 VALUE=""
    CHANGESTATE ID=Vybava09 VALUE=""
    CHANGESTATE ID=Vybava10 VALUE=""
    CHANGESTATE ID=Vybava11 VALUE=""
    CHANGESTATE ID=Vybava12 VALUE=""
  ENDIF
EndFunction

Function fn_NULUJod4
  IF Vybava04 = ""
    CHANGESTATE ID=Vybava05 VALUE=""
    CHANGESTATE ID=Vybava06 VALUE=""
    CHANGESTATE ID=Vybava07 VALUE=""
    CHANGESTATE ID=Vybava08 VALUE=""
    CHANGESTATE ID=Vybava09 VALUE=""
    CHANGESTATE ID=Vybava10 VALUE=""
    CHANGESTATE ID=Vybava11 VALUE=""
    CHANGESTATE ID=Vybava12 VALUE=""
  ENDIF
EndFunction


Function fn_NULUJVSE
  IF Vybava01 = ""
    CHANGESTATE ID=Vybava02 VALUE=""
    CHANGESTATE ID=Vybava03 VALUE=""
    CHANGESTATE ID=Vybava04 VALUE=""
    CHANGESTATE ID=Vybava05 VALUE=""
    CHANGESTATE ID=Vybava06 VALUE=""
    CHANGESTATE ID=Vybava07 VALUE=""
    CHANGESTATE ID=Vybava08 VALUE=""
    CHANGESTATE ID=Vybava09 VALUE=""
    CHANGESTATE ID=Vybava10 VALUE=""
    CHANGESTATE ID=Vybava11 VALUE=""
    CHANGESTATE ID=Vybava12 VALUE=""
  ENDIF
EndFunction


Function OnChange_VAR
  IF LEN(TRUEVALUE(Vybava01))=0
    CHANGESTATE ID=Vybava01 HIDDEN=1
    CHANGESTATE ID=Vybava02 HIDDEN=1
    CHANGESTATE ID=Vybava03 HIDDEN=1
    CHANGESTATE ID=Vybava04 HIDDEN=1
    CHANGESTATE ID=Vybava05 HIDDEN=1
    CHANGESTATE ID=Vybava06 HIDDEN=1
    CHANGESTATE ID=Vybava07 HIDDEN=1
    CHANGESTATE ID=Vybava08 HIDDEN=1
    CHANGESTATE ID=Vybava09 HIDDEN=1
    CHANGESTATE ID=Vybava10 HIDDEN=1
    CHANGESTATE ID=Vybava11 HIDDEN=1
    CHANGESTATE ID=Vybava12 HIDDEN=1
    CHANGESTATE ID=LabelMSG1 HIDDEN=0
    CHANGESTATE ID=LabelMSG2 HIDDEN=0
  ELSE
    CHANGESTATE ID=LabelMSG1 HIDDEN=1
    CHANGESTATE ID=LabelMSG2 HIDDEN=1
  ENDIF

  IF GETENV("GI_SZDC_FORM_STI_BUTTON")="1"
    CHANGESTATE ID=VIS HIDDEN=0
  ELSE
    CHANGESTATE ID=VIS HIDDEN=1
  ENDIF

EndFunction