<div id="fiche_pro_sante_insert_mob_form3" style='<?php echo (3 != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['form_wizard']['actual_step'] ? 'display: none; width: 1px; height: 0px; overflow: scroll' : ''); ?>'>
<?php $sc_hidden_no = 1; $sc_hidden_yes = 0; ?>
   <a name="bloco_0"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_6"><!-- bloco_c -->
<?php
   if (!isset($this->nmgp_cmp_hidden['maladie_suspectee_by_ia']))
   {
       $this->nmgp_cmp_hidden['maladie_suspectee_by_ia'] = 'off';
   }
?>
<TABLE align="center" id="hidden_bloco_6" class="scFormTable<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['hospitalisation']))
    {
        $this->nm_new_label['hospitalisation'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_hospitalisation'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $hospitalisation = $this->hospitalisation;
   $sStyleHidden_hospitalisation = '';
   if (isset($this->nmgp_cmp_hidden['hospitalisation']) && $this->nmgp_cmp_hidden['hospitalisation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['hospitalisation']);
       $sStyleHidden_hospitalisation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_hospitalisation = 'display: none;';
   $sStyleReadInp_hospitalisation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['hospitalisation']) && $this->nmgp_cmp_readonly['hospitalisation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['hospitalisation']);
       $sStyleReadLab_hospitalisation = '';
       $sStyleReadInp_hospitalisation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['hospitalisation']) && $this->nmgp_cmp_hidden['hospitalisation'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="hospitalisation" value="<?php echo $this->form_encode_input($hospitalisation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_hospitalisation_line" id="hidden_field_data_hospitalisation" style="<?php echo $sStyleHidden_hospitalisation; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_hospitalisation_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_hospitalisation_label" style=""><span id="id_label_hospitalisation"><?php echo $this->nm_new_label['hospitalisation']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["hospitalisation"]) &&  $this->nmgp_cmp_readonly["hospitalisation"] == "on") { 

 if ("O" == $this->hospitalisation) { $hospitalisation_look = "Oui";} 
 if ("N" == $this->hospitalisation) { $hospitalisation_look = "Non";} 
?>
<input type="hidden" name="hospitalisation" value="<?php echo $this->form_encode_input($hospitalisation) . "\">" . $hospitalisation_look . ""; ?>
<?php } else { ?>

<?php

 if ("O" == $this->hospitalisation) { $hospitalisation_look = "Oui";} 
 if ("N" == $this->hospitalisation) { $hospitalisation_look = "Non";} 
?>
<span id="id_read_on_hospitalisation"  class="css_hospitalisation_line" style="<?php echo $sStyleReadLab_hospitalisation; ?>"><?php echo $this->form_format_readonly("hospitalisation", $this->form_encode_input($hospitalisation_look)); ?></span><span id="id_read_off_hospitalisation" class="css_read_off_hospitalisation css_hospitalisation_line" style="<?php echo $sStyleReadInp_hospitalisation; ?>"><div id="idAjaxRadio_hospitalisation" style="display: inline-block"  class="css_hospitalisation_line">
<TABLE cellspacing=0 cellpadding=0 border=0><TR>
  <TD class="scFormDataFontOdd css_hospitalisation_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-hospitalisation" . $sc_seq_vert . "-1"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-hospitalisation sc-ui-radio-hospitalisation" type=radio name="hospitalisation" value="O"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_hospitalisation'][] = 'O'; ?>
<?php  if ("O" == $this->hospitalisation)  { echo " checked" ;} ?>  onClick="do_ajax_fiche_pro_sante_insert_mob_event_hospitalisation_onclick();" ><span></span>
<label for="<?php echo $tempOptionId ?>">Oui</label> </div>
</TD>
  <TD class="scFormDataFontOdd css_hospitalisation_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-hospitalisation" . $sc_seq_vert . "-2"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-hospitalisation sc-ui-radio-hospitalisation" type=radio name="hospitalisation" value="N"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_hospitalisation'][] = 'N'; ?>
<?php  if ("N" == $this->hospitalisation)  { echo " checked" ;} ?><?php  if (empty($this->hospitalisation)) { echo " checked" ;} ?>  onClick="do_ajax_fiche_pro_sante_insert_mob_event_hospitalisation_onclick();" ><span></span>
<label for="<?php echo $tempOptionId ?>">Non</label> </div>
</TD>
</TR></TABLE>
</div>
</span><?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_hospitalisation_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_hospitalisation_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['date_hospitalisation']))
    {
        $this->nm_new_label['date_hospitalisation'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_hospitalisation'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $date_hospitalisation = $this->date_hospitalisation;
   $sStyleHidden_date_hospitalisation = '';
   if (isset($this->nmgp_cmp_hidden['date_hospitalisation']) && $this->nmgp_cmp_hidden['date_hospitalisation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_hospitalisation']);
       $sStyleHidden_date_hospitalisation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_hospitalisation = 'display: none;';
   $sStyleReadInp_date_hospitalisation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['date_hospitalisation']) && $this->nmgp_cmp_readonly['date_hospitalisation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_hospitalisation']);
       $sStyleReadLab_date_hospitalisation = '';
       $sStyleReadInp_date_hospitalisation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_hospitalisation']) && $this->nmgp_cmp_hidden['date_hospitalisation'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_hospitalisation" value="<?php echo $this->form_encode_input($date_hospitalisation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_date_hospitalisation_line" id="hidden_field_data_date_hospitalisation" style="<?php echo $sStyleHidden_date_hospitalisation; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_date_hospitalisation_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_date_hospitalisation_label" style=""><span id="id_label_date_hospitalisation"><?php echo $this->nm_new_label['date_hospitalisation']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["date_hospitalisation"]) &&  $this->nmgp_cmp_readonly["date_hospitalisation"] == "on") { 

 ?>
<input type="hidden" name="date_hospitalisation" value="<?php echo $this->form_encode_input($date_hospitalisation) . "\">" . $date_hospitalisation . ""; ?>
<?php } else { ?>
<span id="id_read_on_date_hospitalisation" class="sc-ui-readonly-date_hospitalisation css_date_hospitalisation_line" style="<?php echo $sStyleReadLab_date_hospitalisation; ?>"><?php echo $this->form_format_readonly("date_hospitalisation", $this->form_encode_input($date_hospitalisation)); ?></span><span id="id_read_off_date_hospitalisation" class="css_read_off_date_hospitalisation<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_hospitalisation; ?>"><?php
$tmp_form_data = $this->field_config['date_hospitalisation']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
<?php
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('scButton_' == substr($miniCalendarButton[1], 0, 9)) {
    $miniCalendarButton[1] = substr($miniCalendarButton[1], 9);
}
?>
<span class='trigger-picker-<?php echo $miniCalendarButton[1]; ?>' style='display: inherit; width: 100%'>

 <input class="sc-js-input scFormObjectOdd css_date_hospitalisation_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_hospitalisation" type=text name="date_hospitalisation" value="<?php echo $this->form_encode_input($date_hospitalisation) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date_hospitalisation']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_hospitalisation']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_date_hospitalisation_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_hospitalisation_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 






<?php $sStyleHidden_date_hospitalisation_dumb = ('' == $sStyleHidden_date_hospitalisation) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_hospitalisation_dumb" style="<?php echo $sStyleHidden_date_hospitalisation_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_7"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_7"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_7" class="scFormTable<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['evacuation']))
    {
        $this->nm_new_label['evacuation'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_evacuation'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $evacuation = $this->evacuation;
   $sStyleHidden_evacuation = '';
   if (isset($this->nmgp_cmp_hidden['evacuation']) && $this->nmgp_cmp_hidden['evacuation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['evacuation']);
       $sStyleHidden_evacuation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_evacuation = 'display: none;';
   $sStyleReadInp_evacuation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['evacuation']) && $this->nmgp_cmp_readonly['evacuation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['evacuation']);
       $sStyleReadLab_evacuation = '';
       $sStyleReadInp_evacuation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['evacuation']) && $this->nmgp_cmp_hidden['evacuation'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="evacuation" value="<?php echo $this->form_encode_input($evacuation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_evacuation_line" id="hidden_field_data_evacuation" style="<?php echo $sStyleHidden_evacuation; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_evacuation_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_evacuation_label" style=""><span id="id_label_evacuation"><?php echo $this->nm_new_label['evacuation']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["evacuation"]) &&  $this->nmgp_cmp_readonly["evacuation"] == "on") { 

 if ("O" == $this->evacuation) { $evacuation_look = "Oui";} 
 if ("N" == $this->evacuation) { $evacuation_look = "Non";} 
?>
<input type="hidden" name="evacuation" value="<?php echo $this->form_encode_input($evacuation) . "\">" . $evacuation_look . ""; ?>
<?php } else { ?>

<?php

 if ("O" == $this->evacuation) { $evacuation_look = "Oui";} 
 if ("N" == $this->evacuation) { $evacuation_look = "Non";} 
?>
<span id="id_read_on_evacuation"  class="css_evacuation_line" style="<?php echo $sStyleReadLab_evacuation; ?>"><?php echo $this->form_format_readonly("evacuation", $this->form_encode_input($evacuation_look)); ?></span><span id="id_read_off_evacuation" class="css_read_off_evacuation css_evacuation_line" style="<?php echo $sStyleReadInp_evacuation; ?>"><div id="idAjaxRadio_evacuation" style="display: inline-block"  class="css_evacuation_line">
<TABLE cellspacing=0 cellpadding=0 border=0><TR>
  <TD class="scFormDataFontOdd css_evacuation_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-evacuation" . $sc_seq_vert . "-1"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-evacuation sc-ui-radio-evacuation" type=radio name="evacuation" value="O"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evacuation'][] = 'O'; ?>
<?php  if ("O" == $this->evacuation)  { echo " checked" ;} ?>  onClick="do_ajax_fiche_pro_sante_insert_mob_event_evacuation_onclick();" ><span></span>
<label for="<?php echo $tempOptionId ?>">Oui</label> </div>
</TD>
  <TD class="scFormDataFontOdd css_evacuation_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-evacuation" . $sc_seq_vert . "-2"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-evacuation sc-ui-radio-evacuation" type=radio name="evacuation" value="N"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evacuation'][] = 'N'; ?>
<?php  if ("N" == $this->evacuation)  { echo " checked" ;} ?><?php  if (empty($this->evacuation)) { echo " checked" ;} ?>  onClick="do_ajax_fiche_pro_sante_insert_mob_event_evacuation_onclick();" ><span></span>
<label for="<?php echo $tempOptionId ?>">Non</label> </div>
</TD>
</TR></TABLE>
</div>
</span><?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_evacuation_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_evacuation_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['date_evacuation']))
    {
        $this->nm_new_label['date_evacuation'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_evacuation'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $date_evacuation = $this->date_evacuation;
   $sStyleHidden_date_evacuation = '';
   if (isset($this->nmgp_cmp_hidden['date_evacuation']) && $this->nmgp_cmp_hidden['date_evacuation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_evacuation']);
       $sStyleHidden_date_evacuation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_evacuation = 'display: none;';
   $sStyleReadInp_date_evacuation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['date_evacuation']) && $this->nmgp_cmp_readonly['date_evacuation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_evacuation']);
       $sStyleReadLab_date_evacuation = '';
       $sStyleReadInp_date_evacuation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_evacuation']) && $this->nmgp_cmp_hidden['date_evacuation'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_evacuation" value="<?php echo $this->form_encode_input($date_evacuation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_date_evacuation_line" id="hidden_field_data_date_evacuation" style="<?php echo $sStyleHidden_date_evacuation; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_date_evacuation_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_date_evacuation_label" style=""><span id="id_label_date_evacuation"><?php echo $this->nm_new_label['date_evacuation']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["date_evacuation"]) &&  $this->nmgp_cmp_readonly["date_evacuation"] == "on") { 

 ?>
<input type="hidden" name="date_evacuation" value="<?php echo $this->form_encode_input($date_evacuation) . "\">" . $date_evacuation . ""; ?>
<?php } else { ?>
<span id="id_read_on_date_evacuation" class="sc-ui-readonly-date_evacuation css_date_evacuation_line" style="<?php echo $sStyleReadLab_date_evacuation; ?>"><?php echo $this->form_format_readonly("date_evacuation", $this->form_encode_input($date_evacuation)); ?></span><span id="id_read_off_date_evacuation" class="css_read_off_date_evacuation<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_evacuation; ?>"><?php
$tmp_form_data = $this->field_config['date_evacuation']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
<?php
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('scButton_' == substr($miniCalendarButton[1], 0, 9)) {
    $miniCalendarButton[1] = substr($miniCalendarButton[1], 9);
}
?>
<span class='trigger-picker-<?php echo $miniCalendarButton[1]; ?>' style='display: inherit; width: 100%'>

 <input class="sc-js-input scFormObjectOdd css_date_evacuation_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_evacuation" type=text name="date_evacuation" value="<?php echo $this->form_encode_input($date_evacuation) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date_evacuation']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_evacuation']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_date_evacuation_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_evacuation_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['structure_evacuation']))
   {
       $this->nm_new_label['structure_evacuation'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_structure_evacuation'] . "";
   }
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $structure_evacuation = $this->structure_evacuation;
   $sStyleHidden_structure_evacuation = '';
   if (isset($this->nmgp_cmp_hidden['structure_evacuation']) && $this->nmgp_cmp_hidden['structure_evacuation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['structure_evacuation']);
       $sStyleHidden_structure_evacuation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_structure_evacuation = 'display: none;';
   $sStyleReadInp_structure_evacuation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['structure_evacuation']) && $this->nmgp_cmp_readonly['structure_evacuation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['structure_evacuation']);
       $sStyleReadLab_structure_evacuation = '';
       $sStyleReadInp_structure_evacuation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['structure_evacuation']) && $this->nmgp_cmp_hidden['structure_evacuation'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="structure_evacuation" value="<?php echo $this->form_encode_input($this->structure_evacuation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_structure_evacuation_line" id="hidden_field_data_structure_evacuation" style="<?php echo $sStyleHidden_structure_evacuation; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_structure_evacuation_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_structure_evacuation_label" style=""><span id="id_label_structure_evacuation"><?php echo $this->nm_new_label['structure_evacuation']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["structure_evacuation"]) &&  $this->nmgp_cmp_readonly["structure_evacuation"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation'] = array(); 
    }

   $old_value_date_declaration = $this->date_declaration;
   $old_value_date_declaration_hora = $this->date_declaration_hora;
   $old_value_age_malade = $this->age_malade;
   $old_value_tel_malade = $this->tel_malade;
   $old_value_date_apparition_symptomes = $this->date_apparition_symptomes;
   $old_value_date_hospitalisation = $this->date_hospitalisation;
   $old_value_date_evacuation = $this->date_evacuation;
   $old_value_date_sortie = $this->date_sortie;
   $old_value_date_deces = $this->date_deces;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_date_declaration = $this->date_declaration;
   $unformatted_value_date_declaration_hora = $this->date_declaration_hora;
   $unformatted_value_age_malade = $this->age_malade;
   $unformatted_value_tel_malade = $this->tel_malade;
   $unformatted_value_date_apparition_symptomes = $this->date_apparition_symptomes;
   $unformatted_value_date_hospitalisation = $this->date_hospitalisation;
   $unformatted_value_date_evacuation = $this->date_evacuation;
   $unformatted_value_date_sortie = $this->date_sortie;
   $unformatted_value_date_deces = $this->date_deces;

   $nm_comando = "SELECT 	s.code_structure, 	concat ( 		w.nom_wilaya, 		' - ', 		nom_structure 	) FROM 	\"public\".structures_sante s JOIN wilaya w on s.wilaya_structure = w.code_wilaya  WHERE    s.type_structure in ('CHU', 'EPH', 'EHS', 'EH', 'EHU')   ORDER BY 	w.code_wilaya, 	s.nom_structure";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $this->tel_malade = $old_value_tel_malade;
   $this->date_apparition_symptomes = $old_value_date_apparition_symptomes;
   $this->date_hospitalisation = $old_value_date_hospitalisation;
   $this->date_evacuation = $old_value_date_evacuation;
   $this->date_sortie = $old_value_date_sortie;
   $this->date_deces = $old_value_date_deces;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $structure_evacuation_look = ""; 
   $todox = str_replace("?#?@?#?", "?#?@ ?#?", trim($nmgp_def_dados)) ; 
   $todo  = explode("?@?", $todox) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->structure_evacuation_1))
          {
              foreach ($this->structure_evacuation_1 as $tmp_structure_evacuation)
              {
                  if (trim($tmp_structure_evacuation) === trim($cadaselect[1])) {$structure_evacuation_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->structure_evacuation) && trim($this->structure_evacuation) === trim($cadaselect[1])) {$structure_evacuation_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="structure_evacuation" value="<?php echo $this->form_encode_input($structure_evacuation) . "\">" . $structure_evacuation_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_structure_evacuation();
   $x = 0 ; 
   $structure_evacuation_look = ""; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->structure_evacuation_1))
          {
              foreach ($this->structure_evacuation_1 as $tmp_structure_evacuation)
              {
                  if (trim($tmp_structure_evacuation) === trim($cadaselect[1])) {$structure_evacuation_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->structure_evacuation) && trim($this->structure_evacuation) === trim($cadaselect[1])) { $structure_evacuation_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($structure_evacuation_look))
          {
              $structure_evacuation_look = $this->structure_evacuation;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_structure_evacuation\" class=\"css_structure_evacuation_line\" style=\"" .  $sStyleReadLab_structure_evacuation . "\">" . $this->form_format_readonly("structure_evacuation", $this->form_encode_input($structure_evacuation_look)) . "</span><span id=\"id_read_off_structure_evacuation\" class=\"css_read_off_structure_evacuation" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_structure_evacuation . "\">";
   echo " <span id=\"idAjaxSelect_structure_evacuation\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_structure_evacuation_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_structure_evacuation\" name=\"structure_evacuation\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_structure_evacuation'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;"," ") . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->structure_evacuation) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->structure_evacuation)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">" . str_replace('<', '&lt;',$cadaselect[0]) . "</option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_structure_evacuation_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_structure_evacuation_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 






<?php $sStyleHidden_structure_evacuation_dumb = ('' == $sStyleHidden_structure_evacuation) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_structure_evacuation_dumb" style="<?php echo $sStyleHidden_structure_evacuation_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_8"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_8"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_8" class="scFormTable<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['evolution_nm_fk']))
    {
        $this->nm_new_label['evolution_nm_fk'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_evolution_nm_fk'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $evolution_nm_fk = $this->evolution_nm_fk;
   $sStyleHidden_evolution_nm_fk = '';
   if (isset($this->nmgp_cmp_hidden['evolution_nm_fk']) && $this->nmgp_cmp_hidden['evolution_nm_fk'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['evolution_nm_fk']);
       $sStyleHidden_evolution_nm_fk = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_evolution_nm_fk = 'display: none;';
   $sStyleReadInp_evolution_nm_fk = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['evolution_nm_fk']) && $this->nmgp_cmp_readonly['evolution_nm_fk'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['evolution_nm_fk']);
       $sStyleReadLab_evolution_nm_fk = '';
       $sStyleReadInp_evolution_nm_fk = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['evolution_nm_fk']) && $this->nmgp_cmp_hidden['evolution_nm_fk'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="evolution_nm_fk" value="<?php echo $this->form_encode_input($evolution_nm_fk) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_evolution_nm_fk_line" id="hidden_field_data_evolution_nm_fk" style="<?php echo $sStyleHidden_evolution_nm_fk; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_evolution_nm_fk_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_evolution_nm_fk_label" style=""><span id="id_label_evolution_nm_fk"><?php echo $this->nm_new_label['evolution_nm_fk']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['php_cmp_required']['evolution_nm_fk']) || $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['php_cmp_required']['evolution_nm_fk'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["evolution_nm_fk"]) &&  $this->nmgp_cmp_readonly["evolution_nm_fk"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk'] = array(); 
    }

   $old_value_date_declaration = $this->date_declaration;
   $old_value_date_declaration_hora = $this->date_declaration_hora;
   $old_value_age_malade = $this->age_malade;
   $old_value_tel_malade = $this->tel_malade;
   $old_value_date_apparition_symptomes = $this->date_apparition_symptomes;
   $old_value_date_hospitalisation = $this->date_hospitalisation;
   $old_value_date_evacuation = $this->date_evacuation;
   $old_value_date_sortie = $this->date_sortie;
   $old_value_date_deces = $this->date_deces;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_date_declaration = $this->date_declaration;
   $unformatted_value_date_declaration_hora = $this->date_declaration_hora;
   $unformatted_value_age_malade = $this->age_malade;
   $unformatted_value_tel_malade = $this->tel_malade;
   $unformatted_value_date_apparition_symptomes = $this->date_apparition_symptomes;
   $unformatted_value_date_hospitalisation = $this->date_hospitalisation;
   $unformatted_value_date_evacuation = $this->date_evacuation;
   $unformatted_value_date_sortie = $this->date_sortie;
   $unformatted_value_date_deces = $this->date_deces;

   $nm_comando = "SELECT nomenclature_item_code, nomenclature_item  FROM \"public\".ref_nomenclature_items  WHERE nomenclature_fk = 'EVOLPATIENT' ORDER BY nomenclature_item_order";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $this->tel_malade = $old_value_tel_malade;
   $this->date_apparition_symptomes = $old_value_date_apparition_symptomes;
   $this->date_hospitalisation = $old_value_date_hospitalisation;
   $this->date_evacuation = $old_value_date_evacuation;
   $this->date_sortie = $old_value_date_sortie;
   $this->date_deces = $old_value_date_deces;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_evolution_nm_fk'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $evolution_nm_fk_look = ""; 
   $todox = str_replace("?#?@?#?", "?#?@ ?#?", trim($nmgp_def_dados)) ; 
   $todo  = explode("?@?", $todox) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->evolution_nm_fk_1))
          {
              foreach ($this->evolution_nm_fk_1 as $tmp_evolution_nm_fk)
              {
                  if (trim($tmp_evolution_nm_fk) === trim($cadaselect[1])) {$evolution_nm_fk_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->evolution_nm_fk) && trim($this->evolution_nm_fk) === trim($cadaselect[1])) {$evolution_nm_fk_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="evolution_nm_fk" value="<?php echo $this->form_encode_input($evolution_nm_fk) . "\">" . $evolution_nm_fk_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_evolution_nm_fk();
   $x = 0 ; 
   $evolution_nm_fk_look = ""; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->evolution_nm_fk_1))
          {
              foreach ($this->evolution_nm_fk_1 as $tmp_evolution_nm_fk)
              {
                  if (trim($tmp_evolution_nm_fk) === trim($cadaselect[1])) {$evolution_nm_fk_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->evolution_nm_fk) && trim($this->evolution_nm_fk) === trim($cadaselect[1])) {$evolution_nm_fk_look .= $cadaselect[0];} 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_evolution_nm_fk\" class=\"css_evolution_nm_fk_line\" style=\"" .  $sStyleReadLab_evolution_nm_fk . "\">" . $this->form_format_readonly("evolution_nm_fk", $this->form_encode_input($evolution_nm_fk_look)) . "</span><span id=\"id_read_off_evolution_nm_fk\" class=\"css_read_off_evolution_nm_fk css_evolution_nm_fk_line\" style=\"" . $sStyleReadInp_evolution_nm_fk . "\">";
   echo "<div id=\"idAjaxRadio_evolution_nm_fk\" class=\"css_evolution_nm_fk_line\" style=\"display: inline-block\">\r\n";
   $y = 0 ; 
   echo "<table cellspacing=0 cellpadding=0 border=0>\r\n";
   echo " <tr>\r\n";
   while (!empty($todo[$x])) 
   {
          $cadaradio = explode("?#?", $todo[$x]) ; 
          if ($cadaradio[1] == "@ ") {$cadaradio[1]= trim($cadaradio[1]); } ; 
          if ($y == 1)
          {
              echo " </tr>\r\n";
              echo " <tr>\r\n";
              $y = 0;
          }
          echo "  <td class=\"scFormDataFontOdd css_evolution_nm_fk_line\">\r\n";
          echo "      <div class=\"sc radio\">";
          $tempOptionId = "id-opt-evolution_nm_fk-" . $x;
          echo "    <input id=\"" . $tempOptionId . "\" type=radio name=\"evolution_nm_fk\" value=\"$cadaradio[1]\" class=\"sc-ui-radio-evolution_nm_fk sc-ui-radio-evolution_nm_fk\"";
          if (trim($this->evolution_nm_fk) === trim($cadaradio[1])) 
          { 
              echo " checked" ; 
          } 
          if (strtoupper($cadaradio[2]) == "S") 
          { 
              if (empty($this->evolution_nm_fk)) 
              { 
                  echo " checked" ; 
              } 
          } 
          echo "  onClick=\"" . $sCheckInsert . "do_ajax_fiche_pro_sante_insert_mob_event_evolution_nm_fk_onclick();\" >" ; 
          echo "<span></span>";
          echo "<label for=\"" . $tempOptionId . "\">" . $cadaradio[0] . "</label>";
          echo "      </div>";
          $x++ ; 
          $y++ ; 
          echo "  </font></td>\r\n";
   } 
   echo " </tr>\r\n";
   echo "</table>";
   echo "</div>\r\n";
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_evolution_nm_fk_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_evolution_nm_fk_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['date_sortie']))
    {
        $this->nm_new_label['date_sortie'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_sortie'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $date_sortie = $this->date_sortie;
   $sStyleHidden_date_sortie = '';
   if (isset($this->nmgp_cmp_hidden['date_sortie']) && $this->nmgp_cmp_hidden['date_sortie'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_sortie']);
       $sStyleHidden_date_sortie = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_sortie = 'display: none;';
   $sStyleReadInp_date_sortie = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['date_sortie']) && $this->nmgp_cmp_readonly['date_sortie'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_sortie']);
       $sStyleReadLab_date_sortie = '';
       $sStyleReadInp_date_sortie = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_sortie']) && $this->nmgp_cmp_hidden['date_sortie'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_sortie" value="<?php echo $this->form_encode_input($date_sortie) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_date_sortie_line" id="hidden_field_data_date_sortie" style="<?php echo $sStyleHidden_date_sortie; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_date_sortie_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_date_sortie_label" style=""><span id="id_label_date_sortie"><?php echo $this->nm_new_label['date_sortie']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["date_sortie"]) &&  $this->nmgp_cmp_readonly["date_sortie"] == "on") { 

 ?>
<input type="hidden" name="date_sortie" value="<?php echo $this->form_encode_input($date_sortie) . "\">" . $date_sortie . ""; ?>
<?php } else { ?>
<span id="id_read_on_date_sortie" class="sc-ui-readonly-date_sortie css_date_sortie_line" style="<?php echo $sStyleReadLab_date_sortie; ?>"><?php echo $this->form_format_readonly("date_sortie", $this->form_encode_input($date_sortie)); ?></span><span id="id_read_off_date_sortie" class="css_read_off_date_sortie<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_sortie; ?>"><?php
$tmp_form_data = $this->field_config['date_sortie']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
<?php
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('scButton_' == substr($miniCalendarButton[1], 0, 9)) {
    $miniCalendarButton[1] = substr($miniCalendarButton[1], 9);
}
?>
<span class='trigger-picker-<?php echo $miniCalendarButton[1]; ?>' style='display: inherit; width: 100%'>

 <input class="sc-js-input scFormObjectOdd css_date_sortie_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_sortie" type=text name="date_sortie" value="<?php echo $this->form_encode_input($date_sortie) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date_sortie']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_sortie']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_date_sortie_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_sortie_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['date_deces']))
    {
        $this->nm_new_label['date_deces'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_deces'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $date_deces = $this->date_deces;
   $sStyleHidden_date_deces = '';
   if (isset($this->nmgp_cmp_hidden['date_deces']) && $this->nmgp_cmp_hidden['date_deces'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_deces']);
       $sStyleHidden_date_deces = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_deces = 'display: none;';
   $sStyleReadInp_date_deces = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['date_deces']) && $this->nmgp_cmp_readonly['date_deces'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_deces']);
       $sStyleReadLab_date_deces = '';
       $sStyleReadInp_date_deces = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_deces']) && $this->nmgp_cmp_hidden['date_deces'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_deces" value="<?php echo $this->form_encode_input($date_deces) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_date_deces_line" id="hidden_field_data_date_deces" style="<?php echo $sStyleHidden_date_deces; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_date_deces_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_date_deces_label" style=""><span id="id_label_date_deces"><?php echo $this->nm_new_label['date_deces']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["date_deces"]) &&  $this->nmgp_cmp_readonly["date_deces"] == "on") { 

 ?>
<input type="hidden" name="date_deces" value="<?php echo $this->form_encode_input($date_deces) . "\">" . $date_deces . ""; ?>
<?php } else { ?>
<span id="id_read_on_date_deces" class="sc-ui-readonly-date_deces css_date_deces_line" style="<?php echo $sStyleReadLab_date_deces; ?>"><?php echo $this->form_format_readonly("date_deces", $this->form_encode_input($date_deces)); ?></span><span id="id_read_off_date_deces" class="css_read_off_date_deces<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_deces; ?>"><?php
$tmp_form_data = $this->field_config['date_deces']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
<?php
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('scButton_' == substr($miniCalendarButton[1], 0, 9)) {
    $miniCalendarButton[1] = substr($miniCalendarButton[1], 9);
}
?>
<span class='trigger-picker-<?php echo $miniCalendarButton[1]; ?>' style='display: inherit; width: 100%'>

 <input class="sc-js-input scFormObjectOdd css_date_deces_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_deces" type=text name="date_deces" value="<?php echo $this->form_encode_input($date_deces) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date_deces']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_deces']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_date_deces_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_deces_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['autre_evolution']))
    {
        $this->nm_new_label['autre_evolution'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_autre_evolution'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $autre_evolution = $this->autre_evolution;
   $sStyleHidden_autre_evolution = '';
   if (isset($this->nmgp_cmp_hidden['autre_evolution']) && $this->nmgp_cmp_hidden['autre_evolution'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['autre_evolution']);
       $sStyleHidden_autre_evolution = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_autre_evolution = 'display: none;';
   $sStyleReadInp_autre_evolution = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['autre_evolution']) && $this->nmgp_cmp_readonly['autre_evolution'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['autre_evolution']);
       $sStyleReadLab_autre_evolution = '';
       $sStyleReadInp_autre_evolution = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['autre_evolution']) && $this->nmgp_cmp_hidden['autre_evolution'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="autre_evolution" value="<?php echo $this->form_encode_input($autre_evolution) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_autre_evolution_line" id="hidden_field_data_autre_evolution" style="<?php echo $sStyleHidden_autre_evolution; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_autre_evolution_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_autre_evolution_label" style=""><span id="id_label_autre_evolution"><?php echo $this->nm_new_label['autre_evolution']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["autre_evolution"]) &&  $this->nmgp_cmp_readonly["autre_evolution"] == "on") { 

 ?>
<input type="hidden" name="autre_evolution" value="<?php echo $this->form_encode_input($autre_evolution) . "\">" . $autre_evolution . ""; ?>
<?php } else { ?>
<span id="id_read_on_autre_evolution" class="sc-ui-readonly-autre_evolution css_autre_evolution_line" style="<?php echo $sStyleReadLab_autre_evolution; ?>"><?php echo $this->form_format_readonly("autre_evolution", $this->form_encode_input($this->autre_evolution)); ?></span><span id="id_read_off_autre_evolution" class="css_read_off_autre_evolution<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_autre_evolution; ?>">
 <input class="sc-js-input scFormObjectOdd css_autre_evolution_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_autre_evolution" type=text name="autre_evolution" value="<?php echo $this->form_encode_input($autre_evolution) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=80 alt="{datatype: 'text', maxLength: 80, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_autre_evolution_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_autre_evolution_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 






<?php $sStyleHidden_autre_evolution_dumb = ('' == $sStyleHidden_autre_evolution) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_autre_evolution_dumb" style="<?php echo $sStyleHidden_autre_evolution_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_9"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_9"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_9" class="scFormTable<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['labo_destination']))
   {
       $this->nm_new_label['labo_destination'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_labo_destination'] . "";
   }
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $labo_destination = $this->labo_destination;
   $sStyleHidden_labo_destination = '';
   if (isset($this->nmgp_cmp_hidden['labo_destination']) && $this->nmgp_cmp_hidden['labo_destination'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['labo_destination']);
       $sStyleHidden_labo_destination = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_labo_destination = 'display: none;';
   $sStyleReadInp_labo_destination = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['labo_destination']) && $this->nmgp_cmp_readonly['labo_destination'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['labo_destination']);
       $sStyleReadLab_labo_destination = '';
       $sStyleReadInp_labo_destination = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['labo_destination']) && $this->nmgp_cmp_hidden['labo_destination'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="labo_destination" value="<?php echo $this->form_encode_input($this->labo_destination) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_labo_destination_line" id="hidden_field_data_labo_destination" style="<?php echo $sStyleHidden_labo_destination; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_labo_destination_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_labo_destination_label" style=""><span id="id_label_labo_destination"><?php echo $this->nm_new_label['labo_destination']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['php_cmp_required']['labo_destination']) || $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['php_cmp_required']['labo_destination'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["labo_destination"]) &&  $this->nmgp_cmp_readonly["labo_destination"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination'] = array(); 
    }

   $old_value_date_declaration = $this->date_declaration;
   $old_value_date_declaration_hora = $this->date_declaration_hora;
   $old_value_age_malade = $this->age_malade;
   $old_value_tel_malade = $this->tel_malade;
   $old_value_date_apparition_symptomes = $this->date_apparition_symptomes;
   $old_value_date_hospitalisation = $this->date_hospitalisation;
   $old_value_date_evacuation = $this->date_evacuation;
   $old_value_date_sortie = $this->date_sortie;
   $old_value_date_deces = $this->date_deces;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_date_declaration = $this->date_declaration;
   $unformatted_value_date_declaration_hora = $this->date_declaration_hora;
   $unformatted_value_age_malade = $this->age_malade;
   $unformatted_value_tel_malade = $this->tel_malade;
   $unformatted_value_date_apparition_symptomes = $this->date_apparition_symptomes;
   $unformatted_value_date_hospitalisation = $this->date_hospitalisation;
   $unformatted_value_date_evacuation = $this->date_evacuation;
   $unformatted_value_date_sortie = $this->date_sortie;
   $unformatted_value_date_deces = $this->date_deces;

   $nm_comando = "SELECT code_structure, nom_structure  FROM \"public\".structures_sante  WHERE role_labo = 'O' ORDER BY wilaya_structure, nom_structure";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $this->tel_malade = $old_value_tel_malade;
   $this->date_apparition_symptomes = $old_value_date_apparition_symptomes;
   $this->date_hospitalisation = $old_value_date_hospitalisation;
   $this->date_evacuation = $old_value_date_evacuation;
   $this->date_sortie = $old_value_date_sortie;
   $this->date_deces = $old_value_date_deces;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $labo_destination_look = ""; 
   $todox = str_replace("?#?@?#?", "?#?@ ?#?", trim($nmgp_def_dados)) ; 
   $todo  = explode("?@?", $todox) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->labo_destination_1))
          {
              foreach ($this->labo_destination_1 as $tmp_labo_destination)
              {
                  if (trim($tmp_labo_destination) === trim($cadaselect[1])) {$labo_destination_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->labo_destination) && trim($this->labo_destination) === trim($cadaselect[1])) {$labo_destination_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="labo_destination" value="<?php echo $this->form_encode_input($labo_destination) . "\">" . $labo_destination_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_labo_destination();
   $x = 0 ; 
   $labo_destination_look = ""; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->labo_destination_1))
          {
              foreach ($this->labo_destination_1 as $tmp_labo_destination)
              {
                  if (trim($tmp_labo_destination) === trim($cadaselect[1])) {$labo_destination_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->labo_destination) && trim($this->labo_destination) === trim($cadaselect[1])) { $labo_destination_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($labo_destination_look))
          {
              $labo_destination_look = $this->labo_destination;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_labo_destination\" class=\"css_labo_destination_line\" style=\"" .  $sStyleReadLab_labo_destination . "\">" . $this->form_format_readonly("labo_destination", $this->form_encode_input($labo_destination_look)) . "</span><span id=\"id_read_off_labo_destination\" class=\"css_read_off_labo_destination" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_labo_destination . "\">";
   echo " <span id=\"idAjaxSelect_labo_destination\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_labo_destination_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_labo_destination\" name=\"labo_destination\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['Lookup_labo_destination'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;"," ") . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->labo_destination) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->labo_destination)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">" . str_replace('<', '&lt;',$cadaselect[0]) . "</option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_labo_destination_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_labo_destination_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['commentaires']))
    {
        $this->nm_new_label['commentaires'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_commentaires'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $commentaires = $this->commentaires;
   $sStyleHidden_commentaires = '';
   if (isset($this->nmgp_cmp_hidden['commentaires']) && $this->nmgp_cmp_hidden['commentaires'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['commentaires']);
       $sStyleHidden_commentaires = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_commentaires = 'display: none;';
   $sStyleReadInp_commentaires = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['commentaires']) && $this->nmgp_cmp_readonly['commentaires'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['commentaires']);
       $sStyleReadLab_commentaires = '';
       $sStyleReadInp_commentaires = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['commentaires']) && $this->nmgp_cmp_hidden['commentaires'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="commentaires" value="<?php echo $this->form_encode_input($commentaires) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_commentaires_line" id="hidden_field_data_commentaires" style="<?php echo $sStyleHidden_commentaires; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_commentaires_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_commentaires_label" style=""><span id="id_label_commentaires"><?php echo $this->nm_new_label['commentaires']; ?></span></span><br>
<?php
$commentaires_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($commentaires));

?>

<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["commentaires"]) &&  $this->nmgp_cmp_readonly["commentaires"] == "on") { 

 ?>
<input type="hidden" name="commentaires" value="<?php echo $this->form_encode_input($commentaires) . "\">" . $commentaires_val . ""; ?>
<?php } else { ?>
<span id="id_read_on_commentaires" class="sc-ui-readonly-commentaires css_commentaires_line" style="<?php echo $sStyleReadLab_commentaires; ?>"><?php echo $this->form_format_readonly("commentaires", $this->form_encode_input($commentaires_val)); ?></span><span id="id_read_off_commentaires" class="css_read_off_commentaires<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_commentaires; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_commentaires_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="commentaires" id="id_sc_field_commentaires" rows="3" cols="50"
 alt="{datatype: 'text', maxLength: 32767, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $commentaires; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_commentaires_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_commentaires_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['attached_file']))
    {
        $this->nm_new_label['attached_file'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_attached_file'] . "";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $attached_file = $this->attached_file;
   $sStyleHidden_attached_file = '';
   if (isset($this->nmgp_cmp_hidden['attached_file']) && $this->nmgp_cmp_hidden['attached_file'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['attached_file']);
       $sStyleHidden_attached_file = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_attached_file = 'display: none;';
   $sStyleReadInp_attached_file = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['attached_file']) && $this->nmgp_cmp_readonly['attached_file'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['attached_file']);
       $sStyleReadLab_attached_file = '';
       $sStyleReadInp_attached_file = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['attached_file']) && $this->nmgp_cmp_hidden['attached_file'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="attached_file" value="<?php echo $this->form_encode_input($attached_file) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_attached_file_line" id="hidden_field_data_attached_file" style="<?php echo $sStyleHidden_attached_file; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_attached_file_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_attached_file_label" style=""><span id="id_label_attached_file"><?php echo $this->nm_new_label['attached_file']; ?></span></span><br>
 <?php $this->NM_ajax_info['varList'][] = array("var_ajax_img_attached_file" => $out1_attached_file); ?><script>var var_ajax_img_attached_file = '<?php echo $out1_attached_file; ?>';</script><?php if (!empty($out_attached_file)){ echo "<a  href=\"javascript:nm_mostra_img(var_ajax_img_attached_file, '" . $this->nmgp_return_img['attached_file'][0] . "', '" . $this->nmgp_return_img['attached_file'][1] . "')\"><img id=\"id_ajax_img_attached_file\" border=\"1\" src=\"$out_attached_file\"></a> &nbsp;" . "<span id=\"txt_ajax_img_attached_file\" style=\"display: none\">" . $this->form_format_readonly("attached_file", $attached_file) . "</span>"; if (!empty($attached_file)){ echo "<br>";} } else { echo "<img id=\"id_ajax_img_attached_file\" border=\"1\" style=\"display: none\"> &nbsp;<span id=\"txt_ajax_img_attached_file\"></span><br />"; } ?>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["attached_file"]) &&  $this->nmgp_cmp_readonly["attached_file"] == "on") { 

 ?>
<img id=\"attached_file_img_uploading\" style=\"display: none\" border=\"0\" src=\"" . $this->Ini->path_icones . "/scriptcase__NM__ajax_load.gif\" align=\"absmiddle\" /><input type="hidden" name="attached_file" value="<?php echo $this->form_encode_input($attached_file) . "\">" . $attached_file . ""; ?>
<?php } else { ?>
<span id="id_read_off_attached_file" class="css_read_off_attached_file<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_attached_file; ?>"><span style="display:inline-block"><span id="sc-id-upload-select-attached_file" class="fileinput-button fileinput-button-padding scButton_default">
 <span><?php echo $this->Ini->Nm_lang['lang_select_file'] ?></span>

 <input class="sc-js-input scFormObjectOdd css_attached_file_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" title="<?php echo $this->Ini->Nm_lang['lang_select_file'] ?>" type="file" name="attached_file[]" id="id_sc_field_attached_file" onchange="<?php if ($this->nmgp_opcao == "novo") {echo "if (document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]']) { document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]'].checked = true }"; }?>"></span></span>
<?php
   $sCheckInsert = "";
?>
<span id="chk_ajax_img_attached_file"<?php if ($this->nmgp_opcao == "novo" || empty($attached_file)) { echo " style=\"display: none\""; } ?>> <input type=checkbox name="attached_file_limpa" value="<?php echo $attached_file_limpa . '" '; if ($attached_file_limpa == "S"){echo "checked ";} ?> onclick="this.value = ''; if (this.checked){ this.value = 'S'};<?php echo $sCheckInsert ?>"><?php echo $this->Ini->Nm_lang['lang_btns_dele_hint']; ?> &nbsp;</span><img id="attached_file_img_uploading" style="display: none" border="0" src="<?php echo $this->Ini->path_icones; ?>/scriptcase__NM__ajax_load.gif" align="absmiddle" /><div id="id_img_loader_attached_file" class="progress progress-success progress-striped active scProgressBarStart" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="display: none"><div class="bar scProgressBarLoading">&nbsp;</div></div><img id="id_ajax_loader_attached_file" src="<?php echo $this->Ini->path_icones ?>/scriptcase__NM__ajax_load.gif" style="display: none" /></span><?php } ?>
<span class="scFormDataTagOdd" style="display: block">(Formats acceptés: JPG, JPEG, PNG. Taille max: 1 Mo)</span></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_attached_file_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_attached_file_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 






   </tr>
</TABLE></div><!-- bloco_f -->
   </td></tr></table>
   </div>
</td></tr>
</td></tr>
<tr id="sc-id-required-row"><td class="scFormPageText">
<span class="scFormRequiredOddColor">* <?php echo $this->Ini->Nm_lang['lang_othr_reqr']; ?></span>
</td></tr> 
<tr><td>
<?php
$this->displayBottomToolbar();
?>
<?php
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar sc-toolbar-bottom" style="padding: 0px; spacing: 0px">
    <table style="border-collapse: collapse; border-width: 0px; width: 100%">
    <tr> 
     <td nowrap align="left" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
}
    $NM_btn = false;
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['run_iframe'] != "R")
{
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['first'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-15';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['first']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['first']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['first']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['first']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['first'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "binicio", "scBtnFn_sys_format_ini()", "scBtnFn_sys_format_ini()", "sc_b_ini_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + Shift + &#8592;)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['back'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-16';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['back']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['back']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['back']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['back']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['back'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bretorna", "scBtnFn_sys_format_ret()", "scBtnFn_sys_format_ret()", "sc_b_ret_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + &#8592;)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
        $sCondStyle = '';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-17';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['bstepretorna']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['bstepretorna']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['bstepretorna']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['bstepretorna']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['bstepretorna'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bstepretorna", "scBtnFn_sys_format_stepret()", "scBtnFn_sys_format_stepret()", "sc_b_stepret_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['forward'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-18';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['forward']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['forward']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['forward']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['forward']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['forward'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bavanca", "scBtnFn_sys_format_ava()", "scBtnFn_sys_format_ava()", "sc_b_avc_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + &#8594;)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
        $sCondStyle = '';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-19';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['bstepavanca']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['bstepavanca']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['bstepavanca']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['bstepavanca']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['bstepavanca'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bstepavanca", "scBtnFn_sys_format_stepava()", "scBtnFn_sys_format_stepava()", "sc_b_stepavc_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['last'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-20';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['last']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['last']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['last']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['last']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['last'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bfinal", "scBtnFn_sys_format_fim()", "scBtnFn_sys_format_fim()", "sc_b_fim_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + Shift + &#8594;)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['new'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-21';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['new']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['new']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['new']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['new']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['new'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bnovo", "scBtnFn_sys_format_inc()", "scBtnFn_sys_format_inc()", "sc_b_new_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + Enter)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!$this->Embutida_call || $this->sc_evento == "novo" || $this->sc_evento == "insert" || $this->sc_evento == "incluir")) {
        $sCondStyle = ($this->nmgp_botoes['insert'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-22';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['insert']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_disabled']['insert']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['insert']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['insert']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['btn_label']['insert'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bincluir", "scBtnFn_sys_format_inc()", "scBtnFn_sys_format_inc()", "sc_b_ins_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + Enter)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['run_iframe'] != "R")
{
?>
   </td></tr> 
   </table> 
   </td></tr></table> 
<?php
}
?>
<?php
if (!$NM_btn && isset($NM_ult_sep))
{
    echo "    <script language=\"javascript\">";
    echo "      document.getElementById('" .  $NM_ult_sep . "').style.display='none';";
    echo "    </script>";
}
unset($NM_ult_sep);
?>
<?php if ('novo' != $this->nmgp_opcao || $this->Embutida_form) { ?><script>nav_atualiza(Nav_permite_ret, Nav_permite_ava, 'b');</script><?php } ?>
</td></tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 

<div id="id_debug_window" style="display: none;" class='scDebugWindow'><table class="scFormMessageTable">
<tr><td class="scFormMessageTitle"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideDebug()", "scAjaxHideDebug()", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
&nbsp;&nbsp;Output</td></tr>
<tr><td class="scFormMessageMessage" style="padding: 0px; vertical-align: top"><div style="padding: 2px; height: 200px; width: 350px; overflow: auto" id="id_debug_text"></div></td></tr>
</table></div>

</form> 
<script type="text/javascript">
$(function() {
    if ('page' == wizardViewMode) {
        scJQWizardGoToPage(<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['form_wizard']['actual_step']; ?>);
        $(".sc-form-page").on("click", function() {
            var thisStepNo = $(this).attr("id").substr(16);
            scJQWizardPageClick(thisStepNo);
        });
    } else {
        scJQWizardGoToStep(<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['form_wizard']['actual_step']; ?>);
        $(".sc-ui-form-step").on("click", function() {
            var thisStepNo = $(this).attr("id").substr(16);
            scJQWizardStepClick(thisStepNo);
        });
    }
});
</script>
<?php
      $Tzone = ini_get('date.timezone');
      if (empty($Tzone))
      {
?>
<script> 
  _scAjaxShowMessage({title: '', message: "<?php echo $this->Ini->Nm_lang['lang_errm_tz']; ?>", isModal: false, timeout: 0, showButton: false, buttonLabel: "Ok", topPos: 0, leftPos: 0, width: 0, height: 0, redirUrl: "", redirTarget: "", redirParam: "", showClose: true, showBodyIcon: false, isToast: false, toastPos: ""});
</script> 
<?php
      }
?>
<script> 
<?php
  $nm_sc_blocos_da_pag = array(0,1,2,3,4,5,6,7,8,9);

  foreach ($this->Ini->nm_hidden_blocos as $bloco => $hidden)
  {
      if ($hidden == "off" && in_array($bloco, $nm_sc_blocos_da_pag))
      {
          echo "document.getElementById('hidden_bloco_" . $bloco . "').style.display = 'none';";
          if (isset($nm_sc_blocos_aba[$bloco]))
          {
               echo "document.getElementById('id_tabs_" . $nm_sc_blocos_aba[$bloco] . "_" . $bloco . "').style.display = 'none';";
          }
      }
  }
?>
</script> 
<script>
<?php
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['masterValue']))
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['under_dashboard']) {
?>
var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['parent_widget']; ?>']");
if (dbParentFrame && dbParentFrame[0] && dbParentFrame[0].contentWindow.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['masterValue'] as $cmp_master => $val_master)
        {
?>
    dbParentFrame[0].contentWindow.scAjaxDetailValue('<?php echo $cmp_master ?>', '<?php echo $val_master ?>');
<?php
        }
        unset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['masterValue']);
?>
}
<?php
    }
    else {
?>
if (parent && parent.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['masterValue'] as $cmp_master => $val_master)
        {
?>
    parent.scAjaxDetailValue('<?php echo $cmp_master ?>', '<?php echo $val_master ?>');
<?php
        }
        unset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['masterValue']);
?>
}
<?php
    }
}
?>
function updateHeaderFooter(sFldName, sFldValue)
{
  if (sFldValue[0] && sFldValue[0]["value"])
  {
    sFldValue = sFldValue[0]["value"];
  }
}
</script>
<?php
if (isset($_POST['master_nav']) && 'on' == $_POST['master_nav'])
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['under_dashboard']) {
?>
<script>
 var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['parent_widget']; ?>']");
 dbParentFrame[0].contentWindow.scAjaxDetailStatus("fiche_pro_sante_insert_mob");
</script>
<?php
    }
    else {
        $sTamanhoIframe = isset($_POST['sc_ifr_height']) && '' != $_POST['sc_ifr_height'] ? '"' . $_POST['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailStatus("fiche_pro_sante_insert_mob");
 parent.scAjaxDetailHeight("fiche_pro_sante_insert_mob", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
    }
}
elseif (isset($_GET['script_case_detail']) && 'Y' == $_GET['script_case_detail'])
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['dashboard_info']['under_dashboard']) {
    }
    else {
    $sTamanhoIframe = isset($_GET['sc_ifr_height']) && '' != $_GET['sc_ifr_height'] ? '"' . $_GET['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 if (0 == <?php echo $sTamanhoIframe; ?>) {
  setTimeout(function() {
   parent.scAjaxDetailHeight("fiche_pro_sante_insert_mob", <?php echo $sTamanhoIframe; ?>);
  }, 100);
 }
 else {
  parent.scAjaxDetailHeight("fiche_pro_sante_insert_mob", <?php echo $sTamanhoIframe; ?>);
 }
</script>
<?php
    }
}
?>
<?php
if (isset($this->NM_ajax_info['displayMsg']) && $this->NM_ajax_info['displayMsg'])
{
    $isToast   = isset($this->NM_ajax_info['displayMsgToast']) && $this->NM_ajax_info['displayMsgToast'] ? 'true' : 'false';
    $toastType = $isToast && isset($this->NM_ajax_info['displayMsgToastType']) ? $this->NM_ajax_info['displayMsgToastType'] : '';
?>
<script type="text/javascript">
_scAjaxShowMessage({title: scMsgDefTitle, message: "<?php echo $this->NM_ajax_info['displayMsgTxt']; ?>", isModal: false, timeout: sc_ajaxMsgTime, showButton: false, buttonLabel: "Ok", topPos: 0, leftPos: 0, width: 0, height: 0, redirUrl: "", redirTarget: "", redirParam: "", showClose: false, showBodyIcon: true, isToast: <?php echo $isToast ?>, toastPos: "", type: "<?php echo $toastType ?>"});
</script>
<?php
}
?>
<?php
if (isset($this->scFormFocusErrorName) && '' != $this->scFormFocusErrorName)
{
?>
<script>
scAjaxFocusError();
</script>
<?php
}
?>
<script type='text/javascript'>
bLigEditLookupCall = <?php if ($this->lig_edit_lookup_call) { ?>true<?php } else { ?>false<?php } ?>;
function scLigEditLookupCall()
{
<?php
if ($this->lig_edit_lookup && isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['sc_modal'])
{
?>
  parent.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
elseif ($this->lig_edit_lookup)
{
?>
  opener.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
?>
}
if (bLigEditLookupCall)
{
  scLigEditLookupCall();
}
<?php
if (isset($this->redir_modal) && !empty($this->redir_modal))
{
    echo $this->redir_modal;
}
?>
</script>
<?php
if ($this->nmgp_form_empty) {
?>
<script type="text/javascript">
scAjax_displayEmptyForm();
</script>
<?php
}
?>
<script type="text/javascript">
	function scBtnFn_search_nin() {
		if ($("#sc_search_nin_top").length && $("#sc_search_nin_top").is(":visible")) {
		    if ($("#sc_search_nin_top").hasClass("disabled")) {
		        return;
		    }
			sc_btn_search_nin()
			toggleToolbar(event, true); return;
		}
		if ($("#sc_search_nin_top").length && $("#sc_search_nin_top").is(":visible")) {
		    if ($("#sc_search_nin_top").hasClass("disabled")) {
		        return;
		    }
			sc_btn_search_nin()
			toggleToolbar(event, true); return;
		}
		if ($("#sc_search_nin_top").length && $("#sc_search_nin_top").is(":visible")) {
		    if ($("#sc_search_nin_top").hasClass("disabled")) {
		        return;
		    }
			sc_btn_search_nin()
			toggleToolbar(event, true); return;
		}
		if ($("#sc_search_nin_top").length && $("#sc_search_nin_top").is(":visible")) {
		    if ($("#sc_search_nin_top").hasClass("disabled")) {
		        return;
		    }
			sc_btn_search_nin()
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_ini() {
		if ($("#sc_b_ini_b.sc-unique-btn-1").length && $("#sc_b_ini_b.sc-unique-btn-1").is(":visible")) {
		    if ($("#sc_b_ini_b.sc-unique-btn-1").hasClass("disabled")) {
		        return;
		    }
			nm_move ('inicio');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_ini_b.sc-unique-btn-15").length && $("#sc_b_ini_b.sc-unique-btn-15").is(":visible")) {
		    if ($("#sc_b_ini_b.sc-unique-btn-15").hasClass("disabled")) {
		        return;
		    }
			nm_move ('inicio');
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_ret() {
		if ($("#sc_b_ret_b.sc-unique-btn-2").length && $("#sc_b_ret_b.sc-unique-btn-2").is(":visible")) {
		    if ($("#sc_b_ret_b.sc-unique-btn-2").hasClass("disabled")) {
		        return;
		    }
			nm_move ('retorna');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_ret_b.sc-unique-btn-16").length && $("#sc_b_ret_b.sc-unique-btn-16").is(":visible")) {
		    if ($("#sc_b_ret_b.sc-unique-btn-16").hasClass("disabled")) {
		        return;
		    }
			nm_move ('retorna');
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_stepret() {
		if ($("#sc_b_stepret_b.sc-unique-btn-3").length && $("#sc_b_stepret_b.sc-unique-btn-3").is(":visible")) {
		    if ($("#sc_b_stepret_b.sc-unique-btn-3").hasClass("disabled")) {
		        return;
		    }
			scJQWizardGoToPreviousStep()
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_stepret_b.sc-unique-btn-17").length && $("#sc_b_stepret_b.sc-unique-btn-17").is(":visible")) {
		    if ($("#sc_b_stepret_b.sc-unique-btn-17").hasClass("disabled")) {
		        return;
		    }
			scJQWizardGoToPreviousStep()
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_ava() {
		if ($("#sc_b_avc_b.sc-unique-btn-4").length && $("#sc_b_avc_b.sc-unique-btn-4").is(":visible")) {
		    if ($("#sc_b_avc_b.sc-unique-btn-4").hasClass("disabled")) {
		        return;
		    }
			nm_move ('avanca');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_avc_b.sc-unique-btn-18").length && $("#sc_b_avc_b.sc-unique-btn-18").is(":visible")) {
		    if ($("#sc_b_avc_b.sc-unique-btn-18").hasClass("disabled")) {
		        return;
		    }
			nm_move ('avanca');
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_stepava() {
		if ($("#sc_b_stepavc_b.sc-unique-btn-5").length && $("#sc_b_stepavc_b.sc-unique-btn-5").is(":visible")) {
		    if ($("#sc_b_stepavc_b.sc-unique-btn-5").hasClass("disabled")) {
		        return;
		    }
			scJQWizardGoToNextStep()
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_stepavc_b.sc-unique-btn-19").length && $("#sc_b_stepavc_b.sc-unique-btn-19").is(":visible")) {
		    if ($("#sc_b_stepavc_b.sc-unique-btn-19").hasClass("disabled")) {
		        return;
		    }
			scJQWizardGoToNextStep()
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_fim() {
		if ($("#sc_b_fim_b.sc-unique-btn-6").length && $("#sc_b_fim_b.sc-unique-btn-6").is(":visible")) {
		    if ($("#sc_b_fim_b.sc-unique-btn-6").hasClass("disabled")) {
		        return;
		    }
			nm_move ('final');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_fim_b.sc-unique-btn-20").length && $("#sc_b_fim_b.sc-unique-btn-20").is(":visible")) {
		    if ($("#sc_b_fim_b.sc-unique-btn-20").hasClass("disabled")) {
		        return;
		    }
			nm_move ('final');
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_inc() {
		if ($("#sc_b_new_b.sc-unique-btn-7").length && $("#sc_b_new_b.sc-unique-btn-7").is(":visible")) {
		    if ($("#sc_b_new_b.sc-unique-btn-7").hasClass("disabled")) {
		        return;
		    }
			nm_move ('novo');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_ins_b.sc-unique-btn-8").length && $("#sc_b_ins_b.sc-unique-btn-8").is(":visible")) {
		    if ($("#sc_b_ins_b.sc-unique-btn-8").hasClass("disabled")) {
		        return;
		    }
			nm_atualiza ('incluir');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_new_b.sc-unique-btn-21").length && $("#sc_b_new_b.sc-unique-btn-21").is(":visible")) {
		    if ($("#sc_b_new_b.sc-unique-btn-21").hasClass("disabled")) {
		        return;
		    }
			nm_move ('novo');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_ins_b.sc-unique-btn-22").length && $("#sc_b_ins_b.sc-unique-btn-22").is(":visible")) {
		    if ($("#sc_b_ins_b.sc-unique-btn-22").hasClass("disabled")) {
		        return;
		    }
			nm_atualiza ('incluir');
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_sai_modal() {
		if ($("#sc_b_sai_b.sc-unique-btn-9").length && $("#sc_b_sai_b.sc-unique-btn-9").is(":visible")) {
		    if ($("#sc_b_sai_b.sc-unique-btn-9").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_hlp() {
		if ($("#sc_b_hlp_t").length && $("#sc_b_hlp_t").is(":visible")) {
		    if ($("#sc_b_hlp_t").hasClass("disabled")) {
		        return;
		    }
			window.open('<?php echo $this->url_webhelp; ?>', '', 'resizable, scrollbars'); 
			toggleToolbar(event, true); return;
		}
	}
	function scBtnFn_sys_format_sai() {
		if ($("#sc_b_sai_t.sc-unique-btn-10").length && $("#sc_b_sai_t.sc-unique-btn-10").is(":visible")) {
		    if ($("#sc_b_sai_t.sc-unique-btn-10").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F5('<?php echo $nm_url_saida; ?>');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_sai_t.sc-unique-btn-11").length && $("#sc_b_sai_t.sc-unique-btn-11").is(":visible")) {
		    if ($("#sc_b_sai_t.sc-unique-btn-11").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F5('<?php echo $nm_url_saida; ?>');
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_sai_t.sc-unique-btn-12").length && $("#sc_b_sai_t.sc-unique-btn-12").is(":visible")) {
		    if ($("#sc_b_sai_t.sc-unique-btn-12").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_sai_t.sc-unique-btn-13").length && $("#sc_b_sai_t.sc-unique-btn-13").is(":visible")) {
		    if ($("#sc_b_sai_t.sc-unique-btn-13").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
			toggleToolbar(event, true); return;
		}
		if ($("#sc_b_sai_t.sc-unique-btn-14").length && $("#sc_b_sai_t.sc-unique-btn-14").is(":visible")) {
		    if ($("#sc_b_sai_t.sc-unique-btn-14").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
			toggleToolbar(event, true); return;
		}
	}
</script>
<script type="text/javascript">
$(function() {
 $("#sc-id-mobile-in").mouseover(function() {
  $(this).css("cursor", "pointer");
 }).click(function() {
  scMobileDisplayControl("in");
 });
 $("#sc-id-mobile-out").mouseover(function() {
  $(this).css("cursor", "pointer");
 }).click(function() {
  scMobileDisplayControl("out");
 });
});
function scMobileDisplayControl(sOption) {
 $("#sc-id-mobile-control").val(sOption);
 nm_atualiza("recarga_mobile");
}
</script>
<?php
       if (isset($_SESSION['scriptcase']['device_mobile']) && $_SESSION['scriptcase']['device_mobile'])
       {
?>
<span id="sc-id-mobile-out"><?php echo $this->Ini->Nm_lang['lang_version_web']; ?></span>
<?php
       }
?>
<?php
$_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante_insert_mob']['buttonStatus'] = $this->nmgp_botoes;
?>
<script type="text/javascript">
   function sc_session_redir(url_redir)
   {
       if (window.parent && window.parent.document != window.document && typeof window.parent.sc_session_redir === 'function')
       {
           window.parent.sc_session_redir(url_redir);
       }
       else
       {
           if (window.opener && typeof window.opener.sc_session_redir === 'function')
           {
               window.close();
               window.opener.sc_session_redir(url_redir);
           }
           else
           {
               window.location = url_redir;
           }
       }
   }
</script>
</body> 
</html> 
