Dlg RivFineOrdine
{
   Caption = MSG(513)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 375
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Radio LL2
   {
     Caption = MSG(514)
     Hint = MSG(515)
     Placement
     {
        posx = 5
        posy = 35
        dimx = 350
        dimy = 20
     }

     Value = 0

     OnClick
     [
       $RivFineOrdine = -1
     ]

   }

   Radio LL4
   {
     Caption = MSG(516)
     Hint = MSG(517)
     Enable = $enable_save_riv
     Placement
     {
        posx = 5
        posy = 85
        dimx = 350
        dimy = 20
     }

     Value = 0

     OnClick
     [
       $RivFineOrdine = 1
     ]

   }

   Radio LL5
   {
     Caption = MSG(518)
     Hint = MSG(519)
     Placement
     {
        posx = 5
        posy = 135
        dimx = 350
        dimy = 20
     }

     Value = 1

     OnClick
     [
       $RivFineOrdine = 0
     ]

   }


   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2

      Placement
      {
         posx = 300
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $DLG_FINE_ORDINE_RIV=0
      ]
   }

   Button Avanti
   {
      Caption = MSG(311)
      Result  = 1
      Default = 1

      Placement
      {
         posx = 145
         posy = 185
         dimx = 150
         dimy = 30
      }

      OnClick
      [
         $DLG_FINE_ORDINE_RIV=1
      ]
   }
}

Dlg AziFineOrdine
{
   Caption = MSG(520)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 325
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmConferma
   {
      Caption = MSG(521)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 300
         dimy = 110
      }

      Radio RdConferma
      {
        Caption = MSG(522)
        Hint    = MSG(522)
        Value   = 1

        Placement
        {
           posx = 15
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_conferma = 1
        ]

      }


      Bevel Bvl1
      {
        Placement
        {
           posx = 150
           posy = 20
           dimx = 2
           dimy = 80
        }
      }

      Radio RdAttesaITA
      {
        Caption = MSG(523)
        Hint    = MSG(524)
        Value   = 0

        Placement
        {
           posx = 170
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_conferma = 2
        ]

      }

      Radio RdAttesaENG
      {
        Caption = MSG(525)
        Hint    = MSG(526)
        Value   = 0

        Placement
        {
           posx = 170
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_conferma = 3
        ]

      }

      Radio RdAttesaSPA
      {
        Caption = MSG(527)
        Hint    = MSG(528)
        Value   = 0

        Placement
        {
           posx = 170
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_conferma = 4
        ]

      }

      //Dimitri 080603
      Radio StampasuCorel
      {
        Caption = MSG(529)
        Hint    = MSG(530)
        //Enable  = 1
        //Value   = $DLG_PRN_to_corel
        Value   = 0

        Placement
        {
           posx = 15
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_PRN_to_corel = 1
        ]
      }
      // Eugenio 05/04/13
      Radio SalvaChiudi
      {
        Caption = MSG(545)
        Hint    = MSG(545)
        //Enable  = 1
        //Value   = $DLG_PRN_to_corel
        Value   = 0

        Placement
        {
           posx = 15
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_SalvaChiudi = 1
        ]
      }


   }

   Frame FrmOpzioni
   {
      Caption = MSG(531)

      Placement
      {
         posx = 10
         posy = 120
         dimx = 300
         dimy = 80
      }

      Check PDFAsView
      {
        Caption = MSG(532)
        Hint    = MSG(533)
        Enable  = 1
        Value   = $DLG_PRN_as_view

        Placement
        {
           posx = 15
           posy = 20
           dimx = 150
           dimy = 20
        }

        OnClick
        [
          $DLG_PRN_as_view = 1
        ]

      }

      //Dimitri 081029 - per stampa a colori
      Check PDFColor
      {
        Caption = MSG(534)
        Hint    = MSG(535)
        Enable  = 1
        Value   = $DLG_PRN_colori

        Placement
        {
           posx = 170
           posy = 20
           dimx = 100
           dimy = 20
        }

        OnClick
        [
          $DLG_PRN_colori = 1
        ]

      }

      Check FronteRetro
      {
        Caption = MSG(565)
        Hint    = MSG(565)
        Enable  = 1
        Value   = $DLG_PRN_fro_ret

        Placement
        {
           posx = 15
           posy = 50
           dimx = 150
           dimy = 20
        }

        OnClick
        [
          $DLG_PRN_fro_ret = 1
        ]

      }

      Check TagNFC
      {
        Caption = MSG(571)
        Hint    = MSG(571)
        Enable  = 1
        Value   = $DLG_TAG_NFC

        Placement
        {
           posx = 170
           posy = 50
           dimx = 150
           dimy = 20
        }

        OnClick
        [
          $DLG_TAG_NFC = 1
        ]

      }
   }

   Button BtnAnnulla
   {
      Caption = MSG(615)
      Result  = 2

      Placement
      {
         posx = 245
         posy = 205
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $DLG_FINE_ORDINE_AZI=0
      ]
   }

   Button BtnAvanti
   {
      Caption = MSG(311)
      Result  = 1
      Default = 1

      Placement
      {
         posx = 105
         posy = 205
         dimx = 135
         dimy = 30
      }

      OnClick
      [
         $DLG_FINE_ORDINE_AZI=1
      ]
   }
}

Dlg 30MM_Ripiano
{
   Caption = MSG(413)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Posizione
   {
      Caption = MSG(414)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Radio Pos_piu_30
      {
        Caption = $DLG_hint_piu_30
        Hint    = $DLG_caption_piu_30
        Enable  = $DLG_en_pos_piu_30
        Value   = $DLG_pos_piu_30

        Placement
        {
           posx = 10
           posy = 20
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_delta_allineamento = $DLG_spessore_ripiano
        ]

      }

      Radio Pos_piu_15
      {
        Caption = $DLG_hint_piu_15
        Hint    = $DLG_caption_piu_15
        Enable  = $DLG_en_pos_piu_15
        Value   = $DLG_pos_piu_15

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_delta_allineamento = $DLG_spessore_ripiano/2
        ]

      }


      Radio Pos_0
      {
        Caption = "0 "
        Hint = MSG(415)
        Enable = 1
        Value = $DLG_pos_0

        Placement
        {
           posx = 10
           posy = 60
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_delta_allineamento = 0
        ]

      }

      Radio Pos_meno_15
      {
        Caption = $DLG_hint_meno_15
        Hint    = $DLG_caption_meno_15
        Enable  = $DLG_en_pos_meno_15
        Value   = $DLG_pos_meno_15

        Placement
        {
           posx = 10
           posy = 80
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_delta_allineamento = -$DLG_spessore_ripiano/2
        ]

      }

      Radio Pos_meno_30
      {
        Caption = $DLG_hint_meno_30
        Hint    = $DLG_caption_meno_30
        Enable  = $DLG_en_pos_meno_30
        Value   = $DLG_pos_meno_30

        Placement
        {
           posx = 10
           posy = 100
           dimx = 100
           dimy = 20
        }

        OnClick
        [
          $DLG_delta_allineamento = -$DLG_spessore_ripiano
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Check chkElimina
   {
     Caption = MSG(745)
     Hint    = MSG(745)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 20
        posy = 145
        dimx = 100
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(765))
        }
     ]

   }
}

Dlg 30MM_Schiena
{
   Caption = MSG(416)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
//      dimy = 220
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoSchiena
   {
      Caption = MSG(417)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Radio Laccato
      {
        Caption = MSG(722)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_lac

        Placement
        {
           posx = 10
           posy = 30
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           //ER 12.06.12 La stringa sotto  un valore da non tradurre
           $DLG_tipo_schiena = "LACCATO"
           $DLG_var_to_call_1 = "GEST_SC"
           $DLG_RAD = "SBO"
           GOSUB CambiaRadDlg
           VAR_VALUESTR_SET($DLG_idx_to_call,"GEST_SC","BCO")
           // 05/07/2019 - Emanuele - Aggiungo assegnazione per impostare il valore corretto della z
           VAR_VALUE_SET($DLG_idx_to_call,"GEST_Z",19)
           $DLG_value_schiena_lac = 1
           $DLG_value_schiena_vet = 0
           $DLG_value_schiena_tes = 0
           // 03/07/2019 - Emanuele - Aggiungo variabile per rovere gentle
           $DLG_value_schiena_rov = 0

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per modificare la modalit della variabile per cambio finiture
           VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","131072")

           if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
           {
              //$menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
              $menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
              //if( STRCMP($menu_get,"")==0 | STRCMP($menu_get,$menu_set)!=0 ) {
              VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$menu_set)
              //}
              //$modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
              $modo_set = 131072
              //if( $modo_get!=$modo_set ) {
              VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$modo_set)
              // }
           }
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1 )
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
           $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
           if( $DLG_value_schiena_tes==1 )   { GOSUB Get_Image_30MM_SchTes }
           else                              { GOSUB Get_Image_30MM_SchVL }

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per bloccare il cambio tipo vetro
           $DLG_enable_tipo_vtr = 0
        ]

      }

      Radio VetroColorato
      {
        Caption = MSG(419)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_vet

        Placement
        {
           posx = 10
           posy = 50
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           //ER 12.06.12 La stringa sotto  un valore da non tradurre
           $DLG_tipo_schiena = "VETRO COLORATO"
           $DLG_var_to_call_1 = "GEST_CR"
           $DLG_RAD = "SB1"
           GOSUB CambiaRadDlg
           // 05/07/2019 - Emanuele - Aggiungo assegnazione per impostare il valore corretto della z
           VAR_VALUE_SET($DLG_idx_to_call,"GEST_Z",20)
           $DLG_value_schiena_lac = 0
           $DLG_value_schiena_vet = 1
           $DLG_value_schiena_tes = 0
           // 03/07/2019 - Emanuele - Aggiungo variabile per rovere gentle
           $DLG_value_schiena_rov = 0

           // 20/11/2019 - Emanuele - Aggiungo comando per modificare modalit della variabile per cambio finitura
           VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_368_luc.txt")

           if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
           {
              $menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
              $menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
              if( STRCMP($menu_get,"")==0 | STRCMP($menu_get,$menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$menu_set) }
              $modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
              $modo_set = 131072
              if( $modo_get!=$modo_set ) { VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$modo_set) }
           }
           // 20/11/2019 - Emanuele - Non chiedo la variante
//           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1 )
           // 20/11/2019 - Emanuele -  Aggiungo assegnazione per resettare il tipo di vetro
           $DLG_var_lucido = 1
           $DLG_var_opaco = 0
           $DLG_var_xglass_lucido = 0
           $DLG_var_xglass_opaco = 0
           $DLG_var_xglass_metal_lucido = 0
           $DLG_var_xglass_metal_opaco = 0
           // 20/11/2019 - Emanuele - Imposto una modalit di default alla variabile per cambio finiture
           // e faccio scegliere il colore all'utente
           VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_368_luc.txt")

           $R = CHIEDI(-1,"DLG_COLORE_30MM_V")

           if(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)!=$DLG_COLORE_30MM_V)
           {
              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_1,"=",APICI(),$DLG_COLORE_30MM_V,APICI()))
           }


           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
           $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
           if( $DLG_value_schiena_tes==1 )   { GOSUB Get_Image_30MM_SchTes }
           // 20/11/2019 - Emanuele - Modifico condizione per gestire tutti i tipi di vetro
//           else                              { GOSUB Get_Image_30MM_SchVL }
           else
           {
              if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
              if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
              if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
           }

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per bloccare il cambio tipo vetro
           $DLG_enable_tipo_vtr = 1
        ]

      }

      Radio Tessuto
      {
        Caption = MSG(467)
        Hint    = ""
        Enable  = $DLG_enable_schiena_tes
        Value   = $DLG_value_schiena_tes

        Placement
        {
           posx = 10
           posy = 70
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           $DLG_tipo_schiena = "TESSUTO"
           $DLG_var_to_call_1 = "GEST_RZ"
           $DLG_RAD = "SBV"
           GOSUB CambiaRadDlg
           // 05/07/2019 - Emanuele - Aggiungo assegnazione per impostare il valore corretto della z
           VAR_VALUE_SET($DLG_idx_to_call,"GEST_Z",22)
           $DLG_value_schiena_lac = 0
           $DLG_value_schiena_vet = 0
           $DLG_value_schiena_tes = 1
           // 03/07/2019 - Emanuele - Aggiungo variabile per rovere gentle
           $DLG_value_schiena_rov = 0

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per modificare la modalit della variabile per cambio finiture
           VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","131072")

           if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
           {
              $menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
              $menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
              if( STRCMP($menu_get,"")==0 | STRCMP($menu_get,$menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$menu_set) }
              $modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
              $modo_set = 131072
              if( $modo_get!=$modo_set ) { VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$modo_set) }
           }
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1 )
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
           $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
           if( $DLG_value_schiena_tes==1 )   { GOSUB Get_Image_30MM_SchTes }
           else                              { GOSUB Get_Image_30MM_SchVL }

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per bloccare il cambio tipo vetro
           $DLG_enable_tipo_vtr = 0
        ]

      }
      // 03/07/2019 - Emanuele - Aggiungo radiobutton per rovere gentle
      Radio RovereGe
      {
        Caption = MSG(3500)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_rov

        Placement
        {
           posx = 10
           posy = 90
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           //ER 12.06.12 La stringa sotto  un valore da non tradurre
           $DLG_tipo_schiena = "ROVERE"
           $DLG_var_to_call_1 = "GEST_GE"
           $DLG_RAD = "SBOW"
           GOSUB CambiaRadDlg
           VAR_VALUESTR_SET($DLG_idx_to_call,"GEST_GE","RG1")
           // 05/07/2019 - Emanuele - Aggiungo assegnazione per impostare il valore corretto della z
           VAR_VALUE_SET($DLG_idx_to_call,"GEST_Z",18)
           $DLG_value_schiena_lac = 0
           $DLG_value_schiena_vet = 0
           $DLG_value_schiena_tes = 0
           $DLG_value_schiena_rov = 1

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per modificare la modalit della variabile per cambio finiture
           VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","131072")

           if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
           {
              //$menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
              $menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
              //if( STRCMP($menu_get,"")==0 | STRCMP($menu_get,$menu_set)!=0 ) {
              VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$menu_set)
              //}
              //$modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
              $modo_set = 131072
              //if( $modo_get!=$modo_set ) {
              VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$modo_set)
              // }
           }
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1 )
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
           $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
           if( $DLG_value_schiena_tes==1 )   { GOSUB Get_Image_30MM_SchTes }
           else                              { GOSUB Get_Image_30MM_SchVL }

           // 20/11/2019 - Emanuele - Aggiungo assegnazione per bloccare il cambio tipo vetro
           $DLG_enable_tipo_vtr = 0
        ]

      }

   }

   // 19/11/2019 - Emanuele - Aggiungo sezione per selezionare il tipo di vetro
   Frame TipoVetro
   {
      Caption = MSG(968)
      Enable = $DLG_enable_tipo_vtr
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 150
         dimx = 150
         dimy = 170
      }

      Radio Vetro_Lucido
      {
        Caption = MSG(375)
        Hint    = ""
        Enable  = $DLG_enable_tipo_vtr
        Value   = $DLG_var_lucido

        Placement
        {
           posx = 10
           posy = 30
           dimx = 100
           dimy = 20
        }


        OnClick
        [
            $DLG_var_lucido = 1
            $DLG_var_opaco = 0
            $DLG_var_xglass_lucido = 0
            $DLG_var_xglass_opaco = 0
            $DLG_var_metal_lucido = 0
            $DLG_var_metal_opaco = 0

            VAR_SET_MENU($DLG_idx_to_call,"GEST_CR","colori_368_luc.txt")

            $DLG_var_to_call_1 = "GEST_CR"

            VAR_SET_MENU(-1,"DLG_var_to_call_1","colori_368_luc.txt")

            if(VAR_EXIST($DLG_idx_to_call,"GEST_C0"))
            {
               if(VAR_VAL_STR($DLG_idx_to_call,"GEST_C0")!=$VALORE_NULLO)
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C0=",APICI(),$VALORE_NULLO,APICI()))
               }
            }

            VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_368_luc.txt")

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CR=",APICI(),"BCO",APICI()))

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            if( $DLG_value_schiena_tes==1 )        { GOSUB Get_Image_30MM_SchTes }
            else
            {
               if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
               if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
               if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
            }

        ]

      }

      Radio Vetro_Opaco
      {
        Caption = MSG(376)
        Hint    = ""
        Enable  = $DLG_enable_tipo_vtr
        Value   = $DLG_var_opaco

        Placement
        {
           posx = 10
           posy = 50
           dimx = 100
           dimy = 20
        }


        OnClick
        [
            $DLG_var_lucido = 0
            $DLG_var_opaco = 1
            $DLG_var_xglass_lucido = 0
            $DLG_var_xglass_opaco = 0
            $DLG_var_metal_lucido = 0
            $DLG_var_metal_opaco = 0

            VAR_SET_MENU($DLG_idx_to_call,"GEST_C0","colori_368_opa.txt")

            $DLG_var_to_call_1 = "GEST_C0"

            VAR_SET_MENU(-1,"DLG_var_to_call_1","colori_368_opa.txt")

            if(VAR_EXIST($DLG_idx_to_call,"GEST_CR"))
            {
               if(VAR_VAL_STR($DLG_idx_to_call,"GEST_CR")!=$VALORE_NULLO)
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CR=",APICI(),$VALORE_NULLO,APICI()))
               }
            }

            VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_368_opa.txt")

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C0=",APICI(),"BCO",APICI()))

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            if( $DLG_value_schiena_tes==1 )        { GOSUB Get_Image_30MM_SchTes }
            else
            {
               if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
               if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
               if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
            }
        ]

      }

      Radio XGlass_Lucido
      {
        Caption = MSG(3601)
        Hint    = ""
        Enable  = $DLG_enable_tipo_vtr
        Value   = $DLG_var_xglass_lucido

        Placement
        {
           posx = 10
           posy = 70
           dimx = 100
           dimy = 20
        }


        OnClick
        [
            $DLG_var_lucido = 0
            $DLG_var_opaco = 0
            $DLG_var_xglass_lucido = 1
            $DLG_var_xglass_opaco = 0
            $DLG_var_metal_lucido = 0
            $DLG_var_metal_opaco = 0

            VAR_SET_MENU($DLG_idx_to_call,"GEST_CR","colori_xglass.txt")

            $DLG_var_to_call_1 = "GEST_CR"

            VAR_SET_MENU(-1,"DLG_var_to_call_1","colori_xglass.txt")

            if(VAR_EXIST($DLG_idx_to_call,"GEST_C0"))
            {
               if(VAR_VAL_STR($DLG_idx_to_call,"GEST_C0")!=$VALORE_NULLO)
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C0=",APICI(),$VALORE_NULLO,APICI()))
               }
            }

            VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_xglass.txt")

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CR=",APICI(),"MR1",APICI()))

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            if( $DLG_value_schiena_tes==1 )        { GOSUB Get_Image_30MM_SchTes }
            else
            {
               if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
               if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
               if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
            }
        ]

      }

      Radio XGlass_Opaco
      {
        Caption = MSG(3602)
        Hint    = ""
        Enable  = $DLG_enable_tipo_vtr
        Value   = $DLG_var_xglass_opaco

        Placement
        {
           posx = 10
           posy = 90
           dimx = 100
           dimy = 20
        }


        OnClick
        [
            $DLG_var_lucido = 0
            $DLG_var_opaco = 0
            $DLG_var_xglass_lucido = 0
            $DLG_var_xglass_opaco = 1
            $DLG_var_metal_lucido = 0
            $DLG_var_metal_opaco = 0

            VAR_SET_MENU($DLG_idx_to_call,"GEST_C0","colori_xglass.txt")

            $DLG_var_to_call_1 = "GEST_C0"

            VAR_SET_MENU(-1,"DLG_var_to_call_1","colori_xglass.txt")

            if(VAR_EXIST($DLG_idx_to_call,"GEST_CR"))
            {
               if(VAR_VAL_STR($DLG_idx_to_call,"GEST_CR")!=$VALORE_NULLO)
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CR=",APICI(),$VALORE_NULLO,APICI()))
               }
            }

            VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_xglass.txt")

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C0=",APICI(),"MR1",APICI()))

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            if( $DLG_value_schiena_tes==1 )        { GOSUB Get_Image_30MM_SchTes }
            else
            {
               if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
               if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
               if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
            }
        ]

      }

      Radio Metal_Lucido
      {
        Caption = $DLG_scritta_metal_lucido
        Hint    = ""
        Enable  = $DLG_enable_tipo_vtr
        Value   = $DLG_var_metal_lucido

        Placement
        {
           posx = 10
           posy = 110
           dimx = 170
           dimy = 20
        }


        OnClick
        [
            $DLG_var_lucido = 0
            $DLG_var_opaco = 0
            $DLG_var_xglass_lucido = 0
            $DLG_var_xglass_opaco = 0
            $DLG_var_metal_lucido = 1
            $DLG_var_metal_opaco = 0

            VAR_SET_MENU($DLG_idx_to_call,"GEST_CR","colori_metal_luc.txt")

            $DLG_var_to_call_1 = "GEST_CR"

            VAR_SET_MENU(-1,"DLG_var_to_call_1","colori_metal_luc.txt")

            if(VAR_EXIST($DLG_idx_to_call,"GEST_C0"))
            {
               if(VAR_VAL_STR($DLG_idx_to_call,"GEST_C0")!=$VALORE_NULLO)
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C0=",APICI(),$VALORE_NULLO,APICI()))
               }
            }

            VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_metal_luc.txt")

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CR=",APICI(),"MT4",APICI()))

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            if( $DLG_value_schiena_tes==1 )        { GOSUB Get_Image_30MM_SchTes }
            else
            {
               if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
               if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
               if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
            }
        ]

      }

      Radio Metal_Opaco
      {
        Caption = $DLG_scritta_metal_opaco
        Hint    = ""
        Enable  = $DLG_enable_tipo_vtr
        Value   = $DLG_var_metal_opaco

        Placement
        {
           posx = 10
           posy = 130
           dimx = 170
           dimy = 20
        }


        OnClick
        [
            $DLG_var_lucido = 0
            $DLG_var_opaco = 0
            $DLG_var_xglass_lucido = 0
            $DLG_var_xglass_opaco = 0
            $DLG_var_metal_lucido = 0
            $DLG_var_metal_opaco = 1

            VAR_SET_MENU($DLG_idx_to_call,"GEST_C0","colori_metal_luc.txt")

            $DLG_var_to_call_1 = "GEST_C0"

            VAR_SET_MENU(-1,"DLG_var_to_call_1","colori_metal_luc.txt")

            if(VAR_EXIST($DLG_idx_to_call,"GEST_CR"))
            {
               if(VAR_VAL_STR($DLG_idx_to_call,"GEST_CR")!=$VALORE_NULLO)
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CR=",APICI(),$VALORE_NULLO,APICI()))
               }
            }

            VAR_SET_MENU(-1,"DLG_COLORE_30MM_V","colori_metal_luc.txt")

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C0=",APICI(),"MT4",APICI()))

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            if( $DLG_value_schiena_tes==1 )        { GOSUB Get_Image_30MM_SchTes }
            else
            {
               if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
               if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
               if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
            }
        ]

      }

   }


   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 20/11/2019 - Emanuele - Modifico il comando Chiedi per gestire txt differenti per i colori
//         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1 )
         $R = CHIEDI(-1,"DLG_COLORE_30MM_V" )
         // 20/11/2019 - Emanuele - Aggiungo condizione per aggiornare il valore della variante
         if(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)!=$DLG_COLORE_30MM_V)
         {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_1,"=",APICI(),$DLG_COLORE_30MM_V,APICI()))
         }
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
         $DLG_COLORE_30MM_V = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
         if( $DLG_value_schiena_tes==1 )   { GOSUB Get_Image_30MM_SchTes }
         // 20/11/2019 - Emanuele - Modifico condizione per gestire tutti i tipi di finiture
//         else                              { GOSUB Get_Image_30MM_SchVL  }
        else
        {
           if($DLG_var_lucido==1 | $DLG_var_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_30MM_V") }
           if($DLG_var_opaco==1 | $DLG_var_metal_opaco==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_30MM_V") }
           if($DLG_var_xglass_lucido==1 | $DLG_var_xglass_opaco==1) { GET_IMAGE("DLG_image_file","XGlass","DLG_COLORE_30MM_V") }
        }
      ]
   }
}

Dlg 30MM_Fianco
{
   Caption = MSG(421)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Spessore
   {
      Caption = MSG(422)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 70
      }

      Radio Spessore_30
      {
        Caption = MSG(423)
        Hint    = MSG(423)
        //Massimiliano 12/03/2018  - blocco la possibilit di cambiare spessore
        //Enable  = 1
        Enable  = $DLG_enable_sp
        Value   = $DLG_spessore_30

        Placement
        {
           posx = 10
           posy = 20
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_spessore = 30
          //$DLG_enable_profondita = 1
          //rob_pec 11/02/2011: su richiesta limite minimo 120 (prima 200)
          // Eugenio 04.06.13 Limite portato a 136
          VAR_SET_MENU(-1,"DLG_profondita","Z_Col1_30mm(136-384)")
        ]

      }

      Radio Spessore_50
      {
        Caption = MSG(424)
        Hint    = MSG(424)
        //Massimiliano 12/03/2018  - blocco la possibilit di cambiare spessore
        //Enable  = 1
        Enable  = $DLG_enable_sp
        Value   = $DLG_spessore_50

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_spessore = 50
          //$DLG_enable_profondita = 0
          //rob_pec 11/02/2011: su richiesta limite minimo 120 (prima 200)
          // Eugenio 04.06.13 Limite portato a 136
          VAR_SET_MENU(-1,"DLG_profondita","Z_Col2_30mm(136-384)")
        ]

      }
   }

   Frame FrmMisure
   {
      Caption = MSG(807)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 85
         dimx = 150
         dimy = 70
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(425)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(426)
        //Enable  = $DLG_enable_profondita
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        //Enable  = $DLG_enable_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 40
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 165
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 165
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(427)

      Placement
      {
         posx = 130
         posy = 100
         dimx = 20
         dimy = 20
      }

      OnClick
      [

        //Massimiliano 08/06/17 - aggiungo controllo per limite altezza fianco
        if( $DLG_profondita == 136 )  {  VAR_SET_MENU(-1,"DLG_altezza","Y_Col1_30mm(184-1104)")  }
        else                          {  VAR_SET_MENU(-1,"DLG_altezza","Y_Col1_30mm(184-2944)")  }

        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
        //Dimitri 080603
        //$R = CHIEDI(-1,"DLG_altezza_30mm")
        //$DLG_hint_altezza    = STRCAT(MSG(428)," = ",APICI(),$DLG_altezza_30mm,APICI())
        //$DLG_caption_altezza = $DLG_altezza_30mm
        //$DLG_value_altezza   = $DLG_altezza_30mm

      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(429)
      Enable = 1
      //Enable = $DLG_enable_profondita

      Placement
      {
         posx = 130
         posy = 125
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        // 02/07/2018 - Emanuele - Aggiungo un controllo che blocca la prof 136 se la y  maggiore di 1104
        VAR_SET_MENU(-1,"DLG_profondita","Z_Col1_30mm(136-384)")

        if($DLG_altezza>1104)
        {
           VAR_SET_MENU(-1,"DLG_profondita","Z_Col1_30mm(248-384)")
        }

        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

Dlg 30MM_Colonna
{
   Caption = MSG(491)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 145
         dimy = 135
      }

      Edit Edtaltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtprofondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 75
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(492)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(493)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(494)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(495)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(496)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(497)

      Placement
      {
         posx = 130
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

Dlg 30MM_Fianco_Voila
{
   Caption = MSG(421)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 495
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoFianco
   {
      Caption = MSG(464)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 70
      }

      Radio Fianco_Normale
      {
        Caption = MSG(465)
        Hint    = MSG(465)
        Enable  = 1
        Value   = $DLG_Fianco_Normale

        Placement
        {
           posx = 10
           posy = 20
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           $DLG_RAD = "FB3VOILA"
           GOSUB CambiaRadDlg
           $DLG_Fianco_Normale = 1
           $DLG_Fianco_Tessuto = 0
        ]

      }

      Radio Fianco_Tessuto
      {
        Caption = MSG(466)
        Hint    = MSG(466)
        Enable  = 1
        Value   = $DLG_Fianco_Tessuto

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           $DLG_RAD = "FB3VOILATESS"
           GOSUB CambiaRadDlg
           $DLG_Fianco_Normale = 0
           $DLG_Fianco_Tessuto = 1
           if( VAR_EXIST($DLG_idx_to_call,"GEST_RZ")==1 )
           {
              $menu_get = VAR_MENU($DLG_idx_to_call,"GEST_RZ")
              $menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
              if( STRCMP($menu_get,"")==0 | STRCMP($menu_get,$menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,"GEST_RZ",$menu_set) }
              $modo_get = VAR_MODE($DLG_idx_to_call,"GEST_RZ")
              $modo_set = 131072
              if( $modo_get!=$modo_set ) { VAR_SET_MODE($DLG_idx_to_call,"GEST_RZ",$modo_set) }
           }
        ]

      }
   }

   Frame FrmMisure
   {
      Caption = MSG(807)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 85
         dimx = 150
         dimy = 70
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(425)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(426)
        //Enable  = $DLG_enable_profondita
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        //Enable  = $DLG_enable_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 40
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTessuto
   {
      Caption = MSG(467)

      Placement
      {
         posx = 325
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_Fianco_Tessuto

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_Fianco_Tessuto

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 165
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 165
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
        $DLG_COLORE_30MM = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
        GOSUB Get_Image_30MM_VOILA
      ]
   }

   Button btnFinituraTessuto
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_Fianco_Tessuto

      Placement
      {
         posx = 335
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
        $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ"),"colori_tutti.txt")
        $DLG_COLORE_30MM_TESS = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
        GOSUB Get_Image_30MM_VOILA
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(427)

      Placement
      {
         posx = 130
         posy = 100
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
        //Dimitri 080603
        //$R = CHIEDI(-1,"DLG_altezza_30mm")
        //$DLG_hint_altezza    = STRCAT(MSG(428)," = ",APICI(),$DLG_altezza_30mm,APICI())
        //$DLG_caption_altezza = $DLG_altezza_30mm
        //$DLG_value_altezza   = $DLG_altezza_30mm

      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(429)
      Enable = 1
      //Enable = $DLG_enable_profondita

      Placement
      {
         posx = 130
         posy = 125
         dimx = 20
         dimy = 20
      }

      OnClick
      [

        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

Dlg 30MM_Tavolo
{
   Caption = MSG(431)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 120
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(432)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Bevel Bvl1
      {
         Placement
         {
            posx = 10
            posy = 50
            dimx = 130
            dimy = 2
         }
      }

//OLD      Label LblProfondita
//OLD      {
//OLD        Caption = MSG(626)
//OLD        Hint    = "Profondit del tavolo"
//OLD        Enable  = 1
//OLD        Value   = MSG(626)
//OLD
//OLD        Placement
//OLD        {
//OLD           posx = 10
//OLD           posy = 45
//OLD           dimx = 60
//OLD           dimy = 20
//OLD        }
//OLD
//OLD        OnClick
//OLD        [
//OLD        ]
//OLD
//OLD      }

      Label LblPosizione
      {
        Caption = MSG(433)
        Hint    = MSG(435)
        Enable  = 1
        Value   = MSG(433)

        Placement
        {
           posx = 10
           posy = 70
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAppoggio
      {
        Caption = MSG(436)
        Hint    = MSG(437)
        Enable  = 1
        Value   = MSG(436)

        Placement
        {
           posx = 10
           posy = 95
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

//OLD      Edit EdtProfondita
//OLD      {
//OLD        Caption = $DLG_caption_profondita
//OLD        Hint    = $DLG_hint_profondita
//OLD        Enable  = 1
//OLD        Value   = $DLG_value_profondita
//OLD
//OLD        Placement
//OLD        {
//OLD           posx = 70
//OLD           posy = 40
//OLD           dimx = 45
//OLD           dimy = 20
//OLD        }
//OLD
//OLD        OnClick
//OLD        [
//OLD        ]
//OLD
//OLD      }

      Edit EdtPosizione
      {
        Caption = $DLG_caption_posizione
        Hint    = $DLG_hint_posizione
        Enable  = 1
        Value   = $DLG_value_posizione

        Placement
        {
           posx = 70
           posy = 65
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtAppoggio
      {
        Caption = $DLG_caption_appoggio
        Hint    = $DLG_hint_appoggio
        Enable  = 1
        Value   = $DLG_value_appoggio

        Placement
        {
           posx = 70
           posy = 90
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 165
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 165
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(438)

      Placement
      {
         posx = 130
         posy = 25
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

//OLD   Button btnProfondita
//OLD   {
//OLD      Caption = "..."
//OLD      Result  = 0
//OLD      Hint = "Cambia la profondita del tavolo"
//OLD
//OLD      Placement
//OLD      {
//OLD         posx = 130
//OLD         posy = 50
//OLD         dimx = 20
//OLD         dimy = 20
//OLD      }
//OLD
//OLD      OnClick
//OLD      [
//OLD        $R = CHIEDI(-1,"DLG_profondita")
//OLD        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
//OLD        $DLG_caption_profondita = STR($DLG_profondita)
//OLD        $DLG_value_profondita   = STR($DLG_profondita)
//OLD      ]
//OLD   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(440)

      Placement
      {
         posx = 130
         posy = 75
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_posizione")
        if( $DLG_posizione==-1 )  { $DLG_caption_posizione = MSG(403) }
        if( $DLG_posizione== 0 )  { $DLG_caption_posizione = MSG(404) }
        if( $DLG_posizione== 1 )  { $DLG_caption_posizione = MSG(405) }
        $DLG_hint_posizione    = STRCAT(MSG(414)," = ",$DLG_caption_posizione)
        $DLG_value_posizione   = $DLG_caption_posizione
      ]
   }

   Button btnAppoggio
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(441)

      Placement
      {
         posx = 130
         posy = 100
         dimx = 20
         dimy = 20
      }

      OnClick
      [

        //// Fabrizio 13/01/11 - rif. punto 40 ggdoc:
        //OLD  $R = CHIEDI(-1,"DLG_appoggio")
        //OLD
        //OLD  if( $DLG_appoggio== 0 )  { $DLG_caption_appoggio = MSG(703) }
        //OLD  if( $DLG_appoggio== 1 )  { $DLG_caption_appoggio = MSG(704) }
        //OLD  $DLG_hint_appoggio    = STRCAT(MSG(436)," = ",$DLG_caption_appoggio)
        //OLD  $DLG_value_appoggio   = $DLG_caption_appoggio


        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)

        $DLG_caption_appoggio = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_1)
        $DLG_hint_appoggio    = STRCAT(MSG(442)," = ",$DLG_caption_appoggio)
        $DLG_value_appoggio   = $DLG_caption_appoggio
      ]
   }
}

Dlg Lagolinea_Desk
{
   Caption = "LAGOLINEA_DESK"
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 235
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 150
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(432)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(626)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblPosizione
      {
        Caption = MSG(433)
        Hint    = MSG(435)
        Enable  = $DLG_enable_posizione
        Value   = MSG(433)

        Placement
        {
           posx = 10
           posy = 70
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 40
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtPosizione
      {
        Caption = $DLG_caption_posizione
        Hint    = $DLG_hint_posizione
        Enable  = $DLG_enable_posizione
        Value   = $DLG_value_posizione

        Placement
        {
           posx = 70
           posy = 65
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Radio Rd30
      {
        Caption = MSG(423)
        Hint    = MSG(423)
        Value   = $DLG_spessore_30

        Placement
        {
           posx = 20
           posy = 100
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_spessore_30 = 1
           $DLG_spessore_50 = 0
           // Eugenio: se posso cambiare la posizione ho scrittoi fissaggi lato lungo
           //          e devo gestire il menu delle larghezze
           if($DLG_enable_posizione==1)
           {
              if($DLG_larghezza>1104)  { $DLG_larghezza=1104 }
              VAR_SET_MENU(-1,"DLG_larghezza","XScrittoi1")
           }
        ]
      }

      Radio Rd50
      {
        Caption = MSG(424)
        Hint    = MSG(424)
        Value   = $DLG_spessore_50
        Enable  = $DLG_enable_spessore

        Placement
        {
           posx = 20
           posy = 120
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_spessore_30 = 0
           $DLG_spessore_50 = 1
           // Eugenio: se posso cambiare la posizione ho scrittoi fissaggi lato lungo
           //          e devo gestire il menu delle larghezze
           if($DLG_enable_posizione==1)
           {
              VAR_SET_MENU(-1,"DLG_larghezza","XScrittoi2")
           }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 150
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  35
            posy =  38
            dimx =  84
            dimy =  84
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 170
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(438)

      Placement
      {
         posx = 130
         posy = 25
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(357)
      Enable = 1

      Placement
      {
         posx = 130
         posy = 50
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(440)
      Enable = $DLG_enable_posizione

      Placement
      {
         posx = 130
         posy = 75
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_posizione")
        if( $DLG_posizione==-1 )  { $DLG_caption_posizione = MSG(403) }
        if( $DLG_posizione== 1 )  { $DLG_caption_posizione = MSG(405) }
        $DLG_hint_posizione    = STRCAT(MSG(414)," = ",$DLG_caption_posizione)
        $DLG_value_posizione   = $DLG_caption_posizione
      ]
   }
}

Dlg 30MM_Mensola_OLD
{
   Caption = MSG(443)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Spessore
   {
      Caption = MSG(422)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 70
      }

      Radio Spessore_30
      {
        Caption = MSG(423)
        Hint    = MSG(423)
        Enable  = 1
        Value   = $DLG_spessore_30

        Placement
        {
           posx = 10
           posy = 20
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_spessore = 30
        ]

      }

      Radio Spessore_50
      {
        Caption = MSG(424)
        Hint    = MSG(424)
        Enable  = 1
        Value   = $DLG_spessore_50

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_spessore = 50
        ]

      }
   }

   Frame Larghezza
   {
      Caption = MSG(439)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 85
         dimx = 150
         dimy = 55
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 10
           posy = 25
           dimx = 75
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }


   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 50
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 150
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 100
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

}

Dlg 30MM_Mensola
{
   Caption = MSG(443)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 365
      dimy = 240
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Spessore
   {
      Caption = MSG(422)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 70
      }

      Radio Spessore_30
      {
        Caption = MSG(423)
        Hint    = MSG(423)
        Enable  = 1
        Value   = $DLG_spessore_30

        Placement
        {
           posx = 10
           posy = 20
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_spessore = 30
        ]

      }

      Radio Spessore_50
      {
        Caption = MSG(424)
        Hint    = MSG(424)
        Enable  = 1
        Value   = $DLG_spessore_50

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_spessore = 50
        ]

      }
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 85
         dimx = 170
         dimy = 80
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtprofondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 50
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(445)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(446)
        Enable  = $DLG_enable_lbl_prof_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 200
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 285
         posy = 175
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 200
         posy = 175
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 210
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 150
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)

      Placement
      {
         posx = 150
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }
}

Dlg Linea_Ripiano
{
   Caption = MSG(413)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 145
         dimy = 120
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtprofondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = $DLG_enable_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 45
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(445)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(446)
        Enable  = $DLG_enable_profondita
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }

      Radio Rd30
      {
        Caption = MSG(423)
        Hint    = MSG(423)
        Value   = $DLG_spessore_30
        Enable  = $DLG_enable_spessore

        Placement
        {
           posx = 20
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_spessore_30 = 1
           $DLG_spessore_50 = 0
           $DLG_spessore=$Y_Rip_Linea
           //rob_pec 18/05/2010 aggiunto controllo spessore e profondit
           VAR_SET_MENU(-1,"DLG_profondita","ZRipLin")
           // Riccardo 28/09/11: aggiunto cambio men per diverse profondit a seconda dello spessore
           VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm")
        ]
      }

      Radio Rd50
      {
        Caption = MSG(424)
        Hint    = MSG(424)
        Value   = $DLG_spessore_50
        Enable  = $DLG_enable_spessore

        Placement
        {
           posx = 20
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_spessore_30 = 0
           $DLG_spessore_50 = 1
           $DLG_spessore=$Y_Rip_Linea2
           //rob_pec 18/05/2010 aggiunto controllo spessore e profondit
           $DLG_profondita = 384
           VAR_SET_MENU(-1,"DLG_profondita","ZRipLin2(180-384)")
           // Riccardo 28/09/11: aggiunto cambio men per diverse profondit a seconda dello spessore
           VAR_SET_MENU(-1,"DLG_larghezza","X_Men_30mm")
        ]
      }

   }

   //LZ 04/04/2019 - Rimuovo sezione come da listino 2019
//   Frame FrmSmusso
//   {
//      Caption = MSG(1818)
//      //Hint = "Modificare le misure del fianco selezionato"
//
//      Placement
//      {
//         posx = 10
//         posy = 130
//         dimx = 145
//         dimy = 85
//      }
//
//      Radio RdPiano
//      {
//        Caption = MSG(1815)
//        Hint    = MSG(1815)
//        Value   = $DLG_NoSmusso
//        //Massimiliano 15/01/15 - disabilito quando prof. 136
//        Enable  = $DLG_enable_Smusso
//
//        Placement
//        {
//           posx = 20
//           posy = 20
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_NoSmusso = 1
//           $DLG_SxSmusso = 0
//           $DLG_DxSmusso = 0
//           $DLG_Smusso   = 0
//        ]
//      }
//
//      Radio RdSmSX
//      {
//        Caption = MSG(1816)
//        Hint    = MSG(1816)
//        Value   = $DLG_SxSmusso
//        //Massimiliano 15/01/15 - disabilito quando prof. 136
//        Enable  = $DLG_enable_Smusso
//
//        Placement
//        {
//           posx = 20
//           posy = 40
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_NoSmusso = 0
//           $DLG_SxSmusso = 1
//           $DLG_DxSmusso = 0
//           $DLG_Smusso   = 1
//        ]
//      }
//
//      Radio RdSmSX
//      {
//        Caption = MSG(1817)
//        Hint    = MSG(1817)
//        Value   = $DLG_DxSmusso
//        //Massimiliano 15/01/15 - disabilito quando prof. 136
//        Enable  = $DLG_enable_Smusso
//
//        Placement
//        {
//           posx = 20
//           posy = 60
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_NoSmusso = 0
//           $DLG_SxSmusso = 0
//           $DLG_DxSmusso = 1
//           $DLG_Smusso   = 2
//        ]
//      }
//
//   }


   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx =  100
            dimy =  100
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(409)

      Placement
      {
         posx = 130
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          //LZ 15/10/2019 - Rimuovo limiti, da listino sono riducibili
//        //Massimiliano 08/06/17 - aggiungo controllo per limite altezza fianco
//        if( $DLG_profondita == 136 )  {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(184-1104)")  }
//        // 12/01/2018 - Filippo - cambio il limite in base alle regole del listino
//        //else                          {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(184-2944)")  }
//        else                          {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(184-2208)")  }
//
//        if( VAR_VAL($DLG_idx_to_call,"VAR_ripiano_30mm") == 1 )
//        {
//           //if( $DLG_profondita == 136 )  {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(130-1104)")  }
//           if( $DLG_profondita == 136 )  {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(120-1104)")  }
//           // 12/01/2018 - Filippo - cambio il limite in base alle regole del listino
//           //else                          {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(130-2944)")  }
//           //else                          {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(130-2208)")  }
//           else                          {  VAR_SET_MENU(-1,"DLG_larghezza","X_Men1_30mm(120-2208)")  }
//        }

        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(434)
      Enable  = $DLG_enable_profondita

      Placement
      {
         posx = 130
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          //LZ 15/10/2019 - Rimuovo limiti, da listino sono riducibili
//        // 02/07/2018 - Emanuele - Aggiungo un controllo che impedisce la selezione della profondit 136 se la
//        // x  maggiore di 1104
//        VAR_SET_MENU(-1,"DLG_profondita","ZRipLin(136-384)")
//
//        if($DLG_larghezza>1104)
//        {
//           VAR_SET_MENU(-1,"DLG_profondita","ZRipLin(248-384)")
//        }

        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)

        //Massimiliano 15/01/15 - quando prof.136 non si pu abilitare lo smusso!
        if( $DLG_value_profondita == "136" )
        {
           $DLG_enable_Smusso = 0
           $DLG_DxSmusso = 0
           $DLG_SxSmusso = 0
           $DLG_NoSmusso = 1
           $DLG_Smusso   = 0
        }
        else
        {
           $DLG_enable_Smusso = 1
        }
      ]
   }

}

Dlg DiagoLinea
{
   Caption = MSG(478)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 490
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 145
         dimy = 135
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAngolo
      {
        Caption = $DLG_caption_angolo
        Hint    = $DLG_hint_angolo
        Enable  = 1
        Value   = $DLG_value_angolo

        Placement
        {
           posx = 70
           posy = 45
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(445)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 22
           dimx = 80
           dimy = 20
        }

      }

      Label LblAngolo
      {
        Caption = MSG(486)
        Hint    = MSG(481)
        Enable  = 1
        Value   = MSG(486)

        Placement
        {
           posx = 10
           posy = 47
           dimx = 80
           dimy = 20
        }
      }

      Radio SuppSX
      {
        Caption = MSG(483)
        Hint    = MSG(483)
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_supp1

        Placement
        {
           posx = 20
           posy = 70
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_supp1 = 1
          $DLG_supp2 = 0
          $DLG_supp3 = 0
        ]

      }

      Radio SuppDX
      {
        Caption = MSG(484)
        Hint    = MSG(484)
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_supp2

        Placement
        {
           posx = 20
           posy = 90
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_supp1 = 0
          $DLG_supp2 = 1
          $DLG_supp3 = 0
        ]

      }

      Radio 2Supp
      {
        Caption = MSG(485)
        Hint    = MSG(485)
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_supp3

        Placement
        {
           posx = 20
           posy = 110
           dimx = 100
           dimy = 20
        }


        OnClick
        [
          $DLG_supp1 = 0
          $DLG_supp2 = 0
          $DLG_supp3 = 1
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraSupp
   {
      Caption = MSG(482)

      Placement
      {
         posx = 335
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //$R = CHIEDI(-1,"DLG_COLORE_30MM")
        $R = CHIEDI($DLG_idx_to_call,"GEST_ST")

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
        $DLG_COLORE_30MM_V   = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
        //GOSUB Get_Image_30MM
        GOSUB Get_Image_30MM_SchVL
      ]
   }

   Button FinituraSupp
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 345
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //$R = CHIEDI(-1,"DLG_COLORE_30MM")
        $R = CHIEDI($DLG_idx_to_call,"GEST_BC")

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_BC"),"colori_tutti.txt")
        $DLG_COLORE_30MM     = VAR_VAL_STR($DLG_idx_to_call,"GEST_BC")
        //GOSUB Get_Image_30MM
        GOSUB Get_Image_30MM_SchVL
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 130
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAngolo
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(479)

      Placement
      {
         posx = 130
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_angolo")
        $DLG_hint_angolo    = STRCAT(MSG(480)," = ",STR($DLG_angolo))
        $DLG_caption_angolo = STR($DLG_angolo)
        $DLG_value_angolo   = STR($DLG_angolo)
      ]
   }
}

Dlg Letto_FluttuaC
{
   Caption = MSG(812)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 125
      }

      Check chkMaterasso
      {
      //12.04.2017 - Filippo - Nuova caption
      //  Caption = MSG(814)
        Caption = MSG(813)
        Hint    = MSG(813)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkTestata
      {
        Caption = MSG(816)
        Hint    = MSG(816)
        Enable  = 1
        Value   = $DLG_testata

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_testata==1)   {  $DLG_testata=1  }
           else                  {  $DLG_testata=0  }
        ]

      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(819)
        Enable  = 1
        Value   = $DLG_coordinato

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_coordinato==1)   {  $DLG_coordinato=1  }
           else                     {  $DLG_coordinato=0  }
        ]

      }

      Check chkTasselli
      {
        Caption = MSG(896)
        Hint    = MSG(896)
        Enable  = 1
        Value   = $DLG_tasselli

        Placement
        {
           posx = 10
           posy = 100
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
           else                   {  $DLG_tasselli=0  }
        ]

      }
   }

   Frame Opzioni
   {
      Caption = MSG(821)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 135
//12.04.2017 - Filippo - Il prodotto Contenitore ad angolo non  pi disponibile: ridimensiono il frame per coprire il frame mancante
         //dimx = 150
         dimx = 305
         dimy = 80
      }

      Radio rdNo
      {
        Caption = MSG(822)
        Hint    = MSG(823)
        Enable  = 1
        Value   = $DLG_val_opzione_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_val_opzione_1==1 )
           {
              //attivo l'opzione 1
              $DLG_val_opzione_1=1

              //disattivo l'opzione 2
              $DLG_val_opzione_2=0
              $DLG_rinforzo=0

              //disattivo l'opzione 3
              $DLG_val_opzione_3=0
              $DLG_cont_angolo=0
              $DLG_en_tipo_anta=0

           }
           else
           {
              $DLG_val_opzione_1=0
           }
        ]
      }

      Radio rdRinforzo
      {
        Caption = MSG(824)
        Hint    = MSG(825)
        Enable  = 1
        //Value   = $DLG_rinforzo
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [

           if( $DLG_val_opzione_2==1 )
           {
              //attivo l'opzione 2
              $DLG_val_opzione_2=1
              $DLG_rinforzo=1

              //disattivo l'opzione 1
              $DLG_val_opzione_1=0

              //disattivo l'opzione 3
              $DLG_val_opzione_3=0
              $DLG_cont_angolo=0
              $DLG_en_tipo_anta=0

           }
           else
           {
              $DLG_rinforzo=0
              $DLG_val_opzione_2=0
           }

           //if($DLG_cont_angolo==1)
           //{
           //   $DLG_cont_angolo=1
           //   $DLG_en_tipo_anta=1
           //}
           //else
           //{
           //   $DLG_cont_angolo=0
           //   $DLG_en_tipo_anta=0
           //}
        ]
      }

//12.04.2017 - Filippo - Il prodotto Contenitore ad angolo non  pi disponibile
//      //Check chkContAngolo
//      Radio rdContAngolo
//      {
//        Caption = MSG(826)
//        Hint    = MSG(826)
//        Enable  = 1
//        //Value   = $DLG_cont_angolo
//        Value   = $DLG_val_opzione_3
//
//        Placement
//        {
//           posx = 10
//           posy = 55
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if( $DLG_val_opzione_3==1)
//           {
//              //attivo l'opzione 3
//              $DLG_val_opzione_3=1
//              $DLG_cont_angolo=1
//              $DLG_en_tipo_anta=1
//
//              //disattivo l'opzione 1
//              $DLG_val_opzione_1=0
//
//              //disattivo l'opzione 2
//              $DLG_val_opzione_2=0
//              $DLG_rinforzo     =0
//           }
//           else
//           {
//              $DLG_val_opzione_3=0
//              $DLG_cont_angolo  =0
//              $DLG_en_tipo_anta =0
//           }
//        ]
//      }

   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 125
      }

      Radio rdInteroPoli
      {
        Caption = MSG(827)
        Hint    = MSG(827)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdDivisoPoli
      {
        Caption = MSG(828)
        Hint    = MSG(828)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }

      Radio rdDivisoOrto
      {
        Caption = MSG(829)
        Hint    = MSG(829)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 2
        ]

      }

   }

//12.04.2017 - Filippo - Il prodotto Contenitore ad angolo non  pi disponibile
//   Frame frmTipoAnta
//   {
//      Caption = MSG(830)
//
//      Placement
//      {
//         posx = 165
//         posy = 135
//         dimx = 150
//         dimy = 80
//      }
//
//      Radio rdAntaLegno
//      {
//        Caption = MSG(831)
//        Hint    = MSG(831)
//        Enable  = $DLG_en_tipo_anta
//        Value   = $DLG_val_tipo_anta_0
//
//        Placement
//        {
//           posx = 10
//           posy = 20
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_val_tipo_anta_0 = 1
//        ]
//
//      }
//
//      Radio rdAntaVetro
//      {
//        Caption = MSG(832)
//        Hint    = MSG(832)
//        Enable  = $DLG_en_tipo_anta
//        Value   = $DLG_val_tipo_anta_1
//
//        Placement
//        {
//           posx = 10
//           posy = 40
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_val_tipo_anta_1 = 1
//        ]
//      }
//   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

      //12.04.2017 - Filippo - Unifico le dialog

//Dlg Letto_FluttuaCRiv
//{
//   Caption = MSG(812)
//   Placement
//   {
//      posx = 150
//      posy = 150
//      dimx = 330
//      dimy = 280
//      save_pos = 1
//   }
//
//   Frame Accessori
//   {
//      Caption = MSG(803)
//      //Hint = "Modificare le misure del fianco selezionato"
//
//      Placement
//      {
//         posx = 10
//         posy = 10
//         dimx = 150
//         dimy = 125
//      }
//
//      Check chkMaterasso
//      {
//        Caption = MSG(813)
//        Hint    = MSG(813)
//        Enable  = 1
//        Value   = $DLG_materasso
//
//        Placement
//        {
//           posx = 10
//           posy = 20
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_materasso==1)
//           {
//              $DLG_materasso=1
//              $DLG_en_tipo_materasso=1
//           }
//           else
//           {
//              $DLG_materasso=0
//              $DLG_en_tipo_materasso=0
//           }
//        ]
//      }
//
//      Check chkTestata
//      {
//        Caption = MSG(816)
//        Hint    = MSG(816)
//        Enable  = 1
//        Value   = $DLG_testata
//
//        Placement
//        {
//           posx = 10
//           posy = 45
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_testata==1)   {  $DLG_testata=1  }
//           else                  {  $DLG_testata=0  }
//        ]
//
//      }
//
//      Check chkIlluminazione
//      {
//        Caption = MSG(817)
//        Hint    = MSG(817)
//        Enable  = 1
//        Value   = $DLG_illuminazione
//
//        Placement
//        {
//           posx = 10
//           posy = 70
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
//           else                        {  $DLG_illuminazione=0  }
//        ]
//
//      }
//
//      Check chkCoordinato
//      {
//        Caption = MSG(818)
//        Hint    = MSG(819)
//        Enable  = 1
//        Value   = $DLG_coordinato
//
//        Placement
//        {
//           posx = 10
//           posy = 95
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_coordinato==1)   {  $DLG_coordinato=1  }
//           else                     {  $DLG_coordinato=0  }
//        ]
//
//      }
//   }
//
//   Frame Opzioni
//   {
//      Caption = MSG(821)
//      //Hint = "Modificare le misure del fianco selezionato"
//
//      Placement
//      {
//         posx = 10
//         posy = 135
//         dimx = 150
//         dimy = 80
//      }
//
//      Radio rdNo
//      {
//        Caption = MSG(822)
//        Hint    = MSG(823)
//        Enable  = 1
//        Value   = $DLG_val_opzione_1
//
//        Placement
//        {
//           posx = 10
//           posy = 15
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if( $DLG_val_opzione_1==1 )
//           {
//              //attivo l'opzione 1
//              $DLG_val_opzione_1=1
//
//              //disattivo l'opzione 2
//              $DLG_val_opzione_2=0
//              $DLG_rinforzo=0
//
//              //disattivo l'opzione 3
//              $DLG_val_opzione_3=0
//              $DLG_cont_angolo=0
//              $DLG_en_tipo_anta=0
//
//           }
//           else
//           {
//              $DLG_val_opzione_1=0
//           }
//        ]
//      }
//
//      Radio rdRinforzo
//      {
//        Caption = MSG(824)
//        Hint    = MSG(825)
//        Enable  = 1
//        //Value   = $DLG_rinforzo
//        Value   = $DLG_val_opzione_2
//
//        Placement
//        {
//           posx = 10
//           posy = 35
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//
//           if( $DLG_val_opzione_2==1 )
//           {
//              //attivo l'opzione 2
//              $DLG_val_opzione_2=1
//              $DLG_rinforzo=1
//
//              //disattivo l'opzione 1
//              $DLG_val_opzione_1=0
//
//              //disattivo l'opzione 3
//              $DLG_val_opzione_3=0
//              $DLG_cont_angolo=0
//              $DLG_en_tipo_anta=0
//
//           }
//           else
//           {
//              $DLG_rinforzo=0
//              $DLG_val_opzione_2=0
//           }
//        ]
//      }
//   }
//
//   Frame frmTipoMaterasso
//   {
//      Caption = MSG(808)
//
//      Placement
//      {
//         posx = 165
//         posy = 10
//         dimx = 150
//         dimy = 125
//      }
//
//      Radio rdInteroPoli
//      {
//        Caption = MSG(827)
//        Hint    = MSG(827)
//        Enable  = $DLG_en_tipo_materasso
//        Value   = $DLG_val_tipo_materasso_0
//
//        Placement
//        {
//           posx = 10
//           posy = 15
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_tipo_materasso = 0
//        ]
//
//      }
//
//      Radio rdDivisoPoli
//      {
//        Caption = MSG(828)
//        Hint    = MSG(828)
//        Enable  = $DLG_en_tipo_materasso
//        Value   = $DLG_val_tipo_materasso_1
//
//        Placement
//        {
//           posx = 10
//           posy = 35
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_tipo_materasso = 1
//        ]
//
//      }
//
//      Radio rdDivisoOrto
//      {
//        Caption = MSG(829)
//        Hint    = MSG(829)
//        Enable  = $DLG_en_tipo_materasso
//        Value   = $DLG_val_tipo_materasso_2
//
//        Placement
//        {
//           posx = 10
//           posy = 55
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_tipo_materasso = 2
//        ]
//
//      }
//
//   }
//
//   Button btnAnnulla
//   {
//      Caption = MSG(615)
//      Result  = 2
//      Hint = MSG(616)
//
//      Placement
//      {
//         posx = 250
//         posy = 220
//         dimx = 65
//         dimy = 30
//      }
//
//      OnClick
//      [
//         $OK=0
//      ]
//   }
//
//   Button btnOK
//   {
//      Caption = MSG(617)
//      Result  = 1
//      Default = 1
//      Hint = MSG(618)
//
//      Placement
//      {
//         posx = 165
//         posy = 220
//         dimx = 80
//         dimy = 30
//      }
//
//      OnClick
//      [
//         $OK=1
//      ]
//   }
//}

Dlg Letto_FluttuaR
{
   Caption = MSG(812)
   Placement
   {
      posx = 155
      posy = 150
//      dimx = 330
//      dimy = 310
      dimx = 350
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 150
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkTestata
      {
        Caption = MSG(816)
        Hint    = MSG(816)
        Enable  = 1
        Value   = $DLG_testata

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_testata==1)
           {
              $DLG_testata=1
              $DLG_en_tipo_testata=1
              $DLG_ena_testate2017 = 1
              $DLG_en_tipo_testata_0=1-$DLG_tipo_testata
           }
           else
           {
              $DLG_testata=0
              $DLG_en_tipo_testata=0
              $DLG_en_tipo_testata=0
              $DLG_ena_testate2017 = 0
              $DLG_en_tipo_testata_0=0
              // 14/03/2019 - Emanuele - Aggiungo assegnazioni per la gestione del fissaggio su cartongesso
              $DLG_Fiss_Cartongesso=0
//              $DLG_rinforzo=0
           }
           //if($DLG_testata==1)   {  $DLG_testata=1  }
           //else                  {  $DLG_testata=0  }
        ]

      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      // 14/03/2019 - Emanuele - Commento la chekbox perch viene sostituita da un'altra
//      Check chkRinforzo
//      {
//        Caption = MSG(824)
//        Hint    = MSG(825)
//        Enable  = 1
//        Value   = $DLG_rinforzo
//
//        Placement
//        {
//           posx = 10
//           posy = 100
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_rinforzo==1)   {  $DLG_rinforzo=1  }
//           else                   {  $DLG_rinforzo=0  }
//        ]
//
//      }

      Check chkCartongesso
      {
        Caption = MSG(825)
        Hint    = MSG(825)
//        Enable  = $DLG_testata
        Value   = $DLG_Fiss_Cartongesso

        Placement
        {
           posx = 10
           posy = 100
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           if( $DLG_Fiss_Cartongesso==1 )   {  $DLG_Fiss_Cartongesso=1  $DLG_rinforzo=1}
           else                             {  $DLG_Fiss_Cartongesso=0  $DLG_rinforzo=0}
        ]

      }

      Check chkTasselli
      {
        Caption = MSG(896)
        Hint    = MSG(896)
        Enable  = 1
        Value   = $DLG_tasselli

        Placement
        {
           posx = 10
           posy = 120
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
           else                   {  $DLG_tasselli=0  }
        ]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
//FABRI           if($DLG_en_mis_materasso_0==0 ) { $DLG_en_mis_materasso_0 = 1 }
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
 //FABRI          if($DLG_val_mis_materasso_0==1 )
 //FABRI          {
 //FABRI             //$DLG_val_mis_materasso_0 = 0
 //FABRI             //$DLG_val_mis_materasso_1 = 1
 //FABRI             $DLG_mis_materasso = 1
 //FABRI          }
 //FABRI          $DLG_en_mis_materasso_0 = 0
        ]

      }
   }

   Frame frmTipoTestiera
   {
      Caption = MSG(835)

      Placement
      {
         posx = 10
//         posy = 177
         posy = 197
         dimx = 150
         //10.07.2017 - Filippo - Nuove testiere Fluttua
         //dimy =  60
         dimy =  100
      }

      Radio rdH16
      {
        Caption = MSG(836)
        Hint    = MSG(836)
        Enable  = $DLG_en_tipo_testata
        Value   = $DLG_val_tipo_testata_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_testata = 0
           if($DLG_en_tipo_testata_0==0 ) { $DLG_en_tipo_testata_0 = 1 }
        ]

      }

      Radio rdH32
      {
        Caption = MSG(837)
        Hint    = MSG(837)
        Enable  = $DLG_en_tipo_testata
        Value   = $DLG_val_tipo_testata_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_testata = 1
           if($DLG_val_tipo_testata_0==1 )
           {
              $DLG_val_tipo_testata_0 = 0
              $DLG_val_tipo_testata_1 = 1
              $DLG_tipo_testata = 1
           }
           $DLG_en_tipo_testata_0 = 0
        ]

      }

      //10.07.2017 - Filippo - Nuove testiere Fluttua
      Radio rdH75
      {
        Caption = MSG(2227)
        Hint    = MSG(2227)
        Enable  = $DLG_ena_testate2017
        Value   = $DLG_val_tipo_testata_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_testata = 2
          // if($DLG_val_tipo_testata_0==1 )
          // {
              $DLG_val_tipo_testata_0 = 0
              $DLG_val_tipo_testata_1 = 0
              $DLG_val_tipo_testata_2 = 1
              $DLG_val_tipo_testata_3 = 0
          //    $DLG_tipo_testata = 2
          // }
          // $DLG_en_tipo_testata_0 = 0
        ]

      }

      Radio rdH10
      {
        Caption = MSG(2228)
        Hint    = MSG(2228)
        Enable  = $DLG_ena_testate2017
        Value   = $DLG_val_tipo_testata_3

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_testata = 3
          // if($DLG_val_tipo_testata_0==1 )
          // {
              $DLG_val_tipo_testata_0 = 0
              $DLG_val_tipo_testata_1 = 0
              $DLG_val_tipo_testata_2 = 0
              $DLG_val_tipo_testata_3 = 1
          //    $DLG_tipo_testata = 2
          // }
          // $DLG_en_tipo_testata_0 = 0
        ]

      }
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx = 170
         posy =  75
         dimx = 150
         dimy = 162
      }

      Radio rd100x200
      {
        Caption = "100 x 200"
        Hint    = MSG(838)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 0

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0

        ]

      }

      Radio rd120x200
      {
        Caption = "120 x 200"
        Hint    = MSG(839)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 1
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
        ]

      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
        ]
      }

      Radio rd152x203
      {
        Caption = MSG(841)
        Hint    = MSG(842)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_6

        Placement
        {
           posx = 10
           posy = 75
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 6

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_3

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 3

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
        ]

      }

      Radio rd193x203
      {
        Caption = MSG(843)
        Hint    = MSG(844)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 135
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 245
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 245
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg TestWildFree
{
   Caption = MSG(2222)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 350
      dimy = 340
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   // er
   Frame FrmMisureT
   {
      Caption = MSG(816)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 160
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(428)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }

      Check chkTasselli
      {
        Caption = MSG(896)
        Hint    = MSG(896)
        Enable  = 1
        Value   = $DLG_tasselli

        Placement
        {
           posx = 40
           posy = 72
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
           else                   {  $DLG_tasselli=0  }
        ]

      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 160
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  37
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(881)

      Placement
      {
         posx = 180
         posy = 10
         dimx = 145
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 180
         posy = 85
         dimx = 145
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 180
         posy = 115
         dimx = 145
         dimy = 150
      }

      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  32
            posy =  40
            dimx =  80
            dimy =  80
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 200
         posy = 240
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 40
         posy = 240
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)

      Placement
      {
         posx = 145
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(428)
      //Enable =  1

      Placement
      {
         posx = 145
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 200
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 115
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg Letto_FluttuaRWW
{
   Caption = MSG(812)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 500
//      dimy = 340
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy = 160
      }

      Radio rd100x200
      {
        Caption = "100 x 200"
        Hint    = MSG(838)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 0
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteLW")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteLW")
        ]
      }

      Radio rd120x200
      {
        Caption = "120 x 200"
        Hint    = MSG(839)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 1
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteLW")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteLW")
        ]

      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteLW")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteLW")
        ]
      }

      Radio rd152x203
      {
        Caption = MSG(841)
        Hint    = MSG(842)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_6

        Placement
        {
           posx = 10
           posy = 75
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 6
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteLW")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteLW")
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_3

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 3
           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteFLNew")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteFLNew")
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4
           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteFLNew")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteFLNew")
        ]

      }

      Radio rd193x203
      {
        Caption = MSG(843)
        Hint    = MSG(844)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 135
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           // 03/04/2019 - Emanuele - Aggiungo assegnazione per cambio menu per la gestione delle nuove misure
           VAR_SET_MENU(-1,"DLG_altezza","AltTesteLW")
           VAR_SET_MENU(-1,"DLG_larghezza","MisTesteLW")
        ]
      }
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 170
         dimx = 150
//         dimy = 80
         dimy = 100
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      // 14/03/2019 - Emanuele - Aggiungo tasto per abilitare il fissaggio cartongesso
      Check chkCartongesso
      {
        Caption = MSG(825)
        Hint    = MSG(825)
        Value   = $DLG_Fiss_Cartongesso

        Placement
        {
           posx = 10
           posy = 77
           dimx = 140
           dimy = 20

        }

        OnClick
        [
           if( $DLG_Fiss_Cartongesso==1 )   {  $DLG_Fiss_Cartongesso=1  }
           else                             {  $DLG_Fiss_Cartongesso=0  }
        ]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
//         posy = 250
         posy = 270
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   // er
   Frame FrmMisureT
   {
      Caption = MSG(816)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 160
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(428)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }

      Check chkTasselli
      {
        Caption = MSG(896)
        Hint    = MSG(896)
        Enable  = 1
        Value   = $DLG_tasselli

        Placement
        {
           posx = 40
           posy = 72
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
           else                   {  $DLG_tasselli=0  }
        ]

      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 165
         posy = 115
         dimx = 160
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  37
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(881)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 145
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 330
         posy = 85
         dimx = 145
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 330
         posy = 115
         dimx = 145
         dimy = 150
      }

      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  32
            posy =  40
            dimx =  80
            dimy =  80
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 350
         posy = 240
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 240
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         // 18/09/2019 - Emanuele - Modifico il chiedi utilizzando una variabile d'appoggio
//         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $R = CHIEDI(-1,"DLG_Finitura_Testiera")

         if($DLG_Finitura_Testiera=="HAY" | $DLG_Finitura_Testiera=="AGE")
         {

            $DLG_RAD = STRCAT("TE",$DLG_Finitura_Testiera,"TC")

            COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_X=",STR(VAR_VAL($DLG_idx_to_call,"X"))))
            COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_Y=",STR(VAR_VAL($DLG_idx_to_call,"Y"))))
            COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_Z=",STR(VAR_VAL($DLG_idx_to_call,"Z")-16)))

            VAR_VALUESTR_SET($DLG_idx_to_call,"RADICE",$DLG_RAD)
            cc = STRDADB($DLG_idx_to_call, "CAMBIA_VAR", "RADICE")
            COMANDO2("UPDATE")

            if($DLG_Finitura_Testiera!=VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"))
            {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_ST=",APICI(),$DLG_Finitura_Testiera,APICI()))
            }
         }
         else
         {
            COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_X=",STR(VAR_VAL($DLG_idx_to_call,"X"))))
            COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_Y=",STR(VAR_VAL($DLG_idx_to_call,"Z")-16)))
            COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_Z=",STR(VAR_VAL($DLG_idx_to_call,"Y"))))

            $DLG_RAD = "AILN2WWTAP"
            if(VAR_VAL($DLG_idx_to_call,"VAR_TipoTavolo")==1)
            {
               $DLG_RAD = "AILN2WWTCP"
            }

            if(VAR_VAL($DLG_idx_to_call,"X")==1600 | VAR_VAL($DLG_idx_to_call,"X")==1800 & (VAR_VAL($DLG_idx_to_call,"Y")==530 | VAR_VAL($DLG_idx_to_call,"Y")==750))
            {
               COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_Y=",STR(VAR_VAL($DLG_idx_to_call,"Y"))))
               COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($DLG_idx_to_call)," GEST_Z=",STR(VAR_VAL($DLG_idx_to_call,"Z")-16)))
               if(VAR_TipoTavolo==1)   { $DLG_RAD = "TEWWTC" }
            }

            VAR_VALUESTR_SET($DLG_idx_to_call,"RADICE",$DLG_RAD)
            cc = STRDADB($DLG_idx_to_call, "CAMBIA_VAR", "RADICE")
            COMANDO2("UPDATE")

            if($DLG_Finitura_Testiera!=VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"))
            {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SZ=",APICI(),$DLG_Finitura_Testiera,APICI()))
            }
         }

         // 18/09/2019 - Emanuele - Modifico descrizione e immagine per gestire l'haywood/AGEWOOD
//         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
//         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")

         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_Finitura_Testiera"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR(-1,"DLG_Finitura_Testiera")
         // 18/09/2019 - Emanuele - Sostituisco procedura con funzione
//         GOSUB Get_Image_Opaco
         GET_IMAGE("DLG_image_file","Wildwood","DLG_Finitura_Testiera")
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)

      Placement
      {
         posx = 295
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(428)
      //Enable =  1

      Placement
      {
         posx = 295
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 350
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 265
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg Letto_AIR
{
   Caption = MSG(850)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 330
      dimy = 310
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 150
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkTestata
      {
        Caption = MSG(816)
        Hint    = MSG(816)
        Enable  = 1
        Value   = $DLG_testata

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_testata==1)
           {
              $DLG_testata=1
              $DLG_en_tipo_testata=1

              $DLG_en_tipo_testata_0=1-$DLG_tipo_testata
           }
           else
           {
              $DLG_testata=0
              $DLG_en_tipo_testata=0
              $DLG_en_tipo_testata=0
              $DLG_en_tipo_testata_0=0
           }
           //if($DLG_testata==1)   {  $DLG_testata=1  }
           //else                  {  $DLG_testata=0  }
        ]

      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 70
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      //rob_pec 10/01/11
      Check chkKamasutra
      {
        Caption = MSG(851)
        Hint    = MSG(852)
        Value   = $DLG_pianale_kamasutra
        Enable  = $DLG_en_pianale_kamasutra

        Placement
        {
           posx = 10
           posy = 120
           dimx = 120
           dimy = 20

        }

        OnClick
        [
           if( $DLG_pianale_kamasutra==1 )   {  $DLG_pianale_kamasutra=1  }
           else                              {  $DLG_pianale_kamasutra=0  }
        ]

      }


//MD      Check chkRinforzo
//MD      {
//MD        Caption = MSG(824)
//MD        Hint    = MSG(825)
//MD        Enable  = 1
//MD        Value   = $DLG_rinforzo
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 120
//MD           dimx = 120
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           if($DLG_rinforzo==1)   {  $DLG_rinforzo=1  }
//MD           else                   {  $DLG_rinforzo=0  }
//MD        ]
//MD
//MD      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
//FABRI           if($DLG_en_mis_materasso_0==0 ) { $DLG_en_mis_materasso_0 = 1 }
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
 //FABRI          if($DLG_val_mis_materasso_0==1 )
 //FABRI          {
 //FABRI             //$DLG_val_mis_materasso_0 = 0
 //FABRI             //$DLG_val_mis_materasso_1 = 1
 //FABRI             $DLG_mis_materasso = 1
 //FABRI          }
 //FABRI          $DLG_en_mis_materasso_0 = 0
        ]

      }
   }

//MD   Frame frmTipoTestiera
//MD   {
//MD      Caption = "Altezza Testiera"
//MD
//MD      Placement
//MD      {
//MD         posx = 10
//MD         posy = 177
//MD         dimx = 150
//MD         dimy =  60
//MD      }
//MD
//MD      Radio rdH16
//MD      {
//MD        Caption = "Altezza 16"
//MD        Hint    = "Altezza 16"
//MD        Enable  = $DLG_en_tipo_testata
//MD        Value   = $DLG_val_tipo_testata_0
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 15
//MD           dimx = 120
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_tipo_testata = 0
//MD           if($DLG_en_tipo_testata_0==0 ) { $DLG_en_tipo_testata_0 = 1 }
//MD        ]
//MD
//MD      }
//MD
//MD      Radio rdH32
//MD      {
//MD        Caption = "Altezza 32"
//MD        Hint    = "Altezza 32"
//MD        Enable  = $DLG_en_tipo_testata
//MD        Value   = $DLG_val_tipo_testata_1
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 35
//MD           dimx = 120
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_tipo_testata = 1
//MD           if($DLG_val_tipo_testata_0==1 )
//MD           {
//MD              $DLG_val_tipo_testata_0 = 0
//MD              $DLG_val_tipo_testata_1 = 1
//MD              $DLG_tipo_testata = 1
//MD           }
//MD           $DLG_en_tipo_testata_0 = 0
//MD        ]
//MD
//MD      }
//MD   }

   Frame frmHGambe
   {
      Caption = MSG(853)

      Placement
      {
         posx = 10
         posy = 177
         dimx = 150
         dimy =  60
      }

      Radio rdH16
      {
        Caption = MSG(848)
        Hint    = MSG(848)
        Enable  = 1
        Value   = $DLG_val_tipo_piedi_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_piedi = 0
           if($DLG_en_tipo_piedi_0==0 ) { $DLG_en_tipo_piedi_0 = 1 }
        ]

      }

      Radio rdH32
      {
        Caption = MSG(849)
        Hint    = MSG(849)
        Enable  = 1
        Value   = $DLG_val_tipo_piedi_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_piedi = 1
           if($DLG_val_tipo_piedi_0==1 )
           {
              $DLG_val_tipo_piedi_0 = 0
              $DLG_val_tipo_piedi_1 = 1
              $DLG_tipo_piedi = 1
           }
           $DLG_en_tipo_piedi_0 = 0
        ]

      }
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx = 170
         posy =  75
         dimx = 150
         dimy = 162
      }

      Radio rd100x200
      {
        Caption = "100 x 200"
        Hint    = MSG(838)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 0

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di non poter avere il pianale kamasutra
           $DLG_pianale_kamasutra = 0
           $DLG_en_pianale_kamasutra = 0
        ]

      }

      Radio rd120x200
      {
        Caption = "120 x 200"
        Hint    = MSG(839)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 1
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di non poter avere il pianale kamasutra
           $DLG_pianale_kamasutra = 0
           $DLG_en_pianale_kamasutra = 0
        ]

      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd152x203
      {
        Caption = MSG(841)
        Hint    = MSG(842)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_3

        Placement
        {
           posx = 10
           posy = 75
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 3

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd193x203
      {
        Caption = MSG(843)
        Hint    = MSG(844)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_6

        Placement
        {
           posx = 10
           posy = 135
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 6

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 245
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 245
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Letto_NEW_AIR
{
   Caption = MSG(847)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 330
      //dimy = 310
      //dimy = 320
      dimy = 335
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      Check chkKamasutra
      {
        Caption = MSG(851)
        Hint    = MSG(852)
        Value   = $DLG_pianale_kamasutra
        Enable  = $DLG_en_pianale_kamasutra

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20

        }

        OnClick
        [
           if( $DLG_pianale_kamasutra==1 )   {  $DLG_pianale_kamasutra=1  }
           else                              {  $DLG_pianale_kamasutra=0  }
        ]

      }
   }

   Frame Testiera
   {
      Caption = MSG(816)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         //dimy = 60
         //dimy = 80
         dimy = 100
      }

      //19.06.2017 - Filippo - Aggiungo la possibilit di disattivare la testiera
      Radio RdTestata0
      {
        Caption = MSG(1489)
        Hint    = MSG(1489)
        Enable  = 1
        Value   = $DLG_testata_no

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        //OnClick
        //[
        //   if($DLG_testata2==1)  {  $DLG_testata2=1  $DLG_testata=0  }
        //   else                  {  $DLG_testata2=0  }
        //]

      }

      Radio RdTestata
      {
        Caption = MSG(891)
        Hint    = MSG(891)
        //Enable  = 1
        Enable  = $DLG_enable_testata
        Value   = $DLG_testata

        Placement
        {
           posx = 10
           //posy = 15
           posy = 35
           dimx = 120
           dimy = 20
        }

        //OnClick
        //[
           // Eugenio 10.01.13 Commento tutto e ricreo una cosa a mio avviso pi semplice e adatta alla nuova testata
           //if($DLG_testata==1)
           //{
           //   $DLG_testata=1
           //   $DLG_en_tipo_testata=1
           //
           //   $DLG_en_tipo_testata_0=1-$DLG_tipo_testata
           //}
           //else
           //{
           //   $DLG_testata=0
           //   $DLG_en_tipo_testata=0
           //   $DLG_en_tipo_testata=0
           //   $DLG_en_tipo_testata_0=0
           //}
        //   if($DLG_testata==1)   {  $DLG_testata=1  $DLG_testata2=0  }
        //   else                  {  $DLG_testata=0  }
        //]
      }

      Radio RdTestata2
      {
        Caption = MSG(892)
        Hint    = MSG(892)
        //Enable  = 1
        Enable  = $DLG_enable_testata2
        Value   = $DLG_testata2

        Placement
        {
           posx = 10
           //posy = 35
           posy = 55
           dimx = 120
           dimy = 20
        }

        //OnClick
        //[
        //   if($DLG_testata2==1)  {  $DLG_testata2=1  $DLG_testata=0  }
        //   else                  {  $DLG_testata2=0  }
        //]

      }

      Radio RdTestata3
      {
        Caption = MSG(2229)
        Hint    = MSG(2229)
        Enable  = $DLG_enable_testata
        Value   = $DLG_testata3

        Placement
        {
           posx = 10
           //posy = 35
           posy = 75
           dimx = 120
           dimy = 20
        }

        //OnClick
        //[
        //   if($DLG_testata2==1)  {  $DLG_testata2=1  $DLG_testata=0  }
        //   else                  {  $DLG_testata2=0  }
        //]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame frmHGambe
   {
      Caption = MSG(853)

      Placement
      {
         posx = 10
         //posy = 180
         //posy = 200
         posy = 220
         dimx = 150
         dimy =  80
      }

      Radio rdH16
      {
        Caption = MSG(889)
        Hint    = MSG(889)
        Enable  = 1
        Value   = $DLG_val_tipo_piedi_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_piedi = 0
           $DLG_val_tipo_piedi_0 = 1
           $DLG_val_tipo_piedi_1 = 0
           $DLG_val_tipo_piedi_2 = 0
           //if($DLG_en_tipo_piedi_0==0 ) { $DLG_en_tipo_piedi_0 = 1 }
        ]

      }

      Radio rdH32
      {
        Caption = MSG(890)
        Hint    = MSG(890)
        Enable  = 1
        Value   = $DLG_val_tipo_piedi_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_piedi = 1
           //if($DLG_val_tipo_piedi_0==1 )
           //{
              $DLG_val_tipo_piedi_0 = 0
              $DLG_val_tipo_piedi_1 = 1
              $DLG_val_tipo_piedi_2 = 0
          //   $DLG_tipo_piedi = 1
           //}
           //$DLG_en_tipo_piedi_0 = 0
        ]

      }

      //LZ 11/04/2019 - Rimuovo altezza 220, non disponibile a listino 2019
//      Radio rdH22
//      {
//        Caption = MSG(888)
//        Hint    = MSG(888)
//        Enable  = 1
//        Value   = $DLG_val_tipo_piedi_2
//
//        Placement
//        {
//           posx = 10
//           posy = 55
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           $DLG_tipo_piedi = 2
//           $DLG_val_tipo_piedi_0 = 0
//           $DLG_val_tipo_piedi_1 = 0
//           $DLG_val_tipo_piedi_2 = 1
//           //$DLG_en_tipo_piedi_0 = 0
//        ]
//
//      }

   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx = 170
         posy =  75
         dimx = 150
         dimy = 162
      }

      Radio rd100x200
      {
        Caption = "100 x 200"
        Hint    = MSG(838)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 0

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di non poter avere il pianale kamasutra
           $DLG_pianale_kamasutra = 0
           $DLG_en_pianale_kamasutra = 0
           // Eugenio 10.01.13 Disattivo la testiera 0.8
           $DLG_testata2 = 0
           $DLG_enable_testata2 = 0
        ]

      }

      Radio rd120x200
      {
        Caption = "120 x 200"
        Hint    = MSG(839)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 1
           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di non poter avere il pianale kamasutra
           $DLG_pianale_kamasutra = 0
           $DLG_en_pianale_kamasutra = 0
           // Eugenio 10.01.13 Disattivo la testiera 0.8
           $DLG_testata2 = 0
           $DLG_enable_testata2 = 0
        ]

      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
           // ER 10.01.13 attivo la testiera sp 0.8 se  possibile usare quella da 8
           // sullo schienale da 8 c' il controllo elementi divano agganciati
           if($DLG_enable_testata==1)   {  $DLG_enable_testata2 = 1  }
        ]
      }

      Radio rd152x203
      {
        Caption = MSG(841)
        Hint    = MSG(842)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_3

        Placement
        {
           posx = 10
           posy = 75
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 3

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
           // Eugenio 10.01.13 Disattivo la testiera 0.8
           $DLG_testata2 = 0
           $DLG_enable_testata2 = 0
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
           // ER 10.01.13 attivo la testiera sp 0.8 se  possibile usare quella da 8
           // sullo schienale da 8 c' il controllo elementi divano agganciati
           if($DLG_enable_testata==1)   {  $DLG_enable_testata2 = 1  }
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
           // ER 10.01.13 attivo la testiera sp 0.8 se  possibile usare quella da 8
           // sullo schienale da 8 c' il controllo elementi divano agganciati
           if($DLG_enable_testata==1)   {  $DLG_enable_testata2 = 1  }
        ]

      }

      Radio rd193x203
      {
        Caption = MSG(843)
        Hint    = MSG(844)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_6

        Placement
        {
           posx = 10
           posy = 135
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 6

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           $DLG_en_pianale_kamasutra = 1
           // Eugenio 10.01.13 Disattivo la testiera 0.8
           $DLG_testata2 = 0
           $DLG_enable_testata2 = 0
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         //posy = 245
         posy = 250
         dimx = 65
         //dimy = 30
         dimy = 40
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 170
         //posy = 245
         posy = 250
         dimx = 75
         //dimy = 30
         dimy = 40
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Letto_Vele
{
   Caption = MSG(1730)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 670
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  80
      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 90
         dimx = 150
         dimy = 105
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 0
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      //Check chkKamasutra
      //{
      //  Caption = MSG(851)
      //  Hint    = MSG(852)
      //  Value   = $DLG_pianale_kamasutra
      //  Enable  = 0
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 77
      //     dimx = 120
      //     dimy = 20
      //
      //  }
      //
      //  OnClick
      //  [
      //     if( $DLG_pianale_kamasutra==1 )   {  $DLG_pianale_kamasutra=1  }
      //     else                              {  $DLG_pianale_kamasutra=0  }
      //  ]
      //
      //}
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
         posy = 195
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame ForiPrese
   {
      Caption = MSG(2205)

      Placement
      {
         posx = 10
         posy = 260
         dimx = 150
         dimy = 50
      }

      //Label LblfoPrese
      //{
      //  Caption = MSG(2205)
      //  Hint    = MSG(2205)
      //  Value   = MSG(2205)
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 23
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //}

      Edit EdtfoPrese
      {
        Caption = $DLG_caption_PresaVele
        Hint    = $DLG_hint_PresaVele
        Value   = $DLG_value_PresaVele

        Placement
        {
           posx = 10
           posy = 20
           dimx = 110
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Frame Finitura_Laccato4
   {
      Caption = MSG(2200)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_PY
         Value   = $DLG_descrizione_PY
         Hint    = $DLG_descrizione_PY

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_PY
         Value   = $DLG_image_file6
         Hint    = $DLG_descrizione_PY

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Frame Finitura_Laccato5
   {
      Caption = MSG(2201)

      Placement
      {
         posx = 165
         posy = 155
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_TY
         Value   = $DLG_descrizione_TY
         Hint    = $DLG_descrizione_TY

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_TY
         Value   = $DLG_image_file5
         Hint    = $DLG_descrizione_TY

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }

   }

   Frame Finitura_Tessuto1
   {
      Caption = MSG(2202)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Frame Finitura_Tessuto2
   {
      Caption = MSG(2203)

      Placement
      {
         posx = 330
         posy = 155
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }

   }

   Frame Finitura_Tessuto3
   {
      Caption = MSG(2204)

      Placement
      {
         posx = 495
         posy = 10
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Button btnPrese
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(2205)

      Placement
      {
         posx = 132
         posy = 280
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_ForiPresaVele")
         if( $DLG_ForiPresaVele==0 )  { $DLG_caption_PresaVele = MSG(2206) }
         if( $DLG_ForiPresaVele==1 )  { $DLG_caption_PresaVele = MSG(646) }
         if( $DLG_ForiPresaVele==2 )  { $DLG_caption_PresaVele = MSG(647) }
         if( $DLG_ForiPresaVele==3 )  { $DLG_caption_PresaVele = MSG(2207) }
         $DLG_hint_PresaVele     = $DLG_caption_PresaVele
         $DLG_value_PresaVele    = $DLG_caption_PresaVele
      ]
   }

   Button btnFinPia4
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 130
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PY")
         $DLG_descrizione_PY = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PY"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PY")
         GOSUB Get_Image_Opaco
         $DLG_image_file6 = $DLG_image_file
      ]
   }

   Button btnFinPia5
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 275
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_TY")
         $DLG_descrizione_TY = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_TY"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_TY")
         GOSUB Get_Image_Opaco
         $DLG_image_file5 = $DLG_image_file
      ]
   }

   Button btnFinLay1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = 1

      Placement
      {
         posx = 355
         posy = 130
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_Y1")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_Y1"),"colori_tutti.txt")
         $DLG_VAL_COLORE_1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_Y1")
         GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinLay2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = 1

      Placement
      {
         posx = 355
         posy = 275
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_Y2")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_Y2"),"colori_tutti.txt")
         $DLG_VAL_COLORE_2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_Y2")
         GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinLay3
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = 1

      Placement
      {
         posx = 520
         posy = 130
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_Y3")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_Y3"),"colori_tutti.txt")
         $DLG_VAL_COLORE_3 = VAR_VAL_STR($DLG_idx_to_call,"GEST_Y3")
         GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 350
         posy = 305
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 265
         posy = 305
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Letto_Frame
{
   Caption = MSG(1731)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 340
      dimy = 430
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  80
      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint ="Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 90
         dimx = 150
         dimy = 90
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        //Enable  = $DLG_en_coordinato
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      Check chkReteOrto
      {
        Caption = MSG(2215)
        Hint    = MSG(2215)
        Value   = $DLG_reteorto
        //Enable  = 1

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20

        }

        OnClick
        [
           if( $DLG_reteorto==1 )   {  $DLG_reteorto=1  }
           else                     {  $DLG_reteorto=0  }
        ]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
         posy = 180
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame TipoTelaio
   {
      Caption = MSG(2216)

      Placement
      {
         posx = 10
         posy = 242
         dimx = 150
         dimy = 50
      }

      Edit EdtTipoTel
      {
        Caption = $DLG_caption_TelaioFrame
        Hint    = $DLG_hint_TelaioFrame
        Value   = $DLG_value_TelaioFrame

        Placement
        {
           posx = 10
           posy = 20
           dimx = 110
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Frame HTestata
   {
      Caption = MSG(835)

      Placement
      {
         posx = 10
         posy = 295
         dimx = 150
         dimy = 50
      }

      Edit EdtTipoTel
      {
        Caption = $DLG_caption_Htestata
        Hint    = $DLG_hint_Htestata
        Value   = $DLG_value_Htestata

        Placement
        {
           posx = 10
           posy = 20
           dimx = 110
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(2217)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Frame FinituraTesta
   {
      Caption = MSG(804)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 160
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = 1
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 20
           posy = 155
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }

   }

   Button btnTipoTel
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(2216)

      Placement
      {
         posx = 132
         posy = 262
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_TelaioFrame")
         if( $DLG_TelaioFrame==0 )  { $DLG_caption_TelaioFrame = MSG(2211) }
         if( $DLG_TelaioFrame==1 )  { $DLG_caption_TelaioFrame = MSG(2212) }
         if( $DLG_TelaioFrame==2 )  { $DLG_caption_TelaioFrame = MSG(2213) }
         if( $DLG_TelaioFrame==3 )  { $DLG_caption_TelaioFrame = MSG(2214) }
         $DLG_hint_TelaioFrame     = $DLG_caption_TelaioFrame
         $DLG_value_TelaioFrame    = $DLG_caption_TelaioFrame
      ]
   }

   Button btnHTestata
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(835)

      Placement
      {
         posx = 132
         posy = 315
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_Htestata")
         $DLG_caption_Htestata  = STR($DLG_Htestata)
         $DLG_hint_Htestata     = STR($DLG_Htestata)
         $DLG_value_Htestata    = STR($DLG_Htestata)
      ]
   }

   Button btnFinTela
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 130
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call_2,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_2,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call_2,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinTest
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 280
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call_1,"GEST_RV")
         $DLG_descrizione_RV = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_1,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call_1,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 165
         posy = 355
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
         posy = 355
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg TestLetLinea
{
   Caption = MSG(945)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmChk
   {
      Placement
      {
         posx = 10
         posy = 185
         dimx = 150
         dimy = 40
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = 1
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 18
            dimx = 190
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 230
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
      ]
   }
}

Dlg CeReEstLinea
{
   Caption = MSG(602)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      //Caption = MSG(804)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 18
            dimx = 190
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
      ]
   }
}

Dlg Letto_Linea
{
   Caption = MSG(1732)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 540
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoLetto
   {
      Caption = MSG(2208)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 185
      }

      Image Im0
      {
         Caption = $DLG_TipoLetto
         Value   = $DLG_image_file2
         Hint    = $DLG_TipoLetto

         Placement
         {
            posx =  10
            posy =  20
            dimx =  160
            dimy =  140
         }
      }

   }

   Frame Materasso
   {
      Caption = MSG(813)

      Placement
      {
         posx = 185
         posy = 10
         dimx = 155
         dimy = 45
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 185
         posy = 60
         dimx = 155
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame Accessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 185
         posy = 125
         dimx = 155
         dimy = 70
      }

      Check chkReteEst
      {
         Caption = MSG(2209)
         Hint    = MSG(2209)
         Enable  = $DLG_enable_rd_uso_1
         Value   = $DLG_ReteEstra

         Placement
         {
            posx = 10
            posy = 20
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            if($DLG_ReteEstra==1)
            {
               $DLG_ReteEstra=1
               $DLG_CestEstra=0
            }
            else
            {
               $DLG_ReteEstra=0
            }
         ]
      }

      Check chkCestEst
      {
         Caption = MSG(2210)
         Hint    = MSG(2210)
         Enable  = $DLG_enable_rd_uso_2
         Value   = $DLG_CestEstra

         Placement
         {
            posx = 10
            posy = 45
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            if($DLG_CestEstra==1)
            {
               $DLG_CestEstra=1
               $DLG_ReteEstra=0
            }
            else
            {
               $DLG_CestEstra=0
            }
         ]
      }

   }

   Frame Finitura_Laccato
   {
      Caption = MSG(602)

      Placement
      {
         posx = 350
         posy = 10
         dimx = 175
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_descrizione_ST
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx =  25
            posy =  35
            dimx =  120
            dimy =  120
         }
      }
   }

   //Frame Finitura_Testiera
   //{
   //   Caption = MSG(945)
   //   Enable  = $DLG_enable_rd_uso_2
   //
   //   Placement
   //   {
   //      posx = 530
   //      posy = 10
   //      dimx = 175
   //      dimy = 185
   //   }
   //
   //   Label LabFinPia
   //   {
   //      Caption = $DLG_descrizione_RV
   //      Value   = $DLG_descrizione_RV
   //      Hint    = $DLG_descrizione_RV
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 20
   //         dimx = 130
   //         dimy = 25
   //      }
   //   }
   //
   //   Image ImPia
   //   {
   //      Caption = $DLG_descrizione_RV
   //      Value   = $DLG_image_file3
   //      Enable  = $DLG_enable_rd_uso_2
   //      Hint    = $DLG_descrizione_RV
   //
   //      Placement
   //      {
   //         posx =  25
   //         posy =  35
   //         dimx =  120
   //         dimy =  120
   //      }
   //   }
   //}

   Button btnTipologia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(619)

      Placement
      {
         posx = 30
         posy = 170
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_TipoLetto")
         GOSUB Get_Image_LettoLinea
         if(STRCMP($DLG_TipoLetto,"LagoLineaB0")==0 | STRCMP($DLG_TipoLetto,"LagoLineaB1")==0)  { $DLG_enable_rd_uso_1=0 }
         else                                                                                   { $DLG_enable_rd_uso_1=1 }
         if(STRCMP($DLG_TipoLetto,"LagoLineaB6")==0 | STRCMP($DLG_TipoLetto,"LagoLineaB7")==0 | $DLG_enable_rd_uso_1==0)  { $DLG_enable_rd_uso_2=0 }
         else                                                                                                             { $DLG_enable_rd_uso_2=1 }
         //CAMBIO RADICE
         //GOSUB CambiaRadLetLin
         //DISPLAY("VAR_enable_rd_uso_2
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 380
         posy = 170
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_ST = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   //Button btnFinitura2
   //{
   //   Caption = MSG(619)
   //   Result  = 0
   //   Enable  = $DLG_enable_rd_uso_2
   //   Hint = MSG(620)
   //
   //   Placement
   //   {
   //      posx = 560
   //      posy = 170
   //      dimx = 110
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //      $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
   //      $DLG_descrizione_RV = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
   //      $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
   //      GOSUB Get_Image_Rivestimenti
   //      $DLG_image_file3 = $DLG_image_file
   //   ]
   //}

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Letto_Gizmo
{
   Caption = MSG(2226)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 720
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoLetto
   {
      Caption = MSG(2225)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 185
      }

      Image Im0
      {
         Caption = $DLG_LettoGizmo
         Value   = $DLG_image_file2
         Hint    = $DLG_LettoGizmo

         Placement
         {
            posx =  10
            posy =  20
            dimx =  150
            dimy =  140
         }
      }

   }

   Frame Materasso
   {
      Caption = MSG(813)

      Placement
      {
         posx = 185
         posy = 10
         dimx = 155
         dimy = 45
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 185
         posy = 60
         dimx = 155
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame Verso_Testiera
   {
      Caption = MSG(2223)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 170
         dimy = 60
      }

      Radio dx
      {
        //Massimiliano 27/08/2018  - cambio descrizione verso
        //Caption = MSG(405)
        //Hint    = MSG(405)
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_pan_dx

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_pan_dx = 1
           $DLG_pan_sx = 0
        ]

      }

      Radio sx
      {
        //Massimiliano 27/08/2018  - cambio descrizione verso
        //Caption = MSG(403)
        //Hint    = MSG(403)
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_pan_sx

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_pan_dx = 0
           $DLG_pan_sx = 1
        ]

      }
   }

   Frame Altezza
   {
      Caption = MSG(2224)

      Placement
      {
         posx = 185
         posy = 200
         dimx = 155
         dimy = 60
      }

      Radio h_736
      {
        Caption = "736"
        Hint    = "736"
        Value   = $DLG_h_736

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_h_736 = 1
           $DLG_h_920 = 0
        ]

      }

      Radio h_920
      {
        Caption = "920"
        Hint    = "920"
        Value   = $DLG_h_920

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_h_736 = 0
           $DLG_h_920 = 1
        ]

      }
   }

   //Frame Accessori
   //{
   //   Caption = MSG(803)
   //
   //   Placement
   //   {
   //      posx = 185
   //      posy = 125
   //      dimx = 155
   //      dimy = 70
   //   }
   //
   //   Radio rete
   //   {
   //     Caption = MSG(2209)
   //     Hint    = MSG(2209)
   //     Enable  = $DLG_enable_rd_uso_1
   //     Value   = $DLG_ReteEstra
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 20
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //         $DLG_ReteEstra=1
   //         $DLG_CestEstra=0
   //     ]
   //
   //   }
   //
   //   Radio cestoni
   //   {
   //     Caption = MSG(2210)
   //     Hint    = MSG(2210)
   //     Enable  = $DLG_enable_rd_uso_2
   //     Value   = $DLG_CestEstra
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 40
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //         $DLG_ReteEstra=0
   //         $DLG_CestEstra=1
   //     ]
   //
   //   }
   //}

   Frame Accessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 185
         posy = 125
         dimx = 155
         dimy = 70
      }

      Check chkReteEst
      {
         Caption = MSG(2209)
         Hint    = MSG(2209)
         Enable  = $DLG_enable_rd_uso_1
         Value   = $DLG_ReteEstra

         Placement
         {
            posx = 10
            posy = 20
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            if($DLG_ReteEstra==1)
            {
               $DLG_ReteEstra=1
               $DLG_CestEstra=0
            }
            else
            {
               $DLG_ReteEstra=0
            }
         ]
      }

      Check chkCestEst
      {
         Caption = MSG(2210)
         Hint    = MSG(2210)
         Enable  = $DLG_enable_rd_uso_1
         Value   = $DLG_CestEstra

         Placement
         {
            posx = 10
            posy = 45
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            if($DLG_CestEstra==1)
            {
               $DLG_CestEstra=1
               $DLG_ReteEstra=0
            }
            else
            {
               $DLG_CestEstra=0
            }
         ]
      }

   }

   Frame Ignifugazione
   {
      Caption = MSG(613)

      Placement
      {
         posx = 530
         posy = 195
         dimx = 175
         dimy = 60
      }

      Check chkReteEst
      {
         Caption = MSG(613)
         Hint    = MSG(613)
         //Enable  = $DLG_enable_ign
         Value   = $DLG_ignifugazione

         Placement
         {
            posx = 10
            posy = 25
            dimx = 140
            dimy = 20
         }

         OnClick
         [
         ]
      }
   }

   Frame Finitura_Laccato
   {
      Caption = MSG(602)

      Placement
      {
         posx = 350
         posy = 10
         dimx = 175
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_descrizione_ST
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx =  25
            posy =  35
            dimx =  120
            dimy =  120
         }
      }
   }

   Frame Finitura_Testiera
   {
      Caption = MSG(945)
      Enable  = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 530
         posy = 10
         dimx = 175
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_RV
         Value   = $DLG_descrizione_RV
         Hint    = $DLG_descrizione_RV

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_RV
         Value   = $DLG_image_file3
         Enable  = $DLG_enable_rd_uso_2
         Hint    = $DLG_descrizione_RV

         Placement
         {
            posx =  25
            posy =  35
            dimx =  120
            dimy =  120
         }
      }
   }

   Button btnTipologia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(619)

      Placement
      {
         posx = 30
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_LettoGizmo")
         GOSUB Get_Image_LettoGizmo
         if(STRCMP($DLG_LettoGizmo,"Gizmo1")==0 | STRCMP($DLG_LettoGizmo,"Gizmo2")==0)  { $DLG_enable_rd_uso_1=0 }
         else                                                                           { $DLG_enable_rd_uso_1=1 }
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 380
         posy = 170
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_ST = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 560
         posy = 170
         dimx = 110
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_RV = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file3 = $DLG_image_file
      ]
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 445
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 350
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg LettoSospeso
{
   Caption = MSG(1745)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 375
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Accessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 155
         dimy = 85
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }
      //Massimiliano 06/10/15 - predispongo il led sul fondo del letto, non si capisce se deve andarci o no
      Check chkLed
      {
        Caption = MSG(194)
        Hint    = MSG(194)
        Enable  = 1
        Value   = $DLG_Led

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Led=1
           if( $DLG_Led == 1 )  {  $DLG_Trasformatore=1  }
        ]
      }
      Check chkTrasformatore
      {
        Caption = MSG(1465)
        Hint    = MSG(1465)
        Enable  = 1
        Value   = $DLG_Trasformatore

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Trasformatore=1
        ]
      }

   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 15
         posy = 95
         dimx = 155
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame posScaletta
   {
      Caption = MSG(2219)

      Placement
      {
         posx = 15
         posy = 155
         dimx = 155
         dimy = 60
      }

      Radio rdDestra
      {
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_ScalettaDx

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_ScalettaDx = 1
           $DLG_ScalettaSx = 0
        ]

      }

      Radio rdSinistra
      {
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_ScalettaSx

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_ScalettaSx = 1
           $DLG_ScalettaDx = 0
        ]

      }
   }


   Frame Finitura_Laccato
   {
      Caption = MSG(602)

      Placement
      {
         posx = 180
         posy = 10
         dimx = 175
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_descrizione_ST
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx =  25
            posy =  35
            dimx =  120
            dimy =  120
         }
      }
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 210
         posy = 170
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_ST = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg LettoLagolineaWeightless
{
   Caption = MSG(1744)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 920
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Materasso
   {
      Caption = MSG(813)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 155
         dimy = 45
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        //tengo disabilitato... non ci sono materassi
        Enable  = 0
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 15
         posy = 60
         dimx = 155
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   Frame posScaletta
   {
      Caption = MSG(2219)

      Placement
      {
         posx = 15
         posy = 130
         dimx = 155
         dimy = 60
      }

      Radio rdDestra
      {
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_ScalettaDx

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_ScalettaDx = 1
           $DLG_ScalettaSx = 0
        ]

      }

      Radio rdSinistra
      {
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_ScalettaSx

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_ScalettaDx = 0
           $DLG_ScalettaSx = 1
        ]

      }
   }

   Frame frmAltezza
   {
      Caption = MSG(428)

      Placement
      {
         posx = 185
         posy = 10
         dimx = 155
         dimy = 80
      }

      Radio rdH1700
      {
        Caption = "1700"
        Hint    = "1700"
        Value   = $DLG_H1700

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_H1700 = 1
           $DLG_H1516 = 0
           $DLG_H1332 = 0
        ]

      }
      Radio rdH1516
      {
        Caption = "1516"
        Hint    = "1516"
        Value   = $DLG_H1516

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_H1700 = 0
           $DLG_H1516 = 1
           $DLG_H1332 = 0
        ]

      }
      Radio rdH1332
      {
        Caption = "1332"
        Hint    = "1332"
        Value   = $DLG_H1332

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_H1700 = 0
           $DLG_H1516 = 0
           $DLG_H1332 = 1
        ]

      }
   }

   Frame frmDimensione
   {
      Caption = MSG(807)

      Placement
      {
         posx = 185
         posy = 100
         dimx = 155
         dimy = 60
      }

      Radio rdH1700
      {
        Caption = "210 x 100"
        Hint    = "210 x 100"
        Value   = $DLG_Dim1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Dim1 = 1
           $DLG_Dim2 = 0
        ]

      }
      Radio rdH1516
      {
        Caption = "225 x 125"
        Hint    = "225 x 125"
        Value   = $DLG_Dim2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Dim1 = 0
           $DLG_Dim2 = 1
        ]

      }
   }

   Frame Finitura_Laccato
   {
      Caption = MSG(2220)

      Placement
      {
         posx = 350
         posy = 10
         dimx = 175
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SR
         Value   = $DLG_descrizione_SR
         Hint    = $DLG_descrizione_SR

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SR
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SR

         Placement
         {
            posx =  25
            posy =  35
            dimx =  120
            dimy =  120
         }
      }
   }

   Frame Finitura_Laccato2
   {
      Caption = MSG(2217)

      Placement
      {
         posx = 535
         posy = 10
         dimx = 175
         dimy = 185
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_PR
         Value   = $DLG_descrizione_PR
         Hint    = $DLG_descrizione_PR

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_PR
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_PR

         Placement
         {
            posx =  25
            posy =  35
            dimx =  120
            dimy =  120
         }
      }
   }

   Frame Finitura
   {
      Caption = MSG(2221)

      Placement
      {
         posx = 720
         posy =  10
         dimx = 175
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_RV
         Value   = $DLG_descrizione_RV
         Hint    = $DLG_descrizione_RV

         Placement
         {
            posx =  25
            posy =  18
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_RV
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_RV

         Placement
         {
            posx =  25
            posy =  35
            dimx = 120
            dimy = 120
         }
      }
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 380
         posy = 170
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SR")
         $DLG_descrizione_SR = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SR"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SR")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 565
         posy = 170
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_PR = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinitura3
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 750
         posy = 170
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_RV = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file3 = $DLG_image_file
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 265
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 175
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Letto_NEW_AIR_WW
{
   Caption = MSG(878)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 500
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  80
      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 90
         dimx = 150
         dimy = 105
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      Check chkKamasutra
      {
        Caption = MSG(851)
        Hint    = MSG(852)
        Value   = $DLG_pianale_kamasutra
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 77
           dimx = 120
           dimy = 20

        }

        OnClick
        [
           if( $DLG_pianale_kamasutra==1 )   {  $DLG_pianale_kamasutra=1  }
           else                              {  $DLG_pianale_kamasutra=0  }
        ]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
         posy = 195
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   // er
   Frame FrmMisureT
   {
      Caption = MSG(879)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 160
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Check chkDecentratura
      {
        Caption = MSG(880)
        Hint    = MSG(880)
        Enable  = 1
        Value   = $DLG_decentrato

        Placement
        {
           posx = 10
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_decentrato==1)
           {
              $DLG_decentrato=1
              $DLG_enable_offset=1
           }
           else
           {
              $DLG_decentrato=0
              $DLG_enable_offset=0
           }
        ]
      }

      Edit EdtDecentratura
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset
        Enable  = 0

        Placement
        {
           posx = 65
           posy = 70
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Label LblAsse
      {
        Caption = MSG(883)
        Hint    = MSG(883)
        Value   = MSG(883)

        Placement
        {
           posx = 15
           posy = 75
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 165
         posy = 110
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(881)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 145
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 330
         posy = 80
         dimx = 145
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 330
         posy = 110
         dimx = 145
         dimy = 145
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  35
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 350
         posy = 230
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 230
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)

      Placement
      {
         posx = 295
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(882)
      Enable =  $DLG_enable_offset

      Placement
      {
         posx = 295
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset    = STRCAT(MSG(882)," = ",STR($DLG_offset))
        $DLG_caption_offset = STR($DLG_offset)
        $DLG_value_offset   = STR($DLG_offset)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 350
         posy = 260
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 265
         posy = 260
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg Letto_NEW_AIR_WTP
{
   Caption = MSG(878)
   Placement
   {
      posx = 155
      posy = 150
      dimx = $DLG_Dim_Dialog
      dimy = 340
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 200
         dimy = 80
      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]
      }
      // 23/10/2018 - Emanuele - Aggiungo radio button per la gestione delle nuove misure
      Radio rd152x203
      {
        Caption = "152 x 203"
        Hint    = "152 x 203"
        Enable  = $DLG_en_mis_materasso_1
        Value   = $DLG_val_mis_materasso_3

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 3

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 110
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

      // 23/10/2018 - Emanuele - Aggiungo radio button per la gestione delle nuove misure
      Radio rd193x203
      {
        Caption = "193 x 203"
        Hint    = "193 x 203"
        Enable  = $DLG_en_mis_materasso_1
        Value   = $DLG_val_mis_materasso_7

        Placement
        {
           posx = 110
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 7

           // Qui  possibile avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 90
         dimx = 200
         dimy = 105
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 170
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      Check chkKamasutra
      {
        Caption = MSG(851)
        Hint    = MSG(852)
        Value   = $DLG_pianale_kamasutra
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 77
           dimx = 120
           dimy = 20

        }

        OnClick
        [
           if( $DLG_pianale_kamasutra==1 )   {  $DLG_pianale_kamasutra=1  }
           else                              {  $DLG_pianale_kamasutra=0  }
        ]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
         posy = 195
         dimx = 200
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   // er
   Frame FrmMisureT
   {
      Caption = MSG(879)

      Placement
      {
         posx = 220
         posy = 10
         dimx = 170
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 55
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(428)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 220
         posy = 110
         dimx = 170
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  50
            posy =  40
            dimx =  74
            dimy =  74
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(881)

      Placement
      {
         posx = 400
         posy = 10
         dimx = 160
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 400
         posy = 80
         dimx = 160
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 400
         posy = 110
         dimx = 160
         dimy = 145
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 425
         posy = 230
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 250
         posy = 230
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)

      Placement
      {
         posx = 350
         posy = 35
         dimx = 30
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(428)
      //Enable =  1

      Placement
      {
         posx = 350
         posy = 65
         dimx = 30
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 270
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 270
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg Letto_NEW_AIR_WTV
{
   Caption = MSG(878)
   Placement
   {
      posx = 155
      posy = 150
      dimx = 500
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  80
      }

      Radio rd150x200
      {
        Caption = "150 x 200"
        Hint    = MSG(840)
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2

           // forzo il fatto di non poter avere il coordinato
           $DLG_coordinato = 0
           $DLG_en_coordinato = 0
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_5

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 5

           // Qui  possibile avere il coordinato
           $DLG_en_coordinato = 1
           //rob_pec 10/01/11 forzo il fatto di poter avere il pianale kamasutra
           //$DLG_en_pianale_kamasutra = 1
        ]

      }
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 90
         dimx = 150
         dimy = 105
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 17
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
              $DLG_en_tipo_materasso=1
           }
           else
           {
              $DLG_materasso=0
              $DLG_en_tipo_materasso=0
           }
        ]
      }

      Check chkIlluminazione
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 1
        Value   = $DLG_illuminazione

        Placement
        {
           posx = 10
           posy = 37
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_illuminazione==1)   {  $DLG_illuminazione=1  }
           else                        {  $DLG_illuminazione=0  }
        ]

      }

      Check chkCoordinato
      {
        Caption = MSG(818)
        Hint    = MSG(820)
        Value   = $DLG_coordinato
        Enable  = $DLG_en_coordinato

        Placement
        {
           posx = 10
           posy = 57
           dimx = 120
           dimy = 20

           //DISPLAY("$DLG_mis_materasso",$DLG_mis_materasso)
        }

        OnClick
        [
           if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
           {
              $DLG_coordinato=0
           }

           if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
           else                       {  $DLG_coordinato=0  }
        ]

      }

      Check chkKamasutra
      {
        Caption = MSG(851)
        Hint    = MSG(852)
        Value   = $DLG_pianale_kamasutra
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 77
           dimx = 120
           dimy = 20

        }

        OnClick
        [
           if( $DLG_pianale_kamasutra==1 )   {  $DLG_pianale_kamasutra=1  }
           else                              {  $DLG_pianale_kamasutra=0  }
        ]

      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
         posy = 195
         dimx = 150
         dimy = 60
      }

      Radio rdOrtopedico
      {
        Caption = MSG(833)
        Hint    = MSG(833)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 0
        ]

      }

      Radio rdLattice
      {
        Caption = MSG(834)
        Hint    = MSG(834)
        Enable  = $DLG_en_tipo_materasso
        Value   = $DLG_val_tipo_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_tipo_materasso = 1
        ]

      }
   }

   // er
   Frame FrmMisureT
   {
      Caption = MSG(879)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 160
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 165
         posy = 110
         dimx = 160
         dimy = 145
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(881)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 145
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 330
         posy = 80
         dimx = 145
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 330
         posy = 110
         dimx = 145
         dimy = 145
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  35
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 350
         posy = 230
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 230
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)

      Placement
      {
         posx = 295
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)
      //Enable =  1

      Placement
      {
         posx = 295
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 350
         posy = 260
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 265
         posy = 260
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg AirPancaLetWild
{
   Caption = MSG(893)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita
        //Enable  = 1

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1362)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 80
         dimx = 155
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 115
         dimx = 155
         dimy = 130
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }


   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 255
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 255
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}


Dlg Letto_Testata
{
   Caption = MSG(845)

   Placement
   {
      posx = 150
      posy = 150
      //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
      //dimx = 180
      dimx = 185
      //dimy = 220
      //10.07.2017 - Filippo - nuove testiere letto fluttua
      //dimy = 300
      // 12/12/2017 - Filippo - gestisco ignifugazione
      //dimy = 315
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
   Frame Misure
   {
      Caption = MSG(816)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 160
         //dimy = 80
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza
        Enable  = $DLG_freestanding

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        //Enable  = $DLG_freestanding
        Enable  = $DLG_ena_altezza

        Placement
        {
           posx = 65
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita
        Enable  = $DLG_freestanding

        Placement
        {
           posx = 65
           posy = 70
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(624)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(626)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
         //posy = 10
         //10.07.2017 - Filippo - nuove testiere letto fluttua
         //posy = 90
         posy = 110
         //dimx = 150
         dimx = 160
         //dimy = 135
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      // 12/12/2017 - Filippo - gestisco ignifugazione
      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 140
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=0  }
           else                         {  $DLG_value_ignifu=1  }
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 95
         posx = 100
         //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
         //posy = 160
         //10.07.2017 - Filippo - nuove testiere letto fluttua
         //posy = 240
         //posy = 250
         posy = 290
         dimx = 70
         //dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
         //posy = 160
         //10.07.2017 - Filippo - nuove testiere letto fluttua
         //posy = 240
         //posy = 250
         posy = 290
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
         //posy = 115
         //posy = 195
         posy = 215
         //dimx = 130
         dimx = 140
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         //$R = CHIEDI(-1,"DLG_COLORE_LETTO")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_LETTO,"colori_tutti.txt")
         //$DLG_VAL_COLORE = $DLG_COLORE_LETTO
         GOSUB Get_Image_Rivestimenti
         //*******************************************************************************
         // 12/12/2017 - Filippo - gestisco ignifugazione
         //*******************************************************************************
         $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
         $DLG_enable_ignifu = 1
         if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
         {
            $DLG_enable_ignifu = 0
            $DLG_value_ignifu = 0
         }
         //*******************************************************************************
      ]
   }

   //12.06.2017 - Filippo - gestione testata Fluttua Free Standing
   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)
      Enable = $DLG_freestanding

      Placement
      {
         posx = 145
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(428)
      //Enable  = $DLG_freestanding
      Enable  = $DLG_ena_altezza

      Placement
      {
         posx = 145
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        if($DLG_VAR_Revisione < 1)
        {
            VAR_SET_MENU(-1,"DLG_altezza","AltTestFlu ( 0-700 )")
        }
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)

        //10.07.2017 - Filippo - nuove testiere letto fluttua
        //13.09.2017 - Filippo - aggiungo esclusione quando nuova rev.
        if($DLG_VAR_Revisione < 1)
        {
           if($DLG_altezza >= 750)
           {
              if($DLG_profondita == 60)
              {
                 $DLG_profondita = 80
              }
           }
           else
           {
              if($DLG_profondita != 60)
              {
                 $DLG_profondita = 60
              }
           }
        }
        else
        {
            if($DLG_profondita == 60)
            {
               $DLG_profondita = 80
            }
        }
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)

      ]
   }

   //10.07.2017 - Filippo - nuove testiere letto fluttua
   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(430)
      Enable = $DLG_ena_profondita

      Placement
      {
         posx = 145
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

Dlg LettoAIR_Test08
{
   Caption = MSG(845)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 495
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoTestiera
   {
      Caption = MSG(804)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 90
      }

      Radio Testiera_Laccata
      {
        Caption = MSG(894)
        Hint    = MSG(894)
        Enable  = 1
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio Testiera_Rivestita
      {
        Caption = MSG(895)
        Hint    = MSG(895)
        Enable  = 1
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_descrizione_ST
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx =  35
            posy =  35
            dimx =  74
            dimy =  74
         }
      }
   }

   Frame FinituraTessuto
   {
      Caption = MSG(467)

      Placement
      {
         posx = 325
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_RV
         Value   = $DLG_descrizione_RV
         Hint    = $DLG_descrizione_RV

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_RV
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_RV

         Placement
         {
            posx =  35
            posy =  35
            dimx =  74
            dimy =  74
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 165
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 165
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_rd_uso_1

      Placement
      {
         posx = 175
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_ST = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraTessuto
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_rd_uso_2

      Placement
      {
         posx = 335
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_RV = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

Dlg Test_FreeStanding
{
   Caption = MSG(846)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 335
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         //posx = 10
         //posy = 10
         posx = 170
         posy = 145
         dimx = 150
         dimy = 75
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

//MD      Edit EdtAltezza
//MD      {
//MD        Caption = $DLG_caption_altezza_368
//MD        Hint    = $DLG_hint_altezza_368
//MD        Enable  = $DLG_enable_alt_368
//MD        Value   = $DLG_value_altezza_368
//MD
//MD        Placement
//MD        {
//MD           posx = 70
//MD           posy = 45
//MD           dimx = 50
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD        ]
//MD
//MD      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura1
   {
      Caption = MSG(855)

      Placement
      {
         //posx = 165
         posx = 10
         posy = 10
         dimx = 150
         dimy = 210
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           GOSUB Get_Image_368_SPE_L

           if( STRCMP($DLG_COLORE_368_SPE_L,"ARG")!=0 )
           {
              $DLG_COLORE_368_SPE_O = $DLG_COLORE_368_SPE_L
           }

           GOSUB Ass_Frame2_Specc368
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O
           $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O

           $DLG_enable_rd_opaco_368 = 1
           $DLG_enable_frame1 = 0

           GOSUB Get_Image_368_SPE_O
        ]

      }
   }

   Frame Finitura2
   {
      Caption = MSG(858)
      Enable  = $DLG_enable_frame1

      Placement
      {
         //posx = 320
         posx = 170
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 255
         posy = 230
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 170
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(859)

      Placement
      {
         //posx = 135
         posx = 295
         //posy = 35
         posy = 165
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI(-1,"DLG_larg_FreeSt")
          $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larg_FreeSt))
          $DLG_caption_larghezza_368 = STR($DLG_larg_FreeSt)
          $DLG_value_larghezza_368   = STR($DLG_larg_FreeSt)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_SPE_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_O,"colori_tutti.txt")
            GOSUB Get_Image_368_SPE_O
            $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O
            $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O

            $DLG_image_file1      = $DLG_image_file
            $DLG_descrizione_var1 = $DLG_descrizione_var

            $DLG_enable_rd_opaco_368 = 1
            $DLG_enable_frame1 = 0

         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_SPE_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_L,"colori_tutti.txt")
            GOSUB Get_Image_368_SPE_L

            if( STRCMP($DLG_COLORE_368_SPE_L,"ARG")!=0 )
            {
               $DLG_COLORE_368_SPE_O = $DLG_COLORE_368_SPE_L
            }

            GOSUB Ass_Frame2_Specc368
         }
      ]
   }
   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(35)
      Enable = $DLG_enable_frame1

      Placement
      {
         //posx = 330
         posx = 180
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368")

         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")

         $DLG_image_file1   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
         $DLG_image_file1   = SUBST_LABEL($DLG_image_file1)
      ]
   }
}

Dlg Letto_Rinforzo
{
   Caption = MSG(860)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_OPACO")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_OPACO,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_OPACO
         GOSUB Get_Image_Opaco
      ]
   }
}

Dlg Letto_Coordinato
{
   Caption = MSG(861)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_COORDINATO")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_COORDINATO,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_COORDINATO
         GOSUB Get_Image_Rivestimenti
      ]
   }
}

Dlg 36e8_Cont_Oriz
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(91)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        // Fabrizio 06/05/08 - in Lago
        if( STRCMP($DLG_altezza_368,"184")==0 )
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L2.txt")

           if( ATOI($DLG_larghezza_368)>1840 )
           {
              $DLG_value_larghezza_368 = "1840"
              $DLG_larghezza_368 = "1840"
           }

        }
        else
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L.txt")
        }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

Dlg 36e8_Cont_Oriz_NEW12
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 490
      //dimx = 635
      dimx = 775
      //dimy = 350
//      dimy = 415
      dimy = 437
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         //dimy = 100
         dimy = 130
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
//        Enable  = 1
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      //Massimiliano 20/07/2018  - aggiunta opzione apertura anche per contenitore oriz.
      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        // 12/12/2018 - Emanuele - Correggo la variabile utilizzato per l'enable
//        Enable  = $DLG_enable_ape_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 100
           posy = 95
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        // 03/06/2019 - Emanuele - Modifico l'assegnazione per gestire l'enable nei pcf
//        Enable  = 1
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }

      //Massimiliano 20/07/2018  - aggiunta opzione apertura anche per contenitore oriz.
      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 100
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         //posy = 110
         posy = 140
         //dimx = 150
         dimx = 200
//         dimy = 145
         dimy = 167
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(91)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 23
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 45
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 67
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 89
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 111
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 133
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 1
        ]
      }

   }
   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         //posy = 250
//         posy = 285
         posy = 307
         //dimx = 305
         dimx = 200
         //dimy = 70
         dimy = 85
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        //Enable  = $DLG_enable_led
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 20
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }

     Check LedRetro
     {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

     Check PushPull
     {
        Caption = MSG(179)
        Value   = $DLG_pushpull
        Enable  = $DLG_enable_push

        Placement
        {
           //posx = 160
           posx = 10
           //posy = 20
           posy = 60
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_pushpull = 1
        ]
     }

   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 235
//         dimy = 275
//         dimy = 295
         dimy = 315
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  40
            posx =  80
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 10/05/2019 - Emanuele - Modifico la condizione per la gestione del metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 10/05/2019 - Emanuele - Aggiungo variabili per metalizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 10/05/2019 - Emanuele - Modifico la condizione per la gestione del metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 10/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 10/05/2019 - Emanuele - Aggiungo variabile per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 10/05/2019 - Emanuele - Aggiungo variabile per la gestione del metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }
      // 10/05/2019 - Emanuele - Aggiungo radiobutton per la gestione delle finiture metallizzate
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 230
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_laccato == 1 | $DLG_value_lucido==1 | $DLG_value_opaco==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 10/05/2019 - Emanuele - Aggiungo variabile per la gestione del metallizzato
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 250
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_laccato == 1 | $DLG_value_lucido==1 | $DLG_value_opaco==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 10/05/2019 - Emanuele - Aggiungo variabile per la gestione del metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 190
//           posy = 230
//           posy = 250
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 10/05/2019 - Emanuele - Modifico la condizione per la gestione dei metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 10/05/2019 - Emanuele - Aggiungo variabile per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1
//        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 210
//           posy = 250
//           posy = 270
           posy = 290
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            // 10/05/2019 - Emanuele - Modifico la condizione per gestione del metallizzato
//            | $DLG_value_opaco_xglass == 1)
            | $DLG_value_opaco_xglass == 1
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 10/05/2019 - Emanuele - Aggiungo variabile per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 150
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 150
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 410
         posx = 300
         //posy = 205
//         posy = 295
//         posy = 315
         posy = 335
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 325
         posx = 215
         //posy = 205
//         posy = 295
//         posy = 315
         posy = 335
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      // 24/04/2019 - Emanuele - Aggiungo enable per i preconfigurati
      Enable = $DLG_enable_lar_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        if(ATOI($DLG_larghezza_368)>736)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_profondita_368)==406)  { $DLG_enable_rd_uso_5 = 1 }
        }

        // Eugenio 31.03.15 Gestisco pure le basi P=560
        if(ATOI($DLG_profondita_368)>406)
        {
           if ($DLG_tipo_anta_368==0 | $DLG_tipo_anta_368==1 | $DLG_tipo_anta_368==2 | $DLG_tipo_anta_368==3)
           {
              if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
              else                                 {  $DLG_enable_push = 1  }
           }
        }
        else
        {
           if ($DLG_tipo_anta_368==3 | $DLG_tipo_anta_368==4)
           {
              if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
              else                                 {  $DLG_enable_push = 1  }
           }
        }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG

      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 170
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        // Fabrizio 06/05/08 - in Lago
        if( STRCMP($DLG_altezza_368,"184")==0 )
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L2.txt")

           if( ATOI($DLG_larghezza_368)>1840 )
           {
              $DLG_value_larghezza_368 = "1840"
              $DLG_larghezza_368 = "1840"
           }

        }
        else
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L.txt")
        }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG

      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
        if(ATOI($DLG_profondita_368)!=406)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_larghezza_368)<=736)   { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }

   //Massimiliano 20/07/2018  - aggiunta opzione in dialog per apertura
   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_apertura_368

      Placement
      {
         //posx = 135
         posx = 170
         //posy = 80
         posy = 105
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // 12/12/2018 - Emanuele - Commento perch utilizzo direttamente la GEST
//         $R = CHIEDI(-1,"DLG_apertura_368")
         $R = CHIEDI($DLG_idx_to_call,"GEST_A1")
         //$DLG_value_apertura_368   = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_apertura_368"),"apertura368_2.txt")
         // 12/12/2018 - Emanuele - Aggiungo assegnazione per aggiornare la descrizione
         $DLG_value_apertura_368  = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,"GEST_A1")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
         $DLG_caption_apertura_368 = $DLG_value_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 270
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        //else
        //{
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           //else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        //}

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 10/05/2019 - Emanuele - Aggiungo condizione per la gestione delle finiture metallizzate
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_METAL
            $DLG_COLORE_368   = $DLG_COLORE_METAL
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if($DLG_value_opaco_metal==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
         }

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           // 10/05/2019 - Emanuele - Modifico la condizione per la gestione del metallizzato
//           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1 & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc

// FT 12/04/18 - gestito in "EccezioniSave"
//TEMP--            // FT 06/04/18  per ex-pcf
//TEMP--           if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }

        }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         //posx = 330
         posx = 460
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
         $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         //GOSUB Get_Image_368_O
         $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 22/05/2019 - Emanuele - Aggiungo condizioni per metallizzato e xglass
                  if(IF_XGLASS($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                  }
                  if(IF_METAL($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                  }
                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }

// FT 12/04/18 - gestito in "EccezioniSave"
//TEMP--          // FT 06/04/18  per ex-pcf
//TEMP--         if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 485
         posx = 615
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")
        //Massimiliano 31/05/17 - imposto il valore della GEST_DI del divisorio/ripiano come quello della schiena
        COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),APICI()))

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }

}
//Massimiliano 19/02/15 - nuova dialog per cont 36e8 Desk
Dlg 36e8_Cont_Desk
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 490
      dimx = 635
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 70
         dimx = 150
         dimy = 100
     }

     //Check Trasformatore
     //{
     //   Caption = MSG(169)
     //   Value   = $DLG_trasformatore
     //
     //   Placement
     //   {
     //      posx = 10
     //      posy = 20
     //      dimx = 140
     //      dimy = 20
     //   }
     //
     //   OnClick
     //   [
     //       $DLG_trasformatore = 1
     //   ]
     //}

     //Massimiliano
     //Check Trasformatore
     //{
     //   Caption = MSG(169)
     //   Value   = $DLG_trasformatore
     //
     //   Placement
     //   {
     //      posx = 10
     //      posy = 20
     //      dimx = 140
     //      dimy = 20
     //   }
     //
     //   OnClick
     //   [
     //       $DLG_trasformatore = 1
     //   ]
     //}

     //Massimiliano 24/01/17 - abilito opzione UK
     Check UK
     {
        Caption = MSG(3102)
        Value   = $DLG_uk

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_uk = 1
        ]
     }

     Check attivaLed
     {
        Caption = MSG(194)
        Value   = $DLG_attivaLed

        Placement
        {
           posx = 10
           posy = 45
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_attivaLed = 0
        ]
     }

     Check attivaPrese
     {
        Caption = MSG(195)
        Value   = $DLG_attivaPresa

        Placement
        {
           posx = 10
           posy = 70
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_attivaPresa = 0
        ]
     }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_laccato==1)
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 410
         posy = 205
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 325
         posy = 205
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
        //if(ATOI($DLG_profondita_368)!=406)
        //{
        //   if($DLG_value_rd_uso_5 == 1)
        //   {
        //      $DLG_value_rd_uso_3 = 1
        //      $DLG_value_rd_uso_5 = 0
        //   }
        //   $DLG_enable_rd_uso_5 = 0
        //}
        //else
        //{
        //   if(ATOI($DLG_larghezza_368)<=736)   { $DLG_enable_rd_uso_5 = 1 }
        //}
      ]
   }


   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_laccato == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }
        else
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_W")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368_W
           $DLG_COLORE_368 = $DLG_COLORE_368_W
           GOSUB Get_Image_368
        }
        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo condizioni per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 485
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}
//Massimiliano 19/02/15 - nuova dialog per cont 36e8 Desk
Dlg 36e8_Cont_Desk_Side
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      dimx = 790
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 70
         dimx = 150
         dimy = 100
     }

     //Check Trasformatore
     //{
     //   Caption = MSG(169)
     //   Value   = $DLG_trasformatore
     //
     //   Placement
     //   {
     //      posx = 10
     //      posy = 20
     //      dimx = 140
     //      dimy = 20
     //   }
     //
     //   OnClick
     //   [
     //       $DLG_trasformatore = 1
     //   ]
     //}

     //Massimiliano 24/01/17 - abilito opzione UK
     Check UK
     {
        Caption = MSG(3102)
        Value   = $DLG_uk

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_uk = 1
        ]
     }

     Check attivaLed
     {
        Caption = MSG(194)
        Value   = $DLG_attivaLed

        Placement
        {
           posx = 10
           posy = 45
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_attivaLed = 0
        ]
     }

     Check attivaPrese
     {
        Caption = MSG(195)
        Value   = $DLG_attivaPresa

        Placement
        {
           posx = 10
           posy = 70
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_attivaPresa = 0
        ]
     }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_laccato==1)
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
        ]
      }
   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }


   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 630
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 560
         posy = 205
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 475
         posy = 205
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
        if(ATOI($DLG_profondita_368)!=406)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_larghezza_368)<=736)   { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }


   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_laccato == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }
        else
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_W")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368_W
           $DLG_COLORE_368 = $DLG_COLORE_368_W
           GOSUB Get_Image_368
        }
        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 485
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo condizioni per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 640
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

// Massimiliano 31/03/14 - nuova dlg per 36e8 Side
Dlg 36e8_Cont_Oriz_NEW14_Side
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      //dimx = 790
      dimx = 930
      //dimy = 350
//      dimy = 415
      dimy = 437
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         //dimy = 100
         dimy = 130
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
//        Enable  = 1
        // 26/07/2019 - Emanuele - Uso una variabile per l'enable cos da poter bloccare l'opzione nei pcf
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      //Massimiliano 20/07/2018  - aggiunta opzione apertura anche per contenitore oriz.
      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        // 12/12/2018 - Emanuele - Cambio la variabile utilizzara per l'enable dell'apertura
//        Enable  = $DLG_enable_ape_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 100
           posy = 95
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
//        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }

      //Massimiliano 20/07/2018  - aggiunta opzione apertura anche per contenitore oriz.
      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 100
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         //posy = 110
         posy = 140
         //dimx = 150
         dimx = 200
//         dimy = 145
         dimy = 167
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(91)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 23
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 45
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 67
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 89
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 111
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 133
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 1
        ]
      }
   }
   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         //posy = 250
//         posy = 285
         posy = 307
         //dimx = 305
         dimx = 200
         //dimy = 70
         dimy = 85
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        //Enable  = $DLG_enable_led
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 20
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_trasformatore = 1
        ]
     }

     Check LedRetro
     {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

     Check PushPull
     {
        Caption = MSG(179)
        Value   = $DLG_pushpull
        Enable  = $DLG_enable_push

        Placement
        {
           //posx = 160
           posx = 10
           //posy = 20
           posy = 60
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_pushpull = 1
        ]
     }


   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 235
//         dimy = 275
         dimy = 315
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  40
            posx =  80
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per i metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1 )
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per i metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 250
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 190
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per i metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1
//        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 210
//           posy = 250
           posy = 290
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 14/05/2019 - Emanuele - Aggiungo condizioni per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }
   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 630
         posx = 760
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 560
         //posx = 450
         posx = 300
         //posy = 205
//         posy = 295
         posy = 335
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 475
         //posx = 365
         posx = 215
         //posy = 205
//         posy = 295
         posy = 335
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      // 24/04/2019 - Emanuele - Aggiungo enable per i preconfigurati
//      Enable = $DLG_enable_lar_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        if(ATOI($DLG_larghezza_368)>736)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_profondita_368)==406)  { $DLG_enable_rd_uso_5 = 1 }
        }

        //if ($DLG_tipo_anta_368==3 | $DLG_tipo_anta_368==4)
        //{
        //   if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
        //   else                                 {  $DLG_enable_push = 1  }
        //}
        //Massimiliano 06/09/2018  - riporto codice del contenitore normale non riportato nella versione side
        // Eugenio 31.03.15 Gestisco pure le basi P=560
        if(ATOI($DLG_profondita_368)>406)
        {
           if ($DLG_tipo_anta_368==0 | $DLG_tipo_anta_368==1 | $DLG_tipo_anta_368==2 | $DLG_tipo_anta_368==3)
           {
              if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
              else                                 {  $DLG_enable_push = 1  }
           }
        }
        else
        {
           if ($DLG_tipo_anta_368==3 | $DLG_tipo_anta_368==4)
           {
              if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
              else                                 {  $DLG_enable_push = 1  }
           }
        }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 170
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        // Fabrizio 06/05/08 - in Lago
        if( STRCMP($DLG_altezza_368,"184")==0 )
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L2.txt")

           if( ATOI($DLG_larghezza_368)>1840 )
           {
              $DLG_value_larghezza_368 = "1840"
              $DLG_larghezza_368 = "1840"
           }

        }
        else
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L.txt")
        }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
        if(ATOI($DLG_profondita_368)!=406)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_larghezza_368)<=736)   { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }

   //Massimiliano 20/07/2018  - aggiunta opzione in dialog per apertura
   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_apertura_368

      Placement
      {
         //posx = 135
         posx = 170
         //posy = 80
         posy = 105
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // 12/12/2018 - Emanuele - Invece di richiamare una variabile d'appoggio utilizzo direttamente la gest
//         $R = CHIEDI(-1,"DLG_apertura_368")
         $R = CHIEDI($DLG_idx_to_call,"GEST_A1")
         //$DLG_value_apertura_368   = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_apertura_368"),"apertura368_2.txt")
         // 12/12/2018 - Emanuele - Aggiungo assegnazione per aggiornare la descrizione
         $DLG_value_apertura_368  = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,"GEST_A1")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
         $DLG_caption_apertura_368 = $DLG_value_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 270
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        //else
        //{
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           //else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        //}

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 14/05/2019 - Emanuele - Aggiungo condizione per i metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GOSUB Get_Image_368_L }
           else                           { GOSUB Get_Image_368 }
        }

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 15/05/2019 - Emanuele - Aggiungo condizione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            // 11/09/2019 - Emanuele - Commento l'abilitazione della schiena perch  possibile cambiare la finitura
            // anche in casi non fattibili
         //   $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 485
         posx = 615
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
         $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         //GOSUB Get_Image_368_O
         $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 15/05/2019 - Emanuele - Modifico controllo per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 640
         posx = 770
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")
        //Massimiliano 31/05/17 - imposto il valore della GEST_DI del divisorio/ripiano come quello della schiena
        COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),APICI()))

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Cont_Oriz_NEW
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 100
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(91)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 75
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        // Fabrizio 06/05/08 - in Lago
        if( STRCMP($DLG_altezza_368,"184")==0 )
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L2.txt")

           if( ATOI($DLG_larghezza_368)>1840 )
           {
              $DLG_value_larghezza_368 = "1840"
              $DLG_larghezza_368 = "1840"
           }

        }
        else
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L.txt")
        }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

Dlg 36e8_Cont_Oriz_Gio_NEW
{
   Caption = MSG(151)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 330
      dimx = 485
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 130
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(91)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 75
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 95
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =   20
            posy =   35
            dimx =  110
            dimy =  110
         }
      }

   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 250
         dimx = 150
         dimy = 70
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }

     Check LedRetro
     {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        if(ATOI($DLG_larghezza_368)>736)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_profondita_368)==406)  { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        // Fabrizio 06/05/08 - in Lago
        if( STRCMP($DLG_altezza_368,"184")==0 )
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L2G.txt")

           if( ATOI($DLG_larghezza_368)>1840 )
           {
              $DLG_value_larghezza_368 = "1840"
              $DLG_larghezza_368 = "1840"
           }

        }
        else
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368LG.txt")
        }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
        if(ATOI($DLG_profondita_368)!=406)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_larghezza_368)<=736)   { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 160
         dimx = 120
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 15/05/17 - per semplicit di gestione cambio variante per unificare
        //                        a quella della scocca del contenitore con anta
        //$R = CHIEDI(-1,"DLG_COLORE_368")
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //GOSUB Get_Image_368
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file   = SUBST_LABEL($DLG_image_file)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_var
            $DLG_image_file_sch   = $DLG_image_file
         }

         //Massimiliano 09/04/2018  - estendo modifica Fabrizio
        // FT 06/04/18  per ex-pcf
        if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }

      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Cont_Oriz_Gio_NEW_Side
{
   Caption = MSG(151)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 500
      dimx = 640
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 130
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(91)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 75
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 95
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =   20
            posy =   35
            dimx =  110
            dimy =  110
         }
      }

   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 250
         dimx = 150
         dimy = 70
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }

     Check LedRetro
     {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        if(ATOI($DLG_larghezza_368)>736)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_profondita_368)==406)  { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        // Fabrizio 06/05/08 - in Lago
        if( STRCMP($DLG_altezza_368,"184")==0 )
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368L2G.txt")

           if( ATOI($DLG_larghezza_368)>1840 )
           {
              $DLG_value_larghezza_368 = "1840"
              $DLG_larghezza_368 = "1840"
           }

        }
        else
        {
           VAR_SET_MENU(-1,"DLG_larghezza_368","larghezza368LG.txt")
        }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
        if(ATOI($DLG_profondita_368)!=406)
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else
        {
           if(ATOI($DLG_larghezza_368)<=736)   { $DLG_enable_rd_uso_5 = 1 }
        }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 160
         dimx = 120
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 15/05/17 - per semplicit di gestione cambio variante per unificare
        //                        a quella della scocca del contenitore con anta
        //$R = CHIEDI(-1,"DLG_COLORE_368")
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //GOSUB Get_Image_368
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file   = SUBST_LABEL($DLG_image_file)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_var
            $DLG_image_file_sch   = $DLG_image_file
         }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            // 11/09/2019 - Emanuele - Commento perch si pu cambiare la schiena anche in casi non fattibili
//            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 490
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Cont_Vert
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 110
      }

      Edit EdtAltezza
      {
        //sempre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_lbl_prof_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_lbl_prof_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(106)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable = $DLG_enable_btn_prof_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Enable  = $DLG_enable_apertura_368
      Hint = MSG(107)

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

Dlg 36e8_Cont_Vert_NEW
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 490
      //dimx = 635
      dimx = 775
      //dimy = 350
//      dimy = 365
      dimy = 405
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         dimy = 110
      }

      Edit EdtAltezza
      {
        //sempre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        // 03/06/2019 - Emanuele - Modifico assegnazione per gestire gli enable nei pcf
//        Enable  = 1
         // 01/07/2019 - Emanuele - Modifico variabile perch non  quella corretta
//        Enable  = $DLG_enable_lar_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_lbl_prof_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        // 03/06/2019 - Emanuele - Modifico assegnazione per gestire gli enable nei pcf
//        Enable  = 1
        // 01/07/2019 - Emanuele - Modifico variabile perch non  quella corretta
//        Enable  = $DLG_enable_lar_368
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_lbl_prof_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         //posy = 115
         posy = 125
         //dimx = 150
         dimx = 200
//         dimy = 100
         dimy = 120
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(106)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 75
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_Omega = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 95
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 1
        ]
      }
   }
   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
      Caption = MSG(168)

      Placement
      {
         posx = 10
         //posy = 250
//         posy = 230
         posy = 250
         //dimx = 305
         dimx = 200
         //dimy = 70
         dimy = 90
      }

       Check LedRetro
       {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           //dimx = 140
           dimx = 190
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

      Check Trasformatore
      {
         Caption = MSG(169)
         Value   = $DLG_trasformatore
         //Enable  = $DLG_enable_led
         Enable  = 0

         Placement
         {
            posx = 10
            posy = 20
            //dimx = 140
            dimx = 190
            dimy = 20
         }

         OnClick
         [
            $DLG_trasformatore = 1
         ]
      }

     Check PushPull
     {
        Caption = MSG(179)
        Value   = $DLG_pushpull
        Enable  = $DLG_enable_pp

        Placement
        {
           //posx = 160
           posx = 10
           //posy = 20
           posy = 60
           //dimx = 140
           dimx = 190
           dimy = 20
        }

        OnClick
        [
            $DLG_pushpull = 1
        ]
     }

      // Eugenio 23.01.15 Creati i contenitori differenziati
      //Check chkAntaDoppia
      //{
      //   Caption = MSG(165)
      //   Hint    = MSG(165)
      //   Enable = $DLG_enable_rd_uso_6
      //   Value = $DLG_value_rd_uso_6
      //
      //   Placement
      //   {
      //      posx = 160
      //      posy = 40
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      if($DLG_value_rd_uso_6==1)
      //      {
      //         $DLG_value_rd_uso_6=1
      //         $DLG_enable_rd_ww_368=1
      //      }
      //      else
      //      {
      //         $DLG_value_rd_uso_6=0
      //         $DLG_enable_rd_ww_368=0
      //         if($DLG_value_ww==1)
      //         {
      //            $DLG_value_ww = 0
      //            $DLG_enable_rd_ww_368 = 0
      //            $DLG_value_laccato = 1
      //         }
      //      }
      //      // Massimiliano 24/09/14 - faccio diventare non editabile opzione pushpull quando non  a 2 ante
      //      if( $DLG_value_rd_uso_6 == 1 )  {  $DLG_enable_pp = 1  }
      //      else                            {  $DLG_enable_pp = 0  }
      //   ]
      //}
   }

   //Frame AntaDoppia
   //{
   //   //Caption = MSG(87)
   //
   //   Placement
   //   {
   //      posx = 10
   //      posy = 220
   //      dimx = 150
   //      dimy = 30
   //   }
   //
   //   Check chkAntaDoppia
   //   {
   //      Caption = MSG(165)
   //      Hint    = MSG(165)
   //      Enable = $DLG_enable_rd_uso_6
   //      Value = $DLG_value_rd_uso_6
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 7
   //         dimx = 120
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         if($DLG_value_rd_uso_6==1)
   //         {
   //            $DLG_value_rd_uso_6=1
   //            $DLG_enable_rd_ww_368=1
   //         }
   //         else
   //         {
   //            $DLG_value_rd_uso_6=0
   //            $DLG_enable_rd_ww_368=0
   //            if($DLG_value_ww==1)
   //            {
   //               $DLG_value_ww = 0
   //               $DLG_enable_rd_ww_368 = 0
   //               $DLG_value_laccato = 1
   //            }
   //         }
   //      ]
   //   }
   //}

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 240
//         dimy = 275
         dimy = 315
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  35
            posx =  80
            posy =  38
            dimx =  80
            dimy =  80
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 155
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per i metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }
      // 14/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 250
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 195
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per i metallizzati
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 215
//           posy = 250
           posy = 290
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 14/05/2019 - Emanuele - Aggiungo condizione per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  35
            posy =  38
            dimx =  80
            dimy =  80
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 410
         posx = 300
         //posy = 220
//         posy = 290
         posy = 330
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 325
         posx = 215
         //posy = 220
//         posy = 290
         posy = 330
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      // 03/06/2019 - Emanuele - Aggiungo enable per gestirlo nei pcf
      Enable = $DLG_enable_alt_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
        if(STRCMP($DLG_altezza_368,"2208")==0)  { $DLG_enable_rd_uso_6 = 0 }
        else                                    { $DLG_enable_rd_uso_6 = 1 }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable = $DLG_enable_btn_prof_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Enable  = $DLG_enable_apertura_368
      Hint = MSG(107)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 270
         //posy = 140
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        //else
        //{
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           //else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        //}

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 14/05/2019 - Emanuele - Aggiungo controllo per i metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GOSUB Get_Image_368_L }
           else                           { GOSUB Get_Image_368 }
        }

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 14/05/2019 - Emanuele - Aggiungo esclusione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))

           //Massimiliano 09/04/2018  - estendo modifica Fabrizio
           // FT 06/04/18  per ex-pcf
           if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }

           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         //posy = 140
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }

         //Massimiliano 09/04/2018  - estendo modifica Fabrizio
         // FT 06/04/18  per ex-pcf
         if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 485
         posx = 615
         //posy = 140
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }

}

Dlg 36e8_Cont_Vert_NEW_Side
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      //dimx = 790
      dimx = 930
      //dimy = 350
//      dimy = 360
      dimy = 400
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         dimy = 110
         //dimy = 130
      }

      Edit EdtAltezza
      {
        //sempre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_lbl_prof_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_lbl_prof_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         //posy = 115
         posy = 125
         //dimx = 150
         dimx = 200
//         dimy = 100
         dimy = 120
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(106)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 75
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_Omega = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 95
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 1
        ]
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
      Caption = MSG(168)

      Placement
      {
         posx = 10
         //posy = 250
//         posy = 230
         posy = 250
         //dimx = 305
         dimx = 200
         //dimy = 70
         dimy = 90
      }

       Check LedRetro
       {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        //Enable  = $DLG_enable_led
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 40
           //dimx = 140
           dimx = 190
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

      Check Trasformatore
      {
         Caption = MSG(169)
         Value   = $DLG_trasformatore
         Enable  = $DLG_enable_led

         Placement
         {
            posx = 10
            posy = 20
            //dimx = 140
            dimx = 190
            dimy = 20
         }

         OnClick
         [
            $DLG_trasformatore = 1
         ]
      }

      Check PushPull
      {
        Caption = MSG(179)
        Value   = $DLG_pushpull
        Enable  = $DLG_enable_pp

        Placement
        {
           //posx = 160
           posx = 10
           //posy = 20
           posy = 60
           //dimx = 140
           dimx = 190
           dimy = 20
        }

        OnClick
        [
            $DLG_pushpull = 1
        ]
      }

      // Eugenio 23.01.15 Creati i contenitori differenziati
      //Check chkAntaDoppia
      //{
      //   Caption = MSG(165)
      //   Hint    = MSG(165)
      //   Enable = $DLG_enable_rd_uso_6
      //   Value = $DLG_value_rd_uso_6
      //
      //   Placement
      //   {
      //      posx = 160
      //      posy = 40
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      if($DLG_value_rd_uso_6==1)
      //      {
      //         $DLG_value_rd_uso_6=1
      //         $DLG_enable_rd_ww_368=1
      //      }
      //      else
      //      {
      //         $DLG_value_rd_uso_6=0
      //         $DLG_enable_rd_ww_368=0
      //         if($DLG_value_ww==1)
      //         {
      //            $DLG_value_ww = 0
      //            $DLG_enable_rd_ww_368 = 0
      //            $DLG_value_laccato = 1
      //         }
      //      }
      //      // Massimiliano 24/09/14 - faccio diventare non editabile opzione pushpull quando non  a 2 ante
      //      if( $DLG_value_rd_uso_6 == 1 )  {  $DLG_enable_pp = 1  }
      //      else                            {  $DLG_enable_pp = 0  }
      //   ]
      //}
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 240
//         dimy = 275
         dimy = 315
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  35
            posx =  80
            posy =  38
            dimx =  80
            dimy =  80
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 155
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per i metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }
      // 14/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 250
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 195
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 14/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 215
//           posy = 250
           posy = 290
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 14/05/2019 - Emanuele - Aggiungo condizioni per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 14/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]
      }

   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  35
            posy =  38
            dimx =  80
            dimy =  80
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 630
         posx = 760
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 560
         posx = 300
         //posy = 220
//         posy = 290
//         posy = 310
         posy = 330
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 475
         posx = 215
         //posy = 220
//         posy = 290
//         posy = 310
         posy = 330
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
        if(STRCMP($DLG_altezza_368,"2208")==0)  { $DLG_enable_rd_uso_6 = 0 }
        else                                    { $DLG_enable_rd_uso_6 = 1 }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable = $DLG_enable_btn_prof_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Enable  = $DLG_enable_apertura_368
      Hint = MSG(107)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 270
         //posy = 140
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        //else
        //{
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           //else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        //}

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 14/05/2019 - Emanuele - Aggiungo condizione per metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GOSUB Get_Image_368_L }
           else                           { GOSUB Get_Image_368 }
        }

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 14/05/2019 - Emanuele - Aggiungo condizione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         //posy = 130
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            // 11/09/2019 - Emanuele - Commento l'abilitazione della schiena perch si pu cambiare finitura anche
            // in casi non fattibili
//            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 485
         posx = 615
         //posy = 140
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
         $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         //GOSUB Get_Image_368_O
         $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico condizioni per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 640
         posx = 770
         //posy = 130
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Cont_Weight
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 490
//      dimx = 635
      dimx = 700
//      dimy = 270
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 110
      }

      Edit EdtAltezza
      {
        //sempre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         posx = 165
         posy = 10
//         dimx = 150
         dimx = 200
//         dimy = 225
         dimy = 265
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
//            posx = 10
            posx = 65
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
//            posx =  45
            posx =  70
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
//           dimx = 120
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           // 31/05/2019 - Emanuele - Modifico condizione per cambiare colore correttamente
//           if($DLG_value_ww == 1)
           if($DLG_value_ww == 1 | $DLG_value_laccato == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_xglass == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 31/05/2019 - Emanuele - Aggiungo assegnazioni per xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
//           dimx = 120
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           // 31/05/2019 - Emanuele - Modifico condizione per cambiare colore correttamente
//           if($DLG_value_ww == 1)
           if($DLG_value_ww == 1 | $DLG_value_laccato == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_xglass == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 31/05/2019 - Emanuele - Aggiungo assegnazioni per xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
        ]

      }

      Radio RdLucXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
        ]

      }

      Radio RdOpaXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           posx = 15
           posy = 195
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
//           posy = 175
           posy = 215
//           dimx = 120
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           // 31/05/2019 - Emanuele - Modifico condizione per cambiare colore correttamente
//           if($DLG_value_ww == 1)
           if($DLG_value_ww == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 )
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           // 31/05/2019 - Emanuele - Aggiungo assegnazioni per xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           posx = 15
//           posy = 195
           posy = 235
//           dimx = 120
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           // 31/05/2019 - Emanuele - Modifico condizione per cambiare colore correttamente
//           if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1)
           if($DLG_value_laccato == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           // 31/05/2019 - Emanuele - Aggiungo assegnazioni per xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
//         posx = 320
         posx = 370
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
//            posx = 10
            posx = 40
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
//         posx = 475
         posx = 525
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
//            posx = 10
            posx = 40
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
//         posx = 410
         posx = 460
//         posy = 200
         posy = 240
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
//         posx = 325
         posx = 375
//         posy = 200
         posy = 240
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Enable  = $DLG_enable_apertura_368
      Hint = MSG(107)

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
//         posx = 175
         posx = 205
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
//        else
//        {
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           // else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

//        }
        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           // 31/05/2019 - Emanuele - Aggiungo condizioni per xglass
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
//         posx = 335
         posx = 380
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC

        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo condizioni per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                  }
                  if(IF_METAL($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                  }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
//         posx = 485
         posx = 535
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")
        //Massimiliano 31/05/17 - imposto il valore della GEST_DI del divisorio/ripiano come quello della schiena
        COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),APICI()))

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Cont_Vert_Gio
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 330
      dimx = 485
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  85
      }

      Edit EdtAltezza
      {
        //sempre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_lbl_prof_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_lbl_prof_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx =  10
         posy = 100
         dimx = 150
         dimy =  80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(106)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 180
         dimx = 150
         dimy = 70
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }

     Check LedRetro
     {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable = $DLG_enable_btn_prof_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 15/05/17 - per semplicit di gestione cambio variante per unificare
        //                        a quella della scocca del contenitore con anta
        //$R = CHIEDI(-1,"DLG_COLORE_368")
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //GOSUB Get_Image_368
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file   = SUBST_LABEL($DLG_image_file)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Aggiungo condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_var
            $DLG_image_file_sch   = $DLG_image_file
         }

         //Massimiliano 09/04/2018  - estendo modifica Fabrizio
         // FT 06/04/18  per ex-pcf
         if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}


Dlg 36e8_Cont_Vert_Gio_Side
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 500
      dimx = 640
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  85
      }

      Edit EdtAltezza
      {
        //sempre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_lbl_prof_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_lbl_prof_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx =  10
         posy = 100
         dimx = 150
         dimy =  80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(106)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 180
         dimx = 150
         dimy = 70
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }

     Check LedRetro
     {
        Caption = MSG(177)
        Value   = $DLG_retro_led
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_retro_led = 1
        ]
     }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable = $DLG_enable_btn_prof_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 15/05/17 - per semplicit di gestione cambio variante per unificare
        //                        a quella della scocca del contenitore con anta
        //$R = CHIEDI(-1,"DLG_COLORE_368")
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //GOSUB Get_Image_368
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file   = SUBST_LABEL($DLG_image_file)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico controllo per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_var
            $DLG_image_file_sch   = $DLG_image_file
         }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 490
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}


Dlg 36e8_Cont_Gio_Bagno
{
   Caption = MSG(103)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 330
      dimx = 485
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy =  85
      }

      Edit EdtMisure
      {
        //sempre attivo
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Enable  = 1
        Value   = $DLG_value_misure

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblTipoCont
      {
        Caption = MSG(637)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(637)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx =  10
         posy = 100
         dimx = 150
         dimy =  80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(106)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnTipoCont
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_TipoCont")
        $DLG_hint_misure    = $DLG_TipoCont
        $DLG_caption_misure = $DLG_TipoCont
        $DLG_value_misure   = $DLG_TipoCont
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 15/05/17 - per semplicit di gestione cambio variante per unificare
        //                        a quella della scocca del contenitore con anta
        //$R = CHIEDI(-1,"DLG_COLORE_368")
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //GOSUB Get_Image_368
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file   = SUBST_LABEL($DLG_image_file)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_var
            $DLG_image_file_sch   = $DLG_image_file
         }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Madia
{
   Caption = MSG(109)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         // dimy = 130
         dimy = 105
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

     // Edit EdtProfondita
     // {
     //   Caption = $DLG_caption_profondita_368
     //   Hint    = $DLG_hint_profondita_368
     //   Enable  = $DLG_enable_pro_368
     //   Value   = $DLG_value_profondita_368
     //
     //   Placement
     //   {
     //      posx = 70
     //      posy = 75
     //      dimx = 50
     //      dimy = 20
     //   }
     //
     //   OnClick
     //   [
     //   ]
     //
     // }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Value   = $DLG_value_apertura_368
        Enable  = $DLG_enable_aper_368

        Placement
        {
           posx = 70
           //posy = 100
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(110)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(111)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = "Profondit madia"
      //  Enable  = $DLG_enable_pro_368
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 80
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //}

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Value   = MSG(104)
        Enable  = $DLG_enable_aper_368

        Placement
        {
           posx = 10
           //posy = 105
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 120
         dimx = 150
         dimy = 80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 190
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 210
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint =    MSG(113)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza_368")
         $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
         $DLG_caption_larghezza_368 = $DLG_larghezza_368
         $DLG_value_larghezza_368   = $DLG_larghezza_368

         if( ATOI($DLG_larghezza_368)>736 )   { $DLG_enable_aper_368 = 0  }
         else                                 { $DLG_enable_aper_368 = 1  }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(114)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = "Cambia la profondit della madia"
   //   Enable  = $DLG_enable_pro_368
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 85
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita_368")
   //     $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
   //     $DLG_caption_profondita_368 = $DLG_profondita_368
   //     $DLG_value_profondita_368   = $DLG_profondita_368
   //   ]
   //}

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(30)
      Enable  = $DLG_enable_aper_368

      Placement
      {
         posx = 135
         //posy = 110
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //rob_pec 11/11/2010 per cambio misure e menu di apertura all'interno della dialog
         if( ATOI($DLG_larghezza_368)<=736 )
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368.txt")
         }
         else
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368MadiaDoppia.txt")
         }

         $R = CHIEDI(-1,"DLG_apertura_368")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
         $DLG_caption_apertura_368 = $DLG_apertura_368
         if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-spinta" }
         if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-spinta" }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
      ]
   }
}

Dlg 36e8_Madia_NEW
{
   Caption = MSG(109)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 490
      //dimx = 635
      dimx = 775
      //dimy = 260
//      dimy = 305
      dimy = 345
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         // dimy = 130
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

     // Edit EdtProfondita
     // {
     //   Caption = $DLG_caption_profondita_368
     //   Hint    = $DLG_hint_profondita_368
     //   Enable  = $DLG_enable_pro_368
     //   Value   = $DLG_value_profondita_368
     //
     //   Placement
     //   {
     //      posx = 70
     //      posy = 75
     //      dimx = 50
     //      dimy = 20
     //   }
     //
     //   OnClick
     //   [
     //   ]
     //
     // }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Value   = $DLG_value_apertura_368
        Enable  = $DLG_enable_aper_368

        Placement
        {
           //posx = 70
           posx = 100
           //posy = 100
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(110)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(111)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = "Profondit madia"
      //  Enable  = $DLG_enable_pro_368
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 80
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //}

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Value   = MSG(104)
        Enable  = $DLG_enable_aper_368

        Placement
        {
           posx = 10
           //posy = 105
           posy = 75
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         //dimx = 150
         dimx = 200
//         dimy = 95
         dimy = 115
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 20
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 40
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 60
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_Omega = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 80
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_Omega = 1
        ]
      }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 220
//         dimy = 255
         dimy = 295
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  45
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 135
           posy = 130
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 15/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }

           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato  = 0
           $DLG_value_ww  = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 15/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 155
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 15/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }

           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato  = 0
           $DLG_value_ww  = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 15/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]
      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 15/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 15/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      // 15/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 210
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 175
//           posy = 210
           posy = 250
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 15/05/2019 - Emanuele - Modifico controllo per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }

           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato  = 1
           $DLG_value_ww  = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 15/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]
      }

      Radio Rdwildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 195
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 15/05/2019 - Emanuele - Modifico condizioni per metallizzati
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }

           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato  = 0
           $DLG_value_ww  = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 15/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 165
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            //posx =  40
            //posy =  35
            //dimx =  70
            //dimy =  70

            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 410
         posx = 540
         posy = 180
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 325
         posx = 450
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint =    MSG(113)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza_368")
         $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
         $DLG_caption_larghezza_368 = $DLG_larghezza_368
         $DLG_value_larghezza_368   = $DLG_larghezza_368

         //if( ATOI($DLG_larghezza_368)>736 ) { $DLG_enable_aper_368 = 0  }
         //else                               { $DLG_enable_aper_368 = 1  }
         //if( ATOI($DLG_larghezza_368)==736 & STRCMP(GEST_A1,"A03")==0 )  {  $DLG_enable_aper_368 = 0  }
         if( ATOI($DLG_larghezza_368)==368 )   {  $DLG_enable_rd_ww_368=1  }
         else
         {
            if ( ATOI($DLG_larghezza_368)==736 & $DLG_due_ante==1 )  {  $DLG_enable_rd_ww_368=1  }
            else                                                     {  $DLG_enable_rd_ww_368=0  }
            //Massimiliano 18/04/17 - ora si  ampliata la gamma delle madie wildwood
            // 26/11/2018 - Emanuele - Modifico la condizione perch non  corretta. Per l'altezza 736 non  possibile
            // selezionare il wildwood
//            if( ATOI($DLG_larghezza_368)>=1472 )                     {  $DLG_enable_rd_ww_368=1  }
            if( ATOI($DLG_larghezza_368)>=1472 & ATOI($DLG_altezza_368)<736) {  $DLG_enable_rd_ww_368=1  }
         }
         // 18/10/2019 - Emanuele - Aggiungo controllo per limitare alcuni casi
         if(ATOI($DLG_altezza_368)>552 & $DLG_enable_rd_ww_368==1 & ATOI($DLG_larghezza_368)>1104)
         {
            $DLG_enable_rd_ww_368 = 0
         }
         //Massimiliano 23/11/2017 - quando sono multimateriale sono accettate larghezze da 1472 in su
         if( VAR_VAL($DLG_idx_to_call,"VAR_madia_multimat")==1 )
         {
            //Massimiliano 20/09/2018  - aggiunta madia 1104x736
            //if( ATOI($DLG_larghezza_368)<1472 )
            if( ATOI($DLG_larghezza_368)<1104 )
            {
               //$DLG_larghezza_368 = STR(1472)
               $DLG_larghezza_368 = STR(1104)
            }
         }

         if($DLG_apertura_368!="A01" & $DLG_apertura_368!="A02" & $DLG_apertura_368!="AND" & $DLG_apertura_368!="ANC")
         {
            if(ATOI($DLG_larghezza_368)<=552 | (ATOI($DLG_larghezza_368)==736 & VAR_VAL($DLG_idx_to_call,"sdoppia_anta")==0))
            {
               $DLG_apertura_368 = "A01"
               $DLG_value_apertura_368 = "DX"
            }
         }
         //Massimiliano 19/05/17 - gestisco radici madia in dialog per il cambio
         GOSUB CambiaRadDlgMadia

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(114)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 170
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_altezza_368")
         $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
         $DLG_caption_altezza_368 = $DLG_altezza_368
         $DLG_value_altezza_368   = $DLG_altezza_368

         if(ATOI($DLG_altezza_368)>552 & $DLG_enable_rd_ww_368==1 & ATOI($DLG_value_larghezza_368)>1104)
         {
            $DLG_enable_rd_ww_368 = 0
         }
         if(ATOI($DLG_altezza_368)<=552 & $DLG_enable_rd_ww_368==0)
         {
            $DLG_enable_rd_ww_368 = 1
         }

         //Massimiliano 18/05/17 - quando cambio altezza deve cambiare anche la larghezza
         //Massimiliano 25/10/17 - non serve pi cambiare menu
         //if( $DLG_altezza_368 == "552" )
         //{
         //   VAR_CREATE_STR(-1,"DLG_larghezza_368",$DLG_larghezza_368,VAR_MODE($DLG_idx_to_call,"XBmp"),"larghezza368OMadia552.txt")
         //}
         //else
         //{
            VAR_CREATE_STR(-1,"DLG_larghezza_368",$DLG_larghezza_368,VAR_MODE($DLG_idx_to_call,"XBmp"),"larghezza368OMadia.txt")
         //}

         //Massimiliano 19/05/17 - gestisco radici madia in dialog per il cambio
         GOSUB CambiaRadDlgMadia

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = "Cambia la profondit della madia"
   //   Enable  = $DLG_enable_pro_368
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 85
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita_368")
   //     $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
   //     $DLG_caption_profondita_368 = $DLG_profondita_368
   //     $DLG_value_profondita_368   = $DLG_profondita_368
   //   ]
   //}

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(30)
      Enable  = $DLG_enable_aper_368

      Placement
      {
         //posx = 135
         posx = 170
         //posy = 110
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //rob_pec 11/11/2010 per cambio misure e menu di apertura all'interno della dialog

         if( ATOI($DLG_larghezza_368)<=736 )
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368.txt")
         }
         else
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368MadiaDoppia.txt")
         }
         // Massimiliano 20/03/14 - aggiunta controllo tipo ante su madia bianta 736
         if( ATOI($DLG_larghezza_368)==736 & $DLG_due_ante == 1 )
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368MadiaDoppia.txt")
         }

         $R = CHIEDI(-1,"DLG_apertura_368")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
         $DLG_caption_apertura_368 = $DLG_apertura_368

         if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-spinta" }
         if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-spinta" }

         // Massimiliano 20/03/14 - aggiunta variabili per madia bianta 736
         if(STRCMP($DLG_apertura_368,"A03")==0)  { $DLG_value_apertura_368 = "1Dx + 1Sx" }
         if(STRCMP($DLG_apertura_368,"ANS")==0)  { $DLG_value_apertura_368 = "Destra+Sinistra a Spinta" }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 265
         posy = 115
         dimx = 130
         dimy = 20
      }

      //OnClick
      //[
      //   if($DLG_value_opaco==1 | $DLG_value_laccato==1)
      //   {
      //      $R = CHIEDI(-1,"DLG_COLORE_368_O")
      //      $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
      //      GOSUB Get_Image_368_O
      //      $DLG_COLORE_368   = $DLG_COLORE_368_O
      //      $DLG_COLORE_368_L = $DLG_COLORE_368_O
      //   }
      //
      //   if($DLG_value_lucido==1)
      //   {
      //      $R = CHIEDI(-1,"DLG_COLORE_368_L")
      //      $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
      //      GOSUB Get_Image_368_L
      //      $DLG_COLORE_368   = $DLG_COLORE_368_L
      //      $DLG_COLORE_368_O = $DLG_COLORE_368_L
      //   }
      //  // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
      //  if( STRCMP($DLG_COLORE_368,"ARG")!=0)
      //  {
      //     $DLG_COLORE_368_SCC = $DLG_COLORE_368
      //     $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
      //     $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
      //     $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
      //  }
      //]

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        //else
        //{
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           //else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        //}

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 15/05/2019 - Emanuele - Aggiungo controllo per metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GOSUB Get_Image_368_L }
           else                           { GOSUB Get_Image_368 }
        }

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 15/05/2019 - Emanuele - Aggiungo controllo per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]

   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 15/05/2019 - Emanuele - Modifico controllo per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 485
         posx = 615
         //posy = 130
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

// Massimiliano 23/04/14 - nuova dlg per Madia Side
Dlg 36e8_Madia_NEW_Side
{
   Caption = MSG(109)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      //dimx = 790
      dimx = 920
      //dimy = 280
//      dimy = 305
      dimy = 345
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         // dimy = 130
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

     // Edit EdtProfondita
     // {
     //   Caption = $DLG_caption_profondita_368
     //   Hint    = $DLG_hint_profondita_368
     //   Enable  = $DLG_enable_pro_368
     //   Value   = $DLG_value_profondita_368
     //
     //   Placement
     //   {
     //      posx = 70
     //      posy = 75
     //      dimx = 50
     //      dimy = 20
     //   }
     //
     //   OnClick
     //   [
     //   ]
     //
     // }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Value   = $DLG_value_apertura_368
        Enable  = $DLG_enable_aper_368

        Placement
        {
           //posx = 70
           posx = 100
           //posy = 100
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(110)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(111)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = "Profondit madia"
      //  Enable  = $DLG_enable_pro_368
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 80
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //}

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Value   = MSG(104)
        Enable  = $DLG_enable_aper_368

        Placement
        {
           posx = 10
           //posy = 105
           posy = 75
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 115
         //dimx = 150
         dimx = 200
//         dimy = 95
         dimy = 115
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 20
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 40
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_Omega = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 60
           //dimx = 130
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_Omega = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 80
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_Omega = 1
        ]
      }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 220
//         dimy = 255
         dimy = 295
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  45
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 150
           posy = 130
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 16/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }

           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato  = 0
           $DLG_value_ww  = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 170
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 16/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }

           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato  = 0
           $DLG_value_ww  = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }
      // 16/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 210
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 190
//           posy = 210
           posy = 250
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 16/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }

           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato  = 1
           $DLG_value_ww  = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }

      Radio Rdwildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 210
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 16/05/2019 - Emanuele - Aggiungo condizioni per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }

           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato  = 0
           $DLG_value_ww  = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         //dimy = 235
         dimy = 215
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            //posx =  40
            //posy =  35
            //dimx =  70
            //dimy =  70
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           //posy = 150
           posy = 130
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           //posy = 170
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           //posy = 190
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           //posy = 210
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 630
         posx = 760
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            //posx =  40
            //posy =  35
            //dimx =  70
            //dimy =  70
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 560
         posx = 690
         //posy = 205
         posy = 195
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 475
         posx = 605
         //posy = 205
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint =    MSG(113)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza_368")
         $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
         $DLG_caption_larghezza_368 = $DLG_larghezza_368
         $DLG_value_larghezza_368   = $DLG_larghezza_368

         //if( ATOI($DLG_larghezza_368)>736 ) { $DLG_enable_aper_368 = 0  }
         //else                               { $DLG_enable_aper_368 = 1  }
         //if( ATOI($DLG_larghezza_368)==736 & STRCMP(GEST_A1,"A03")==0 )  {  $DLG_enable_aper_368 = 0  }
         if( ATOI($DLG_larghezza_368)==368 )   {  $DLG_enable_rd_ww_368=1  }
         else
         {
            if ( ATOI($DLG_larghezza_368)==736 & $DLG_due_ante==1 )  {  $DLG_enable_rd_ww_368=1  }
            else                                                     {  $DLG_enable_rd_ww_368=0  }
            //Massimiliano 18/04/17 - ora si  ampliata la gamma delle madie wildwood
            if( ATOI($DLG_larghezza_368)>=1472 )                     {  $DLG_enable_rd_ww_368=1  }
         }

         //Massimiliano 23/11/2017 - quando sono multimateriale sono accettate larghezze da 1472 in su
         if( VAR_VAL($DLG_idx_to_call,"VAR_madia_multimat")==1 )
         {
            //Massimiliano 20/09/2018  - aggiunta madia 1104x736
            //if( ATOI($DLG_larghezza_368)<1472 )
            if( ATOI($DLG_larghezza_368)<1104 )
            {
               //$DLG_larghezza_368 = STR(1472)
               $DLG_larghezza_368 = STR(1104)
            }
         }

         //Massimiliano 19/05/17 - gestisco radici madia in dialog per il cambio
         GOSUB CambiaRadDlgMadia

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(114)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 170
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368


        if(ATOI($DLG_altezza_368)>552 & $DLG_enable_rd_ww_368==1 & ATOI($DLG_larghezza_368)>1104)
        {
           $DLG_enable_rd_ww_368 = 0
        }
        if(ATOI($DLG_altezza_368)<=552 & $DLG_enable_rd_ww_368==0)
        {
           $DLG_enable_rd_ww_368 = 1
        }

         //Massimiliano 18/05/17 - quando cambio altezza deve cambiare anche la larghezza
         //Massimiliano 25/10/17 - non serve pi cambiare menu
         //if( $DLG_altezza_368 == "552" )
         //{
         //   VAR_CREATE_STR(-1,"DLG_larghezza_368",$DLG_larghezza_368,VAR_MODE($DLG_idx_to_call,"XBmp"),"larghezza368OMadia552.txt")
         //}
         //else
         //{
            VAR_CREATE_STR(-1,"DLG_larghezza_368",$DLG_larghezza_368,VAR_MODE($DLG_idx_to_call,"XBmp"),"larghezza368OMadia.txt")
         //}

         //Massimiliano 19/05/17 - gestisco radici madia in dialog per il cambio
         GOSUB CambiaRadDlgMadia

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = "Cambia la profondit della madia"
   //   Enable  = $DLG_enable_pro_368
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 85
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita_368")
   //     $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
   //     $DLG_caption_profondita_368 = $DLG_profondita_368
   //     $DLG_value_profondita_368   = $DLG_profondita_368
   //   ]
   //}

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(30)
      Enable  = $DLG_enable_aper_368

      Placement
      {
         //posx = 135
         posx = 170
         //posy = 110
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //rob_pec 11/11/2010 per cambio misure e menu di apertura all'interno della dialog

         if( ATOI($DLG_larghezza_368)<=736 )
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368.txt")
         }
         else
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368MadiaDoppia.txt")
         }
         // Massimiliano 20/03/14 - aggiunta controllo tipo ante su madia bianta 736
         if( ATOI($DLG_larghezza_368)==736 & $DLG_due_ante == 1 )
         {
            VAR_SET_MENU(-1,"DLG_apertura_368","apertura368MadiaDoppia.txt")
         }

         $R = CHIEDI(-1,"DLG_apertura_368")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
         $DLG_caption_apertura_368 = $DLG_apertura_368

         if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-spinta" }
         if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-spinta" }

         // Massimiliano 20/03/14 - aggiunta variabili per madia bianta 736
         if(STRCMP($DLG_apertura_368,"A03")==0)  { $DLG_value_apertura_368 = "1Dx + 1Sx" }
         if(STRCMP($DLG_apertura_368,"ANS")==0)  { $DLG_value_apertura_368 = "Destra+Sinistra a Spinta" }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 265
         //posy = 130
         posy = 115
         dimx = 130
         dimy = 20
      }

      //OnClick
      //[
      //   if($DLG_value_opaco==1 | $DLG_value_laccato==1)
      //   {
      //      $R = CHIEDI(-1,"DLG_COLORE_368_O")
      //      $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
      //      GOSUB Get_Image_368_O
      //      $DLG_COLORE_368   = $DLG_COLORE_368_O
      //      $DLG_COLORE_368_L = $DLG_COLORE_368_O
      //   }
      //
      //   if($DLG_value_lucido==1)
      //   {
      //      $R = CHIEDI(-1,"DLG_COLORE_368_L")
      //      $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
      //      GOSUB Get_Image_368_L
      //      $DLG_COLORE_368   = $DLG_COLORE_368_L
      //      $DLG_COLORE_368_O = $DLG_COLORE_368_L
      //   }
      //  // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
      //  if( STRCMP($DLG_COLORE_368,"ARG")!=0)
      //  {
      //     $DLG_COLORE_368_SCC = $DLG_COLORE_368
      //     $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
      //     $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
      //     $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
      //  }
      //]

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        //else
        //{
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           //else
           if( $DLG_value_ww == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        //}

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 16/05/2019 - Emanuele - Aggiungo controllo per metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GOSUB Get_Image_368_L }
           else                           { GOSUB Get_Image_368 }
        }

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 16/05/2019 - Emanuele - Aggiungo condizione per metallizzato
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]

   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         //posy = 130
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 485
         posx = 615
         //posy = 130
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
         $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo condizioni per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }

               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 640
         posx = 770
         //posy = 130
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

//Massimiliano 06/05/14 - nuova DLG per carta da parati Janelli & Volpi
Dlg PlayWall
{
   Caption = MSG(1981)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 360
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 80
      }

      Edit Edtaltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = $DLG_value_MonoC
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        //Enable  = $DLG_value_MonoC
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblaltezza
      {
        Caption = MSG(629)
        Hint    = MSG(428)
        Enable  = $DLG_value_MonoC
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        //Enable  = $DLG_value_MonoC
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmTipologia
   {
      Caption = MSG(37)

      Placement
      {
         posx = 10
         posy = 100
         dimx = 150
         dimy = 80
      }

      Radio RdMood1
      {
         Caption = MSG(1982)
         Hint    = MSG(1982)
         Value   = $DLG_value_Mood1
         Enable  = $DLG_enable_Mood1

         Placement
         {
            posx = 10
            posy = 15
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Mood  = 1
            $DLG_value_Mood1 = 1
            $DLG_value_Mood2 = 0
            $DLG_value_MonoC = 0

            $dlg_modo_var_l = VAR_MODE($idx_playwall,"XUt2")
            $dlg_menu_var_l = VAR_MENU($idx_playwall,"XUt2")
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_XUt2,$dlg_modo_var_l,$dlg_menu_var_l)
         ]
      }

      Radio RdMood2
      {
         Caption = MSG(1983)
         Hint    = MSG(1983)
         Value   = $DLG_value_Mood2
         Enable  = $DLG_enable_Mood2

         Placement
         {
            posx = 10
            posy = 35
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Mood  = 1
            $DLG_value_Mood1 = 0
            $DLG_value_Mood2 = 1
            $DLG_value_MonoC = 0

            $dlg_modo_var_l = VAR_MODE($idx_playwall,"XUt2")
            $dlg_menu_var_l = VAR_MENU($idx_playwall,"XUt2")
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_XUt2,$dlg_modo_var_l,$dlg_menu_var_l)
         ]
      }

      Radio RdMonoC
      {
         Caption = MSG(1984)
         Hint    = MSG(1984)
         Value   = $DLG_value_MonoC
         Enable  = $DLG_enable_MonoC

         Placement
         {
            posx = 10
            posy = 55
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Mood1 = 0
            $DLG_value_Mood2 = 0
            $DLG_value_MonoC = 1
            $DLG_value_Mood  = 0

            $dlg_modo_var_l = VAR_MODE($idx_playwall,"XUt")
            $dlg_menu_var_l = VAR_MENU($idx_playwall,"XUt")
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_XUt,$dlg_modo_var_l,$dlg_menu_var_l)

         ]
      }
   }

   Frame FrmColore
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_value_MonoC

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Img
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 35
            posy = 38
            dimx = 70
            dimy = 70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(622)
      //Enable = $DLG_value_MonoC

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI (-1,"DLG_larghezza")
        $DLG_hint_larghezza = STRCAT(MSG(439), " = ", STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(631)
      Enable = $DLG_value_MonoC

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI (-1,"DLG_altezza")
        $DLG_hint_altezza = STRCAT(MSG(428), " = ", STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnColore
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_MonoC

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_CARTA")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_CARTA,"colori_playwall.txt")
         $DLG_image_file  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_CARTA,".bmp")
         $DLG_image_file   = SUBST_LABEL($DLG_image_file)
      ]
   }
}

Dlg 36e8_Cont_Base
{
   Caption = MSG(31)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 80
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 110
         dimx = 150
         dimy = 80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368

         if( STRCMP($DLG_profondita_368,"406")==0 )
         {
             VAR_SET_MENU(-1,"DLG_larghezza_368","LARGH368C4M.TXT")

             //DISPLAY2("Assegno prof. 406")

             if( ATOI($DLG_larghezza_368)>1472 )
             {
                $DLG_value_larghezza_368 = "1472"
                $DLG_larghezza_368 = "1472"
               // DISPLAY2(STRCAT("Passo per $DLG_larghezza_368=",$DLG_larghezza_368))
             }


             // Fabrizio 06/05/09 - in Lago
             // se sono cassetto vetro + vano a giorno
             // cambio men perch non esiste L. 368
             if( $DLG_tipo_anta_368==3 )
             {
                VAR_SET_MENU(-1,"DLG_larghezza_368","LARGH368C4M2.TXT")

                if( ATOI($DLG_larghezza_368)<=368 )
                {
                   $DLG_value_larghezza_368 = "736"
                   $DLG_larghezza_368 = "736"
                  // DISPLAY2(STRCAT("Passo per $DLG_larghezza_368=",$DLG_larghezza_368))
                }
             }
         }
         else
         {
             VAR_SET_MENU(-1,"DLG_larghezza_368","LARGHEZZA368B.TXT")
         }

      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

Dlg 36e8_Cont_Base_NEW
{
   Caption = MSG(31)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      //rob_pec 21/12/2010: aggiungo l'altezza
      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 110
         dimx = 150
         dimy = 100
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 75
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
        ]
      }


   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368

         if( STRCMP($DLG_profondita_368,"406")==0 )
         {
             VAR_SET_MENU(-1,"DLG_larghezza_368","LARGH368C4M.TXT")

             //DISPLAY2("Assegno prof. 406")

             if( ATOI($DLG_larghezza_368)>1472 )
             {
                $DLG_value_larghezza_368 = "1472"
                $DLG_larghezza_368 = "1472"
               // DISPLAY2(STRCAT("Passo per $DLG_larghezza_368=",$DLG_larghezza_368))
             }


             // Fabrizio 06/05/09 - in Lago
             // se sono cassetto vetro + vano a giorno
             // cambio men perch non esiste L. 368
             if( $DLG_tipo_anta_368==3 )
             {
                VAR_SET_MENU(-1,"DLG_larghezza_368","LARGH368C4M2.TXT")

                if( ATOI($DLG_larghezza_368)<=368 )
                {
                   $DLG_value_larghezza_368 = "736"
                   $DLG_larghezza_368 = "736"
                  // DISPLAY2(STRCAT("Passo per $DLG_larghezza_368=",$DLG_larghezza_368))
                }
             }
         }
         else
         {
             VAR_SET_MENU(-1,"DLG_larghezza_368","LARGHEZZA368B.TXT")
         }

      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

// Fabrizio: vedi sotto per cassettier multicolor
Dlg 36e8_Cont_Cass_OLD
{
   Caption = MSG(32)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      //Edit EdtProfondita
      //{
      //  Caption = $DLG_caption_profondita_368
      //  Hint    = $DLG_hint_profondita_368
      //  Enable  = $DLG_enable_pro_368
      //  Value   = $DLG_value_profondita_368
      //
      //  Placement
      //  {
      //     posx = 70
      //     posy = 50
      //     dimx = 50
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //  ]
      //
      //}
      //

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = MSG(86)
      //  Enable  = $DLG_enable_pro_368
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 55
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //}

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 50
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 150
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = MSG(101)
   //   Enable  = $DLG_enable_pro_368
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 60
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita_368")
   //     $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
   //     $DLG_caption_profondita_368 = $DLG_profondita_368
   //     $DLG_value_profondita_368   = $DLG_profondita_368
   //   ]
   //}

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

// **********************************
// Fabrizio: febbraio 2009
// per cassettiera Multicolor
// **********************************
Dlg 36e8_Cont_Cass
{
   Caption = MSG(32)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 110
         dimx = 150
         dimy = 80
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
      ]
   }
}

//Fabrizio 20/07/10 - con gestione piedini h. 42 per aff. NET
Dlg 36e8_Cont_Cass_NEW
{
   Caption = MSG(32)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         posy = 110
         dimx = 150
         dimy = 100
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 75
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
      ]
   }
}

//Fabrizio 20/07/10 - con gestione piedini h. 42 per aff. NET
Dlg 36e8_Cont_Cass_NEW12
{
   Caption = MSG(32)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 490
      //dimx = 635
      dimx = 775
      //dimy = 335
//      dimy = 325
      dimy = 365
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        //Enable  = 1
        //Massimiliano 15/03/2018  - con cassettiera doppia dovr bloccare la larghezza
        Enable  = $DLG_enable_larghezza
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         //posy = 105
         posy = 70
         //dimx = 150
         dimx = 200
//         dimy = 135
//         dimy = 157
         dimy = 179
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 17
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 39
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 61
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 83
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 105
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 127
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 1
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdMetal
      {
        Caption = MSG(3368)
        Hint    = MSG(3368)
        Value   = $DLG_Sup_Metal
        Enable  = $DLG_enable_Metallizzato

        Placement
        {
           posx = 10
           posy = 149
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 1
        ]
      }
   }

   // Eugenio 11.02.15 Aggiunta gestione push su dialog
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         //posy = 250
//         posy = 205
//         posy = 227
         posy = 249
         //dimx = 305
         dimx = 200
         dimy = 50
     }

     Check PushPull
     {
        Caption = MSG(179)
        Value   = $DLG_pushpull
        Enable  = $DLG_enable_push

        Placement
        {
           posx = 10
           posy = 20
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_pushpull = 1
        ]
     }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         posx = 215
         posy = 10
         dimx = 230
//         dimy = 275
         dimy = 315
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  40
            posx =  80
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 17/05/2019 - Emanuele - Modifico condizione per metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_L
              $DLG_COLORE_368_O = $DLG_COLORE_368_L
              $DLG_COLORE_368_W = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 17/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368_O = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              $DLG_COLORE_368_W = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      // 17/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 250
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 190
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 17/05/2019 - Emanuele - Modifico condizioni per metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_O = $DLG_COLORE_368
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_368_W = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 210
//           posy = 250
           posy = 290
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 17/05/2019 - Emanuele - Aggiungo condizioni per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_O = $DLG_COLORE_368_W
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368   = $DLG_COLORE_368_W
              GOSUB Get_Image_368_W
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 17/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 410
         posx = 540
         //posy = 205
         posy = 195
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 325
         posx = 450
         //posy = 205
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      //Massimiliano 15/03/2018  - con cassettiera doppia dovr bloccare la larghezza
      Enable  = $DLG_enable_larghezza

      Placement
      {
         //posx = 135
         posx = 170
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        //Massimiliano 11/11/16 - cambio regola visto che la precedente permetteva
        //                        di inserire i supporti AIR 96.. sbagliati
        //                        su cassettiere pi grandi
        if( ATOI($DLG_larghezza_368)>736 | $DLG_altezza>368 )
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else  {  $DLG_enable_rd_uso_5 = 1  }


        if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
        else                                 {  $DLG_enable_push = 1  }

     //   // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG

         // 09/09/2019 - Emanuele - Aggiungo condizione per la gestione dei supporti Metallizzati
         if(ATOI($DLG_larghezza_368)<=736 & $DLG_enable_Metallizzato==0) { $DLG_enable_Metallizzato = 1 }
         if(ATOI($DLG_larghezza_368)>736 & $DLG_enable_Metallizzato==1) { $DLG_enable_Metallizzato = 0 }

         if($DLG_enable_Metallizzato ==0 & $DLG_Sup_Metal==1)
         {
            $DLG_sup_Metal = 0
            $DLG_value_rd_uso_3 = 1
         }

         // 09/09/2019 - Emanuele - Aggiungo controllo per preconfigurati
         if(VAR_VAL($DLG_idx_to_call,"preconfigurato")==0)
         {
            if($DLG_enable_Metallizzato ==1)
            {
               $DLG_enable_Metallizzato = 0
            }
         }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 270
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }

         if($DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            GOSUB Get_Image_368
            $DLG_COLORE_368_O = $DLG_COLORE_368
            $DLG_COLORE_368_L = $DLG_COLORE_368
            $DLG_COLORE_368_W = $DLG_COLORE_368
         }

         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
         }

         if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
            $DLG_COLORE_368   = $DLG_COLORE_XGLASS
            GOSUB Get_Image_XGlass
         }
         // 17/05/2019 - Emanuele - Aggiungo condizione per metallizzati
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_METAL
            $DLG_COLORE_368   = $DLG_COLORE_METAL
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            else                           { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }

         // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
         // Eugenio 25.10.13 e se non  wildwood
         if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 17/05/2019 - Emanuele - Aggiungo condizione per metallizzato
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
         //if( STRCMP($DLG_COLORE_368,"ARG")!=0)
         {
            $DLG_COLORE_368_SCC = $DLG_COLORE_368
            $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
            $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           // FT 06/04/18
           // PERCHE' QUI IL COMANDO? Le variabili globali servono per valutare l'effettiva cambio di valore rispetto le variabili locali.
           // Il setting dovrebbe essere fatto a valle, ovviamente a seguito di un cambio di valore, anche perch il valore di GEST_SC
           // (e in realt anche di GEST_ST) dovrebbe essere settato da variabili di controllo (come per i frontali),
           // e non direttamente. Comunque sia al momento la soluzione pe gestire gli esplosi dei preconfigurati  quella di settarle sempre
           // come modificate (ovviamenente modifico solo per i casi specifici)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))

// FT 12/04/18 - gestito in "EccezioniSave"
//TEMP--            // FT 06/04/18  per ex-pcf
//TEMP--           if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }

           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 17/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                  }
                  if(IF_METAL($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                  }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)

            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }

// FT 12/04/18 - gestito in "EccezioniSave"
//TEMP--         // FT 06/04/18  per ex-pcf
//TEMP--         if( VAR_VAL($DLG_idx_to_call, "NEW_DA_PCF") == 1 )   { COMANDO2(STRCAT("VAR_CHANGE 1 ", STR($DLG_idx_to_call)," GEST_ST=", APICI(), $DLG_COLORE_368_SCC, APICI())) }
      ]
   }
   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 485
         posx = 615
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

// Massimiliano 26/03/14 - nuova dlg per 36e8 Side
Dlg 36e8_Cont_Cass_NEW14_Side
{
   Caption = MSG(32)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      //dimx = 790
      dimx = 925
      //dimy = 335
//      dimy = 325
      dimy = 365
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 200
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        //Enable  = 1
        //Massimiliano 15/03/2018  - con cassettiera doppia dovr bloccare la larghezza
        Enable  = $DLG_enable_larghezza
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 10
         //posy = 105
         posy = 70
         //dimx = 150
         dimx = 200
//         dimy = 135
//         dimy = 157
         dimy = 179
      }

      Radio RdNessuno
      {
        Caption = MSG(90)
        Hint    = MSG(112)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 17
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 39
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdSuppVetro
      {
        Caption = MSG(94)
        Hint    = MSG(95)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 61
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdSuppVtCom
      {
        Caption = MSG(159)
        Hint    = MSG(159)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 83
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdPiediNet
      {
        Caption = MSG(96)
        Hint    = MSG(97)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 105
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdOmega
      {
        Caption = MSG(3367)
        Hint    = MSG(3367)
        Value   = $DLG_Omega
        Enable  = $DLG_enable_Omega

        Placement
        {
           posx = 10
           posy = 127
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 1
           $DLG_Sup_Metal = 0
        ]
      }

      Radio RdMetal
      {
        Caption = MSG(3368)
        Hint    = MSG(3368)
        Value   = $DLG_Sup_Metal
        Enable  = $DLG_enable_Metallizzato

        Placement
        {
           posx = 10
           posy = 149
           //dimx = 130
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_Omega = 0
           $DLG_Sup_Metal = 1
        ]
      }

   }

   // Eugenio 11.02.15 Aggiunta gestione push su dialog
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         //posy = 250
//         posy = 205
//         posy = 227
         posy = 249
         //dimx = 305
         dimx = 200
         dimy = 50
     }

     Check PushPull
     {
        Caption = MSG(179)
        Value   = $DLG_pushpull
        Enable  = $DLG_enable_push

        Placement
        {
           posx = 10
           posy = 20
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
            $DLG_pushpull = 1
        ]
     }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 165
         posx = 215
         posy = 10
         //dimx = 150
         dimx = 230
         //dimy = 235
//         dimy = 275
         dimy = 315
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  40
            posx =  80
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 150
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 20/05/2019 - Emanuele - Modifico condizione per metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_L
              $DLG_COLORE_368_O = $DLG_COLORE_368_L
              $DLG_COLORE_368_W = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 170
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 20/05/2019 - Emanuele - Modifico condizione per metallizzato
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_O = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              $DLG_COLORE_368_W = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 190
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 210
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }
      // 20/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 230
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 250
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 190
//           posy = 230
           posy = 270
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 20/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_O = $DLG_COLORE_368
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_368_W = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_rd_ww

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 210
//           posy = 250
           posy = 290
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1)
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_O = $DLG_COLORE_368_W
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368   = $DLG_COLORE_368_W
              GOSUB Get_Image_368_W
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]
      }

   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         //posx = 320
         posx = 450
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx
        // 24/04/2019 - Emanuele - Aggiungo enable per la gestione del cambio finitura nei pcf
//        Enable = $DLG_enable_rd_side_368

        Placement
        {
           posx = 15
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 630
         posx = 760
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 560
         posx = 690
         //posy = 205
         posy = 195
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 475
         posx = 605
         //posy = 205
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      //Massimiliano 15/03/2018  - con cassettiera doppia dovr bloccare la larghezza
      Enable  = $DLG_enable_larghezza

      Placement
      {
         //posx = 135
         posx = 170
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        //Massimiliano 11/11/16 - cambio regola visto che la precedente permetteva
        //                        di inserire i supporti AIR 96.. sbagliati
        //                        su cassettiere pi grandi
        if( ATOI($DLG_larghezza_368)>736 | $DLG_altezza>368 )
        {
           if($DLG_value_rd_uso_5 == 1)
           {
              $DLG_value_rd_uso_3 = 1
              $DLG_value_rd_uso_5 = 0
           }
           $DLG_enable_rd_uso_5 = 0
        }
        else  { $DLG_enable_rd_uso_5 = 1 }

        if ( ATOI($DLG_larghezza_368)>1472)  {  $DLG_enable_push = 0  }
        else                                 {  $DLG_enable_push = 1  }

        // 31/07/2019 - Emanuele - Aggiungo procedura per le regole dell'omega
        GOSUB Regole_Omega_DLG

         // 09/09/2019 - Emanuele - Aggiungo condizione per la gestione dei supporti Metallizzati
         if(ATOI($DLG_larghezza_368)<=736 & $DLG_enable_Metallizzato==0) { $DLG_enable_Metallizzato = 1 }
         if(ATOI($DLG_larghezza_368)>736 & $DLG_enable_Metallizzato==1) { $DLG_enable_Metallizzato = 0 }

         if($DLG_enable_Metallizzato ==0 & $DLG_Sup_Metal==1)
         {
            $DLG_sup_Metal = 0
            $DLG_value_rd_uso_3 = 1
         }

         // 09/09/2019 - Emanuele - Aggiungo controllo per preconfigurati
         if(VAR_VAL($DLG_idx_to_call,"preconfigurato")==0)
         {
            if($DLG_enable_Metallizzato ==1)
            {
               $DLG_enable_Metallizzato = 0
            }
         }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 270
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }

         if($DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            GOSUB Get_Image_368
            $DLG_COLORE_368_O = $DLG_COLORE_368
            $DLG_COLORE_368_L = $DLG_COLORE_368
            $DLG_COLORE_368_W = $DLG_COLORE_368
         }

         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
         }

         if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
            $DLG_COLORE_368   = $DLG_COLORE_XGLASS
            GOSUB Get_Image_XGlass
         }
         // 20/05/2019 - Emanuele - Aggiungo controllo per metallizzato
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_METAL
            $DLG_COLORE_368   = $DLG_COLORE_METAL
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            else                           { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }

         // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
         // Eugenio 25.10.13 e se non  wildwood
         if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 20/05/2019 - Emanuele - Aggiungo condizione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
         //if( STRCMP($DLG_COLORE_368,"ARG")!=0)
         {
            $DLG_COLORE_368_SCC = $DLG_COLORE_368
            $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
            $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 335
         posx = 460
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 485
         posx = 615
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 640
         posx = 770
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 36e8_Specchiera
{
   Caption = MSG(33)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 335
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         //posx = 10
         //posy = 10
         posx = 170
         posy = 145
         dimx = 150
         dimy = 75
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura1
   {
      Caption = MSG(855)

      Placement
      {
         //posx = 165
         posx = 10
         posy = 10
         dimx = 150
         dimy = 210
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           GOSUB Get_Image_368_SPE_L

           if( STRCMP($DLG_COLORE_368_SPE_L,"ARG")!=0 )
           {
              $DLG_COLORE_368_SPE_O = $DLG_COLORE_368_SPE_L
           }

           GOSUB Ass_Frame2_Specc368
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O
           $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O

           $DLG_enable_rd_opaco_368 = 1
           $DLG_enable_frame1 = 0

           GOSUB Get_Image_368_SPE_O
        ]

      }

   }

   Frame Finitura2
   {
      Caption = MSG(858)
      Enable  = $DLG_enable_frame1

      Placement
      {
         //posx = 320
         posx = 170
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 255
         posy = 230
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 170
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(859)

      Placement
      {
         //posx = 135
         posx = 295
         //posy = 35
         posy = 165
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI(-1,"DLG_larghezza_368")
          $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
          $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
          $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(34)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 295
         posy = 190
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_SPE_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_O,"colori_tutti.txt")
            GOSUB Get_Image_368_SPE_O
            $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O
            $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O

            $DLG_image_file1      = $DLG_image_file
            $DLG_descrizione_var1 = $DLG_descrizione_var

            $DLG_enable_rd_opaco_368 = 1
            $DLG_enable_frame1 = 0

         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_SPE_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_L,"colori_tutti.txt")
            GOSUB Get_Image_368_SPE_L

            if( STRCMP($DLG_COLORE_368_SPE_L,"ARG")!=0 )
            {
               $DLG_COLORE_368_SPE_O = $DLG_COLORE_368_SPE_L
            }

            GOSUB Ass_Frame2_Specc368
         }
      ]
   }


   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(35)
      Enable = $DLG_enable_frame1

      Placement
      {
         //posx = 330
         posx = 180
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368")

         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")

         $DLG_image_file1   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
         $DLG_image_file1   = SUBST_LABEL($DLG_image_file1)
      ]
   }
}

Dlg 36e8_PannelliParete
{
   Caption = MSG(153)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 410
//      dimy = 320
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         //posx = 10
         //posy = 10
         posx = 10
         posy = 10
         dimx = 200
         dimy = 75
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 95
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 95
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame TipoFinitura
   {
      //Caption = MSG(855)

      Placement
      {
         //posx = 165
         posx = 10
         posy = 90
         dimx = 200
//         dimy = 140
         dimy = 190
      }


      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 7
           posy = 10
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_lamier = 0
           // 05/09/2018 - Emanuele - Aggiungo variabile per la gestione della finitura XGlass
           $DLG_value_XGlass_lucido = 0
           $DLG_value_XGlass_opaco = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 0
           $DLG_value_metal_opaco = 0

           // 05/09/2018 - Emanuele - Aggiungo assegnazione per valore di default
           $DLG_COLORE_368_SPE_L = "BCO"

           GOSUB Get_Image_368_SPE_L

           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_L,"colori_tutti.txt")

           if( STRCMP($DLG_COLORE_368_SPE_L,"ARG")!=0 )
           {
              $DLG_COLORE_368_SPE_O = $DLG_COLORE_368_SPE_L
           }
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel

           //GOSUB Ass_Frame2_Specc368
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 7
           posy = 35
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_lamier = 0
           // 05/09/2018 - Emanuele - Aggiungo variabile per la gestione della finitura XGlass
           $DLG_value_XGlass_lucido = 0
           $DLG_value_XGlass_opaco = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 0
           $DLG_value_metal_opaco = 0

           // 05/09/2018 - Emanuele - Aggiungo assegnazione per valore di default
           $DLG_COLORE_368_SPE_O = "BCO"


           $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O
           $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O

           //$DLG_enable_rd_opaco_368 = 1
           //$DLG_enable_frame1 = 0

           GOSUB Get_Image_368_SPE_O

           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_O,"colori_tutti.txt")
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel

        ]

      }

      Radio RdLamiera
      {
        Caption = MSG(875)
        Hint    = MSG(875)
        Value   = $DLG_value_lamier
        Enable  = $DLG_enable_rd_lamier_368

        Placement
        {
           posx = 7
           posy = 60
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lamier = 1
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           // 05/09/2018 - Emanuele - Aggiungo variabile per la gestione della finitura XGlass
           $DLG_value_XGlass_lucido = 0
           $DLG_value_XGlass_opaco = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 0
           $DLG_value_metal_opaco = 0

           // 05/09/2018 - Emanuele - Aggiungo assegnazione per valore di default
           $DLG_COLORE_368_SPE_O = "BCO"

           $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O
           $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O
           GOSUB Get_Image_368_SPE_O
           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_O,"colori_tutti.txt")
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel

        // Eugenio 21.09.15 Cambio il men della larghezza in funzione dell'altezza scelta
        // 04/04/2018 - Emanuele - Commento la procedura perch i controlli non sono completi
//           GOSUB SETTA_LARPS
        ]

      }

      Radio RdXglassL
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_XGlass_lucido

        Placement
        {
           posx = 7
           posy = 85
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lamier = 0
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_XGlass_lucido = 1
           $DLG_value_XGlass_opaco = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 0
           $DLG_value_metal_opaco = 0

           $DLG_COLORE_XGLASS = "MR1"
           GOSUB Get_Image_XGlass
           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel

        ]

      }

      Radio RdXglassO
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_XGlass_opaco

        Placement
        {
           posx = 7
           posy = 110
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lamier = 0
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_XGlass_lucido = 0
           $DLG_value_XGlass_opaco = 1
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 0
           $DLG_value_metal_opaco = 0

           $DLG_COLORE_XGLASS = "MR1"
           GOSUB Get_Image_XGlass

           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel

        ]

      }
      // 20/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_metal_lucido

        Placement
        {
           posx = 7
           posy = 135
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lamier = 0
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_XGlass_lucido = 0
           $DLG_value_XGlass_opaco = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 1
           $DLG_value_metal_opaco = 0

           $DLG_COLORE_METAL = "MT4"
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")

           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel
        ]
      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_metal_opaco

        Placement
        {
           posx = 7
           posy = 160
           dimx = 190
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lamier = 0
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_XGlass_lucido = 0
           $DLG_value_XGlass_opaco = 0
           // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_metal_lucido = 0
           $DLG_value_metal_opaco = 1

           $DLG_COLORE_METAL = "MT4"
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")

           // 05/09/2018 - Emanuele - Aggiungo assegnazione descrizione per Modificare il nome della finitura
           // presente in dialog quando si clicca su un diverso radiobutton
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           // 25/09/2018 - Emanuele - Aggiungo procedura per modificare la radice del wall panel
           GOSUB CambiaRadWallPanel
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(855)
      Enable  = $DLG_enable_frame1

      Placement
      {
         //posx = 320
         posx = 220
         posy = 10
         dimx = 170
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  42
            posy =  40
            dimx =  85
            dimy =  85
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 165
//         posy = 250
         posy = 300
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
//         posy = 250
         posy = 300
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(859)

      Placement
      {
         //posx = 135
         posx = 160
         //posy = 35
         posy = 30
         dimx = 35
         dimy = 20
      }

      OnClick
      [
          // 15/02/2018 - Filippo - set dinamico limiti misure
          GOSUB SetLimitiWallPanel36e8_dlg_onlick_X
          // 15/02/2018 - Filippo - senza variabili d'appoggio
          $R = CHIEDI(-1,"DLG_larghezza_368")
          $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
          $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
          $DLG_value_larghezza_368   = STR($DLG_larghezza_368)

          // 15/02/2018 - Filippo - commento siccome cambiava in modo errato il menu. Rifaccio la procedura in modo corretto
          //// Eugenio 21.09.15 Cambio il men della larghezza in funzione dell'altezza scelta
          //GOSUB SETTA_LARPS
        ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(34)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 160
         posy = 55
         dimx = 35
         dimy = 20
      }

      OnClick
      [
        // 15/02/2018 - Filippo - set dinamico limiti misure
        GOSUB SetLimitiWallPanel36e8_dlg_onlick_Y
         // 15/02/2018 - Filippo - senza variabili d'appoggio
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
        // 15/02/2018 - Filippo - commento siccome cambiava in modo errato il menu. Rifaccio la procedura in modo corretto
        // Eugenio 28.01.13 Cambio il men della larghezza in funzione dell'altezza scelta
        //GOSUB SETTA_LARPS
      ]
   }

   Check chkProfSup
   {
      Caption = MSG(876)
      Hint    = MSG(876)
      Enable  = 1
      Value   = $DLG_value_rd_uso_1

      Placement
      {
         posx = 220
         posy = 200
         dimx = 190
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_rd_uso_1==1)  {  $DLG_value_rd_uso_1=1  }
         else                        {  $DLG_value_rd_uso_1=0  }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 240
         posy = 145
         dimx = 130
         dimy = 25
      }

      OnClick
      [
         if($DLG_value_opaco==1 | $DLG_value_lamier==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_SPE_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_O,"colori_tutti.txt")
            GOSUB Get_Image_368_SPE_O
            $DLG_COLORE_368       = $DLG_COLORE_368_SPE_O
            $DLG_COLORE_368_SPE_L = $DLG_COLORE_368_SPE_O

            $DLG_image_file1      = $DLG_image_file
            $DLG_descrizione_var1 = $DLG_descrizione_var

            //$DLG_enable_rd_opaco_368 = 1
            //$DLG_enable_frame1 = 0

         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_SPE_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SPE_L,"colori_tutti.txt")
            GOSUB Get_Image_368_SPE_L

            if( STRCMP($DLG_COLORE_368_SPE_L,"ARG")!=0 )
            {
               $DLG_COLORE_368_SPE_O = $DLG_COLORE_368_SPE_L
            }

            //GOSUB Ass_Frame2_Specc368
         }

         // 05/09/2018 - Emanuele - Aggiungo condizioni per la gestione delle finiture XGlass
         if($DLG_value_XGlass_lucido==1 | $DLG_value_XGlass_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            GOSUB Get_Image_XGlass

         }

         // 20/05/2019 - Emanuele - Aggiungo controllo per metallizzati
         if($DLG_value_metal_lucido==1 | $DLG_value_metal_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            if($DLG_value_metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            else                           { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }
      ]
   }

   // 05/09/2018 - Emanuele - Tolgo la linea di separazione
//   Bevel Bvl
//   {
//     Placement
//     {
//        posx = 10
//        posy = 280
//        dimx = 310
//        dimy = 2
//     }
//   }

}

//31.08.2017 - Filippo - nuovo elemento: wall panel in rovere gentle
Dlg WallPanelRG
{
   Caption = MSG(153)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 335
      dimy = 255
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         //posx = 10
         //posy = 10
         posx = 10
         posy = 10
         dimx = 150
         dimy = 75
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }
   }

//   //29.06.2017 - Filippo - aggiungo possibilit di eliminare da dialog
//   Frame FrmDelete
//   {
//      Caption = MSG(3305)
//
//      Placement
//      {
//         posx = 10
//         posy = 90
//         dimx = 150
//         dimy = 60
//      }
//
//      Check chkElimina
//      {
//        Caption = MSG(3304)
//        Hint    = MSG(3304)
//        Enable  = 1
//        Value   = $DLG_checkfordelete
//
//        Placement
//        {
//           posx = 20
//           posy = 25
//           dimx = 200
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_checkfordelete==1)
//           {
//              $DLG_checkfordelete = 1
//           }
//           else
//           {
//              $DLG_checkfordelete = 0
//           }
//        ]
//
//      }
//   }

   Frame Finitura
   {
      Caption = MSG(855)

      Placement
      {
         //posx = 320
         posx = 170
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  32
            posy =  40
            dimx =  85
            dimy =  85
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(859)

      Placement
      {
         //posx = 135
         posx = 135
         //posy = 35
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI($DLG_idx_to_call,"X")
          $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR(VAR_VAL($DLG_idx_to_call,"X")))
          $DLG_caption_larghezza_368 = STR(VAR_VAL($DLG_idx_to_call,"X"))
          $DLG_value_larghezza_368   = STR(VAR_VAL($DLG_idx_to_call,"X"))
        // Eugenio 21.09.15 Cambio il men della larghezza in funzione dell'altezza scelta
      //    GOSUB SETTA_LARPS
          GOSUB DLG_SET_MENU_BOISERIE
        ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(34)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"Y")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR(VAR_VAL($DLG_idx_to_call,"Y")))
        $DLG_caption_altezza_368 = STR(VAR_VAL($DLG_idx_to_call,"Y"))
        $DLG_value_altezza_368   = STR(VAR_VAL($DLG_idx_to_call,"Y"))
        // Eugenio 28.01.13 Cambio il men della larghezza in funzione dell'altezza scelta
//        GOSUB SETTA_LARPS
          GOSUB DLG_SET_MENU_BOISERIE
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 180
         posy = 145
         dimx = 130
         dimy = 25
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
         $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),".bmp")
         $DLG_image_file   = SUBST_LABEL($DLG_image_file)
      ]
   }

   Bevel Bvl
   {
     Placement
     {
        posx = 10
        posy = 185
        dimx = 310
        dimy = 2
     }
   }

}

Dlg 36e8_AppendiabitiB
{
   Caption = MSG(163)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 335
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         //posx = 10
         //posy = 10
         posx = 10
         posy = 10
         dimx = 150
         dimy = 75
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }
   }

   Check chkProfSup
   {
      Caption = MSG(876)
      Hint    = MSG(876)
      Enable  = 1
      Value   = $DLG_value_rd_uso_3

      Placement
      {
         posx = 10
         posy = 140
         dimx = 150
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_rd_uso_3==1)  {  $DLG_value_rd_uso_3=1  }
         else                        {  $DLG_value_rd_uso_3=0  }
      ]
   }

   Frame Finitura
   {
      Caption = MSG(602)
      Enable  = 1

      Placement
      {
         //posx = 320
         posx = 170
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  32
            posy =  40
            dimx =  85
            dimy =  85
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 165
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(859)

      Placement
      {
         //posx = 135
         posx = 135
         //posy = 35
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI(-1,"DLG_larghezza_368")
          $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
          $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
          $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(34)
      Enable  = 1


      Placement
      {
         //posx = 135
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 180
         posy = 145
         dimx = 130
         dimy = 25
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco_NEW
      ]
   }
}

Dlg 36e8_Cont_Ang
{
   Caption = MSG(36)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 275
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame Tipologia
   {
      Caption = MSG(37)
      //Hint = ""

      Placement
      {
         posx = 10
         posy = 150
         dimx = 305
         dimy = 50
      }

      Radio RdContenitore
      {
        Caption = MSG(38)
        Hint    = MSG(39)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 20
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio RdAppoggio
      {
        Caption = MSG(20)
        Hint    = MSG(21)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 160
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
        $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
        $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",STR($DLG_profondita_368))
        $DLG_caption_profondita_368 = STR($DLG_profondita_368)
        $DLG_value_profondita_368   = STR($DLG_profondita_368)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

Dlg NET_Cont
{
   Caption = MSG(1006)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 215
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 305
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 170
           posy = 15
           dimx = 2
           dimy = 115
        }
      }


      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_lucido_opaco

        Placement
        {
           posx = 175
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           VAR_SET_MENU(-1,"DLG_COLORE_NET","colori_368_luc.txt")
           // 08/11/2018 - Emanuele - Aggiungo funzione get_image per pescare le immagini corrette
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_NET")
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_lucido_opaco

        Placement
        {
           posx = 175
           posy = 65
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           // 07/11/2018 - Emanuele - Aggiungo condizione che verifica se  stata selezionata la finitura "ARG"
           // e quindi la modifico in "BCO"
           VAR_SET_MENU(-1,"DLG_COLORE_NET","colori_368_opa.txt")

           if($DLG_COLORE_NET=="ARG")
           {
              $DLG_COLORE_NET = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NET,"colori_tutti.txt")
           }

           GOSUB Get_Image_Net
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 155
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 155
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_NET")

        // 07/11/2018 - Emanuele - Aggiungo condizione per la gestione della finitura della struttura nel caso
        // si inserisce il valore "ARG" , cio specchio, come finitura dell'anta
        if($DLG_COLORE_NET=="ARG")
        {
           DISPLAY2(MSG(3357))
           $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
        }
        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NET,"colori_tutti.txt")

        // 08/11/2018 - Emanuele - Commento la procedura perch  solo per le immagini opache. Utilizzo la funzione
        // get_image per gestire anche il lucido
//        GOSUB Get_Image_Net
        if($DLG_value_lucido==1)
        {
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_NET")
        }
        if($DLG_value_opaco==1)
        {
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_NET")
        }

      ]
   }
}

Dlg Morgana
{
   Caption = MSG(909)
   Placement
   {
      posx = 150
      posy = 150
      // 11/05/2020 - Emanuele - Modifico le dimensioni della dialog
//      dimx = 330
      dimx = 380
//      dimy = 300
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 180
      }

// Fabrizio 22/05/08: larghezza fissa
//      Edit EdtLarghezza
//      {
//        //semre attivo
//        Caption = $DLG_caption_larghezza_Morgana
//        Hint    = $DLG_hint_larghezza_Morgana
//        Enable  = 1
//        Value   = $DLG_value_larghezza_Morgana
//
//        Placement
//        {
//           posx = 70
//           posy = 25
//           dimx = 50
//           dimy = 20
//        }
//
//        OnClick
//        [
//        ]
//
//      }

      Edit EdtProfondita
      {
        //sempre attivo
        Caption = $DLG_caption_profondita_Morgana
        Hint    = $DLG_hint_profondita_Morgana
        Enable  = 1
        Value   = $DLG_value_profondita_Morgana

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtNCassetti
      {
        //sempre attivo
        Caption = $DLG_caption_cassetti_Morgana
        Hint    = $DLG_hint_cassetti_Morgana
        Enable  = 1
        Value   = $DLG_value_cassetti_Morgana

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

// Fabrizio 22/05/08: larghezza fissa
//      Label LblLarghezza
//      {
//        Caption = MSG(624)
//        Hint    = "Larghezza della cassettiera"
//        Enable  = 1
//        Value   = MSG(624)
//
//        Placement
//        {
//           posx = 10
//           posy = 30
//           dimx = 80
//           dimy = 20
//        }
//
//      }

      Label LblProfondita
      {
        //sempre attivo
        Caption = MSG(626)
        Hint    = MSG(910)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblNCassetti
      {
        //sempre attivo
        Caption = MSG(911)
        Hint    = MSG(912)
        Enable  = 1
        Value   = MSG(911)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblAppoggio
      {
        //sempre attivo
        Caption = MSG(436)
        Hint    = MSG(913)
        Enable  = 1
        Value   = MSG(436)

        Placement
        {
           posx = 10
           posy = 105
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 85
           dimx = 130
           dimy = 2
        }
      }

      Radio RdPiedini
      {
        Caption = MSG(914)
        Hint    = MSG(915)
        Value   = $DLG_value_radio_piedini

        Placement
        {
           posx = 70
           posy = 95
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_piedini=1
           $DLG_value_radio_ruote=0
        ]

      }

      Radio RdRuote
      {
        Caption = MSG(916)
        Hint    = MSG(917)
        Value   = $DLG_value_radio_ruote

        Placement
        {
           posx = 70
           posy = 115
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_ruote=1
           $DLG_value_radio_piedini=0
        ]

      }

      Bevel Bvl2
      {
        Placement
        {
           posx = 10
           posy = 140
           dimx = 130
           dimy = 2
        }
      }

      Check chkScombussola
      {
        Caption = MSG(918)
        Hint    = MSG(919)
        Enable  = 1
        Value   = $DLG_scombussola_Morgana

        Placement
        {
           posx = 40
           posy = 150
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if($DLG_scombussola_Morgana==1)   {  $DLG_scombussola_Morgana=1  }
           else                              {  $DLG_scombussola_Morgana=0  }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         // 11/05/2020 - Emanuele - Modifico le dimensioni della sezione finiture
//         dimx = 150
         dimx = 200
//         dimy = 180
         dimy = 220
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            // 11/05/2020 - Emanuele - Modifico posizione scritta finitura
//            posx = 10
            posx = 70
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            // 11/05/2020 - Emanuele - Modifico posizione immagine
//            posx =  45
            posx =  65
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 15
           posy = 135
           // 11/05/2020 - Emanuele - Modifico le dimensioni delle scritte
//           dimx = 120
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           // 11/05/2020 - Emanuele - Aggiungo assegnazioni per la gestione dell'xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0

           // 11/05/2020 - Emanuele - Aggiungo assegnazione
           $DLG_COLORE_MORGANA_O = "BCO"
           $DLG_COLORE_MORGANA_L = $DLG_COLORE_MORGANA_O
           $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_O

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_L,"colori_tutti.txt")
           GOSUB Get_Image_Morgana_L

           // 11/05/2020 - Emanuele - Modifico il menu in base alla finitura selezionata
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_L", "colori_luc.txt")

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 15
           posy = 155
           // 11/05/2020 - Emanuele - Modifico le dimensioni delle scritte
//           dimx = 120
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           // 11/05/2020 - Emanuele - Aggiungo assegnazioni per la gestione dell'xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0

           // 11/05/2020 - Emanuele - Aggiungo assegnazione
           $DLG_COLORE_MORGANA_L = "BCO"
           $DLG_COLORE_MORGANA_O = $DLG_COLORE_MORGANA_L
           $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_L

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_O,"colori_tutti.txt")
           GOSUB Get_Image_Morgana_O

           // 11/05/2020 - Emanuele - Modifico il menu in base alla finitura selezionata
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_O", "colori_opa.txt")
        ]

      }

      // 11/05/2020 - Emanuele - Aggiungo radiobutton per la gestione dell'xglass
      Radio RdLucidoXG
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
//        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 15
           posy = 175
           // 11/05/2020 - Emanuele - Modifico le dimensioni delle scritte
//           dimx = 120
           dimx = 170
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass = 0

           // 11/05/2020 - Emanuele - Aggiungo assegnazione
           $DLG_COLORE_MORGANA_O = "MR1"
           $DLG_COLORE_MORGANA_L = $DLG_COLORE_MORGANA_O
           $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_O

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_L,"colori_tutti.txt")

           if(IF_METAL($DLG_COLORE_MORGANA_L)==0)
           {
              GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_L")
           }
           else
           {
               GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_MORGANA_L")
           }

           // 11/05/2020 - Emanuele - Modifico il menu in base alla finitura selezionata
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_L", "colori_xglass_metal.txt")
        ]

      }

      // 11/05/2020 - Emanuele - Aggiungo radiobutton per la gestione dell'xglass
      Radio RdOpacoXG
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
//        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 15
           posy = 195
           // 11/05/2020 - Emanuele - Modifico le dimensioni delle scritte
//           dimx = 120
           dimx = 170
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_opaco_xglass = 1
           $DLG_value_lucido_xglass = 0

           // 11/05/2020 - Emanuele - Aggiungo assegnazione
           $DLG_COLORE_MORGANA_L = "MR1"
           $DLG_COLORE_MORGANA_O = $DLG_COLORE_MORGANA_L
           $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_L

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_O,"colori_tutti.txt")
           if(IF_METAL($DLG_COLORE_MORGANA_O)==0)
           {
              GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_O")
           }
           else
           {
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_MORGANA_O")
           }

           // 11/05/2020 - Emanuele - Modifico il menu in base alla finitura selezionata
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_O", "colori_xglass_metal.txt")
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 50
         posx = 250
         // 11/05/2020 - Emanuele - Modifico la posizione del tasto annulla
//         posy = 200
         posy = 240
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         posx = 165
         // 11/05/2020 - Emanuele - Modifico la posizione del tasto OK
//         posy = 200
         posy = 240
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


// Fabrizio 22/05/08: larghezza fissa
//   Button btnLarghezza
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = "Cambia la larghezza della cassettiera"
//
//      Placement
//      {
//         posx = 135
//         posy = 35
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//        $R = CHIEDI(-1,"DLG_larghezza_Morgana")
//        $DLG_hint_larghezza_Morgana    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_Morgana))
//        $DLG_caption_larghezza_Morgana = STR($DLG_larghezza_Morgana)
//        $DLG_value_larghezza_Morgana   = STR($DLG_larghezza_Morgana)
//      ]
//   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(920)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_Morgana")
        $DLG_hint_profondita_Morgana    = STRCAT(MSG(430)," = ",STR($DLG_profondita_Morgana))
        $DLG_caption_profondita_Morgana = STR($DLG_profondita_Morgana)
        $DLG_value_profondita_Morgana   = STR($DLG_profondita_Morgana)
      ]
   }

   Button btnNCassetti
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(921)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_cassetti_Morgana")
        $DLG_hint_cassetti_Morgana    = STRCAT(MSG(986)," = ",STR($DLG_cassetti_Morgana))
        $DLG_caption_cassetti_Morgana = STR($DLG_cassetti_Morgana)
        $DLG_value_cassetti_Morgana   = STR($DLG_cassetti_Morgana)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         // 11/05/2020 - Emanuele - Modifico la posizione del tasto cambio finitura
//         posx = 175
         posx = 195
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 11/05/2020 - Emanuele - Modifico condizione per la gestione dell'xglass
//         if($DLG_value_opaco==1)
         if($DLG_value_opaco==1 | $DLG_value_opaco_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_MORGANA_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_O,"colori_tutti.txt")

            $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_O
            $DLG_COLORE_MORGANA_L = $DLG_COLORE_MORGANA_O

            // 11/05/2020 - Emanuele - Aggiungo condizione per differenziare tra xglass e laccato
            if($DLG_value_opaco_xglass==0)
            {
               GOSUB Get_Image_Morgana_O
            }
            else
            {
               if(IF_METAL($DLG_COLORE_MORGANA_O)==0)
               {
                  GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_O")
               }
               else
               {
                  GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_MORGANA_O")
               }
            }
         }

         // 11/05/2020 - Emanuele - Modifico condizione per la gestione dell'xglass
//         if($DLG_value_lucido==1)
         if($DLG_value_lucido==1 | $DLG_value_lucido_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_MORGANA_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_L,"colori_tutti.txt")

            $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_L
            $DLG_COLORE_MORGANA_O = $DLG_COLORE_MORGANA_L

            // 11/05/2020 - Emanuele - Aggiungo condizione per differenziare tra xglass e laccato
            if($DLG_value_lucido_xglass==0)
            {
               GOSUB Get_Image_Morgana_L
            }
            else
            {
               if(IF_METAL($DLG_COLORE_MORGANA_L)==0)
               {
                  GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_L")
               }
               else
               {
                   GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_MORGANA_L")
               }
            }
         }

      ]
   }
}

Dlg MorganaCassetto
{
   Caption = MSG(922)
   Placement
   {
      // Fabrizio 24/08/09
      posx = 150
      posy = 150
      // 11/05/2020 - Emanuele - Modifico dimensioni dialog
//      dimx = 330
      dimx = 390
      //dimx = 170
//      dimy = 260
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

// Fabrizio 24/08/09
//   Frame FrmMisure
//   {
//      Caption = MSG(601)
//
//      Placement
//      {
//         posx = 10
//         posy = 10
//         dimx = 150
//         dimy = 180
//      }
//   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         // Fabrizio 24/08/09
         //posx = 165
         posx = 5
         posy = 10
         // 11/05/2020 - Emanuele - Modifico le dimensioni del riquadro
//         dimx = 150
         dimx = 200
//         dimy = 180
         dimy = 230
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            // 11/05/2020 - Emanuele - Modifico la posizione della scritta
//            posx = 10
            posx = 70
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            // 11/05/2020 - Emanuele - Modifico la posizione dell'immagine
//            posx =  45
            posx =  65
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 15
           posy = 135
           // 11/05/2020 - Emanuele - Modifico la dimensione del radiobutton
//           dimx = 120
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           // 11/05/2020 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0

           // 11/05/2020 - Emanuele - Modifico l'assegnazione
//           $DLG_COLORE_MORGANA_L = $DLG_COLORE_MORGANA_O
           $DLG_COLORE_MORGANA_L = "BCO"

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_L,"colori_tutti.txt")
           GOSUB Get_Image_Morgana_L

           // 11/05/2020 - Emanuele - Aggiungo assegnazione per impostare i menu corretti delle finiture
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_L", "colori_luc.txt")
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 15
           posy = 155
           // 11/05/2020 - Emanuele - Modifico la dimensione del radiobutton
//           dimx = 120
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           // 11/05/2020 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0

           // 11/05/2020 - Emanuele - Aggiungo assegnazione
           $DLG_COLORE_MORGANA_O = "BCO"

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_O,"colori_tutti.txt")
           GOSUB Get_Image_Morgana_O

           // 11/05/2020 - Emanuele - Aggiungo assegnazione per impostare i menu corretti delle finiture
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_O", "colori_opa.txt")
        ]

      }

      // 11/05/2020 - Emanuele - Aggiungo radiobutton per la gestione dell'xglass
      Radio RdLucidoXG
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
//        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 15
           posy = 175
           // 11/05/2020 - Emanuele - Modifico la dimensione del radiobutton
//           dimx = 120
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass = 0

           $DLG_COLORE_MORGANA_L = "MR1"

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_L,"colori_tutti.txt")
           if(IF_METAL($DLG_COLORE_MORGANA_L)==0)
           {
              GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_L")
           }
           else
           {
               GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_MORGANA_L")
           }

           // 11/05/2020 - Emanuele - Aggiungo assegnazione per impostare i menu corretti delle finiture
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_L", "colori_xglass_metal.txt")
        ]

      }

      // 11/05/2020 - Emanuele - Aggiungo radiobutton per la gestione dell'xglass
      Radio RdOpacoXG
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
//        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 15
           posy = 195
           // 11/05/2020 - Emanuele - Modifico la dimensione del radiobutton
//           dimx = 120
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_opaco_xglass = 1
           $DLG_value_lucido_xglass = 0

           $DLG_COLORE_MORGANA_O = "MR1"

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_O,"colori_tutti.txt")
           if(IF_METAL($DLG_COLORE_MORGANA_O)==0)
           {
              GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_O")
           }
           else
           {
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_MORGANA_O")
           }

           // 11/05/2020 - Emanuele - Aggiungo assegnazione per impostare i menu corretti delle finiture
           VAR_SET_MENU(-1,"DLG_COLORE_MORGANA_O", "colori_xglass_metal.txt")
        ]

      }

   }

   //Massimiliano 09/06/15 - aggiungo la possibilit di cambiare la finitura della scocca diversamente dall'anta
   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         // 11/05/2020 - Emanuele - Modifico la posizione del riquadro
//         posx = 165
         posx = 220
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 50
         posx = 90
         // 11/05/2020 - Emanuele - Modifico la posizione del tasto annulla
//         posy = 200
         posy = 250
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 165
         posx = 5
         // 11/05/2020 - Emanuele - Modifico la posizione del tasto OK
//         posy = 200
         posy = 250
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         // Fabrizio 24/08/09
         //posx = 175
         // 11/05/2020 - Emanuele - Modifico la posizione del bottone
//         posx = 15
         posx = 40
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 11/05/2020 - Emanuele - Modifico le condizioni per la gestione dell'xglass
//         if($DLG_value_opaco==1)
         if($DLG_value_opaco==1 | $DLG_value_opaco_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_MORGANA_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_O,"colori_tutti.txt")
            // 11/05/2020 - Emanuele - Aggiungo condizione per la gestione dell'xglass
            if($DLG_value_opaco_xglass==0)
            {
               GOSUB Get_Image_Morgana_O
            }
            else
            {
               if(IF_METAL($DLG_COLORE_MORGANA_O)==0)
               {
                  GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_O")
               }
               else
               {
                  GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_MORGANA_O")
               }
            }
            $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_O
            $DLG_COLORE_MORGANA_L = $DLG_COLORE_MORGANA_O
         }

         // 11/05/2020 - Emanuele - Modifico condizione per la gestione dell'xglass
//         if($DLG_value_lucido==1)
         if($DLG_value_lucido==1 | $DLG_value_lucido_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_MORGANA_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_L,"colori_tutti.txt")
            // 11/05/2020 - Emanuele - Aggiungo condizione per la gestione dell'xglass
            if($DLG_value_lucido_xglass==0)
            {
               GOSUB Get_Image_Morgana_L
            }
            else
            {
               if(IF_METAL($DLG_COLORE_MORGANA_L)==0)
               {
                  GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_MORGANA_L")
               }
               else
               {
                  GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_MORGANA_L")
               }
            }
            $DLG_COLORE_MORGANA   = $DLG_COLORE_MORGANA_L
            $DLG_COLORE_MORGANA_O = $DLG_COLORE_MORGANA_L
         }

          //Massimiliano 10/06/15 - commento questa parte, voglio che i frontali non obblighino la scocca
//        //Massimiliano 09/06/15 - aggiungo la possibilit di cambiare la finitura della scocca diversamente dall'anta
//        if( STRCMP($DLG_COLORE_MORGANA,"ARG")!=0 & STRCMP($DLG_COLORE_MORGANA,"SZ1")!=0
//           & STRCMP($DLG_COLORE_MORGANA,"SZ2")!=0 & STRCMP($DLG_COLORE_MORGANA,"SZ3")!=0
//          )
//        {
//           $DLG_COLORE_MORGANA_SCC = $DLG_COLORE_MORGANA
//           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_SCC,"colori_tutti.txt")
//           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_MORGANA_SCC,".bmp")
//           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
//        }

      ]
   }

   //Massimiliano 09/06/15 - aggiungo la possibilit di cambiare la finitura della scocca diversamente dall'anta
   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         // 11/05/2020 - Emanuele - Modifico la posizione del bottone
//         posx = 180
         posx = 230
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_MORGANA_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_MORGANA_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_MORGANA_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}

// Fabrizio 24/08/09
Dlg Softbench
{
   Caption = MSG(923)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 170
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 45
            posy = 35
            dimx = 64
            dimy = 64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 5
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 15
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_SOFTBENCH")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SOFTBENCH,"colori_tutti.txt")
         GOSUB Get_Image_Softbench
      ]
   }
}

// Fabrizio 24/08/09
Dlg Logica
{
   Caption = MSG(924)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 185
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_LOGICA")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_LOGICA,"colori_tutti.txt")
         GOSUB Get_Image_Logica
      ]
   }
}

Dlg Steps
{
   Caption = MSG(925)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 170
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 5
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 15
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_STEPS")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_STEPS,"colori_tutti.txt")
         GOSUB Get_Image_Steps
      ]
   }
}

Dlg Steps2
{
   Caption = MSG(925)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 170
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Label LblAltezza
   {
     Caption = MSG(629)
     Hint    = MSG(926)
     Value   = MSG(629)

     Placement
     {
        posx = 10
        posy = 165
        dimx = 80
        dimy = 20
     }

   }

   Edit EdtAltezza
   {
     Caption = $DLG_caption_altezza
     Hint    = $DLG_hint_altezza
     Value   = $DLG_value_altezza

     Placement
     {
        posx = 60
        posy = 160
        dimx = 50
        dimy = 20
     }

     OnClick
     [
     ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(927)

      Placement
      {
         posx = 115
         posy = 160
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 5
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 15
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_STEPS")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_STEPS,"colori_tutti.txt")
         GOSUB Get_Image_Steps
      ]
   }
}

Dlg 368_Glass
{
   Caption = "368_Glass"
   Placement
   {
      posx = 150
      posy = 150
      //17.05.2017 - Filippo - ingrandisco la dialog
      //dimx = 380
//      dimx = 670
      dimx = 690
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 180
         dimy = 50
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        // 03/06/2019 - Emanuele - Modifico assegnazione per gestire l'enable nei pcf
//        Enable  = 1
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 90
           posy = 20
           dimx = 50
           dimy = 20
        }

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(624)
        // 03/06/2019 - Emanuele - Modifico assegnazione per gestire l'enable nei pcf
//        Enable  = 1
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame TipoGlass
   {
      //Caption = MSG(804)

      Placement
      {
         posx = 10
         posy = 65
         dimx = 180
         dimy = 100
      }

      Check SenzAng
      {
        Caption = MSG(187)
        Hint    = MSG(187)
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 10
           dimx = 170
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_1==1)
           {
               $DLG_value_rd_uso_1=1
               $DLG_enable_rd_uso_2=1
           }
           else
           {
               $DLG_value_rd_uso_1=0
               $DLG_enable_rd_uso_2=0
           }
        ]
      }

      Label LblScassoVT
      {
        Caption = MSG(188)
        Hint    = MSG(188)
        Enable  = $DLG_enable_rd_uso_2
        Value   = MSG(188)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 150
           dimy = 20
        }

      }

      Edit EdtScassoVT
      {
        //sempre attivo
        Caption = $DLG_caption_ScassoVT
        Hint    = $DLG_hint_ScassoVT
        Enable  = $DLG_enable_rd_uso_2
        Value   = $DLG_hint_ScassoVT

        Placement
        {
           posx = 10
           posy = 65
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 200
         posy = 10
//         dimx = 290
         dimx = 310
         dimy = 155
      }

      Radio rd1
      {
         Caption  = MSG(375)
         Hint     = MSG(375)
         Value    = $DLG_value_Vetro

         Placement
         {
            posx = 150
//            posy = 50
            posy = 30
            dimx = 150
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Vetro = 1
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione delle finiture metallizzate
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_COLORE_368_SPE_L = "BCO"
            $DLG_GEST_FINITURA = "DLG_COLORE_368_SPE_L"
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            GOSUB Get_Image_Lucido
            $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR(-1,$DLG_GEST_FINITURA),".bmp")
            $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
         ]
      }

      // 12/02/2020 - Emanuele - Aggiungo radiobutton per la gestione del vetro laccato opaco
            Radio rd6
      {
         Caption  = MSG(376)
         Hint     = MSG(376)
         Value    = $DLG_value_Vetro_Opaco

         Placement
         {
            posx = 150
//            posy = 50
            posy = 50
            dimx = 150
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Vetro_Opaco = 1
            $DLG_value_Vetro = 0
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_COLORE_368_SPE_L = "BCO"
            $DLG_GEST_FINITURA = "DLG_COLORE_368_SPE_L"
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR(-1,$DLG_GEST_FINITURA),".bmp")
            $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
         ]
      }


      Radio rd2
      {
         Caption  = $DLG_caption_XGlass_lucido
         Hint     = $DLG_hint_XGlass_lucido
         Value    = $DLG_value_XGlass_lucido
         Enable   = $DLG_enable_XGlass_lucido

         Placement
         {
            posx = 150
            posy = 70
//            posy = 50
            dimx = 150
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Vetro = 0
            $DLG_value_XGlass_lucido = 1
            $DLG_value_XGlass_opaco = 0
            // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione delle finiture metallizzate
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_COLORE_XGLASS = "MR1"
            $DLG_GEST_FINITURA = "DLG_COLORE_XGLASS"
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            GOSUB Get_Image_XGlass
            $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),VAR_VAL_STR(-1,$DLG_GEST_FINITURA),".bmp")
            $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
         ]
      }

      Radio rd3
      {
         Caption  = $DLG_caption_XGlass_opaco
         Hint     = $DLG_hint_XGlass_opaco
         Value    = $DLG_value_XGlass_opaco
         Enable   = $DLG_enable_XGlass_opaco

         Placement
         {
            posx = 150
            posy = 90
//            posy = 70
            dimx = 150
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Vetro = 0
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 1
            // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione delle finiture metallizzate
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_COLORE_XGLASS = "MR1"
            $DLG_GEST_FINITURA = "DLG_COLORE_XGLASS"
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            GOSUB Get_Image_XGlass
            $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),VAR_VAL_STR(-1,$DLG_GEST_FINITURA),".bmp")
            $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
         ]
      }
      // 10/05/2019 - Emanuele - Aggiungo radiobutton per la gestione delle finiture metallizzate
      Radio rd4
      {
         Caption  = $DLG_caption_Metal_lucido
         Hint     = $DLG_hint_Metal_lucido
         Value    = $DLG_value_Metal_lucido
         Enable   = $DLG_enable_Metal_lucido

         Placement
         {
            posx = 150
            posy = 110
//            posy = 90
            dimx = 150
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Vetro = 0
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            $DLG_value_Metal_lucido = 1
            $DLG_value_Metal_opaco = 0
            $DLG_COLORE_METAL = "MT4"
            $DLG_GEST_FINITURA = "DLG_COLORE_METAL"
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            GOSUB Get_Image_Lucido
            $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR(-1,$DLG_GEST_FINITURA),".bmp")
            $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
         ]
      }

      Radio rd5
      {
         Caption  = $DLG_caption_Metal_opaco
         Hint     = $DLG_hint_Metal_opaco
         Value    = $DLG_value_Metal_opaco
         Enable   = $DLG_enable_Metal_opaco

         Placement
         {
            posx = 150
            posy = 130
//            posy = 110
            dimx = 150
            dimy = 20
         }

         OnClick
         [
            $DLG_value_Vetro = 0
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 1
            $DLG_COLORE_METAL = "MT4"
            $DLG_GEST_FINITURA = "DLG_COLORE_METAL"
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR(-1,$DLG_GEST_FINITURA),".bmp")
            $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
         ]
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  40
            posy =  40
            dimx =  74
            dimy =  74
         }
      }
   }
   //17.05.2017 - Filippo - quando scelgo il colore della struttura in specchio
   //                        posso cambiare il colore dei lati
   Frame Finituralati
   {
      Caption = MSG(982)

      Placement
      {
//         posx = 500
         posx = 520
         posy = 10
         dimx = 150
         dimy = 155
      }

      Label LabFinLAT
      {
         Caption = $DLG_descrizione_lat_var
         Value   = $DLG_descrizione_lat_var
         Hint    = $DLG_descrizione_lat_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Img3
      {
         Caption = $DLG_descrizione_lat_var
         Value   = $DLG_image_file_lat
         Hint    = $DLG_descrizione_lat_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   //17.05.2017 - Filippo - nuovo bottone per gestione colore lati
   Button btnFinLAT
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(674)
      Enable = $DLG_enable_lati

      Placement
      {
//         posx = 510
         posx = 530
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_UA")

        $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_UA"),"colori_tutti.txt")
        $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_UA"),".bmp")
        $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(624)
      // 03/06/2019 - Emanuele - Modifico assegnazione per gestire l'enable nei pcf
//      Enable  = 1
      Enable  = $DLG_enable_lar_368

      Placement
      {
         posx = 155
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza_368")
         $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
         $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
         $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
         if($DLG_larghezza_368>368)  { $DLG_enable_rd_uso_1=1 }
         else                        { $DLG_enable_rd_uso_1=0 $DLG_value_rd_uso_1=0 }
         //Massimiliano 18/04/17 - quando sono glass madia disabilito l'opzione dello scasso perch  sempre attiva
         if( $DLG_GlassMadia == 1 ) { $DLG_enable_rd_uso_1=0 }
      ]
   }

   Button btnScassoVT
   {
      Caption = "..."
      Result  = 0
      Hint = $DLG_hint_ScassoVT
      Enable  = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 105
         posy = 130
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_ScassoVT")
        if($DLG_ScassoVT==0)  { $DLG_caption_ScassoVT = MSG(183) }
        if($DLG_ScassoVT==1)  { $DLG_caption_ScassoVT = MSG(184) }
        if($DLG_ScassoVT==2)  { $DLG_caption_ScassoVT = MSG(185) }
        if($DLG_ScassoVT==3)  { $DLG_caption_ScassoVT = MSG(186) }
        //$DLG_value_ScassoVT  = DLG_ScassoVT
        $DLG_hint_ScassoVT   = $DLG_caption_ScassoVT
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 210
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 04/09/2018 - Emanuele - Invece di usare una gest uso delle variabili perch altrimenti mi ritrovo
         // le finiture XGlass e quelle del vetro lucido tutte insieme
//         $R = CHIEDI($DLG_idx_to_call,"GEST_UE")
//         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_UE"),"colori_tutti.txt")
//         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_UE")
         // 26/09/2018 - Emanuele - Aggiungo una condizione che richiama la gest UE solo se l'elemento  un 368 Glass
         // laccato chiuso
         if($DLG_VAR_Extrachiaro==1)
         {
            $R = CHIEDI(-1,$DLG_GEST_FINITURA)
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_FINITURA),"colori_tutti.txt")
            // 04/09/2018 - Emanuele - Aggiungo una condizione per differenziare la procedura delle immagini per Xglass
            // e per il vetro lucido
            // 26/09/2018 - Emanuele - Faccio funzionare queste condizioni solo per il 368 Glass con i lati trasparenti
            if($DLG_value_Vetro==1)
            {
               $DLG_VAL_COLORE = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
               $DLG_COLORE_368_SPE_L = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
               GOSUB Get_Image_Lucido
            }
            else
            {
               // 12/02/2020 - Emanuele - Aggiungo condizione per la gestione del vetro laccato opaco
               if($DLG_value_Vetro_Opaco==0)
               {
                  $DLG_COLORE_XGLASS = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
                  GOSUB Get_Image_XGlass
               }
               else
               {
                  $DLG_VAL_COLORE = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
                  $DLG_COLORE_368_SPE_L = VAR_VAL_STR(-1,$DLG_GEST_FINITURA)
                  GOSUB Get_Image_Opaco
               }
            }
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_UE")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_UE"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_UE")
            GOSUB Get_Image_Lucido
         }

         //$DLG_image_file1 = $DLG_image_file
         //17.05.2017 - Filippo - quando il fondo  specchio do la possibilit di cambiare la finitura dei lati
         if($DLG_VAR_Extrachiaro == 0)
         {
            if( IS_MATCH($DLG_VAL_COLORE,"ARG") )
            {
               $DLG_enable_lati = 1
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_UA=",APICI(),"BCO",APICI()))
               $DLG_descrizione_lat_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_UA"),"colori_tutti.txt")
               $DLG_image_file_lat   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_UA"),".bmp")
               $DLG_image_file_lat   = SUBST_LABEL($DLG_image_file_lat)
            }
            else
            {
               $DLG_enable_lati = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_UA=",APICI(),$DLG_VAL_COLORE,APICI()))
               $DLG_descrizione_lat_var = $DLG_descrizione_var
               $DLG_image_file_lat   = $DLG_image_file
            }
         }
         else
         {
            $DLG_enable_lati = 0
            $DLG_descrizione_lat_var = $DLG_descrizione_var
            $DLG_image_file_lat   = $DLG_image_file
         }
      ]
   }
}

Dlg Frameet
{
   Caption = "FraMeet"
   Placement
   {
      posx = 150
      posy = 150
      dimx = 495
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 160
      }

      Edit EdtMisuFram
      {
        //sempre attivo
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_hint_misure

        Placement
        {
           posx = 60
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblMisuFram
      {
        //sempre attivo
        Caption = MSG(637)
        Hint    = MSG(637)
        Enable  = $DLG_enable_rd_uso_1
        Value   = MSG(637)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblScassoVT
      {
        Caption = MSG(2303)
        Hint    = MSG(2303)
        Enable  = $DLG_enable_rd_uso_1
        Value   = MSG(2303)

        Placement
        {
           posx = 10
           posy = 100
           dimx = 150
           dimy = 20
        }

      }

      Edit EdtScassoVT
      {
        Caption = $DLG_caption_ScassoVT
        Hint    = $DLG_hint_ScassoVT
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_hint_ScassoVT

        Placement
        {
           posx = 10
           posy = 120
           dimx = 110
           dimy = 20
        }

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 160
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  35
            posy =  35
            dimx =  80
            dimy =  80
         }
      }
   }

   Frame FinituraAM
   {
      Caption = MSG(602)

      Placement
      {
         posx = 325
         posy = 10
         dimx = 150
         dimy = 160
      }

      Label LabFinituraAM
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  35
            posy =  35
            dimx =  80
            dimy =  80
         }
      }
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = $DLG_hint_misure
      Enable  = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_MisuFram")
        if($DLG_MisuFram==0)  { $DLG_caption_MisuFram = "368x368"  }
        if($DLG_MisuFram==1)  { $DLG_caption_MisuFram = "552x552"  }
        if($DLG_MisuFram==2)  { $DLG_caption_MisuFram = "552x736"  }
        if($DLG_MisuFram==3)  { $DLG_caption_MisuFram = "736x1104" }
        $DLG_hint_misure   = $DLG_caption_MisuFram
      ]
   }

   Button btnScassoVT
   {
      Caption = "..."
      Result  = 0
      Hint = $DLG_hint_ScassoVT
      Enable  = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 135
         posy = 130
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_ScassoVT")
        if($DLG_ScassoVT==0)  { $DLG_caption_ScassoVT = MSG(183) }
        if($DLG_ScassoVT==1)  { $DLG_caption_ScassoVT = MSG(184) }
        if($DLG_ScassoVT==2)  { $DLG_caption_ScassoVT = MSG(185) }
        if($DLG_ScassoVT==3)  { $DLG_caption_ScassoVT = MSG(186) }
        //$DLG_value_ScassoVT  = DLG_ScassoVT
        $DLG_hint_ScassoVT   = $DLG_caption_ScassoVT
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 180
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_FraMwild==0)
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         }
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 335
         posy = 135
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_AC")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_AC"),"colori_tutti.txt")
         $DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_AC")
         GOSUB Get_Image_Opaco_NEW
         //$DLG_image_file2 = $DLG_image_file
      ]
   }

}

Dlg MensolaL
{
   Caption = MSG(1929)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = 1
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(624)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(626)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 55
           dimy = 20
        }

      }

   }

   Frame TipoMensola
   {
      //Caption = MSG(804)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 70
      }

      Radio MensolaAlta
      {
        Caption = MSG(1930)
        Hint    = MSG(1930)
        Enable  = 1
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 10
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio MensolaBassa
      {
        Caption = MSG(1931)
        Hint    = MSG(1931)
        Enable  = 1
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Bevel Bvl
   {
     Placement
     {
        posx = 10
        posy = 190
        dimx = 310
        dimy = 2
     }
   }

   Check chkProfSup
   {
      Caption = MSG(876)
      Hint    = MSG(876)
      Enable  = 1
      Value   = $DLG_value_rd_uso_3

      Placement
      {
         posx = 165
         posy = 160
         dimx = 150
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_rd_uso_3==1)  {  $DLG_value_rd_uso_3=1  }
         else                        {  $DLG_value_rd_uso_3=0  }
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(624)
      Enable  = 1

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
        $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
        $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(629)
      Enable  = 1

      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(626)
      Enable  = 1

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",STR($DLG_profondita_368))
        $DLG_caption_profondita_368 = STR($DLG_profondita_368)
        $DLG_value_profondita_368   = STR($DLG_profondita_368)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 160
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 75
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         // 23/10/2019 - Emanuele - Aggiungo assegnazione per aggiornare la descrizione della finitura in dialog
         $DLG_descrizione_var = $DLG_descrizione_var1
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }
}

Dlg MensolaL_Velcro
{
   Caption = MSG(1929)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 70
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = 1
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(624)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame TipoMensola
   {
      //Caption = MSG(804)

      Placement
      {
         posx = 10
         posy = 90
         dimx = 150
         dimy = 60
      }

      Radio MensolaAlta
      {
        Caption = MSG(1930)
        Hint    = MSG(1930)
        Enable  = 1
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 10
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio MensolaBassa
      {
        Caption = MSG(1931)
        Hint    = MSG(1931)
        Enable  = 1
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(624)
      Enable  = 1

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
        $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
        $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(629)
      Enable  = 1

      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 160
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 75
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }
}

Dlg NOW_Fianco
{
   Caption = MSG(748)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 550
      //
      //dimy = 290
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipologia
   {
      Caption = MSG(749)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 200
         // Fabrizio dal 28/07/11 x fianco legno laccato sp.19 mm
         // dimy = 105
         dimy = 235
      }

      // Fabrizio dal 28/07/11 x fianco legno laccato sp.25 mm
      Radio RdLaccato25
      {
        Caption = $DLG_caption_fianco0_now
        Hint    = $DLG_caption_fianco0_now
        Value   = $DLG_value_fianco0_now
        Enable  = $DLG_enable_fianco0_now


        Placement
        {
           posx = 10
           posy = $DLG_pos_fia_25
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 0
          GOSUB Config_Fianco0_Now
        ]

      }
      // Fabrizio dal 28/07/11 x fianco legno laccato sp.19 mm
      // l'altro da 25 lo sposto sotto.....(alla fine)
      Radio RdLaccato19
      {
        Caption = $DLG_caption_fianco3_now
        Hint    = $DLG_caption_fianco3_now
        Value   = $DLG_value_fianco3_now
        Enable  = $DLG_enable_fianco3_now

        Placement
        {
           posx = 10
           posy = $DLG_pos_fia_19
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 3
          GOSUB Config_Fianco3_Now
        ]
      }

      Radio RdVetro
      {
        Caption = $DLG_caption_fianco1_now
        Hint    = $DLG_caption_fianco1_now
        Value   = $DLG_value_fianco1_now
        Enable  = $DLG_enable_fianco1_now

        Placement
        {
           posx = 10
           posy = 75
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 1
          GOSUB Config_Fianco1_Now
        ]

      }

      Radio RdVetroDoppio
      {
        Caption = $DLG_caption_fianco2_now
        Hint    = $DLG_caption_fianco2_now
        Value   = $DLG_value_fianco2_now
        Enable  = $DLG_enable_fianco2_now

        Placement
        {
           posx = 10
           posy = 100
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 2
          GOSUB Config_Fianco2_Now
        ]

      }

      Radio RdLaccato16
      {
        Caption = $DLG_caption_fianco4_now
        Hint    = $DLG_caption_fianco4_now
        Value   = $DLG_value_fianco4_now
        Enable  = $DLG_enable_fianco4_now

        Placement
        {
           posx = 10
           posy = 125
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 4
          GOSUB Config_Fianco4_Now
        ]
      }

      Radio RdSmaAttAM
      {
        Caption = $DLG_caption_fianco5_now
        Hint    = $DLG_caption_fianco5_now
        Value   = $DLG_value_fianco5_now
        Enable  = $DLG_enable_fianco5_now

        Placement
        {
           posx = 10
           posy = 150
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 5
          GOSUB Config_Fianco5_Now
        ]
      }

      Radio RdSmaAttM
      {
        Caption = $DLG_caption_fianco6_now
        Hint    = $DLG_caption_fianco6_now
        Value   = $DLG_value_fianco6_now
        Enable  = $DLG_enable_fianco6_now

        Placement
        {
           posx = 10
           posy = 175
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 6
          GOSUB Config_Fianco6_Now
        ]
      }

      //Massimiliano 31/01/17 - gestisco fianco in accosto per basi laccate
      //Check FiancoAccostoLac
      //{
      //   Caption = MSG(2448)
      //   Value   = $DLG_accostoLac
      //
      //   Placement
      //   {
      //      posx = 10
      //      posy = 205
      //      dimx = 180
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //       $DLG_accostoLac = 1
      //   ]
      //}

      //23.08.2017 - Filippo - [PRIMA MODIFICA] come da richiesta di Yann, aggiungo la possibilit di scegliere un finaco intermedio
      //                       [SOLO SU METRON, NO PYH]
      Radio RdSmaAttM
      {
        Caption = MSG(3306)
        Hint    = MSG(3306)
        Value   = $DLG_value_fianco7_now
        Enable  = $DLG_enable_fianco7_now

        Placement
        {
           posx = 10
           posy = 200
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_tipo_fianco_now = 7
          GOSUB Config_Fianco7_Now
        ]
      }
   }

   // 13/12/2017 - Filippo - x gestione fianco spezzato
   Frame FrmFiaSpez
   {
      Caption = MSG(749)

      Placement
      {
         posx = 10
         posy = 245
         dimx = 200
         dimy = 40
      }

      Check chkFiaSpezz
      {
        Caption = MSG(3309)
        Hint    = MSG(3309)
        Enable  = $ENA_fianco_spezzato
        Value   = $DLG_fianco_spezzato

        Placement
        {
           posx = 20
           posy = 15
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_fianco_spezzato==1)
           {
              $DLG_fianco_spezzato = 1
           }
           else
           {
              $DLG_fianco_spezzato = 0
           }
        ]
      }

   }

   Frame Finitura1
   {
      Caption = MSG(750)
      Enable  = $DLG_enable_frame_1_now

      Placement
      {
         posx = 215
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame_1_now

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame_1_now

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_lucido

        Placement
        {
           posx = 45
           posy = 135
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           GOSUB Config_Fianco1_Now
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_opaco

        Placement
        {
           posx = 45
           posy = 155
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           GOSUB Config_Fianco1_Now

        ]

      }
   }

   Frame Finitura2R
   {
      Caption = MSG(753)
      Enable  = $DLG_enable_frame_2_now

      Placement
      {
         posx = 370
         posy = 10
         dimx = 85
         dimy = 215
      }

      Label LabRet
      {
         Caption = MSG(753)
         Value   = MSG(753)
         Hint    = MSG(754)
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx = 25
            posy = 190
            dimx = 50
            dimy = 20
         }
      }

      Label LabFinituraRet
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx = 10
            posy = 20
            dimx = 50
            dimy = 25
         }
      }

      Image ImRetro
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1_now
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx =  15
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucidoRet
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido1
        Enable  = $DLG_enable_lucido1

        Placement
        {
           posx = 15
           posy = 135
           dimx = 50
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido1 = 1
           $DLG_value_opaco1  = 0

           GOSUB Config_Fianco2_Now
        ]

      }

      Radio RdOpacoRet
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco1
        Enable  = $DLG_enable_opaco1

        Placement
        {
           posx = 15
           posy = 155
           dimx = 50
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco1 = 1
           $DLG_value_lucido1 = 0

           GOSUB Config_Fianco2_Now
        ]

      }
   }

   Frame Finitura2F
   {
      Caption = MSG(755)
      Enable  = $DLG_enable_frame_2_now

      Placement
      {
         posx = 455
         posy = 10
         dimx = 85
         dimy = 215
      }

      Label LabFro
      {
         Caption = MSG(755)
         Value   = MSG(755)
         Hint    = MSG(756)
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx = 25
            posy = 190
            dimx = 50
            dimy = 20
         }
      }

      Label LabFiniturFro
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx = 15
            posy = 20
            dimx = 50
            dimy = 25
         }
      }

      Image ImFronte
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2_now
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx =  13
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucidoFro
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido2
        Enable  = $DLG_enable_lucido2

        Placement
        {
           posx = 20
           posy = 135
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido2 = 1
           $DLG_value_opaco2  = 0
           GOSUB Config_Fianco2_Now
        ]
      }

      Radio RdOpacoFro
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco2
        Enable  = $DLG_enable_opaco2

        Placement
        {
           posx = 20
           posy = 155
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco2 = 1
           $DLG_value_lucido2 = 0
           GOSUB Config_Fianco2_Now
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 27/08/09
         //posx = 50
         posx = 300
         posy = 230
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 27/08/09
         posx = 215
         posy = 230
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable  = $DLG_enable_frame_1_now

      Placement
      {
         posx = 225
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        // Fabrizio dal 28/07/11 x fianco legno laccato sp.19 mm
        //if($DLG_tipo_fianco_now==0)
        if( $DLG_tipo_fianco_now==0 | $DLG_tipo_fianco_now==3 | $DLG_tipo_fianco_now==4  )
        {
           $R = CHIEDI(-1,"DLG_COLORE_NOW")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        }

        if( $DLG_tipo_fianco_now==1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_NOW1")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW1,"colori_tutti.txt")

           $DLG_enable_opaco  = 1
           $DLG_enable_lucido = 1

           if( STRCMP($DLG_COLORE_NOW1,"ARG")==0 )  { $DLG_enable_opaco = 0  }

           if($DLG_value_opaco==1)
           {
              $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW1,".bmp")
              $DLG_image_file      = SUBST_LABEL($DLG_image_file)
           }

           if($DLG_value_lucido==1)
           {
              $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW1,".bmp")
              $DLG_image_file      = SUBST_LABEL($DLG_image_file)
           }
        }
        if( $DLG_tipo_fianco_now==5 | $DLG_tipo_fianco_now==6 )
        {
           if(STRCMP($DLG_COLORE_NOW,"ME1")==0)
           {
              // ASSEGNO un default laccato bianco se era melaminico
              //$DLG_COLORE_NOW = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
           }
           COMANDO2(STRCAT("run_dll_cmd bdmdialog MakeDialog ",APICI(),SUBST_LABEL(STRCAT("%install_dir_pers%\tab_lago\tab_m4",CHR2STR(92))),"dialog.txt|FiancoAttSma",APICI()))
        }
      ]
   }

   Button btnFiniRet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(757)
      Enable  = $DLG_enable_frame_2_now

      Placement
      {
         posx = 380
         posy = 115
         dimx = 70
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_NOW2R")

        $DLG_enable_opaco1  = 1
        $DLG_enable_lucido1 = 1

        if( STRCMP($DLG_COLORE_NOW2R,"ARG")==0 )  { $DLG_enable_opaco1 = 0  }

         if($DLG_value_lucido1==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_luc.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_luc.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_luc_riv.txt")
            }

            $DLG_descrizione_var1  = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2R,"colori_tutti.txt")
            $DLG_image_file1_now = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW2R,".bmp")
            $DLG_image_file1_now  = SUBST_LABEL($DLG_image_file1_now)
         }

         if($DLG_value_opaco1==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_opa.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_opa.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_opa_riv.txt")
            }

            $DLG_descrizione_var1  = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2R,"colori_tutti.txt")
            $DLG_image_file1_now = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW2R,".bmp")
            $DLG_image_file1_now  = SUBST_LABEL($DLG_image_file1_now)
         }
      ]
   }

   Button btnFiniFro
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(757)
      Enable  = $DLG_enable_frame_2_now

      Placement
      {
         posx = 462
         posy = 115
         dimx = 70
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_NOW2F")


        $DLG_enable_opaco2  = 1
        $DLG_enable_lucido2 = 1

        if( STRCMP($DLG_COLORE_NOW2F,"ARG")==0 )  { $DLG_enable_opaco2 = 0  }

         if($DLG_value_lucido2==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_luc.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_luc.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_luc_riv.txt")
            }

            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2F,"colori_tutti.txt")
            $DLG_image_file2_now  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW2F,".bmp")
            $DLG_image_file2_now  = SUBST_LABEL($DLG_image_file2_now)
         }

         if($DLG_value_opaco2==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_opa.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_opa.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_opa_riv.txt")
            }

            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2F,"colori_tutti.txt")
            $DLG_image_file2_now  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW2F,".bmp")
            $DLG_image_file2_now  = SUBST_LABEL($DLG_image_file2_now)
         }
      ]
   }
}

Dlg Fianco_Duee
{
   Caption = MSG(748)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 490
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipologia
   {
      Caption = MSG(749)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Radio RdLaccato
      {
        Caption = $DLG_caption_fianco0_duee
        Hint    = $DLG_caption_fianco0_duee
        Value   = $DLG_value_laccato

        Placement
        {
           posx = 10
           posy = 25
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_vetro          = 0
           $DLG_value_laccato        = 1
           $DLG_value_melaminico     = 0
           $DLG_value_attrezzato_vtr = 0
           $DLG_value_attrezzato_lac = 0
           $DLG_enable_fiaAttr       = 0
           $DLG_enable_finitura      = 1
           $DLG_enable_cor           = 0
           $DLG_enable_rip           = 0
           $DLG_enable_app           = 0
           $DLG_fiancoAttr           = "FDL"
           $DLG_image_file7  = STRCAT("%install_dir_pers%\tab_lago\bmp",CHR2STR(92),$DLG_fiancoAttr,".JPG")
           $DLG_image_file7  = SUBST_LABEL($DLG_image_file7)
           $DLG_COLORE_DUEE_L = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB("BCO","colori_tutti.txt")
           $DLG_image_file      = "%install_dir%\tab_lago\tab_M4\images\menu\opaco\ME1.bmp"
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }

      Radio RdMelaminico
      {
        Caption = $DLG_caption_fianco4_duee
        Hint    = $DLG_caption_fianco4_duee
        Value   = $DLG_value_melaminico

        Placement
        {
           posx = 10
           posy = 45
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_value_vetro          = 0
          $DLG_value_melaminico     = 1
          $DLG_value_laccato        = 0
          $DLG_value_attrezzato_vtr = 0
          $DLG_value_attrezzato_lac = 0
          $DLG_enable_fiaAttr       = 0
          $DLG_enable_finitura      = 0
          $DLG_enable_cor           = 0
          $DLG_enable_rip           = 0
          $DLG_enable_app           = 0
          $DLG_fiancoAttr           = "FDL"
          $DLG_image_file7  = STRCAT("%install_dir_pers%\tab_lago\bmp",CHR2STR(92),$DLG_fiancoAttr,".JPG")
          $DLG_image_file7  = SUBST_LABEL($DLG_image_file7)
          $DLG_COLORE_DUEE_L = "ME1"
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB("ME1","colori_tutti.txt")
          $DLG_image_file      = "%install_dir%\tab_lago\tab_M4\images\menu\opaco\ME1.bmp"
          $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }

      Radio RdVetro
      {
        Caption = $DLG_caption_fianco1_duee
        Hint    = $DLG_caption_fianco1_duee
        Value   = $DLG_value_vetro

        Placement
        {
           posx = 10
           posy = 65
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_vetro          = 1
           $DLG_value_laccato        = 0
           $DLG_value_melaminico     = 0
           $DLG_value_attrezzato_vtr = 0
           $DLG_value_attrezzato_lac = 0
           $DLG_enable_fiaAttr       = 0
           $DLG_enable_finitura      = 1
           $DLG_enable_cor           = 0
           $DLG_enable_rip           = 0
           $DLG_enable_app           = 0
           $DLG_fiancoAttr           = "FDL"
           $DLG_image_file7  = STRCAT("%install_dir_pers%\tab_lago\bmp",CHR2STR(92),$DLG_fiancoAttr,".JPG")
           $DLG_image_file7  = SUBST_LABEL($DLG_image_file7)
           $DLG_COLORE_DUEE_V = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB("BCO","colori_tutti.txt")
           $DLG_image_file      = "%install_dir%\tab_lago\tab_M4\images\menu\opaco\ME1.bmp"
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }

      Radio RdFiaAttrVtr
      {
        Caption = $DLG_caption_fianco2_duee
        Hint    = $DLG_caption_fianco2_duee
        Value   = $DLG_value_attrezzato_vtr
        Enable  = $DLG_enable_fiaAt

        Placement
        {
           posx = 10
           posy = 85
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_value_vetro          = 0
          $DLG_value_laccato        = 0
          $DLG_value_melaminico     = 0
          $DLG_value_attrezzato_vtr = 1
          $DLG_value_attrezzato_lac = 0
          $DLG_enable_fiaAttr       = 1
          $DLG_enable_finitura      = 1

           $DLG_enable_cor           = 0
           $DLG_enable_rip           = 0
           $DLG_enable_app           = 0
           if( IS_MATCH($DLG_fiancoAttr,"*C") == 1 )  {  $DLG_enable_cor = 1  }
           if( IS_MATCH($DLG_fiancoAttr,"*32*") == 1 | IS_MATCH($DLG_fiancoAttr,"*33*") == 1 | IS_MATCH($DLG_fiancoAttr,"*5*") == 1 )  {  $DLG_enable_rip = 1  }
           if( IS_MATCH($DLG_fiancoAttr,"*3*") == 1 )  {  $DLG_enable_app = 1  }

           $DLG_COLORE_DUEE_V   = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_V,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_V,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)

           $DLG_COLORE_DUEE_COR     = "BCO"
           $DLG_descrizione_cornice = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_COR,"colori_tutti.txt")
           $DLG_image_file2         = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_COR,".bmp")
           $DLG_image_file2         = SUBST_LABEL($DLG_image_file2)

           $DLG_COLORE_DUEE_RIP     = "BCO"
           $DLG_descrizione_ripiani = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_RIP,"colori_tutti.txt")
           $DLG_image_file3         = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_RIP,".bmp")
           $DLG_image_file3         = SUBST_LABEL($DLG_image_file3)

           $DLG_COLORE_DUEE_APP          = "BCO"
           $DLG_descrizione_appendiabiti = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_APP,"colori_tutti.txt")
           $DLG_image_file4              = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_APP,".bmp")
           $DLG_image_file4              = SUBST_LABEL($DLG_image_file4)
        ]
      }

      Radio RdFiaAttrLac
      {
        Caption = $DLG_caption_fianco3_duee
        Hint    = $DLG_caption_fianco3_duee
        Value   = $DLG_value_attrezzato_lac
        Enable  = $DLG_enable_fiaAt

        Placement
        {
           posx = 10
           posy = 105
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_vetro          = 0
           $DLG_value_laccato        = 0
           $DLG_value_melaminico     = 0
           $DLG_value_attrezzato_vtr = 0
           $DLG_value_attrezzato_lac = 1
           $DLG_enable_fiaAttr       = 1
           $DLG_enable_finitura      = 1

           $DLG_enable_cor           = 0
           $DLG_enable_rip           = 0
           $DLG_enable_app           = 0
           if( IS_MATCH($DLG_fiancoAttr,"*C") == 1 )  {  $DLG_enable_cor = 1  }
           if( IS_MATCH($DLG_fiancoAttr,"*32*") == 1 | IS_MATCH($DLG_fiancoAttr,"*33*") == 1 | IS_MATCH($DLG_fiancoAttr,"*5*") == 1 )  {  $DLG_enable_rip = 1  }
           if( IS_MATCH($DLG_fiancoAttr,"*3*") == 1 )  {  $DLG_enable_app = 1  }

           $DLG_COLORE_DUEE_L   = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_L,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_L,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)

           $DLG_COLORE_DUEE_COR     = "BCO"
           $DLG_descrizione_cornice = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_COR,"colori_tutti.txt")
           $DLG_image_file2         = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_COR,".bmp")
           $DLG_image_file2         = SUBST_LABEL($DLG_image_file2)

           $DLG_COLORE_DUEE_RIP     = "BCO"
           $DLG_descrizione_ripiani = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_RIP,"colori_tutti.txt")
           $DLG_image_file3         = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_RIP,".bmp")
           $DLG_image_file3         = SUBST_LABEL($DLG_image_file3)

           $DLG_COLORE_DUEE_APP          = "BCO"
           $DLG_descrizione_appendiabiti = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_APP,"colori_tutti.txt")
           $DLG_image_file4              = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_APP,".bmp")
           $DLG_image_file4              = SUBST_LABEL($DLG_image_file4)
        ]
      }
   }

   Frame FinituraFianco
   {
      Caption = MSG(750)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame_1_now

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame TipoFianco
   {
      Caption = MSG(1486)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 130
      }

      Image Im7
      {
         Caption = $DLG_fiancoAttr
         Value   = $DLG_image_file7
         Hint    = $DLG_fiancoAttr

         Placement
         {
            posx =  45
            posy =  20
            dimx =  80
            dimy =  80
         }
      }
   }

   Frame FinituraCornice
   {
      Caption = MSG(1485)

      Placement
      {
         posx = 10
         posy = 150
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_cornice
         Value   = $DLG_descrizione_cornice
         Hint    = $DLG_descrizione_cornice

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_cornice
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_cornice

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }
   Frame FinituraRipiani
   {
      Caption = MSG(1478)

      Placement
      {
         posx = 165
         posy = 150
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_ripiani
         Value   = $DLG_descrizione_ripiani
         Hint    = $DLG_descrizione_ripiani

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_ripiani
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_ripiani

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraAppend
   {
      Caption = MSG(1458)

      Placement
      {
         posx = 320
         posy = 150
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_appendiabiti
         Value   = $DLG_descrizione_appendiabiti
         Hint    = $DLG_descrizione_appendiabiti

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_appendiabiti
         Value   = $DLG_image_file4
         Hint    = $DLG_descrizione_appendiabiti

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 27/08/09
         //posx = 50
         posx = 405
         posy = 290
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 27/08/09
         posx = 320
         posy = 290
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         GOSUB AssegnazioneRadDuee
         $DLG_GESTZ = 25
         if( $DLG_value_vetro == 1 | $DLG_value_attrezzato_vtr == 1 )  {  $DLG_GESTZ = 29  }
         VAR_VALUE_SET($DLG_idx_to_call,"GEST_Z",$DLG_GESTZ)
         GOSUB CambiaRadDlg
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable  = $DLG_enable_finitura

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if(  $DLG_value_laccato == 1 | $DLG_value_attrezzato_lac == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_DUEE_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_L,"colori_tutti.txt")
            $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_L,".bmp")
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_DUEE_V")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_V,"colori_tutti.txt")
            $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_DUEE_V,".bmp")
         }
         $DLG_image_file      = SUBST_LABEL($DLG_image_file)
      ]
   }
   Button btnTipoFianco
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1477)
      Enable  = $DLG_enable_fiaAttr

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_fiancoAttr")
         $DLG_image_file7  = STRCAT("%install_dir_pers%\tab_lago\bmp",CHR2STR(92),$DLG_fiancoAttr,".JPG")
         $DLG_image_file7  = SUBST_LABEL($DLG_image_file7)

         $DLG_enable_rip = 0
         $DLG_enable_cor = 0
         $DLG_enable_app = 0

         if( IS_MATCH($DLG_fiancoAttr,"*32*") == 1 | IS_MATCH($DLG_fiancoAttr,"*33*") == 1 | IS_MATCH($DLG_fiancoAttr,"*5*") == 1 )  {  $DLG_enable_rip = 1  }
         if( IS_MATCH($DLG_fiancoAttr,"*C" ) == 1 )  {  $DLG_enable_cor = 1  }
         if( IS_MATCH($DLG_fiancoAttr,"*3*") == 1 )  {  $DLG_enable_app = 1  }
      ]
   }

   Button btnFinituraCornice
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1477)
      Enable  = $DLG_enable_cor

      Placement
      {
         posx = 20
         posy = 255
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_DUEE_COR")
         $DLG_descrizione_cornice = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_COR,"colori_tutti.txt")
         $DLG_image_file2         = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_COR,".bmp")
         $DLG_image_file2         = SUBST_LABEL($DLG_image_file2)
      ]
   }
   Button btnFinituraRipiani
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1478)
      Enable  = $DLG_enable_rip

      Placement
      {
         posx = 175
         posy = 255
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_DUEE_RIP")
         $DLG_descrizione_ripiani = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_RIP,"colori_tutti.txt")
         $DLG_image_file3         = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_RIP,".bmp")
         $DLG_image_file3         = SUBST_LABEL($DLG_image_file3)
      ]
   }
   Button btnFinituraAppend
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1458)
      Enable  = $DLG_enable_app

      Placement
      {
         posx = 330
         posy = 255
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_DUEE_APP")
         $DLG_descrizione_appendiabiti = DESCRIZIONE_VAL_TAB($DLG_COLORE_DUEE_APP,"colori_tutti.txt")
         $DLG_image_file4              = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_DUEE_APP,".bmp")
         $DLG_image_file4              = SUBST_LABEL($DLG_image_file4)
      ]
   }
}

Dlg Anta_Duee
{
   Caption = MSG(748)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 280
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipologia
   {
      Caption = MSG(1487)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 100
         dimy = 80
      }

      Radio RdNormale
      {
        Caption = MSG(1489)
        Hint    = MSG(1489)
        Value   = $DLG_value_anta_normale
        Enable  = $DLG_enable_anta

        Placement
        {
           posx = 10
           posy = 25
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_value_anta_normale   = 1
          $DLG_value_anta_sporgente = 0
        ]

      }

      Radio RdSporgente
      {
        Caption = MSG(1488)
        Hint    = MSG(1488)
        Value   = $DLG_value_anta_sporgente
        Enable  = $DLG_enable_anta

        Placement
        {
           posx = 10
           posy = 45
           dimx = 180
           dimy = 20
        }

        OnClick
        [
          $DLG_value_anta_normale   = 0
          $DLG_value_anta_sporgente = 1
        ]

      }
   }

   Frame FrmApertura
   {
      Caption = MSG(108)

      Placement
      {
         posx = 10
         posy = 90
         dimx = 100
         dimy = 80
      }

      Radio RdDX
      {
        Caption = MSG(561)
        Hint    = MSG(561)
        Value   = $DLG_value_ape_dx
        Enable  = $DLG_enable_ape

        Placement
        {
           posx = 10
           posy = 25
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_ape_dx = 1
           $DLG_value_ape_sx = 0
        ]

      }

      Radio RdSX
      {
        Caption = MSG(562)
        Hint    = MSG(562)
        Value   = $DLG_value_ape_sx
        Enable  = $DLG_enable_ape

        Placement
        {
           posx = 10
           posy = 45
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_ape_dx = 0
           $DLG_value_ape_sx = 1
        ]

      }
   }

   //Massimiliano 30/05/16 - spostato attivazione led anche su Dialog
   Check chkIllum
   {
     Caption = MSG(1464)
     Hint    = MSG(1464)
     Enable  = $DLG_enable_led
     Value   = $DLG_value_led

     Placement
     {
        posx = 15
        posy = 180
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_led==1)   {  $DLG_value_led=1  }
        else                    {  $DLG_value_led=0  }
     ]

   }

   Frame Finitura
   {
      Caption = MSG(750)

      Placement
      {
         posx = 110
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         //Enable  = $DLG_enable_finitura

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Img
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_finitura

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_vtr
        Enable  = $DLG_enable_finitura

        Placement
        {
           posx = 15
           posy = 135
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_value_vtr     = 1
           $DLG_value_lac     = 0
           $DLG_COLORE_ANTA_V = $DLG_COLORE_ANTA_L
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_lac
        Enable  = $DLG_enable_finitura

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_vtr     = 0
           $DLG_value_lac     = 1
           $DLG_COLORE_ANTA_L = $DLG_COLORE_ANTA_V
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 195
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 110
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 120
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //if( $DLG_tipo_fianco_now==0 | $DLG_tipo_fianco_now==3 | $DLG_tipo_fianco_now==4  )
        //{
        //   $R = CHIEDI(-1,"DLG_COLORE_NOW")
        //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
        //   $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
        //   $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        //}
        //
        //if( $DLG_tipo_fianco_now==1 )
        //{
        //   $R = CHIEDI(-1,"DLG_COLORE_NOW1")
        //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW1,"colori_tutti.txt")
        //
        //   $DLG_enable_opaco  = 1
        //   $DLG_enable_lucido = 1
        //
        //   if( STRCMP($DLG_COLORE_NOW1,"ARG")==0 )  { $DLG_enable_opaco = 0  }
        //
        //   if($DLG_value_opaco==1)
        //   {
        //      $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW1,".bmp")
        //      $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        //   }
        //
        //   if($DLG_value_lucido==1)
        //   {
        //      $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW1,".bmp")
        //      $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        //   }
        //}

        if(  $DLG_value_lac == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_ANTA_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_ANTA_L,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_ANTA_L,".bmp")
        }
        else
        {
           $R = CHIEDI(-1,"DLG_COLORE_ANTA_V")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_ANTA_V,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_ANTA_V,".bmp")
        }
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
      ]
   }
}

Dlg FiancoAttSma
{
   Caption = MSG(1476)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 625
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTamp
   {
      Caption = MSG(1477)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_ES
         Value   = $DLG_descrizione_ES
         Hint    = $DLG_descrizione_ES
         //Enable  = 1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_ES
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_ES
         //Enable  = 1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraFianco
   {
      Caption = MSG(1470)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         //Enable  = 1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         //Enable  = 1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraRipiani
   {
      Caption = MSG(1478)

      Placement
      {
         posx = 310
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_RI
         Value   = $DLG_descrizione_RI
         Hint    = $DLG_descrizione_RI
         //Enable  = 1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_RI
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_RI
         //Enable  = 1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraAppend
   {
      Caption = MSG(1458)

      Placement
      {
         posx = 460
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_AC
         Value   = $DLG_descrizione_AC
         Hint    = $DLG_descrizione_AC

         Placement
         {
            posx = 45
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_AC
         Value   = $DLG_image_file4
         Hint    = $DLG_descrizione_AC
         Enable  = $DLG_enable_AC

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 395
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 310
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTamp
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1477)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOWES")
         $DLG_descrizione_ES = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOWES,"colori_tutti.txt")
         $DLG_image_file2     = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOWES,".bmp")
         $DLG_image_file2     = SUBST_LABEL($DLG_image_file2)
      ]
   }

   Button btnFinituraFianco
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1470)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
         $DLG_image_file      = SUBST_LABEL($DLG_image_file)
      ]
   }

   Button btnFinituraRipiani
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1478)

      Placement
      {
         posx = 320
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOWRI")
         $DLG_descrizione_RI = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOWRI,"colori_tutti.txt")
         $DLG_image_file3     = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOWRI,".bmp")
         $DLG_image_file3     = SUBST_LABEL($DLG_image_file3)
      ]
   }

   Button btnFinituraAppend
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1458)
      Enable  = $DLG_enable_AC

      Placement
      {
         posx = 470
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOWAC")
         $DLG_descrizione_AC = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOWAC,"colori_tutti.txt")
         $DLG_image_file4     = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOWAC,".bmp")
         $DLG_image_file4     = SUBST_LABEL($DLG_image_file4)
      ]
   }
}

Dlg FiancoAttr
{
   Caption = MSG(1476)
   Placement
   {
      posx = 15
      posy = 150
      dimx = 780
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTamp
   {
      Caption = MSG(1485)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_ES
         Value   = $DLG_descrizione_ES
         Hint    = $DLG_descrizione_ES
         //Enable  = 1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_ES
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_ES
         //Enable  = 1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraFianco
   {
      Caption = MSG(1470)

      Placement
      {
         posx = 310
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         //Enable  = 1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         //Enable  = 1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraRipiani
   {
      Caption = MSG(1478)

      Placement
      {
         posx = 460
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_RI
         Value   = $DLG_descrizione_RI
         Hint    = $DLG_descrizione_RI
         //Enable  = 1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_RI
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_RI
         //Enable  = 1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraAppend
   {
      Caption = MSG(1458)

      Placement
      {
         posx = 610
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_AC
         Value   = $DLG_descrizione_AC
         Hint    = $DLG_descrizione_AC

         Placement
         {
            posx = 45
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_AC
         Value   = $DLG_image_file4
         Hint    = $DLG_descrizione_AC
         Enable  = $DLG_enable_AC

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 395
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 310
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTamp
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1477)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOWES")
         $DLG_descrizione_ES = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOWES,"colori_tutti.txt")
         $DLG_image_file2     = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOWES,".bmp")
         $DLG_image_file2     = SUBST_LABEL($DLG_image_file2)
      ]
   }

   Button btnFinituraFianco
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1470)

      Placement
      {
         posx = 320
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
         $DLG_image_file      = SUBST_LABEL($DLG_image_file)
      ]
   }

}

Dlg Now_Fascia
{
   Caption = MSG(758)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_lucido

     Placement
     {
        posx = 60
        posy = 155
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)

         if( STRCMP($DLG_COLORE_NOW,"ARG")==0 )
         {
            $DLG_enable_opaco = 0
         }
         else
         {
            $DLG_COLORE_NOW_O = $DLG_COLORE_NOW_L
            $DLG_enable_opaco = 1
         }

     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_opaco

     Placement
     {
        posx = 60
        posy = 175
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 1
        $DLG_value_lucido = 0

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)

        $DLG_COLORE_NOW   = $DLG_COLORE_NOW_O
        $DLG_COLORE_NOW_L = $DLG_COLORE_NOW_O
     ]
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [

         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_O,"colori_tutti.txt")
            GOSUB Get_Image_NOW_O
            $DLG_COLORE_NOW   = $DLG_COLORE_NOW_O
            $DLG_COLORE_NOW_L = $DLG_COLORE_NOW_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_L,"colori_tutti.txt")
            GOSUB Get_Image_NOW_L
            $DLG_COLORE_NOW   = $DLG_COLORE_NOW_L
            $DLG_COLORE_NOW_O = $DLG_COLORE_NOW_L

            if( STRCMP($DLG_COLORE_NOW,"ARG")==0 )
            {
               $DLG_enable_opaco = 0
            }
            else
            {
               $DLG_COLORE_NOW_O = $DLG_COLORE_NOW_L
               $DLG_enable_opaco = 1
            }

         }
      ]
   }
}

Dlg NOW_FiancoEV
{
   Caption = MSG(748)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 660
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoFianco
   {
      Caption = MSG(464)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 90
      }

      Radio Fianco_Normale
      {
        Caption = MSG(465)
        Hint    = MSG(465)
        Enable  = 1
        Value   = $DLG_Fianco_Normale

        Placement
        {
           posx = 10
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_RAD = "FCXTLAEV"
           if($FiaDx == 1) { $DLG_RAD = STRCAT($DLG_RAD,"DX") }
           else            { $DLG_RAD = STRCAT($DLG_RAD,"SX") }
           GOSUB CambiaRadDlg
           $DLG_Fianco_Normale = 1
           $DLG_Fianco_Tessuto = 0
           $DLG_enable_rd_uso_1 = 1
           $DLG_enable_rd_uso_2 = 1
        ]

      }

      Radio Fianco_Tessuto
      {
        Caption = MSG(466)
        Hint    = MSG(466)
        Enable  = $DLG_enable_rd_uso_1
        Value   = $DLG_Fianco_Tessuto

        Placement
        {
           posx = 10
           posy = 55
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_RAD = "FCXTTNEV"
           if($FiaDx == 1) { $DLG_RAD = STRCAT($DLG_RAD,"DX") }
           else            { $DLG_RAD = STRCAT($DLG_RAD,"SX") }
           $DLG_Fianco_Normale = 0
           $DLG_Fianco_Tessuto = 1
           $DLG_enable_rd_uso_1 = 1
           $DLG_enable_rd_uso_2 = 0
           $DLG_value_rd_uso_1 = 0
           GOSUB CambiaRadDlg
           if( VAR_EXIST($DLG_idx_to_call_1,"GEST_RZ")==1 )
           {
              $menu_get = VAR_MENU($DLG_idx_to_call_1,"GEST_RZ")
              $menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
              if( STRCMP($menu_get,"")==0 | STRCMP($menu_get,$menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call_1,"GEST_RZ",$menu_set) }
              $modo_get = VAR_MODE($DLG_idx_to_call_1,"GEST_RZ")
              $modo_set = 131072
              if( $modo_get!=$modo_set ) { VAR_SET_MODE($DLG_idx_to_call_1,"GEST_RZ",$modo_set) }
              //COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call_1)," GEST_RZ=",APICI(),"Z01",APICI()))
           }
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_ST=",APICI(),"ME1",APICI()))
           $DLG_COLORE_NOW = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
           $DLG_image_file = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
           $DLG_image_file = SUBST_LABEL($DLG_image_file)
           $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_1,"GEST_RZ"),"colori_tutti.txt")
           $DLG_COLORE_FIA_TES = VAR_VAL_STR($DLG_idx_to_call_1,"GEST_RZ")
           $DLG_image_file2 = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\Rivestimenti",CHR2STR(92),$DLG_COLORE_FIA_TES,".bmp")
           $DLG_image_file2 = SUBST_LABEL($DLG_image_file2)
        ]
      }
   }

   Frame FiancoNicchia
   {
      //Caption = MSG(464)

      Placement
      {
         posx = 10
         posy = 110
         dimx = 150
         dimy = 45
      }

      Check chkNicchia
      {
         Caption = MSG(782)
         Hint    = MSG(782)
         // Eugenio 25.01.13 Blocco l'uso del fianco in nicchia fino a quando non sar possibile farlo
         // Eugenio 06.02.13 Riabilitato l'uso
         Enable  = $DLG_Fianco_Normale
         //Enable = 0
         Value   = $DLG_value_rd_uso_1

         Placement
         {
            posx = 10
            posy = 15
            dimx = 130
            dimy = 20
         }

         OnClick
         [
            if($DLG_value_rd_uso_1==1)
            {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_ST=",APICI(),"ME1",APICI()))
               $DLG_COLORE_NOW = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
               $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
               $DLG_image_file = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
               $DLG_image_file = SUBST_LABEL($DLG_image_file)

               GOSUB CaricaRadicePrf
               $DLG_value_rd_uso_1 = 1
               $DLG_Fianco_Tessuto = 0
               $DLG_Fianco_Normale = 1
               $DLG_enable_rd_uso_1 = 0
               // Eugenio visto che chiede in automatico la finiture del profilo con le righe sotto riporto il tutto sulla dialog
               $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_2,"GEST_PF"),"colori_tutti.txt")
               $DLG_COLORE_PRF = VAR_VAL_STR($DLG_idx_to_call_2,"GEST_PF")
               $DLG_image_file3_now = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_PRF,".bmp")
               $DLG_image_file3_now = SUBST_LABEL($DLG_image_file3_now)
            }
            else
            {
               $DLG_value_rd_uso_1 = 0
               $DLG_enable_rd_uso_1 = 1
            }
         ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraProfilo
   {
      Caption = MSG(1923)

      Placement
      {
         posx = 325
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3_now
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTessuto
   {
      Caption = MSG(467)

      Placement
      {
         posx = 490
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 165
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 165
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 175
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
        $DLG_COLORE_NOW = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
        $DLG_image_file = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW,".bmp")
        $DLG_image_file = SUBST_LABEL($DLG_image_file)
      ]
   }

   Button btnFinituraProfilo
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_rd_uso_1

      Placement
      {
         posx = 335
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call_2,"GEST_PF")
        $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_2,"GEST_PF"),"colori_tutti.txt")
        $DLG_COLORE_PRF = VAR_VAL_STR($DLG_idx_to_call_2,"GEST_PF")
        $DLG_image_file3_now = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_PRF,".bmp")
        $DLG_image_file3_now = SUBST_LABEL($DLG_image_file3_now)
      ]
   }

   Button btnFinituraTessuto
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_Fianco_Tessuto

      Placement
      {
         posx = 495
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call_1,"GEST_RZ")
        $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_1,"GEST_RZ"),"colori_tutti.txt")
        $DLG_COLORE_FIA_TES = VAR_VAL_STR($DLG_idx_to_call_1,"GEST_RZ")
        //$R = CHIEDI(-1,"DLG_COLORE_FIA_TES")
        //$DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_FIA_TES,"colori_tutti.txt")
        $DLG_image_file2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\Rivestimenti",CHR2STR(92),$DLG_COLORE_FIA_TES,".bmp")
        $DLG_image_file2      = SUBST_LABEL($DLG_image_file2)
      ]
   }

}


Dlg NOW_SchTesEV
{
   Caption = MSG(261)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTes
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 165
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 165
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTes
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
        $DLG_COLORE_SCH_TES = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SCH_TES,"colori_tutti.txt")
        $DLG_image_file = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\Rivestimenti",CHR2STR(92),$DLG_COLORE_SCH_TES,".bmp")
        $DLG_image_file = SUBST_LABEL($DLG_image_file)
      ]
   }

}


Dlg ScoccaEV
{
   Caption = MSG(783)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 200
      //07.06.2017 - Filippo - chiedo la schiena all'inserimento
      //dimy = 505
      dimy = 580
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 185
         dimy = 130
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 105
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 105
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 105
           posy = 75
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtAsse
      {
        Caption = $DLG_caption_asse
        Hint    = $DLG_hint_asse
        Value   = $DLG_value_asse

        Placement
        {
           posx = 105
           posy = 100
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(624)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 100
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 100
           dimy = 20
        }
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(626)
        Value   = MSG(626)

        Placement
        {
           posx = 5
           posy = 80
           dimx = 100
           dimy = 20
        }
      }

      Label LblAsse
      {
        Caption = MSG(784)
        Hint    = MSG(784)
        Value   = MSG(784)

        Placement
        {
           posx = 5
           posy = 105
           dimx = 100
           dimy = 20
        }
      }

   }

   Frame Presenza_SecAlbero
   {
      Placement
      {
         posx = 5
         posy = 145
         dimx = 185
         dimy = 60
      }

      Check chkSecAlb
      {
        Caption = MSG(1455)
        Hint    = MSG(1455)
        Enable  = 1
        Value   = $DLG_value_rd_uso_5

        Placement
        {
           posx = 10
           posy =  5
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_5==1)
           {
              $DLG_value_rd_uso_5 = 1
              $DLG_enable_rd_uso_5 = 1
           }
           else
           {
              $DLG_value_rd_uso_5 = 0
              $DLG_enable_rd_uso_5 = 0
           }
        ]
      }

      Edit EdtAsse2A
      {
        Caption = $DLG_caption_2asse
        Hint    = $DLG_hint_2asse
        Value   = $DLG_value_2asse
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 105
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblAsse2A
      {
        Caption = MSG(1454)
        Hint    = MSG(1454)
        Value   = MSG(1454)

        Placement
        {
           posx = 5
           posy = 35
           dimx = 100
           dimy = 20
        }
      }

   }

   Frame Presenza_Schiena19_SX
   {
      Placement
      {
         posx = 5
         posy = 210 //145
         dimx = 185
         dimy = 60
      }

      Check chkSc19Sx
      {
        Caption = MSG(785)
        Hint    = MSG(785)
        Enable  = 1
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy =  5
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_1==1)
           {
              $DLG_value_rd_uso_1 = 1
              $DLG_enable_rd_uso_1 = 1
           }
           else
           {
              $DLG_value_rd_uso_1 = 0
              $DLG_enable_rd_uso_1 = 0
           }
        ]
      }

      Edit EdtLarSc19Sx
      {
        Caption = $DLG_caption_lripcassx
        Hint    = $DLG_hint_lripcassx
        Value   = $DLG_value_lripcassx
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 105
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarSc19Sx
      {
        Caption = MSG(787)
        Hint    = MSG(787)
        Value   = MSG(787)

        Placement
        {
           posx = 5
           posy = 35
           dimx = 100
           dimy = 20
        }
      }

   }

   Frame Presenza_Schiena19_DX
   {
      Placement
      {
         posx = 5
         posy = 275 //210
         dimx = 185
         dimy = 60
      }

      Check chkSc19Dx
      {
        Caption = MSG(786)
        Hint    = MSG(786)
        Enable  = 1
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy =  5
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_2==1)
           {
              $DLG_value_rd_uso_2 = 1
              $DLG_enable_rd_uso_2 = 1
           }
           else
           {
              $DLG_value_rd_uso_2 = 0
              $DLG_enable_rd_uso_2 = 0
           }
        ]
      }

      Edit EdtLarSc19Dx
      {
        Caption = $DLG_caption_lripcasdx
        Hint    = $DLG_hint_lripcasdx
        Value   = $DLG_value_lripcasdx
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 105
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarSc19Dx
      {
        Caption = MSG(787)
        Hint    = MSG(787)
        Value   = MSG(787)

        Placement
        {
           posx = 5
           posy = 35
           dimx = 100
           dimy = 20
        }
      }

   }

   Frame Presenza_Schiena_Tes
   {
      Placement
      {
         posx = 5
         posy = 340 //275
         dimx = 185
         dimy = 40
      }

      Check chkScTes
      {
        Caption = MSG(797)
        Hint    = MSG(797)
        Enable  = 1
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 10
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_3==1)
           {
              $DLG_value_rd_uso_3 = 1
           }
           else
           {
              $DLG_value_rd_uso_3 = 0
           }
        ]
      }
   }

   Frame Presenza_Schiena_Vet
   {
      Placement
      {
         posx = 5
         posy = 385
         dimx = 185
         dimy = 40
      }

      Check chkScVet
      {
        Caption = MSG(1403)
        Hint    = MSG(1403)
        Enable  = 1
        Value   = $DLG_value_rd_uso_4

        Placement
        {
           posx = 10
           posy = 10
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_4==1)
           {
              $DLG_value_rd_uso_4 = 1
           }
           else
           {
              $DLG_value_rd_uso_4 = 0
           }
        ]
      }
   }

   //07.06.2017 - Filippo - chiedo la schiena all'inserimento
   Frame VersoSchienali
   {
      Caption = MSG(1924)
      Placement
      {
         posx = 5
         posy = 425
         dimx = 215
         dimy = 55
      }

      Radio rdSch1
      {
        Caption = MSG(3302)
        Hint    = MSG(3302)
        Enable  = $DLG_Ena_RdSchiena
        Value   = $DLG_rd_schiena1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_verso_schiena = 1
        ]
      }

      Radio rdSch2
      {
        Caption = MSG(3303)
        Hint    = MSG(3303)
        Enable  = $DLG_Ena_RdSchiena
        Value   = $DLG_rd_schiena2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           $DLG_verso_schiena = 0
        ]
      }
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(439)

      Placement
      {
         posx = 160
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
        //Eugenio 15/04/13 calcolo ad ogni modifica della larghezza l'asse medio
        $DLG_asse = $DLG_larghezza/2
        $DLG_hint_asse    = STRCAT(MSG(784)," = ",STR($DLG_asse))
        $DLG_caption_asse = STR($DLG_asse)
        $DLG_value_asse   = STR($DLG_asse)
        // Eugenio 09.01.14 Imposto limite massimo Coperchio Et Voil 230cm come da mail Enrico Saggion 08.01.14
/// commenta le due righe sotto che servono solo per gestire i VOILA 2 alberi
//        $AsseMin = 200
//        $AsseMax = $DLG_larghezza - 200
        //VAR_SET_MENU(-1,"DLG_asse",STRCAT("(200-",STR($AsseMax),")"))
        // Eugenio 10.02.14 Assemin deve valere almeno 200mm
      // Eugenio 14.07.14 Come da indicazioni N.Ius e M.Coraccin passo da 200 da fianco a 200 coperchio
        if( ( $DLG_larghezza - 2325 ) > 225)  { $AsseMin = $DLG_larghezza - 2325 }
        else                                  { $AsseMin = 225 }
        //$AsseMin = $DLG_larghezza - 2325
        if( ( $DLG_larghezza - 225 ) > 2325)  { $AsseMax = 2325 }
        else                                  { $AsseMax = $DLG_larghezza - 225 }
        VAR_SET_MENU(-1,"DLG_asse",STRCAT("(",STR($AsseMin),"-",STR($AsseMax),")"))
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 160
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(430)

      Placement
      {
         posx = 160
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnAsse
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(430)

      Placement
      {
         posx = 160
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        // Eugenio 09.01.14 Imposto limite massimo Coperchio Et Voil 230cm come da mail Enrico Saggion 08.01.14
        //$AsseMin = $DLG_larghezza - 2325
        // Eugenio 10.02.14 Assemin deve valere almeno 200mm
      // Eugenio 14.07.14 Come da indicazioni N.Ius e M.Coraccin passo da 200 da fianco a 200 coperchio

/// commenta le due righe sotto che servono solo per gestire VOILA speciali due alberi
//        $AsseMin = 200
//        $AsseMax = $DLG_larghezza - 200

        // Eugenio 22.05.15 Devo tener conto dell'eventuale secondo albero
        //if( ( $DLG_larghezza - 2325 ) > 225)  { $AsseMin = $DLG_larghezza - 2325 }
        //else                                  { $AsseMin = 225 }
        //if( ( $DLG_larghezza - 225 ) > 2325)  { $AsseMax = 2325 }
        //else                                  { $AsseMax = $DLG_larghezza - 225 }
        if( ( $DLG_larghezza - 2325 ) > 225 & $DLG_value_rd_uso_5==0 )  { $AsseMin = $DLG_larghezza - 2325 }
        else                                                            { $AsseMin = 225 }
        if( ( $DLG_larghezza - 225 ) > 2325)  { $AsseMax = 2325 }
        else                                  { $AsseMax = $DLG_larghezza - 225 }
        VAR_SET_MENU(-1,"DLG_asse",STRCAT("(",STR($AsseMin),"-",STR($AsseMax),")"))
        $R = CHIEDI(-1,"DLG_asse")
        $DLG_hint_asse    = STRCAT(MSG(784)," = ",STR($DLG_asse))
        $DLG_caption_asse = STR($DLG_asse)
        $DLG_value_asse   = STR($DLG_asse)
      ]
   }

   Button btnAsse2A
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1454)
      Enable  = $DLG_enable_rd_uso_5

      Placement
      {
         posx = 160
         posy = 175
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_2asse")
        $DLG_hint_2asse    = STRCAT(MSG(1454)," = ",STR($DLG_2asse))
        $DLG_caption_2asse = STR($DLG_2asse)
        $DLG_value_2asse   = STR($DLG_2asse)
      ]
   }

   Button btnLarSc19Sx
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(788)
      Enable  = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 160
         posy = 240 //175
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_LarRipCas_SX")
        $DLG_hint_lripcassx    = STRCAT(MSG(788)," = ",STR($DLG_LarRipCas_SX))
        $DLG_caption_lripcassx = STR($DLG_LarRipCas_SX)
        $DLG_value_lripcassx   = STR($DLG_LarRipCas_SX)
      ]
   }

   Button btnLarSc19Dx
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(789)
      Enable  = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 160
         posy = 305
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_LarRipCas_DX")
        $DLG_hint_lripcasdx    = STRCAT(MSG(789)," = ",STR($DLG_LarRipCas_DX))
        $DLG_caption_lripcasdx = STR($DLG_LarRipCas_DX)
        $DLG_value_lripcasdx   = STR($DLG_LarRipCas_DX)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         //07.06.2017 - Filippo - chiedo la schiena all'inserimento
         //posy = 440
         posy = 500
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  20
         //07.06.2017 - Filippo - chiedo la schiena all'inserimento
         //posy = 440
         posy = 500
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg VoilaArm
{
   Caption = MSG(448)

   Placement
   {
      posx = 155
      posy = 150
      dimx = 990
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Settaggi
   {
      Caption = MSG(449)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 162
      }

      Check chkTop
      {
         Caption = MSG(452)
         Hint    = MSG(452)
         Value   = $DLG_Top_Voila
         Enable  = $DLG_en_Top_Voila

         Placement
         {
            posx = 10
            posy = 20
            dimx = 120
            dimy = 20

         }

         OnClick
         [
            if( $DLG_Top_Voila==1 )
            {
               $DLG_Top_Voila       = 1
             //  $DLG_Carter_Voila    = 0
              // $DLG_en_Carter_Voila = 0
            }
            else
            {
               $DLG_Top_Voila       = 0
              // $DLG_en_Carter_Voila = 1
            }
         ]
      }

      Check chkPanFon
      {
         Caption = MSG(1462)
         Hint    = MSG(1462)
         Value   = $DLG_PanFondo
         Enable  = $DLG_enable_rd_uso_3

         Placement
         {
            posx = 10
            posy = 45
            dimx = 140
            dimy = 20

         }

         OnClick
         [
            if( $DLG_PanFondo==1 )
            {
               $DLG_PanFondo = 1
               $DLG_enable_rd_uso_4 = 0
            }
            else
            {
               $DLG_PanFondo = 0
               $DLG_enable_rd_uso_4 = 1
            }
         ]
      }

      Check chkAppAbi
      {
         Caption = MSG(1463)
         Hint    = MSG(1463)
         Value   = $DLG_AppFondo
         Enable  = $DLG_enable_rd_uso_4

         Placement
         {
            posx = 10
            posy = 70
            dimx = 140
            dimy = 20

         }

         OnClick
         [
            if( $DLG_AppFondo==1 )
            {
               $DLG_AppFondo = 1
               $DLG_enable_rd_uso_3 = 0
            }
            else
            {
               $DLG_AppFondo = 0
               $DLG_enable_rd_uso_3 = 1
            }
         ]
      }

      Check chkLedSot
      {
         Caption = MSG(1464)
         Hint    = MSG(1464)
         Value   = $DLG_LedFondo
         Enable  = $DLG_enable_rd_uso_4

         Placement
         {
            posx = 10
            posy = 95
            dimx = 140
            dimy = 20

         }

         OnClick
         [
            if( $DLG_LedFondo==1 )
            {
               $DLG_LedFondo = 1
               $DLG_enable_rd_uso_2 = 1
               $DLG_enable_rd_uso_3 = 0
            }
            else
            {
               $DLG_LedFondo = 0
               $DLG_enable_rd_uso_2 = 0
               $DLG_enable_rd_uso_3 = 1
            }
         ]
      }

      Check chkTrasf
      {
         Caption = MSG(1465)
         Hint    = MSG(1465)
         Value   = $DLG_TrsFondo
         Enable  = $DLG_enable_rd_uso_2

         Placement
         {
            posx = 10
            posy = 120
            dimx = 140
            dimy = 20

         }

         OnClick
         [
            if( $DLG_TrsFondo==1 )   {  $DLG_TrsFondo = 1  }
            else                     {  $DLG_TrsFondo = 0  }
         ]
      }

      //Check chkCarter
      //{
      //   Caption = MSG(453)
      //   Hint    = MSG(453)
      //   Value   = $DLG_Carter_Voila
      //   Enable  = $DLG_en_Carter_Voila
      //
      //   Placement
      //   {
      //      posx = 10
      //      posy = 45
      //      dimx = 120
      //      dimy = 20
      //
      //   }
      //
      //   OnClick
      //   [
      //      if( $DLG_Carter_Voila==1 )
      //      {
      //         $DLG_Carter_Voila=1
      //      }
      //      else
      //      {
      //         $DLG_Carter_Voila=0
      //      }
      //   ]
      //}
   }

   Frame FinituraTenda
   {
      Caption = MSG(456)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }
   }

   Frame FinituraTop
   {
      Caption = MSG(458)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 150
         dimy = 202
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_Top_Voila

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_Top_Voila

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(254)
        Hint    = MSG(254)
        Value   = $DLG_value_opaco
        Enable  = $DLG_Top_Voila

        Placement
        {
           posx = 27
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 1
        ]
      }

      Radio RdVetroLucido
      {
        Caption = MSG(255)
        Hint    = MSG(255)
        Value   = $DLG_value_lucido
        Enable  = $DLG_Top_Voila

        Placement
        {
           posx = 27
           posy = 180
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0

           //abilito gli spessori
           $DLG_enable_radio_top_spess04 = 1
           $DLG_enable_radio_top_spess10 = 1

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }
   }

   Frame FinituraFon
   {
      Caption = MSG(1457)

      Placement
      {
         posx = 490
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var_p
         Value   = $DLG_descrizione_var_p
         Hint    = $DLG_descrizione_var_p
         Enable  = $DLG_enable_rd_uso_3

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var_p
         Value   = $DLG_image_file_p
         Hint    = $DLG_descrizione_var_p
         Enable  = $DLG_enable_rd_uso_3

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }
   }

   Frame FinituraApa
   {
      Caption = MSG(1458)

      Placement
      {
         posx = 650
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var_a
         Value   = $DLG_descrizione_var_a
         Hint    = $DLG_descrizione_var_a
         Enable  = $DLG_enable_rd_uso_4

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var_a
         Value   = $DLG_image_file_a
         Hint    = $DLG_descrizione_var_a
         Enable  = $DLG_enable_rd_uso_4

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }
   }

   Frame FinituraTenda2
   {
      Caption = $DLG_STR_T1

      Placement
      {
         posx = 810
         posy = 10
         dimx = 150
         dimy = 202
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var5
         Value   = $DLG_descrizione_var5
         Hint    = $DLG_descrizione_var5
         Enable  = 1

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var5
         Value   = $DLG_image_file5
         Hint    = $DLG_descrizione_var5
         Enable  = 1

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check chkSecTessuto
      {
         Caption = $DLG_STR_T2
         Hint    = $DLG_STR_T2
         Value   = $DLG_value_tessuto
         //Enable  = $DLG_enable_tessuto_T2
         Enable  = 1

         Placement
         {
           posx = 27
           posy = 170
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_value_tessuto = 1
            //else
            //{
            //   $DLG_value_tessuto = 0
               //COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call_x)," GEST_RZ=",APICI(),"Z19",APICI()))
               //$DLG_VAL_COLORE_5 = VAR_VAL_STR($DLG_idx_to_call_x,"GEST_RZ")
               //$DLG_descrizione_var5 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_x,"GEST_RZ"),"colori_tutti.txt")
               //GOSUB Get_Image_Rivestimenti_NEW
            //}
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint    = MSG(616)

      Placement
      {
         posx = 240
         posy = 182
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint    = MSG(618)

      Placement
      {
         posx = 160
         posy = 182
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   //Button btnApertura
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint    = MSG(455)
   //   Enable  = $DLG_en_apertura_Voila
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 31
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_apertura_Voila")
   //     if(STRCMP($DLG_apertura_Voila,"APD")==0)  { $DLG_value_apertura_Voila = "DX" }
   //     if(STRCMP($DLG_apertura_Voila,"APS")==0)  { $DLG_value_apertura_Voila = "SX" }
   //     if(STRCMP($DLG_apertura_Voila,"APE")==0)  { $DLG_value_apertura_Voila = "DX+SX" }
   //     $DLG_hint_apertura_Voila    = STRCAT(MSG(108)," = ",$DLG_value_apertura_Voila)
   //     $DLG_caption_apertura_Voila = $DLG_apertura_Voila
   //   ]
   //}

   Button btnFinituraTenda
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 195
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
         $DLG_VAL_COLORE_1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
         while( STRCMP($DLG_VAL_COLORE_1,"LOP")==0 | STRCMP($DLG_VAL_COLORE_1,"NOR")==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
              $DLG_VAL_COLORE_1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
           }
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ"),"colori_tutti.txt")
//         GOSUB Get_Image_Rivestimenti
         GOSUB Get_Image_Rivestimenti_NEW
//         $DLG_image_file1 = $DLG_image_file
         //$R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         //$DLG_VAL_COLORE1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         //GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_Top_Voila

      Placement
      {
         posx = 355
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368_TOP")
         $DLG_VAL_COLORE3 = $DLG_COLORE_368_TOP
         while( STRCMP($DLG_VAL_COLORE3,"LOP")==0 | STRCMP($DLG_VAL_COLORE3,"L--")==0 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_TOP")
              $DLG_VAL_COLORE3 = $DLG_COLORE_368_TOP
           }
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_TOP,"colori_tutti.txt")
         if ( $DLG_value_lucido == 1 ) { GOSUB Get_Image_Lucido_NEW }
         else                          { GOSUB Get_Image_Opaco_NEW  }
      ]
   }

   Button btnFinituraPan
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1457)
      Enable  = $DLG_enable_rd_uso_3

      Placement
      {
         posx = 515
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_FON")
         $DLG_descrizione_var_p  = DESCRIZIONE_VAL_TAB($DLG_COLORE_FON,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_FON
         GOSUB Get_Image_Opaco
         $DLG_image_file_p = $DLG_image_file
      ]
   }

   Button btnFinituraApa
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1458)
      Enable  = $DLG_enable_rd_uso_4

      Placement
      {
         posx = 675
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_APA")
         $DLG_descrizione_var_a  = DESCRIZIONE_VAL_TAB($DLG_COLORE_APA,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_APA
         GOSUB Get_Image_Opaco
         $DLG_image_file_a = $DLG_image_file
      ]
   }

   Button btnFinituraTenda2
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_value_tessuto

      Placement
      {
         posx = 835
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call_x,"GEST_RZ")
         $DLG_VAL_COLORE_5 = VAR_VAL_STR($DLG_idx_to_call_x,"GEST_RZ")
         $DLG_descrizione_var5 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_x,"GEST_RZ"),"colori_tutti.txt")
         GOSUB Get_Image_Rivestimenti_NEW
         //if( STRCMP( $DLG_VAL_COLORE_5,"Z19") == 0 ) { $DLG_value_tessuto = 0 }
      ]
   }
}

Dlg NOW_SnodoEV
{
   Caption = MSG(792)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 220
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Presenza_Tubo_SX
   {
      Placement
      {
         posx = 5
         posy = 10
         dimx = 205
         dimy = 60
      }

      Check chkTuboSx
      {
        Caption = MSG(793)
        Hint    = MSG(793)
        Enable  = 1
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy =  5
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_1==1)
           {
              $DLG_value_rd_uso_1 = 1
              $DLG_enable_rd_uso_1 = 1
           }
           else
           {
              $DLG_value_rd_uso_1 = 0
              $DLG_enable_rd_uso_1 = 0
           }
        ]
      }

      Edit EdtLarTuboSx
      {
        Caption = $DLG_caption_LarTuSxAp
        Hint    = $DLG_hint_LarTuSxAp
        Value   = $DLG_value_LarTuSxAp
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 125
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarTuboSx
      {
        Caption = MSG(790)
        Hint    = MSG(790)
        Value   = MSG(790)

        Placement
        {
           posx = 5
           posy = 35
           dimx = 120
           dimy = 20
        }
      }

   }

   Frame Presenza_Tubo_DX
   {
      Placement
      {
         posx = 5
         posy = 75
         dimx = 205
         dimy = 60
      }

      Check chkTuboDx
      {
        Caption = MSG(794)
        Hint    = MSG(794)
        Enable  = 1
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy =  5
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_2==1)
           {
              $DLG_value_rd_uso_2 = 1
              $DLG_enable_rd_uso_2 = 1
           }
           else
           {
              $DLG_value_rd_uso_2 = 0
              $DLG_enable_rd_uso_2 = 0
           }
        ]
      }

      Edit EdtLarTuboDx
      {
        Caption = $DLG_caption_LarTuDxAp
        Hint    = $DLG_hint_LarTuDxAp
        Value   = $DLG_value_LarTuDxAp
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 125
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarTuboDx
      {
        Caption = MSG(791)
        Hint    = MSG(791)
        Value   = MSG(791)

        Placement
        {
           posx = 5
           posy = 35
           dimx = 120
           dimy = 20
        }
      }

   }

   Frame FrmEliminaSn
   {
      Placement
      {
         posx = 5
         posy = 140
         dimx = 205
         dimy = 40
      }

      Check chkElimina
      {
         Caption = MSG(796)
         Hint    = MSG(796)
         Enable  = 1
         Value   = $DLG_value_cancella

         Placement
         {
            posx = 10
            posy = 10
            dimx = 200
            dimy = 20
         }

         OnClick
         [

            if($DLG_value_cancella==1)
            {
               $DLG_value_cancella = 1
            }
            else
            {
               $DLG_value_cancella = 0
            }

            if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
            {
               DISPLAY2(MSG(795))
            }
         ]
      }
   }

   Button btnLarTuboSx
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(790)
      Enable  = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 180
         posy = 40
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_LarTuboAp_SX")
        $DLG_hint_LarTuSxAp    = STRCAT(MSG(790)," = ",STR($DLG_LarTuboAp_SX))
        $DLG_caption_LarTuSxAp = STR($DLG_LarTuboAp_SX)
        $DLG_value_LarTuSxAp   = STR($DLG_LarTuboAp_SX)
      ]
   }

   Button btnLarTuboDx
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(791)
      Enable  = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 180
         posy = 105
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_LarTuboAp_DX")
        $DLG_hint_LarTuDxAp    = STRCAT(MSG(791)," = ",STR($DLG_LarTuboAp_DX))
        $DLG_caption_LarTuDxAp = STR($DLG_LarTuboAp_DX)
        $DLG_value_LarTuDxAp   = STR($DLG_LarTuboAp_DX)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 105
         posy = 185
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  30
         posy = 185
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg Pontaccio
{
   Caption = MSG(928)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 180
      }

      Check chkScorrevole
      {
        Caption = MSG(929)
        Hint    = MSG(930)
        Value   = $DLG_value_chk_scorr

        Placement
        {
           posx = 20
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_chk_scorr==1)   {  $DLG_value_chk_scorr=1  }
           else                          {  $DLG_value_chk_scorr=0  }
        ]

      }

      Check chkFissa
      {
        Caption = MSG(931)
        Hint    = MSG(932)
        Value   = $DLG_value_chk_fissa

        Placement
        {
           posx = 20
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_chk_fissa==1)   {  $DLG_value_chk_fissa=1  }
           else                          {  $DLG_value_chk_fissa=0  }
        ]

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 65
           dimx = 130
           dimy = 2
        }
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 75
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 100
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(934)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 105
           dimx = 80
           dimy = 20
        }
      }

      Bevel Bvl2
      {
        Placement
        {
           posx = 10
           posy = 130
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_value_radio_sx

        Placement
        {
           posx = 50
           posy = 135
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_value_radio_dx

        Placement
        {
           posx = 50
           posy = 155
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Posizione
   {
      Caption = MSG(414)

      Placement
      {
         posx = 165
         posy = 145
         dimx = 150
         dimy = 45
      }

      Check chkPosizione
      {
        Caption = MSG(935)
        Hint    = MSG(936)
        Value   = $DLG_chk_sormonto

        Placement
        {
           posx = 20
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_chk_sormonto==1)   {  $DLG_chk_sormonto=1  }
           else                       {  $DLG_chk_sormonto=0  }
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09 - standard windows
         //posx = 50
         posx = 250
         posy = 200
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09 - standard windows
         posx = 165
         posy = 200
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_PONTACCIO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PONTACCIO,"colori_tutti.txt")
        GOSUB Get_Image_Pontaccio
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(937)

      Placement
      {
         posx = 130
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(938)

      Placement
      {
         posx = 130
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

Dlg PontaccioMen
{
   Caption = MSG(939)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(934)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 50
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         posx = 165
         posy = 160
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_PONTACCIO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PONTACCIO,"colori_tutti.txt")
        GOSUB Get_Image_Pontaccio
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(937)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(938)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

Dlg Tangram
{
   Caption = MSG(940)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 185
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Check chkBasic
   {
     Caption = MSG(941)
     Hint    = MSG(942)
     Enable  = 1
     Value   = $DLG_chk_basic

     Placement
     {
        posx = 50
        posy = 160
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        if($DLG_chk_basic==1)
        {
           $DLG_chk_basic=1
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_TANGRAM_BAS,"colori_tutti.txt")
           GOSUB Get_Image_Tangram_Bas
        }
        else
        {
           $DLG_chk_basic=0
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_TANGRAM,"colori_tutti.txt")
           GOSUB Get_Image_Tangram
        }
     ]

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if($DLG_chk_basic==1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_TANGRAM_BAS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_TANGRAM_BAS,"colori_tutti.txt")
           GOSUB Get_Image_Tangram_Bas
        }
        else
        {
           $R = CHIEDI(-1,"DLG_COLORE_TANGRAM")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_TANGRAM,"colori_tutti.txt")
           GOSUB Get_Image_Tangram
        }
      ]
   }
}

Dlg Tangram_Pouff
{
   Caption = MSG(943)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_POUFF")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_POUFF,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_POUFF
         GOSUB Get_Image_Rivestimenti
      ]
   }
}

Dlg Huggy
{
   Caption = MSG(944)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura2
   {
      Caption = MSG(946)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
          //$R = CHIEDI(-1,"DLG_COLORE_HUGGY_TES")
          //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_HUGGY_TES,"colori_tutti.txt")
          //$DLG_VAL_COLORE = $DLG_COLORE_HUGGY_TES
          //GOSUB Get_Image_Rivestimenti
          //$DLG_image_file1 = $DLG_image_file
          $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
          $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
          $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
          GOSUB Get_Image_Rivestimenti
          $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(948)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
           // Eugenio 25/10/11
           if(VAR_EXIST($DLG_idx_to_call,"GEST_SB")==1)
           {
               $R = CHIEDI($DLG_idx_to_call,"GEST_SB")
               $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SB"),"colori_tutti.txt")
               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SB")
               GOSUB Get_Image_Opaco
               $DLG_image_file2 = $DLG_image_file
           }
           else
           {
               $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
               $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
               GOSUB Get_Image_Opaco
               $DLG_image_file2 = $DLG_image_file
           }
      ]
   }
}

Dlg Dangla
{
   Caption = MSG(949)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 475
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame OpzioniDangla
   {
      Caption = MSG(950)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Radio rdLis
      {
        Caption = MSG(951)
        Hint    = MSG(952)
        Enable  = 1
        Value   = $DLG_Dangla_Lis

        Placement
        {
           posx = 20
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Dangla_Lis = 1
           $DLG_Dangla_Zip = 0
           $DLG_Dangla_Arr = 0
        ]
      }

      Radio rdZip
      {
        Caption = MSG(953)
        Hint    = MSG(954)
        Enable  = 1
        Value   = $DLG_Dangla_Zip

        Placement
        {
           posx = 20
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Dangla_Lis = 0
           $DLG_Dangla_Zip = 1
           $DLG_Dangla_Arr = 0
        ]
      }

      Radio rdArr
      {
        Caption = MSG(955)
        Hint    = MSG(956)
        Enable  = 1
        Value   = $DLG_Dangla_Arr

        Placement
        {
           posx = 20
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Dangla_Lis = 0
           $DLG_Dangla_Zip = 0
           $DLG_Dangla_Arr = 1
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 310
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 45
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 320
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         //$R = CHIEDI(-1,"DLG_COLORE_DANGLA")
         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_DANGLA,"colori_tutti.txt")
         //$DLG_VAL_COLORE = $DLG_COLORE_DANGLA
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

Dlg We
{
   Caption = MSG(1682)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 325
      dimy = 275//225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 185//135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 45
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Ignifugazione
   {
      Caption = MSG(613)

      Placement
      {
         posx = 160//10
         posy = 145
         dimx = 150//300
         dimy = 50//135
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 20
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=0  }
           else                         {  $DLG_value_ignifu=1  }
        ]
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 210//160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 210//160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_TIPOWe == 1)
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
            GOSUB Get_Image_Rivestimenti
            $DLG_image_file1 = $DLG_image_file


            $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
            $DLG_enable_ignifu = 1
            if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
            {
               $DLG_enable_ignifu = 0
               $DLG_value_ignifu = 0
            }
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_J1")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_J1"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_J1")
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file

            $DLG_enable_ignifu = 0
            $DLG_value_ignifu = 0
         }
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

//======================================================================================================================
//17.03.2017 - Filippo - Dialog sedia Pletra
Dlg Pletra
{
   Caption = MSG(1770)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 545
      //10.07.2017 - Filippo - specifiche tecniche cambiate
      //dimy = 350
      dimy = 285
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         //10.07.2017 - Filippo - specifiche tecniche cambiate
         //dimy = 260//210
         dimy = 205
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 45
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  45
            posy =  55
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 370
         //10.07.2017 - Filippo - specifiche tecniche cambiate
         //dimy = 260//210
         dimy = 205
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 175
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=0  }
           else                         {  $DLG_value_ignifu=1  }
        ]
      }

      //10.07.2017 - Filippo - non pi necessario, specifiche tecniche cambiate
      //Label LabNote
      //{
      //   Caption = MSG(3110)
      //
      //   Placement
      //   {
      //      posx = 10
      //      posy = 210//160
      //      dimx = 350
      //      dimy = 30
      //   }
      //   Font
      //   {
      //     size  = 8.5
      //     type  = 1
      //     //color = 255
      //   }
      //}
      //
      //Label LabNota1
      //{
      //   Caption = MSG(1771)
      //
      //   Placement
      //   {
      //      posx = 10
      //      posy = 225//175
      //      dimx = 350
      //      dimy = 30
      //   }
      //   Font
      //   {
      //     size  = 8.5
      //     type  = 1
      //     color = 255
      //   }
      //}
      //Label LabNota2
      //{
      //   Caption = MSG(1772)
      //
      //   Placement
      //   {
      //      posx = 10
      //      posy = 237//187
      //      dimx = 350
      //      dimy = 30
      //   }
      //   Font
      //   {
      //     size  = 8.5
      //     type  = 1
      //     color = 255
      //   }
      //}

   }


   Frame Finitura1
   {
      Caption = MSG(648)

      Placement
      {
         posx = 195
         posy = 30
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Frame Finitura2
   {
      Caption = MSG(649)

      Placement
      {
         posx = 345
         posy = 30
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 450
         //10.07.2017 - Filippo - specifiche tecniche cambiate
         //posy = 280
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 360
         //10.07.2017 - Filippo - specifiche tecniche cambiate
         //posy = 280
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
//         finitura1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
//         finitura2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
//         if(LEFT(finitura1,1)==LEFT(finitura2,1))
//         {
         $OK=1
//         }
//         else
//         {
//            DISPLAY2(MSG(1771))
//         }
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 205
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $PREC_RS = VAR_VAL_STR($DLG_idx_to_call,"GEST_RS")
         $R = CHIEDI($DLG_idx_to_call,"GEST_RS")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RS")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file

         //setta di default secondo colore
         //$R = CHIEDI($DLG_idx_to_call,"GEST_R8")
         //VAR_INDIRECT_ASSIGN($DLG_idx_to_call,"GEST_R8",$DLG_idx_to_call,"GEST_RS")
         if($PREC_RS != $DLG_VAL_COLORE)
         {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_R8=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),APICI()))

            //$DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),"colori_tutti.txt")
            $DLG_descrizione_var2 = $DLG_descrizione_var1
            //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RS")
            //GOSUB Get_Image_Rivestimenti
            //$DLG_image_file2 = $DLG_image_file
            $DLG_image_file2 = $DLG_image_file1

            $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
            $DLG_enable_ignifu = 1
            if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
            {
               $DLG_enable_ignifu = 0
               $DLG_value_ignifu = 0
            }
         }
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 355
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_R8")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_R8"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_R8")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file

         //18.09.2017 - Filippo - controllo ignifugazione anche sulla seconda finitura

         $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
         $DLG_enable_ignifu = 1
         if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
         {
            $DLG_enable_ignifu = 0
            $DLG_value_ignifu = 0
         }

         //10.07.2017 - Filippo - non pi necessario, specifiche tecniche cambiate
         //if(LEFT(VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),1) != LEFT(VAR_VAL_STR($DLG_idx_to_call,"GEST_R8"),1))
         //{  while(LEFT(VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),1) != LEFT(VAR_VAL_STR($DLG_idx_to_call,"GEST_R8"),1))
         //      {
         //         DISPLAY2(MSG(1771))
         //         $R = CHIEDI($DLG_idx_to_call,"GEST_R8")
         //      }
         //   $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_R8"),"colori_tutti.txt")
         //   $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_R8")
         //   GOSUB Get_Image_Rivestimenti
         //   $DLG_image_file2 = $DLG_image_file
         //}
      ]
   }


   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)

      Placement
      {
         posx = 20
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         GOSUB Get_Image_Opaco
         $DLG_image_file3 = $DLG_image_file
      ]
   }
}

// 13/06/2018 - Emanuele - Aggiungo Dialog per la sedia Ermes
Dlg Ermes
{
   Caption = MSG(3352)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 440
      dimy = 285
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 30
         posy = 10
         dimx = 370
         dimy = 205
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 175
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=0  }
           else                         {  $DLG_value_ignifu=1  }
        ]
      }
   }

   Frame Finitura1
   {
      Caption = MSG(1993)

      Placement
      {
         posx = 65
         posy = 30
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Frame Finitura2
   {
      Caption = MSG(1994)

      Placement
      {
         posx = 215
         posy = 30
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 290
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 200
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 75
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $PREC_RS = VAR_VAL_STR($DLG_idx_to_call,"GEST_RS")
         $R = CHIEDI($DLG_idx_to_call,"GEST_RS")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RS")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file

         if($PREC_RS != $DLG_VAL_COLORE)
         {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_RG=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),APICI()))

            $DLG_descrizione_var2 = $DLG_descrizione_var1
            $DLG_image_file2 = $DLG_image_file1

            $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
            $DLG_enable_ignifu = 1
            if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
            {
               $DLG_enable_ignifu = 0
               $DLG_value_ignifu = 0
            }
         }
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 225
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RG")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RG"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RG")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file

         $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
         $DLG_enable_ignifu = 1
         if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
         {
            $DLG_enable_ignifu = 0
            $DLG_value_ignifu = 0
         }
      ]
   }
}

//======================================================================================================================
//27.03.2017 - Filippo - Dialog sedia Lift
Dlg Lift
{
   Caption = $DLG_DescEdit//MSG(1775)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 545
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 210
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 45
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  45
            posy =  55
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 370
         dimy = 210
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 175
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=0  }
           else                         {  $DLG_value_ignifu=1  }
        ]
      }

   }


   Frame Finitura1
   {
      Caption = MSG(1994)

      Placement
      {
         posx = 195
         posy = 30
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Frame Finitura2
   {
      Caption = MSG(1993)

      Placement
      {
         posx = 345
         posy = 30
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 450//360
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 360//450
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 205
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $PREC_RG = VAR_VAL_STR($DLG_idx_to_call,"GEST_RG")
         $R = CHIEDI($DLG_idx_to_call,"GEST_RG")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RG"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RG")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file

         $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
         $DLG_enable_ignifu = 1
         if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F" | $TMP_catTessuto == "U")
         {
            $DLG_enable_ignifu = 0
            $DLG_value_ignifu = 0
         }

      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)
      Enable = $DLG_BloccaSceltaTelaio //$DLG_enaRivSeduta

      Placement
      {
         posx = 355
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RS")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RS"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RS")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file

            $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
            $DLG_enable_ignifu = 1
            if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F" | $TMP_catTessuto == "U")
            {
               $DLG_enable_ignifu = 0
               $DLG_value_ignifu = 0
            }
      ]
   }


   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)
      Enable = $DLG_BloccaSceltaTelaio    //05.05.2017 - Filippo - Blocco la scelta finitura telaio

      Placement
      {
         posx = 20
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_J1")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_J1"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_J1")
         GOSUB Get_Image_Opaco//Rivestimenti
         $DLG_image_file3 = $DLG_image_file

         if($DLG_enaRivSeduta == 0)
         {
            $DLG_descrizione_var2 = $DLG_descrizione_var3
            $DLG_image_file2 = $DLG_image_file3
         }
      ]
   }
}


//======================================================================================================================
Dlg Joynt
{
   Caption = "Joynt"
   Placement
   {
      posx = 150
      posy = 150
      dimx = 425
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoJoynt
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 95
         dimy = 135
      }

      Radio RdJoyntR
      {
        Caption = MSG(1915)
        Hint    = MSG(1915)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 15
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_RAD = "JOYNT"
           GOSUB CambiaRadJoynt
           $R = CHIEDI($DLG_idx_to_call,"GEST_J1")
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_J1"),"colori_tutti.txt")
           $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_J1")
           GOSUB Get_Image_Opaco
           $DLG_image_file1 = $DLG_image_file
        ]
      }

      Radio RdJoyntL
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 15
           posy = 50
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_RAD = "JOYNTL"
           GOSUB CambiaRadJoynt
           $R = CHIEDI($DLG_idx_to_call,"GEST_J1")
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_J1"),"colori_tutti.txt")
           $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_J1")
           GOSUB Get_Image_Opaco
           $DLG_image_file1 = $DLG_image_file
        ]
      }

   }

   Frame FinituraSeduta
   {
      Caption = MSG(982)

      Placement
      {
         posx = 110
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraSchienale
   {
      Caption = MSG(261)

      Placement
      {
         posx = 265
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 265
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 180
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraSeduta
   {
      Caption = MSG(620)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 120
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_J1")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_J1"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_J1")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraSchienale
   {
      Caption = MSG(620)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 270
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_J2")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_J2"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_J2")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

Dlg Lastika
{
   Caption = MSG(987)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 775
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame OpzioniLastika
   {
      Caption = MSG(988)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Radio rdMulti
      {
        Caption = MSG(989)
        Hint    = MSG(990)
        Enable  = 1
        Value   = $DLG_Lastika_Mult

        Placement
        {
           posx = 20
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Lastika_Mult = 1
           $DLG_Lastika_Tric = 0
           $DLG_Lastika_Mono = 0
           $DLG_Lastika_Col1 = 0
           $DLG_Lastika_Col2 = 0
           $DLG_Lastika_Col3 = 0
           //$DLG_RAD = "SED1050"
           //GOSUB CambiaRadDlg
        ]
      }

      Radio rdTricol
      {
        Caption = MSG(991)
        Hint    = MSG(992)
        Enable  = 1
        Value   = $DLG_Lastika_Tric

        Placement
        {
           posx = 20
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Lastika_Mult = 0
           $DLG_Lastika_Tric = 1
           $DLG_Lastika_Mono = 0
           $DLG_Lastika_Col1 = 1
           $DLG_Lastika_Col2 = 1
           $DLG_Lastika_Col3 = 1
           //$DLG_RAD = "SED1051"
           //GOSUB CambiaRadDlg
        ]
      }

      Radio rdMono
      {
        Caption = MSG(993)
        Hint    = MSG(994)
        Enable  = 1
        Value   = $DLG_Lastika_Mono

        Placement
        {
           posx = 20
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_Lastika_Mult = 0
           $DLG_Lastika_Tric = 0
           $DLG_Lastika_Mono = 1
           $DLG_Lastika_Col1 = 1
           $DLG_Lastika_Col2 = 0
           $DLG_Lastika_Col3 = 0
           //$DLG_RAD = "SED1052"
           //GOSUB CambiaRadDlg
        ]
      }
   }

   Frame Finitura1
   {
      Caption = MSG(995)

      Placement
      {
         posx = 310
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_Lastika_Col1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_Lastika_Col1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura2
   {
      Caption = MSG(996)

      Placement
      {
         posx = 460
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_Lastika_Col2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_Lastika_Col2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura3
   {
      Caption = MSG(997)

      Placement
      {
         posx = 610
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_Lastika_Col3

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_Lastika_Col3

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var4
         Value   = $DLG_descrizione_var4
         Hint    = $DLG_descrizione_var4

         Placement
         {
            posx = 45
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var4
         Value   = $DLG_image_file4
         Hint    = $DLG_descrizione_var4

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 395
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 310
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)
      Enable  = $DLG_Lastika_Col1

      Placement
      {
         posx = 320
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_LASTIKA_1")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_LASTIKA_1,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_LASTIKA_1
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)
      Enable  = $DLG_Lastika_Col2

      Placement
      {
         posx = 470
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_LASTIKA_2")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_LASTIKA_2,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_LASTIKA_2
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinitura3
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)
      Enable  = $DLG_Lastika_Col3

      Placement
      {
         posx = 620
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_LASTIKA_3")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_LASTIKA_3,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_LASTIKA_3
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file3 = $DLG_image_file
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var4 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         GOSUB Get_Image_Opaco
         $DLG_image_file4 = $DLG_image_file
      ]
   }
}

Dlg TappetoLago
{
   Caption = MSG(1900)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LblForma
      {
        //sempre attivo
        Caption = MSG(1901)
        Hint    = MSG(1902)
        Enable  = 1
        Value   = MSG(1901)

        Placement
        {
           posx = 10
           posy = 63
           dimx = 80
           dimy = 20
        }

      }

      Radio RdRectangular
      {
        Caption = MSG(1903)
        Hint    = MSG(1904)
        Value   = $DLG_value_radio_rectangular

        Placement
        {
           posx = 70
           posy = 20
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_rectangular=1
           $DLG_value_radio_slide1=0
           $DLG_value_radio_slide2=0
           $DLG_value_radio_slide3=0
           $DLG_value_radio_petalo=0
           $DLG_enable_pro_Tap = 1
           $DLG_enable_lun_Tap = 1
        ]

      }

      Radio RdSlide1
      {
        Caption = MSG(1905)
        Hint    = MSG(1905)
        Value   = $DLG_value_radio_slide1

        Placement
        {
           posx = 70
           posy = 40
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_rectangular=0
           $DLG_value_radio_slide1=1
           $DLG_value_radio_slide2=0
           $DLG_value_radio_slide3=0
           $DLG_value_radio_petalo=0
           $DLG_enable_pro_Tap = 0
           $DLG_enable_lun_Tap = 0
        ]

      }

      Radio RdSlide2
      {
        Caption = MSG(1906)
        Hint    = MSG(1906)
        Value   = $DLG_value_radio_slide2

        Placement
        {
           posx = 70
           posy = 60
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_rectangular=0
           $DLG_value_radio_slide1=0
           $DLG_value_radio_slide2=1
           $DLG_value_radio_slide3=0
           $DLG_value_radio_petalo=0
           $DLG_enable_pro_Tap = 0
           $DLG_enable_lun_Tap = 0
        ]

      }

      Radio RdSlide3
      {
        Caption = MSG(1913)
        Hint    = MSG(1913)
        Value   = $DLG_value_radio_slide3

        Placement
        {
           posx = 70
           posy = 80
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_rectangular=0
           $DLG_value_radio_slide1=0
           $DLG_value_radio_slide2=0
           $DLG_value_radio_slide3=1
           $DLG_value_radio_petalo=0
           $DLG_enable_pro_Tap = 0
           $DLG_enable_lun_Tap = 0
        ]

      }

      Radio RdPetalo
      {
        Caption = MSG(1914)
        Hint    = MSG(1914)
        Value   = $DLG_value_radio_petalo

        Placement
        {
           posx = 70
           posy = 100
           dimx = 70
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_rectangular=0
           $DLG_value_radio_slide1=0
           $DLG_value_radio_slide2=0
           $DLG_value_radio_slide3=0
           $DLG_value_radio_petalo=1
           $DLG_enable_pro_Tap = 0
           $DLG_enable_lun_Tap = 0
        ]

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 123
           dimx = 130
           dimy = 2
        }
      }

      Edit EdtProfondita
      {
        //sempre attivo
        Caption = $DLG_caption_profondita_Tappeto
        Hint    = $DLG_hint_profondita_Tappeto
        Enable  = $DLG_enable_pro_Tap
        Value   = $DLG_value_profondita_Tappeto

        Placement
        {
           posx = 70
           posy = 130
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_Tappeto
        Hint    = $DLG_hint_larghezza_Tappeto
        Enable  = $DLG_enable_lun_Tap
        Value   = $DLG_value_larghezza_Tappeto

        Placement
        {
           posx = 70
           posy = 155
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        //sempre attivo
        Caption = MSG(626)
        Hint    = MSG(1907)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 130
           dimx = 80
           dimy = 20
        }

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(1908)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 155
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame TipoTappeto
   {
      Placement
      {
           posx = 10
           posy = 190
           dimx = 150
           dimy = 50
      }

      Radio RdFlat
      {
        Caption = MSG(1909)
        Hint    = MSG(1909)
        Value   = $DLG_value_radio_flat
        //Massimiliano 27/04/2018  - aggiungo esclusione
        Enable  = $DLG_enable_tipo_tappeto

        Placement
        {
           posx = 15
           posy = 5
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_flat=1
           $DLG_value_radio_curly=0
            // Eugenio 15.11.13 Tolti i cicli while, andava in loop
           $R = CHIEDI($DLG_idx_to_call,"GEST_SN")
           $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SN")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SN"),"colori_tutti.txt")
           GOSUB Get_Image_Tappeto
        ]

      }

      Radio RdCurly
      {
        Caption = MSG(1910)
        Hint    = MSG(1910)
        Value   = $DLG_value_radio_curly
        //Massimiliano 27/04/2018  - aggiungo esclusione
        Enable  = $DLG_enable_tipo_tappeto

        Placement
        {
           posx = 15
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_curly=1
           $DLG_value_radio_flat=0
            // Eugenio 15.11.13 Tolti i cicli while, andava in loop
           $R = CHIEDI($DLG_idx_to_call,"GEST_SL")
           $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SL"),"colori_tutti.txt")
           GOSUB Get_Image_Tappeto
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  20
            posy =  40
            dimx =  110
            dimy =  110
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 50
         posx = 250
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         posx = 165
         posy = 210
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Enable = $DLG_enable_pro_Tap
      Hint = MSG(1911)

      Placement
      {
         posx = 135
         posy = 140
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_Tappeto")
        $DLG_hint_profondita_Tappeto    = STRCAT(MSG(430)," = ",STR($DLG_profondita_Tappeto))
        $DLG_caption_profondita_Tappeto = STR($DLG_profondita_Tappeto)
        $DLG_value_profondita_Tappeto   = STR($DLG_profondita_Tappeto)

        if( $DLG_profondita_Tappeto == 184  )
        {
           VAR_SET_MENU (-1,"DLG_larghezza_Tappeto","LarTapP184" )
           if( $DLG_larghezza_Tappeto == 736 ) { $DLG_larghezza_Tappeto = 1104 }
        }
        if( $DLG_profondita_Tappeto == 1104 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza_Tappeto","LarTapP1104")
           if( $DLG_larghezza_Tappeto == 736 | $DLG_larghezza_Tappeto == 2944 ) { $DLG_larghezza_Tappeto = 1104 }
        }
        if( $DLG_profondita_Tappeto > 184 & $DLG_profondita_Tappeto < 1104 )
           { VAR_SET_MENU (-1,"DLG_larghezza_Tappeto","LarTapP357") }

        $DLG_hint_larghezza_Tappeto    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_Tappeto))
        $DLG_caption_larghezza_Tappeto = STR($DLG_larghezza_Tappeto)
        $DLG_value_larghezza_Tappeto   = STR($DLG_larghezza_Tappeto)
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Enable = $DLG_enable_lun_Tap
      Hint = MSG(1912)

      Placement
      {
         posx = 135
         posy = 165
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_Tappeto")
        $DLG_hint_larghezza_Tappeto    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_Tappeto))
        $DLG_caption_larghezza_Tappeto = STR($DLG_larghezza_Tappeto)
        $DLG_value_larghezza_Tappeto   = STR($DLG_larghezza_Tappeto)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 165
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_radio_curly==1)
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_SL")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SL")
            // Eugenio 15.11.13 Tolti i cicli while, andava in loop
            //while( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 )
            //{
            //   $R = CHIEDI($DLG_idx_to_call,"GEST_SL")
            //   $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SL")
            //}
            // ---------------------------------------------------------
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SL"),"colori_tutti.txt")
            GOSUB Get_Image_Tappeto
         }
         if($DLG_value_radio_flat==1)
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_SN")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SN")
            // Eugenio 15.11.13 Tolti i cicli while, andava in loop
            //while( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 )
            //{
            //   $R = CHIEDI($DLG_idx_to_call,"GEST_SN")
            //   $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SN")
            //}
            // ---------------------------------------------------------
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SN"),"colori_tutti.txt")
            GOSUB Get_Image_Tappeto
         }
      ]
   }
}

Dlg StaticaAsse
{
   Caption = MSG(959)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(960)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 50
         posx = 250
         posy = 160
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         posx = 165
         posy = 160
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_STATICA")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_STATICA,"colori_tutti.txt")
        GOSUB Get_Image_Statica
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(961)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }
}

Dlg StaticaMen
{
   Caption = MSG(962)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 65
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_value_radio_sx

        Placement
        {
           posx = 50
           posy = 80
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_value_radio_dx

        Placement
        {
           posx = 50
           posy = 100
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         //posx = 50
         posx = 250
         posy = 160
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09  - standard windows
         posx = 165
         posy = 160
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_STATICA")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_STATICA,"colori_tutti.txt")
        GOSUB Get_Image_Statica
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }
}

Dlg Colors
{
   Caption = MSG(963)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 480
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   // Riccardo 25/10/11: Aggiungo frame per il vetro e modifico quella della finitura del tavolo
   Frame Finitura
   {
      Caption = MSG(967)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraVetro
   {
      Caption = MSG(968)

      Placement
      {
         posx = 315
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 50
         posx = 250
         posy = 160
         //dimx = 80
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         posx = 165
         posy = 160
         //dimx = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_COLORS")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_COLORS,"colori_tutti.txt")
        GOSUB Get_Image_Colors
        $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraVetro
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 325
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_CR")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_CR"),"colori_tutti.txt")
         $DLG_COLORE_COLORS_CR = VAR_VAL_STR($DLG_idx_to_call,"GEST_CR")
         GOSUB Get_Image_ColorsVet
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")
        $DLG_hint_misure    = STRCAT(MSG(807)," = ",STR($DLG_misure))
        $DLG_caption_misure = STR($DLG_misure)
        $DLG_value_misure   = STR($DLG_misure)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)

         if( $DLG_altezza<=300 )
         {
            if( $DLG_misure!=850 | $DLG_misure!=1200 )
            {
               $DLG_misure = 850
               $DLG_hint_misure    = STRCAT(MSG(807)," = ",STR($DLG_misure))
               $DLG_caption_misure = STR($DLG_misure)
               $DLG_value_misure   = STR($DLG_misure)
            }

            VAR_SET_MENU (-1,"DLG_misure","LarColors2")
         }
         else
         {
            VAR_SET_MENU (-1,"DLG_misure","LarColors1")
         }
      ]
   }

}

Dlg ColorsComponente
{
   Caption = MSG(971)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 235
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 10
         posx = 95
         posy = 170
         //dimx = 55
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 70
         posx = 10
         posy = 170
         //dimx = 90
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_COLORS")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_COLORS,"colori_tutti.txt")
         GOSUB Get_Image_Colors
      ]
   }
}

Dlg ColorsVetro
{
   Caption = MSG(972)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 235
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 10
         posx = 95
         posy = 170
         //dimx = 55
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 70
         posx = 10
         posy = 170
         //dimx = 90
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // Riccardo 25/10/11: Gestione del colore del vetro direttamente da variante
         //$R = CHIEDI(-1,"DLG_COLORE_COLORS_CR")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_COLORS_CR,"colori_tutti.txt")
         $R = CHIEDI($DLG_idx_to_call,"GEST_CR")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_CR"),"colori_tutti.txt")
         $DLG_COLORE_COLORS_CR = VAR_VAL_STR($DLG_idx_to_call,"GEST_CR")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_COLORS_CR,"colori_tutti.txt")
         GOSUB Get_Image_ColorsVet
      ]
   }
}

Dlg AirMensola
{
   Caption = MSG(690)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblaltezza
      {
        Caption = MSG(629)
        Hint    = MSG(691)
        Value   = MSG(629)
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 80
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 105
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_AIR")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_Air
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 130
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)

        if( $DLG_larghezza<=1840 )
        {
           $DLG_enable_alt = 1
        }
        else
        {
           if( $DLG_altezza<80 )
           {
              $DLG_altezza = 80
              $DLG_value_altezza = STR($DLG_altezza)
           }
           $DLG_enable_alt = 0
        }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(695)
      Enable  = $DLG_enable_alt

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

}

Dlg AirMensola3
{
   Caption = MSG(690)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 150
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 35
           dimx = 80
           dimy = 20
        }
      }

      Label LblTagli
      {
        Caption = $DLG_caption_tagli
        Hint    = MSG(694)
        Value   = $DLG_caption_tagli

        Placement
        {
           posx = 50
           posy = 15
           dimx = 200
           dimy = 20
        }

         Font
         {
           color = 255
         }
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 70
           posy = 60
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblaltezza
      {
        Caption = MSG(629)
        Hint    = MSG(691)
        Value   = MSG(629)
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 10
           posy = 65
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 90
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 150
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         if($DLG_altezza<=50)
         {
            if($DLG_larghezza<1312)
            {
               DISPLAY2(MSG(697))
               $DLG_EndConfig = 0
            }

            if($DLG_larghezza>1472 & $DLG_larghezza<1475)
            {
               DISPLAY2(MSG(697))
               $DLG_EndConfig = 0
            }

            if($DLG_larghezza>1840)
            {
               DISPLAY2(MSG(697))
               $DLG_EndConfig = 0
            }
         }
         else
         {
            if($DLG_larghezza!=1472 & $DLG_larghezza!=1840 & $DLG_larghezza!=2208 )
            {
               DISPLAY2(MSG(698))
               $DLG_EndConfig = 0
            }
         }

         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_AIR")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_Air
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 130
         posy = 40
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)


         if($DLG_altezza <= 50)
         {
            // 16/02/2018 - Filippo - cambio il menu
            //VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir5")
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir")
            if($DLG_larghezza<=1472)
            {
               $DLG_caption_tagli = "da 1312 a 1472"
            }
            else
            {
               $DLG_caption_tagli = "da 1475 a 1840"
            }
         }
         else
         {
            $DLG_caption_tagli = ""
            //07.09.2017 - Filippo - gestisco le riduzioni dei moduli air su Metron
            //VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
            GOSUB dlg_riv_no_riv
            if($dlg_riv_noriv == "RIV")
            {
               VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
            }
            if($dlg_riv_noriv == "NO_RIV")
            {
               VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir")
            }
         }

         // 16/02/2018 - Filippo - per limite
         $AIR_max_X = 2208
         if($DLG_altezza<=50)
         {
            $AIR_max_X = 1840
         }
         // 16/02/2018 - Filippo - imposto limite
         VAR_SET_MENU(-1,"DLG_larghezza",STRCAT("LargAir ( -",STR($AIR_max_X)," ) "))

      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(695)
      Enable  = $DLG_enable_alt

      Placement
      {
         posx = 130
         posy = 70
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_altezza")
         $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
         $DLG_caption_altezza = STR($DLG_altezza)
         $DLG_value_altezza   = STR($DLG_altezza)

         if($DLG_altezza <= 50)
         {
            // 16/02/2018 - Filippo - cambio menu
            //VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir5")
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir")
            if($DLG_larghezza<=1472)
            {
               $DLG_caption_tagli  = "da 1312 a 1472"
            }
            else
            {
               $DLG_caption_tagli  = "da 1475 a 1840"
            }
         }
         else
         {
            $DLG_caption_tagli = ""
            // 16/02/2018 - Filippo -cambio il modo del menu
            //VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
            GOSUB dlg_riv_no_riv
            if($dlg_riv_noriv == "RIV")
            {
               VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
            }
            if($dlg_riv_noriv == "NO_RIV")
            {
               VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir")
            }
         }
         // 16/02/2018 - Filippo - per limite
         $AIR_max_X = 2208
         if($DLG_altezza<=50)
         {
            $AIR_max_X = 1840
         }
         // 16/02/2018 - Filippo - imposto limite
         VAR_SET_MENU(-1,"DLG_larghezza",STRCAT("LargAir ( -",STR($AIR_max_X)," ) "))

      ]
   }
}

// 16/01/2018 - Filippo - dialog per personalizzare moduli custom
Dlg AirMensolaCustom
{
   Caption = MSG(690)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 285
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 205
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 30
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 35
           dimx = 80
           dimy = 20
        }
      }

      Label LblTagli
      {
        Caption = $DLG_caption_tagli
        Hint    = MSG(694)
        Value   = $DLG_caption_tagli

        Placement
        {
           posx = 50
           posy = 15
           dimx = 200
           dimy = 20
        }

         Font
         {
           color = 255
         }
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 70
           posy = 60
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblaltezza
      {
        Caption = MSG(629)
        Hint    = MSG(691)
        Value   = MSG(629)
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 10
           posy = 65
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 90
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
           $DLG_text_verso = MSG(561)
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
           $DLG_text_verso = MSG(562)
        ]

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 140
           dimx = 130
           dimy = 2
        }
      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(657)
        Value   = MSG(657)
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 10
           posy = 155
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_caption_offset
        Value   = $DLG_caption_offset
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 70
           posy = 150
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblVersoOff
      {
        Caption = $DLG_text_verso
        Hint    = $DLG_text_verso
        Value   = $DLG_text_verso
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 5
           posy = 180
           dimx = 80
           dimy = 20
        }
        Font
        {
           size  = 8
           type  = 1
           color = 255
        }

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   // 23/01/2018 - Filippo - x nuovi vetri
   Frame FRM_Vetri
   {
      Caption = ""

      Placement
      {
         posx = 165
         posy = 140
         dimx = 150
         dimy = 65
      }

      Check chkVetri
      {
        Caption = MSG(94)
        Hint    = MSG(94)
        Enable  = $DLG_ena_vetri
        Value   = $DLG_val_vetri

        Placement
        {
           posx = 10
           posy = 10
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_val_vetri==1)    {  $DLG_val_vetri=1  }
           else                     {  $DLG_val_vetri=0  }
        ]
      }

      // 06/02/2018 - Filippo - aggiungo possibilit di modificare dalla dialog
      Check chkTT
      {
        Caption = MSG(3150)
        Hint    = MSG(3150)
        Enable  = $DLG_val_vetri
        Value   = $DLG_VAR_staffa_tt

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_VAR_staffa_tt==1)    {  $DLG_VAR_staffa_tt=1  }
           else                         {  $DLG_VAR_staffa_tt=0  }
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 215
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         if($DLG_altezza<=50)
         {
            if($DLG_larghezza<1312)
            {
               DISPLAY2(MSG(697))
               $DLG_EndConfig = 0
            }

            if($DLG_larghezza>1472 & $DLG_larghezza<1475)
            {
               DISPLAY2(MSG(697))
               $DLG_EndConfig = 0
            }

            if($DLG_larghezza>1840)
            {
               DISPLAY2(MSG(697))
               $DLG_EndConfig = 0
            }
         }
         else
         {
            if($DLG_larghezza!=1472 & $DLG_larghezza!=1840 & $DLG_larghezza!=2208 )
            {
               DISPLAY2(MSG(698))
               $DLG_EndConfig = 0
            }
         }

         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_AIR")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_Air
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 130
         posy = 40
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)


         if($DLG_altezza <= 50)
         {
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir5")
            if($DLG_larghezza<=1472)
            {
               $DLG_caption_tagli = "da 1312 a 1472"
            }
            else
            {
               $DLG_caption_tagli = "da 1475 a 1840"
            }
         }
         else
         {
            $DLG_caption_tagli = ""
            //07.09.2017 - Filippo - gestisco le riduzioni dei moduli air su Metron
            //VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
            GOSUB dlg_riv_no_riv
            if($dlg_riv_noriv == "RIV")
            {
               VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
            }
            if($dlg_riv_noriv == "NO_RIV")
            {
               VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir")
            }
         }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(695)
      Enable  = $DLG_enable_alt

      Placement
      {
         posx = 130
         posy = 70
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_altezza")
         $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
         $DLG_caption_altezza = STR($DLG_altezza)
         $DLG_value_altezza   = STR($DLG_altezza)

         if($DLG_altezza <= 50)
         {
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,3,"LargAir5")
            if($DLG_larghezza<=1472)
            {
               $DLG_caption_tagli  = "da 1312 a 1472"
            }
            else
            {
               $DLG_caption_tagli  = "da 1475 a 1840"
            }
         }
         else
         {
            $DLG_caption_tagli = ""
            VAR_CREATE_NUM(-1,"DLG_larghezza",$DLG_larghezza,2,"LargAir")
         }

      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)
      Enable  = $DLG_ena_offset

      Placement
      {
         posx = 130
         posy = 160
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        // 08/02/2018 - Filippo - setto la dimensione massima dell'offset
        // 08/02/2018 - Filippo - setto l'offset con valori sempre validi
        GOSUB offset_moduli_air_custom_dialog
         $R = CHIEDI($DLG_idx_to_call,"VAR_offset_posiz")
         $DLG_caption_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz"))
         $DLG_val_offset   = VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz")
         // 16/01/2018 - Filippo - continua a chiedere se minore a zero
         while( VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz")<0 )
         {
            // 08/02/2018 - Filippo - setto la dimensione massima dell'offset
            // 08/02/2018 - Filippo - setto l'offset con valori sempre validi
            GOSUB offset_moduli_air_custom_dialog

             $R = CHIEDI($DLG_idx_to_call,"VAR_offset_posiz")
             $DLG_caption_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz"))
             $DLG_val_offset   = VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz")
         }

      ]
   }

}

Dlg AirMensola_2
{
   Caption = MSG(690)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 65
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 100
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_AIR")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_Air
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }
}

Dlg AirAlzata
{
   Caption = MSG(699)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 175
      dimy = 235
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 155
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(1300)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 55
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 20
           posy = 65
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 20
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]
      }

      Bevel Bvl2
      {
        Placement
        {
           posx = 10
           posy = 110
           dimx = 130
           dimy = 2
        }
      }
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1303)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")

        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)

        if( $DLG_altezza<=250 )
        {
           if( $DLG_value_foro==1 )
           {
              $DLG_value_foro = 0
           }
           $DLG_enable_foro = 0
        }
        else
        {
           $DLG_enable_foro = 1
        }
      ]
   }

   Check chkForo
   {
     Caption = MSG(1304)
     Hint    = MSG(1305)
     Value   = $DLG_value_foro
     Enable  = $DLG_enable_foro

     Placement
     {
        posx = 20
        posy = 130
        dimx = 100
        dimy = 20
     }

     OnClick
     [
        if( $DLG_altezza<=250 )
        {
           if( $DLG_value_foro==1 )
           {
              $DLG_value_foro = 0
           }
        }
        else
        {
           if($DLG_value_foro==1)   {  $DLG_value_foro=1  }
           else                     {  $DLG_value_foro=0  }
        }
     ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 170
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirAlzata2
{
   Caption = MSG(1306)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 225
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 200
         dimy = 185
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 95
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(1300)
        Value   = MSG(629)
        Enable  = $DLG_enable_alt

        Placement
        {
           posx = 35
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_prof
        Hint    = $DLG_hint_prof
        Value   = $DLG_value_prof
        Enable  = $DLG_enable_prof

        Placement
        {
           posx = 95
           posy = 55
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(1307)
        Value   = MSG(1308)
        Enable  = $DLG_enable_prof

        Placement
        {
           posx = 35
           posy = 60
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 85
           dimx = 180
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 45
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 45
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

      Bevel Bvl2
      {
        Placement
        {
           posx = 10
           posy = 140
           dimx = 180
           dimy = 2
        }
      }

      Button btnAltezza
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(1303)
         Enable  = $DLG_enable_alt

         Placement
         {
            posx = 147
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
           $R = CHIEDI(-1,"DLG_altezza")

           $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
           $DLG_caption_altezza = STR($DLG_altezza)
           $DLG_value_altezza   = STR($DLG_altezza)

           // Riccardo 28/09/11: modificato secondo le nuove specifiche per l'altezza minima per il foro
           //if( $DLG_altezza<322 | STRCMP(NOME(ATTUALE()),"AIR_Set_AlzataTubo")==0 )
           // 16/01/2018 - Filippo - "ATTUALE()" non funziona sulle dialog"! Uso $DLG_idx_to_call
           if( $DLG_altezza<322 | STRCMP(NOME($DLG_idx_to_call),"AIR_Set_AlzataTubo")==0 )
           {
              if( $DLG_value_foro==1 )
              {
                 $DLG_value_foro = 0
              }
              $DLG_enable_foro = 0
           }
           else
           {
              $DLG_enable_foro = 1
           }

           if($DLG_altezza<=184 | $DLG_altezza==250 | $DLG_altezza==322 | $DLG_altezza==368)
           {
             $DLG_enable_prof = 1
           }
           else
           {
              //if( $DLG_prof>366 & STRCMP( NOME(ATTUALE()),"AIR_Set_AlzataTubo" )!=0 )
           // 16/01/2018 - Filippo - "ATTUALE()" non funziona sulle dialog"! Uso $DLG_idx_to_call
              if( $DLG_prof>366 & STRCMP( NOME($DLG_idx_to_call),"AIR_Set_AlzataTubo" )!=0 )
              {
                 $DLG_prof = 366

                 $DLG_value_prof = STR($DLG_prof)
              }
              $DLG_enable_prof = 0
           }
         ]
      }

      Button btnProf
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(1303)
         Enable  = $DLG_enable_prof

         Placement
         {
            posx = 147
            posy = 55
            dimx = 20
            dimy = 20
         }

         OnClick
         [
           $R = CHIEDI(-1,"DLG_prof")

           $DLG_hint_prof    = STRCAT(MSG(1311)," = ",STR($DLG_prof))
           $DLG_caption_prof = STR($DLG_prof)
           $DLG_value_prof   = STR($DLG_prof)
         ]
      }

      Check chkForo
      {
        Caption = MSG(1304)
        Hint    = MSG(1305)
        Value   = $DLG_value_foro
        Enable  = $DLG_enable_foro

        Placement
        {
           posx = 50
           posy = 152
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_altezza<=250 )
           {
              if( $DLG_value_foro==1 )
              {
                 $DLG_value_foro = 0
              }
           }
           else
           {
              if($DLG_value_foro==1)   {  $DLG_value_foro=1  }
              else                     {  $DLG_value_foro=0  }
           }
        ]
      }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 120
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 35
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

//MD 110315
Dlg Air36e8Ori
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 350
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 155
         dimy = 95
      }

//MD      Radio RdNessuno
//MD      {
//MD        Caption = MSG(90)
//MD        Hint    = MSG(91)
//MD        Value   = $DLG_value_rd_uso_1
//MD        Enable  = $DLG_enable_rd_uso_1
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 15
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 1
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdPiediStd
//MD      {
//MD        Caption = MSG(92)
//MD        Hint    = MSG(93)
//MD        Value   = $DLG_value_rd_uso_2
//MD        Enable  = $DLG_enable_rd_uso_2
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 35
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 1
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdSuppVetro
//MD      {
//MD        Caption = MSG(94)
//MD        Hint    = MSG(95)
//MD        Value   = $DLG_value_rd_uso_3
//MD        Enable  = $DLG_enable_rd_uso_3
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 55
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 1
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdPiediNet
//MD      {
//MD        Caption = MSG(96)
//MD        Hint    = MSG(97)
//MD        Value   = $DLG_value_rd_uso_4
//MD        Enable  = $DLG_enable_rd_uso_4
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 75
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 1
//MD        ]
//MD      }
//MD
//MD      Bevel Bvl1
//MD      {
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 105
//MD           dimx = 130
//MD           dimy = 2
//MD        }
//MD      }
//MD
      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 15
           posy = 25
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 15
           posy = 50
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 170
         posy = 10
         dimx = 165
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  55
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 10
           posy = 145
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 10
           posy = 165
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
      ]

      }

   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_altezza_368")
         $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
         $DLG_caption_altezza_368 = $DLG_altezza_368
         $DLG_value_altezza_368   = $DLG_altezza_368

         // Fabrizio 06/05/08 - in Lago
         if( STRCMP($DLG_altezza_368,"184")==0 )
         {
            VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O1.txt")

            if( ATOI($DLG_larghezza_368)>1840 )
            {
               $DLG_value_larghezza_368 = "1840"
               $DLG_larghezza_368 = "1840"
            }
         }
         else
         {
            if(STRCMP($DLG_profondita_368,"560")==0)
            {
                VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O1.txt")
            }
            else
            {
               VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O.txt")
            }
         }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 230
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 85
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

//Eugenio 20.04.12 Nuova Dialog per gestione frontale laccato
Dlg Air36e8Ori_R12
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 510
      //dimx = 655
      dimx = 775
      //dimy = 270
//      dimy = 310
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 155
         dimx = 200
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_larghezza
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         //posy = 120
         posy = 110
         //dimx = 155
         dimx = 200
         //dimy = 105
         dimy = 70
      }

//MD      Radio RdNessuno
//MD      {
//MD        Caption = MSG(90)
//MD        Hint    = MSG(91)
//MD        Value   = $DLG_value_rd_uso_1
//MD        Enable  = $DLG_enable_rd_uso_1
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 15
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 1
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdPiediStd
//MD      {
//MD        Caption = MSG(92)
//MD        Hint    = MSG(93)
//MD        Value   = $DLG_value_rd_uso_2
//MD        Enable  = $DLG_enable_rd_uso_2
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 35
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 1
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdSuppVetro
//MD      {
//MD        Caption = MSG(94)
//MD        Hint    = MSG(95)
//MD        Value   = $DLG_value_rd_uso_3
//MD        Enable  = $DLG_enable_rd_uso_3
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 55
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 1
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdPiediNet
//MD      {
//MD        Caption = MSG(96)
//MD        Hint    = MSG(97)
//MD        Value   = $DLG_value_rd_uso_4
//MD        Enable  = $DLG_enable_rd_uso_4
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 75
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 1
//MD        ]
//MD      }
//MD
//MD      Bevel Bvl1
//MD      {
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 105
//MD           dimx = 130
//MD           dimy = 2
//MD        }
//MD      }
//MD
      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 15
           //posy = 25
           posy = 20
           //dimx = 130
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 15
           //posy = 50
           posy = 40
           //dimx = 130
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         //posx = 170
         posx = 215
         posy = 10
         //dimx = 165
         dimx = 230
         //dimy = 225
//         dimy = 260
         dimy = 300
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  55
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 10
           posy = 135
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_COLORE_368_L = $DLG_COLORE_368
           //GOSUB Get_Image_368_L
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 10
           posy = 155
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           posx = 10
           posy = 175
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           posx = 10
           posy = 195
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

        ]

      }

      // 22/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 215
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1 )
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0

        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 235
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1 )
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1

        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 10
           //posy = 175
//           posy = 215
           posy = 255
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           posx = 10
           //posy = 195
//           posy = 235
           posy = 275
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 22/05/2019 - Emanuele - Aggiungo condizioni per metallizzati
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 335
         posx = 450
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 475
         posx = 605
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Enable = $DLG_enable_larghezza
      Hint = MSG(98)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 170
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_altezza_368")
         $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
         $DLG_caption_altezza_368 = $DLG_altezza_368
         $DLG_value_altezza_368   = $DLG_altezza_368

         // Fabrizio 06/05/08 - in Lago
         if( STRCMP($DLG_altezza_368,"184")==0 )
         {
            VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O1.txt")

            if( ATOI($DLG_larghezza_368)>1840 )
            {
               $DLG_value_larghezza_368 = "1840"
               $DLG_larghezza_368 = "1840"
            }
         }
         else
         {
            if(STRCMP($DLG_profondita_368,"560")==0)
            {
                VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O1.txt")
            }
            else
            {
               VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O.txt")
            }
         }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 190
         posx = 260
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//        if( $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1)
        if( $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1 & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1)
        {
           if( $DLG_value_ww == 1 )   {  $R = CHIEDI(-1,"DLG_COLORE_368_W")  }
           else
           {
              // Eugenio 15.04.16 Se  lucido  possibile avere anche frontale specchio
              if( $DLG_value_lucido == 1 )   {  $R = CHIEDI(-1,"DLG_COLORE_368_L")  }
              else                           {  $R = CHIEDI(-1,"DLG_COLORE_368")    }
           }
        }
        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        if( $DLG_value_lucido == 1 )
        {
           //$DLG_COLORE_368_L = $DLG_COLORE_368
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        else
        {
           if( $DLG_value_ww == 1 )
           {
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
           }
           GOSUB Get_Image_368
        }
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        // $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        // GOSUB Get_Image_368

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

        // 22/05/2019 - Emanuele - Aggiungo controllo per metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
           if($DLG_value_opaco_metal==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
        }

        // Riccardo 06/03/13: Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 22/05/2019 - Emanuele - Aggiungo condizione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
        // posx = 350
         posx = 460
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC

        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                  }
                  if(IF_METAL($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                  }
                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }
   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 485
         posx = 615
         //posy = 130
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")
        //Massimiliano 31/05/17 - imposto il valore della GEST_DI del divisorio/ripiano come quello della schiena
        COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),APICI()))

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 570
         posx = 535
         //posx = 425
         //posy = 185
         posy = 180
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 485
         //posx = 340
         posx = 450
         //posy = 185
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Air36e8Ori_R14_Side
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      //dimx = 790
      dimx = 925
      //dimy = 280
//      dimy = 310
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 155
         dimx = 200
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_larghezza
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         //posy = 120
         posy = 110
         //dimx = 155
         dimx = 200
         //dimy = 105
         dimy = 70
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 15
           //posy = 25
           posy = 20
           //dimx = 130
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 15
           //posy = 50
           posy = 40
           //dimx = 130
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

   }

   Frame FinituraFrontale
   {
      Caption = MSG(235)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         //posx = 170
         posx = 215
         posy = 10
         //dimx = 165
         dimx = 230
         //dimy = 225
//         dimy = 260
         dimy = 300
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  55
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 10
           posy = 135
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_COLORE_368_L = $DLG_COLORE_368
           //GOSUB Get_Image_368_L
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 10
           posy = 155
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           posx = 10
           posy = 175
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 22/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           posx = 10
           posy = 195
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 22/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

        ]

      }

      // 22/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 215
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1 )
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0

        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 235
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1 )
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 10
           //posy = 175
//           posy = 215
           posy = 255
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 22/05/2019 - Emanuele - Modifico condizioni per metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
           $DLG_value_ww = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           posx = 10
           //posy = 195
//           posy = 235
           posy = 275
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 22/05/2019 - Emanuele - Aggiungo condizioni per metallizzati
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 22/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]
      }

   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         //posx = 335
         posx = 450
         posy = 10
         dimx = 150
         dimy = 225
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 140
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 180
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 200
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 485
         posx = 605
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 630
         posx = 760
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 165
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Enable = $DLG_enable_larghezza
      Hint = MSG(98)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 170
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_altezza_368")
         $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
         $DLG_caption_altezza_368 = $DLG_altezza_368
         $DLG_value_altezza_368   = $DLG_altezza_368

         // Fabrizio 06/05/08 - in Lago
         if( STRCMP($DLG_altezza_368,"184")==0 )
         {
            VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O1.txt")

            if( ATOI($DLG_larghezza_368)>1840 )
            {
               $DLG_value_larghezza_368 = "1840"
               $DLG_larghezza_368 = "1840"
            }
         }
         else
         {
            if(STRCMP($DLG_profondita_368,"560")==0)
            {
                VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O1.txt")
            }
            else
            {
               VAR_SET_MENU(-1,"DLG_larghezza_368","AIRlarghezza368O.txt")
            }
         }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         //posx = 135
         posx = 170
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 190
         posx = 260
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 22/05/2019 - Emanuele - Modifico condizione per metallizzati
//        if( $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1)
        if( $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1 & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1)
        {
           if( $DLG_value_ww == 1 )   {  $R = CHIEDI(-1,"DLG_COLORE_368_W")  }
           //Massimiliano 15/09/2018  - manca distinzione lucido/opaco
           //else                       {  $R = CHIEDI(-1,"DLG_COLORE_368")    }
           else
           {
              if( $DLG_value_lucido == 1 )   {  $R = CHIEDI(-1,"DLG_COLORE_368_L")  }
              else                           {  $R = CHIEDI(-1,"DLG_COLORE_368")    }
           }
       }
        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        if( $DLG_value_lucido == 1 )
        {
           //$DLG_COLORE_368_L = $DLG_COLORE_368
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        else
        {
           if( $DLG_value_ww == 1 )
           {
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
           }
           GOSUB Get_Image_368
        }
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        // $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        // GOSUB Get_Image_368

        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 22/05/2019 - Emanuele - Aggiungo condizione per metallizzati
        if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
           if($DLG_value_opaco_metal==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
        }

        // Riccardo 06/03/13: Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 22/05/2019 - Emanuele - Aggiungo condizione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
        }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 345
         posx = 460
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 495
         posx = 615
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC

        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
        //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }

      ]
   }
   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 640
         posx = 770
         //posy = 130
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 575
         posx = 690
         //posy = 185
         posy = 180
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 490
         posx = 605
         //posy = 185
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}



//MD 110315
Dlg AIR368Cass
{
   Caption = MSG(1309)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 360
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 65
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         posy = 90
         dimx = 155
         dimy = 100
      }

//MD      Radio RdNessuno
//MD      {
//MD        Caption = MSG(90)
//MD        Hint    = MSG(112)
//MD        Value   = $DLG_value_rd_uso_1
//MD        Enable  = $DLG_enable_rd_uso_1
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 15
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 1
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdPiediStd
//MD      {
//MD        Caption = MSG(92)
//MD        Hint    = MSG(93)
//MD        Value   = $DLG_value_rd_uso_2
//MD        Enable  = $DLG_enable_rd_uso_2
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 35
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 1
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdSuppVetro
//MD      {
//MD        Caption = MSG(94)
//MD        Hint    = MSG(95)
//MD        Value   = $DLG_value_rd_uso_3
//MD        Enable  = $DLG_enable_rd_uso_3
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 55
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 1
//MD           $DLG_value_rd_uso_4 = 0
//MD        ]
//MD      }
//MD
//MD      Radio RdPiediNet
//MD      {
//MD        Caption = MSG(96)
//MD        Hint    = MSG(97)
//MD        Value   = $DLG_value_rd_uso_4
//MD        Enable  = $DLG_enable_rd_uso_4
//MD
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 75
//MD           dimx = 130
//MD           dimy = 20
//MD        }
//MD
//MD        OnClick
//MD        [
//MD           $DLG_value_rd_uso_1 = 0
//MD           $DLG_value_rd_uso_2 = 0
//MD           $DLG_value_rd_uso_3 = 0
//MD           $DLG_value_rd_uso_4 = 1
//MD        ]
//MD      }
//MD
//MD      Bevel Bvl1
//MD      {
//MD        Placement
//MD        {
//MD           posx = 10
//MD           posy = 105
//MD           dimx = 130
//MD           dimy = 2
//MD        }
//MD      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 25
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 55
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 175
         posy = 10
         dimx = 170
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  55
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 190
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 190
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AIR368Cass12
{
   Caption = MSG(1309)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 510
      //dimx = 655
      dimx = 775
      //dimy = 270
//      dimy = 310
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 155
         dimx = 200
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_larghezza
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         //posy = 80
         posy = 70
         //dimx = 155
         dimx = 200
         dimy = 85
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 25
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 50
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 175
         posx = 215
         posy = 10
         //dimx = 160
         dimx = 230
         //dimy = 225
//         dimy = 260
         dimy = 300
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  55
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 135
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 21/05/2019 - Emanuele - Modifico controllo per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_L
              $DLG_COLORE_368_O = $DLG_COLORE_368_L
              $DLG_COLORE_368_W = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 155
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_O = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              $DLG_COLORE_368_W = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           $DLG_value_opaco   = 1
           $DLG_value_laccato = 0
           $DLG_value_lucido  = 0
           $DLG_value_ww      = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 175
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 195
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0
        ]

      }
      // 21/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 215
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 235
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 175
//           posy = 215
           posy = 255
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 21/05/2019 - Emanuele - Modifico condizione per metallizzato
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_O = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              $DLG_COLORE_368_W = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           $DLG_value_laccato = 1
           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_ww      = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 175
//           posy = 235
           posy = 275
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 21/05/2019 - Emanuele - Aggiungo condizioni per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_O = $DLG_COLORE_368_W
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368   = $DLG_COLORE_368_W
              GOSUB Get_Image_368_W
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 335
         posx = 450
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 485
         posx = 605
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Enable = $DLG_enable_larghezza
      Hint = MSG(98)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 190
         posx = 270
         //posy = 115
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1 | $DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            //DISPLAY("$DLG_COLORE_368=", $DLG_COLORE_368)
         }
         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }

         if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
            $DLG_COLORE_368   = $DLG_COLORE_XGLASS
            GOSUB Get_Image_XGlass
         }

         // 21/05/2019 - Emanuele - Aggiungo condizione per metallizzati
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_METAL
            $DLG_COLORE_368   = $DLG_COLORE_METAL
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if($DLG_value_opaco_metal==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
         }

         // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
         if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
            & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 21/05/2019 - Emanuele - Aggiungo condizione per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
           )
         {
            $DLG_COLORE_368_SCC = $DLG_COLORE_368
            $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
            $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 350
         posx = 460
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI()))
                  }
                  if(IF_METAL($DLG_COLORE_368))
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI()))
                  }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 495
         posx = 615
         //posy = 130
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")
        //Massimiliano 31/05/17 - imposto il valore della GEST_DI del divisorio/ripiano come quello della schiena
        COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),APICI()))

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 100
         posx = 535
         //posy = 175
         posy = 180
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 10
         posx = 450
         //posy = 175
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AIR368Cass14_Side
{
   Caption = MSG(1309)
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano 18/04/17 - cambio larghezza dialog
      //dimx = 650
      //dimx = 790
      dimx = 925
      //dimy = 280
//      dimy = 310
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 155
         dimx = 200
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_larghezza
        Value   = $DLG_value_larghezza_368

        Placement
        {
           //posx = 70
           posx = 100
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         //posy = 80
         posy = 70
         //dimx = 155
         dimx = 200
         dimy = 85
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 25
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 50
           //dimx = 140
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(235)

      Placement
      {
         //posx = 175
         posx = 215
         posy = 10
         //dimx = 160
         dimx = 230
         //dimy = 225
//         dimy = 260
         dimy = 300
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  55
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 135
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_L = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_L
              $DLG_COLORE_368_O = $DLG_COLORE_368_L
              $DLG_COLORE_368_W = $DLG_COLORE_368_L
              GOSUB Get_Image_368_L
           }
           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 155
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_O = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              $DLG_COLORE_368_W = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           $DLG_value_opaco   = 1
           $DLG_value_laccato = 0
           $DLG_value_lucido  = 0
           $DLG_value_ww      = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }

      Radio RdLucidoXGlass
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_rd_lucido_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 175
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368_L = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
              $DLG_COLORE_368 = $DLG_COLORE_368_L
              $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 21/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

        ]

      }

      Radio RdOpacoXGlass
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_rd_opaco_xglass_368

        Placement
        {
           //posx = 15
           posx = 10
           posy = 195
           //dimx = 120
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
           {
              $DLG_COLORE_368 = "MR1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_XGLASS = $DLG_COLORE_368
              GOSUB Get_Image_XGlass
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 1
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           // 21/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

        ]

      }

      // 21/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_rd_lucido_metal_368

        Placement
        {
           posx = 10
           posy = 215
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1 )
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal  = 0

        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_rd_opaco_metal_368

        Placement
        {
           posx = 10
           posy = 235
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1 )
           {
              $DLG_COLORE_368 = "MT4"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              $DLG_COLORE_METAL = $DLG_COLORE_368
              GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           }
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 1

        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 175
//           posy = 215
           posy = 255
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //if($DLG_value_ww == 1)
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
           {
              $DLG_COLORE_368_O = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              $DLG_COLORE_368_W = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           $DLG_value_laccato = 1
           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_ww      = 0
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           //posx = 15
           posx = 10
           //posy = 175
//           posy = 235
           posy = 275
           //dimx = 145
           dimx = 220
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 20/07/2018  - cambio condizione con l'arrivo dell'XGlass
           if($DLG_value_opaco==1
            | $DLG_value_lucido==1
            | $DLG_value_laccato==1
            | $DLG_value_lucido_xglass == 1
            | $DLG_value_opaco_xglass == 1
            // 21/05/2019 - Emanuele - Aggiungo condizioni per metallizzato
            | $DLG_value_lucido_metal == 1
            | $DLG_value_opaco_metal == 1
            )
           {
              $DLG_COLORE_368_W = "SZ1"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_O = $DLG_COLORE_368_W
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368   = $DLG_COLORE_368_W
              GOSUB Get_Image_368_W
           }
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
           //Massimiliano 20/07/2018  - aggiungo variabili per Xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass  = 0
           // 21/05/2019 - Emanuele - Aggiungo variabili per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal  = 0

           //Eugenio 03.12.13
           //GOSUB Get_Image_368
        ]
      }
   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         //posx = 335
         posx = 450
         posy = 10
         dimx = 150
         dimy = 225
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 140
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon

        Placement
        {
           posx = 15
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 180
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 200
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         //posx = 485
         posx = 605
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }
   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
         //posx = 630
         posx = 760
         posy = 10
         dimx = 150
         //dimy = 180
         dimy = 165
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Enable = $DLG_enable_larghezza
      Hint = MSG(98)

      Placement
      {
         //posx = 135
         posx = 170
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 190
         posx = 270
         //posy = 115
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1 | $DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            //DISPLAY("$DLG_COLORE_368=", $DLG_COLORE_368)
         }
         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }

         if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
            $DLG_COLORE_368   = $DLG_COLORE_XGLASS
            GOSUB Get_Image_XGlass
         }

         // 21/05/2019 - Emanuele - Aggiungo controllo per metallizzati
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_METAL
            $DLG_COLORE_368   = $DLG_COLORE_METAL
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if($DLG_value_opaco_metal==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }

         // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
         if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
            & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
           //Massimiliano 20/07/2018  - aggiungo esclusione
           & $DLG_value_lucido_xglass != 1 & $DLG_value_opaco_xglass != 1
           // 21/05/2019 - Emanuele - Aggiungo condizioni per metallizzati
           & $DLG_value_lucido_metal != 1 & $DLG_value_opaco_metal != 1
           )
         {
            $DLG_COLORE_368_SCC = $DLG_COLORE_368
            $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
            $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

           //Massimiliano 19/04/17 - quando cambio la finitura dell'anta, cambio anche quella della schiena
           $DLG_enable_schiena = 0
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
           $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
           $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 350
         posx = 460
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            //Massimiliano 31/05/17 - mi salvo il default del colore side per i controlli successivi
            $DLG_COLORE_368_SIDE_prec = $DLG_COLORE_368_SIDE

            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
            $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
            $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)

            //Massimiliano 31/05/17 - se il side non  wildwood e la stuttura si, la schiena e il divisorio diventano colore del side
            $DLG_enable_schiena = 1
            if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==0 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
            {
               $DLG_enable_schiena = 0
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
            else
            {
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 & IS_MATCH($DLG_COLORE_368_SCC,"SZ*")==1 )
               {
                  if( IS_MATCH($DLG_COLORE_368_SIDE_prec,"SZ*")!=1 )
                  {
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                     COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),"SPG",APICI()))
                     $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
                     $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
                     $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
                  }
               }
            }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 495
         posx = 615
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
        $DLG_COLORE_368_SCC_prec = $DLG_COLORE_368_SCC
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH($DLG_COLORE_368_SCC,"SZ*") )
         {
            if( IS_MATCH($DLG_COLORE_368_SCC_prec,"SZ*")!=1 )
            {
               //Massimiliano 31/05/17 - cambiano le regole per la schiena, se la struttura  WW e pure il side allora la schiena va spago
               //                        altrimenti la schiena diventa colore del side
               if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*") )
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
                  $DLG_enable_schiena = 1
                  //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
                  //                           ma il colore abbinato da listino del frontale XGLASS
                  // 23/05/2019 - Emanuele - Modifico controllo per metallizzati
//                  if( IF_XGLASS($DLG_COLORE_368) )
                  if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
                  {
                     // 23/05/2019 - Emanuele - Aggiungo controlli per metallizzati e xglass
                     if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                     if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                     $DLG_enable_schiena = 0
                  }
               }
               else
               {
                  COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SIDE,APICI()))
                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),$DLG_COLORE_368_SCC,APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_scc_var
            $DLG_image_file_sch   = $DLG_image_file_scc
         }
      ]
   }

   //Massimiiano 19/04/17 - creo il bottone per la finitura della schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
         //posx = 640
         posx = 770
         //posy = 130
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 100
         posx = 690
         //posy = 175
         posy = 180
         //dimx = 65
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 10
         posx = 605
         //posy = 175
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirSetTerra
{
   Caption = MSG(1310)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 225
      dimy = 160
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 200
         dimy = 90
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 95
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(1300)
        Value   = MSG(629)

        Placement
        {
           posx = 35
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_prof
        Hint    = $DLG_hint_prof
        Value   = $DLG_value_prof

        Placement
        {
           posx = 95
           posy = 55
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(1307)
        Value   = MSG(1308)

        Placement
        {
           posx = 35
           posy = 60
           dimx = 80
           dimy = 20
        }

      }

      Button btnAltezza
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(1303)

         Placement
         {
            posx = 147
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
           $R = CHIEDI(-1,"DLG_altezza")

           $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
           $DLG_caption_altezza = STR($DLG_altezza)
           $DLG_value_altezza   = STR($DLG_altezza)
         ]
      }

      Button btnProf
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(1303)

         Placement
         {
            posx = 147
            posy = 55
            dimx = 20
            dimy = 20
         }

         OnClick
         [
           $R = CHIEDI(-1,"DLG_prof")

           $DLG_hint_prof    = STRCAT(MSG(1311)," = ",STR($DLG_prof))
           $DLG_caption_prof = STR($DLG_prof)
           $DLG_value_prof   = STR($DLG_prof)
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 120
         posy = 100
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 30
         posy = 100
         dimx = 85
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg AirPortaDVD
{
   Caption = MSG(1312)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 175
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = 0

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(1313)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 65
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 20
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 20
           posy = 100
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 155
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 155
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   //Button btnAltezza
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = MSG(1303)
   //
   //   Placement
   //   {
   //      posx = 130
   //      posy = 35
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_altezza")
   //     $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
   //     $DLG_caption_altezza = STR($DLG_altezza)
   //     $DLG_value_altezza   = STR($DLG_altezza)
   //   ]
   //}
}


Dlg AirContenitore
{
   Caption = MSG(1314)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura
        Hint    = $DLG_hint_apertura
        Value   = $DLG_value_apertura

        Placement
        {
           posx = 50
           posy = 40
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblApertura
      {
        Caption = MSG(1315)
        Hint    = MSG(1315)
        Value   = MSG(1315)

        Placement
        {
           posx = 30
           posy = 20
           dimx = 100
           dimy = 20
        }

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 65
           dimx = 130
           dimy = 2
        }
      }

      Radio rdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 100
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        // Riccardo 22/09/11: Prendo il valore direttamente dalla variante
        $R = CHIEDI($DLG_idx_to_call,"GEST_CA")
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_CA"),"colori_tutti.txt")
        $DLG_COLORE_AIR2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_CA")
        GOSUB Get_Image_Air2


//        $R = CHIEDI(-1,"DLG_COLORE_AIR2")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
//        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR2,"colori_tutti.txt")
//        GOSUB Get_Image_Air2
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1316)

      Placement
      {
         posx = 110
         posy = 50
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura")
        $DLG_hint_apertura    = STRCAT(MSG(1317)," = ",$DLG_apertura)
        $DLG_caption_apertura = $DLG_apertura
        $DLG_value_apertura   = $DLG_apertura
      ]
   }
}


Dlg AirTavolo
{
   Caption = MSG(973)
   Placement
   {
      posx = 150
      posy = 150
      // 01/02/2019 - Emanuele - Modifico le dimensioni in larghezza della dialog
//      dimx = 430
      dimx = 460
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = $DLG_enable_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 250
         dimy = 135
      }

      Radio rd1
      {
         // 17/04/2019 - Emanuele - Modifico la scritta data indicazione di Giorgio in un Ticket
//         Caption  = MSG(974)
//         Hint     = MSG(974)
         Caption  = MSG(722)
         Hint     = MSG(722)
         Value    = $DLG_value_rd_uso_1
         // 01/02/2019 - Emanuele - Aggiungo l'assegnazione dell'enable date le nuove regole del fenix
         Enable = $DLG_enable_laccato

         Placement
         {
            posx = 10
            posy = 30
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            // Laccato/Bump Wood
            $DLG_var_to_call = $DLG_var_to_call_1

            $DLG_rivestimento   = 1
            $DLG_value_rd_uso_1 = 1
            $DLG_value_rd_uso_2 = 0
            // 13/06/2018 - Emanuele - Aggiungo variabile per nuova finitura
            $DLG_value_rd_uso_3 = 0

            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 | STRCMP($DLG_COLORE_AIR,"LOP")==0 | $R==0 )
            {
               $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
               $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            }
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
            GOSUB Get_Image_Air
         ]
      }

      Radio rd2
      {
         // 28/11/2017 - Filippo - come da ticket di Marco Traverso, cambio la dicitura da "Laminglass" a "Laminato"
         //Caption = MSG(975)
         //Hint    = MSG(975)
         Caption = MSG(2164)
         Hint    = MSG(2164)
         // 09/03/2018 - Emanuele - Aggiungo l'abilitazione del tasto solo se il tavolo non  ignifugo
         Enable  = $DLG_enable_laminato
         Value   = $DLG_value_rd_uso_2

         Placement
         {
            posx = 10
            // 13/06/2018 - Emanuele - Modifico la posizione in y
//            posy = 70
            posy = 60
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            // Laminglass
            $DLG_var_to_call = $DLG_var_to_call_2

            $DLG_rivestimento   = 2
            $DLG_value_rd_uso_1 = 0
            $DLG_value_rd_uso_2 = 1
            // 13/06/2018 - Emanuele - Aggiungo variabile per nuova finitura
            $DLG_value_rd_uso_3 = 0

            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 | STRCMP($DLG_COLORE_AIR,"LOP")==0 | $R==0 )
            {
               $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
               $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            }
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
            GOSUB Get_Image_Air
         ]
      }
      // 13/06/2018 - Emanuele - Aggiungo un radiobutton per la finitura Fenix
      Radio rd3
      {
         Caption = MSG(3350)
         Hint    = MSG(3350)
         Enable  = $DLG_enable_fenix
         Value   = $DLG_value_rd_uso_3

         Placement
         {
            posx = 10
            posy = 90
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_var_to_call = $DLG_var_to_call_3

            $DLG_rivestimento = 3
            $DLG_value_rd_uso_1 = 0
            $DLG_value_rd_uso_2 = 0
            $DLG_value_rd_uso_3 = 1

            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 | STRCMP($DLG_COLORE_AIR,"LOP")==0 | $R==0 )
            {
               $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            }
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
            GOSUB Get_Image_Air
         ]
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 140
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  145
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 275
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
         $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
         while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 | STRCMP($DLG_COLORE_AIR,"LOP")==0 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
         }
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
         GOSUB Get_Image_Air

         //$R = CHIEDI(-1,"DLG_COLORE_AIR")
         //
         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
         //GOSUB Get_Image_Air
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        //rob_pec 18/01/2011: aggiunto controllo per nuova misura
        // 10/07/2018 - Emanuele - Aggiungo in tutte le condizioni l'enable per l'altezza perch in alcuni
        // casi va disabilitata
        if( $DLG_misure==12085 )
        {
            $DLG_X = 1200
            $DLG_Z =  850
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }
        // 09/07/2018 - Emanuele - Aggiungo una condizione per gestire le nuove misure dei tavoli
        if( $DLG_misure==12090 )
        {
            $DLG_X = 1200
            $DLG_Z =  900
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }

        if( $DLG_misure==16085 )
        {
            $DLG_X = 1600
            $DLG_Z =  850
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }
        // 09/07/2018 - Emanuele - Aggiungo una condizione per gestire le nuove misure dei tavoli
        if( $DLG_misure==16090 )
        {
            $DLG_X = 1600
            $DLG_Z =  900
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }

        if( $DLG_misure==19085 )
        {
            $DLG_X = 1900
            $DLG_Z =  850
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }
        // 09/07/2018 - Emanuele - Aggiungo una condizione per gestire le nuove misure dei tavoli
        if( $DLG_misure==200100 )
        {
            $DLG_X = 2000
            $DLG_Z = 1000
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }

        if( $DLG_misure==220100 )
        {
            $DLG_X = 2200
            $DLG_Z = 1000
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }

        if( $DLG_misure==250100 )
        {
            $DLG_X = 2500
            $DLG_Z = 1000
            // 10/07/2018 - Emanuele - Aggiungo l'assegnazione dell'enable
            $DLG_enable_altezza = 1
        }
        // 09/07/2018 - Emanuele - Aggiungo una condizione per gestire le nuove misure dei tavoli
        if( $DLG_misure==250120 )
        {
            $DLG_X = 2500
            $DLG_Z = 1200
            // 10/07/2018 - Emanuele - Tolto la possibilit di modificare l'altezza con queste misure
            $DLG_enable_altezza = 0
            $DLG_altezza = 760
        }
        // 09/07/2018 - Emanuele - Aggiungo una condizione per gestire le nuove misure dei tavoli
        if( $DLG_misure==300120 )
        {
            $DLG_X = 3000
            $DLG_Z = 1200
            // 10/07/2018 - Emanuele - Tolto la possibilit di modificare l'altezza con queste misure
            $DLG_enable_altezza = 0
            $DLG_altezza = 760
        }

        if( $DLG_misure==8080 )
        {
            $DLG_X = 800
            $DLG_Z = 800
        }

        if( $DLG_misure==8585 )
        {
            $DLG_X = 850
            $DLG_Z = 850
        }

        if( $DLG_misure==100100 )
        {
            $DLG_X = 1000
            $DLG_Z = 1000
        }

         // 01/02/2019 - Emanuele - Aggiungo condizione per la gestione dell'abilitazione del laccato e laminato
         // 04/02/2019 - Emanuele - Commento il controllo perch non serve pi fare questa distinzione
//         if($DLG_rev_tav_lac>=1)
//         {
//            if($DLG_Z>1000 & $DLG_Z<=1200)
//            {
//               $DLG_enable_laccato = 0
//               $DLG_enable_laminato = 0
//               if($DLG_value_rd_uso_1==1 | $DLG_value_rd_uso_2 ==1)
//               {
//                  $DLG_value_rd_uso_1 = 0
//                  $DLG_value_rd_uso_2 = 0
//                  $DLG_value_rd_uso_3 = 1
//                  $DLG_rivestimento = 3
//               }
//            }
//            else
//            {
//               $DLG_enable_laccato = 1
//               $DLG_enable_laminato = 1 - $DLG_var_ignifugo
//            }
//         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure

         $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
         $DLG_caption_altezza = STR($DLG_altezza)
         $DLG_value_altezza   = STR($DLG_altezza)

      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)
      // 10/07/2018 - Emanuele - Aggiungo l'enable per l'altezza perch con certe condizioni non la si pu
      // cambiare
      Enable = $DLG_enable_altezza

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

}

//18.05.2017 - Filippo - Diaolog tavolo Vertigo
Dlg Vertigo
{
   Caption = MSG(1687)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 350
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 135
      }

      Edit EdtMisure
      {
        Caption = $DLG_desc_misure
        Hint    = $DLG_desc_misure
        Value   = $DLG_desc_misure

        Placement
        {
           posx = 80
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 180
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 155
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"VAR_misure")
        $DLG_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")
         //Set misure
         if( $DLG_misure==12090 )
         {
             $DLG_X     = 1200
             $DLG_Z     =  900
         }

         if( $DLG_misure==16090 )
         {
             $DLG_X     = 1600
             $DLG_Z     =  900
         }

         if( $DLG_misure==19090 )
         {
             $DLG_X     = 1900
             $DLG_Z     =  900
         }

         if( $DLG_misure==220100 )
         {
              $DLG_X     = 2200
              $DLG_Z     = 1000
         }

         if( $DLG_misure==250100 )
         {
              $DLG_X     = 2500
              $DLG_Z     = 1000
         }
         if( $DLG_misure==300120 )
         {
              $DLG_X     = 3000
              $DLG_Z     = 1200
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         //$DLG_caption_misure  = $DLG_desc_misure
         //$DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)
      //28.08.2017 - Filippo - sblocco la scelta dei colori del tavolo vertigo
      //Enable = 0
      Enable = $DLG_ena_color

      Placement
      {
         posx = 190
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_image_file   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),".bmp")
         $DLG_image_file   = SUBST_LABEL($DLG_image_file)
      ]
   }
}

//26.09.2017 - Filippo - nuova dialog per tavolo air gentle sp.50
Dlg TavoloGentle
{
   Caption = MSG(973)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 350
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 135
      }

      Edit EdtMisure
      {
        Caption = $DLG_desc_misure
        Hint    = $DLG_desc_misure
        Value   = $DLG_desc_misure

        Placement
        {
           posx = 80
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 180
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 155
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"VAR_misure")
        $DLG_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")
         //Set misure
         if( $DLG_misure==16090 )
         {
             $DLG_X     = 1600
             $DLG_Z     =  900
         }

         if( $DLG_misure==19090 )
         {
             $DLG_X     = 1900
             $DLG_Z     =  900
         }

         if( $DLG_misure==220100 )
         {
              $DLG_X     = 2200
              $DLG_Z     = 1000
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         //$DLG_caption_misure  = $DLG_desc_misure
         //$DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)
      Enable = 1

      Placement
      {
         posx = 190
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
         $DLG_image_file   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),".bmp")
         $DLG_image_file   = SUBST_LABEL($DLG_image_file)
      ]
   }
}

// 09/07/2018 - Emanuele - Duplico e modifico la Dialog del tavolo Gentle per creare la dialog del tavolo Rovere
Dlg TavoloRovere
{
   Caption = MSG(973)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 380
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 175
         dimy = 140
      }

      Edit EdtMisure
      {
        Caption = $DLG_desc_misure
        Hint    = $DLG_desc_misure
        Value   = $DLG_desc_misure

        Placement
        {
           posx = 80
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      // 09/07/2018 - Emanuele - Aggiungo il campo dell'altezza nel frame delle misure
      Edit EdtAltezza
      {
        Caption = $DLG_value_altezza
        Hint    = $DLG_value_altezza
        Value   = $DLG_value_altezza
        // 30/10/2018 - Emanuele - Aggiungo enable per bloccare l'altezza per il tavolo haywood/agewood
        Enable  = $DLG_enable_altezza

        Placement
        {
           posx = 80
           posy = 55
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblaltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 60
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 190
         posy = 10
         dimx = 170
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  50
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 155
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"VAR_misure")
        $DLG_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")
         //Set misure
         // TAVOLO QUADRATO
         if($DLG_Tavolo_quadrato == 1)
         {
            if( $DLG_misure==736 )
            {
                $DLG_X     = 736
                $DLG_Z     = 736
            }

            if( $DLG_misure==828 )
            {
                $DLG_X     = 828
                $DLG_Z     = 828
            }

            if( $DLG_misure==920 )
            {
                 $DLG_X     = 920
                 $DLG_Z     = 920
            }

            if( $DLG_misure==1104 )
            {
                 $DLG_X     = 1104
                 $DLG_Z     = 1104
            }

            if( $DLG_misure==1200 )
            {
                 $DLG_X     = 1200
                 $DLG_Z     = 1200
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         }

         // TAVOLO RETTANGOLARE
         if($DLG_Tavolo_rettangolare == 1)
         {
            if( $DLG_misure==782 )
            {
                 $DLG_X     = 782
                 $DLG_Z     = 368
            }

            if( $DLG_misure==1104 )
            {
                 $DLG_X     = 1104
                 $DLG_Z     = 552
            }

            if( $DLG_misure==1200 )
            {
                 $DLG_X     = 1200
                 $DLG_Z     = 850
            }

            if( $DLG_misure==1472 )
            {
                 $DLG_X     = 1472
                 $DLG_Z     = 782
            }

            if( $DLG_misure==16090 )
            {
                 $DLG_X     = 1600
                 $DLG_Z     = 900
            }

            if( $DLG_misure==1900 )
            {
                 $DLG_X     = 1900
                 $DLG_Z     = 900
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         }

         // TAVOLO TONDO
         if($DLG_Tavolo_tondo == 1)
         {
            if( $DLG_misure==500 )
            {
               $DLG_X       = 500
               $DLG_Z       = 500
            }

            if( $DLG_misure==900 )
            {
               $DLG_X       = 900
               $DLG_Z       = 900
            }

            if( $DLG_misure==1200 )
            {
               $DLG_X       = 1200
               $DLG_Z       = 1200
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X))
            $DLG_hint_misure     = STRCAT(MSG(1998)," =",$DLG_desc_misure)
         }

         // 30/10/2018 - Emanuele - Aggiungo condizione per la gestione del tavolo haywood/agewood
         if($DLG_Tavolo_alto == 1)
         {
            $DLG_enable_altezza = 1

            if($DLG_misure==12090)
            {
               $DLG_X    = 1200
               $DLG_Z    = 900
            }
            if($DLG_misure==16090)
            {
               $DLG_X    = 1600
               $DLG_Z    = 900
            }
            if($DLG_misure==19090)
            {
               $DLG_X    = 1900
               $DLG_Z    = 900
            }
            if($DLG_misure==200100)
            {
               $DLG_X    = 2000
               $DLG_Z    = 1000
            }
            if($DLG_misure==220100)
            {
               $DLG_X    = 2200
               $DLG_Z    = 1000
            }
            if($DLG_misure==250100)
            {
               $DLG_X    = 2500
               $DLG_Z    = 1000
            }
            if($DLG_misure==250120)
            {
               $DLG_X    = 2500
               $DLG_Z    = 1200
               $DLG_enable_altezza = 0
               $DLG_altezza = 760
               $DLG_value_altezza = STR($DLG_altezza)
            }
            if($DLG_misure==300120)
            {
               $DLG_X    = 3000
               $DLG_Z    = 1200
               $DLG_enable_altezza = 0
               $DLG_altezza = 760
               $DLG_value_altezza = STR($DLG_altezza)
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         }

         // 31/10/2018 - Emanuele - Aggiungo condizione per la gestione della panca haywood/agewood
         if($DLG_panca==1)
         {
            $DLG_Z = 406

            if($DLG_misure==1200)
            {
               $DLG_X = 1200
            }
            if($DLG_misure==1600)
            {
               $DLG_X = 1600
            }
            if($DLG_misure==2000)
            {
               $DLG_X = 2000
            }
            if($DLG_misure==2200)
            {
               $DLG_X = 2200
            }
            if($DLG_misure==2500)
            {
               $DLG_X = 2500
            }
            if($DLG_misure==3000)
            {
               $DLG_X = 3000
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         }

         // 13/07/2018 - Emanuele - Sposto le assegnazioni delle descrizioni dentro le condizioni dei tavoli
//         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
//         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         //$DLG_caption_misure  = $DLG_desc_misure
         //$DLG_value_misure    = $DLG_desc_misure
      ]
   }

   // 09/07/2018 - Emanuele - Aggiungo il bottone per modificare l'altezza del tavolo
   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)
      // 30/10/2018 - Emanuele - Aggiungo possibilit di bloccare l'altezza per i tavoli haywood/agewood
      Enable = $DLG_enable_altezza

      Placement
      {
         posx = 155
         posy = 65
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"Y")
        $DLG_altezza = VAR_VAL($DLG_idx_to_call,"Y")
        $DLG_hint_altezza    = STRCAT("Altezza =",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)
      Enable = 1

      Placement
      {
         posx = 210
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_ROVERE")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_ROVERE,"colori_tutti.txt")
         GOSUB Get_Image_Rovere
      ]
   }
}

Dlg AirTavoloQua
{
   Caption = MSG(973)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 440
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 50
      }

      Edit EdtMisure
      {
         Caption = $DLG_X
         Hint    = $DLG_hint_X
         Value   = $DLG_value_misure

         Placement
         {
            posx = 65
            posy = 25
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label Lblmisure
      {
         Caption = MSG(964)
         Hint    = MSG(965)
         Value   = MSG(637)

         Placement
         {
            posx = 5
            posy = 30
            dimx = 80
            dimy = 20
         }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 250
         dimy = 135
      }

      Radio rd1
      {
        Caption = MSG(976)
        Hint    = MSG(976)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // Quarzo Lucido
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_quarzo         = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"coloritop.txt")
           GOSUB Get_Image_Air_Qua
        ]
      }

      Radio rd2
      {
        Caption = MSG(977)
        Hint    = MSG(977)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // Quarzo tatum
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_quarzo         = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"coloritop.txt")
           GOSUB Get_Image_Air_Qua
        ]
      }

      Radio rd3
      {
        Caption = MSG(978)
        Hint    = MSG(978)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 70
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // Quarzo Lucido
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_quarzo         = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 | STRCMP($DLG_COLORE_AIR,"QUA")==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"coloritop.txt")
           GOSUB Get_Image_Air_Qua
        ]
      }


      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 150
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  145
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 275
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // $R = CHIEDI(-1,"DLG_COLORE_AIR")
         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
         $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
         while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 | STRCMP($DLG_COLORE_AIR,"QUA")==0 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
         }
         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"coloritop.txt")
         GOSUB Get_Image_Air_Qua
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        //rob_pec 18/01/2011: aggiunto controllo per nuova misura
        if( $DLG_misure==12085 )
        {
            $DLG_X = 1200
            $DLG_Z =  850
        }

        if( $DLG_misure==16085 )
        {
            $DLG_X = 1600
            $DLG_Z =  850
        }

        if( $DLG_misure==19085 )
        {
            $DLG_X = 1900
            $DLG_Z =  850
        }

        $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
        $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
        $DLG_caption_misure  = $DLG_desc_misure
        $DLG_value_misure    = $DLG_desc_misure
      ]
   }
}

Dlg AirTavolinoFS
{
   Caption = MSG(2131)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        //Caption = MSG(964)
        //Hint    = MSG(965)
        Caption = MSG(637)
        Hint    = MSG(637)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 195
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
//OLD110609         // Controllo che in effetti la finitura della doga 3
//OLD110609         // sia un TabDaDbBmp....perch attivando la variante "al volo"
//OLD110609         // la crea di default la DLL come TabDaDbCol anzich TabdaDbBmp
//OLD110609         if( VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)!=131072 )
//OLD110609         {
//OLD110609            VAR_CREATE_STR($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_COLORE_AIR,131072,"")
//OLD110609         }

        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
//OLD110609      GOSUB Get_Image_GestAir
         GOSUB Get_Image_Air
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1319)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_tondo == 0 )
         {
            if( $DLG_misure==782 )
            {
               $DLG_X = 782
               $DLG_Z = 368
            }

            if( $DLG_misure==828 )
            {
                $DLG_X     =  828
                $DLG_Z     =  828
            }

            if( $DLG_misure==1104 )
            {
                $DLG_X     = 1104
                $DLG_Z     =  552
            }

            // 08/10/2018 - Emanuele - Aggiungo controllo che verifica se l'elemento ha una revisione prima di impostare
            // le nuove misure
            if($DLG_Revisione>=1)
            {
               // 07/06/2018 - Emanuele - Aggiungo controllo per tavolino quadrato
               if($DLG_tavolo_quadrato==1)
               {
                  if( $DLG_misure==736 )
                  {
                     $DLG_X = 736
                     $DLG_Z = 736
                  }

                  if( $DLG_misure==828 )
                  {
                     $DLG_X = 828
                     $DLG_Z = 828
                  }

                  if( $DLG_misure==920 )
                  {
                     $DLG_X = 920
                     $DLG_Z = 920
                  }

                  if( $DLG_misure==1104 )
                  {
                     $DLG_X = 1104
                     $DLG_Z = 1104
                  }

                  if( $DLG_misure==1200 )
                  {
                     $DLG_X = 1200
                     $DLG_Z = 1200
                  }
               }

               // 07/06/2018 - Emanuele - Aggiungo controllo per tavolino rettangolare
               if($DLG_tavolo_rettangolare==1)
               {
                  if( $DLG_misure==782 )
                  {
                     $DLG_X = 782
                     $DLG_Z = 368
                  }

                  if( $DLG_misure==1104 )
                  {
                     $DLG_X = 1104
                     $DLG_Z = 552
                  }

                  if( $DLG_misure==1200 )
                  {
                     $DLG_X = 1200
                     $DLG_Z = 850
                  }

                  if( $DLG_misure==1472 )
                  {
                     $DLG_X = 1472
                     $DLG_Z = 782
                  }

                  if( $DLG_misure==16090 )
                  {
                     $DLG_X = 1600
                     $DLG_Z = 900
                  }

                  if( $DLG_misure==1900 )
                  {
                     $DLG_X = 1900
                     $DLG_Z = 900
                  }
               }
            }

            $DLG_desc_misure    = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure    = STRCAT(MSG(807)," = ",$DLG_desc_misure)
            $DLG_caption_misure = $DLG_desc_misure
            $DLG_value_misure   = $DLG_desc_misure
         }
         else
         {
            if( $DLG_misure==500 )
            {
               $DLG_X = 500
               $DLG_Z = 500
            }
            if( $DLG_misure==900 )
            {
               $DLG_X = 900
               $DLG_Z = 900
            }
            // 11/06/2018 - Emanuele - Aggiungo misure per il 1200 di diametro
            if( $DLG_misure==1200 )
            {
               $DLG_X = 1200
               $DLG_Z = 1200
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X))
            $DLG_hint_misure     = STRCAT(MSG(1998)," =",$DLG_desc_misure)
            $DLG_caption_misure  = $DLG_desc_misure
            $DLG_value_misure    = $DLG_desc_misure

            $DLG_hint_X          = STRCAT(MSG(1998)," =",STR($DLG_larghezza))
            $DLG_value_X         = STR($DLG_larghezza)
            $DLG_caption_X       = STR($DLG_larghezza)

            $XChange = $DLG_X
            $ZChange = $DLG_Z
         }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }
}

Dlg AirTavoloFS
{
   Caption = MSG(973)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 130
      }

      Edit EdtMisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

      Radio RdRettang
      {
        Caption = MSG(644)
        Hint    = MSG(644)
        Value   = $DLG_rettangolare_air

        Placement
        {
           posx = 40
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 1

      // Fabrizio: nel richiamare direttamente la variabile interna
      // all'idx dovrei prima ricalcolare l'idx stesso affinch
      // avvenga l'effettivo cambiamento di men.....
      // Al momento lascio dunque la variabile DLG_misure come
      // variabile di appoggio.
      //     $DLG_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")
      //
      //      //assegno un default se cambia la misura e non corrisponde al menu
      //      if( $DLG_misure!=1200 & $DLG_misure!=1600
      //        & $DLG_misure!=1900 & $DLG_misure!=2200
      //        & $DLG_misure!=2500 )
      //      {
      //         $DLG_misure = 1200
      //         $DLG_X = 1200
      //         $DLG_Z = 850
      //
      //         //cambio il menu a "VAR misure"
      //         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_misure=",STR($DLG_misure)))
      //         VAR_CREATE_NUM($DLG_idx_to_call,"VAR_misure",$DLG_misure,2,"XZTavAir1")
      //      }
      //      else
      //      {
      //         VAR_CREATE_NUM($DLG_idx_to_call,"VAR_misure",$DLG_misure,2,"XZTavAir2")
      //      }
      //
      //
      //      $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_X),"x",STR($DLG_Z))
      //      $DLG_caption_misure  = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
      //      $DLG_value_misure    = STRCAT(STR($DLG_X),"x",STR($DLG_Z))

              if( $DLG_misure!=1200 | $DLG_misure!=1600
                | $DLG_misure!=1900 | $DLG_misure!=2200
                | $DLG_misure!=2500 )
              {
                 $DLG_misure = 1200
                 $DLG_X = 1200
                 $DLG_Z = 850

                 //cambio il menu a "VAR misure"
                 VAR_SET_MENU (-1,"DLG_misure","XZTavAir1")
              }
              else
              {
                 VAR_SET_MENU (-1,"DLG_misure","XZTavAir2")
              }


              $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_X),"x",STR($DLG_Z))
              $DLG_caption_misure  = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
              $DLG_value_misure    = STRCAT(STR($DLG_X),"x",STR($DLG_Z))

        ]
      }

      Radio RdQuadrato
      {
        Caption = MSG(643)
        Hint    = MSG(643)
        Value   = $DLG_quadrato_air

        Placement
        {
           posx = 40
           dimx = 120
           posy = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 1
           $DLG_rettangolare_air = 0

      // Fabrizio: nel richiamare direttamente la variabile interna
      // all'idx dovrei prima ricalcolare l'idx stesso affinch
      // avvenga l'effettivo cambiamento di men.....
      // Al momento lascio dunque la variabile DLG_misure come
      // variabile di appoggio.
      //   $DLG_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")
      //
      //   //controllo cambio di misure e assegno il default
      //   if( $DLG_misure!=800 & $DLG_misure!=1000 )
      //   {
      //      $DLG_misure = 800
      //      $DLG_X = 800
      //      $DLG_Z = 800
      //
      //      //cambio il menu a "VAR misure"
      //      COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_misure=",STR($DLG_misure)))
      //      VAR_CREATE_NUM($DLG_idx_to_call,"VAR_misure",$DLG_misure,2,"XZTavAir2")
      //   }
      //   else
      //   {
      //      VAR_CREATE_NUM($DLG_idx_to_call,"VAR_misure",$DLG_misure,2,"XZTavAir1")
      //   }
      //
      //
      //   $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
      //   $DLG_caption_misure  = STR($DLG_misure)
      //   $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))

           if( $DLG_misure!=800 | $DLG_misure!=1000 )
           {
              $DLG_misure = 800
              $DLG_X = 800
              $DLG_Z = 800

              //cambio il menu a "VAR misure"
              VAR_SET_MENU (-1,"DLG_misure","XZTavAir2")

           }
           else
           {
              VAR_SET_MENU (-1,"DLG_misure","XZTavAir1")
           }

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))

        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // Controllo che in effetti la finitura della doga 3
         // sia un TabDaDbBmp....perch attivando la variante "al volo"
         // la crea di default la DLL come TabDaDbCol anzich TabdaDbBmp
         if( VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)!=131072 )
         {
            VAR_CREATE_STR($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_COLORE_AIR,131072,"")
         }

        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_GestAir
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //$R = CHIEDI($DLG_idx_to_call,"VAR_misure")
         $R = CHIEDI(-1,"DLG_misure")

         // ----------------------
         //  TAVOLO RETTANGOLARE
         // ----------------------
         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==1200 )
         if( $DLG_misure==1200 )
         {
            $DLG_X =  1200
            $DLG_Z =  850
         }

         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==1600 )
         if( $DLG_misure==1600 )
         {
            $DLG_X =  1600
            $DLG_Z =  850
         }

         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==1900 )
         if( $DLG_misure==1900 )
         {
            $DLG_X = 1900
            $DLG_Z =  850
         }

         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==2200 )
         if( $DLG_misure==2200 )
         {
             $DLG_X = 2200
             $DLG_Z = 1000
         }

         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==2500 )
         if( $DLG_misure==2500 )
         {
             $DLG_X = 2500
             $DLG_Z = 1000
         }

         // -------------------
         //  TAVOLO QUADRATO
         // -------------------
         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==800 )
         if( $DLG_misure==800 )
         {
             $DLG_X = 800
             $DLG_Z = 800
         }

         //if( VAR_VAL($DLG_idx_to_call,"VAR_misure")==1000 )
         if( $DLG_misure==1200 )
         {
             $DLG_X = 1000
             $DLG_Z = 1000
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"Y")
         $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR(VAR_VAL($DLG_idx_to_call,"Y")))
         $DLG_caption_altezza = STR(VAR_VAL($DLG_idx_to_call,"Y"))
         $DLG_value_altezza   = STR(VAR_VAL($DLG_idx_to_call,"Y"))
      ]
   }
}


Dlg AirTavolinoInt
{
   Caption = MSG(1320)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 135
      }

      Edit Edtlarghezza
      {
         Caption = $DLG_caption_larghezza
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 75
            posy = 25
            dimx = 50
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtProfondita
      {
         Caption = $DLG_caption_profondita
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 75
            posy = 50
            dimx = 50
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 5
           posy = 85
           dimx = 145
           dimy = 2
        }
      }

//      Edit EdtPosizione_sx_dx
//      {
//         Caption = $DLG_caption_posizione_sx_dx
//         Hint    = $DLG_hint_posizione_sx_dx
//         Value   = $DLG_value_posizione_sx_dx
//
//         Placement
//         {
//            posx = 75
//            posy = 75
//            dimx = 50
//            dimy = 20
//         }
//      }
//
      Edit EdtPosizione_fr_re
      {
         Caption = $DLG_caption_posizione_fr_re
         Hint    = $DLG_hint_posizione_fr_re
         Value   = $DLG_value_posizione_fr_re

         Placement
         {
            posx = 75
            posy = 100
            dimx = 50
            dimy = 20
         }
      }

      Label Lbllarghezza
      {
         Caption = MSG(624)
         Hint    = MSG(1321)
         Value   = MSG(624)

         Placement
         {
            posx = 5
            posy = 30
            dimx = 80
            dimy = 20
         }
      }

      Label LblProfondita
      {
         Caption = MSG(626)
         Hint    = MSG(1322)
         Value   = MSG(626)

         Placement
         {
            posx = 5
            posy = 55
            dimx = 80
            dimy = 20
         }
      }

//      Label LblPosizione_sx_dx
//      {
//         Caption = MSG(433)
//         Hint    = "Posizione del tavolino"
//         Value   = MSG(433)
//
//         Placement
//         {
//            posx = 5
//            posy = 80
//            dimx = 80
//            dimy = 20
//         }
//      }

      Label LblPosizione_fr_re
      {
         Caption = MSG(1323)
         Hint    = MSG(1324)
         Value   = MSG(1323)

         Placement
         {
            posx = 5
            posy = 105
            dimx = 80
            dimy = 20
         }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1325)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //$R = CHIEDI(-1,"DLG_larghezza")
         //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
         //$DLG_caption_larghezza = STR($DLG_larghezza)
         //$DLG_value_larghezza   = STR($DLG_larghezza)

         $R = CHIEDI($DLG_idx_to_call,"X")
         $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR(VAR_VAL($DLG_idx_to_call,"X")))
         $DLG_caption_larghezza = STR(VAR_VAL($DLG_idx_to_call,"X"))
         $DLG_value_larghezza   = STR(VAR_VAL($DLG_idx_to_call,"X"))
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1326)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"Z")
         $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR(VAR_VAL($DLG_idx_to_call,"Z")))
         $DLG_caption_profondita = STR(VAR_VAL($DLG_idx_to_call,"Z"))
         $DLG_value_profondita   = STR(VAR_VAL($DLG_idx_to_call,"Z"))
      ]
   }

//   Button btnPosizione_sx_dx
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = "Cambia la posizione del tavolino"
//
//      Placement
//      {
//         posx = 135
//         posy = 85
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//         $R = CHIEDI($DLG_idx_to_call,"VAR_posizione_sx_dx")
//         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_sx_dx")==-1 )  { $DLG_caption_posizione_sx_dx = MSG(646) }
//         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_sx_dx")== 1 )  { $DLG_caption_posizione_sx_dx = MSG(647) }
//         $DLG_hint_posizione_sx_dx    = STRCAT(MSG(414)," = ",$DLG_caption_posizione_sx_dx)
//         $DLG_value_posizione_sx_dx   = $DLG_caption_posizione_sx_dx
//      ]
//   }

   Button btnPosizione_fr_re
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1327)

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_posizione_fr_re")
         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")==-1 )  { $DLG_caption_posizione_fr_re = MSG(648) }
         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")== 1 )  { $DLG_caption_posizione_fr_re = MSG(649) }
         $DLG_hint_posizione_fr_re    = STRCAT(MSG(1328)," = ",$DLG_caption_posizione_fr_re)
         $DLG_value_posizione_fr_re   = $DLG_caption_posizione_fr_re
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // Controllo che in effetti la finitura sia TabBmp
         // sia un TabDaDbBmp....perch attivando la variante "al volo"
         // la crea di default la DLL come TabDaDbCol anzich TabdaDbBmp
         if( VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)!=131072 )
         {
            VAR_CREATE_STR($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_COLORE_AIR,131072,"")
         }
         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
         $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
         //GOSUB Get_Image_GestAir
         GOSUB Get_Image_Air
      ]
   }
}

Dlg AirTavolinoDoghe
{
   Caption = MSG(1329)

   Placement
   {
      posx = 250
      posy = 250
      dimx = 635
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FinituraD1
   {
      Caption = MSG(1330)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx =  100
            dimy =  100
         }
      }
   }

   Frame FinituraD2
   {
      Caption = MSG(1331)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =   25
            posy =   35
            dimx =  100
            dimy =  100
         }
      }
   }

   Frame FinituraD3
   {
      Caption = MSG(1332)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_enable_frame

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =   25
            posy =   35
            dimx =  100
            dimy =  100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 560
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 475
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1319)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")


         if( $DLG_misure==782 )
         {
            $DLG_X = 782
            $DLG_Z = 736
            $DLG_enable_frame = 0
            $DLG_image_file3 = ""
            $DLG_descrizione_var3 = ""
         }

         if( $DLG_misure==920 )
         {
            $DLG_X = 920
            $DLG_Z = 920
            $DLG_enable_frame = 0
            $DLG_image_file3 = ""
            $DLG_descrizione_var3 = ""
         }

         if( $DLG_misure==1104 )
         {
            $DLG_X = 1104
            $DLG_Z = 1104
            $DLG_enable_frame = 0
            $DLG_image_file3 = ""
            $DLG_descrizione_var3 = ""
         }

         if( $DLG_misure==1472 )
         {
             $DLG_X = 1472
             $DLG_Z = 782

             $DLG_enable_frame = 1

             // faccio subito un refresh gestionale
             // altrimenti passando dal tavolini da 2 doghe a 3 doghe,
             // la terza doga non viene attivata.

             COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_misure=",STR($DLG_misure)))

             VAR_VALUE_SET($DLG_idx_to_call,"X",$DLG_X)
             VAR_VALUE_SET($DLG_idx_to_call,"Z",$DLG_Z)
             cc = STRDADB($DLG_idx_to_call, "CAMBIA_VAR", "X")
             cc = STRDADB($DLG_idx_to_call, "CAMBIA_VAR", "Z")

             RIGENERA_IDX($DLG_idx_to_call)
             //COMANDO2(STRCAT("RICALCOLA_UNA ",STR($DLG_idx_to_call)))

//OLD110617              // Controllo che in effetti la finitura della doga 3
//OLD110617              // sia un TabDaDbBmp....perch attivando la variante "al volo"
//OLD110617              // la crea di default la DLL come TabDaDbCol anzich TabdaDbBmp
//OLD110617              if( VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_3)!=131072 )
//OLD110617              {
//OLD110617                 //VAR_CREATE_STR($DLG_idx_to_call,$DLG_var_to_call_3,$DLG_COLORE_AIR3,131072,"")
//OLD110617                 VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_3,131072)
//OLD110617              }

//OLD110609              $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR3,"colori_tutti.txt")
//OLD110609              GOSUB Get_Image_GestAir3
            $DLG_image_file3   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_AIR3,".bmp")
            $DLG_image_file3   = SUBST_LABEL($DLG_image_file3)
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnFinituraD1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1333)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
        }

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        //OLD110609      GOSUB Get_Image_GestAir
        GOSUB Get_Image_Air
      ]
   }

   Button btnFinituraD2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1334)

      Placement
      {
         posx = 330
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2)
        $DLG_COLORE_AIR2 = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)

        while( STRCMP($DLG_COLORE_AIR2,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2)
           $DLG_COLORE_AIR2 = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
        }


        $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR2,"colori_tutti.txt")
//OLD110609        GOSUB Get_Image_GestAir2
        $DLG_image_file2   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_AIR2,".bmp")
        $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)
      ]
   }

   Button btnFinituraD3
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(1335)
      Enable  = $DLG_enable_frame

      Placement
      {
         posx = 485
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Al momento tengo il tabdadbcol
         //// Controllo che in effetti la finitura della doga 3
         //// sia un TabDaDbBmp....perch attivando la variante "al volo"
         //// la crea di default la DLL come TabDaDbCol anzich TabdaDbBmp
         //if( VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_3)!=131072 )
         //{
         //   //VAR_CREATE_STR($DLG_idx_to_call,$DLG_var_to_call_3,$DLG_COLORE_AIR3,131072,"")
         //   VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_3,131072)
         //}

         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3)
         $DLG_COLORE_AIR3 = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)

         while( STRCMP($DLG_COLORE_AIR3,$VALORE_NULLO)==0 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3)
            $DLG_COLORE_AIR3 = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
         }

         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR3,"colori_tutti.txt")
//OLD110609      GOSUB Get_Image_GestAir3
         $DLG_image_file3   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_AIR3,".bmp")
         $DLG_image_file3   = SUBST_LABEL($DLG_image_file3)
      ]
   }
}

Dlg AIR_Pouff
{
   Caption = MSG(1336)

   Placement
   {
      posx = 160
      posy = 150
      dimx = 680
//      dimy = 300
//      dimy = 330
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 130
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 65
           dimy = 20
        }
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 65
           dimy = 20
        }
      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(1337)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(1338)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

      Radio RdQuadrato
      {
        Caption = MSG(643)
        Hint    = MSG(643)
        Value   = $DLG_quadrato_air

        Placement
        {
           posx = 40
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 1
           $DLG_rettangolare_air = 0

           //controllo cambio di misure e assegno il default
           if( $DLG_misure!=736 | $DLG_misure!=920 | $DLG_misure!=1104 )
           {
              $DLG_misure = 736
              $DLG_X = 736
              $DLG_Z = 736
           }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XZPouffAir1")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
        ]
      }

      Radio RdRettang
      {
        Caption = MSG(644)
        Hint    = MSG(644)
        Value   = $DLG_rettangolare_air

        Placement
        {
           posx = 40
           posy = 100
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 1

            //assegno un default se cambia la misura e non corrisponde al menu
            if( $DLG_misure!=7361  | $DLG_misure!=7362
              | $DLG_misure!=11041 | $DLG_misure!=11042
              | $DLG_misure!=14721 )
            {
               $DLG_misure = 7361
               $DLG_X = 736
               $DLG_Z = 368
            }

            //cambio il menu
            VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XZPouffAir2")

            $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_X),"x",STR($DLG_Z))
            $DLG_caption_misure  = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_value_misure    = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
        ]
      }

   }

   //ER 12.11.12 Spostato i check per far posto a nuova finitura
   Frame FrmChkOpz
   {
      //Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 150
         dimx = 155
         dimy = 70
      }

      // ER spostarli a sx
      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 10
           posy = 15
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }

      Check chkMetallo
      {
        Caption = MSG(675)
        Hint    = MSG(676)
        Value   = $DLG_Metallo

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_Metallo==1 )  {  $DLG_Metallo=1  }
           else                   {  $DLG_Metallo=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 495
//         dimy = 210
//         dimy = 230
         dimy = 270
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_ignifugazione = 0

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = MSG(655)
           $DLG_value_outdoor   = MSG(655)
           $DLG_hint_outdoor    = MSG(656)
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento et voila: GEST_RZ
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_ignifugazione_enable = 1

           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 10/01/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 29/10/2019 - Emanuele - Aggiungo radiobutton per la gestione dei tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32

        Placement
        {
           posx = 160
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo condizione per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      //Check chkOutdoor
      Label chkOutdoor
      {
        Caption = $DLG_caption_outdoor
        Hint    = $DLG_hint_outdoor
        Value   = $DLG_value_outdoor

        Font
        {
           size  = 12
           type  = 1
           color = 255
        }

        Placement
        {
           posx = 160
           posy = 185
           dimx = 130
           dimy = 20
        }
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 305
            posy = 18
            dimx = 195
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 315
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 230
//         posy = 260
         posy = 300
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 230
//         posy = 260
         posy = 300
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 485
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1339)

      Placement
      {
         posx = 140
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         // -----------------------------------------------
         // Fabrizio - gestione configurazione
         // -----------------------------------------------
         //  TAVOLO QUADRATO
         // -------------------
         if( $DLG_misure==736 )   { $DLG_X = 736    $DLG_Z = 736  }
         if( $DLG_misure==920 )   { $DLG_X = 920    $DLG_Z = 920  }
         if( $DLG_misure==1104 )  { $DLG_X = 1104   $DLG_Z = 1104 }
         // ----------------------
         //  TAVOLO RETTANGOLARE
         // ----------------------
         if( $DLG_misure==7361 )   { $DLG_X = 736    $DLG_Z = 368 }
         if( $DLG_misure==7362 )   { $DLG_X = 736    $DLG_Z = 552 }
         if( $DLG_misure==11041 )  { $DLG_X = 1104   $DLG_Z = 552 }
         if( $DLG_misure==11042 )  { $DLG_X = 1104   $DLG_Z = 736 }
         if( $DLG_misure==14721 )  { $DLG_X = 1472   $DLG_Z = 736 }
         // -----------------------------------------------

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1340)

      Placement
      {
         posx = 140
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

}

Dlg AIR_Tavolino
{
   //Caption = MSG(2131)
   //09.03.2017 - Filippo - Correggo la descrizione della Dialog
   Caption = MSG(2135)

   Placement
   {
      posx = 160
      posy = 150
      dimx = 680
//      dimy = 280
//      dimy = 320
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         //dimy = 60
         //09.03.2017 - Filippo - Allargato frame per Gestione Offset
         dimy = 90
      }

      Edit EdtPosizione
      {
        Caption = $DLG_caption_posizione
        Hint    = $DLG_hint_posizione
        Value   = $DLG_value_posizione

        Placement
        {
           posx = 65
           posy = 25
           dimx = 65
           dimy = 20
        }
      }

      Label LblPosizione
      {
        Caption = MSG(433)
        Hint    = MSG(1341)
        Value   = MSG(433)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }
      }
      //09.03.2017 - Filippo - Aggiunta Grafica Gestione Offset
      Label LabOffset
      {
         Caption = MSG(1381)
         Value   = MSG(1381)
         Hint    = MSG(1381)

         Placement
         {
            posx = 5
            posy = 55
            dimx = 50
            dimy = 25
         }
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 65
           posy = 50
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]
      }

   }

   //29.06.2017 - Filippo - aggiungo possibilit di eliminare da dialog
   Frame FrmDelete
   {
      Caption = MSG(3305)

      Placement
      {
         posx = 10
         posy = 100
         dimx = 155
         dimy = 40
      }

      Check chkElimina
      {
        Caption = MSG(3304)
        Hint    = MSG(3304)
        Enable  = 1
        Value   = $DLG_checkfordelete

        Placement
        {
           posx = 20
           posy = 15
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_checkfordelete==1)
           {
              $DLG_checkfordelete = 1
           }
           else
           {
              $DLG_checkfordelete = 0
           }
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 495
//         dimy = 200
//         dimy = 220
         dimy = 260
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
           if( $DLG_ignifugazione==1 )  { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(667)
        Hint    = MSG(668)
        Value   = $DLG_value_rd_uso_7

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      // Eugenio 12.11.12: GEST_RZ tessuto et voila
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 12/02/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 29/10/2019 - Emanuele - Aggiungo radiobutton per i tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }


      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 300
            posy = 18
            dimx = 195
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 215
//         posy = 245
         posy = 285
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 215
//         posy = 245
         posy = 285
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1342)

      Placement
      {
         posx = 140
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_posizione")
        //09.03.2017 - Filippo - Aggiunta gestione $EnaOffsetTavDivAir per abilitare o meno la gestione offset

        if( $DLG_posizione==-1 )
        {
           $DLG_caption_posizione = MSG(646)
           $EnaOffsetTavDivAir = 0
           $DLG_offset = 0
           $DLG_value_offset = STR($DLG_offset)
        }
        if( $DLG_posizione== 1 )
        {
           $DLG_caption_posizione = MSG(647)
           $EnaOffsetTavDivAir = 0
           $DLG_offset = 0
           $DLG_value_offset = STR($DLG_offset)
        }
        //09.03.2017 - Filippo - Adattamento per includere Fronte e Retro
        if( $DLG_posizione== 2 )
        {
           $DLG_caption_posizione = MSG(648)
           $EnaOffsetTavDivAir = 1
        }
        if( $DLG_posizione== -2 )
        {
           $DLG_caption_posizione = MSG(649)
           $EnaOffsetTavDivAir = 1
        }

        $DLG_hint_posizione    = STRCAT(MSG(414)," = ",$DLG_caption_posizione)
        $DLG_value_posizione   = $DLG_caption_posizione
      ]
   }

  //09.03.2017 - Filippo - Aggiunto Bottone Gestione Offset
   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(2321)
      Enable = $EnaOffsetTavDivAir

      Placement
      {
         posx = 140
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [    //15.03.2017 - Filippo - Interrogo direttamente il menu
         $R = CHIEDI($DLG_idx_to_call,"VAR_offset")
         $tmp = 0
         if(ABS(VAR_VAL($DLG_idx_to_call,"VAR_offset")) >= $LarghezzaMax)
         {
            if(VAR_VAL($DLG_idx_to_call,"VAR_offset")>0)
            {
               $tmp = $LarghezzaMax - 184
            }
            else
            {
               $tmp = -$LarghezzaMax + 184
            }

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_offset=",STR($tmp)))
            DISPLAY(MSG(2322), $tmp)
         }
         $DLG_offset = VAR_VAL($DLG_idx_to_call,"VAR_offset")
         $DLG_value_offset = STR($DLG_offset)
      ]
   }
}

// 27/11/2017 - Filippo - una semplice dialog riutilizzabile per diversi elementi. Da usare per una semplice eliminazione
Dlg EliminaElemento
{
   Caption = MSG(3305)

   Placement
   {
      posx = 160
      posy = 150
      dimx = 185
      dimy = 125
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   //29.06.2017 - Filippo - aggiungo possibilit di eliminare da dialog
   Frame FrmDelete
   {
      Caption = MSG(3305)

      Placement
      {
         posx = 15
         posy = 15
         dimx = 155
         dimy = 40
      }

      Check chkElimina
      {
        Caption = MSG(3304)
        Hint    = MSG(3304)
        Enable  = 1
        Value   = $DLG_checkfordelete

        Placement
        {
           posx = 20
           posy = 15
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_checkfordelete==1)
           {
              $DLG_checkfordelete = 1
           }
           else
           {
              $DLG_checkfordelete = 0
           }
        ]

      }
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 60
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 60
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }
}

Dlg AIR_PortaOggetti
{
   Caption = MSG(1343)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 210
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 180
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  40
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 110
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 210
         dimx = 95
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 35
         posy = 150
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        //GOSUB Get_Image_GestAir
        GOSUB Get_Image_Air

      ]
   }

   Check chkElimina
   {
      Caption = MSG(1344)
      Hint    = MSG(1344)
      Enable  = 1
      Value   = $DLG_value_cancella

      Placement
      {
         posx = 45
         posy = 185
         dimx = 200
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_cancella==1)
         {
            $DLG_value_cancella = 1
         }
         else
         {
            $DLG_value_cancella = 0
         }
         if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
         {
            DISPLAY2(MSG(1345))
         }
      ]
   }
}

Dlg AirTavoloVetro
{
   // 14/06/2018 - Emanuele - Aggiungo una variabile che permette il cambiamento della scritta in base
   // al tavolo scelto
//   Caption = MSG(1346)
   Caption = $Scritta_conf
   Placement
   {
      posx = 150
      posy = 150
      // 13/06/2018 - Emanuele - Modifico la dimensione della dialog in x per gestire il cambio di
      // finitura nel caso in cui il tavolo  XGlass
//      dimx = 230
      dimx = $DLG_Dim_Dialogx
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx =  10
         posy = 150
         dimx = 205
         dimy = 100
      }

      Edit Edtmisure
      {
         //Caption = $DLG_caption_misure
         Caption = $DLG_X
         Hint    = $DLG_hint_misure
         Value   = $DLG_value_misure

         Placement
         {
            posx = 75
            posy = 35
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit Edtaltezze
      {
         Caption = $DLG_Y
         Hint    = $DLG_hint_altezze
         Value   = $DLG_value_altezze
         Enable  = $DLG_tavolo

         Placement
         {
            posx = 75
            posy = 65
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label Lblmisure
      {
         Caption = MSG(637)
         Hint    = MSG(637)
         Value   = MSG(637)

         Placement
         {
            posx = 30
            posy = 35
            dimx = 80
            dimy = 20
         }
      }

      Label Lblaltezze
      {
         Caption = MSG(629)
         Hint    = MSG(629)
         Value   = MSG(629)
         Enable  = $DLG_tavolo

         Placement
         {
            posx = 30
            posy = 65
            dimx = 80
            dimy = 20
         }
      }
   }
   // 13/06/2018 - Emanuele - Aggiungo un frame per la selezione del tipo di vetro nel caso in cui il tavolo 
   // XGlass
   Frame Tipo_vetro
   {
      // 17/02/2020 - Emanuele - Sostituisco il testo con uno pi generico
//      Caption = MSG(3351)
      Caption = MSG(3104)

      Placement
      {
         posx = 225
         posy = 10
         dimx = 110
         dimy = 135
      }

      // 13/06/2018 - Emanuele - Aggiungo i radio button che permettono la selezione della finitura lucido o opaco
      // se il tavolo  XGlass
      Radio rd1
      {
         Caption = MSG(751)
         Hint = MSG(751)
         Value = $DLG_lucido
         // 23/04/2020 - Emanuele - Tolgo l'enable perch adesso  utilizzabile sempre
         //Enable = $DLG_enable_XGlass

         Placement
         {
            posx = 20
            posy = 40
            dimx = 60
            dimy = 30
         }

         OnClick
         [
            $DLG_lucido = 1
            $DLG_opaco = 0

            // 19/02/2020 - Emanuele - Aggiungo controllo per aggiornare l'icona della finitura da opaco a lucido
            if($DLG_enable_XGlass==0)
            {
               GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_PV")
            }
            else
            {
               if(IF_XGLASS($DLG_COLORE_XGLASS_METAL)) { GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_XGLASS_METAL") }
               if(IF_METAL($DLG_COLORE_XGLASS_METAL))
               {
                  GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_XGLASS_METAL")
               }
            }
         ]
      }

      Radio rd2
      {
         Caption = MSG(752)
         Hint = MSG(752)
         Value = $DLG_opaco
         // 23/04/2020 - Emanuele - Tolgo l'enable perch adesso  utilizzabile sempre
         //Enable = $DLG_enable_XGlass

         Placement
         {
            posx = 20
            posy = 70
            dimx = 60
            dimy = 30
         }

         OnClick
         [
            $DLG_lucido = 0
            $DLG_opaco = 1

            // 19/02/2020 - Emanuele - Aggiungo controllo per aggiornare l'icona della finitura da lucido a opaco
            if($DLG_enable_XGlass==0)
            {
               GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_PV")
            }
            else
            {
               if(IF_XGLASS($DLG_COLORE_XGLASS_METAL)) { GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_XGLASS_METAL") }
               if(IF_METAL($DLG_COLORE_XGLASS_METAL))
               {
                  GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_XGLASS_METAL")
               }
            }
         ]
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 205
         dimy = 135
      }

      Label LabFinPia
      {
//         Caption = $DLG_descrizione_PV
//         Value   = $DLG_descrizione_PV
//         Hint    = $DLG_descrizione_PV
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 50
            posy = 20
            dimx = 110
            dimy = 25
         }
      }

      Image ImPia
      {
//         Caption = $DLG_descrizione_PV
//         Value   = $DLG_image_filePV
//         Hint    = $DLG_descrizione_PV
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 125
         posy = 255
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  40
         posy = 255
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  60
         posy = 115
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         // 29/06/2018 - Emanuele - Modifico la variabile utilizzata nella funzione CHIEDI per gestire le
         // finiture XGlass.
//         $R = CHIEDI(-1,"DLG_COLORE_PV")
         if($DLG_enable_XGlass==0) { $R = CHIEDI(-1,"DLG_COLORE_PV") }
         else
         {
            // 23/05/2019 - Emanuele - Modifico variabile per avere anche i colori metallizzati
//            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
//            $DLG_COLORE_PV = $DLG_COLORE_XGLASS
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS_METAL")
            $DLG_COLORE_PV = $DLG_COLORE_XGLASS_METAL
         }
//         $R = CHIEDI(-1,"DLG_COLORE")
         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona

         // 28/06/2018 - Emanuele - Modifico la dlg per la descrizione del colore perch al momento non  corretta.
         // Quando si cambia finitura resta il nome della finitura precedente
//         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PV,"colori_tutti.txt")
         // 29/06/2018 - Emanuele - Aggiungo dei controlli per avere il cambio di immagini nella dialog
         // 19/02/2020 - Emanuele - Sostituisco la procedura con una funzione per gestire i colori opachi e lucidi
//         GOSUB Get_Image_PV
         if($DLG_enable_XGlass==0)
         {
            if($DLG_lucido==1)
            {
               GET_IMAGE("DLG_image_filePV","lucido","DLG_COLORE_PV")
            }
            else
            {
               GET_IMAGE("DLG_image_filePV","opaco","DLG_COLORE_PV")
            }
         }

         // 08/06/2020 - Emanuele - Commento assegnazione per causa degli errori
//         $DLG_image_file = $DLG_image_filePV

         if($DLG_enable_XGlass==1)
         {
            // 23/05/2019 - Emanuele - Invece di usare una procedura utilizzo la funzione GET_IMAGE
//            GOSUB Get_Image_XGlass
            if(IF_XGLASS($DLG_COLORE_XGLASS_METAL)) { GET_IMAGE("DLG_image_file","xglass","DLG_COLORE_XGLASS_METAL") }
            if(IF_METAL($DLG_COLORE_XGLASS_METAL))
            {
               if($DLG_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_XGLASS_METAL") }
               if($DLG_opaco==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_XGLASS_METAL")  }
            }
         }
      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)

      Placement
      {
         posx = 160
         posy = 185
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // 12/10/2018 - Emanuele - Aggiungo condizione per gestire le vecchie misure dei tavolini fino
         // al 31 Dicembre
         if($DLG_tavolo_tondo==1 & $DLG_basso==1 & $DLG_enable_XGlass==0)
         {
            $menu_mis_new = "MisTavAirV1"
            $menu_mis_old = "MisTavAir7"
            if($DLG_altezze==240)
            {
                VAR_SET_MENU(-1,"DLG_misure",$menu_mis_old)
            }
            else
            {
                VAR_SET_MENU(-1,"DLG_misure",$menu_mis_new)
            }
         }

         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_tavolo == 0 )
         {
            if( $DLG_misure==12085 )
            {
               $DLG_X = 1200
               $DLG_Z =  850
            }

            // 14/11/2018 - Emanuele - Aggiungo condizione per la gestione della misura 1200x900 nel caso
            // la dovessero aggiungere
            if( $DLG_misure==12090)
            {
               $DLG_X = 1200
               $DLG_Z =  900
            }

            if( $DLG_misure==16085 )
            {
               $DLG_X = 1600
               $DLG_Z =  850
            }

            if( $DLG_misure==19085 )
            {
               $DLG_X = 1900
               $DLG_Z =  850
            }

            if( $DLG_misure==220100 )
            {
               $DLG_X = 2200
               $DLG_Z = 1000
            }

            if( $DLG_misure==250100 )
            {
               $DLG_X = 2500
               $DLG_Z = 1000
            }
            // 12/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
            if( $DLG_misure==16090 )
            {
               $DLG_X = 1600
               $DLG_Z = 900
            }

            if( $DLG_misure==19090 )
            {
               $DLG_X = 1900
               $DLG_Z = 900
            }
            // 11/07/2018 - Emanuele - Aggiungo condizioni per le nuove misure
            if( $DLG_misure==200100)
            {
               $DLG_X = 2000
               $DLG_Z = 1000
            }

            if( $DLG_misure==220110 )
            {
               $DLG_X = 2200
               $DLG_Z = 1100
            }

            if( $DLG_misure==250120 )
            {
               $DLG_X = 2500
               $DLG_Z = 1200
            }

            if( $DLG_misure==300120 )
            {
               $DLG_X = 3000
               $DLG_Z = 1200
            }

            // 15/11/2018 - Emanuele - Aggiungo assegnazione per avere il valore della Z del piano corretta
            $DLG_spessoreTV = $DLG_Z
            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(637),"=",$DLG_desc_misure)
            $DLG_caption_misure  = $DLG_desc_misure
            $DLG_value_misure    = $DLG_desc_misure

            $XChange = $DLG_X
            $ZChange = $DLG_Z
            $DLG_hint_X     = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
            $DLG_caption_X  = STR($DLG_larghezza)
            $DLG_value_X    = STR($DLG_larghezza)

            // 29/08/2018 - Emanuele - Aggiungo una condizione che fa partire i controlli solo per i tavoli con le vecchie misure
            // altrimenti ci sono continui cambiamenti di valori rendendo utilizzabili misure non a listino
            // 14/11/2018 - Emanuele - Modifico la condizione perch i tavoli stratum e xglass devono avere sempre
            // le misure nuove
//            if($DATAPROG<$DataRelease_TavoliNuovi2018)
            if($DATAPROG<$DataRelease_TavoliNuovi2018 & $DLG_enable_XGlass==0)
            {
            // 15/11/2018 - Emanuele - Modifico la condizione per gestire le nuove e le vecchie misure
//               if($XChange<=1900)
               if($XChange<=1900 & $DLG_Revisione==0)
               {
                  VAR_SET_MENU(-1,"DLG_spessoreTV","Sp85")
                  $DLG_spessoreTV = 850
                  $ZChange = $DLG_spessoreTV
                  $DLG_caption_Z = STR($DLG_spessoreTV)
                  $DLG_hint_Z = STR($DLG_spessoreTV)
                  $DLG_value_Z = STR($DLG_spessoreTV)
               }
               // 15/11/2018 - Emanuele - Modifico la condizione perch  stata modificata la condizione qui sopra
//               else
               // 23/01/2019 - Emanuele - Modifico la condizione per la gestione dei nuovi tavoli
//               if($XChange>1900)
               if($XChange>1900 & $DLG_Revisione==0)
               {
                  VAR_SET_MENU(-1,"DLG_spessoreTV","Sp100")
                  $DLG_spessoreTV = 1000
                  $ZChange = $DLG_spessoreTV
                  $DLG_caption_Z = STR($DLG_spessoreTV)
                  $DLG_hint_Z = STR($DLG_spessoreTV)
                  $DLG_value_Z = STR($DLG_spessoreTV)
               }
            }

           // 29/08/2018 - Emanuele - Modifico la condizione per le nuove misure dei tavoli
//           if($XChange<2200 & $DLG_spessoreTV>850)
           // 14/11/2018 - Emanuele - Modifico la condizione perch i tavoli stratum e xglass hanno sempre le nuove misure
//           if($XChange<2200 & $DLG_spessoreTV>850 & $DATAPROG<$DataRelease_TavoliNuovi2018)
           // 15/11/2018 - Emanuele - Modifico la condizione per gestire correttamente le nuove misure e quelle vecchie
//           if($XChange<2200 & $DLG_spessoreTV>850 & $DATAPROG<$DataRelease_TavoliNuovi2018 & $DLG_enable_XGlass==0)
           if($XChange<2200 & $DLG_spessoreTV>850 & $DATAPROG<$DataRelease_TavoliNuovi2018
              & $DLG_enable_XGlass==0 & $DLG_Revisione==0
              )
           {
               DISPLAY2(MSG(1348))
               $ZChange=850
           }
           else
           {
               $ZChange=$DLG_spessoreTV
           }

           $DLG_hint_Z    = STRCAT(MSG(430)," = ",STR($ZChange))
           $DLG_caption_Z = STR($ZChange)
           $DLG_value_Z   = STR($ZChange)

           //if($XChange<=1900)
            //{
            //   VAR_SET_MENU(-1,"DLG_spessoreTV","Sp85")
            //   $DLG_spessoreTV = 850
            //   $ZChange = $DLG_spessoreTV
            //   $DLG_caption_Z = STR($DLG_spessoreTV)
            //   $DLG_hint_Z = STR($DLG_spessoreTV)
            //   $DLG_value_Z = STR($DLG_spessoreTV)
            //}
            //else
            //{
            //   VAR_SET_MENU(-1,"DLG_spessoreTV","Sp100")
            //   $DLG_spessoreTV = 1000
            //   $ZChange = $DLG_spessoreTV
            //   $DLG_caption_Z = STR($DLG_spessoreTV)
            //   $DLG_hint_Z = STR($DLG_spessoreTV)
            //   $DLG_value_Z = STR($DLG_spessoreTV)
            //}
         }
         // 07/06/2018 - Emanuele - Aggiungo controllo per tavolino quadrato
         if($DLG_tavolo_quadrato==1)
         {
            if( $DLG_misure==736 )
            {
               $DLG_X = 736
               $DLG_Z = 736
            }
            if( $DLG_misure==828 )
            {
               $DLG_X = 828
               $DLG_Z = 828
            }
            if( $DLG_misure==920 )
            {
               $DLG_X = 920
               $DLG_Z = 920
            }
            if( $DLG_misure==1104 )
            {
               $DLG_X = 1104
               $DLG_Z = 1104
            }
            if( $DLG_misure==1200 )
            {
               $DLG_X = 1200
               $DLG_Z = 1200
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(637),"=",$DLG_desc_misure)
            $DLG_caption_misure  = $DLG_desc_misure
            $DLG_value_misure    = $DLG_desc_misure

            $DLG_hint_X     = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
            $DLG_caption_X  = STR($DLG_larghezza)
            $DLG_value_X    = STR($DLG_larghezza)

            $XChange = $DLG_X
            $ZChange = $DLG_Z
         }
         // 07/06/2018 - Emanuele - Aggiungo controllo per tavolino rettangolare
         if($DLG_tavolo_rettangolare==1)
         {
            if( $DLG_misure==782 )
            {
               $DLG_X = 782
               $DLG_Z = 368
            }
            if( $DLG_misure==1104 )
            {
               $DLG_X = 1104
               $DLG_Z = 552
            }
            if( $DLG_misure==1200 )
            {
               $DLG_X = 1200
               $DLG_Z = 850
            }
            if( $DLG_misure==1472 )
            {
               $DLG_X = 1472
               $DLG_Z = 782
            }
            if( $DLG_misure==16090 )
            {
               $DLG_X = 1600
               $DLG_Z = 900
            }
            if( $DLG_misure==1900 )
            {
               $DLG_X = 1900
               $DLG_Z = 900
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
            $DLG_hint_misure     = STRCAT(MSG(637),"=",$DLG_desc_misure)
            $DLG_caption_misure  = $DLG_desc_misure
            $DLG_value_misure    = $DLG_desc_misure

            $DLG_hint_X     = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
            $DLG_caption_X  = STR($DLG_larghezza)
            $DLG_value_X    = STR($DLG_larghezza)

            $XChange = $DLG_X
            $ZChange = $DLG_Z
         }
         // 29/08/2018 - Emanuele - Aggiungo condizione per i tavoli tondi
         if($DLG_tavolo_tondo==1)
         {
            if( $DLG_misure==500 )
            {
               $DLG_X = 500
               $DLG_Z = 500
            }
            if( $DLG_misure==900 )
            {
               $DLG_X = 900
               $DLG_Z = 900
            }
            if( $DLG_misure==1200 )
            {
               $DLG_X = 1200
               $DLG_Z = 1200
            }
            if( $DLG_misure==1400 )
            {
               $DLG_X = 1400
               $DLG_Z = 1400
            }
            if( $DLG_misure==1600 )
            {
               $DLG_X = 1600
               $DLG_Z = 1600
            }
            if( $DLG_misure==1800 )
            {
               $DLG_X = 1800
               $DLG_Z = 1800
            }

            $DLG_desc_misure     = STRCAT(STR($DLG_X))
            $DLG_hint_misure     = STRCAT("Diametro =",$DLG_desc_misure)
            $DLG_caption_misure  = $DLG_desc_misure
            $DLG_value_misure    = $DLG_desc_misure

            $DLG_hint_X          = STRCAT("Diametro =",STR($DLG_larghezza))
            $DLG_value_X         = STR($DLG_larghezza)
            $DLG_caption_X       = STR($DLG_larghezza)

            $XChange = $DLG_X
            $ZChange = $DLG_Z
         }

      ]
   }

   Button btnaltezze
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)
      Enable  = $DLG_tavolo

      Placement
      {
         posx = 160
         posy = 215
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // 30/10/2018 - Emanuele - Aggiungo controllo per la gestione delle vecchie misure per i tavolini tondi in vetro
         // disponibili fino al 31 dicembre
         if($DLG_tavolo_tondo==1 & $DLG_basso==1 & $DLG_enable_XGlass==0)
         {
            $menu_mis_new = "AltTavAirV1"
            $menu_mis_old = "AltTavAirV2"
            if($DLG_misure==1200)
            {
                VAR_SET_MENU(-1,"DLG_altezze",$menu_mis_old)
            }
            else
            {
                VAR_SET_MENU(-1,"DLG_altezze",$menu_mis_new)
            }
         }

         $R = CHIEDI(-1,"DLG_altezze")

         $DLG_Y = 760
         if( $DLG_altezze==1060 )  {  $DLG_Y = 1060  }
         if( $DLG_basso == 1 )
         {
            //$DLG_Y = 280
            //if( $DLG_altezze==414 )  {  $DLG_Y = 414  }
            $DLG_Y = $DLG_altezze
         }
         // 12/10/2018 - Emanuele - Aggiungo condizione per gestire le vecchie misure dei tavolini fino
         // al 31 Dicembre
         if($DLG_tavolo_tondo==1 & $DLG_basso==1)
         {
            $menu_mis_new = "MisTavAirV1"
            $menu_mis_old = "MisTavAir7"
            if($DLG_altezze==240)
            {
                VAR_SET_MENU(-1,"DLG_misure",$menu_mis_old)
            }
            else
            {
                VAR_SET_MENU(-1,"DLG_misure",$menu_mis_new)
            }
         }
         $DLG_desc_altezze    = STR($DLG_altezze)
         $DLG_hint_altezze    = STRCAT(MSG(629),"=",$DLG_desc_altezze)
         $DLG_caption_altezze = $DLG_desc_altezze
         $DLG_value_altezze   = $DLG_desc_altezze

         $YChange = $DLG_Y
      ]
   }
}

Dlg AirTavoloSlash
{
   Caption = MSG(1723)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 230
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx =  10
         posy = 150
         dimx = 205
         dimy =  70
      }

      Edit Edtmisure
      {
         //Caption = $DLG_caption_misure
         Caption = $DLG_X
         Hint    = $DLG_hint_misure
         Value   = $DLG_value_misure

         Placement
         {
            posx = 75
            posy = 35
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label Lblmisure
      {
         Caption = MSG(637)
         Hint    = MSG(637)
         Value   = MSG(637)

         Placement
         {
            posx = 30
            posy = 35
            dimx = 80
            dimy = 20
         }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 205
         dimy = 135
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 50
            posy = 20
            dimx = 110
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 125
         posy = 225
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  40
         posy = 225
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  60
         posy = 115
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)

      Placement
      {
         posx = 160
         posy = 185
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_misure==16085 )
         {
            $DLG_X = 1600
            $DLG_Z =  850
         }

         if( $DLG_misure==19085 )
         {
            $DLG_X = 1900
            $DLG_Z =  850
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807),"=",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }
}

Dlg AirTavoloWild
{
   Caption = MSG(1361)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable  = $DLG_enable_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1362)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta
         Enable  = $DLG_enable_tipo

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa
         Enable  = $DLG_enable_tipo

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 80
         dimx = 155
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 115
         dimx = 155
         dimy = 130
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }


   }


   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         while( STRCMP( $DLG_VAL_COLORE,$VALORE_NULLO ) == 0 )
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         }
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }


   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")
        // 11/06/2018 - Emanuele - Aggiungo un controllo che riabilita la modifica dell'altezza
        // se vengono soddisfatte le condizioni
        if($DLG_tavolo_tondo==0 & $DLG_tavolo_quadrato==0)
        {
           if($DLG_misure!=220110 & $DLG_misure!=250120 & $DLG_misure!=300120)
           {
              $DLG_enable_altezza = 1
           }
        }
        //rob_pec 18/01/2011: aggiunto controllo per nuova misura
        if( $DLG_misure==12085 )
        {
            $DLG_X = 1200
            $DLG_Z =  850
        }
        // 11/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
        if( $DLG_misure==12090 )
        {
            $DLG_X = 1200
            $DLG_Z =  900
        }

        if( $DLG_misure==16085 )
        {
            $DLG_X = 1600
            $DLG_Z =  850
        }
        // 11/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
        if( $DLG_misure==16090 )
        {
            $DLG_X = 1600
            $DLG_Z =  900
        }

        if( $DLG_misure==19085 )
        {
            $DLG_X = 1900
            $DLG_Z =  850
        }
        // 11/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
        if( $DLG_misure==19090 )
        {
            $DLG_X = 1900
            $DLG_Z =  900
        }
        // 11/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
        if( $DLG_misure==200100 )
        {
            $DLG_X = 2000
            $DLG_Z = 1000
            $DLG_altezza = 760
        }

        if( $DLG_misure==220100 )
        {
            $DLG_X = 2200
            $DLG_Z = 1000
        }

        if( $DLG_misure==250100 )
        {
            $DLG_X = 2500
            $DLG_Z = 1000
        }
        // 11/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
        if( $DLG_misure==250120 )
        {
            $DLG_X = 2500
            $DLG_Z = 1200
            $DLG_altezza = 760
            $DLG_enable_altezza = 0
        }
        // 11/06/2018 - Emanuele - Aggiungo condizioni per le nuove misure
        if( $DLG_misure==300120 )
        {
            $DLG_X = 3000
            $DLG_Z = 1200
            $DLG_altezza = 760
            $DLG_enable_altezza = 0
        }

        if( $DLG_misure==8080 )
        {
            $DLG_X = 800
            $DLG_Z = 800
        }

        if( $DLG_misure==8585 )
        {
            $DLG_X = 850
            $DLG_Z = 850
        }

        if( $DLG_misure==100100 )
        {
            $DLG_X = 1000
            $DLG_Z = 1000
        }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)
      Enable = $DLG_enable_altezza

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 255
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 255
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirTavoloWildTondo
{
   Caption = MSG(1361)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 175
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(637)
        Hint    = MSG(637)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnMisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_misure==1200 )
         {
            $DLG_X = 1200
            $DLG_Z = 1200
         }
         if( $DLG_misure==1400 )
         {
            $DLG_X = 1400
            $DLG_Z = 1400
         }
         if( $DLG_misure==1600 )
         {
            $DLG_X = 1600
            $DLG_Z = 1600
         }
         if( $DLG_misure==1800 )
         {
            $DLG_X = 1800
            $DLG_Z = 1800
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X))
         $DLG_hint_misure     = STRCAT(MSG(1998)," =",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure

         $DLG_hint_X          = STRCAT(MSG(1998)," =",STR($DLG_larghezza))
         $DLG_value_X         = STR($DLG_larghezza)
         $DLG_caption_X       = STR($DLG_larghezza)

         $XChange = $DLG_X
         $ZChange = $DLG_Z
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 255
         dimx = 60
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =   5
         posy = 255
         dimx =  60
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}


Dlg AirTavolinoWild
{
   Caption = MSG(2131)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1362)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
//           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           // 03/07/2018 - Emanuele - Commento l'assegnazione della variabile
//           $DLG_value_finit_uso = 1
           // 03/07/2018 - Emanuele - Aggiungo controllo per assegnare le variabile in base al valore di DLG_Vetrino
           if($DLG_Vetrino==1)
           {
              $DLG_value_finit_uso = 1
              // 03/07/2018 - Emanuele - Aggiungo variabili per mostrare l'immagine della finitura selezionata
              $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
              $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
              GOSUB Get_Image_Lucido
              $DLG_image_file2 = $DLG_image_file
           }
           else
           {
              $DLG_value_finit_uso = 0
              $DLG_image_file2 = ""
              $DLG_descrizione_DE = ""
           }

           // 03/07/2018 - Emanuele - Aggiungo una procedura che cambia la radice al volo
           GOSUB CambiaRadTavWW
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
           // 03/07/2018 - Emanuele - Valorizza la variabile dell'immagine della finitura del vetrino in modo da
           // non mostrare nessun colore quando non  selezionabile
           // 03/07/2018 - Emanuele - Valorizzo anche la variabile per la descrizione
           $DLG_image_file2 = ""
           $DLG_descrizione_DE = ""

           // 03/07/2018 - Emanuele - Aggiungo una procedura che cambia la radice al volo
           GOSUB CambiaRadTavWW
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 80
         dimx = 155
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
              // 03/07/2018 - Emanuele - Aggiungo un controllo che assegna come valore di default BCO se
              // la gest_de ha come valore un valore nullo
              if(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")==$VALORE_NULLO)
              {
                 COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DE=",APICI(),"BCO",APICI()))
                 $GEST_DE_PREC = "BCO"
              }
              // 03/07/2018 - Emanuele - Aggiungo variabili per mostrare l'immagine della finitura selezionata
              $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
              $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
              GOSUB Get_Image_Lucido
              $DLG_image_file2 = $DLG_image_file
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
              // 03/07/2018 - Emanuele - Aggiungo variabile per togliere l'immagine del colore quando non 
              // selezionabile
              $DLG_image_file2 = ""
              $DLG_descrizione_DE = ""
              // 03/07/2018 - Emanuele - Aggiungo controllo per la valorizzazione della GEST_DE
              if(VAR_EXIST($DLG_idx_to_call,"GEST_DE")==1)
              {
                 if(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")!=$VALORE_NULLO)
                 {
                    COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DE=",APICI(),$VALORE_NULLO,APICI()))
                    $GEST_DE_PREC = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
                 }
              }
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 115
         dimx = 155
         dimy = 130
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }


   }


   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }


   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        //Eugenio misure NEW!
        if( $DLG_misure==7820 )
        {
            $DLG_X =  782
            $DLG_Z =  368
        }

        if( $DLG_misure==7821 )
        {
            $DLG_X =  782
            $DLG_Z =  736
        }

        if( $DLG_misure==8280 )
        {
            $DLG_X =  828
            $DLG_Z =  828
        }

        if( $DLG_misure==9200 )
        {
            $DLG_X =  920
            $DLG_Z =  920
        }

        if( $DLG_misure==11040 )
        {
            $DLG_X = 1104
            $DLG_Z =  552
        }

        if( $DLG_misure==11041 )
        {
            $DLG_X = 1104
            $DLG_Z = 1104
        }

        if( $DLG_misure==14720 )
        {
            $DLG_X = 1472
            $DLG_Z =  782
        }

        // 07/06/2018 - Emanuele - Aggiungo controllo per tavolino quadrato
        if($DLG_tavolo_quadrato==1)
        {
           if( $DLG_misure==736 )
           {
              $DLG_X = 736
              $DLG_Z = 736
           }
           if( $DLG_misure==828 )
           {
              $DLG_X = 828
              $DLG_Z = 828
           }
           if( $DLG_misure==920 )
           {
              $DLG_X = 920
              $DLG_Z = 920
           }
           if( $DLG_misure==1104 )
           {
              $DLG_X = 1104
              $DLG_Z = 1104
           }
           if( $DLG_misure==1200 )
           {
              $DLG_X = 1200
              $DLG_Z = 1200
           }
        }

        // 07/06/2018 - Emanuele - Aggiungo controllo per tavolino rettangolare
        if($DLG_tavolo_rettangolare==1)
        {
           if( $DLG_misure==782 )
           {
              $DLG_X = 782
              $DLG_Z = 368
           }

           if( $DLG_misure==1104 )
           {
              $DLG_X = 1104
              $DLG_Z = 552
           }

           if( $DLG_misure==1200 )
           {
              $DLG_X = 1200
              $DLG_Z = 850
           }

           if( $DLG_misure==1472 )
           {
              $DLG_X = 1472
              $DLG_Z = 782
           }

           if( $DLG_misure==16090 )
           {
              $DLG_X = 1600
              $DLG_Z = 900
           }

           if( $DLG_misure==1900 )
           {
              $DLG_X = 1900
              $DLG_Z = 900
           }
        }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 255
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 255
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirTavolinoWildTondo
{
   Caption = MSG(2131)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 175
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        //Caption = MSG(964)
        //Hint    = MSG(965)
        Caption = MSG(637)
        Hint    = MSG(637)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(966)
        Value   = MSG(629)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        if( $DLG_misure==500 )
        {
           $DLG_X = 500
           $DLG_Z = 500
        }
        if( $DLG_misure==900 )
        {
           $DLG_X = 900
           $DLG_Z = 900
        }
        // 11/06/2018 - Emanuele - Aggiungo misure per il 1200 di diametro
        if( $DLG_misure==1200 )
        {
           $DLG_X = 1200
           $DLG_Z = 1200
        }

        $DLG_desc_misure     = STRCAT(STR($DLG_X))
        $DLG_hint_misure     = STRCAT(MSG(1998)," =",$DLG_desc_misure)
        $DLG_caption_misure  = $DLG_desc_misure
        $DLG_value_misure    = $DLG_desc_misure

        $DLG_hint_X          = STRCAT(MSG(1998)," =",STR($DLG_larghezza))
        $DLG_value_X         = STR($DLG_larghezza)
        $DLG_caption_X       = STR($DLG_larghezza)

        $XChange = $DLG_X
        $ZChange = $DLG_Z
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 255
         dimx = 60
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =   5
         posy = 255
         dimx =  60
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg MensolaWild
{
   Caption = MSG(1367)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 385
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1362)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 80
         dimx = 155
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 115
         dimx = 155
         dimy = 130
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame LatiMensola
   {
      //Caption = MSG(1365)
      //Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 5
         posy = 250
         dimx = 315
         dimy = 30
      }

      Label LblLatiMen
      {
         Caption = MSG(1368)
         Hint    = MSG(1368)
         Value   = MSG(1368)

         Placement
         {
            posx = 10
            posy = 10
            dimx = 130
            dimy = 20
         }
      }

      Edit EdtLatiMen
      {
        Caption = $DLG_caption_latimen
        Hint    = $DLG_hint_latimen
        Value   = $DLG_value_latimen

        Placement
        {
           posx = 140
           posy = 5
           dimx = 130
           dimy = 20
        }
      }
   }

   Frame TasselliFlu
   {
      //Caption = MSG(1365)
      //Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 5
         posy = 285
         dimx = 315
         dimy = 30
      }

      Check chkTasselli
      {
         Caption = MSG(896)
         Hint    = MSG(896)
         Enable  = 1
         Value   = $DLG_tasselli

         Placement
         {
            posx = 10
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
            else                   {  $DLG_tasselli=0  }
         ]

      }
   }

   Button btnTipoMen
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1368)

      Placement
      {
         posx = 280
         posy = 255
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_LatiMensola")
         $DLG_hint_latimen    = STRCAT(MSG(1368)," = ",STR($DLG_LatiMensola))
         $DLG_caption_latimen = STR($DLG_LatiMensola)
         //$DLG_value_latimen   = STR($DLG_LatiMensola)
         if ($DLG_LatiMensola==2)  { $DLG_value_latimen = MSG(2102) }
         if ($DLG_LatiMensola==3)  { $DLG_value_latimen = MSG(2103) }

      ]
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
        // Eugenio 23.05.13 Sul listino le lunghezze sono uguali per tutte le profondit
        // Eugenio 05.09.13 Arriva la prof.520
        if( $DLG_profondita > 406 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild2" )
           if( $DLG_larghezza < 736 ) { $DLG_larghezza = 736 }
           $DLG_tasselli = 1
        }
        else
        {
           VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild1" )
        }

      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 320
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 320
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirMensolaWild
{
   Caption = MSG(1367)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 505
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita
        //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
        Enable  = $DLG_ena_profondita

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1368)
      //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
      Enable = $DLG_enable_tipowild

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta
         //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
         //Enable = $DLG_enable_tipowild
         //LZ 04/04/2019 - Disabilito teste aperte, fuori produzione
         Enable = 0

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa
         //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
         Enable = $DLG_enable_tipowild

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 80
         dimx = 155
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 115
         dimx = 155
         dimy = 130
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FrmAppoggio
   {
      Caption = MSG(87)

      Placement
      {
         posx = 325
         posy =  10
         dimx = 165
         dimy = 150
      }

      Radio RdPiediStd
      {
        Caption = MSG(92)
        Hint    = MSG(93)
        Value   = $DLG_value_rd_uso_1
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           VAR_SET_MENU (-1,"DLG_larghezza","LargAirWilF" )
        ]
      }

      Radio RdSuppVetr1
      {
        Caption = MSG(1370)
        Hint    = MSG(1370)
        Value   = $DLG_value_rd_uso_2
        //Enable  = 1
        Enable  = $DLG_enable_vtr

        Placement
        {
           posx = 10
           posy = 45
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           VAR_SET_MENU (-1,"DLG_larghezza","LargAirWild" )
        ]
      }

      Radio RdSuppVetr2
      {
        Caption = MSG(1371)
        Hint    = MSG(1371)
        Value   = $DLG_value_rd_uso_3
        //Enable  = 1
        Enable  = $DLG_enable_vtr

        Placement
        {
           posx = 10
           posy = 70
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           VAR_SET_MENU (-1,"DLG_larghezza","LargAirWild" )
        ]
      }

      Radio RdSuppVetr3
      {
        Caption = MSG(1372)
        Hint    = MSG(1372)
        Value   = $DLG_value_rd_uso_4
        //Enable  = 1
        Enable  = $DLG_enable_vtr

        Placement
        {
           posx = 10
           posy = 95
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           VAR_SET_MENU (-1,"DLG_larghezza","LargAirWild" )
        ]
      }

      Radio RdSuppVetr4
      {
        Caption = MSG(1373)
        Hint    = MSG(1373)
        Value   = $DLG_value_rd_uso_5
        //Enable  = 1
        Enable  = $DLG_enable_vtr

        Placement
        {
           posx = 10
           posy = 120
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           VAR_SET_MENU (-1,"DLG_larghezza","LargAirWild" )
        ]
      }
   }

   Frame FrmPosizione
   {
      Caption = MSG(1369)

      Placement
      {
         posx = 325
         posy = 165
         dimx = 165
         dimy =  80
      }

      Radio rdSinistra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }


   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //$R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         //$DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         if($DLG_gentle == 0)
         {
            //$R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
            //$DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
            //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")

            //Massimiliano 17/10/2018  - aggiungo configurazione per rovere Haywood / Agewood
            if( $DLG_rovere == 1 )
            {
               $R = CHIEDI(-1,"DLG_COLORE_ROVERE")
               $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB($DLG_COLORE_ROVERE,"colori_tutti.txt")
               GOSUB Get_Image_Rovere
            }
            else
            {
               $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
               $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
            }
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
            $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_GE")
         }
         //GOSUB Get_Image_Opaco
         //Massimiliano 17/10/2018  - solo quando non sono Hay/Age Wood
         if( $DLG_rovere == 0 )  {  GOSUB Get_Image_Opaco  }
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        // 06/03/2018 - Filippo - limite in larghezza
        //Massimiliano 22/03/2018  - aggiungo che questo vale solo per il non gentle
        //Massimiliano 18/10/2018  - quando  Hay/Age wood non entro qui
        //if( $DLG_gentle == 0 )
        if( $DLG_gentle == 0 & $DLG_rovere == 0 )
        {
           if($DLG_value_rd_uso_1==1) { VAR_SET_MENU (-1,"DLG_larghezza","LargAirWilF(736-2944)" ) }
           else { VAR_SET_MENU (-1,"DLG_larghezza","LargAirWild(1472-2944)" ) }
        }

        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)


        //Massimiliano 19/06/14 - nuovo controllo
        // 08/03/2018 - Emanuele - Aggiungo una condizione in caso in cui la base fosse gentle
        //Massimiliano 18/10/2018  - anche quando  Hay/Age wood vale la stessa regola
        //if( $DLG_gentle == 0 ) { $DLG_enable_vtr = 1 }
        if( $DLG_gentle == 0 & $DLG_rovere == 0 ) { $DLG_enable_vtr = 1 }
        if( $DLG_larghezza <  1472 & $DLG_gentle == 0 )  {  $DLG_enable_vtr = 0  }
        //if(  $DLG_larghezza >= 1472  )  {  $DLG_enable_vtr = 1  }

      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)
      //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
      Enable = $DLG_ena_profondita

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 260
         posy = 255
         dimx = 100
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 150
         posy = 255
         dimx = 100
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}


Dlg AirMensolaWint
{
   Caption = MSG(1367)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 55
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza
        // 22/11/2017 - Filippo - per preconfigurati
        Enable = $DLG_ena_larghezza

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmPosizione
   {
      Caption = MSG(1369)

      Placement
      {
         posx = 5
         posy = 65
         dimx = 155
         dimy = 75
      }

      Radio rdSinistra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
        ]

      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =   5
         posy = 140
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  75
            dimy =  75
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1368)
      //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
      Enable = $DLG_enable_tipowild

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 75
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta
         //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
         //LZ 04/04/2019 - Disabilito come da lsitino 2019
         //Enable = $DLG_enable_tipowild
         Enable = 0

         Placement
         {
           posx = 10
           posy = 22
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa
         //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
         Enable = $DLG_enable_tipowild

         Placement
         {
           posx = 10
           posy = 46
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 90
         dimx = 155
         dimy = 45
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 140
         dimx = 155
         dimy = 150
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  75
            dimy =  75
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 265
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 265
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //$R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         //$DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         if($DLG_gentle == 0)
         {
            //$R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
            //$DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
            //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")

            //Massimiliano 17/10/2018  - aggiungo configurazione per rovere Haywood / Agewood
            if( $DLG_rovere == 1 )
            {
               $R = CHIEDI(-1,"DLG_COLORE_ROVERE")
               $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB($DLG_COLORE_ROVERE,"colori_tutti.txt")
               GOSUB Get_Image_Rovere
            }
            else
            {
               $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
               $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
            }
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
            $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_GE")
         }
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)
      // 22/11/2017 - Filippo - per preconfigurati
      Enable = $DLG_ena_larghezza

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 162
         posy = 295
         dimx = 100
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  62
         posy = 295
         dimx = 100
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

// 17/01/2018 - Filippo - dialog per personalizzare moduli custom
Dlg AirMensolaWintCustom
{
   Caption = MSG(1367)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 505
      dimy = 330
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 55
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza
        // 22/11/2017 - Filippo - per preconfigurati
        Enable = $DLG_ena_larghezza

        Placement
        {
           posx = 65
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmPosizione
   {
      Caption = MSG(1369)

      Placement
      {
         posx = 5
         posy = 70
         dimx = 155
         dimy = 160
      }

      Radio rdSinistra
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Value   = $DLG_value_radio_sx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_sx = 1
           $DLG_value_radio_dx = 0
           $DLG_text_verso = MSG(561)
        ]

      }

      Radio rdDestra
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Value   = $DLG_value_radio_dx
        Enable  = $DLG_enable_sx_dx

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_radio_dx = 1
           $DLG_value_radio_sx = 0
           $DLG_text_verso = MSG(562)
        ]

      }

      Bevel Bvl1
      {
        Placement
        {
           posx = 10
           posy = 75
           dimx = 130
           dimy = 2
        }
      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(657)
        Value   = MSG(657)
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 10
           posy = 98
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_caption_offset
        Value   = $DLG_caption_offset
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 70
           posy = 95
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblVersoOff
      {
        Caption = $DLG_text_verso
        Hint    = $DLG_text_verso
        Value   = $DLG_text_verso
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 5
           posy = 125
           dimx = 80
           dimy = 20
        }
        Font
        {
           size  = 8
           type  = 1
           color = 255
        }

      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  75
            dimy =  75
         }
      }

   }

   // 23/01/2018 - Filippo - x nuovi vetri
   Frame FRM_Vetri
   {
      Caption = ""

      Placement
      {
         posx = 165
         posy = 160
         dimx = 155
         dimy = 70
      }

      Check chkVetri
      {
        Caption = MSG(94)
        Hint    = MSG(94)
        Enable  = $DLG_ena_vetri
        Value   = $DLG_val_vetri

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_val_vetri==1)    {  $DLG_val_vetri=1  }
           else                     {  $DLG_val_vetri=0  }
        ]
      }

      // 06/02/2018 - Filippo - aggiungo possibilit di modificare dalla dialog
      Check chkTT
      {
        Caption = MSG(3150)
        Hint    = MSG(3150)
        Enable  = $DLG_val_vetri
        Value   = $DLG_VAR_staffa_tt

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_VAR_staffa_tt==1)    {  $DLG_VAR_staffa_tt=1  }
           else                         {  $DLG_VAR_staffa_tt=0  }
        ]
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1368)
      //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
      Enable = $DLG_enable_tipowild

      Placement
      {
         posx = 325
         posy = 10
         dimx = 155
         dimy = 75
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta
         //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
         //LZ 04/04/2019 - Disabilito come da listino 2019
         //Enable = $DLG_enable_tipowild
         Enable = 0

         Placement
         {
           posx = 10
           posy = 22
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa
         //31.08.2017 - Filippo - aggiunta versione gentle dell'elemento
         Enable = $DLG_enable_tipowild

         Placement
         {
           posx = 10
           posy = 46
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 325
         posy = 90
         dimx = 155
         dimy = 45
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy = 15
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 325
         posy = 140
         dimx = 155
         dimy = 150
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  75
            dimy =  75
         }
      }
   }

   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 350
         posy = 265
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 130
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //$R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         //$DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         if($DLG_gentle == 0)
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
            $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
            $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_GE")
         }
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)
      // 22/11/2017 - Filippo - per preconfigurati
      Enable = $DLG_ena_larghezza

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)
      Enable  = $DLG_ena_offset

      Placement
      {
         posx = 130
         posy = 165
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        // 08/02/2018 - Filippo - setto la dimensione massima dell'offset
        // 08/02/2018 - Filippo - setto l'offset con valori sempre validi
        GOSUB offset_moduli_air_custom_dialog
         $R = CHIEDI($DLG_idx_to_call,"VAR_offset_posiz")
         $DLG_caption_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz"))
         $DLG_val_offset   = VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz")
         // 16/01/2018 - Filippo - continua a chiedere se minore a zero
         while( VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz")<0 )
         {
            // 08/02/2018 - Filippo - setto la dimensione massima dell'offset
            // 08/02/2018 - Filippo - setto l'offset con valori sempre validi
            GOSUB offset_moduli_air_custom_dialog

             $R = CHIEDI($DLG_idx_to_call,"VAR_offset_posiz")
             $DLG_caption_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz"))
             $DLG_val_offset   = VAR_VAL($DLG_idx_to_call,"VAR_offset_posiz")
         }

      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 190
         posy = 250
         dimx = 100
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
         posy = 250
         dimx = 100
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirPancaWild
{
   Caption = MSG(1367)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita
        Enable  = 0

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame FrmTipoWild
   {
      Caption = MSG(1362)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdTstAperta
      {
         Caption = MSG(1363)
         Hint    = MSG(1363)
         Value   = $DLG_value_radio_tstaperta

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 1
           $DLG_value_radio_tstchiusa = 0
           $DLG_Vetrino = 1
           $DLG_value_Vetrino_uso = 1
           $DLG_value_finit_uso = 1
         ]
      }

      Radio RdTstChiusa
      {
         Caption = MSG(1364)
         Hint    = MSG(1364)
         Value   = $DLG_value_radio_tstchiusa

         Placement
         {
           posx = 10
           posy = 42
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_radio_tstaperta = 0
           $DLG_value_radio_tstchiusa = 1
           $DLG_Vetrino = 0
           $DLG_value_Vetrino_uso = 0
           $DLG_value_finit_uso = 0
         ]
      }

   }

   Frame Presenza_Vetrino
   {
      Placement
      {
         posx = 165
         posy = 80
         dimx = 155
         dimy = 30
      }

      Check chkVetrino
      {
        Caption = MSG(1366)
        Hint    = MSG(1366)
        Enable  = $DLG_value_Vetrino_uso
        Value   = $DLG_Vetrino

        Placement
        {
           posx = 10
           posy =  5
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Vetrino==1)
           {
              $DLG_Vetrino = 1
              $DLG_value_finit_uso = 1
           }
           else
           {
              $DLG_Vetrino = 0
              $DLG_value_finit_uso = 0
           }
        ]

      }
   }

   Frame Finitura_Vetrino
   {
      Caption = MSG(1365)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 165
         posy = 115
         dimx = 155
         dimy = 130
      }


      Label LabFinVtr
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_descrizione_DE
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImVetrino
      {
         Caption = $DLG_descrizione_DE
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_DE

         Placement
         {
            posx =  45
            posy =  40
            dimx =  64
            dimy =  64
         }
      }


   }


   Button btnFinVet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 185
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         //COMPONENTI3 ( "wk_Vetrino",$DLG_idx_to_call,"AIR_VetrinoWild" )
         //if( wk_Vetrino > 0 )
         //{
         //   $DLG_idx_to_call_f = wk_Vetrino[wk_Vetrino]
         //}
         //DISPLAY ("idx su cui cerco GEST_CR=", $DLG_idx_to_call_f)
         $R = CHIEDI($DLG_idx_to_call,"GEST_DE")
         $DLG_descrizione_DE = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_DE"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_DE")
         GOSUB Get_Image_Lucido
         $DLG_image_file2 = $DLG_image_file
      ]
   }


   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = MSG(447)
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 60
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita")
   //     $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
   //     $DLG_caption_profondita = STR($DLG_profondita)
   //     $DLG_value_profondita   = STR($DLG_profondita)
   //
   //     if( $DLG_profondita == 560 )
   //     {
   //        VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild2" )
   //        if( $DLG_larghezza < 736 ) { $DLG_larghezza = 736 }
   //     }
   //     else
   //     {
   //        VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild1" )
   //     }
   //   ]
   //}

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 255
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 255
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg MensolaLamin
{
   Caption = MSG(2104)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 355
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 65
           posy = 50
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 5
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_PP
         Value   = $DLG_descrizione_PP
         Hint    = $DLG_descrizione_PP

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_PP
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_PP

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame TasselliFlu
   {
      //Caption = MSG(1365)
      //Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 5
         posy = 255
         dimx = 315
         dimy = 30
      }

      Check chkTasselli
      {
         Caption = MSG(896)
         Hint    = MSG(896)
         Enable  = 1
         Value   = $DLG_tasselli

         Placement
         {
            posx = 10
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
            else                   {  $DLG_tasselli=0  }
         ]

      }
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PP")
         $DLG_descrizione_PP = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PP"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PP")
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
        // Eugenio 23.05.13 Sul listino le lunghezze sono uguali per tutte le profondit
        // Eugenio 05.09.13 Arriva la prof.520
        if( $DLG_profondita > 406 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild2" )
           if( $DLG_larghezza < 736 ) { $DLG_larghezza = 736 }
           $DLG_tasselli = 1
        }
        else
        {
           VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild1" )
        }

      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 290
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  15
         posy = 290
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg MensolaLaccato
{
   Caption = MSG(1738)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 355
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      //Edit EdtProfondita
      //{
      //  Caption = $DLG_caption_profondita
      //  Hint    = $DLG_hint_profondita
      //  Value   = $DLG_value_profondita
      //
      //  Placement
      //  {
      //     posx = 65
      //     posy = 50
      //     dimx = 60
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //  ]
      //
      //}

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = MSG(447)
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx = 5
      //     posy = 55
      //     dimx = 80
      //     dimy = 20
      //  }
      //}
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx =  5
         posy = 95
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_descrizione_ST
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_ST
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_ST

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame TasselliFlu
   {
      //Caption = MSG(1365)
      //Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 5
         posy = 255
         dimx = 315
         dimy = 30
      }

      Check chkTasselli
      {
         Caption = MSG(896)
         Hint    = MSG(896)
         Enable  = 1
         Value   = $DLG_tasselli

         Placement
         {
            posx = 10
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
            else                   {  $DLG_tasselli=0  }
         ]

      }
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 220
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_PP = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = MSG(447)
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 60
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita")
   //     $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
   //     $DLG_caption_profondita = STR($DLG_profondita)
   //     $DLG_value_profondita   = STR($DLG_profondita)
   //     // Eugenio 23.05.13 Sul listino le lunghezze sono uguali per tutte le profondit
   //     // Eugenio 05.09.13 Arriva la prof.520
   //     if( $DLG_profondita > 406 )
   //     {
   //        VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild2" )
   //        if( $DLG_larghezza < 736 ) { $DLG_larghezza = 736 }
   //        $DLG_tasselli = 1
   //     }
   //     else
   //     {
   //        VAR_SET_MENU (-1,"DLG_larghezza","X_Men_Wild1" )
   //     }
   //
   //   ]
   //}

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 290
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  15
         posy = 290
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg AirTopLamin
{
   Caption = MSG(382)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 135
      }

      Edit EdtLarghezza
      {
         Caption = $DLG_caption_larghezza
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 65
            posy = 25
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtProfondita
      {
         Caption = $DLG_caption_profondita
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 65
            posy = 50
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtPosizione
      {
         Caption = $DLG_caption_posizione
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione

         Placement
         {
            posx = 65
            posy = 75
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtOffset
      {
         Caption = $DLG_caption_offset
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 65
            posy = 100
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LblLarghezza
      {
         Caption = MSG(624)
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 5
            posy = 30
            dimx = 80
            dimy = 20
         }

      }

      Label LblProfondita
      {
         Caption = MSG(626)
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 5
            posy = 55
            dimx = 80
            dimy = 20
         }
      }

      Label LblPosizione
      {
         Caption = MSG(433)
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione


         Placement
         {
            posx = 5
            posy = 80
            dimx = 80
            dimy = 20
         }
      }

      Label LblOffset
      {
         Caption = MSG(657)
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 5
            posy = 105
            dimx = 80
            dimy = 20
         }
      }
   }

   Frame Finitura_Top
   {
      Caption = MSG(251)

      Placement
      {
         posx = 10
         posy = 145
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }
   }

   Button btnFinTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  30
         posy = 270
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1)==1 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)

            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_1)
            $DLG_descrizione_var1 = UPPER($DLG_descrizione_var1)

            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file
         }
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 140
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza     = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)

         // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
         // disabilito l'offset perch viene calcolato in automatico
         if( ABS($DLG_posizione)==2 )
         {
            $DLG_enable_offset=0
            VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
            // l'offset   il top wild  se il top sotto  maggiore del top wild
            if( VAR_VAL($DLG_idx_to_call,"X_TopSotto") > $DLG_larghezza )
            {
               VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            }
         }

         $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
         $DLG_caption_offset = STR($DLG_offset)
         $DLG_value_offset   = STR($DLG_offset)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(623)

      Placement
      {
         posx = 140
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_profondita")
         $DLG_hint_profondita    = STRCAT(MSG(430),"=",STR($DLG_profondita))
         $DLG_caption_profondita = STR($DLG_profondita)
         $DLG_value_profondita   = STR($DLG_profondita)

         // Modifico il menu della larghezza in base alla profondita
         if( $DLG_profondita<=920 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild1(736-2944)" )
         }

         if( $DLG_profondita>920 & $DLG_profondita<=1250 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild2(736-2208)" )
            if( $DLG_larghezza>2208 ) { $DLG_larghezza = 2208 }
         }
         // aggiorno i componenti di dialog per la larghezza
         $DLG_hint_larghezza    = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1382)

      Placement
      {
         posx = 140
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_posizione")==1 )
         {
            $R = CHIEDI(-1,"DLG_posizione")

            // ------------------------------------------------
            // Fabrizio 02/10/12: aggiorno le variabili per la dialog
            // ------------------------------------------------
            $DLG_caption_posizione = MSG(1376)
            if( $DLG_posizione==-1 )   { $DLG_caption_posizione = MSG(1377) }
            if( $DLG_posizione== 1 )   { $DLG_caption_posizione = MSG(1378) }
            if( $DLG_posizione==-90 )  { $DLG_caption_posizione = MSG(1379) }
            if( $DLG_posizione== 90 )  { $DLG_caption_posizione = MSG(1380) }
            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            if( $DLG_posizione==-2 )   { $DLG_caption_posizione = MSG(1391) }
            if( $DLG_posizione== 2 )   { $DLG_caption_posizione = MSG(1392) }
            $DLG_hint_posizione  = STRCAT(MSG(414),"=",$DLG_caption_posizione)
            $DLG_value_posizione = $DLG_caption_posizione
            // ------------------------------------------------


            // ------------------------------------------------
            // attivo entrambe le teste (DX/SX)
            // come in Radio RdTstAperta
            // ------------------------------------------------
            $DLG_teste_aperte = 2

            // se sono posizionato a sx la testa dx  chiusa
            if( $DLG_posizione==-1 )  { $DLG_teste_aperte = -1 }
            if( $DLG_posizione==-90 ) { $DLG_teste_aperte = -1 }

            // se sono posizionato a dx la testa dx  chiusa
            if( $DLG_posizione== 1 )  { $DLG_teste_aperte =  1 }
            if( $DLG_posizione== 90 ) { $DLG_teste_aperte =  1 }

            //$DLG_var_to_call_2 = "GEST_DE"
            //if( $DLG_teste_aperte==-1 )  { $DLG_var_to_call_2 = "GEST_DT"  }
            // ------------------------------------------------

            // ------------------------------------------------
            // Fabrizio 04/10/12: resetto anche l'offset e riassegno il menu
            // ------------------------------------------------
            $DLG_enable_offset = 1
            if( $DLG_posizione== -1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==  1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==-90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }
            if( $DLG_posizione== 90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }

            //FT:OLD // caso del posizionamento sopra
            //FT:OLD if( $DLG_posizione==0 )
            //FT:OLD {
            //FT:OLD    $DLG_enable_offset = 0
            //FT:OLD    VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
            //FT:OLD
            //FT:OLD    // al momento "blocco" la larghezza in base al top vetro
            //FT:OLD    VAR_CREATE_NUM(-1,"DLG_larghezza",VAR_VAL($DLG_idx_to_call,"X_TopSotto"),0,"")
            //FT:OLD    $DLG_hint_larghezza    = STRCAT(MSG(439),"=",STR($DLG_larghezza))
            //FT:OLD    $DLG_caption_larghezza = STR($DLG_larghezza)
            //FT:OLD    $DLG_value_larghezza   = STR($DLG_larghezza)
            //FT:OLD }

            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            // disabilito l'offset perch viene calcolato in automatico
            if( ABS($DLG_posizione)==2 )
            {
               $DLG_enable_offset=0
               VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
               // l'offset   il top wild  se il top sotto  maggiore del top wild
               if( VAR_VAL($DLG_idx_to_call,"X_TopSotto") > $DLG_larghezza )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
               }
            }

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)
            // ------------------------------------------------

            //DISPLAY("$DLG_offset=",$DLG_offset)
         }
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 140
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            $R = CHIEDI(-1,"DLG_offset")

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)
         }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 305
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  10
         posy = 305
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg AirTopWild
{
   Caption = MSG(1374)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 400
      dimy = 400
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 165
      }

      Edit EdtLarghezza
      {
         Caption = $DLG_caption_larghezza
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 65
            posy = 25
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtProfondita
      {
         Caption = $DLG_caption_profondita
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 65
            posy = 50
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtPosizione
      {
         Caption = $DLG_caption_posizione
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione

         Placement
         {
            posx = 65
            posy = 75
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtOffset
      {
         Caption = $DLG_caption_offset
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 65
            posy = 100
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtAllinea
      {
         Caption = $DLG_caption_allinea
         Hint    = $DLG_hint_allinea
         Value   = $DLG_value_allinea
         Enable  = $DLG_enable_allinea

         Placement
         {
            posx = 65
            posy = 125
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LblLarghezza
      {
         Caption = MSG(624)
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 5
            posy = 30
            dimx = 80
            dimy = 20
         }

      }

      Label LblProfondita
      {
         Caption = MSG(626)
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 5
            posy = 55
            dimx = 80
            dimy = 20
         }
      }

      Label LblPosizione
      {
         Caption = MSG(433)
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione


         Placement
         {
            posx = 5
            posy = 80
            dimx = 80
            dimy = 20
         }
      }

      Label LblOffset
      {
         Caption = MSG(657)
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 5
            posy = 105
            dimx = 80
            dimy = 20
         }
      }

      Label LblAllinea
      {
         Caption = MSG(1328)
         Hint    = $DLG_hint_allinea
         Value   = $DLG_value_allinea
         Enable  = $DLG_enable_allinea

         Placement
         {
            posx = 5
            posy = 130
            dimx = 80
            dimy = 20
         }
      }
   }

   Frame Finitura_Top
   {
      Caption = MSG(251)

      Placement
      {
         posx =  5
         posy = 175
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }
   }

   Frame TestaSx
   {
      Caption = MSG(1383)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 110
         dimy = 285
      }

      Radio RdTstApertaSx
      {
         Caption = MSG(1387)
         Hint    = MSG(1387)
         Value   = $DLG_value_radio_tstaperta_sx

         Placement
         {
            posx = 10
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_radio_tstaperta_sx = 1
            $DLG_value_radio_tstchiusa_sx = 0
            $DLG_testa_sx = 1
            $DLG_enable_vetrino_sx = 1
         ]
      }

      Radio RdTstChiusaSx
      {
         Caption = MSG(1388)
         Hint    = MSG(1388)
         Value   = $DLG_value_radio_tstchiusa_sx

         Placement
         {
            posx = 10
            posy = 45
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_radio_tstaperta_sx = 0
            $DLG_value_radio_tstchiusa_sx = 1
            $DLG_testa_sx = 0

            // disabilito il vetrino
            $DLG_vetrino_sx = 0
            $DLG_enable_vetrino_sx = 0

            // se  chiuso pulisco
            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
            {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_2,"=",APICI(),$VALORE_NULLO,APICI()))

               $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
               $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
               $DLG_image_file2 = ""
            }
         ]
      }

      Check chkVetrinoSx
      {
         Caption = MSG(1389)
         Hint    = MSG(1389)
         Enable  = $DLG_enable_vetrino_sx
         Value   = $DLG_vetrino_sx

         Placement
         {
            posx =  10
            posy = 100
            dimx = 130
            dimy =  20
         }

         OnClick
         [
            if( $DLG_vetrino_sx==1 )  { $DLG_vetrino_sx = 1 }
            else                      { $DLG_vetrino_sx = 0 }

            // rinfresco la grafica della finestra
            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
            {
               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)

               if( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 & $DLG_vetrino_sx==1 & $DLG_testa_sx==1 )  { $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2) }

               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
               GOSUB Get_Image_Lucido
               $DLG_image_file2 = $DLG_image_file

               $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
               $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
            }
         ]
      }

      Label LabFinVtr
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_vetrino_sx

         Placement
         {
            posx = 10
            posy = 155
            dimx = 110
            dimy = 25
         }
      }

      Image ImVetrinoSx
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_vetrino_sx

         Placement
         {
            posx =  15
            posy =  175
            dimx =  80
            dimy =  80
         }
      }
   }

   Frame TestaDx
   {
      Caption = MSG(1384)

      Placement
      {
         posx = 280
         posy = 10
         dimx = 110
         dimy = 285
      }

      Radio RdTstApertaDx
      {
         Caption = MSG(1387)
         Hint    = MSG(1387)
         Value   = $DLG_value_radio_tstaperta_dx

         Placement
         {
            posx = 10
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_radio_tstaperta_dx = 1
            $DLG_value_radio_tstchiusa_dx = 0
            $DLG_testa_dx = 1
            $DLG_enable_vetrino_dx = 1
         ]
      }

      Radio RdTstChiusaDx
      {
         Caption = MSG(1388)
         Hint    = MSG(1388)
         Value   = $DLG_value_radio_tstchiusa_dx

         Placement
         {
            posx = 10
            posy = 45
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_radio_tstaperta_dx = 0
            $DLG_value_radio_tstchiusa_dx = 1
            $DLG_testa_dx = 0

            // disabilito il vetrino
            $DLG_vetrino_dx = 0
            $DLG_enable_vetrino_dx = 0

            // se  chiuso pulisco
            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
            {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_3,"=",APICI(),$VALORE_NULLO,APICI()))

               $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
               $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
               $DLG_image_file3 = ""
            }
         ]
      }

      Check chkVetrinoDx
      {
         Caption = MSG(1389)
         Hint    = MSG(1389)
         Enable  = $DLG_enable_vetrino_dx
         Value   = $DLG_vetrino_dx

         Placement
         {
            posx =  10
            posy = 100
            dimx = 130
            dimy =  20
         }

         OnClick
         [
            if( $DLG_vetrino_dx==1 )  { $DLG_vetrino_dx = 1 }
            else                      { $DLG_vetrino_dx = 0 }

            // rinfresco la grafica della finestra
            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
            {
               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)

               if( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 & $DLG_vetrino_dx==1 & $DLG_testa_dx==1 )  { $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3) }

               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
               GOSUB Get_Image_Lucido
               $DLG_image_file3 = $DLG_image_file

               $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
               $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
            }
         ]
      }

      Label LabFinVtr
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_vetrino_dx

         Placement
         {
            posx = 10
            posy = 155
            dimx = 110
            dimy = 25
         }
      }

      Image ImVetrinoDx
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_vetrino_dx

         Placement
         {
            posx =  15
            posy =  175
            dimx =  80
            dimy =  80
         }
      }
   }

   Button btnFinTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  25
         posy = 300
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1)==1 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)

            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_1)
            $DLG_descrizione_var1 = UPPER($DLG_descrizione_var1)

            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file
         }
      ]
   }

   Button btnFinVetSx
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1385)
      Enable = $DLG_vetrino_sx

      Placement
      {
         posx = 170
         posy = 270
         dimx = 100
         dimy =  20
      }

      OnClick
      [
         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2)

            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
            $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)

            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
            GOSUB Get_Image_Lucido
            $DLG_image_file2 = $DLG_image_file
         }
      ]
   }

   Button btnFinVetDx
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1386)
      Enable = $DLG_vetrino_dx

      Placement
      {
         posx = 280
         posy = 270
         dimx = 100
         dimy =  20
      }

      OnClick
      [
         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3)

            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
            $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)

            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
            GOSUB Get_Image_Lucido
            $DLG_image_file3 = $DLG_image_file
         }
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          //30.03.2017 - Filippo - Modifico il menu della larghezza in base alla profondita
         if( $DLG_profondita<=920 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild1(736-2944)" )
         }

         if( $DLG_profondita>920 & $DLG_profondita<=1250 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild2(736-2208)" )
            if( $DLG_larghezza>2208 ) { $DLG_larghezza = 2208 }
         }
         //===========================

         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza     = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)

            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            // disabilito l'offset perch viene calcolato in automatico
            if( ABS($DLG_posizione)==2 )
            {
               // Fabrizio 25/02/14
               // $DLG_enable_offset=0
               // VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
               // // l'offset   il top wild  se il top sotto  maggiore del top wild
               // if( VAR_VAL($DLG_idx_to_call,"X_TopSotto") > $DLG_larghezza )
               // {
               //    VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
               // }

            ///// Fabrizio 25/02/14 - comanda DLG_offset_lat
            ///VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
            ///
            ///// l'offset   il top wild  se il top sotto  maggiore del top wild
            ///if( VAR_VAL($DLG_idx_to_call,"X_TopSotto") > $DLG_larghezza )
            ///{
            ///   //VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            ///   VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            ///}
            ///
               // TEST
               VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(623)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_profondita")
         $DLG_hint_profondita    = STRCAT(MSG(430),"=",STR($DLG_profondita))
         $DLG_caption_profondita = STR($DLG_profondita)
         $DLG_value_profondita   = STR($DLG_profondita)

         // Modifico il menu della larghezza in base alla profondita
         if( $DLG_profondita<=920 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild1(736-2944)" )
         }

         if( $DLG_profondita>920 & $DLG_profondita<=1250 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild2(736-2208)" )
            if( $DLG_larghezza>2208 ) { $DLG_larghezza = 2208 }
         }
         // aggiorno i componenti di dialog per la larghezza
         $DLG_hint_larghezza    = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1382)

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_posizione")==1 )
         {
            $R = CHIEDI(-1,"DLG_posizione")

            // ------------------------------------------------
            // Fabrizio 02/10/12: aggiorno le variabili per la dialog
            // ------------------------------------------------
            $DLG_caption_posizione = MSG(1376)
            if( $DLG_posizione==-1 )   { $DLG_caption_posizione = MSG(1377) }
            if( $DLG_posizione== 1 )   { $DLG_caption_posizione = MSG(1378) }
            if( $DLG_posizione==-90 )  { $DLG_caption_posizione = MSG(1379) }
            if( $DLG_posizione== 90 )  { $DLG_caption_posizione = MSG(1380) }
            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            if( $DLG_posizione==-2 )   { $DLG_caption_posizione = MSG(1391) }
            if( $DLG_posizione== 2 )   { $DLG_caption_posizione = MSG(1392) }
            $DLG_hint_posizione  = STRCAT(MSG(414),"=",$DLG_caption_posizione)
            $DLG_value_posizione = $DLG_caption_posizione
            // ------------------------------------------------


            // ------------------------------------------------
            // attivo entrambe le teste (DX/SX)
            // come in Radio RdTstAperta
            // ------------------------------------------------
            $DLG_teste_aperte = 2

            // se sono posizionato a sx la testa dx  chiusa
            if( $DLG_posizione==-1 )  { $DLG_teste_aperte = -1 }
            if( $DLG_posizione==-90 ) { $DLG_teste_aperte = -1 }

            // se sono posizionato a dx la testa dx  chiusa
            if( $DLG_posizione== 1 )  { $DLG_teste_aperte =  1 }
            if( $DLG_posizione== 90 ) { $DLG_teste_aperte =  1 }

            $DLG_var_to_call_2 = "GEST_DE"
            if( $DLG_teste_aperte==-1 )  { $DLG_var_to_call_2 = "GEST_DT"  }
            // ------------------------------------------------

            // ------------------------------------------------
            // Fabrizio 04/10/12: resetto anche l'offset e riassegno il menu
            // ------------------------------------------------
            $DLG_enable_offset = 1
            if( $DLG_posizione== -1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==  1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==-90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }
            if( $DLG_posizione== 90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }

            //Massimiliano 22/03/2018  - quando non ho l'aggancio disabilito l'offset
            if( IS_IDX($DLG_idx_agg)==0 )  { $DLG_enable_offset = 0 }

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)

            VAR_SET_MODE(-1,"DLG_offset_lat",0)

            // Fabrizio 25/02/14
            if( ABS($DLG_posizione)==2 )
            {
               VAR_SET_MODE(-1,"DLG_offset",0)

               if( $DLG_posizione==-2 )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset_lat",VAR_VAL($DLG_idx_to_call,"VAR_offset_sx"),$DLG_enable_offset,STRCAT("(",STR(-VAR_VAL($DLG_idx_to_call,"X_TopSotto")+184),"-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")"))
               }

               if( $DLG_posizione== 2 )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset_lat",VAR_VAL($DLG_idx_to_call,"VAR_offset_dx"),$DLG_enable_offset,STRCAT("(",STR(-VAR_VAL($DLG_idx_to_call,"X_TopSotto")+184),"-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")"))
               }

               $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset_lat))
               $DLG_caption_offset = STR($DLG_offset_lat)
               $DLG_value_offset   = STR($DLG_offset_lat)
            }

            // ------------------------------------------------

            //DISPLAY("$DLG_offset=",$DLG_offset)
         }

         //Massimiliano 16/01/15 - controllo per disabilitare settaggio teste in caso di top con appoggio su supporti in vetro
         //                        se il top  sporgente non pu avere sulla testa interna una testa rientrante
         $DLG_testaDx = 1
         $DLG_testaSx = 1
         if( $DLG_posizione == -1 )
         {
            $DLG_value_radio_tstaperta_dx = 0
            $DLG_value_radio_tstchiusa_dx = 1
            $DLG_testa_dx = 0
            $DLG_enable_vetrino_dx = 0
         }
         if( $DLG_posizione ==  1 )
         {
            $DLG_value_radio_tstaperta_sx = 0
            $DLG_value_radio_tstchiusa_sx = 1
            $DLG_testa_sx = 0
            $DLG_enable_vetrino_sx = 0
         }

      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)
      Enable = $DLG_enable_offset

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // Fabrizio 25/02/14
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            if( ABS($DLG_posizione)!=2 )
            {
               $R = CHIEDI(-1,"DLG_offset")
               $DLG_hint_offset    = STRCAT(MSG(1381)," = ",STR($DLG_offset))
               $DLG_caption_offset = STR($DLG_offset)
               $DLG_value_offset   = STR($DLG_offset)
            }
            else
            {
               $R = CHIEDI(-1,"DLG_offset_lat")
               $DLG_hint_offset    = STRCAT(MSG(1381)," = ",STR($DLG_offset_lat))
               $DLG_caption_offset = STR($DLG_offset_lat)
               $DLG_value_offset   = STR($DLG_offset_lat)
            }
         }
      ]
   }

   Button btnAllinea
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1323)

      Placement
      {
         posx = 135
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_allinea")==1 )
         {
            $R = CHIEDI(-1,"DLG_allinea")

            $DLG_value_allinea   = MSG(649)
            if( $DLG_allinea==-1 )  { $DLG_value_allinea = MSG(648) }
            $DLG_hint_allinea    = STRCAT(MSG(1328),"=",$DLG_value_allinea)
         }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 340
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 145
         posy = 340
         dimx = 100
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg AirTopSteel
{
   Caption = MSG(1374)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 195
      dimy = 410
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 155
         dimx = 180
         dimy = 165
      }

      Edit EdtLarghezza
      {
         Caption = $DLG_caption_larghezza
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 85
            posy = 25
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtProfondita
      {
         Caption = $DLG_caption_profondita
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 85
            posy = 50
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtPosizione
      {
         Caption = $DLG_caption_posizione
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione

         Placement
         {
            posx = 85
            posy = 75
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtOffset
      {
         Caption = $DLG_caption_offset
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 85
            posy = 100
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtAllinea
      {
         Caption = $DLG_caption_allinea
         Hint    = $DLG_hint_allinea
         Value   = $DLG_value_allinea
         Enable  = $DLG_enable_allinea

         Placement
         {
            posx = 85
            posy = 125
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LblLarghezza
      {
         Caption = MSG(624)
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 5
            posy = 30
            dimx = 80
            dimy = 20
         }

      }

      Label LblProfondita
      {
         Caption = MSG(626)
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 5
            posy = 55
            dimx = 80
            dimy = 20
         }
      }

      Label LblPosizione
      {
         Caption = MSG(433)
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione


         Placement
         {
            posx = 5
            posy = 80
            dimx = 80
            dimy = 20
         }
      }

      Label LblOffset
      {
         Caption = MSG(657)
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 5
            posy = 105
            dimx = 80
            dimy = 20
         }
      }

      Label LblAllinea
      {
         Caption = MSG(1328)
         Hint    = $DLG_hint_allinea
         Value   = $DLG_value_allinea
         Enable  = $DLG_enable_allinea

         Placement
         {
            posx = 5
            posy = 130
            dimx = 80
            dimy = 20
         }
      }
   }

   Frame Finitura_Top
   {
      Caption = MSG(251)

      Placement
      {
         posx =   5
         posy =   5
         dimx = 180
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }
   }

   //Check chkListello
   //{
   //  Caption = MSG(2442)
   //  Hint    = MSG(2442)
   //  Enable  = $DLG_enable_listello
   //  Value   = $DLG_listello
   //
   //  Placement
   //  {
   //     posx = 10
   //     posy = 325
   //     dimx = 120
   //     dimy = 20
   //  }
   //
   //  OnClick
   //  [
   //     if($DLG_listello==1)   {  $DLG_listello=1  }
   //     else                   {  $DLG_listello=0  }
   //  ]
   //
   //}


   Button btnFinTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  45
         posy = 130
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1)==1 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)

            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_1)
            $DLG_descrizione_var1 = UPPER($DLG_descrizione_var1)

            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

            //$DLG_image_file1 = STRCAT("%install_dir%\tab_lago\tab_M4\Images\Menu",CHR2STR(92),$DLG_VAL_COLORE,".bmp")
            $DLG_image_file1 = Get_Image($DLG_VAL_COLORE,"")
         }
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 155
         posy = 180
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza     = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)

            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            // disabilito l'offset perch viene calcolato in automatico
            if( ABS($DLG_posizione)==2 )
            {
               VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(623)

      Placement
      {
         posx = 155
         posy = 205
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_profondita")
         $DLG_hint_profondita    = STRCAT(MSG(430),"=",STR($DLG_profondita))
         $DLG_caption_profondita = STR($DLG_profondita)
         $DLG_value_profondita   = STR($DLG_profondita)

         // Modifico il menu della larghezza in base alla profondita
         if( $DLG_profondita<=920 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild1(736-2944)" )
         }

         if( $DLG_profondita>920 & $DLG_profondita<=1250 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild2(736-2208)" )
            if( $DLG_larghezza>2208 ) { $DLG_larghezza = 2208 }
         }
         // aggiorno i componenti di dialog per la larghezza
         $DLG_hint_larghezza    = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1382)

      Placement
      {
         posx = 155
         posy = 230
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_posizione")==1 )
         {
            $R = CHIEDI(-1,"DLG_posizione")

            // ------------------------------------------------
            // Fabrizio 02/10/12: aggiorno le variabili per la dialog
            // ------------------------------------------------
            $DLG_caption_posizione = MSG(1376)
            if( $DLG_posizione==-1 )   { $DLG_caption_posizione = MSG(1377) }
            if( $DLG_posizione== 1 )   { $DLG_caption_posizione = MSG(1378) }
            if( $DLG_posizione==-90 )  { $DLG_caption_posizione = MSG(1379) }
            if( $DLG_posizione== 90 )  { $DLG_caption_posizione = MSG(1380) }
            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            if( $DLG_posizione==-2 )   { $DLG_caption_posizione = MSG(1391) }
            if( $DLG_posizione== 2 )   { $DLG_caption_posizione = MSG(1392) }
            $DLG_hint_posizione  = STRCAT(MSG(414),"=",$DLG_caption_posizione)
            $DLG_value_posizione = $DLG_caption_posizione
            // ------------------------------------------------

            // ------------------------------------------------
            // attivo entrambe le teste (DX/SX)
            // come in Radio RdTstAperta
            // ------------------------------------------------
            $DLG_teste_aperte = 2

            // se sono posizionato a sx la testa dx  chiusa
            if( $DLG_posizione==-1 )  { $DLG_teste_aperte = -1 }
            if( $DLG_posizione==-90 ) { $DLG_teste_aperte = -1 }

            // se sono posizionato a dx la testa dx  chiusa
            if( $DLG_posizione== 1 )  { $DLG_teste_aperte =  1 }
            if( $DLG_posizione== 90 ) { $DLG_teste_aperte =  1 }

            $DLG_var_to_call_2 = "GEST_DE"
            if( $DLG_teste_aperte==-1 )  { $DLG_var_to_call_2 = "GEST_DT"  }
            // ------------------------------------------------

            // ------------------------------------------------
            // Fabrizio 04/10/12: resetto anche l'offset e riassegno il menu
            // ------------------------------------------------
            $DLG_enable_offset = 1
            if( $DLG_posizione== -1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==  1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==-90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }
            if( $DLG_posizione== 90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)

            VAR_SET_MODE(-1,"DLG_offset_lat",0)

            // Fabrizio 25/02/14
            if( ABS($DLG_posizione)==2 )
            {
               VAR_SET_MODE(-1,"DLG_offset",0)

               if( $DLG_posizione==-2 )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset_lat",VAR_VAL($DLG_idx_to_call,"VAR_offset_sx"),$DLG_enable_offset,STRCAT("(",STR(-VAR_VAL($DLG_idx_to_call,"X_TopSotto")+184),"-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")"))
               }

               if( $DLG_posizione== 2 )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset_lat",VAR_VAL($DLG_idx_to_call,"VAR_offset_dx"),$DLG_enable_offset,STRCAT("(",STR(-VAR_VAL($DLG_idx_to_call,"X_TopSotto")+184),"-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")"))
               }

               $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset_lat))
               $DLG_caption_offset = STR($DLG_offset_lat)
               $DLG_value_offset   = STR($DLG_offset_lat)
            }

            // ------------------------------------------------

            //Massimiliano 02/08/16 - abilito e gestisco il listello solo nel caso di penisola
        //    $DLG_enable_listello = 0
            $DLG_listello = 0
            if( ABS($DLG_posizione)==90 )
            {
        //       $DLG_enable_listello = 1
               $DLG_listello = 1
            }
         }
      ]
    }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 155
         posy = 255
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // Fabrizio 25/02/14
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            if( ABS($DLG_posizione)!=2 )
            {
               $R = CHIEDI(-1,"DLG_offset")
               $DLG_hint_offset    = STRCAT(MSG(1381)," = ",STR($DLG_offset))
               $DLG_caption_offset = STR($DLG_offset)
               $DLG_value_offset   = STR($DLG_offset)
            }
            else
            {
               $R = CHIEDI(-1,"DLG_offset_lat")
               $DLG_hint_offset    = STRCAT(MSG(1381)," = ",STR($DLG_offset_lat))
               $DLG_caption_offset = STR($DLG_offset_lat)
               $DLG_value_offset   = STR($DLG_offset_lat)
            }
         }
      ]
   }

   Button btnAllinea
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1323)

      Placement
      {
         posx = 155
         posy = 280
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_allinea")==1 )
         {
            $R = CHIEDI(-1,"DLG_allinea")

            $DLG_value_allinea   = MSG(649)
            if( $DLG_allinea==-1 )  { $DLG_value_allinea = MSG(648) }
            $DLG_hint_allinea    = STRCAT(MSG(1328),"=",$DLG_value_allinea)
         }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 105
         posy = 350
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =   5
         posy = 350
         dimx = 100
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg AirTopStone
{
   Caption = MSG(2106)

   Placement
   {
      posx = 150
      posy = 150
      //dimx = 400
      dimx = 180
      //dimy = 400
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 5
         posy = 10
         dimx = 155
         dimy = 165
      }

      Edit EdtLarghezza
      {
         Caption = $DLG_caption_larghezza
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 65
            posy = 25
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtProfondita
      {
         Caption = $DLG_caption_profondita
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 65
            posy = 50
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtPosizione
      {
         Caption = $DLG_caption_posizione
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione

         Placement
         {
            posx = 65
            posy = 75
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtOffset
      {
         Caption = $DLG_caption_offset
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 65
            posy = 100
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit EdtAllinea
      {
         Caption = $DLG_caption_allinea
         Hint    = $DLG_hint_allinea
         Value   = $DLG_value_allinea
         Enable  = $DLG_enable_allinea

         Placement
         {
            posx = 65
            posy = 125
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LblLarghezza
      {
         Caption = MSG(624)
         Hint    = $DLG_hint_larghezza
         Value   = $DLG_value_larghezza

         Placement
         {
            posx = 5
            posy = 30
            dimx = 80
            dimy = 20
         }

      }

      Label LblProfondita
      {
         Caption = MSG(626)
         Hint    = $DLG_hint_profondita
         Value   = $DLG_value_profondita

         Placement
         {
            posx = 5
            posy = 55
            dimx = 80
            dimy = 20
         }
      }

      Label LblPosizione
      {
         Caption = MSG(433)
         Hint    = $DLG_hint_posizione
         Value   = $DLG_value_posizione


         Placement
         {
            posx = 5
            posy = 80
            dimx = 80
            dimy = 20
         }
      }

      Label LblOffset
      {
         Caption = MSG(657)
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 5
            posy = 105
            dimx = 80
            dimy = 20
         }
      }

      Label LblAllinea
      {
         Caption = MSG(1328)
         Hint    = $DLG_hint_allinea
         Value   = $DLG_value_allinea
         Enable  = $DLG_enable_allinea

         Placement
         {
            posx = 5
            posy = 130
            dimx = 80
            dimy = 20
         }
      }
   }

   //Frame Finitura_Top
   //{
   //   Caption = MSG(251)
   //
   //   Placement
   //   {
   //      posx =  5
   //      posy = 175
   //      dimx = 155
   //      dimy = 150
   //   }
   //
   //   Label LabFinPia
   //   {
   //      Caption = $DLG_descrizione_var1
   //      Value   = $DLG_descrizione_var1
   //      Hint    = $DLG_descrizione_var1
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 20
   //         dimx = 130
   //         dimy = 25
   //      }
   //   }
   //
   //   Image ImPia
   //   {
   //      Caption = $DLG_descrizione_var1
   //      Value   = $DLG_image_file1
   //      Hint    = $DLG_descrizione_var1
   //
   //      Placement
   //      {
   //         posx =  35
   //         posy =  40
   //         dimx =  80
   //         dimy =  80
   //      }
   //   }
   //}

   //Frame TestaSx
   //{
   //   Caption = MSG(1383)
   //
   //   Placement
   //   {
   //      posx = 165
   //      posy = 10
   //      dimx = 110
   //      dimy = 285
   //   }
   //
   //   Radio RdTstApertaSx
   //   {
   //      Caption = MSG(1387)
   //      Hint    = MSG(1387)
   //      Value   = $DLG_value_radio_tstaperta_sx
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 25
   //         dimx = 120
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_value_radio_tstaperta_sx = 1
   //         $DLG_value_radio_tstchiusa_sx = 0
   //         $DLG_testa_sx = 1
   //         $DLG_enable_vetrino_sx = 1
   //      ]
   //   }
   //
   //   Radio RdTstChiusaSx
   //   {
   //      Caption = MSG(1388)
   //      Hint    = MSG(1388)
   //      Value   = $DLG_value_radio_tstchiusa_sx
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 45
   //         dimx = 120
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_value_radio_tstaperta_sx = 0
   //         $DLG_value_radio_tstchiusa_sx = 1
   //         $DLG_testa_sx = 0
   //
   //         // disabilito il vetrino
   //         $DLG_vetrino_sx = 0
   //         $DLG_enable_vetrino_sx = 0
   //
   //         // se  chiuso pulisco
   //         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
   //         {
   //            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_2,"=",APICI(),$VALORE_NULLO,APICI()))
   //
   //            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
   //            $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
   //            $DLG_image_file2 = ""
   //         }
   //      ]
   //   }
   //
   //   Check chkVetrinoSx
   //   {
   //      Caption = MSG(1389)
   //      Hint    = MSG(1389)
   //      Enable  = $DLG_enable_vetrino_sx
   //      Value   = $DLG_vetrino_sx
   //
   //      Placement
   //      {
   //         posx =  10
   //         posy = 100
   //         dimx = 130
   //         dimy =  20
   //      }
   //
   //      OnClick
   //      [
   //         if( $DLG_vetrino_sx==1 )  { $DLG_vetrino_sx = 1 }
   //         else                      { $DLG_vetrino_sx = 0 }
   //
   //         // rinfresco la grafica della finestra
   //         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
   //         {
   //            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
   //
   //            if( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 & $DLG_vetrino_sx==1 & $DLG_testa_sx==1 )  { $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2) }
   //
   //            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
   //            GOSUB Get_Image_Lucido
   //            $DLG_image_file2 = $DLG_image_file
   //
   //            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
   //            $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
   //         }
   //      ]
   //   }
   //
   //   Label LabFinVtr
   //   {
   //      Caption = $DLG_descrizione_var2
   //      Value   = $DLG_descrizione_var2
   //      Hint    = $DLG_descrizione_var2
   //      Enable  = $DLG_vetrino_sx
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 155
   //         dimx = 110
   //         dimy = 25
   //      }
   //   }
   //
   //   Image ImVetrinoSx
   //   {
   //      Caption = $DLG_descrizione_var2
   //      Value   = $DLG_image_file2
   //      Hint    = $DLG_descrizione_var2
   //      Enable  = $DLG_vetrino_sx
   //
   //      Placement
   //      {
   //         posx =  15
   //         posy =  175
   //         dimx =  80
   //         dimy =  80
   //      }
   //   }
   //}
   //
   //Frame TestaDx
   //{
   //   Caption = MSG(1384)
   //
   //   Placement
   //   {
   //      posx = 280
   //      posy = 10
   //      dimx = 110
   //      dimy = 285
   //   }
   //
   //   Radio RdTstApertaDx
   //   {
   //      Caption = MSG(1387)
   //      Hint    = MSG(1387)
   //      Value   = $DLG_value_radio_tstaperta_dx
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 25
   //         dimx = 120
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_value_radio_tstaperta_dx = 1
   //         $DLG_value_radio_tstchiusa_dx = 0
   //         $DLG_testa_dx = 1
   //         $DLG_enable_vetrino_dx = 1
   //      ]
   //   }
   //
   //   Radio RdTstChiusaDx
   //   {
   //      Caption = MSG(1388)
   //      Hint    = MSG(1388)
   //      Value   = $DLG_value_radio_tstchiusa_dx
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 45
   //         dimx = 120
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_value_radio_tstaperta_dx = 0
   //         $DLG_value_radio_tstchiusa_dx = 1
   //         $DLG_testa_dx = 0
   //
   //         // disabilito il vetrino
   //         $DLG_vetrino_dx = 0
   //         $DLG_enable_vetrino_dx = 0
   //
   //         // se  chiuso pulisco
   //         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
   //         {
   //            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_3,"=",APICI(),$VALORE_NULLO,APICI()))
   //
   //            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
   //            $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
   //            $DLG_image_file3 = ""
   //         }
   //      ]
   //   }
   //
   //   Check chkVetrinoDx
   //   {
   //      Caption = MSG(1389)
   //      Hint    = MSG(1389)
   //      Enable  = $DLG_enable_vetrino_dx
   //      Value   = $DLG_vetrino_dx
   //
   //      Placement
   //      {
   //         posx =  10
   //         posy = 100
   //         dimx = 130
   //         dimy =  20
   //      }
   //
   //      OnClick
   //      [
   //         if( $DLG_vetrino_dx==1 )  { $DLG_vetrino_dx = 1 }
   //         else                      { $DLG_vetrino_dx = 0 }
   //
   //         // rinfresco la grafica della finestra
   //         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
   //         {
   //            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
   //
   //            if( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 & $DLG_vetrino_dx==1 & $DLG_testa_dx==1 )  { $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3) }
   //
   //            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
   //            GOSUB Get_Image_Lucido
   //            $DLG_image_file3 = $DLG_image_file
   //
   //            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
   //            $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
   //         }
   //      ]
   //   }
   //
   //   Label LabFinVtr
   //   {
   //      Caption = $DLG_descrizione_var3
   //      Value   = $DLG_descrizione_var3
   //      Hint    = $DLG_descrizione_var3
   //      Enable  = $DLG_vetrino_dx
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 155
   //         dimx = 110
   //         dimy = 25
   //      }
   //   }
   //
   //   Image ImVetrinoDx
   //   {
   //      Caption = $DLG_descrizione_var3
   //      Value   = $DLG_image_file3
   //      Hint    = $DLG_descrizione_var3
   //      Enable  = $DLG_vetrino_dx
   //
   //      Placement
   //      {
   //         posx =  15
   //         posy =  175
   //         dimx =  80
   //         dimy =  80
   //      }
   //   }
   //}

   //Button btnFinTop
   //{
   //   Caption = MSG(619)
   //   Result  = 0
   //   Hint = MSG(620)
   //
   //   Placement
   //   {
   //      posx =  25
   //      posy = 300
   //      dimx = 110
   //      dimy =  20
   //   }
   //
   //   OnClick
   //   [
   //      if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1)==1 )
   //      {
   //         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
   //
   //         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_1)
   //         $DLG_descrizione_var1 = UPPER($DLG_descrizione_var1)
   //
   //         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
   //         GOSUB Get_Image_Opaco
   //         $DLG_image_file1 = $DLG_image_file
   //      }
   //   ]
   //}

   //Button btnFinVetSx
   //{
   //   Caption = MSG(619)
   //   Result  = 0
   //   Hint    = MSG(1385)
   //   Enable = $DLG_vetrino_sx
   //
   //   Placement
   //   {
   //      posx = 170
   //      posy = 270
   //      dimx = 100
   //      dimy =  20
   //   }
   //
   //   OnClick
   //   [
   //      if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
   //      {
   //         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2)
   //
   //         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
   //         $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
   //
   //         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
   //         GOSUB Get_Image_Lucido
   //         $DLG_image_file2 = $DLG_image_file
   //      }
   //   ]
   //}

   //Button btnFinVetDx
   //{
   //   Caption = MSG(619)
   //   Result  = 0
   //   Hint    = MSG(1386)
   //   Enable = $DLG_vetrino_dx
   //
   //   Placement
   //   {
   //      posx = 280
   //      posy = 270
   //      dimx = 100
   //      dimy =  20
   //   }
   //
   //   OnClick
   //   [
   //      if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
   //      {
   //         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3)
   //
   //         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
   //         $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
   //
   //         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
   //         GOSUB Get_Image_Lucido
   //         $DLG_image_file3 = $DLG_image_file
   //      }
   //   ]
   //}

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza     = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)

            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            // disabilito l'offset perch viene calcolato in automatico
            if( ABS($DLG_posizione)==2 )
            {
               // Fabrizio 25/02/14
               // $DLG_enable_offset=0
               // VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
               // // l'offset   il top wild  se il top sotto  maggiore del top wild
               // if( VAR_VAL($DLG_idx_to_call,"X_TopSotto") > $DLG_larghezza )
               // {
               //    VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
               // }

            ///// Fabrizio 25/02/14 - comanda DLG_offset_lat
            ///VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
            ///
            ///// l'offset   il top wild  se il top sotto  maggiore del top wild
            ///if( VAR_VAL($DLG_idx_to_call,"X_TopSotto") > $DLG_larghezza )
            ///{
            ///   //VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            ///   VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            ///}
            ///
               // TEST
               VAR_CREATE_NUM(-1,"DLG_offset",$DLG_larghezza,0,"")
            }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(623)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_profondita")
         $DLG_hint_profondita    = STRCAT(MSG(430),"=",STR($DLG_profondita))
         $DLG_caption_profondita = STR($DLG_profondita)
         $DLG_value_profondita   = STR($DLG_profondita)

         // Modifico il menu della larghezza in base alla profondita
         if( $DLG_profondita<=920 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild1(736-2944)" )
         }

         if( $DLG_profondita>920 & $DLG_profondita<=1250 )
         {
            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild2(736-2208)" )
            if( $DLG_larghezza>2208 ) { $DLG_larghezza = 2208 }
         }
         // aggiorno i componenti di dialog per la larghezza
         $DLG_hint_larghezza    = STRCAT(MSG(439),"=",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1382)

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_posizione")==1 )
         {
            $R = CHIEDI(-1,"DLG_posizione")

            // ------------------------------------------------
            // Fabrizio 02/10/12: aggiorno le variabili per la dialog
            // ------------------------------------------------
            $DLG_caption_posizione = MSG(1376)
            if( $DLG_posizione==-1 )   { $DLG_caption_posizione = MSG(1377) }
            if( $DLG_posizione== 1 )   { $DLG_caption_posizione = MSG(1378) }
            if( $DLG_posizione==-90 )  { $DLG_caption_posizione = MSG(1379) }
            if( $DLG_posizione== 90 )  { $DLG_caption_posizione = MSG(1380) }
            // Fabrizio dal 30/11/12 - connessioni sopra filo sx/dx
            if( $DLG_posizione==-2 )   { $DLG_caption_posizione = MSG(1391) }
            if( $DLG_posizione== 2 )   { $DLG_caption_posizione = MSG(1392) }
            $DLG_hint_posizione  = STRCAT(MSG(414),"=",$DLG_caption_posizione)
            $DLG_value_posizione = $DLG_caption_posizione
            // ------------------------------------------------


            // ------------------------------------------------
            // attivo entrambe le teste (DX/SX)
            // come in Radio RdTstAperta
            // ------------------------------------------------
            $DLG_teste_aperte = 2

            // se sono posizionato a sx la testa dx  chiusa
            if( $DLG_posizione==-1 )  { $DLG_teste_aperte = -1 }
            if( $DLG_posizione==-90 ) { $DLG_teste_aperte = -1 }

            // se sono posizionato a dx la testa dx  chiusa
            if( $DLG_posizione== 1 )  { $DLG_teste_aperte =  1 }
            if( $DLG_posizione== 90 ) { $DLG_teste_aperte =  1 }

            $DLG_var_to_call_2 = "GEST_DE"
            if( $DLG_teste_aperte==-1 )  { $DLG_var_to_call_2 = "GEST_DT"  }
            // ------------------------------------------------

            // ------------------------------------------------
            // Fabrizio 04/10/12: resetto anche l'offset e riassegno il menu
            // ------------------------------------------------
            $DLG_enable_offset = 1
            if( $DLG_posizione== -1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==  1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
            if( $DLG_posizione==-90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }
            if( $DLG_posizione== 90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)

            VAR_SET_MODE(-1,"DLG_offset_lat",0)

            // Fabrizio 25/02/14
            if( ABS($DLG_posizione)==2 )
            {
               VAR_SET_MODE(-1,"DLG_offset",0)

               if( $DLG_posizione==-2 )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset_lat",VAR_VAL($DLG_idx_to_call,"VAR_offset_sx"),$DLG_enable_offset,STRCAT("(",STR(-VAR_VAL($DLG_idx_to_call,"X_TopSotto")+184),"-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")"))
               }

               if( $DLG_posizione== 2 )
               {
                  VAR_CREATE_NUM(-1,"DLG_offset_lat",VAR_VAL($DLG_idx_to_call,"VAR_offset_dx"),$DLG_enable_offset,STRCAT("(",STR(-VAR_VAL($DLG_idx_to_call,"X_TopSotto")+184),"-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")"))
               }

               $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset_lat))
               $DLG_caption_offset = STR($DLG_offset_lat)
               $DLG_value_offset   = STR($DLG_offset_lat)
            }

            // ------------------------------------------------

            //DISPLAY("$DLG_offset=",$DLG_offset)
         }
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         // Fabrizio 25/02/14
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            if( ABS($DLG_posizione)!=2 )
            {
               $R = CHIEDI(-1,"DLG_offset")
               $DLG_hint_offset    = STRCAT(MSG(1381)," = ",STR($DLG_offset))
               $DLG_caption_offset = STR($DLG_offset)
               $DLG_value_offset   = STR($DLG_offset)
            }
            else
            {
               $R = CHIEDI(-1,"DLG_offset_lat")
               $DLG_hint_offset    = STRCAT(MSG(1381)," = ",STR($DLG_offset_lat))
               $DLG_caption_offset = STR($DLG_offset_lat)
               $DLG_value_offset   = STR($DLG_offset_lat)
            }
         }
      ]
   }

   Button btnAllinea
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1323)

      Placement
      {
         posx = 135
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_allinea")==1 )
         {
            $R = CHIEDI(-1,"DLG_allinea")

            $DLG_value_allinea   = MSG(649)
            if( $DLG_allinea==-1 )  { $DLG_value_allinea = MSG(648) }
            $DLG_hint_allinea    = STRCAT(MSG(1328),"=",$DLG_value_allinea)
         }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 10
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 180
         dimx = 100
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

//Dlg AirTopWild_TEMP
//{
//   Caption = MSG(1374)
//
//   Placement
//   {
//      posx = 150
//      posy = 150
//      dimx = 400
//      dimy = 370
//      save_pos = 1
//   }
//
//   Frame FrmMisure
//   {
//      Caption = MSG(601)
//
//      Placement
//      {
//         posx = 5
//         posy = 10
//         dimx = 155
//         dimy = 135
//      }
//
//      Edit EdtLarghezza
//      {
//         Caption = $DLG_caption_larghezza
//         Hint    = $DLG_hint_larghezza
//         Value   = $DLG_value_larghezza
//
//         Placement
//         {
//            posx = 65
//            posy = 25
//            dimx = 60
//            dimy = 20
//         }
//
//         OnClick
//         [
//         ]
//      }
//
//      Edit EdtProfondita
//      {
//         Caption = $DLG_caption_profondita
//         Hint    = $DLG_hint_profondita
//         Value   = $DLG_value_profondita
//
//         Placement
//         {
//            posx = 65
//            posy = 50
//            dimx = 60
//            dimy = 20
//         }
//
//         OnClick
//         [
//         ]
//      }
//
//      Edit EdtPosizione
//      {
//         Caption = $DLG_caption_posizione
//         Hint    = $DLG_hint_posizione
//         Value   = $DLG_value_posizione
//
//         Placement
//         {
//            posx = 65
//            posy = 75
//            dimx = 60
//            dimy = 20
//         }
//
//         OnClick
//         [
//         ]
//      }
//
//      Edit EdtOffset
//      {
//         Caption = $DLG_caption_offset
//         Hint    = $DLG_hint_offset
//         Value   = $DLG_value_offset
//         Enable  = $DLG_enable_offset
//
//         Placement
//         {
//            posx = 65
//            posy = 100
//            dimx = 60
//            dimy = 20
//         }
//
//         OnClick
//         [
//         ]
//      }
//
//      Label LblLarghezza
//      {
//         Caption = MSG(624)
//         Hint    = $DLG_hint_larghezza
//         Value   = $DLG_value_larghezza
//
//         Placement
//         {
//            posx = 5
//            posy = 30
//            dimx = 80
//            dimy = 20
//         }
//
//      }
//
//      Label LblProfondita
//      {
//         Caption = MSG(626)
//         Hint    = $DLG_hint_profondita
//         Value   = $DLG_value_profondita
//
//         Placement
//         {
//            posx = 5
//            posy = 55
//            dimx = 80
//            dimy = 20
//         }
//      }
//
//      Label LblPosizione
//      {
//         Caption = MSG(433)
//         Hint    = $DLG_hint_posizione
//         Value   = $DLG_value_posizione
//
//
//         Placement
//         {
//            posx = 5
//            posy = 80
//            dimx = 80
//            dimy = 20
//         }
//      }
//
//      Label LblOffset
//      {
//         Caption = MSG(657)
//         Hint    = $DLG_hint_offset
//         Value   = $DLG_value_offset
//         Enable  = $DLG_enable_offset
//
//         Placement
//         {
//            posx = 5
//            posy = 105
//            dimx = 80
//            dimy = 20
//         }
//      }
//   }
//
//   Frame Finitura_Top
//   {
//      Caption = MSG(251)
//
//      Placement
//      {
//         posx =  5
//         posy = 145
//         dimx = 155
//         dimy = 150
//      }
//
//      Label LabFinPia
//      {
//         Caption = $DLG_descrizione_var1
//         Value   = $DLG_descrizione_var1
//         Hint    = $DLG_descrizione_var1
//
//         Placement
//         {
//            posx = 10
//            posy = 20
//            dimx = 130
//            dimy = 25
//         }
//      }
//
//      Image ImPia
//      {
//         Caption = $DLG_descrizione_var1
//         Value   = $DLG_image_file1
//         Hint    = $DLG_descrizione_var1
//
//         Placement
//         {
//            posx =  35
//            posy =  40
//            dimx =  80
//            dimy =  80
//         }
//      }
//   }
//
//   Frame FrmGestioneTeste
//   {
//      Caption = MSG(1375)
//
//      Placement
//      {
//         posx = 165
//         posy = 10
//         dimx = 225
//         dimy = 135
//      }
//
//      Radio RdTstApertaSx
//      {
//         Caption = MSG(1387)
//         Hint    = MSG(1387)
//         Value   = $DLG_value_radio_tstaperta_sx
//
//         Placement
//         {
//            posx = 10
//            posy = 25
//            dimx = 120
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_value_radio_tstaperta_sx = 1
//            $DLG_value_radio_tstchiusa_sx = 0
//            $DLG_testa_dx = 1
//         ]
//      }
//
//      Radio RdTstChiusaSx
//      {
//         Caption = MSG(1388)
//         Hint    = MSG(1388)
//         Value   = $DLG_value_radio_tstchiusa_sx
//
//         Placement
//         {
//            posx = 10
//            posy = 45
//            dimx = 120
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_value_radio_tstaperta_sx = 0
//            $DLG_value_radio_tstchiusa_sx = 1
//            $DLG_testa_sx = 0
//
//            // se  chiusa anche la dx disabilito
//            if( $DLG_testa_dx==0 )
//            {
//               $DLG_vetrino  = 0
//               $DLG_enable_vetrino  = 0
//            }
//
//            // se  chiuso pulisco
//            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
//            {
//               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_2,"=",APICI(),$VALORE_NULLO,APICI()))
//
//               $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
//               $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
//               $DLG_image_file2 = ""
//            }
//         ]
//      }
//
//      Bevel Bvl1
//      {
//        Placement
//        {
//           posx = 112
//           posy = 20
//           dimx = 2
//           dimy = 50
//        }
//      }
//
//      Radio RdTstApertaDx
//      {
//         Caption = MSG(1389)
//         Hint    = MSG(1389)
//         Value   = $DLG_value_radio_tstaperta_dx
//
//         Placement
//         {
//            posx = 120
//            posy = 25
//            dimx = 120
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_value_radio_tstaperta_dx = 1
//            $DLG_value_radio_tstchiusa_dx = 0
//            $DLG_testa_dx = 1
//         ]
//      }
//
//      Radio RdTstChiusaDx
//      {
//         Caption = MSG(1390)
//         Hint    = MSG(1390)
//         Value   = $DLG_value_radio_tstchiusa_dx
//
//         Placement
//         {
//            posx = 120
//            posy = 45
//            dimx = 120
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_value_radio_tstaperta_dx = 0
//            $DLG_value_radio_tstchiusa_dx = 1
//            $DLG_testa_dx = 0
//
//            // se  chiusa anche la sx disabilito
//            if( $DLG_testa_sx==0 )
//            {
//               $DLG_vetrino  = 0
//               $DLG_enable_vetrino  = 0
//            }
//
//            // se  chiuso pulisco
//            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
//            {
//               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_3,"=",APICI(),$VALORE_NULLO,APICI()))
//
//               $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
//               $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
//               $DLG_image_file3 = ""
//            }
//
//         ]
//      }
//
//      Check chkVetrino
//      {
//         Caption = MSG(1366)
//         Hint    = MSG(1366)
//         Enable  = $DLG_enable_vetrino
//         Value   = $DLG_vetrino
//
//         Placement
//         {
//            posx =  75
//            posy = 100
//            dimx = 130
//            dimy =  20
//         }
//
//         OnClick
//         [
//            if( $DLG_vetrino==1 )  { $DLG_vetrino = 1 }
//            else                   { $DLG_vetrino = 0 }
//
//            // rinfresco la grafica della finestra
//            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
//            {
//               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
//
//               if( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 & $DLG_vetrino==1 & $DLG_value_radio_tstaperta_sx==1 )  { $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2) }
//
//               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
//               GOSUB Get_Image_Lucido
//               $DLG_image_file2 = $DLG_image_file
//
//               $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
//               $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
//            }
//
//            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
//            {
//               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
//
//               if( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 & $DLG_vetrino==1 & $DLG_value_radio_tstaperta_dx==1 )  { $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3) }
//
//               $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
//               GOSUB Get_Image_Lucido
//               $DLG_image_file3 = $DLG_image_file
//
//               $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
//               $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
//            }
//         ]
//      }
//   }
//
//   Frame VetrinoSx
//   {
//      Caption = MSG(1383)
//      Enable  = $DLG_vetrino
//
//      Placement
//      {
//         posx = 165
//         posy = 145
//         dimx = 110
//         dimy = 120
//      }
//
//      Label LabFinVtr
//      {
//         Caption = $DLG_descrizione_var2
//         Value   = $DLG_descrizione_var2
//         Hint    = $DLG_descrizione_var2
//         Enable  = $DLG_vetrino
//
//         Placement
//         {
//            posx = 10
//            posy = 20
//            dimx = 110
//            dimy = 25
//         }
//      }
//
//      Image ImVetrino
//      {
//         Caption = $DLG_descrizione_var2
//         Value   = $DLG_image_file2
//         Hint    = $DLG_descrizione_var2
//         Enable  = $DLG_vetrino
//
//         Placement
//         {
//            posx =  15
//            posy =  40
//            dimx =  80
//            dimy =  80
//         }
//      }
//   }
//
//   Frame VetrinoDx
//   {
//      Caption = MSG(1384)
//      Enable  = $DLG_vetrino
//
//      Placement
//      {
//         posx = 280
//         posy = 145
//         dimx = 110
//         dimy = 120
//      }
//
//
//      Label LabFinVtr
//      {
//         Caption = $DLG_descrizione_var3
//         Value   = $DLG_descrizione_var3
//         Hint    = $DLG_descrizione_var3
//         Enable  = $DLG_vetrino
//
//         Placement
//         {
//            posx = 10
//            posy = 20
//            dimx = 110
//            dimy = 25
//         }
//      }
//
//      Image ImVetrino
//      {
//         Caption = $DLG_descrizione_var3
//         Value   = $DLG_image_file3
//         Hint    = $DLG_descrizione_var3
//         Enable  = $DLG_vetrino
//
//         Placement
//         {
//            posx =  15
//            posy =  40
//            dimx =  80
//            dimy =  80
//         }
//      }
//   }
//
//   Button btnFinTop
//   {
//      Caption = MSG(619)
//      Result  = 0
//      Hint = MSG(620)
//
//      Placement
//      {
//         posx =  25
//         posy = 270
//         dimx = 110
//         dimy =  20
//      }
//
//      OnClick
//      [
//         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1)==1 )
//         {
//            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
//
//            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_1)
//            $DLG_descrizione_var1 = UPPER($DLG_descrizione_var1)
//
//            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
//            GOSUB Get_Image_Opaco
//            $DLG_image_file1 = $DLG_image_file
//         }
//      ]
//   }
//
//   Button btnFinVetSx
//   {
//      Caption = MSG(619)
//      Result  = 0
//      Hint    = MSG(1385)
//      Enable = $DLG_vetrino*$DLG_testa_sx
//
//      Placement
//      {
//         posx = 170
//         posy = 270
//         dimx = 100
//         dimy =  20
//      }
//
//      OnClick
//      [
//         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_2)==1 )
//         {
//            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_2)
//
//            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_2)
//            $DLG_descrizione_var2 = UPPER($DLG_descrizione_var2)
//
//            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
//            GOSUB Get_Image_Lucido
//            $DLG_image_file2 = $DLG_image_file
//         }
//      ]
//   }
//
//   Button btnFinVetDx
//   {
//      Caption = MSG(619)
//      Result  = 0
//      Hint    = MSG(1386)
//      Enable = $DLG_vetrino*$DLG_testa_dx
//
//      Placement
//      {
//         posx = 285
//         posy = 270
//         dimx = 100
//         dimy =  20
//      }
//
//      OnClick
//      [
//         if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_3)==1 )
//         {
//            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_3)
//
//            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call_3)
//            $DLG_descrizione_var3 = UPPER($DLG_descrizione_var3)
//
//            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_3)
//            GOSUB Get_Image_Lucido
//            $DLG_image_file3 = $DLG_image_file
//         }
//      ]
//   }
//
//   Button btnLarghezza
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = MSG(622)
//
//      Placement
//      {
//         posx = 135
//         posy = 35
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//         $R = CHIEDI(-1,"DLG_larghezza")
//         $DLG_hint_larghezza     = STRCAT(MSG(439),"=",STR($DLG_larghezza))
//         $DLG_caption_larghezza = STR($DLG_larghezza)
//         $DLG_value_larghezza   = STR($DLG_larghezza)
//      ]
//   }
//
//   Button btnProfondita
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = MSG(623)
//
//      Placement
//      {
//         posx = 135
//         posy = 60
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//         $R = CHIEDI(-1,"DLG_profondita")
//         $DLG_hint_profondita    = STRCAT(MSG(430),"=",STR($DLG_profondita))
//         $DLG_caption_profondita = STR($DLG_profondita)
//         $DLG_value_profondita   = STR($DLG_profondita)
//
//         // Modifico il menu della larghezza in base alla profondita
//         if( $DLG_profondita<=920 )
//         {
//            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild1(736-2944)" )
//         }
//
//         if( $DLG_profondita>920 & $DLG_profondita<=1250 )
//         {
//            VAR_SET_MENU (-1,"DLG_larghezza","XTopWild2(736-2208)" )
//            if( $DLG_larghezza>2208 ) { $DLG_larghezza = 2208 }
//         }
//         // aggiorno i componenti di dialog per la larghezza
//         $DLG_hint_larghezza    = STRCAT(MSG(439),"=",STR($DLG_larghezza))
//         $DLG_caption_larghezza = STR($DLG_larghezza)
//         $DLG_value_larghezza   = STR($DLG_larghezza)
//      ]
//   }
//
//   Button btnPosizione
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = MSG(1382)
//
//      Placement
//      {
//         posx = 135
//         posy = 85
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//         if( VAR_EXIST(-1,"DLG_posizione")==1 )
//         {
//            $R = CHIEDI(-1,"DLG_posizione")
//
//            // ------------------------------------------------
//            // Fabrizio 02/10/12: aggiorno le variabili per la dialog
//            // ------------------------------------------------
//            $DLG_caption_posizione = MSG(1376)
//            if( $DLG_posizione==-1 )   { $DLG_caption_posizione = MSG(1377) }
//            if( $DLG_posizione== 1 )   { $DLG_caption_posizione = MSG(1378) }
//            if( $DLG_posizione==-90 )  { $DLG_caption_posizione = MSG(1379) }
//            if( $DLG_posizione== 90 )  { $DLG_caption_posizione = MSG(1380) }
//            $DLG_hint_posizione  = STRCAT(MSG(414),"=",$DLG_caption_posizione)
//            $DLG_value_posizione = $DLG_caption_posizione
//            // ------------------------------------------------
//
//
//            // ------------------------------------------------
//            // attivo entrambe le teste (DX/SX)
//            // come in Radio RdTstAperta
//            // ------------------------------------------------
//            $DLG_teste_aperte = 2
//
//            // se sono posizionato a sx la testa dx  chiusa
//            if( $DLG_posizione==-1 )  { $DLG_teste_aperte = -1 }
//            if( $DLG_posizione==-90 ) { $DLG_teste_aperte = -1 }
//
//            // se sono posizionato a dx la testa dx  chiusa
//            if( $DLG_posizione== 1 )  { $DLG_teste_aperte =  1 }
//            if( $DLG_posizione== 90 ) { $DLG_teste_aperte =  1 }
//
//            $DLG_var_to_call_2 = "GEST_DE"
//            if( $DLG_teste_aperte==-1 )  { $DLG_var_to_call_2 = "GEST_DT"  }
//            // ------------------------------------------------
//
//            // ------------------------------------------------
//            // Fabrizio 04/10/12: resetto anche l'offset e riassegno il menu
//            // ------------------------------------------------
//            $DLG_enable_offset = 1
//            if( $DLG_posizione== -1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
//            if( $DLG_posizione==  1 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X")-368),")")) }
//            if( $DLG_posizione==-90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }
//            if( $DLG_posizione== 90 ) { VAR_CREATE_NUM(-1,"DLG_offset",184,1,STRCAT("(184-",STR(VAR_VAL($DLG_idx_to_call,"X_TopSotto")-184),")")) }
//
//            // caso del posizionamento sopra
//            if( $DLG_posizione==0 )
//            {
//               $DLG_enable_offset = 0
//               VAR_CREATE_NUM(-1,"DLG_offset",0,0,"")
//
//               // al momento "blocco" la larghezza in base al top vetro
//               VAR_CREATE_NUM(-1,"DLG_larghezza",VAR_VAL($DLG_idx_to_call,"X_TopSotto"),0,"")
//               $DLG_hint_larghezz     = STRCAT(MSG(439),"=",STR($DLG_larghezza))
//               $DLG_caption_larghezza = STR($DLG_larghezza)
//               $DLG_value_larghezza   = STR($DLG_larghezza)
//            }
//
//            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
//            $DLG_caption_offset = STR($DLG_offset)
//            $DLG_value_offset   = STR($DLG_offset)
//            // ------------------------------------------------
//         }
//      ]
//   }
//
//   Button btnOffset
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = MSG(658)
//
//      Placement
//      {
//         posx = 135
//         posy = 110
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//         if( VAR_EXIST(-1,"DLG_offset")==1 )
//         {
//            $R = CHIEDI(-1,"DLG_offset")
//
//            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
//            $DLG_caption_offset = STR($DLG_offset)
//            $DLG_value_offset   = STR($DLG_offset)
//         }
//      ]
//   }
//
//   Button btnAnnulla
//   {
//      Caption = MSG(615)
//      Result  = 2
//      Hint = MSG(616)
//
//      Placement
//      {
//         posx = 250
//         posy = 310
//         dimx = 80
//         dimy = 30
//      }
//
//      OnClick
//      [
//         $OK=0
//      ]
//   }
//
//   Button btnOK
//   {
//      Caption = MSG(617)
//      Result  = 1
//      Default = 1
//      Hint = MSG(618)
//
//      Placement
//      {
//         posx = 145
//         posy = 310
//         dimx = 100
//         dimy =  30
//      }
//
//      OnClick
//      [
//         $OK=1
//      ]
//   }
//}

Dlg AIR_Panchetta
{
   Caption = MSG(1349)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 120
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Check chkElimina
   {
     Caption = MSG(1350)
     Hint    = MSG(1351)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 20
        posy = 15
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(1352))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 50
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 50
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

//***************************************************
// Fabrizio dal 17/11/10
//***************************************************
Dlg AIR_Seduta
{
   Caption = MSG(600)

   Placement
   {
      posx = 150
      posy = 150
//      dimx = 675
      dimx = 685
//      dimy = 300
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza
        Enable  = $DLG_enable_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(625)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(627)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

      Radio RdSeduta
      {
        Caption = MSG(1353)
        Hint    = MSG(1353)
        Value   = $DLG_penisola_rd1

        Placement
        {
           posx = 10
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_penisola_rd1   = 1
           $DLG_penisola_rd2   = 0
           $DLG_Metallo_enable = 0

           // ------------------------------------------------------------------
           // Fabrizio 10/10/11 - abilito la possibilit di cambiare la larghezza
           // ------------------------------------------------------------------
           $DLG_enable_larghezza = 1
           VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre")
           // resetto il tipo di posizionamento nel caso io cambio da penisola a seduta
           // Di defualt lo metto a filo-retro
           if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")==0 )
           {
              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_posizione_fr_re=1"))
              $DLG_caption_posizione_fr_re = MSG(649)
              $DLG_value_posizione_fr_re   = $DLG_caption_posizione_fr_re
           }
           // ------------------------------------------------------------------

           // ----------------------------------------------------------------------
           // Fabrizio 03/03/11
           // Non serve perch la seduta "comprende" tutte le misure della penisola
           // per cui se cambio il valore sicuramente  sempre valido
           // per cui lascio il precedente (il default d per scontato che sia corretto)
           // ----------------------------------------------------------------------
           VAR_CREATE_NUM(-1,"DLG_larghezza",ATOI($DLG_value_larghezza),2,"XSedAir")
           // ----------------------------------------------------------------------

           // anche nel bottone profondit
           if( $DLG_telaio_z>0 )
           {
              $DLG_menu_temp   = "ZSedAir"
              $DLG_misura_temp = $DLG_telaio_z
              if( $DLG_telaio_z==598 )   { $DLG_menu_temp = "ZSed598"  }
              if( $DLG_telaio_z==644 )   { $DLG_menu_temp = "ZSed644"  }
              if( $DLG_telaio_z==736 )   { $DLG_menu_temp = "ZSed736"  }
              if( $DLG_telaio_z==920 )   { $DLG_menu_temp = "ZSed920"  }
              if( $DLG_telaio_z==1104 )  { $DLG_menu_temp = "ZSed1104" }

              VAR_CREATE_NUM(-1,"DLG_profondita",$DLG_misura_temp,2,$DLG_menu_temp)
           }
           else
           {
              VAR_CREATE_NUM(-1,"DLG_profondita",598,2,"ZSedAir")
           }

           $DLG_hint_larghezza    = STRCAT(MSG(624),STR($DLG_larghezza))
           $DLG_caption_larghezza = STR($DLG_larghezza)
           $DLG_value_larghezza   = STR($DLG_larghezza)

           $DLG_hint_profondita    = STRCAT(MSG(626),STR($DLG_profondita))
           $DLG_caption_profondita = STR($DLG_profondita)
           $DLG_value_profondita   = STR($DLG_profondita)
        ]

      }

      Radio RdPenisola
      {
        Caption = MSG(1354)
        Hint    = MSG(1354)
        Value   = $DLG_penisola_rd2

        Placement
        {
           posx = 10
           posy = 105
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_penisola_rd1   = 0
           $DLG_penisola_rd2   = 1
           $DLG_Metallo_enable = 1

           // Fabrizio 10/10/11 - abilito la possibilit di cambiare la larghezza
           $DLG_enable_larghezza = 1
           if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")==0 )  { $DLG_enable_larghezza = 0 }

           //assegno il default solo se diverso dai valori possibili
           if( $DLG_larghezza!=736 & $DLG_larghezza!=920 & $DLG_larghezza!=1104 )
           {
              VAR_CREATE_NUM(-1,"DLG_larghezza",736,2,"XPenAir")
           }

           if( $DLG_telaio_z>0 )
           {
              $DLG_menu_temp = "ZPen920"
              $DLG_misura_temp = 920

              if( $DLG_telaio_z==736 )   {  $DLG_menu_temp = "ZPen1104"  $DLG_misura_temp=1104 }
              if( $DLG_telaio_z==920 )   {  $DLG_menu_temp = "ZPen1288"  $DLG_misura_temp=1288 }
              if( $DLG_telaio_z==1104 )  {  $DLG_menu_temp = "ZPen1472"  $DLG_misura_temp=1472 }

              VAR_CREATE_NUM(-1,"DLG_profondita",$DLG_misura_temp,2,$DLG_menu_temp)
           }
           else
           {
              VAR_CREATE_NUM(-1,"DLG_profondita",920,2,"ZPenAir")
           }

           // ----------------------------------------------------------------------
           // Fabrizio 10/10/11 - abilito la possibilit di cambiare la posizione
           // e di inserire l'elemento retro
           // ----------------------------------------------------------------------
           VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre")

           if(  VAR_EXIST($DLG_idx_to_call,"SEDUTA_N")==1
               & VAR_EXIST($DLG_idx_to_call,"SEDUTE_TOT")==1
               & VAR_EXIST($DLG_idx_to_call,"SEDUTA_L_MAX")==1
             )
           {
              // Fabrizio 18/10/11  - temp debug
              // DISPLAY2(STRCAT("SEDUTA_L_MAX=",STR(VAR_VAL($DLG_idx_to_call,"SEDUTA_L_MAX")),"\n$DLG_profondita=",STR($DLG_profondita),"\nSEDUTE_TOT=",STR(VAR_VAL($DLG_idx_to_call,"SEDUTE_TOT")),"\nSEDUTA_N=",STR(VAR_VAL($DLG_idx_to_call,"SEDUTA_N"))))

              // Fabrizio 18/10/111 - divido per comodit le condizioni
              //if( VAR_VAL($DLG_idx_to_call,"SEDUTE_TOT")>1 & $DLG_larghezza==$DLG_telaio_z )
              if( $DLG_larghezza==$DLG_telaio_z )
              {
                // caso della prima penisola a sx
                if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==1 )
                {
                   //setto la possibilit di rotazione laterale
                   VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre2")
                }

                // Fabrizio 18/10/111
                // caso dell'ultima penisola a dx (Fabrizio 18/10/11, ho aggiunto la condizione che la profondit della penisola sia maggiore
                // della misura disponibile del telaio, altrimenti succede il caso segnalato da Eugenio nella mail del 10/10/11
                if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==VAR_VAL($DLG_idx_to_call,"SEDUTE_TOT") & $DLG_profondita>VAR_VAL($DLG_idx_to_call,"SEDUTA_L_MAX"))
                {
                   //setto la possibilit di rotazione laterale
                   VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre2")
                }
              }
           }
           // ----------------------------------------------------------------------

           $DLG_hint_larghezza    = STRCAT(MSG(624),STR($DLG_larghezza))
           $DLG_caption_larghezza = STR($DLG_larghezza)
           $DLG_value_larghezza   = STR($DLG_larghezza)

           $DLG_hint_profondita    = STRCAT(MSG(626),STR($DLG_profondita))
           $DLG_caption_profondita = STR($DLG_profondita)
           $DLG_value_profondita   = STR($DLG_profondita)
        ]
      }

      Check chkMetallo
      {
        Caption = MSG(1355)
        Hint    = MSG(676)
        Enable  = $DLG_Metallo_enable
        Value   = $DLG_VAR_Metallo

        Placement
        {
           posx = 80
           posy = 90
           dimx = 70
           dimy = 50
        }

        OnClick
        [
           if( $DLG_VAR_Metallo == 1 )   {  $DLG_VAR_Metallo = 1  }
           else                          {  $DLG_VAR_Metallo = 0  }
        ]
      }

   }

   Frame FrmPosizionamento
   {
      Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 145
         dimx = 150
         dimy = 75
      }

      Edit EdtPosizione_fr_re
      {
         Caption = $DLG_caption_posizione_fr_re
         Hint    = $DLG_hint_posizione_fr_re
         Value   = $DLG_value_posizione_fr_re

         Placement
         {
            posx = 80
            posy = 15
            dimx = 40
            dimy = 20
         }
      }

      Label LblPosizione_fr_re
      {
         Caption = MSG(1323)
         Hint    = MSG(1356)
         Value   = MSG(1323)

         Placement
         {
            posx = 10
            posy = 20
            dimx = 80
            dimy = 20
         }
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset
        Enable  = $DLG_enable_offset

        Placement
        {
           posx = 80
           posy = 45
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)
        Enable  = $DLG_enable_offset

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }
   }

   // Eugenio 12.11.12 Spostata ignifugazione per far posto nuovo tessuto
   Frame FrmChk
   {
      //Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 225
         dimx = 150
         dimy = 30
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 10
           posy = 5
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 500
//         dimy = 210
//         dimy = 230
         dimy = 270
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_ignifugazione = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = MSG(655)
           $DLG_value_outdoor   = MSG(655)
           $DLG_hint_outdoor    = MSG(656)

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------

           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //$DLG_COLORE_AIR = "XXX"
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0
           // 20/02/2019 - Emanuele - Aggiungo controllo per abilitare l'ignifugazione per gli ordine per il Regno Unito
           if(VAR_EXIST(-1,"TST_Destinazione")==1)
           {
              if(IS_MATCH($TST_Destinazione,"UK*")==1)
              {
                 $DLG_ignifugazione_enable = 1
              }
           }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0
           // 20/02/2019 - Emanuele - Aggiungo controllo per abilitare l'ignifugazione per gli ordine per il Regno Unito
           if(VAR_EXIST(-1,"TST_Destinazione")==1)
           {
              if(IS_MATCH($TST_Destinazione,"UK*")==1)
              {
                 $DLG_ignifugazione_enable = 1
              }
           }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0
           // 20/02/2019 - Emanuele - Aggiungo controllo per abilitare l'ignifugazione per gli ordine per il Regno Unito
           if(VAR_EXIST(-1,"TST_Destinazione")==1)
           {
              if(IS_MATCH($TST_Destinazione,"UK*")==1)
              {
                 $DLG_ignifugazione_enable = 1
              }
           }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 29/10/2019 - Emanuele - Aggiungo radiobutton per la gestione dei tessuti Barkley/Axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0
           // 20/02/2019 - Emanuele - Aggiungo controllo per abilitare l'ignifugazione per gli ordine per il Regno Unito
           if(VAR_EXIST(-1,"TST_Destinazione")==1)
           {
              if(IS_MATCH($TST_Destinazione,"UK*")==1)
              {
                 $DLG_ignifugazione_enable = 1
              }
           }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0
           // 20/02/2019 - Emanuele - Aggiungo controllo per abilitare l'ignifugazione per gli ordine per il Regno Unito
           if(VAR_EXIST(-1,"TST_Destinazione")==1)
           {
              if(IS_MATCH($TST_Destinazione,"UK*")==1)
              {
                 $DLG_ignifugazione_enable = 1
              }
           }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }


      //Check chkOutdoor
      Label chkOutdoor
      {
        Caption = $DLG_caption_outdoor
        Hint    = $DLG_hint_outdoor
        Value   = $DLG_value_outdoor

        Font
        {
           size  = 12
           type  = 1
           color = 255
        }

        Placement
        {
           posx = 310
           posy = 185
           dimx = 130
           dimy = 20
        }
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy = 18
            dimx = 190
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 240
//         posy = 270
         posy = 280
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 240
//         posy = 270
         posy = 280
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)
      Enable = $DLG_enable_larghezza

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_larghezza")
         $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
         $DLG_caption_larghezza = STR($DLG_larghezza)
         $DLG_value_larghezza   = STR($DLG_larghezza)

         // ------------------------------------------------------
         // verifico di essere il primo elemento di SX
         // e di essere almento >= 1104
         // ------------------------------------------------------
         $DLG_enable_offset = 0
         if( VAR_EXIST($DLG_idx_to_call,"SEDUTA_N")==1 )
         {
            //if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==1 & $DLG_larghezza>=1104 )  { $DLG_enable_offset = 1 }
            //Massimiliano 22/07/16 - se si tratta della regola di listino a pagina 54  sbagliato come indicato sopra
            //                        cambio la regola determinando quanto sborda la penisola
            if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==1 )
            {
               if( ( VAR_VAL(VAR_VAL($DLG_idx_to_call,"idx_agg"),"X") + 184 ) <= $DLG_larghezza )  {  $DLG_enable_offset = 1  }
            }
         }

         // se  disabilitato l'offset devo resettare l'ventuale valore dell'offset
         if( $DLG_enable_offset==0 )
         {
            $DLG_offset = 0
            $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
            $DLG_caption_offset  = STR($DLG_offset)
            $DLG_value_offset    = STR($DLG_offset)
         }
         // ------------------------------------------------------

         // Fabrizio 31/10/11 - se sono penisola e modifico la larghezza affinch abbia
         // la stessa misura della profondit posso allora essere inserita di lato

         //setto la possibilit di rotazione normale
         VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre")

         if( $DLG_larghezza==$DLG_telaio_z & $DLG_penisola_rd1==0 & $DLG_penisola_rd2==1 )
         {
            // caso della prima penisola a sx
            //setto la possibilit di rotazione laterale
            if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==1 )
            {
               VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre2")
            }

            // caso dell'ultima penisola a dx (Fabrizio 08/11/11, ho aggiunto la condizione che la profondit della penisola sia maggiore
            // della misura disponibile del telaio, altrimenti succede il caso segnalato da Eugenio nella mail del 10/10/11
            if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==VAR_VAL($DLG_idx_to_call,"SEDUTE_TOT") & $DLG_profondita>VAR_VAL($DLG_idx_to_call,"SEDUTA_L_MAX"))
            {
               VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre2")
            }
         }
      ]
   }

   Button btnProfondita
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(623)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_profondita")

         // Fabrizio 18/10/111 - attivo la possibilit di inserimento laterale
         // della penisola se le condizioni si verificano (vedi controllo su radio penisola
         if(   VAR_EXIST($DLG_idx_to_call,"SEDUTA_N")==1
             & VAR_EXIST($DLG_idx_to_call,"SEDUTE_TOT")==1
             & VAR_EXIST($DLG_idx_to_call,"SEDUTA_L_MAX")==1
             & $DLG_penisola_rd1==0
             & $DLG_penisola_rd2==1
           )
         {
            if(  $DLG_larghezza==$DLG_telaio_z
               & VAR_VAL($DLG_idx_to_call,"SEDUTA_N")==VAR_VAL($DLG_idx_to_call,"SEDUTE_TOT")
               & $DLG_profondita>VAR_VAL($DLG_idx_to_call,"SEDUTA_L_MAX")
              )
            {
                //setto la possibilit di rotazione laterale
                VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre2")
            }
            else
            {
                if( VAR_VAL($DLG_idx_to_call,"SEDUTA_N")>1 )
                {
                   //setto l'inserimento fronte-retro standard
                   VAR_SET_MENU($DLG_idx_to_call,"VAR_posizione_fr_re","air_frre")

                   // se sono laterale resetto tutto e metto retro
                   if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")==0 )
                   {
                      COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_posizione_fr_re=1"))
                      $DLG_caption_posizione_fr_re = MSG(649)
                      $DLG_value_posizione_fr_re   = $DLG_caption_posizione_fr_re
                   }
                }
            }
         }

         $DLG_hint_profondita    = STRCAT(MSG(626),STR($DLG_profondita))
         $DLG_caption_profondita = STR($DLG_profondita)
         $DLG_value_profondita   = STR($DLG_profondita)

      ]
   }

   Button btnPosizione_fr_re
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(696)

      Placement
      {
         posx = 135
         posy = 160
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_posizione_fr_re")
         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")==-1 )  { $DLG_caption_posizione_fr_re = MSG(648)  $DLG_enable_larghezza = 1 }
         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")== 1 )  { $DLG_caption_posizione_fr_re = MSG(649)  $DLG_enable_larghezza = 1 }
         // Fabrizio 07/10/11 - per posizionamento penisola laterale
         if( VAR_VAL($DLG_idx_to_call,"VAR_posizione_fr_re")==0 )   { $DLG_caption_posizione_fr_re = MSG(674)  $DLG_enable_larghezza = 0 }

         $DLG_hint_posizione_fr_re    = STRCAT(MSG(1328)," - ",$DLG_caption_posizione_fr_re)
         $DLG_value_posizione_fr_re   = $DLG_caption_posizione_fr_re
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 135
         posy = 190
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }
}

// Massimiliano 18/07/14 - Dialog per Divano Slide
Dlg Dlg_DivanoSlide
{
   Caption = MSG(1917)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 560
      dimy = 500
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmChk
   {
      Placement
      {
         posx = 10
         posy = 375
         dimx = 210
         dimy = 50
      }

      //Check chkEtic
      //{
      //  Caption = MSG(1886)
      //  Hint    = MSG(1886)
      //  Enable  = $DLG_enable_etic
      //  Value   = $DLG_value_etic
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 5
      //     dimx = 100
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     if( $DLG_value_etic==1 )   {  $DLG_value_etic=1  }
      //     else                            {  $DLG_value_etic=0  }
      // ]
      //}

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=1  }
           else                         {  $DLG_value_ignifu=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(1993)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 300
         dimy = 360
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0
           $DLG_value_ignifu  = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5

        Placement
        {
           posx = 10
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 295
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 335
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------

           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //$DLG_COLORE_AIR = "XXX"
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20

        Placement
        {
           posx = 170
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 170
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 170
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0
           $DLG_value_ignifu  = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 170
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 170
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 170
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 170
           posy = 295
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 170
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      //Check chkOutdoor
      //Label chkOutdoor
      //{
      //  Caption = $DLG_caption_outdoor
      //  Hint    = $DLG_hint_outdoor
      //  Value   = $DLG_value_outdoor
      //
      //  Font
      //  {
      //     size  = 12
      //     type  = 1
      //     color = 255
      //  }
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 10
      //     dimx = 130
      //     dimy = 20
      //  }
      //}

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 18
            dimx = 190
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  20
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame Schienale
   {
      Caption = MSG(1894)

      Placement
      {
         posx = 380
         posy = 10
         dimx = 150
         dimy = 90
      }

      Radio Rd1
      {
        Caption = MSG(1887)
        Hint    = MSG(1887)
        Value   = $DLG_value_no
        Enable  = $DLG_enable_no

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_no  = 1
           $DLG_value_si  = 0
           $DLG_value_ang = 0

           $DLG_enable_LR = 0
           $DLG_enable_LS = 0
           $DLG_enable_LA = 0
           $DLG_enable_LD = 0
           $DLG_enable_off_SX  = 0
           $DLG_enable_off_DX  = 0
           $DLG_enable_centr   = 0
        ]
      }

      Radio Rd2
      {
        Caption = MSG(1888)
        Hint    = MSG(1888)
        Value   = $DLG_value_si
        Enable  = $DLG_enable_si

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_no  = 0
           $DLG_value_si  = 1
           $DLG_value_ang = 0

           $DLG_enable_LR = 1
           $DLG_enable_LA = 1
           if( $DLG_Faccia == 2 )  {  $DLG_enable_LD = 1  $DLG_enable_LS = 0  }
           if( $DLG_Faccia == 1 )  {  $DLG_enable_LD = 0  $DLG_enable_LS = 1  }
           //if( $DLG_Modulo == 4 )  {  $DLG_enable_LR = 0  }
        ]
      }

      Radio Rd3
      {
        Caption = MSG(999)
        Hint    = MSG(999)
        Value   = $DLG_value_ang
        Enable  = $DLG_enable_ang

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_no  = 0
           $DLG_value_si  = 0
           $DLG_value_ang = 1

           $DLG_enable_LR = 0
           $DLG_enable_LS = 0
           $DLG_enable_LA = 0
           $DLG_enable_LD = 0
           $DLG_enable_off_SX  = 0
           $DLG_enable_off_DX  = 0
           $DLG_enable_centr   = 0

        ]
      }
   }

   Frame PosizioneSchienale
   {
      Caption = MSG(1895)

      Placement
      {
         posx = 380
         posy = 100
         dimx = 150
         dimy = 110
      }

      Radio Rd1
      {
        Caption = MSG(1896)
        Hint    = MSG(1896)
        Value   = $DLG_value_LR
        Enable  = $DLG_enable_LR

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 1
           $DLG_value_LD  = 0
           $DLG_value_LS  = 0
           $DLG_value_LA  = 0

           $DLG_enable_off_SX = 0
           $DLG_enable_off_DX = 0
           $DLG_enable_centr  = 1
           $DLG_value_centr   = 1

           if( $DLG_Modulo == 2 | $DLG_Modulo == 3 )  {  $DLG_enable_off_SX = 1  }
           //if( $DLG_Modulo == 4 )                     {  $DLG_enable_centr  = 0  $DLG_value_centr = 0 }
        ]
      }

      Radio Rd2
      {
        Caption = MSG(1897)
        Hint    = MSG(1897)
        Value   = $DLG_value_LD
        Enable  = $DLG_enable_LD

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 0
           $DLG_value_LD  = 1
           $DLG_value_LS  = 0
           $DLG_value_LA  = 0
           $DLG_enable_off_SX = 1
           $DLG_enable_off_DX = 1
           $DLG_enable_centr  = 1
        ]
      }

      Radio Rd3
      {
        Caption = MSG(1898)
        Hint    = MSG(1898)
        Value   = $DLG_value_LS
        Enable  = $DLG_enable_LS

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 0
           $DLG_value_LD  = 0
           $DLG_value_LS  = 1
           $DLG_value_LA  = 0
           $DLG_enable_off_SX = 1
           $DLG_enable_off_DX = 1
           $DLG_enable_centr  = 1
        ]
      }

      Radio Rd4
      {
        Caption = MSG(1899)
        Hint    = MSG(1899)
        Value   = $DLG_value_LA
        Enable  = $DLG_enable_LA

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 0
           $DLG_value_LD  = 0
           $DLG_value_LS  = 0
           $DLG_value_LA  = 1
           $DLG_enable_off_SX = 0
           $DLG_enable_off_DX = 1
           $DLG_enable_centr  = 1

           if( $DLG_Modulo==1 )  {  $DLG_enable_off_DX = 0  }
        ]
      }
   }

   Frame OffsetSchienale
   {
      Placement
      {
         posx = 380
         posy = 210
         dimx = 150
         dimy = 70
      }

      Radio Rd1
      {
        Caption = MSG(1990)
        Hint    = MSG(1990)
        Value   = $DLG_value_off_SX
        Enable  = $DLG_enable_off_SX

        Placement
        {
           posx = 10
           posy = 5
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_off_SX  = 1
           $DLG_value_off_DX  = 0
           $DLG_value_centr   = 0
        ]
      }

      Radio Rd2
      {
        Caption = MSG(1991)
        Hint    = MSG(1991)
        Value   = $DLG_value_off_DX
        Enable  = $DLG_enable_off_DX

        Placement
        {
           posx = 10
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_off_SX  = 0
           $DLG_value_off_DX  = 1
           $DLG_value_centr   = 0
        ]
      }

      Radio Rd3
      {
        Caption = MSG(1992)
        Hint    = MSG(1992)
        Value   = $DLG_value_centr
        Enable  = $DLG_enable_centr

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_off_SX  = 0
           $DLG_value_off_DX  = 0
           $DLG_value_centr   = 1
        ]
      }
   }

   Frame ImgEsempio
   {

      Placement
      {
         posx = 380
         posy = 278
         dimx = 150
         dimy = 150
      }

      Image Im5
      {
         //Caption = $DLG_descrizione_var
         Value   = $DLG_image_file_st
         //Hint    = $DLG_descrizione_var

         Placement
         {
            posx =   5
            posy =   5
            dimx = 140
            dimy = 140
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 150
         posy = 435
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 65
         posy = 435
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 30
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
        GOSUB Get_Image_seduta_slide
      ]
   }
}
//Massimiliano 22/12/16 - revisione divano Slide
Dlg Dlg_DivanoSlide_rev
{
   Caption = MSG(1917)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 510
//      dimy = 500
      dimy = 550
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmChk
   {
      Placement
      {
         posx = 10
//         posy = 375
         posy = 390
         dimx = 300
         dimy = 45
      }

      //Check chkEtic
      //{
      //  Caption = MSG(1886)
      //  Hint    = MSG(1886)
      //  Enable  = $DLG_enable_etic
      //  Value   = $DLG_value_etic
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 5
      //     dimx = 100
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     if( $DLG_value_etic==1 )   {  $DLG_value_etic=1  }
      //     else                            {  $DLG_value_etic=0  }
      // ]
      //}

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 13
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=1  }
           else                         {  $DLG_value_ignifu=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(1993)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 300
//         dimy = 360
//         dimy = 380
         dimy = 420
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0
           $DLG_value_ignifu  = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7
        //Massimiliano 28/01/2019  - come visto con Enrico Saggio e Piva, si pu ordinare
        //Enable  = 0

        Placement
        {
           posx = 10
           posy = 295
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 335
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------

           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //$DLG_COLORE_AIR = "XXX"
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 170
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 170
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 170
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0
           $DLG_value_ignifu  = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 170
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 170
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 170
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 170
           posy = 295
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 170
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 09/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      // 09/01/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 170
           posy = 335
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 355
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 170
           posy = 355
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti BarkLey/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }
      // 29/10/2019 - Emanuele - Aggiungo radiobutton per i tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 375
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }
      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 170
           posy = 375
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }
      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 395
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }



      //Check chkOutdoor
      //Label chkOutdoor
      //{
      //  Caption = $DLG_caption_outdoor
      //  Hint    = $DLG_hint_outdoor
      //  Value   = $DLG_value_outdoor
      //
      //  Font
      //  {
      //     size  = 12
      //     type  = 1
      //     color = 255
      //  }
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 10
      //     dimx = 130
      //     dimy = 20
      //  }
      //}

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 18
            dimx = 190
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  20
            posy =  35
            dimx = 100
            dimy = 100
         }
      }

      Image Im5
      {
         Value   = $DLG_image_file_st

         Placement
         {
            posx = 160
            posy =  35
            dimx = 125
            dimy = 125
         }
      }
   }

   Frame Schienale
   {
      Caption = MSG(1894)

      Placement
      {
         posx = 315
         posy = 10
         dimx = 185
         dimy = 120
      }

      Radio Rd1
      {
        Caption = MSG(1887)
        Hint    = MSG(1887)
        Value   = $DLG_value_no
        Enable  = $DLG_enable_no

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_no  = 1
           $DLG_value_si  = 0
           $DLG_value_ang = 0

           $DLG_enable_LR = 0
           $DLG_enable_LS = 0
           $DLG_enable_LA = 0
           $DLG_enable_LD = 0
           //$DLG_enable_off_SX  = 0
           //$DLG_enable_off_DX  = 0
           //$DLG_enable_centr   = 0

           $DLG_value_x_sch = 0
           $DLG_value_sch = 0
           $DLG_value_off_sch = 0
        ]
      }

      Radio Rd2
      {
        Caption = MSG(1888)
        Hint    = MSG(1888)
        Value   = $DLG_value_si
        Enable  = $DLG_enable_si

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_no  = 0
           $DLG_value_si  = 1
           $DLG_value_ang = 0

           $DLG_enable_LR = 1
           $DLG_enable_LA = 1

           // 28/02/2018 - Filippo - non disabilito mai
           //if( $DLG_Faccia == 2 )  {  $DLG_enable_LD = 1  $DLG_enable_LS = 0  }
           //if( $DLG_Faccia == 1 )  {  $DLG_enable_LD = 0  $DLG_enable_LS = 1  }
           if( $DLG_Faccia == 2 )  {  $DLG_enable_LD = 1  $DLG_enable_LS = 1  }
           if( $DLG_Faccia == 1 )  {  $DLG_enable_LD = 1  $DLG_enable_LS = 1  }

           //if( $DLG_Modulo == 4 )  {  $DLG_enable_LR = 0  }

           $DLG_value_x_sch = 1
           $DLG_value_sch = 1
           //07.03.2017 - Filippo - Inverto il valore iniziale del value_off_sch
           //in modo tale da abilitare il valore solo quando l'utente seleziona il rientro o lo sbordo
           $DLG_value_off_sch = 0
        ]
      }

      Radio Rd3
      {
        Caption = MSG(999)
        Hint    = MSG(999)
        Value   = $DLG_value_ang
        Enable  = $DLG_enable_ang

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_no  = 0
           $DLG_value_si  = 0
           $DLG_value_ang = 1

           $DLG_enable_LR = 0
           $DLG_enable_LS = 0
           $DLG_enable_LA = 0
           $DLG_enable_LD = 0
           //$DLG_enable_off_SX  = 0
           //$DLG_enable_off_DX  = 0
           //$DLG_enable_centr   = 0

           $DLG_value_x_sch = 0
           $DLG_value_sch = 0
           $DLG_value_off_sch = 0
        ]
      }

      Label LabLarghezza
      {
         Caption = MSG(439)
         Value   = MSG(439)
         Hint    = MSG(439)

         Placement
         {
            posx = 10
            posy = 90
            dimx = 130
            dimy = 25
         }
      }

      Edit EdtLarg
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 120
           posy = 87
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]
      }
   }

   Frame PosizioneSchienale
   {
      Caption = MSG(1895)

      Placement
      {
         posx = 315
         posy = 130
         dimx = 185
         dimy = 110
      }

      Radio Rd1
      {
        Caption = MSG(1896)
        Hint    = MSG(1896)
        Value   = $DLG_value_LR
        Enable  = $DLG_enable_LR

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 1
           $DLG_value_LD  = 0
           $DLG_value_LS  = 0
           $DLG_value_LA  = 0

           //$DLG_enable_off_SX = 0
           //$DLG_enable_off_DX = 0
           //$DLG_enable_centr  = 1
           //$DLG_value_centr   = 1

           //if( $DLG_Modulo == 2 | $DLG_Modulo == 3 )  {  $DLG_enable_off_SX = 1  }
           ////if( $DLG_Modulo == 4 )                     {  $DLG_enable_centr  = 0  $DLG_value_centr = 0 }
           $DLG_value_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 1 gruppo
           $DLG_SlideRadioGroup1Check = 1

        ]
      }

      Radio Rd2
      {
        Caption = MSG(1897)
        Hint    = MSG(1897)
        Value   = $DLG_value_LD
        Enable  = $DLG_enable_LD

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 0
           $DLG_value_LD  = 1
           $DLG_value_LS  = 0
           $DLG_value_LA  = 0
           //$DLG_enable_off_SX = 1
           //$DLG_enable_off_DX = 1
           //$DLG_enable_centr  = 1
           $DLG_value_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 1 gruppo
           $DLG_SlideRadioGroup1Check = 1

        ]
      }

      Radio Rd3
      {
        Caption = MSG(1898)
        Hint    = MSG(1898)
        Value   = $DLG_value_LS
        Enable  = $DLG_enable_LS

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 0
           $DLG_value_LD  = 0
           $DLG_value_LS  = 1
           $DLG_value_LA  = 0
           //$DLG_enable_off_SX = 1
           //$DLG_enable_off_DX = 1
           //$DLG_enable_centr  = 1
           $DLG_value_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 1 gruppo
           $DLG_SlideRadioGroup1Check = 1

        ]
      }

      Radio Rd4
      {
        Caption = MSG(1899)
        Hint    = MSG(1899)
        Value   = $DLG_value_LA
        Enable  = $DLG_enable_LA

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_LR  = 0
           $DLG_value_LD  = 0
           $DLG_value_LS  = 0
           $DLG_value_LA  = 1
           //$DLG_enable_off_SX = 0
           //$DLG_enable_off_DX = 1
           //$DLG_enable_centr  = 1

           //if( $DLG_Modulo==1 )  {  $DLG_enable_off_DX = 0  }
           $DLG_value_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 1 gruppo
           $DLG_SlideRadioGroup1Check = 1

        ]
      }
   }

   //Frame OffsetSchienale
   //{
   //   Placement
   //   {
   //      posx = 380
   //      posy = 210
   //      dimx = 150
   //      dimy = 70
   //   }
   //
   //   Radio Rd1
   //   {
   //     Caption = MSG(1990)
   //     Hint    = MSG(1990)
   //     Value   = $DLG_value_off_SX
   //     Enable  = $DLG_enable_off_SX
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 5
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //        $DLG_value_off_SX  = 1
   //        $DLG_value_off_DX  = 0
   //        $DLG_value_centr   = 0
   //     ]
   //   }
   //
   //   Radio Rd2
   //   {
   //     Caption = MSG(1991)
   //     Hint    = MSG(1991)
   //     Value   = $DLG_value_off_DX
   //     Enable  = $DLG_enable_off_DX
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 25
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //        $DLG_value_off_SX  = 0
   //        $DLG_value_off_DX  = 1
   //        $DLG_value_centr   = 0
   //     ]
   //   }
   //
   //   Radio Rd3
   //   {
   //     Caption = MSG(1992)
   //     Hint    = MSG(1992)
   //     Value   = $DLG_value_centr
   //     Enable  = $DLG_enable_centr
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 45
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //        $DLG_value_off_SX  = 0
   //        $DLG_value_off_DX  = 0
   //        $DLG_value_centr   = 1
   //     ]
   //   }
   //}

   Frame OffsetSchienale
   {
      Placement
      {
         posx = 315
         posy = 240
         dimx = 185
         dimy = 180
      }

      Radio Rd1
      {
        Caption = MSG(2308)
        Hint    = MSG(2308)
        Value   = $DLG_value_all_DX
        //Enable  = $DLG_enable_all_DX
        Enable  = $DLG_value_sch

        Placement
        {
           posx = 10
           posy = 5
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_all_DX  = 1
           $DLG_value_all_SX  = 0
           $DLG_value_rie_DX  = 0
           $DLG_value_rie_SX  = 0
           $DLG_value_sbo_DX  = 0
           $DLG_value_sbo_SX  = 0

           $DLG_value_off_sch = 0
           $DLG_value_offset  = "0"
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," X_Off=0"))

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 2 gruppo
           $DLG_SlideRadioGroup2Check = 1

        ]
      }
      Radio Rd2
      {
        Caption = MSG(2309)
        Hint    = MSG(2309)
        Value   = $DLG_value_all_SX
        //Enable  = $DLG_enable_all_SX
        Enable  = $DLG_value_sch

        Placement
        {
           posx = 10
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_all_DX  = 0
           $DLG_value_all_SX  = 1
           $DLG_value_rie_DX  = 0
           $DLG_value_rie_SX  = 0
           $DLG_value_sbo_DX  = 0
           $DLG_value_sbo_SX  = 0

           $DLG_value_off_sch = 0
           $DLG_value_offset  = "0"
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," X_Off=0"))

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 2 gruppo
           $DLG_SlideRadioGroup2Check = 1

        ]
      }
      Radio Rd3
      {
        Caption = MSG(2310)
        Hint    = MSG(2310)
        Value   = $DLG_value_rie_DX
        //Enable  = $DLG_enable_rie_DX
        Enable  = $DLG_value_sch

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_all_DX  = 0
           $DLG_value_all_SX  = 0
           $DLG_value_rie_DX  = 1
           $DLG_value_rie_SX  = 0
           $DLG_value_sbo_DX  = 0
           $DLG_value_sbo_SX  = 0
           $DLG_value_off_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 2 gruppo
           $DLG_SlideRadioGroup2Check = 1

        ]
      }
      Radio Rd4
      {
        Caption = MSG(2311)
        Hint    = MSG(2311)
        Value   = $DLG_value_rie_SX
        //Enable  = $DLG_enable_rie_SX
        Enable  = $DLG_value_sch

        Placement
        {
           posx = 10
           posy = 65
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_all_DX  = 0
           $DLG_value_all_SX  = 0
           $DLG_value_rie_DX  = 0
           $DLG_value_rie_SX  = 1
           $DLG_value_sbo_DX  = 0
           $DLG_value_sbo_SX  = 0
           $DLG_value_off_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 2 gruppo
           $DLG_SlideRadioGroup2Check = 1

        ]
      }
      Radio Rd5
      {
        Caption = MSG(2312)
        Hint    = MSG(2312)
        Value   = $DLG_value_sbo_DX
        //Enable  = $DLG_enable_rie_DX
        Enable  = $DLG_value_sch

        Placement
        {
           posx = 10
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_all_DX  = 0
           $DLG_value_all_SX  = 0
           $DLG_value_rie_DX  = 0
           $DLG_value_rie_SX  = 0
           $DLG_value_sbo_DX  = 1
           $DLG_value_sbo_SX  = 0
           $DLG_value_off_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 2 gruppo
           $DLG_SlideRadioGroup2Check = 1

        ]
      }
      Radio Rd6
      {
        Caption = MSG(2313)
        Hint    = MSG(2313)
        Value   = $DLG_value_sbo_SX
        //Enable  = $DLG_enable_rie_SX
        Enable  = $DLG_value_sch

        Placement
        {
           posx = 10
           posy = 105
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_all_DX  = 0
           $DLG_value_all_SX  = 0
           $DLG_value_rie_DX  = 0
           $DLG_value_rie_SX  = 0
           $DLG_value_sbo_DX  = 0
           $DLG_value_sbo_SX  = 1
           $DLG_value_off_sch = 1

           //07.03.2017 - Filippo - Ho selezionato almeno un radio button del 2 gruppo
           $DLG_SlideRadioGroup2Check = 1

        ]
      }

      Label LabLarghezza
      {
         Caption = MSG(2316)
         Value   = MSG(2316)
         Hint    = MSG(2316)

         Placement
         {
            posx = 10
            posy = 140
            dimx = 130
            dimy = 25
         }
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 115
           posy = 140
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 150
//         posy = 435
         posy = 455
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 65
//         posy = 435
         posy = 455
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(2315)
      Enable = $DLG_value_x_sch

      Placement
      {
         posx = 480
         posy =  97
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"X_Sch")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_larghezza = STR(VAR_VAL($DLG_idx_to_call,"X_Sch"))
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(2317)
      Enable = $DLG_value_off_sch

      Placement
      {
         posx = 480
         posy = 380
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"X_Off")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_offset = STR(VAR_VAL($DLG_idx_to_call,"X_Off"))
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 30
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
        GOSUB Get_Image_seduta_slide
      ]
   }
}

// Massimiliano 23/07/14 - Dialog per schiena Slide
Dlg Dlg_SchienaSlide
{
   Caption = MSG(1917)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
//      dimy = 500
//      dimy = 540
      dimy = 580
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmChk
   {
      Placement
      {
         posx = 10
//         posy = 375
//         posy = 405
         posy = 445
         dimx = 310
         dimy = 50
      }

      Check chkEtic
      {
        Caption = MSG(1886)
        Hint    = MSG(1886)
        Enable  = $DLG_enable_etic
        Value   = $DLG_value_etic

        Placement
        {
           posx = 10
           posy = 5
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_etic==1 )   {  $DLG_value_etic=1  }
           else                       {  $DLG_value_etic=0  }
        ]
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=1  }
           else                         {  $DLG_value_ignifu=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(1994)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 310
//         dimy = 360
//         dimy = 390
         dimy = 430
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5

        Placement
        {
           posx = 10
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7
        //Massimiliano 28/01/2019  - come visto con Enrico Saggio e Piva, si pu ordinare
        //Enable  = 0

        Placement
        {
           posx = 10
           posy = 295
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 335
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------

           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //$DLG_COLORE_AIR = "XXX"
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20

        Placement
        {
           posx = 170
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 170
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 170
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0
           $DLG_value_ignifu  = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 170
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 170
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 170
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //$DLG_ignifugazione = 1
           $DLG_value_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 170
           posy = 295
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 170
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 04/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. disattivo check ignifugazione
           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      // 04/02/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28

        Placement
        {
           posx = 170
           posy = 335
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      // 04/02/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29

        Placement
        {
           posx = 10
           posy = 355
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      // 04/02/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30

        Placement
        {
           posx = 170
           posy = 355
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 05/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }
      // 05/11/2019 - Emanuele - Aggiungo radiobutton per gestire i tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31

        Placement
        {
           posx = 10
           posy = 375
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32

        Placement
        {
           posx = 170
           posy = 375
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33

        Placement
        {
           posx = 10
           posy = 395
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_enable_ignifu = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
           GOSUB Get_Image_seduta_slide
        ]
      }

      //Check chkOutdoor
      Label chkOutdoor
      {
        Caption = $DLG_caption_outdoor
        Hint    = $DLG_hint_outdoor
        Value   = $DLG_value_outdoor

        Font
        {
           size  = 12
           type  = 1
           color = 255
        }

        Placement
        {
           posx = 10
           posy = 10
           dimx = 130
           dimy = 20
        }
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 18
            dimx = 190
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 150
//         posy = 430
//         posy = 470
         posy = 510
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 65
//         posy = 430
//         posy = 470
         posy = 510
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 30
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_SEDUTA_SLIDE,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_SEDUTA_SLIDE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SEDUTA_SLIDE,"colori_tutti.txt")
        GOSUB Get_Image_seduta_slide
      ]
   }
}

Dlg AIR_Cuscino
{
   Caption = MSG(636)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 885
//      dimy = 300
//      dimy = 340
      dimy = 380
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 125
      }

      Edit Edtmisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(637)
        Hint    = MSG(638)
        Value   = MSG(637)
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Radio RdQuadrato
      {
        Caption = MSG(643)
        Hint    = MSG(643)
        Value   = $DLG_quadrato_air

        Placement
        {
           posx = 40
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 1
           $DLG_rettangolare_air = 0
           $DLG_lombare_air      = 0
           $DLG_enable_misure    = 1

           //controllo cambio di misure e assegno il default
           if($DLG_misure!=368 | $DLG_misure!=460 | $DLG_misure!=552 ) { $DLG_misure = 368 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAir")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
        ]
      }

      Radio RdRettang
      {
        Caption = MSG(644)
        Hint    = MSG(644)
        Value   = $DLG_rettangolare_air

        Placement
        {
           posx = 40
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 1
           $DLG_lombare_air      = 0

           $DLG_enable_misure    = 0

           $DLG_hint_misure     = STRCAT(MSG(637),"736x414")
           $DLG_caption_misure  = "736x414"
           $DLG_value_misure    = "736x414"
        ]
      }

      Radio RdLombare
      {
        Caption = MSG(645)
        Hint    = MSG(645)
        Value   = $DLG_lombare_air


        Placement
        {
           posx = 40
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 0
           $DLG_lombare_air      = 1
           $DLG_enable_misure    = 1


           //controllo cambio di misure e assegno il default
           if( $DLG_misure!=552 | $DLG_misure!=736 ) { $DLG_misure = 552 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAir3")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x322")
           $DLG_caption_misure  = STRCAT( STR($DLG_misure),"x322" )
           $DLG_value_misure    = STRCAT( STR($DLG_misure),"x322" )
        ]
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 135
         dimx = 150
         dimy = 70
      }

      Radio RdPiuma
      {
        Caption = MSG(661)
        Hint    = MSG(662)
        Value   = $DLG_val_opzione_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 1
           $DLG_val_opzione_2 = 0

           // se passo da una situazione di interno in fibra
           // e tessuto SUN outdoor ad un interno in piuma
           // devo resettare le finiture perch non possono
           // essere outdoor
           if( $DLG_rivestimento_e==7 & $DLG_outdoor==1 )
           {
              $DLG_var_to_call_e = $DLG_var_to_call_1
              $DLG_var_to_call_i = $DLG_var_to_call_8

              $DLG_rivestimento_e = 1
              $DLG_rivestimento_i = 1

              $DLG_value_rd_uso_1 = 1
              $DLG_value_rd_uso_2 = 0
              $DLG_value_rd_uso_3 = 0
              $DLG_value_rd_uso_4 = 0
              $DLG_value_rd_uso_5 = 0
              $DLG_value_rd_uso_6 = 0
              $DLG_value_rd_uso_7 = 0
              $DLG_value_rd_uso_8 = 0
              $DLG_value_rd_uso_16 = 0
              $DLG_value_rd_uso_20 = 0
              $DLG_value_rd_uso_21 = 0
              $DLG_value_rd_uso_22 = 0
              $DLG_value_rd_uso_23 = 0
              $DLG_value_rd_uso_24 = 0
              $DLG_value_rd_uso_25 = 0
              $DLG_value_rd_uso_26 = 0
              $DLG_value_rd_uso_27 = 0
              // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
              $DLG_value_rd_uso_28 = 0
              $DLG_value_rd_uso_29 = 0
              $DLG_value_rd_uso_30 = 0

              //valore di default
              $DLG_COLORE_AIR  = "J21"

              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_e,"=",APICI(),$DLG_COLORE_AIR,APICI()))

              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
              GOSUB Get_Image_DivaniAir

              $DLG_rivestimento_i   = $DLG_rivestimento_e
              $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
              $DLG_descrizione_var2 = $DLG_descrizione_var
              $DLG_image_file2      = $DLG_image_file
              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))

           }

           //gestione del filtro per imbottitura
           $DLG_outdoor = 0
        ]
      }

      Radio RdFibra
      {
        Caption = MSG(663)
        Hint    = MSG(664)
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 0
           $DLG_val_opzione_2 = 1

           //gestione del filtro per imbottitura
           //$DLG_outdoor = 1
           //Massimiliano 10/07/17 - non si pu pi avere il tessuto outdoor
           $DLG_outdoor = 0
        ]
      }
   }

   Frame FrmIgnif
   {
      Caption = ""

      Placement
      {
         posx = 10
         posy = 210
         dimx = 150
         dimy = 35
      }

      Check chkIgnifug1
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 15
           posy = 10
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if($DLG_ignifugazione==1)   {  $DLG_ignifugazione=1  }
           else                        {  $DLG_ignifugazione=0  }
        ]
      }
   }

   Frame FinituraEst
   {
      Caption = MSG(640)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 490
//         dimy = 200
//         dimy = 230
         dimy = 270
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call_e = $DLG_var_to_call_1
           $DLG_var_to_call_i = $DLG_var_to_call_8

           $DLG_rivestimento_e  = 1
           $DLG_rivestimento_i  = 1

           $DLG_value_rd_uso_1  = 1
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------
         ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call_e = $DLG_var_to_call_2
           $DLG_var_to_call_i = $DLG_var_to_call_9

           $DLG_rivestimento_i  = 2
           $DLG_rivestimento_e  = 2

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 1
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call_e = $DLG_var_to_call_3
           $DLG_var_to_call_i = $DLG_var_to_call_10

           $DLG_rivestimento_e  = 3
           $DLG_rivestimento_i  = 3

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 1
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           if( $DLG_ignifugazione==1 )    { $DLG_ignifugazione = 0 }

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 75
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call_e = $DLG_var_to_call_4
           $DLG_var_to_call_i = $DLG_var_to_call_11

           $DLG_rivestimento_e  = 4
           $DLG_rivestimento_i  = 4

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 1
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 95
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call_e = $DLG_var_to_call_5
           $DLG_var_to_call_i = $DLG_var_to_call_12

           $DLG_rivestimento_e  = 5
           $DLG_rivestimento_i  = 5

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 1
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // attivo ignifugazione automatica
           // per ecopelle ignifuga (PRIMA DEL CHIEDI!!!!)
           //if( $DLG_ignifugazione==0 )    { $DLG_ignifugazione = 1  }
           if( $DLG_ignifugazione==1 )    { $DLG_ignifugazione = 0 }
           // .................................................
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0


           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call_e = $DLG_var_to_call_6
           $DLG_var_to_call_i = $DLG_var_to_call_13

           $DLG_rivestimento_e  = 6
           $DLG_rivestimento_i  = 6

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 1
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7
        Enable  = $DLG_outdoor

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call_e = $DLG_var_to_call_7
           $DLG_var_to_call_i = $DLG_var_to_call_14

           $DLG_rivestimento_e  = 7
           $DLG_rivestimento_i  = 7

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 1
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------
        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ e GEST_SG
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_16
           $DLG_var_to_call_i = $DLG_var_to_call_17

           $DLG_rivestimento_e  = 16
           $DLG_rivestimento_i  = 16

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_15

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call_e = $DLG_var_to_call_15
           $DLG_var_to_call_i = $DLG_var_to_call_15

           $DLG_rivestimento_e  = 8
           $DLG_rivestimento_i  = 8

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call_e,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           //}
           // ---------------------------------------------------------

           // Riccardo 28/09/11: Aggiungo valorizzazione della variabile
           $DLG_ignifugazione_enable = 1

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           if( STRCMP( $DLG_COLORE_AIR2,"XXX" )!=0 )
           {
              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           }
           // -----------------------------------------------------
        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 160
           posy = 15
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call_e = $DLG_var_to_call_20
           $DLG_var_to_call_i = $DLG_var_to_call_30

           $DLG_rivestimento_e  = 20
           $DLG_rivestimento_i  = 20

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------
         ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call_e = $DLG_var_to_call_21
           $DLG_var_to_call_i = $DLG_var_to_call_31

           $DLG_rivestimento_i  = 21
           $DLG_rivestimento_e  = 21

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call_e = $DLG_var_to_call_22
           $DLG_var_to_call_i = $DLG_var_to_call_32

           $DLG_rivestimento_e  = 22
           $DLG_rivestimento_i  = 22

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call_e = $DLG_var_to_call_23
           $DLG_var_to_call_i = $DLG_var_to_call_33

           $DLG_rivestimento_e  = 23
           $DLG_rivestimento_i  = 23

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call_e = $DLG_var_to_call_24
           $DLG_var_to_call_i = $DLG_var_to_call_34

           $DLG_rivestimento_e  = 24
           $DLG_rivestimento_i  = 24

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // .................................................
           // disattivo outdoor e allineo la gestione
           // .................................................
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_ignifugazione_enable = 1

           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call_e = $DLG_var_to_call_25
           $DLG_var_to_call_i = $DLG_var_to_call_35

           $DLG_rivestimento_e  = 25
           $DLG_rivestimento_i  = 25

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_26
           $DLG_var_to_call_i = $DLG_var_to_call_36

           $DLG_rivestimento_e  = 26
           $DLG_rivestimento_i  = 26

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------
        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ e GEST_SG
      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_27
           $DLG_var_to_call_i = $DLG_var_to_call_37

           $DLG_rivestimento_e  = 27
           $DLG_rivestimento_i  = 27

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 08/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }
      // 08/01/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_28
           $DLG_var_to_call_i = $DLG_var_to_call_38

           $DLG_rivestimento_e  = 28
           $DLG_rivestimento_i  = 28

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           $DLG_ignifugazione_enable = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 195
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_29
           $DLG_var_to_call_i = $DLG_var_to_call_39

           $DLG_rivestimento_e  = 29
           $DLG_rivestimento_i  = 29

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           $DLG_ignifugazione_enable = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 195
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_301
           $DLG_var_to_call_i = $DLG_var_to_call_40

           $DLG_rivestimento_e  = 30
           $DLG_rivestimento_i  = 30

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per i tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           $DLG_ignifugazione_enable = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      // 30/10/2019 - Emanuele - Aggiungo radiobutton per la gestione dei tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 215
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_311
           $DLG_var_to_call_i = $DLG_var_to_call_41

           $DLG_rivestimento_e  = 31
           $DLG_rivestimento_i  = 31

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0


           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           $DLG_ignifugazione_enable = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 215
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_321
           $DLG_var_to_call_i = $DLG_var_to_call_42

           $DLG_rivestimento_e  = 32
           $DLG_rivestimento_i  = 32

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0


           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           $DLG_ignifugazione_enable = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }

      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 235
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call_e = $DLG_var_to_call_331
           $DLG_var_to_call_i = $DLG_var_to_call_43

           $DLG_rivestimento_e  = 33
           $DLG_rivestimento_i  = 33

           $DLG_value_rd_uso_1  = 0
           $DLG_value_rd_uso_2  = 0
           $DLG_value_rd_uso_3  = 0
           $DLG_value_rd_uso_4  = 0
           $DLG_value_rd_uso_5  = 0
           $DLG_value_rd_uso_6  = 0
           $DLG_value_rd_uso_7  = 0
           $DLG_value_rd_uso_15 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1


           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
           }

           // ---------------------------------------------------------
           $DLG_ignifugazione_enable = 1

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

           // -----------------------------------------------------
           // Assegno laseconda variante (interna) per allinearla
           // -----------------------------------------------------
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
           // -----------------------------------------------------

        ]
      }


      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 295
            posy = 18
            dimx = 195
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraInt
   {
      Caption = MSG(641)
      Enable  = $DLG_doppia_finitura

      Placement
      {
         posx = 660
         posy = 10
         dimx = 205
         dimy = 170
      }

      Label LabFinitura2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 18
            dimx = 195
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  20
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 465
//         posy = 235
//         posy = 265
         posy = 285
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 380
//         posy = 235
//         posy = 265
         posy = 285
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraEST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 20
      }

      OnClick
      [
         // ---------------------------------------------------------
         // controllo affinch non venga settato un valore nullo (NO*)
         // ---------------------------------------------------------
         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
         $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)

         while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_e)
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_e)
         }
         // ---------------------------------------------------------

         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
         GOSUB Get_Image_DivaniAir

         //if( $DLG_value_rd_uso_7==1 )
         if( $DLG_doppia_finitura==0 )
         {
            $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
            $DLG_descrizione_var2 = $DLG_descrizione_var
            $DLG_image_file2      = $DLG_image_file
            if( STRCMP( $DLG_COLORE_AIR2,"XXX" )!=0 )
            {
               $DLG_rivestimento_i   = $DLG_rivestimento_e
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
            }
         }
      ]
   }

   Button btnFinituraINT
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable  = $DLG_doppia_finitura

      Placement
      {
         posx = 680
         posy = 150
         dimx = 100
         dimy = 20
      }

      OnClick
      [
         // Fabrizio 03/06/11
         // faccio l'alleneamento...
         $DLG_rivestimento_i = $DLG_rivestimento_e

         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_i)
         $DLG_COLORE_AIR2 = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_i)

         while( STRCMP($DLG_COLORE_AIR2,$VALORE_NULLO)==0 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_i)
            $DLG_COLORE_AIR2 = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_i)
         }

         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR2,"colori_tutti.txt")
         GOSUB Get_Image_DivaniAir2

      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(639)
      Enable = $DLG_enable_misure

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_quadrato_air==1 )
         {
            $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
            $DLG_caption_misure  = STR($DLG_misure)
            $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
         }

         if( $DLG_rettangolare_air==1 )
         {
            $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x368")
            $DLG_caption_misure  = STR($DLG_misure)
            $DLG_value_misure    = STRCAT(STR($DLG_misure),"x368")
         }

         if( $DLG_lombare_air==1 )
         {
           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x322")
           $DLG_caption_misure  = STRCAT( STR($DLG_misure),"x322" )
           $DLG_value_misure    = STRCAT( STR($DLG_misure),"x322" )
         }
      ]
   }

   Check chkDoppiaFinit
   {
     Caption = MSG(1357)
     Hint    = MSG(1358)
     Enable  = 1
     Value   = $DLG_doppia_finitura

     Placement
     {
        posx = 670
        posy = 190
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if( $DLG_doppia_finitura==1 )
        {
           $DLG_doppia_finitura = 1
        }
        else
        {
           $DLG_doppia_finitura = 0

           $DLG_rivestimento_i   = $DLG_rivestimento_e
           $DLG_COLORE_AIR2      = $DLG_COLORE_AIR
           $DLG_descrizione_var2 = $DLG_descrizione_var
           $DLG_image_file2      = $DLG_image_file

           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_i,"=",APICI(),$DLG_COLORE_AIR2,APICI()))
        }
     ]
   }
}

//18.09.2017 - Filippo - nuovo elemento cuscino lombare "piuma"
Dlg CuscPiuma
{
   Caption = MSG(2160)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 400
      dimy = 285
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 205
      }


      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = $DLG_enable_alt
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 225
         dimy = 205
      }

         Label LabFinitura
         {
            Caption = $DLG_descrizione_var1
            Value   = $DLG_descrizione_var1
            Hint    = $DLG_descrizione_var1

            Placement
            {
               posx = 10
               posy = 20
               dimx = 130
               dimy = 25
            }
         }

         Image Im1
         {
            Caption = $DLG_descrizione_var1
            Value   = $DLG_image_file1
            Hint    = $DLG_descrizione_var1

            Placement
            {
               posx =  75
               posy =  50
               dimx =  64
               dimy =  64
            }
         }


      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_enable_ignifu
        Value   = $DLG_value_ignifu

        Placement
        {
           posx = 10
           posy = 175
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_value_ignifu==1 )   {  $DLG_value_ignifu=0  }
           else                         {  $DLG_value_ignifu=1  }
        ]
      }

      }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         //posx = 135
         posx = 135
         //posy = 35
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI($DLG_idx_to_call,"X")
          $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR(VAR_VAL($DLG_idx_to_call,"X")))
          $DLG_caption_larghezza = STR(VAR_VAL($DLG_idx_to_call,"X"))
          $DLG_value_larghezza   = STR(VAR_VAL($DLG_idx_to_call,"X"))
        ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(631)
      Enable  = $DLG_enable_altezza


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"Y")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR(VAR_VAL($DLG_idx_to_call,"Y")))
        $DLG_caption_altezza = STR(VAR_VAL($DLG_idx_to_call,"Y"))
        $DLG_value_altezza   = STR(VAR_VAL($DLG_idx_to_call,"Y"))
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 220
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnFinitura1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)
      Enable = $DLG_ena_finitura

      Placement
      {
         posx = 200
         posy = 140
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $PREC_RS = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file

         $TMP_catTessuto = LEFT($DLG_VAL_COLORE,1)
         $DLG_enable_ignifu = 1
         if($TMP_catTessuto == "3" | $TMP_catTessuto == "8" | $TMP_catTessuto == "F")
         {
            $DLG_enable_ignifu = 0
            $DLG_value_ignifu = 0
         }

      ]
   }

}

Dlg AIR_Cuscino_P
{
   Caption = MSG(636)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 170
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 125
      }

      Edit Edtmisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(637)
        Hint    = MSG(638)
        Value   = MSG(637)
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Radio RdQuadrato
      {
        Caption = MSG(643)
        Hint    = MSG(643)
        Value   = $DLG_quadrato_air

        Placement
        {
           posx = 40
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 1
           $DLG_rettangolare_air = 0
           $DLG_lombare_air      = 0
           $DLG_enable_misure    = 1

           //controllo cambio di misure e assegno il default
           if($DLG_misure!=368 | $DLG_misure!=460 | $DLG_misure!=552 ) { $DLG_misure = 368 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAir")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
        ]
      }

      Radio RdRettang
      {
        Caption = MSG(644)
        Hint    = MSG(644)
        Value   = $DLG_rettangolare_air

        Placement
        {
           posx = 40
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 1
           $DLG_lombare_air      = 0

           $DLG_enable_misure    = 0

           $DLG_hint_misure     = STRCAT(MSG(637),"736x414")
           $DLG_caption_misure  = "736x414"
           $DLG_value_misure    = "736x414"
        ]
      }

      Radio RdLombare
      {
        Caption = MSG(645)
        Hint    = MSG(645)
        Value   = $DLG_lombare_air


        Placement
        {
           posx = 40
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 0
           $DLG_lombare_air      = 1
           $DLG_enable_misure    = 1


           //controllo cambio di misure e assegno il default
           if( $DLG_misure!=552 | $DLG_misure!=736 ) { $DLG_misure = 552 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAir3")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x322")
           $DLG_caption_misure  = STRCAT( STR($DLG_misure),"x322" )
           $DLG_value_misure    = STRCAT( STR($DLG_misure),"x322" )
        ]
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 135
         dimx = 150
         dimy = 70
      }

      Radio RdPiuma
      {
        Caption = MSG(661)
        Hint    = MSG(662)
        Value   = $DLG_val_opzione_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 1
           $DLG_val_opzione_2 = 0
        ]
      }

      Radio RdFibra
      {
        Caption = MSG(663)
        Hint    = MSG(664)
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 0
           $DLG_val_opzione_2 = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 235
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(639)
      Enable = $DLG_enable_misure

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_quadrato_air==1 )
         {
            $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
            $DLG_caption_misure  = STR($DLG_misure)
            $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
         }

         if( $DLG_rettangolare_air==1 )
         {
            $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x368")
            $DLG_caption_misure  = STR($DLG_misure)
            $DLG_value_misure    = STRCAT(STR($DLG_misure),"x368")
         }

         if( $DLG_lombare_air==1 )
         {
           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x322")
           $DLG_caption_misure  = STRCAT( STR($DLG_misure),"x322" )
           $DLG_value_misure    = STRCAT( STR($DLG_misure),"x322" )
         }
      ]
   }
}

//cuscino con bottoni
Dlg AIR_CuscinoB
{
   Caption = MSG(636)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 675
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit Edtmisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(637)
        Hint    = MSG(638)
        Value   = MSG(637)
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }


      Radio RdQuadrato
      {
        Caption = MSG(643)
        Hint    = MSG(643)
        Value   = $DLG_quadrato_air

        Placement
        {
           posx = 40
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 1
           $DLG_rettangolare_air = 0
           $DLG_enable_misure    = 1

           //controllo cambio di misure e assegno il default
           if($DLG_misure!=368 | $DLG_misure!=460 ) { $DLG_misure = 368 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAirB1")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))

        ]
      }

      Radio RdRettang
      {
        Caption = MSG(644)
        Hint    = MSG(644)
        Value   = $DLG_rettangolare_air

        Placement
        {
           posx = 40
           posy = 70
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 1
           $DLG_enable_misure    = 1

           //controllo cambio di misure e assegno il default
           if($DLG_misure!=460 | $DLG_misure!=552 ) { $DLG_misure = 460 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAirB2")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR(368))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR(368))
        ]
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 70
      }

      Radio RdPiuma
      {
        Caption = MSG(661)
        Hint    = MSG(662)
        Value   = $DLG_val_opzione_1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 1
           $DLG_val_opzione_2 = 0

           if( $DLG_rivestimento==7 & $DLG_outdoor==1 )
           {
              $DLG_var_to_call = $DLG_var_to_call_1

              $DLG_rivestimento = 1

              $DLG_value_rd_uso_1 = 1
              $DLG_value_rd_uso_2 = 0
              $DLG_value_rd_uso_3 = 0
              $DLG_value_rd_uso_4 = 0
              $DLG_value_rd_uso_5 = 0
              $DLG_value_rd_uso_6 = 0
              $DLG_value_rd_uso_7 = 0
              $DLG_value_rd_uso_8 = 0
              $DLG_value_rd_uso_16 = 0
              $DLG_value_rd_uso_20 = 0
              $DLG_value_rd_uso_21 = 0
              $DLG_value_rd_uso_22 = 0
              $DLG_value_rd_uso_23 = 0
              $DLG_value_rd_uso_24 = 0
              $DLG_value_rd_uso_25 = 0
              $DLG_value_rd_uso_26 = 0
              $DLG_value_rd_uso_27 = 0

              $DLG_COLORE_AIR  = "J21"

              //rob_pec 18/04/2011. attivo check ignifugazione
              $DLG_ignifugazione_enable = 1

              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call,"=",APICI(),$DLG_COLORE_AIR,APICI()))

              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
              GOSUB Get_Image_DivaniAir
           }

           //gestione del filtro per imbottitura
           $DLG_outdoor = 0
        ]
      }

      Radio RdFibra
      {
        Caption = MSG(663)
        Hint    = MSG(664)
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 0
           $DLG_val_opzione_2 = 1

           //gestione del filtro per imbottitura
           $DLG_outdoor = 1
        ]
      }

   }

   // Eugenio 12.11.12 Spostata ignifugazione per far posto a nuovo tessuto
   Frame FrmChk
   {
      //Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 190
         dimx = 150
         dimy = 35
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 15
           posy = 10
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 495
         dimy = 210
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           if( $DLG_ignifugazione==1 )    { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------

           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
           if( $DLG_ignifugazione==1 )  { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7
        Enable  = $DLG_outdoor

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      // Eugenio 12.11.12: GEST_RZ tessuto et voila
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. sattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
            //rob_pec 18/04/2011. attivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

//OLD110607      //Check chkOutdoor
//OLD110607      Label chkOutdoor
//OLD110607      {
//OLD110607        Caption = $DLG_caption_outdoor
//OLD110607        Hint    = $DLG_hint_outdoor
//OLD110607        Value   = $DLG_value_outdoor
//OLD110607
//OLD110607        Font
//OLD110607        {
//OLD110607           size  = 12
//OLD110607           type  = 1
//OLD110607           color = 255
//OLD110607        }
//OLD110607
//OLD110607        Placement
//OLD110607        {
//OLD110607           posx = 160
//OLD110607           posy = 180
//OLD110607           dimx = 130
//OLD110607           dimy = 20
//OLD110607        }
//OLD110607      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 300
            posy = 18
            dimx = 195
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
         posy = 235
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
         posy = 235
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [

        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(639)
      Enable = $DLG_enable_misure

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        if( $DLG_quadrato_air==1 )
        {
           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
        }

        if( $DLG_rettangolare_air==1 )
        {
           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR(368))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR(368))
        }
      ]
   }
}

Dlg AIR_CuscinoB_P
{
   Caption = MSG(636)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 170
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit Edtmisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(637)
        Hint    = MSG(638)
        Value   = MSG(637)
        Enable  = $DLG_enable_misure

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }


      Radio RdQuadrato
      {
        Caption = MSG(643)
        Hint    = MSG(643)
        Value   = $DLG_quadrato_air

        Placement
        {
           posx = 40
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 1
           $DLG_rettangolare_air = 0
           $DLG_enable_misure    = 1

           //controllo cambio di misure e assegno il default
           if($DLG_misure!=368 | $DLG_misure!=460 ) { $DLG_misure = 368 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAirB1")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))

        ]
      }

      Radio RdRettang
      {
        Caption = MSG(644)
        Hint    = MSG(644)
        Value   = $DLG_rettangolare_air

        Placement
        {
           posx = 40
           posy = 70
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_quadrato_air     = 0
           $DLG_rettangolare_air = 1
           $DLG_enable_misure    = 1

           //controllo cambio di misure e assegno il default
           if($DLG_misure!=460 | $DLG_misure!=552 ) { $DLG_misure = 460 }

           //cambio il menu
           VAR_CREATE_NUM(-1,"DLG_misure",$DLG_misure,2,"XYCusAirB2")

           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR(368))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR(368))
        ]
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 70
      }

      Radio RdPiuma
      {
        Caption = MSG(661)
        Hint    = MSG(662)
        Value   = $DLG_val_opzione_1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 1
           $DLG_val_opzione_2 = 0
        ]
      }

      Radio RdFibra
      {
        Caption = MSG(663)
        Hint    = MSG(664)
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 0
           $DLG_val_opzione_2 = 1
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 235
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(639)
      Enable = $DLG_enable_misure

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        if( $DLG_quadrato_air==1 )
        {
           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR($DLG_misure))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR($DLG_misure))
        }

        if( $DLG_rettangolare_air==1 )
        {
           $DLG_hint_misure     = STRCAT(MSG(637),STR($DLG_misure),"x",STR(368))
           $DLG_caption_misure  = STR($DLG_misure)
           $DLG_value_misure    = STRCAT(STR($DLG_misure),"x",STR(368))
        }
      ]
   }
}

//cuscino con fascia
Dlg AIR_CuscinoF
{
   Caption = MSG(636)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 670
//      dimy = 300
//      dimy = 340
      dimy = 380
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 90
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 105
         dimx = 150
         dimy = 70
      }

      Radio RdPiuma
      {
        Caption = MSG(661)
        Hint    = MSG(662)
        Value   = $DLG_val_opzione_1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 1
           $DLG_val_opzione_2 = 0

           if( $DLG_rivestimento==7 & $DLG_outdoor==1 )
           {
              $DLG_var_to_call = $DLG_var_to_call_1

              $DLG_rivestimento = 1

              $DLG_value_rd_uso_1 = 1
              $DLG_value_rd_uso_2 = 0
              $DLG_value_rd_uso_3 = 0
              $DLG_value_rd_uso_4 = 0
              $DLG_value_rd_uso_5 = 0
              $DLG_value_rd_uso_6 = 0
              $DLG_value_rd_uso_7 = 0
              $DLG_value_rd_uso_8 = 0
              $DLG_value_rd_uso_16 = 0
              $DLG_value_rd_uso_20 = 0
              $DLG_value_rd_uso_21 = 0
              $DLG_value_rd_uso_22 = 0
              $DLG_value_rd_uso_23 = 0
              $DLG_value_rd_uso_24 = 0
              $DLG_value_rd_uso_25 = 0
              $DLG_value_rd_uso_26 = 0
              $DLG_value_rd_uso_27 = 0
              // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
              $DLG_value_rd_uso_28 = 0
              $DLG_value_rd_uso_29 = 0
              $DLG_value_rd_uso_30 = 0

              $DLG_COLORE_AIR  = "J21"

              //rob_pec 18/04/2011. attivo check ignifugazione
              $DLG_ignifugazione_enable = 1

              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call,"=",APICI(),$DLG_COLORE_AIR,APICI()))

              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
              GOSUB Get_Image_DivaniAir
           }

           //gestione del filtro per imbottitura
           $DLG_outdoor = 0
         ]
      }

      Radio RdFibra
      {
        Caption = MSG(663)
        Hint    = MSG(664)
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 0
           $DLG_val_opzione_2 = 1

           //gestione del filtro per imbottitura
           $DLG_outdoor = 1
        ]
      }

   }

   // Eugenio 12.11.12 Sposto l'ignifugazione per far spazio nuovo tessuto
   Frame FrmChk
   {
      //Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 180
         dimx = 150
         dimy = 40
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 15
           posy = 10
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
//         dimx = 495
         dimx = 475
//         dimy = 210
//         dimy = 230
         dimy = 270
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           if( $DLG_ignifugazione==1 )    { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
           if( $DLG_ignifugazione==1 )  { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7
        Enable  = $DLG_outdoor

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      // Eugenio 12.11.12: Variante GEST_RZ tessuto et voila
      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           //rob_pec 18/04/2011. attivo check ignifugazione
            //rob_pec 18/04/2011. attivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           // 11/07/2018 - Emanuele - Modifico il comando perch si sta cercando di fixare una variabile globale
           // cercandola nell'idx dell'elemento attuale
//           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_R9=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 10/01/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           // 03/05/2019 - Emanuele - Aggiungo controllo per la gestione dell'ignifugo del tessuto per Regno Unito
           if(IS_MATCH($TST_Destinazione,"UK*")==1) { $DLG_ignifugazione_enable = 1 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 29/10/2019 - Emanuele - Aggiungo radiobutton per la gestione dei tessuti Barkley/Axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           // 03/05/2019 - Emanuele - Aggiungo controllo per la gestione dell'ignifugo del tessuto per Regno Unito
           if(IS_MATCH($TST_Destinazione,"UK*")==1) { $DLG_ignifugazione_enable = 1 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32

        Placement
        {
           posx = 160
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           // 03/05/2019 - Emanuele - Aggiungo controllo per la gestione dell'ignifugo del tessuto per Regno Unito
           if(IS_MATCH($TST_Destinazione,"UK*")==1) { $DLG_ignifugazione_enable = 1 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1
           // 03/05/2019 - Emanuele - Aggiungo controllo per la gestione dell'ignifugo del tessuto per Regno Unito
           if(IS_MATCH($TST_Destinazione,"UK*")==1) { $DLG_ignifugazione_enable = 1 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

//OLD110607      //Check chkOutdoor
//OLD110607      Label chkOutdoor
//OLD110607      {
//OLD110607        Caption = $DLG_caption_outdoor
//OLD110607        Hint    = $DLG_hint_outdoor
//OLD110607        Value   = $DLG_value_outdoor
//OLD110607
//OLD110607        Font
//OLD110607        {
//OLD110607           size  = 12
//OLD110607           type  = 1
//OLD110607           color = 255
//OLD110607        }
//OLD110607
//OLD110607        Placement
//OLD110607        {
//OLD110607           posx = 160
//OLD110607           posy = 180
//OLD110607           dimx = 130
//OLD110607           dimy = 20
//OLD110607        }
//OLD110607      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 300
            posy = 18
            dimx = 195
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 235
//         posy = 255
         posy = 295
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 235
//         posy = 255
         posy = 295
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        //GOSUB Get_Image_GestAir
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR($DLG_altezza))
        $DLG_caption_altezza  = STR($DLG_altezza)
        $DLG_value_altezza    = STR($DLG_altezza)
      ]
   }
}

Dlg AIR_CuscinoF_P
{
   Caption = MSG(636)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 170
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 90
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 105
         dimx = 150
         dimy = 70
      }

      Radio RdPiuma
      {
        Caption = MSG(661)
        Hint    = MSG(662)
        Value   = $DLG_val_opzione_1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 1
           $DLG_val_opzione_2 = 0
         ]
      }

      Radio RdFibra
      {
        Caption = MSG(663)
        Hint    = MSG(664)
        Value   = $DLG_val_opzione_2

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_val_opzione_1 = 0
           $DLG_val_opzione_2 = 1
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 235
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR($DLG_altezza))
        $DLG_caption_altezza  = STR($DLG_altezza)
        $DLG_value_altezza    = STR($DLG_altezza)
      ]
   }
}

Dlg AIR_Schiena
{
   Caption = MSG(635)

   Placement
   {
      posx = 150
      posy = 150
//      dimx = 675
      dimx = 685
//      dimy = 300
//      dimy = 340
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 80
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmPosizionamento
   {
      Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 90
         dimx = 150
         dimy = 50
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 80
           posy = 20
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   // Riccardo 28/09/11: Aggiungo frame per inserire l'etichetta e gestirla da dialog
   Frame frmEtichetta
   {
      Caption = MSG(671)

      Placement
      {
         posx = 10
         posy = 145
         dimx = 150
         dimy = 60
      }

      Check chkEtiPOE
      {
        Caption = MSG(672)
        Hint    = MSG(672)
        Value   = $DLG_POE

        Placement
        {
           posx = 15
           posy = 15
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_POE==1 )   {  $DLG_POE=1  }
           else                {  $DLG_POE=0  }
        ]
      }

      Check chkEtiPOF
      {
        Caption = MSG(673)
        Hint    = MSG(673)
        Value   = $DLG_POF

        Placement
        {
           posx = 15
           posy = 35
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_POF==1 )   {  $DLG_POF=1  }
           else                {  $DLG_POF=0  }
        ]
      }

   }

   // Eugenio 12.11.12 Sposto ignifugazione per far posto nuova finitura
   Frame frmChk
   {
      //Caption = MSG(671)

      Placement
      {
         posx = 10
         posy = 210
         dimx = 150
         dimy = 30
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 10
           posy = 5
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 500
//         dimy = 210
//         dimy = 230
         dimy = 270
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           if( $DLG_ignifugazione==1 )    { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle


        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
           if( $DLG_ignifugazione==1 )  { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = MSG(655)
           $DLG_value_outdoor   = MSG(655)
           $DLG_hint_outdoor    = MSG(656)
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // Eugenio 12.11.12 : "Tessuto et voila" GEST_RZ
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           // attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
            //rob_pec 18/04/2011. attivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 07/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 08/01/2019 - Emanuele - Aggiungo altri radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 29/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 29/10/2019 - Emanuele - Aggiungo radiobutton per i tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }


      //Check chkOutdoor
      Label chkOutdoor
      {
        Caption = $DLG_caption_outdoor
        Hint    = $DLG_hint_outdoor
        Value   = $DLG_value_outdoor

        Font
        {
           size  = 12
           type  = 1
           color = 255
        }

        Placement
        {
           posx = 310
           posy = 185
           dimx = 130
           dimy = 20
        }
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy = 18
            dimx = 200
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 240
//         posy = 260
         posy = 290
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 240
//         posy = 260
         posy = 290
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR($DLG_altezza))
        $DLG_caption_altezza  = STR($DLG_altezza)
        $DLG_value_altezza    = STR($DLG_altezza)
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }
}

//28.08.2017 - Filippo - Dialog per nuove testiere WW
Dlg AIR_SchienaWW
{
   Caption = MSG(635)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      //dimy = 295
      dimy = 325
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 120
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable = $DLG_ena_Y

        Placement
        {
           posx = 80
           posy = 75
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(626)
        Hint    = MSG(634)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita
        //18.07.2017 - Filippo - Specifiche tecniche cambiate. Disponibile solo con spessore 50
        Enable = $DLG_ena_Z

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmSbordo
   {
      Caption = MSG(2316)

      Placement
      {
         posx = 10
         posy = 130
         dimx = 150
         dimy = 120
      }

      Radio rdNoSbordo
      {
        Caption = MSG(226)
        Hint    = MSG(226)
        Enable  = 1
        Value   = $DLG_radio1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_ena_offset = 0
           $DLG_ena_rientro = 1
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," verso_sbordo=0"))
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_offset=0"))
           $DLG_hint_offset     = STRCAT(MSG(657),STR(VAR_VAL($DLG_idx_to_call,"VAR_offset")))
           $DLG_caption_offset  = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
           $DLG_value_offset    = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
        ]
      }

      Radio rdSbordoSX
      {
        Caption = MSG(692)
        Hint    = MSG(692)
        Enable  = 1
        Value   = $DLG_radio2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_ena_offset = 1
            $DLG_ena_rientro = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," verso_sbordo=1"))

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_offset=184"))
            $DLG_hint_offset     = STRCAT(MSG(657),STR(VAR_VAL($DLG_idx_to_call,"VAR_offset")))
            $DLG_caption_offset  = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
            $DLG_value_offset    = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," delta_x_sx=0"))
            $DLG_hint_rientro     = STRCAT(MSG(657),STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx")))
            $DLG_caption_rientro  = STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx"))
            $DLG_value_rientro    = STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx"))
        ]
      }

      Radio rdSbordoDX
      {
        Caption = MSG(693)
        Hint    = MSG(693)
        Enable  = 1
        Value   = $DLG_radio3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_ena_offset = 1
            $DLG_ena_rientro = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," verso_sbordo=2"))

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," VAR_offset=184"))
            $DLG_hint_offset     = STRCAT(MSG(657),STR(VAR_VAL($DLG_idx_to_call,"VAR_offset")))
            $DLG_caption_offset  = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
            $DLG_value_offset    = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))

            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," delta_x_sx=0"))
            $DLG_hint_rientro     = STRCAT(MSG(657),STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx")))
            $DLG_caption_rientro  = STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx"))
            $DLG_value_rientro    = STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx"))
        ]
      }
   }

   Frame FrmOffset
   {
      Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 210
         dimx = 150
         dimy = 80
      }


      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset
        Enable  = $DLG_ena_offset

        Placement
        {
           posx = 80
           posy = 20
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtRientro
      {
        Caption = $DLG_caption_rientro
        Hint    = $DLG_hint_rientro
        Value   = $DLG_value_rientro
        Enable  = $DLG_ena_rientro

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblRientro
      {
        Caption = MSG(2311)
        Hint    = MSG(2311)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 155
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 18
            dimx = 200
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FrmDelete
   {
      Caption = MSG(3305)

      Placement
      {
         posx = 165
         posy = 185
         dimx = 155
         dimy = 40
      }

      Check chkElimina
      {
        Caption = MSG(3304)
        Hint    = MSG(3304)
        Enable  = 1
        Value   = $DLG_checkfordelete

        Placement
        {
           posx = 20
           posy = 15
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_checkfordelete==1)
           {
              $DLG_checkfordelete = 1
           }
           else
           {
              $DLG_checkfordelete = 0
           }
        ]

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 255
         posy = 240
         dimx = 65
         dimy = 40
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 175
         posy = 240
         dimx = 80
         dimy = 40
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 150
         dimx = 125
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
        $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
        $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_GE")
        GOSUB Get_Image_Opaco
        //$DLG_image_file = $DLG_image_file
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"X")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR(VAR_VAL($DLG_idx_to_call,"X")))
        $DLG_caption_larghezza = STR(VAR_VAL($DLG_idx_to_call,"X"))
        $DLG_value_larghezza   = STR(VAR_VAL($DLG_idx_to_call,"X"))

        if( VAR_VAL($DLG_idx_to_call,"X") >= 1104 & VAR_VAL($DLG_idx_to_call,"X") <= 1288 )  {  VAR_SET_MENU($DLG_idx_to_call,"VAR_offset","OffsSchWW(1-184)")  }
        if( VAR_VAL($DLG_idx_to_call,"X") >= 1472 & VAR_VAL($DLG_idx_to_call,"X") <= 1656 )  {  VAR_SET_MENU($DLG_idx_to_call,"VAR_offset","OffsSchWW(1-368)")  }
        if( VAR_VAL($DLG_idx_to_call,"X") >= 1840 & VAR_VAL($DLG_idx_to_call,"X") <= 2944 )  {  VAR_SET_MENU($DLG_idx_to_call,"VAR_offset","OffsSchWW(1-552)")  }

      ]
   }

   Button btnProfondita
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)
      //18.07.2017 - Filippo - Specifiche tecniche cambiate. Disponibile solo con spessore 50
      Enable = $DLG_ena_Z

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"Z")
        $DLG_hint_profondita     = STRCAT(MSG(629),STR(VAR_VAL($DLG_idx_to_call,"Z")))
        $DLG_caption_profondita  = STR(VAR_VAL($DLG_idx_to_call,"Z"))
        $DLG_value_profondita    = STR(VAR_VAL($DLG_idx_to_call,"Z"))
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)
      Enable = $DLG_ena_Y

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"Y")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR(VAR_VAL($DLG_idx_to_call,"Y")))
        $DLG_caption_altezza  = STR(VAR_VAL($DLG_idx_to_call,"Y"))
        $DLG_value_altezza    = STR(VAR_VAL($DLG_idx_to_call,"Y"))
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)
      Enable  = $DLG_ena_offset

      Placement
      {
         posx = 135
         posy = 230
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"VAR_offset")
        while(VAR_VAL($DLG_idx_to_call,"verso_sbordo") > 0 & VAR_VAL($DLG_idx_to_call,"VAR_offset") == 0)
        {
           DISPLAY2(MSG(2142))
           CHIEDI($DLG_idx_to_call,"VAR_offset")
        }

        $DLG_hint_offset     = STRCAT(MSG(657),STR(VAR_VAL($DLG_idx_to_call,"VAR_offset")))
        $DLG_caption_offset  = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
        $DLG_value_offset    = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
      ]
   }

   Button btnRientro
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(2311)
      Enable  = $DLG_ena_rientro

      Placement
      {
         posx = 135
         posy = 260
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"delta_x_sx")

        $DLG_hint_rientro     = STRCAT(MSG(2311),STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx")))
        $DLG_caption_rientro  = STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx"))
        $DLG_value_rientro    = STR(VAR_VAL($DLG_idx_to_call,"delta_x_sx"))
      ]
   }

}

//======================================================================================

Dlg AIR_SchienaLib
{
   Caption = MSG(635)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 675
//      dimy = 265
//      dimy = 305
      dimy = 345
//OLD110608      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 85
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 80
           posy = 50
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmPosizionamento
   {
      Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 95
         dimx = 150
         dimy = 55
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   // Riccardo 28/09/11: Aggiungo frame per inserire l'etichetta e gestirla da dialog
   Frame frmEtichetta
   {
      Caption = MSG(671)

      Placement
      {
         posx = 10
         posy = 160
         dimx = 150
         dimy = 60
      }

      Check chkEtiPOE
      {
        Caption = MSG(672)
        Hint    = MSG(672)
        Value   = $DLG_POE

        Placement
        {
           posx = 20
           posy = 15
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_POE==1 )   {  $DLG_POE=1  }
           else                {  $DLG_POE=0  }
        ]
      }

      Check chkEtiPOF
      {
        Caption = MSG(673)
        Hint    = MSG(673)
        Value   = $DLG_POF

        Placement
        {
           posx = 20
           posy = 35
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_POF==1 )   {  $DLG_POF=1  }
           else                {  $DLG_POF=0  }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 500
//         dimy = 185
//         dimy = 215
         dimy = 255
//OLD110608         dimy = 210
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
           if( $DLG_ignifugazione==1 )  { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(667)
        Hint    = MSG(668)
        Value   = $DLG_value_rd_uso_7

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      // Eugenio 12.11.12: tessuto et voila GEST_RZ
      // Eugenio 24.04.13: non esiste tessuto et voil su schienale libreria
      //Radio Rd9
      //{
      //  Caption = MSG(1390)
      //  Hint    = MSG(1390)
      //  Value   = $DLG_value_rd_uso_16
      //  Enable  = 0
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 135
      //     dimx = 120
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     $DLG_var_to_call = $DLG_var_to_call_16
      //
      //     $DLG_rivestimento   = 16
      //     $DLG_value_rd_uso_1 = 0
      //     $DLG_value_rd_uso_2 = 0
      //     $DLG_value_rd_uso_3 = 0
      //     $DLG_value_rd_uso_4 = 0
      //     $DLG_value_rd_uso_5 = 0
      //     $DLG_value_rd_uso_6 = 0
      //     $DLG_value_rd_uso_7 = 0
      //     $DLG_value_rd_uso_8 = 0
      //     $DLG_value_rd_uso_16 = 1
      //
      //     // disattivo outdoor
      //     $DLG_outdoor = 0
      //
      //     // attivo ignifugazione automatica
      //     // per ecopelle ignifuga
      //     if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
      //
      //     // ---------------------------------------------------------
      //     // controllo affinch non venga settato un valore nullo (NO*)
      //     // ---------------------------------------------------------
      //     $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
      //     $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
      //
      //     while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
      //     {
      //        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
      //        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
      //     }
      //     // ---------------------------------------------------------
      //
      //     $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
      //     GOSUB Get_Image_DivaniAir
      //  ]
      //}

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           //$DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 12/02/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 12/02/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 07/01/2019 - Emanuele - Aggiungo radiobutton per la selezione delle nuove finiture
      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 13/11/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      // 13/11/2019 - Emanuele - Aggiungo radiobutton per la gestione dei tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }
      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33
        Enable  = $AbilitaTessutiNuovi

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }


//OLD110608      Bevel Bvl1
//OLD110608      {
//OLD110608        Placement
//OLD110608        {
//OLD110608           posx = 20
//OLD110608           posy = 170
//OLD110608           dimx = 240
//OLD110608           dimy = 2
//OLD110608        }
//OLD110608      }
//OLD110608
//OLD110608      Check chkIgnifug
//OLD110608      {
//OLD110608        Caption = MSG(613)
//OLD110608        Hint    = MSG(614)
//OLD110608        Enable  = $DLG_ignifugazione_enable
//OLD110608        Value   = $DLG_ignifugazione
//OLD110608
//OLD110608        Placement
//OLD110608        {
//OLD110608           posx = 50
//OLD110608           posy = 180
//OLD110608           dimx = 100
//OLD110608           dimy = 20
//OLD110608        }
//OLD110608
//OLD110608        OnClick
//OLD110608        [
//OLD110608           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
//OLD110608           else                          {  $DLG_ignifugazione=0  }
//OLD110608        ]
//OLD110608      }
//OLD110608
//OLD110608      //Check chkOutdoor
//OLD110608      Label chkOutdoor
//OLD110608      {
//OLD110608        Caption = $DLG_caption_outdoor
//OLD110608        Hint    = $DLG_hint_outdoor
//OLD110608        Value   = $DLG_value_outdoor
//OLD110608
//OLD110608        Font
//OLD110608        {
//OLD110608           size  = 12
//OLD110608           type  = 1
//OLD110608           color = 255
//OLD110608        }
//OLD110608
//OLD110608        Placement
//OLD110608        {
//OLD110608           posx = 160
//OLD110608           posy = 180
//OLD110608           dimx = 130
//OLD110608           dimy = 20
//OLD110608        }
//OLD110608      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy = 18
            dimx = 200
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//OLD110608         posy = 240
//         posy = 205
//         posy = 235
         posy = 275
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//OLD110608         posy = 240
//         posy = 205
//         posy = 235
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR($DLG_altezza))
        $DLG_caption_altezza  = STR($DLG_altezza)
        $DLG_value_altezza    = STR($DLG_altezza)

        //assegno le corrette misure di default e i men
        if( $DLG_altezza==184 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza","XSchLAir1")

           if( $DLG_larghezza!=644 & $DLG_larghezza!=736 & $DLG_larghezza!=828 & $DLG_larghezza!=920 )
           {
              $DLG_larghezza = 644
           }
        }

        if( $DLG_altezza==368 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza","XSchLAir2")

           if( $DLG_larghezza!=828 & $DLG_larghezza!=920 )
           {
              $DLG_larghezza = 828
           }
        }

        if( $DLG_altezza==460 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza","XSchLAir3")

           if( $DLG_larghezza!=920 & $DLG_larghezza!=1104 )
           {
              $DLG_larghezza = 920
           }
        }

        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)

      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 135
         posy = 120
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }

}

Dlg AIR_Telaio
{
   Caption = MSG(628)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 195
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 135
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 20
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 80
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 20
           posy = 55
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 80
           posy = 75
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(634)
        Value   = MSG(626)

        Placement
        {
           posx = 20
           posy = 80
           dimx = 80
           dimy = 20
        }
      }

      Check chkMetallo
      {
        Caption = MSG(675)
        Hint    = MSG(676)
        Value   = $DLG_Metallo

        Placement
        {
           posx = 30
           posy = 105
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_Metallo==1 )  {  $DLG_Metallo=1  }
           else                   {  $DLG_Metallo=0  }
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 155
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 155
         dimx = 85
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)

      Placement
      {
         posx = 140
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")

        //LZ 17/04/2019 - Controllo sulla larghezza/altezza per settare il menu corretto delle profondit
        $cond=0
        if($DLG_larghezza==1104 | $DLG_larghezza==1472) {$cond=$cond+1}
        if($DLG_altezza==276 | $DLG_altezza==414) {$cond=$cond+1}
        if($cond == 2)
        {
           VAR_SET_MENU(-1,"DLG_profondita",STRCAT("ZTelAir",STR($DLG_larghezza)))
           if($DLG_larghezza==1472 & ($DLG_profondita==1104 | $DLG_profondita>1288)) {$DLG_profondita=1288}
           if($DLG_larghezza==1104 & $DLG_profondita>1104) {$DLG_profondita=1104}
        }
        else
        {
           VAR_SET_MENU(-1,"DLG_profondita","ZTelAir1")
           if($DLG_profondita>920) {$DLG_profondita=920}
        }

        $DLG_hint_altezza     = STRCAT(MSG(629),STR($DLG_altezza))
        $DLG_caption_altezza  = STR($DLG_altezza)
        $DLG_value_altezza    = STR($DLG_altezza)
      ]
   }

   Button btnProfondita
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(623)

      Placement
      {
         posx = 140
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")

        //LZ 17/04/2019 - Controllo sulla larghezza/altezza per settare il menu corretto delle profondit
        $cond=0
        if($DLG_larghezza==1104 | $DLG_larghezza==1472) {$cond=$cond+1}
        if($DLG_altezza==276 | $DLG_altezza==414) {$cond=$cond+1}
        if($cond == 2)
        {
           VAR_SET_MENU(-1,"DLG_profondita",STRCAT("ZTelAir",STR($DLG_larghezza)))
           if($DLG_larghezza==1472 & ($DLG_profondita==1104 | $DLG_profondita>1288)) {$DLG_profondita=1288}
           if($DLG_larghezza==1104 & $DLG_profondita>1104) {$DLG_profondita=1104}
        }
        else
        {
           VAR_SET_MENU(-1,"DLG_profondita","ZTelAir1")
           if($DLG_profondita>920) {$DLG_profondita=920}
        }
        $DLG_hint_profondita    = STRCAT(MSG(626),STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 140
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")

         //LZ 16/04/2019 - Abilito le dimensioni 1104x1104 e 1472x1288
//        if( $DLG_larghezza<=2576 )
//        {
//           VAR_SET_MENU(-1,"DLG_profondita","ZTelAir1")
//        }
//
//        if( $DLG_larghezza>2576 & $DLG_larghezza<=3312 )
//        {
//           VAR_SET_MENU(-1,"DLG_profondita","ZTelAir2")
//
//           //se la misura corrente non corrisponde, assegno un default
//           if( $DLG_profondita>1104 )
//           {
//              $DLG_profondita = 598
//           }
//        }
//
//        if( $DLG_larghezza>3312 & $DLG_larghezza<=4048 )
//        {
//           VAR_SET_MENU(-1,"DLG_profondita","ZTelAir3")
//
//           //se la misura corrente non corrisponde, assegno un default
//           if( $DLG_profondita>920 )
//           {
//              $DLG_profondita = 598
//           }
//        }

        //LZ 17/04/2019 - Controllo sulla larghezza/altezza per settare il menu corretto delle profondit
        $cond=0
        if($DLG_larghezza==1104 | $DLG_larghezza==1472) {$cond=$cond+1}
        if($DLG_altezza==276 | $DLG_altezza==414) {$cond=$cond+1}
        if($cond == 2)
        {
           VAR_SET_MENU(-1,"DLG_profondita",STRCAT("ZTelAir",STR($DLG_larghezza)))
           if($DLG_larghezza==1472 & ($DLG_profondita==1104 | $DLG_profondita>1288)) {$DLG_profondita=1288}
           if($DLG_larghezza==1104 & $DLG_profondita>1104) {$DLG_profondita=1104}
        }
        else
        {
           VAR_SET_MENU(-1,"DLG_profondita","ZTelAir1")
           if($DLG_profondita>920) {$DLG_profondita=920}
        }

        $DLG_hint_larghezza     = STRCAT(MSG(624),STR($DLG_larghezza))
        $DLG_caption_larghezza  = STR($DLG_larghezza)
        $DLG_value_larghezza    = STR($DLG_larghezza)

        $DLG_hint_profondita    = STRCAT(MSG(626),STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)

      ]
   }
}
//***************************************************

Dlg Twins
{
   Caption = MSG(979)
   Placement
   {
      posx = 150
      posy = 150
      //12.06.2017 - Filippo - Modifico dialog in previsione della doppia finitura
      //dimx = 180
      dimx = 325
      //dimy = 265
      dimy = 235
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //12.06.2017 - Filippo - Modifico dialog in previsione della doppia finitura
   Frame Finitura_2
   {
      Caption = MSG(284)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 10
         //12.06.2017 - Filippo - Modifico dialog in previsione della doppia finitura
         //posx = 95
         posx = 240
         posy = 170
         //dimx = 55
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         // Fabrizio 24/08/09 - standard win
         //posx = 70
         //12.06.2017 - Filippo - Modifico dialog in previsione della doppia finitura
         //posx = 10
         posx = 155
         posy = 170
         //dimx = 90
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_TWINS")
         $DLG_COLORE_TWINS_DX = $DLG_COLORE_TWINS
         $DLG_image_file2   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_TWINS,".bmp")
         $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_TWINS,"colori_tutti.txt")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_TWINS_DX,"colori_tutti.txt")
         GOSUB Get_Image_Twins
      ]
   }
   //12.06.2017 - Filippo - Modifico dialog in previsione della doppia finitura
   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_TWINS_DX")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_TWINS_DX,"colori_tutti.txt")
         $DLG_image_file2   = STRCAT("%install_dir_pers%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_TWINS_DX,".bmp")
         $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)
      ]
   }
}


Dlg Punto
{
   Caption = MSG(980)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 485
//      dimy = 310
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 215
      }

      Image Im0
      {
         Caption = $DLG_tipologia_punto
         Value   = $DLG_image_file2
         Hint    = $DLG_tipologia_punto

         Placement
         {
            posx =  10
            posy =  20
            dimx =  155
            dimy =  155
         }
      }

   }

   Frame Finitura
   {
      Caption = MSG(982)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura2
   {
      Caption = MSG(983)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
//         dimy = 215
         dimy = 255
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 20
           posy = 130
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           // 10/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//           GOSUB Get_Image_Punto1
           $DLG_COLORE_368_L = "BCO"
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           $DLG_COLORE_368_O = $DLG_COLORE_368_L
           $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_368_L

           GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_368_L")
           // 10/09/2018 - Emanuele - Aggiungo assegnazione per cambiare la descrizione della finitura quando
           // si cambia il colore tra vetro normale e vetro Xglass
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")

           // 28/09/2018 - Emanuele - Modifico la condizione poich vengono usate variabili della vecchia gestione.
//           if( STRCMP($DLG_COLORE_PUNTO_ANT_L,"ARG")!=0 )
//           {
//              $DLG_COLORE_PUNTO_ANT_O = $DLG_COLORE_PUNTO_ANT_L
//              $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_ANT_O,"colori_tutti.txt")
//           }
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 20
           posy = 150
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           // 10/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           // 28/09/2018 - Emanuele - Commento assegnazione della variabile del colore e quella della descrizione perch utilizzano
           // variabili della vecchia gestione
//           $DLG_COLORE_PUNTO_ANT_O = $DLG_COLORE_PUNTO_ANT_L
//           // 10/09/2018 - Emanuele - Aggiungo assegnazione per modificare la descrizione della finitura quando
//           // si cambia da vetro normale a vetro XGlass
//           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_ANT_O,"colori_tutti.txt")
           $DLG_COLORE_368_O = "BCO"
           $DLG_COLORE_368 = $DLG_COLORE_368_O
           $DLG_COLORE_368_L = $DLG_COLORE_368_O
           $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_368_O

           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
           // 28/09/2018 - Emanuele - Commento questa assegnazione perch non ha senso. Se si entra in questa sezione del codice
           // vuol dire che il radiobutton per la finitura Opaco  gi abilitata e quindi non serve riabilitarla
//           $DLG_enable_rd_opaco = 1
           // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//           GOSUB Get_Image_Punto1
           GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_368_O")

        ]
      }

      // 10/09/2018 - Emanuele - Aggiungo radiobutton per la scelta di finitura XGlass lucido
      Radio RdXGlassL
      {
        Caption = $DLG_caption_lucido_xglass
        Hint    = $DLG_caption_lucido_xglass
        Value   = $DLG_value_lucido_xglass

        Placement
        {
           posx = 20
           posy = 170
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           // 10/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass = 0
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           $DLG_COLORE_XGLASS = "MR1"
           $DLG_COLORE_368 = $DLG_COLORE_XGLASS
           $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR

           // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//           GOSUB Get_Image_XGlass1
           GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")

        ]
      }

      // 10/09/2018 - Emanuele - Aggiungo radiobutton per la scelta di finitura XGlass lucido
      Radio RdXGlassO
      {
        Caption = $DLG_caption_opaco_xglass
        Hint    = $DLG_caption_opaco_xglass
        Value   = $DLG_value_opaco_xglass

        Placement
        {
           posx = 20
           posy = 190
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           // 10/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 1
           // 22/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           $DLG_COLORE_XGLASS = "MR1"
           $DLG_COLORE_368 = $DLG_COLORE_XGLASS
           $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
           // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//           GOSUB Get_Image_XGlass1
           GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
        ]
      }

      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal

        Placement
        {
           posx = 20
           posy = 210
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal = 0

           $DLG_COLORE_METAL = "MT4"
           $DLG_COLORE_368 = $DLG_COLORE_METAL
           $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
           GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_METAL")
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
        ]
      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal

        Placement
        {
           posx = 20
           posy = 230
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 1

           $DLG_COLORE_METAL = "MT4"
           $DLG_COLORE_368 = $DLG_COLORE_METAL
           $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
           GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_METAL")
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 405
//         posy = 240
         posy = 280
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 320
//         posy = 240
         posy = 280
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnTipologia
   {
      Caption = MSG(984)
      Result  = 0
      Hint = MSG(985)

      Placement
      {
         posx = 20
         posy = 195
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_tipologia_punto")
        GOSUB Get_Image_Punto2
        // 01/10/2018 - Emanuele - Aggiungo procedura che modifica le misure del contenitore
        GOSUB Camb_Mis_Punto
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_PUNTO_STR")
        // 28/09/2018 - Emanuele - Aggiungo condizione nel caso in cui l'alta ha finitura XGlass
        if($DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1) { $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR }
        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_STR,"colori_tutti.txt")
        // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//        GOSUB Get_Image_Punto
        GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_PUNTO_STR")
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if( $DLG_value_opaco==1 )
         {
            // 28/09/2018 - Emanuele - Modifico la variabile chiamata perch  della vecchia gestione
//            $R = CHIEDI(-1,"DLG_COLORE_PUNTO_ANT_O")
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            // 28/09/2018 - Emanuele - Modifico l'assegnazione perch cos si modifica anche la descrizione della struttura
//            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_ANT_O,"colori_tutti.txt")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            // 28/09/2018 - Emanuele - Commento assegnazioni perch vengono utilizzate variabili della vecchia gestione
//            $DLG_COLORE_PUNTO_ANT   = $DLG_COLORE_PUNTO_ANT_O
//            $DLG_COLORE_PUNTO_ANT_L = $DLG_COLORE_PUNTO_ANT_O

            $DLG_COLORE_368 = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_368_O
            // 28/09/2018 - Emanuele - Commento le assegnazioni perch utilizzo una nuova gestione
//            $DLG_image_file1      = $DLG_image_file
//            $DLG_descrizione_var1 = $DLG_descrizione_var

            $DLG_enable_rd_opaco = 1
            // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//            GOSUB Get_Image_Punto1
            GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_368_O")

         }

         if( $DLG_value_lucido==1 )
         {
            // 28/09/2018 - Emanuele - Modifico la variabile chiamata perch  della vecchia gestione
//            $R = CHIEDI(-1,"DLG_COLORE_PUNTO_ANT_L")
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            // 28/09/2018 - Emanuele - Modifico l'assegnazione della descrizione poich in questo modo viene modificata anche
            // quella della struttura
//            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_ANT_L,"colori_tutti.txt")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            // 28/09/2018 - Emanuele - Commento le assegnazioni perch utilizzo una nuova gestione
//            $DLG_image_file1      = $DLG_image_file
//            $DLG_descrizione_var1 = $DLG_descrizione_var
            // 28/09/2018 - Emanuele - Modifico l'assegnazioni perch vengono utilizzate variabili della vecchia gestione
//            $DLG_COLORE_PUNTO_ANT   = $DLG_COLORE_PUNTO_ANT_L

            $DLG_COLORE_368 = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_368_L

            $DLG_enable_rd_opaco = 0
            // 28/09/2018 - Emanuele - Modifico la condizione perch vengono utilizzate variabili della vecchia gestione
//            if( STRCMP($DLG_COLORE_PUNTO_ANT_L,"ARG")!=0 )
//            {
//               $DLG_COLORE_PUNTO_ANT_O = $DLG_COLORE_PUNTO_ANT_L
//               $DLG_enable_rd_opaco = 1
//            }
            if( STRCMP($DLG_COLORE_368_L,"ARG")!=0 )
            {
               $DLG_enable_rd_opaco = 1
            }
            // 28/09/2018 - Emanuele - Commento la procedura per utilizzare la funzione GET_IMAGE
//            GOSUB Get_Image_Punto1
            GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_368_L")
         }
         // 10/09/2018 - Emanuele - Aggiungo condizione per la gestione delle finiture XGlass
         if( $DLG_value_lucido_xglass==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_COLORE_368 = $DLG_COLORE_XGLASS
            $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")

         }
         // 10/09/2018 - Emanuele - Aggiungo condizione per la gestione delle finiture XGlass
         if( $DLG_value_opaco_xglass==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_COLORE_368 = $DLG_COLORE_XGLASS
            $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")
         }

         // 03/07/2019 - Emanuele - Aggiungo condizioni per metallizzati
         if( $DLG_value_lucido_metal==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_COLORE_368 = $DLG_COLORE_METAL
            $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_METAL")

         }
         // 10/09/2018 - Emanuele - Aggiungo condizione per la gestione delle finiture XGlass
         if( $DLG_value_opaco_metal==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_COLORE_368 = $DLG_COLORE_METAL
            $DLG_COLORE_PUNTO_ANTA = $DLG_COLORE_PUNTO_STR
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_METAL")
         }

      ]
   }

}

Dlg AntaPunto
{
   Caption = MSG(980)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 540
//      dimy = 280
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 190
         dimy = 160
      }

      Radio AntaRotonda
      {
        Caption = MSG(1801)
        Hint    = MSG(1801)
        Value   = $DLG_anta_rotonda

        Placement
        {
           posx = 10
           posy = 20
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_tipologia_antapunto = 0
           $DLG_anta_rotonda        = 1
           $DLG_anta_quadrata       = 0
           $DLG_anta_rett736        = 0
           $DLG_anta_rett552        = 0
           VAR_CREATE_NUM(-1,"DLG_altezza",338,259,"Utente( 338-568 )")
        ]
      }

      Radio AntaQuadrata
      {
        Caption = MSG(1802)
        Hint    = MSG(1802)
        Value   = $DLG_anta_quadrata

        Placement
        {
           posx = 10
           posy = 40
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_tipologia_antapunto = 1
           $DLG_anta_rotonda        = 0
           $DLG_anta_quadrata       = 1
           $DLG_anta_rett736        = 0
           $DLG_anta_rett552        = 0
           VAR_CREATE_NUM(-1,"DLG_altezza",552,259,"Utente( 368-706 )")
        ]
      }

      Radio AntaRett736
      {
        Caption = MSG(1803)
        Hint    = MSG(1803)
        Value   = $DLG_anta_rett736

        Placement
        {
           posx = 10
           posy = 60
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_tipologia_antapunto = 2
           $DLG_anta_rotonda        = 0
           $DLG_anta_quadrata       = 0
           $DLG_anta_rett736        = 1
           $DLG_anta_rett552        = 0
           VAR_CREATE_NUM(-1,"DLG_altezza",706,259,"Utente( 552-874 )")
        ]
      }

      Radio AntaRett552
      {
        Caption = MSG(1804)
        Hint    = MSG(1804)
        Value   = $DLG_anta_rett552

        Placement
        {
           posx = 10
           posy = 80
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_tipologia_antapunto = 3
           $DLG_anta_rotonda        = 0
           $DLG_anta_quadrata       = 0
           $DLG_anta_rett736        = 0
           $DLG_anta_rett552        = 1
           VAR_CREATE_NUM(-1,"DLG_altezza",706,259,"Utente( 552-874 )")
        ]
      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura
        Hint    = $DLG_hint_apertura
        Value   = $DLG_apertura_value
        Enable  = 1

        Placement
        {
           posx = 85
           posy = 107
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 85
           posy = 132
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(104)
        Value   = MSG(104)
        Enable  = 1

        Placement
        {
           posx = 15
           posy = 110
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(1812)
        Hint    = MSG(1813)
        Enable  = 1
        Value   = MSG(1812)

        Placement
        {
           posx = 15
           posy = 135
           dimx = 80
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(982)

      Placement
      {
         posx = 210
         posy = 10
         dimx = 150
         dimy = 160
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Finitura2
   {
      Caption = MSG(983)

      Placement
      {
         posx = 370
         posy = 10
         dimx = 150
//         dimy = 230
         dimy = 270
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 10
           posy = 140
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           // 10/09/2018 - Emanuele - Aggiungo delle assegnazioni per la gestione delle finiture XGlass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           // 27/09/2018 - Emanuele - Commento le assegnazioni perch  una vecchia gestione. Inserisco una nuova gestione
//           $DLG_COLORE_PUNTO_VETRO = "BCO"
//
//           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_VETRO,"colori_tutti.txt")
//           GOSUB Get_Image_AntaPunto
//           if( STRCMP($DLG_COLORE_PUNTO_VETRO,"ARG")!=0 )
//           {
//              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CA=",APICI(),$DLG_COLORE_PUNTO_VETRO,APICI()))
//              COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C2=",APICI(),$VALORE_NULLO,APICI()))
//           }
           $DLG_COLORE_368_L = "BCO"
           $DLG_COLORE_368   = $DLG_COLORE_368_L
           $DLG_COLORE_368_O = $DLG_COLORE_368_L
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_368_L")
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 10
           posy = 160
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           // 10/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
           // 27/09/2018 - Emanuele - Commento le assegnazioni perch  una vecchia gestione. Ne inserisco una nuova
//           $DLG_COLORE_PUNTO_VETRO = "BCO"
//
//           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_VETRO,"colori_tutti.txt")
//
//           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_C2=",APICI(),$DLG_COLORE_PUNTO_VETRO,APICI()))
//           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_CA=",APICI(),$VALORE_NULLO,APICI()))
//
//           $DLG_enable_rd_opaco = 1
//
//           GOSUB Get_Image_AntaPunto
           $DLG_COLORE_368_O = "BCO"
           $DLG_COLORE_368   = $DLG_COLORE_368_O
           $DLG_COLORE_368_L = $DLG_COLORE_368_O
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_368_O")
        ]
      }

      // 10/09/2018 - Emanuele - Aggiungo radiobutton per la gestione delle finiture XGlass
      Radio RdXGlassL
      {
        Caption = $DLG_caption_lucido_xglass
        Hint    = $DLG_caption_lucido_xglass
        Value   = $DLG_value_lucido_xglass

        Placement
        {
           posx = 10
           posy = 180
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass = 0
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           $DLG_COLORE_XGLASS = "MR1"
           $DLG_COLORE_368 = $DLG_COLORE_XGLASS
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")
        ]

      }

      Radio RdXGlassO
      {
        Caption = $DLG_caption_opaco_xglass
        Hint    = $DLG_caption_opaco_xglass
        Value   = $DLG_value_opaco_xglass

        Placement
        {
           posx = 10
           posy = 200
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 1
           // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0

           $DLG_COLORE_XGLASS = "MR1"
           $DLG_COLORE_368 = $DLG_COLORE_XGLASS
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")
        ]

      }

      // 16/05/2019 - Emanuele - Aggiungo radiobutton per metallizzato
      Radio RdLucidoMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal

        Placement
        {
           posx = 10
           posy = 220
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal = 0

           $DLG_COLORE_METAL = "MT4"
           $DLG_COLORE_368 = $DLG_COLORE_METAL
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_METAL")
        ]

      }

      Radio RdOpacoMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal

        Placement
        {
           posx = 10
           posy = 240
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 0
           $DLG_value_opaco  = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 1

           $DLG_COLORE_METAL = "MT4"
           $DLG_COLORE_368 = $DLG_COLORE_METAL
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_METAL")
        ]

      }
   }

   Check chkElimina
   {
      Caption = MSG(1805)
      Hint    = MSG(1805)
      Enable  = 1
      Value   = $DLG_value_cancella

      Placement
      {
         posx = 10
         posy = 180
         dimx = 200
         dimy = 20
      }

      OnClick
      [

         if($DLG_value_cancella==1)
         {
            $DLG_value_cancella = 1
         }
         else
         {
            $DLG_value_cancella = 0
         }

         if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
         {
            DISPLAY2(MSG(1806))
         }
      ]
   }

   //Massimiliano 08/02/16 - aggiungo funzione per inserimento schiena e fianco
   Check chkFiancoSchiena
   {
      Caption = MSG(1837)
      Hint    = MSG(1837)
      Enable  = $DLG_enable_FiaSch
      Value   = $DLG_value_FiaSch

      Placement
      {
         posx = 10
         posy = 200
         dimx = 200
         dimy = 20
      }

      OnClick
      [

         if( $DLG_value_FiaSch==1 )
         {
            $DLG_value_FiaSch = 1
         }
         else
         {
            $DLG_value_FiaSch = 0
         }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 290
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 205
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 220
         posy = 120
         dimx = 130
         dimy = 25
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_AL")
        $DLG_COLORE_PUNTO_ANTA = VAR_VAL_STR($DLG_idx_to_call,"GEST_AL")
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_ANTA,"colori_tutti.txt")
         GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_PUNTO_ANTA")
//        GOSUB Get_Image_AntaPunto
      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 380
         posy = 120
         dimx = 130
         dimy = 25
      }

      OnClick
      [
      // 27/09/2018 - Emanuele - Commento tutto per utilizzare una nuova gestione
//         if( $DLG_value_opaco==1 )
//         {
//            $R = CHIEDI($DLG_idx_to_call,"GEST_C2")
//            $DLG_COLORE_PUNTO_VETRO = VAR_VAL_STR($DLG_idx_to_call,"GEST_C2")
//            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_AL=",APICI(),$DLG_COLORE_PUNTO_VETRO,APICI()))
//            $DLG_COLORE_PUNTO_ANTA = VAR_VAL_STR($DLG_idx_to_call,"GEST_AL")
//            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_VETRO,"colori_tutti.txt")
//            $DLG_descrizione_var = $DLG_descrizione_var1
//            $DLG_enable_rd_opaco = 1
//            GOSUB Get_Image_AntaPunto
//         }
//
//         if( $DLG_value_lucido==1 )
//         {
//            $R = CHIEDI($DLG_idx_to_call,"GEST_CA")
//            $DLG_COLORE_PUNTO_VETRO = VAR_VAL_STR($DLG_idx_to_call,"GEST_CA")
//            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_PUNTO_VETRO,"colori_tutti.txt")
//
//            $DLG_enable_rd_opaco = 0
//            if( STRCMP($DLG_COLORE_PUNTO_VETRO,"ARG")!=0 )
//            {
//               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_AL=",APICI(),$DLG_COLORE_PUNTO_VETRO,APICI()))
//               $DLG_COLORE_PUNTO_ANTA = VAR_VAL_STR($DLG_idx_to_call,"GEST_AL")
//               $DLG_descrizione_var = $DLG_descrizione_var1
//               $DLG_enable_rd_opaco = 1
//            }
//
//            GOSUB Get_Image_AntaPunto
//         }
//         // 10/09/2018 - Emanuele - Aggiungo condizioni per la gestione delle finiture XGlass
//         if( $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
//         {
//            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
//            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
//            GOSUB Get_Image_XGlass1
//         }
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_368_O")
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }
         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_368_L")
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
         if($DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_COLORE_368 = $DLG_COLORE_XGLASS
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_XGLASS"),"colori_tutti.txt")
            GET_IMAGE("DLG_image_file1","XGlass","DLG_COLORE_XGLASS")
         }
         // 16/05/2019 - Emanuele - Aggiungo condizione per metallizzato
         if($DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_COLORE_368 = $DLG_COLORE_METAL
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_METAL"),"colori_tutti.txt")
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file1","lucido","DLG_COLORE_METAL") }
            else                           { GET_IMAGE("DLG_image_file1","opaco","DLG_COLORE_METAL") }
         }
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(1315)
      Enable  = 1

      Placement
      {
         posx = 150
         posy = 117
         dimx = 40
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_apertura")
         if( $DLG_apertura == 1 ) { $DLG_apertura_value = "DX" }
         else                     { $DLG_apertura_value = "SX" }
         $DLG_hint_apertura    = STRCAT(MSG(108)," = ",STR($DLG_apertura))
         $DLG_caption_apertura = STR($DLG_apertura)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1814)

      Placement
      {
         posx = 150
         posy = 142
         dimx = 40
         dimy = 20
      }

      OnClick
      [
        $controlHRip = 1
        while ( $controlHRip == 1 )
        {
           $R = CHIEDI(-1,"DLG_altezza")
           $controlHRip = 0
           if( $DLG_anta_quadrata == 1 )
           {
              if( $DLG_altezza > 381 & $DLG_altezza < 461 )
              {
                 $num_msg = 1808 GOSUB MANDA_MSG
                 $controlHRip = 1
              }
           }
           if( $DLG_anta_rett736 == 1 )
           {
              if( $DLG_altezza > 583 & $DLG_altezza < 664 )
              {
                 $num_msg = 1808 GOSUB MANDA_MSG
                 $controlHRip = 1
              }
           }
           if( $DLG_anta_rett552 == 1 )
           {
              if( $DLG_altezza > 583 & $DLG_altezza < 664 )
              {
                 $num_msg = 1808 GOSUB MANDA_MSG
                 $controlHRip = 1
              }
           }
        }
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }
}

Dlg PuntoSpecchio
{
   Caption = MSG(980)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 320
      dimy = 235
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Radio RdSpec680
      {
        Caption = MSG(1955)
        Hint    = MSG(1955)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 25
           dimx = 115
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio RdSpec990
      {
        Caption = MSG(1956)
        Hint    = MSG(1956)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 50
           dimx = 115
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(982)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 205
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 120
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_AL")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_AL")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_AL"),"colori_tutti.txt")
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }
}

Dlg NOW_Cassettiera
{
   Caption = MSG(723)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Check chkElimina
   {
     Caption = MSG(759)
     Hint    = MSG(760)
     Enable  = $DLG_enable_cancella
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 35
        posy = 160
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(761))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 3)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }
         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }
}

// Massimiliano 09/04/14 - DLG per divisorio ripiani armadio
Dlg NOW_DivisorioRipiani
{
   Caption = MSG(1427)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 320
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

  // Frame Posizione
  // {
  //    Caption = MSG(414)
  //
  //    Placement
  //    {
  //       posx = 10
  //       posy = 150
  //       dimx = 150
  //       dimy = 60
  //    }

      Radio PosizioneDX
      {
         Caption = MSG(647)
         Hint    = MSG(647)
         Value   = $DLG_value_dx

         Placement
         {
            posx = 35
            posy = 160
            dimx = 100
            dimy = 20
         }

         OnClick
         [
            $DLG_value_dx = 1
            $DLG_value_sx = 0
         ]
      }

      Radio PosizioneSX
      {
         Caption = MSG(646)
         Hint    = MSG(646)
         Value   = $DLG_value_sx

         Placement
         {
            posx = 35
            posy = 180
            dimx = 100
            dimy = 20
         }

         OnClick
         [
            $DLG_value_dx = 0
            $DLG_value_sx = 1
         ]
      }

  // }

   Check chkElimina
   {
     Caption = MSG(775)
     Hint    = MSG(775)
     Enable  = $DLG_enable_cancella
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 35
        posy = 220
        dimx = 150
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(761))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 250
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 250
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }
}


Dlg NOW_CassettieraEV
{
   Caption = MSG(723)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 45
      }

      Label LblLarghezza
      {
         Caption = MSG(624)
         Hint    = MSG(432)
         Enable  = 1
         Value   = MSG(624)

         Placement
         {
            posx = 10
            posy = 20
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]

      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 60
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Check chkElimina
   {
     Caption = MSG(759)
     Hint    = MSG(760)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 20
        posy = 205
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(761))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(438)

      Placement
      {
         posx = 130
         posy = 25
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 165
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }
}

Dlg NOW_CoperchioPP
{
   Caption = MSG(762)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

//   Check chkElimina
//   {
//     Caption = "Elimina il coperchio"
//     Hint    = "Elimina il coperchio push-pull"
//     Enable  = 1
//     Value   = $DLG_value_cancella
//
//     Placement
//     {
//        posx = 35
//        posy = 160
//        dimx = 200
//        dimy = 20
//     }
//
//     OnClick
//     [
//
//        if( $DLG_value_cancella==1 )
//        {
//           $DLG_value_cancella = 1
//        }
//        else
//        {
//           $DLG_value_cancella = 0
//        }
//
//        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
//        {
//           DISPLAY2("Attenzione:\nLa cassettiera selezionata sar eliminata")
//        }
//     ]
//
//   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         GOSUB Get_Image_NOW
      ]
   }
}

Dlg NOW_RipianoVetro
{
   Caption = MSG(763)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 120
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Check chkElimina
   {
     Caption = MSG(764)
     Hint    = MSG(764)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 20
        posy = 15
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(765))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 50
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 50
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}
// 12/02/2018 - Emanuele - Dialog per eliminazione Portacravatte
Dlg PortaCravatte
{
   Caption = MSG(3323)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 120
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Check chkElimina
   {
     Caption = MSG(3322)
     Hint    = MSG(3322)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 20
        posy = 15
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(3324))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 50
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 50
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}



Dlg 36e8_Finitura
{
   Caption = MSG(74)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
//      dimy = 350
      dimy = 390
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        posx = 20
        posy = 165
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabile per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        posx = 20
        posy = 185
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 1
        $DLG_value_lucido = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdXGlassL
   {
     Caption = MSG(3601)
     Hint    = MSG(3601)
     Value   = $DLG_value_lucido_xglass

     Placement
     {
        posx = 20
        posy = 205
        dimx = 180
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 1
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        $DLG_COLORE_XGLASS = "MR1"
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
        GOSUB Get_Image_XGlass
     ]
   }

   Radio RdXGlassO
   {
     Caption = MSG(3602)
     Hint    = MSG(3602)
     Value   = $DLG_value_opaco_xglass

     Placement
     {
        posx = 20
        posy = 225
        dimx = 180
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 1
        // 16/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        $DLG_COLORE_XGLASS = "MR1"
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
        GOSUB Get_Image_XGlass
     ]

   }

   Radio RdLucidoMetal
   {
     Caption = $DLG_caption_lucido_metal
     Hint    = $DLG_hint_lucido_metal
     Value   = $DLG_value_lucido_metal

     Placement
     {
        posx = 20
        posy = 245
        dimx = 180
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_metal = 1
        $DLG_value_opaco_metal = 0

        $DLG_COLORE_METAL = "MT4"
        $DLG_COLORE_368_L = $DLG_COLORE_METAL
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
        GOSUB Get_Image_368_L
     ]

   }

   Radio RdOpacoMetal
   {
     Caption = $DLG_caption_opaco_metal
     Hint    = $DLG_hint_opaco_metal
     Value   = $DLG_value_opaco_metal

     Placement
     {
        posx = 20
        posy = 265
        dimx = 180
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 1

        $DLG_COLORE_METAL = "MT4"
        $DLG_COLORE_368_O = $DLG_COLORE_METAL
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
        GOSUB Get_Image_368_O
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
//         posy = 270
         posy = 310
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
//         posy = 270
         posy = 310
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            // 13/05/2020 - Emanuele - Aggiungo assegnazione per assegnare un menu differente per la selezione delle finiture lucide
            // Non  possibile selezionare la finitura specchio nei top
            if(IS_MATCH(NOME($DLG_idx_to_call),"*Top*")==1)
            {
               VAR_SET_MENU(-1,"DLG_COLORE_368_L","colori_368_luc_riv.txt")
            }

            $R = CHIEDI(-1,"DLG_COLORE_368_L")

            if(IS_MATCH(NOME($DLG_idx_to_call),"*Top*")==1)
            {
               VAR_SET_MENU(-1,"DLG_COLORE_368_L","colori_368_luc.txt")
            }

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }

         // 06/09/2018 - Emanuele - Aggiungo condizioni per la gestione delle finiture XGlass
         if($DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            GOSUB Get_Image_XGlass
         }
         // 16/05/2019 - Emanuele - Aggiungo condizione per metallizzati
         if($DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            if($DLG_value_lucido_metal==1) { $DLG_COLORE_368_L = $DLG_COLORE_METAL  GOSUB Get_Image_368_L }
            else                           { $DLG_COLORE_368_O = $DLG_COLORE_METAL  GOSUB Get_Image_368_O }
         }
      ]
   }
}

Dlg 36e8_FinituraNEW12
{
   Caption = MSG(74)

   Placement
   {
      posx = 150
      posy = 150
      //dimx = 180
      dimx = 250
      //dimy = 270
//      dimy = 330
//      dimy = 350
      dimy = 370
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(235)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 220
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  45
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        //posx = 60
        posx = 10
        posy = 150
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/07/2018  - cambio condizione con l'arrivo dell'XGlass
        // 10/05/2019 - Emanuele - Modifico la condizione per la gestione dei metallizzati
//        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $DLG_COLORE_368_L = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 1
        $DLG_value_laccato = 0
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 10/05/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei metallizzati
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        //Massimiliano 26/07/2018  - modifico e sposto sopra
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        //posx = 60
        posx = 10
        posy = 170
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/07/2018  - cambio condizione con l'arrivo dell'XGlass
        // 10/05/2019 - Emanuele - Modifico la condizione per la gestione dei metallizzati
//        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }

        $DLG_value_opaco = 1
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione dei metallizzati
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        //Massimiliano 26/07/2018  - modifico e sposto sopra
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   //Massimiliano 26/07/2018  - nuove opzioni per XGlass
   Radio RdLucidoXGlass
   {
     Caption = MSG(3603)
     Hint    = MSG(3603)
     Value   = $DLG_value_lucido_xglass
     Enable  = $DLG_enable_rd_lucido_xglass_368

     Placement
     {
        posx = 10
        posy = 190
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
        {
           $DLG_COLORE_368_L = "MR1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
           GOSUB Get_Image_XGlass
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 1
        // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione dei metallizzati
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0
     ]

   }

   Radio RdOpacoXGlass
   {
     Caption = MSG(3604)
     Hint    = MSG(3604)
     Value   = $DLG_value_opaco_xglass
     Enable  = $DLG_enable_rd_opaco_xglass_368

     Placement
     {
        //posx = 60
        posx = 10
        posy = 210
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
        {
           $DLG_COLORE_368 = "MR1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           $DLG_COLORE_XGLASS = $DLG_COLORE_368
           GOSUB Get_Image_XGlass
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_opaco_xglass = 1
        $DLG_value_lucido_xglass = 0
        // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione dei metallizzati
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0
     ]

   }

   // 10/05/2019 - Emanuele - Aggiungo radiobutton per la gestione dei metallizzati
   Radio RdLucidoMetal
   {
     Caption = $DLG_caption_lucido_metal
     Hint    = $DLG_hint_lucido_metal
     Value   = $DLG_value_lucido_metal
     Enable  = $DLG_enable_rd_lucido_metal_368

     Placement
     {
        posx = 10
        posy = 230
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
        {
           $DLG_COLORE_368_L = "MT4"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           $DLG_COLORE_METAL = $DLG_COLORE_368_L
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione dei metallizzati
        $DLG_value_lucido_metal = 1
        $DLG_value_opaco_metal = 0
     ]

   }

   // 10/05/2019 - Emanuele - Aggiungo radiobutton per la gestione dei metallizzati
   Radio RdOpacoMetal
   {
     Caption = $DLG_caption_opaco_metal
     Hint    = $DLG_hint_opaco_metal
     Value   = $DLG_value_opaco_metal
     Enable  = $DLG_enable_rd_opaco_metal_368

     Placement
     {
        posx = 10
        posy = 250
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
        {
           $DLG_COLORE_368_L = "MT4"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           $DLG_COLORE_METAL = $DLG_COLORE_368_L
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione dei metallizzati
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 1
     ]

   }

   Radio RdLaccato
   {
     Caption = MSG(722)
     Hint    = MSG(722)
     Value   = $DLG_value_laccato
     Enable  = $DLG_enable_rd_laccato_368

     Placement
     {
        //posx = 60
        posx = 10
        //posy = 190
//        posy = 230
//        posy = 250
        posy = 270
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/07/2018  - cambio condizione con l'arrivo dell'XGlass
        // 10/05/2019 - Emanuele - Modifico la condizione per la gestione dei metallizzati
//        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 1
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 10/05/2019 - Emanuele - Aggiungo assegnazione per la gestione dei metallizzati
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        //Massimiliano 26/07/2018  - cambio e sposto sopra
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         //posy = 210
//         posy = 260
//         posy = 280
         posy = 300
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         //posy = 210
//         posy = 260
//         posy = 280
         posy = 300
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 20
         posx = 55
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }

         if($DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            GOSUB Get_Image_368
            $DLG_COLORE_368_O = $DLG_COLORE_368
            $DLG_COLORE_368_L = $DLG_COLORE_368
         }

         //Massimiliano 260/01/17 - gestisco finitura wildwood
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            GOSUB Get_Image_368
            $DLG_COLORE_368_W = $DLG_COLORE_368
            $DLG_COLORE_368_O = $DLG_COLORE_368
            $DLG_COLORE_368_L = $DLG_COLORE_368
         }

        //Massimiliano 26/07/2018  - aggiungo anche cambio colore per xglass
        if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
           $DLG_COLORE_368   = $DLG_COLORE_XGLASS
           GOSUB Get_Image_XGlass
        }

         // 10/05/2019 - Emanuele - Aggiungo condizione per la gestione dei metallizzati
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
         {
           $R = CHIEDI(-1,"DLG_COLORE_METAL")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_METAL
           $DLG_COLORE_368   = $DLG_COLORE_METAL
           GOSUB Get_Image_368_L
         }
      ]
   }
}

//Massimiliano 22/11/2017 - creo nuova dialog per anta multi materiale
Dlg 36e8_FinituraMultiMat
{
   Caption = MSG(74)

   Placement
   {
      posx = 150
      posy = 150
      //dimx = 180
      dimx = 250
      //dimy = 300
//      dimy = 350
      dimy = 390
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(235)

      Placement
      {
         posx = 10
         posy = 10
         //dimx = 150
         dimx = 220
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            //posx =  45
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     // 24/04/2019 - Emanuele - Aggiungo Enable per bloccare il cambio di tipo finitura nei pcf
//     Enable = $DLG_enable_rd_lucido_368

     Placement
     {
        //posx = 60
        posx = 10
        posy = 150
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/07/2018  - cambio condizione con l'arrivo dell'XGlass
        // 10/12/2018 - Emanuele - Aggiungo condizione per la finitura Wildwood perch si riesce a impostare
        // la finitura lucida con il colore Wildwood
//        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_ww==1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $DLG_COLORE_368_L = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 1
        $DLG_value_laccato = 0
        $DLG_value_ww = 0
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 0

        //Massimiliano 26/07/2018  - modifico e sposto sopra
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     // 24/04/2019 - Emanuele - Aggiungo Enable per bloccare il cambio di tipo finitura nei pcf
//     Enable = $DLG_enable_rd_opaco_368

     Placement
     {
        //posx = 60
        posx = 10
        posy = 170
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/07/2018  - cambio condizione con l'arrivo dell'XGlass
        // 10/12/2018 - Emanuele - Aggiungo condizione per la finitura Wildwood perch si riesce a impostare
        // la finitura lucida con il colore Wildwood
//        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_ww == 1)
        if($DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_ww == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }

        $DLG_value_opaco = 1
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_ww = 0
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 0

        //Massimiliano 26/07/2018  - modifico e sposto sopra
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   //Massimiliano 26/07/2018  - aggiunta opzioni xglass
   Radio RdLucidoXGlass
   {
     Caption = MSG(3603)
     Hint    = MSG(3603)
     Value   = $DLG_value_lucido_xglass
     // 24/04/2019 - Emanuele - Aggiungo Enable per bloccare il cambio di tipo finitura nei pcf
//     Enable = $DLG_enable_rd_lucido_xglass_368

     Placement
     {
        posx = 10
        posy = 190
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
        {
           $DLG_COLORE_368_L = "MR1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           $DLG_COLORE_XGLASS = $DLG_COLORE_368_L
           GOSUB Get_Image_XGlass
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_ww = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 1
        // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 0

     ]

   }

   Radio RdOpacoXGlass
   {
     Caption = MSG(3604)
     Hint    = MSG(3604)
     Value   = $DLG_value_opaco_xglass
     // 24/04/2019 - Emanuele - Aggiungo Enable per bloccare il cambio di tipo finitura nei pcf
//     Enable = $DLG_enable_rd_opaco_xglass_368

     Placement
     {
        posx = 10
        posy = 210
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_lucido_xglass != 1 | $DLG_value_opaco_xglass != 1)
        {
           $DLG_COLORE_368 = "MR1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           $DLG_COLORE_XGLASS = $DLG_COLORE_368
           GOSUB Get_Image_XGlass
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_ww = 0
        $DLG_value_opaco_xglass = 1
        $DLG_value_lucido_xglass = 0
        // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 0

     ]

   }

   // 21/05/2019 - Emanuele - Aggiungo radiobutton per metallizzato
   Radio RdLucidoMetal
   {
     Caption = $DLG_caption_lucido_metal
     Hint    = $DLG_hint_lucido_metal
     Value   = $DLG_value_lucido_metal

     Placement
     {
        posx = 10
        posy = 230
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
        {
           $DLG_COLORE_368 = "MT4"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           $DLG_COLORE_METAL = $DLG_COLORE_368
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_ww = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 1

     ]

   }

   Radio RdOpacoMetal
   {
     Caption = $DLG_caption_opaco_metal
     Hint    = $DLG_hint_opaco_metal
     Value   = $DLG_value_opaco_metal

     Placement
     {
        posx = 10
        posy = 250
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido == 1 | $DLG_value_opaco == 1 | $DLG_value_laccato == 1)
        {
           $DLG_COLORE_368 = "MT4"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           $DLG_COLORE_METAL = $DLG_COLORE_368
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_ww = 0
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_metal = 1
        $DLG_value_lucido_metal = 0

     ]

   }

   Radio RdLaccato
   {
     Caption = MSG(722)
     Hint    = MSG(722)
     Value   = $DLG_value_laccato
     // 24/04/2019 - Emanuele - Aggiungo Enable per bloccare il cambio di tipo finitura nei pcf
//     Enable = $DLG_enable_rd_laccato_368

     Placement
     {
        //posx = 60
        posx = 10
        //posy = 190
//        posy = 230
        posy = 270
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/07/2018  - cambio condizione con l'arrivo dell'XGlass
        // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
        if($DLG_value_ww == 1 | $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1 | $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 1
        $DLG_value_ww = 0
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 0

        //Massimiliano 26/07/2018  - cambio e sposto sopra
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdWildwood
   {
     Caption = MSG(899)
     Hint    = MSG(899)
     Value   = $DLG_value_ww
     // 24/04/2019 - Emanuele - Aggiungo Enable per bloccare il cambio di tipo finitura nei pcf
//     Enable = $DLG_enable_rd_ww_368

     Placement
     {
        //posx = 60
        posx = 10
//        posy = 250
        posy = 290
        //dimx = 120
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 20/09/2018  - aggiungo anche il caso xglass
        //if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1)
        // 21/05/2019 - Emanuele - Modifico condizione per metallizzati
//        if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_opaco_xglass==1 | $DLG_value_lucido_xglass==1 | $DLG_value_laccato==1)
        if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_opaco_xglass==1 | $DLG_value_lucido_xglass==1 | $DLG_value_laccato==1 | $DLG_value_opaco_metal==1 | $DLG_value_lucido_metal==1)
        {
           $DLG_COLORE_368_W = "SZ1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368_W
           $DLG_COLORE_368 = $DLG_COLORE_368_W
           GOSUB Get_Image_368
        }

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        $DLG_value_laccato = 0
        $DLG_value_ww = 1
        //Massimiliano 26/07/2018  - nuove varianti per xglass
        $DLG_value_opaco_xglass = 0
        $DLG_value_lucido_xglass = 0
        // 21/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
        $DLG_value_opaco_metal = 0
        $DLG_value_lucido_metal = 0

     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         //posy = 230
//         posy = 280
         posy = 320
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         //posy = 230
//         posy = 280
         posy = 320
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 20
         posx = 55
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }

         if($DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            GOSUB Get_Image_368
         }

         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            GOSUB Get_Image_368
         }

         //Massimiliano 26/07/2018  - aggiungo anche cambio colore per xglass
         if( $DLG_value_lucido_xglass == 1 | $DLG_value_opaco_xglass == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_XGLASS
            $DLG_COLORE_368   = $DLG_COLORE_XGLASS
            GOSUB Get_Image_XGlass
         }

         // 21/05/2019 - Emanuele - Aggiungo condizione per metallizzato
         if( $DLG_value_lucido_metal == 1 | $DLG_value_opaco_metal == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_COLORE_368_L = $DLG_COLORE_METAL
            $DLG_COLORE_368_O = $DLG_COLORE_METAL
            $DLG_COLORE_368   = $DLG_COLORE_METAL
            if( $DLG_value_lucido_metal==1 ) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if( $DLG_value_opaco_metal==1 ) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }
      ]
   }
}

Dlg 36e8_FrontBifacciale
{
   Caption = MSG(22)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 200
      dimy = 310
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 190
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  55
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }


   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        posx = 70
        posy = 155
        dimx = 90
        dimy = 20
     }

     OnClick
     [
        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        posx = 70
        posy = 175
        dimx = 90
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 1
        $DLG_value_lucido = 0

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }


   Check chkElimina
   {
     Caption = MSG(23)
     Hint    = MSG(23)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 50
        posy = 210
        dimx = 120
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(360))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 105
         posy = 250
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 20
         posy = 250
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 30
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
      ]
   }
}

Dlg 36e8_FrontBifacciale_R12
{
   Caption = MSG(22)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 250
//      dimy = 450
      dimy = 490
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 220
//         dimy = 300
         dimy = 340
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 20
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        posx = 30
        posy = 150
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 17/09/2018 - Emanuele - Sposto la procedura dopo le assegnazioni delle finiture perch altrimenti
        // assegna la radice errata e dopo qualche aggiorna si sistema
        // 23/01/2018 - Filippo - cambio la radice al volo
//        GOSUB CambiaRadDlgBifGentle

        // 06/09/2018 - Emanuele - Modifico la condizione per la gestione delle finiture XGlass
//        if($DLG_value_ww == 1 | $DLG_value_gentle  == 1)
         // 18/09/2018 - Emanuele - Commento il controllo e sposto le assegnazioni qui sotto
//        if($DLG_value_ww == 1 | $DLG_value_gentle  == 1 | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
//        {
//           $DLG_COLORE_368_L = "BCO"
//           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
//           GOSUB Get_Image_368_L
//           $DLG_COLORE_368   = $DLG_COLORE_368_L
//           $DLG_COLORE_368_O = $DLG_COLORE_368_L
//           $DLG_COLORE_368_W = $DLG_COLORE_368_L
//        }
        // 19/12/2018 - Emanuele - Sposto qui l'assegnazione per aggiungere delle condizioni
        if($DLG_value_laccato==0 & $DLG_value_opaco==0)
        {
           $DLG_COLORE_368_L = "BCO"
        }

        $DLG_value_lucido  = 1
        $DLG_value_opaco   = 0
        $DLG_value_laccato = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        // 17/09/2018 - Emanuele - Sposto qui la procedura
        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04
        //$DLG_enable_sp04   = 1
        //Massimiliano 25/06/14 - riabilita in dialog
        // Eugenio 03.03.15 Cambiato secondo disponibilit nuovo listino
        // 20/06/2018 - Emanuele - Sposto il controllo nel configura altrimenti vengono saltati diversi controlli
//        if( $Alte <= 368 )  {  $DLG_enable_sp04   = 1  }
//        else
//        {
//           if( $Alte <= 552 & $Larg <= 1104 )  {  $DLG_enable_sp04   = 1  }
//           else                                {  $DLG_enable_sp04   = 0  }
//        }
        // 18/09/2018 - Emanuele - Sposto qui le assegnazioni
        // 19/12/2018 - Emanuele - Sposto l'assegnazione del colore pi sopra, prima del tipo di finitura
//        $DLG_COLORE_368_L = "BCO"
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
        GOSUB Get_Image_368_L
        $DLG_COLORE_368   = $DLG_COLORE_368_L
        $DLG_COLORE_368_O = $DLG_COLORE_368_L
        $DLG_COLORE_368_W = $DLG_COLORE_368_L
          // 18/09/2018 - Emanuele - Commento l'assegnazione della descrizione e delle immagini perch  una
          // ripetizione
//        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
//        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
//        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        posx = 30
        posy = 170
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 17/09/2018 - Emanuele - Sposto la procedura dopo le assegnazioni delle finiture perch altrimenti
        // assegna la radice errata e dopo qualche aggiorna si sistema
        // 23/01/2018 - Filippo - cambio la radice al volo
//        GOSUB CambiaRadDlgBifGentle

        // 06/09/2018 - Emanuele - Modifico condizione per la gestione delle finiture Xglass
//        if($DLG_value_ww == 1 | $DLG_value_gentle  == 1)
         // 18/09/2018 - Emanuele - Commento il controllo e sposto qui sotto le assegnazioni
//        if($DLG_value_ww == 1 | $DLG_value_gentle  == 1 | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
//        {
//           $DLG_COLORE_368_O = "BCO"
//           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
//           GOSUB Get_Image_368_O
//           $DLG_COLORE_368   = $DLG_COLORE_368_O
//           $DLG_COLORE_368_L = $DLG_COLORE_368_O
//           $DLG_COLORE_368_W = $DLG_COLORE_368_O
//        }
        // 19/12/2018 - Emanuele - Sposto qui l'assegnazione per aggiungere delle condizioni
        if($DLG_value_lucido==0 & $DLG_value_laccato==0)
        {
           $DLG_COLORE_368_O = "BCO"
        }

        $DLG_value_opaco   = 1
        $DLG_value_lucido  = 0
        $DLG_value_laccato = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        // 17/09/2018 - Emanuele - Sposto qui la procedura
        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04
        //$DLG_enable_sp04   = 1
        //Massimiliano 25/06/14 - riabilita in dialog
        //if( $Larg < 736 )  {  $DLG_enable_sp04   = 1  }
        // Eugenio 03.03.15 Cambiato secondo disponibilit nuovo listino
        // 20/06/2018 - Emanuele - Sposto il controllo nel configura altrimenti vengono saltati diversi controlli
//        if( $Alte <= 368 )  {  $DLG_enable_sp04   = 1  }
//        else
//        {
//           if( $Alte <= 552 & $Larg <= 1104 )  {  $DLG_enable_sp04   = 1  }
//           else                                {  $DLG_enable_sp04   = 0  }
//        }
        // 18/09/2018 - Emanuele - Sposto qui le assegnazioni
        // 19/12/2018 - Emanuele - Sposto l'assegnazione del colore pi sopra
//        $DLG_COLORE_368_O = "BCO"
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
        GOSUB Get_Image_368_O
        $DLG_COLORE_368   = $DLG_COLORE_368_O
        $DLG_COLORE_368_L = $DLG_COLORE_368_O
        $DLG_COLORE_368_W = $DLG_COLORE_368_O
        // 18/09/2018 - Emanuele - Commento le assegnazioni della descrizione e delle immagini perch  una ripetizione
//        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
//        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
//        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdLaccato
   {
     Caption = MSG(722)
     Hint    = MSG(722)
     Value   = $DLG_value_laccato
     Enable  = $DLG_enable_rd_laccato_368

     Placement
     {
        posx = 30
        posy = 190
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 17/09/2018 - Emanuele - Sposto la procedura dopo le assegnazioni delle finiture perch altrimenti
        // assegna la radice errata e dopo qualche aggiorna si sistema
        // 23/01/2018 - Filippo - cambio la radice al volo
//        GOSUB CambiaRadDlgBifGentle

        // 06/09/2018 - Emanuele - Modifico la condizione per la gestione delle finiture XGlass
//        if($DLG_value_ww == 1 | $DLG_value_gentle  == 1)
         // 18/09/2018 - Emanuele - Commento il controllo e sposto le assegnazioni qui sotto
//        if($DLG_value_ww == 1 | $DLG_value_gentle  == 1 | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
//        {
//           $DLG_COLORE_368_O = "BCO"
//           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
//           GOSUB Get_Image_368_O
//           $DLG_COLORE_368   = $DLG_COLORE_368_O
//           $DLG_COLORE_368_L = $DLG_COLORE_368_O
//           $DLG_COLORE_368_W = $DLG_COLORE_368_O
//        }
        // 19/12/2018 - Emanuele - Sposto qui l'assegnazione per aggiungere delle condizioni
        if($DLG_value_lucido==0 & $DLG_value_opaco==0)
        {
           $DLG_COLORE_368_O = "BCO"
        }

        $DLG_value_laccato = 1
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        // 17/09/2018 - Emanuele - Sposto qui la procedura
        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04
        //$DLG_enable_sp04   = 1
        //Massimiliano 25/06/14 - riabilita in dialog
        //if( $Larg < 736 )  {  $DLG_enable_sp04   = 1  }
        // Eugenio 03.03.15 Cambiato secondo disponibilit nuovo listino
        // 20/06/2018 - Emanuele - Sposto il controllo nel configura altrimenti vengono saltati diversi controlli
//        if( $Alte <= 368 )  {  $DLG_enable_sp04   = 1  }
//        else
//        {
//           if( $Alte <= 552 & $Larg <= 1104 )  {  $DLG_enable_sp04   = 1  }
//           else                                {  $DLG_enable_sp04   = 0  }
//        }
        // 18/09/2018 - Emanuele - Sposto qui le assegnazioni
        // 19/12/2018 - Emanuele - Sposto l'assegnazione del colore pi sopra
//        $DLG_COLORE_368_O = "BCO"
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
        GOSUB Get_Image_368_O
        $DLG_COLORE_368   = $DLG_COLORE_368_O
        $DLG_COLORE_368_L = $DLG_COLORE_368_O
        $DLG_COLORE_368_W = $DLG_COLORE_368_O

          // 18/09/2018 - Emanuele - Commento le assegnazioni della descrizione e delle immagini perch  una
          // ripetizione
//        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
//        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
//        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdWildwood
   {
     Caption = "Wildwood"
     Hint    = "Wildwood"
     Value   = $DLG_value_ww
     Enable  = $DLG_enable_rd_ww_368

     Placement
     {
        posx = 30
        posy = 210
        dimx = 160
        dimy = 20
     }

     OnClick
     [
         // 18/09/2018 - Emanuele - Commento tutto perch non  del tutto corretto. Riscrivo correttamente
//        // 17/09/2018 - Emanuele - Sposto la procedura dopo le assegnazioni delle finiture perch altrimenti
//        // assegna la radice errata e dopo qualche aggiorna si sistema
//        // 23/01/2018 - Filippo - cambio la radice al volo
////        GOSUB CambiaRadDlgBifGentle
//
//        // 06/09/2018 - Emanuele - Aggiungo condizione per la gestione delle finiture XGlass
////        if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1 | $DLG_value_gentle==1)
//        if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1 | $DLG_value_gentle==1
//            | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1
//          )
//        {
//           $DLG_COLORE_368_W = "SZ1"
//           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
//           GOSUB Get_Image_368_W
//           $DLG_COLORE_368   = $DLG_COLORE_368_W
//           $DLG_COLORE_368_L = $DLG_COLORE_368_W
//           $DLG_COLORE_368_O = $DLG_COLORE_368_W
//        }
//
//        $DLG_value_laccato = 0
//        $DLG_value_opaco   = 0
//        $DLG_value_lucido  = 0
//        $DLG_value_ww      = 1
//        // 23/01/2018 - Filippo - bifacciali 04 gentle
//        $DLG_value_gentle  = 0
//        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
//        $DLG_value_lucido_xglass = 0
//        $DLG_value_opaco_xglass = 0
//
//        // 17/09/2018 - Emanuele - Sposto qui la procedura
//        GOSUB CambiaRadDlgBifGentle
//
//        // 21/06/2018 - Emanuele - Commento l'assegnazione del valore 0 per la variabile $DLG_enable_sp04
//        // perch aggiungo una procedura che contiene tutti i controlli per valorizzare correttamente la variabile
////        $DLG_enable_sp04   = 0
//        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
//        // tramite diverse condizioni
//        GOSUB Cntrl_FrontBif36e8_sp04
//
//        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
//        GOSUB Get_Image_368_W
//        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
//        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)



        $DLG_value_laccato = 0
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 1
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        // 17/09/2018 - Emanuele - Sposto qui la procedura
        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04

        $DLG_COLORE_368_W = "SZ1"
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
        GOSUB Get_Image_368_W
        $DLG_COLORE_368   = $DLG_COLORE_368_W
        $DLG_COLORE_368_L = $DLG_COLORE_368_W
        $DLG_COLORE_368_O = $DLG_COLORE_368_W

     ]

   }

   // 23/01/2018 - Filippo - bifacciali 04 gentle
   Radio RdGentle
   {
     Caption = MSG(3500)
     Hint    = MSG(3500)
     Value   = $DLG_value_gentle
     Enable  = $DLG_ena_gentle

     Placement
     {
        posx = 30
        posy = 230
        dimx = 160
        dimy = 20
     }

     OnClick
     [
         // 18/09/2018 - Emanuele - Commento tutto quello che  stato fatto prima perch ci sono diversi errori.
         // Riscrivo correttamente qui sotto
//        // 17/09/2018 - Emanuele - Sposto la procedura dopo le assegnazioni delle finiture perch altrimenti
//        // assegna la radice errata e dopo qualche aggiorna si sistema
//        // 23/01/2018 - Filippo - cambio la radice al volo
////        GOSUB CambiaRadDlgBifGentle
//
//
//        //default
//        // 06/09/2018 - Emanuele - Modifico la condizione per la gestione delle finiture XGlass
////        if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1 | $DLG_value_ww == 1)
//        if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1 | $DLG_value_ww == 1
//            | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1
//          )
//        {
//          COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_GE=",APICI(),"RG1",APICI()))
//          if(VAR_EXIST($DLG_idx_to_call,"GEST_GE"))
//          {
//             // 17/09/2018 - Emanuele - Aggiungo assegnazione per evitare che a fine dialog ci siano selezionate
//             // due finiture.
//             $DLG_COLORE_368 = VAR_VAL_STR($DLG_idx_to_call,"GEST_GE")
//             $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
//             $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),".bmp")
//             $DLG_image_file   = SUBST_LABEL($DLG_image_file)
//          }
//
//           //$DLG_COLORE_368   = $DLG_COLORE_368_GE
//           //$DLG_COLORE_368_L = $DLG_COLORE_368_GE
//           //$DLG_COLORE_368_O = $DLG_COLORE_368_GE
//        }
//
//        $DLG_value_laccato = 0
//        $DLG_value_opaco   = 0
//        $DLG_value_lucido  = 0
//        $DLG_value_ww      = 0
//        // 23/01/2018 - Filippo - bifacciali 04 gentle
//        $DLG_value_gentle  = 1
//        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
//        $DLG_value_lucido_xglass = 0
//        $DLG_value_opaco_xglass = 0
//
//        // 17/09/2018 - Emanuele - Sposto qui la procedura
//        GOSUB CambiaRadDlgBifGentle
//
//        // 21/06/2018 - Emanuele - Commento l'assegnazione del valore 0 per la variabile $DLG_enable_sp04
//        // perch aggiungo una procedura che contiene tutti i controlli per valorizzare correttamente la variabile
////        $DLG_enable_sp04   = 0
//        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
//        // tramite diverse condizioni
//        GOSUB Cntrl_FrontBif36e8_sp04
//
//        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
//        //GOSUB Get_Image_368_W
//        if(VAR_EXIST($DLG_idx_to_call,"GEST_GE"))
//        {
//           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
//           $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),".bmp")
//           $DLG_image_file   = SUBST_LABEL($DLG_image_file)
//        }

        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)


        $DLG_value_laccato = 0
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 1
        // 06/09/2018 - Emanuele - Aggiungo assegnazioni variabili per la gestione delle finiture XGlass
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        // 17/09/2018 - Emanuele - Sposto qui la procedura
        GOSUB CambiaRadDlgBifGentle

        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04

        if(VAR_EXIST($DLG_idx_to_call,"GEST_GE"))
        {
           // 17/09/2018 - Emanuele - Aggiungo assegnazione per evitare che a fine dialog ci siano selezionate
           // due finiture.
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_GE=",APICI(),"RG1",APICI()))
           $DLG_COLORE_368 = VAR_VAL_STR($DLG_idx_to_call,"GEST_GE")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
           $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),".bmp")
           $DLG_image_file   = SUBST_LABEL($DLG_image_file)
        }


     ]

   }
   // 06/09/2018 - Emanuele - Aggiungo radiobutton per la gestione delle finiture XGlass
   Radio RdXGlassL
   {
     Caption = MSG(3601)
     Hint    = MSG(3601)
     Value   = $DLG_value_lucido_xglass

     Placement
     {
        posx = 30
        posy = 250
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 19/12/2018 - Emanuele - Aggiungo condizione prima di assegnare il colore alla variabile
        if($DLG_value_opaco_xglass==0)
        {
           $DLG_COLORE_XGLASS = "MR1"
        }
        $DLG_COLORE_368 = $DLG_COLORE_XGLASS
        $DLG_value_laccato = 0
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        $DLG_value_lucido_xglass = 1
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04

        GOSUB Get_Image_XGlass

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),$DLG_COLORE_XGLASS,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   // 06/09/2018 - Emanuele - Aggiungo radiobutton per la gestione delle finiture XGlass
   Radio RdXGlassO
   {
     Caption = MSG(3602)
     Hint    = MSG(3602)
     Value   = $DLG_value_opaco_xglass

     Placement
     {
        posx = 30
        posy = 270
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 19/12/2018 - Emanuele - Aggiungo condizione prima di assegnare il colore alla variabile
        if($DLG_value_lucido_xglass==0)
        {
           $DLG_COLORE_XGLASS = "MR1"
        }
        $DLG_COLORE_368 = $DLG_COLORE_XGLASS
        $DLG_value_laccato = 0
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 1
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 0

        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04

        GOSUB Get_Image_XGlass

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
        $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),$DLG_COLORE_XGLASS,".bmp")
        $DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }
   // 17/05/2019 - Emanuele - Aggiungo radiobutton per metallizzato
   Radio RdLucidoMetal
   {
     Caption = $DLG_caption_lucido_metal
     Hint    = $DLG_hint_lucido_metal
     Value   = $DLG_value_lucido_metal

     Placement
     {
        posx = 30
        posy = 290
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 19/12/2018 - Emanuele - Aggiungo condizione prima di assegnare il colore alla variabile
        if($DLG_value_opaco_metal==0)
        {
           $DLG_COLORE_METAL = "MT4"
        }
        $DLG_COLORE_368 = $DLG_COLORE_METAL
        $DLG_value_laccato = 0
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 1
        $DLG_value_opaco_metal = 0

        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04

        GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
     ]

   }

   Radio RdOpacoMetal
   {
     Caption = $DLG_caption_opaco_metal
     Hint    = $DLG_hint_opaco_metal
     Value   = $DLG_value_opaco_metal

     Placement
     {
        posx = 30
        posy = 310
        dimx = 160
        dimy = 20
     }

     OnClick
     [
        // 19/12/2018 - Emanuele - Aggiungo condizione prima di assegnare il colore alla variabile
        if($DLG_value_lucido_metal==0)
        {
           $DLG_COLORE_METAL = "MT4"
        }
        $DLG_COLORE_368 = $DLG_COLORE_METAL
        $DLG_value_laccato = 0
        $DLG_value_opaco   = 0
        $DLG_value_lucido  = 0
        $DLG_value_ww      = 0
        // 23/01/2018 - Filippo - bifacciali 04 gentle
        $DLG_value_gentle  = 0
        $DLG_value_lucido_xglass = 0
        $DLG_value_opaco_xglass = 0
        // 16/05/2019 - Emanuele - Aggiungo assegnazione per metallizzato
        $DLG_value_lucido_metal = 0
        $DLG_value_opaco_metal = 1

        GOSUB CambiaRadDlgBifGentle

        // 21/06/2018 - Emanuele - Aggiungo una procedura che permette di valorizzare l'enable per lo sp04
        // tramite diverse condizioni
        GOSUB Cntrl_FrontBif36e8_sp04

        GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
     ]

   }

   Check chkSpessore
   {
     Caption = MSG(379)
     Hint    = MSG(379)
     Enable  = $DLG_enable_sp04
     Value   = $DLG_value_sp04

     Placement
     {
        posx = 50
//        posy = 320
        posy = 360
        dimx = 170
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_sp04==1)
        {
//           $DLG_value_sp04 = 1
           $DLG_enable_rd_ww_368 = 0
           // 23/01/2018 - Filippo - bifacciali 04 gentle
           $DLG_ena_gentle = 1
           if($DLG_value_ww == 1)
           {
              $DLG_value_ww = 0
              $DLG_value_gentle = 1
              // 23/01/2018 - Filippo - cambio la radice al volo
              GOSUB CambiaRadDlgBifGentle
           }
        }
        else
        {
//           $DLG_value_sp04 = 0
           $DLG_enable_rd_ww_368 = 1
           // 21/06/2018 - Emanuele - Aggiungo controllo che disabilita il wildwood
           if( $Alte > 368 & $Larg > 368 )
           {
              $DLG_enable_rd_ww_368 = 0
           }

           // 23/01/2018 - Filippo - bifacciali 04 gentle
           $DLG_ena_gentle = 0
           if($DLG_value_gentle == 1)
           {
              $DLG_value_gentle = 0
              $DLG_value_ww = 1
              // 21/06/2018 - Emanuele - Aggiungo controllo che disabilita il wildwood
              if( $Alte > 368 & $Larg > 368 )
              {
                 $DLG_value_ww = 0
                 $DLG_value_laccato = 1
                 $DLG_COLORE_368_O = "BCO"
                 $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
                 GOSUB Get_Image_368_O
                 $DLG_COLORE_368   = $DLG_COLORE_368_O
                 $DLG_COLORE_368_L = $DLG_COLORE_368_O
                 $DLG_COLORE_368_W = $DLG_COLORE_368_O
              }
              // 23/01/2018 - Filippo - cambio la radice al volo
              GOSUB CambiaRadDlgBifGentle
           }

        }
        // 23/01/2018 - Filippo - cambio la radice al volo
        GOSUB CambiaRadDlgBifGentle

     ]

   }

   Check chkElimina
   {
     Caption = MSG(23)
     Hint    = MSG(23)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 50
//        posy = 340
        posy = 380
        dimx = 170
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(360))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 135
//         posy = 380
         posy = 420
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 50
//         posy = 380
         posy = 420
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 50
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1 | $DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
         }
         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }
         // 23/01/2018 - Filippo - bifacciali 04 gentle
         if($DLG_value_gentle==1)
         {
            if(VAR_EXIST($DLG_idx_to_call,"GEST_GE"))
            {
               // trasformo in TabDaDbBmp. Pare che creando al volo la variabile venga creata come TabDaDbCol
               if( VAR_MODE($DLG_idx_to_call,"GEST_GE")!=131072 )
               {
                  VAR_SET_MODE($DLG_idx_to_call,"GEST_GE",131072)
               }

               $R = CHIEDI($DLG_idx_to_call,"GEST_GE")
               $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),"colori_tutti.txt")
               $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_GE"),".bmp")
               $DLG_image_file   = SUBST_LABEL($DLG_image_file)
            }
            //GOSUB Get_Image_368_L
            //$DLG_COLORE_368   = $DLG_COLORE_368_L
            //$DLG_COLORE_368_O = $DLG_COLORE_368_L
            //$DLG_COLORE_368_W = $DLG_COLORE_368_L
         }
         // 06/09/2018 - Emanuele - Aggiungo condizione per la gestione delle finiture XGlass
         if($DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_COLORE_368 = $DLG_COLORE_XGLASS
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_XGLASS"),"colori_tutti.txt")
            GOSUB Get_Image_XGlass
         }
         // 17/05/2019 - Emanuele - Aggiungo condizione per metallizzato
         if($DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_COLORE_368 = $DLG_COLORE_METAL
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_METAL"),"colori_tutti.txt")
            if($DLG_value_lucido_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            else                           { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }
      ]
   }
}
//======================================================================================================
//25.07.2017 - Filippo - dialog per bifacciali a fasce 368     [
//dialog principale
Dlg BifaccialeFasce368
{
   Caption = MSG(22)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 555
      dimy = 330
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Selezione
   {
      Caption = MSG(1780)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 150
      }

      Label LblSeleziona
      {
        Caption = MSG(1781)
        Hint    = MSG(1780)
        Value   = MSG(1781)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtSeleziona
      {
        Caption = $DLG_caption_selezione
        Hint    = $DLG_hint_selezione
        Value   = $DLG_bifacciale_selezionato

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LabNota2
      {
         //Caption = MSG(1798)
         Caption = MSG(3133)

         Placement
         {
            posx = 10
            posy = 60
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }

      Label LabNota3
      {
         Caption = MSG(3134)

         Placement
         {
            posx = 10
            posy = 75
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }

   }

   Frame ConfMasselli
   {
      Caption = MSG(1789)
      Placement
      {
         posx = 10
         posy = 160
         dimx = 170
         dimy = 60
      }
   }

   Frame FrmDelete
   {
      Caption = MSG(3305)

      Placement
      {
         posx = 190
         posy = 160
         dimx = 170
         dimy = 60
      }

      Check chkElimina
      {
        Caption = MSG(3304)
        Hint    = MSG(3304)
        Enable  = 1
        Value   = $DLG_checkfordelete

        Placement
        {
           posx = 20
           posy = 30
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
           {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
           }
           if($DLG_checkfordelete==1)
           {
              $DLG_checkfordelete = 1
           }
           else
           {
              $DLG_checkfordelete = 0
           }
        ]

      }
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 190
         posy = 10
         dimx = 170
         dimy = 150
      }


      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza
        Enable = $DLG_ena_Y

        Placement
        {
           posx = 80
           posy = 55
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(634)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 370
         posy = 10
         dimx = 170
         dimy = 150
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  55
            posy =  40
            dimx =  64
            dimy =  64
         }
      }

   }

   Frame TipoFinitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 370
         //posy = 165
         posy = 160
         dimx = 170
         //dimy = 125
         dimy = 60
      }

    //  Label LblTipoFin
    //  {
    //    Caption = MSG(602)
    //    Hint    = MSG(602)
    //    Value   = MSG(602)
    //
    //    Placement
    //    {
    //       posx = 10
    //       //posy = 30
    //       posy = 15
    //       dimx = 80
    //       dimy = 20
    //    }
    //
    //  }

      Edit EdtTipoFin
      {
        Caption = $DLG_caption_material
        Hint    = $DLG_hint_material
        Value   = $DLG_value_material

        Placement
        {
           posx = 10
           //posy = 50
           posy = 25
           dimx = 120
           dimy = 20
        }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 290
         posy = 255
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 200
         posy = 255
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
         {
             COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
         }
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 390
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
         {
             COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
         }

         if($DLG_value_opaco==1 | $DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
            GOSUB PassaFinitura_BifaccialeFiglio
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            GOSUB PassaFinitura_BifaccialeFiglio
         }
         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
            GOSUB PassaFinitura_BifaccialeFiglio
         }
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)
      Enable = $DLG_ena_X

      Placement
      {
         posx = 325
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
        {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
        }

        $pre_x = VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato))
        $R = CHIEDI($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato))
        $DLG_hint_larghezza     = STRCAT(MSG(624),STR(VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato))))
        $DLG_caption_larghezza  = STR(VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato)))
        $DLG_value_larghezza    = STR(VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato)))

        //Filippo - l'utente non pu scegliere combinazioni di misure non previste dal listino
        GOSUB ONCHANGE_check_limiti_bifacciali_fasce
        while($continua_cambiaX == 0)
        {
           $R = CHIEDI($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato))
           $DLG_hint_larghezza     = STRCAT(MSG(624),STR(VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato))))
           $DLG_caption_larghezza  = STR(VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato)))
           $DLG_value_larghezza    = STR(VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato)))
           GOSUB ONCHANGE_check_limiti_bifacciali_fasce
        }

        //Filippo - su PYH, per evitare che inevitabilmente in determinatre circostanze vengano inseriti
        //          bifacciali da 184 devo bloccare TUTTE le misure al di fuori di 368 e 736
        //          Solo nel caso di contenitori da 920 posso inserire bifacciali da 552 per la ragione
        //          sopra citata
        GOSUB DLG_bif_fasc_larg_check_riv

        //Filippo - se l'utente modifica un bifacciale, la struttura dei bifacciali dovr essere riadattata
        if($pre_x != VAR_VAL($DLG_idx_to_call,STRCAT("Xbif",$DLG_bifacciale_selezionato)))
        {
           $action_bf368 = 0
           while($action_bf368 == 0)
           {
               //Definisco cosa posso fare e cosa non posso fare
               GOSUB initvalori_dialog_mod_bf368
               //avvia la dialog per la scelta dell'azione
               COMANDO2(STRCAT("run_dll_cmd bdmdialog MakeDialog ",APICI(),SUBST_LABEL(STRCAT("%install_dir%\tab_lago\tab_m4",CHR2STR(92))),"dialog.txt|ModBifaccialiFasce",APICI()))
               //In base alla scelta dell'utente, applico un'azione
               GOSUB action_dialog_mod_bf368
           }
        }
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)
      Enable = $DLG_ena_Y

      Placement
      {
         posx = 325
         posy = 65
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
        {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
        }

        $R = CHIEDI($DLG_idx_to_call,"Y")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR(VAR_VAL($DLG_idx_to_call,"Y")))
        $DLG_caption_altezza  = STR(VAR_VAL($DLG_idx_to_call,"Y"))
        $DLG_value_altezzaa    = STR(VAR_VAL($DLG_idx_to_call,"Y"))
      ]
   }

   Button btnSelezione
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(1780)
      Enable = 1

      Placement
      {
         posx = 145
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
        {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
        }

        //prima di far scegliere un bifacciale, verifico quanti ce ne sono
        GOSUB refresh_contatori_bifacciali_masselli
        //e in base alla quantit, definisco i menu
        GOSUB setta_menu_biffasc368_dialog

        $R = CHIEDI($DLG_idx_to_call,"selected_object")
        $DLG_hint_selezione     = STRCAT(MSG(1781),STR(VAR_VAL($DLG_idx_to_call,"selected_object")))
        $DLG_caption_selezione  = STR(VAR_VAL($DLG_idx_to_call,"selected_object"))
        $DLG_bifacciale_selezionato    = STR(VAR_VAL($DLG_idx_to_call,"selected_object"))

        //dopo aver scelto un bifacciale eseguo un context switch per mostrare i dati di quello specifico bifacciale
        GOSUB BifaccFascContextSwitch_DLG
      ]
   }

   Button btnMateriale
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 510
         posy = 185
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
        {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
        }

        $DLG_idx_bifacciale_selezionato = VAR_VAL($DLG_idx_to_call,STRCAT("idx_bifacciale_",$DLG_bifacciale_selezionato))
        $DLG_value_lucido_prec  = VAR_VAL($DLG_idx_bifacciale_selezionato,"VAR_colore_lucido")
        $DLG_value_opaco_prec   = VAR_VAL($DLG_idx_bifacciale_selezionato,"VAR_colore_opaco")
        $DLG_value_laccato_prec = VAR_VAL($DLG_idx_bifacciale_selezionato,"VAR_colore_laccato")
        $DLG_value_ww_prec      = VAR_VAL($DLG_idx_bifacciale_selezionato,"VAR_colore_ww")

        $R = CHIEDI(-1,"DLG_LucOpaLacWw")
        //definisco i default di colore se passo da ww a non ww e vice versa,
        //setto i vari VAR_colore ed eseguo un refresh delle immagini della dialog
        GOSUB OnClickBtnChangeMaterial_BifacFasc368
         //Se cambio materiale di un pannello, lo cambio su tutti
        GOSUB bif_fasc_ctrl_materiali_dlg

        $DLG_hint_material     = STR(620)
        $DLG_caption_material  = STR(VAR_VAL(-1,"DLG_LucOpaLacWw"))
        $DLG_value_material = $DLG_caption_material
        if($DLG_LucOpaLacWw == 1) { $DLG_value_material = MSG(751) }
        if($DLG_LucOpaLacWw == 2) { $DLG_value_material = MSG(752) }
        if($DLG_LucOpaLacWw == 3) { $DLG_value_material = MSG(722) }
        if($DLG_LucOpaLacWw == 4) { $DLG_value_material = MSG(899) }
        $DLG_caption_material = $DLG_value_material
      ]
   }

   Button btnModMass
   {
      Caption = MSG(1789)
      Result  = 0
      Hint = MSG(1789)
      Enable = $DLG_ena_btn_masselli

      Placement
      {
         posx = 15
         posy = 185
         dimx = 160
         dimy = 25
      }

      OnClick
      [
        if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
        {
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
        }
           // se l'utente sceglie questa dialog, deve per forza uscire usando i bottoni
           // causa controlli differenziati x azione e lanciati sull'onclick
           $action_bf368 = 0
           while($action_bf368 == 0)
           {
               //definisco valori iniziali prima della dialog
               GOSUB initvalori_dialog_mod_mass_bf368
               //lancio la dialog dei masselli
               COMANDO2(STRCAT("run_dll_cmd bdmdialog MakeDialog ",APICI(),SUBST_LABEL(STRCAT("%install_dir%\tab_lago\tab_m4",CHR2STR(92))),"dialog.txt|MasselliBifaccFasc",APICI()))
           }
      ]
   }

   Bevel Bvl
   {
     Placement
     {
        posx = 10
        posy = 240
        dimx = 535
        dimy = 2
     }
   }

}
//======================================================================================================
//25.07.2017 - Filippo - dialog per bifacciali a fasce 368 - Modifica in X
Dlg ModBifaccialiFasce
{
   Caption = MSG(22)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 375
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Nota2
   {
      Caption = MSG(3110)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 350
         dimy = 80
      }

      Label LabNota0
      {
         Caption = MSG(1792)

         Placement
         {
            posx = 10
            posy = 20
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           //color = 255
         }
      }

      Label LabNota1
      {
         Caption = MSG(1790)

         Placement
         {
            posx = 10
            posy = 40
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }

      Label LabNota2
      {
         Caption = MSG(1791)

         Placement
         {
            posx = 10
            posy = 55
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }
   }

   Frame Azione
   {
      Caption = MSG(1784)

      Placement
      {
         posx = 10
         posy = 90
         dimx = 170
         dimy = 140
      }

      Radio RdAdatta
      {
        Caption = MSG(1785)
        Hint    = MSG(1785)
        Value   = $DLG_value_adatta
        Enable  = $DLG_enable_rd_Adatta

        Placement
        {
           posx = 10
           posy = 25
           dimx = 160
           dimy = 20
        }

        OnClick
        [
            $DLG_value_adatta        = 1
            $DLG_value_aggiungi_bif  = 0
            $DLG_value_rimuovi_bif   = 0
            $DLG_value_annulla_bif   = 0
            $DLG2_ena_add_next       = 0
            $DLG2_ena_selection      = 1
        ]

      }

      Radio RdAggiunta
      {
        Caption = MSG(1786)
        Hint    = MSG(1786)
        Value   = $DLG_value_aggiungi_bif
        Enable  = $DLG_enable_rd_aggiunta

        Placement
        {
           posx = 10
           posy = 50
           dimx = 160
           dimy = 20
        }

        OnClick
        [
            $DLG_value_adatta        = 0
            $DLG_value_aggiungi_bif  = 1
            $DLG_value_rimuovi_bif   = 0
            $DLG_value_annulla_bif   = 0
            $DLG2_ena_add_next       = 1
            $DLG2_ena_selection      = 0

            $DLG2_testo_checkbox = MSG(1788)
        ]

      }

      Radio RdRimozione
      {
        Caption = MSG(1787)
        Hint    = MSG(1787)
        Value   = $DLG_value_rimuovi_bif
        Enable  = $DLG_enable_rd_rimozione

        Placement
        {
           posx = 10
           posy = 75
           dimx = 160
           dimy = 20
        }

        OnClick
        [
            $DLG_value_adatta        = 0
            $DLG_value_aggiungi_bif  = 0
            $DLG_value_rimuovi_bif   = 1
            $DLG_value_annulla_bif   = 0
            $DLG2_ena_add_next       = 1
            $DLG2_ena_selection      = 0

            $DLG2_testo_checkbox = MSG(1799)
        ]

      }

      Radio RdAnnullaModifiche
      {
        Caption = MSG(616)
        Hint    = MSG(616)
        Value   = $DLG_value_annulla_bif
        Enable  = $DLG_enable_rd_annulla

        Placement
        {
           posx = 10
           posy = 100
           dimx = 160
           dimy = 20
        }

        OnClick
        [
            $DLG_value_adatta        = 0
            $DLG_value_aggiungi_bif  = 0
            $DLG_value_rimuovi_bif   = 0
            $DLG_value_annulla_bif   = 1
            $DLG2_ena_add_next       = 0
            $DLG2_ena_selection      = 0
        ]

      }

   }

   Frame FrmBifacciale
   {
      Caption = MSG(1780)

      Placement
      {
         posx = 190
         posy = 90
         dimx = 170
         //dimy = 105
         dimy = 115
      }

      Check chkAddNext
      {
        Caption = $DLG2_testo_checkbox
        Hint = $DLG2_testo_checkbox
        //Caption = MSG(1788)
        //Hint    = MSG(1788)
        Enable  = $DLG2_ena_add_next
        Value   = $DLG2_value_add_next

        Placement
        {
           posx = 10
           posy = 25
           dimx = 160
           dimy = 20
        }

        OnClick
        [
         if($DLG2_value_add_next == 1)
         {
            $DLG2_ena_selection = 1
         }
         if($DLG2_value_add_next == 0)
         {
            $DLG2_ena_selection = 0
         }
        ]

      }

      Label LblBifac
      {
        Caption = MSG(1781)
        Hint    = MSG(1780)
        Value   = MSG(1781)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtBifac
      {
        Caption = $DLG_ed_caption_selezione
        Hint    = $DLG_ed_hint_selezione
        Value   = $DLG_ed_bifacciale_selezionato
        Enable = $DLG2_ena_selection

        Placement
        {
           posx = 80
           posy = 55
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LabNota2
      {
         //Caption = MSG(1798)
         Caption = MSG(3133)

         Placement
         {
            posx = 10
            posy = 80
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }

      Label LabNota3
      {
         Caption = MSG(3134)

         Placement
         {
            posx = 10
            posy = 95
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }


   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 265
         posy = 205
         dimx = 95
         dimy = 30
      }

      OnClick
      [
         $action_bf368 = 1
         $OK=1
      ]
   }

   Button btnSel2
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(1780)
      Enable = $DLG2_ena_selection

      Placement
      {
         posx = 325
         posy = 145
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"object_to_edit")
        $DLG_ed_hint_selezione     = STRCAT(MSG(1781),STR(VAR_VAL($DLG_idx_to_call,"object_to_edit")))
        $DLG_ed_caption_selezione  = STR(VAR_VAL($DLG_idx_to_call,"object_to_edit"))
        $DLG_ed_bifacciale_selezionato    = STR(VAR_VAL($DLG_idx_to_call,"object_to_edit"))
      ]
   }

}
//======================================================================================================
//25.07.2017 - Filippo - dialog per bifacciali a fasce 368 - Dialog masselli
Dlg MasselliBifaccFasc
{
   Caption = MSG(22)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 375
      dimy = 200
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Selezione
   {
      Caption = MSG(1793)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         //dimy = 75
         dimy = 90
      }

      Label LblSeleziona
      {
        Caption = MSG(1794)
        Hint    = MSG(1793)
        Value   = MSG(1794)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtSeleziona
      {
        Caption = $DLG2_caption_selezione
        Hint    = $DLG2_hint_selezione
        Value   = $DLG2_massello_selezionato

        Placement
        {
           posx = 80
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LabNota2
      {
         //Caption = MSG(1798)
         Caption = MSG(3133)

         Placement
         {
            posx = 10
            posy = 55
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }

      Label LabNota3
      {
         Caption = MSG(3134)

         Placement
         {
            posx = 10
            posy = 70
            dimx = 350
            dimy = 30
         }
         Font
         {
           size  = 8.5
           type  = 1
           color = 255
         }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 190
         posy = 10
         dimx = 170
         dimy = 150
      }

      Label LabFinitura
      {
         Caption = $DLG2_descrizione_var
         Value   = $DLG2_descrizione_var
         Hint    = $DLG2_descrizione_var

         Placement
         {
            posx = 25
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG2_descrizione_var
         Value   = $DLG2_image_file
         Hint    = $DLG2_descrizione_var

         Placement
         {
            posx =  55
            posy =  40
            dimx =  64
            dimy =  64
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 110
         //posy = 100
         posy = 120
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $action_bf368 = 1
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 20
         //posy = 100
         posy = 120
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $action_bf368 = 1
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 210
         posy = 125
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $numero_massello_invertito = VAR_VAL($DLG_idx_to_call,"n_masselli") + 1 - VAR_VAL($DLG_idx_to_call,"selected_massello")
         //$nome_gest_massello = STRCAT("E",STR(VAR_VAL($DLG_idx_to_call,"selected_massello")))
         $nome_gest_massello = STRCAT("E",STR($numero_massello_invertito))
         //STRCAT("GEST_",$nome_gest_massello)

         $R = CHIEDI($DLG_idx_pdr,STRCAT("GEST_",$nome_gest_massello))
         $DLG2_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_pdr,STRCAT("GEST_",$nome_gest_massello)),"colori_tutti.txt")
         $DLG2_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_pdr,STRCAT("GEST_",$nome_gest_massello)),".bmp")
         $DLG2_image_file   = SUBST_LABEL($DLG2_image_file)
      ]
   }

   Button btnSelezioneMassello
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(1793)
      Enable = 1

      Placement
      {
         posx = 145
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"selected_massello")
        $DLG2_hint_selezione     = STRCAT(MSG(1794),STR(VAR_VAL($DLG_idx_to_call,"selected_massello")))
        $DLG2_caption_selezione  = STR(VAR_VAL($DLG_idx_to_call,"selected_massello"))
        $DLG2_massello_selezionato    = STR(VAR_VAL($DLG_idx_to_call,"selected_massello"))

        //se cambio massello, eseguo un context switch
        GOSUB MassBifaccFascContextSwitch_DLG
      ]
   }

}
//                                                             ]
//======================================================================================================

//25.08.2017 - Filippo - Dialog per elemento di giunzione
Dlg AIR_Giunzione
{
   Caption = MSG(2156)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 175
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Posizione
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 80
      }

      Radio RdDx
      {
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_value_dx
        Enable  = $DLG_ena_dx

        Placement
        {
           posx = 10
           posy = 50
           dimx = 160
           dimy = 20
        }

        OnClick
        [
            $DLG_value_sx = 0
            $DLG_value_dx = 1
        ]

      }

      Radio RdSx
      {
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_value_sx
        Enable  = $DLG_ena_sx

        Placement
        {
           posx = 10
           posy = 25
           dimx = 160
           dimy = 20
        }

        OnClick
        [
            $DLG_value_dx = 0
            $DLG_value_sx = 1
        ]

      }

   }

   Frame FrmDelete
   {
      Caption = MSG(3305)

      Placement
      {
         posx = 10
         posy = 95
         dimx = 150
         dimy = 60
      }

      Check chkElimina
      {
        Caption = MSG(3304)
        Hint    = MSG(3304)
        Enable  = 1
        Value   = $DLG_checkfordelete

        Placement
        {
           posx = 20
           posy = 30
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if(VAR_VAL($DLG_idx_to_call,"modalita_manuale")==1)
           {
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," modalita_manuale=1"))
           }
           if($DLG_checkfordelete==1)
           {
              $DLG_checkfordelete = 1
           }
           else
           {
              $DLG_checkfordelete = 0
           }
        ]

      }
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 160
         dimx = 70
         dimy = 35
      }

      OnClick
      [
         $action_bf368 = 1
         $OK=1
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 160
         dimx = 70
         dimy = 35
      }

      OnClick
      [
         $OK=0
      ]
   }

}

Dlg 36e8_Da_Cancellare
{
   Caption = MSG(25)

   Placement
   {
      posx = 130
      posy = 150
      dimx = 180
      dimy = 115
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Check chkElimina
   {
     Caption = $DLG_caption_368
     Hint    = $DLG_hint_368
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 15
        posy = 15
        dimx = 120
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 50
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 50
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg 36e8_Rip_Legno
{
   Caption = MSG(25)

   Placement
   {
      posx = 130
      posy = 150
      dimx = 175
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Check chkElimina
   {
     Caption = $DLG_caption_368
     Hint    = $DLG_hint_368
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 25
        posy = 155
        dimx = 120
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}

Dlg 36e8_SuppVetro
{
   Caption = MSG(26)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 300
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Radio Rd92
   {
     Caption = MSG(28)
     Hint    = MSG(28)
     Value   = $DLG_value_rd_uso_1
     Enable  = $DLG_enable_rd_uso_1

     Placement
     {
        posx = 30
        posy = 15
        dimx = 140
        dimy = 20
     }

     OnClick
     [
        $DLG_value_rd_uso_1 = 1
        $DLG_value_rd_uso_2 = 0
        $DLG_value_rd_uso_3 = 0
        $DLG_value_rd_uso_4 = 0
        $DLG_value_rd_uso_5 = 0
     ]
   }

   Radio Rd172
   {
     Caption = MSG(11)
     Hint    = MSG(11)
     Value   = $DLG_value_rd_uso_2
     Enable  = $DLG_enable_rd_uso_2

     Placement
     {
        posx = 30
        posy = 40
        dimx = 140
        dimy = 20
     }

     OnClick
     [
        $DLG_value_rd_uso_1 = 0
        $DLG_value_rd_uso_2 = 1
        $DLG_value_rd_uso_3 = 0
        $DLG_value_rd_uso_4 = 0
        $DLG_value_rd_uso_5 = 0
     ]
   }

   Radio Rd264
   {
     Caption = MSG(13)
     Hint    = MSG(13)
     Value   = $DLG_value_rd_uso_3
     Enable  = $DLG_enable_rd_uso_3

     Placement
     {
        posx = 30
        posy = 65
        dimx = 140
        dimy = 20
     }

     OnClick
     [
        $DLG_value_rd_uso_1 = 0
        $DLG_value_rd_uso_2 = 0
        $DLG_value_rd_uso_3 = 1
        $DLG_value_rd_uso_4 = 0
        $DLG_value_rd_uso_5 = 0
     ]
   }

   Radio Rd356
   {
     Caption = MSG(15)
     Hint    = MSG(15)
     Value   = $DLG_value_rd_uso_4
     Enable  = $DLG_enable_rd_uso_4

     Placement
     {
        posx = 30
        posy = 90
        dimx = 140
        dimy = 20
     }

     OnClick
     [
        $DLG_value_rd_uso_1 = 0
        $DLG_value_rd_uso_2 = 0
        $DLG_value_rd_uso_3 = 0
        $DLG_value_rd_uso_4 = 1
        $DLG_value_rd_uso_5 = 0
     ]
   }

   Radio Rd535
   {
     Caption = MSG(17)
     Hint    = MSG(17)
     Value   = $DLG_value_rd_uso_5
     Enable  = $DLG_enable_rd_uso_5

     Placement
     {
        posx = 30
        posy = 115
        dimx = 140
        dimy = 20
     }

     OnClick
     [
        $DLG_value_rd_uso_1 = 0
        $DLG_value_rd_uso_2 = 0
        $DLG_value_rd_uso_3 = 0
        $DLG_value_rd_uso_4 = 0
        $DLG_value_rd_uso_5 = 1
     ]
   }

   Bevel Bvl1
   {
     Placement
     {
        posx = 15
        posy = 145
        dimx = 270
        dimy = 2
     }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 150
         posy = 155
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 65
         posy = 155
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg NOW_Vassoio
{
   Caption = MSG(766)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Check chkElimina
   {
     Caption = MSG(767)
     Hint    = MSG(767)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 35
        posy = 160
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(768))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }
}


Dlg NOW_FasciaTamp___OLD
{
   Caption = MSG(769)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 265
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Check chkElimina
   {
     Caption = MSG(770)
     Hint    = MSG(770)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 10
        posy = 170
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(771))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 55
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 70
         posy = 200
         dimx = 90
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         GOSUB Get_Image_NOW
      ]
   }
}


Dlg NOW_FasciaTamp
{
   Caption = MSG(769)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 85
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(439)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         GOSUB Get_Image_NOW
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(772)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(773)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza       = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza    = STR($DLG_altezza)
        $DLG_value_altezza      = STR($DLG_altezza)
      ]
   }

   Check chkElimina
   {
     Caption = MSG(770)
     Hint    = MSG(770)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 80
        posy = 155
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(771))
        }
     ]

   }
}


Dlg NOW_DivisorioInt
{
   Caption = MSG(776)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 55
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmPosizione
   {
      Caption = MSG(777)

      Placement
      {
         posx = 10
         posy = 70
         dimx = 150
         dimy = 75
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(778)
        Hint    = MSG(778)
        Value   = MSG(778)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }


      Edit EdtPosVano
      {
        Caption = $DLG_caption_posizione
        Hint    = $DLG_hint_posizione
        Value   = $DLG_caption_posizione

        Placement
        {
           posx = 70
           posy = 45
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblPosVano
      {
        Caption = MSG(433)
        Hint    = MSG(433)
        Value   = MSG(433)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 2)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(773)

      Placement
      {
         posx = 130
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza       = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza    = STR($DLG_altezza)
        $DLG_value_altezza      = STR($DLG_altezza)
      ]
   }

   Button btnVano
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(779)

      Placement
      {
         posx = 130
         posy = 90
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_offset")
         $DLG_caption_offset = STR($DLG_offset)
         $DLG_hint_offset    = $DLG_caption_offset
         $DLG_value_offset   = $DLG_caption_offset
      ]
   }

   Button btnPosVano
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(780)

      Placement
      {
         posx = 130
         posy = 115
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_posizione")
        if( $DLG_posizione==-1 )  { $DLG_caption_posizione = MSG(646) }
        if( $DLG_posizione== 1 )  { $DLG_caption_posizione = MSG(647) }
        $DLG_hint_posizione    = STRCAT(MSG(781)," = ",$DLG_caption_posizione)
        $DLG_value_posizione   = $DLG_caption_posizione
      ]
   }

   Check chkElimina
   {
     Caption = MSG(775)
     Hint    = MSG(775)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 120
        posy = 155
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(725))
        }
     ]

   }
}


Dlg NOW_Ripiano
{
   Caption = MSG(727)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmAccessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Check chkAstaApp
      {
        Caption = MSG(728)
        Hint    = MSG(728)
        Enable  = $DLG_enable_appendiabiti
        Value   = $DLG_value_appendiabiti

        Placement
        {
           posx = 10
           posy = 30
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 14/01/2019 - Emanuele - Aggiungo assegnazione dell'enable dell'illuminazione perch
           // quando viene selezionato l'appendiabiti non si pu anche selezionare il led
           // 15/01/2019 - Emanuele - Rimetto i controlli precedenti perch sono state cambiate le regole
           // ( Illuminazione nuova e quindi  fattibile inserire appendiabiti e led insieme )
           if($DLG_value_appendiabiti==1)   {  $DLG_value_appendiabiti=1  }
           else                             {  $DLG_value_appendiabiti=0  }
//           if($DLG_value_appendiabiti==1)   {  $DLG_value_appendiabiti=1  $DLG_enable_illuminazione=0}
//           else                             {  $DLG_value_appendiabiti=0  $DLG_enable_illuminazione=1}
        ]

      }

      Check chkAstinaEstr
      {
        Caption = MSG(729)
        Hint    = MSG(729)
        Enable  = $DLG_enable_estraibile
        Value   = $DLG_value_estraibile

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_estraibile==1)   {  $DLG_value_estraibile=1  }
           else                           {  $DLG_value_estraibile=0  }
        ]

      }

      Check chkIllum
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = $DLG_enable_illuminazione
        Value   = $DLG_value_illuminazione

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 14/01/2019 - Emanuele - Aggiungo assegnazione dell'enable dell'appendiabiti perch quando viene selezionato il led
           // non si pu selezionare anche l'appendiabiti
           // 15/01/2019 - Emanuele - Rimetto i controlli precedenti perch sono state cambiate le regole
           // ( Illuminazione nuova e quindi  fattibile inserire appendiabiti e led insieme )
           if($DLG_value_illuminazione==1)   {  $DLG_value_illuminazione=1  }
           else                              {  $DLG_value_illuminazione=0  }
//           if($DLG_value_illuminazione==1)   {  $DLG_value_illuminazione=1  $DLG_enable_appendiabiti=0}
//           else                              {  $DLG_value_illuminazione=0  $DLG_enable_appendiabiti=1}
        ]

      }

      Check chkApest
      {
        Caption = MSG(1737)
        Hint    = MSG(1737)
        Enable  = $DLG_enable_appendiestra
        Value   = $DLG_value_appendiestra

        Placement
        {
           posx = 10
           posy = 105
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_appendiestra==1)   {  $DLG_value_appendiestra=1  }
           else                             {  $DLG_value_appendiestra=0  }
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }
         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }

   Check chkElimina
   {
     Caption = MSG(745)
     Hint    = MSG(745)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 120
        posy = 155
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(765))
        }
     ]

   }
}

Dlg NOW_RipianoEV
{
   Caption = MSG(727)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 45
      }

      Label LblLarghezza
      {
         Caption = MSG(624)
         Hint    = MSG(432)
         Enable  = 1
         Value   = MSG(624)

         Placement
         {
            posx = 10
            posy = 20
            dimx = 60
            dimy = 20
         }

         OnClick
         [
         ]

      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }


   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 60
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 85
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 235
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(438)

      Placement
      {
         posx = 130
         posy = 25
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 165
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }

   Check chkElimina
   {
     Caption = MSG(745)
     Hint    = MSG(745)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 20
        posy = 205
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(765))
        }
     ]

   }
}

Dlg NOW_RipianoAngolo
{
   Caption = MSG(774)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmAccessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Check chkAstaApp
      {
        Caption = MSG(728)
        Hint    = MSG(728)
        Enable  = $DLG_enable_appendiabiti
        Value   = $DLG_value_appendiabiti

        Placement
        {
           posx = 10
           posy = 30
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_appendiabiti==1)   {  $DLG_value_appendiabiti=1  }
           else                             {  $DLG_value_appendiabiti=0  }
        ]

      }

      Check chkAstinaEstr
      {
        Caption = MSG(729)
        Hint    = MSG(729)
        Enable  = $DLG_enable_estraibile
        Value   = $DLG_value_estraibile

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_estraibile==1)   {  $DLG_value_estraibile=1  }
           else                           {  $DLG_value_estraibile=0  }
        ]

      }

//      Check chkIllum
//      {
//        Caption = MSG(817)
//        Hint    = MSG(817)
//        Enable  = $DLG_enable_illuminazione
//        Value   = $DLG_value_illuminazione
//
//        Placement
//        {
//           posx = 10
//           posy = 90
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//           if($DLG_value_illuminazione==1)   {  $DLG_value_illuminazione=1  }
//           else                              {  $DLG_value_illuminazione=0  }
//        ]
//
//      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }

   Check chkElimina
   {
     Caption = MSG(745)
     Hint    = MSG(745)
     // Fabrizio 07/09/11 - gestisco la cancellazione
     // solo per i ripiani aggiunti, il ripiano strutturale non
     // pu essere cancellato
     //Enable  = 1
     Enable  = $DLG_enable_cancella
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 120
        posy = 155
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if( $DLG_value_cancella==1 )   { $DLG_value_cancella = 1 }
        else                           { $DLG_value_cancella = 0 }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(765))
        }
     ]
   }
}


Dlg 368CUC_FiancoFree
{
   Caption = MSG(225)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 350
      dimy = 290
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame Finitura2R
   {
      Caption = MSG(753)
      Enable  = $DLG_enable_frame_1_now
      Hint    = MSG(754)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 100
         dimy = 200
      }


      //scritta colore sotto retro in alto
      Label LabFinituraRet
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame_1_now

         Placement
         {
            posx = 5
            posy = 20
            dimx = 90
            dimy = 25
         }
      }

      Image ImRetro
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1_now
         Hint    = $DLG_descrizione_var1
         Enable  = $DLG_enable_frame_1_now

         Placement
         {
            posx =  20
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucidoRet
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido1
        Enable  = $DLG_enable_lucido_opaco2

        Placement
        {
           posx = 15
           posy = 135
           dimx = 50
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido1 = 1
           $DLG_value_opaco1  = 0

           GOSUB Config_Fianco_Free
        ]

      }

      Radio RdOpacoRet
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco1
        Enable  = $DLG_enable_lucido_opaco2

        Placement
        {
           posx = 15
           posy = 155
           dimx = 50
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco1 = 1
           $DLG_value_lucido1 = 0

           GOSUB Config_Fianco_Free
        ]

      }
   }


   Frame Finitura2C
   {
      Caption = MSG(226)
      Enable  = $DLG_enable_frame_2_now
      Hint    = MSG(227)

      Placement
      {
         posx = 120
         posy = 10
         dimx = 100
         dimy = 200
      }

      Label LabFiniturCen
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx = 5
            posy = 20
            dimx = 90
            dimy = 25
         }
      }

      Image ImCentrale
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2_now
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_enable_frame_2_now

         Placement
         {
            posx =  20
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucidoCentrale
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido2
        Enable  = $DLG_enable_lucido_opaco2

        Placement
        {
           posx = 20
           posy = 135
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido2 = 1
           $DLG_value_opaco2  = 0
           GOSUB Config_Fianco_Free
        ]
      }

      Radio RdOpacoCen
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco2
        Enable  = $DLG_enable_lucido_opaco2

        Placement
        {
           posx = 20
           posy = 155
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco2 = 1
           $DLG_value_lucido2 = 0
           GOSUB Config_Fianco_Free
        ]
      }
   }


   Frame Finitura2F
   {
      Caption = MSG(755)
      Enable  = $DLG_enable_frame_3_now
      Hint    = MSG(756)

      Placement
      {
         posx = 230
         posy = 10
         dimx = 100
         dimy = 200
      }

      Label LabFiniturFro
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_enable_frame_3_now

         Placement
         {
            posx = 5
            posy = 20
            dimx = 90
            dimy = 25
         }
      }

      Image ImFronte
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3_now
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_enable_frame_3_now

         Placement
         {
            posx =  20
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucidoFro
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido3
        Enable  = $DLG_enable_lucido_opaco3

        Placement
        {
           posx = 20
           posy = 135
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido3 = 1
           $DLG_value_opaco3  = 0
           GOSUB Config_Fianco_Free
        ]
      }

      Radio RdOpacoFro
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco3
        Enable  = $DLG_enable_lucido_opaco3

        Placement
        {
           posx = 20
           posy = 155
           dimx = 60
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco3 = 1
           $DLG_value_lucido3 = 0
           GOSUB Config_Fianco_Free
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 265
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 180
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnFiniRet
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(757)
      Enable  = $DLG_enable_frame_1_now

      Placement
      {
         posx = 25
         posy = 115
         dimx = 70
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_NOW2R")

         if($DLG_value_lucido1==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_luc.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_luc.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_luc_riv.txt")
            }

            $DLG_descrizione_var1  = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2R,"colori_tutti.txt")
            $DLG_image_file1_now = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW2R,".bmp")
            $DLG_image_file1_now  = SUBST_LABEL($DLG_image_file1_now)
         }

         if($DLG_value_opaco1==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_opa.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_opa.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2R","colori_now_vet_opa_riv.txt")
            }

            $DLG_descrizione_var1  = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2R,"colori_tutti.txt")
            $DLG_image_file1_now = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW2R,".bmp")
            $DLG_image_file1_now  = SUBST_LABEL($DLG_image_file1_now)
         }

      ]
   }

   Button btnFiniCen
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(228)
      Enable  = $DLG_enable_frame_2_now

      Placement
      {
         posx = 135
         posy = 115
         dimx = 70
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_NOW2C")

         if($DLG_value_lucido2==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2C","colori_now_vet_luc.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2C","colori_now_vet_luc.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2C","colori_now_vet_luc_riv.txt")
            }

            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2C,"colori_tutti.txt")
            $DLG_image_file2_now  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW2C,".bmp")
            $DLG_image_file2_now  = SUBST_LABEL($DLG_image_file2_now)
         }

         if($DLG_value_opaco2==1)
         {

            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2C","colori_now_vet_opa.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2C","colori_now_vet_opa.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2C","colori_now_vet_opa_riv.txt")
            }

            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2C,"colori_tutti.txt")
            $DLG_image_file2_now  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW2C,".bmp")
            $DLG_image_file2_now  = SUBST_LABEL($DLG_image_file2_now)
         }
      ]
   }


   Button btnFiniFro
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(229)
      Enable  = $DLG_enable_frame_3_now

      Placement
      {
         posx = 250
         posy = 115
         dimx = 70
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_NOW2F")

         if($DLG_value_lucido3==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_luc.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_luc.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_luc_riv.txt")
            }

            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2F,"colori_tutti.txt")
            $DLG_image_file3_now  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_NOW2F,".bmp")
            $DLG_image_file3_now  = SUBST_LABEL($DLG_image_file3_now)
         }

         if($DLG_value_opaco3==1)
         {
            //VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_opa.txt")

            if( STRCMP($modalita,"M4")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_opa.txt")
            }

            if( STRCMP($modalita,"RIV")==0 )
            {
               VAR_SET_MENU (-1,"DLG_COLORE_NOW2F","colori_now_vet_opa_riv.txt")
            }

            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW2F,"colori_tutti.txt")
            $DLG_image_file3_now  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_NOW2F,".bmp")
            $DLG_image_file3_now  = SUBST_LABEL($DLG_image_file3_now)
         }
      ]
   }
}


Dlg 368CUC_Cont_Base
{
   Caption = MSG(230)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 640
      dimy = 310
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(231)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 105
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmApertura
   {
      Caption = ""
      Hint = ""
      Enable = 0

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 45
      }

      Edit EdtApertura
      {
         //attiva solo nel caso di contenitore con anta
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_apertura_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 15
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 15
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmLavelloSiNo
   {
      Caption = MSG(346)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 10
         posy = 165
         dimx = 150
         dimy = 85
      }

      Radio RdLavelloSi
      {
        Caption = MSG(233)
        Hint    = MSG(233)
        Value   = $DLG_value_lavello_SI
        Enable  = $DLG_enable_lavello_SI

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           // Eugenio 22.03.13 Permetto mettere lavelli anche su base angolo accessibile
           $DLG_value_lavello_SI = 1
           $DLG_value_lavello_NO  = 0
           $DLG_value_lavello_Bagno = 0
        ]

      }
      // Eugenio 22.03.13 Aggiungo per basi angolo
      Radio RdLavelloBagno
      {
        Caption = MSG(269)
        Hint    = MSG(269)
        Value   = $DLG_value_lavello_Bagno
        Enable  = $DLG_enable_lavello_Bagno

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 1
           $DLG_value_lavello_SI = 0
           $DLG_value_lavello_NO = 0
        ]

      }

      Radio RdLavelloNo
      {
        Caption = MSG(234)
        Hint    = MSG(234)
        Value   = $DLG_value_lavello_NO
        Enable  = $DLG_enable_lavello_NO

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 0
           $DLG_value_lavello_SI = 0
           $DLG_value_lavello_NO  = 1
        ]
      }
   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 220
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_fro_ww == 1)
           {
              $DLG_COLORE_368_L_FRO = "BCO"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_FRO = $DLG_COLORE_368_L_FRO
              GOSUB Get_Image_368CUC_L
           }
           $DLG_value_fro_ww = 0

           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0
           GOSUB SETTA_LARGH_ANG
           GOSUB SETTA_PROF_ANG
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_fro_ww == 1)
           {
              $DLG_COLORE_368_FRO = "BCO"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
              GOSUB Get_Image_368CUC
           }
           $DLG_value_fro_ww = 0

           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_laccato = 0
           GOSUB SETTA_LARGH_ANG
           GOSUB SETTA_PROF_ANG
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_fro_ww == 1)
           {
              $DLG_COLORE_368_FRO = "BCO"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
              GOSUB Get_Image_368CUC
           }
           $DLG_value_fro_ww = 0

           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_laccato = 1
           GOSUB SETTA_LARGH_ANG
           GOSUB SETTA_PROF_ANG
        ]
      }

      //Massimiliano 21/05/14 - aggiunta colore ww anta
      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_fro_ww
        Enable  = $DLG_enable_fro_rd_ww_368

        Placement
        {
           posx = 15
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_fro_opaco==1 | $DLG_value_fro_lucido==1 | $DLG_value_fro_laccato==1)
           {
              $DLG_COLORE_368_W_FRO = "SZ1"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
              $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
              GOSUB Get_Image_368CUC
           }
           $DLG_value_ww = 1

           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           GOSUB SETTA_PROF
           $DLG_enable_TipoStripes = 0

        ]
      }
   }

   Frame FinituraFiancoSx
   {
      Caption = MSG(237)
      Hint = MSG(238)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_descrizione_fsx_var
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_image_file_fsx
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraFiancoDx
   {
      Caption = MSG(239)
      Hint = MSG(240)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_descrizione_fdx_var
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_image_file_fdx
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 560
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 475
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_apertura_368

      Placement
      {
         posx = 135
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"DX")==0)   { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"SX")==0)   { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"LAT")==0)  { $DLG_value_apertura_368 = "LAT" }
        if(STRCMP($DLG_apertura_368,"GOL")==0)  { $DLG_value_apertura_368 = "GOL" }
        if(STRCMP($DLG_apertura_368,"PEL")==0)  { $DLG_value_apertura_368 = "PEL" }
        if(STRCMP($DLG_apertura_368,"TGL")==0)  { $DLG_value_apertura_368 = "TGL" }
      ]
   }


   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        //Massimiliano 10/05/17 - diversifico il chiedi per l'anta in wildwood
        if( $DLG_value_fro_ww == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
           $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
           $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_W_FRO,".bmp")
           $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)
           $DLG_COLORE_368_FRO      = $DLG_COLORE_368_W_FRO
        }
        else
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
           // Fabrizio: deve per forza essere una tabella tipo TabStringa
           // anche se il valore arriva da una TabBmp, altrimenti la
           // funzione DESCRIZIONE_VAL_TAB non funziona
           $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
           $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)
        }

      ]
   }

   Button btnFinituraFiancoSx
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(243)

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 06/07/2010: cambio e ripasso alla variabile di metron
         //$R = CHIEDI($idx_att,"GEST_FL")
         $R = CHIEDI(-1,"DLG_COLORE_368_FSX")
         //$DLG_COLORE_368_FSX = VAR_VAL_STR($idx_att,"GEST_FL")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_fsx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FSX,"colori_tutti.txt")
         $DLG_image_file_fsx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FSX,".bmp")
         $DLG_image_file_fsx      = SUBST_LABEL($DLG_image_file_fsx)
      ]
   }


   Button btnFinituraFiancoDx
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(244)

      Placement
      {
         posx = 480
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 06/07/2010: cambio e ripasso alla variabile di metron
         //$R = CHIEDI($idx_att,"GEST_FR")
         $R = CHIEDI(-1,"DLG_COLORE_368_FDX")
         //$DLG_COLORE_368_FDX = VAR_VAL_STR($idx_att,"GEST_FR")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_fdx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FDX,"colori_tutti.txt")
         $DLG_image_file_fdx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FDX,".bmp")
         $DLG_image_file_fdx      = SUBST_LABEL($DLG_image_file_fdx)
      ]
   }
}

Dlg 368CUC_Cont_Pensile
{
   Caption = MSG(270)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 485
      dimy = 245
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_ape_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 100
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAlthezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_ape_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 105
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 205
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
        ]

      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      Hint = MSG(248)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 140
         dimx = 150
         dimy = 50
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 405
         posy = 180
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 320
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         if( STRCMP( NOME($idx_att),"368CUC_Pensile_Tamponamento" )==0 )
         {
            //Massimiliano 07/11/17 - in accordo con Alessandro E., Ivan C., Barbara C.  stato ridotto il limite minimo
            //                        non serve pi fare speciale, l'unica cosa necessaria in produzione  di uno schema
            //                        di foratura del pannello di fissaggio per l'anta, che verr fornito dall'UT
            //if( ATOI($DLG_value_larghezza_368) < 200 )
            if( ATOI($DLG_value_larghezza_368) < 50 )
            {
               //DISPLAY2(MSG(2421))
               //$DLG_value_larghezza_368   = "200"
               DISPLAY2(MSG(2550))
               $DLG_value_larghezza_368   = "50"
            }
            //Massimiliano 02/12/2017  - in accordo con Ivan C. non  possibile mettere un tamponamento superiore a 367
            if( ATOI($DLG_value_larghezza_368) > 367 )
            {
               DISPLAY2(MSG(2550))
               $DLG_value_larghezza_368   = "367"
            }

            $DLG_larghezza_368   = $DLG_value_larghezza_368
         }
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_ape_368

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        if( STRCMP($DLG_COLORE_368_FRO,"ARG")!=0)
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368_FRO
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
           $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_fro)
        }
      ]
   }

   Button btnFinituraStruttura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(249)

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
   }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 16/12/2008 NON FUNZIONA IL PRIMO GIRO!!!
         //$R = CHIEDI($idx_att,"GEST_ST")
         //$DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         //Massimiliano 17/05/17 - spostando il configura sul PostGestDllValida ora funziona la richiesta diretta
         //$R = CHIEDI(-1,"DLG_COLORE_368_SCC")
         $R = CHIEDI($idx_att,"GEST_ST")
         $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}

// Massimiliano 23/07/15 - nuova dlg per 36e8 Side
Dlg 368CUC_Cont_Pensile_Side
{
   Caption = MSG(270)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 645
      dimy = 260
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_ape_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 100
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAlthezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_ape_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 105
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 205
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
        ]

      }

   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 215
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 130
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon
        Enable  = $DLG_enable_fon

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      Hint = MSG(248)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 165
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Massimiliano 24/03/14 - aggiunta variabili trasformatore
   Frame FrmOpzioni
   {
     Caption = MSG(168)

     Placement
     {
         posx = 10
         posy = 140
         dimx = 150
         dimy = 50
     }

     Check Trasformatore
     {
        Caption = MSG(169)
        Value   = $DLG_trasformatore
        Enable  = $DLG_enable_led

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
            $DLG_trasformatore = 1
        ]
     }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 560
         posy = 180
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 475
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         // 08/03/2018 - Filippo - aggiungo il $DLG_idx_to_call e lo sostituisco agli "ATTUALE" usati nella dialog
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         //if( STRCMP( NOME(ATTUALE()),"368CUC_Pensile_Tamponamento" )==0 )
         if( STRCMP( NOME($DLG_idx_to_call),"368CUC_Pensile_Tamponamento" )==0 )
       {
         $DLG_larghezza_368   = $DLG_value_larghezza_368
       }
       $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_ape_368

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        if( STRCMP($DLG_COLORE_368_FRO,"ARG")!=0)
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368_FRO
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
           $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_fro)
        }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
         //Massimiliano 10/11/17 - in realt non  possibile mettere la finitura side ww sui pensili
         if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 )
         {
            DISPLAY2(MSG(3141))
            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
         }
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
         $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
         $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)
      ]
   }

   Button btnFinituraStruttura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(249)

      Placement
      {
         posx = 485
         posy = 115
         dimx = 130
         dimy = 20
   }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 16/12/2008 NON FUNZIONA IL PRIMO GIRO!!!
         //$R = CHIEDI($idx_att,"GEST_ST")
         //$DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         //Massimiliano 17/05/17 - spostando il configura sul PostGestDllValida ora funziona la richiesta diretta
         //$R = CHIEDI(-1,"DLG_COLORE_368_SCC")
         if( $DLG_value_cop == 1 )
         {
            $R = CHIEDI($idx_att,"GEST_EB")
            $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_EB")
         }
         else
         {
            $R = CHIEDI($idx_att,"GEST_EA")
            $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_EA")
         }

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}


Dlg 368CUC_Cont_Kappa
{
   Caption = MSG(270)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 485
      dimy = 260
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_ape_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 100
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAlthezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_ape_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 105
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmTipoCappa
   {
      //Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 145
         dimx = 150
         dimy = 70
      }

      Radio RdCpFaretti
      {
        Caption = MSG(271)
        Hint    = MSG(271)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 5
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]

      }

      Radio RdCpLed
      {
        Caption = MSG(272)
        Hint    = MSG(272)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 25
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdCpLedNoM
      {
        Caption = MSG(273)
        Hint    = MSG(273)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 45
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]

      }
   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 205
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
        ]
      }

   }


   Frame FinituraStruttura
   {
      Caption = MSG(982)
      Hint = MSG(248)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 405
         posy = 195
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 320
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         // 08/03/2018 - Filippo - aggiungo il $DLG_idx_to_call e lo sostituisco agli "ATTUALE" usati nella dialog
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         //if( STRCMP( NOME(ATTUALE()),"368CUC_Pensile_Tamponamento" )==0 )
         if( STRCMP( NOME($DLG_idx_to_call),"368CUC_Pensile_Tamponamento" )==0 )
       {
         $DLG_larghezza_368   = $DLG_value_larghezza_368
       }
       $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_ape_368

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        if( STRCMP($DLG_COLORE_368_FRO,"ARG")!=0)
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368_FRO
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
           $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_fro)
        }
      ]
   }

   Button btnFinituraStruttura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(249)

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
   }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 16/12/2008 NON FUNZIONA IL PRIMO GIRO!!!
         //$R = CHIEDI($idx_att,"GEST_ST")
         //$DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         //Massimiliano 17/05/17 - spostando il configura sul PostGestDllValida ora funziona la richiesta diretta
         //$R = CHIEDI(-1,"DLG_COLORE_368_SCC")
         $R = CHIEDI($idx_att,"GEST_ST")
         $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}

// Massimiliano 23/07/15 - nuova dlg per 36e8 Side
Dlg 368CUC_Cont_Kappa_Side
{
   Caption = MSG(270)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 645
      dimy = 260
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_enable_ape_368
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 70
           posy = 100
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAlthezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_ape_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 105
           dimx = 80
           dimy = 20
        }

      }

   }

   Frame FrmTipoCappa
   {
      //Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 145
         dimx = 150
         dimy = 70
      }

      Radio RdCpFaretti
      {
        Caption = MSG(271)
        Hint    = MSG(271)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 5
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]

      }

      Radio RdCpLed
      {
        Caption = MSG(272)
        Hint    = MSG(272)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 25
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio RdCpLedNoM
      {
        Caption = MSG(273)
        Hint    = MSG(273)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 45
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]

      }
   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 205
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
        ]
      }

   }

   Frame FinituraSide
   {
      Caption = MSG(278)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 215
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdCoperchio
      {
        Caption = MSG(170)
        Hint    = MSG(170)
        Value   = $DLG_value_cop

        Placement
        {
           posx = 15
           posy = 130
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 1
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFondo
      {
        Caption = MSG(171)
        Hint    = MSG(171)
        Value   = $DLG_value_fon
        Enable  = $DLG_enable_fon

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 1
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaSx
      {
        Caption = MSG(172)
        Hint    = MSG(172)
        Value   = $DLG_value_fiasx

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 1
           $DLG_value_fiadx = 0
        ]

      }

      Radio RdFiaDx
      {
        Caption = MSG(173)
        Hint    = MSG(173)
        Value   = $DLG_value_fiadx

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_cop   = 0
           $DLG_value_fon   = 0
           $DLG_value_fiasx = 0
           $DLG_value_fiadx = 1
        ]
      }

   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      Hint = MSG(248)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 560
         posy = 195
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 475
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
      // 08/03/2018 - Filippo - aggiungo il $DLG_idx_to_call e lo sostituisco agli "ATTUALE" usati nella dialog
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         //if( STRCMP( NOME(ATTUALE()),"368CUC_Pensile_Tamponamento" )==0 )
         if( STRCMP( NOME($DLG_idx_to_call),"368CUC_Pensile_Tamponamento" )==0 )
       {
         $DLG_larghezza_368   = $DLG_value_larghezza_368
       }
       $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }


   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_ape_368

      Placement
      {
         posx = 135
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        if(STRCMP($DLG_apertura_368,"AND")==0)  { $DLG_value_apertura_368 = "DX-Spinta" }
        if(STRCMP($DLG_apertura_368,"ANC")==0)  { $DLG_value_apertura_368 = "SX-Spinta" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        if( STRCMP($DLG_COLORE_368_FRO,"ARG")!=0)
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368_FRO
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
           $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_fro)
        }
      ]
   }

   Button btnFinituraSide
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
         // 13/02/2018 - Emanuele - Ho tolto il display sottostante perch creava una dialog aggiuntiva ogni volta che si cambiava colore
//         DISPLAY2($DLG_COLORE_368_SIDE)
         //Massimiliano 10/11/17 - in realt non  possibile mettere la finitura side ww sui pensili
         if( IS_MATCH($DLG_COLORE_368_SIDE,"SZ*")==1 )
         {
            DISPLAY2(MSG(3141))
            $R = CHIEDI(-1,"DLG_COLORE_368_SIDE")
         }

         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SIDE,"colori_tutti.txt")
         $DLG_image_file2  = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SIDE,".bmp")
         $DLG_image_file2   = SUBST_LABEL($DLG_image_file2)
      ]
   }

   Button btnFinituraStruttura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(249)

      Placement
      {
         posx = 485
         posy = 115
         dimx = 130
         dimy = 20
   }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 16/12/2008 NON FUNZIONA IL PRIMO GIRO!!!
         //$R = CHIEDI($idx_att,"GEST_ST")
         //$DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         //Massimiliano 17/05/17 - spostando il configura sul PostGestDllValida ora funziona la richiesta diretta
         //$R = CHIEDI(-1,"DLG_COLORE_368_SCC")
         if( $DLG_value_cop == 1 )
         {
            $R = CHIEDI($idx_att,"GEST_EB")
            $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_EB")
         }
         else
         {
            $R = CHIEDI($idx_att,"GEST_EA")
            $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_EA")
         }

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}


Dlg 368CUC_Cont_Kappa_WL
{
   Caption = MSG(270)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 485
      dimy = 260
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipoCappa
   {
      Caption = MSG(380)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 70
      }

      Radio RdCpFaretti
      {
        Caption = MSG(271)
        Hint    = MSG(271)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 20
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]

      }

      Radio RdCpLed
      {
        Caption = MSG(272)
        Hint    = MSG(272)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 20
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]
      }
   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 205
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
        ]
      }

   }


   Frame FinituraStruttura
   {
      Caption = MSG(982)
      Hint = MSG(248)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 405
         posy = 195
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 320
         posy = 195
         dimx = 80
         dimy = 30
      }

      OnClick
      [
      // 08/03/2018 - Filippo - aggiungo il $DLG_idx_to_call e lo sostituisco agli "ATTUALE" usati nella dialog
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         //if( STRCMP( NOME(ATTUALE()),"368CUC_Pensile_Tamponamento" )==0 )
         if( STRCMP( NOME($DLG_idx_to_call),"368CUC_Pensile_Tamponamento" )==0 )
       {
         $DLG_larghezza_368   = $DLG_value_larghezza_368
       }
       $OK=1
      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)

        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        if( STRCMP($DLG_image_file_fro,"ARG")!=0)
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368_FRO
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
           $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_fro)
        }
      ]
   }

   Button btnFinituraStruttura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(249)

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
   }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 16/12/2008 NON FUNZIONA IL PRIMO GIRO!!!
         //$R = CHIEDI($idx_att,"GEST_ST")
         //$DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         //Massimiliano 17/05/17 - spostando il configura sul PostGestDllValida ora funziona la richiesta diretta
         //$R = CHIEDI(-1,"DLG_COLORE_368_SCC")
         $R = CHIEDI($idx_att,"GEST_ST")
         $DLG_COLORE_368_SCC = VAR_VAL_STR($idx_att,"GEST_ST")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
         $DLG_image_file_scc      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
         $DLG_image_file_scc      = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}

Dlg 368CUC_Top
{
   Caption = MSG(250)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 270
      dimy = 300
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame FinituraTop
   {
      Caption = MSG(251)
      Hint = MSG(252)

      Placement
      {
         posx = 60
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_top_var
         Value   = $DLG_descrizione_top_var
         Hint    = $DLG_descrizione_top_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_top_var
         Value   = $DLG_image_file_top
         Hint    = $DLG_descrizione_top_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio Rdlaminato
      {
        Caption = MSG(253)
        Hint    = MSG(253)
        Value   = $DLG_value_top_laminato
        Enable  = $DLG_enable_top_rd_laminato_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato = 1
           $DLG_value_top_vetro_opaco  = 0
           $DLG_value_top_vetro_lucido = 0
        ]
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(254)
        Hint    = MSG(254)
        Value   = $DLG_value_top_vetro_opaco
        Enable  = $DLG_enable_top_rd_vetro_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato = 0
           $DLG_value_top_vetro_opaco  = 1
           $DLG_value_top_vetro_lucido = 0
        ]

      }

      Radio RdVetroLucido
      {
        Caption = MSG(255)
        Hint    = MSG(255)
        Value   = $DLG_value_top_vetro_lucido
        Enable  = $DLG_enable_top_rd_vetro_lucido_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato = 0
           $DLG_value_top_vetro_opaco  = 0
           $DLG_value_top_vetro_lucido = 1
        ]

      }


   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 145
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 60
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(256)

      Placement
      {
         posx = 65
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_top_laminato==1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_lam.txt")
         }

         if($DLG_value_top_vetro_lucido == 1 | $DLG_value_top_vetro_opaco == 1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_vetro.txt")
         }

        $R = CHIEDI(-1,"DLG_COLORE_368_TOP")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_TOP,"coloritop.txt")
        $DLG_image_file_top      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
        $DLG_image_file_top      = SUBST_LABEL($DLG_image_file_top)
      ]
   }
}

//rob_pec 09/02/09: aggiunta dialog per la configurazione dello scasso
//generico nei top
//rob_pec 23/06/09: aggiungo la dialog anche agli elettrodomestici
//lavello e piano cottura
//rob_pec 28/12/09 aggiunta gestione per lo scasso circolare
//rob_pec 26/03/10 aggiunto Raggio scasso per top incasso ad appoggio
//fc 101018 obbligo definizione altezza scasso>0
//rob_pec 12/01/2011: inibisco sempre il raggio scasso come da richiesta: useranno
//sempre il raggio incasso
//rob_pec 26/07/2011: gestisco nuova dialog per recuperare i dati che arrivano
//dal DB degli eldom
Dlg 368CUC_ScassoTop_A
{
   Caption = MSG(314)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 550
      dimy = 350
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame TipoScasso
   {
      Caption = MSG(315)
      Hint = MSG(316)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 125
      }

      Radio RdAppoggio
      {
         Caption = MSG(317)
         Hint    = MSG(317)
         Value   = $DLG_value_scasso_appoggio
         Enable  = $DLG_enable_value_scasso_appoggio

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_scasso_appoggio = 1
            $DLG_value_scasso_filotop  = 0
            $DLG_value_scasso_sottotop = 0
            //per disabilitare/abilitare le varie caselle
            //rob_pec 12/01/01 $DLG_enable_RagInterno = 1
            $DLG_enable_RagScasso = 0
            $DLG_enable_RagInterno = 0
            $DLG_enable_RagEsterno = 0
            $DLG_enable_SpessFres = 0
            $DLG_enable_LarghFres = 0
         ]
      }

      Radio RdFilotop
      {
        Caption = MSG(318)
        Hint    = MSG(318)
        Value   = $DLG_value_scasso_filotop
        Enable  = $DLG_enable_value_scasso_filotop

        Placement
        {
           posx = 15
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_scasso_appoggio = 0
            $DLG_value_scasso_filotop  = 1
            $DLG_value_scasso_sottotop = 0
            //per disabilitare/abilitare le varie caselle
            $DLG_enable_RagScasso = 0
            $DLG_enable_RagInterno = 1
            $DLG_enable_RagEsterno = 1
            $DLG_enable_SpessFres = 1
            $DLG_enable_LarghFres = 1
        ]
      }

      Radio RdSottotop
      {
        Caption = MSG(319)
        Hint    = MSG(319)
        Value   = $DLG_value_scasso_sottotop
        Enable  = $DLG_enable_value_scasso_sottotop

        Placement
        {
           posx = 15
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_scasso_appoggio = 0
            $DLG_value_scasso_filotop  = 0
            $DLG_value_scasso_sottotop = 1
            //per disabilitare/abilitare le varie caselle
            //rob_pec 04/01/11: cambio abilitazioni RagScasso RagInterno e LarghFres
            //rob_pec 12/01/01 $DLG_enable_RagScasso = 1
            $DLG_enable_RagScasso = 0
            //rob_pec 12/01/01 $DLG_enable_RagInterno = 0
            $DLG_enable_RagInterno = 1
            $DLG_enable_RagEsterno = 0
            $DLG_enable_SpessFres = 0
            $DLG_enable_LarghFres = 1
            if($DLG_value_scasso_sottotop==1)
            { $DLG_value_raggio_interno_foro = "2.5" }
        ]

      }
   }

   //rob_pec 28/12/09 forma circolare o rettangolare
   Frame FormaScasso
   {
      Caption = MSG(320)
      Hint = MSG(321)

      Placement
      {
         posx = 10
         posy = 135
         dimx = 150
         dimy = 125
      }

      Radio RdFormaRett
      {
         Caption = MSG(322)
         Hint    = MSG(322)
         Value   = $DLG_value_forma_scasso_rett
         Enable  = $DLG_enable_value_forma_scasso_rett

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_forma_scasso_rett = 1
            $DLG_value_forma_scasso_circ = 0
            //per disabilitare/abilitare le varie caselle
            $DLG_enable_value_x_foro = 1
            $DLG_enable_value_z_foro = 1
            $DLG_enable_value_diam_foro = 0
         ]
      }

      Radio RdFormaCirc
      {
        Caption = MSG(323)
        Hint    = MSG(323)
        Value   = $DLG_value_forma_scasso_circ
        Enable  = $DLG_enable_value_forma_scasso_circ

        Placement
        {
           posx = 15
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_forma_scasso_rett = 0
            $DLG_value_forma_scasso_circ = 1
            //per disabilitare/abilitare le varie caselle
            $DLG_enable_value_x_foro = 0
            $DLG_enable_value_z_foro = 0
            $DLG_enable_value_diam_foro = 1
        ]
      }
   }


   Frame GeometriaScasso
   {
      Caption = MSG(324)
      Hint = MSG(325)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 180
         dimy = 250
      }

      Label XForo
      {
         Caption = MSG(326)
         Hint    = MSG(326)
         Value   = $DLG_value_x_foro
         Enable  = $DLG_enable_value_x_foro

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit XForo
      {
         Caption = MSG(326)
         Hint    = MSG(326)
         Value   = $DLG_value_x_foro
         Enable  = $DLG_enable_value_x_foro

         Placement
         {
            posx = 110
            posy = 25
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      Label ZForo
      {
         Caption = MSG(327)
         Hint    = MSG(327)
         Value   = $DLG_value_z_foro
         Enable  = $DLG_enable_value_z_foro

         Placement
         {
            posx = 15
            posy = 50
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit ZForo
      {
         Caption = MSG(327)
         Hint    = MSG(327)
         Value   = $DLG_value_z_foro
         Enable  = $DLG_enable_value_z_foro

         Placement
         {
            posx = 110
            posy = 50
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      //rob_pec 29/12/09 aggiungo il diametro
      Label DiamForo
      {
         Caption = MSG(328)
         Hint    = MSG(328)
         Value   = $DLG_value_diam_foro
         Enable  = $DLG_enable_value_diam_foro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit DiamForo
      {
         Caption = MSG(328)
         Hint    = MSG(328)
         Value   = $DLG_value_diam_foro
         Enable  = $DLG_enable_value_diam_foro

         Placement
         {
            posx = 110
            posy = 75
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      //rob_pec 29/03/10 aggiungo l'altezza del foro
      Label YForo
      {
         Caption = MSG(329)
         Hint    = MSG(329)
         Value   = $DLG_value_y_foro
         Enable  = $DLG_enable_value_y_foro

         Placement
         {
            posx = 15
            posy = 100
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit YForo
      {
         Caption = MSG(329)
         Hint    = MSG(329)
         Value   = $DLG_value_y_foro
         Enable  = $DLG_enable_value_y_foro

         Placement
         {
            posx = 110
            posy = 100
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      //Label RagInterno
      Label RagIncasso
      {
         //rob_pec 26/07/2011: cambio da raggio interno a raggio incasso
         Caption = MSG(331)
         Hint    = MSG(331)
         //Value   = $DLG_value_raggio_interno_foro
         //Enable  = $DLG_enable_RagInterno
         Value   = $DLG_value_raggio_incasso_foro
         Enable  = $DLG_enable_RagIncasso

         Placement
         {
            posx = 15
            posy = 125
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      //Edit RagInterno
      Edit RagIncasso
      {
         //rob_pec 26/07/2011: cambio da raggio interno a raggio incasso
         Caption = MSG(331)
         Hint    = MSG(331)
         //Value   = $DLG_value_raggio_interno_foro
         //Enable  = $DLG_enable_RagInterno
         Value   = $DLG_value_raggio_incasso_foro
         Enable  = $DLG_enable_RagIncasso

         Placement
         {
            posx = 110
            posy = 125
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      //rob_pec 26/07/2011: cambio da raggio esterno a raggio fresata
      //Label RagEsterno
      Label RagFresata
      {
         Caption = MSG(332)
         Hint    = MSG(332)
         Value   = $DLG_value_raggio_fresata_foro
         Enable  = $DLG_enable_Ragfresata
         //Value   = $DLG_value_raggio_esterno_foro
         //Enable  = $DLG_enable_RagEsterno

         Placement
         {
            posx = 15
            posy = 150
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      //rob_pec 26/07/2011: cambio da raggio esterno a raggio fresata
      //Edit RagEsterno
      Edit RagFresata
      {
         Caption = MSG(332)
         Hint    = MSG(332)
         Value   = $DLG_value_raggio_fresata_foro
         Enable  = $DLG_enable_RagFresata
         //Value   = $DLG_value_raggio_esterno_foro
         //Enable  = $DLG_enable_RagEsterno

         Placement
         {
            posx = 110
            posy = 150
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label SpessFres
      {
         Caption = MSG(333)
         Hint    = MSG(333)
         Value   = $DLG_value_profondita_fresata
         Enable  = $DLG_enable_SpessFres

         Placement
         {
            posx = 15
            posy = 175
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit SpessFres
      {
         Caption = MSG(333)
         Hint    = MSG(333)
         Value   = $DLG_value_profondita_fresata
         Enable  = $DLG_enable_SpessFres

         Placement
         {
            posx = 110
            posy = 175
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LarghFres
      {
         Caption = MSG(334)
         Hint    = MSG(334)
         Value   = $DLG_value_larghezza_fresata
         Enable  = $DLG_enable_LarghFres

         Placement
         {
            posx = 15
            posy = 200
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit LarghFres
      {
         Caption = MSG(334)
         Hint    = MSG(334)
         Value   = $DLG_value_larghezza_fresata
         Enable  = $DLG_enable_LarghFres

         Placement
         {
            posx = 110
            posy = 200
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }
   }


   Frame PosizioneScasso
   {
      Caption = MSG(335)
      Hint = MSG(336)

      Placement
      {
         posx = 350
         posy = 10
         dimx = 180
         dimy = 155
      }

      Label LabFinitura
      {
         Caption = MSG(337)

         Placement
         {
            posx = 15
            posy = 25
            dimx = 140
            dimy = 20
         }
      }

      Label LabFinitura
      {
         Caption = $DLG_riferimento

         Placement
         {
            posx = 15
            posy = 50
            dimx = 150
            dimy = 20
         }
      }

      Radio Centro
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Value   = $DLG_value_centro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 1
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 0
         ]
      }


      Radio FiloForoSx
      {
         Caption = MSG(338)
         Hint    = MSG(338)
         Value   = $DLG_value_filo_foro_sx

         Placement
         {
            posx = 15
            posy = 100
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 1
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 1
         ]
      }


      Radio FiloForoDx
      {
         Caption = MSG(339)
         Hint    = MSG(339)
         Value   = $DLG_value_filo_foro_dx

         Placement
         {
            posx = 15
            posy = 125
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 1
            $DLG_enable_value_posizione_filo_foro    = 1
         ]
      }

//      Label PosizioneFilo
//      {
//         Caption = ""
//         Hint    = "Posizione dal filo"
//         Value   = $DLG_value_posizione_filo_foro
//         Enable  = $DLG_enable_value_posizione_filo_foro
//
//         Placement
//         {
//            posx = 125
//            posy = 85
//            dimx = 40
//            dimy = 15
//         }
//
//         OnClick
//         [
//         ]
//      }

      Edit PosizioneFilo
      {
         Caption = MSG(340)
         Hint    = MSG(340)
         Value   = $DLG_value_posizione_filo_foro
         Enable  = $DLG_enable_value_posizione_filo_foro

         Placement
         {
            posx = 130
            posy = 112
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }

   //rob_pec 29/12/09: aggiungo scelta dal fronte o dal retro
   Frame PosizioneScassoLaterale
   {
      Caption = ""
      Hint = MSG(336)

      Placement
      {
         posx = 350
         posy = 175
         dimx = 180
         dimy = 85
      }

      Radio FiloForoFronte
      {
         Caption = MSG(341)
         Hint    = MSG(341)
         Value   = $DLG_value_filo_foro_fronte
         Enable  = $DLG_enable_value_filo_foro

         Placement
         {
            posx = 15
            posy = 7
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_filo_foro_fronte = 1
            $DLG_value_filo_foro_retro = 0
         ]
      }

      Radio FiloForoRetro
      {
         Caption = MSG(342)
         Hint    = MSG(342)
         Value   = $DLG_value_filo_foro_retro
         Enable  = $DLG_enable_value_filo_foro

         Placement
         {
            posx = 15
            posy = 30
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_filo_foro_fronte = 0
            $DLG_value_filo_foro_retro = 1
         ]
      }

//      Label PosizioneFronte
//      {
//         Caption = ""
//         Hint    = "Posizione dal fronte"
//         Value   = $DLG_value_posizione_fronte_foro
//
//         Placement
//         {
//            posx = 125
//            posy = 17
//            dimx = 40
//            dimy = 15
//         }
//
//         OnClick
//         [
//         ]
//      }

      Edit PosizioneFronte
      {
         Caption = MSG(343)
         Hint    = MSG(343)
         Value   = $DLG_value_posizione_FroRet_foro
         Enable  = $DLG_enable_value_filo_foro

         Placement
         {
            posx = 130
            posy = 17
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 465
         posy = 275
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 380
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg Lavello_TermoFormato
{
   Caption = MSG(292)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 235
      dimy = 400
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame TipoLavello
   {
      Caption = MSG(291)
      Hint = MSG(291)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 200
         dimy = 125
      }

      Radio Ovale50
      {
         Caption = MSG(289)
         Hint    = MSG(289)
         Value   = $DLG_Ov50
         Enable  = $DLG_Enable_Ov50

         Placement
         {
            posx = 15
            posy = 20
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_Ov50 = 1
            $DLG_Ov66 = 0
            $DLG_Re51 = 0
            $DLG_Re65 = 0

            if( $DLG_Z_Top < 610 )
            {
               $DLG_Enable_CX = 0
               $DLG_Enable_SX = 1
               $DLG_Enable_DX = 1
               $DLG_CX = 0
               $DLG_DX = 1
            }
         ]
      }
      Radio Ovale66
      {
         Caption = MSG(293)
         Hint    = MSG(293)
         Value   = $DLG_Ov66
         Enable  = $DLG_Enable_Ov66

         Placement
         {
            posx = 15
            posy = 40
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_Ov50 = 0
            $DLG_Ov66 = 1
            $DLG_Re51 = 0
            $DLG_Re65 = 0

            if( $DLG_Z_Top < 610 )
            {
               $DLG_Enable_CX = 0
               $DLG_Enable_SX = 1
               $DLG_Enable_DX = 1
               $DLG_CX = 0
               $DLG_DX = 1
            }
         ]
      }
      Radio Rettangolare51
      {
         Caption = MSG(294)
         Hint    = MSG(294)
         Value   = $DLG_Re51
         Enable  = $DLG_Enable_Re51

         Placement
         {
            posx = 15
            posy = 60
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_Ov50 = 0
            $DLG_Ov66 = 0
            $DLG_Re51 = 1
            $DLG_Re65 = 0
            $DLG_Enable_CX = 0
            $DLG_Enable_SX = 0
            $DLG_Enable_DX = 0
            $DLG_CX = 1
            $DLG_SX = 0
            $DLG_DX = 0
         ]
      }
      Radio Rettangolare65
      {
         Caption = MSG(295)
         Hint    = MSG(295)
         Value   = $DLG_Re65
         Enable  = $DLG_Enable_Re65

         Placement
         {
            posx = 15
            posy = 80
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_Ov50 = 0
            $DLG_Ov66 = 0
            $DLG_Re51 = 0
            $DLG_Re65 = 1
            $DLG_Enable_CX = 0
            $DLG_Enable_SX = 0
            $DLG_Enable_DX = 0
            $DLG_CX = 1
            $DLG_SX = 0
            $DLG_DX = 0
         ]
      }
   }

   Frame ForoMiscelatore
   {
      Caption = MSG(290)
      Hint = MSG(290)

      Placement
      {
         posx = 15
         posy = 140
         dimx = 200
         dimy = 85
      }

      Radio DX
      {
         Caption = MSG(405)
         Hint    = MSG(405)
         Value   = $DLG_DX
         Enable  = $DLG_Enable_DX

         Placement
         {
            posx = 15
            posy = 20
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_DX = 1
            $DLG_SX = 0
            $DLG_CX = 0
         ]
      }
      Radio SX
      {
         Caption = MSG(403)
         Hint    = MSG(403)
         Value   = $DLG_SX
         Enable  = $DLG_Enable_SX

         Placement
         {
            posx = 15
            posy = 40
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_DX = 0
            $DLG_SX = 1
            $DLG_CX = 0
         ]
      }
      Radio CX
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Value   = $DLG_CX
         Enable  = $DLG_Enable_CX

         Placement
         {
            posx = 15
            posy = 60
            dimx = 180
            dimy = 20
         }

         OnClick
         [
            $DLG_DX = 0
            $DLG_SX = 0
            $DLG_CX = 1
         ]
      }
   }

   Frame OffSet
   {
      Caption = ""
      Hint = ""

      Placement
      {
         posx = 15
         posy = 230
         dimx = 200
         dimy = 40
      }

      Label Spostamento
      {
         Caption = MSG(299)
         Hint    = MSG(299)
         Value   = $DLG_offset_lavello

         Placement
         {
            posx = 15
            posy = 15
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit PosizioneFronte
      {
         Caption = MSG(299)
         Hint    = MSG(299)
         Value   = $DLG_offset_lavello

         Placement
         {
            posx = 150
            posy = 15
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }

   Button btElimina
   {
      Caption = MSG(298)
      Result  = 2
      Hint = MSG(298)

      Placement
      {
         posx = 15
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $DLG_Elimina = 1
      ]
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 15
         posy = 320
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 100
         posy = 320
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}



//rob_pec 09/02/09: aggiunta dialog per la configurazione dello scasso
//generico nei top
//rob_pec 23/06/09: aggiungo la dialog anche agli elettrodomestici
//lavello e piano cottura
//rob_pec 28/12/09 aggiunta gestione per lo scasso circolare
//rob_pec 26/03/10 aggiunto Raggio scasso per top incasso ad appoggio
//fc 101018 obbligo definizione altezza scasso>0
//rob_pec 12/01/2011: inibisco sempre il raggio scasso come da richiesta: useranno
//sempre il raggio incasso
Dlg 368CUC_ScassoTop
{
   Caption = MSG(257)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 550
      dimy = 360
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame TipoScasso
   {
      Caption = MSG(315)
      Hint = MSG(316)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 125
      }

      Radio RdAppoggio
      {
         Caption = MSG(317)
         Hint    = MSG(317)
         Value   = $DLG_value_scasso_appoggio
         Enable  = $DLG_enable_value_scasso_appoggio

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_scasso_appoggio = 1
            $DLG_value_scasso_filotop  = 0
            $DLG_value_scasso_sottotop = 0
            //per disabilitare/abilitare le varie caselle
            //rob_pec 12/01/01 $DLG_enable_RagScasso = 1
            $DLG_enable_RagScasso = 0
            $DLG_enable_RagInterno = 0
            $DLG_enable_RagEsterno = 0
            $DLG_enable_SpessFres = 0
            $DLG_enable_LarghFres = 0

            //Massimiliano 22/10/15 - imposto i settaggi per gestione labbri
            $DLG_enable_set_labbri = 0
            $DLG_enable_labbri     = 0

            //Massimiliano 27/11/15 - valorizzazione avvisi su dialog
            $DLG_value_scritta1   = 0
            $DLG_caption_scritta1 = ""
            $DLG_hint_scritta1    = ""
            $DLG_value_scritta2   = 0
            $DLG_caption_scritta2 = ""
            $DLG_hint_scritta2    = ""
         ]
      }

      Radio RdFilotop
      {
        Caption = MSG(318)
        Hint    = MSG(318)
        Value   = $DLG_value_scasso_filotop
        Enable  = $DLG_enable_value_scasso_filotop

        Placement
        {
           posx = 15
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_scasso_appoggio = 0
            $DLG_value_scasso_filotop  = 1
            $DLG_value_scasso_sottotop = 0
            //per disabilitare/abilitare le varie caselle
            $DLG_enable_RagScasso = 0
            $DLG_enable_RagInterno = 1
            $DLG_enable_RagEsterno = 1
            $DLG_enable_SpessFres = 1
            $DLG_enable_LarghFres = 1

            //Massimiliano 22/10/15 - imposto i settaggi per gestione labbri
            $DLG_enable_set_labbri = 0
            $DLG_enable_labbri     = 0

            //Massimiliano 27/11/15 - valorizzazione avvisi su dialog
            $DLG_value_scritta1   = 0
            $DLG_caption_scritta1 = ""
            $DLG_hint_scritta1    = ""
            $DLG_value_scritta2   = 0
            $DLG_caption_scritta2 = ""
            $DLG_hint_scritta2    = ""

        ]
      }

      Radio RdSottotop
      {
        Caption = MSG(319)
        Hint    = MSG(319)
        Value   = $DLG_value_scasso_sottotop
        Enable  = $DLG_enable_value_scasso_sottotop

        Placement
        {
           posx = 15
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_scasso_appoggio = 0
            $DLG_value_scasso_filotop  = 0
            $DLG_value_scasso_sottotop = 1
            //per disabilitare/abilitare le varie caselle
            //rob_pec 04/01/11: cambio abilitazioni RagScasso RagInterno e LarghFres
            //rob_pec 12/01/01 $DLG_enable_RagScasso = 1
            $DLG_enable_RagScasso = 0
            //rob_pec 12/01/01 $DLG_enable_RagInterno = 0
            $DLG_enable_RagInterno = 1
            $DLG_enable_RagEsterno = 0
            $DLG_enable_SpessFres = 0
            $DLG_enable_LarghFres = 1
            //Massimiliano 27/11/15 - su richiesta backoffice modifico default
            //if($DLG_value_scasso_sottotop==1)
            //{ $DLG_value_raggio_interno_foro = "2.5" }
            if($DLG_value_scasso_sottotop==1)
            {
               $DLG_value_raggio_interno_foro = "2.5"
               if( $DLG_TipoTop == 2 | $DLG_TipoTop == 3 )  {  $DLG_value_raggio_interno_foro = "18"  }
            }

            //Massimiliano 22/10/15 - imposto i settaggi per gestione labbri
            $DLG_enable_set_labbri = 1
            if( $DLG_TipoTop == 1 | $DLG_TipoTop == 4 | $DLG_TipoTop == 7 )  {  $DLG_enable_set_labbri = 0  }
            if( $DLG_TipoTop == 2 & $DLG_yTop == 4 )                         {  $DLG_enable_set_labbri = 0  }

            //Massimiliano 27/11/15 - valorizzazione avvisi su dialog
            $DLG_value_scritta1   = 1
            $DLG_caption_scritta1 = MSG(2412)
            $DLG_hint_scritta1    = MSG(2412)
            $DLG_value_scritta2   = 1
            $DLG_caption_scritta2 = MSG(2412)
            $DLG_hint_scritta2    = MSG(2412)
        ]
      }
   }

   //rob_pec 28/12/09 forma circolare o rettangolare
   Frame FormaScasso
   {
      Caption = MSG(320)
      Hint = MSG(321)

      Placement
      {
         posx = 10
         posy = 135
         dimx = 150
         dimy = 60
      }

      Radio RdFormaRett
      {
         Caption = MSG(322)
         Hint    = MSG(322)
         Value   = $DLG_value_forma_scasso_rett
         Enable  = $DLG_enable_value_forma_scasso_rett

         Placement
         {
            posx = 15
            posy = 15
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_forma_scasso_rett = 1
            $DLG_value_forma_scasso_circ = 0
            //per disabilitare/abilitare le varie caselle
            $DLG_enable_value_x_foro = 1
            $DLG_enable_value_z_foro = 1
            $DLG_enable_value_diam_foro = 0
         ]
      }

      Radio RdFormaCirc
      {
        Caption = MSG(323)
        Hint    = MSG(323)
        Value   = $DLG_value_forma_scasso_circ
        Enable  = $DLG_enable_value_forma_scasso_circ

        Placement
        {
           posx = 15
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_forma_scasso_rett = 0
            $DLG_value_forma_scasso_circ = 1
            //per disabilitare/abilitare le varie caselle
            $DLG_enable_value_x_foro = 0
            $DLG_enable_value_z_foro = 0
            $DLG_enable_value_diam_foro = 1
        ]
      }
   }

   Frame DimensioniScasso
   {
      Caption = MSG(2407)
      Hint = MSG(2407)

      Placement
      {
         posx = 10
         posy = 195
         dimx = 150
         dimy = 135
      }

      Label Nota
      {
         Caption = $DLG_caption_scritta1
         Hint    = $DLG_hint_scrtta1
         Value   = $DLG_value_scritta1

        Font
        {
           size  = 7
           type  = 1
           color = 255
        }

         Placement
         {
            posx = 5
            posy = 17.5
            dimx = 140
            dimy = 20
         }
      }

      Label XDx
      {
         Caption = MSG(647)
         Hint    = MSG(647)
         Value   = $DLG_value_xDx

         Placement
         {
            posx = 15
            posy = 35
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit XDx
      {
         Caption = MSG(647)
         Hint    = MSG(647)
         Value   = $DLG_value_xDx
         Enable  = $DLG_enable_labbri

         Placement
         {
            posx = 60
            posy = 35
            dimx = 35
            dimy = 20
         }

         OnClick
         [
         ]
      }


      Label XSx
      {
         Caption = MSG(646)
         Hint    = MSG(646)
         Value   = $DLG_value_xSx

         Placement
         {
            posx = 15
            posy = 60
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit XSx
      {
         Caption = MSG(646)
         Hint    = MSG(646)
         Value   = $DLG_value_xSx
         Enable  = $DLG_enable_labbri

         Placement
         {
            posx = 60
            posy = 60
            dimx = 35
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label ZFro
      {
         Caption = MSG(648)
         Hint    = MSG(648)
         Value   = $DLG_value_zFro

         Placement
         {
            posx = 15
            posy = 85
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit ZFro
      {
         Caption = MSG(648)
         Hint    = MSG(648)
         Value   = $DLG_value_zFro
         Enable  = $DLG_enable_labbri

         Placement
         {
            posx = 60
            posy = 85
            dimx = 35
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label ZRet
      {
         Caption = MSG(649)
         Hint    = MSG(649)
         Value   = $DLG_value_zRet

         Placement
         {
            posx = 15
            posy = 110
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit ZRet
      {
         Caption = MSG(649)
         Hint    = MSG(649)
         Value   = $DLG_value_zRet
         Enable  = $DLG_enable_labbri

         Placement
         {
            posx = 60
            posy = 110
            dimx = 35
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }

   //Massimiliano 22/10/15 - abilito o disabilito dimensione labbri
   Frame AbilitaLabbri
   {
      Caption = MSG(2410)
      Hint = MSG(2410)

      Placement
      {
         posx = 165
         posy = 260
         dimx = 180
         dimy = 70
      }

      Radio RdAttiva
      {
         Caption = MSG(2408)
         Hint    = MSG(2408)
         Value   = $DLG_enable_labbri
         Enable  = $DLG_enable_set_labbri

         Placement
         {
            posx = 15
            posy = 20
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_enable_labbri    = 1
            $DLG_enable_LarghFres = 0
         ]
      }

      Radio RdDisattiva
      {
        Caption = MSG(2409)
        Hint    = MSG(2409)
        Value   = $DLG_enable_LarghFres
        Enable  = $DLG_enable_set_labbri

        Placement
        {
           posx = 15
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_enable_labbri    = 0
            $DLG_enable_LarghFres = 1
        ]
      }
   }

   Frame GeometriaScasso
   {
      Caption = MSG(324)
      Hint = MSG(325)

      Label Nota
      {
         Caption = $DLG_caption_scritta2
         Hint    = $DLG_hint_scrtta2
         Value   = $DLG_value_scritta2

        Font
        {
           size  = 7
           type  = 1
           color = 255
        }

         Placement
         {
            posx = 10
            posy = 12
            dimx = 120
            dimy = 20
         }
      }

      Placement
      {
         posx = 165
         posy = 10
         dimx = 180
         dimy = 250
      }

      Label XForo
      {
         Caption = MSG(326)
         Hint    = MSG(326)
         Value   = $DLG_value_x_foro
         Enable  = $DLG_enable_value_x_foro

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit XForo
      {
         Caption = MSG(326)
         Hint    = MSG(326)
         Value   = $DLG_value_x_foro
         Enable  = $DLG_enable_value_x_foro

         Placement
         {
            posx = 110
            posy = 25
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      Label ZForo
      {
         Caption = MSG(327)
         Hint    = MSG(327)
         Value   = $DLG_value_z_foro
         Enable  = $DLG_enable_value_z_foro

         Placement
         {
            posx = 15
            posy = 50
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit ZForo
      {
         Caption = MSG(327)
         Hint    = MSG(327)
         Value   = $DLG_value_z_foro
         Enable  = $DLG_enable_value_z_foro

         Placement
         {
            posx = 110
            posy = 50
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      //rob_pec 29/12/09 aggiungo il diametro
      Label DiamForo
      {
         Caption = MSG(328)
         Hint    = MSG(328)
         Value   = $DLG_value_diam_foro
         Enable  = $DLG_enable_value_diam_foro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit DiamForo
      {
         Caption = MSG(328)
         Hint    = MSG(328)
         Value   = $DLG_value_diam_foro
         Enable  = $DLG_enable_value_diam_foro

         Placement
         {
            posx = 110
            posy = 75
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      //rob_pec 29/03/10 aggiungo l'altezza del foro
      Label YForo
      {
         Caption = MSG(329)
         Hint    = MSG(329)
         Value   = $DLG_value_y_foro
         Enable  = $DLG_enable_value_y_foro

         Placement
         {
            posx = 15
            posy = 100
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit YForo
      {
         Caption = MSG(329)
         Hint    = MSG(329)
         Value   = $DLG_value_y_foro
         Enable  = $DLG_enable_value_y_foro

         Placement
         {
            posx = 110
            posy = 100
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label RagScasso
      {
         Caption = MSG(330)
         Hint    = MSG(330)
         Value   = $DLG_value_raggio_scasso_foro
         Enable  = $DLG_enable_RagScasso

         Placement
         {
            posx = 15
            posy = 125
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit RagScasso
      {
         Caption = MSG(330)
         Hint    = MSG(330)
         Value   = $DLG_value_raggio_scasso_foro
         Enable  = $DLG_enable_RagScasso

         Placement
         {
            posx = 110
            posy = 125
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      Label RagInterno
      {
         //rob_pec 30/03/2010: cambio SOLO la descrizione
         //da raggio interno a raggio incasso
         Caption = MSG(331)
         Hint    = MSG(331)
         Value   = $DLG_value_raggio_interno_foro
         Enable  = $DLG_enable_RagInterno

         Placement
         {
            posx = 15
            posy = 150
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit RagInterno
      {
         //rob_pec 30/03/2010: cambio SOLO la descrizione
         //da raggio interno a raggio incasso
         Caption = MSG(331)
         Hint    = MSG(331)
         Value   = $DLG_value_raggio_interno_foro
         Enable  = $DLG_enable_RagInterno

         Placement
         {
            posx = 110
            posy = 150
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }


      Label RagEsterno
      {
         //rob_pec 30/03/2010: cambio SOLO la descrizione
         //da raggio esterno a raggio fresata
         Caption = MSG(332)
         Hint    = MSG(332)
         Value   = $DLG_value_raggio_esterno_foro
         Enable  = $DLG_enable_RagEsterno

         Placement
         {
            posx = 15
            posy = 175
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit RagEsterno
      {
         //rob_pec 30/03/2010: cambio SOLO la descrizione
         //da raggio esterno a raggio fresata
         Caption = MSG(332)
         Hint    = MSG(332)
         Value   = $DLG_value_raggio_esterno_foro
         Enable  = $DLG_enable_RagEsterno

         Placement
         {
            posx = 110
            posy = 175
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label SpessFres
      {
         Caption = MSG(333)
         Hint    = MSG(333)
         Value   = $DLG_value_profondita_fresata
         Enable  = $DLG_enable_SpessFres

         Placement
         {
            posx = 15
            posy = 200
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit SpessFres
      {
         Caption = MSG(333)
         Hint    = MSG(333)
         Value   = $DLG_value_profondita_fresata
         Enable  = $DLG_enable_SpessFres

         Placement
         {
            posx = 110
            posy = 200
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LarghFres
      {
         Caption = MSG(334)
         Hint    = MSG(334)
         Value   = $DLG_value_larghezza_fresata
         Enable  = $DLG_enable_LarghFres

         Placement
         {
            posx = 15
            posy = 225
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit LarghFres
      {
         Caption = MSG(334)
         Hint    = MSG(334)
         Value   = $DLG_value_larghezza_fresata
         Enable  = $DLG_enable_LarghFres

         Placement
         {
            posx = 110
            posy = 225
            dimx = 45
            dimy = 20
         }

         OnClick
         [
         ]
      }
   }


   Frame PosizioneScasso
   {
      Caption = MSG(335)
      Hint = MSG(336)

      Placement
      {
         posx = 350
         posy = 10
         dimx = 180
         dimy = 155
      }

      Label LabFinitura
      {
         Caption = MSG(337)

         Placement
         {
            posx = 15
            posy = 25
            dimx = 140
            dimy = 20
         }
      }

      Label LabFinitura
      {
         Caption = $DLG_riferimento

         Placement
         {
            posx = 15
            posy = 50
            dimx = 150
            dimy = 20
         }
      }

      Radio Centro
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Value   = $DLG_value_centro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 1
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 0
         ]
      }


      Radio FiloForoSx
      {
         Caption = MSG(338)
         Hint    = MSG(338)
         Value   = $DLG_value_filo_foro_sx

         Placement
         {
            posx = 15
            posy = 100
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 1
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 1
         ]
      }


      Radio FiloForoDx
      {
         Caption = MSG(339)
         Hint    = MSG(339)
         Value   = $DLG_value_filo_foro_dx

         Placement
         {
            posx = 15
            posy = 125
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 1
            $DLG_enable_value_posizione_filo_foro    = 1
         ]
      }

//      Label PosizioneFilo
//      {
//         Caption = ""
//         Hint    = MSG(340)
//         Value   = $DLG_value_posizione_filo_foro
//         Enable  = $DLG_enable_value_posizione_filo_foro
//
//         Placement
//         {
//            posx = 125
//            posy = 85
//            dimx = 40
//            dimy = 15
//         }
//
//         OnClick
//         [
//         ]
//      }

      Edit PosizioneFilo
      {
         Caption = MSG(340)
         Hint    = MSG(340)
         Value   = $DLG_value_posizione_filo_foro
         Enable  = $DLG_enable_value_posizione_filo_foro

         Placement
         {
            posx = 130
            posy = 112
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }

   //rob_pec 29/12/09: aggiungo scelta dal fronte o dal retro
   Frame PosizioneScassoLaterale
   {
      Caption = ""
      Hint = MSG(336)

      Placement
      {
         posx = 350
         posy = 175
         dimx = 180
         dimy = 85
      }

      Radio FiloForoFronte
      {
         Caption = MSG(341)
         Hint    = MSG(341)
         Value   = $DLG_value_filo_foro_fronte

         Placement
         {
            posx = 15
            posy = 7
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_filo_foro_fronte = 1
            $DLG_value_filo_foro_retro = 0
         ]
      }

      Radio FiloForoRetro
      {
         Caption = MSG(342)
         Hint    = MSG(342)
         Value   = $DLG_value_filo_foro_retro

         Placement
         {
            posx = 15
            posy = 30
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_filo_foro_fronte = 0
            $DLG_value_filo_foro_retro = 1
         ]
      }

//      Label PosizioneFronte
//      {
//         Caption = ""
//         Hint    = MSG(343)
//         Value   = $DLG_value_posizione_fronte_foro
//
//         Placement
//         {
//            posx = 125
//            posy = 17
//            dimx = 40
//            dimy = 15
//         }
//
//         OnClick
//         [
//         ]
//      }

      Edit PosizioneFronte
      {
         Caption = MSG(343)
         Hint    = MSG(343)
         Value   = $DLG_value_posizione_FroRet_foro

         Placement
         {
            posx = 130
            posy = 17
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 465
         posy = 275
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 380
         posy = 275
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg 368CUC_ScassoTop_Foro
{
   Caption = MSG(257)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 400
      dimy = 270
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame GeometriaScasso
   {
      Caption = MSG(324)
      Hint = MSG(325)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 180
         dimy = 90
      }

      //rob_pec 29/12/09 aggiungo il diametro
      Label DiamForo
      {
         Caption = MSG(394)
         Hint    = MSG(394)
         Value   = $DLG_value_diam_foro

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit DiamForo
      {
         Caption = MSG(394)
         Hint    = MSG(394)
         Value   = $DLG_value_diam_foro

         Placement
         {
            posx = 125
            posy = 25
            dimx = 25
            dimy = 20
         }

         OnClick
         [
         ]
      }


      Label DiamForo2
      {
         Caption = MSG(395)
         Hint    = MSG(395)
         Value   = $DLG_value_diam_foro2

         Placement
         {
            posx = 15
            posy = 50
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit DiamForo2
      {
         Caption = MSG(395)
         Hint    = MSG(395)
         Value   = $DLG_value_diam_foro2

         Placement
         {
            posx = 125
            posy = 50
            dimx = 25
            dimy = 20
         }

         OnClick
         [
         ]
      }
   }


   Frame PosizioneScasso
   {
      Caption = MSG(335)
      Hint = MSG(336)

      Placement
      {
         posx = 200
         posy = 10
         dimx = 180
         dimy = 155
      }

      Label LabFinitura
      {
         Caption = MSG(337)

         Placement
         {
            posx = 15
            posy = 25
            dimx = 140
            dimy = 20
         }
      }

      Label LabFinitura
      {
         Caption = $DLG_riferimento

         Placement
         {
            posx = 15
            posy = 50
            dimx = 150
            dimy = 20
         }
      }

      Radio Centro
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Value   = $DLG_value_centro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 1
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 0
         ]
      }


      Radio FiloForoSx
      {
         Caption = MSG(338)
         Hint    = MSG(338)
         Value   = $DLG_value_filo_foro_sx

         Placement
         {
            posx = 15
            posy = 100
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 1
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 1
         ]
      }


      Radio FiloForoDx
      {
         Caption = MSG(339)
         Hint    = MSG(339)
         Value   = $DLG_value_filo_foro_dx

         Placement
         {
            posx = 15
            posy = 125
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 1
            $DLG_enable_value_posizione_filo_foro    = 1
         ]
      }

      Edit PosizioneFilo
      {
         Caption = MSG(340)
         Hint    = MSG(340)
         Value   = $DLG_value_posizione_filo_foro
         Enable  = $DLG_enable_value_posizione_filo_foro

         Placement
         {
            posx = 130
            posy = 112
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }

   //rob_pec 29/12/09: aggiungo scelta dal fronte o dal retro
   Frame PosizioneScassoLaterale
   {
      Caption = ""
      Hint = MSG(336)

      Placement
      {
         posx = 15
         posy = 100
         dimx = 180
         dimy = 65
      }

      //Radio FiloForoVasca
      //{
      //   Caption = MSG(396)
      //   Hint    = MSG(396)
      //   Value   = $DLG_value_filo_foro_fronte
      //
      //   Placement
      //   {
      //      posx = 15
      //      posy = 15
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $DLG_value_filo_foro_fronte = 1
      //      $DLG_value_filo_foro_retro = 0
      //      $DLG_value_posizione_FroRet_foro = "45"
      //   ]
      //}
      //
      //Radio FiloForoRetro
      //{
      //   Caption = MSG(342)
      //   Hint    = MSG(342)
      //   Value   = $DLG_value_filo_foro_retro
      //
      //   Placement
      //   {
      //      posx = 15
      //      posy = 45
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $DLG_value_filo_foro_fronte = 0
      //      $DLG_value_filo_foro_retro = 1
      //      $DLG_value_posizione_FroRet_foro = "59.5"
      //   ]
      //}

      Label FiloForoRetro
      {
         Caption = MSG(342)
         Hint    = MSG(342)
         Value   = $DLG_value_filo_foro_retro

         Placement
         {
            posx = 15
            posy = 15
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit PosizioneFronte
      {
         Caption = MSG(343)
         Hint    = MSG(343)
         Value   = $DLG_value_posizione_FroRet_foro

         Placement
         {
            posx = 130
            posy = 15
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg 368CUC_ScassoTop_ForoN
{
   Caption = MSG(257)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 400
      dimy = 280
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame GeometriaScasso
   {
      Caption = MSG(324)
      Hint = MSG(325)

      Placement
      {
         posx = 15
         posy = 10
         dimx = 180
         //dimy = 90
         dimy = 105
      }

      //rob_pec 29/12/09 aggiungo il diametro
      Label DiamForo
      {
         Caption = MSG(394)
         Hint    = MSG(394)
         Value   = $DLG_value_diam_foro1

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }
      }

      Edit DiamForo
      {
         Caption = MSG(394)
         Hint    = MSG(394)
         Value   = $DLG_value_diam_foro1

         Placement
         {
            posx = 125
            posy = 25
            dimx = 25
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label DiamForo2
      {
         Caption = MSG(395)
         Hint    = MSG(395)
         Value   = $DLG_value_diam_foro2
         Enable  = $DLG_Top80

         Placement
         {
            posx = 15
            posy = 50
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit DiamForo2
      {
         Caption = MSG(395)
         Hint    = MSG(395)
         Value   = $DLG_value_diam_foro2
         Enable  = $DLG_Top80

         Placement
         {
            posx = 125
            posy = 50
            dimx = 25
            dimy = 20
         }

         OnClick
         [
         ]
      }
      //Massimiliano 12/07/17 - gestisco possibilit di fare foro passante
      Check ForoPassante
      {
        Caption = MSG(2548)
        Hint    = MSG(2548)
        Enable  = 1
        Value   = $DLG_passante

        Placement
        {
           posx = 15
           posy = 75
           dimx = 100
           dimy = 20
        }

        OnClick
        [
          if( $DLG_passante == 1 )  {  $DLG_passante = 0  }
          else                      {  $DLG_passante = 1  }
        ]

      }
   }

   Frame PosizioneScasso
   {
      Caption = MSG(335)
      Hint = MSG(336)

      Placement
      {
         posx = 200
         posy = 10
         dimx = 180
         dimy = 155
      }

      Label LabFinitura
      {
         Caption = MSG(337)

         Placement
         {
            posx = 15
            posy = 25
            dimx = 140
            dimy = 20
         }
      }

      Label LabFinitura
      {
         Caption = $DLG_riferimento

         Placement
         {
            posx = 15
            posy = 50
            dimx = 150
            dimy = 20
         }
      }

      Radio Centro
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Value   = $DLG_value_centro
         Enable = $DLG_pos_sca

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 1
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 0
         ]
      }


      Radio FiloForoSx
      {
         Caption = MSG(338)
         Hint    = MSG(338)
         Value   = $DLG_value_filo_foro_sx
         Enable = $DLG_pos_sca

         Placement
         {
            posx = 15
            posy = 100
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 1
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 1
         ]
      }


      Radio FiloForoDx
      {
         Caption = MSG(339)
         Hint    = MSG(339)
         Value   = $DLG_value_filo_foro_dx
         Enable = $DLG_pos_sca

         Placement
         {
            posx = 15
            posy = 125
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 1
            $DLG_enable_value_posizione_filo_foro    = 1
         ]
      }

      Edit PosizioneFilo
      {
         Caption = MSG(340)
         Hint    = MSG(340)
         Value   = $DLG_value_posizione_filo_foro
         Enable  = $DLG_enable_value_posizione_filo_foro

         Placement
         {
            posx = 130
            posy = 112
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }
   }

   //Massimiliano 30/10/15 - spostato la valorizzazione sulle basi
   //Frame PosizioneBarra
   //{
   //   Placement
   //   {
   //      posx = 15
   //      posy = 165
   //      dimx = 360
   //      dimy = 30
   //   }
   //
   //   Radio BarraStd
   //   {
   //      Caption = MSG(2403)
   //      Hint    = MSG(2403)
   //      Value   = $DLG_BarraSTD
   //      Enable  = $DLG_enableBarra
   //
   //      Placement
   //      {
   //         posx = 15
   //         posy = 5
   //         dimx = 150
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_BarraSTD = 1
   //         $DLG_BarraSPE = 0
   //         $DLG_pos_sca  = 1
   //      ]
   //   }
   //
   //   Radio BarraSpe
   //   {
   //      Caption = MSG(2402)
   //      Hint    = MSG(2402)
   //      Value   = $DLG_BarraSPE
   //      Enable  = $DLG_enableBarra
   //
   //      Placement
   //      {
   //         posx = 200
   //         posy = 5
   //         dimx = 150
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_BarraSTD = 0
   //         $DLG_BarraSPE = 1
   //         $DLG_pos_sca  = 0
   //         $DLG_enable_value_posizione_filo_foro = 0
   //      ]
   //   }
   //}

   //rob_pec 29/12/09: aggiungo scelta dal fronte o dal retro
   Frame PosizioneScassoLaterale
   {
      Caption = ""
      Hint = MSG(336)

      Placement
      {
         posx = 15
         //posy = 100
         posy = 115
         dimx = 180
         dimy = 100
      }

      Radio PosLibero
      {
         Caption = MSG(2416)
         Hint    = MSG(2416)
         Value   = $DLG_value_libero

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_allinea_fronte = 0
            $DLG_value_allinea_retro  = 0
            $DLG_value_libero         = 1
         ]
      }

      Radio AllineaVasca
      {
         Caption = MSG(2418)
         Hint    = MSG(2418)
         Value   = $DLG_value_allinea_fronte

         Placement
         {
            posx = 15
            posy = 50
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_allinea_fronte = 1
            $DLG_value_allinea_retro  = 0
            $DLG_value_libero         = 0
            $DLG_value_posizione_FroRet_foro = "200"
         ]
      }

      Radio AllineaRetro
      {
         Caption = MSG(2417)
         Hint    = MSG(2417)
         Value   = $DLG_value_allinea_retro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_allinea_fronte = 0
            $DLG_value_allinea_retro  = 1
            $DLG_value_libero         = 0
            $DLG_value_posizione_FroRet_foro = "1"
         ]
      }

      Label FiloForoRetro
      {
         Caption = MSG(342)
         Hint    = MSG(342)
         Value   = $DLG_value_filo_foro_retro

         Placement
         {
            posx = 15
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit PosizioneFronte
      {
         Caption = ""
         Hint    = ""
         Value   = $DLG_value_posizione_FroRet_foro
         Enable  = $DLG_value_libero

         Placement
         {
            posx = 130
            posy = 5
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

   }

   //abilito lavorazione per secondo foro ( miscelatore CEA )
   Frame PosizioneSecondoScasso
   {
      Caption = ""
      Hint = MSG(336)

      Placement
      {
         posx = 200
         posy = 170
         dimx = 180
         dimy = 80
      }

      Radio Abilita
      {
         Caption = MSG(2445)
         Hint    = MSG(2445)
         Value   = $DLG_cea_si

         Placement
         {
            posx = 15
            posy = 25
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_cea_si = 1
            $DLG_cea_no = 0
            $DLG_pos_cea = "120"
         ]
      }

      Radio Disabilita
      {
         Caption = MSG(2446)
         Hint    = MSG(2446)
         Value   = $DLG_cea_no

         Placement
         {
            posx = 15
            posy = 50
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_cea_si = 0
            $DLG_cea_no = 1
         ]
      }

      Label Posizione
      {
         Caption = MSG(657)
         Hint    = MSG(657)
         Value   = $DLG_pos_cea

         Placement
         {
            posx = 15
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit Posizione
      {
         Caption = ""
         Hint    = ""
         Value   = $DLG_pos_cea
         Enable  = $DLG_cea_si

         Placement
         {
            posx = 130
            posy = 5
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         //posy = 200
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         //posy = 200
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   //Massimiliano 14/10/15 - cambio gestione dimensioni
   Button btnDiamForo1
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(357)

      Placement
      {
         posx = 170
         posy =  35
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_foro1")
         //$DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
         //$DLG_caption_profondita_368 = STR($DLG_profondita)
         if( $DLG_Top80 == 0 )
         {
            //if( $DLG_TipoTop !=1 | $DLG_TipoTop !=4 )  {  $DLG_Foro2 = STR(ATOI($DLG_foro1) + 6)  }
            if( $DLG_TipoTop == 1 | $DLG_TipoTop == 4 )  {  $DLG_foro2 = $DLG_foro1      }
            else                                         {  $DLG_foro2 = $DLG_foro1 + 6  }
            $DLG_value_diam_foro2 = STR($DLG_foro2)
         }
         $DLG_value_diam_foro1   = STR($DLG_foro1)
      ]
   }
   Button btnDiamForo2
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(357)
      Enable = $DLG_Top80

      Placement
      {
         posx = 170
         posy =  60
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_foro2")
         //$DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
         //$DLG_caption_profondita_368 = STR($DLG_profondita)
         $DLG_value_diam_foro2   = STR($DLG_foro2)
      ]
   }
}

//rob_pec 16/07/09 aggiungo la dialog per lo schienale: molto simile a quella dei top
Dlg 368CUC_Sch
{
   Caption = MSG(258)
   Placement
   {
      posx = 170
      posy = 150
      dimx = 370
      dimy = 300
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame FrmMisure
   {
      Caption = MSG(601)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 105
      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 60
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(259)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 80
           dimy = 20
        }

      }
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(260)

      Placement
      {
         posx = 135
         posy = 70
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Frame FinituraSch
   {
      Caption = MSG(261)
      Hint = MSG(204)

      Placement
      {
         posx = 175
         posy = 10
         dimx = 165
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 135
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio Rdlaminato
      {
        Caption = MSG(262)
        Hint    = MSG(262)
        Value   = $DLG_value_sch_laminato
        Enable  = $DLG_enable_sch_rd_laminato_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 125
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato = 1
           $DLG_value_sch_vetro_opaco  = 0
           $DLG_value_sch_vetro_lucido = 0
        ]
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(263)
        Hint    = MSG(263)
        Value   = $DLG_value_sch_vetro_opaco
        Enable  = $DLG_enable_sch_rd_vetro_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 125
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato = 0
           $DLG_value_sch_vetro_opaco  = 1
           $DLG_value_sch_vetro_lucido = 0
        ]

      }

      Radio RdVetroLucido
      {
        Caption = MSG(264)
        Hint    = MSG(264)
        Value   = $DLG_value_sch_vetro_lucido
        Enable  = $DLG_enable_sch_rd_vetro_lucido_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 125
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato = 0
           $DLG_value_sch_vetro_opaco  = 0
           $DLG_value_sch_vetro_lucido = 1
        ]

      }


   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 275
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 190
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnFinituraSchp
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(213)

      Placement
      {
         posx = 185
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_sch_laminato==1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_lam.txt")
         }

         if($DLG_value_sch_vetro_lucido == 1 | $DLG_value_sch_vetro_opaco == 1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_vetro.txt")
         }

        $R = CHIEDI(-1,"DLG_COLORE_368_SCH")

        // Deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCH,"coloritop.txt")
        $DLG_image_file_sch      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")
        $DLG_image_file_sch      = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}


//==========================================================================
//==========================================================================
//                DIALOG NUOVE PER CUCINE STRIPES
//==========================================================================
//==========================================================================

Dlg 368CUC_Cont_Base_A
{
   Caption = MSG(344)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 640
      dimy = 380
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(345)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 105
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_edit_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_edit_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }
   }


   Frame FrmApertura
   {
      Caption = ""
      Hint = ""
      Enable = 0

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 45
      }

      Edit EdtApertura
      {
         //attiva solo nel caso di contenitore con anta
         Caption = $DLG_caption_apertura_368
         Hint    = $DLG_hint_apertura_368
         Enable  = $DLG_enable_apertura_368
         Value   = $DLG_value_apertura_368
         Placement
         {
            posx = 70
            posy = 15
            dimx = 50
            dimy = 20
         }
         OnClick
         [
         ]
      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 15
           dimx = 80
           dimy = 20
        }
      }
   }


   Frame FrmLavelloSiNo
   {
      Caption = MSG(346)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 10
         posy = 165
         dimx = 150
         dimy = 85
      }

      Radio RdLavelloSi
      {
        Caption = MSG(233)
        Hint    = MSG(233)
        Value   = $DLG_value_lavello_SI
        Enable  = $DLG_enable_lavello_SI

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 0
           $DLG_value_lavello_SI = 1
           $DLG_value_lavello_NO = 0
         //fc 100527 impedisco modifiche dimensionali
           $DLG_enable_lar_368   = 0
           $DLG_enable_alt_368   = 0
           $DLG_enable_pro_368   = 0
         // Eugenio 22.06.15 vincolo che sia bagno per avere cestone ribassato
           //if (STRCMP($DLG_altezza_368,"552")==0)  { $DLG_enable_cesrib = 0 }
           //else                                    { $DLG_enable_cesrib = 1 }
           $DLG_enable_cesrib    = 0
           $DLG_cestone_riba     = 0

           //Massimiliano 05/11/15 - se sono predisposto bagno non posso attivare barra ruotata
           $DLG_enableBarra = 1
        ]

      }

      Radio RdLavelloBagno
      {
        Caption = MSG(269)
        Hint    = MSG(269)
        Value   = $DLG_value_lavello_Bagno
        Enable  = $DLG_enable_lavello_Bagno

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 1
           $DLG_value_lavello_SI = 0
           $DLG_value_lavello_NO = 0
         //fc 100527 impedisco modifiche dimensionali
           $DLG_enable_lar_368   = 0
           $DLG_enable_alt_368   = 0
           $DLG_enable_pro_368   = 0
           if (STRCMP($DLG_altezza_368,"552")==0)  { $DLG_enable_cesrib = 0 }
           else                                    { $DLG_enable_cesrib = 1 }

           //Massimiliano 05/11/15 - se sono predisposto bagno non posso attivare barra ruotata
           $DLG_enableBarra = 0
        ]

      }

      Radio RdLavelloNo
      {
        Caption = MSG(234)
        Hint    = MSG(234)
        Value   = $DLG_value_lavello_NO
        Enable  = $DLG_enable_lavello_NO

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 0
           $DLG_value_lavello_SI = 0
           $DLG_value_lavello_NO = 1
         //fc 100527 riabilito modifiche dimensionali
           $DLG_enable_lar_368   = 1
           $DLG_enable_alt_368   = 1
           $DLG_enable_pro_368   = 1
           $DLG_enable_cesrib    = 0
           $DLG_cestone_riba     = 0

           //Massimiliano 05/11/15 - se sono predisposto bagno non posso attivare barra ruotata
           $DLG_enableBarra = 0
        ]
      }
   }

   Frame FrmFrontFisso
   {
      //Caption = MSG(276)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 10
         posy = 255
         dimx = 150
         dimy = 60
      }

      Check chkCestoneRiba
      {
        Caption = MSG(277)
        Hint    = MSG(277)
        Enable  = $DLG_enable_cesrib
        Value   = $DLG_cestone_riba

        Placement
        {
           posx = 10
           posy = 10
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_cestone_riba==1)  {  $DLG_cestone_riba=1  }
           else                      {  $DLG_cestone_riba=0  }
        ]
      }

      Check chkFrontFisso
      {
        Caption = MSG(276)
        Hint    = MSG(276)
        Enable  = $DLG_enable_frofis
        Value   = $DLG_frontale_fisso

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_frontale_fisso==1)  {  $DLG_frontale_fisso=1  }
           else                        {  $DLG_frontale_fisso=0  }
        ]

      }


   }

   //Massimiliano 09/11/15 - ora si deve gestire in automatico
   ////Massimiliano 30/10/15 - sposto la gestione della barra dal foro miscelatore alle basi
   //Frame PosizioneBarra
   //{
   //   Caption = MSG(2411)
   //   Hint = MSG(2411)
   //
   //   Placement
   //   {
   //      posx = 320
   //      posy = 190
   //      dimx = 305
   //      dimy = 50
   //   }
   //
   //   Radio BarraStd
   //   {
   //      Caption = MSG(2403)
   //      Hint    = MSG(2403)
   //      Value   = $DLG_BarraSTD
   //      Enable  = $DLG_enableBarra
   //
   //      Placement
   //      {
   //         posx = 15
   //         posy = 25
   //         dimx = 150
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_BarraSTD = 1
   //         $DLG_BarraSPE = 0
   //         $DLG_pos_sca  = 1
   //      ]
   //   }
   //
   //   Radio BarraSpe
   //   {
   //      Caption = MSG(2402)
   //      Hint    = MSG(2402)
   //      Value   = $DLG_BarraSPE
   //      Enable  = $DLG_enableBarra
   //
   //      Placement
   //      {
   //         posx = 200
   //         posy = 25
   //         dimx = 150
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //         $DLG_BarraSTD = 0
   //         $DLG_BarraSPE = 1
   //         $DLG_pos_sca  = 0
   //         $DLG_enable_value_posizione_filo_foro = 0
   //      ]
   //   }
   //}


   //rob_pec 06/11/09 aggiunto la scelta del tipo stripes
   Frame FrmTipoStripes
   {
      Caption = MSG(347)
      Hint = ""
      Enable  = $DLG_enable_TipoStripes

      Placement
      {
         posx = 165
         posy = 235
         dimx = 150
         dimy = 115
      }


      Image Im1
      {
         Caption = ""
         Value   = $DLG_image_file_TipoStripes
         Hint    = $DLG_descrizione_TipoStripes
         Enable  = $DLG_enable_TipoStripes

         Placement
         {
            posx =  45
            posy =  20
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraFrontali
   {
      Caption = MSG(235)
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 220
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_fro_ww == 1)
           {
              $DLG_COLORE_368_L_FRO = "BCO"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_FRO = $DLG_COLORE_368_L_FRO
              GOSUB Get_Image_368CUC_L
           }
           $DLG_value_fro_ww = 0

           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0
           GOSUB SETTA_PROF
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           // Eugenio 30.10.14 Sblocco la profondit sempre e cmq
           $DLG_enable_edit_pro_368 = 1
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_fro_ww == 1)
           {
              $DLG_COLORE_368_FRO = "BCO"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
              GOSUB Get_Image_368CUC
           }
           $DLG_value_fro_ww = 0

           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
           GOSUB SETTA_PROF
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           // Eugenio 30.10.14 Sblocco la profondit sempre e cmq
           $DLG_enable_edit_pro_368 = 1
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_fro_ww == 1)
           {
              $DLG_COLORE_368_FRO = "BCO"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
              GOSUB Get_Image_368CUC
           }
           $DLG_value_fro_ww = 0

           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
           GOSUB SETTA_PROF
           $DLG_enable_TipoStripes = 0

           // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
           $DLG_TipoStripes = "000"
           $DLG_value_TipoStripes = $DLG_TipoStripes
           $DLG_caption_TipoStripes = $DLG_TipoStripes
           $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
           $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
           //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))
           // Eugenio 30.10.14 Sblocco la profondit sempre e cmq
           $DLG_enable_edit_pro_368 = 1
        ]
      }

      //Massimiliano 21/05/14 - aggiunta colore ww anta
      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_fro_ww
        Enable  = $DLG_enable_fro_rd_ww_368

        Placement
        {
           posx = 15
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_fro_opaco==1 | $DLG_value_fro_lucido==1 | $DLG_value_fro_laccato==1)
           {
              $DLG_COLORE_368_W_FRO = "SZ1"
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
              $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
              GOSUB Get_Image_368CUC
           }
           $DLG_value_fro_ww = 1

           $DLG_value_fro_opaco = 0
           $DLG_value_fro_lucido = 0
           $DLG_value_fro_laccato = 0
           GOSUB SETTA_PROF
           $DLG_enable_TipoStripes = 0

           // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
           $DLG_TipoStripes = "000"
           $DLG_value_TipoStripes = $DLG_TipoStripes
           $DLG_caption_TipoStripes = $DLG_TipoStripes
           $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
           $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
           //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))
           // Eugenio non sono state codificate le basi wildwood P!=610
           // Eugenio 05.11.15 Sono arrivati i codici
           //if( $DLG_baseconflap==0 )
           //{
           //   $DLG_enable_edit_pro_368 = 0
           //   $DLG_value_profondita_368 = "610"
           //}
        ]
      }
   }

   Frame FinituraFiancoSx
   {
      Caption = MSG(237)
      Hint = MSG(238)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_descrizione_fsx_var
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_image_file_fsx
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraFiancoDx
   {
      Caption = MSG(239)
      Hint = MSG(240)

      Placement
      {
         posx = 475
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_descrizione_fdx_var
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_image_file_fdx
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 560
         posy = 290
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 475
         posy = 290
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         // Eugenio 08.10.13 Anche la profondit  diventata editabile, ma solo per backoffice
         $DLG_profondita_368  = $DLG_value_profondita_368

         // Eugenio 07.12.15 Non si possono ridurre oltre 368 le basi con maniglia flapp
         if($DLG_baseconflap==1 & ATOI($DLG_larghezza_368)<368)
         {
            DISPLAY2(MSG(2419))
            $DLG_larghezza_368 = "368"
         }

         //Massimiliano 18/12/2017  - controllo quando sono base lavastoviglie con dimensioni non STD
         if( IS_MATCH(NOME($idx_att),"368CUC_BaseLavs*")==1 )
         {
            if( ATOI($DLG_larghezza_368) != 736 & ATOI($DLG_larghezza_368) != 920 & ATOI($DLG_larghezza_368) != 640 )
            {
               if( IS_VAR_FIXED($idx_att,"X")==1 & VAR_VAL($idx_att,"X")==640 )  {  $DLG_larghezza_368 = "640" }
               else                                                              {  $DLG_larghezza_368 = "736" }
               DISPLAY2(MSG(2555))
            }
         }

         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_edit_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368

        // Eugenio 22.07.15 Non esistono ante L>368 H=368
        if($a_tipo_anta==2)
        {
           if(ATOI($DLG_larghezza_368)>368)
           {
              VAR_SET_MENU(-1,"DLG_altezza_368","altezza1_CUC368_A.txt")
              // Controllo che qualcuno non faccia il furbo
              if(ATOI($DLG_altezza_368)<552)  {  $DLG_altezza_368 = "552"  }
           }
           else
           {
              VAR_SET_MENU(-1,"DLG_altezza_368","altezza1_CUC368.txt")
           }
        }

      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_edit_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368

        //rob_pec 10/11/09 al cambio dell'altezza del contenitore, se posso
        //avere gli stripes devo richiedere la tipologia, filtrando per
        //prima le possibilit.

        if($DLG_enable_TipoStripes == 1)
        {
            if(VAR_EXIST($idx_att,"TipoStripes")==1)
            {
               GOSUB Ctrl_VAR_TipoStripes
            }
            $R = CHIEDI(-1,"DLG_TipoStripes")
        }

        // Eugenio 18.11.14 Se sono H=552 non esiste cestone ribassato
        if(STRCMP($DLG_altezza_368,"552")==0)
        {
           $DLG_enable_cesrib=0
           $DLG_cestone_riba=0
        }
        if(STRCMP($DLG_altezza_368,"552")!=0)
        {
           if ( $DLG_value_lavello_SI==1 | $DLG_value_lavello_Bagno==1 )
           {
              $DLG_enable_cesrib=1
           }
        }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_edit_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_apertura_368

      Placement
      {
         posx = 135
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_apertura_368")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
         $DLG_caption_apertura_368 = $DLG_apertura_368
         if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"DX")==0)   { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"SX")==0)   { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"LAT")==0)  { $DLG_value_apertura_368 = "LAT" }
         if(STRCMP($DLG_apertura_368,"GOL")==0)  { $DLG_value_apertura_368 = "GOL" }
         if(STRCMP($DLG_apertura_368,"PEL")==0)  { $DLG_value_apertura_368 = "PEL" }
         if(STRCMP($DLG_apertura_368,"TGL")==0)  { $DLG_value_apertura_368 = "TGL" }
      ]
   }



   Button btnTipoStripes
   {
      Caption = MSG(354)
      Result  = 0
      Hint = MSG(355)
      Enable  = $DLG_enable_TipoStripes

      Placement
      {
         posx = 175
         posy = 325
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            $R = CHIEDI(-1,"DLG_TipoStripes")
            $DLG_hint_TipoStripes = STRCAT(MSG(310)," = ",$DLG_TipoStripes)
            $DLG_caption_TipoStripes = $DLG_TipoStripes
            $DLG_value_TipoStripes = $DLG_TipoStripes

            $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
            $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)

      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [

        if( $DLG_value_fro_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
           $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           $DLG_COLORE_368_FRO = $DLG_COLORE_368_FRO
           GOSUB Get_Image_368CUC
        }
        else
        {
           if( $DLG_value_fro_laccato == 1 | $DLG_value_fro_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
              GOSUB Get_Image_368CUC
           }
           else
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
              $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
              $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
              $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
              GOSUB Get_Image_368CUC_W
           }
        }

        //$R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        //$DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        //$DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        //$DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)
      ]
   }

   Button btnFinituraFiancoSx
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(243)
      Enable = $DLG_enable_fialac

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 06/07/2010: cambio e ripasso alla variabile di metron
         //$R = CHIEDI($idx_att,"GEST_FL")
         $R = CHIEDI(-1,"DLG_COLORE_368_FSX")
         //$DLG_COLORE_368_FSX = VAR_VAL_STR($idx_att,"GEST_FL")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_fsx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FSX,"colori_tutti.txt")
         $DLG_image_file_fsx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FSX,".bmp")
         $DLG_image_file_fsx      = SUBST_LABEL($DLG_image_file_fsx)
      ]
   }


   Button btnFinituraFiancoDx
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(244)
      Enable = $DLG_enable_fialac

      Placement
      {
         posx = 480
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 06/07/2010: cambio e ripasso alla variabile di metron
         //$R = CHIEDI($idx_att,"GEST_FR")
         $R = CHIEDI(-1,"DLG_COLORE_368_FDX")
         //$DLG_COLORE_368_FDX = VAR_VAL_STR($idx_att,"GEST_FR")

         // deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_fdx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FDX,"colori_tutti.txt")
         $DLG_image_file_fdx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FDX,".bmp")
         $DLG_image_file_fdx      = SUBST_LABEL($DLG_image_file_fdx)
      ]
   }
}

//Massimiliano 01/07/14 - dialog per basi cucina 368 nuove
Dlg 368CUC_Cont_Base_A_Modu
{
   Caption = MSG(344)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 480
      dimy = 235
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(345)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 105
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }
   }


   //Frame FrmApertura
   //{
   //   Caption = ""
   //   Hint = ""
   //   Enable = 0
   //
   //   Placement
   //   {
   //      posx = 10
   //      posy = 115
   //      dimx = 150
   //      dimy = 45
   //   }
   //
   //   Edit EdtApertura
   //   {
   //      //attiva solo nel caso di contenitore con anta
   //      Caption = $DLG_caption_apertura_368
   //      Hint    = $DLG_hint_apertura_368
   //      Enable  = $DLG_enable_apertura_368
   //      Value   = $DLG_value_apertura_368
   //      Placement
   //      {
   //         posx = 70
   //         posy = 15
   //         dimx = 50
   //         dimy = 20
   //      }
   //      OnClick
   //      [
   //      ]
   //   }
   //
   //   Label LblApertura
   //   {
   //     Caption = MSG(104)
   //     Hint    = MSG(105)
   //     Enable  = $DLG_enable_apertura_368
   //     Value   = MSG(104)
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 15
   //        dimx = 80
   //        dimy = 20
   //     }
   //   }
   //}


   Frame FrmLavelloSiNo
   {
      Caption = MSG(346)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 85
      }

      Radio RdLavelloSi
      {
        Caption = MSG(233)
        Hint    = MSG(233)
        Value   = $DLG_value_lavello_SI
        Enable  = $DLG_enable_lavello_SI

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 0
           $DLG_value_lavello_SI = 1
           $DLG_value_lavello_NO = 0
         //fc 100527 impedisco modifiche dimensionali
           $DLG_enable_lar_368   = 0
           $DLG_enable_alt_368   = 0
           $DLG_enable_pro_368   = 0
           $DLG_enable_cesrib    = 1
        ]

      }

      Radio RdLavelloBagno
      {
        Caption = MSG(269)
        Hint    = MSG(269)
        Value   = $DLG_value_lavello_Bagno
        Enable  = $DLG_enable_lavello_Bagno

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 1
           $DLG_value_lavello_SI = 0
           $DLG_value_lavello_NO = 0
         //fc 100527 impedisco modifiche dimensionali
           $DLG_enable_lar_368   = 0
           $DLG_enable_alt_368   = 0
           $DLG_enable_pro_368   = 0
           $DLG_enable_cesrib    = 1
        ]

      }

      Radio RdLavelloNo
      {
        Caption = MSG(234)
        Hint    = MSG(234)
        Value   = $DLG_value_lavello_NO
        Enable  = $DLG_enable_lavello_NO

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_lavello_Bagno = 0
           $DLG_value_lavello_SI = 0
           $DLG_value_lavello_NO = 1
         //fc 100527 riabilito modifiche dimensionali
           $DLG_enable_lar_368   = 1
           $DLG_enable_alt_368   = 1
           $DLG_enable_pro_368   = 1
           $DLG_enable_cesrib    = 0
           $DLG_cestone_riba     = 0
        ]
      }
   }

   Frame FinituraFiancoSx
   {
      Caption = MSG(237)
      Hint = MSG(238)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_descrizione_fsx_var
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_image_file_fsx
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraFiancoDx
   {
      Caption = MSG(239)
      Hint = MSG(240)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 140
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_descrizione_fdx_var
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_image_file_fdx
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 170
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 170
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         // Eugenio 08.10.13 Anche la profondit  diventata editabile, ma solo per backoffice
         $DLG_profondita_368  = $DLG_value_profondita_368

         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_edit_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_edit_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_edit_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinituraFiancoSx
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(243)
      Enable = $DLG_enable_fialac

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 06/07/2010: cambio e ripasso alla variabile di metron
         //$R = CHIEDI($idx_att,"GEST_FL")
         $R = CHIEDI(-1,"DLG_COLORE_368_FSX")
         //$DLG_COLORE_368_FSX = VAR_VAL_STR($idx_att,"GEST_FL")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_fsx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FSX,"colori_tutti.txt")
         $DLG_image_file_fsx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FSX,".bmp")
         $DLG_image_file_fsx      = SUBST_LABEL($DLG_image_file_fsx)
      ]
   }


   Button btnFinituraFiancoDx
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(244)
      Enable = $DLG_enable_fialac

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //chiedo direttamente la variante gestionale e poi passo il valore
         //alla variabile di sostegno
         //rob_pec 06/07/2010: cambio e ripasso alla variabile di metron
         //$R = CHIEDI($idx_att,"GEST_FR")
         $R = CHIEDI(-1,"DLG_COLORE_368_FDX")
         //$DLG_COLORE_368_FDX = VAR_VAL_STR($idx_att,"GEST_FR")

         // deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_fdx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FDX,"colori_tutti.txt")
         $DLG_image_file_fdx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FDX,".bmp")
         $DLG_image_file_fdx      = SUBST_LABEL($DLG_image_file_fdx)
      ]
   }
}

//Massimiliano 23/06/14 - dialog per colonne cucina 368 nuove
Dlg 368CUC_Cont_Colonna_NEW
{
   Caption = MSG(393)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 780
      dimy = 285
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(345)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 105
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }


      //Edit EdtProfondita
      //{
      //  Caption = $DLG_caption_profondita_368
      //  Hint    = $DLG_hint_profondita_368
      //  Enable  = $DLG_enable_pro_368
      //  Value   = $DLG_value_profondita_368
      //
      //  Placement
      //  {
      //     posx = 70
      //     posy = 75
      //     dimx = 50
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //  ]
      //
      //}

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }


      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = MSG(86)
      //  Enable  = $DLG_enable_pro_368
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 80
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //}
   }

   Frame FrmApertura
   {
      Caption = ""
      Hint = ""
      Enable = 0

      Placement
      {
         posx = 10
         posy = 115
         dimx = 150
         dimy = 45
      }

      Edit EdtApertura
      {
         //attiva solo nel caso di contenitore con anta
         Caption = $DLG_caption_apertura_368
         Hint    = $DLG_hint_apertura_368
         Enable  = $DLG_enable_apertura_368
         Value   = $DLG_value_apertura_368
         Placement
         {
            posx = 70
            posy = 15
            dimx = 50
            dimy = 20
         }
         OnClick
         [
         ]
      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 15
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FinituraFrontali
   {
      //Caption = MSG(286)
      Caption = $DLG_caption_fr
      Hint = MSG(236)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           //if($DLG_value_fro_ww == 1)
           //{
           //   $DLG_COLORE_368_L_FRO = "BCO"
           //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L_FRO,"colori_tutti.txt")
           //   $DLG_COLORE_368_FRO = $DLG_COLORE_368_L_FRO
           //   GOSUB Get_Image_368CUC_L
           //}
           //$DLG_value_fro_ww = 0

           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           //$DLG_value_fro_laccato = 0
           //GOSUB SETTA_PROF
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           //if($DLG_value_fro_ww == 1)
           //{
           //   $DLG_COLORE_368_FRO = "BCO"
           //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           //   $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
           //   GOSUB Get_Image_368CUC
           //}
           //$DLG_value_fro_ww = 0

           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           //$DLG_value_fro_laccato = 0
           //GOSUB SETTA_PROF
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        ]
      }

      //Radio RdLaccato
      //{
      //  Caption = MSG(874)
      //  Hint    = MSG(874)
      //  Value   = $DLG_value_fro_laccato
      //  Enable  = $DLG_enable_fro_rd_laccato_368
      //
      //  Placement
      //  {
      //     posx = 15
      //     posy = 175
      //     dimx = 120
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
      //     if($DLG_value_fro_ww == 1)
      //     {
      //        $DLG_COLORE_368_FRO = "BCO"
      //        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
      //        $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
      //        GOSUB Get_Image_368CUC
      //     }
      //     $DLG_value_fro_ww = 0
      //
      //     $DLG_value_fro_lucido  = 0
      //     $DLG_value_fro_opaco   = 0
      //     $DLG_value_fro_laccato = 1
      //     GOSUB SETTA_PROF
      //     $DLG_enable_TipoStripes = 0
      //
      //     // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
      //     $DLG_TipoStripes = "000"
      //     $DLG_value_TipoStripes = $DLG_TipoStripes
      //     $DLG_caption_TipoStripes = $DLG_TipoStripes
      //     $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
      //     $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
      //     //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))
      //  ]
      //}
      //
      ////Massimiliano 21/05/14 - aggiunta colore ww anta
      //Radio RdWildwood
      //{
      //  Caption = MSG(897)
      //  Hint    = MSG(897)
      //  Value   = $DLG_value_fro_ww
      //  Enable  = $DLG_enable_fro_rd_ww_368
      //
      //  Placement
      //  {
      //     posx = 15
      //     posy = 195
      //     dimx = 120
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     if($DLG_value_fro_opaco==1 | $DLG_value_fro_lucido==1 | $DLG_value_fro_laccato==1)
      //     {
      //        $DLG_COLORE_368_W_FRO = "SZ1"
      //        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
      //        $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
      //        $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
      //        GOSUB Get_Image_368CUC
      //     }
      //     $DLG_value_fro_ww = 1
      //
      //     $DLG_value_fro_opaco = 0
      //     $DLG_value_fro_lucido = 0
      //     $DLG_value_fro_laccato = 0
      //     GOSUB SETTA_PROF
      //     $DLG_enable_TipoStripes = 0
      //
      //     // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
      //     $DLG_TipoStripes = "000"
      //     $DLG_value_TipoStripes = $DLG_TipoStripes
      //     $DLG_caption_TipoStripes = $DLG_TipoStripes
      //     $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
      //     $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
      //     //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))
      //
      //  ]
      //}
   }

   Frame FinituraFrontali2
   {
      //Caption = MSG(287)
      Caption = $DLG_caption_fr2
      Hint = MSG(236)

      Placement
      {
         posx = 315
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro2_var
         Value   = $DLG_descrizione_fro2_var
         Hint    = $DLG_descrizione_fro2_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro2_var
         Value   = $DLG_image_file_fro2
         Hint    = $DLG_descrizione_fro2_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro2_lucido
        Enable  = $DLG_enable_fro2_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           //if($DLG_value_fro_ww == 1)
           //{
           //   $DLG_COLORE_368_L_FRO = "BCO"
           //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L_FRO,"colori_tutti.txt")
           //   $DLG_COLORE_368_FRO = $DLG_COLORE_368_L_FRO
           //   GOSUB Get_Image_368CUC_L
           //}
           //$DLG_value_fro_ww = 0

           $DLG_value_fro2_lucido  = 1
           $DLG_value_fro2_opaco   = 0
           //$DLG_value_fro_laccato = 0
           //GOSUB SETTA_PROF
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro2_opaco
        Enable  = $DLG_enable_fro2_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           //if($DLG_value_fro_ww == 1)
           //{
           //   $DLG_COLORE_368_FRO = "BCO"
           //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
           //   $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
           //   GOSUB Get_Image_368CUC
           //}
           //$DLG_value_fro_ww = 0

           $DLG_value_fro2_lucido  = 0
           $DLG_value_fro2_opaco   = 1
           //$DLG_value_fro_laccato = 0
           //GOSUB SETTA_PROF
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           //if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        ]
      }

      //Radio RdLaccato
      //{
      //  Caption = MSG(874)
      //  Hint    = MSG(874)
      //  Value   = $DLG_value_fro_laccato
      //  Enable  = $DLG_enable_fro_rd_laccato_368
      //
      //  Placement
      //  {
      //     posx = 15
      //     posy = 175
      //     dimx = 120
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
      //     if($DLG_value_fro_ww == 1)
      //     {
      //        $DLG_COLORE_368_FRO = "BCO"
      //        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
      //        $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
      //        GOSUB Get_Image_368CUC
      //     }
      //     $DLG_value_fro_ww = 0
      //
      //     $DLG_value_fro_lucido  = 0
      //     $DLG_value_fro_opaco   = 0
      //     $DLG_value_fro_laccato = 1
      //     GOSUB SETTA_PROF
      //     $DLG_enable_TipoStripes = 0
      //
      //     // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
      //     $DLG_TipoStripes = "000"
      //     $DLG_value_TipoStripes = $DLG_TipoStripes
      //     $DLG_caption_TipoStripes = $DLG_TipoStripes
      //     $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
      //     $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
      //     //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))
      //  ]
      //}
      //
      ////Massimiliano 21/05/14 - aggiunta colore ww anta
      //Radio RdWildwood
      //{
      //  Caption = MSG(897)
      //  Hint    = MSG(897)
      //  Value   = $DLG_value_fro_ww
      //  Enable  = $DLG_enable_fro_rd_ww_368
      //
      //  Placement
      //  {
      //     posx = 15
      //     posy = 195
      //     dimx = 120
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     if($DLG_value_fro_opaco==1 | $DLG_value_fro_lucido==1 | $DLG_value_fro_laccato==1)
      //     {
      //        $DLG_COLORE_368_W_FRO = "SZ1"
      //        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
      //        $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
      //        $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
      //        GOSUB Get_Image_368CUC
      //     }
      //     $DLG_value_fro_ww = 1
      //
      //     $DLG_value_fro_opaco = 0
      //     $DLG_value_fro_lucido = 0
      //     $DLG_value_fro_laccato = 0
      //     GOSUB SETTA_PROF
      //     $DLG_enable_TipoStripes = 0
      //
      //     // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
      //     $DLG_TipoStripes = "000"
      //     $DLG_value_TipoStripes = $DLG_TipoStripes
      //     $DLG_caption_TipoStripes = $DLG_TipoStripes
      //     $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
      //     $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
      //     //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))
      //
      //  ]
      //}
   }

   Frame FinituraFiancoDX
   {
      Caption = MSG(239)
      Hint = MSG(240)

      Placement
      {
         posx = 615
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_descrizione_fdx_var
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fdx_var
         Value   = $DLG_image_file_fdx
         Hint    = $DLG_descrizione_fdx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $DLG_value_fdx_lucido
        //Enable  = $DLG_enable_fdx_rd_lucido_368
         Enable = $DLG_enablefdx

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fdx_lucido  = 1
           $DLG_value_fdx_opaco   = 0
           $DLG_value_fdx_laccato = 0

           //Massimiliano 05/05/17 - setto i default corretti
           $DLG_COLORE_368_FDX = "BCO"
           $DLG_descrizione_fdx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FDX,"colori_tutti.txt")
           $DLG_image_file_fdx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FDX,".bmp")
           $DLG_image_file_fdx      = SUBST_LABEL($DLG_image_file_fdx)
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(376)
        Hint    = MSG(376)
        Value   = $DLG_value_fdx_opaco
        //Enable  = $DLG_enable_fdx_rd_opaco_368
         Enable = $DLG_enablefdx

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fdx_lucido  = 0
           $DLG_value_fdx_opaco   = 1
           $DLG_value_fdx_laccato = 0

           //Massimiliano 05/05/17 - setto i default corretti
           if( $DLG_COLORE_368_FDX == "ME2" )
           {
              $DLG_COLORE_368_FDX = "BCO"
              $DLG_descrizione_fdx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FDX,"colori_tutti.txt")
              $DLG_image_file_fdx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FDX,".bmp")
              $DLG_image_file_fdx      = SUBST_LABEL($DLG_image_file_fdx)
           }
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_fdx_laccato
        //Enable  = $DLG_enable_fdx_rd_laccato_368
         Enable = $DLG_enablefdx

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fdx_lucido  = 0
           $DLG_value_fdx_opaco   = 0
           $DLG_value_fdx_laccato = 1
        ]
      }
   }

   Frame FinituraFiancoSX
   {
      Caption = MSG(237)
      Hint = MSG(238)

      Placement
      {
         posx = 465
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_descrizione_fsx_var
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fsx_var
         Value   = $DLG_image_file_fsx
         Hint    = $DLG_descrizione_fsx_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $DLG_value_fsx_lucido
        //Enable  = $DLG_enable_fsx_rd_lucido_368
         Enable = $DLG_enablefsx

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fsx_lucido  = 1
           $DLG_value_fsx_opaco   = 0
           $DLG_value_fsx_laccato = 0

           //Massimiliano 05/05/17 - setto i default corretti
           $DLG_COLORE_368_FSX = "BCO"
           $DLG_descrizione_fsx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FSX,"colori_tutti.txt")
           $DLG_image_file_fsx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FSX,".bmp")
           $DLG_image_file_fsx      = SUBST_LABEL($DLG_image_file_fsx)
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(376)
        Hint    = MSG(376)
        Value   = $DLG_value_fsx_opaco
        //Enable  = $DLG_enable_fsx_rd_opaco_368
         Enable = $DLG_enablefsx

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fsx_lucido  = 0
           $DLG_value_fsx_opaco   = 1
           $DLG_value_fsx_laccato = 0

           //Massimiliano 05/05/17 - setto i default corretti
           if( $DLG_COLORE_368_FSX == "ME2" )
           {
              $DLG_COLORE_368_FSX = "BCO"
              $DLG_descrizione_fsx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FSX,"colori_tutti.txt")
              $DLG_image_file_fsx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FSX,".bmp")
              $DLG_image_file_fsx      = SUBST_LABEL($DLG_image_file_fsx)
           }
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_fsx_laccato
        //Enable  = $DLG_enable_fsx_rd_laccato_368
         Enable = $DLG_enablefsx

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fsx_lucido  = 0
           $DLG_value_fsx_opaco   = 0
           $DLG_value_fsx_laccato = 1
        ]
      }
   }

   Label Nota
   {
      Caption = $DLG_caption_scritta
      Hint    = $DLG_hint_scritta

     Font
     {
        size  = 7
        type  = 1
        color = 255
     }

      Placement
      {
         posx = 470
         posy = 220
         dimx = 300
         dimy = 20
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         // Eugenio 08.10.13 Anche la profondit  diventata editabile, ma solo per backoffice
         $DLG_profondita_368  = $DLG_value_profondita_368

         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_edit_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }


   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(241)
      Enable  = $DLG_enable_edit_alt_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   //Button btnProfondita
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = MSG(101)
   //   Enable  = $DLG_enable_edit_pro_368
   //
   //   Placement
   //   {
   //      posx = 135
   //      posy = 85
   //      dimx = 20
   //      dimy = 20
   //   }
   //
   //   OnClick
   //   [
   //     $R = CHIEDI(-1,"DLG_profondita_368")
   //     $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
   //     $DLG_caption_profondita_368 = $DLG_profondita_368
   //     $DLG_value_profondita_368   = $DLG_profondita_368
   //   ]
   //}

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_apertura_368

      Placement
      {
         posx = 135
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 15/09/17 - quando sono colonna angolare devo gestire in modo differente l'apertura
         if( VAR_VAL($DLG_idx_to_call,"TipoColonna")==9 )
         {
            $R = CHIEDI($DLG_idx_to_call,"VAR_Verso")
            $DLG_apertura_368 = VAR_VAL_STR($DLG_idx_to_call,"VAR_Verso")
         }
         else
         {
            $R = CHIEDI(-1,"DLG_apertura_368")
         }
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
         $DLG_caption_apertura_368 = $DLG_apertura_368
         if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"DX")==0)   { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"SX")==0)   { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"LAT")==0)  { $DLG_value_apertura_368 = "LAT" }
         if(STRCMP($DLG_apertura_368,"GOL")==0)  { $DLG_value_apertura_368 = "GOL" }
         if(STRCMP($DLG_apertura_368,"PEL")==0)  { $DLG_value_apertura_368 = "PEL" }
         if(STRCMP($DLG_apertura_368,"TGL")==0)  { $DLG_value_apertura_368 = "TGL" }
      ]
   }

   Button btnFinituraFrontali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [

        //if( $DLG_value_fro_lucido == 1 )
        //{
        //   $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
        //   $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        //   $DLG_COLORE_368_FRO = $DLG_COLORE_368_FRO
        //   GOSUB Get_Image_368CUC
        //}
        //else
        //{
        //   if( $DLG_value_fro_laccato == 1 | $DLG_value_fro_opaco == 1 )
        //   {
        //      $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
        //      $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        //      $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
        //      GOSUB Get_Image_368CUC
        //   }
        //   else
        //   {
        //      $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
        //      $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
        //      $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
        //      $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
        //      GOSUB Get_Image_368CUC_W
        //   }
        //}

        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)

        // Massimiliano 26/06/14 - Imposto il colore della seconda anta uguale a quello della prima
        //                         se non  specchio e se non  wildwood
        if( $DLG_enable_fro2==1 & ( STRCMP($DLG_COLORE_368_FRO,"ARG")!=0 | STRCMP($DLG_COLORE_368_FRO,"SZ1")!=0 | STRCMP($DLG_COLORE_368_FRO,"SZ2")!=0 | STRCMP($DLG_COLORE_368_FRO,"SZ3")!=0 ))
        {
           $DLG_COLORE_368_FRO2 = $DLG_COLORE_368_FRO
           $DLG_descrizione_fro2_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO2,"colori_tutti.txt")
           $DLG_image_file_fro2   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO2,".bmp")
           $DLG_image_file_fro2   = SUBST_LABEL($DLG_image_file_fro2)
        }
        else
        {
           $DLG_COLORE_368_FRO2 = "BCO"
           $DLG_descrizione_fro2_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO2,"colori_tutti.txt")
           $DLG_image_file_fro2   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO2,".bmp")
           $DLG_image_file_fro2   = SUBST_LABEL($DLG_image_file_fro2)
        }


      ]
   }

   Button btnFinituraFrontali2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(242)
      Enable  = $DLG_enable_fro2

      Placement
      {
         posx = 325
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [

        //if( $DLG_value_fro_lucido == 1 )
        //{
        //   $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
        //   $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        //   $DLG_COLORE_368_FRO = $DLG_COLORE_368_FRO
        //   GOSUB Get_Image_368CUC
        //}
        //else
        //{
        //   if( $DLG_value_fro_laccato == 1 | $DLG_value_fro_opaco == 1 )
        //   {
        //      $R = CHIEDI(-1,"DLG_COLORE_368_FRO")
        //      $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        //      $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_FRO
        //      GOSUB Get_Image_368CUC
        //   }
        //   else
        //   {
        //      $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
        //      $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W_FRO,"colori_tutti.txt")
        //      $DLG_COLORE_368_L_FRO = $DLG_COLORE_368_W_FRO
        //      $DLG_COLORE_368_FRO = $DLG_COLORE_368_W_FRO
        //      GOSUB Get_Image_368CUC_W
        //   }
        //}

        $R = CHIEDI(-1,"DLG_COLORE_368_FRO2")

        $DLG_descrizione_fro2_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO2,"colori_tutti.txt")
        $DLG_image_file_fro2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO2,".bmp")
        $DLG_image_file_fro2      = SUBST_LABEL($DLG_image_file_fro2)
      ]
   }

   Button btnFinituraFiancoDX
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(244)
      Enable = $DLG_enablefdx

      Placement
      {
         posx = 625
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FDX")

        $DLG_descrizione_fdx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FDX,"colori_tutti.txt")
        $DLG_image_file_fdx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FDX,".bmp")
        $DLG_image_file_fdx      = SUBST_LABEL($DLG_image_file_fdx)

      ]
   }

   Button btnFinituraFiancoSX
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(243)
      Enable = $DLG_enablefsx

      Placement
      {
         posx = 475
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FSX")

        $DLG_descrizione_fsx_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FSX,"colori_tutti.txt")
        $DLG_image_file_fsx      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FSX,".bmp")
        $DLG_image_file_fsx      = SUBST_LABEL($DLG_image_file_fsx)
      ]
   }

}


//Massimiliano 23/06/14 - dialog per colonne cucina 368 nuove
Dlg 368CUC_Fianco_Colonna_NEW
{
   Caption = MSG(344)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 300
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraFianchi
   {
      Caption = MSG(281)
      Hint = MSG(281)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_str_var
         Value   = $DLG_descrizione_str_var
         Hint    = $DLG_descrizione_str_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_str_var
         Value   = $DLG_image_file_str
         Hint    = $DLG_descrizione_str_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_fia_lucido
        Enable  = $DLG_enable_fia_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_fia_lucido     = 1
          $DLG_value_fia_opaco      = 0
          $DLG_value_fia_laccato    = 0
          $DLG_enable_fialac = 1
        ]
      }

      Radio RdOpaco
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_fia_opaco
        Enable  = $DLG_enable_fia_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_fia_lucido     = 0
          $DLG_value_fia_opaco      = 1
          $DLG_value_fia_laccato    = 0
          $DLG_enable_fialac = 1
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_fia_laccato
        Enable  = $DLG_enable_fia_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_fia_lucido     = 0
          $DLG_value_fia_opaco      = 0
          $DLG_value_fia_laccato    = 1
          $DLG_enable_fialac = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //rob_pec:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         // Eugenio 08.10.13 Anche la profondit  diventata editabile, ma solo per backoffice
         $DLG_profondita_368  = $DLG_value_profondita_368

         $OK=1
      ]
   }

   Button btnFinituraFianchi
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(282)
      //Enable = $DLG_enable_fialac

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368_STR")
         $DLG_descrizione_str_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_STR,"colori_tutti.txt")
         $DLG_image_file_str      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_STR,".bmp")
         $DLG_image_file_str      = SUBST_LABEL($DLG_image_file_str)
      ]
   }

}



Dlg 368CUC_Finitura
{
   Caption = MSG(358)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(235)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        posx = 60
        posy = 155
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368_L = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        $DLG_value_ww = 0

        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        posx = 60
        posy = 175
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }
        $DLG_value_ww = 0

        $DLG_value_opaco = 1
        $DLG_value_lucido = 0

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   //Massimiliano 21/05/14 - aggiunta colore ww anta
   Radio RdWildwood
   {
     Caption = MSG(899)
     Hint    = MSG(899)
     Value   = $DLG_value_ww
     Enable  = $DLG_enable_rd_ww_368

     Placement
     {
        posx = 60
        posy = 195
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_opaco==1 | $DLG_value_lucido==1 )
        {
           $DLG_COLORE_368_W = "SZ1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368_W
           $DLG_COLORE_368 = $DLG_COLORE_368_W
           GOSUB Get_Image_368
        }
        $DLG_value_ww = 1

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0

     ]
   }



   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 230
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //if($DLG_value_opaco==1)
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_O")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
         //   GOSUB Get_Image_368_O
         //   $DLG_COLORE_368   = $DLG_COLORE_368_O
         //   $DLG_COLORE_368_L = $DLG_COLORE_368_O
         //}
         //
         //if($DLG_value_lucido==1)
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_L")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
         //   GOSUB Get_Image_368_L
         //   $DLG_COLORE_368   = $DLG_COLORE_368_L
         //   $DLG_COLORE_368_O = $DLG_COLORE_368_L
         //}

        //Massimiliano 26/05/14 - nuovi controlli
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368   = $DLG_COLORE_368_L
           $DLG_COLORE_368_O = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        else
        {
           if( $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_O")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
              $DLG_COLORE_368   = $DLG_COLORE_368_O
              $DLG_COLORE_368_L = $DLG_COLORE_368_O
              GOSUB Get_Image_368_O
           }
           else
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        }

      ]
   }
}

Dlg 368CUC_Finitura_A
{
   Caption = MSG(359)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 330
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 210
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        posx = 60
        posy = 155
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368_L = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        $DLG_value_ww = 0
        $DLG_value_laccato = 0

        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        posx = 60
        posy = 175
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }
        $DLG_value_ww = 0
        $DLG_value_laccato = 0

        $DLG_value_opaco = 1
        $DLG_value_lucido = 0

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   //Massimiliano 21/05/14 - aggiunta colore ww anta
   Radio RdWildwood
   {
     Caption = MSG(899)
     Hint    = MSG(899)
     Value   = $DLG_value_ww
     Enable  = $DLG_enable_rd_ww_368

     Placement
     {
        posx = 60
        posy = 195
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_opaco==1 | $DLG_value_lucido==1 )
        {
           $DLG_COLORE_368_W = "SZ1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368_W
           $DLG_COLORE_368 = $DLG_COLORE_368_W
           GOSUB Get_Image_368
        }
        $DLG_value_ww = 1
        $DLG_value_laccato = 0

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0

     ]
   }

   Check chkElimina
   {
     Caption = MSG(23)
     Hint    = MSG(23)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 40
        posy = 230
        dimx = 120
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(360))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 250
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 250
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //if($DLG_value_lucido==1)
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_LA")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_LA,"colori_tutti.txt")
         //   $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368_LA,".bmp")
         //   $DLG_image_file   = SUBST_LABEL($DLG_image_file)
         //   $DLG_COLORE_368   = $DLG_COLORE_368_LA
         //   $DLG_COLORE_368_O = $DLG_COLORE_368_LA
         //}
         ////if($DLG_value_opaco==1)
         //else
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_O")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
         //   GOSUB Get_Image_368_O
         //   $DLG_COLORE_368   = $DLG_COLORE_368_O
         //   $DLG_COLORE_368_LA= $DLG_COLORE_368_O
         //}

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
         //else
         if($DLG_value_opaco==1 | $DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368 = $DLG_COLORE_368_W
         }
      ]
   }
}

Dlg NOW_FiancoVTX
{
   Caption = MSG(1470)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 330
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 210
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = 1

     Placement
     {
        posx = 60
        posy = 155
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = 1

     Placement
     {
        posx = 60
        posy = 175
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        $DLG_value_opaco = 1
        $DLG_value_lucido = 0
     ]

   }

   Check chkElimina
   {
     Caption = MSG(1469)
     Hint    = MSG(1469)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 40
        posy = 230
        dimx = 120
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 250
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 250
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [

         $R = CHIEDI(-1,"DLG_COLORE_368")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
         GOSUB Get_Image_368

         //if($DLG_value_lucido==1)
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_L")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
         //   GOSUB Get_Image_368_L
         //   $DLG_COLORE_368   = $DLG_COLORE_368_L
         //   $DLG_COLORE_368_O = $DLG_COLORE_368_L
         //}
         //else
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_O")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
         //   GOSUB Get_Image_368_O
         //   $DLG_COLORE_368   = $DLG_COLORE_368_O
         //   $DLG_COLORE_368_L = $DLG_COLORE_368_O
         //}
      ]
   }
}

//Massimiliano 02/07/14 - Dialog cassetto modulabile
Dlg 368CUC_FinituraCassetto_Modu
{
   Caption = MSG(392)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 800
      //dimy = 280
      dimy = 310
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         //posx = 10
         posx = 320
         posy = 10
         dimx = 150
         dimy = 230
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

   }

   Radio RdLucido
   {
     Caption = MSG(751)
     Hint    = MSG(751)
     Value   = $DLG_value_lucido
     Enable  = $DLG_enable_rd_lucido_368

     Placement
     {
        //posx = 60
        posx = 370
        posy = 155
        dimx = 80
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 26/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368_L = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        $DLG_value_ww = 0
        $DLG_value_laccato = 0

        $DLG_value_lucido = 1
        $DLG_value_opaco  = 0
        //GOSUB SETTA_PROF
        // 08/05/2018 - Emanuele - Modifico ATTUALE() con $DLG_idx_to_call perch da problemi nel trovare l'idx. Trova il valore -1
//        if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
//        if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
//        if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
        if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
        if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        $DLG_enable_maniglia = 1
        $DLG_enable_frofis   = 1

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdOpaco
   {
     Caption = MSG(752)
     Hint    = MSG(752)
     Value   = $DLG_value_opaco
     Enable  = $DLG_enable_rd_opaco_368

     Placement
     {
        //posx = 60
        posx = 370
        posy = 175
        dimx = 80
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }
        $DLG_value_ww = 0
        $DLG_value_laccato = 0

        $DLG_value_opaco = 1
        $DLG_value_lucido = 0
        //GOSUB SETTA_PROF
        // 08/05/2018 - Emanuele - Modifico ATTUALE() con $DLG_idx_to_call perch da problemi nel trovare l'idx. Trova il valore -1
//        if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
//        if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
//        if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
        if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
        if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
        $DLG_enable_maniglia = 1
        $DLG_enable_frofis   = 1

        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //$DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
        //$DLG_image_file      = SUBST_LABEL($DLG_image_file)
     ]

   }

   Radio RdLaccato
   {
     Caption = MSG(722)
     Hint    = MSG(722)
     Value   = $DLG_value_laccato
     Enable  = $DLG_enable_rd_laccato_368

     Placement
     {
        //posx = 60
        posx = 370
        posy = 195
        dimx = 80
        dimy = 20
     }

     OnClick
     [
        //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
        if($DLG_value_ww == 1)
        {
           $DLG_COLORE_368 = "BCO"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368CUC
        }
        $DLG_value_ww = 0

        $DLG_value_lucido  = 0
        $DLG_value_opaco   = 0
        $DLG_value_laccato = 1
        //GOSUB SETTA_PROF
        $DLG_enable_TipoStripes = 0

        // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
        $DLG_TipoStripes = "000"
        $DLG_value_TipoStripes = $DLG_TipoStripes
        $DLG_caption_TipoStripes = $DLG_TipoStripes
        $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
        $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
        //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))

        $DLG_enable_maniglia = 0
        $DLG_enable_frofis   = 0
        $DLG_frontale_fisso  = 0
     ]
   }

   //Massimiliano 21/05/14 - aggiunta colore ww anta
   Radio RdWildwood
   {
     Caption = MSG(899)
     Hint    = MSG(899)
     Value   = $DLG_value_ww
     Enable  = $DLG_enable_rd_ww_368

     Placement
     {
        //posx = 60
        posx = 370
        posy = 215
        dimx = 80
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_opaco==1 | $DLG_value_lucido==1 )
        {
           $DLG_COLORE_368_W = "SZ1"
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368_W
           $DLG_COLORE_368 = $DLG_COLORE_368_W
           GOSUB Get_Image_368
        }
        $DLG_value_ww = 1
        $DLG_value_laccato = 0

        $DLG_value_opaco = 0
        $DLG_value_lucido = 0
        //GOSUB SETTA_PROF
        $DLG_enable_TipoStripes = 0

        // Massimiliano 18/03/14 - modifica impostazione default Stripes quando anta tipo laccato
        $DLG_TipoStripes = "000"
        $DLG_value_TipoStripes = $DLG_TipoStripes
        $DLG_caption_TipoStripes = $DLG_TipoStripes
        $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
        $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)
        $DLG_enable_maniglia = 1
        $DLG_enable_frofis   = 1
        //DISPLAY2 ( STRCAT("valore=", $DLG_caption_TipoStripes ))

     ]
   }

   Frame Finitura2
   {
      Caption = MSG(284)

      Placement
      {
         posx = 470
         posy = 10
         dimx = 150
         dimy = 230
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }


      Radio RdLucido2
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido2
        Enable  = $DLG_enable_rd_lucido_368_2

        Placement
        {
           posx = 50
           posy = 155
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido2 = 1
           $DLG_value_opaco2  = 0
           //GOSUB SETTA_PROF
        // 08/05/2018 - Emanuele - Modifico ATTUALE() con $DLG_idx_to_call perch da problemi nel trovare l'idx. Trova il valore -1
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           $DLG_enable_maniglia = 1
           $DLG_enable_frofis   = 1
        ]

      }

      Radio RdOpaco2
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco2
        Enable  = $DLG_enable_rd_opaco_368_2

        Placement
        {
           posx = 50
           posy = 175
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco2 = 1
           $DLG_value_lucido2 = 0
           //GOSUB SETTA_PROF
        // 08/05/2018 - Emanuele - Modifico ATTUALE() con $DLG_idx_to_call perch da problemi nel trovare l'idx. Trova il valore -1
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           $DLG_enable_maniglia = 1
           $DLG_enable_frofis   = 1
        ]
      }
   }

   Frame Finitura3
   {
      Caption = MSG(285)

      Placement
      {
         posx = 620
         posy = 10
         dimx = 150
         dimy = 230
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         enable  = 0

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido3
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido3
        Enable  = $DLG_enable_rd_lucido_368_3

        Placement
        {
           posx = 50
           posy = 155
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido3 = 1
           $DLG_value_opaco3  = 0
           //GOSUB SETTA_PROF
        // 08/05/2018 - Emanuele - Modifico ATTUALE() con $DLG_idx_to_call perch da problemi nel trovare l'idx. Trova il valore -1
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           $DLG_enable_maniglia = 1
           $DLG_enable_frofis   = 1
        ]

      }

      Radio RdOpaco3
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco3
        Enable  = $DLG_enable_rd_opaco_368_3

        Placement
        {
           posx = 50
           posy = 175
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco3 = 1
           $DLG_value_lucido3 = 0
           //GOSUB SETTA_PROF
        // 08/05/2018 - Emanuele - Modifico ATTUALE() con $DLG_idx_to_call perch da problemi nel trovare l'idx. Trova il valore -1
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
//           if ( STRCMP( NOME(ATTUALE()),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL(ATTUALE(),"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_BaseLavs_A" ) == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 0 ) { $DLG_enable_TipoStripes = 1 }
           if ( STRCMP( NOME($DLG_idx_to_call),"368CUC_Base_A_Modu" ) == 0 & VAR_VAL($DLG_idx_to_call,"a_tipo_anta") == 3 ) { $DLG_enable_TipoStripes = 1 }
           $DLG_enable_maniglia = 1
           $DLG_enable_frofis   = 1
        ]
      }

   }

   Frame FrmApertura
   {
      Caption = ""
      Hint = ""
      Enable = 0

      Placement
      {
         //posx = 330
         posx = 170
         posy = 135
         dimx = 150
         dimy = 45
      }

      Edit EdtApertura
      {
         //attiva solo nel caso di contenitore con anta
         Caption = $DLG_caption_apertura_368
         Hint    = $DLG_hint_apertura_368
         Enable  = $DLG_enable_apertura_368
         Value   = $DLG_value_apertura_368
         Placement
         {
            posx = 70
            posy = 15
            dimx = 50
            dimy = 20
         }
         OnClick
         [
         ]
      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_enable_apertura_368
        Value   = MSG(104)

        Placement
        {
           posx = 10
           posy = 15
           dimx = 80
           dimy = 20
        }
      }
   }


   Check chkElimina
   {
     Caption = MSG(391)
     Hint    = MSG(391)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        //posx = 50
        posx = 20
        //posy = 220
        posy = 250
        dimx = 120
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(360))
        }
     ]

   }

   Frame FrmFrontFisso
   {
      //Caption = MSG(276)
      Hint = ""
      Enable = 1

      Placement
      {
         //posx = 170
         posx = 20
         posy = 15
         dimx = 150
         dimy = 40
      }

      Check chkManigliaFlapp
      {
        Caption = MSG(387)
        Hint    = MSG(387)
        Enable  = $DLG_enable_maniglia
        Value   = $DLG_maniglia

        Placement
        {
           posx = 10
           posy = 10
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_maniglia==1)  {  $DLG_maniglia=1  $DLG_enable_rd_laccato_368=0  }
           else                  {  $DLG_maniglia=0  $DLG_enable_rd_laccato_368=1  }
        ]
      }
   }

   Frame FrmAntaCass
   {
      Caption = MSG(390)
      Hint = ""
      Enable = 1

      Placement
      {
         //posx = 170
         posx = 20
         posy = 55
         dimx = 150
         //dimy = 120
         dimy = 145
      }

      Radio RdAnta
      {
        Caption = MSG(1537)
        Hint    = MSG(1537)
        Enable  = $DLG_enable_anta
        Value   = $DLG_anta

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_anta           = 1
           $DLG_ribalta        = 0
           $DLG_cestone        = 0
           $DLG_cassetto       = 0
           $DLG_cestone_riba   = 0
           $DLG_frontale_fisso = 0

           if( $DLG_value_laccato == 0 )  {  $DLG_enable_maniglia = 1  }
           if( $DLG_value_laccato == 1 )  {  $DLG_enable_maniglia = 0  }

           if( $DLG_anta == 1 )  {  $DLG_enable_apertura_368 = 1  $DLG_enable_TipoStripes = 0  }
           else                  {  $DLG_enable_apertura_368 = 0  $DLG_enable_TipoStripes = 1  }

           //Massimiliano 06/10/15 - gestione valori per riduzione
           $DLG_enable_rid610 = 0
           $DLG_enable_rid520 = 0
           $DLG_enable_rid    = 0
           $DLG_rid610 = 0
           $DLG_rid520 = 0
           $DLG_ridNO  = 1
        ]

      }

      Radio RdRibalta
      {
        Caption = MSG(388)
        Hint    = MSG(388)
        Enable  = $DLG_enable_ribalta
        Value   = $DLG_ribalta

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_anta       =0
           $DLG_ribalta    =1
           $DLG_cestone    =0
           $DLG_cassetto   =0
           $DLG_cestone_riba   = 0
           $DLG_frontale_fisso = 0

           if( $DLG_value_laccato == 0 )  {  $DLG_enable_maniglia = 1  }
           if( $DLG_value_laccato == 1 )  {  $DLG_enable_maniglia = 0  }

           //Massimiliano 06/10/15 - gestione valori per riduzione
           $DLG_enable_rid610 = 0
           $DLG_enable_rid520 = 0
           $DLG_enable_rid    = 0
           $DLG_rid610 = 0
           $DLG_rid520 = 0
           $DLG_ridNO  = 1

        ]

      }

      Radio RdCestone
      {
        Caption = MSG(389)
        Hint    = MSG(389)
        Enable  = $DLG_enable_cestone
        Value   = $DLG_cestone

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_anta           = 0
           $DLG_ribalta        = 0
           $DLG_cestone        = 1
           $DLG_cassetto       = 0
           $DLG_cestone_riba   = 0
           $DLG_frontale_fisso = 0

           if( $DLG_value_laccato == 0 )  {  $DLG_enable_maniglia = 1  }
           if( $DLG_value_laccato == 1 )  {  $DLG_enable_maniglia = 0  }

           if( $DLG_enable_TipoStripes == 0 )  {  $DLG_enable_TipoStripes = 1  }
           $DLG_enable_apertura_368 = 0

           //Massimiliano 06/10/15 - gestione valori per riduzione
           $DLG_enable_rid610 = 0
           $DLG_enable_rid    = 1
           $DLG_enable_rid520 = 1
           if( $DLG_prof == 670 )  {  $DLG_enable_rid610 = 1  }
        ]

      }

      Radio RdCassetto
      {
        Caption = MSG(1539)
        Hint    = MSG(1539)
        Enable  = $DLG_enable_cassetto
        Value   = $DLG_cassetto

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_anta           = 0
           $DLG_ribalta        = 0
           $DLG_cestone        = 0
           $DLG_cassetto       = 1
           $DLG_cestone_riba   = 0
           $DLG_frontale_fisso = 0

           if( $DLG_value_laccato == 0 )  {  $DLG_enable_maniglia = 1  }
           if( $DLG_value_laccato == 1 )  {  $DLG_enable_maniglia = 0  }

           if( $DLG_enable_TipoStripes == 0 )  {  $DLG_enable_TipoStripes = 1  }
           $DLG_enable_apertura_368 = 0

           //Massimiliano 06/10/15 - gestione valori per riduzione
           $DLG_enable_rid610 = 0
           $DLG_enable_rid520 = 1
           $DLG_enable_rid    = 1
           if( $DLG_prof == 670 )  {  $DLG_enable_rid610 = 1  }
        ]

      }

      Radio RdCestoneRiba
      {
        Caption = MSG(277)
        Hint    = MSG(277)
        Enable  = $DLG_enable_cesrib
        Value   = $DLG_cestone_riba

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_anta           = 0
           $DLG_ribalta        = 0
           $DLG_cestone        = 0
           $DLG_cassetto       = 0
           $DLG_cestone_riba   = 1
           $DLG_frontale_fisso = 0

           if( $DLG_value_laccato == 0 )  {  $DLG_enable_maniglia = 1  }
           if( $DLG_value_laccato == 1 )  {  $DLG_enable_maniglia = 0  }

           if( $DLG_enable_TipoStripes == 0 )  {  $DLG_enable_TipoStripes = 1  }
           $DLG_enable_apertura_368 = 0

           //Massimiliano 06/10/15 - gestione valori per riduzione
           $DLG_enable_rid610 = 0
           $DLG_enable_rid    = 0
           $DLG_enable_rid520 = 0
           $DLG_rid610 = 0
           $DLG_rid520 = 0
           $DLG_ridNO  = 1
        ]
      }

      Radio RdFrontFisso
      {
        Caption = MSG(276)
        Hint    = MSG(276)
        Enable  = $DLG_enable_frofis
        Value   = $DLG_frontale_fisso

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_anta           = 0
           $DLG_ribalta        = 0
           $DLG_cestone        = 0
           $DLG_cassetto       = 0
           $DLG_cestone_riba   = 0
           $DLG_frontale_fisso = 1

           if( $DLG_frontale_fisso == 1 )  {  $DLG_enable_maniglia = 0  }
           $DLG_enable_apertura_368 = 0

           //Massimiliano 06/10/15 - gestione valori per riduzione
           $DLG_enable_rid610 = 0
           $DLG_enable_rid520 = 0
           $DLG_enable_rid    = 0
           $DLG_rid610 = 0
           $DLG_rid520 = 0
           $DLG_ridNO  = 1
        ]

      }
   }

   //Massimiliano 05/10/15 - aggiungo gestione riduzione in profondit del cassetto o cestone
   Frame FrmRiduzione
   {
      Caption = MSG(2406)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 20
         //posy = 175
         posy = 200
         //dimx = 220
         dimx = 250
         dimy = 40
      }

      Radio RdRiduz610
      {
        Caption = "Rid. 610"
        Hint    = "Rid. 610"
        Enable  = $DLG_enable_rid610
        Value   = $DLG_rid610

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_rid520 = 0
           $DLG_rid610 = 1
           $DLG_ridNO  = 0
        ]

      }

      Radio RdRdiuz520
      {
        Caption = "Rid. 520"
        Hint    = "Rid. 520"
        Enable  = $DLG_enable_rid520
        Value   = $DLG_rid520

        Placement
        {
           //posx = 80
           posx = 90
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_rid520 = 1
           $DLG_rid610 = 0
           $DLG_ridNO  = 0
        ]

      }
      Radio RdRdiuzNO
      {
        Caption = "NO Rid."
        Hint    = "NO Rid."
        Enable  = $DLG_enable_rid
        Value   = $DLG_ridNO

        Placement
        {
           //posx = 150
           posx = 170
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_rid520 = 0
           $DLG_rid610 = 0
           $DLG_ridNO  = 1
        ]

      }

   }

   //rob_pec 06/11/09 aggiunto la scelta del tipo stripes
   Frame FrmTipoStripes
   {
      Caption = MSG(347)
      Hint = ""
      Enable  = $DLG_enable_TipoStripes

      Placement
      {
         //posx = 330
         posx = 170
         posy = 10
         dimx = 150
         dimy = 115
      }


      Image Im1
      {
         Caption = ""
         Value   = $DLG_image_file_TipoStripes
         Hint    = $DLG_descrizione_TipoStripes
         Enable  = $DLG_enable_TipoStripes

         Placement
         {
            posx =  45
            posy =  20
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         //posx = 410
         posx = 250
         //posy = 220
         posy = 240
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         //posx = 330
         posx = 170
         //posy = 220
         posy = 240
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(107)
      Enable  = $DLG_enable_apertura_368

      Placement
      {
         //posx = 455
         posx = 295
         posy = 150
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_apertura_368")
         $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_apertura_368)
         $DLG_caption_apertura_368 = $DLG_apertura_368
         if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
         if(STRCMP($DLG_apertura_368,"DX")==0)   { $DLG_value_apertura_368 = "DX" }
         if(STRCMP($DLG_apertura_368,"SX")==0)   { $DLG_value_apertura_368 = "SX" }
         //if(STRCMP($DLG_apertura_368,"LAT")==0)  { $DLG_value_apertura_368 = "LAT" }
         //if(STRCMP($DLG_apertura_368,"GOL")==0)  { $DLG_value_apertura_368 = "GOL" }
         //if(STRCMP($DLG_apertura_368,"PEL")==0)  { $DLG_value_apertura_368 = "PEL" }
         //if(STRCMP($DLG_apertura_368,"TGL")==0)  { $DLG_value_apertura_368 = "TGL" }
      ]
   }


   Button btnTipoStripes
   {
      Caption = MSG(354)
      Result  = 0
      Hint = MSG(355)
      Enable  = $DLG_enable_TipoStripes

      Placement
      {
         //posx = 340
         posx = 180
         posy = 95
         dimx = 130
         dimy = 20
      }

      OnClick
      [
            $R = CHIEDI(-1,"DLG_TipoStripes")
            $DLG_hint_TipoStripes = STRCAT(MSG(310)," = ",$DLG_TipoStripes)
            $DLG_caption_TipoStripes = $DLG_TipoStripes
            $DLG_value_TipoStripes = $DLG_TipoStripes

            $DLG_image_file_TipoStripes   = STRCAT("%install_dir%\tab_lago\tab_M4",CHR2STR(92),$DLG_value_TipoStripes,".jpg")
            $DLG_image_file_TipoStripes   = SUBST_LABEL($DLG_image_file_TipoStripes)

            if( $DLG_TipoStripes=="000" )
            {
               $DLG_enable_rd_opaco_368_2   = 0
               $DLG_enable_rd_lucido_368_2  = 0
               $DLG_btnfinitura2 = 0

               $DLG_enable_rd_opaco_368_3   = 0
               $DLG_enable_rd_lucido_368_3  = 0
               $DLG_btnfinitura3 = 0
            }
            else
            {
               $DLG_enable_rd_opaco_368_2   = 1
               $DLG_enable_rd_lucido_368_2  = 1
               $DLG_btnfinitura2 = 1

               if( $DLG_TipoStripes=="002" )
               {
                  $DLG_enable_rd_opaco_368_3   = 1
                  $DLG_enable_rd_lucido_368_3  = 1
                  $DLG_btnfinitura3 = 1
               }

               $DLG_enable_rd_laccato_368  = 0
               $DLG_enable_rd_ww_368  = 0
            }

      //Massimiliano 01/10/14 - se cestone e stripes e non  vetro allora imposto a vetro
      if( $DLG_cestone == 1 & $DLG_TipoStripes!="000" & $DLG_value_lucido == 0  & $DLG_value_opaco == 0 )  {  $DLG_value_lucido = 1  }


      ]
   }


   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 330
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //if($DLG_value_lucido==1)
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_LA")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_LA,"colori_tutti.txt")
         //   $DLG_image_file   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368_LA,".bmp")
         //   $DLG_image_file   = SUBST_LABEL($DLG_image_file)
         //   $DLG_COLORE_368   = $DLG_COLORE_368_LA
         //   $DLG_COLORE_368_O = $DLG_COLORE_368_LA
         //}
         ////if($DLG_value_opaco==1)
         //else
         //{
         //   $R = CHIEDI(-1,"DLG_COLORE_368_O")
         //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
         //   GOSUB Get_Image_368_O
         //   $DLG_COLORE_368   = $DLG_COLORE_368_O
         //   $DLG_COLORE_368_LA= $DLG_COLORE_368_O
         //}

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
         //else
         if($DLG_value_laccato==1 | $DLG_value_opaco==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368 = $DLG_COLORE_368_W
         }

      ]
   }

   Button btnFinitura2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_btnfinitura2

      Placement
      {
         posx = 480
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [

         if($DLG_value_lucido2==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L_2")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L_2,"colori_tutti.txt")
            GOSUB Get_Image_368_L_2
            $DLG_COLORE_368_2   = $DLG_COLORE_368_L_2
            $DLG_COLORE_368_O_2 = $DLG_COLORE_368_L_2
         }
         if($DLG_value_opaco2==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O_2")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O_2,"colori_tutti.txt")
            GOSUB Get_Image_368_O_2
            $DLG_COLORE_368_2   = $DLG_COLORE_368_O_2
            $DLG_COLORE_368_L_2 = $DLG_COLORE_368_O_2
         }

      ]
   }

   Button btnFinitura3
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_btnfinitura3

      Placement
      {
         posx = 630
         posy = 120
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_lucido3==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L_3")
            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L_3,"colori_tutti.txt")
            GOSUB Get_Image_368_L_3
            $DLG_COLORE_368_3   = $DLG_COLORE_368_L_3
            $DLG_COLORE_368_O_3 = $DLG_COLORE_368_L_3
         }
         if($DLG_value_opaco3==1 )
         {
            // 11/06/2019 - Emanuele - Modifico variabile da chiamare perch non  corretta
//            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $R = CHIEDI(-1,"DLG_COLORE_368_O_3")
            $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O_3,"colori_tutti.txt")
            GOSUB Get_Image_368_O_3
            $DLG_COLORE_368_3   = $DLG_COLORE_368_O_3
            $DLG_COLORE_368_L_3 = $DLG_COLORE_368_O_3
         }

      ]
   }

}


Dlg 368CUC_Top_A
{
   Caption = MSG(250)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 320
      dimy = 400
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTop
   {
      Caption = MSG(251)
      Hint = MSG(252)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 270
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_top_var
         Value   = $DLG_descrizione_top_var
         Hint    = $DLG_descrizione_top_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_top_var
         Value   = $DLG_image_file_top
         Hint    = $DLG_descrizione_top_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio Rdlaminato
      {
        Caption = MSG(362)
        Hint    = MSG(362)
        Value   = $DLG_value_top_laminato
        Enable  = $DLG_enable_top_rd_laminato_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato = 1
           $DLG_value_top_vetro_opaco  = 0
           $DLG_value_top_vetro_lucido = 0
           $DLG_value_top_quarzo_lucido = 0
           $DLG_value_top_quarzo_tatum  = 0
           $DLG_value_top_quarzo_spacco = 0
           //disabilito gli spessori
           $DLG_enable_top_rd_spess04 = 0
           $DLG_enable_top_rd_spess10 = 0
        ]
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(254)
        Hint    = MSG(254)
        Value   = $DLG_value_top_vetro_opaco
        Enable  = $DLG_enable_top_rd_vetro_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato = 0
           $DLG_value_top_vetro_opaco  = 1
           $DLG_value_top_vetro_lucido = 0
           $DLG_value_top_quarzo_lucido = 0
           $DLG_value_top_quarzo_tatum  = 0
           $DLG_value_top_quarzo_spacco = 0
           //abilito gli spessori
           $DLG_enable_top_rd_spess04 = 1
           $DLG_enable_top_rd_spess10 = 1
        ]
      }

      Radio RdVetroLucido
      {
        Caption = MSG(255)
        Hint    = MSG(255)
        Value   = $DLG_value_top_vetro_lucido
        Enable  = $DLG_enable_top_rd_vetro_lucido_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato = 0
           $DLG_value_top_vetro_opaco  = 0
           $DLG_value_top_vetro_lucido = 1
           $DLG_value_top_quarzo_lucido = 0
           $DLG_value_top_quarzo_tatum  = 0
           $DLG_value_top_quarzo_spacco = 0
           //abilito gli spessori
           $DLG_enable_top_rd_spess04 = 1
           $DLG_enable_top_rd_spess10 = 1
        ]
      }

      Radio RdQuarzoLucido
      {
        Caption = MSG(365)
        Hint    = MSG(365)
        Value   = $DLG_value_top_quarzo_lucido
        Enable  = $DLG_enable_top_rd_quarzo_lucido_368

        Placement
        {
           posx = 15
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato      = 0
           $DLG_value_top_vetro_opaco   = 0
           $DLG_value_top_vetro_lucido  = 0
           $DLG_value_top_quarzo_lucido = 1
           $DLG_value_top_quarzo_tatum  = 0
           $DLG_value_top_quarzo_spacco = 0
           //disabilito gli spessori
           $DLG_enable_top_rd_spess04 = 0
           $DLG_enable_top_rd_spess10 = 0
        ]
      }

      Radio RdQuarzoTatum
      {
        Caption = MSG(366)
        Hint    = MSG(366)
        Value   = $DLG_value_top_quarzo_tatum
        Enable  = $DLG_enable_top_rd_quarzo_tatum_368

        Placement
        {
           posx = 15
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato      = 0
           $DLG_value_top_vetro_opaco   = 0
           $DLG_value_top_vetro_lucido  = 0
           $DLG_value_top_quarzo_lucido = 0
           $DLG_value_top_quarzo_tatum  = 1
           $DLG_value_top_quarzo_spacco = 0
           //disabilito gli spessori
           $DLG_enable_top_rd_spess04 = 0
           $DLG_enable_top_rd_spess10 = 0
        ]
      }

      Radio RdQuarzoSpacco
      {
        Caption = MSG(367)
        Hint    = MSG(367)
        Value   = $DLG_value_top_quarzo_spacco
        Enable  = $DLG_enable_top_rd_quarzo_spacco_368

        Placement
        {
           posx = 15
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_laminato      = 0
           $DLG_value_top_vetro_opaco   = 0
           $DLG_value_top_vetro_lucido  = 0
           $DLG_value_top_quarzo_lucido = 0
           $DLG_value_top_quarzo_tatum  = 0
           $DLG_value_top_quarzo_spacco = 1
           //disabilito gli spessori
           $DLG_enable_top_rd_spess04 = 0
           $DLG_enable_top_rd_spess10 = 0
        ]
      }

   }

   Frame SpessoreTop
   {
      Caption = MSG(368)
      Hint = MSG(369)

      Placement
      {
         posx = 170
         posy = 140
         dimx = 125
         dimy = 70
      }

      Radio Spess10
      {
        Caption = "1 cm"
        Hint    = "1 cm"
        Value   = $DLG_value_top_spess10
        Enable  = $DLG_enable_top_rd_spess10

        Placement
        {
           posx = 15
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_spess10 = 1
           $DLG_value_top_spess04 = 0
        ]
      }

      Radio Spess04
      {
        Caption = "0,4 cm"
        Hint    = "0,4 cm"
        Value   = $DLG_value_top_spess04
        Enable  = $DLG_enable_top_rd_spess04

        Placement
        {
           posx = 15
           posy = 45
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_value_top_spess10 = 0
           $DLG_value_top_spess04 = 1
        ]
      }

   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 145
         posy = 310
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 60
         posy = 310
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(256)

      Placement
      {
         posx = 15
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_top_laminato==1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_lam.txt")
         }

         if($DLG_value_top_vetro_lucido == 1 | $DLG_value_top_vetro_opaco == 1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_vetro.txt")
         }
         if($DLG_value_top_quarzo_lucido==1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_quarzo_lucido.txt")
         }
         if($DLG_value_top_quarzo_tatum==1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_quarzo_tatum.txt")
         }
         if($DLG_value_top_quarzo_spacco==1)
         {
            VAR_SET_MENU (-1,"DLG_COLORE_368_TOP","colori_top_quarzo_spacco.txt")
         }

         $R = CHIEDI(-1,"DLG_COLORE_368_TOP")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_TOP,"coloritop.txt")
         if($DLG_value_top_laminato == 1 | $DLG_value_top_vetro_opaco == 1)
         {
            $DLG_image_file_top   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
         }
         if($DLG_value_top_vetro_lucido == 1)
         {
            $DLG_image_file_top   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
         }
         if($DLG_value_top_quarzo_lucido == 1)
         {
            $DLG_image_file_top   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\quarzo\lucido",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
         }
         if($DLG_value_top_quarzo_tatum == 1)
         {
            $DLG_image_file_top   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\quarzo\tatum",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
         }
         if($DLG_value_top_quarzo_spacco == 1)
         {
            $DLG_image_file_top   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\quarzo\spacco",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
         }
         //$DLG_image_file_top      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_TOP,".bmp")
         $DLG_image_file_top      = SUBST_LABEL($DLG_image_file_top)
      ]
   }
}

// Eugenio Dialog per
Dlg 368CUC_Cont_BaseTamp_A
{
   Caption = MSG(371)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(231)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 22
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 47
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 72
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 15
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  30
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 120
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           GOSUB SETTA_PROF
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 140
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco   = 1
           $DLG_value_lucido  = 0
           $DLG_value_laccato = 0
           GOSUB SETTA_PROF
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_fro_laccato
        Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco   = 0
           $DLG_value_lucido  = 0
           $DLG_value_laccato = 1
           GOSUB SETTA_PROF
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //Eugenio:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         // Eugenio 08.10.13 Anche la profondit  diventata editabile
         $DLG_profondita_368  = $DLG_value_profondita_368
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_edit_lar_368

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_edit_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_edit_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 105
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)
      ]
   }
}

Dlg Cont_Tamp_NOW
{
   Caption = MSG(1419)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 350
      dimy = 260
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(231)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 170
         dimy =  75
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 100
           posy =  20
           dimx =  40
           dimy =  20
        }

        OnClick
        [
        ]

      }

      //Edit EdtProfondita
      //{
      //  Caption = $DLG_caption_profondita_368
      //  Hint    = $DLG_hint_profondita_368
      //  Enable  = $DLG_enable_pro_368
      //  Value   = $DLG_value_profondita_368
      //
      //  Placement
      //  {
      //     posx = 100
      //     posy =  45
      //     dimx =  40
      //     dimy =  20
      //  }
      //
      //  OnClick
      //  [
      //  ]
      //
      //}

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(1420)
        Hint    = MSG(1420)
        Enable  = 1
        Value   = MSG(1420)

        Placement
        {
           posx =  10
           posy =  22
           dimx = 100
           dimy =  20
        }

//        OnClick
//        [
//        ]

      }

      //Label LblProfondita
      //{
      //  Caption = MSG(626)
      //  Hint    = MSG(86)
      //  Enable  = $DLG_enable_pro_368
      //  Value   = MSG(626)
      //
      //  Placement
      //  {
      //     posx =  10
      //     posy =  47
      //     dimx = 100
      //     dimy =  20
      //  }
      //
      //}
   }

   Frame Opzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx =  10
         posy =  90
         dimx = 170
         dimy = 105
      }

      Check chkFiloFianco
      {
        Caption = MSG(1422)
        Hint    = MSG(1422)
        Enable  = 1
        Value   = $DLG_FiloFianco

        Placement
        {
           posx = 20
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_FiloFianco==1)
           {
              $DLG_FiloFianco=1
              $DLG_en_apribile=0
              $DLG_enable_fro_rd_lucido_368 = 0
              $DLG_enable_fro_rd_opaco_368  = 0
           }
           else
           {
              $DLG_FiloFianco=0
              $DLG_en_apribile=1
              if( $DLG_enable_rd_uso_1 == 1)
              {
                 $DLG_enable_fro_rd_lucido_368 = 1
                 $DLG_enable_fro_rd_opaco_368  = 1
              }
           }
        ]
      }

      Check chkApribile
      {
        Caption = MSG(1423)
        Hint    = MSG(1423)
        Enable  = $DLG_en_apribile
        Value   = $DLG_Apribile

        Placement
        {
           posx = 20
           posy = 45
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_Apribile==1)
           {
              $DLG_Apribile=1
              if($DLG_enable_rd_uso_1==1)  { $DLG_en_apertura=1 }
              else                         { $DLG_en_apertura=0 }
              $DLG_enable_fro_rd_lucido_368 = 1
              $DLG_enable_fro_rd_opaco_368  = 1
           }
           else
           {
              $DLG_Apribile=0
              $DLG_en_apertura=0
              if($DLG_enable_rd_uso_1==0)
              {
                 // ER 12.11.14 se non sono agganciato e non sono apribile non posso essere in vetro (per ora)
                 $DLG_enable_fro_rd_lucido_368 = 0
                 $DLG_enable_fro_rd_opaco_368  = 0
                 $DLG_value_fro_lucido  = 0
                 $DLG_value_fro_opaco   = 0
                 $DLG_value_fro_laccato = 1
              }
           }
        ]
      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_368
        Hint    = $DLG_hint_apertura_368
        Enable  = $DLG_en_apertura
        Value   = $DLG_value_apertura_368

        Placement
        {
           posx = 90
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(105)
        Enable  = $DLG_en_apertura
        Value   = MSG(104)

        Placement
        {
           posx = 40
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 185
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_descrizione_fro_var
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx = 10
            posy = 15
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_fro_var
         Value   = $DLG_image_file_fro
         Hint    = $DLG_descrizione_fro_var

         Placement
         {
            posx =  45
            posy =  30
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_fro_lucido
        Enable  = $DLG_enable_fro_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 120
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 1
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_fro_opaco
        Enable  = $DLG_enable_fro_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 140
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 1
           $DLG_value_fro_laccato = 0
           //$DLG_value_opaco   = 1
           //$DLG_value_lucido  = 0
           //$DLG_value_laccato = 0
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_fro_laccato
        //Enable  = $DLG_enable_fro_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_fro_lucido  = 0
           $DLG_value_fro_opaco   = 0
           $DLG_value_fro_laccato = 1
        ]

      }


   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 270
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 185
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //Eugenio:aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         $OK=1
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Enable  = $DLG_en_apertura
      Hint = MSG(107)

      Placement
      {
         posx = 155
         posy = 165
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_368")
        if(STRCMP($DLG_apertura_368,"A01")==0)  { $DLG_value_apertura_368 = "DX" }
        if(STRCMP($DLG_apertura_368,"A02")==0)  { $DLG_value_apertura_368 = "SX" }
        $DLG_hint_apertura_368    = STRCAT(MSG(108)," = ",$DLG_value_apertura_368)
        $DLG_caption_apertura_368 = $DLG_apertura_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 195
         posy = 105
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_FRO")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_fro_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_FRO,"colori_tutti.txt")
        $DLG_image_file_fro      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_FRO,".bmp")
        $DLG_image_file_fro      = SUBST_LABEL($DLG_image_file_fro)
      ]
   }
}


//fc 100202
Dlg 368CUC_FiaV_A
{
   Caption = MSG(345)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 340
      dimy = 280
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(231)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 85
      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }
      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(428)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(430)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmBifaccialeSiNo
   {
      Caption = MSG(372)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 10
         posy = 145
         dimx = 150
         dimy = 45
      }

      Check checkBifac
      {
         Caption = MSG(373)
         Hint    = MSG(373)
         Value   = $DLG_value_bifac
         Enable  = $DLG_enable_bifac

         Placement
         {
            posx = 10
            posy = 20
            dimx = 120
            dimy = 15
         }
         OnClick
         [
            if( $DLG_value_bifac==1 )
            {
               $Ztemp =  ATOI($DLG_profondita_368) + 12
               VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_BifCUC368.txt")
            }
//            {  VAR_CREATE_STR(-1,"DLG_profondita_368","682",8,"profondita_BifCUC368.txt") }
            else
            {
               $Ztemp =  ATOI($DLG_profondita_368) - 12
               VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_CUC368.txt")
            }
            $DLG_value_profondita_368 = $DLG_profondita_368

         ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      Hint = MSG(374)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_value_lucido = 1
            $DLG_value_opaco  = 0
        ]
      }

      Radio RdOpaco
      {
        Caption = MSG(376)
        Hint    = MSG(376)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
        ]
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         $OK=1
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(356)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(357)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_profondita_368")
         $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
         $DLG_caption_profondita_368 = $DLG_profondita_368
         $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
      ]
   }
}


//fc 100202
//rob_pec 11/02/2011: aggiunto controllo profondit per isola
Dlg 368CUC_FiaV_ANew
{
   Caption = MSG(345)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 340
      dimy = 310
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Hint = MSG(231)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 85
      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(428)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(430)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmTipologia
   {
      Caption = MSG(377)
      Hint = ""
      Enable = 1

      Placement
      {
         posx = 10
         posy = 95
         dimx = 150
         dimy = 95
      }

      Radio checkNormale
      {
         Caption = MSG(363)
         Hint    = MSG(363)
         Value   = $DLG_value_normale
         Enable  = $DLG_enable_normale

         Placement
         {
            posx = 10
            posy = 30
            dimx = 120
            dimy = 15
         }

         OnClick
         [
            $DLG_value_normale = 1
            $DLG_value_bifac   = 0
            $DLG_value_isola   = 0
            $DLG_enable_pro_368  = 0

            if( $DLG_Rev == 0 )
            {
               $Ztemp =  ATOI($DLG_profondita_368) - 12
               VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_CUC368.txt")
               if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 ) { $Ztemp =  ATOI($DLG_profondita_368) - 12  VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_CUC368L.txt") }
               $DLG_value_profondita_368 = $DLG_profondita_368
            }
            else
            {
               $Ztemp =  $DLG_profondita - 12
               VAR_CREATE_NUM(-1,"DLG_profondita",$Ztemp,2,"Z_Fia_Nor")
               if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 ) { $Ztemp =  $DLG_profondita - 12  VAR_CREATE_NUM(-1,"DLG_profondita",$Ztemp,2,"Z_Fia_NorL") }
               $DLG_value_profondita_368 = STR($DLG_profondita)
            }
         ]
      }


      Radio checkBifac
      {
         Caption = MSG(373)
         Hint    = MSG(373)
         Value   = $DLG_value_bifac
         Enable  = $DLG_enable_bifac

         Placement
         {
            posx = 10
            posy = 50
            dimx = 120
            dimy = 15
         }
         OnClick
         [
            $DLG_value_normale = 0
            $DLG_value_bifac   = 1
            $DLG_value_isola   = 0
            $DLG_enable_pro_368  = 0

            if( $DLG_Rev == 0 )
            {
               $Ztemp =  ATOI($DLG_profondita_368) + 12
               VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_BifCUC368.txt")
               if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 & $DLG_value_ww == 0 ) { $Ztemp =  ATOI($DLG_profondita_368) + 13  VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_BifCUC368L.txt") }
               $DLG_value_profondita_368 = $DLG_profondita_368
            }
            else
            {
               $Ztemp =  $DLG_profondita + 12
               VAR_CREATE_NUM(-1,"DLG_profondita",$Ztemp,2,"ProfFiaBif")
               if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 & $DLG_value_ww == 0 ) { $Ztemp =  $DLG_profondita + 13  VAR_CREATE_NUM(-1,"DLG_profondita",$Ztemp,2,"ProfFiaBifL") }
               $DLG_value_profondita_368 = STR($DLG_profondita)
            }
         ]
      }

      Radio checkIsola
      {
         Caption = MSG(364)
         Hint    = MSG(364)
         Value   = $DLG_value_isola
         Enable  = $DLG_enable_isola

         Placement
         {
            posx = 10
            posy = 70
            dimx = 120
            dimy = 15
         }

         OnClick
         [
            $DLG_value_normale = 0
            $DLG_value_bifac   = 0
            $DLG_value_isola   = 1
            $DLG_enable_pro_368  = 1

            if( $DLG_Rev == 0 )
            {
               $Ztemp =  1080
               VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_IsCUC368.txt")
               if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 & $DLG_value_ww == 0 ) { $Ztemp =  1106  VAR_CREATE_STR(-1,"DLG_profondita_368",STR($Ztemp),8,"profondita_IsCUC368L.txt") }
               $DLG_value_profondita_368 = $DLG_profondita_368
            }
            else
            {
               $Ztemp =  1080
               VAR_CREATE_NUM(-1,"DLG_profondita",$Ztemp,3,"Z_Fia_Iso( 700-1380 )")
               if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 & $DLG_value_ww == 0 ) { $Ztemp =  1106  VAR_CREATE_NUM(-1,"DLG_profondita",$Ztemp,3,"Z_Fia_IsoL( 700-1406 )") }
               $DLG_value_profondita_368 = STR($DLG_profondita)
            }
         ]
      }

   }

   Check chkElimina
   {
     Caption = MSG(1469)
     Hint    = MSG(1469)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 15
        posy = 210
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

     ]

   }


   Frame Finitura
   {
      Caption = MSG(602)
      Hint = MSG(374)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 220
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 26/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_ww == 1)
           {
             $DLG_COLORE_368_L = "BCO"
             $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
             $DLG_COLORE_368 = $DLG_COLORE_368_L
             GOSUB Get_Image_368_L
            }
            $DLG_value_ww = 0
            $DLG_value_laccato  = 0

           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0

           // Eugenio 22.07.15 Non ha senso imporre l'altezza e nemmeno il menu sotto
           //$YBmp = 184
           //if( $DLG_value_ww != 1 )  {  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),8,"altezza9_CUC368.txt")    }
           //if( $DLG_value_ww != 1 )  {  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),$DLG_modo_var_h,"altezza9_CUC368.txt")    }
        ]
      }

      Radio RdOpaco
      {
        Caption = MSG(376)
        Hint    = MSG(376)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_ww == 1)
           {
             $DLG_COLORE_368 = "BCO"
             $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
             $DLG_COLORE_368_L = $DLG_COLORE_368
             GOSUB Get_Image_368
           }
           $DLG_value_ww = 0
           $DLG_value_laccato = 0

           $DLG_value_opaco = 1
           $DLG_value_lucido = 0

           // Eugenio 22.07.15 Non ha senso imporre l'altezza e nemmeno il menu sotto
           //$YBmp = 184
           //if( $DLG_value_ww != 1 )  {  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),8,"altezza9_CUC368.txt")    }
           //if( $DLG_value_ww != 1 )  {  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),$DLG_modo_var_h,"altezza9_CUC368.txt")    }
        ]
      }

      Radio RdLaccato
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           //Massimiliano 21/05/14 - aggiunta gestione colore ww anta
           if($DLG_value_ww == 1)
           {
              $DLG_COLORE_368 = "BCO"
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368CUC
           }
           $DLG_value_ww = 0
           $DLG_value_laccato = 1

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0

           // Eugenio 22.07.15 Non ha senso imporre l'altezza e nemmeno il menu sotto
           //$YBmp = 184
           //if( $DLG_value_ww != 1 )  {  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),8,"altezza9_CUC368.txt")    }
           //if( $DLG_value_ww != 1 )  {  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),$DLG_modo_var_h,"altezza9_CUC368.txt")    }

        ]
      }

      //Massimiliano 21/05/14 - aggiunta colore ww anta
      Radio RdWildwood
      {
         Caption = MSG(899)
         Hint    = MSG(899)
         Value   = $DLG_value_ww
         Enable  = $DLG_enable_rd_ww_368

         Placement
         {
            posx = 15
            posy = 195
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_value_opaco==1 | $DLG_value_lucido==1 | $DLG_value_laccato==1 )
            {
                $DLG_COLORE_368_W = "SZ1"
                $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
                $DLG_COLORE_368_L = $DLG_COLORE_368_W
                $DLG_COLORE_368 = $DLG_COLORE_368_W
                GOSUB Get_Image_368
            }
             $DLG_value_ww = 1
             $DLG_value_laccato = 0

             $DLG_value_opaco = 0
             $DLG_value_lucido = 0

            //$YBmp = 184
            //if( $DLG_value_opaco == 0 & $DLG_value_lucido == 0 & $DLG_value_laccato == 0 & $DLG_value_ww == 1 )
            //{  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),8,"altezza9_CUC368_2.txt")  }
            //{  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($DLG_YBmp),$DLG_modo_var_h,"altezza9_CUC368_2.txt")    }
            //else
            //{  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($YBmp),8,"altezza9_CUC368.txt")    }
            //{  VAR_CREATE_STR(-1,"DLG_altezza_368",STR($DLG_YBmp),$DLG_modo_var_h,"altezza9_CUC368.txt")    }

            //$DLG_value_altezza_368 = $DLG_altezza_368
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 240
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 240
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $DLG_larghezza_368   = $DLG_value_larghezza_368
         $OK=1
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(356)
      Enable  = $DLG_enable_alt_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        //$R = CHIEDI(-1,"DLG_altezza_368")
        //$DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        //$DLG_caption_altezza_368 = $DLG_altezza_368
        //$DLG_value_altezza_368   = $DLG_altezza_368

         //Massimiliano 21/12/2017  - cambio gestione quando sono m4 o riv
         if( VAR_EXIST($DLG_value_cancella_idx,"YProf") == 0 )
         {
            $R = CHIEDI(-1,"DLG_altezza_368")
            $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
            $DLG_caption_altezza_368 = $DLG_altezza_368
            $DLG_value_altezza_368   = $DLG_altezza_368
         }
         else
         {
            $R = CHIEDI(-1,"DLG_altezza")
            $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
            $DLG_caption_altezza_368 = STR($DLG_altezza)
            $DLG_value_altezza_368   = STR($DLG_altezza)
         }
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(357)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 09/10/15 - cambio metodo di gestione a seconda della revisione
         if( $DLG_Rev == 0 )
         {
            $R = CHIEDI(-1,"DLG_profondita_368")
            $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
            $DLG_caption_profondita_368 = $DLG_profondita_368
            $DLG_value_profondita_368   = $DLG_profondita_368
         }
         else
         {
            $R = CHIEDI(-1,"DLG_profondita")
            $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
            $DLG_caption_profondita_368 = STR($DLG_profondita)
            $DLG_value_profondita_368   = STR($DLG_profondita)
         }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }
         //else
         if($DLG_value_opaco==1 | $DLG_value_laccato==1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }
         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
            $DLG_COLORE_368 = $DLG_COLORE_368_W
         }


        //if( $DLG_value_lucido == 1 )
        //{
        //   $R = CHIEDI(-1,"DLG_COLORE_368")
        //   $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //   $DLG_COLORE_368 = $DLG_COLORE_368
        //   GOSUB Get_Image_368CUC
        //}
        //else
        //{
        //   if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
        //   {
        //      $R = CHIEDI(-1,"DLG_COLORE_368")
        //      $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        //      $DLG_COLORE_368_L = $DLG_COLORE_368
        //      GOSUB Get_Image_368CUC
        //   }
        //   else
        //   {
        //      $R = CHIEDI(-1,"DLG_COLORE_368_W")
        //      $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
        //      $DLG_COLORE_368_L = $DLG_COLORE_368_W
        //      $DLG_COLORE_368 = $DLG_COLORE_368_W
        //      GOSUB Get_Image_368CUC_W
        //   }

      ]
   }
}


Dlg 368CUC_Sch_A
{
   Caption = MSG(258)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 400
      dimy = 380
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)
      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 150
      }

      Edit EdtAltezza
      {
        //semre attivo
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 60
           dimx = 50
           dimy = 20
        }
      }

      Label LblAltezza
      {
        //sempre attivo
        Caption = MSG(629)
        Hint    = MSG(259)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 80
           dimy = 20
        }
      }
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(260)

      Placement
      {
         posx = 135
         posy = 70
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza_368 = STR($DLG_altezza)
        $DLG_value_altezza_368   = STR($DLG_altezza)
      ]
   }

   Frame FrmGuarnizione
   {
      Caption = MSG(351)
      Placement
      {
         posx = 10
         posy = 170
         dimx = 150
         dimy = 105
      }

      Check EdtPresenza
      {
        Caption = MSG(352)
        Hint    = MSG(353)
        Enable  = 1
        Value   = $DLG_value_sch_guarnizione

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }
      }
   }

   Frame FinituraSch
   {
      Caption = MSG(261)
      Hint = MSG(204)

      Placement
      {
         posx = 175
         posy = 10
         dimx = 200
         dimy = 305
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 180
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio Rdlaminato
      {
        Caption = MSG(262)
        Hint    = MSG(262)
        Value   = $DLG_value_sch_laminato
        Enable  = $DLG_enable_sch_rd_laminato_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato = 1
           $DLG_value_sch_vetro_opaco  = 0
           $DLG_value_sch_vetro_lucido = 0
           $DLG_value_sch_quarzo_lucido = 0
           $DLG_value_sch_quarzo_tatum  = 0
           $DLG_value_sch_quarzo_spacco = 0
           $DLG_value_sch_steel         = 0
        ]
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(263)
        Hint    = MSG(263)
        Value   = $DLG_value_sch_vetro_opaco
        //Enable  = 0
        Enable  = $DLG_enable_sch_rd_vetro_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato = 0
           $DLG_value_sch_vetro_opaco  = 1
           $DLG_value_sch_vetro_lucido = 0
           $DLG_value_sch_quarzo_lucido = 0
           $DLG_value_sch_quarzo_tatum  = 0
           $DLG_value_sch_quarzo_spacco = 0
           $DLG_value_sch_steel         = 0
        ]
      }

      Radio RdVetroLucido
      {
        Caption = MSG(264)
        Hint    = MSG(264)
        Value   = $DLG_value_sch_vetro_lucido
        Enable  = $DLG_enable_sch_rd_vetro_lucido_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato = 0
           $DLG_value_sch_vetro_opaco  = 0
           $DLG_value_sch_vetro_lucido = 1
           $DLG_value_sch_quarzo_lucido = 0
           $DLG_value_sch_quarzo_tatum  = 0
           $DLG_value_sch_quarzo_spacco = 0
           $DLG_value_sch_steel         = 0
        ]
      }

      Radio RdQuarzoLucido
      {
        Caption = MSG(348)
        Hint    = MSG(348)
        Value   = $DLG_value_sch_quarzo_lucido
        Enable  = $DLG_enable_sch_rd_quarzo_lucido_368

        Placement
        {
           posx = 15
           posy = 195
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato      = 0
           $DLG_value_sch_vetro_opaco   = 0
           $DLG_value_sch_vetro_lucido  = 0
           $DLG_value_sch_quarzo_lucido = 1
           $DLG_value_sch_quarzo_tatum  = 0
           $DLG_value_sch_quarzo_spacco = 0
           $DLG_value_sch_steel         = 0
        ]
      }

      Radio RdQuarzoTatum
      {
        Caption = MSG(349)
        Hint    = MSG(349)
        Value   = $DLG_value_sch_quarzo_tatum
        Enable  = $DLG_enable_sch_rd_quarzo_tatum_368

        Placement
        {
           posx = 15
           posy = 215
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato      = 0
           $DLG_value_sch_vetro_opaco   = 0
           $DLG_value_sch_vetro_lucido  = 0
           $DLG_value_sch_quarzo_lucido = 0
           $DLG_value_sch_quarzo_tatum  = 1
           $DLG_value_sch_quarzo_spacco = 0
           $DLG_value_sch_steel         = 0
        ]
      }

      Radio RdQuarzoSpacco
      {
        Caption = MSG(350)
        Hint    = MSG(350)
        Value   = $DLG_value_sch_quarzo_spacco
        Enable  = $DLG_enable_sch_rd_quarzo_spacco_368

        Placement
        {
           posx = 15
           posy = 235
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato      = 0
           $DLG_value_sch_vetro_opaco   = 0
           $DLG_value_sch_vetro_lucido  = 0
           $DLG_value_sch_quarzo_lucido = 0
           $DLG_value_sch_quarzo_tatum  = 0
           $DLG_value_sch_quarzo_spacco = 1
           $DLG_value_sch_steel         = 0
        ]
      }
      //Massimiliano 25/02/17 - aggiungo finitura Steel
      Radio RdSteel
      {
        Caption = MSG(2542)
        Hint    = MSG(2542)
        Value   = $DLG_value_sch_steel
        Enable  = $DLG_enable_sch_rd_steel_368

        Placement
        {
           posx = 15
           posy = 255
           dimx = 180
           dimy = 20
        }

        OnClick
        [
           $DLG_value_sch_laminato      = 0
           $DLG_value_sch_vetro_opaco   = 0
           $DLG_value_sch_vetro_lucido  = 0
           $DLG_value_sch_quarzo_lucido = 0
           $DLG_value_sch_quarzo_tatum  = 0
           $DLG_value_sch_quarzo_spacco = 0
           $DLG_value_sch_steel         = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 275
         posy = 320
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 190
         posy = 320
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         //rob_pec 06/07/2010: aggiungo questa valorizzazione per permettere
         //di inserire una misura non a menu nella dialog (fuori misura)
         $DLG_altezza_368   = $DLG_value_altezza_368
         $OK=1
      ]
   }

   Button btnFinituraSchp
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(213)

      Placement
      {
         posx = 185
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_sch_laminato==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_lam.txt") }

         // Eugenio 08.05.12 Lo schienale pu esser specchio..
         //if($DLG_value_sch_vetro_lucido == 1 | $DLG_value_sch_vetro_opaco == 1)
         //   {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_vetro.txt")  }
         if($DLG_value_sch_vetro_lucido==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_schienali_vetro.txt")  }
         if($DLG_value_sch_vetro_opaco==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_vetro.txt")  }

         if($DLG_value_sch_quarzo_lucido==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_quarzo_lucido.txt")   }
         if($DLG_value_sch_quarzo_tatum==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_quarzo_tatum.txt")    }
         if($DLG_value_sch_quarzo_spacco==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_quarzo_spacco.txt")   }
         //Massimiliano 25/02/17 - finitura steel
         if($DLG_value_sch_steel==1)
            {  VAR_SET_MENU (-1,"DLG_COLORE_368_SCH","colori_top_steel.txt")   }

         $R = CHIEDI(-1,"DLG_COLORE_368_SCH")

         // Deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCH,"coloritop.txt")
         if($DLG_value_sch_laminato==1 | $DLG_value_sch_vetro_opaco==1)
            {  $DLG_image_file_sch = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")          }
         if($DLG_value_sch_vetro_lucido == 1)
            {  $DLG_image_file_sch = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")         }

         if($DLG_value_sch_quarzo_lucido==1)
            {  $DLG_image_file_sch = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\quarzo\lucido",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")  }
         if($DLG_value_sch_quarzo_tatum==1)
            {  $DLG_image_file_sch = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\quarzo\tatum",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")   }
         if($DLG_value_sch_quarzo_spacco==1)
            {  $DLG_image_file_sch = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\quarzo\spacco",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")  }
         //Massimiliano 25/02/17 - finitura steel
         if($DLG_value_sch_steel==1)
            {  $DLG_image_file_sch = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu",CHR2STR(92),$DLG_COLORE_368_SCH,".bmp")  }

         $DLG_image_file_sch = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

Dlg 368CUC_Cont_Ang
{
   Caption = MSG(370)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 275
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 50
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 75
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }

      }

   }


   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdVetro
      {
        Caption = MSG(719)
        Hint    = MSG(719)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 1
           $DLG_value_laccato = 0
           GOSUB SETTA_LARGH
           GOSUB SETTA_PROF
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_laccato = 1
           $DLG_value_lucido  = 0
           GOSUB SETTA_LARGH
           GOSUB SETTA_PROF
        ]

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
        GOSUB Get_Image_368
      ]
   }
}


//{ Pravato 10-dic-09
Dlg MP_PiantaProspetti
{
   Caption = $wk_captionDlg
   Placement
   {
      posx = 10
      posy = 10
      dimx = 425
      dimy = 520
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Button OK
   {
      Caption = $wk_captionOk
      Result  = 1  // ModalOk
      Default = 1
      Placement
      {
         posx = 50
         posy = 460
         dimx = 60
         dimy = 25
      }
   }

   Button Annulla
   {
      Caption = $wk_captionAnnulla
      Result  = 2  // Modalannulla
      Placement
      {
         posx = 130
         posy = 460
         dimx = 60
         dimy = 25
      }
   }
        //{  CARLO 29.11.2010 per gestione stampa ISOMETRICA da DIALOG
        Frame Isometrie
        {
                //Caption = "ISO"
                Caption = $msg_896
                Placement
                {
                        posx = 10
                        posy = 15
                        dimx = 100
                        dimy = 100
                }

                Radio IsoNessuno
                {
                        //Caption = "Solo Fronte"
                        Caption = $msg_899
                        Value   = 0
                        Placement
                        {
                                posx = 10
                                posy = 15
                                dimx = 100
                                dimy = 20
                        }
                }

                Radio IsoFronteRetro
                {
                        //Caption = "Fronte - Retro"
                        Caption = $msg_897
                        Value   = $MP_ISOFronteRetro
                        Placement
                        {
                                posx = 10
                                posy = 35
                                dimx = 100
                                dimy = 20
                        }
                }
                Radio IsoFronte
                {
                        //Caption = "Solo Fronte"
                        Caption = $msg_898
                        Value   = $MP_ISOFronte
                        Placement
                        {
                                posx = 10
                                posy = 55
                                dimx = 100
                                dimy = 20
                        }
                }
                                // CARLO 04.01.2011
                                Check ComeVideo
                                {
                                                //  Caption = "Come Video"
                                                Caption = $msg_895
                                                Value   = $MP_ComeVideo
                                                Placement
                                                {
                                                                posx = 10
                                                                posy = 75
                                                                dimx = 100
                                                                dimy = 20
                                                }
                                }

        }
        //}  CARLO 29.11.2010

        //{  CARLO 20.12.2010 per gestione stampa FIANCHI VETRO da DIALOG
        Frame FianchiVetro
        {
            //Caption = "Fianchi Vetro"
            Caption = $msg_900
            Placement
            {
            posx = 10
            posy = 115
            dimx = 100
            dimy = 100
            }

             Radio FiaVetNess
             {
               //Caption = "Nessuno"
               Caption = $msg_901
               Value   = 0
               Placement
               {
                  posx = 10
                  posy = 15
                  dimx = 100
                  dimy = 20
               }
             }

             Radio FiaVet
             {
               //Caption = "Fianchi Vetro"
               Caption = $msg_900
               Value   = $MP_FianchiVetro
               Placement
               {
                  posx = 10
                  posy = 35
                  dimx = 100
                  dimy = 20
               }
             }
        }
        //}  CARLO 20.12.2010


   Frame MuriPianta
   {
//      Caption = "Ambientazione"
      Caption = $msg_852
      Placement
      {
         posx = 115
         posy = 15
         dimx = 300
         dimy = 200
      }


          Check MuriPianta
          {
//         Caption = "Pianta"
                 Caption = $msg_888
                 Value   = $MuriPianta
                 Placement
                 {
                        posx = 10
                        posy = 15
                        dimx = 100
                        dimy = 20
                 }
          }

      Check Prospetti
      {
//         Caption = "Prospetti con frontali"
         Caption = $wk_captionFrame9
         Value = $Prospetti
//         Enable  = $DlgProspettiEnable
         Placement
         {
            posx = 140
            posy = 15
            dimx = 130
            dimy = 20
         }
      }

      Check Prospetti
      {
//         Caption = "Prospetti senza frontali"
         Caption = $wk_captionFrame91
         Value = $Prospetti1
//         Enable  = $DlgProspettiEnable
         Placement
         {
            posx = 140
            posy = 35
            dimx = 130
            dimy = 20
         }
      }

      Radio Totale
      {
//         Caption = "1 pag - Totale"
         Caption = $msg_853
         Value = $MP_Pr_Totale
         Placement
         {
            posx = 10
            posy = 35
            dimx = 110
            dimy = 20
         }
      }

      Radio PrBasiPensili
      {
//         Caption = "2 pag - Basi e Pensili"
         Caption = $msg_854
         Value = $MP_Pr_BasiPensili
         Placement
         {
            posx = 10
            posy = 55
            dimx = 150
            dimy = 20
         }
      }

      Radio PrBasiPensiliMuri
      {
//         Caption = "3 pag - Basi e Pensili e Muri"
         Caption = $msg_855
         Value = $MP_Pr_BPM
         Placement
         {
            posx = 10
            posy = 75
            dimx = 150
            dimy = 20
         }
      }

//{ Pravato 16-gen-09
      Check PiantaColori
      {
//         Caption = "A Colori"
         Caption = $msg_890
         Value   = $MP_PiantaColori
         Placement
         {
            posx = 10
            posy = 95
            dimx = 100
            dimy = 20
         }
      }

//Pravato 9-lug-2010
      Check CentroStanza
      {
//         Caption = "Centro Stanza"
         Caption = $msg_892
         Value = $MP_CentroStanza
         Placement
         {
            posx = 140
            posy = 95
            dimx = 130
            dimy = 20
         }
      }

      Check ProspettiColori
      {
//         Caption = "A Colori"
         Caption = $msg_890
         Value = $MP_ProspettiColori
         Placement
         {
            posx = 140
            posy = 115
            dimx = 70
            dimy = 20
         }
      }

      Check ConAperture
      {
//         Caption = "Con Aperture"
         Caption = $msg_891
         Value = $MP_Aperture
         Placement
         {
            posx = 10
            posy = 115
            dimx = 80
            dimy = 20
         }
      }
//} Pravato 16-gen-09

      Radio Manuale
      {
//         Caption = "1 pag - Personalizzata"
         Caption = $msg_856
         Value = $MP_Pr_Manuale
         Placement
         {
            posx = 40
            posy = 145
            dimx = 150
            dimy = 20
         }
      }
      Button OpzioniPersonali
      {
//         Caption = "Imposta"
         Caption = $msg_857
         Result = 1
         Default = 1
         Placement
         {
            posx = 80
            posy = 165
            dimx = 60
            dimy = 25
         }
         OnClick
         [
            $MP_Pr_ManualeImposta=1
         ]
      }
   }

   Frame MuriPiantaScala
   {
//      Caption = "Scala"
      Caption = $msg_879
      Placement
      {
         posx = 10
         posy = 230
         dimx = 200
         dimy = 100
      }

      Radio MPAdattata
      {
//         Caption = "Adattata"
         Caption = $msg_881
         Value = $MP_Sc_Adattata
         Placement
         {
            posx = 20
            posy = 20
            dimx = 150
            dimy = 20
         }
      }

      Radio MPStandard
      {
//         Caption = "Standard"
         Caption = $msg_880
         Value = $MP_Sc_Standard
         Placement
         {
            posx = 20
            posy = 40
            dimx = 150
            dimy = 20
         }
      }

      Radio MPPersonalizzata
      {
//         Caption = "Personalizzata"
         Caption = $msg_882
         Value = $MP_Sc_Personalizzata
         Placement
         {
            posx = 20
            posy = 60
            dimx = 150
            dimy = 20
         }
      }

      Button ScManualeImposta
      {
//         Caption = "Imposta"
         Caption = $msg_857
         Result = 1
         Default = 1
         Placement
         {
            posx = 120
            posy = 60
            dimx = 60
            dimy = 25
         }
         OnClick
         [
            $MP_Sc_ManualeImposta=1
         ]
      }
   }
   Frame Lista3
   {
//      Caption = "Orientamento"
      Caption = $msg_875
      Placement
      {
         posx = 10
         posy = 345
         dimx = 115
         dimy = 100
      }

      Radio Orizz
      {
//         Caption = "Orizzontale"
         Caption = $msg_876
         Value = $MP_Orizzontale
         Placement
         {
            posx = 20
            posy = 40
            dimx = 90
            dimy = 20
         }
      }

      Radio Vert
      {
//         Caption = "Verticale"
         Caption = $msg_877
         Value = $MP_Verticale
         Placement
         {
            posx = 20
            posy = 60
            dimx = 90
            dimy = 20
         }
      }

      Radio Adatt
      {
//         Caption = "Adattato"
         Caption = $msg_878
         Value = $MP_Adattato
         Placement
         {
            posx = 20
            posy = 20
            dimx = 90
            dimy = 20
         }
      }
   }

   Frame Lista4
   {
//      Caption = "Dimensione"
      Caption = $msg_885
      Placement
      {
         posx = 135
         posy = 345
         dimx = 75
         dimy = 100
      }

      Radio MPA4
      {
         Caption = "A4"
//         Value = $MP_A4
         Value = 1
         Enable  = 1
         Placement
         {
            posx = 20
            posy = 20
            dimx = 40
            dimy = 20
         }
      }

      Radio MPA3
      {
         Caption = "A3"
//         Value = $MP_A3
         Value = 0
         Enable  = 1
         Placement
         {
            posx = 20
            posy = 40
            dimx = 40
            dimy = 20
         }
      }
   }
}

Dlg MP_Opzioni
{
//   Caption = "Personalizzazione della stampa"
   Caption = $msg_863
   Placement
   {
      posx = 100
      posy = 100
      dimx = 520
      dimy = 430
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Lista
   {
//      Caption = "Elementi a parete"
      Caption = $msg_864
      Placement
      {
         posx = 20
         posy = 15
         dimx = 250
         dimy = 300
      }

      Label Txt01
      {
//         Caption = "Vedi Elemento"
         Caption = $msg_865
         Placement
         {
            posx = 85
            posy = 17
            dimx = 80
            dimy = 25
         }
      }

      Label Txt02
      {
//         Caption = "Vedi Quota"
         Caption = $msg_866
         Placement
         {
            posx = 180
            posy = 17
            dimx = 60
            dimy = 25
         }
      }

      Label Pareti
      {
//         Caption = "Pareti"
         Caption = $msg_867
         Placement
         {
            posx = 10
            posy = 35
            dimx = 100
            dimy = 25
         }
      }

      Label Impianti
      {
//         Caption = "Impianti"
         Caption = $msg_670
         Placement
         {
            posx = 10
            posy = 65
            dimx = 100
            dimy = 25
         }
      }

      Label PorteEFinestre
      {
//         Caption = "Porte e Finestre"
         Caption = $msg_868
         Placement
         {
            posx = 10
            posy = 95
            dimx = 100
            dimy = 25
         }
      }

      Label Pensili
      {
//         Caption = "Pensili"
         Caption = $msg_696
         Placement
         {
            posx = 10
            posy = 125
            dimx = 100
            dimy = 25
         }
      }

      Label BasiEColonne
      {
//         Caption = "Basi e Colonne"
         Caption = $msg_869
         Placement
         {
            posx = 10
            posy = 155
            dimx = 100
            dimy = 25
         }
      }

      Label Piani
      {
//         Caption = "Piani"
         Caption = $msg_698
         Placement
         {
            posx = 10
            posy = 185
            dimx = 100
            dimy = 25
         }
      }

      Label Pilastri
      {
//         Caption = "Pilastri"
         Caption = $msg_870
         Placement
         {
            posx = 10
            posy = 215
            dimx = 100
            dimy = 25
         }
      }

      Label MensoleCornici
      {
//         Caption = "Mensole e Cornici"
         Caption = $msg_871
         Placement
         {
            posx = 10
            posy = 245
            dimx = 100
            dimy = 25
         }
      }

//      Check MP_VD_Muri
//      {
//         Caption = ""
//         Value   = $MP_VD_Muri
//         Placement
//         {
//            posx = 110
//            posy = 35
//            dimx = 20
//            dimy = 20
//         }
//         OnClick
//         [
//            if ( $MP_VD_Muri ) { $MP_QT_MuriEnable=1 }
//            else               { $MP_QT_MuriEnable=0 }
//         ]
//      }

      Check MP_QT_Muri
      {
         Caption = ""
         Value   = $MP_QT_Muri
         Enable  = $MP_QT_MuriEnable
         Placement
         {
            posx = 190
            posy = 35
            dimx = 20
            dimy = 20
         }
      }

      Check MP_QT_Impianti
      {
         Caption = ""
         Value   = $MP_QT_Impianti
         Placement
         {
            posx = 190
            posy = 65
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_PorteFinestre
      {
         Caption = ""
         Value   = $MP_VD_PorteFinestre
         Placement
         {
            posx = 110
            posy = 95
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            if ( $MP_VD_PorteFinestre ) { $MP_QT_PorteFinestreEnable=1 }
            else                        { $MP_QT_PorteFinestreEnable=0 }
         ]
      }

      Check MP_QT_PorteFinestre
      {
         Caption = ""
         Value   = $MP_QT_PorteFinestre
         Enable  = $MP_QT_PorteFinestreEnable
         Placement
         {
            posx = 190
            posy = 95
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_Pensili
      {
         Caption = ""
         Value   = $MP_VD_Pensili
         Placement
         {
            posx = 110
            posy = 125
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            if ( $MP_VD_Pensili ) { $MP_QT_PensiliEnable=1 }
            else                  { $MP_QT_PensiliEnable=0 }
         ]
      }

      Check MP_QT_Pensili
      {
         Caption = ""
         Value   = $MP_QT_Pensili
         Enable  = $MP_QT_PensiliEnable
         Placement
         {
            posx = 190
            posy = 125
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_BasiColonne
      {
         Caption = ""
         Value   = $MP_VD_BasiColonne
         Placement
         {
            posx = 110
            posy = 155
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            if ( $MP_VD_BasiColonne ) { $MP_QT_BasiColonneEnable=1 }
            else                      { $MP_QT_BasiColonneEnable=0 }
         ]
      }

      Check MP_QT_BasiColonne
      {
         Caption = ""
         Value   = $MP_QT_BasiColonne
         Enable  = $MP_QT_BasiColonneEnable
         Placement
         {
            posx = 190
            posy = 155
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_Top
      {
         Caption = ""
         Value   = $MP_VD_Top
         Placement
         {
            posx = 110
            posy = 185
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_Pilastri
      {
         Caption = ""
         Value   = $MP_VD_Pilastri
         Placement
         {
            posx = 110
            posy = 215
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            if ( $MP_VD_Pilastri ) { $MP_QT_PilastriEnable=1 }
            else                   { $MP_QT_PilastriEnable=0 }
         ]
      }
      Check MP_QT_Pilastri
      {
         Caption = ""
         Value   = $MP_QT_Pilastri
         Enable  = $MP_QT_PilastriEnable
         Placement
         {
            posx = 190
            posy = 215
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_Pilastri
      {
         Caption = ""
         Value   = $MP_VD_MensoleCornici
         Placement
         {
            posx = 110
            posy = 245
            dimx = 20
            dimy = 20
         }
      }
   }

   Frame Lista2
   {
//      Caption = "Elementi NON a parete"
      Caption = $msg_872
      Placement
      {
         posx = 290
         posy = 15
         dimx = 200
         dimy = 300
      }

      Label Txt03
      {
//         Caption = "Vedi con dimensione"
         Caption = $msg_873
         Placement
         {
            posx = 80
            posy = 105
            dimx = 100
            dimy = 25
         }
      }

      Label Pensili2
      {
//         Caption = "Pensili"
         Caption = $msg_696
         Placement
         {
            posx = 10
            posy = 125
            dimx = 100
            dimy = 25
         }
      }

      Label BasiEColonne2
      {
//         Caption = "Basi e Colonne"
         Caption = $msg_869
         Placement
         {
            posx = 10
            posy = 155
            dimx = 100
            dimy = 25
         }
      }

      Label Piani2
      {
//         Caption = "Piani (no dim.)"
         Caption = $msg_874
         Placement
         {
            posx = 10
            posy = 185
            dimx = 100
            dimy = 25
         }
      }

//      Label Pilastri2
//      {
//         Caption = "Pilastri"
//         Placement
//         {
//            posx = 10
//            posy = 215
//            dimx = 100
//            dimy = 25
//         }
//      }
//
//      Label Altri
//      {
//         Caption = "Altri"
//         Placement
//         {
//            posx = 10
//            posy = 245
//            dimx = 100
//            dimy = 25
//         }
//      }
//
      Check MP_VD_PensiliNP
      {
         Caption = ""
         Value   = $MP_VD_PensiliNP
         Placement
         {
            posx = 110
            posy = 125
            dimx = 20
            dimy = 20
         }
      }
      Check MP_VD_BasiColonneNP
      {
         Caption = ""
         Value   = $MP_VD_BasiColonneNP
         Placement
         {
            posx = 110
            posy = 155
            dimx = 20
            dimy = 20
         }
      }

      Check MP_VD_TopNP
      {
         Caption = ""
         Value   = $MP_VD_TopNP
         Placement
         {
            posx = 110
            posy = 185
            dimx = 20
            dimy = 20
         }
      }

//      Check MP_VD_PilastriNP
//      {
//         Caption = ""
//         Value   = $MP_VD_PilastriNP
//         Placement
//         {
//            posx = 110
//            posy = 215
//            dimx = 20
//            dimy = 20
//         }
//      }
//
//      Check MP_VD_AltriNP
//      {
//         Caption = ""
//         Value   = $MP_VD_AltriNP
//         Placement
//         {
//            posx = 110
//            posy = 245
//            dimx = 20
//            dimy = 20
//         }
//      }
   }

   Button OK
   {
//      Caption = MSG(617)
      Caption = $msg_784
      Result = 1  // ModalOk
      Default = 1
      Placement
      {
         posx = 210
         posy = 350
         dimx = 60
         dimy = 25
      }
   }

   Button Annulla
   {
//      Caption = MSG(615)
      Caption = $msg_675
      Result = 2  // Modalannulla
      Placement
      {
         posx = 290
         posy = 350
         dimx = 60
         dimy = 25
      }
   }
}

Dlg MP_ImpostaScala
{
//   Caption = "Scala"
   Caption = $msg_879
   Placement
   {
      posx = 100
      posy = 100
      dimx = 200
      dimy = 330
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Lista
   {
//      Caption = "Valori Standard"
      Caption = ""
      Placement
      {
         posx = 20
         posy = 15
         dimx = 140
         dimy = 225
      }

      Radio Sc_Val1
      {
         Caption = "1/10"
         Value = $MP_Sc_Val1
         Placement
         {
            posx = 10
            posy = 25
            dimx = 50
            dimy = 20
         }
      }

      Radio Sc_Val2
      {
         Caption = "1/15"
         Value = $MP_Sc_Val2
         Placement
         {
            posx = 10
            posy = 45
            dimx = 50
            dimy = 20
         }
      }

      Radio Sc_Val3
      {
         Caption = "1/20"
         Value = $MP_Sc_Val3
         Placement
         {
            posx = 10
            posy = 65
            dimx = 50
            dimy = 20
         }
      }

      Radio Sc_Val4
      {
         Caption = "1/25"
         Value = $MP_Sc_Val4
         Placement
         {
            posx = 10
            posy = 85
            dimx = 50
            dimy = 20
         }
      }

      Radio Sc_Val5
      {
         Caption = "1/50"
         Value = $MP_Sc_Val5
         Placement
         {
            posx = 10
            posy = 105
            dimx = 50
            dimy = 20
         }
      }
      Radio Sc_Val6
      {
         Caption = "1/100"
         Value = $MP_Sc_Val6
         Placement
         {
            posx = 10
            posy = 125
            dimx = 50
            dimy = 20
         }
      }
      Radio Sc_Val7
      {
         Caption = "1/200"
         Value = $MP_Sc_Val7
         Placement
         {
            posx = 10
            posy = 145
            dimx = 50
            dimy = 20
         }
      }

      Radio Sc_Val8
      {
//         Caption = "Altro..."
         Caption = $msg_883
         Value = $MP_Sc_Val8
         Placement
         {
            posx = 10
            posy = 185
            dimx = 60
            dimy = 20
         }
      }

      Edit Sc_Altro
      {
         Caption = ""
         Value = $MP_Sc_Altro

         Placement
         {
            posx =  80
            posy =  185
            dimx =  35
            dimy =  25
         }
      }
   }

   Button OK
   {
//      Caption = MSG(617)
      Caption = $msg_784
      Result = 1  // ModalOk
      Default = 1
      Placement
      {
         posx = 20
         posy = 260
         dimx = 60
         dimy = 25
      }
   }

   Button Annulla
   {
//      Caption = MSG(615)
      Caption = $msg_675
      Result = 2  // Modalannulla
      Placement
      {
         posx = 90
         posy = 260
         dimx = 60
         dimy = 25
      }
   }
}

//} Pravato 10-dic-09

//rob_pec 30/11/2010: allineo dialog a quella dei ripiani NOW
//quella precedente rinominata in _OLD
Dlg Ripiano_A
{
   Caption = "Ripiano"
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame FrmAccessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Check chkAstaApp
      {
        Caption = MSG(728)
        Hint    = MSG(728)
        Enable  = 0
        Value   = $DLG_value_appendiabiti

        Placement
        {
           posx = 10
           posy = 30
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_appendiabiti==1)   {  $DLG_value_appendiabiti=1  }
           else                             {  $DLG_value_appendiabiti=0  }
        ]

      }

      Check chkAstinaEstr
      {
        Caption = MSG(729)
        Hint    = MSG(729)
        Enable  = 0
        Value   = $DLG_value_estraibile

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_estraibile==1)   {  $DLG_value_estraibile=1  }
           else                           {  $DLG_value_estraibile=0  }
        ]

      }

      Check chkIllum
      {
        Caption = MSG(817)
        Hint    = MSG(817)
        Enable  = 0
        Value   = $DLG_value_illuminazione

        Placement
        {
           posx = 10
           posy = 90
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_illuminazione==1)   {  $DLG_value_illuminazione=1  }
           else                              {  $DLG_value_illuminazione=0  }
        ]

      }

   }


   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }
      ]
   }

   Check chkElimina
   {
     Caption = MSG(745)
     Hint    = MSG(745)
     Enable  = $DLG_enable_cancella
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 120
        posy = 155
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)  {  $DLG_value_cancella = 1    }
        else                        {  $DLG_value_cancella = 0    }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {   DISPLAY2(MSG(765))    }
     ]

   }
}

Dlg Ripiano_A_OLD
{
   Caption = MSG(361)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 200
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 120
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 120
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 25
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         GOSUB Get_Image_NOW
      ]
   }

   Check chkIllum
   {
     Caption = MSG(817)
     Hint    = MSG(817)
     Enable  = $DLG_enable_illuminazione
     Value   = $DLG_value_illuminazione

     Placement
     {
        posx = 185
        posy = 25
        dimx = 120
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_illuminazione==1)   {  $DLG_value_illuminazione=1  }
        else                              {  $DLG_value_illuminazione=0  }
     ]
   }

   Check chkElimina
   {
     Caption = MSG(745)
     Hint    = MSG(745)
     Enable  = $DLG_enable_cancella
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 185
        posy = 65
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)  {  $DLG_value_cancella = 1    }
        else                        {  $DLG_value_cancella = 0    }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {   DISPLAY2(765)    }
     ]

   }
}


Dlg CtrlFineProgetto
{
   Caption = MSG(536)
   Placement
   {
      posx = 100
      posy = 100
      dimx = 350
           dimy = 320
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Label LL2
   {
        Caption = $wk_descr_1
        Placement
      {
                posx = 10
                posy = 35
                dimx = 400
                dimy = 20
      }
   }

   Label LL3
   {
        Caption = $wk_descr_2
        Placement
      {
                posx = 10
                posy = 55
                dimx = 400
                dimy = 20
      }
   }

   Label LL4
   {
        Caption = $wk_descr_3
        Placement
      {
                posx = 10
                posy = 75
                dimx = 400
                dimy = 20
      }
   }

   Label LL5
   {
        Caption = $wk_descr_4
        Placement
      {
                posx = 10
                posy = 95
                dimx = 400
                dimy = 20
      }
   }

   Label LL6
   {
        Caption = $wk_descr_5
        Placement
      {
                posx = 10
                posy = 115
                dimx = 400
                dimy = 20
      }
   }

   Label LL7
   {
        Caption = $wk_descr_6
        Placement
      {
                posx = 10
                posy = 135
                dimx = 400
                dimy = 20
      }
   }

   Label LL8
   {
        Caption = $wk_descr_7
        Placement
      {
                posx = 10
                posy = 155
                dimx = 400
                dimy = 20
      }
   }

   Label LL9
   {
        Caption = $wk_descr_8
        Placement
      {
                posx = 10
                posy = 175
                dimx = 400
                dimy = 20
      }
   }

   Label LL10
   {
        Caption = $wk_descr_9
        Placement
      {
                posx = 10
                posy = 195
                dimx = 400
                dimy = 20
      }
   }
   Label LL11
   {
        Caption = $wk_descr_10
        Placement
      {
                posx = 10
                posy = 205
                dimx = 400
                dimy = 20
      }
   }
   Label LL12
   {
        Caption = $wk_descr_11
        Placement
      {
                posx = 10
                posy = 215
                dimx = 400
                dimy = 20
      }
   }
   Label LL13
   {
        Caption = $wk_descr_12
        Placement
      {
                posx = 10
                posy = 225
                dimx = 400
                dimy = 20
      }
   }

   Button OK
   {
        Caption = $wk_continua
      Result  = 1
      Default = 1
      Placement
      {
                posx = 200
                posy = 250
                dimx = 110
                dimy = 25
      }
      OnClick
      [
         $Dlg_Annulla=0
      ]
   }

   Button Annulla
   {
        Caption = $wk_annulla
      Result  = 1
      Default = 1
      Placement
      {
                posx =  80
                posy = 250
                dimx = 110
                dimy = 25
      }
      OnClick
      [
         $Dlg_Annulla=1
      ]
   }
}

Dlg 368CUC_LED
{
   Caption = MSG(247)

   Placement
   {
      posx = 130
      posy = 150
      dimx = 175
      dimy = 200
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame FrmLarghezza
   {
      Caption = MSG(232)
      Hint = MSG(232)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 80
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = 1
        Value   = $DLG_larghezza_368_LED

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(439)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)
      Enable  = 1

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368_LED")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368_LED)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368_LED
        $DLG_value_larghezza_368   = $DLG_larghezza_368_LED
      ]
   }


   Frame FrmTrasformatoreSiNo
   {
      Caption = MSG(220)
      Hint = ""
      //Eugenio 11.03.15
      //Enable = 1
      Enable = 0

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 80
      }

      Radio RdTrasformatoreSi
      {
        Caption = MSG(245)
        Hint    = MSG(245)
        Value   = $DLG_value_trasformatore_SI
        //Eugenio 11.03.15
        //Enable  = 1
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_trasformatore_SI = 1
           $DLG_value_trasformatore_NO = 0
        ]

      }

      Radio RdTrasformatoreNo
      {
        Caption = MSG(246)
        Hint    = MSG(246)
        Value   = $DLG_value_trasformatore_NO
        //Eugenio 11.03.15
        //Enable  = 1
        Enable  = 0

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_trasformatore_SI = 0
           $DLG_value_trasformatore_NO = 1
        ]
      }
   }

   Check chkElimina
   {
     Caption = MSG(398)
     Hint    = MSG(398)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 15
        posy = 100
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 135
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 135
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

}

Dlg 368Illu_LED
{
   Caption = MSG(247)

   Placement
   {
      posx = 130
      posy = 150
      dimx = 180
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame FrmLarghezza
   {
      Caption = MSG(232)
      Hint = MSG(232)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 150
      }

      Radio Rd1Led05
      {
        Caption = MSG(1439)
        Hint    = MSG(1439)
        Value   = $DLG_value_rd_uso_6
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]

      }

      Radio Rd1Led07
      {
        Caption = MSG(1440)
        Hint    = MSG(1440)
        Value   = $DLG_value_rd_uso_1
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio Rd1Led10
      {
        Caption = MSG(1441)
        Hint    = MSG(1441)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio Rd2Led05
      {
        Caption = MSG(1442)
        Hint    = MSG(1442)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 80
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio Rd2Led07
      {
        Caption = MSG(1443)
        Hint    = MSG(1443)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 100
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
        ]
      }

      Radio Rd2Led10
      {
        Caption = MSG(1444)
        Hint    = MSG(1444)
        Value   = $DLG_value_rd_uso_5
        Enable  = $DLG_enable_rd_uso_5

        Placement
        {
           posx = 10
           posy = 120
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
        ]
      }

   }


   //Frame FrmTrasformatoreSiNo
   //{
   //   Caption = MSG(220)
   //   Hint = ""
   //   Enable = 1
   //
   //   Placement
   //   {
   //      posx = 170
   //      posy = 10
   //      dimx = 150
   //      dimy = 80
   //   }
   //
   //   Radio RdTrasformatoreSi
   //   {
   //     Caption = MSG(245)
   //     Hint    = MSG(245)
   //     Value   = $DLG_value_trasformatore_SI
   //     Enable  = 1
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 20
   //        dimx = 120
   //        dimy = 15
   //     }
   //
   //     OnClick
   //     [
   //        $DLG_value_trasformatore_SI = 1
   //        $DLG_value_trasformatore_NO = 0
   //     ]
   //
   //   }
   //
   //   Radio RdTrasformatoreNo
   //   {
   //     Caption = MSG(246)
   //     Hint    = MSG(246)
   //     Value   = $DLG_value_trasformatore_NO
   //     Enable  = 1
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 40
   //        dimx = 120
   //        dimy = 15
   //     }
   //
   //     OnClick
   //     [
   //        $DLG_value_trasformatore_SI = 0
   //        $DLG_value_trasformatore_NO = 1
   //     ]
   //   }
   //}

   Check chkElimina
   {
     Caption = MSG(398)
     Hint    = MSG(398)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 15
        posy = 170
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg 368Illu_FAR
{
   Caption = MSG(1445)

   Placement
   {
      posx = 130
      posy = 150
      dimx = 180
      // 10/01/2018 - Filippo - aumento la dimensione della dialog per farci stare la checkbox
      //dimy = 210
      dimy = 240
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }


   Frame FrmQtaFaretti
   {
      Caption = MSG(1446)
      Hint = MSG(1446)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 85
      }

      Radio Rd1Far
      {
        Caption = MSG(1447)
        Hint    = MSG(1447)
        Value   = $DLG_value_rd_uso_1
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
        ]

      }

      Radio Rd2Far
      {
        Caption = MSG(1448)
        Hint    = MSG(1448)
        Value   = $DLG_value_rd_uso_2
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
        ]
      }

      Radio Rd3Far
      {
        Caption = MSG(1449)
        Hint    = MSG(1449)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_2

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 15
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
        ]
      }

   }

   // 10/01/2018 - Filippo - creo la checkbox per l'eliminazione
   Check chkUSA
   {
     Caption = MSG(3147)
     Hint    = MSG(3147)
     Enable  = $DLG_ena_USA
     Value   = $DLG_value_USA

     Placement
     {
        posx = 15
        posy = 105
        dimx = 200
        dimy = 20
     }

     OnClick
     [
        if($DLG_value_USA==1)
        {
           $DLG_value_USA = 1
        }
        else
        {
           $DLG_value_USA = 0
        }
     ]

   }

   Check chkElimina
   {
     Caption = MSG(1450)
     Hint    = MSG(1450)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 15
        // 10/01/2018 - Filippo - sposto in basso
        //posy = 105
        posy = 135
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         // 10/01/2018 - Filippo - sposto in basso
         //posy = 145
         posy = 170
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         // 10/01/2018 - Filippo - sposto in basso
         //posy = 145
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}


Dlg Prese_Acqua
{
   Caption = $wk_caption

   Placement
   {
      posx = 150
      posy = 150
      dimx = 700
      dimy = 625
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Image Img1
   {
      Caption = ""
      Value = $wk_PreseScaricoAcqua
      Placement
      {
         posx =   0
         posy =   0
         dimx = 700
         dimy = 525
      }
   }
   // LABEL ******************************

   // EDIT ******************************
   Edit EDIT_Q1
   {
      Caption = ""
      Value = $wk_QInt

      Placement
      {
         posx =  277
         posy =   42
         dimx =   40
         dimy =   50
      }
   }

// Pravato 19-gen-10
   Edit EDIT_Q1_STP
   {
      Caption = ""
      Value = $wk_QInt_STP

      Placement
      {
         posx =  167
         posy =   23
         dimx =   20
         dimy =   20
      }
   }

   Edit EDIT_Q2
   {
      Caption = ""
      Value = $wk_QRubSc

      Placement
      {
         posx =  585
         posy =  235
         dimx =   40
         dimy =   50
      }
   }
// Pravato 19-gen-10
   Edit EDIT_Q2_STP
   {
      Caption = ""
      Value = $wk_QRubSc_STP

      Placement
      {
         posx =  566
         posy =  185
         dimx =   20
         dimy =   20
      }
   }

// Pravato 13-gen-10
   Edit EDIT_Q3
   {
      Caption = ""
      Value = $wk_FA

      Placement
      {
         posx =  387
         posy =  209
         dimx =   40
         dimy =   50
      }
   }

   Button Annulla
   {
      Caption = $wk_dlg_annulla
      Result  = 2

      Placement
      {
         posx = 250
         posy = 550
         dimx = 60
         dimy = 25
      }
      OnClick
      [
         $wk_dlg_cicla=0
      ]
   }

   Button Avanti
   {
      Caption = $wk_dlg_ok
      Result  = 1
      Default = 1

      Placement
      {
         posx = 330
         posy = 550
         dimx = 60
         dimy = 25
      }
      OnClick
      [
         GOSUB dlg_ap_ForoPSubAcqua
      ]
   }
}

//Cuscino Kussin
Dlg Kussin_Cuscino
{
   Caption = MSG(800)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 300
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 110
         dimy = 100
      }

      Radio Rd552
      {
         Caption = "552"
         Hint    = "552"
         Value   = $DLG_val_opzione_1

         Placement
         {
            posx = 20
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 1
            $DLG_val_opzione_2 = 0
         ]
      }

      Radio Rd736
      {
         Caption = "736"
         Hint    = "736"
         Value   = $DLG_val_opzione_2

         Placement
         {
            posx = 20
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 1
         ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 135
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 220
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 135
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 160
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         //$R = CHIEDI(-1,"DLG_COLORE_KUSSIN")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_KUSSIN,"colori_tutti.txt")
         //$DLG_VAL_COLORE = $DLG_COLORE_KUSSIN
         //GOSUB Get_Image_Rivestimenti

         $R = CHIEDI($DLG_idx_to_call,"GEST_RO")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RO"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RO")
         GOSUB Get_Image_Rivestimenti
      ]
   }
}

Dlg Kussin
{
   Caption = MSG(802)

   Placement
   {
      posx = 155
      posy = 150
      dimx = 815
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Accessori
   {
      Caption = MSG(803)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 140
         dimy = 75
      }

      Check chkMaterasso
      {
         Caption = MSG(814)
         Hint    = MSG(815)
         Enable  = 1
         Value   = $DLG_materasso

         Placement
         {
            posx = 10
            posy = 20
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_materasso==1)
            {
               $DLG_materasso=1
               $DLG_en_tipo_materasso=1
            }
            else
            {
               $DLG_materasso=0
               $DLG_en_tipo_materasso=0
            }
         ]
      }

      Check chkCoordinato
      {
         Caption = MSG(818)
         Hint    = MSG(820)
         Value   = $DLG_coordinato
         Enable  = $DLG_en_coordinato

         Placement
         {
            posx = 10
            posy = 45
            dimx = 120
            dimy = 20

         }

         OnClick
         [
            if( $DLG_mis_materasso!=3 & $DLG_mis_materasso!=4 )
            {
               $DLG_coordinato=0
            }

            if( $DLG_coordinato==1 )   {  $DLG_coordinato=1  }
            else                       {  $DLG_coordinato=0  }
         ]
      }
   }

   Frame frmTipoMaterasso
   {
      Caption = MSG(808)

      Placement
      {
         posx = 10
         posy = 97
         dimx = 140
         dimy = 75
      }

      Radio rdOrtopedico
      {
         Caption = MSG(833)
         Hint    = MSG(833)
         Enable  = $DLG_en_tipo_materasso
         Value   = $DLG_val_tipo_materasso_0

         Placement
         {
            posx = 10
            posy = 20
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_tipo_materasso = 0
         ]
      }

      Radio rdLattice
      {
         Caption = MSG(834)
         Hint    = MSG(834)
         Enable  = $DLG_en_tipo_materasso
         Value   = $DLG_val_tipo_materasso_1

         Placement
         {
            posx = 10
            posy = 45
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_tipo_materasso = 1
         ]
      }
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx = 160
         posy =  10
         dimx = 160
         dimy = 162
      }

      Radio rd100x200
      {
         Caption = "100 x 200"
         Hint    = MSG(838)
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_0

         Placement
         {
            posx = 10
            posy = 15
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 0
            // forzo il fatto di non poter avere il coordinato
            $DLG_coordinato = 0
            $DLG_en_coordinato = 0
         ]
      }

      Radio rd120x200
      {
         Caption = "120 x 200"
         Hint    = MSG(839)
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_1

         Placement
         {
            posx = 10
            posy = 35
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 1
            // forzo il fatto di non poter avere il coordinato
            $DLG_coordinato = 0
            $DLG_en_coordinato = 0
         ]
      }

      Radio rd150x200
      {
         Caption = "150 x 200"
         Hint    = MSG(840)
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_2

         Placement
         {
            posx = 10
            posy = 55
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 2
            // forzo il fatto di non poter avere il coordinato
            $DLG_coordinato = 0
            $DLG_en_coordinato = 0
         ]
      }

      Radio rd152x203
      {
         Caption = MSG(841)
         Hint    = MSG(842)
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_3

         Placement
         {
            posx = 10
            posy = 75
            dimx = 145
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 3
            // forzo il fatto di non poter avere il coordinato
            $DLG_coordinato = 0
            $DLG_en_coordinato = 0
         ]
      }

      Radio rd160x200
      {
         Caption = "160 x 200"
         Hint    = "160 x 200"
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_4

         Placement
         {
            posx = 10
            posy = 95
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 4
            // Qui  possibile avere il coordinato
            $DLG_en_coordinato = 1
         ]
      }

      Radio rd180x200
      {
         Caption = "180 x 200"
         Hint    = "180 x 200"
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_5

         Placement
         {
            posx = 10
            posy = 115
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 5
            // Qui  possibile avere il coordinato
            $DLG_en_coordinato = 1
         ]
      }

      Radio rd193x203
      {
         Caption = MSG(843)
         Hint    = MSG(844)
         Enable  = $DLG_en_mis_materasso
         Value   = $DLG_val_mis_materasso_6

         Placement
         {
            posx = 10
            posy = 135
            dimx = 145
            dimy = 20
         }

         OnClick
         [
            $DLG_mis_materasso = 6
            // forzo il fatto di non poter avere il coordinato
            $DLG_coordinato = 0
            $DLG_en_coordinato = 0
         ]
      }
   }

   Frame FinituraTestiera
   {
      Caption = MSG(804)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraBordino
   {
      Caption = MSG(805)

      Placement
      {
         posx = 490
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraGambe
   {
      Caption = MSG(806)

      Placement
      {
         posx = 650
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 182
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 182
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTestiera
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 355
         posy = 140
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE_1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti_NEW
         //$R = CHIEDI(-1,"DLG_COLORE_1")
         //$DLG_VAL_COLORE_1 = $DLG_COLORE_1
         //while( STRCMP($DLG_COLORE_1,"NOR")==0 )
         //  {
         //     $R = CHIEDI(-1,"DLG_COLORE_1")
         //     $DLG_VAL_COLORE_1 = $DLG_COLORE_1
         //  }
         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_1,"colori_tutti.txt")
         //GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinituraBordino
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 515
         posy = 140
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RB")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RB"),"colori_tutti.txt")
         $DLG_VAL_COLORE_2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RB")
         GOSUB Get_Image_Rivestimenti_NEW
         //$R = CHIEDI(-1,"DLG_COLORE_2")
         //$DLG_VAL_COLORE_2 = $DLG_COLORE_2
         //while( STRCMP($DLG_COLORE_2,"NOR")==0 )
         //  {
         //     $R = CHIEDI(-1,"DLG_COLORE_2")
         //     $DLG_VAL_COLORE_2 = $DLG_COLORE_2
         //  }
         //$DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_2,"colori_tutti.txt")
         //GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinituraGambe
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 675
         posy = 140
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RN")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RN"),"colori_tutti.txt")
         $DLG_VAL_COLORE_3 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RN")
         GOSUB Get_Image_Rivestimenti_NEW
         //$R = CHIEDI(-1,"DLG_COLORE_3")
         //$DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_3,"colori_tutti.txt")
         //$DLG_VAL_COLORE_3 = $DLG_COLORE_3
         //GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

}

//Tavolo Trestle
Dlg TavoloTrestle
{
   Caption = MSG(902)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 465
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(637)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 110
         dimy = 100
      }

      Radio Rd552
      {
         Caption = "1800x900"
         Hint    = "1800x900"
         Value   = $DLG_val_opzione_1

         Placement
         {
            posx = 20
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 1
            $DLG_val_opzione_2 = 0
         ]
      }

      Radio Rd736
      {
         Caption = "1200x800"
         Hint    = "1200x800"
         Value   = $DLG_val_opzione_2

         Placement
         {
            posx = 20
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 1
         ]
      }
   }

   Frame FinituraTop
   {
      Caption = MSG(677)

      Placement
      {
         posx = 135
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinitureLaterali
   {
      Caption = MSG(678)

      Placement
      {
         posx = 300
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 385
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 300
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 160
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PT")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PT"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PT")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitureLaterali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 325
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PV")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PV")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

//Tavolo AIRAllungabile
Dlg TavoloAirAllu
{
   Caption = MSG(1728)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 465
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(637)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 110
         dimy = 150
      }

      Radio Rd160x85
      {
         Caption = "160/264x85"
         Hint    = "160/264x85"
         Value   = $DLG_val_opzione_1

         Placement
         {
            posx = 10
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 1
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 0
            $DLG_val_opzione_4 = 0
         ]
      }

      Radio Rd190x85
      {
         Caption = "190/294x85"
         Hint    = "190/294x85"
         Value   = $DLG_val_opzione_2

         Placement
         {
            posx = 10
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 1
            $DLG_val_opzione_3 = 0
            $DLG_val_opzione_4 = 0
         ]
      }
      //Massimiliano 09/02/16 - Aggiungo nuove misure
      Radio Rd160x100
      {
         Caption = "160/264x100"
         Hint    = "160/264x100"
         Value   = $DLG_val_opzione_3

         Placement
         {
            posx = 10
            posy = 90
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 1
            $DLG_val_opzione_4 = 0
         ]
      }

      Radio Rd190x100
      {
         Caption = "190/294x100"
         Hint    = "190/294x100"
         Value   = $DLG_val_opzione_4

         Placement
         {
            posx = 10
            posy = 120
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 0
            $DLG_val_opzione_4 = 1
         ]
      }
   }

   Frame FinituraTop
   {
      Caption = MSG(677)

      Placement
      {
         posx = 135
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinitureLaterali
   {
      Caption = MSG(678)

      Placement
      {
         posx = 300
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 385
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 300
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 160
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         //$R = CHIEDI($DLG_idx_to_call,"GEST_PT")
         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PT"),"colori_tutti.txt")
         //$DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PT")
         //$R = CHIEDI($DLG_idx_to_call,"$DLG_COLORE_TOP")
         //$R = CHIEDI($DLG_idx_to_call,"DLG_COLORE_TOP")
         $R = CHIEDI(-1,"DLG_COLORE_PIANO")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PIANO,"colori_tutti.txt")
         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_COLORE_TOP,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_PIANO
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitureLaterali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 325
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         // 27/11/2018 - Emanuele - Aggiungo una condizione per modificare la modalit della gest per mostrare correttamente
         // le finiture in dialog
         if(VAR_MODE($DLG_idx_to_call,"GEST_PV")!=131072)
         {
            VAR_SET_MODE($DLG_idx_to_call,"GEST_PV",131072)
         }

         $R = CHIEDI($DLG_idx_to_call,"GEST_PV")

         // 27/11/2018 - Emanuele - Faccio tornare la variante gestionale alla modalit precedente per evitare errori
         if(VAR_MODE($DLG_idx_to_call,"GEST_PV")!=1049600)
         {
            VAR_SET_MODE($DLG_idx_to_call,"GEST_PV",1049600)
         }

         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PV")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

//Loto_Table
Dlg TavoloLoto
{
   Caption = MSG(1729)

   Placement
   {
      posx = 150
      posy = 150
      // 12/07/2018 - Emanuele - Modifico la dimensione in x della dialog
//      dimx = 630
      dimx = 640
      // 12/07/2018 - Emanuele - Modifico la dimensione della dialog in y perch i tasti OK e Annulla sono un po
      // tagliati
//      dimy = 250
      dimy = 270
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(637)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 110
         dimy = 90
      }

      Radio Rd100
      {
         Caption = "100x100"
         Hint    = "100x100"
         Value   = $DLG_val_opzione_1

         Placement
         {
            posx = 20
            posy = 20
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 1
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 0
            $DLG_EnablePOC     = 1
         ]
      }

      Radio Rd120
      {
         Caption = "120x120"
         Hint    = "120x120"
         Value   = $DLG_val_opzione_2

         Placement
         {
            posx = 20
            posy = 40
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 1
            $DLG_val_opzione_3 = 0
            $DLG_EnablePOC     = 1
         ]
      }

      Radio Rd140
      {
         Caption = "140x140"
         Hint    = "140x140"
         Value   = $DLG_val_opzione_3

         Placement
         {
            posx = 20
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 1
            $DLG_EnablePOC     = 0
            //$DLG_ConProlunga   = 0
         ]
      }
   }

   Frame FrmOpzioni
   {
      Caption = MSG(660)

      Placement
      {
         posx = 10
         posy = 110
         dimx = 110
         dimy = 70
      }

      Check chkProlunga
      {
        Caption = MSG(1995)
        Hint    = MSG(1995)
        Enable  = $DLG_EnablePOC
        Value   = $DLG_ConProlunga

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           if($DLG_ConProlunga==1)   {  $DLG_ConProlunga=1  }
           else                      {  $DLG_ConProlunga=0  }
        ]
      }

      Check chkOpenClose
      {
        Caption = MSG(1996)
        Hint    = MSG(1996)
        Enable  = $DLG_EnablePOC
        Value   = $DLG_OpenClose

        Placement
        {
           posx = 10
           posy = 40
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           if($DLG_OpenClose==1)   {  $DLG_OpenClose=1  }
           else                    {  $DLG_OpenClose=0  }
        ]
      }
   }

   Frame FinituraTop
   {
      Caption = MSG(677)

      Placement
      {
         posx = 135
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinitureProlunghe
   {
      Caption = MSG(678)

      Placement
      {
         posx = 300
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinitureGambe
   {
      Caption = MSG(806)

      Placement
      {
         posx = 465
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 385
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 300
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 160
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_PIANO")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_PIANO,"colori_tutti.txt")
         $DLG_VAL_COLORE = $DLG_COLORE_PIANO
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitureProl
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 325
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PU")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PU"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PU")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinitureGambe
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 490
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PI")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PI"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PI")
         GOSUB Get_Image_Opaco
         $DLG_image_file3 = $DLG_image_file
      ]
   }

}


Dlg ComfortTable
{
   Caption = MSG(1715)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 490
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 80
      }

      Edit EdtMisure
      {
        Caption = $DLG_X
        Hint    = $DLG_hint_X
        Value   = $DLG_value_misure

        Placement
        {
           posx = 65
           posy = 25
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame FinituraTop
   {
      Caption = MSG(677)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraGambe
   {
      Caption = MSG(806)

      Placement
      {
         posx = 325
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 385
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 300
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_misure")

        if( $DLG_misure==16085 )
        {
            $DLG_X = 1600
            $DLG_Z =  850
        }

        if( $DLG_misure==19085 )
        {
            $DLG_X = 1900
            $DLG_Z =  850
        }

        if( $DLG_misure==220100 )
        {
            $DLG_X = 2200
            $DLG_Z = 1000
        }

        $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
        $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
        $DLG_caption_misure  = $DLG_desc_misure
        $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 195
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinitureLaterali
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 350
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PI")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PI"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PI")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

Dlg NEW_AIR_Schiena
{
   Caption = MSG(635)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 620
//      dimy = 300
//      dimy = 340
      dimy = 380
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 65
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 80
           posy = 15
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(632)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 80
           posy = 40
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(633)
        Value   = MSG(628)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FrmPosizionamento
   {
      Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 75
         dimx = 150
         dimy = 45
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 80
           posy = 15
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(657)
        Enable  = 0
        Hint    = MSG(658)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 80
           dimy = 20
        }

      }
   }

   // Riccardo 28/09/11: Aggiungo frame per inserire l'etichetta e gestirla da dialog
   Frame frmEtichetta
   {
      Caption = MSG(671)

      Placement
      {
         posx = 10
         posy = 120
         dimx = 150
         dimy = 60
      }

      Check chkEtiPOE
      {
        Caption = MSG(672)
        Hint    = MSG(672)
        Value   = $DLG_POE

        Placement
        {
           posx = 20
           posy = 15
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_POE==1 )   {  $DLG_POE=1  }
           else                {  $DLG_POE=0  }
        ]
      }

      Check chkEtiPOF
      {
        Caption = MSG(673)
        Hint    = MSG(673)
        Value   = $DLG_POF

        Placement
        {
           posx = 20
           posy = 35
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_POF==1 )   {  $DLG_POF=1  }
           else                {  $DLG_POF=0  }
        ]
      }

   }

   Frame frmStaffa
   {
      Caption = MSG(867)

      Placement
      {
         posx = 10
         posy = 180
         dimx = 150
         dimy = 40
      }

      Radio r1
      {
        Caption = MSG(869)
        Hint    = MSG(869)
        Enable  = $DLG_enable_staffa
        Value   = $DLG_ST_SX

        Placement
        {
           posx =  5
           posy = 15
           dimx = 50
           dimy = 20
        }

        OnClick
        [
           $DLG_pos_staffa = 0
           $DLG_ST_SX = 1
           $DLG_ST_CN = 0
           $DLG_ST_DX = 0
        ]
      }

      Radio r2
      {
        Caption = MSG(873)
        Hint    = MSG(873)
        Enable  = $DLG_enable_staffa
        Value   = $DLG_ST_CN

        Placement
        {
           posx = 60
           posy = 15
           dimx = 50
           dimy = 20
        }

        OnClick
        [
           $DLG_pos_staffa = 1
           $DLG_ST_SX = 0
           $DLG_ST_CN = 1
           $DLG_ST_DX = 0
        ]
      }

      Radio r3
      {
        Caption = MSG(868)
        Hint    = MSG(868)
        Enable  = $DLG_enable_staffa
        Value   = $DLG_ST_DX

        Placement
        {
           posx = 115
           posy =  15
           dimx =  50
           dimy =  20
        }

        OnClick
        [
           $DLG_pos_staffa = 2
           $DLG_ST_SX = 0
           $DLG_ST_CN = 0
           $DLG_ST_DX = 1
        ]
      }
   }

   // Eugenio 24.04.13 Sposto ignifugazione per far posto nuova finitura
   Frame frmChk
   {
      //Caption = MSG(671)

      Placement
      {
         posx = 10
         posy = 225
         dimx = 150
         dimy = 30
      }

      Check chkIgnifug
      {
        Caption = MSG(613)
        Hint    = MSG(614)
        Enable  = $DLG_ignifugazione_enable
        Value   = $DLG_ignifugazione

        Placement
        {
           posx = 10
           posy = 5
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ignifugazione==1 )   {  $DLG_ignifugazione=1  }
           else                          {  $DLG_ignifugazione=0  }
        ]
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 440
//         dimy = 210
//         dimy = 230
         dimy = 270
      }

      Radio Rd1
      {
        Caption = MSG(603)
        Hint    = MSG(604)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_1

           $DLG_rivestimento   = 1
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd2
      {
        Caption = MSG(605)
        Hint    = MSG(606)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 2: "cotone organico" GEST_R3
           $DLG_var_to_call = $DLG_var_to_call_2

           $DLG_rivestimento   = 2
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd3
      {
        Caption = MSG(607)
        Hint    = MSG(608)
        Value   = $DLG_value_rd_uso_3

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 3: "ecopelle" GEST_R2
           $DLG_var_to_call = $DLG_var_to_call_3

           $DLG_rivestimento   = 3
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 1
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0
           if( $DLG_ignifugazione==1 )    { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd4
      {
        Caption = MSG(609)
        Hint    = MSG(610)
        Value   = $DLG_value_rd_uso_4
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 4: "lino canovaccio" GEST_R0
           $DLG_var_to_call = $DLG_var_to_call_4

           $DLG_rivestimento   = 4
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 1
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd5
      {
        Caption = MSG(611)
        Hint    = MSG(612)
        Value   = $DLG_value_rd_uso_5
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 5: "pelle" GEST_R1
           $DLG_var_to_call = $DLG_var_to_call_5

           $DLG_rivestimento   = 5
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 1
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd6
      {
        Caption = MSG(651)
        Hint    = MSG(652)
        Value   = $DLG_value_rd_uso_6

        Placement
        {
           posx = 10
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 6: "Ecopelle Ignifuga" GEST_R5
           $DLG_var_to_call = $DLG_var_to_call_6

           $DLG_rivestimento   = 6
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 1
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. disattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // attivo ignifugazione automatica
           // per ecopelle ignifuga
           //if( $DLG_ignifugazione==0 )  { $DLG_ignifugazione = 1 }
           if( $DLG_ignifugazione==1 )  { $DLG_ignifugazione = 0 }

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd7
      {
        Caption = MSG(653)
        Hint    = MSG(654)
        Value   = $DLG_value_rd_uso_7

        Placement
        {
           posx = 10
           posy = 135
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 7: "Tessuto SUN" GEST_R6
           $DLG_var_to_call = $DLG_var_to_call_7

           $DLG_rivestimento   = 7
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 1
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 1
           $DLG_caption_outdoor = MSG(655)
           $DLG_value_outdoor   = MSG(655)
           $DLG_hint_outdoor    = MSG(656)
           //rob_pec 18/04/2011. attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd9
      {
        Caption = MSG(1390)
        Hint    = MSG(1390)
        Value   = $DLG_value_rd_uso_16

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // Eugenio 12.11.12 : "Tessuto et voila" GEST_RZ
           $DLG_var_to_call = $DLG_var_to_call_16

           $DLG_rivestimento   = 16
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 1
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           // disattivo outdoor
           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           // attivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd8
      {
        Caption = MSG(669)
        Hint    = MSG(669)
        Value   = $DLG_value_rd_uso_8

        Placement
        {
           posx = 10
           posy = 175
           dimx = 140
           dimy = 20
        }

        OnClick
        [
           // rivestimento 8: "Rivestimento del Cliente" GEST_R9
           $DLG_var_to_call = $DLG_var_to_call_8

           $DLG_rivestimento   = 8
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 1
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""
           //rob_pec 18/04/2011. attivo check ignifugazione
            //rob_pec 18/04/2011. attivo check ignifugazione
           // Riccardo 28/09/11: E la valorizzo a 1
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           COMANDO2(STRCAT("VAR_CHANGE 1 ",STR(ATTUALE())," ",$DLG_var_to_call,"=",APICI(),"XXX",APICI()))
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           //while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           //{
           //   $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           //   $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           //}
           // ---------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir

        ]
      }

      Radio Rd20
      {
        Caption = MSG(2109)
        Hint    = MSG(2110)
        Value   = $DLG_value_rd_uso_20
        // 29/01/2019 - Emanuele - Disabilito il radiobutton perch la finitura  fuori produzione
        Enable = $Abilita_Capri_lino_pelle

        Placement
        {
           posx = 160
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_20

           $DLG_rivestimento   = 20
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 1
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd21
      {
        Caption = MSG(2111)
        Hint    = MSG(2112)
        Value   = $DLG_value_rd_uso_21

        Placement
        {
           posx = 160
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_21

           $DLG_rivestimento   = 21
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 1
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd22
      {
        Caption = MSG(2113)
        Hint    = MSG(2114)
        Value   = $DLG_value_rd_uso_22

        Placement
        {
           posx = 160
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_22

           $DLG_rivestimento   = 22
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 1
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd23
      {
        Caption = MSG(2115)
        Hint    = MSG(2116)
        Value   = $DLG_value_rd_uso_23

        Placement
        {
           posx = 160
           posy = 75
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // rivestimento 1: "cotone ecologico" GEST_R4
           $DLG_var_to_call = $DLG_var_to_call_23

           $DLG_rivestimento   = 23
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 1
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd24
      {
        Caption = MSG(2117)
        Hint    = MSG(2118)
        Value   = $DLG_value_rd_uso_24

        Placement
        {
           posx = 160
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_24

           $DLG_rivestimento   = 24
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 1
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd25
      {
        Caption = MSG(2119)
        Hint    = MSG(2120)
        Value   = $DLG_value_rd_uso_25

        Placement
        {
           posx = 160
           posy = 115
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_25

           $DLG_rivestimento   = 25
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 1
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd26
      {
        Caption = MSG(2121)
        Hint    = MSG(2122)
        Value   = $DLG_value_rd_uso_26

        Placement
        {
           posx = 160
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_26

           $DLG_rivestimento   = 26
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 1
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd27
      {
        Caption = MSG(2123)
        Hint    = MSG(2124)
        Value   = $DLG_value_rd_uso_27

        Placement
        {
           posx = 160
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_27

           $DLG_rivestimento   = 27
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 1
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 10/01/2019 - Emanuele - Aggiungo radiobutton per la gestione dei nuovi tessuti
      Radio Rd28
      {
        Caption = MSG(3360)
        Hint    = MSG(3360)
        Value   = $DLG_value_rd_uso_28

        Placement
        {
           posx = 160
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_28

           $DLG_rivestimento   = 28
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 1
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd29
      {
        Caption = MSG(3361)
        Hint    = MSG(3361)
        Value   = $DLG_value_rd_uso_29

        Placement
        {
           posx = 10
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_29

           $DLG_rivestimento   = 29
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 1
           $DLG_value_rd_uso_30 = 0
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd30
      {
        Caption = MSG(3362)
        Hint    = MSG(3362)
        Value   = $DLG_value_rd_uso_30

        Placement
        {
           posx = 160
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_30

           $DLG_rivestimento   = 30
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 1
           // 30/10/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei tessuti Barkley/axum/bloom
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      // 30/10/2019 - Emanuele - Aggiungo radiobutton  per la gestione dei tessuti Barkley/axum/bloom
      Radio Rd31
      {
        Caption = MSG(3369)
        Hint    = MSG(3369)
        Value   = $DLG_value_rd_uso_31

        Placement
        {
           posx = 10
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_31

           $DLG_rivestimento   = 31
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 1
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd32
      {
        Caption = MSG(3370)
        Hint    = MSG(3370)
        Value   = $DLG_value_rd_uso_32

        Placement
        {
           posx = 160
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_32

           $DLG_rivestimento   = 32
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 1
           $DLG_value_rd_uso_33 = 0

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 0

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      Radio Rd33
      {
        Caption = MSG(3371)
        Hint    = MSG(3371)
        Value   = $DLG_value_rd_uso_33

        Placement
        {
           posx = 10
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_var_to_call = $DLG_var_to_call_33

           $DLG_rivestimento   = 33
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 0
           $DLG_value_rd_uso_3 = 0
           $DLG_value_rd_uso_4 = 0
           $DLG_value_rd_uso_5 = 0
           $DLG_value_rd_uso_6 = 0
           $DLG_value_rd_uso_7 = 0
           $DLG_value_rd_uso_8 = 0
           $DLG_value_rd_uso_16 = 0
           $DLG_value_rd_uso_20 = 0
           $DLG_value_rd_uso_21 = 0
           $DLG_value_rd_uso_22 = 0
           $DLG_value_rd_uso_23 = 0
           $DLG_value_rd_uso_24 = 0
           $DLG_value_rd_uso_25 = 0
           $DLG_value_rd_uso_26 = 0
           $DLG_value_rd_uso_27 = 0
           // 10/01/2019 - Emanuele - Aggiungo assegnazioni per la gestione dei nuovi tessuti
           $DLG_value_rd_uso_28 = 0
           $DLG_value_rd_uso_29 = 0
           $DLG_value_rd_uso_30 = 0
           $DLG_value_rd_uso_31 = 0
           $DLG_value_rd_uso_32 = 0
           $DLG_value_rd_uso_33 = 1

           $DLG_outdoor = 0
           $DLG_caption_outdoor = ""
           $DLG_value_outdoor   = ""
           $DLG_hint_outdoor    = ""

           //rob_pec 13/04/2011. riattivo check ignifugazione
           $DLG_ignifugazione_enable = 1

           // ---------------------------------------------------------
           // controllo affinch non venga settato un valore nullo (NO*)
           // ---------------------------------------------------------
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

           while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }
           // ----------------------------------------------------------

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]
      }

      //Check chkOutdoor
      Label chkOutdoor
      {
        Caption = $DLG_caption_outdoor
        Hint    = $DLG_hint_outdoor
        Value   = $DLG_value_outdoor

        Font
        {
           size  = 12
           type  = 1
           color = 255
        }

        Placement
        {
           posx = 310
           posy = 185
           dimx = 130
           dimy = 20
        }
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 290
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 310
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 240
//         posy = 260
         posy = 300
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 240
//         posy = 260
         posy = 300
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 475
         posy = 150
         dimx = 100
         dimy = 22
      }

      OnClick
      [
        // ---------------------------------------------------------
        // controllo affinch non venga settato un valore nullo (NO*)
        // ---------------------------------------------------------
        $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
        $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

        while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
        {
           $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
           $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
        }
        // ---------------------------------------------------------

        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
        GOSUB Get_Image_DivaniAir
      ]
   }

   Button btnLarghezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 135
         posy = 25
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
        if ( $DLG_larghezza > 368
           & $DLG_larghezza < 1840) { $DLG_enable_staffa = 1 }
        else                        { $DLG_enable_staffa = 0 }
      ]
   }

   Button btnAltezza
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(631)

      Placement
      {
         posx = 135
         posy = 50
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza     = STRCAT(MSG(629),STR($DLG_altezza))
        $DLG_caption_altezza  = STR($DLG_altezza)
        $DLG_value_altezza    = STR($DLG_altezza)
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 135
         posy = 90
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }
}

Dlg NEW_AIR_Ripiano
{
   Caption = MSG(864)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 305
      dimy = 255
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmPosizionamento
   {
      Caption = MSG(659)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 120
         dimy = 55
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Enable  = 0
        Value   = $DLG_value_offset

        Placement
        {
           posx = 50
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmRivestimento
   {
      Caption = MSG(863)

      Placement
      {
         posx =  10
         posy =  80
         dimx = 120
         dimy =  70
      }

      Radio rd1
      {
        Caption = MSG(945)
        Hint    = MSG(945)
        Value   = $DLG_rivestimento

        Placement
        {
           posx = 15
           posy = 20
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           // rivestimento
           $DLG_var_to_call  = $DLG_var_to_call_1
           $DLG_rivestimento = 1
           $DLG_laccato      = 0

           while( STRCMP($DLG_COLORE_RIV,$VALORE_NULLO)==0 )
           {
              //$R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $R = CHIEDI(-1,"DLG_COLORE_RIV")
           }
           $DLG_COLORE_AIR = $DLG_COLORE_RIV
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
           GOSUB Get_Image_DivaniAir
        ]

      }

      Radio rd2
      {
        Caption = MSG(722)
        Hint    = MSG(722)
        Value   = $DLG_laccato

        Placement
        {
           posx = 15
           posy = 40
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           // laccato
           $DLG_var_to_call  = $DLG_var_to_call_2
           $DLG_rivestimento = 0
           $DLG_laccato      = 1

           while( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
              $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
           }

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
           GOSUB Get_Image_Opaco
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 135
         posy =  10
         dimx = 150
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  18
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 220
         posy = 190
         dimx =  65
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 135
         posy = 190
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 160
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         if($DLG_rivestimento == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_RIV")

            while( STRCMP($DLG_COLORE_RIV,$VALORE_NULLO)==0 )
               { $R = CHIEDI(-1,"DLG_COLORE_RIV") }

            $DLG_COLORE_AIR = $DLG_COLORE_RIV
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
            GOSUB Get_Image_DivaniAir
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)

            while( STRCMP($DLG_COLORE_AIR,$VALORE_NULLO)==0 )
            {
               $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
               $DLG_COLORE_AIR = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            }

            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_AIR,"colori_tutti.txt")
            $DLG_VAL_COLORE = $DLG_COLORE_AIR
            GOSUB Get_Image_Opaco
         }
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 105
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }

}


Dlg NEW_AIR_CopTesLW
{
   Caption = MSG(887)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 255
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  18
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx =  90
         posy = 190
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  20
         posy = 190
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  35
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
      ]
   }
}


Dlg NEW_AIR_MensLW
{
   Caption = MSG(886)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 355
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza
        Enable  = $DLG_enable_lar_368

        Placement
        {
           posx = 68
           posy = 20
           dimx = 50
           dimy = 20
        }
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtPosizione
      {
        Caption = $DLG_caption_posizione
        Hint    = $DLG_hint_posizione
        Value   = $DLG_value_posizione

        Placement
        {
           posx = 68
           posy = 45
           dimx = 50
           dimy = 20
        }
      }

      Label LblPosizione
      {
        Caption = MSG(433)
        Hint    = MSG(1341)
        Value   = MSG(433)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 68
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx =  10
         posy = 110
         dimx = 150
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  18
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx =  90
         posy = 290
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  20
         posy = 290
         dimx =  70
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  35
         posy = 250
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }

   Button btnPosizione
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1342)

      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_posizione")

        if( $DLG_posizione==-1 )  { $DLG_caption_posizione = MSG(646) }
        if( $DLG_posizione== 1 )  { $DLG_caption_posizione = MSG(647) }
        $DLG_hint_posizione    = STRCAT(MSG(414)," = ",$DLG_caption_posizione)
        $DLG_value_posizione   = $DLG_caption_posizione
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

}

Dlg NEW_AIR_Contenitore
{
   Caption = $titolo_dialog
   Placement
   {
      posx = 150
      posy = 150
      //Massimiliano - allargo la dialog
      //dimx = 485
//      dimx = 630
      dimx = 740
//      dimy = 280
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmPosizionamento
   {
      Caption = MSG(659)

      Placement
      {
         posx =  10
         posy = 110
         dimx = 150
         dimy =  55
      }

      Edit EdtOffset
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Enable  = 0
        Value   = $DLG_value_offset

        Placement
        {
           posx = 60
           posy = 25
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffset
      {
        Caption = MSG(657)
        Hint    = MSG(658)

        Placement
        {
           posx = 15
           posy = 27
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmOrientamento
   {
      Caption = MSG(870)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 90
      }

      Radio rd
      {
        //semre attivo
        Caption = MSG(871)
        Hint    = MSG(871)
        Value   = $DLG_staffa_dx

        Placement
        {
           posx = 20
           posy = 25
           dimx = 80
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Radio rs
      {
        //sempre attivo
        Caption = MSG(872)
        Hint    = MSG(872)
        Value   = $DLG_staffa_sx

        Placement
        {
           posx = 20
           posy = 50
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FinituraContenitore
   {
      Caption = MSG(982)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
//         dimy = 205
         dimy = 155
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraCassetto
   {
      Caption = MSG(968)

      Placement
      {
         posx = 320
         posy = 10
//         dimx = 150
         dimx = 225
//         dimy = 205
         dimy = 310
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var_2
         Value   = $DLG_descrizione_var_2
         Enable  = $DLG_enable_cassetto
         Hint    = $DLG_descrizione_var_2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var_2
         Value   = $DLG_image_file_2
         Enable  = $DLG_enable_cassetto
         Hint    = $DLG_descrizione_var_2

         Placement
         {
//            posx =  45
            posx =  80
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 145
           dimx = 175
           dimy = 20
        }

        OnClick
        [
           // 14/02/2020 - Emanuele - Modifico condizione per la gestione delle finiture XGlass
//           if( $DLG_value_ww==1 )  {  $DLG_COLORE_368_V = "BCO"  }
           if( $DLG_value_lucido_xglass==1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_xglass==1 | $DLG_value_opaco_metal==1 | $DLG_value_ww==1)  {  $DLG_COLORE_368_V = "BCO"  }
           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368_V,".bmp")
           $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)

           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           // 14/02/2020 - Emanuele - Aggiungo assegnazione per la gestione del vetro xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 165
           dimx = 175
           dimy = 20
        }

        OnClick
        [
           // 14/02/2020 - Emanuele - Modifico condizione per la gestione delle finiture xglass
//           if( $DLG_value_ww==1 )  {  $DLG_COLORE_368_V = "BCO"  }
           if( $DLG_value_lucido_xglass==1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_xglass==1 | $DLG_value_opaco_metal==1 | $DLG_value_ww==1)  {  $DLG_COLORE_368_V = "BCO"  }

           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_V,".bmp")
           $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 1
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           // 14/02/2020 - Emanuele - Aggiungo assegnazione per la gestione del vetro xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 185
           dimx = 175
           dimy = 20
        }

        OnClick
        [
           // 14/02/2020 - Emanuele - Modifico condizione per la gesitone delle finiture xglass
//           if( $DLG_value_ww==1 )  {  $DLG_COLORE_368_V = "BCO"  }
           if( $DLG_value_lucido_xglass==1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_xglass==1 | $DLG_value_opaco_metal==1 | $DLG_value_ww==1)  {  $DLG_COLORE_368_V = "BCO"  }

           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_V,".bmp")
           $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 1
           $DLG_value_ww      = 0
           // 14/02/2020 - Emanuele - Aggiungo assegnazione per la gestione del vetro xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio Rdwildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 205
           dimx = 175
           dimy = 20
        }

        OnClick
        [
           // 14/02/2020 - Emanuele - Modifico condizione per la gestione delle finiture xglass
//           if( $DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1 )  {  $DLG_COLORE_368_V = "SZ1"  }
           if( $DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1 | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)  {  $DLG_COLORE_368_V = "SZ1"  }
           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_V,".bmp")
           $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 1
           // 14/02/2020 - Emanuele - Aggiungo assegnazione per la gestione del vetro xglass
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }

      Radio RdLucido_XG
      {
        Caption = MSG(3603)
        Hint    = MSG(3603)
        Value   = $DLG_value_lucido_xglass
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 225
           dimx = 175
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1 | $DLG_value_ww==1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)  {  $DLG_COLORE_368_V = "MR1"  }
           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),$DLG_COLORE_368_V,".bmp")
           $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)
           DLG_COLORE_XGLASS      = $DLG_COLORE_368_V

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           $DLG_value_lucido_xglass = 1
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]

      }

      Radio RdOpaco_XG
      {
        Caption = MSG(3604)
        Hint    = MSG(3604)
        Value   = $DLG_value_opaco_xglass
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 245
           dimx = 175
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1 | $DLG_value_ww==1 | $DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)  {  $DLG_COLORE_368_V = "MR1"  }
           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),$DLG_COLORE_368_V,".bmp")
           $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)
           DLG_COLORE_XGLASS      = $DLG_COLORE_368_V

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 1
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 0
        ]
      }

      Radio RdLucido_MT
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_value_lucido_metal
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 265
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1 | $DLG_value_ww==1 | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)  {  $DLG_COLORE_368_V = "MT4"  }
           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file_2","lucido","DLG_COLORE_METAL")
           DLG_COLORE_METAL      = $DLG_COLORE_368_V

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 1
           $DLG_value_opaco_metal = 0
        ]
      }

      Radio RdOpaco_MT
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_value_opaco_metal
        Enable  = $DLG_enable_cassetto

        Placement
        {
           posx = 15
           posy = 285
           dimx = 200
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_lucido==1 | $DLG_value_opaco==1 | $DLG_value_laccato==1 | $DLG_value_ww==1 | $DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)  {  $DLG_COLORE_368_V = "MT4"  }
           $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_V,"colori_tutti.txt")
           GET_IMAGE("DLG_image_file_2","opaco","DLG_COLORE_METAL")
           DLG_COLORE_METAL      = $DLG_COLORE_368_V

           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_value_laccato = 0
           $DLG_value_ww      = 0
           $DLG_value_lucido_xglass = 0
           $DLG_value_opaco_xglass = 0
           $DLG_value_lucido_metal = 0
           $DLG_value_opaco_metal = 1
        ]
      }

   }

   //Massimiliano 18/04/17 - quando scelgo il colore della scocca in wildwood
   //                        posso cambiare il colore della schiena
   Frame FinituraSchiena
   {
      Caption = MSG(261)

      Placement
      {
//         posx = 475
         posx = 560
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinituraSC
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_descrizione_sch_var
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_sch_var
         Value   = $DLG_image_file_sch
         Hint    = $DLG_descrizione_sch_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
//         posy = 220
         posy = 280
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
//         posy = 220
         posy = 280
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //Massimiliano 20/04/17 - salvo il default per il controllo successivo del cambio colore della schiena
         $DLG_var_to_call_1_prec = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)

         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
         while( STRCMP($DLG_VAL_COLORE,$VALORE_NULLO)==0 )
         {
            $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
         }
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
         GOSUB Get_Image_Opaco

         //Massimiliano 18/04/17 - quando la scocca  wildwood do la possibilit di cambio finitura schiena
         if( IS_MATCH(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"SZ*") )
         {
            if( IS_MATCH($DLG_var_to_call_1_prec,"SZ*")!=1 )
            {
               $DLG_enable_schiena = 1
               //Massimiliano 31/05/17 - imposto il default anche del divisorio/ripiano
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),"SPG",APICI()))
               //Massimiliano 18/12/2018  - aggiungo controllo perch se il frontale  XGLASS non devo mettere il default spago
               //                           ma il colore abbinato da listino del frontale XGLASS
               // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//               if( IF_XGLASS($DLG_COLORE_368) )
               if( IF_XGLASS($DLG_COLORE_368) | IF_METAL($DLG_COLORE_368) )
               {
                  // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati e xglass
                  if(IF_XGLASS($DLG_COLORE_368)) { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_XGLASS($DLG_COLORE_368,$DLG_value_lucido_xglass),APICI())) }
                  if(IF_METAL($DLG_COLORE_368))  { COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),ABBINA_METAL($DLG_COLORE_368,$DLG_value_lucido_metal),APICI())) }

                  $DLG_enable_schiena = 0
               }
               $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
               $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
               $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
            }
         }
         else
         {
            $DLG_enable_schiena = 0
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SC=",APICI(),VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),APICI()))
            $DLG_descrizione_sch_var = $DLG_descrizione_var
            $DLG_image_file_sch   = $DLG_image_file
         }
      ]
   }

   Button btnFinituraCassetto
   {
      Caption = MSG(619)
      Result  = 0
      Enable  = $DLG_enable_cassetto
      Hint    = MSG(620)

      Placement
      {
//         posx = 330
         posx = 370
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1 | $DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_O,".bmp")
            $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)
            $DLG_COLORE_368_V = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368_L,".bmp")
            $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)
            $DLG_COLORE_368_V = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }

         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_W,".bmp")
            $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)
            $DLG_COLORE_368_V = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
         }

         // 14/02/2020 - Emanuele - Aggiungo condizioni per la gestione della finitura xglass
         if($DLG_value_lucido_xglass==1 | $DLG_value_opaco_xglass==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            $DLG_image_file_2      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\xglass",CHR2STR(92),$DLG_COLORE_XGLASS,".bmp")
            $DLG_image_file_2      = SUBST_LABEL($DLG_image_file_2)
            $DLG_COLORE_368_V = $DLG_COLORE_XGLASS
            $DLG_COLORE_368_O = $DLG_COLORE_XGLASS
            $DLG_COLORE_368_W = $DLG_COLORE_XGLASS
         }

         if($DLG_value_lucido_metal==1 | $DLG_value_opaco_metal==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var_2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            if($DLG_value_lucido_metal==1)
            {
               GET_IMAGE("DLG_image_file_2","lucido","DLG_COLORE_METAL")
            }
            if($DLG_value_opaco_metal==1)
            {
               GET_IMAGE("DLG_image_file_2","opaco","DLG_COLORE_METAL")
            }

            $DLG_COLORE_368_V = $DLG_COLORE_METAL
            $DLG_COLORE_368_O = $DLG_COLORE_METAL
            $DLG_COLORE_368_W = $DLG_COLORE_METAL
         }
      ]
   }

   Button btnOffset
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 120
         posy = 135
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset     = STRCAT(MSG(657),STR($DLG_offset))
        $DLG_caption_offset  = STR($DLG_offset)
        $DLG_value_offset    = STR($DLG_offset)
      ]
   }

   //Massimiliano 19/04/17 - nuovo bottone per gestione colore schiena
   Button btnFinituraSC
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_schiena

      Placement
      {
//         posx = 485
         posx = 570
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"GEST_SC")
        //Massimiliano 31/05/17 - imposto il valore della GEST_DI del divisorio/ripiano come quello della schiena
        COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_DI=",APICI(),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),APICI()))

        $DLG_descrizione_sch_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),"colori_tutti.txt")
        $DLG_image_file_sch   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),VAR_VAL_STR($DLG_idx_to_call,"GEST_SC"),".bmp")
        $DLG_image_file_sch   = SUBST_LABEL($DLG_image_file_sch)
      ]
   }
}

// Dlg per Chama con maggiore libert per la scelta del colore del bordo
// Commentata e pronta in caso si decida di lasciare libera in futuro la scelta del bordo
//Dlg Chama
//{
//   Caption = MSG(14)
//
//   Placement
//   {
//      posx = 155
//      posy = 150
//      dimx = 615
//      dimy = 255
//      save_pos = 1
//   }
//
//   Frame FrmMisure
//   {
//      Caption = MSG(514)
//
//      Placement
//      {
//         posx = 10
//         posy = 10
//         dimx = 110
//         dimy = 100
//      }
//
//      Radio Rd552
//      {
//         Caption = MSG(15)
//         Hint    = MSG(15)
//         Value   = $DLG_val_opzione_1
//
//         Placement
//         {
//            posx = 20
//            posy = 30
//            dimx = 140
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_val_opzione_1 = 1
//            $DLG_val_opzione_2 = 0
//         ]
//      }
//
//      Radio Rd736
//      {
//         Caption = MSG(16)
//         Hint    = MSG(16)
//         Value   = $DLG_val_opzione_2
//
//         Placement
//         {
//            posx = 20
//            posy = 60
//            dimx = 140
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_val_opzione_1 = 0
//            $DLG_val_opzione_2 = 1
//         ]
//      }
//   }
//
//   Frame FinituraRB
//   {
//      Caption = MSG(512)
//
//      Placement
//      {
//         posx = 130
//         posy = 10
//         dimx = 150
//         dimy = 167
//      }
//
//      Label LabFinitura
//      {
//         Caption = $DLG_descrizione_var1
//         Value   = $DLG_descrizione_var1
//         Hint    = $DLG_descrizione_var1
//
//         Placement
//         {
//            posx = 25
//            posy = 18
//            dimx = 130
//            dimy = 25
//         }
//      }
//
//      Image Im1
//      {
//         Caption = $DLG_descrizione_var1
//         Value   = $DLG_image_file1
//         Hint    = $DLG_descrizione_var1
//
//         Placement
//         {
//            posx =  25
//            posy =  35
//            dimx = 100
//            dimy = 100
//         }
//      }
//   }
//
//   Frame FinituraRG
//   {
//      Caption = MSG(17)
//
//      Placement
//      {
//         posx = 290
//         posy = 10
//         dimx = 150
//         dimy = 167
//      }
//
//      Label LabFinitura
//      {
//         Caption = $DLG_descrizione_var2
//         Value   = $DLG_descrizione_var2
//         Hint    = $DLG_descrizione_var2
//
//         Placement
//         {
//            posx = 25
//            posy = 18
//            dimx = 130
//            dimy = 25
//         }
//      }
//
//      Image Im1
//      {
//         Caption = $DLG_descrizione_var2
//         Value   = $DLG_image_file2
//         Hint    = $DLG_descrizione_var2
//
//         Placement
//         {
//            posx =  25
//            posy =  35
//            dimx = 100
//            dimy = 100
//         }
//      }
//   }
//
//   Frame FinituraRV
//   {
//      Caption = MSG(18)
//
//      Placement
//      {
//         posx = 450
//         posy = 10
//         dimx = 150
//         dimy = 167
//      }
//
//      Label LabFinitura
//      {
//         Caption = $DLG_descrizione_var3
//         Value   = $DLG_descrizione_var3
//         Hint    = $DLG_descrizione_var3
//
//         Placement
//         {
//            posx = 25
//            posy = 18
//            dimx = 130
//            dimy = 25
//         }
//      }
//
//      Image Im1
//      {
//         Caption = $DLG_descrizione_var3
//         Value   = $DLG_image_file3
//         Hint    = $DLG_descrizione_var3
//
//         Placement
//         {
//            posx =  25
//            posy =  35
//            dimx = 100
//            dimy = 100
//         }
//      }
//   }
//
//   Button btnAnnulla
//   {
//      Caption = MSG(615)
//      Result  = 2
//      Hint = MSG(616)
//
//      Placement
//      {
//         posx = 375
//         posy = 187
//         dimx = 65
//         dimy = 30
//      }
//
//      OnClick
//      [
//         $OK=0
//      ]
//   }
//
//   Button btnOK
//   {
//      Caption = MSG(617)
//      Result  = 1
//      Default = 1
//      Hint = MSG(618)
//
//      Placement
//      {
//         posx = 290
//         posy = 187
//         dimx = 80
//         dimy = 30
//      }
//
//      OnClick
//      [
//         $OK=1
//      ]
//   }
//
//   Button btnFinituraRB
//   {
//      Caption = MSG(619)
//      Result  = 0
//      Hint = MSG(620)
//
//      Placement
//      {
//         posx = 155
//         posy = 150
//         dimx = 100
//         dimy =  22
//      }
//
//      OnClick
//      [
//         //$R = CHIEDI($DLG_idx_to_call,"GEST_RV")
//         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
//         //$DLG_VAL_COLORE1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
//         //GOSUB Get_Image_Rivestimenti_NEW
//         $R = CHIEDI(-1,"DLG_COLORE_1")
//         $DLG_VAL_COLORE_1 = $DLG_COLORE_1
//         while( STRCMP($DLG_COLORE_1,"NOR")==0 )
//           {
//              $R = CHIEDI(-1,"DLG_COLORE_1")
//              $DLG_VAL_COLORE_1 = $DLG_COLORE_1
//           }
//         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_1,"colori_tutti.txt")
//         GOSUB Get_Image_Rivestimenti_NEW
//      ]
//   }
//
//   Button btnFinituraRG
//   {
//      Caption = MSG(619)
//      Result  = 0
//      Hint = MSG(620)
//
//      Placement
//      {
//         posx = 315
//         posy = 150
//         dimx = 100
//         dimy =  22
//      }
//
//      OnClick
//      [
//         //$R = CHIEDI($DLG_idx_to_call,"GEST_RB")
//         //$DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RB"),"colori_tutti.txt")
//         //$DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RB")
//         //GOSUB Get_Image_Rivestimenti_NEW
//         $R = CHIEDI(-1,"DLG_COLORE_2")
//         $DLG_VAL_COLORE_2 = $DLG_COLORE_2
//         while( STRCMP($DLG_COLORE_2,"NOR")==0 )
//           {
//              $R = CHIEDI(-1,"DLG_COLORE_2")
//              $DLG_VAL_COLORE_2 = $DLG_COLORE_2
//           }
//         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_2,"colori_tutti.txt")
//         GOSUB Get_Image_Rivestimenti_NEW
//      ]
//   }
//
//   Button btnFinituraRV
//   {
//      Caption = MSG(619)
//      Result  = 0
//      Hint = MSG(620)
//
//      Placement
//      {
//         posx = 475
//         posy = 150
//         dimx = 100
//         dimy =  22
//      }
//
//      OnClick
//      [
//         //$R = CHIEDI($DLG_idx_to_call,"GEST_RN")
//         //$DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RN"),"colori_tutti.txt")
//         //$DLG_VAL_COLORE3 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RN")
//         //GOSUB Get_Image_Rivestimenti_NEW
//         $R = CHIEDI(-1,"DLG_COLORE_3")
//         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_3,"colori_tutti.txt")
//         $DLG_VAL_COLORE_3 = $DLG_COLORE_3
//         GOSUB Get_Image_Rivestimenti_NEW
//      ]
//   }
//}

Dlg Chama
{
   Caption = MSG(903)

   Placement
   {
      posx = 155
      posy = 150
      dimx = 490
      dimy = 255
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 140
         dimy = 100
      }

      Radio Rd825
      {
         Caption = MSG(904)
         Hint    = MSG(904)
         Value   = $DLG_val_opzione_1

         Placement
         {
            posx = 20
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 1
            $DLG_val_opzione_2 = 0
         ]
      }

      Radio Rd1780
      {
         Caption = MSG(905)
         Hint    = MSG(905)
         Value   = $DLG_val_opzione_2

         Placement
         {
            posx = 20
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 1
         ]
      }
   }

   Frame FrmBordino
   {
      Caption = MSG(805)

      Placement
      {
         posx = 10
         posy = 120
         dimx = 140
         dimy = 100
      }

      Radio RdSch
      {
         Caption = MSG(809)
         Hint    = MSG(809)
         Value   = $DLG_val_opzione_3

         Placement
         {
            posx = 20
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_3 = 1
            $DLG_val_opzione_4 = 0
         ]
      }

      Radio RdMat
      {
         Caption = MSG(810)
         Hint    = MSG(810)
         Value   = $DLG_val_opzione_4

         Placement
         {
            posx = 20
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_3 = 0
            $DLG_val_opzione_4 = 1
         ]
      }
   }

   Frame FinituraRG
   {
      Caption = MSG(906)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 167
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraRV
   {
      Caption = MSG(907)

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 167
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 405
         posy = 187
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 320
         posy = 187
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraRG
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 185
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         //$R = CHIEDI(-1,"DLG_COLORE_CHAMA_2")
         //$DLG_VAL_COLORE_2 = $DLG_COLORE_CHAMA_2
         //while( STRCMP($DLG_COLORE_CHAMA_2,"NOR")==0 )
         //  {
         //     $R = CHIEDI(-1,"DLG_COLORE_CHAMA_2")
         //     $DLG_VAL_COLORE_2 = $DLG_COLORE_CHAMA_2
         //  }
         //$DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_CHAMA_2,"colori_tutti.txt")
         $R = CHIEDI($DLG_idx_to_call,"GEST_RG")
         $DLG_VAL_COLORE_2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RG")
         while( STRCMP($DLG_VAL_COLORE_2,"NOR")==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,"GEST_RG")
              $DLG_VAL_COLORE_2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RG")
           }
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RG"),"colori_tutti.txt")
         GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinituraRV
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 345
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         //$R = CHIEDI(-1,"DLG_COLORE_CHAMA_3")
         //$DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_CHAMA_3,"colori_tutti.txt")
         //$DLG_VAL_COLORE_3 = $DLG_COLORE_CHAMA_3
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         // 28/05/2018 - Emanuele - Modifico GEST_RG in GEST_RV
//         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RG"),"colori_tutti.txt")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE_3 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti_NEW
      ]
   }
}



// ************************************************
// Fabrizio dal 09/01/12
// DIALOG Top Nuovo pe cucine 368
// ************************************************

Dlg Top_A_New
{
   Caption = MSG(250)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 320
      dimy = 420
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraTop
   {
      Caption = MSG(251)
      Hint    = MSG(252)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 350
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_top_var
         Value   = $DLG_descrizione_top_var
         Hint    = $DLG_descrizione_top_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_top_var
         Value   = $DLG_image_file_top
         Hint    = $DLG_descrizione_top_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio Rdlaminato
      {
        Caption = MSG(362)
        Hint    = MSG(362)
        Value   = $DLG_top_laminato
        Enable  = $DLG_enable_radio_top_laminato

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 1
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood = 0
           $DLG_top_acciaio  = 0
           $DLG_top_stone    = 0
           $DLG_top_steel    = 0

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
            $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(254)
        Hint    = MSG(254)
        Value   = $DLG_top_vetro_opaco
        //Enable  = $DLG_enable_radio_top_vetro_opaco
        // Eugenio 17.10.14 Non si vende pi vetro opaco
        //Enable  = 0
        // Eugenio 12.02.15 Riattivo il top vetro opaco per l'ufficio backoffice
        Enable  = $DLG_enable_radio_top_vetro_opaco


        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 1
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood = 0
           $DLG_top_acciaio  = 0
           $DLG_top_stone    = 0
           $DLG_top_steel    = 0

           //abilito gli spessori
           $DLG_enable_radio_top_spess04 = 1
           $DLG_enable_radio_top_spess10 = 1
           //Massimiliano 27/06/14 - nuova misura per top acciaio
            $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      Radio RdVetroLucido
      {
        Caption = MSG(255)
        Hint    = MSG(255)
        Value   = $DLG_top_vetro_lucido
        Enable  = $DLG_enable_radio_top_vetro_lucido

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 1
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood = 0
           $DLG_top_acciaio  = 0
           $DLG_top_stone    = 0
           $DLG_top_steel    = 0

           //abilito gli spessori
           $DLG_enable_radio_top_spess04 = 1
           $DLG_enable_radio_top_spess10 = 1
           //Massimiliano 27/06/14 - nuova misura per top acciaio
            $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      Radio RdQuarzoLucido
      {
        Caption = MSG(365)
        Hint    = MSG(365)
        Value   = $DLG_top_quarzo_lucido
        Enable  = $DLG_enable_radio_top_quarzo_lucido

        Placement
        {
           posx = 15
           posy = 195
           dimx = 120
           dimy = 20
        }

         OnClick
         [
            // se cambio il tipo di top, oltre a risettare la radice e
            // il menu, faccio subito la richiesta della finitura...
            // in quanto al cambio del tipo di top cambia anche
            // il set valori

            //if($DLG_top_laminato==1 | $DLG_top_vetro_opaco |


            $DLG_top_laminato      = 0
            $DLG_top_vetro_opaco   = 0
            $DLG_top_vetro_lucido  = 0
            $DLG_top_quarzo_lucido = 1
            $DLG_top_quarzo_tatum  = 0
            $DLG_top_quarzo_spacco = 0
            //Massimiliano 27/06/14 - nuovi top
            $DLG_top_wildwood = 0
            $DLG_top_acciaio  = 0
            $DLG_top_stone    = 0
            $DLG_top_steel    = 0

            //disabilito gli spessori
            $DLG_enable_radio_top_spess04 = 0
            $DLG_enable_radio_top_spess10 = 0
            //Massimiliano 27/06/14 - nuova misura per top acciaio
            $DLG_enable_radio_top_spess06 = 0

            // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
            // (se sono state modificate nel valore)
            GOSUB DLG_Refresh_Var_TopNew
         ]
      }

      Radio RdQuarzoTatum
      {
        Caption = MSG(366)
        Hint    = MSG(366)
        Value   = $DLG_top_quarzo_tatum
        Enable  = $DLG_enable_radio_top_quarzo_tatum

        Placement
        {
           posx = 15
           posy = 215
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 1
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood = 0
           $DLG_top_acciaio  = 0
           $DLG_top_stone    = 0
           $DLG_top_steel    = 0

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
           $DLG_enable_radio_top_spess06 = 0

            // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      Radio RdQuarzoSpacco
      {
        Caption = MSG(367)
        Hint    = MSG(367)
        Value   = $DLG_top_quarzo_spacco
        Enable  = $DLG_enable_radio_top_quarzo_spacco

        Placement
        {
           posx = 15
           posy = 235
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 1
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood = 0
           $DLG_top_acciaio  = 0
           $DLG_top_stone    = 0
           $DLG_top_steel    = 0

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
           $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      //Massimiliano 27/06/14 - nuovi top
      Radio RdWildwood
      {
        Caption = MSG(384)
        Hint    = MSG(384)
        Value   = $DLG_top_wildwood
        Enable  = $DLG_enable_radio_top_wildwood

        Placement
        {
           posx = 15
           posy = 255
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood      = 1
           $DLG_top_acciaio       = 0
           $DLG_top_stone         = 0
           $DLG_top_steel         = 0

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
           $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      //Massimiliano 27/06/14 - nuovi top
      Radio RdAcciaio
      {
        Caption = MSG(385)
        Hint    = MSG(385)
        Value   = $DLG_top_acciaio
        Enable  = $DLG_enable_radio_top_acciaio

        Placement
        {
           posx = 15
           posy = 275
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood      = 0
           $DLG_top_acciaio       = 1
           $DLG_top_stone         = 0
           $DLG_top_steel         = 0

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
           $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      //Massimiliano 27/06/14 - nuovi top
      Radio RdStone
      {
        Caption = MSG(386)
        Hint    = MSG(386)
        Value   = $DLG_top_stone
        Enable  = 0
        //Enable  = $DLG_enable_radio_top_stone

        Placement
        {
           posx = 15
           posy = 295
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood      = 0
           $DLG_top_acciaio       = 0
           $DLG_top_stone         = 1
           $DLG_top_steel         = 0

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
           $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      //Massimiliano 04/07/16 - aggiungo nuovo top steel +
      Radio RdSteel
      {
        Caption = MSG(2433)
        Hint    = MSG(2433)
        Value   = $DLG_top_steel
        Enable  = $DLG_enable_radio_top_steel

        Placement
        {
           posx = 15
           posy = 315
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_top_laminato      = 0
           $DLG_top_vetro_opaco   = 0
           $DLG_top_vetro_lucido  = 0
           $DLG_top_quarzo_lucido = 0
           $DLG_top_quarzo_tatum  = 0
           $DLG_top_quarzo_spacco = 0
           //Massimiliano 27/06/14 - nuovi top
           $DLG_top_wildwood      = 0
           $DLG_top_acciaio       = 0
           $DLG_top_stone         = 0
           //Massimiliano 04/07/16 - nuovo top steel
           $DLG_top_steel         = 1

           //disabilito gli spessori
           $DLG_enable_radio_top_spess04 = 0
           $DLG_enable_radio_top_spess10 = 0
           //Massimiliano 27/06/14 - nuova misura per top acciaio
           $DLG_enable_radio_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }


   }

   Frame SpessoreTop
   {
      Caption = MSG(368)
      Hint = MSG(369)

      Placement
      {
         posx = 170
         posy = 140
         dimx = 125
         dimy = 90
      }

      Radio Spess10
      {
        Caption = "1 cm"
        Hint    = "1 cm"
        Value   = $DLG_top_spess10
        Enable  = $DLG_enable_radio_top_spess10

        Placement
        {
           posx = 15
           posy = 25
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_top_spess10 = 1
           $DLG_top_spess04 = 0
           $DLG_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew

        ]
      }

      Radio Spess04
      {
        Caption = "0,4 cm"
        Hint    = "0,4 cm"
        Value   = $DLG_top_spess04
        Enable  = $DLG_enable_radio_top_spess04

        Placement
        {
           posx = 15
           posy = 45
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_top_spess10 = 0
           $DLG_top_spess04 = 1
           $DLG_top_spess06 = 0

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

      //Massimiliano 27/06/14 - nuovo top
      Radio Spess06
      {
        Caption = "0,6 cm"
        Hint    = "0,6 cm"
        Value   = $DLG_top_spess06
        Enable  = $DLG_enable_radio_top_spess06

        Placement
        {
           posx = 15
           posy = 65
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           $DLG_top_spess10 = 0
           $DLG_top_spess04 = 0
           $DLG_top_spess06 = 1

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

   }

   //Massimiliano 04/07/16 - gestisco quando sono top steel
   Frame SporgenzaTop
   {
      Caption = MSG(2434)
      Hint = MSG(2434)

      Placement
      {
         posx = 170
         posy = 255
         dimx = 125
         dimy = 105
      }

      Edit Edtmisure
      {
         Caption = $DLG_caption_sporg
         Hint    = $DLG_hint_sporg
         Value   = $DLG_value_sporg
         Enable  = $DLG_top_steel

         Placement
         {
            posx = 10
            posy = 20
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Edit Edtverso
      {
         Caption = $DLG_caption_verso
         Hint    = $DLG_hint_verso
         Value   = $DLG_value_verso
         Enable  = $DLG_top_steel

         Placement
         {
            posx = 10
            posy = 50
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      //Check chkDogato
      //{
      //   Caption = MSG(2435)
      //   Hint    = MSG(2435)
      //   Value   = $DLG_steel_dogato
      //   Enable  = $DLG_top_steel
      //
      //   Placement
      //   {
      //     posx = 10
      //     posy = 80
      //     dimx = 100
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     if($DLG_steel_dogato==0 )
      //     {
      //        $DLG_steel_dogato = 1
      //     }
      //     else
      //     {
      //        $DLG_steel_dogato = 0
      //     }
      //  ]
      //
      //}

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx =  95
         posy = 360
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 360
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   // Cambio finitura top
   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(256)

      Placement
      {
         posx = 15
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [

         // Verifico che i valori inseriti siano corretti
         if( VAR_EXIST($DLG_idx_to_call,"VAR_colore_gest")==1 )
         {
            $DLG_var_to_call = VAR_VAL_STR($DLG_idx_to_call,"VAR_colore_gest")
            $DLG_COLORE_TOP  = $VALORE_NULLO

            //DEBUG COMANDO2(STRCAT("     LOGMSG: $DLG_COLORE_TOP=",$DLG_COLORE_TOP))
            //DEBUG COMANDO2(STRCAT("     LOGMSG: $DLG_var_to_call=",$DLG_var_to_call))

            while( STRCMP($DLG_COLORE_TOP,$VALORE_NULLO)==0 )
            {
               //DISPLAY2(STRCAT("$DLG_COLORE_TOP=",$DLG_COLORE_TOP))
               //DISPLAY2(STRCAT("CHIEDO","\n$DLG_idx_to_call=",STR($DLG_idx_to_call),"\n$DLG_var_to_call=",$DLG_var_to_call))
               $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call)
               $DLG_COLORE_TOP = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call)
            }

            // mi prendo i dati aggiornati
            $DLG_descrizione_top_var = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,$DLG_var_to_call)
            $DLG_descrizione_top_var = UPPER($DLG_descrizione_top_var)
         }

         // ------------------------------------------------------------------
         // Fabrizio: al momento le prendo cos....(come dal "vecchio" TOP_A)
         // sarebbe pi bello prendere l'm_rivestimento dichiarato nel DB
         // ------------------------------------------------------------------
         GOSUB DLG_GetImage_TopNew
      ]
   }

   Button btnSporg
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)
      Enable  = $DLG_top_steel

      Placement
      {
         posx = 260
         posy = 275
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_sporg_steel")

         $DLG_hint_sporg    = STRCAT(MSG(624),"=",STR($DLG_sporg_steel))
         $DLG_value_sporg   = STR($DLG_sporg_steel)
         $DLG_caption_sporg = STR($DLG_sporg_steel)
      ]
   }

   Button btnVerso
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)
      Enable  = $DLG_top_steel

      Placement
      {
         posx = 260
         posy = 305
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_verso_sporg")

         if( $DLG_verso_sporg == 0 )  {  $DLG_caption_verso = MSG(2436)  }
         if( $DLG_verso_sporg == 1 )  {  $DLG_caption_verso = MSG(647)   }
         if( $DLG_verso_sporg == 2 )  {  $DLG_caption_verso = MSG(646)   }
         $DLG_hint_verso    = $DLG_caption_verso
         $DLG_value_verso   = $DLG_caption_verso
         if( $DLG_verso_sporg == 0 )
         {
            $DLG_sporg_steel = 0

            $DLG_hint_sporg    = STRCAT(MSG(624),"=",STR($DLG_sporg_steel))
            $DLG_value_sporg   = STR($DLG_sporg_steel)
            $DLG_caption_sporg = STR($DLG_sporg_steel)
         }
      ]
   }

}

Dlg Top_A_New_TaglioAng
{
   Caption = MSG(266)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 305
      dimy = 275
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Image ImgTagSx
   {
      Caption = MSG(267)
      Value   = $DLG_image_file1
      Hint    = MSG(267)

      Placement
      {
         posx =  10
         posy =  10
         dimx =  128
         dimy =  128
      }
   }

   Bevel Bvl1
   {
      Placement
      {
         posx = 148
         posy = 10
         dimx = 2
         dimy = 140
      }
   }

   Image ImgTagDx
   {
      Caption = MSG(268)
      Value   = $DLG_image_file2
      Hint    = MSG(268)

      Placement
      {
         posx =  160
         posy =  10
         dimx =  128
         dimy =  128
      }
   }

   Radio rdTaglioSx
   {
      Caption = MSG(267)
      Hint    = MSG(267)
      Value   = $DLG_val_opzione_1

      Placement
      {
         posx =  15
         posy =  155
         dimx =  140
         dimy =  20
      }

      OnClick
      [
        $DLG_val_opzione_1 = 1
        $DLG_val_opzione_2 = 0
      ]

   }

   Radio rdTaglioDx
   {
      Caption = MSG(268)
      Hint    = MSG(268)
      Value   = $DLG_val_opzione_2

      Placement
      {
         posx =  175
         posy =  155
         dimx =  140
         dimy =  20
      }

      OnClick
      [
        $DLG_val_opzione_1 = 0
        $DLG_val_opzione_2 = 1
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 120
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 220
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }
}
// ************************************************
// ************************************************


Dlg School
{
   Caption = MSG(998)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 325
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(945)

      Placement
      {
         posx = 160
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 160
         dimx =  65
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)
      Enable = $DLG_enable_seduta

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,$DLG_VAR_SCHOOL)
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_VAR_SCHOOL),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_VAR_SCHOOL)
         GOSUB Get_Image_Rivestimenti
         if( $DLG_res_2016 == 1 )
         {
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_VAR_SCHOOL),"colori_school2.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_VAR_SCHOOL)
            GOSUB Get_Image_Opaco
         }
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)

      Placement
      {
         posx =  20
         posy = 115
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_tutti.txt")
         if( $DLG_res_2016 == 1 )
         {
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PR"),"colori_school.txt")
         }
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}



Dlg 36e8_Schiena
{
   Caption = MSG(416)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 360
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoSchiena
   {
      Caption = MSG(417)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
//         dimy = 130
         dimy = 170
      }

      Radio VetroLucido
      {
        Caption = MSG(375)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_luc

        Placement
        {
           posx = 10
           posy = 30
           dimx = 170
           dimy = 20
        }


        OnClick
        [
          $DLG_tipo_schiena = 1
          $DLG_value_schiena_luc = 1
          $DLG_value_schiena_opa = 0
          // 06/09/2018 - Emanuele - Aggiungo variabili per la gestione delle finiture Xglass
          $DLG_tipo_XGlass = 0
          $DLG_value_luc_xglass = 0
          $DLG_value_opa_xglass = 0
          // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
          $DLG_tipo_Metal=0
          $DLG_value_luc_metal = 0
          $DLG_value_opa_metal = 0

          // 06/09/2018 - Emanuele - Aggiungo assegnazione della descrizione ed immagine per dialog
          $DLG_COLORE_368_L = "BCO"
          $DLG_COLORE_368 = $DLG_COLORE_368_L
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori2.txt")
          GOSUB Get_Image_368
        ]

      }

      Radio VetroOpaco
      {
        Caption = MSG(376)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_opa

        Placement
        {
           posx = 10
           posy = 50
           dimx = 170
           dimy = 20
        }


        OnClick
        [
          $DLG_tipo_schiena = 0
          $DLG_value_schiena_luc = 0
          $DLG_value_schiena_opa = 1
          // 06/09/2018 - Emanuele - Aggiungo variabili per la gestione delle finiture XGlass
          $DLG_tipo_XGlass = 0
          $DLG_value_luc_xglass = 0
          $DLG_value_opa_xglass = 0
          // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
          $DLG_tipo_Metal=0
          $DLG_value_luc_metal = 0
          $DLG_value_opa_metal = 0

          // 06/09/2018 - Emanuele - Aggiungo assegnazione della descrizione ed immagine dialog
          $DLG_COLORE_368_O = "BCO"
          $DLG_COLORE_368 = $DLG_COLORE_368_O
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori2.txt")
          GOSUB Get_Image_368
        ]

      }

      Radio XGlassL
      {
        Caption = $DLG_caption_xglassL
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_luc_xglass

        Placement
        {
           posx = 10
           posy = 70
           dimx = 180
           dimy = 20
        }


        OnClick
        [
          $DLG_tipo_schiena = 1
          $DLG_value_schiena_luc = 0
          $DLG_value_schiena_opa = 0
          // 06/09/2018 - Emanuele - Aggiungo variabili per la gestione delle finiture XGlass
          $DLG_tipo_XGlass = 1
          $DLG_value_luc_xglass = 1
          $DLG_value_opa_xglass = 0
          // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
          $DLG_tipo_Metal=0
          $DLG_value_luc_metal = 0
          $DLG_value_opa_metal = 0

          $DLG_COLORE_XGLASS = "MR1"
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
          GOSUB Get_Image_XGlass
        ]

      }

      Radio XGlassO
      {
        Caption = $DLG_caption_xglassO
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_opa_xglass

        Placement
        {
           posx = 10
           posy = 90
           dimx = 180
           dimy = 20
        }


        OnClick
        [
          $DLG_tipo_schiena = 0
          $DLG_value_schiena_luc = 0
          $DLG_value_schiena_opa = 0
          // 06/09/2018 - Emanuele - Aggiungo variabili per la gestione delle finiture XGlass
          $DLG_tipo_XGlass = 1
          $DLG_value_luc_xglass = 0
          $DLG_value_opa_xglass = 1
          // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
          $DLG_tipo_Metal=0
          $DLG_value_luc_metal = 0
          $DLG_value_opa_metal = 0

          $DLG_COLORE_XGLASS = "MR1"
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
          GOSUB Get_Image_XGlass
        ]

      }
      // 20/05/2019 - Emanuele - Aggiungo radiobutton per metallizzato
      Radio LuMetal
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Enable  = 1
        Value   = $DLG_value_luc_metal

        Placement
        {
           posx = 10
           posy = 110
           dimx = 180
           dimy = 20
        }


        OnClick
        [
          $DLG_tipo_schiena = 1
          $DLG_value_schiena_luc = 0
          $DLG_value_schiena_opa = 0
          // 06/09/2018 - Emanuele - Aggiungo variabili per la gestione delle finiture XGlass
          $DLG_tipo_XGlass = 0
          $DLG_value_luc_xglass = 0
          $DLG_value_opa_xglass = 0
          // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
          $DLG_tipo_Metal=1
          $DLG_value_luc_metal = 1
          $DLG_value_opa_metal = 0

          $DLG_COLORE_METAL = "MT4"
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
          GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
        ]

      }

      Radio OpMetal
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Enable  = 1
        Value   = $DLG_value_opa_metal

        Placement
        {
           posx = 10
           posy = 130
           dimx = 180
           dimy = 20
        }


        OnClick
        [
          $DLG_tipo_schiena = 0
          $DLG_value_schiena_luc = 0
          $DLG_value_schiena_opa = 0
          // 06/09/2018 - Emanuele - Aggiungo variabili per la gestione delle finiture XGlass
          $DLG_tipo_XGlass = 0
          $DLG_value_luc_xglass = 0
          $DLG_value_opa_xglass = 0
          // 20/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzato
          $DLG_tipo_Metal=1
          $DLG_value_luc_metal = 0
          $DLG_value_opa_metal = 1

          $DLG_COLORE_METAL = "MT4"
          $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
          GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
        ]

      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 190
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
//         posx = 250
         posx = 270
         posy = 150
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
//         posx = 165
         posx = 185
         posy = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 200
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 06/09/2018 - Emanuele - Aggiungo condizione per la gestione delle finiture Xglass
         // 20/05/2019 - Emanuele - Modifico condizione per metallizzati
//         if($DLG_tipo_XGlass==0)
         if($DLG_tipo_XGlass==0 & $DLG_tipo_Metal==0)
         {
            if( $DLG_value_schiena_luc == 1 ) { $R = CHIEDI(-1,"DLG_COLORE_368_L")  $DLG_COLORE_368 = $DLG_COLORE_368_L }
            if( $DLG_value_schiena_opa == 1 ) { $R = CHIEDI(-1,"DLG_COLORE_368_O")  $DLG_COLORE_368 = $DLG_COLORE_368_O }

            // Fabrizio: deve per forza essere una tabella tipo TabStringa
            // anche se il valore arriva da una TabBmp, altrimenti la
            // funzione DESCRIZIONE_VAL_TAB non funziona
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            GOSUB Get_Image_368
         }
         // 20/05/2019 - Emanuele - Modifico condizione per metallizzati
//         if($DLG_tipo_XGlass==1)
         if($DLG_tipo_XGlass==1 & $DLG_tipo_Metal==0)
         {
            $R = CHIEDI(-1,"DLG_COLORE_XGLASS")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_XGLASS,"colori_tutti.txt")
            GOSUB Get_Image_XGlass
         }
         // 20/05/2019 - Emanuele - Aggiungo condizione per metallizzati
         if($DLG_tipo_XGlass==0 & $DLG_tipo_Metal==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            if($DLG_value_luc_metal==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            else                        { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL") }
         }
      ]
   }
}


Dlg Voila30MM
{
   Caption = MSG(448)

   Placement
   {
      posx = 155
      posy = 150
      // dimx = 660
      dimx = 820
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Settaggi
   {
      Caption = MSG(449)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 162
      }

      Label LblApertura
      {
        Caption = MSG(104)
        Hint    = MSG(454)
        Value   = MSG(104)
        Enable  = $DLG_en_apertura_Voila

        Placement
        {
           posx = 10
           posy = 23
           dimx = 80
           dimy = 20
        }

      }

      Edit EdtApertura
      {
        Caption = $DLG_caption_apertura_Voila
        Hint    = $DLG_hint_apertura_Voila
        Value   = $DLG_value_apertura_Voila
        Enable  = $DLG_en_apertura_Voila

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Check chkNicSx
      {
         Caption = MSG(450)
         Hint    = MSG(450)
         Enable  = $DLG_en_Nick_Sx
         Value   = $DLG_Nick_Sx

         Placement
         {
            posx = 10
            posy = 55
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_materasso==1)
            {
               $DLG_materasso=1
               $DLG_en_tipo_materasso=1
            }
            else
            {
               $DLG_materasso=0
               $DLG_en_tipo_materasso=0
            }
         ]
      }

      Check chkNicDx
      {
         Caption = MSG(451)
         Hint    = MSG(451)
         Enable  = $DLG_en_Nick_Dx
         Value   = $DLG_Nick_Dx

         Placement
         {
            posx = 10
            posy = 80
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_materasso==1)
            {
               $DLG_materasso=1
               $DLG_en_tipo_materasso=1
            }
            else
            {
               $DLG_materasso=0
               $DLG_en_tipo_materasso=0
            }
         ]
      }

      Check chkTop
      {
         Caption = MSG(452)
         Hint    = MSG(452)
         Value   = $DLG_Top_Voila
         Enable  = 1

         Placement
         {
            posx = 10
            posy = 105
            dimx = 120
            dimy = 20

         }

         OnClick
         [
            if( $DLG_Top_Voila==1 )
            {
               $DLG_Top_Voila       = 1
               $DLG_Carter_Voila    = 0
               $DLG_en_Carter_Voila = 0
            }
            else
            {
               $DLG_Top_Voila       = 0
               $DLG_en_Carter_Voila = 1
            }
         ]
      }

      Check chkCarter
      {
         Caption = MSG(453)
         Hint    = MSG(453)
         Value   = $DLG_Carter_Voila
         Enable  = $DLG_en_Carter_Voila

         Placement
         {
            posx = 10
            posy = 130
            dimx = 120
            dimy = 20

         }

         OnClick
         [
            if( $DLG_Carter_Voila==1 )
            {
               $DLG_Carter_Voila=1
            }
            else
            {
               $DLG_Carter_Voila=0
            }
         ]
      }
   }

   Frame FinituraTenda
   {
      Caption = MSG(456)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }
   }

   Frame FinituraProfili
   {
      Caption = MSG(457)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 150
         dimy = 162
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }
   }

   Frame FinituraTop
   {
      Caption = MSG(458)

      Placement
      {
         posx = 490
         posy = 10
         dimx = 150
         dimy = 202
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_Top_Voila

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3
         Enable  = $DLG_Top_Voila

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Radio RdVetroOpaco
      {
        Caption = MSG(254)
        Hint    = MSG(254)
        Value   = $DLG_value_opaco
        Enable  = $DLG_Top_Voila

        Placement
        {
           posx = 27
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 1
        ]
      }

      Radio RdVetroLucido
      {
        Caption = MSG(255)
        Hint    = MSG(255)
        Value   = $DLG_value_lucido
        Enable  = $DLG_Top_Voila

        Placement
        {
           posx = 27
           posy = 180
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0

           //abilito gli spessori
           $DLG_enable_radio_top_spess04 = 1
           $DLG_enable_radio_top_spess10 = 1

           // Fabrizio: modifico e salvo subito le variabili dell'archetipo.
           // (se sono state modificate nel valore)
           GOSUB DLG_Refresh_Var_TopNew
        ]
      }

   }

   Frame FinituraTenda2
   {
      Caption = $DLG_STR_T1

      Placement
      {
         posx = 650
         posy = 10
         dimx = 150
         dimy = 202
      }

      Label LabFinitura
      {
         //Caption = $DLG_descrizione_var4
         //Value   = $DLG_descrizione_var4
         //Hint    = $DLG_descrizione_var4
         Caption = $DLG_descrizione_var5
         Value   = $DLG_descrizione_var5
         Hint    = $DLG_descrizione_var5
         Enable  = 1

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         //Caption = $DLG_descrizione_var4
         //Value   = $DLG_image_file4
         //Hint    = $DLG_descrizione_var4
         Caption = $DLG_descrizione_var5
         Value   = $DLG_image_file5
         Hint    = $DLG_descrizione_var5
         Enable  = 1

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check chkSecTessuto
      {
         Caption = $DLG_STR_T2
         Hint    = $DLG_STR_T2
         Value   = $DLG_value_tessuto
         //Enable  = $DLG_enable_tessuto_T2
         Enable  = 1

         Placement
         {
           posx = 27
           posy = 170
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_value_tessuto = 1
            //if( $DLG_value_tessuto == 1 ) { $DLG_value_tessuto = 1 }
            //else
            //{
            //   $DLG_value_tessuto = 0
            //   COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_SY=",APICI(),"Z19",APICI()))
            //   $DLG_VAL_COLORE_4 = VAR_VAL_STR($DLG_idx_to_call,"GEST_SY")
            //   $DLG_descrizione_var4 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SY"),"colori_tutti.txt")
            //   GOSUB Get_Image_Rivestimenti_NEW
            //}
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint    = MSG(616)

      Placement
      {
         posx = 255
         posy = 182
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint    = MSG(618)

      Placement
      {
         posx = 170
         posy = 182
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnApertura
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(455)
      Enable  = $DLG_en_apertura_Voila

      Placement
      {
         posx = 135
         posy = 31
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_apertura_Voila")
        if(STRCMP($DLG_apertura_Voila,"APD")==0)  { $DLG_value_apertura_Voila = "DX" }
        if(STRCMP($DLG_apertura_Voila,"APS")==0)  { $DLG_value_apertura_Voila = "SX" }
        if(STRCMP($DLG_apertura_Voila,"APE")==0)  { $DLG_value_apertura_Voila = "DX+SX" }
        $DLG_hint_apertura_Voila    = STRCAT(MSG(108)," = ",$DLG_value_apertura_Voila)
        $DLG_caption_apertura_Voila = $DLG_apertura_Voila
      ]
   }

   Button btnFinituraTenda
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 195
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
         $DLG_VAL_COLORE_1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
         while( STRCMP($DLG_VAL_COLORE_1,"LOP")==0 | STRCMP($DLG_VAL_COLORE_1,"NOR")==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
              $DLG_VAL_COLORE_1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
           }
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ"),"colori_tutti.txt")
         // Eugenio 26.11.14 La new mi sputtana l'immagine sulla finestra dei rpfili
         //GOSUB Get_Image_Rivestimenti_NEW
         GOSUB Get_Image_Rivestimenti_Voila
         //$R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         //$DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         //$DLG_VAL_COLORE1 = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         //GOSUB Get_Image_Rivestimenti_NEW
      ]
   }

   Button btnFinituraProfili
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 355
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call_f,"GEST_PF")
         $DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call_f,"GEST_PF")
         while( STRCMP($DLG_VAL_COLORE2,"LOP")==0 | STRCMP($DLG_VAL_COLORE2,"L--")==0 )
           {
              $R = CHIEDI($DLG_idx_to_call_f,"GEST_PF")
              $DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call_f,"GEST_PF")
           }
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_f,"GEST_PF"),"colori_tutti.txt")
         GOSUB Get_Image_Opaco_NEW
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_Top_Voila

      Placement
      {
         posx = 515
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_368_TOP")
         $DLG_VAL_COLORE3 = $DLG_COLORE_368_TOP
         while( STRCMP($DLG_VAL_COLORE3,"LOP")==0 | STRCMP($DLG_VAL_COLORE3,"L--")==0 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_TOP")
              $DLG_VAL_COLORE3 = $DLG_COLORE_368_TOP
           }
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_TOP,"colori_tutti.txt")
         if ( $DLG_value_lucido == 1 ) { GOSUB Get_Image_Lucido_NEW }
         else                          { GOSUB Get_Image_Opaco_NEW  }
      ]
   }

   Button btnFinituraTenda2
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_value_tessuto

      Placement
      {
         posx = 675
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         //$R = CHIEDI($DLG_idx_to_call,"GEST_SY")
         //$DLG_VAL_COLORE_4 = VAR_VAL_STR($DLG_idx_to_call,"GEST_SY")
         //$DLG_descrizione_var4 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SY"),"colori_tutti.txt")
         //GOSUB Get_Image_Rivestimenti_Voila
         //if( STRCMP( $DLG_VAL_COLORE_4,"Z19") == 0 ) { $DLG_value_tessuto = 0 }
         $R = CHIEDI($DLG_idx_to_call_x,"GEST_RZ")
         $DLG_VAL_COLORE_5 = VAR_VAL_STR($DLG_idx_to_call_x,"GEST_RZ")
         $DLG_descrizione_var5 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_x,"GEST_RZ"),"colori_tutti.txt")
         GOSUB Get_Image_Rivestimenti_Voila
         //if( STRCMP( $DLG_VAL_COLORE_5,"Z19") == 0 ) { $DLG_value_tessuto = 0 }
      ]
   }
}

Dlg 30MM_PiastraWeight
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 240
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 90
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 55
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FrmQtaTass
   {
      //Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 105
         dimx = 150
         dimy = 50
      }

      Edit EdtQtaTas
      {
        Caption = MSG(898)
        Hint    = MSG(898)
        Value   = $DLG_value_tasselli

        Placement
        {
           posx = 105
           posy = 15
           dimx = 35
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblQtaTas
      {
        //sempre attivo
        Caption = MSG(898)
        Hint    = MSG(898)
        Value   = MSG(898)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 90
           dimy = 20
        }

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 170
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 170
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $DLG_tasselli = ATOI($DLG_value_tasselli)
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)

      Placement
      {
         posx = 135
         posy = 65
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }
}

Dlg 30MM_Fianco_Weightless
{
   Caption = MSG(421)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 320
      dimy = 180
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(807)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 140
         dimy = 65
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(425)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 28
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 60
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 155
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 113
         dimx = 60
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 113
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 165
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_30MM")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        GOSUB Get_Image_30MM
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(427)

      Placement
      {
         posx = 120
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
        //Dimitri 080603
        //$R = CHIEDI(-1,"DLG_altezza_30mm")
        //$DLG_hint_altezza    = STRCAT(MSG(428)," = ",APICI(),$DLG_altezza_30mm,APICI())
        //$DLG_caption_altezza = $DLG_altezza_30mm
        //$DLG_value_altezza   = $DLG_altezza_30mm

      ]
   }
}

Dlg 30MM_Schiena_Weightless
{
   Caption = MSG(416)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 485
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoSchiena
   {
      Caption = MSG(417)
      //Hint = "Modificare la posizione ripiano selezionato"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 130
      }

      Radio Laccato
      {
        Caption = MSG(722)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_lac

        Placement
        {
           posx = 10
           posy = 30
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           //ER 12.06.12 La stringa sotto  un valore da non tradurre
           $DLG_tipo_schiena = "LACCATO"
           $DLG_value_schiena_lac = 1
           $DLG_value_schiena_vet = 0
           $DLG_value_schiena_tes = 0
           $DLG_enable_rd_lucido_368 = 0
           $DLG_enable_rd_opaco_368 = 0
        ]

      }

      Radio VetroColorato
      {
        Caption = MSG(419)
        Hint    = ""
        Enable  = 1
        Value   = $DLG_value_schiena_vet

        Placement
        {
           posx = 10
           posy = 60
           dimx = 100
           dimy = 20
        }


        OnClick
        [
           //ER 12.06.12 La stringa sotto  un valore da non tradurre
           $DLG_tipo_schiena = "VETRO COLORATO"
           $DLG_value_schiena_lac = 0
           $DLG_value_schiena_vet = 1
           $DLG_value_schiena_tes = 0
           $DLG_enable_rd_lucido_368 = 1
           $DLG_enable_rd_opaco_368 = 1
           $DLG_COLORE_30MM = $DLG_COLORE_30MM_V
           $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
           GOSUB Get_Image_30MM_SchVL
        ]

      }

//      Radio Tessuto
//      {
//        Caption = MSG(467)
//        Hint    = ""
//        Enable  = 1
//        Value   = $DLG_value_schiena_tes
//
//        Placement
//        {
//           posx = 10
//           posy = 90
//           dimx = 100
//           dimy = 20
//        }
//
//
//        OnClick
//        [
//          $DLG_tipo_schiena = "TESSUTO"
//          $DLG_value_schiena_lac = 0
//          $DLG_value_schiena_vet = 0
//          $DLG_value_schiena_tes = 1
//        ]
//
//      }

   }

   Frame Finitura
   {
      Caption = MSG(602)
      //Hint = "Modificare la finitura del ripiano selezionato"

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 130
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraVetro
   {
      Caption = MSG(855)

      Placement
      {
         //posx = 165
         posx = 320
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           GOSUB Get_Image_30MM_SchVL
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           GOSUB Get_Image_30MM_SchVL
        ]

      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if( $DLG_value_schiena_tes==1 )
         {
            VAR_SET_MENU (-1,"DLG_COLORE_30MM_V","colori_Voila.txt")
         }
         else
         {
            VAR_SET_MENU (-1,"DLG_COLORE_30MM_V","colori2_opa_bmp.txt")
         }

         $R = CHIEDI(-1,"DLG_COLORE_30MM_V")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM_V,"colori_tutti.txt")
         if( $DLG_value_schiena_tes==1 )   { GOSUB Get_Image_30MM_SchTes }
         else                              { GOSUB Get_Image_30MM_SchVL  }
         if( $DLG_value_schiena_vet == 1 )
         {
            $DLG_COLORE_30MM = $DLG_COLORE_30MM_V
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
            GOSUB Get_Image_30MM_SchVL
         }
      ]
   }

   Button FinituraVetro
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_value_schiena_vet

      Placement
      {
         posx = 330
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         VAR_SET_MENU (-1,"DLG_COLORE_30MM","colori2_opa_bmp.txt")

         $R = CHIEDI(-1,"DLG_COLORE_30MM")

         // Fabrizio: deve per forza essere una tabella tipo TabStringa
         // anche se il valore arriva da una TabBmp, altrimenti la
         // funzione DESCRIZIONE_VAL_TAB non funziona
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
         GOSUB Get_Image_30MM_SchVL
      ]
   }
}

Dlg SchEtVoila
{
   Caption = MSG(153)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 335
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         //posx = 10
         //posy = 10
         posx = 10
         posy = 10
         dimx = 150
         dimy = 75
      }

      Edit EdtLarghezza
      {
        //semre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Finitura
   {
      Caption = MSG(855)
      Enable  = $DLG_enable_frame1

      Placement
      {
         //posx = 320
         posx = 170
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  32
            posy =  40
            dimx =  85
            dimy =  85
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 165
         posy = 225
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 80
         posy = 225
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(859)

      Placement
      {
         //posx = 135
         posx = 135
         //posy = 35
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI(-1,"DLG_larghezza_368")
          $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",STR($DLG_larghezza_368))
          $DLG_caption_larghezza_368 = STR($DLG_larghezza_368)
          $DLG_value_larghezza_368   = STR($DLG_larghezza_368)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(34)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         //posx = 135
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",STR($DLG_altezza_368))
        $DLG_caption_altezza_368 = STR($DLG_altezza_368)
        $DLG_value_altezza_368   = STR($DLG_altezza_368)
      ]
   }

   Check chkProfSup
   {
      Caption = MSG(876)
      Hint    = MSG(876)
      Enable  = 1
      Value   = $DLG_value_rd_uso_1

      Placement
      {
         posx = 20
         posy = 190
         dimx = 150
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_rd_uso_1==1)  {  $DLG_value_rd_uso_1=1  }
         else                        {  $DLG_value_rd_uso_1=0  }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 180
         posy = 145
         dimx = 130
         dimy = 25
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
         while( STRCMP($DLG_VAL_COLORE,"LOP")==0 | STRCMP($DLG_VAL_COLORE,"NOR")==0 )
           {
              $R = CHIEDI($DLG_idx_to_call,"GEST_RZ")
              $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ")
           }
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RZ"),"colori_tutti.txt")
         GOSUB Get_Image_Rivestimenti
      ]
   }

   Bevel Bvl
   {
     Placement
     {
        posx = 10
        posy = 215
        dimx = 310
        dimy = 2
     }
   }

}

Dlg Letti_ContWL
{
   Caption = MSG(102)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 490
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 100
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza_368
        Hint    = $DLG_hint_altezza_368
        Enable  = $DLG_enable_alt_368
        Value   = $DLG_value_altezza_368

        Placement
        {
           posx = 70
           posy = 45
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita_368
        Hint    = $DLG_hint_profondita_368
        Enable  = $DLG_enable_pro_368
        Value   = $DLG_value_profondita_368

        Placement
        {
           posx = 70
           posy = 70
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(85)
        Enable  = $DLG_enable_alt_368
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 50
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(86)
        Enable  = $DLG_enable_pro_368
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 75
           dimx = 80
           dimy = 20
        }

      }
   }

   Edit EdtOffset
   {
      Caption = $DLG_caption_offset
      Hint    = $DLG_hint_offset
      Value   = $DLG_value_offset
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 80
         posy = 120
         dimx = 50
         dimy = 20
      }

      OnClick
      [
      ]
   }

   Label LblOffset
   {
      Caption = MSG(657)
      Hint    = $DLG_hint_offset
      Value   = $DLG_value_offset
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 20
         posy = 125
         dimx = 80
         dimy = 20
      }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 225
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 135
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0
        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           posx = 15
           posy = 195
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 410
         posy = 200
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 325
         posy = 200
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        $DLG_enable_offset = 1
        if( STRCMP( $DLG_X_Padre,"1840" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
        }
        if( STRCMP( $DLG_X_Padre,"2208" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") }
           if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
        }
        if( STRCMP( $DLG_X_Padre,"2576" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff2") }
           if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") if( $DLG_offset == 368 ) { $DLG_offset = 184 } }
           if( STRCMP( $DLG_larghezza_368,"736" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           if( STRCMP( $DLG_Nome,"Letto_NEW_AIR_LW" ) == 0 )
           {
              if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           }
        }
        if( STRCMP( $DLG_X_Padre,"2944" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff2") }
           if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") if( $DLG_offset == 368 ) { $DLG_offset = 184 } }
           if( STRCMP( $DLG_larghezza_368,"736" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           if( STRCMP( $DLG_Nome,"Letto_NEW_AIR_LW" ) == 0 )
           {
              if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") }
              if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           }
        }
        $DLG_value_offset = STR($DLG_offset)
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(100)
      Enable  = $DLG_enable_alt_368


      Placement
      {
         posx = 135
         posy = 55
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza_368")
        $DLG_hint_altezza_368    = STRCAT(MSG(428)," = ",$DLG_altezza_368)
        $DLG_caption_altezza_368 = $DLG_altezza_368
        $DLG_value_altezza_368   = $DLG_altezza_368
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)
      Enable  = $DLG_enable_pro_368

      Placement
      {
         posx = 135
         posy = 80
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita_368")
        $DLG_hint_profondita_368    = STRCAT(MSG(430)," = ",$DLG_profondita_368)
        $DLG_caption_profondita_368 = $DLG_profondita_368
        $DLG_value_profondita_368   = $DLG_profondita_368
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(658)
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 135
         posy = 120
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            $R = CHIEDI(-1,"DLG_offset")

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)
         }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        if( $DLG_value_lucido == 1 )
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        else
        {
           if( $DLG_value_laccato == 1 | $DLG_value_opaco == 1 )
           {
              $R = CHIEDI(-1,"DLG_COLORE_368")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368
              GOSUB Get_Image_368
           }
           else
           {
              $R = CHIEDI(-1,"DLG_COLORE_368_W")
              $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
              $DLG_COLORE_368_L = $DLG_COLORE_368_W
              $DLG_COLORE_368 = $DLG_COLORE_368_W
              GOSUB Get_Image_368
           }
        }
        // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
        // Eugenio 23.10.13 e se non  wildwood
        if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
          )
        {
           $DLG_COLORE_368_SCC = $DLG_COLORE_368
           $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
        }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}

Dlg Letti_CassWL
{
   Caption = MSG(32)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 490
      dimy = 285
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 60
      }

      Edit EdtLarghezza
      {
        //sempre attivo
        Caption = $DLG_caption_larghezza_368
        Hint    = $DLG_hint_larghezza_368
        Enable  = $DLG_enable_lar_368
        Value   = $DLG_value_larghezza_368

        Placement
        {
           posx = 70
           posy = 25
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(854)
        Enable  = $DLG_enable_lar_368
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }
   }

   Edit EdtOffset
   {
      Caption = $DLG_caption_offset
      Hint    = $DLG_hint_offset
      Value   = $DLG_value_offset
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 80
         posy = 120
         dimx = 50
         dimy = 20
      }

      OnClick
      [
      ]
   }

   Label LblOffset
   {
      Caption = MSG(657)
      Hint    = $DLG_hint_offset
      Value   = $DLG_value_offset
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 20
         posy = 125
         dimx = 80
         dimy = 20
      }
   }

   Frame FinituraFrontale
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }

      Radio RdLucido
      {
        Caption = MSG(856)
        Hint    = MSG(856)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido_368

        Placement
        {
           posx = 15
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido = 1
           $DLG_value_opaco  = 0
           $DLG_value_laccato = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\lucido",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)

        ]

      }

      Radio RdOpaco
      {
        Caption = MSG(857)
        Hint    = MSG(857)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco_368

        Placement
        {
           posx = 15
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 1
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdLaccato
      {
        Caption = MSG(874)
        Hint    = MSG(874)
        Value   = $DLG_value_laccato
        Enable  = $DLG_enable_rd_laccato_368

        Placement
        {
           posx = 15
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 1

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]

      }

      Radio RdWildwood
      {
        Caption = MSG(897)
        Hint    = MSG(897)
        Value   = $DLG_value_ww
        Enable  = 1

        Placement
        {
           posx = 15
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco = 0
           $DLG_value_lucido = 0
           $DLG_value_laccato = 0
           $DLG_value_ww = 1

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }
   }

   Frame FinituraStruttura
   {
      Caption = MSG(982)
      //Hint = "Modificare la finitura della struttura"

      Placement
      {
         posx = 320
         posy = 10
         dimx = 150
         dimy = 200
      }

      Label LabFinituraST
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_descrizione_scc_var
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_scc_var
         Value   = $DLG_image_file_scc
         Hint    = $DLG_descrizione_scc_var

         Placement
         {
            posx =  40
            posy =  35
            dimx =  70
            dimy =  70
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 410
         posy = 215
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 325
         posy = 215
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(98)
      Enable  = $DLG_enable_lar_368

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza_368")
        $DLG_hint_larghezza_368    = STRCAT(MSG(439)," = ",$DLG_larghezza_368)
        $DLG_caption_larghezza_368 = $DLG_larghezza_368
        $DLG_value_larghezza_368   = $DLG_larghezza_368
        $DLG_enable_offset = 1
        if( STRCMP( $DLG_X_Padre,"1840" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
        }
        if( STRCMP( $DLG_X_Padre,"2208" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") }
           if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
        }
        if( STRCMP( $DLG_X_Padre,"2576" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff2") }
           if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") if( $DLG_offset == 368 ) { $DLG_offset = 184 } }
           if( STRCMP( $DLG_larghezza_368,"736" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           if( STRCMP( $DLG_Nome,"Letto_NEW_AIR_LW" ) == 0 )
           {
              if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           }
        }
        if( STRCMP( $DLG_X_Padre,"2944" ) == 0 )
        {
           if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff2") }
           if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") if( $DLG_offset == 368 ) { $DLG_offset = 184 } }
           if( STRCMP( $DLG_larghezza_368,"736" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           if( STRCMP( $DLG_Nome,"Letto_NEW_AIR_LW" ) == 0 )
           {
              if( STRCMP( $DLG_larghezza_368,"368" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",$DLG_offset,3,"MenOff1") }
              if( STRCMP( $DLG_larghezza_368,"552" ) == 0 ) { VAR_CREATE_NUM(-1,"DLG_offset",0,3,"")  $DLG_offset = 0  $DLG_enable_offset = 0 }
           }
        }
        $DLG_value_offset = STR($DLG_offset)
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint    = MSG(658)
      Enable  = $DLG_enable_offset

      Placement
      {
         posx = 135
         posy = 120
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            $R = CHIEDI(-1,"DLG_offset")

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)
         }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_opaco==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_COLORE_368   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
            $DLG_COLORE_368_W = $DLG_COLORE_368_O
         }

         if($DLG_value_lucido==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_COLORE_368   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
            $DLG_COLORE_368_W = $DLG_COLORE_368_L
         }

         if($DLG_value_laccato==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            GOSUB Get_Image_368
            $DLG_COLORE_368_O = $DLG_COLORE_368
            $DLG_COLORE_368_L = $DLG_COLORE_368
            $DLG_COLORE_368_W = $DLG_COLORE_368
         }

         if($DLG_value_ww==1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_W,"colori_tutti.txt")
            GOSUB Get_Image_368_W
            $DLG_COLORE_368   = $DLG_COLORE_368_W
            $DLG_COLORE_368_O = $DLG_COLORE_368_W
            $DLG_COLORE_368_L = $DLG_COLORE_368_W
         }
         // Eugenio 25.05.12 Imposto il colore della struttura uguale a quello del frontale (se non  specchio)
         // Eugenio 25.10.13 e se non  wildwood
         if( STRCMP($DLG_COLORE_368,"ARG")!=0 & STRCMP($DLG_COLORE_368,"SZ1")!=0
           & STRCMP($DLG_COLORE_368,"SZ2")!=0 & STRCMP($DLG_COLORE_368,"SZ3")!=0
          )
         {
            $DLG_COLORE_368_SCC = $DLG_COLORE_368
            $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
            $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368,".bmp")
            $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
         }
      ]
   }

   Button btnFinituraST
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 335
         posy = 130
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_COLORE_368_SCC")

        // Fabrizio: deve per forza essere una tabella tipo TabStringa
        // anche se il valore arriva da una TabBmp, altrimenti la
        // funzione DESCRIZIONE_VAL_TAB non funziona
        $DLG_descrizione_scc_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_SCC,"colori_tutti.txt")
        //GOSUB Get_Image_368_O
        $DLG_image_file_scc   = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_368_SCC,".bmp")
        $DLG_image_file_scc   = SUBST_LABEL($DLG_image_file_scc)
      ]
   }
}

Dlg NOW_RipAlb
{
   Caption = MSG(1407)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmImpostazioni
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 115
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(1408)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 22
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(1409)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 52
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Check chkElimina
      {
        Caption = MSG(1410)
        Hint    = MSG(1410)
        Enable  = 1
        Value   = $DLG_value_cancella

        Placement
        {
           posx = 15
           posy = 82
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_cancella==1)
           {
              $DLG_value_cancella = 1
           }
           else
           {
              $DLG_value_cancella = 0
           }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLegno
      {
        Caption = MSG(1411)
        Hint    = MSG(1411)
        Value   = $DLG_value_laccato

        Placement
        {
           posx = 25
           posy = 130
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido  = 0
          $DLG_value_laccato = 1
          $DLG_enable_frame1 = 1
        ]

      }

      Radio RdVetro
      {
        Caption = MSG(1522)
        Hint    = MSG(1522)
        Value   = $DLG_value_lucido

        Placement
        {
           posx = 25
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido  = 1
          $DLG_value_laccato = 0
          $DLG_enable_frame1 = 0
        ]

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1406)

      Placement
      {
         posx = 130
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(439)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(409)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_frame1

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_NOW")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         GOSUB Get_Image_NOW
      ]
   }

}

Dlg 30MM_RipianoCabina
{
   Caption = MSG(413)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 175
      dimy = 285
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 180
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLegno
      {
        Caption = MSG(1411)
        Hint    = MSG(1411)
        Value   = $DLG_value_laccato

        Placement
        {
           posx = 35
           posy = 130
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido  = 0
          $DLG_value_laccato = 1
          $DLG_enable_frame1 = 1
        ]

      }

      Radio RdVetro
      {
        Caption = MSG(1522)
        Hint    = MSG(1522)
        Value   = $DLG_value_lucido

        Placement
        {
           posx = 35
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido  = 1
          $DLG_value_laccato = 0
          $DLG_enable_frame1 = 0
        ]

      }
   }

   Check chkElimina
   {
      Caption = MSG(745)
      Hint    = MSG(745)
      Enable  = 1
      Value   = $DLG_value_cancella

      Placement
      {
         posx = 40
         posy = 195
         dimx = 200
         dimy = 20
      }

      OnClick
      [
         if($DLG_value_cancella==1)
         {
            $DLG_value_cancella = 1
         }
         else
         {
            $DLG_value_cancella = 0
         }
      ]
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 220
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 220
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_frame1

      Placement
      {
         posx = 20
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 31/01/2018 - Filippo - gestione nuova revisione interni armadi
        //$R = CHIEDI(-1,"DLG_COLORE_30MM")
        //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
        //GOSUB Get_Image_30MM
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_30MM_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM_R1,"colori_tutti.txt")
            GOSUB Get_Image_30MM_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_30MM")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_30MM,"colori_tutti.txt")
            GOSUB Get_Image_30MM
         }
      ]
   }
}

Dlg NOW_RipAlbEV
{
   Caption = MSG(1407)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmImpostazioni
   {
      Caption = MSG(807)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }

//      Label LblProfondita
//      {
//        Caption = MSG(626)
//        Hint    = MSG(446)
//        Enable  = 1
//        Value   = MSG(626)
//
//        Placement
//        {
//           posx = 10
//           posy = 22
//           dimx = 60
//           dimy = 20
//        }
//
//        OnClick
//        [
//        ]
//
//      }
//
//      Edit EdtProfondita
//      {
//        Caption = $DLG_caption_profondita
//        Hint    = $DLG_hint_profondita
//        Enable  = 1
//        Value   = $DLG_value_profondita
//
//        Placement
//        {
//           posx = 70
//           posy = 20
//           dimx = 45
//           dimy = 20
//        }
//
//        OnClick
//        [
//        ]
//
//      }

      Radio RdSinistra
      {
        Caption = MSG(1301)
        Hint    = MSG(1301)
        Value   = $DLG_value_sx

        Placement
        {
           posx = 25
           posy = 32
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_sx = 1
          $DLG_value_dx = 0
        ]

      }

      Radio RdDestra
      {
        Caption = MSG(1302)
        Hint    = MSG(1302)
        Value   = $DLG_value_dx

        Placement
        {
           posx = 25
           posy = 57
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_sx = 0
          $DLG_value_dx = 1
        ]
      }

      Check chkElimina
      {
        Caption = MSG(745)
        Hint    = MSG(745)
        Enable  = 1
        Value   = $DLG_value_cancella

        Placement
        {
           posx = 30
           posy = 92
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_cancella==1)
           {
              $DLG_value_cancella = 1
           }
           else
           {
              $DLG_value_cancella = 0
           }
        ]
      }

   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 175
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var
         Enable  = $DLG_enable_frame1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLegno
      {
        Caption = MSG(1411)
        Hint    = MSG(1411)
        Value   = $DLG_value_laccato

        Placement
        {
           posx = 35
           posy = 130
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido  = 0
          $DLG_value_laccato = 1
          $DLG_enable_frame1 = 1
        ]

      }

      Radio RdVetro
      {
        Caption = MSG(1522)
        Hint    = MSG(1522)
        Value   = $DLG_value_lucido

        Placement
        {
           posx = 35
           posy = 150
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido  = 1
          $DLG_value_laccato = 0
          $DLG_enable_frame1 = 0
        ]

      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

//   Button btnProfondita
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = MSG(447)
//
//      Placement
//      {
//         posx = 130
//         posy = 30
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//        $R = CHIEDI(-1,"DLG_profondita")
//        $DLG_hint_profondita    = STRCAT(MSG(439)," = ",STR($DLG_profondita))
//        $DLG_caption_profondita = STR($DLG_profondita)
//        $DLG_value_profondita   = STR($DLG_profondita)
//      ]
//   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_frame1

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         //12.05.2017 - Filippo - gestione nuova revisione interni armadi
         if($DLG_Revisione >= 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW_R1")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW_R1,"colori_tutti.txt")
            GOSUB Get_Image_NOW_REV1
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_NOW")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
            GOSUB Get_Image_NOW
         }

         //$R = CHIEDI(-1,"DLG_COLORE_NOW")
         //$DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_NOW,"colori_tutti.txt")
         //GOSUB Get_Image_NOW
      ]
   }

}

Dlg Obeliscus
{
   Caption = MSG(1916)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 305
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(428)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 110
         dimy = 130
      }

      Radio Rd1104
      {
         Caption = "1104"
         Hint    = "1104"
         Value   = $DLG_val_opzione_1

         Placement
         {
            posx = 20
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 1
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 0

         ]
      }

      Radio Rd1472
      {
         Caption = "1472"
         Hint    = "1472"
         Value   = $DLG_val_opzione_2

         Placement
         {
            posx = 20
            posy = 60
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 1
            $DLG_val_opzione_3 = 0

         ]
      }

      Radio Rd1840
      {
         Caption = "1840"
         Hint    = "1840"
         Value   = $DLG_val_opzione_3

         Placement
         {
            posx = 20
            posy = 90
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_val_opzione_1 = 0
            $DLG_val_opzione_2 = 0
            $DLG_val_opzione_3 = 1

         ]
      }

   }

   Frame FinituraTop
   {
      Caption = MSG(602)

      Placement
      {
         posx = 135
         posy = 10
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            posy =  35
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 220
         posy = 190
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 135
         posy = 190
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 160
         posy = 150
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file
      ]
   }

}

// ************************************************

// dialog per stampa TPRINT
Dlg DLG_TPRINT
{
   //Caption = "Scegli stampa per TPRINT:"
   Caption = MSG(2000)
   Placement
   {
      posx = 100
      posy = 100
      dimx = 200
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Lista
   {
      Caption = ""
      Placement
      {
         posx = 10
         posy = 10
         dimx = 175
         dimy = 280
      }

      Button Opz01
      {
         //Caption = "Pianta e prospetti su PDF"
         Caption = MSG(2001)
         Result  = 1

         Placement
         {
            posx = 10
            posy = 25
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 1
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz02
      {
         //Caption = "stampa menu"
         Caption = MSG(2002)
         Result  = 1

         Placement
         {
            posx = 10
            posy = 50
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 1
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz03
      {
         //Caption = "Stampa Top"
         Caption = MSG(2003)
         Result  = 1
         Enable = $tprint_enable_stampa

         Placement
         {
            posx = 10
            posy = 75
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 1
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz04
      {
         //Caption = "Stampa Singoli Top"
         Caption = MSG(2004)
         Result  = 1
         Enable = $tprint_enable_stampa

         Placement
         {
            posx = 10
            posy = 100
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 1
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz05
      {
         //Caption = "Stampa Schienali"
         Caption = MSG(2005)
         Result  = 1
         Enable = $tprint_enable_stampa

         Placement
         {
            posx = 10
            posy = 125
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 1
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz06
      {
         //Caption = "stampa come a video"
         Caption = MSG(532)
         Result  = 1

         Placement
         {
            posx = 10
            posy = 150
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 1
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }
      Button Opz07
      {
         //Caption = "stampa top ww"
         Caption = MSG(569)
         Result  = 1
         Enable = $tprint_enable_stampa

         Placement
         {
            posx = 10
            posy = 175
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 1
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz07a
      {
         //Caption = "stampa top madeterraneo"
         Caption = MSG(572)
         Result  = 1
         Enable = $tprint_enable_stampa

         Placement
         {
            posx = 10
            posy = 200
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 1
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz08
      {
         //Caption = "stampa fronte/retro"
         Caption = MSG(565)
         Result  = 1

         Placement
         {
            posx = 10
            posy = 225
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 1
            $tprint_stampa_prezzi = 0
            //$TPrint_GO=1
         ]
      }

      Button Opz09
      {
         //Caption = "stampa prezzi TGEO"
         Caption = MSG(570)
         Result  = 1
         //Enable = 0

         Placement
         {
            posx = 10
            posy = 250
            dimx = 155
            dimy = 20
         }

         OnClick
         [
            $tprint_pianta_prospetti = 0
            $tprint_stampa_menu = 0
            $tprint_stampa_top = 0
            $tprint_stampa_top_ww = 0
            $tprint_stampa_madeterraneo = 0
            $tprint_stampa_topsingoli = 0
            $tprint_stampa_schienali = 0
            $tprint_stampa_video = 0
            $tprint_stampa_doppia = 0
            $tprint_stampa_prezzi = 1
            //$TPrint_GO=1
         ]
      }

   }
}

Dlg ReggiLibri
{
   Caption = MSG(488)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 325
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Posizione
   {
      Caption = MSG(414)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 140
         dimy = 135
      }

      Radio posSx
      {
        Caption = MSG(646)
        Hint    = MSG(646)
        Value   = $DLG_lato_sin

        Placement
        {
           posx = 20
           posy = 25
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_lato_sin = 1
          $DLG_lato_des = 0
        ]
      }

      Radio posDx
      {
        Caption = MSG(647)
        Hint    = MSG(647)
        Value   = $DLG_lato_des

        Placement
        {
           posx = 20
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_lato_sin = 0
          $DLG_lato_des = 1
        ]
      }

      Edit EdtOffset
      {
         Caption = $DLG_caption_offset
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 60
            posy = 90
            dimx = 40
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label LblOffset
      {
         Caption = MSG(657)
         Hint    = $DLG_hint_offset
         Value   = $DLG_value_offset
         Enable  = $DLG_enable_offset

         Placement
         {
            posx = 15
            posy = 92
            dimx = 80
            dimy = 20
         }
      }
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Check chkElimina
   {
     Caption = MSG(489)
     Hint    = MSG(489)
     Enable  = 1
     Value   = $DLG_value_cancella

     Placement
     {
        posx = 185
        posy = 155
        dimx = 200
        dimy = 20
     }

     OnClick
     [

        if($DLG_value_cancella==1)
        {
           $DLG_value_cancella = 1
        }
        else
        {
           $DLG_value_cancella = 0
        }

        if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
        {
           DISPLAY2(MSG(490))
        }
     ]

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 245
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 160
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnOffset
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(658)

      Placement
      {
         posx = 115
         posy = 100
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         if( VAR_EXIST(-1,"DLG_offset")==1 )
         {
            $R = CHIEDI(-1,"DLG_offset")

            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
            $DLG_caption_offset = STR($DLG_offset)
            $DLG_value_offset   = STR($DLG_offset)
         }
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PF")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PF"),"colori_tutti.txt")
         $DLG_COLORE_30MM = VAR_VAL_STR($DLG_idx_to_call,"GEST_PF")
         GOSUB Get_Image_30MM
      ]
   }
}

Dlg Slide
{
   Caption = MSG(1917)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 605
      //dimx = 445
      dimy = 215
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoModulo
   {
      Caption = MSG(1925)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 100
         dimy = 90
      }

      Radio rd1
      {
        Caption = MSG(1926)
        Hint    = MSG(1926)
        Value   = $DLG_modulo_1

        Placement
        {
           posx = 15
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_modulo_1 = 1
           $DLG_modulo_2 = 0
           $DLG_modulo_3 = 0
        ]
      }

      Radio rd2
      {
        Caption = MSG(1927)
        Hint    = MSG(1927)
        Value   = $DLG_modulo_2

        Placement
        {
           posx = 15
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_modulo_1 = 0
           $DLG_modulo_2 = 1
           $DLG_modulo_3 = 0
        ]
      }

      Radio rd3
      {
        Caption = MSG(1928)
        Hint    = MSG(1928)
        Value   = $DLG_modulo_3

        Placement
        {
           posx = 15
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_modulo_1 = 0
           $DLG_modulo_2 = 0
           $DLG_modulo_3 = 1
        ]
      }
   }

   Frame ReggiLibri
   {
      //Caption = MSG(1925)
      Placement
      {
         posx = 10
         posy = 105
         dimx = 100
         dimy = 40
      }

      Check chkReggiLibri
      {
         Caption = MSG(1967)
         Hint    = MSG(1967)
         Value   = $DLG_value_rd_uso_1

         Placement
         {
            posx = 10
            posy = 12
            dimx = 95
            dimy = 20
         }

         OnClick
         [
            if( $DLG_value_rd_uso_1==1 )
            {
               $DLG_value_rd_uso_1=1
               $DLG_enable_rd_uso_1=1
               GOSUB CaricaRadiceRgl

               //Massimiliano 02/10/15 - a seguito di un ticket di Veronica di oggi, in cui con una sequenza di inserimento
               //                        il reggilibri non veniva correttamente valorizzato, forzo il colore a LOP, cos
               //                        se l'utente non definisce il colore, su un controllo successivo prende il colore della
               //                        struttura dello slide
               $DLG_COLORE_DEFAULT = "LOP"
               COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call_1)," GEST_PF=",APICI(),$DLG_COLORE_DEFAULT,APICI()))
               //                        faccio apparire come immagine di finitura il valore LOP, cos dovrebbe essere evidente che
               //                        deve essere definito, mal che vada diventa colore della struttura
               $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_1,"GEST_PF"),"colori_tutti.txt")
               $DLG_VAL_COLORE3 = VAR_VAL_STR($DLG_idx_to_call_1,"GEST_PF")
               GOSUB Get_Image_Opaco_NEW

            }
            else
            {
               $DLG_value_rd_uso_1=0
               $DLG_enable_rd_uso_1=0
            }
         ]
      }
   }

   Frame FinituraMod
   {
      Caption = MSG(1924)

      Placement
      {
         posx = 120
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 150
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraBase
   {
      Caption = MSG(1923)

      Placement
      {
         posx = 280
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraReggi
   {
      Caption = MSG(1968)

      Placement
      {
         posx = 440
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 365
         posy = 150
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 280
         posy = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraMod
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 130
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco_NEW
      ]
   }

   Button btnFiniturBase
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 290
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PF")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PF"),"colori_tutti.txt")
         $DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call,"GEST_PF")
         GOSUB Get_Image_Opaco_NEW
      ]
   }

   Button btnFiniturRgl
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 450
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call_1,"GEST_PF")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_1,"GEST_PF"),"colori_tutti.txt")
         $DLG_VAL_COLORE3 = VAR_VAL_STR($DLG_idx_to_call_1,"GEST_PF")
         GOSUB Get_Image_Opaco_NEW
      ]
   }

}

Dlg SlideSpecchiera
{
   Caption = MSG(1917)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 165
      dimy = 215
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame TipoModulo
   {
      Caption = MSG(1925)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 140
         dimy = 135
      }

      Radio rd1
      {
        Caption = MSG(1926)
        Hint    = MSG(1926)
        Value   = $DLG_modulo_1

        Placement
        {
           posx = 40
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_modulo_1 = 1
           $DLG_modulo_2 = 0
           $DLG_modulo_3 = 0
        ]
      }

      Radio rd2
      {
        Caption = MSG(1927)
        Hint    = MSG(1927)
        Value   = $DLG_modulo_2

        Placement
        {
           posx = 40
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_modulo_1 = 0
           $DLG_modulo_2 = 1
           $DLG_modulo_3 = 0
        ]
      }

      Radio rd3
      {
        Caption = MSG(1928)
        Hint    = MSG(1928)
        Value   = $DLG_modulo_3

        Placement
        {
           posx = 40
           posy = 85
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_modulo_1 = 0
           $DLG_modulo_2 = 0
           $DLG_modulo_3 = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 150
         dimx = 60
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 150
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg ReggiSlide
{
   Caption = MSG(1918)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 325
      dimx = 175
      dimy = 250
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

//   Frame Posizione
//   {
//      Caption = MSG(414)
//
//      Placement
//      {
//         posx = 10
//         posy = 10
//         dimx = 140
//         dimy = 135
//      }
//
//      Edit EdtOffset
//      {
//         Caption = $DLG_caption_offset
//         Hint    = $DLG_hint_offset
//         Value   = $DLG_value_offset
//         Enable  = $DLG_enable_offset
//
//         Placement
//         {
//            posx = 60
//            posy = 90
//            dimx = 40
//            dimy = 20
//         }
//
//         OnClick
//         [
//         ]
//      }
//
//      Label LblOffset
//      {
//         Caption = MSG(657)
//         Hint    = $DLG_hint_offset
//         Value   = $DLG_value_offset
//         Enable  = $DLG_enable_offset
//
//         Placement
//         {
//            posx = 15
//            posy = 92
//            dimx = 80
//            dimy = 20
//         }
//      }
//   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         //posx = 160
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Check chkElimina
   //{
   //  Caption = MSG(489)
   //  Hint    = MSG(489)
   //  Enable  = 1
   //  Value   = $DLG_value_cancella
   //
   //  Placement
   //  {
   //     posx = 35
   //     //posx = 185
   //     posy = 155
   //     dimx = 200
   //     dimy = 20
   //  }
   //
   //  OnClick
   //  [
   //
   //     if($DLG_value_cancella==1)
   //     {
   //        $DLG_value_cancella = 1
   //     }
   //     else
   //     {
   //        $DLG_value_cancella = 0
   //     }
   //
   //     if( $DLG_attiva_display==1 & $DLG_value_cancella==1 )
   //     {
   //        DISPLAY2(MSG(490))
   //     }
   //  ]
   //
   //}

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         //posx = 245
         posy = 185
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         //posx = 160
         posy = 185
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

//   Button btnOffset
//   {
//      Caption = "..."
//      Result  = 0
//      Hint = MSG(658)
//
//      Placement
//      {
//         posx = 115
//         posy = 100
//         dimx = 20
//         dimy = 20
//      }
//
//      OnClick
//      [
//         if( VAR_EXIST(-1,"DLG_offset")==1 )
//         {
//            $R = CHIEDI(-1,"DLG_offset")
//
//            $DLG_hint_offset    = STRCAT(MSG(1381),"=",STR($DLG_offset))
//            $DLG_caption_offset = STR($DLG_offset)
//            $DLG_value_offset   = STR($DLG_offset)
//         }
//      ]
//   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         //posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PF")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PF"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PF")
         GOSUB Get_Image_Opaco_NEW
      ]
   }
}

Dlg LavaboCellule
{
   Caption = MSG(1932)

   Placement
   {
      posx = 155
      posy = 150
      dimx = 500
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame CfgLavabo
   {
      Caption = MSG(1933)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 202
      }

      Label LabFinitLac
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im0
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check chkLaccato
      {
         Caption = MSG(1951)
         Hint    = MSG(1951)
         Value   = $DLG_value_rd_uso_5

         Placement
         {
            posx = 10
            posy = 160
            dimx = 150
            dimy = 20

         }

         OnClick
         [
            if($DLG_value_rd_uso_5==1)
            {
               $DLG_value_rd_uso_5  = 1
               $DLG_enable_rd_uso_5 = 1
               $DLG_RADCEL = "LAVACELLC"
            }
            else
            {
               $DLG_value_rd_uso_5=0
               $DLG_enable_rd_uso_5=0
               $DLG_RADCEL = "LAVACELL"
            }
            GOSUB CambiaRadCellule
         ]
      }

      Check chkForo
      {
         Caption = MSG(1934)
         Hint    = MSG(1934)
         Value   = $DLG_value_rd_uso_1

         Placement
         {
            posx = 10
            posy = 180
            dimx = 150
            dimy = 20

         }

         OnClick
         [
            if( $DLG_value_rd_uso_1==1 )  { $DLG_value_rd_uso_1=1 }
            else                          { $DLG_value_rd_uso_1=0 }
         ]
      }

   }

   Frame CfgAsciuga
   {
      Caption = MSG(1935)

      Placement
      {
         posx = 170
         posy = 10
         dimx = 150
         dimy = 202
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check chkAsciuga
      {
         Caption = MSG(1935)
         Hint    = MSG(1935)
         Value   = $DLG_value_rd_uso_2

         Placement
         {
            posx = 10
            posy = 170
            dimx = 120
            dimy = 20

         }

         OnClick
         [
            if( $DLG_value_rd_uso_2==1 )
            {
               $DLG_value_rd_uso_2 = 1
               $DLG_enable_rd_uso_1 = 1
            }
            else
            {
               $DLG_value_rd_uso_2 = 0
               $DLG_enable_rd_uso_1 = 0
            }
         ]
      }

   }

   Frame CfgVassoio
   {
      Caption = MSG(1936)

      Placement
      {
         posx = 330
         posy = 10
         dimx = 150
         dimy = 202
      }

      Label LabFinitVas
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check ChkVasVT
      {
        Caption = MSG(1937)
        Hint    = MSG(1937)
        Value   = $DLG_value_rd_uso_3
        Enable  = $DLG_enable_rd_uso_3

        Placement
        {
           posx = 10
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_3==1)
           {
              $DLG_value_rd_uso_3  = 1
              $DLG_enable_rd_uso_2 = 1
              $DLG_enable_rd_uso_4 = 0
              $DLG_value_rd_uso_4  = 0
              $DLG_RAD = "VASVCELL"
           }
           else
           {
              $DLG_value_rd_uso_3  = 0
              $DLG_enable_rd_uso_2 = 0
              $DLG_enable_rd_uso_4 = 1
           }
           GOSUB CambiaRadVassoio
        ]
      }

      Check ChkVasWW
      {
        Caption = MSG(1938)
        Hint    = MSG(1938)
        Value   = $DLG_value_rd_uso_4
        Enable  = $DLG_enable_rd_uso_4

        Placement
        {
           posx = 10
           posy = 180
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_value_rd_uso_4==1)
           {
              $DLG_value_rd_uso_4  = 1
              $DLG_enable_rd_uso_2 = 1
              $DLG_enable_rd_uso_3 = 0
              $DLG_value_rd_uso_3  = 0
              $DLG_RAD = "VASWCELL"
           }
           else
           {
              $DLG_value_rd_uso_4  = 0
              $DLG_enable_rd_uso_2 = 0
              $DLG_enable_rd_uso_3 = 1
           }
           GOSUB CambiaRadVassoio
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint    = MSG(616)

      Placement
      {
         posx = 240
         posy = 225
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint    = MSG(618)

      Placement
      {
         posx = 160
         posy = 225
         dimx = 75
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraLac
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_rd_uso_5

      Placement
      {
         posx =  35
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraAsc
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_rd_uso_1

      Placement
      {
         posx = 195
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call_1,"GEST_PF")
         $DLG_VAL_COLORE3 = VAR_VAL_STR($DLG_idx_to_call_1,"GEST_PF")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_1,"GEST_PF"),"colori_tutti.txt")
         GOSUB Get_Image_Opaco_NEW
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraVas
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_rd_uso_2

      Placement
      {
         posx = 355
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         if( $DLG_value_rd_uso_3==1 )
         {
            $R = CHIEDI($DLG_idx_to_call_2,"GEST_CR")
            $DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call_2,"GEST_CR")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_2,"GEST_CR"),"colori_tutti.txt")
            GOSUB Get_Image_Lucido_NEW
            //$DLG_image_file2 = $DLG_image_file
         }
         if( $DLG_value_rd_uso_4==1 )
         {
            //GOSUB CambiaRadVassoio
            $R = CHIEDI($DLG_idx_to_call_3,"GEST_SZ")
            $DLG_VAL_COLORE2 = VAR_VAL_STR($DLG_idx_to_call_3,"GEST_SZ")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call_3,"GEST_SZ"),"colori_tutti.txt")
            GOSUB Get_Image_Opaco_NEW
            //$DLG_image_file2 = $DLG_image_file
         }
      ]
   }

}

Dlg LavaboLinea
{
   Caption = MSG(1939)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 195
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipoLvb
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 170
         dimy = 215
      }

      Image Im0
      {
         Caption = MSG(989)
         Value   = $DLG_image_file
         Hint    = $DLG_tipologia_linea

         Placement
         {
            posx =  10
            posy =  60
            dimx =  150
            dimy =  150
         }
      }
   }

   Frame FrmForiLvb
   {
      //Caption = MSG(981)
      Placement
      {
         posx = 10
         posy = 225
         dimx = 170
         dimy = 40
      }

      Label LblNFori
      {
        Caption = MSG(1940)
        Hint    = MSG(1940)
        Value   = MSG(1940)

        Placement
        {
           posx = 10
           posy = 15
           dimx = 80
           dimy = 20
        }
      }

      Edit EdtNFori
      {
        Caption = $DLG_caption_forilinea
        Hint    = $DLG_hint_forilinea
        Value   = $DLG_value_forilinea

        Placement
        {
           posx = 90
           posy = 10
           dimx = 40
           dimy = 20
        }

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 280
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 20
         posy = 280
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnTipoLinea
   {
      Caption = MSG(984)
      Result  = 0
      Hint = MSG(984)

      Placement
      {
         posx = 25
         posy = 195
         dimx = 130
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_tipologia_linea")
        GOSUB Get_Image_LavLinea
      ]
   }

   Button btnForiLav
   {
      Caption = MSG(621)
      Result  = 0
      Hint = MSG(621)

      Placement
      {
         posx = 145
         posy = 235
         dimx = 30
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_Fori_Linea")
        $DLG_hint_forilinea     = STRCAT("Fori =",STR($DLG_Fori_Linea))
        $DLG_caption_forilinea  = STR($DLG_Fori_Linea)
        $DLG_value_forilinea    = STR($DLG_Fori_Linea)
      ]
   }
}

Dlg LavaboSkin
{
   Caption = MSG(1941)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 215
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipoLvb
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 70
      }

      Radio RdScaricoO
      {
         Caption = MSG(1942)
         Hint    = MSG(1942)
         Value   = $DLG_value_rd_uso_1

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
         ]
      }

      Radio RdScaricoV
      {
         Caption = MSG(1943)
         Hint    = MSG(1943)
         Value   = $DLG_value_rd_uso_2

         Placement
         {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
         ]
      }

   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 85
         dimx = 155
         dimy = 55
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(624)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 150
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 150
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(496)

      Placement
      {
         posx = 130
         posy = 105
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }
}

Dlg LavaboSteelF
{
   Caption = MSG(1948)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 400
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmPosMisce
   {
      Caption = MSG(1952)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 85
      }

      Radio RdStaffa
      {
        Caption = MSG(1953)
        Hint    = MSG(1953)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 25
           dimx = 115
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio RdParete
      {
        Caption = MSG(1954)
        Hint    = MSG(1954)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 50
           dimx = 115
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]
      }
   }

   Frame CfgLavabo
   {
      Caption = MSG(1933)

      Placement
      {
         posx = 10
         posy = 100
         dimx = 155
         dimy = 210
      }

      Label LabFinitLac
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im0
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check PilettaSteelF
      {
        Caption = MSG(3011)
        Hint    = MSG(3012)
        Value   = $DLG_check_piletta

        Placement
        {
           posx = 15
           posy = 180
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_check_piletta==1) {  $DLG_check_piletta=1  }
           else                      {  $DLG_check_piletta=0  }
        ]
      }
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx =  35
         posy = 240
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 95
         posy = 335
         dimx = 60
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 20
         posy = 335
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg LavaboSteel
{
   Caption = MSG(1948)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 390
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipoAttr
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 205
         dimy = 85
      }

      Radio RdAppoggio
      {
        Caption = MSG(1949)
        Hint    = MSG(1949)
        Value   = $DLG_value_rd_uso_1

        Placement
        {
           posx = 10
           posy = 25
           dimx = 115
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 1
           $DLG_value_rd_uso_2 = 0
        ]

      }

      Radio RdIncasso
      {
        Caption = MSG(1950)
        Hint    = MSG(1950)
        Value   = $DLG_value_rd_uso_2

        Placement
        {
           posx = 10
           posy = 50
           dimx = 115
           dimy = 20
        }

        OnClick
        [
           $DLG_value_rd_uso_1 = 0
           $DLG_value_rd_uso_2 = 1
        ]

      }

   }

   Frame FrmMisure
   {
      Caption = MSG(1381)

      Placement
      {
         posx = 10
         posy = 100
         dimx = 205
         dimy = 110
      }

      Edit EdtOffsetX
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 125
           posy = 30
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffsetX
      {
        Caption = MSG(1946)
        Hint    = MSG(1946)
        Value   = MSG(1946)

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

      }

      Edit EdtOffsetZ
      {
        Caption = $DLG_caption_offset2
        Hint    = $DLG_hint_offset2
        Value   = $DLG_value_offset2

        Placement
        {
           posx = 125
           posy = 55
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffsetZ
      {
        Caption = MSG(1947)
        Hint    = MSG(1947)
        Value   = MSG(1947)

        Placement
        {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
        }
      }
   }

   Frame CfgLavabo
   {
      Caption = MSG(1933)

      Placement
      {
         posx = 220
         posy = 10
         dimx = 155
         dimy = 200
      }

      Label LabFinitLac
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 27
            posy = 18
            dimx = 130
            dimy = 25
         }
      }

      Image Im0
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  27
            posy =  35
            dimx =  96
            dimy =  96
         }
      }

      Check PilettaSteel
      {
        Caption = MSG(3011)
        Hint    = MSG(3012)
        Value   = $DLG_check_piletta

        Placement
        {
           posx = 15
           posy = 170
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_check_piletta==1) {  $DLG_check_piletta=1  }
           else                      {  $DLG_check_piletta=0  }
        ]
      }
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 245
         posy = 145
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         GOSUB Get_Image_Opaco
         //$DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 200
         posy = 215
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 125
         posy = 215
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnOffsetX
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1946)

      Placement
      {
         posx = 180
         posy = 130
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset    = STRCAT(MSG(1946)," = ",STR($DLG_offset))
        $DLG_caption_offset = STR($DLG_offset)
        $DLG_value_offset   = STR($DLG_offset)
      ]
   }

   Button btnOffsetZ
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1947)

      Placement
      {
         posx = 180
         posy = 155
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset2")
        $DLG_hint_offset2    = STRCAT(MSG(1947)," = ",STR($DLG_offset2))
        $DLG_caption_offset2 = STR($DLG_offset2)
        $DLG_value_offset2   = STR($DLG_offset2)
      ]
   }
}

Dlg LavaboBilico
{
   Caption = MSG(1944)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 230
      dimy = 280
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmTipoScarico
   {
      Caption = MSG(981)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 205
         dimy = 115
      }

      Label LblTipoScarico
      {
        Caption = MSG(1945)
        Hint    = MSG(1945)
        Value   = MSG(1945)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 115
           dimy = 20
        }
      }

      Edit EdtTipoScarico
      {
        Caption = $DLG_caption_scabilico
        Hint    = $DLG_hint_scabilico
        Value   = $DLG_value_scabilico

        Placement
        {
           posx = 125
           posy = 25
           dimx = 40
           dimy = 20
        }
      }

      Check PilettaBilico
      {
        Caption = MSG(3011)
        Hint    = MSG(3012)
        Value   = $DLG_check_piletta

        Placement
        {
           posx = 10
           posy = 55
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_check_piletta==0)
           {
               $DLG_check_tappo     = 0
               $DLG_enable_rd_uso_1 = 0
           }
           else
           {
               $DLG_check_tappo     = 0
               $DLG_enable_rd_uso_1 = 1
           }
        ]
      }

      Check TappoBilico
      {
        Caption = MSG(3015)
        Hint    = MSG(3016)
        Value   = $DLG_check_tappo
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 80
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if( $DLG_enable_rd_uso_1==0 )
           {
               $DLG_check_tappo = 0
           }
           else
           {
               $DLG_check_tappo = 1
           }
        ]
      }
   }

   Frame FrmMisure
   {
      Caption = MSG(1381)

      Placement
      {
         posx = 10
         posy = 130
         dimx = 205
         dimy = 80
      }

      Edit EdtOffsetX
      {
        Caption = $DLG_caption_offset
        Hint    = $DLG_hint_offset
        Value   = $DLG_value_offset

        Placement
        {
           posx = 125
           posy = 20
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffsetX
      {
        Caption = MSG(1946)
        Hint    = MSG(1946)
        Value   = MSG(1946)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 120
           dimy = 20
        }

      }

      Edit EdtOffsetZ
      {
        Caption = $DLG_caption_offset2
        Hint    = $DLG_hint_offset2
        Value   = $DLG_value_offset2

        Placement
        {
           posx = 125
           posy = 40
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblOffsetZ
      {
        Caption = MSG(1947)
        Hint    = MSG(1947)
        Value   = MSG(1947)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 120
           dimy = 20
        }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 110
         posy = 215
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 35
         posy = 215
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnOffsetX
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1946)

      Placement
      {
         posx = 180
         posy = 150
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset")
        $DLG_hint_offset    = STRCAT(MSG(1946)," = ",STR($DLG_offset))
        $DLG_caption_offset = STR($DLG_offset)
        $DLG_value_offset   = STR($DLG_offset)
      ]
   }

   Button btnOffsetZ
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1947)

      Placement
      {
         posx = 180
         posy = 170
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_offset2")
        $DLG_hint_offset2    = STRCAT(MSG(1947)," = ",STR($DLG_offset2))
        $DLG_caption_offset2 = STR($DLG_offset2)
        $DLG_value_offset2   = STR($DLG_offset2)
      ]
   }

   Button btnScarico
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1945)

      Placement
      {
         posx = 180
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_scarico_bilico")
        $DLG_hint_scabilico    = STRCAT(MSG(1945)," = ",STR($DLG_scarico_bilico))
        $DLG_caption_scabilico = STR($DLG_scarico_bilico)
        $DLG_value_scabilico   = STR($DLG_scarico_bilico)
      ]
   }

}

Dlg LavaboBasica
{
   Caption = MSG(3017)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 180
      dimy = 215
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 155
         dimy = 110
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(624)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }
      }


      Check PilettaBasica
      {
        Caption = MSG(3011)
        Hint    = MSG(3012)
        Value   = $DLG_check_piletta

        Placement
        {
           posx = 10
           posy = 55
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if($DLG_check_piletta==0)
           {
               $DLG_check_tappo     = 0
               $DLG_enable_rd_uso_1 = 0
           }
           else
           {
               $DLG_check_tappo     = 0
               $DLG_enable_rd_uso_1 = 1
           }
        ]
      }

      Check TappoBasica
      {
        Caption = MSG(3013)
        Hint    = MSG(3014)
        Value   = $DLG_check_tappo
        Enable  = $DLG_enable_rd_uso_1

        Placement
        {
           posx = 10
           posy = 80
           dimx = 150
           dimy = 20
        }

        OnClick
        [
           if( $DLG_enable_rd_uso_1==0 )
           {
               $DLG_check_tappo = 0
           }
           else
           {
               $DLG_check_tappo = 1
           }
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 150
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 150
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(496)

      Placement
      {
         posx = 130
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

}

Dlg PanSpeciale
{
   Caption = MSG(1724)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 220
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 145
         dimy = 175
      }

      Edit Edtaltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtprofondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 75
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(492)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(493)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(422)
        Hint    = MSG(422)
        Enable  = 1
        Value   = MSG(422)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }
      }

      Check Parallelo
      {
        Caption = MSG(3038)
        Hint    = MSG(3038)
        Enable  = 1
        Value   = $DLG_Parallelo

        Placement
        {
           posx = 15
           posy = 110
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if($DLG_Parallelo==1)   {  $DLG_Parallelo=1  }
           else                    {  $DLG_Parallelo=0  }
        ]

      }

      Check Ruotato
      {
        Caption = MSG(3039)
        Hint    = MSG(3039)
        Enable  = 1
        Value   = $DLG_RuotatoXY

        Placement
        {
           posx = 15
           posy = 135
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if($DLG_RuotatoXY==1)   {  $DLG_RuotatoXY=1  }
           else                    {  $DLG_RuotatoXY=0  }
        ]

      }


   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 160
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         // 19/04/2018 - Emanuele - Aggiungo controllo per modificare il menu delle finiture se il pannello  wildwood
//         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
//         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
//         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         if($DLG_Wildwood==0)
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         }
         else
         {
            $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
            $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         }
         GOSUB Get_Image_Opaco_NEW
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(495)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(496)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [

        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(422)
      Enable = $DLG_enable_prof

      Placement
      {
         posx = 130
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
        // Eugenio 18.12.15 Controllo la larghezza in base allo spessore
        if( $DLG_profondita==8 | $DLG_profondita==22 | $DLG_profondita==25 | $DLG_profondita==38 )
        {
           VAR_SET_MENU (-1,"DLG_larghezza","(50-2900)" )
           if( $DLG_larghezza>2900 )  {  $DLG_larghezza = 2900  }
        }
        else
        {
           VAR_SET_MENU (-1,"DLG_larghezza","(50-3000)" )
        }

      ]
   }

}

Dlg VtrSpeciale
{
   Caption = MSG(1734)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 330
      dimy = 290
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 185
      }

      Edit Edtaltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Enable  = 1
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 70
           posy = 25
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 50
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtprofondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 75
           dimx = 45
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(492)
        Enable  = 1
        Value   = MSG(629)

        Placement
        {
           posx = 10
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(493)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 55
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(422)
        Hint    = MSG(422)
        Enable  = 1
        Value   = MSG(422)

        Placement
        {
           posx = 10
           posy = 80
           dimx = 80
           dimy = 20
        }
      }

      Check Parallelo
      {
        Caption = MSG(3038)
        Hint    = MSG(3038)
        Enable  = 1
        Value   = $DLG_Parallelo

        Placement
        {
           posx = 10
           posy = 110
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Parallelo==1)   {  $DLG_Parallelo=1  }
           else                    {  $DLG_Parallelo=0  }
        ]

      }

      Check VetroNow
      {
        Caption = MSG(1735)
        Hint    = MSG(1735)
        Enable  = 1
        Value   = $DLG_VetroNow

        Placement
        {
           posx = 10
           posy = 135
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_VetroNow==1)   {  $DLG_VetroNow=1  }
           else                    {  $DLG_VetroNow=0  }
        ]

      }

      Check Sagomato
      {
        Caption = MSG(1736)
        Hint    = MSG(1736)
        Enable  = 1
        Value   = $DLG_Sagomato

        Placement
        {
           posx = 10
           posy = 160
           dimx = 130
           dimy = 20
        }

        OnClick
        [
           if($DLG_Sagomato==1)   {  $DLG_Sagomato=1  }
           else                   {  $DLG_Sagomato=0  }
        ]

      }


   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 165
         posy = 10
         dimx = 150
         dimy = 185
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
         Caption = MSG(856)
         Hint    = MSG(856)
         Value   = $DLG_colore_lucido

         Placement
         {
            posx = 15
            posy = 140
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_colore_lucido = 1
            $DLG_colore_opaco  = 0
         ]
      }

      Radio RdOpaco
      {
         Caption = MSG(857)
         Hint    = MSG(857)
         Value   = $DLG_colore_opaco

         Placement
         {
            posx = 15
            posy = 160
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_colore_lucido = 0
            $DLG_colore_opaco  = 1
         ]
      }

   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 250
         posy = 210
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 165
         posy = 210
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button Finitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 175
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
      // 31/05/2018 - Emanuele - Modifico la variabile perch non  corretta
//        if( $DLG_value_lucido == 1 )
        if($DLG_colore_lucido == 1)
        {
           $R = CHIEDI(-1,"DLG_COLORE_368_L")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
           $DLG_COLORE_368 = $DLG_COLORE_368_L
           GOSUB Get_Image_368_L
        }
        else
        {
           $R = CHIEDI(-1,"DLG_COLORE_368")
           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_COLORE_368
           GOSUB Get_Image_368
        }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(495)

      Placement
      {
         posx = 130
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(496)

      Placement
      {
         posx = 130
         posy = 60
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(422)

      Placement
      {
         posx = 130
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

}

////////// DA QUESTO PUNTO IN POI CI SONO LE DIALOGS CREATE DA MIRKO ///////////////////////////

Dlg Appendino
{
   Caption = MSG(3000)
   Placement
   {
      posx = 150
      posy = 100
      dimx = 176
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 0
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_APPENDINO")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_APPENDINO"),"colori_tutti.txt")
         GOSUB Get_Image_Appendino
      ]
   }
}

Dlg SpecchioTriangolare
{
   Caption = MSG(855)
   Placement
   {
      posx = 150
      posy = 100
      dimx = 176
      dimy = 325
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 235
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Radio RdLucido
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_value_lucido
        Enable  = $DLG_enable_rd_lucido

        Placement
        {
           posx = 15
           posy = 160
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_lucido  = 1
           $DLG_value_opaco   = 0
           $DLG_value_metallo = 0
           $DLG_RAD = "SPETRIV"
           GOSUB CambiaRadJoynt

           VAR_SET_MENU(-1,"DLG_COLORE_SPECCHIOTRIANGOLARE","colori_punto_luc.txt")

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SPECCHIOTRIANGOLARE,"colori_tutti.txt")
           GOSUB Get_Image_Specchio_Triangolare
        ]
      }

      Radio RdOpaco
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_value_opaco
        Enable  = $DLG_enable_rd_opaco

        Placement
        {
           posx = 15
           posy = 180
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_opaco   = 1
           $DLG_value_lucido  = 0
           $DLG_value_metallo = 0
           $DLG_RAD = "SPETRIV"
           GOSUB CambiaRadJoynt

           $DLG_enable_rd_opaco = 1

           VAR_SET_MENU(-1,"DLG_COLORE_SPECCHIOTRIANGOLARE","colori_punto_opa.txt")

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SPECCHIOTRIANGOLARE,"colori_tutti.txt")
           GOSUB Get_Image_Specchio_Triangolare
        ]
      }

      Radio RdMetallo
      {
        Caption = MSG(1355)
        Hint    = MSG(1355)
        Value   = $DLG_value_metallo
        Enable  = $DLG_enable_rd_metallo

        Placement
        {
           posx = 15
           posy = 200
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_value_metallo = 1
           $DLG_value_lucido  = 0
           $DLG_value_opaco   = 0
           $DLG_RAD = "SPETRIL"
           GOSUB CambiaRadJoynt

           $DLG_enable_rd_metallo = 1

           VAR_SET_MENU(-1,"DLG_COLORE_SPECCHIOTRIANGOLARE","colori_punto_opa.txt")

           $DLG_descrizione_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_SPECCHIOTRIANGOLARE,"colori_tutti.txt")
           $DLG_image_file      = STRCAT("%install_dir%\tab_lago\tab_M4\images\menu\opaco",CHR2STR(92),$DLG_COLORE_SPECCHIOTRIANGOLARE,".bmp")
           $DLG_image_file      = SUBST_LABEL($DLG_image_file)
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 260
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 0
         posy = 260
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_SPECCHIOTRIANGOLARE")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_SPECCHIOTRIANGOLARE"),"colori_tutti.txt")

          if( $DLG_COLORE_SPECCHIOTRIANGOLARE == "ARG" )
            {
              $DLG_enable_rd_opaco   = 0
              $DLG_enable_rd_metallo = 0
            }
          else
          {
              $DLG_enable_rd_opaco   = 1
              $DLG_enable_rd_metallo = 1
          }


         GOSUB Get_Image_Specchio_Triangolare
      ]
   }
}

Dlg MensolaSpecchi
{
   Caption = MSG(3001)
   Placement
   {
      posx = 150
      posy = 100
      dimx = 176
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 0
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_MENSOLA")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_MENSOLA"),"colori_tutti.txt")
         GOSUB Get_Image_Mensola
      ]
   }
}

Dlg Kinoki_Tavolo
{
   Caption = MSG(3002)
   Placement
   {
      posx = 150
      posy = 100
      dimx = 500
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame DimensioniTavolo
   {
      Caption = MSG(3004)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabDimensioni
      {
         Placement
         {
            posx =  100
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Radio Dim1
      {
        Caption = MSG(3005)
        Hint    = "Dimensione piccola"
        Value   = $DLG_DIMENSIONI_KINOKI_S

        Placement
        {
           posx = 10
           posy = 40
           dimx = 100
           dimy = 20
        }

        OnClick
        [
            $DLG_DIMENSIONI_KINOKI_S = 1
            $DLG_DIMENSIONI_KINOKI_L = 0
        ]
      }

      Radio Dim2
      {
        Caption = MSG(3006)
        Hint    = "Dimensione grande"
        Value   = $DLG_DIMENSIONI_KINOKI_L

        Placement
        {
           posx = 10
           posy = 80
           dimx = 100
           dimy = 20
        }


        OnClick
        [
            $DLG_DIMENSIONI_KINOKI_L = 1
            $DLG_DIMENSIONI_KINOKI_S = 0
        ]

      }
   }

   Frame FinituraPiano
   {
      Caption = MSG(3003)

      Placement
      {
         posx = 170
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 330
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 410
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 320
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraPiano
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 180
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call ,"GEST_SZ")
         $DLG_COLORE_KINOKI = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_KINOKI"),"colori_tutti.txt")
         GOSUB Get_Image_Kinoki
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 340
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call ,"GEST_PR")
         $DLG_COLORE_TELAIOKINOKI = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_TELAIOKINOKI"),"colori_tutti.txt")
         GOSUB Get_Image_Kinoki
      ]
   }
}

Dlg Kinoki_Sgabello
{
   Caption = MSG(3007)
   Placement
   {
      posx = 150
      posy = 100
      dimx = 340
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraSgabello
   {
      Caption = MSG(3008)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 170
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 240
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 150
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraPiano
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call ,"GEST_SZ")
         $DLG_COLORE_KINOKI = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_KINOKI"),"colori_tutti.txt")
         GOSUB Get_Image_Kinoki
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 180
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call ,"GEST_PR")
         $DLG_COLORE_TELAIOKINOKI = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_TELAIOKINOKI"),"colori_tutti.txt")
         GOSUB Get_Image_Kinoki
      ]
   }
}

Dlg Kinoki_Sedia
{
   Caption = MSG(3009)
   Placement
   {
      posx = 150
      posy = 100
      dimx = 340
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraSedia
   {
      Caption = MSG(3010)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraTelaio
   {
      Caption = MSG(957)

      Placement
      {
         posx = 170
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 240
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 150
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraPiano
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call ,"GEST_SZ")
         $DLG_COLORE_KINOKI = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_KINOKI"),"colori_tutti.txt")
         GOSUB Get_Image_Kinoki
      ]
   }

   Button btnFinituraTelaio
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 180
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call ,"GEST_PR")
         $DLG_COLORE_TELAIOKINOKI = VAR_VAL_STR($DLG_idx_to_call,"GEST_PR")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_TELAIOKINOKI"),"colori_tutti.txt")
         GOSUB Get_Image_Kinoki
      ]
   }
}

Dlg PortaAsciugamaniB
{
   Caption = MSG(1893)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 330
      dimx = 180
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 45
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 20
           dimx = 50
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        //sempre attivo
        Caption = MSG(624)
        Hint    = MSG(624)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(602)
      Enable  = 1

      Placement
      {
         //posx = 320
         posx = 10
         posy = 60
         dimx = 150
         dimy = 170
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  32
            posy =  40
            dimx =  85
            dimy =  85
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 90
         posy = 235
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 235
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         //posx = 135
         posx = 135
         //posy = 35
         posy = 30
         dimx = 20
         dimy = 20
      }

      OnClick
      [
          $R = CHIEDI(-1,"DLG_larghezza")
          $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
          $DLG_caption_larghezza = STR($DLG_larghezza)
          $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         //posx = 175
         posx = 20
         posy = 190
         dimx = 130
         dimy = 25
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_PF")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PF"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PF")
         GOSUB Get_Image_Opaco
      ]
   }
}

Dlg PortaAsciugamani
{
   Caption = $DLG_Porta_Asciugamani_Cartaigienica

   Placement
   {
      posx = 150
      posy = 100
      dimx = 290
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(602)

      Placement
      {
         posx = 10
         posy =  10
         dimx = 150
         dimy = 145
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_descrizione_var
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var
         Value   = $DLG_image_file
         Hint    = $DLG_descrizione_var

         Placement
         {
            posx =  45
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame Lunghezza
   {
      Caption = MSG(3018)

      Placement
      {
         posx = 165
         posy =  10
         dimx = 110
         dimy = 70
      }

      Radio Rd368
      {
        Caption = "368"
        Hint    = "368"
        Value   = $DLG_val_opzione_1
        Enable  = $DLG_enable_lunghezza

        Placement
        {
           posx = 15
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_val_opzione_1 = 1
          $DLG_val_opzione_2 = 0
        ]
      }

      Radio Rd552
      {
        Caption = "552"
        Hint    = "552"
        Value   = $DLG_val_opzione_2
        Enable  = $DLG_enable_lunghezza

        Placement
        {
           posx = 15
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_val_opzione_1 = 0
          $DLG_val_opzione_2 = 1
        ]
      }
   }

   Frame Posizione
   {
      Caption = MSG(3019)

      Placement
      {
         posx = 165
         posy =  85
         dimx = 110
         dimy = 70
      }

      Radio RdSx
      {
        Caption = MSG(562)
        Hint    = MSG(3020)
        Value   = $DLG_val_opzione_3

        Placement
        {
           posx = 15
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_val_opzione_3 = 1
          $DLG_val_opzione_4 = 0
        ]
      }

      Radio RdDx
      {
        Caption = MSG(561)
        Hint    = MSG(3021)
        Value   = $DLG_val_opzione_4

        Placement
        {
           posx = 15
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_val_opzione_3 = 0
          $DLG_val_opzione_4 = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 150
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 60
         posy = 160
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 20
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
         $DLG_descrizione_var = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_ST")
         GOSUB Get_Image_Opaco
      ]
   }
}

Dlg Axys_Tavolo
{
   Caption = "Axys_Table"
   Placement
   {
      posx = 150
      posy = 150
      dimx = 500
      dimy = 360
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FormaGeometrica
   {
      Caption = MSG(3023)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 160
         dimy = 135
      }

      Radio RdRect
      {
         Caption = MSG(644)
         Hint    = MSG(644)
         Value   = $DLG_check_rettangolare

         Placement
         {
           posx = 10
           posy = 30
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_check_rettangolare = 1
           $DLG_check_quadrato     = 0
           $DLG_check_rotondo      = 0
           $DLG_enable_rd_uso_1 = 1

           if( $DLG_check_tipologia==0 )
           {
              $DLG_larghezza = 1600
              $DLG_val_z     = 850
              $DLG_desc_misure     = STRCAT(STR($DLG_larghezza),"x",STR($DLG_val_z))
              $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
              $DLG_caption_misure  = $DLG_desc_misure
              $DLG_value_misure    = $DLG_desc_misure
              //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
              //$DLG_caption_larghezza = STR($DLG_larghezza)
              //$DLG_value_larghezza   = STR($DLG_larghezza)
              VAR_SET_MENU(-1,"DLG_larghezza","LungRectXL")
           }
           else
           {
              $DLG_larghezza = 800
              $DLG_val_z     = 520
              $DLG_desc_misure     = STRCAT(STR($DLG_larghezza),"x",STR($DLG_val_z))
              $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
              $DLG_caption_misure  = $DLG_desc_misure
              $DLG_value_misure    = $DLG_desc_misure
              //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
              //$DLG_caption_larghezza = STR($DLG_larghezza)
              //$DLG_value_larghezza   = STR($DLG_larghezza)
              $DLG_check_parallelo   = 1
              $DLG_check_ruotato     = 0
              $DLG_enable_rd_uso_1   = 0
              VAR_SET_MENU(-1,"DLG_larghezza","LungRectXS")
           }
         ]
      }

      Radio RdQuad
      {
         Caption = MSG(643)
         Hint    = MSG(643)
         Value   = $DLG_check_quadrato

         Placement
         {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_check_rettangolare = 0
           $DLG_check_quadrato     = 1
           $DLG_check_rotondo      = 0
           $DLG_enable_rd_uso_1    = 1

           if( $DLG_check_tipologia==0 )
           {
              $DLG_larghezza = 1000
              $DLG_val_z     = 1000
              $DLG_desc_misure     = STRCAT(STR($DLG_larghezza),"x",STR($DLG_val_z))
              $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
              $DLG_caption_misure  = $DLG_desc_misure
              $DLG_value_misure    = $DLG_desc_misure
              //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
              //$DLG_caption_larghezza = STR($DLG_larghezza)
              //$DLG_value_larghezza   = STR($DLG_larghezza)
              VAR_SET_MENU(-1,"DLG_larghezza","LungQuadXL")
           }
           else
           {
              $DLG_larghezza = 800
              $DLG_val_z     = 800
              $DLG_desc_misure     = STRCAT(STR($DLG_larghezza),"x",STR($DLG_val_z))
              $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
              $DLG_caption_misure  = $DLG_desc_misure
              $DLG_value_misure    = $DLG_desc_misure
              //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
              //$DLG_caption_larghezza = STR($DLG_larghezza)
              //$DLG_value_larghezza   = STR($DLG_larghezza)
              VAR_SET_MENU(-1,"DLG_larghezza","LungQuadXS")
           }
         ]
      }

      Radio RdRoto
      {
         Caption = MSG(3030)
         Hint    = MSG(3030)
         Value   = $DLG_check_rotondo

         Placement
         {
           posx = 10
           posy = 90
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_check_rettangolare = 0
           $DLG_check_quadrato     = 0
           $DLG_check_rotondo      = 1
           $DLG_check_ruotato      = 0
           $DLG_check_parallelo    = 1

           $DLG_enable_rd_uso_1    = 0

           if( $DLG_check_tipologia==0 )
           {
              $DLG_larghezza = 1000
              $DLG_val_z     = 1000
              $DLG_desc_misure = STRCAT(" ", STR($DLG_larghezza))
              $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
              $DLG_caption_misure  = $DLG_desc_misure
              $DLG_value_misure    = $DLG_desc_misure
              //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
              //$DLG_caption_larghezza = STR($DLG_larghezza)
              //$DLG_value_larghezza   = STR($DLG_larghezza)
              VAR_SET_MENU(-1,"DLG_larghezza","LungRotoXL")
           }
           else
           {
              $DLG_larghezza = 900
              $DLG_val_z     = 900
              $DLG_desc_misure = STRCAT(" ", STR($DLG_larghezza))
              $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
              $DLG_caption_misure  = $DLG_desc_misure
              $DLG_value_misure    = $DLG_desc_misure
              //$DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
              //$DLG_caption_larghezza = STR($DLG_larghezza)
              //$DLG_value_larghezza   = STR($DLG_larghezza)
              VAR_SET_MENU(-1,"DLG_larghezza","LungRotoXS")
           }
         ]
      }
   }

   Frame TipologiaDesign
   {
      Caption = MSG(3024)

      Placement
      {
         posx = 10
         posy = 150
         dimx = 160
         dimy = 75
      }

      Radio RdParall
      {
         Caption = MSG(3031)
         Hint    = MSG(3031)
         Value   = $DLG_check_parallelo

         Placement
         {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_check_parallelo = 1
           //$DLG_val_parallelo   = "TN2"
           $DLG_check_ruotato   = 0
         ]
      }

      Radio RdRuot
      {
         Caption = MSG(3032)
         Hint    = MSG(3032)
         Value   = $DLG_check_ruotato
         Enable  = $DLG_enable_rd_uso_1


         Placement
         {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_check_parallelo = 0
           //$DLG_val_parallelo   = "TN1"
           $DLG_check_ruotato   = 1
         ]
      }
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 230
         dimx = 160
         dimy = 55
      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Enable  = 1
        Value   = $DLG_value_misure

        Placement
        {
           posx = 70
           posy = 20
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Enable  = 1
        Value   = MSG(637)

        Placement
        {
           posx = 10
           posy = 25
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame FinituraG1
   {
      Caption = MSG(3026)

      Placement
      {
         posx = 175
         posy = 150
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraG2
   {
      Caption = MSG(3027)

      Placement
      {
         posx = 175
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im2
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraG3
   {
      Caption = MSG(3028)

      Placement
      {
         posx = 330
         posy =  10
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im3
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Frame FinituraG4
   {
      Caption = MSG(3029)

      Placement
      {
         posx = 330
         posy = 150
         dimx = 150
         dimy = 135
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var4
         Value   = $DLG_descrizione_var4
         Hint    = $DLG_descrizione_var4

         Placement
         {
            posx =  10
            posy =  20
            dimx = 130
            dimy =  25
         }
      }

      Image Im4
      {
         Caption = $DLG_descrizione_var4
         Value   = $DLG_image_file4
         Hint    = $DLG_descrizione_var4

         Placement
         {
            posx =  40
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 190
         posy = 295
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 115
         posy = 295
         dimx = 70
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 140
         posy = 250
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")

        // se quadrato
        $DLG_val_z = $DLG_larghezza
        // altri casi
        if( $DLG_larghezza==800 & $DLG_check_rettangolare  ==1 ) { $DLG_val_z = 520 }
        if( $DLG_larghezza==1200 & $DLG_check_rotondo      ==1 ) { $DLG_val_z = 1200 }
        if( $DLG_larghezza==1200 & $DLG_check_rettangolare ==1 ) { $DLG_val_z = 600  }
        if( $DLG_larghezza==1500 | $DLG_larghezza==1600 )  { $DLG_val_z = 850  }
        if( $DLG_larghezza==1900 )  { $DLG_val_z = 900  }
        if( $DLG_larghezza==2200 )  { $DLG_val_z = 1000 }

        if($DLG_check_rotondo==1)  { $DLG_desc_misure = STRCAT(" ", STR($DLG_larghezza)) }
        else                       { $DLG_desc_misure = STRCAT(STR($DLG_larghezza),"x",STR($DLG_val_z)) }
        $DLG_hint_misure     = STRCAT("Misure =",$DLG_desc_misure)
        $DLG_caption_misure  = $DLG_desc_misure
        $DLG_value_misure    = $DLG_desc_misure

        // se cambio la misura la mia forma  gi definita possibile solo il seguente:
        if( $DLG_check_tipologia==1 & $DLG_larghezza==800 & $DLG_check_rettangolare==1)
        {
            $DLG_enable_rd_uso_1 = 0
        }
        else
        {
            $DLG_enable_rd_uso_1 = 1
        }
      ]
   }

   Button btnFinituraG1
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 185
         posy = 260
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_AXYSGAMBA_A")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AXYSGAMBA_A,"colori_tutti.txt")
         $DLG_COLORE_AXYS = $DLG_COLORE_AXYSGAMBA_A
         GOSUB Get_Image_Axys_Tavolo
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraG2
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 185
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_AXYSGAMBA_B")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AXYSGAMBA_B,"colori_tutti.txt")
         $DLG_COLORE_AXYS = $DLG_COLORE_AXYSGAMBA_B
         GOSUB Get_Image_Axys_Tavolo
         $DLG_image_file2 = $DLG_image_file
      ]
   }

   Button btnFinituraG3
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 340
         posy = 120
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_AXYSGAMBA_C")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AXYSGAMBA_C,"colori_tutti.txt")
         $DLG_COLORE_AXYS = $DLG_COLORE_AXYSGAMBA_C
         GOSUB Get_Image_Axys_Tavolo
         $DLG_image_file3 = $DLG_image_file
      ]
   }

   Button btnFinituraG4
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(947)

      Placement
      {
         posx = 340
         posy = 260
         dimx = 130
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_COLORE_AXYSGAMBA_D")
         $DLG_descrizione_var4 = DESCRIZIONE_VAL_TAB($DLG_COLORE_AXYSGAMBA_D,"colori_tutti.txt")
         $DLG_COLORE_AXYS = $DLG_COLORE_AXYSGAMBA_D
         GOSUB Get_Image_Axys_Tavolo
         $DLG_image_file4 = $DLG_image_file
      ]
   }
}

Dlg Contenitore45_Kit_Led
{
   Caption = "Led per contenitore punto"

   Placement
   {
      posx = 150
      posy = 150
      dimx = 200
      dimy = 230
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Kit
   {
      Caption = "Kit"

      Placement
      {
         posx = 50
         posy = 10
         dimx = 90
         dimy = 120
      }

      Radio RdKit1
      {
         Caption = "1 Led"
         Hint    = "1 Led"
         Value   = $DLG_kit1
         Enable  = $DLG_enable_rd_kit1

         Placement
         {
           posx = 10
           posy = 30
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_kit1 = 1
            $DLG_kit2 = 0
         ]
      }

      Radio RdKit2
      {
         Caption = "2 Led"
         Hint    = "2 Led"
         Value   = $DLG_kit2
         Enable  = $DLG_enable_rd_kit2

         Placement
         {
           posx = 10
           posy = 60
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_kit1 = 0
            $DLG_kit2 = 1
         ]
      }

      Radio RdElimina
      {
        Caption = "Elimina led"
        Hint    = "Elimina led"
        Enable  = 1
        Value   = $DLG_elimina

        Placement
        {
           posx = 10
           posy = 90
           dimx = 120
           dimy = 20
        }

        OnClick
        [
            $DLG_kit1    = 0
            $DLG_kit2    = 0
            $DLG_elimina = 1
        ]
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 110
         posy = 150
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 20
         posy = 150
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Contenitore45_Kit_Led_1
{
   Caption = "1 Led"

   Placement
   {
      posx = 10
      posy = 10
      dimx = 180
      dimy = 210
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Posizioni
   {

      Caption = "Larghezza e posizione Led"

      Placement
      {
         posx = 15
         posy = 10
         dimx = 140
         dimy = 120
      }

      Label LblAlto
      {
        Caption = "In alto"
        Hint    = MSG(493)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }
      }

      Radio RdAlto1
      {
         Caption = "372"
         Hint    = "372"
         Value   = $DLG_x1_led

         Placement
         {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_x1_led  = 1
            $DLG_x2_led  = 0
            $DLG_x11_led = 0
            $DLG_x22_led = 0
            $DLG_top     = 1
            $DLG_bottom  = 0
            $DLG_l_led = 372
         ]
      }

      Radio RdAlto2
      {
         Caption = "500"
         Hint    = "500"
         Value   = $DLG_x2_led
         Enable  = $DLG_enable_rd_misura

         Placement
         {
           posx = 60
           posy = 40
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_x1_led  = 0
            $DLG_x2_led  = 1
            $DLG_x11_led = 0
            $DLG_x22_led = 0
            $DLG_top     = 1
            $DLG_bottom  = 0
            $DLG_l_led = 500
         ]
      }

      Label LblBasso
      {
        Caption = "In basso"
        Hint    = MSG(493)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 70
           dimx = 120
           dimy = 20
        }
      }

      Radio RdBasso1
      {
         Caption = "372"
         Hint    = "372"
         Value   = $DLG_x11_led

         Placement
         {
           posx = 10
           posy = 90
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_x1_led  = 0
            $DLG_x2_led  = 0
            $DLG_x11_led = 1
            $DLG_x22_led = 0
            $DLG_top     = 0
            $DLG_bottom  = 1
            $DLG_l_led = 372
         ]
      }

      Radio RdBasso2
      {
         Caption = "500"
         Hint    = "500"
         Value   = $DLG_x22_led
         Enable  = $DLG_enable_rd_misura

         Placement
         {
           posx = 60
           posy = 90
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_x1_led  = 0
            $DLG_x2_led  = 0
            $DLG_x11_led = 0
            $DLG_x22_led = 1
            $DLG_top     = 0
            $DLG_bottom  = 1
            $DLG_l_led = 500
         ]
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 140
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 140
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg Contenitore45_Kit_Led_2
{
   Caption = "2 Led"

   Placement
   {
      posx = 10
      posy = 10
      dimx = 180
      dimy = 170
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame XLed
   {
      Caption = "Larghezze led"

      Placement
      {
         posx = 30
         posy = 10
         dimx = 110
         dimy = 60
      }

      Radio Kit2XS
      {
         Caption = "372"
         Hint    = "372"
         Value   = $DLG_x1_led


         Placement
         {
           posx = 10
           posy = 30
           dimx = 120
           dimy = 20
         }

         OnClick
         [
           $DLG_x1_led  = 1
           $DLG_x2_led  = 0
           $DLG_x11_led = 1
           $DLG_x22_led = 0
           $DLG_l_led = 372
         ]
      }

      Radio Kit2XL
      {
         Caption = "500"
         Hint    = "500"
         Value   = $DLG_x22_led
         Enable  = $DLG_enable_rd_misura

         Placement
         {
           posx = 60
           posy = 30
           dimx = 120
           dimy = 20
         }

         OnClick
         [
            $DLG_x1_led  = 0
            $DLG_x2_led  = 1
            $DLG_x11_led = 0
            $DLG_x22_led = 1
            $DLG_l_led = 500
         ]
      }
   }

   Button Annulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 100
         posy = 90
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
         posy = 90
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg LavaboDepth
{
   Caption = MSG(1960)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 475
      //dimy = 310
      dimy = 315
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(637)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 140
         dimy = 200
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(622)
        Enable  = 1
        Value   = MSG(624)

        Placement
        {
           posx = 10
           posy = 20
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(623)
        Enable  = 1
        Value   = MSG(626)

        Placement
        {
           posx = 10
           posy = 45
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit Edtlarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Enable  = 1
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 70
           posy = 15
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Enable  = 1
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 70
           posy = 40
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Radio RdWW
      {
         //Caption = MSG(1957)
         Caption = "Depth wildwood"
         Hint    = MSG(1957)
         Value   = $DLG_WildWood

         Placement
         {
            posx = 10
            posy = 80
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_WildWood = 1
            $DLG_Laminato = 0
            $DLG_Resina   = 0
            $DLG_Slimtech = 0

            $DLG_RAD = STRCAT("LAVADEPTW",STR($DLG_num_top))
            $DLG_var_to_call_1 = "GEST_SZ"
            GOSUB CambiaRadJoynt

            VAR_VALUESTR_SET($DLG_idx_to_call,$DLG_var_to_call_1,"SZ1")
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_1,"=",APICI(),"SZ1",APICI()))
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file

            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
            {
               $DLG_menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
               $DLG_menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
               if( STRCMP($DLG_menu_get,"")==0 | STRCMP($DLG_menu_get,$DLG_menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_menu_set) }
               $DLG_modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
               $DLG_modo_set = 131072
               if( $DLG_modo_get!=$DLG_modo_set ) { VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_modo_set) }
            }
         ]
      }

      Radio RdLam
      {
         Caption = MSG(1962)
         Hint    = MSG(1962)
         Value   = $DLG_Laminato
         Enable  = 1

         Placement
         {
            posx = 10
            posy = 100
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_WildWood = 0
            $DLG_Laminato = 1
            $DLG_Resina   = 0
            $DLG_Slimtech = 0

            $DLG_RAD = STRCAT("LAVADEPTL",STR($DLG_num_top))
            $DLG_var_to_call_1 = "GEST_PP"
            GOSUB CambiaRadJoynt

            VAR_VALUESTR_SET($DLG_idx_to_call,$DLG_var_to_call_1,"BCO")
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_1,"=",APICI(),"BCO",APICI()))
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file

            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
            {
               $DLG_menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
               $DLG_menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
               if( STRCMP($DLG_menu_get,"")==0 | STRCMP($DLG_menu_get,$DLG_menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_menu_set) }
               $DLG_modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
               $DLG_modo_set = 131072
               if( $DLG_modo_get!=$DLG_modo_set ) { VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_modo_set) }
            }
         ]
      }

      Radio RdRes
      {
         Caption = MSG(1958)
         Hint    = MSG(1958)
         Value   = $DLG_Resina
         Enable  = 1

         Placement
         {
            posx = 10
            posy = 120
            dimx = 140
            dimy = 20
         }

         OnClick
         [
            $DLG_WildWood = 0
            $DLG_Laminato = 0
            $DLG_Resina   = 1
            $DLG_Slimtech = 0

            $DLG_RAD = STRCAT("LAVADEPTR",STR($DLG_num_top))
            $DLG_var_to_call_1 = "GEST_BD"
            GOSUB CambiaRadJoynt

            VAR_VALUESTR_SET($DLG_idx_to_call,$DLG_var_to_call_1,"BCO")
            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_1,"=",APICI(),"BCO",APICI()))
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file

            if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
            {
               $DLG_menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
               $DLG_menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
               if( STRCMP($DLG_menu_get,"")==0 | STRCMP($DLG_menu_get,$DLG_menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_menu_set) }
               $DLG_modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
               $DLG_modo_set = 131072
               if( $DLG_modo_get!=$DLG_modo_set ) { VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_modo_set) }
            }
         ]
      }

      //Radio RdSlim
      //{
      //   Caption = MSG(1959)
      //   Hint    = MSG(1959)
      //   Value   = $DLG_Slimtech
      //   //Enable  = 1
      //   //Massimiliano 13/09/16 - questo lavabo rimane bloccato perch ne sono stati fatti pochi e hanno avuto anche N.C.
      //   //                        chiesto a Slongo, Agujaro e Cachero e mi hanno detto di non sbloccarlo su Metron
      //   //                        caricamento da fare a mano in caso di necessit
      //   Enable  = 0
      //
      //   Placement
      //   {
      //      posx = 10
      //      posy = 140
      //      dimx = 140
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $DLG_WildWood = 0
      //      $DLG_Laminato = 0
      //      $DLG_Resina   = 0
      //      $DLG_Slimtech = 1
      //
      //      $DLG_RAD = STRCAT("LAVADEPTS",STR($DLG_num_top))
      //      $DLG_var_to_call_1 = "GEST_BE"
      //      $DLG_var_to_call_2 = "GEST_BF"
      //      GOSUB CambiaRadJoynt
      //
      //      VAR_VALUESTR_SET($DLG_idx_to_call,$DLG_var_to_call_1,"DB1")
      //      COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_1,"=",APICI(),"DB1",APICI()))
      //      COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," ",$DLG_var_to_call_2,"=",APICI(),"BF1",APICI()))
      //      $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
      //      $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2),"colori_tutti.txt")
      //      $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
      //      GOSUB Get_Image_Opaco
      //      $DLG_image_file1 = $DLG_image_file
      //      $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_2)
      //      GOSUB Get_Image_Opaco
      //      $DLG_image_file2 = $DLG_image_file
      //
      //      if( VAR_EXIST($DLG_idx_to_call,$DLG_var_to_call_1 )==1 )
      //      {
      //         $DLG_menu_get = VAR_MENU($DLG_idx_to_call,$DLG_var_to_call_1)
      //         $DLG_menu_set = "< OnlyDesc; LVStyle=2; HBmp=100; WBmp=100 >"
      //         if( STRCMP($DLG_menu_get,"")==0 | STRCMP($DLG_menu_get,$DLG_menu_set)!=0 ) { VAR_SET_MENU($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_menu_set) }
      //         $DLG_modo_get = VAR_MODE($DLG_idx_to_call,$DLG_var_to_call_1)
      //         $DLG_modo_set = 131072
      //         if( $DLG_modo_get!=$DLG_modo_set ) { VAR_SET_MODE($DLG_idx_to_call,$DLG_var_to_call_1,$DLG_modo_set) }
      //      }
      //   ]
      //}

      Check chkTasselli
      {
        Caption = MSG(896)
        Hint    = MSG(896)
        Enable  = 1
        Value   = $DLG_tasselli

        Placement
        {
           posx = 10
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_tasselli==1 )   {  $DLG_tasselli=1  }
           else                     {  $DLG_tasselli=0  }
        ]

      }
   }

   //Massimiliano 09/06/14 - nuova gestione scassi rubinetti
   Frame FrmRubinetto
   {
      Caption = MSG(1989)

      Placement
      {
         posx = 10
         posy = 210
         dimx = 140
         dimy = 70
      }

      Check Lav1
      {
         Caption = MSG(1890)
         Hint    = MSG(1890)
         Enable  = $DLG_enable_rub1
         Value   = $DLG_Rub1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 140
            dimy = 20
         }

         OnClick
         [
           $DLG_Rub1 = 1
         ]

      }

      Check Lav2
      {
         Caption = MSG(1891)
         Hint    = MSG(1891)
         Enable  = $DLG_enable_rub2
         Value   = $DLG_Rub2

         Placement
         {
            posx = 10
            posy = 40
            dimx = 140
            dimy = 20
         }

         OnClick
         [
           $DLG_Rub2 = 1
         ]

      }
   }

   //15.06.2017 - Filippo - auto-centraggio scasso
   Frame FrmScasso
   {
      Caption = MSG(3240)

      Placement
      {
         posx = 155
         posy = 210
         dimx = 150
         dimy = 70
      }

      Check cntr
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Enable  = $DLG_ena_centraggio
         Value   = $DLG_centra_scasso

         Placement
         {
            posx = 10
            posy = 30
            dimx = 140
            dimy = 20
         }

         OnClick
         [
           if( $DLG_centra_scasso==1 ) {  $DLG_centra_scasso=1  }
           else                        {  $DLG_centra_scasso=0  }
         ]

      }
   }

   Frame FinituraTop
   {
      Caption = MSG(1933)

      Placement
      {
         posx = 155
         posy = 10
         dimx = 150
         //dimy = 170
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 25
            //posy = 18
            posy = 28
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  25
            //posy =  35
            posy =  45
            dimx = 100
            dimy = 100
         }
      }
   }

   Frame FinituraFughe
   {
      Caption = MSG(1961)

      Placement
      {
         posx = 310
         posy = 10
         dimx = 150
         //dimy = 170
         dimy = 200
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_Slimtech

         Placement
         {
            posx = 25
            //posy = 18
            posy = 28
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2
         Enable  = $DLG_Slimtech

         Placement
         {
            posx =  25
            //posy =  35
            posy =  45
            dimx = 100
            dimy = 100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 395
         //posy = 190
         posy = 230
         dimx = 65
         //dimy = 30
         dimy = 40
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 310
         //posy = 190
         posy = 230
         dimx = 80
         //dimy = 30
         dimy = 40
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(622)

      Placement
      {
         posx = 125
         posy = 25
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_larghezza")
        $DLG_hint_larghezza    = STRCAT(MSG(439)," = ",STR($DLG_larghezza))
        $DLG_caption_larghezza = STR($DLG_larghezza)
        $DLG_value_larghezza   = STR($DLG_larghezza)
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(623)
      Enable = 1
      //Enable = $DLG_enable_profondita

      Placement
      {
         posx = 125
         posy = 50
         dimx = 20
         dimy = 20
      }

      OnClick
      [

        $R = CHIEDI(-1,"DLG_profondita")
        $DLG_hint_profondita    = STRCAT(MSG(430)," = ",STR($DLG_profondita))
        $DLG_caption_profondita = STR($DLG_profondita)
        $DLG_value_profondita   = STR($DLG_profondita)
      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         //posy = 150
         posy = 170
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,$DLG_var_to_call_1)
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,$DLG_var_to_call_1)
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraFughe
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_Slimtech

      Placement
      {
         posx = 335
         //posy = 150
         posy = 170
         dimx = 100
         dimy =  22
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_BF")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_BF"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_BF")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }
}

Dlg Top368WW
{
   Caption = MSG(166)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 190
      dimy = 350
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura_Piano
   {
      Caption = MSG(251)

      Placement
      {
         posx = 15
         posy = 15
         dimx = 155
         dimy = 150
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_descrizione_SZ
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione_SZ
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_SZ

         Placement
         {
            posx =  35
            posy =  40
            dimx =  80
            dimy =  80
         }
      }

   }

   Frame Conf_angoli
   {
      Caption = MSG(190)
      Enable  = $DLG_enable_option

      Placement
      {
         posx = 15
         posy = 180
         dimx = 155
         dimy = 85
      }

      Radio dxsx
      {
        Caption = MSG(191)
        Hint    = MSG(191)
        Enable  = $DLG_enable_option
        Value   = $DLG_dxsx

        Placement
        {
           posx = 20
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_dx   = 0
           $DLG_sx   = 0
           $DLG_dxsx = 1
        ]
      }

      Radio dx
      {
        Caption = MSG(192)
        Hint    = MSG(192)
        Enable  = $DLG_enable_option
        Value   = $DLG_dx

        Placement
        {
           posx = 20
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_dx   = 1
           $DLG_sx   = 0
           $DLG_dxsx = 0
        ]
      }

      Radio sx
      {
        Caption = MSG(193)
        Hint    = MSG(193)
        Enable  = $DLG_enable_option
        Value   = $DLG_sx

        Placement
        {
           posx = 20
           posy = 60
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_dx   = 0
           $DLG_sx   = 1
           $DLG_dxsx = 0
        ]
      }

   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  35
         posy = 140
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
         $DLG_descrizione_SZ = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ")
         GOSUB Get_Image_Opaco
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 105
         posy = 280
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  15
         posy = 280
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}



// Dialog Comodino Colletto - Massimiliano - 6/03/14
Dlg ComodinoColletto
{
   Caption = MSG(1969)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 925
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame OpzioniComodino
   {
      Caption = MSG(1970)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 150
         dimy = 135
      }


      // Opzioni SENZA Rivestimento
      Radio rdSRiv
      {
        Caption = MSG(1971)
        Hint    = MSG(1972)
        Enable  = 1
        Value   = $DLG_ComodinoColletto_SRiv

        Placement
        {
           posx = 20
           posy = 50
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_ComodinoColletto_SRiv     = 1
           $DLG_ComodinoColletto_Riv      = 0
           $DLG_RAD = "COLLSRIV"
           GOSUB CambiaRadComodinoColletto
        ]
      }

      // Opzioni CON Rivestimento
      Radio rdRiv
      {
         Caption = MSG(1973)
         Hint    = MSG(1974)
         Enable  = 1
         Value   = $DLG_ComodinoColletto_Riv

         Placement
         {
            posx  = 20
            posy  = 25
            dimx  = 120
            dimy  = 20
         }

         OnClick
         [
            $DLG_ComodinoColletto_SRiv    = 0
            $DLG_ComodinoColletto_Riv     = 1
            $DLG_RAD = "COLLRIV"
            GOSUB CambiaRadComodinoColletto

            VAR_VALUESTR_SET ($DLG_idx_to_call,"GEST_RV","S01")
            $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
            GOSUB Get_Image_Rivestimenti
            $DLG_image_file2 = $DLG_image_file

            VAR_VALUESTR_SET ($DLG_idx_to_call,"GEST_RW","S02")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RW"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RW")
            GOSUB Get_Image_Rivestimenti
            $DLG_image_file1 = $DLG_image_file

         ]
      }

   }

   Frame RivestimentoInt
   {
     Caption = MSG(1975)

     Placement
     {
        posx = 160
        posy = 10
        dimx = 150
        dimy = 135
     }

     Label RivestimentoInt
     {
        Caption = $DLG_descrizione_var1
        Value   = $DLG_descrizione_var1
        Hint    = $DLG_descrizione_var1
        Enable  = $DLG_ComodinoColletto_Riv

        Placement
        {
           posx = 10
           posy = 20
           dimx = 130
           dimy = 25
        }
     }

     Image Im1
     {
        Caption = $DLG_descrizione_var1
        Value   = $DLG_image_file1
        Hint    = $DLG_descrizione_var1
        Enable  = $DLG_ComodinoColletto_Riv

        Placement
        {
           posx = 45
           posy = 35
           dimx = 64
           dimy = 64
        }
     }
   }

   Frame RivestimentoEst
   {
     Caption = MSG(1976)

     Placement
     {
        posx = 310
        posy = 10
        dimx = 150
        dimy = 135
     }

     Label RivestimentoEst
     {
        Caption = $DLG_descrizione_var2
        Value   = $DLG_descrizione_var2
        Hint    = $DLG_descrizione_var2
        Enable  = $DLG_ComodinoColletto_Riv

        Placement
        {
           posx = 10
           posy = 20
           dimx = 130
           dimy = 25
        }
     }

     Image Im1
     {
        Caption = $DLG_descrizione_var2
        Value   = $DLG_image_file2
        Hint    = $DLG_descrizione_var2
        Enable  = $DLG_ComodinoColletto_Riv

        Placement
        {
           posx = 45
           posy = 35
           dimx = 64
           dimy = 64
        }
     }
   }

   Frame Ripiano1P
   {
      Caption = MSG(1977)

      Placement
      {
         posx = 460
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label Rip1P
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_descrizione_var3
         Hint    = $DLG_descrizione_var3

         Placement
         {
          posx = 45
          posy = 20
          dimx = 130
          dimy = 135
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var3
         Value   = $DLG_image_file3
         Hint    = $DLG_descrizione_var3

         Placement
         {
            posx = 45
            posy = 35
            dimx = 64
            dimy = 64
         }
      }

   }

   Frame Ripiano2P
   {
      Caption = MSG(1978)

      Placement
      {
         posx = 610
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label Rip2P
      {
         Caption = $DLG_descrizione_var4
         Value   = $DLG_descrizione_var4
         Hint    = $DLG_descrizione_var4

         Placement
         {
          posx = 45
          posy = 20
          dimx = 130
          dimy = 135
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var4
         Value   = $DLG_image_file4
         Hint    = $DLG_descrizione_var4

         Placement
         {
            posx = 45
            posy = 35
            dimx = 64
            dimy = 64
         }
      }

   }

   Frame Ripiano3P
   {
      Caption = MSG(1979)

      Placement
      {
         posx = 760
         posy = 10
         dimx = 150
         dimy = 135
      }

      Label Rip3P
      {
         Caption = $DLG_descrizione_var5
         Value   = $DLG_descrizione_var5
         Hint    = $DLG_descrizione_var5

         Placement
         {
          posx = 45
          posy = 20
          dimx = 130
          dimy = 135
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var5
         Value   = $DLG_image_file5
         Hint    = $DLG_descrizione_var5

         Placement
         {
            posx = 45
            posy = 35
            dimx = 64
            dimy = 64
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 460
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 380
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }


   Button btnRivInt
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(947)
      Enable  = $DLG_ComodinoColletto_Riv

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RW")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RW"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RW")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file
       ]
   }

   Button btnRivEst
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(947)
      Enable  = $DLG_ComodinoColletto_Riv

      Placement
      {
         posx = 320
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file

       ]
   }

    Button btnRip1P
    {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1980)

      Placement
      {
         posx = 470
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_1P")
         $DLG_descrizione_var3 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_1P"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_1P")
         GOSUB Get_Image_Opaco
         $DLG_image_file3 = $DLG_image_file
       ]
   }

   Button btnRip2P
    {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1980)


      Placement
      {
         posx = 620
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_2P")
         $DLG_descrizione_var4 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_2P"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_2P")
         GOSUB Get_Image_Opaco
         $DLG_image_file4 = $DLG_image_file
       ]
   }

   Button btnRip3P
    {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(1980)


      Placement
      {
         posx = 770
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_3P")
         $DLG_descrizione_var5 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_3P"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_3P")
         GOSUB Get_Image_Opaco
         $DLG_image_file5 = $DLG_image_file
       ]
   }




}


// Massimiliano 16/05/14 - Dialog Letto Colletto
Dlg LettoColletto
{
   Caption = MSG(1969)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 480
      dimy = 225
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame frmMisMaterasso
   {
      Caption = MSG(807)

      Placement
      {
         posx =  10
         posy =  10
         dimx = 150
         dimy = 135
      }

      Radio rd100x200
      {
        Caption = "100 x 200"
        Hint    = "100 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_0

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 0
        ]

      }

      Radio rd120x200
      {
        Caption = "120 x 200"
        Hint    = "120 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_1

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 1
        ]

      }

      Radio rd152x203
      {
        Caption = "152 x 203"
        Hint    = "152 x 203"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_2

        Placement
        {
           posx = 10
           posy = 55
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 2
        ]
      }

      Radio rd160x200
      {
        Caption = "160 x 200"
        Hint    = "160 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_3

        Placement
        {
           posx = 10
           posy = 75
           dimx = 145
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 3
        ]
      }

      Radio rd180x200
      {
        Caption = "180 x 200"
        Hint    = "180 x 200"
        Enable  = $DLG_en_mis_materasso
        Value   = $DLG_val_mis_materasso_4

        Placement
        {
           posx = 10
           posy = 95
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_mis_materasso = 4
        ]

      }
   }

   Frame Accessori
   {
      Caption = MSG(803)
      //Hint = "Modificare le misure del fianco selezionato"

      Placement
      {
         posx = 10
         posy = 145
         dimx = 150
         dimy = 45
      }

      Check chkMaterasso
      {
        Caption = MSG(814)
        Hint    = MSG(815)
        Enable  = 1
        Value   = $DLG_materasso

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if($DLG_materasso==1)
           {
              $DLG_materasso=1
           }
           else
           {
              $DLG_materasso=0
           }
        ]
      }
   }

   Frame RivestimentoInt
   {
     Caption = MSG(1975)

     Placement
     {
        posx = 160
        posy = 10
        dimx = 150
        dimy = 135
     }

     Label RivestimentoInt
     {
        Caption = $DLG_descrizione_var1
        Value   = $DLG_descrizione_var1
        Hint    = $DLG_descrizione_var1
        Enable  = 1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 130
           dimy = 25
        }
     }

     Image Im1
     {
        Caption = $DLG_descrizione_var1
        Value   = $DLG_image_file1
        Hint    = $DLG_descrizione_var1
        Enable  = 1

        Placement
        {
           posx = 45
           posy = 35
           dimx = 64
           dimy = 64
        }
     }
   }

   Frame RivestimentoEst
   {
     Caption = MSG(1976)

     Placement
     {
        posx = 310
        posy = 10
        dimx = 150
        dimy = 135
     }

     Label RivestimentoEst
     {
        Caption = $DLG_descrizione_var2
        Value   = $DLG_descrizione_var2
        Hint    = $DLG_descrizione_var2

        Placement
        {
           posx = 10
           posy = 20
           dimx = 130
           dimy = 25
        }
     }

     Image Im2
     {
        Caption = $DLG_descrizione_var2
        Value   = $DLG_image_file2
        Hint    = $DLG_descrizione_var2
        Enable  = 1

        Placement
        {
           posx = 45
           posy = 35
           dimx = 64
           dimy = 64
        }
     }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 280
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 180
         posy = 160
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnRivInt
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(947)

      Placement
      {
         posx = 170
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RW")
         $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RW"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RW")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file1 = $DLG_image_file
       ]
   }

   Button btnRivEst
   {
      Caption = MSG(619)
      Result  = 0
      Hint    = MSG(947)

      Placement
      {
         posx = 320
         posy = 115
         dimx = 130
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_RV")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_RV"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_RV")
         GOSUB Get_Image_Rivestimenti
         $DLG_image_file2 = $DLG_image_file

       ]
   }
}

//Massimiliano 21/09/16 - dialog per guide
Dlg Guida
{
   Caption = MSG(3046)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 210
      dimy = 200
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   LinkLabel Link1
   {
       Caption = MSG(3047)
       Value = $DLG_link
       Hint = MSG(3047)

       Placement
       {
           posx = 10
           posy = 10
           dimx = 180
           dimy = 25
       }
       Font
       {
           size = 15
           name = "Verdana"
      }
   }

   Frame choose
   {
      Caption = MSG(3049)

      Placement
      {
         posx =  10
         posy =  50
         dimx = 180
         dimy =  65
      }

      Radio rdSI
      {
        Caption = MSG(2408)
        Hint    = MSG(2408)
        Value   = $DLG_guida_si

        Placement
        {
           posx = 10
           posy = 15
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_guida_si = 1
           $DLG_guida_no = 0
        ]

      }

      Radio rdNO
      {
        Caption = MSG(2409)
        Hint    = MSG(2409)
        Value   = $DLG_guida_no

        Placement
        {
           posx = 10
           posy = 35
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           $DLG_guida_si = 1
           $DLG_guida_no = 0
        ]

      }
   }

   Button btnOK
   {
      Caption = MSG(3050)
      Result  = 1
      Default = 1
      Hint = MSG(3050)

      Placement
      {
         posx = 10
         posy = 120
         dimx = 180
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

//Massimiliano 24/07/16 - creo gestore guide
Dlg GestoreGuide
{
   Caption = MSG(3049)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 375
      dimy = 400
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   //Label LabGuida
   //{
   //   Caption = MSG(3049)
   //
   //   Placement
   //   {
   //      posx = 10
   //      posy = 10
   //      dimx = 100
   //      dimy = 25
   //   }
   //}

   //Button btnOK
   //{
   //   Caption = MSG(3050)
   //   Result  = 1
   //   Default = 1
   //   Hint = MSG(3050)
   //
   //   Placement
   //   {
   //      posx = 260
   //      posy = 10
   //      dimx = 100
   //      dimy = 30
   //   }
   //
   //   OnClick
   //   [
   //      $OK=1
   //   ]
   //}

   //steel
   Frame configSteel
   {
      Placement
      {
         posx =  10
         posy =  10
         dimx = 350
         dimy =  65
      }

      Label LabGuida
      {
         Caption = MSG(2433)

         Placement
         {
            posx = 10
            posy = 25
            dimx = 100
            dimy = 25
         }
      }

      //Check chkEnable
      //{
      //  Caption = $dlg_descr
      //  Hint    = $dlg_descr
      //  Enable  = 1
      //  Value   = 1 - $DLG_guida_steel
      //
      //  Placement
      //  {
      //     posx = 100
      //     posy = 10
      //     dimx = 100
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     $DLG_guida_steel = 1
      //     //if( $DLG_si_steel == 1 )  {  $SLG_guida_steel = 0  }
      //     //else                      {  $SLG_guida_steel = 1  }
      //  ]
      //}

      Radio rdSI
      {
        Caption = MSG(2408)
        Hint    = MSG(2408)
        Value   = $DLG_si_steel

        Placement
        {
           posx = 105
           posy = 15
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_si_steel = 1
           $DLG_no_steel = 0
           $DLG_guida_steel = 0
        ]

      }

      Radio rdNO
      {
        Caption = MSG(2409)
        Hint    = MSG(2409)
        Value   = $DLG_no_steel

        Placement
        {
           posx = 105
           posy = 35
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_si_steel = 1
           $DLG_no_steel = 0
           $DLG_guida_steel = 1
        ]

      }

      LinkLabel Link
      {
         Caption = MSG(3047)
         Value = $DLG_link_steel
         Hint = MSG(3047)

         Placement
         {
            posx = 200
            posy = 25
            dimx = 180
            dimy = 25
         }
         Font
         {
            size = 10
            name = "Verdana"
         }
      }

   }

   //Duee
   Frame configDuee
   {
      Placement
      {
         posx =  10
         posy =  80
         dimx = 350
         dimy =  65
      }

      Label LabGuida
      {
         Caption = "Duee"

         Placement
         {
            posx = 10
            posy = 25
            dimx = 100
            dimy = 25
         }
      }

      Radio rdSI
      {
        Caption = MSG(2408)
        Hint    = MSG(2408)
        Value   = $DLG_si_duee

        Placement
        {
           posx = 105
           posy = 15
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_si_duee = 1
           $DLG_no_duee = 0
           $DLG_guida_duee = 0
        ]

      }

      Radio rdNO
      {
        Caption = MSG(2409)
        Hint    = MSG(2409)
        Value   = $DLG_no_duee

        Placement
        {
           posx = 105
           posy = 35
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_si_duee = 1
           $DLG_no_duee = 0
           $DLG_guida_duee = 1
        ]

      }

      LinkLabel Link
      {
         Caption = MSG(3047)
         Value = $DLG_link_duee
         Hint = MSG(3047)

         Placement
         {
            posx = 200
            posy = 25
            dimx = 180
            dimy = 25
         }
         Font
         {
            size = 10
            name = "Verdana"
         }
      }
   }

   //MadeTerraneo
   Frame configMadeterraneo
   {
      Placement
      {
         posx =  10
         posy = 150
         dimx = 350
         dimy =  65
      }

      Label LabGuida
      {
         Caption = "MadeTerraneo"

         Placement
         {
            posx = 10
            posy = 25
            dimx = 100
            dimy = 25
         }
      }

      Radio rdSI
      {
        Caption = MSG(2408)
        Hint    = MSG(2408)
        Value   = $DLG_si_madeterraneo

        Placement
        {
           posx = 105
           posy = 15
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_si_madeterraneo = 1
           $DLG_no_madeterraneo = 0
           $DLG_guida_madeterraneo = 0
        ]

      }

      Radio rdNO
      {
        Caption = MSG(2409)
        Hint    = MSG(2409)
        Value   = $DLG_no_madeterraneo

        Placement
        {
           posx = 105
           posy = 35
           dimx = 80
           dimy = 20
        }

        OnClick
        [
           $DLG_si_madeterraneo = 1
           $DLG_no_madeterraneo = 0
           $DLG_guida_madeterraneo = 1
        ]

      }

      LinkLabel Link
      {
         Caption = MSG(3047)
         Value = $DLG_link_madeterraneo
         Hint = MSG(3047)

         Placement
         {
            posx = 200
            posy = 25
            dimx = 180
            dimy = 25
         }
         Font
         {
            size = 10
            name = "Verdana"
         }
      }
   }
}

//Massimiliano 14/04/17 - creo gestore guide nuova versione
Dlg GestoreGuide_rev1
{
   Caption = MSG(3049)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 600
      dimy = 135
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame configGuida
   {
      Caption = MSG(37)

      Placement
      {
         posx =  10
         posy =  5
         //dimx = 400
         dimx = 200
         dimy =  90
      }

      Image Img
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  5
            posy =  20
            dimx =  64
            dimy =  64
         }
      }

      Label LabGuida
      {
         Caption = $DLG_descrizione

         Placement
         {
            posx = 80
            posy = 30
            dimx = 150
            dimy = 25
         }
      }

      //Radio rdSI
      //{
      //  Caption = MSG(2408)
      //  Hint    = MSG(2408)
      //  Value   = $DLG_si
      //
      //  Placement
      //  {
      //     posx = 140
      //     posy = 15
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     $DLG_si = 1
      //     $DLG_no = 0
      //     $DLG_guida = 0
      //     WRITE_INI($collezione,$DLG_LISTA_GUIDE,STR($DLG_guida))
      //  ]
      //
      //}
      //
      //Radio rdNO
      //{
      //  Caption = MSG(2409)
      //  Hint    = MSG(2409)
      //  Value   = $DLG_no
      //
      //  Placement
      //  {
      //     posx = 140
      //     posy = 35
      //     dimx = 80
      //     dimy = 20
      //  }
      //
      //  OnClick
      //  [
      //     $DLG_si = 1
      //     $DLG_no = 0
      //     $DLG_guida = 1
      //     WRITE_INI($collezione,$DLG_LISTA_GUIDE,STR($DLG_guida))
      //  ]
      //
      //}

      //LinkLabel Link
      //{
      //   Caption = MSG(3047)
      //   Value = $DLG_link_full
      //   Hint = MSG(3047)
      //
      //   Placement
      //   {
      //      posx = 250
      //      posy = 25
      //      dimx = 180
      //      dimy = 25
      //   }
      //   Font
      //   {
      //      size = 10
      //      name = "Verdana"
      //   }
      //}

   }

   Frame configActDis
   {
      Placement
      {
         posx = 215
         posy =  10
         dimx = 160
         dimy =  85
      }

      Label LabStatus
      {
         Caption = $DLG_status

         Placement
         {
            posx = 10
            posy = 25
            dimx = 150
            dimy = 25
         }
      }
   }

   Frame configLink
   {
      Caption = "Link"

      Placement
      {
         posx = 380
         posy =   5
         dimx = 210
         dimy =  90
      }

      LinkLabel Link
      {
         Caption = MSG(3047)
         Value = $DLG_link_full
         Hint = MSG(3047)

         Placement
         {
            posx = 10
            posy = 30
            dimx = 180
            dimy = 25
         }
         Font
         {
            size = 10
            name = "Verdana"
         }
      }

   }

   Button btnGuida
   {
      Caption = MSG(619)
      Result  = 0
      //Result  = 2
      Hint = MSG(619)

      Placement
      {
         posx = 85
         posy = 60
         dimx = 120
         dimy = 22
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_LISTA_GUIDE")

         if( STRCMP($DLG_LISTA_GUIDE,"Guida_steel")==0              )   {  $tmp = "guida-steel"             }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_duee")==0               )   {  $tmp = "guida-duee"              }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_madeterraneo")==0       )   {  $tmp = "guida-madeterraneo"      }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_airsofa")==0            )   {  $tmp = "guida-airsofa"           }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_nowwardrobe")==0        )   {  $tmp = "guida-nowwardrobe"       }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_smartwardrobe")==0      )   {  $tmp = "guida-smartwardrobe"     }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_airshelf")==0           )   {  $tmp = "guida-airshelf"          }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_slidesofa")==0          )   {  $tmp = "guida-slidesofa"         }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_airkitchen")==0         )   {  $tmp = "guida-airkitchen"        }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_slidesofa")==0          )   {  $tmp = "guida-slidesofa"         }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_airkitchen")==0         )   {  $tmp = "guida-airkitchen"        }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_biffasc")==0            )   {  $tmp = "guida-biffasc"           }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_nowscorrevole")==0      )   {  $tmp = "guida-nowscorrevole"     }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_etvoila")==0            )   {  $tmp = "guida-etvoila"           }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_nowaccessori")==0       )   {  $tmp = "guida-nowaccessori"      }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_etvoilaalbero")==0      )   {  $tmp = "guida-etvoilaalbero"     }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_nowweightless")==0      )   {  $tmp = "guida-nowweightless"     }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_etvweightless")==0      )   {  $tmp = "guida-etvweightless"     }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_36e8storage")==0        )   {  $tmp = "guida-36e8storage"       }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_36e8accessori")==0      )   {  $tmp = "guida-36e8accessori"     }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_shelf30mm")==0          )   {  $tmp = "guida-shelf30mm"         }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_diagolineashelf")==0    )   {  $tmp = "guida-diagolineashelf"   }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_etvoilastorage")==0     )   {  $tmp = "guida-etvoilastorage"    }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_weightless30mm")==0     )   {  $tmp = "guida-weightless30mm"    }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_testierawwairsofa")==0  )   {  $tmp = "guida-testierawwairsofa" }
         if( STRCMP($DLG_LISTA_GUIDE,"Guida_plenum")==0             )   {  $tmp = "guida-plenum"            }








         $DLG_link_full = STRCAT($DLG_link,$tmp)

         $tmp_guida = ATOI(READ_INI($collezione,$DLG_LISTA_GUIDE))
         $DLG_guida = $tmp_guida
         if( $tmp_guida == 0 )
         {
            $DLG_si = 1
            $DLG_no = 0
            $DLG_guida = 0
            $DLG_status = MSG(2408)
         }
         else
         {
            $DLG_si = 0
            $DLG_no = 1
            $DLG_guida = 1
            $DLG_status = MSG(2409)
         }

         $DLG_descrizione = DESCRIZIONE_VAL_TAB($DLG_LISTA_GUIDE,"lista_guide_descr.txt")
         $DLG_image_file1 = STRCAT($path_tab,"ImgGuide",CHR2STR(92),STRMID(6,STRLEN($DLG_LISTA_GUIDE),$DLG_LISTA_GUIDE),".bmp")

         //COMANDO2(STRCAT("run_dll_cmd bdmdialog MakeDialog ",APICI(),SUBST_LABEL(STRCAT("%install_dir%\tab_lago\tab_m4",CHR2STR(92))),"dialog.txt|GestoreGuide_rev1",APICI()))
      ]
   }

   Button btnActDis
   {
      Caption = $DLG_statusbtn
      Result  = 0
      Hint = $DLG_statusbtn

      Placement
      {
         posx = 220
         posy = 60
         dimx = 150
         dimy = 22
      }

      OnClick
      [
         //if( $DLG_si == 1 )
         if( $DLG_guida == 0 )
         {
            $DLG_si = 0
            $DLG_no = 1
            $DLG_guida = 1
            $DLG_status = MSG(2409)
         }
         else
         //if( $DLG_no == 1 )
         {
            $DLG_si = 1
            $DLG_no = 0
            $DLG_guida = 0
            $DLG_status = MSG(2408)
         }
         WRITE_INI($collezione,$DLG_LISTA_GUIDE,STR($DLG_guida))
      ]
   }
}

//Massimiliano 18/04/2018  - dialog gestione font
Dlg GestoreFont
{
   Caption = MSG(3052)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 280
      dimy = 200
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame configFont
   {
      Placement
      {
         posx =  10
         posy =  10
         dimx = 250
         dimy = 100
      }

      Label LabTipo
      {
         Caption = MSG(3053)

         Placement
         {
            posx = 10
            posy = 10
            dimx = 150
            dimy = 25
         }
      }

      Label LabDimensione
      {
         Caption = MSG(3054)

         Placement
         {
            posx = 10
            posy = 60
            dimx = 150
            dimy = 25
         }
      }

      Label LabSize
      {
         Caption = $DLG_Sfont_descr
         Value   = $DLG_Sfont_descr
         Hint    = $DLG_Sfont_descr

         Placement
         {
            posx = 135
            posy = 60
            dimx = 150
            dimy = 25
         }
      }

      Label LabType
      {
         Caption = $TypeFont
         Value   = $TypeFont
         Hint    = $TypeFont

         Placement
         {
            posx = 135
            posy = 10
            dimx = 150
            dimy = 25
         }
      }
   }

   Button OK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 100
         posy = 120
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnSize
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)

      Placement
      {
         posx = 230
         posy = 70
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"SizeFont")

        $DLG_Sfont_descr = STR($SizeFont)
      ]
   }

   Button btnType
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(101)

      Placement
      {
         posx = 230
         posy = 20
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"TypeFont")
      ]
   }

}

Dlg MensolaMadeTerraneo
{
   Caption = MSG(3200)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 385
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 305
         dimy = 60
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 220
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 160
           posy = 30
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame FacceFinite
   {
      Placement
      {
         posx = 10
         posy = 80
         dimx = 305
         dimy = 40
      }

      Label LblLatiMen
      {
         Caption = MSG(3201)
         Hint    = MSG(3201)
         Value   = MSG(3201)

         Placement
         {
            posx = 10
            posy = 15
            dimx = 130
            dimy = 20
         }
      }

      Edit EdtLatiMen
      {
        Caption = $DLG_hint_facfin
        Hint    = $DLG_caption_facfin
        Value   = $DLG_value_facfin

        Placement
        {
           posx = 145
           posy = 10
           dimx = 130
           dimy = 20
        }
      }
   }

   Frame TasselliFlu
   {
      //Caption = MSG(1365)
      //Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 10
         posy = 130
         dimx = 305
         dimy = 30
      }

      Check chkTasselli
      {
         Caption = MSG(896)
         Hint    = MSG(896)
         Enable  = 1
         Value   = $DLG_tasselli

         Placement
         {
            posx = 10
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
            else                   {  $DLG_tasselli=0  }
         ]

      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 170
         dimx = 305
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 200
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

   }

   Button btnFaccFinite
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(1368)

      Placement
      {
         posx = 290
         posy =  90
         dimx =  20
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"FacceFinite")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_facfin   = MSG(3202)
         if(VAR_VAL($DLG_idx_to_call,"FacceFinite")>1) { $DLG_value_facfin   = MSG(3203)  }
      ]
   }

   Button btnMood
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 240
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
         //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
         //Massimiliano 01/08/16 - valorizzazione nome mood
         GOSUB NomeMood
         $DLG_descrizione_mod = $descr_mood
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"X")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_larghezza    = STR(VAR_VAL($DLG_idx_to_call,"X"))
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)

      Placement
      {
         posx = 290
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"Z")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_profondita    = STR(VAR_VAL($DLG_idx_to_call,"Z"))
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 320
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 320
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg DepthMadeTerraneo
{
   Caption = MSG(3200)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 385
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 305
         dimy = 60
      }

      Edit EdtLarghezza
      {
        Caption = $DLG_caption_larghezza
        Hint    = $DLG_hint_larghezza
        Value   = $DLG_value_larghezza

        Placement
        {
           posx = 65
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtProfondita
      {
        Caption = $DLG_caption_profondita
        Hint    = $DLG_hint_profondita
        Value   = $DLG_value_profondita

        Placement
        {
           posx = 220
           posy = 25
           dimx = 55
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = MSG(933)
        Value   = MSG(624)

        Placement
        {
           posx = 5
           posy = 30
           dimx = 80
           dimy = 20
        }

      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = MSG(447)
        Value   = MSG(626)

        Placement
        {
           posx = 160
           posy = 30
           dimx = 80
           dimy = 20
        }
      }
   }

   //Massimiliano 22/11/14 - gestione scassi rubinetti
   Frame FrmRubinetto
   {
      Caption = MSG(1989)

      Placement
      {
         posx = 10
         posy = 70
         //dimx = 305
         dimx = 150
         dimy = 70
      }

      Check Lav1
      {
         Caption = MSG(1890)
         Hint    = MSG(1890)
         Enable  = $DLG_enable_rub1
         Value   = $DLG_Rub1

         Placement
         {
            posx = 10
            posy = 20
            dimx = 140
            dimy = 20
         }

         OnClick
         [
           $DLG_Rub1 = 1
         ]

      }

      Check Lav2
      {
         Caption = MSG(1891)
         Hint    = MSG(1891)
         Enable  = $DLG_enable_rub2
         Value   = $DLG_Rub2

         Placement
         {
            posx = 10
            posy = 40
            dimx = 140
            dimy = 20
         }

         OnClick
         [
           $DLG_Rub2 = 1
         ]

      }
   }

   //Frame FacceFinite
   //{
   //   Placement
   //   {
   //      posx = 10
   //      posy = 80
   //      dimx = 305
   //      dimy = 40
   //   }
   //
   //   Label LblLatiMen
   //   {
   //      Caption = MSG(3201)
   //      Hint    = MSG(3201)
   //      Value   = MSG(3201)
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 15
   //         dimx = 130
   //         dimy = 20
   //      }
   //   }
   //
   //   Edit EdtLatiMen
   //   {
   //     Caption = $DLG_hint_facfin
   //     Hint    = $DLG_caption_facfin
   //     Value   = $DLG_value_facfin
   //
   //     Placement
   //     {
   //        posx = 145
   //        posy = 10
   //        dimx = 130
   //        dimy = 20
   //     }
   //   }
   //}

   Frame TasselliFlu
   {
      //Caption = MSG(1365)
      //Enable = $DLG_value_finit_uso

      Placement
      {
         posx = 10
         posy = 140
         //dimx = 305
         dimx = 150
         dimy = 30
      }

      Check chkTasselli
      {
         Caption = MSG(896)
         Hint    = MSG(896)
         Enable  = 1
         Value   = $DLG_tasselli

         Placement
         {
            posx = 10
            posy = 5
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            if($DLG_tasselli==1)   {  $DLG_tasselli=1  }
            else                   {  $DLG_tasselli=0  }
         ]

      }
   }

   //Massimiliano 06/12/16 - definisco offset posizione vasche
   Frame FrmOffset
   {
      Caption = MSG(3240)

      Placement
      {
         posx = 165
         posy = 70
         //dimx = 305
         dimx = 150
         dimy = 70
      }

      Label EdtVasca1
      {
        Caption = MSG(3241)
        Hint    = MSG(3241)
        //Enable  = $DLG_enable_rub1

        Placement
        {
           posx = 10
           posy = 20
           dimx = 140
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtVasca1
      {
        Caption = $DLG_caption_vasca1
        Hint    = $DLG_hint_vasca1
        Value   = $DLG_value_vasca1

        Placement
        {
           posx = 80
           posy = 15
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label EdtVasca2
      {
        Caption = MSG(3242)
        Hint    = MSG(3242)
        Enable  = $DLG_enable_rub2

        Placement
        {
           posx = 10
           posy = 45
           dimx = 140
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtVasca2
      {
        Caption = $DLG_caption_vasca2
        Hint    = $DLG_hint_vasca2
        Value   = $DLG_value_vasca2

        Placement
        {
           posx = 80
           posy = 40
           dimx = 40
           dimy = 20
        }

        OnClick
        [
        ]
      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 170
         dimx = 305
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 200
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

   }

   //Button btnFaccFinite
   //{
   //   Caption = "..."
   //   Result  = 0
   //   Hint = MSG(1368)
   //
   //   Placement
   //   {
   //      posx = 290
   //      posy =  90
   //      dimx =  20
   //      dimy =  20
   //   }
   //
   //   OnClick
   //   [
   //      $R = CHIEDI($DLG_idx_to_call,"FacceFinite")
   //      //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)
   //
   //      $DLG_value_facfin   = MSG(3202)
   //      if(VAR_VAL($DLG_idx_to_call,"FacceFinite")>1) { $DLG_value_facfin   = MSG(3203)  }
   //   ]
   //}

   Button btnMood
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 240
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
         //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
         //Massimiliano 01/08/16 - valorizzazione nome mood
         GOSUB NomeMood
         $DLG_descrizione_mod = $descr_mood
      ]
   }

   Button btnLarghezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"X")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_larghezza    = STR(VAR_VAL($DLG_idx_to_call,"X"))
      ]
   }

   Button btnProfondita
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(447)

      Placement
      {
         posx = 290
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"Z")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_profondita    = STR(VAR_VAL($DLG_idx_to_call,"Z"))
      ]
   }

   Button btnVasca1
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 290
         posy = 85
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"XScass1")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_vasca1 = STR(VAR_VAL($DLG_idx_to_call,"XScass1"))
      ]
   }

   Button btnVasca2
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)
      Enable  = $DLG_enable_rub2

      Placement
      {
         posx = 290
         posy = 110
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"XScass2")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_vasca2 = STR(VAR_VAL($DLG_idx_to_call,"XScass2"))
      ]
   }


   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 320
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 320
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg PancaMadeTerraneo
{
   Caption = MSG(3235)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 305
         dimy = 60
      }

      Edit EdtMisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblMisure
      {
        Caption = MSG(637)
        Hint    = MSG(637)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_caption_altezza
        Value   = $DLG_caption_altezza

        Placement
        {
           posx = 180
           posy = 28
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 80
         dimx = 305
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 200
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

   }

   Button btnMood
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 150
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
         //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
         //Massimiliano 01/08/16 - valorizzazione nome mood
         GOSUB NomeMood
         $DLG_descrizione_mod = $descr_mood
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_Misure")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         //if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==12046)  { $DLG_value_misure = "1200x460" }
         //if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==16046)  { $DLG_value_misure = "1600x460" }
         //if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==19246)  { $DLG_value_misure = "1920x460" }
         //if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==22446)  { $DLG_value_misure = "2240x460" }
         //if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==24846)  { $DLG_value_misure = "2480x460" }
         //Massimiliano 26/04/17 - errata dimensione in Z
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==12040)  { $DLG_value_misure = "1200x400" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==16040)  { $DLG_value_misure = "1600x400" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==19240)  { $DLG_value_misure = "1920x400" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==22440)  { $DLG_value_misure = "2240x400" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==24840)  { $DLG_value_misure = "2480x400" }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 230
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg TavolinoMadeTerraneo
{
   Caption = MSG(3236)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 305
         dimy = 60
      }

      Edit EdtMisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Edit EdtAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_hint_altezza
        Value   = $DLG_value_altezza

        Placement
        {
           posx = 205
           posy = 25
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label LblMisure
      {
        Caption = MSG(637)
        Hint    = MSG(637)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = MSG(629)
        Hint    = MSG(629)
        Value   = MSG(629)

        Placement
        {
           posx = 150
           posy = 28
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 80
         dimx = 305
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 200
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

   }

   Button btnMood
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 150
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
         //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
         //Massimiliano 01/08/16 - valorizzazione nome mood
         GOSUB NomeMood
         $DLG_descrizione_mod = $descr_mood
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_Misure")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==80040)  { $DLG_value_misure = "800x400" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==80080)  { $DLG_value_misure = "800x800" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==88088)  { $DLG_value_misure = "880x880" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==11256)  { $DLG_value_misure = "1120x560" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==14480)  { $DLG_value_misure = "1440x800" }
      ]
   }

   Button btnAltezza
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(970)

      Placement
      {
         posx = 285
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI(-1,"DLG_altezza")
        $DLG_hint_altezza    = STRCAT(MSG(428)," = ",STR($DLG_altezza))
        $DLG_caption_altezza = STR($DLG_altezza)
        $DLG_value_altezza   = STR($DLG_altezza)
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 230
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg TavoloMadeTerraneo
{
   Caption = MSG(3209)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 335
      dimy = 300
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 305
         dimy = 60
      }

      Edit EdtMisure
      {
        Caption = $DLG_caption_misure
        Hint    = $DLG_hint_misure
        Value   = $DLG_value_misure

        Placement
        {
           posx = 55
           posy = 25
           dimx = 65
           dimy = 20
        }

        OnClick
        [
        ]
      }

      Label LblMisure
      {
        Caption = MSG(637)
        Hint    = MSG(637)
        Value   = MSG(637)

        Placement
        {
           posx = 5
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label LblAltezza
      {
        Caption = $DLG_caption_altezza
        Hint    = $DLG_caption_altezza
        Value   = $DLG_caption_altezza

        Placement
        {
           posx = 180
           posy = 28
           dimx = 80
           dimy = 20
        }
      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 80
         dimx = 305
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 200
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

   }

   Button btnMood
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 180
         posy = 150
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
         //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
         //Massimiliano 01/08/16 - valorizzazione nome mood
         GOSUB NomeMood
         $DLG_descrizione_mod = $descr_mood
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(444)

      Placement
      {
         posx = 135
         posy = 35
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"VAR_Misure")
         //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

         $DLG_value_misure = "880x880"
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==104104) { $DLG_value_misure = "1040x1040" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==12088)  { $DLG_value_misure = "1200x880"  }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==16088)  { $DLG_value_misure = "1600x880"  }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==19288)  { $DLG_value_misure = "1920x880"  }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==224104) { $DLG_value_misure = "2240x1040" }
         if(VAR_VAL($DLG_idx_to_call,"VAR_Misure")==248104) { $DLG_value_misure = "2480x1040" }
      ]
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 170
         posy = 230
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  75
         posy = 230
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg IsolaTonda
{
//15.03.2017 - Filippo - Cambio descrizione con descrizione corretta
   //Caption = MSG(1346)
   Caption = MSG(1768)
   Placement
   {
      posx =  150
      posy =  150
      dimx =  750
      dimy =  540
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(2426)

      Placement
      {
         posx =  10
         posy = 150
         dimx = 205
         dimy = 120
      }

      Edit Edtmisure
      {
         //Caption = $DLG_caption_misure
         Caption = $DLG_X
         Hint    = $DLG_hint_misure
         Value   = $DLG_value_misure

         Placement
         {
            posx = 75
            posy = 80
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label Lblmisure
      {
         Caption = MSG(637)
         Hint    = MSG(637)
         Value   = MSG(637)

         Placement
         {
            posx = 10
            posy = 85
            dimx = 80
            dimy = 20
         }
      }

      Radio RdFuoBia
      {
        Caption = MSG(2427)
        Hint    = MSG(2427)
        Value   = $Dlg_colore_fuochi_bia

        Placement
        {
           posx = 10
           posy = 20
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $Dlg_colore_fuochi_bia = 1
          $Dlg_colore_fuochi_ner = 0
        ]
      }

      Radio RdFuoNer
      {
        Caption = MSG(2428)
        Hint    = MSG(2428)
        Value   = $Dlg_colore_fuochi_ner

        Placement
        {
           posx = 10
           posy = 40
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $Dlg_colore_fuochi_bia = 0
          $Dlg_colore_fuochi_ner = 1
        ]
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 205
         dimy = 135
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione
         Value   = $DLG_descrizione
         Hint    = $DLG_descrizione

         Placement
         {
            posx = 50
            posy = 20
            dimx = 115
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione
         Value   = $DLG_image_file_pia
         Hint    = $DLG_descrizione

         Placement
         {
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }
   }

   //Frame FrmBase
   //{
   //   Caption = MSG(2430)
   //
   //   Placement
   //   {
   //      posx = 220
   //      posy = 150
   //      dimx = 205
   //      dimy = 120
   //   }
   //
   //   Edit Edtprof
   //   {
   //      Caption = $DLG_Z
   //      Hint    = $DLG_hint_Z
   //      Value   = $DLG_value_Z
   //
   //      Placement
   //      {
   //         posx = 75
   //         posy = 25
   //         dimx = 70
   //         dimy = 20
   //      }
   //
   //      OnClick
   //      [
   //      ]
   //   }
   //
   //   Label Lblprof
   //   {
   //      Caption = MSG(626)
   //      Hint    = MSG(626)
   //      Value   = MSG(626)
   //
   //      Placement
   //      {
   //         posx = 10
   //         posy = 25
   //         dimx = 80
   //         dimy = 20
   //      }
   //   }
   //
   //   Radio RdVetroLuc
   //   {
   //     Caption = MSG(375)
   //     Hint    = MSG(375)
   //     Value   = $DLG_value_lucido
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 55
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //       $DLG_value_lucido = 1
   //       $DLG_value_lucido = 0
   //       $DLG_value_laccato = 0
   //       $DLG_value_ww = 0
   //     ]
   //   }
   //
// //     Radio RdVetroOpa
// //     {
// //       Caption = MSG(857)
// //       Hint    = MSG(857)
// //       Value   = $DLG_value_opaco
// //
// //       Placement
// //       {
// //          posx = 60
// //          posy = 65
// //          dimx = 120
// //          dimy = 20
// //       }
// //
// //       OnClick
// //       [
// //         $DLG_value_lucido = 0
// //         $DLG_value_opaco = 1
// //         $DLG_value_laccato = 0
// //         $DLG_value_ww = 0
// //       ]
// //     }
// //
// //     Radio RdLaccato
// //     {
// //       Caption = MSG(874)
// //       Hint    = MSG(8 74)
// //       Value   = $DLG_value_laccato
// //
// //       Placement
// //       {
// //          posx = 60
// //          posy = 85
// //          dimx = 120
// //          dimy = 20
// //       }
// //
// //       OnClick
// //       [
// //         $DLG_value_lucido = 0
// //         $DLG_value_opaco = 0
// //         $DLG_value_laccato = 1
// //         $DLG_value_ww = 0
// //       ]
// //     }
   //
   //   Radio RdWildwood
   //   {
   //     Caption = MSG(899)
   //     Hint    = MSG(899)
   //     Value   = $DLG_value_ww
   //
   //     Placement
   //     {
   //        posx = 10
   //        posy = 75
   //        dimx = 120
   //        dimy = 20
   //     }
   //
   //     OnClick
   //     [
   //       $DLG_value_lucido = 0
   //       $DLG_value_lucido = 0
   //       $DLG_value_laccato = 0
   //       $DLG_value_ww = 1
   //     ]
   //   }
   //}

   Frame Finitura_Base
   {
      Caption = MSG(2429)

      Placement
      {
         posx = 220
         posy = 10
         dimx = 205
         dimy = 300
      }

      Label LabFinBas
      {
         Caption = $DLG_descrizione_base
         Value   = $DLG_descrizione_base
         Hint    = $DLG_descrizione_base

         Placement
         {
            posx = 50
            posy = 20
            dimx = 115
            dimy = 25
         }
      }

      Image ImBas
      {
         Caption = $DLG_descrizione_base
         Value   = $DLG_image_file_base
         Hint    = $DLG_descrizione_base

         Placement
         {
            posx =  75
            posy =  35
            dimx =  64
            dimy =  64
         }
      }

      Edit Edtprof
      {
         Caption = $DLG_Z
         Hint    = $DLG_hint_Z
         Value   = $DLG_value_Z

         Placement
         {
            posx = 75
            posy = 220
            dimx = 70
            dimy = 20
         }

         OnClick
         [
         ]
      }

      Label Lblprof
      {
         Caption = MSG(626)
         Hint    = MSG(626)
         Value   = MSG(626)

         Placement
         {
            posx = 10
            posy = 225
            dimx = 80
            dimy = 20
         }
      }

      Radio RdVetroLuc
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $DLG_value_lucido

        Placement
        {
           posx = 10
           posy = 155
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido = 1
          $DLG_value_opaco = 0
          $DLG_value_laccato = 0
          $DLG_value_ww = 0

          $DLG_COLORE_BASE = "BCO"
          $DLG_descrizione_base = DESCRIZIONE_VAL_TAB($DLG_COLORE_BASE,"colori_tutti.txt")
          $DLG_COLORE_368_L_FRO = $DLG_COLORE_BASE
          GOSUB Get_Image_368CUC_L
          $DLG_image_file_base = $DLG_image_file_fro
        ]
      }

//      Radio RdVetroOpa
//      {
//        Caption = MSG(857)
//        Hint    = MSG(857)
//        Value   = $DLG_value_opaco
//
//        Placement
//        {
//           posx = 60
//           posy = 65
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//          $DLG_value_lucido = 0
//          $DLG_value_opaco = 1
//          $DLG_value_laccato = 0
//          $DLG_value_ww = 0
//        ]
//      }
//
//      Radio RdLaccato
//      {
//        Caption = MSG(874)
//        Hint    = MSG(8 74)
//        Value   = $DLG_value_laccato
//
//        Placement
//        {
//           posx = 60
//           posy = 85
//           dimx = 120
//           dimy = 20
//        }
//
//        OnClick
//        [
//          $DLG_value_lucido = 0
//          $DLG_value_opaco = 0
//          $DLG_value_laccato = 1
//          $DLG_value_ww = 0
//        ]
//      }

      Radio RdWildwood
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $DLG_value_ww

        Placement
        {
           posx = 10
           posy = 175
           dimx = 120
           dimy = 20
        }

        OnClick
        [
          $DLG_value_lucido = 0
          $DLG_value_opaco = 0
          $DLG_value_laccato = 0
          $DLG_value_ww = 1

          $DLG_COLORE_BASE = "SZ1"
          $DLG_descrizione_base = DESCRIZIONE_VAL_TAB($DLG_COLORE_BASE,"colori_tutti.txt")
          $DLG_COLORE_368_W_FRO = $DLG_COLORE_BASE
          GOSUB Get_Image_368CUC_W
          $DLG_image_file_base = $DLG_image_file_fro
        ]
      }

      Check chkManiglia
      {
         Caption = MSG(387)
         Hint    = MSG(387)
         Value   = $DLG_maniglia_flapp

         Placement
         {
           posx = 10
           posy = 270
           dimx = 100
           dimy = 20
        }

        OnClick
        [
           if($DLG_maniglia_flapp==0 )
           {
              $DLG_maniglia_flapp = 1
           }
           else
           {
              $DLG_maniglia_flapp = 0
           }
        ]

      }
   }

   Frame FrmFiniture
   {
      Caption = MSG(173)

      Placement
      {
         posx = 430
         posy =  10
         dimx = 300
         dimy =  70
      }

      Image ImFiaDx
      {
         Caption = $DLG_descrizione_fdx
         Value   = $DLG_image_file_fdx
         Hint    = $DLG_descrizione_fdx

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinFDx
      {
         Caption = $DLG_descrizione_fdx
         Value   = $DLG_descrizione_fdx
         Hint    = $DLG_descrizione_fdx

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucFDx
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_fiadx_lucido

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_fiadx_lucido = 1
          $Dlg_fiadx_ww = 0
        ]
      }

//      Radio RdVetroOpaFDx
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx =  85
//           posy =  30
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodFDx
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_bifa_ww

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_fiadx_lucido = 0
          $Dlg_fiadx_ww = 1
        ]
      }
   }
   Frame FrmFiniture
   {
      Caption = MSG(172)

      Placement
      {
         posx = 430
         posy =  80
         dimx = 300
         dimy =  70
      }

      Image ImFiaSx
      {
         Caption = $DLG_descrizione_fsx
         Value   = $DLG_image_file_fsx
         Hint    = $DLG_descrizione_fsx

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinFSx
      {
         Caption = $DLG_descrizione_fsx
         Value   = $DLG_descrizione_fsx
         Hint    = $DLG_descrizione_fsx

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucFSx
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_fiasx_lucido

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_fiasx_lucido = 1
          $Dlg_fiasx_ww = 0
        ]
      }

//      Radio RdVetroOpaFSx
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx =  85
//           posy =  90
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodFSx
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_fiasx_ww

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_fiasx_lucido = 0
          $Dlg_fiasx_ww = 1
        ]
      }
   }
   Frame FrmFiniture
   {
      Caption = MSG(373)

      Placement
      {
         posx = 430
         posy = 150
         dimx = 300
         dimy =  70
      }

      Image ImBif
      {
         Caption = $DLG_descrizione_bif
         Value   = $DLG_image_file_bif
         Hint    = $DLG_descrizione_bif

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinBif
      {
         Caption = $DLG_descrizione_bif
         Value   = $DLG_descrizione_bif
         Hint    = $DLG_descrizione_bif

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucBif
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_bifa_lucido

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_bifa_lucido = 1
          $Dlg_bifa_ww = 0
        ]
      }

//      Radio RdVetroOpaBif
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx =  85
//           posy = 150
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodBif
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_bifa_ww

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_bifa_lucido = 0
          $Dlg_bifa_ww = 1
        ]
      }
   }
   Frame FrmFiniture
   {
      Caption = $DLG_descr_cas1

      Placement
      {
         posx = 430
         posy = 220
         dimx = 300
         dimy =  70
      }

      Image ImA1
      {
         Caption = $DLG_descrizione_ca1
         Value   = $DLG_image_file_ca1
         Hint    = $DLG_descrizione_ca1
         Enable  = $DLG_enable_cas1

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinA1
      {
         Caption = $DLG_descrizione_ca1
         Value   = $DLG_descrizione_ca1
         Hint    = $DLG_descrizione_ca1
         Enable  = $DLG_enable_cas1

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucA1
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_cas1_lucido
        Enable  = $DLG_enable_cas1

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_cas1_lucido = 1
          $Dlg_cas1_ww = 0
        ]
      }

//      Radio RdVetroOpaA1
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx = 375
//           posy =  30
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodA1
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_cas1_ww
        Enable  = $DLG_enable_cas1

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_cas1_lucido = 0
          $Dlg_cas1_ww = 1
        ]
      }
   }
   Frame FrmFiniture
   {
      Caption = $DLG_descr_cas2

      Placement
      {
         posx = 430
         posy = 290
         dimx = 300
         dimy =  70
      }

      Image ImA2
      {
         Caption = $DLG_descrizione_ca2
         Value   = $DLG_image_file_ca2
         Hint    = $DLG_descrizione_ca2
         Enable  = $DLG_enable_cas2

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinA2
      {
         Caption = $DLG_descrizione_ca2
         Value   = $DLG_descrizione_ca2
         Hint    = $DLG_descrizione_ca2
         Enable  = $DLG_enable_cas2

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucA2
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_cas2_lucido
        Enable  = $DLG_enable_cas2

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_cas2_lucido = 1
          $Dlg_cas2_ww = 0
        ]
      }

//      Radio RdVetroOpaA2
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx = 375
//           posy =  90
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodA2
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_cas2_ww
        Enable  = $DLG_enable_cas2

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_cas2_lucido = 0
          $Dlg_cas2_ww = 1
        ]
      }
   }
   Frame FrmFiniture
   {
      Caption = $DLG_descr_cas3

      Placement
      {
         posx = 430
         posy = 360
         dimx = 300
         dimy =  70
      }

      Image ImA3
      {
         Caption = $DLG_descrizione_ca3
         Value   = $DLG_image_file_ca3
         Hint    = $DLG_descrizione_ca3
         Enable  = $DLG_enable_cas3

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinA3
      {
         Caption = $DLG_descrizione_ca3
         Value   = $DLG_descrizione_ca3
         Hint    = $DLG_descrizione_ca3
         Enable  = $DLG_enable_cas3

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucA3
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_cas3_lucido
        Enable  = $DLG_enable_cas3

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_cas3_lucido = 1
          $Dlg_cas3_ww = 0
        ]
      }

//      Radio RdVetroOpaA3
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx = 375
//           posy = 150
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodA3
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_cas3_ww
        Enable  = $DLG_enable_cas3

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_cas3_lucido = 0
          $Dlg_cas3_ww = 1
        ]
      }
   }
   Frame FrmFiniture
   {
      Caption = MSG(1537)

      Placement
      {
         posx = 430
         posy = 430
         dimx = 300
         dimy =  70
      }

      Image ImAnta
      {
         Caption = $DLG_descrizione_anta
         Value   = $DLG_image_file_anta
         Hint    = $DLG_descrizione_anta
         Enable  = $DLG_enable_anta

         Placement
         {
            posx = 130
            posy =  35
            dimx =  25
            dimy =  25
         }
      }

      Label LabFinAnta
      {
         Caption = $DLG_descrizione_anta
         Value   = $DLG_descrizione_anta
         Hint    = $DLG_descrizione_anta
         Enable  = $DLG_enable_anta

         Placement
         {
            posx = 130
            posy =  20
            dimx = 115
            dimy =  25
         }
      }

      Radio RdVetroLucAnta
      {
        Caption = MSG(375)
        Hint    = MSG(375)
        Value   = $Dlg_anta_lucido
        Enable  = $DLG_enable_anta

        Placement
        {
           posx =  10
           posy =  20
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_anta_lucido = 1
          $Dlg_anta_ww = 0
        ]
      }

//      Radio RdVetroOpaAnta
//      {
//        Caption = MSG(376)
//        Hint    = MSG(376)
//        Value   = $Dlg_colore_fuochi_ner
//
//        Placement
//        {
//           posx = 375
//           posy = 210
//           dimx = 120
//           dimy =  20
//        }
//
//        OnClick
//        [
//          $Dlg_colore_fuochi_bia = 0
//          $Dlg_colore_fuochi_ner = 1
//        ]
//      }

      Radio RdWildwoodAnta
      {
        Caption = MSG(899)
        Hint    = MSG(899)
        Value   = $Dlg_anta_ww
        Enable  = $DLG_enable_anta

        Placement
        {
           posx =  10
           posy =  40
           dimx = 120
           dimy =  20
        }

        OnClick
        [
          $Dlg_anta_lucido = 0
          $Dlg_anta_ww = 1
        ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 130
         posy = 280
         dimx = 85
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  10
         posy = 280
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinPia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx =  60
         posy = 120
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         if($Dlg_Tipologia == 0)
         {
            $R = CHIEDI(-1,"DLG_COLORE_PIANOIS")
            $DLG_descrizione = DESCRIZIONE_VAL_TAB($DLG_COLORE_PIANOIS,"colori_tutti.txt")
            $DLG_COLORE_368_L_FRO = $DLG_COLORE_PIANOIS
            GOSUB Get_Image_368CUC_L
            $DLG_image_file_pia = $DLG_image_file_fro
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_COLORE_PIANOIS = $DLG_COLORE_368_W_FRO
            $DLG_descrizione = DESCRIZIONE_VAL_TAB($DLG_COLORE_PIANOIS,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_pia = $DLG_image_file_fro
         }
      ]
   }

   Button btnmisure
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)

      Placement
      {
         posx = 160
         posy = 230
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_misure")

         if( $DLG_misure==1400 )
         {
            $DLG_X = 1400
            $DLG_Z = 1400
         }
         if( $DLG_misure==1600 )
         {
            $DLG_X = 1600
            $DLG_Z = 1600
         }
         if( $DLG_misure==1800 )
         {
            $DLG_X = 1800
            $DLG_Z = 1800
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT("Diametro =",$DLG_desc_misure)
         $DLG_caption_misure  = $DLG_desc_misure
         $DLG_value_misure    = $DLG_desc_misure
      ]
   }

   Button btnFinBas
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 270
         posy = 120
         dimx = 110
         dimy =  20
      }

      OnClick
      [
         if($DLG_value_lucido == 1)
         {
            $R = CHIEDI(-1,"DLG_COLORE_BASE")
            $DLG_descrizione_base = DESCRIZIONE_VAL_TAB($DLG_COLORE_BASE,"colori_tutti.txt")
            $DLG_COLORE_368_L_FRO = $DLG_COLORE_BASE
            GOSUB Get_Image_368CUC_L
            $DLG_image_file_base = $DLG_image_file_fro
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_COLORE_BASE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_base = DESCRIZIONE_VAL_TAB($DLG_COLORE_BASE,"colori_tutti.txt")
            $DLG_COLORE_368_W_FRO = $DLG_COLORE_BASE
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_base = $DLG_image_file_fro
         }

         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_FIADX=",APICI(),$DLG_COLORE_BASE,APICI()))
         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_FIASX=",APICI(),$DLG_COLORE_BASE,APICI()))
         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_BIFA=",APICI(),$DLG_COLORE_BASE,APICI()))
         //COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_FRO=",APICI(),$DLG_VAL_FRO,APICI()))
         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_CAS1=",APICI(),$DLG_COLORE_BASE,APICI()))
         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_CAS2=",APICI(),$DLG_COLORE_BASE,APICI()))
         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_CAS3=",APICI(),$DLG_COLORE_BASE,APICI()))
         //COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_CAS4=",APICI(),$DLG_VAL_CAS4,APICI()))
         COMANDO2(STRCAT("VAR_CHANGE 0 ",STR($idx_isola)," VAL_ANTA=",APICI(),$DLG_COLORE_BASE,APICI()))

         //if( IS_VAR_FIXED($idx_isola,"VAR_fiasx_lucido")==0 )  {  $Dlg_fiasx_lucido = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_fiadx_lucido")==0 )  {  $Dlg_fiadx_lucido = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_bifa_lucido")==0  )  {  $Dlg_bifa_lucido  = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_cas1_lucido")==0  )  {  $Dlg_cas1_lucido  = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_cas2_lucido")==0  )  {  $Dlg_cas2_lucido  = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_cas3_lucido")==0  )  {  $Dlg_cas3_lucido  = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_anta_lucido")==0  )  {  $Dlg_anta_lucido  = $DLG_value_lucido  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_fiasx_ww")==0 )      {  $Dlg_fiasx_ww = $DLG_value_ww  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_fiadx_ww")==0 )      {  $Dlg_fiadx_ww = $DLG_value_ww  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_bifa_ww")==0  )      {  $Dlg_bifa_ww  = $DLG_value_ww  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_cas1_ww")==0  )      {  $Dlg_cas1_ww  = $DLG_value_ww  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_cas2_ww")==0  )      {  $Dlg_cas2_ww  = $DLG_value_ww  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_cas3_ww")==0  )      {  $Dlg_cas3_ww  = $DLG_value_ww  }
         //if( IS_VAR_FIXED($idx_isola,"VAR_anta_ww")==0  )      {  $Dlg_anta_ww  = $DLG_value_ww  }
      ]
   }

   Button btnProf
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(639)

      Placement
      {
         posx = 370
         posy = 230
         dimx = 20
         dimy = 20
      }

      OnClick
      [
         $R = CHIEDI(-1,"DLG_Zbase_iso")
         $ZChange = $DLG_Zbase_iso

         $DLG_hint_Z          = STRCAT(MSG(626),"=",STR($ZChange))
         $DLG_value_Z         = STR($ZChange)
         $DLG_caption_Z       = STR($ZChange)
      ]
   }

   Button btnFinFDx
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 600
         posy =  45
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_fiadx_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_FIADX")
            $DLG_VAL_COLORE = $DLG_VAL_FIADX
            $DLG_descrizione_fdx = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_fdx = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_fdx = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_fdx = $DLG_image_file_fro
         }
         $DLG_VAL_FIADX = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_FIADX=",APICI(),$DLG_VAL_FIADX,APICI()))
      ]
   }

   Button btnFinFsx
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 600
         posy = 115
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_fiasx_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_FIASX")
            $DLG_VAL_COLORE = $DLG_VAL_FIASX
            $DLG_descrizione_fsx = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_fsx = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_fsx = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_fsx = $DLG_image_file_fro
         }
         $DLG_VAL_FIASX = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_FIASX=",APICI(),$DLG_VAL_FIASX,APICI()))
      ]
   }

   Button btnFinBif
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)

      Placement
      {
         posx = 600
         posy = 185
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_bifa_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_BIFA")
            $DLG_VAL_COLORE = $DLG_VAL_BIFA
            $DLG_descrizione_bif = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_bif = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_bif = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_bif = $DLG_image_file_fro
         }
         $DLG_VAL_BIFA = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_BIFA=",APICI(),$DLG_VAL_BIFA,APICI()))
      ]
   }

   Button btnFinA1
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_cas1

      Placement
      {
         posx = 600
         posy = 255
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_cas1_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_CAS1")
            $DLG_VAL_COLORE = $DLG_VAL_CAS1
            $DLG_descrizione_ca1 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_ca1 = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_ca1 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_ca1 = $DLG_image_file_fro
         }
         $DLG_VAL_CAS1 = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_CAS1=",APICI(),$DLG_VAL_CAS1,APICI()))
      ]
   }

   Button btnFinA2
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_cas2

      Placement
      {
         posx = 600
         posy = 325
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_cas2_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_CAS2")
            $DLG_VAL_COLORE = $DLG_VAL_CAS2
            $DLG_descrizione_ca2 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_ca2 = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_ca2 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_ca2 = $DLG_image_file_fro
         }
         $DLG_VAL_CAS2 = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_CAS2=",APICI(),$DLG_VAL_CAS2,APICI()))
      ]
   }

   Button btnFinA3
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_cas3

      Placement
      {
         posx = 600
         posy = 395
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_cas3_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_CAS3")
            $DLG_VAL_COLORE = $DLG_VAL_CAS3
            $DLG_descrizione_ca3 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_ca3 = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_ca3 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_ca3 = $DLG_image_file_fro
         }
         $DLG_VAL_CAS3 = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_CAS3=",APICI(),$DLG_VAL_CAS3,APICI()))
      ]
   }

   //Button btnFinA4
   //{
   //   Caption = MSG(621)
   //   Result  = 0
   //   Hint    = MSG(620)
   //
   //   Placement
   //   {
   //      posx = 800
   //      posy = 400
   //      dimx =  20
   //      dimy =  20
   //   }
   //
   //   OnClick
   //   [
   //      if($Dlg_Tipologia == 0)
   //      {
   //         $R = CHIEDI(-1,"DLG_VAL_CAS4")
   //         $DLG_VAL_COLORE = $DLG_VAL_CAS4
   //         $DLG_descrizione_ca4 = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
   //         GOSUB Get_Image_Opaco
   //         $DLG_image_file_ca4 = $DLG_image_file
   //      }
   //   ]
   //}

   Button btnFinAnta
   {
      Caption = MSG(621)
      Result  = 0
      Hint    = MSG(620)
      Enable  = $DLG_enable_anta

      Placement
      {
         posx = 600
         posy = 465
         dimx =  25
         dimy =  25
      }

      OnClick
      [
         if( $Dlg_anta_lucido == 1 )
         {
            $R = CHIEDI(-1,"DLG_VAL_ANTA")
            $DLG_VAL_COLORE = $DLG_VAL_ANTA
            $DLG_descrizione_anta = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_Opaco
            $DLG_image_file_anta = $DLG_image_file
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_W_FRO")
            $DLG_VAL_COLORE = $DLG_COLORE_368_W_FRO
            $DLG_descrizione_anta = DESCRIZIONE_VAL_TAB($DLG_VAL_COLORE,"colori_tutti.txt")
            GOSUB Get_Image_368CUC_W
            $DLG_image_file_anta = $DLG_image_file_fro
         }
         $DLG_VAL_ANTA = $DLG_VAL_COLORE
         COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($idx_isola)," VAL_ANTA=",APICI(),$DLG_VAL_ANTA,APICI()))
      ]
   }
}

Dlg TopMadeTerraneo
{
   Caption = MSG(3220)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 465
      //dimy = 625
      dimy = 460
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 440
         dimy = 60
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = $DLG_hint_x

        Placement
        {
           posx = 10
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label EdtLarghezza
      {
        Caption   = $DLG_value_x
        Layout = 4

        Placement
        {
           posx = 70
           posy = 28
           dimx = 50
           dimy = 20
        }
      }

      Button btnX
      {
         Caption = "..."
         Result  = 0
         //Hint = MSG(444)

         Placement
         {
            posx = 125
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"X")
            $DLG_value_x = STR(VAR_VAL($DLG_idx_to_call,"X"))
            $DLG_hint_x  = STRCAT(MSG(624),$DLG_value_x)
            GOSUB SubCtrlDim_Configura_Top_MadeTerraneo
         ]
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = $DLG_hint_z

        Placement
        {
           posx = 170
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label EdtProfondita
      {
        Caption   = $DLG_value_z
        Layout = 4

        Placement
        {
           //posx = 70
           posx = 220
           posy = 28
           dimx = 50
           dimy = 20
        }
      }

      Button btnZ
      {
         Caption = "..."
         Result  = 0
         //Hint = MSG(444)

         Placement
         {
            //posx = 125
            posx = 275
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"Z")
            $DLG_value_z = STR(VAR_VAL($DLG_idx_to_call,"Z"))
            $DLG_hint_z  = STRCAT(MSG(626),$DLG_value_z)
            GOSUB SubCtrlDim_Configura_Top_MadeTerraneo
         ]
      }


      Label LblOffset
      {
        Caption = MSG(657)

        Placement
        {
           //posx = 190
           posx = 325
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label EdtOffset
      {
        Caption   = $DLG_var_offset
        Layout = 4

        Placement
        {
           posx = 375
           posy = 28
           dimx = 30
           dimy = 20
        }
      }

      Button btnOffset
      {
         Caption = "..."
         Result  = 0
         //Enable = $DLG_enable_offset

         Placement
         {
            posx = 410
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_offset")
            $DLG_var_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
         ]
      }
   }

   Frame FrmSbordi
   {
      Caption = MSG(3210)

      Placement
      {
         posx = 10
         posy = 80
         dimx = 170
         dimy = 145
      }

      Label parzi
      {
        Caption = "(parziali)"
        Hint    = MSG(3213)

        Placement
        {
           posx = 60
           posy = 15
           dimx = 100
           dimy = 20
        }
      }

      Label tot
      {
        Caption = "(totali)"
        Hint    = MSG(3213)

        Placement
        {
           posx = 130
           posy = 15
           dimx = 100
           dimy = 20
        }
      }

      //{ Retro
      Label LRetro
      {
        Caption = MSG(3211)
        Hint    = MSG(3211)

        Placement
        {
           posx = 10
           posy = 38
           dimx = 100
           dimy = 20
        }
      }

      Label LSbPRetro
      {
        Caption   = $DLG_sbordo_rt_Lpar
        Layout = 4

        Placement
        {
           posx = 50
           posy = 38
           dimx = 35
           dimy = 15
        }
      }

      Button BSbRetro
      {
         Caption = "..."
         Enable = $DLG_enable_sb_rt
         Result  = 0

         Placement
         {
            posx = 90
            posy = 35
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_Sbordo_rt_par")
            $DLG_sbordo_rt_Lpar = STR(VAR_VAL($DLG_idx_to_call,"VAR_Sbordo_rt_par"))
            GOSUB SubCtrlDim_Configura_Top_MadeTerraneo
         ]
      }

      Label lbSRetro
      {
        Caption   = $DLG_sbordo_rt_tot
        Layout = 4

        Placement
        {
           posx = 120
           posy = 38
           dimx = 35
           dimy = 15
        }
      }
      //} fine retro

      //{ Fronte
      Label LFronte
      {
        Caption = MSG(3212)
        Hint    = MSG(3212)

        Placement
        {
           posx = 10
           posy = 63
           dimx = 100
           dimy = 20
        }
      }

      Label LSbPFronte
      {
        Caption = $DLG_sbordo_fr_Lpar
        Layout = 4

        Placement
        {
           posx = 50
           posy = 63
           dimx = 35
           dimy = 15
        }
      }

      Button BSbFronte
      {
         Caption = "..."
         Enable = $DLG_enable_sb_fr
         Result  = 0

         Placement
         {
            posx = 90
            posy = 60
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_Sbordo_fr_par")
            $DLG_sbordo_fr_Lpar = STR(VAR_VAL($DLG_idx_to_call,"VAR_Sbordo_fr_par"))
            GOSUB SubCtrlDim_Configura_Top_MadeTerraneo
         ]
      }

      Label lbSFronte
      {
        Caption = $DLG_sbordo_fr_tot
        Layout = 4

        Placement
        {
           posx = 120
           posy = 63
           dimx = 35
           dimy = 15
        }
      }
      //} fine fronte

      //{ sinistra
      Label LSinistra
      {
        Caption = MSG(3214)
        Hint    = MSG(3214)

        Placement
        {
           posx = 10
           posy = 88
           dimx = 100
           dimy = 20
        }
      }

      Label LSbPSinistra
      {
        Caption   = $DLG_sbordo_sx_Lpar
        Layout = 4

        Placement
        {
           posx = 50
           posy = 88
           dimx = 35
           dimy = 15
        }
      }

      Button BSbSinistra
      {
         Caption = "..."
         Enable = $DLG_enable_sb_sx
         Result  = 0

         Placement
         {
            posx = 90
            posy = 85
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_Sbordo_sx_par")
            $DLG_sbordo_sx_Lpar = STR(VAR_VAL($DLG_idx_to_call,"VAR_Sbordo_sx_par"))
            GOSUB SubCtrlDim_Configura_Top_MadeTerraneo
         ]

      }

      Label lbSSinistra
      {
        Caption   = $DLG_sbordo_sx_tot
        Layout = 4

        Placement
        {
           posx = 120
           posy = 88
           dimx = 35
           dimy = 15
        }
      }
      //} fine sinistra

      //{ destras
      Label LDestra
      {
        Caption = MSG(3213)
        Hint    = MSG(3213)

        Placement
        {
           posx = 10
           posy = 113
           dimx = 100
           dimy = 20
        }
      }

      Label LSbPDestra
      {
        Caption = $DLG_sbordo_dx_Lpar
        Layout = 4

        Placement
        {
           posx = 50
           posy = 113
           dimx = 35
           dimy = 15
        }
      }

      Button BSbDestra
      {
         Caption = "..."
         Enable = $DLG_enable_sb_dx
         Result  = 0

         Placement
         {
            posx = 90
            posy = 110
            dimx = 20
            dimy = 20
         }
         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_Sbordo_dx_par")
            $DLG_sbordo_dx_Lpar = STR(VAR_VAL($DLG_idx_to_call,"VAR_Sbordo_dx_par"))
            GOSUB SubCtrlDim_Configura_Top_MadeTerraneo
         ]
      }

      Label lbSDestra
      {
        Caption  = $DLG_sbordo_dx_tot
        Layout = 4

        Placement
        {
           posx = 120
           posy = 113
           dimx = 35
           dimy = 15
        }
      }
      //} fine destra
   }

   Frame FrmTagli
   {
      Caption = MSG(3216)

      Placement
      {
         posx = 190
         posy = 80
         dimx = 125
         dimy = 145
      }

      Check tRetro
      {
        Caption = MSG(3211)
        Hint    = MSG(3211)
        Enable  = $DLG_enable_trt
        Value   = $DLG_value_trt

        Placement
        {
           posx = 10
           posy = 35
           dimx = 100
           dimy = 20
        }
      }

      Check Fronte
      {
        Caption = MSG(3212)
        Hint    = MSG(3212)
        //Enable  = $DLG_enable_tfr
        Enable  = 0
        Value   = $DLG_value_tfr

        Placement
        {
           posx = 10
           posy = 60
           dimx = 100
           dimy = 20
        }
      }

      Check sx
      {
        Caption = MSG(3214)
        Hint    = MSG(3214)
        Enable  = $DLG_enable_tsx
        Value   = $DLG_value_tsx

        Placement
        {
           posx = 10
           posy = 85
           dimx = 100
           dimy = 20
        }
      }

      Check dx
      {
        Caption = MSG(3213)
        Hint    = MSG(3213)
        Enable  = $DLG_enable_tdx
        Value   = $DLG_value_tdx

        Placement
        {
           posx = 10
           posy = 110
           dimx = 100
           dimy = 20
        }
      }
   }

   Frame FrmBordi
   {
      Caption = MSG(3237)

      Placement
      {
         posx = 325
         posy = 80
         dimx = 125
         dimy = 145
      }

      Check pRetro
      {
        Caption = MSG(3211)
        Hint    = MSG(3211)
        Value   = $DLG_BorPiast_rt

        Placement
        {
           posx = 10
           posy = 35
           dimx = 100
           dimy = 20
        }
      }

      Check pFronte
      {
        Caption = MSG(3212)
        Hint    = MSG(3212)
        Enable  = 0
        Value   = 1

        Placement
        {
           posx = 10
           posy = 60
           dimx = 100
           dimy = 20
        }
      }

      Check psx
      {
        Caption = MSG(3214)
        Hint    = MSG(3214)
        Value   = $DLG_BorPiast_sx
        //Massimiliano 10/04/17 - gestisco il fatto che l'utente non pu cambiare l'opzione
        //                        quando un top  appoggiato ad una base
        Enable  = $DLG_enable_BorPiast_sx

        Placement
        {
           posx = 10
           posy = 85
           dimx = 100
           dimy = 20
        }
      }

      Check pdx
      {
        Caption = MSG(3213)
        Hint    = MSG(3213)
        Value   = $DLG_BorPiast_dx
        //Massimiliano 10/04/17 - gestisco il fatto che l'utente non pu cambiare l'opzione
        //                        quando un top  appoggiato ad una base
        Enable  = $DLG_enable_BorPiast_dx

        Placement
        {
           posx = 10
           posy = 110
           dimx = 100
           dimy = 20
        }
      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 235
         dimx = 270
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 180
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_file1
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

      Button btnMood
      {
         Caption = MSG(619)
         Result  = 0
         Hint = MSG(620)

         Placement
         {
            posx = 150
            posy =  70
            dimx = 110
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
            //VAR_VALUE_SET($DLG_idx_to_call,"ricalcola_una",1)

            $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
            //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
            //Massimiliano 01/08/16 - valorizzazione nome mood
            GOSUB NomeMood
            $DLG_descrizione_mod = $descr_mood
            //Luca Polesello 05/09/2016
            GOSUB AggiornaLavelloMadeterraneo
         ]
      }
   }

   Frame FrRieSupVtr
   {
      Caption = MSG(3217)

      Placement
      {
         posx = 290
         posy = 235
         dimx = 160
         dimy = 140
      }

      Label LblRieSupVtr
      {
        Caption = MSG(3218)
        Hint    = MSG(3218)
        Enable  = $DLG_enable_SuppSX

        Placement
        {
           posx = 10
           posy = 33
           dimx = 80
           dimy = 20
        }
      }

      //Edit EdtRieSupVtr
      Label EdtRieSupVtr
      {
        //Hint    = $DLG_hint_RieSxSupp
        //Value   = $DLG_value_RieSxSupp
        Caption  =  $DLG_value_RieSxSupp
        Layout = 4
        Enable  = $DLG_enable_SuppSX

        Placement
        {
           posx = 70
           posy = 33
           dimx = 50
           dimy = 20
        }
      }

      Button btnSupp
      {
         Caption = "..."
         Result  = 0
         Enable  = $DLG_enable_SuppSX

         Placement
         {
            posx = 125
            posy = 30
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_rientro_gamba_sx")
            $DLG_value_RieSxSupp = STR(VAR_VAL($DLG_idx_to_call,"VAR_rientro_gamba_sx"))
            $DLG_hint_RieSxSupp  = STRCAT(MSG(626),$DLG_value_RieSxSupp)
         ]
      }


      Label LblRieSupVtrDx
      {
        Caption = MSG(3221)
        Hint    = MSG(3221)
        Enable  = $DLG_enable_SuppDX

        Placement
        {
           posx = 10
           posy = 68
           dimx = 80
           dimy = 20
        }
      }

      //Edit EdtRieSupVtr
      Label EdtRieSupVtrDx
      {
        //Hint    = $DLG_hint_RieSxSupp
        //Value   = $DLG_value_RieSxSupp
        Caption  =  $DLG_value_RieDxSupp
        Layout = 4
        Enable  = $DLG_enable_SuppDX

        Placement
        {
           posx = 70
           posy = 68
           dimx = 50
           dimy = 20
        }
      }

      Button btnSuppdx
      {
         Caption = "..."
         Result  = 0
         Enable  = $DLG_enable_SuppDX

         Placement
         {
            posx = 125
            posy = 65
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_rientro_gamba_dx")
            $DLG_value_RieDxSupp = STR(VAR_VAL($DLG_idx_to_call,"VAR_rientro_gamba_dx"))
            $DLG_hint_RieDxSupp  = STRCAT(MSG(626),$DLG_value_RieDxSupp)
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 237
         //posy = 555
         posy = 390
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  142
         //posy = 555
         posy = 390
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg ScassoLavelloMadeTerraneo
{
   Caption = MSG(3223)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 210
      dimy = 450
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 185
         dimy = 60
      }

      Label LblLarghezza
      {
        Caption = MSG(624)

        Placement
        {
           posx = 10
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      Label EdtLarghezza
      {
        Caption   = $DLG_value_x
        Layout = 4

        Placement
        {
           posx = 70
           posy = 28
           dimx = 50
           dimy = 20
        }
      }

      Button btnX
      {
         Caption = "..."
         Result  = 0

         Placement
         {
            posx = 125
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            //Massimiliano 28/06/17 - faccio doppia gestione per lavello quarzo e madeterraneo
            if( NOME($DLG_idx_to_call)=="LavelloQuarzo")
            {
               $R = CHIEDI($DLG_idx_to_call,"TipoLavello")
               $DLG_value_x = STR(VAR_VAL($DLG_idx_to_call,"TipoLavello"))
            }
            else
            {
               $R = CHIEDI($DLG_idx_to_call,"X")
               $DLG_value_x = STR(VAR_VAL($DLG_idx_to_call,"X"))
            }
         ]
      }
   }

   Frame PosizioneScasso
   {
      Caption = MSG(335)

      Placement
      {
         posx = 10
         posy = 80
         dimx = 185
         dimy = 155
      }

      Label LabFinitura
      {
         Caption = MSG(337)

         Placement
         {
            posx = 15
            posy = 25
            dimx = 140
            dimy = 20
         }
      }

      Label LabFinitura
      {
         Caption = $DLG_riferimento

         Placement
         {
            posx = 15
            posy = 50
            dimx = 150
            dimy = 20
         }
      }

      Radio Centro
      {
         Caption = MSG(226)
         Hint    = MSG(226)
         Value   = $DLG_value_centro

         Placement
         {
            posx = 15
            posy = 75
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 1
            $DLG_value_filo_foro_sx = 0
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 0
         ]
      }

      Radio FiloForoSx
      {
         Caption = MSG(338)
         Value   = $DLG_value_filo_foro_sx

         Placement
         {
            posx = 15
            //posy = 100
            posy = 115
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_centro = 0
            $DLG_value_filo_foro_sx = 1
            $DLG_value_filo_foro_dx = 0
            $DLG_enable_value_posizione_filo_foro   = 1
         ]
      }

      //Radio FiloForoDx
      //{
      //   Caption = MSG(339)
      //   Hint    = MSG(339)
      //   Value   = $DLG_value_filo_foro_dx
      //
      //   Placement
      //   {
      //      posx = 15
      //      posy = 125
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $DLG_value_centro = 0
      //      $DLG_value_filo_foro_sx = 0
      //      $DLG_value_filo_foro_dx = 1
      //      $DLG_enable_value_posizione_filo_foro    = 1
      //   ]
      //}

      Edit PosizioneFilo
      {
         Caption = MSG(340)
         Value   = $DLG_value_posizione_filo_foro
         Enable  = $DLG_enable_value_posizione_filo_foro

         Placement
         {
            posx = 130
            posy = 112
            dimx = 40
            dimy = 20
         }
      }
   }

   Frame PosizioneScassoLaterale
   {
      Caption = ""

      Placement
      {
         posx = 10
         posy = 245
         dimx = 185
         dimy = 60
      }

      Label FiloForoFronte
      {
         Caption = MSG(341)
         Value   = $DLG_value_filo_foro_fronte
         //Enable  = $DLG_enable_value_filo_foro

         Placement
         {
            posx = 15
            posy = 20
            dimx = 120
            dimy = 20
         }
      }

      //Radio FiloForoFronte
      //{
      //   Caption = MSG(341)
      //   Value   = $DLG_value_filo_foro_fronte
      //   Enable  = $DLG_enable_value_filo_foro
      //
      //   Placement
      //   {
      //      posx = 15
      //      posy = 7
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $DLG_value_filo_foro_fronte = 1
      //      $DLG_value_filo_foro_retro = 0
      //   ]
      //}
      //Radio FiloForoRetro
      //{
      //   Caption = MSG(342)
      //   Value   = $DLG_value_filo_foro_retro
      //   Enable  = $DLG_enable_value_filo_foro
      //
      //   Placement
      //   {
      //      posx = 15
      //      posy = 30
      //      dimx = 120
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $DLG_value_filo_foro_fronte = 0
      //      $DLG_value_filo_foro_retro = 1
      //   ]
      //}

      Edit PosizioneFronte
      {
         Caption = MSG(343)
         Hint    = MSG(343)
         Value   = $DLG_value_posizione_FroRet_foro
         Enable  = $DLG_enable_value_filo_foro

         Placement
         {
            posx = 130
            posy = 17
            dimx = 40
            dimy = 20
         }
      }
   }

   Frame ForoRubinetto
   {
      Caption = ""

      Placement
      {
         posx = 10
         posy = 315
         dimx = 185
         dimy = 50
      }

      Check ForoRub
      {
         Caption = "Presenza Foro Rubinetto"
         Value = $DLG_VAR_foro_rub
         Enable = $DLG_enable_foro_rub

         Placement
         {
            posx = 15
            posy = 15
            dimx = 140
            dimy = 20
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 110
         posy = 380
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 15
         posy = 380
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

// 11/01/2018 - Filippo -  un esperimento ora come ora, che sto portando avanti in cross.
//                        Creo una dialog al posto della snervante infinit di "chiedi" proposti dagli eldom.
//                        Questo esperimento lo effettuo sul forno generico, se funziona lo porto dappertutto.
//                        Da scegliere se dare solo al backoffice o anche agli utenti esterni
Dlg ScegliEldomGenerico
{
   Caption = MSG(3315)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 600
      //dimy = 335
      dimy = 400
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Info
   {
      Caption = ""

      Placement
      {
         posx = 10
         posy = 10
         dimx = 575
         //dimy = 185
         dimy = 280
      }

      Label LblTitolo
      {
         Caption = $DLG_titolo
         Value   = $DLG_titolo

         Placement
         {
            posx = 200
            posy = 15
            dimx = 120
            dimy = 20
         }
         Font
         {
           size  = 12
           type  = 1
           //color = 255
         }
      }

      Label LblModEldom
      {
         Caption = $DLG_label_1
         Value   = $DLG_label_1
         Enable = $DLG_ena_1

         Placement
         {
            posx = 15
            posy = 40
            dimx = 120
            dimy = 20
         }
      }

      Edit TxtModEldom
      {
         Caption = $DLG_label_1
         Hint    = $DLG_label_1
         Value   = $DLG_textbox_1
         Enable = $DLG_ena_1

         Placement
         {
            //posx = 150
            posx = 15
            //posy = 37
            posy = 60
            //dimx = 400
            dimx = 535
            dimy = 20
         }
      }

      Label LblNoteVano
      {
         Caption = $DLG_label_2
         Value   = $DLG_label_2
         Enable = $DLG_ena_2

         Placement
         {
            posx = 15
            //posy = 83
            posy = 110
            dimx = 120
            dimy = 20
         }
      }

      Edit TxtNoteVano
      {
         Caption = $DLG_label_2
         Hint    = $DLG_label_2
         Value   = $DLG_textbox_2
         Enable = $DLG_ena_2

         Placement
         {
            //posx = 150
            posx = 15
            //posy = 80
            posy = 130
            //dimx = 400
            dimx = 535
            dimy = 20
         }
      }

      Label LblIncEsc
      {
         Caption = $DLG_label_3
         Value   = $DLG_label_3
         Enable = $DLG_ena_3

         Placement
         {
            posx = 15
            //posy = 126
            posy = 180
            dimx = 120
            dimy = 20
         }
      }

      Edit TxtIncEsc
      {
         Caption = $DLG_label_3
         Hint    = $DLG_label_3
         Value   = $DLG_textbox_3
         Enable = $DLG_ena_3

         Placement
         {
            //posx = 150
            posx = 15
            //posy = 123
            posy = 200
            //dimx = 400
            dimx = 535
            dimy = 20
         }
      }

      Label LblIndicazione
      {
         Caption = MSG(3319)
         Value   = MSG(3319)

         Placement
         {
            posx = 15
            //posy = 160
            posy = 250
            dimx = 120
            dimy = 20
         }
         Font
         {
           size  = 8
           type  = 1
           color = 255
         }
      }

   }

   Bevel Bvl1
   {
     Placement
     {
        posx = 10
        //posy = 225
        posy = 300
        dimx = 575
        dimy = 2
     }
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 250
         //posy = 250
         posy = 313
         dimx = 120
         dimy = 45
      }
         Font
         {
           size  = 10
           type  = 1
           //color = 255
         }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg PenisolaMadeTerraneo
{
   Caption = MSG(3224)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 335
      dimx = 575
      dimy = 685
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 550
         dimy = 265
      }

      Label LblLarghezza
      {
        Caption = MSG(624)
        Hint    = $DLG_hint_x

        Placement
        {
           posx = 10
           posy = 35
           dimx = 80
           dimy = 20
        }
      }

      Label EdtLarghezza
      {
        Caption   = $DLG_value_x
        Layout = 4

        Placement
        {
           posx = 150
           posy = 35
           dimx = 50
           dimy = 20
        }
      }

      Label LblProfondita
      {
        Caption = MSG(626)
        Hint    = $DLG_hint_z

        Placement
        {
           posx = 10
           posy = 65
           dimx = 80
           dimy = 20
        }
      }

      Label EdtProfondita
      {
        Caption   = $DLG_value_z
        Layout = 4

        Placement
        {
           posx = 150
           posy = 65
           dimx = 50
           dimy = 20
        }
      }

      Label LblAllungamento
      {
        Caption = MSG(3225)

        Placement
        {
           posx = 10
           posy = 95
           dimx = 500
           dimy = 20
        }
      }

      Label EdtAllungamento
      {
        Caption   = $DLG_allungamento
        Layout = 4

        Placement
        {
           posx = 150
           posy = 95
           dimx = 50
           dimy = 20
        }
      }

      Button btnAllungamento
      {
         Caption = "..."
         Result  = 0

         Placement
         {
            posx = 205
            posy = 92
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_allungamento")
            $DLG_allungamento = STR(VAR_VAL($DLG_idx_to_call,"VAR_allungamento"))
            $DLG_value_x = STR(ATOI(STRMID(0,4,VAR_VAL_STR($DLG_idx_to_call,"VAR_misure"))) + VAR_VAL($DLG_idx_to_call,"VAR_allungamento"))
            $DLG_hint_x  = STRCAT(MSG(624),$DLG_value_x)
            GOSUB Set_Allungamenti_Penisola_MadeTerraneo
         ]
      }

      Label LblAllungamentoProf
      {
        Caption = MSG(3226)
        Enable  = $DLG_enable_all_prof

        Placement
        {
           posx = 10
           posy = 125
           dimx = 500
           dimy = 20
        }
      }

      Label EdtAllungamentoProf
      {
        Caption   = $DLG_all_prof
        Enable  = $DLG_enable_all_prof
        Layout = 4

        Placement
        {
           posx = 150
           posy = 125
           dimx = 50
           dimy = 20
        }
      }

      Button btnAllungamentoProf
      {
         Caption = "..."
         Enable  = $DLG_enable_all_prof
         Result  = 0

         Placement
         {
            posx = 205
            posy = 122
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_all_prof")
            $DLG_all_prof = STR(VAR_VAL($DLG_idx_to_call,"VAR_all_prof"))
            GOSUB Set_Allungamenti_Penisola_MadeTerraneo
         ]
      }

      Label LblAllungamentoProfAllinea
      {
        Caption = MSG(3227)
        Enable  = $DLG_enable_all_allinea

        Placement
        {
           posx = 10
           posy = 155
           dimx = 200
           dimy = 20
        }
      }

      Label EdtAllungamentoProfAllinea
      {
        Caption  = $DLG_all_allinea
        Enable  = $DLG_enable_all_allinea
        Layout = 4

        Placement
        {
           posx = 150
           posy = 155
           dimx = 50
           dimy = 20
        }
      }

      Button btnAllungamentoProfAllinea
      {
         Caption = "..."
         Enable  = $DLG_enable_all_allinea
         Result  = 0

         Placement
         {
            posx = 205
            posy = 152
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_all_allinea")
            $DLG_all_allinea = "Centrato"
            if(VAR_VAL($DLG_idx_to_call,"VAR_all_allinea")==1) { $DLG_all_allinea = "Retro" }
            if(VAR_VAL($DLG_idx_to_call,"VAR_all_allinea")==2) { $DLG_all_allinea = "Fronte" }
         ]
      }

      Label LblVerso
      {
        Caption = "Verso: "

        Placement
        {
           posx = 10
           posy = 215
           dimx = 200
           dimy = 20
        }
      }

      Label EdtVerso
      {
        Caption  = $DLG_verso
        Layout = 4

        Placement
        {
           posx = 150
           posy = 215
           dimx = 50
           dimy = 20
        }
      }

      Button btnVerso
      {
         Caption = "..."
         Result  = 0

         Placement
         {
            posx = 205
            posy = 212
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_verso")
            $DLG_verso = "DX"
            if(VAR_VAL($DLG_idx_to_call,"VAR_verso")<0) { $DLG_verso = "SX"  }
         ]
      }

      Label LabFinPia
      {
         Caption = MSG(3234)

         Placement
         {
            posx = 238
            posy = 20
            dimx = 300
            dimy = 20
         }
      }


      Image Button
      {
         Caption = ""
         Value   = $DLG_image_button
         Hint    = MSG(3234)

         Placement
         {
            posx =  238
            posy =  40
            dimx =  304
            dimy =  214
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_config
         Hint    = MSG(3234)

         Placement
         {
            posx =  246
            posy =  47
            dimx =  296
            dimy =  200
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_misure")
            $DLG_value_x = STR(ATOI(STRMID(0,4,VAR_VAL_STR($DLG_idx_to_call,"VAR_misure"))) + VAR_VAL($DLG_idx_to_call,"VAR_allungamento"))
            $DLG_hint_x  = STRCAT(MSG(624),$DLG_value_x)
            $DLG_value_z = STR(ATOI(STRMID(4,4,VAR_VAL_STR($DLG_idx_to_call,"VAR_misure"))))
            $DLG_hint_z  = STRCAT(MSG(626),$DLG_value_z)
            $DLG_image_config = STRCAT($path_tab,"Images\Menu\PenisoleMadeTerraneo\MadeT_PenDis_",VAR_VAL_STR($DLG_idx_to_call,"VAR_misure"),".jpg")
            GOSUB Set_Allungamenti_Penisola_MadeTerraneo
         ]
      }
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 10
         posy = 285
         dimx = 270
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 180
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_mood
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

      Button btnMood
      {
         Caption = MSG(619)
         Result  = 0
         Hint = MSG(620)

         Placement
         {
            posx = 150
            posy =  70
            dimx = 110
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
            $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
            //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
            //Massimiliano 01/08/16 - valorizzazione nome mood
            GOSUB NomeMood
            $DLG_descrizione_mod = $descr_mood
         ]
      }
   }

   Frame Tipologia
   {
      Caption = MSG(3228)

      Placement
      {
         posx = 10
         posy = 435
         dimx = 550
         dimy = 180
      }

      Radio LL1
      {
        Caption = MSG(3229)
        Value = $DLG_FissaggioMuro
        Placement
        {
           posx = 10
           posy = 20
           dimx = 550
           dimy = 20
        }
      }

      Radio LL2
      {
        Caption = MSG(3230)
        Value = $DLG_FissaggioTop
        Placement
        {
           posx = 10
           posy = 50
           dimx = 550
           dimy = 20
        }
      }

      Radio LL3
      {
        Caption = MSG(3231)
        Value = $DLG_FissaggioTop90
        Placement
        {
           posx = 10
           posy = 80
           dimx = 550
           dimy = 20
        }
      }

      Radio LL4
      {
        Caption = MSG(3232)
        Value = $DLG_FissaggioMuroTop90
        Placement
        {
           posx = 10
           posy = 110
           dimx = 550
           dimy = 20
        }
      }

      Radio LL5
      {
        Caption = MSG(3233)
        Value = $DLG_InAppoggio
        Placement
        {
           posx = 10
           posy = 140
           dimx = 550
           dimy = 20
        }
      }

      //Massimiliano 18/11/16 - gestisco offset quando attivo l'opzione appoggio parziale
      Label LblOffset
      {
        //Caption = MSG(657)
        Caption = MSG(1762)

        Placement
        {
           //posx = 190
           posx = 300
           posy = 140
           dimx = 80
           dimy = 20
        }
      }

      Label LblOffset_Z
      {
        Caption = MSG(1763)

        Placement
        {
           //posx = 190
           posx = 300
           posy = 160
           dimx = 80
           dimy = 20
        }
      }

      Label EdtOffset
      {
        Caption   = $DLG_var_offset
        Layout = 4

        Placement
        {
           posx = 375
           posy = 140
           dimx = 30
           dimy = 20
        }
      }

      Label EdtOffset_z
      {
        Caption   = $DLG_var_offset_z
        Layout = 4

        Placement
        {
           posx = 375
           posy = 160
           dimx = 30
           dimy = 20
        }
      }

      Button btnOffset
      {
         Caption = "..."
         Result  = 0
         //Enable = $DLG_enable_offset

         Placement
         {
            posx = 410
            posy = 137
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_offset")
            $DLG_var_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
         ]
      }

      Button btnOffsetZ
      {
         Caption = "..."
         Result  = 0
         //Enable = $DLG_enable_offset

         Placement
         {
            posx = 410
            posy = 157
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_off_z")
            $DLG_var_offset_z = STR(VAR_VAL($DLG_idx_to_call,"VAR_off_z"))
         ]
      }
   }


   Frame FrRieSupVtr
   {
      Caption = MSG(3217)

      Placement
      {
         posx = 290
         posy = 285
         dimx = 270
         dimy = 140
      }


      Label LblRieSupVtrDx
      {
        Caption = MSG(3221)
        Hint    = MSG(3221)
        Enable  = $DLG_enable_SuppDX

        Placement
        {
           posx = 10
           posy = 28
           dimx = 80
           dimy = 20
        }
      }

      //Edit EdtRieSupVtr
      Label EdtRieSupVtrDx
      {
        //Hint    = $DLG_hint_RieSxSupp
        //Value   = $DLG_value_RieSxSupp
        Caption  =  $DLG_value_RieDxSupp
        Layout = 4
        Enable  = $DLG_enable_SuppDX

        Placement
        {
           posx = 155
           posy = 28
           dimx = 50
           dimy = 20
        }
      }

      Button btnSuppdx
      {
         Caption = "..."
         Result  = 0
         Enable  = $DLG_enable_SuppDX

         Placement
         {
            posx = 210
            posy = 25
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_rientro_gamba_dx")
            $DLG_value_RieDxSupp = STR(VAR_VAL($DLG_idx_to_call,"VAR_rientro_gamba_dx"))
            $DLG_hint_RieDxSupp  = STRCAT(MSG(626),$DLG_value_RieDxSupp)
         ]
      }
   }

   //Frame FrCfgPrs
   //{
   //   Caption = ""
   //
   //   Placement
   //   {
   //      posx = 10
   //      posy = 505
   //      dimx = 305
   //      dimy = 60
   //   }
   //
   //   Button btnConfigPrs
   //   {
   //      Caption = MSG(3219)
   //      Enable = 0
   //      Hint = MSG(3219)
   //
   //      Placement
   //      {
   //         posx = 40
   //         posy = 15
   //         dimx = 221
   //         dimy = 30
   //      }
   //
   //      OnClick
   //      [
   //
   //      ]
   //   }
   //}

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 295
         posy = 615
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 202
         posy = 615
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg PenisolaPersMadeTerraneo
{
   Caption = MSG(3224)
   Placement
   {
      posx = 150
      posy = 150
      //dimx = 335
      dimx = 575
      dimy = 410
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrCfgPrs
   {
      Caption = "Configura"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 270
         dimy = 140
      }

      Button btnConfigPrs
      {
         Caption = MSG(3219)
         Enable = $DLG_DisegnaPenisola
         //Enable = 1
         Hint = MSG(3219)

         Placement
         {
            posx = 10
            posy = 35
            dimx = 250
            dimy = 40
         }

         OnClick
         [
            //DEL_VAR(-1,"PROFILO*")
            //DEL_VAR(-1,"PESI_FASCE_TOP*")
            //DEL_VAR(-1,"POSIZIONA_VINCOLO_W")
            //DEL_VAR(-1,"POSIZIONA_VINCOLO_H")
            GOSUB Disegna_PenisolaPers_MadeTerraeno
            //if( VAR_VAL(-1,"PROFILO_PIANO")>0)
            //{
            //   $string = STRCAT("- PROFILO_PIANO ", STR($PROFILO_PIANO))
            //   $string = STRCAT($string, "\n- PESI_FASCE_TOP ", STR($PESI_FASCE_TOP))
            //   $string = STRCAT($string, "\n- POSIZIONA_VINCOLO_W ", STR($POSIZIONA_VINCOLO_W))
            //   $string = STRCAT($string, "\n- POSIZIONA_VINCOLO_H ", STR($POSIZIONA_VINCOLO_H))
            //   DISPLAY2($string)
            //}

         ]
      }

      //Label LblVerso
      //{
      //  Caption = "Verso: "
      //
      //  Placement
      //  {
      //     posx = 10
      //     posy = 100
      //     dimx = 200
      //     dimy = 20
      //  }
      //}
      //
      //Label EdtVerso
      //{
      //  Caption  = $DLG_verso
      //  Layout = 4
      //
      //  Placement
      //  {
      //     posx = 180
      //     posy = 100
      //     dimx = 50
      //     dimy = 20
      //  }
      //}
      //
      //Button btnVerso
      //{
      //   Caption = "..."
      //   Result  = 0
      //
      //   Placement
      //   {
      //      posx = 240
      //      posy = 98
      //      dimx = 20
      //      dimy = 20
      //   }
      //
      //   OnClick
      //   [
      //      $R = CHIEDI($DLG_idx_to_call,"VAR_verso")
      //      $DLG_verso = "DX"
      //      if(VAR_VAL($DLG_idx_to_call,"VAR_verso")<0) { $DLG_verso = "SX"  }
      //   ]
      //}
   }

   Frame Mood
   {
      Caption = MSG(3204)

      Placement
      {
         posx = 290
         posy = 10
         dimx = 270
         dimy = 140
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione_mod
         Value   = $DLG_descrizione_mod
         Hint    = $DLG_descrizione_mod

         Placement
         {
            posx = 180
            posy = 40
            dimx = 130
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = ""
         Value   = $DLG_image_mood
         Hint    = ""

         Placement
         {
            posx =  25
            posy =  20
            dimx =  108
            dimy =  108
         }
      }

      Button btnMood
      {
         Caption = MSG(619)
         Result  = 0
         Hint = MSG(620)

         Placement
         {
            posx = 150
            posy =  70
            dimx = 110
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_mood")
            $DLG_image_file1 = STRCAT($path_tab,"Images\Menu\MoodMadeTerraneo\MadeT_mood_",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"),".jpg")
            //$DLG_descrizione_mod = STRCAT("Mood ",VAR_VAL_STR($DLG_idx_to_call,"VAR_mood"))
            //Massimiliano 01/08/16 - valorizzazione nome mood
            GOSUB NomeMood
            $DLG_descrizione_mod = $descr_mood
         ]
      }
   }

   Frame Tipologia
   {
      Caption = MSG(3228)

      Placement
      {
         posx = 10
         posy = 160
         dimx = 550
         dimy = 180
      }

      Radio LL1
      {
        Caption = MSG(3229)
        Value = $DLG_FissaggioMuro
        Placement
        {
           posx = 10
           posy = 20
           dimx = 550
           dimy = 20
        }
      }

      Radio LL2
      {
        Caption = MSG(3230)
        Value = $DLG_FissaggioTop
        Placement
        {
           posx = 10
           posy = 50
           dimx = 550
           dimy = 20
        }
      }

      Radio LL3
      {
        Caption = MSG(3231)
        Value = $DLG_FissaggioTop90
        Placement
        {
           posx = 10
           posy = 80
           dimx = 550
           dimy = 20
        }
      }

      Radio LL4
      {
        Caption = MSG(3232)
        Value = $DLG_FissaggioMuroTop90
        Placement
        {
           posx = 10
           posy = 110
           dimx = 550
           dimy = 20
        }
      }

      Radio LL5
      {
        Caption = MSG(3233)
        Value = $DLG_InAppoggio
        Placement
        {
           posx = 10
           posy = 140
           dimx = 550
           dimy = 20
        }
      }

      //Massimiliano 18/11/16 - gestisco offset quando attivo l'opzione appoggio parziale
      Label LblOffset
      {
        //Caption = MSG(657)
        Caption = MSG(1762)

        Placement
        {
           //posx = 190
           posx = 300
           posy = 140
           dimx = 80
           dimy = 20
        }
      }

      Label LblOffset_Z
      {
        Caption = MSG(1763)

        Placement
        {
           //posx = 190
           posx = 300
           posy = 160
           dimx = 80
           dimy = 20
        }
      }

      Label EdtOffset
      {
        Caption   = $DLG_var_offset
        Layout = 4

        Placement
        {
           posx = 375
           posy = 140
           dimx = 30
           dimy = 20
        }
      }

      Label EdtOffset_z
      {
        Caption   = $DLG_var_offset_z
        Layout = 4

        Placement
        {
           posx = 375
           posy = 160
           dimx = 30
           dimy = 20
        }
      }

      Button btnOffset
      {
         Caption = "..."
         Result  = 0
         //Enable = $DLG_enable_offset

         Placement
         {
            posx = 410
            posy = 137
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_offset")
            $DLG_var_offset = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset"))
         ]
      }

      Button btnOffsetZ
      {
         Caption = "..."
         Result  = 0
         //Enable = $DLG_enable_offset

         Placement
         {
            posx = 410
            posy = 157
            dimx = 20
            dimy = 20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_off_z")
            $DLG_var_offset_z = STR(VAR_VAL($DLG_idx_to_call,"VAR_off_z"))
         ]
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 295
         posy = 340
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 202
         posy = 340
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg PenisolaTonda
{
   Caption = MSG(1346)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 470
      dimy = 385
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 20
         posy = 10
         dimx = 200
         dimy = 60
      }

      Label LblMisure
      {
         Caption = MSG(637)
         Hint    = MSG(637)
         Value   = MSG(637)

         Placement
         {
            posx = 10
            posy = 28
            dimx = 80
            dimy = 20
         }
      }

      Label EdtMisure
      {
         Caption = $DLG_caption_misure
         Hint    = $DLG_hint_misure
         Value   = $DLG_value_misure

         Placement
         {
            posx = 65
            posy = 28
            dimx = 65
            dimy = 20
         }
      }

      Button btnMisure
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(1368)

         Placement
         {
            posx = 140
            posy =  25
            dimx =  20
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_misure")

            $wk_var_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")

            $DLG_caption_misure = STRCAT(STR($wk_var_misure),"x",STR($wk_var_misure))
            $DLG_hint_misure    = STRCAT(STR($wk_var_misure),"x",STR($wk_var_misure))
            $DLG_value_misure   = STRCAT(STR($wk_var_misure),"x",STR($wk_var_misure))
         ]
      }
   }

   Frame FrmFuochi
   {
      Caption = MSG(3106)

      Placement
      {
         posx = 20
         posy = 80
         dimx = 200
         dimy = 105
      }

      Check ConFuochi
      {
         Caption = MSG(3107)
         Hint    = MSG(3107)
         Value   = $DLG_check_fuochi
         Enable  = $DLG_attiva_check_fuochi

         Placement
         {
            posx = 10
            posy = 23
            dimx = 150
            dimy = 20
         }
         OnClick
         [
            //da lasciare per aggiornare radio
            $wk_aa = 1
         ]
      }

      Radio Bianchi
      {
         Caption = MSG(3108)
         Hint    = MSG(3108)
         Value   = $DLG_radio_fu_bi
         Enable  = $DLG_check_fuochi

         Placement
         {
            posx = 30
            posy = 48
            dimx = 150
            dimy = 20
         }
      }

      Radio Neri
      {
         Caption = MSG(3109)
         Hint    = MSG(3109)
         Value   = $DLG_radio_fu_ne
         Enable  = $DLG_check_fuochi

         Placement
         {
            posx = 30
            posy = 73
            dimx = 150
            dimy = 20
         }
      }
   }

   Frame Finitura_Piano
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 240
         posy = 10
         dimx = 200
         dimy = 175
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione
         Value   = $DLG_descrizione
         Hint    = $DLG_descrizione

         Placement
         {
            posx = 50
            posy = 25
            dimx = 115
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione
         Value   = $DLG_image_file_pia
         Hint    = $DLG_descrizione

         Placement
         {
            posx =  75
            posy =  55
            dimx =  64
            dimy =  64
         }
      }

      Button btnFinPia
      {
         Caption = MSG(619)
         Result  = 0
         Hint = MSG(620)

         Placement
         {
            posx =  50
            posy = 135
            dimx = 110
            dimy =  20
         }

         OnClick
         [
            if( $DLG_tipologia==0 )
            {
               $R = CHIEDI($DLG_idx_to_call,"GEST_ST")
               $DLG_descrizione = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST") ,"colori_tutti.txt")
               $DLG_image_file_pia = Get_Image(VAR_VAL_STR($DLG_idx_to_call,"GEST_ST"),"lucido")
            }
            else
            {
               $R = CHIEDI($DLG_idx_to_call,"GEST_SZ")
               $DLG_descrizione = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ") ,"colori_tutti.txt")
               $DLG_image_file_pia = Get_Image(VAR_VAL_STR($DLG_idx_to_call,"GEST_SZ"),"WW")
            }
         ]
      }
   }

   Frame Note
   {
      Caption = MSG(3110)

      Font
      {
        size  = 8.5
        type  = 1
        color = 255
      }

      Placement
      {
         posx = 20
         posy = 195
         dimx = 420
         dimy = 100
      }

      Label LabFinPia
      {
         Caption = MSG(3111)

         Placement
         {
            posx = 10
            posy = 30
            dimx = 350
            dimy = 30
         }
      }

      Label LabFinPia
      {
         Caption = MSG(3112)

         Placement
         {
            posx = 10
            posy = 60
            dimx = 350
            dimy = 30
         }
      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 240
         posy = 310
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 140
         posy = 310
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg AirTopSteel80
{
   Caption = MSG(2450)
   Placement
   {
      posx = 150
      posy = 150
      dimx = 245
      dimy = 450
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame Finitura
   {
      Caption = MSG(1347)

      Placement
      {
         posx = 20
         posy = 10
         dimx = 200
         dimy = 175
      }

      Label LabFinPia
      {
         Caption = $DLG_descrizione
         Value   = $DLG_descrizione
         Hint    = $DLG_descrizione

         Placement
         {
            posx = 52
            posy = 25
            dimx = 115
            dimy = 25
         }
      }

      Image ImPia
      {
         Caption = $DLG_descrizione
         Value   = $DLG_image_file_pia
         Hint    = $DLG_descrizione

         Placement
         {
            posx =  60
            posy =  50
            dimx =  80
            dimy =  80
         }
      }

      Button btnFinPia
      {
         Caption = MSG(619)
         Result  = 0
         Hint = MSG(620)

         Placement
         {
            posx =  50
            posy = 140
            dimx = 100
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"GEST_NB")
            $DLG_descrizione = DESCRIZIONE_VAL_TABDB($DLG_idx_to_call,"GEST_NB")
            $DLG_image_file_pia = Get_Image(VAR_VAL_STR($DLG_idx_to_call,"GEST_NB"),"")
         ]
      }
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         posx = 20
         posy = 195
         dimx = 200
         dimy = 175
      }

      // { larghezza
      Label LblMisure
      {
         Caption = MSG(624)
         Hint    = MSG(624)
         Value   = MSG(624)

         Placement
         {
            posx = 10
            posy = 28
            dimx = 80
            dimy = 20
         }
      }

      Label EdtMisure
      {
         Caption = $DLG_caption_x
         Hint    = $DLG_hint_x
         Value   = $DLG_value_x
         Layout = 4

         Placement
         {
            posx = 75
            posy = 28
            dimx = 65
            dimy = 20
         }
      }

      Button btnMisure
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(624)

         Placement
         {
            posx = 155
            posy =  25
            dimx =  20
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"X")
            $DLG_caption_x = STR(VAR_VAL($DLG_idx_to_call,"X") )
            $DLG_hint_x    = STR(VAR_VAL($DLG_idx_to_call,"X") )
            $DLG_value_x   = STR(VAR_VAL($DLG_idx_to_call,"X") )
         ]
      }
      //} larghezza


      //{ profondt
      Label LblZ
      {
         Caption = MSG(626)
         Hint    = MSG(626)
         Value   = MSG(626)

         Placement
         {
            posx = 10
            posy = 53
            dimx = 80
            dimy = 20
         }
      }

      Label EdtZ
      {
         Caption = $DLG_caption_z
         Hint    = $DLG_hint_z
         Value   = $DLG_value_z
         Layout = 4

         Placement
         {
            posx = 75
            posy = 53
            dimx = 65
            dimy = 20
         }
      }

      Button btnZ
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(626)

         Placement
         {
            posx = 155
            posy =  50
            dimx =  20
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"Z")
            $DLG_caption_z = STR(VAR_VAL($DLG_idx_to_call,"Z") )
            $DLG_hint_z    = STR(VAR_VAL($DLG_idx_to_call,"Z") )
            $DLG_value_z   = STR(VAR_VAL($DLG_idx_to_call,"Z") )
         ]
      }
      //} profondit

      //{ posizione
      Label Lblpos
      {
         Caption = MSG(433)
         Hint    = MSG(433)
         Value   = MSG(433)

         Placement
         {
            posx = 10
            posy = 78
            dimx = 80
            dimy = 20
         }
      }

      Label Edtpos
      {
         Caption = $DLG_caption_pos
         Hint    = $DLG_hint_pos
         Value   = $DLG_value_pos
         Layout = 4

         Placement
         {
            posx = 75
            posy = 78
            dimx = 65
            dimy = 20
         }
      }

      Button btnpos
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(433)

         Placement
         {
            posx = 155
            posy =  75
            dimx =  20
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_posizione")
            $wk_pos = VAR_VAL($DLG_idx_to_call,"VAR_posizione")

            $DLG_caption_pos = MSG(1391)
            if( $wk_pos== 2 )   { $DLG_caption_pos = MSG(1392) }
            $DLG_hint_pos = $DLG_caption_pos
            $DLG_value_pos =  "0"

            $DLG_enable_off = 1
            if( ABS($wk_pos)==2 )
            {
               $DLG_enable_off = 0
               $DLG_caption_off = 0
             }
         ]
      }
      //} posizione

      // { offset
      Label Lbloff
      {
         Caption = MSG(657)
         Hint    = MSG(657)
         Value   = MSG(657)
         Enable  = $DLG_enable_off

         Placement
         {
            posx = 10
            posy = 103
            dimx = 80
            dimy = 20
         }
      }

      Label Edtoff
      {
         Caption = $DLG_caption_off
         Hint    = $DLG_hint_off
         Value   = $DLG_value_off
         Layout  = 4
         Enable  = $DLG_enable_off

         Placement
         {
            posx = 75
            posy = 103
            dimx = 65
            dimy = 20
         }
      }

      Button btnoff
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(657)
         Enable  = $DLG_enable_off

         Placement
         {
            posx = 155
            posy = 100
            dimx =  20
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_offset")
            $DLG_caption_off = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset") )
            $DLG_hint_off    = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset") )
            $DLG_value_off   = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset") )

            //$R = CHIEDI($DLG_idx_to_call,"VAR_offset_lat")
            //$DLG_caption_off = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_lat") )
            //$DLG_hint_off    = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_lat") )
            //$DLG_value_off   = STR(VAR_VAL($DLG_idx_to_call,"VAR_offset_lat") )
         ]
      }
      //} offset

      // { allineamento
      Label Lblall
      {
         Caption = MSG(1323)
         Hint    = MSG(1323)
         Value   = MSG(1323)

         Placement
         {
            posx = 10
            posy = 128
            dimx = 80
            dimy = 20
         }
      }

      Label Edtall
      {
         Caption = $DLG_caption_all
         Hint    = $DLG_hint_all
         Value   = $DLG_value_all
         Layout = 4

         Placement
         {
            posx = 75
            posy = 128
            dimx = 65
            dimy = 20
         }
      }

      Button btnall
      {
         Caption = "..."
         Result  = 0
         Hint = MSG(1323)

         Placement
         {
            posx = 155
            posy = 125
            dimx =  20
            dimy =  20
         }

         OnClick
         [
            $R = CHIEDI($DLG_idx_to_call,"VAR_allinea")

            Set_SbordoMassimoZ_TopSteel($DLG_idx_to_call)

            $DLG_caption_all = MSG(649)  $DLG_hint_all = MSG(649)  $DLG_value_all = MSG(649)
            if( VAR_VAL($DLG_idx_to_call,"VAR_allinea")<0 )
            {
               $DLG_caption_all = MSG(648)  $DLG_hint_all = MSG(648)  $DLG_value_all = MSG(648)
            }
         ]
      }
      //} allineamento
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 130
         posy = 380
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx =  30
         posy = 380
         dimx =  80
         dimy =  30
      }

      OnClick
      [
         $OK=1
      ]
   }
}

Dlg FormSiNo
{
   Caption = MSG(2006)

   Placement
   {
      posx = 100
      posy = 100
      dimx = 400
      dimy = 130
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Label MisuraX
   {
      Caption = MSG(2007)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 400
         dimy = 25
      }

      Font
      {
         size = 10
         type = 1
         name = "Arial"
         color = 255
      }
   }

   Label TestoMessaggio
   {
      Caption = MSG(2008)

      Placement
      {
         posx = 10
         posy = 45
         dimx = 400
         dimy = 25
      }

      Font
      {
         size = 10
         type = 1
         name = "Arial"
         color = 0
      }
   }

   Button SI
   {
      Caption = MSG(2009)
      Result = 1
      Default = 1
      Hint = MSG(2009)

      Placement
      {
         posx = 260
         posy = 70
         dimx = 60
         dimy = 25
      }

      OnClick
      [
         $DLG_SINO=1
      ]
   }

   Button NO
   {
      Caption = MSG(2010)
      Result = 2
      Hint = MSG(2010)

      Placement
      {
         posx = 330
         posy = 70
         dimx = 60
         dimy = 25
      }

      OnClick
      [
         $DLG_SINO=0
      ]
   }
}

Dlg SiNo
{
   Caption = $wk_caption
   Placement
   {
      posx = 100
      posy = 100
      //dimx = 400
      dimx = 450
      dimy = 150
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Label Txt1
   {
      //Testo del quesito (1a riga)
      Caption = $wk_txt1
      Placement
      {
         posx = 25
         posy = 20
         dimx = 350
         dimy = 25
      }
   }

   Label Txt2
   {
      //Testo del quesito (2a riga)
      Caption = $wk_txt2
      Placement
      {
         posx = 25
         posy = 40
         dimx = 350
         dimy = 25
      }
   }

   Button SI
   {
//MA-    Caption = "&SI"
//Claudio 23/04/14      Caption = MSG(3031)
      Caption = MSG(2009)
      Result = 1  // ModalOk $DlgResult__==1
      Default = 1
      Placement
      {
         posx = 100
         posy = 80
         dimx = 75
         dimy = 25
      }
   }

   Button NO
   {
//MA-    Caption = "&NO"
//Claudio 23/04/14      Caption = MSG(3032)
      Caption = MSG(2010)
      Result = 2  // ModalAnnulla  $DlgResult__==0
      Placement
      {
         posx = 225
         posy = 80
         dimx = 75
         dimy = 25
      }
   }
}

// 11/05/2018 - Emanuele - Creo dialog per tavolo Bold
Dlg Bold
{
   Caption = MSG(3344)
   Placement
   {
      // 11/05/2018 - Emanuele - GRANDEZZA TOTALE DIALOG
      posx = 150
      posy = 150
      dimx = 740
//      dimy = 350
      dimy = 390
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisure
   {
      Caption = MSG(601)

      Placement
      {
         // 11/05/2018 - Emanuele - GRANDEZZA CONTORNO SEZIONE
         posx = 10
         posy = 10
         dimx = 200
//         dimy = 230
         dimy = 270
      }

      Edit EdtMisure
      {
        Caption = $DLG_desc_misure
        Hint    = $DLG_desc_misure
        Value   = $DLG_desc_misure

        Placement
        {
         // 11/05/2018 - Emanuele - SPAZIO PER LA SCRITTA DELLA SEZIONE
           posx = 85
           posy = 40
           dimx = 60
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Label Lblmisure
      {
        Caption = MSG(964)
        Hint    = MSG(965)
        Value   = MSG(637)

        Placement
        {
           posx = 15
           posy = 45
           dimx = 80
           dimy = 20
        }

      }
   }

   Frame Finitura
   {
      Caption = MSG(3341)

      Placement
      {
         // 11/05/2018 - Emanuele - GRANDEZZA CONTORNO SEZIONE
         posx = 215
         posy = 10
         dimx = 320
//         dimy = 230
         dimy = 270
      }

      Radio rd1
      {
         Caption  = MSG(3601)
         Hint     = MSG(3601)
         Value    = $DLG_value_XGlass_lucido

         Placement
         {
            posx = 170
//            posy = 60
            posy = 30
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 1
            $DLG_value_XGlass_opaco = 0
            // 23/05/2019 - Emanuele - Aggiungo assegnazioni per metallizzati
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_value_wildwood = 0
            $DLG_value_Vetro_lucido = 0
            $DLG_value_Vetro_opaco = 0
            GOSUB CambiaRadBold
            $DLG_COLORE_XGLASS = "MR1"
            $DLG_COLORE_XGLASS_PREC = $DLG_COLORE_XGLASS
            $DLG_COLORE_ROVERE = $VALORE_NULLO
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_XGLASS"),"colori_tutti.txt")
            GOSUB Get_Image_XGlass
            $DLG_image_file1 = $DLG_image_file
            $DLG_GEST_PIANO = "DLG_COLORE_XGLASS"
         ]
      }

      Radio rd2
      {
         Caption  = MSG(3602)
         Hint     = MSG(3602)
         Value    = $DLG_value_XGlass_opaco

         Placement
         {
            posx = 170
//            posy = 90
            posy = 60
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 1
            // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_value_wildwood = 0
            $DLG_value_Vetro_lucido = 0
            $DLG_value_Vetro_opaco = 0
            GOSUB CambiaRadBold
            $DLG_COLORE_XGLASS = "MR1"
            $DLG_COLORE_XGLASS_PREC = $DLG_COLORE_XGLASS
            $DLG_COLORE_ROVERE = $VALORE_NULLO
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_XGLASS"),"colori_tutti.txt")
            GOSUB Get_Image_XGlass
            $DLG_image_file1 = $DLG_image_file
            $DLG_GEST_PIANO = "DLG_COLORE_XGLASS"
         ]
      }

      Radio rd3
      {
         Caption = MSG(3348)
         Hint    = MSG(3348)
         Value   = $DLG_value_wildwood

         Placement
         {
            posx = 170
//            posy = 120
            posy = 90
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_value_wildwood = 1
            $DLG_value_Vetro_lucido = 0
            $DLG_value_Vetro_opaco = 0
            $DLG_COLORE_ROVERE = "HAY"
            $DLG_COLORE_ROVERE_PREC = $DLG_COLORE_ROVERE
            $DLG_COLORE_XGLASS = $VALORE_NULLO
            GOSUB CambiaRadBold
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB($DLG_COLORE_ROVERE,"colori_tutti.txt")
            GOSUB Get_Image_Rovere
            $DLG_image_file1 = $DLG_image_file
            $DLG_GEST_PIANO = "DLG_COLORE_ROVERE"
         ]
      }

      Radio rd4
      {
         Caption = MSG(375)
         Hint    = MSG(375)
         Value   = $DLG_value_Vetro_lucido

         Placement
         {
            posx = 170
//            posy = 150
            posy = 120
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_value_wildwood = 0
            $DLG_value_Vetro_lucido = 1
            $DLG_value_Vetro_opaco = 0
            $DLG_COLORE_368 = "BCO"
            GOSUB CambiaRadBold
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_368"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,"DLG_COLORE_368")
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file
         ]
      }
      // 13/02/2020 - Emanuele - Aggiungo radiobutton per la gestione del vetro opaco
      Radio rd7
      {
         Caption = MSG(376)
         Hint    = MSG(376)
         Enable  = 0
         Value   = $DLG_value_Vetro_opaco

         Placement
         {
            posx = 170
            posy = 150
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 0
            $DLG_value_wildwood = 0
            $DLG_value_Vetro_lucido = 0
            $DLG_value_Vetro_opaco = 1
            $DLG_COLORE_368 = "BCO"
            GOSUB CambiaRadBold
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_368"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,"DLG_COLORE_368")
            GOSUB Get_Image_Opaco
            $DLG_image_file1 = $DLG_image_file
         ]
      }

      // 23/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio rd5
      {
         Caption  = $DLG_caption_lucido_metal
         Hint     = $DLG_hint_lucido_metal
         Value    = $DLG_value_Metal_lucido

         Placement
         {
            posx = 170
            posy = 180
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            $DLG_value_Metal_lucido = 1
            $DLG_value_Metal_opaco = 0
            $DLG_value_wildwood = 0
            $DLG_value_Vetro_lucido = 0
            $DLG_value_Vetro_opaco = 0
            GOSUB CambiaRadBold
            $DLG_COLORE_METAL = "MT4"
            $DLG_COLORE_METAL_PREC = $DLG_COLORE_METAL
            $DLG_COLORE_ROVERE = $VALORE_NULLO
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_METAL"),"colori_tutti.txt")
            GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
            $DLG_image_file1 = $DLG_image_file
            $DLG_GEST_PIANO = "DLG_COLORE_METAL"
         ]
      }

      Radio rd6
      {
         Caption  = $DLG_caption_opaco_metal
         Hint     = $DLG_hint_opaco_metal
         Value    = $DLG_value_Metal_opaco

         Placement
         {
            posx = 170
            posy = 210
            dimx = 120
            dimy = 20
         }

         OnClick
         [
            $DLG_value_XGlass_lucido = 0
            $DLG_value_XGlass_opaco = 0
            $DLG_value_Metal_lucido = 0
            $DLG_value_Metal_opaco = 1
            $DLG_value_wildwood = 0
            $DLG_value_Vetro_lucido = 0
            $DLG_value_Vetro_opaco = 0
            GOSUB CambiaRadBold
            $DLG_COLORE_METAL = "MT4"
            $DLG_COLORE_METAL_PREC = $DLG_COLORE_METAL
            $DLG_COLORE_ROVERE = $VALORE_NULLO
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_METAL"),"colori_tutti.txt")
            GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
            $DLG_image_file1 = $DLG_image_file
            $DLG_GEST_PIANO = "DLG_COLORE_METAL"
         ]
      }

//      Radio rd5
//      {
//         Caption = MSG(376)
//         Hint    = MSG(376)
//         Value   = $DLG_value_Vetro_opaco
//
//         Placement
//         {
//            posx = 170
//            posy = 180
//            dimx = 120
//            dimy = 20
//         }
//
//         OnClick
//         [
//            $DLG_value_XGlass_lucido = 0
//            $DLG_value_XGlass_opaco = 0
//            $DLG_value_wildwood = 0
//            $DLG_value_Vetro_lucido = 0
//            $DLG_value_Vetro_opaco = 1
//            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_PT=",APICI(),"DEN",APICI()))
//            COMANDO2(STRCAT("VAR_CHANGE 1 ",STR($DLG_idx_to_call)," GEST_PZ=",APICI(),$VALORE_NULLO,APICI()))
//            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_PT"),"colori_tutti.txt")
//            $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_PT")
//            GOSUB Get_Image_Opaco
//            $DLG_image_file1 = $DLG_image_file
//            $DLG_GEST_PIANO = "GEST_PT"
//         ]
//      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_descrizione_var1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx = 40
            posy = 25
            dimx = 130
            dimy = 70
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var1
         Value   = $DLG_image_file1
         Hint    = $DLG_descrizione_var1

         Placement
         {
            posx =  40
            posy =  50
            dimx =  100
            dimy =  100
         }
      }
   }

   Frame FinituraSostegno
   {
      Caption = MSG(3342)

      Placement
      {
         posx = 540
         posy = 10
         dimx = 180
//         dimy = 230
         dimy = 270
      }

      Label LabFinitura
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_descrizione_var2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx = 40
            posy = 25
            dimx = 100
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descrizione_var2
         Value   = $DLG_image_file2
         Hint    = $DLG_descrizione_var2

         Placement
         {
            posx =  40
            posy =  50
            dimx =  100
            dimy =  100
         }
      }
   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 300
//         posy = 260
         posy = 300
         dimx = 65
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 215
//         posy = 260
         posy = 300
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnMisure
   {
      Caption = "..."
      Result  = 0
      Hint = MSG(969)

      Placement
      {
         posx = 170
         posy = 50
         dimx = 20
         dimy = 20
      }

      OnClick
      [
        $R = CHIEDI($DLG_idx_to_call,"VAR_misure")
        $DLG_misure = VAR_VAL($DLG_idx_to_call,"VAR_misure")
         //Set misure
         if( $DLG_misure==200110 )
         {
             $DLG_X     = 2000
             $DLG_Z     = 1100
         }

         if( $DLG_misure==220110 )
         {
             $DLG_X     = 2200
             $DLG_Z     = 1100
         }

         if( $DLG_misure==250120 )
         {
             $DLG_X     = 2500
             $DLG_Z     = 1200
         }

         $DLG_desc_misure     = STRCAT(STR($DLG_X),"x",STR($DLG_Z))
         $DLG_hint_misure     = STRCAT(MSG(807)," = ",$DLG_desc_misure)
      ]
   }

   Button btnFinitura
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(958)
      Enable = $DLG_ena_color

      Placement
      {
         posx = 245
         posy = 180
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         if($DLG_value_Vetro_lucido==0 & $DLG_value_Vetro_opaco==0)
         {
            $R = CHIEDI(-1,$DLG_GEST_PIANO)
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,$DLG_GEST_PIANO),"colori_tutti.txt")
            if($DLG_value_XGlass_lucido == 1 | $DLG_value_XGlass_opaco == 1)
            {
               $DLG_COLORE_XGLASS = VAR_VAL_STR(-1,$DLG_GEST_PIANO)
               GOSUB Get_Image_XGlass
            }
            // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati
            if($DLG_value_Metal_lucido == 1 | $DLG_value_Metal_opaco == 1)
            {
               $DLG_COLORE_METAL = VAR_VAL_STR(-1,$DLG_GEST_PIANO)
               if($DLG_value_Metal_lucido==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
               if($DLG_value_Metal_opaco==1)  { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
            }
            if($DLG_value_wildwood==1)
            {
               $DLG_COLORE_ROVERE = VAR_VAL_STR(-1,$DLG_GEST_PIANO)
               GOSUB Get_Image_Rovere
            }
         }
         else
         {
            $R = CHIEDI(-1,"DLG_COLORE_368")
            $DLG_descrizione_var1 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR(-1,"DLG_COLORE_368"),"colori_tutti.txt")
            $DLG_VAL_COLORE = VAR_VAL_STR(-1,"DLG_COLORE_368")
            GOSUB Get_Image_Opaco
         }
         $DLG_image_file1 = $DLG_image_file
      ]
   }

   Button btnFinituraSostegno
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_ena_color

      Placement
      {
         posx = 570
         posy = 180
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         $R = CHIEDI($DLG_idx_to_call,"GEST_G1")
         $DLG_descrizione_var2 = DESCRIZIONE_VAL_TAB(VAR_VAL_STR($DLG_idx_to_call,"GEST_G1"),"colori_tutti.txt")
         $DLG_VAL_COLORE = VAR_VAL_STR($DLG_idx_to_call,"GEST_G1")
         GOSUB Get_Image_Opaco
         $DLG_image_file2 = $DLG_image_file
      ]
   }

}

//Massimiliano 20/06/2018  - madia plenum dialog
Dlg Plenum
{
   Caption = MSG(3600)

   Placement
   {
      posx = 150
      posy = 150
      dimx = 590
//      dimy = 350
      dimy = 390
      save_pos = 1
   }
   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FinituraFr
   {
      Caption = MSG(235)

      Placement
      {
         posx = 10
         posy = 10
         dimx = 180
//         dimy = 255
         dimy = 295
      }

      Label LabFinitura
      {
         Caption = $DLG_descr_ant_var
         Value   = $DLG_descr_ant_var
         Hint    = $DLG_descr_ant_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descr_ant_var
         Value   = $DLG_image_ant_file
         Hint    = $DLG_descr_ant_var

         Placement
         {
            posx =  50
            posy =  45
            dimx =  80
            dimy =  80
         }
      }

      Radio RdLucidoFr
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_ant_luc_ple
        Enable  = $DLG_enable_rd_luc_ant_ple

        Placement
        {
           posx = 10
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1 )  {  $DLG_ANTE_PLENUM = "BCO"  }
           if( $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1 | $DLG_ant_luc_metal_ple == 1 | $DLG_ant_opa_metal_ple == 1)  {  $DLG_ANTE_PLENUM = "BCO"  }

           $DLG_ant_luc_ple        = 1
           $DLG_ant_opa_ple        = 0
           $DLG_ant_luc_xglass_ple = 0
           $DLG_ant_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_ant_luc_metal_ple = 0
           $DLG_ant_opa_metal_ple = 0

           $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_ANTE_PLENUM
           GOSUB Get_Image_368_L
           $DLG_image_ant_file = $DLG_image_file

           ////passo i valori anche a fianchi e top
           $DLG_tipo = "anta"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpacoFr
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_ant_opa_ple
        Enable  = $DLG_enable_rd_opa_ant_ple

        Placement
        {
           posx = 10
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1 )  {  $DLG_ANTE_PLENUM = "BCO"  }
           if( $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1 | $DLG_ant_luc_metal_ple == 1 | $DLG_ant_opa_metal_ple == 1)  {  $DLG_ANTE_PLENUM = "BCO"  }
           if( $DLG_ANTE_PLENUM == "ARG" )                                    {  $DLG_ANTE_PLENUM = "BCO"  }

           $DLG_ant_luc_ple        = 0
           $DLG_ant_opa_ple        = 1
           $DLG_ant_luc_xglass_ple = 0
           $DLG_ant_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo varaibili per metallizzati
           $DLG_ant_luc_metal_ple = 0
           $DLG_ant_opa_metal_ple = 0

           $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_368_O = $DLG_ANTE_PLENUM
           GOSUB Get_Image_368_O
           $DLG_image_ant_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "anta"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdLucXGlassFr
      {
        Caption = MSG(3601)
        Hint    = MSG(3601)
        Value   = $DLG_ant_luc_xglass_ple
        Enable  = $DLG_enable_rd_luc_xglass_ant_ple

        Placement
        {
           posx = 10
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_ant_luc_ple == 1 | $DLG_ant_opa_ple == 1 )  {  $DLG_ANTE_PLENUM = "MR1"  }
           if( $DLG_ant_luc_ple == 1 | $DLG_ant_opa_ple == 1 | $DLG_ant_luc_metal_ple == 1 | $DLG_ant_opa_metal_ple == 1)  {  $DLG_ANTE_PLENUM = "MR1"  }

           $DLG_ant_luc_ple        = 0
           $DLG_ant_opa_ple        = 0
           $DLG_ant_luc_xglass_ple = 1
           $DLG_ant_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo varaibili per metallizzati
           $DLG_ant_luc_metal_ple = 0
           $DLG_ant_opa_metal_ple = 0

           $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_XGLASS = $DLG_ANTE_PLENUM
           GOSUB Get_Image_XGlass
           $DLG_image_ant_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "anta"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpaXGlassFr
      {
        Caption = MSG(3602)
        Hint    = MSG(3602)
        Value   = $DLG_ant_opa_xglass_ple
        Enable  = $DLG_enable_rd_opa_xglass_ant_ple

        Placement
        {
           posx = 10
           posy = 230
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_ant_luc_ple == 1 | $DLG_ant_opa_ple == 1 )  {  $DLG_ANTE_PLENUM = "MR1"  }
           if( $DLG_ant_luc_ple == 1 | $DLG_ant_opa_ple == 1 | $DLG_ant_luc_metal_ple == 1 | $DLG_ant_opa_metal_ple == 1)  {  $DLG_ANTE_PLENUM = "MR1"  }

           $DLG_ant_luc_ple        = 0
           $DLG_ant_opa_ple        = 0
           $DLG_ant_luc_xglass_ple = 0
           $DLG_ant_opa_xglass_ple = 1
           // 23/05/2019 - Emanuele - Aggiungo varaibili per metallizzati
           $DLG_ant_luc_metal_ple = 0
           $DLG_ant_opa_metal_ple = 0

           $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_XGLASS = $DLG_ANTE_PLENUM
           GOSUB Get_Image_XGlass
           $DLG_image_ant_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "anta"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      // 23/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucMetalFr
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_ant_luc_metal_ple
        Enable  = $DLG_enable_rd_luc_metal_ant_ple

        Placement
        {
           posx = 10
           posy = 250
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ant_luc_ple == 1 | $DLG_ant_opa_ple == 1 | $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1)  {  $DLG_ANTE_PLENUM = "MT4"  }

           $DLG_ant_luc_ple        = 0
           $DLG_ant_opa_ple        = 0
           $DLG_ant_luc_xglass_ple = 0
           $DLG_ant_opa_xglass_ple = 0
           $DLG_ant_luc_metal_ple = 1
           $DLG_ant_opa_metal_ple = 0

           $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_METAL = $DLG_ANTE_PLENUM
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           $DLG_image_ant_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "anta"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpaMetalFr
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_ant_opa_metal_ple
        Enable  = $DLG_enable_rd_opa_metal_ant_ple

        Placement
        {
           posx = 10
           posy = 270
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_ant_luc_ple == 1 | $DLG_ant_opa_ple == 1 | $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1)  {  $DLG_ANTE_PLENUM = "MT4"  }

           $DLG_ant_luc_ple        = 0
           $DLG_ant_opa_ple        = 0
           $DLG_ant_luc_xglass_ple = 0
           $DLG_ant_opa_xglass_ple = 0
           $DLG_ant_luc_metal_ple = 0
           $DLG_ant_opa_metal_ple = 1

           $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_METAL = $DLG_ANTE_PLENUM
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           $DLG_image_ant_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "anta"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

   }

   Frame FinituraFia
   {
      Caption = MSG(281)

      Placement
      {
         posx = 200
         posy = 10
         dimx = 180
//         dimy = 255
         dimy = 295
      }

      Label LabFinitura
      {
         Caption = $DLG_descr_fia_var
         Value   = $DLG_descr_fia_var
         Hint    = $DLG_descr_fia_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descr_fia_var
         Value   = $DLG_image_fia_file
         Hint    = $DLG_descr_fia_var

         Placement
         {
            posx =  50
            posy =  45
            dimx =  80
            dimy =  80
         }
      }

      Radio RdLucidoFia
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_fia_luc_ple
        Enable  = $DLG_enable_rd_luc_fia_ple

        Placement
        {
           posx = 10
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 )  {  $DLG_FIA_PLENUM = "BCO"  }
           if( $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 | $DLG_fia_luc_metal_ple == 1 | $DLG_fia_opa_metal_ple == 1 )  {  $DLG_FIA_PLENUM = "BCO"  }

           $DLG_fia_luc_ple        = 1
           $DLG_fia_opa_ple        = 0
           $DLG_fia_luc_xglass_ple = 0
           $DLG_fia_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_fia_luc_metal_ple = 0
           $DLG_fia_opa_metal_ple = 0

           $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_FIA_PLENUM
           GOSUB Get_Image_368_L
           $DLG_image_fia_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "fia"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpacoFia
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_fia_opa_ple
        Enable  = $DLG_enable_rd_opa_fia_ple

        Placement
        {
           posx = 10
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 )  {  $DLG_FIA_PLENUM = "BCO"  }
           if( $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 | $DLG_fia_luc_metal_ple == 1 | $DLG_fia_opa_metal_ple == 1 )  {  $DLG_FIA_PLENUM = "BCO"  }

           $DLG_fia_luc_ple        = 0
           $DLG_fia_opa_ple        = 1
           $DLG_fia_luc_xglass_ple = 0
           $DLG_fia_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_fia_luc_metal_ple = 0
           $DLG_fia_opa_metal_ple = 0

           $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_368_O = $DLG_FIA_PLENUM
           GOSUB Get_Image_368_O
           $DLG_image_fia_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "fia"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdLucXGlassFia
      {
        Caption = MSG(3601)
        Hint    = MSG(3601)
        Value   = $DLG_fia_luc_xglass_ple
        Enable  = $DLG_enable_rd_luc_xglass_fia_ple

        Placement
        {
           posx = 10
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 )  {  $DLG_FIA_PLENUM = "MR1"  }
           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 | $DLG_fia_luc_metal_ple == 1 | $DLG_fia_opa_metal_ple == 1 )  {  $DLG_FIA_PLENUM = "MR1"  }

           $DLG_fia_luc_ple        = 0
           $DLG_fia_opa_ple        = 0
           $DLG_fia_luc_xglass_ple = 1
           $DLG_fia_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_fia_luc_metal_ple = 0
           $DLG_fia_opa_metal_ple = 0

           $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_XGLASS = $DLG_FIA_PLENUM
           GOSUB Get_Image_XGlass
           $DLG_image_fia_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "fia"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpaXGlassFia
      {
        Caption = MSG(3602)
        Hint    = MSG(3602)
        Value   = $DLG_fia_opa_xglass_ple
        Enable  = $DLG_enable_rd_opa_xglass_fia_ple

        Placement
        {
           posx = 10
           posy = 230
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 )  {  $DLG_FIA_PLENUM = "MR1"  }
           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 | $DLG_fia_luc_metal_ple == 1 | $DLG_fia_opa_metal_ple == 1 )  {  $DLG_FIA_PLENUM = "MR1"  }

           $DLG_fia_luc_ple        = 0
           $DLG_fia_opa_ple        = 0
           $DLG_fia_luc_xglass_ple = 0
           $DLG_fia_opa_xglass_ple = 1
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_fia_luc_metal_ple = 0
           $DLG_fia_opa_metal_ple = 0

           $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_XGLASS = $DLG_FIA_PLENUM
           GOSUB Get_Image_XGlass
           $DLG_image_fia_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "fia"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }
      // 23/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucMetalFia
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_fia_luc_metal_ple
        Enable  = $DLG_enable_rd_luc_metal_fia_ple

        Placement
        {
           posx = 10
           posy = 250
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 )  {  $DLG_FIA_PLENUM = "MR1"  }
           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 | $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 )  {  $DLG_FIA_PLENUM = "MT4"  }

           $DLG_fia_luc_ple        = 0
           $DLG_fia_opa_ple        = 0
           $DLG_fia_luc_xglass_ple = 0
           $DLG_fia_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_fia_luc_metal_ple = 1
           $DLG_fia_opa_metal_ple = 0

           $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_METAL = $DLG_FIA_PLENUM
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           $DLG_image_fia_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "fia"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpaMetalFia
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_fia_opa_metal_ple
        Enable  = $DLG_enable_rd_opa_metal_fia_ple

        Placement
        {
           posx = 10
           posy = 270
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 )  {  $DLG_FIA_PLENUM = "MR1"  }
           if( $DLG_fia_luc_ple == 1 | $DLG_fia_opa_ple == 1 | $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 )  {  $DLG_FIA_PLENUM = "MT4"  }

           $DLG_fia_luc_ple        = 0
           $DLG_fia_opa_ple        = 0
           $DLG_fia_luc_xglass_ple = 0
           $DLG_fia_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_fia_luc_metal_ple = 0
           $DLG_fia_opa_metal_ple = 1

           $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_METAL = $DLG_FIA_PLENUM
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           $DLG_image_fia_file = $DLG_image_file

           //passo i valori anche a fianchi e top
           $DLG_tipo = "fia"
           GOSUB Conf_Plenum

           //cambio radice
           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

   }

   Frame FinituraTop
   {
      Caption = MSG(251)

      Placement
      {
         posx = 390
         posy = 10
         dimx = 180
//         dimy = 255
         dimy = 295
      }

      Label LabFinitura
      {
         Caption = $DLG_descr_top_var
         Value   = $DLG_descr_top_var
         Hint    = $DLG_descr_top_var

         Placement
         {
            posx = 10
            posy = 20
            dimx = 130
            dimy = 25
         }
      }

      Image Im1
      {
         Caption = $DLG_descr_top_var
         Value   = $DLG_image_top_file
         Hint    = $DLG_descr_top_var

         Placement
         {
            posx =  50
            posy =  45
            dimx =  80
            dimy =  80
         }
      }

      Radio RdLucidoTop
      {
        Caption = MSG(751)
        Hint    = MSG(751)
        Value   = $DLG_top_luc_ple
        Enable  = $DLG_enable_rd_luc_top_ple

        Placement
        {
           posx = 10
           posy = 170
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 )  {  $DLG_TOP_PLENUM = "BCO"  }
           if( $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 | $DLG_top_luc_metal_ple == 1 | $DLG_top_opa_metal_ple == 1 )  {  $DLG_TOP_PLENUM = "BCO"  }

           $DLG_top_luc_ple        = 1
           $DLG_top_opa_ple        = 0
           $DLG_top_luc_xglass_ple = 0
           $DLG_top_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_top_luc_metal_ple = 0
           $DLG_top_opa_metal_ple = 0

           $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_368_L = $DLG_TOP_PLENUM
           GOSUB Get_Image_368_L
           $DLG_image_top_file = $DLG_image_file

           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpacoTop
      {
        Caption = MSG(752)
        Hint    = MSG(752)
        Value   = $DLG_top_opa_ple
        Enable  = $DLG_enable_rd_opa_top_ple

        Placement
        {
           posx = 10
           posy = 190
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 )  {  $DLG_TOP_PLENUM = "BCO"  }
           if( $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 | $DLG_top_luc_metal_ple == 1 | $DLG_top_opa_metal_ple == 1 )  {  $DLG_TOP_PLENUM = "BCO"  }

           $DLG_top_luc_ple        = 0
           $DLG_top_opa_ple        = 1
           $DLG_top_luc_xglass_ple = 0
           $DLG_top_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_top_luc_metal_ple = 0
           $DLG_top_opa_metal_ple = 0

           $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_368_O = $DLG_TOP_PLENUM
           GOSUB Get_Image_368_O
           $DLG_image_top_file = $DLG_image_file

           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdLucXGlassTop
      {
        Caption = MSG(3601)
        Hint    = MSG(3601)
        Value   = $DLG_top_luc_xglass_ple
        Enable  = $DLG_enable_rd_luc_xglass_top_ple

        Placement
        {
           posx = 10
           posy = 210
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_top_luc_ple == 1 | $DLG_top_opa_ple == 1 )  {  $DLG_TOP_PLENUM = "MR1"  }
           if( $DLG_top_luc_ple == 1 | $DLG_top_opa_ple == 1 | $DLG_top_luc_metal_ple == 1 | $DLG_top_opa_metal_ple == 1 )  {  $DLG_TOP_PLENUM = "MR1"  }

           $DLG_top_luc_ple        = 0
           $DLG_top_opa_ple        = 0
           $DLG_top_luc_xglass_ple = 1
           $DLG_top_opa_xglass_ple = 0
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_top_luc_metal_ple = 0
           $DLG_top_opa_metal_ple = 0

           $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_XGLASS = $DLG_TOP_PLENUM
           GOSUB Get_Image_XGlass
           $DLG_image_top_file = $DLG_image_file

           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpaXGlassTop
      {
        Caption = MSG(3602)
        Hint    = MSG(3602)
        Value   = $DLG_top_opa_xglass_ple
        Enable  = $DLG_enable_rd_opa_xglass_top_ple

        Placement
        {
           posx = 10
           posy = 230
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           // 23/05/2019 - Emanuele - Modifico condizione per metallizzati
//           if( $DLG_top_luc_ple == 1 | $DLG_top_opa_ple == 1 )  {  $DLG_TOP_PLENUM = "MR1"  }
           if( $DLG_top_luc_ple == 1 | $DLG_top_opa_ple == 1 | $DLG_top_luc_metal_ple == 1 | $DLG_top_opa_metal_ple == 1 )  {  $DLG_TOP_PLENUM = "MR1"  }

           $DLG_top_luc_ple        = 0
           $DLG_top_opa_ple        = 0
           $DLG_top_luc_xglass_ple = 0
           $DLG_top_opa_xglass_ple = 1
           // 23/05/2019 - Emanuele - Aggiungo variabili per metallizzati
           $DLG_top_luc_metal_ple = 0
           $DLG_top_opa_metal_ple = 0

           // 23/05/2019 - Emanuele - Modifico variabile perch non  quella corretta
           $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_XGLASS = $DLG_TOP_PLENUM
           GOSUB Get_Image_XGlass
           $DLG_image_top_file = $DLG_image_file

           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }
      // 23/05/2019 - Emanuele - Aggiungo radiobutton per metallizzati
      Radio RdLucMetalTop
      {
        Caption = $DLG_caption_lucido_metal
        Hint    = $DLG_hint_lucido_metal
        Value   = $DLG_top_luc_metal_ple
        Enable  = $DLG_enable_rd_luc_metal_top_ple

        Placement
        {
           posx = 10
           posy = 250
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_top_luc_ple == 1 | $DLG_top_opa_ple == 1 | $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 )  {  $DLG_TOP_PLENUM = "MT4"  }

           $DLG_top_luc_ple        = 0
           $DLG_top_opa_ple        = 0
           $DLG_top_luc_xglass_ple = 0
           $DLG_top_opa_xglass_ple = 0
           $DLG_top_luc_metal_ple = 1
           $DLG_top_opa_metal_ple = 0

           $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_METAL = $DLG_TOP_PLENUM
           GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL")
           $DLG_image_top_file = $DLG_image_file

           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

      Radio RdOpaMetalTop
      {
        Caption = $DLG_caption_opaco_metal
        Hint    = $DLG_hint_opaco_metal
        Value   = $DLG_top_opa_metal_ple
        Enable  = $DLG_enable_rd_opa_metal_top_ple

        Placement
        {
           posx = 10
           posy = 270
           dimx = 120
           dimy = 20
        }

        OnClick
        [
           if( $DLG_top_luc_ple == 1 | $DLG_top_opa_ple == 1 | $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 )  {  $DLG_TOP_PLENUM = "MT4"  }

           $DLG_top_luc_ple        = 0
           $DLG_top_opa_ple        = 0
           $DLG_top_luc_xglass_ple = 0
           $DLG_top_opa_xglass_ple = 0
           $DLG_top_luc_metal_ple = 0
           $DLG_top_opa_metal_ple = 1

           $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
           $DLG_COLORE_METAL = $DLG_TOP_PLENUM
           GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")
           $DLG_image_top_file = $DLG_image_file

           $DLG_idx_plenum = $DLG_idx_to_call
           GOSUB CambiaRadPlenum
        ]

      }

   }

   Button btnAnnulla
   {
      Caption = MSG(615)
      Result  = 2
      Hint = MSG(616)

      Placement
      {
         posx = 105
//         posy = 275
         posy = 315
         dimx = 85
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }


   Button btnOK
   {
      Caption = MSG(617)
      Result  = 1
      Default = 1
      Hint = MSG(618)

      Placement
      {
         posx = 10
//         posy = 275
         posy = 315
         dimx = 85
         dimy = 30
      }

      OnClick
      [
         $OK=1
      ]
   }

   Button btnFinituraFr
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)

      Placement
      {
         posx = 20
         posy = 145
         dimx = 160
         dimy = 25
      }

      OnClick
      [
         //WIP
         if( $DLG_ant_luc_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_image_ant_file = $DLG_image_file

            $DLG_ANTE_PLENUM  = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L

            //passo i valori anche a fianchi e top
            $DLG_tipo = "anta"
            GOSUB Conf_Plenum
         }

         if( $DLG_ant_opa_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_image_ant_file = $DLG_image_file

            $DLG_ANTE_PLENUM   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O

            //passo i valori anche a fianchi e top
            $DLG_tipo = "anta"
            GOSUB Conf_Plenum
         }

         if( $DLG_ant_luc_xglass_ple == 1 | $DLG_ant_opa_xglass_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_ANTE_PLENUM")
            $DLG_descr_ant_var = DESCRIZIONE_VAL_TAB($DLG_ANTE_PLENUM,"colori_tutti.txt")
            $DLG_COLORE_XGLASS = $DLG_ANTE_PLENUM
            GOSUB Get_Image_XGlass
            $DLG_image_ant_file = $DLG_image_file

            //passo i valori anche a fianchi e top
            $DLG_tipo = "anta"
            GOSUB Conf_Plenum
         }

         // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati
         if( $DLG_ant_luc_metal_ple == 1 | $DLG_ant_opa_metal_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_ANTE_PLENUM = $DLG_COLORE_METAL
            if($DLG_ant_luc_metal_ple==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if($DLG_ant_opa_metal_ple==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
            $DLG_image_ant_file = $DLG_image_file

            //passo i valori anche a fianchi e top
            $DLG_tipo = "anta"
            GOSUB Conf_Plenum
         }

      ]
   }

   Button btnFinituraFia
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_button_fia

      Placement
      {
         posx = 210
         posy = 145
         dimx = 160
         dimy = 25
      }

      OnClick
      [
         //WIP
         if( $DLG_fia_luc_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_image_fia_file = $DLG_image_file

            $DLG_FIA_PLENUM   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L

            //passo i valori anche a fianchi e top
            $DLG_tipo = "fia"
            GOSUB Conf_Plenum
         }

         if( $DLG_fia_opa_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_image_fia_file = $DLG_image_file

            $DLG_FIA_PLENUM   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O

            //passo i valori anche a fianchi e top
            $DLG_tipo = "fia"
            GOSUB Conf_Plenum
         }

         if( $DLG_fia_luc_xglass_ple == 1 | $DLG_fia_opa_xglass_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_FIA_PLENUM")
            $DLG_descr_fia_var = DESCRIZIONE_VAL_TAB($DLG_FIA_PLENUM,"colori_tutti.txt")
            $DLG_COLORE_XGLASS = $DLG_FIA_PLENUM
            GOSUB Get_Image_XGlass
            $DLG_image_fia_file = $DLG_image_file

            //passo i valori anche a fianchi e top
            $DLG_tipo = "fia"
            GOSUB Conf_Plenum
         }

         // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati
         if( $DLG_fia_luc_metal_ple == 1 | $DLG_fia_opa_metal_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_FIA_PLENUM = $DLG_COLORE_METAL
            if($DLG_fia_luc_metal_ple==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if($DLG_fia_opa_metal_ple==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
            $DLG_image_fia_file = $DLG_image_file

            //passo i valori anche a fianchi e top
            $DLG_tipo = "fia"
            GOSUB Conf_Plenum
         }

      ]
   }

   Button btnFinituraTop
   {
      Caption = MSG(619)
      Result  = 0
      Hint = MSG(620)
      Enable = $DLG_enable_button_top

      Placement
      {
         posx = 400
         posy = 145
         dimx = 160
         dimy = 25
      }

      OnClick
      [
         //WIP
         if( $DLG_top_luc_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_L")
            $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_L,"colori_tutti.txt")
            GOSUB Get_Image_368_L
            $DLG_image_top_file = $DLG_image_file

            $DLG_TOP_PLENUM   = $DLG_COLORE_368_L
            $DLG_COLORE_368_O = $DLG_COLORE_368_L
         }

         if( $DLG_top_opa_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_368_O")
            $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_368_O,"colori_tutti.txt")
            GOSUB Get_Image_368_O
            $DLG_image_top_file = $DLG_image_file

            $DLG_TOP_PLENUM   = $DLG_COLORE_368_O
            $DLG_COLORE_368_L = $DLG_COLORE_368_O
         }

         if( $DLG_top_luc_xglass_ple == 1 | $DLG_top_opa_xglass_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_TOP_PLENUM")
            $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_TOP_PLENUM,"colori_tutti.txt")
            $DLG_COLORE_XGLASS = $DLG_TOP_PLENUM
            GOSUB Get_Image_XGlass
            $DLG_image_top_file = $DLG_image_file
         }

         // 23/05/2019 - Emanuele - Aggiungo controllo per metallizzati
         if( $DLG_top_luc_metal_ple == 1 | $DLG_top_opa_metal_ple == 1 )
         {
            $R = CHIEDI(-1,"DLG_COLORE_METAL")
            $DLG_descr_top_var = DESCRIZIONE_VAL_TAB($DLG_COLORE_METAL,"colori_tutti.txt")
            $DLG_TOP_PLENUM = $DLG_COLORE_METAL
            if($DLG_top_luc_metal_ple==1) { GET_IMAGE("DLG_image_file","lucido","DLG_COLORE_METAL") }
            if($DLG_top_opa_metal_ple==1) { GET_IMAGE("DLG_image_file","opaco","DLG_COLORE_METAL")  }
            $DLG_image_top_file = $DLG_image_file
         }

      ]
   }

}

// FT 10/09/18
Dlg CtrlGruppiXGlass
{
   Caption = "GRUPPI XGLASS"

   Placement
   {
      posx = 150
      posy = 150
      dimx = 300
      //dimy = 290
      dimy = 340
      save_pos = 1
   }

   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Button btnGenera
   {
      Caption = "(1) Genera Gruppi"
      Hint = "Genera Gruppi"
      Enable = $wk_dlg_genera

      Placement
      {
         posx = 10
         posy = 20
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         COMANDO2("Esegui GeneraGruppiXGlass")
         // GOSUB GeneraGruppiXGlass

         $wk_dlg_step = 1

         $wk_dlg_genera_lbl = STRCAT(STR(VAR_VAL(-1, "wk_dlg_Groups")), " gruppi generati")

         $wk_dlg_genera = 0     $wk_dlg_genera_ok = 1
         $wk_dlg_unisci = 1     $wk_dlg_unisci_ok = 0
         $wk_dlg_setta  = 1     $wk_dlg_setta_ok  = 0
         $wk_dlg_numera = 0     $wk_dlg_numera_ok = 0
      ]

   }

   Image ImgGenera
   {
      Value   = $wk_dlg_check
      Visible = $wk_dlg_genera_ok

      Placement
      {
         posx = 145
         posy = 25
         dimx = 15
         dimy = 15
      }
   }

   Label LblGenera
   {
      Caption = $wk_dlg_genera_lbl
      Visible = $wk_dlg_genera_ok

      Placement
      {
         posx = 175
         posy = 25
         dimx = 150
         dimy = 25
      }
   }

   Button btnUnisci
   {
      Caption = "(2) Unisci Gruppi"
      Hint = "Unisci automaticamente i gruppi collisi"
      Enable = $wk_dlg_unisci

      Placement
      {
         posx = 10
         posy = 60
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         COMANDO2("Esegui UnisciGruppiXGlass")
         //GOSUB UnisciGruppiXGlass

         $wk_dlg_step = 2

         $wk_dlg_unioni = VAR_VAL(-1, "wk_dlg_unioni") + 1
         WITH_ALIAS("$wk_xg_StpGruppoXG", "StpGruppoXG")
         $wk_dlg_unisci_lbl = STRCAT(STR($wk_dlg_unioni), " Unioni (", STR($wk_xg_StpGruppoXG), " gruppi)")

         $wk_dlg_genera = 0     $wk_dlg_genera_ok = 1
         $wk_dlg_unisci = 1     $wk_dlg_unisci_ok = 1
         $wk_dlg_setta  = 1     $wk_dlg_setta_ok  = 0
         $wk_dlg_numera = 0     $wk_dlg_numera_ok = 0
      ]
   }

   Image ImgUnisci
   {
      Value   = $wk_dlg_check
      Visible = $wk_dlg_unisci_ok

      Placement
      {
         posx = 145
         posy = 65
         dimx = 15
         dimy = 15
      }
   }

   Label LblUnisci
   {
      Caption   = $wk_dlg_unisci_lbl
      Visible = $wk_dlg_unisci_ok

      Placement
      {
         posx = 175
         posy = 65
         dimx = 150
         dimy = 25
      }
   }

   Button btnSetta
   {
      Caption = "(3) Setta Gruppi"
      Hint = "Setta i gruppi e apri interfaccia di Metron"
      Result = 1
      Enable = $wk_dlg_setta

      Placement
      {
         posx = 10
         posy = 100
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         $CtrlGruppiXGlass = 1
         COMANDO2("Esegui SettaGruppiXGlass")
         //GOSUB SettaGruppiXGlass

         $wk_dlg_step = 3

         $wk_dlg_genera = 0     $wk_dlg_genera_ok = 1
         $wk_dlg_unisci = 0     $wk_dlg_unisci_ok = 1
         $wk_dlg_setta  = 0     $wk_dlg_setta_ok  = 1
         $wk_dlg_numera = 1     $wk_dlg_numera_ok = 0

         $wk_dlg_setta_lbl = "Gruppi settati"
      ]
   }

   Image ImgSetta
   {
      Value   = $wk_dlg_check
      Visible = $wk_dlg_setta_ok

      Placement
      {
         posx = 145
         posy = 105
         dimx = 15
         dimy = 15
      }
   }

   Label LblSetta
   {
      Caption = $wk_dlg_setta_lbl
      Visible = $wk_dlg_setta_ok

      Placement
      {
         posx = 175
         posy = 105
         dimx = 150
         dimy = 25
      }
   }

   Button btnNumera
   {
      Caption = "(4) Numera Strutture"
      Hint = "Numera le strutture con progressivo assoluto"
      Enable = $wk_dlg_numera
      // Result  = 1

      Placement
      {
         posx = 10
         posy = 140
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         COMANDO2("Esegui NumeraStruttureXGlass")
         //GOSUB NumeraStruttureXGlass

         $wk_dlg_step = 4

         $wk_dlg_numera_lbl = "Gruppi numerati"

         $wk_dlg_xglass_lbl = STRCAT("Totale elementi XGlass numerati: ", STR(VAR_VAL(-1, "wk_xg_XGlassNumeroProg")))

         $wk_dlg_genera = 0     $wk_dlg_genera_ok = 1
         $wk_dlg_unisci = 0     $wk_dlg_unisci_ok = 1
         $wk_dlg_setta  = 0     $wk_dlg_setta_ok  = 1
         $wk_dlg_numera = 0     $wk_dlg_numera_ok = 1
      ]
   }

   Image ImgNumera
   {
      Value   = $wk_dlg_check
      Visible = $wk_dlg_numera_ok

      Placement
      {
         posx = 145
         posy = 145
         dimx = 15
         dimy = 15
      }
   }

   Label LblNumera
   {
      Caption = $wk_dlg_numera_lbl
      Visible = $wk_dlg_numera_ok

      Placement
      {
         posx = 175
         posy = 145
         dimx = 150
         dimy = 25
      }
   }

   Label LbProgXGlass
   {
      Caption = $wk_dlg_xglass_lbl
      Visible = $wk_dlg_numera_ok

      Placement
      {
         posx = 15
         posy = 185
         dimx = 270
         dimy = 25
      }
   }

   Button btnStampa
   {
      Caption = "(5) Stampa XGLASS"
      //Hint = "Numera le strutture con progressivo assoluto"
      Enable = $wk_dlg_numera_ok
      Result  = 1

      Placement
      {
         posx = 10
         posy = 210
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         COMANDO2("esegui Stampa_XGLASS")
         // 20/09/2019 - Emanuele - Aggiungo una assegnazione che verifica se la stampa  stata eseguita
         // oppure no
         $CHECK_ESECUZIONE_STAMPA_XGLASS = 1
         //GOSUB NumeraStruttureXGlass
      ]
   }

   Button btnEsci
   {
      Caption = "Esci"
      Result  = 2
      Hint = "Esci dalla dialog"

      Placement
      {
         posx = 10
         //posy = 220
         posy = 270
         dimx = 120
         dimy = 25
      }

      OnClick
      [
         // flag di segnalazione
         $wk_dlg_uscita = 1
      ]
   }
}

// 24/04/2019 - Emanuele - Aggiungo dialog per la funzione di Debug
Dlg Debug_Variabili
{
   Caption = "DEBUG VARIABILI"

   Placement
   {
      posx = 150
      posy = 150
      dimx = 500
      dimy = 700
      save_pos = 1
   }

   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmIdx
   {
      Caption = "Idx Elemento"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 200
         dimy = 60
      }

      Edit EdtIdx
      {
        Caption = "Idx Elemento"
        Hint    = "Idx Elemento"
        Enable  = 1
        Value   = $DLG_idx_elemento_value

        Placement
        {
           posx = 20
           posy = 25
           dimx = 150
           dimy = 20
        }

        OnClick
        [
        ]

      }
   }

   Button btnEsci
   {
      Caption = "Esci"
      Result  = 2
      Hint = "Esci"

      Placement
      {
         posx = 400
         posy = 600
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
      ]
   }

   Button btnCancellaVar
   {
      Caption = "Reset Variabili"
      Result  = 0
      Hint = "Reset Variabili"

      Placement
      {
         posx = 250
         posy = 600
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         $DLG_Cancella_Variabili = 1
      ]
   }

   Button btnAggiorna
   {
      Caption = "Aggiorna"
      Result  = 1
      Hint = "Aggiorna"

      Placement
      {
         posx = 100
         posy = 600
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         $DLG_Aggiorna = 1
      ]
   }

   Button btnImpostaIdx
   {
      Caption = "Imposta Idx"
      Result  = 0
      Hint = "Imposta Idx"

      Placement
      {
         posx = 250
         posy = 30
         dimx = 150
         dimy = 30
      }

      OnClick
      [
         $DLG_idx_elemento = ATOI($DLG_idx_elemento_value)
      ]
   }

   Button btnMostraVarNum
   {
      Caption = "Mostra Variabili Numeriche"
      Result  = 0
      Hint = "Mostra Variabili Numeriche"

      Placement
      {
         posx = 30
         posy = 100
         dimx = 150
         dimy = 30
      }

      OnClick
      [
         DISPLAY2($DLG_array_var_num)
      ]
   }

   Button btnMostraVarStr
   {
      Caption = "Mostra Variabili Stringa"
      Result  = 0
      Hint = "Mostra Variabili Stringa"

      Placement
      {
         posx = 30
         posy = 150
         dimx = 150
         dimy = 30
      }

      OnClick
      [
         DISPLAY2($DLG_array_var_str)
      ]
   }

   Button btnMostraDiffNum
   {
      Caption = "Mostra Differenze Variabili Numeriche"
      Result  = 0
      Hint = "Mostra Differenze Variabili Numeriche"

      Placement
      {
         posx = 30
         posy = 200
         dimx = 200
         dimy = 30
      }

      OnClick
      [
         DISPLAY2($DLG_array_var_num_diff)
      ]
   }

   Button btnMostraDiffStr
   {
      Caption = "Mostra Differenze Variabili Stringa"
      Result  = 0
      Hint = "Mostra Differenze Variabili Stringa"

      Placement
      {
         posx = 30
         posy = 250
         dimx = 200
         dimy = 30
      }

      OnClick
      [
         DISPLAY2($DLG_array_var_str_diff)
      ]
   }

}

// 29/05/2019 - Emanuele - Creo dialog per la generazione di un elemento blocco con la possibilit di avere una stampa tecnica
Dlg Gen_Sta_Blocco
{
   Caption = "GENERA/STAMPA_BLOCCO"

   Placement
   {
      posx = 150
      posy = 150
      dimx = 450
      dimy = 250
      save_pos = 1
   }

   Font
   {
      size = $SizeFont
      name = $TypeFont
   }

   Frame FrmMisBlocco
   {
      Caption = "Dimensioni Elemento"

      Placement
      {
         posx = 10
         posy = 10
         dimx = 200
         dimy = 130
      }

      Edit EdtX
      {
        Caption = "X Elemento"
        Hint    = "X Elemento"
        Enable  = 1
        Value   = $DLG_spec_x

        Placement
        {
           posx = 20
           posy = 25
           dimx = 150
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtY
      {
        Caption = "Y Elemento"
        Hint    = "Y Elemento"
        Enable  = 1
        Value   = $DLG_spec_y

        Placement
        {
           posx = 20
           posy = 50
           dimx = 150
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtZ
      {
        Caption = "Z Elemento"
        Hint    = "Z Elemento"
        Enable  = 1
        Value   = $DLG_spec_z

        Placement
        {
           posx = 20
           posy = 75
           dimx = 150
           dimy = 20
        }

        OnClick
        [
        ]

      }

   }

   Frame FrmDescBlocco
   {
      Caption = "Descrizione Blocco"

      Placement
      {
         posx = 230
         posy = 10
         dimx = 200
         dimy = 130
      }

      Edit EdtTipoEle
      {
        Caption = "Tipologia Elemento"
        Hint    = "Tipologia Elemento"
        Enable  = 1
        Value   = $DLG_spec_tipo_ele

        Placement
        {
           posx = 20
           posy = 25
           dimx = 150
           dimy = 20
        }

        OnClick
        [
        ]

      }

      Edit EdtFinitura
      {
        Caption = "Colore"
        Hint    = "Colore"
        Enable  = 1
        Value   = $DLG_spec_tipo_fin

        Placement
        {
           posx = 20
           posy = 50
           dimx = 150
           dimy = 20
        }

        OnClick
        [
        ]

      }

   }

   Button btnEsci
   {
      Caption = "Esci"
      Result  = 2
      Hint = "Esci"

      Placement
      {
         posx = 340
         posy = 180
         dimx = 80
         dimy = 30
      }

      OnClick
      [
         $OK=0
         $DLG_spec_stampa_blocco = 0
      ]
   }

   Button btnGeneraBlocco
   {
      Caption = "Genera Blocco"
      Result  = 1
      Hint = "Genera_Blocco"

      Placement
      {
         posx = 10
         posy = 180
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         $DLG_spec_gen_blocco = 1
         $DLG_spec_stampa_blocco = 0
      ]
   }

   Button btnStampaBlocco
   {
      Caption = "Stampa Blocco"
      Result  = 1
      Hint = "Stampa Blocco"

      Placement
      {
         posx = 150
         posy = 180
         dimx = 120
         dimy = 30
      }

      OnClick
      [
         $DLG_spec_stampa_blocco = 1
      ]
   }
}

