<?php

if (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    $sOBContents = ob_get_contents();
    ob_end_clean();
}

header("X-XSS-Protection: 1; mode=block");
header("X-Frame-Options: SAMEORIGIN");

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

<html<?php echo $_SESSION['scriptcase']['reg_conf']['html_dir'] ?>>
<HEAD>
 <TITLE><?php if ('novo' == $this->nmgp_opcao) { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmi_title'] . " \"public\".fiche_prof_sante"); } else { echo strip_tags("Fiche MDO - Cas confirmé - " . $_SESSION['var_maladie_label'] . ""); } ?></TITLE>
 <META http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['scriptcase']['charset_html'] ?>" />
 <META http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT" />
 <META http-equiv="Last-Modified" content="<?php echo gmdate('D, d M Y H:i:s') ?> GMT" />
 <META http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
 <META http-equiv="Cache-Control" content="post-check=0, pre-check=0" />
 <META http-equiv="Pragma" content="no-cache" />
 <link rel="shortcut icon" href="../_lib/img/sys__NM__img__NM__emergency_2785811.png">
<?php

if (isset($_SESSION['scriptcase']['device_mobile']) && $_SESSION['scriptcase']['device_mobile'] && $_SESSION['scriptcase']['display_mobile'])
{
?>
 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php
}

?>
            <meta name="viewport" content="minimal-ui, width=300, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
            <meta name="mobile-web-app-capable" content="yes">
            <meta name="apple-mobile-web-app-capable" content="yes">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <link rel="apple-touch-icon"   sizes="57x57" href="">
            <link rel="apple-touch-icon"   sizes="60x60" href="">
            <link rel="apple-touch-icon"   sizes="72x72" href="">
            <link rel="apple-touch-icon"   sizes="76x76" href="">
            <link rel="apple-touch-icon" sizes="114x114" href="">
            <link rel="apple-touch-icon" sizes="120x120" href="">
            <link rel="apple-touch-icon" sizes="144x144" href="">
            <link rel="apple-touch-icon" sizes="152x152" href="">
            <link rel="apple-touch-icon" sizes="180x180" href="">
            <link rel="icon" type="image/png" sizes="192x192" href="">
            <link rel="icon" type="image/png"   sizes="32x32" href="">
            <link rel="icon" type="image/png"   sizes="96x96" href="">
            <link rel="icon" type="image/png"   sizes="16x16" href="">
            <meta name="msapplication-TileColor" content="___">
            <meta name="msapplication-TileImage" content="">
            <meta name="theme-color" content="___">
            <meta name="apple-mobile-web-app-status-bar-style" content="___">
            <link rel="shortcut icon" href=""> <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/thickbox/thickbox.css" type="text/css" media="screen" />
 <SCRIPT type="text/javascript">
  var sc_pathToTB = '<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/thickbox/';
  var sc_tbLangClose = "<?php echo html_entity_decode($this->Ini->Nm_lang["lang_tb_close"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]) ?>";
  var sc_tbLangEsc = "<?php echo html_entity_decode($this->Ini->Nm_lang["lang_tb_esc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]) ?>";
  var sc_userSweetAlertDisplayed = false;
 </SCRIPT>
 <SCRIPT type="text/javascript">
  var sc_blockCol = '<?php echo $this->Ini->Block_img_col; ?>';
  var sc_blockExp = '<?php echo $this->Ini->Block_img_exp; ?>';
  var sc_ajaxBg = '<?php echo $this->Ini->Color_bg_ajax; ?>';
  var sc_ajaxBordC = '<?php echo $this->Ini->Border_c_ajax; ?>';
  var sc_ajaxBordS = '<?php echo $this->Ini->Border_s_ajax; ?>';
  var sc_ajaxBordW = '<?php echo $this->Ini->Border_w_ajax; ?>';
  var sc_ajaxMsgTime = 2;
  var sc_img_status_ok = '<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Img_status_ok; ?>';
  var sc_img_status_err = '<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Img_status_err; ?>';
  var sc_css_status = '<?php echo $this->Ini->Css_status; ?>';
  var sc_css_status_pwd_box = '<?php echo $this->Ini->Css_status_pwd_box; ?>';
  var sc_css_status_pwd_text = '<?php echo $this->Ini->Css_status_pwd_text; ?>';
 </SCRIPT>
        <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_third; ?>jquery/js/jquery.js"></SCRIPT>
            <?php
               if ($_SESSION['scriptcase']['display_mobile'] && $_SESSION['scriptcase']['device_mobile']) {
                   $forced_mobile = (isset($_SESSION['scriptcase']['force_mobile']) && $_SESSION['scriptcase']['force_mobile']) ? 'true' : 'false';
                   $sc_app_data   = json_encode([
                       'forceMobile' => $forced_mobile,
                       'appType' => 'form',
                       'improvements' => true,
                       'displayOptionsButton' => false,
                       'displayScrollUp' => false,
                       'scrollUpPosition' => 'A',
                       'toolbarOrientation' => 'H',
                       'mobilePanes' => 'true',
                       'navigationBarButtons' => unserialize('a:3:{i:0;s:2:"NP";i:1;s:2:"FL";i:2;s:2:"RC";}'),
                       'mobileSimpleToolbar' => false,
                       'bottomToolbarFixed' => false
                   ]); ?>
            <input type="hidden" id="sc-mobile-app-data" value='<?php echo $sc_app_data; ?>' />
            <script type="text/javascript" src="../_lib/lib/js/nm_modal_panes.jquery.js"></script>
            <script type="text/javascript" src="../_lib/lib/js/nm_form_mobile.js"></script>
            <link rel='stylesheet' href='../_lib/lib/css/nm_form_mobile.css' type='text/css'/>
            <script>
                $(document).ready(function(){

                    bootstrapMobile();

                });
            </script>
            <?php } ?> <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery-ui.js"></SCRIPT>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery/css/smoothness/jquery-ui.css" type="text/css" media="screen" />
<style type="text/css">
.ui-datepicker { z-index: 6 !important }
</style>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_sweetalert.css" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/sweetalert/sweetalert2.all.min.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/sweetalert/polyfill.min.js"></SCRIPT>
 <script type="text/javascript" src="<?php echo $this->Ini->url_lib_js ?>frameControl.js"></script>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/viewerjs/viewer.css" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/viewerjs/viewer.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.iframe-transport.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fileupload.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/malsup-blockui/jquery.blockUI.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/thickbox/thickbox-compressed.js"></SCRIPT>
    <style type="text/css">
        .sc-form-order-icon {
            padding: 0 2px;
        }
    </style>
<?php
           $formOrderUnusedVisivility = $_SESSION['scriptcase']['device_mobile'] && $_SESSION['scriptcase']['display_mobile'] ? 'visible' : 'hidden';
           $formOrderUnusedOpacity = $_SESSION['scriptcase']['device_mobile'] && $_SESSION['scriptcase']['display_mobile'] ? '0.5' : '1';
?>
    <style>
        .sc-form-order-icon-unused {
            visibility: <?php echo $formOrderUnusedVisivility ?>;
            opacity: 0.5;
        }
        .scFormLabelOddMult:hover .sc-form-order-icon-unused {
            visibility: visible;
            opacity: <?php echo $formOrderUnusedOpacity ?>;
        }
    </style>
<style type="text/css">
.sc-button-image.disabled {
	opacity: 0.25
}
.sc-button-image.disabled img {
	cursor: default !important
}
</style>
 <style type="text/css">
  .fileinput-button-padding {
   padding: 3px 10px !important;
  }
  .fileinput-button {
   position: relative;
   overflow: hidden;
   float: left;
   margin-right: 4px;
  }
  .fileinput-button input {
   position: absolute;
   top: 0;
   right: 0;
   margin: 0;
   border: solid transparent;
   border-width: 0 0 100px 200px;
   opacity: 0;
   filter: alpha(opacity=0);
   -moz-transform: translate(-300px, 0) scale(4);
   direction: ltr;
   cursor: pointer;
  }
 </style>
<?php
$miniCalendarFA = $this->jqueryFAFile('calendar');
if ('' != $miniCalendarFA) {
?>
<style type="text/css">
.css_read_off_date_declaration button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_hospitalisation button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_evacuation button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_sortie button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_deces button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_reception_prelevement button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_resultats_labo button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_naissance_malade button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_apparition_symptomes button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_validation button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_confirmation_labo button {
	background-color: transparent;
	border: 0;
	padding: 0
}
.css_read_off_date_prelevements button {
	background-color: transparent;
	border: 0;
	padding: 0
}
</style>
<?php
}
?>
 <style type="text/css">
  .scSpin_age_malade_obj {
   border: 0 !important;
   margin: 0 20px 0 0 !important;
  }
  #id_read_off_age_malade .ui-spinner {
   display: flex;
   width: 100%;
  }
 </style>
 <style type="text/css">
   .select2-container {
     width: auto !important;
     flex-grow: 1;
   }
   .select2-selection {
     width: 100% !important;
   }
 </style>
<style type="text/css">
	.sc.switch {
		position: relative;
		display: inline-flex;
	}

	.sc.switch span {
		display: inline-block;
		margin-right: 5px;
	}

	.sc.switch span {
		background: #DFDFDF;
		width: 22px;
		height: 14px;
		display: block;
		position: relative;
		top: 0px;
		left: 0;
		border-radius: 15px;
		padding: 0 3px;
		transition: all .2s linear;
		box-shadow: 0px 0px 2px rgba(164, 164, 164, 0.8) inset;
	}

	.sc.switch span:before {
		content: '\2713';
		display: inline-block;
		color: white;
		font-size: 10px;
		z-index: 0;
		position: absolute;
		top: 0;
		left: 4px;
	}

	.sc.switch span:after {
		content: '';
		background: white;
		width: 12px;
		height: 12px;
		display: block;
		position: absolute;
		top: 1px;
		left: 1px;
		border-radius: 15px;
		transition: all .2s linear;
		z-index: 1;
	}

	.sc.switch input {
		margin-right: 10px;
		cursor: pointer;
		z-index: 2;
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		opacity: 0;
		margin: 0;
		padding: 0;
	}

	.sc.switch input:disabled + span {
		opacity: 0.35;
	}

	.sc.switch input:checked + span {
		background: #66AFE9;
	}

	.sc.switch input:checked + span:after {
		left: calc(100% - 1px);
		transform: translateX(-100%);
	}

	.sc.radio {
		position: relative;
		display: inline-flex;
	}

	.sc.radio span {
		display: inline-block;
		margin-right: 5px;
	}

	.sc.radio span {
		background: #ffffff;
		border: 1px solid #66AFE9;
		width: 12px;
		height: 12px;
		display: block;
		position: relative;
		top: 0px;
		left: 0;
		border-radius: 15px;
		transition: all .2s;
		box-shadow: 0px 0px 2px rgba(164, 164, 164, 0.8) inset;
	}

	.sc.radio span:after {
		content: '';
		background: #66AFE9;
		width: 12px;
		height: 12px;
		display: block;
		position: absolute;
		top: 0;
		left: 0;
		border-radius: 15px;
		transition: all .2s;
		z-index: 1;
		transform: scale(0);
	}

	.sc.radio input {
		cursor: pointer;
		z-index: 2;
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		opacity: 0;
		margin: 0;
		padding: 0;
	}

	.sc.radio input:disabled + span {
		opacity: 0.35;
	}

	.sc.radio input:checked + span {
		background: #66AFE9;
	}

	.sc.radio input:checked + span:after {
		transform: translateX(-100%);
		transform: scale(1);
	}
</style>
<link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/select2/css/select2.min.css" type="text/css" />
<script type="text/javascript" src="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/select2/js/select2.full.min.js"></script>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput2.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fieldSelection.js"></SCRIPT>
 <?php
 if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['embutida_pdf']))
 {
 ?>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_form.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_form<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
  <?php 
  if(isset($this->Ini->str_google_fonts) && !empty($this->Ini->str_google_fonts)) 
  { 
  ?> 
  <link href="<?php echo $this->Ini->str_google_fonts ?>" rel="stylesheet" /> 
  <?php 
  } 
  ?> 
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_appdiv.css" /> 
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_appdiv<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" /> 
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_tab.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_tab<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/buttons/<?php echo $this->Ini->Str_btn_form . '/' . $this->Ini->Str_btn_form ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_prod; ?>/third/font-awesome/css/all.min.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_progressbar.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_progressbar<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
<?php
   include_once("../_lib/css/" . $this->Ini->str_schema_all . "_tab.php");
 }
?>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>form_fiche_pro_sante_confirme_edit/form_fiche_pro_sante_confirme_edit_<?php echo strtolower($_SESSION['scriptcase']['reg_conf']['css_dir']) ?>.css" />

<script>
var scFocusFirstErrorField = false;
var scFocusFirstErrorName  = "<?php if (isset($this->scFormFocusErrorName)) {echo $this->scFormFocusErrorName;} ?>";
</script>

<?php
include_once("form_fiche_pro_sante_confirme_edit_sajax_js.php");
?>
<script type="text/javascript">
if (document.getElementById("id_error_display_fixed"))
{
 scCenterFixedElement("id_error_display_fixed");
}
var posDispLeft = 0;
var posDispTop = 0;
var Nm_Proc_Atualiz = false;
function findPos(obj)
{
 var posCurLeft = posCurTop = 0;
 if (obj.offsetParent)
 {
  posCurLeft = obj.offsetLeft
  posCurTop = obj.offsetTop
  while (obj = obj.offsetParent)
  {
   posCurLeft += obj.offsetLeft
   posCurTop += obj.offsetTop
  }
 }
 posDispLeft = posCurLeft - 10;
 posDispTop = posCurTop + 30;
}
var Nav_permite_ret = "<?php if ($this->Nav_permite_ret) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_permite_ava = "<?php if ($this->Nav_permite_ava) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_binicio     = "<?php echo $this->arr_buttons['binicio']['type']; ?>";
var Nav_bavanca     = "<?php echo $this->arr_buttons['bavanca']['type']; ?>";
var Nav_bretorna    = "<?php echo $this->arr_buttons['bretorna']['type']; ?>";
var Nav_bfinal      = "<?php echo $this->arr_buttons['bfinal']['type']; ?>";
var Nav_binicio_macro_disabled  = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['first']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['first'] : 'off'); ?>";
var Nav_bavanca_macro_disabled  = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['forward']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['forward'] : 'off'); ?>";
var Nav_bretorna_macro_disabled = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['back']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['back'] : 'off'); ?>";
var Nav_bfinal_macro_disabled   = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['last']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['last'] : 'off'); ?>";
function nav_atualiza(str_ret, str_ava, str_pos)
{
<?php
 if (isset($this->NM_btn_navega) && 'N' == $this->NM_btn_navega)
 {
     echo " return;";
 }
 else
 {
?>
 if ('S' == str_ret)
 {
<?php
    if (isset($this->nmgp_botoes['first']) && $this->nmgp_botoes['first'] == "on")
    {
?>
       if ("off" == Nav_binicio_macro_disabled) { $("#sc_b_ini_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
    if (isset($this->nmgp_botoes['back']) && $this->nmgp_botoes['back'] == "on")
    {
?>
       if ("off" == Nav_bretorna_macro_disabled) { $("#sc_b_ret_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
?>
 }
 else
 {
<?php
    if (isset($this->nmgp_botoes['first']) && $this->nmgp_botoes['first'] == "on")
    {
?>
       $("#sc_b_ini_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
    if (isset($this->nmgp_botoes['back']) && $this->nmgp_botoes['back'] == "on")
    {
?>
       $("#sc_b_ret_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
?>
 }
 if ('S' == str_ava)
 {
<?php
    if (isset($this->nmgp_botoes['last']) && $this->nmgp_botoes['last'] == "on")
    {
?>
       if ("off" == Nav_bfinal_macro_disabled) { $("#sc_b_fim_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
    if (isset($this->nmgp_botoes['forward']) && $this->nmgp_botoes['forward'] == "on")
    {
?>
       if ("off" == Nav_bavanca_macro_disabled) { $("#sc_b_avc_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
?>
 }
 else
 {
<?php
    if (isset($this->nmgp_botoes['last']) && $this->nmgp_botoes['last'] == "on")
    {
?>
       $("#sc_b_fim_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
    if (isset($this->nmgp_botoes['forward']) && $this->nmgp_botoes['forward'] == "on")
    {
?>
       $("#sc_b_avc_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
?>
 }
<?php
  }
?>
}
function nav_liga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' == sImg.substr(sImg.length - 4))
 {
  sImg = sImg.substr(0, sImg.length - 4);
 }
 sImg += sExt;
}
function nav_desliga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' != sImg.substr(sImg.length - 4))
 {
  sImg += '_off';
 }
 sImg += sExt;
}

 function nm_field_disabled(Fields, Opt) {
  opcao = "<?php if ($GLOBALS["erro_incl"] == 1) {echo "novo";} else {echo $this->nmgp_opcao;} ?>";
  if (opcao == "novo" && Opt == "U") {
      return;
  }
  if (opcao != "novo" && Opt == "I") {
      return;
  }
  Field = Fields.split(";");
  for (i=0; i < Field.length; i++)
  {
     F_temp = Field[i].split("=");
     F_name = F_temp[0];
     F_opc  = (F_temp[1] && ("disabled" == F_temp[1] || "true" == F_temp[1])) ? true : false;
     if (F_name == "code_fiche")
     {
        $('input[name="code_fiche"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="code_fiche"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="code_fiche"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "date_declaration")
     {
        $('input[name="date_declaration"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="date_declaration"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="date_declaration"]').removeClass("scFormInputDisabled");
        }
        $('input[id="calendar_date_declaration"]').prop("disabled", F_opc);
        $("#id_sc_field_date_declaration").datepicker("destroy");
        if (!F_opc) {
            scJQCalendarAdd("");
        }
     }
     if (F_name == "structure")
     {
        $('input[name="structure"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="structure"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="structure"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "user_fk")
     {
        $('input[name="user_fk"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="user_fk"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="user_fk"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "maladie_confirmee_labo")
     {
        $('input[name="maladie_confirmee_labo"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="maladie_confirmee_labo"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="maladie_confirmee_labo"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "nin")
     {
        $('input[name="nin"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="nin"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="nin"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "wilaya")
     {
        $('select[name="wilaya"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('select[name="wilaya"]').addClass("scFormInputDisabled");
        }
        else {
            $('select[name="wilaya"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "symptomes")
     {
        $('select[name="symptomes[]"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('select[name="symptomes[]"]').addClass("scFormInputDisabled");
        }
        else {
            $('select[name="symptomes[]"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "autres_symptomes")
     {
        $('textarea[name="autres_symptomes"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('textarea[name="autres_symptomes"]').addClass("scFormInputDisabled");
        }
        else {
            $('textarea[name="autres_symptomes"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "maladie_suspectee_by_ia")
     {
        $('select[name="maladie_suspectee_by_ia"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('select[name="maladie_suspectee_by_ia"]').addClass("scFormInputDisabled");
        }
        else {
            $('select[name="maladie_suspectee_by_ia"]').removeClass("scFormInputDisabled");
        }
     }
  }
 } // nm_field_disabled
<?php

include_once('form_fiche_pro_sante_confirme_edit_jquery.php');

?>
var applicationKeys = "";
applicationKeys += "ctrl+shift+right";
applicationKeys += ",";
applicationKeys += "ctrl+shift+left";
applicationKeys += ",";
applicationKeys += "ctrl+right";
applicationKeys += ",";
applicationKeys += "ctrl+left";
applicationKeys += ",";
applicationKeys += "alt+q";
applicationKeys += ",";
applicationKeys += "escape";
applicationKeys += ",";
applicationKeys += "ctrl+enter";
applicationKeys += ",";
applicationKeys += "ctrl+s";
applicationKeys += ",";
applicationKeys += "ctrl+delete";
applicationKeys += ",";
applicationKeys += "f1";
applicationKeys += ",";
applicationKeys += "ctrl+shift+c";

var hotkeyList = "";

function execHotKey(e, h) {
    var hotkey_fired = false;
  switch (true) {
    case (["ctrl+shift+right"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_fim");
      break;
    case (["ctrl+shift+left"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_ini");
      break;
    case (["ctrl+right"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_ava");
      break;
    case (["ctrl+left"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_ret");
      break;
    case (["alt+q"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_sai");
      break;
    case (["escape"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_cnl");
      break;
    case (["ctrl+enter"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_inc");
      break;
    case (["ctrl+s"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_alt");
      break;
    case (["ctrl+delete"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_exc");
      break;
    case (["f1"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_webh");
      break;
    case (["ctrl+shift+c"].indexOf(h.key) > -1):
      hotkey_fired = process_hotkeys("sys_format_copy");
      break;
    default:
      return true;
  }
  if (hotkey_fired) {
        e.preventDefault();
        return false;
    } else {
        return true;
    }
}
</script>

<script type="text/javascript" src="<?php echo $this->Ini->url_lib_js ?>hotkeys.inc.js"></script>
<script type="text/javascript" src="<?php echo $this->Ini->url_lib_js ?>hotkeys_setup.js"></script>
<script type="text/javascript" src="<?php echo $this->Ini->url_lib_js ?>frameControl.js"></script>
<script type="text/javascript">

function process_hotkeys(hotkey)
{
  if (hotkey == "sys_format_fim") {
    if (typeof scBtnFn_sys_format_fim !== "undefined" && typeof scBtnFn_sys_format_fim === "function") {
      scBtnFn_sys_format_fim();
        return true;
    }
  }
  if (hotkey == "sys_format_ini") {
    if (typeof scBtnFn_sys_format_ini !== "undefined" && typeof scBtnFn_sys_format_ini === "function") {
      scBtnFn_sys_format_ini();
        return true;
    }
  }
  if (hotkey == "sys_format_ava") {
    if (typeof scBtnFn_sys_format_ava !== "undefined" && typeof scBtnFn_sys_format_ava === "function") {
      scBtnFn_sys_format_ava();
        return true;
    }
  }
  if (hotkey == "sys_format_ret") {
    if (typeof scBtnFn_sys_format_ret !== "undefined" && typeof scBtnFn_sys_format_ret === "function") {
      scBtnFn_sys_format_ret();
        return true;
    }
  }
  if (hotkey == "sys_format_sai") {
    if (typeof scBtnFn_sys_format_sai !== "undefined" && typeof scBtnFn_sys_format_sai === "function") {
      scBtnFn_sys_format_sai();
        return true;
    }
  }
  if (hotkey == "sys_format_cnl") {
    if (typeof scBtnFn_sys_format_cnl !== "undefined" && typeof scBtnFn_sys_format_cnl === "function") {
      scBtnFn_sys_format_cnl();
        return true;
    }
  }
  if (hotkey == "sys_format_inc") {
    if (typeof scBtnFn_sys_format_inc !== "undefined" && typeof scBtnFn_sys_format_inc === "function") {
      scBtnFn_sys_format_inc();
        return true;
    }
  }
  if (hotkey == "sys_format_alt") {
    if (typeof scBtnFn_sys_format_alt !== "undefined" && typeof scBtnFn_sys_format_alt === "function") {
      scBtnFn_sys_format_alt();
        return true;
    }
  }
  if (hotkey == "sys_format_exc") {
    if (typeof scBtnFn_sys_format_exc !== "undefined" && typeof scBtnFn_sys_format_exc === "function") {
      scBtnFn_sys_format_exc();
        return true;
    }
  }
  if (hotkey == "sys_format_webh") {
    if (typeof scBtnFn_sys_format_webh !== "undefined" && typeof scBtnFn_sys_format_webh === "function") {
      scBtnFn_sys_format_webh();
        return true;
    }
  }
  if (hotkey == "sys_format_copy") {
    if (typeof scBtnFn_sys_format_copy !== "undefined" && typeof scBtnFn_sys_format_copy === "function") {
      scBtnFn_sys_format_copy();
        return true;
    }
  }
    return false;
}

 var Dyn_Ini  = true;
function setLabelCellMaxWidth()
{
    var $labelList = $(".scUiLabelWidthFix"), $spanList, i, testWidth, maxLabelWidth = 0;
    for (i = 0; i < $labelList.length; i++) {
        $spanList = $($labelList[i]).find("span");

        if ($spanList.length) {
            testWidth  = $($spanList[0]).width();

            maxLabelWidth = Math.max(maxLabelWidth, testWidth);
        }
    }

    if (0 < maxLabelWidth) {
        maxLabelWidth += 20;
        $labelList.css("width", maxLabelWidth + "px");
    }
}

 $(function() {

  scJQElementsAdd('');

  scJQGeneralAdd();

  sc_form_onload();

  $(document).bind('drop dragover', function (e) {
      e.preventDefault();
  });

        setLabelCellMaxWidth();

<?php
if (!$this->NM_ajax_flag && isset($this->NM_non_ajax_info['ajaxJavascript']) && !empty($this->NM_non_ajax_info['ajaxJavascript']))
{
    foreach ($this->NM_non_ajax_info['ajaxJavascript'] as $aFnData)
    {
?>
  <?php echo $aFnData[0]; ?>(<?php echo implode(', ', $aFnData[1]); ?>);

<?php
    }
}
?>
 });

   $(window).on('load', function() {
   });
 if($(".sc-ui-block-control").length) {
  preloadBlock = new Image();
  preloadBlock.src = "<?php echo $this->Ini->path_icones; ?>/" + sc_blockExp;
 }

 var show_block = {
  
 };

 function toggleBlock(e) {
  var block = e.data.block,
      block_id = $(block).attr("id");
      block_img = $("#" + block_id + " .sc-ui-block-control");

  if (1 >= block.rows.length) {
   return;
  }

  show_block[block_id] = !show_block[block_id];

  if (show_block[block_id]) {
    $(block).css("height", "100%");
    if (block_img.length) block_img.attr("src", changeImgName(block_img.attr("src"), sc_blockCol));
  }
  else {
    $(block).css("height", "");
    if (block_img.length) block_img.attr("src", changeImgName(block_img.attr("src"), sc_blockExp));
  }

  for (var i = 2; i < block.rows.length; i++) {
   if (show_block[block_id])
    $(block.rows[i]).show();
   else
    $(block.rows[i]).hide();
  }

  if (show_block[block_id]) {
  }
 }

 function changeImgName(imgOld, imgNew) {
   var aOld = imgOld.split("/");
   aOld.pop();
   aOld.push(imgNew);
   return aOld.join("/");
 }

</script>
</HEAD>
<?php
$str_iframe_body = ('F' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe']) ? 'margin: 2px;' : '';
 if (isset($_SESSION['nm_aba_bg_color']))
 {
     $this->Ini->cor_bg_grid = $_SESSION['nm_aba_bg_color'];
     $this->Ini->img_fun_pag = $_SESSION['nm_aba_bg_img'];
 }
if ($GLOBALS["erro_incl"] == 1)
{
    $this->nmgp_opcao = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['recarga'];
}
if ('' != $this->structure)
{
    $this->lookup_structure($look_rpc_structure);
}
if ('' != $this->user_fk)
{
    $this->lookup_user_fk($look_rpc_user_fk);
}
if ('' != $this->maladie_confirmee_labo)
{
    $this->lookup_maladie_confirmee_labo($look_rpc_maladie_confirmee_labo);
}
    $remove_margin = isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['remove_margin'] ? 'margin: 0; ' : '';
    $remove_border = isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['remove_border'] ? 'border-width: 0; ' : '';
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['link_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['link_info']['remove_margin']) {
        $remove_margin = 'margin: 0; ';
    }
    if ('' != $remove_margin && isset($str_iframe_body) && '' != $str_iframe_body) {
        $str_iframe_body = '';
    }
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['link_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['link_info']['remove_border']) {
        $remove_border = 'border-width: 0; ';
    }
    $vertical_center = '';
?>
<body class="scFormPage sc-app-form" style="<?php echo $remove_margin . $str_iframe_body . $vertical_center; ?>">
<?php

if (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    echo $sOBContents;
}

?>
<script type="text/javascript" src="<?php  echo $this->Ini->path_js . "/jsrsClient.js" ?>"> 
</script> 
<div id="idJSSpecChar" style="display: none;"></div>
<script type="text/javascript">
function NM_tp_critica(TP)
{
    if (TP == 0 || TP == 1 || TP == 2)
    {
        nmdg_tipo_crit = TP;
    }
}
</script> 
<?php
 include_once("form_fiche_pro_sante_confirme_edit_js0.php");
?>
<script type="text/javascript" src="<?php  echo $this->Ini->path_js . "/jsrsClient.js" ?>"> 
</script> 
<script type="text/javascript"> 
 function setLocale(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_idioma_novo.value = sLocale;
 }
 function setSchema(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_schema_f.value = sLocale;
 }
var scInsertFieldWithErrors = new Array();
<?php
foreach ($this->NM_ajax_info['fieldsWithErrors'] as $insertFieldName) {
?>
scInsertFieldWithErrors.push("<?php echo $insertFieldName; ?>");
<?php
}
?>
$(function() {
	scAjaxError_markFieldList(scInsertFieldWithErrors);
});
 </script>
<form  name="F1" method="post" enctype="multipart/form-data" 
               action="form_fiche_pro_sante_confirme_edit.php" 
               target="_self">
<input type="hidden" name="nmgp_url_saida" value="">
<?php
if ('novo' == $this->nmgp_opcao || 'incluir' == $this->nmgp_opcao)
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['insert_validation'] = md5(time() . rand(1, 99999));
?>
<input type="hidden" name="nmgp_ins_valid" value="<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['insert_validation']; ?>">
<?php
}
?>
<input type="hidden" name="nm_form_submit" value="1">
<input type="hidden" name="nmgp_idioma_novo" value="">
<input type="hidden" name="nmgp_schema_f" value="">
<input type="hidden" name="nmgp_opcao" value="">
<input type="hidden" name="nmgp_ancora" value="">
<input type="hidden" name="nmgp_num_form" value="<?php  echo $this->form_encode_input($nmgp_num_form); ?>">
<input type="hidden" name="nmgp_parms" value="">
<input type="hidden" name="script_case_init" value="<?php  echo $this->form_encode_input($this->Ini->sc_page); ?>">
<input type="hidden" name="NM_cancel_return_new" value="<?php echo $this->NM_cancel_return_new ?>">
<input type="hidden" name="csrf_token" value="<?php echo $this->scCsrfGetToken() ?>" />
<input type="hidden" name="upload_file_flag" value="">
<input type="hidden" name="upload_file_check" value="">
<input type="hidden" name="upload_file_name" value="">
<input type="hidden" name="upload_file_temp" value="">
<input type="hidden" name="upload_file_libs" value="">
<input type="hidden" name="upload_file_height" value="">
<input type="hidden" name="upload_file_width" value="">
<input type="hidden" name="upload_file_aspect" value="">
<input type="hidden" name="upload_file_type" value="">
<input type="hidden" name="attached_file_salva" value="<?php  echo $this->form_encode_input($this->attached_file) ?>">
<input type="hidden" name="_sc_force_mobile" id="sc-id-mobile-control" value="" />
<?php
$_SESSION['scriptcase']['error_span_title']['form_fiche_pro_sante_confirme_edit'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['form_fiche_pro_sante_confirme_edit'] = '' != $this->Ini->Err_ico_title ? $this->Ini->path_icones . '/' . $this->Ini->Err_ico_title : '';
?>
<div style="display: none; position: absolute; z-index: 1000" id="id_error_display_table_frame">
<table class="scFormErrorTable scFormToastTable">
<tr><?php if ($this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><td style="padding: 0px" rowspan="2"><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top"></td><?php } ?><td class="scFormErrorTitle scFormToastTitle"><table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormErrorTitleFont" style="padding: 0px; vertical-align: top; width: 100%"><?php if (!$this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top">&nbsp;<?php } ?><?php echo $this->Ini->Nm_lang['lang_errm_errt'] ?></td><td style="padding: 0px; vertical-align: top"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideErrorDisplay('table')", "scAjaxHideErrorDisplay('table')", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
</td></tr></table></td></tr>
<tr><td class="scFormErrorMessage scFormToastMessage"><span id="id_error_display_table_text"></span></td></tr>
</table>
</div>
<div style="display: none; position: absolute; z-index: 1000" id="id_message_display_frame">
 <table class="scFormMessageTable" id="id_message_display_content" style="width: 100%">
  <tr id="id_message_display_title_line">
   <td class="scFormMessageTitle" style="height: 20px"><?php
if ('' != $this->Ini->Msg_ico_title) {
?>
<img src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_title; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmessageclose", "_scAjaxMessageBtnClose()", "_scAjaxMessageBtnClose()", "id_message_display_close_icon", "", "", "float: right", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
<span id="id_message_display_title" style="vertical-align: middle"></span></td>
  </tr>
  <tr>
   <td class="scFormMessageMessage"><?php
if ('' != $this->Ini->Msg_ico_body) {
?>
<img id="id_message_display_body_icon" src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_body; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<span id="id_message_display_text"></span><div id="id_message_display_buttond" style="display: none; text-align: center"><br /><input id="id_message_display_buttone" type="button" class="scButton_default" value="Ok" onClick="_scAjaxMessageBtnClick()" ></div></td>
  </tr>
 </table>
</div>
<?php
$msgDefClose = isset($this->arr_buttons['bmessageclose']) ? $this->arr_buttons['bmessageclose']['value'] : 'Ok';
?>
<script type="text/javascript">
var scMsgDefTitle = "<?php if (isset($this->Ini->Nm_lang['lang_usr_lang_othr_msgs_titl'])) {echo $this->Ini->Nm_lang['lang_usr_lang_othr_msgs_titl'];} ?>";
var scMsgDefButton = "Ok";
var scMsgDefClose = "<?php echo $msgDefClose; ?>";
var scMsgDefClick = "close";
var scMsgDefScInit = "<?php echo $this->Ini->sc_page; ?>";
</script>
<?php
if ($this->record_insert_ok)
{
?>
<script type="text/javascript">
if (typeof sc_userSweetAlertDisplayed === "undefined" || !sc_userSweetAlertDisplayed) {
    _scAjaxShowMessage({message: "<?php echo $this->form_encode_input($this->Ini->Nm_lang['lang_othr_ajax_frmi']) ?>", title: "", 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: true, type: "success"});
}
sc_userSweetAlertDisplayed = false;
</script>
<?php
}
if ($this->record_delete_ok)
{
?>
<script type="text/javascript">
if (typeof sc_userSweetAlertDisplayed === "undefined" || !sc_userSweetAlertDisplayed) {
    _scAjaxShowMessage({message: "<?php echo $this->form_encode_input($this->Ini->Nm_lang['lang_othr_ajax_frmd']) ?>", title: "", 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: true, type: "success"});
}
sc_userSweetAlertDisplayed = false;
</script>
<?php
}
?>
<table id="main_table_form"  align="center" cellpadding=0 cellspacing=0  width="80%">
 <tr>
  <td>
  <div class="scFormBorder" style="<?php echo (isset($remove_border) ? $remove_border : ''); ?>">
   <table width='100%' cellspacing=0 cellpadding=0>
<?php
$this->displayAppHeader();
?>
<tr><td>
<?php
$this->displayTopToolbar();
?>
<?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]['form_fiche_pro_sante_confirme_edit']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar sc-toolbar-top" 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]['form_fiche_pro_sante_confirme_edit']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "R")
{
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
?> 
     </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['retour'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = '';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['retour']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['retour']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['retour']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['retour']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['retour'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "retour", "scBtnFn_retour()", "scBtnFn_retour()", "sc_retour_top", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $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]['form_fiche_pro_sante_confirme_edit']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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, 't');</script><?php } ?>
</td></tr> 
<tr><td>
<?php
       echo "<div id=\"sc-ui-empty-form\" class=\"scFormPageText\" style=\"padding: 10px; font-weight: bold" . ($this->nmgp_form_empty ? '' : '; display: none') . "\">";
       echo $this->Ini->Nm_lang['lang_errm_empt'];
       echo "</div>";
  if ($this->nmgp_form_empty)
  {
       if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['where_filter']))
       {
           $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['empty_filter'] = true;
       }
  }
?>
<?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_0"><!-- bloco_c -->
<?php
?>
<TABLE align="center" id="hidden_bloco_0" class="scFormTable<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;"><script type="text/javascript">
function sc_change_tabs(bTabDisp, sTabId, sTabParts)
{
  if (document.getElementById(sTabId)) {
    if (bTabDisp) {
      document.getElementById("div_" + sTabId).style.width = "";
      document.getElementById("div_" + sTabId).style.height = "";
      document.getElementById("div_" + sTabId).style.display = "";
      document.getElementById("div_" + sTabId).style.overflow = "visible";
      document.getElementById(sTabParts).className = "scTabActive";
    }
    else {
      document.getElementById("div_" + sTabId).style.width = "1px";
      document.getElementById("div_" + sTabId).style.height = "0px";
      document.getElementById("div_" + sTabId).style.display = "none";
      document.getElementById("div_" + sTabId).style.overflow = "scroll";
      document.getElementById(sTabParts).className = "scTabInactive";
    }
  }
}
</script>
<input type="hidden" name="attached_file_ul_name" id="id_sc_field_attached_file_ul_name" value="<?php echo $this->form_encode_input($this->attached_file_ul_name);?>">
<input type="hidden" name="attached_file_ul_type" id="id_sc_field_attached_file_ul_type" value="<?php echo $this->form_encode_input($this->attached_file_ul_type);?>">
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['code_fiche']))
    {
        $this->nm_new_label['code_fiche'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_code_fiche'] . "";
    }
?>
<?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);
   $code_fiche = $this->code_fiche;
   $sStyleHidden_code_fiche = '';
   if (isset($this->nmgp_cmp_hidden['code_fiche']) && $this->nmgp_cmp_hidden['code_fiche'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['code_fiche']);
       $sStyleHidden_code_fiche = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_code_fiche = 'display: none;';
   $sStyleReadInp_code_fiche = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['code_fiche']) && $this->nmgp_cmp_readonly['code_fiche'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['code_fiche']);
       $sStyleReadLab_code_fiche = '';
       $sStyleReadInp_code_fiche = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['code_fiche']) && $this->nmgp_cmp_hidden['code_fiche'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="code_fiche" value="<?php echo $this->form_encode_input($code_fiche) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_code_fiche_line" id="hidden_field_data_code_fiche" style="<?php echo $sStyleHidden_code_fiche; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_code_fiche_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_code_fiche_label" style=""><span id="id_label_code_fiche"><?php echo $this->nm_new_label['code_fiche']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['code_fiche']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['code_fiche'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["code_fiche"]) &&  $this->nmgp_cmp_readonly["code_fiche"] == "on") { 

 ?>
<input type="hidden" name="code_fiche" value="<?php echo $this->form_encode_input($code_fiche) . "\">" . $code_fiche . ""; ?>
<?php } else { ?>
<span id="id_read_on_code_fiche" class="sc-ui-readonly-code_fiche css_code_fiche_line" style="<?php echo $sStyleReadLab_code_fiche; ?>"><?php echo $this->form_format_readonly("code_fiche", $this->form_encode_input($this->code_fiche)); ?></span><span id="id_read_off_code_fiche" class="css_read_off_code_fiche<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_code_fiche; ?>">
 <input class="sc-js-input scFormObjectOdd css_code_fiche_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_code_fiche" type=text name="code_fiche" value="<?php echo $this->form_encode_input($code_fiche) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=20"; } ?> maxlength=20 alt="{datatype: 'text', maxLength: 20, 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_code_fiche_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_code_fiche_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['date_declaration']))
    {
        $this->nm_new_label['date_declaration'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_declaration'] . "";
    }
?>
<?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);
   $old_dt_date_declaration = $this->date_declaration;
   if (strlen($this->date_declaration_hora) > 8 ) {$this->date_declaration_hora = substr($this->date_declaration_hora, 0, 8);}
   $this->date_declaration .= ' ' . $this->date_declaration_hora;
   $this->date_declaration  = trim($this->date_declaration);
   $date_declaration = $this->date_declaration;
   $sStyleHidden_date_declaration = '';
   if (isset($this->nmgp_cmp_hidden['date_declaration']) && $this->nmgp_cmp_hidden['date_declaration'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_declaration']);
       $sStyleHidden_date_declaration = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_declaration = 'display: none;';
   $sStyleReadInp_date_declaration = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['date_declaration']) && $this->nmgp_cmp_readonly['date_declaration'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_declaration']);
       $sStyleReadLab_date_declaration = '';
       $sStyleReadInp_date_declaration = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_declaration']) && $this->nmgp_cmp_hidden['date_declaration'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_declaration" value="<?php echo $this->form_encode_input($date_declaration) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="date_declaration" value="<?php echo $this->form_encode_input($date_declaration) . "\">" . $date_declaration . ""; ?>
<?php } else { ?>
<span id="id_read_on_date_declaration" class="sc-ui-readonly-date_declaration css_date_declaration_line" style="<?php echo $sStyleReadLab_date_declaration; ?>"><?php echo $this->form_format_readonly("date_declaration", $this->form_encode_input($date_declaration)); ?></span><span id="id_read_off_date_declaration" class="css_read_off_date_declaration<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_declaration; ?>"><?php
$tmp_form_data = $this->field_config['date_declaration']['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_declaration_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_declaration" type=text name="date_declaration" value="<?php echo $this->form_encode_input($date_declaration) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=18"; } ?> alt="{datatype: 'datetime', dateSep: '<?php echo $this->field_config['date_declaration']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_declaration']['date_format']; ?>', timeSep: '<?php echo $this->field_config['date_declaration']['time_sep']; ?>', 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_declaration_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_declaration_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>
<?php
   $this->date_declaration = $old_dt_date_declaration;
?>


   <?php
    if (!isset($this->nm_new_label['structure']))
    {
        $this->nm_new_label['structure'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_structure'] . "";
    }
?>
<?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);
   $structure = $this->structure;
   $sStyleHidden_structure = '';
   if (isset($this->nmgp_cmp_hidden['structure']) && $this->nmgp_cmp_hidden['structure'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['structure']);
       $sStyleHidden_structure = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_structure = 'display: none;';
   $sStyleReadInp_structure = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['structure']) && $this->nmgp_cmp_readonly['structure'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['structure']);
       $sStyleReadLab_structure = '';
       $sStyleReadInp_structure = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['structure']) && $this->nmgp_cmp_hidden['structure'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="structure" value="<?php echo $this->form_encode_input($structure) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="structure" value="<?php echo $this->form_encode_input($structure) . "\">" . $structure . ""; ?>
<?php } else { ?>
<span id="id_read_on_structure" class="sc-ui-readonly-structure css_structure_line" style="<?php echo $sStyleReadLab_structure; ?>"><?php echo $this->form_format_readonly("structure", $this->form_encode_input($this->structure)); ?></span><span id="id_read_off_structure" class="css_read_off_structure<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_structure; ?>">
 <input class="sc-js-input scFormObjectOdd css_structure_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_structure" type=text name="structure" value="<?php echo $this->form_encode_input($structure) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=15"; } ?> maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span><?php } ?>
 <SPAN id="id_lookup_structure"><?php echo $look_rpc_structure; ?></SPAN></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_structure_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_structure_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['user_fk']))
    {
        $this->nm_new_label['user_fk'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_user_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);
   $user_fk = $this->user_fk;
   $sStyleHidden_user_fk = '';
   if (isset($this->nmgp_cmp_hidden['user_fk']) && $this->nmgp_cmp_hidden['user_fk'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['user_fk']);
       $sStyleHidden_user_fk = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_user_fk = 'display: none;';
   $sStyleReadInp_user_fk = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['user_fk']) && $this->nmgp_cmp_readonly['user_fk'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['user_fk']);
       $sStyleReadLab_user_fk = '';
       $sStyleReadInp_user_fk = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['user_fk']) && $this->nmgp_cmp_hidden['user_fk'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="user_fk" value="<?php echo $this->form_encode_input($user_fk) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="user_fk" value="<?php echo $this->form_encode_input($user_fk) . "\">" . $user_fk . ""; ?>
<?php } else { ?>
<span id="id_read_on_user_fk" class="sc-ui-readonly-user_fk css_user_fk_line" style="<?php echo $sStyleReadLab_user_fk; ?>"><?php echo $this->form_format_readonly("user_fk", $this->form_encode_input($this->user_fk)); ?></span><span id="id_read_off_user_fk" class="css_read_off_user_fk<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_user_fk; ?>">
 <input class="sc-js-input scFormObjectOdd css_user_fk_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_user_fk" type=text name="user_fk" value="<?php echo $this->form_encode_input($user_fk) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=15"; } ?> maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span><?php } ?>
 <SPAN id="id_lookup_user_fk"><?php echo $look_rpc_user_fk; ?></SPAN></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_user_fk_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_user_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 $sStyleHidden_code_fiche_dumb = ('' == $sStyleHidden_code_fiche) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_code_fiche_dumb" style="<?php echo $sStyleHidden_code_fiche_dumb; ?>"></TD>
<?php $sStyleHidden_date_declaration_dumb = ('' == $sStyleHidden_date_declaration) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_declaration_dumb" style="<?php echo $sStyleHidden_date_declaration_dumb; ?>"></TD>
<?php $sStyleHidden_structure_dumb = ('' == $sStyleHidden_structure) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_structure_dumb" style="<?php echo $sStyleHidden_structure_dumb; ?>"></TD>
<?php $sStyleHidden_user_fk_dumb = ('' == $sStyleHidden_user_fk) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_user_fk_dumb" style="<?php echo $sStyleHidden_user_fk_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['maladie_confirmee_labo']))
    {
        $this->nm_new_label['maladie_confirmee_labo'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_maladie_confirmee_labo'] . "";
    }
?>
<?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);
   $maladie_confirmee_labo = $this->maladie_confirmee_labo;
   $sStyleHidden_maladie_confirmee_labo = '';
   if (isset($this->nmgp_cmp_hidden['maladie_confirmee_labo']) && $this->nmgp_cmp_hidden['maladie_confirmee_labo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['maladie_confirmee_labo']);
       $sStyleHidden_maladie_confirmee_labo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_maladie_confirmee_labo = 'display: none;';
   $sStyleReadInp_maladie_confirmee_labo = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['maladie_confirmee_labo']) && $this->nmgp_cmp_readonly['maladie_confirmee_labo'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['maladie_confirmee_labo']);
       $sStyleReadLab_maladie_confirmee_labo = '';
       $sStyleReadInp_maladie_confirmee_labo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['maladie_confirmee_labo']) && $this->nmgp_cmp_hidden['maladie_confirmee_labo'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="maladie_confirmee_labo" value="<?php echo $this->form_encode_input($maladie_confirmee_labo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="maladie_confirmee_labo" value="<?php echo $this->form_encode_input($maladie_confirmee_labo) . "\">" . $maladie_confirmee_labo . ""; ?>
<?php } else { ?>
<span id="id_read_on_maladie_confirmee_labo" class="sc-ui-readonly-maladie_confirmee_labo css_maladie_confirmee_labo_line" style="<?php echo $sStyleReadLab_maladie_confirmee_labo; ?>"><?php echo $this->form_format_readonly("maladie_confirmee_labo", $this->form_encode_input($this->maladie_confirmee_labo)); ?></span><span id="id_read_off_maladie_confirmee_labo" class="css_read_off_maladie_confirmee_labo<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_maladie_confirmee_labo; ?>">
 <input class="sc-js-input scFormObjectOdd css_maladie_confirmee_labo_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_maladie_confirmee_labo" type=text name="maladie_confirmee_labo" value="<?php echo $this->form_encode_input($maladie_confirmee_labo) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=15"; } ?> maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span><?php } ?>
 <SPAN id="id_lookup_maladie_confirmee_labo"><?php echo $look_rpc_maladie_confirmee_labo; ?></SPAN></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_maladie_confirmee_labo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_maladie_confirmee_labo_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


    <TD class="scFormDataOdd" colspan="3" >&nbsp;</TD>





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


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





<?php } ?>
<?php $sStyleHidden_maladie_confirmee_labo_dumb = ('' == $sStyleHidden_maladie_confirmee_labo) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_maladie_confirmee_labo_dumb" style="<?php echo $sStyleHidden_maladie_confirmee_labo_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_1"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_1"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_1" 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['prenom_malade']))
           {
               $this->nmgp_cmp_readonly['prenom_malade'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['nom_malade']))
           {
               $this->nmgp_cmp_readonly['nom_malade'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['age_malade']))
           {
               $this->nmgp_cmp_readonly['age_malade'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['unite_age_nm_fk']))
           {
               $this->nmgp_cmp_readonly['unite_age_nm_fk'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['sexe_nm_fk']))
           {
               $this->nmgp_cmp_readonly['sexe_nm_fk'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['wilaya']))
           {
               $this->nmgp_cmp_readonly['wilaya'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['nin']))
    {
        $this->nm_new_label['nin'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_nin'] . "";
    }
?>
<?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);
   $nin = $this->nin;
   $sStyleHidden_nin = '';
   if (isset($this->nmgp_cmp_hidden['nin']) && $this->nmgp_cmp_hidden['nin'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['nin']);
       $sStyleHidden_nin = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_nin = 'display: none;';
   $sStyleReadInp_nin = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['nin']) && $this->nmgp_cmp_readonly['nin'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['nin']);
       $sStyleReadLab_nin = '';
       $sStyleReadInp_nin = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['nin']) && $this->nmgp_cmp_hidden['nin'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="nin" value="<?php echo $this->form_encode_input($nin) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="nin" value="<?php echo $this->form_encode_input($nin) . "\">" . $nin . ""; ?>
<?php } else { ?>
<span id="id_read_on_nin" class="sc-ui-readonly-nin css_nin_line" style="<?php echo $sStyleReadLab_nin; ?>"><?php echo $this->form_format_readonly("nin", $this->form_encode_input($this->nin)); ?></span><span id="id_read_off_nin" class="css_read_off_nin<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_nin; ?>">
 <input class="sc-js-input scFormObjectOdd css_nin_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_nin" type=text name="nin" value="<?php echo $this->form_encode_input($nin) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=20"; } ?> maxlength=20 alt="{datatype: 'text', maxLength: 20, 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_nin_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nin_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['prenom_malade']))
    {
        $this->nm_new_label['prenom_malade'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_prenom_malade'] . "";
    }
?>
<?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);
   $prenom_malade = $this->prenom_malade;
   $sStyleHidden_prenom_malade = '';
   if (isset($this->nmgp_cmp_hidden['prenom_malade']) && $this->nmgp_cmp_hidden['prenom_malade'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['prenom_malade']);
       $sStyleHidden_prenom_malade = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_prenom_malade = 'display: none;';
   $sStyleReadInp_prenom_malade = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["prenom_malade"]) &&  $this->nmgp_cmp_readonly["prenom_malade"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['prenom_malade']);
       $sStyleReadLab_prenom_malade = '';
       $sStyleReadInp_prenom_malade = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['prenom_malade']) && $this->nmgp_cmp_hidden['prenom_malade'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="prenom_malade" value="<?php echo $this->form_encode_input($prenom_malade) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_prenom_malade_line" id="hidden_field_data_prenom_malade" style="<?php echo $sStyleHidden_prenom_malade; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_prenom_malade_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_prenom_malade_label" style=""><span id="id_label_prenom_malade"><?php echo $this->nm_new_label['prenom_malade']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['prenom_malade']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['prenom_malade'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["prenom_malade"]) &&  $this->nmgp_cmp_readonly["prenom_malade"] == "on")) { 

 ?>
<input type="hidden" name="prenom_malade" value="<?php echo $this->form_encode_input($prenom_malade) . "\"><span id=\"id_ajax_label_prenom_malade\">" . $prenom_malade . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_prenom_malade" class="sc-ui-readonly-prenom_malade css_prenom_malade_line" style="<?php echo $sStyleReadLab_prenom_malade; ?>"><?php echo $this->form_format_readonly("prenom_malade", $this->form_encode_input($this->prenom_malade)); ?></span><span id="id_read_off_prenom_malade" class="css_read_off_prenom_malade<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_prenom_malade; ?>">
 <input class="sc-js-input scFormObjectOdd css_prenom_malade_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_prenom_malade" type=text name="prenom_malade" value="<?php echo $this->form_encode_input($prenom_malade) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=30"; } ?> maxlength=30 alt="{datatype: 'text', maxLength: 30, 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_prenom_malade_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_prenom_malade_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['nom_malade']))
    {
        $this->nm_new_label['nom_malade'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_nom_malade'] . "";
    }
?>
<?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);
   $nom_malade = $this->nom_malade;
   $sStyleHidden_nom_malade = '';
   if (isset($this->nmgp_cmp_hidden['nom_malade']) && $this->nmgp_cmp_hidden['nom_malade'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['nom_malade']);
       $sStyleHidden_nom_malade = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_nom_malade = 'display: none;';
   $sStyleReadInp_nom_malade = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["nom_malade"]) &&  $this->nmgp_cmp_readonly["nom_malade"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['nom_malade']);
       $sStyleReadLab_nom_malade = '';
       $sStyleReadInp_nom_malade = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['nom_malade']) && $this->nmgp_cmp_hidden['nom_malade'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="nom_malade" value="<?php echo $this->form_encode_input($nom_malade) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_nom_malade_line" id="hidden_field_data_nom_malade" style="<?php echo $sStyleHidden_nom_malade; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_nom_malade_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_nom_malade_label" style=""><span id="id_label_nom_malade"><?php echo $this->nm_new_label['nom_malade']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['nom_malade']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['nom_malade'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["nom_malade"]) &&  $this->nmgp_cmp_readonly["nom_malade"] == "on")) { 

 ?>
<input type="hidden" name="nom_malade" value="<?php echo $this->form_encode_input($nom_malade) . "\"><span id=\"id_ajax_label_nom_malade\">" . $nom_malade . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_nom_malade" class="sc-ui-readonly-nom_malade css_nom_malade_line" style="<?php echo $sStyleReadLab_nom_malade; ?>"><?php echo $this->form_format_readonly("nom_malade", $this->form_encode_input($this->nom_malade)); ?></span><span id="id_read_off_nom_malade" class="css_read_off_nom_malade<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_nom_malade; ?>">
 <input class="sc-js-input scFormObjectOdd css_nom_malade_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_nom_malade" type=text name="nom_malade" value="<?php echo $this->form_encode_input($nom_malade) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=30"; } ?> maxlength=30 alt="{datatype: 'text', maxLength: 30, 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_nom_malade_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nom_malade_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['age_malade']))
    {
        $this->nm_new_label['age_malade'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_age_malade'] . "";
    }
?>
<?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);
   $age_malade = $this->age_malade;
   $sStyleHidden_age_malade = '';
   if (isset($this->nmgp_cmp_hidden['age_malade']) && $this->nmgp_cmp_hidden['age_malade'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['age_malade']);
       $sStyleHidden_age_malade = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_age_malade = 'display: none;';
   $sStyleReadInp_age_malade = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["age_malade"]) &&  $this->nmgp_cmp_readonly["age_malade"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['age_malade']);
       $sStyleReadLab_age_malade = '';
       $sStyleReadInp_age_malade = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['age_malade']) && $this->nmgp_cmp_hidden['age_malade'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="age_malade" value="<?php echo $this->form_encode_input($age_malade) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_age_malade_line" id="hidden_field_data_age_malade" style="<?php echo $sStyleHidden_age_malade; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_age_malade_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_age_malade_label" style=""><span id="id_label_age_malade"><?php echo $this->nm_new_label['age_malade']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['age_malade']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['age_malade'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["age_malade"]) &&  $this->nmgp_cmp_readonly["age_malade"] == "on")) { 

 ?>
<input type="hidden" name="age_malade" value="<?php echo $this->form_encode_input($age_malade) . "\"><span id=\"id_ajax_label_age_malade\">" . $age_malade . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_age_malade" class="sc-ui-readonly-age_malade css_age_malade_line" style="<?php echo $sStyleReadLab_age_malade; ?>"><?php echo $this->form_format_readonly("age_malade", $this->form_encode_input($this->age_malade)); ?></span><span id="id_read_off_age_malade" class="css_read_off_age_malade<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_age_malade; ?>">
 <input class="sc-js-input scFormObjectOdd scFormObjectOddSpin scSpin_age_malade_obj css_age_malade_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_age_malade" type=text name="age_malade" value="<?php echo $this->form_encode_input($age_malade) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=9"; } ?> maxlength=9 alt="{datatype: 'integer', maxLength: 9, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['age_malade']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['age_malade']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, negativePos: <?php echo (4 == $this->field_config['age_malade']['format_neg'] ? "'suffix'" : "'prefix'") ?>, alignment: 'left', 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_age_malade_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_age_malade_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['unite_age_nm_fk']))
    {
        $this->nm_new_label['unite_age_nm_fk'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_unite_age_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);
   $unite_age_nm_fk = $this->unite_age_nm_fk;
   $sStyleHidden_unite_age_nm_fk = '';
   if (isset($this->nmgp_cmp_hidden['unite_age_nm_fk']) && $this->nmgp_cmp_hidden['unite_age_nm_fk'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['unite_age_nm_fk']);
       $sStyleHidden_unite_age_nm_fk = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_unite_age_nm_fk = 'display: none;';
   $sStyleReadInp_unite_age_nm_fk = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["unite_age_nm_fk"]) &&  $this->nmgp_cmp_readonly["unite_age_nm_fk"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['unite_age_nm_fk']);
       $sStyleReadLab_unite_age_nm_fk = '';
       $sStyleReadInp_unite_age_nm_fk = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['unite_age_nm_fk']) && $this->nmgp_cmp_hidden['unite_age_nm_fk'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="unite_age_nm_fk" value="<?php echo $this->form_encode_input($unite_age_nm_fk) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_unite_age_nm_fk_line" id="hidden_field_data_unite_age_nm_fk" style="<?php echo $sStyleHidden_unite_age_nm_fk; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_unite_age_nm_fk_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_unite_age_nm_fk_label" style=""><span id="id_label_unite_age_nm_fk"><?php echo $this->nm_new_label['unite_age_nm_fk']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["unite_age_nm_fk"]) &&  $this->nmgp_cmp_readonly["unite_age_nm_fk"] == "on")) { 

 if ("A" == $this->unite_age_nm_fk) { $unite_age_nm_fk_look = "An(s)";} 
 if ("M" == $this->unite_age_nm_fk) { $unite_age_nm_fk_look = "Mois";} 
 if ("J" == $this->unite_age_nm_fk) { $unite_age_nm_fk_look = "Jour(s)";} 
?>
<input type="hidden" name="unite_age_nm_fk" value="<?php echo $this->form_encode_input($unite_age_nm_fk) . "\"><span id=\"id_ajax_label_unite_age_nm_fk\">" . $unite_age_nm_fk_look . "</span>"; ?>
<?php } else { ?>

<?php

 if ("A" == $this->unite_age_nm_fk) { $unite_age_nm_fk_look = "An(s)";} 
 if ("M" == $this->unite_age_nm_fk) { $unite_age_nm_fk_look = "Mois";} 
 if ("J" == $this->unite_age_nm_fk) { $unite_age_nm_fk_look = "Jour(s)";} 
?>
<span id="id_read_on_unite_age_nm_fk"  class="css_unite_age_nm_fk_line" style="<?php echo $sStyleReadLab_unite_age_nm_fk; ?>"><?php echo $this->form_format_readonly("unite_age_nm_fk", $this->form_encode_input($unite_age_nm_fk_look)); ?></span><span id="id_read_off_unite_age_nm_fk" class="css_read_off_unite_age_nm_fk css_unite_age_nm_fk_line" style="<?php echo $sStyleReadInp_unite_age_nm_fk; ?>"><div id="idAjaxRadio_unite_age_nm_fk" style="display: inline-block"  class="css_unite_age_nm_fk_line">
<TABLE cellspacing=0 cellpadding=0 border=0><TR>
  <TD class="scFormDataFontOdd css_unite_age_nm_fk_line"><?php $tempOptionId = "id-opt-unite_age_nm_fk" . $sc_seq_vert . "-1"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-unite_age_nm_fk sc-ui-radio-unite_age_nm_fk" type=radio name="unite_age_nm_fk" value="A"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_unite_age_nm_fk'][] = 'A'; ?>
<?php  if ("A" == $this->unite_age_nm_fk)  { echo " checked" ;} ?>  onClick="" ><label for="<?php echo $tempOptionId ?>">An(s)</label></TD>
  <TD class="scFormDataFontOdd css_unite_age_nm_fk_line"><?php $tempOptionId = "id-opt-unite_age_nm_fk" . $sc_seq_vert . "-2"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-unite_age_nm_fk sc-ui-radio-unite_age_nm_fk" type=radio name="unite_age_nm_fk" value="M"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_unite_age_nm_fk'][] = 'M'; ?>
<?php  if ("M" == $this->unite_age_nm_fk)  { echo " checked" ;} ?>  onClick="" ><label for="<?php echo $tempOptionId ?>">Mois</label></TD>
  <TD class="scFormDataFontOdd css_unite_age_nm_fk_line"><?php $tempOptionId = "id-opt-unite_age_nm_fk" . $sc_seq_vert . "-3"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-unite_age_nm_fk sc-ui-radio-unite_age_nm_fk" type=radio name="unite_age_nm_fk" value="J"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_unite_age_nm_fk'][] = 'J'; ?>
<?php  if ("J" == $this->unite_age_nm_fk)  { echo " checked" ;} ?>  onClick="" ><label for="<?php echo $tempOptionId ?>">Jour(s)</label></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_unite_age_nm_fk_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_unite_age_nm_fk_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['sexe_nm_fk']))
    {
        $this->nm_new_label['sexe_nm_fk'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_sexe_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);
   $sexe_nm_fk = $this->sexe_nm_fk;
   $sStyleHidden_sexe_nm_fk = '';
   if (isset($this->nmgp_cmp_hidden['sexe_nm_fk']) && $this->nmgp_cmp_hidden['sexe_nm_fk'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['sexe_nm_fk']);
       $sStyleHidden_sexe_nm_fk = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_sexe_nm_fk = 'display: none;';
   $sStyleReadInp_sexe_nm_fk = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["sexe_nm_fk"]) &&  $this->nmgp_cmp_readonly["sexe_nm_fk"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['sexe_nm_fk']);
       $sStyleReadLab_sexe_nm_fk = '';
       $sStyleReadInp_sexe_nm_fk = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['sexe_nm_fk']) && $this->nmgp_cmp_hidden['sexe_nm_fk'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="sexe_nm_fk" value="<?php echo $this->form_encode_input($sexe_nm_fk) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_sexe_nm_fk_line" id="hidden_field_data_sexe_nm_fk" style="<?php echo $sStyleHidden_sexe_nm_fk; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_sexe_nm_fk_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_sexe_nm_fk_label" style=""><span id="id_label_sexe_nm_fk"><?php echo $this->nm_new_label['sexe_nm_fk']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['sexe_nm_fk']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['sexe_nm_fk'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["sexe_nm_fk"]) &&  $this->nmgp_cmp_readonly["sexe_nm_fk"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_nm_fk']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_nm_fk']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_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]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_nm_fk']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_nm_fk']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $nm_comando = "SELECT nomenclature_item_code, nomenclature_item  FROM \"public\".ref_nomenclature_items  WHERE nomenclature_fk = 'SEXE' 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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_sexe_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; 
   $sexe_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->sexe_nm_fk_1))
          {
              foreach ($this->sexe_nm_fk_1 as $tmp_sexe_nm_fk)
              {
                  if (trim($tmp_sexe_nm_fk) === trim($cadaselect[1])) {$sexe_nm_fk_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->sexe_nm_fk) && trim($this->sexe_nm_fk) === trim($cadaselect[1])) {$sexe_nm_fk_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="sexe_nm_fk" value="<?php echo $this->form_encode_input($sexe_nm_fk) . "\"><span id=\"id_ajax_label_sexe_nm_fk\">" . $sexe_nm_fk_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_sexe_nm_fk();
   $x = 0 ; 
   $sexe_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->sexe_nm_fk_1))
          {
              foreach ($this->sexe_nm_fk_1 as $tmp_sexe_nm_fk)
              {
                  if (trim($tmp_sexe_nm_fk) === trim($cadaselect[1])) {$sexe_nm_fk_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->sexe_nm_fk) && trim($this->sexe_nm_fk) === trim($cadaselect[1])) {$sexe_nm_fk_look .= $cadaselect[0];} 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_sexe_nm_fk\" class=\"css_sexe_nm_fk_line\" style=\"" .  $sStyleReadLab_sexe_nm_fk . "\">" . $this->form_format_readonly("sexe_nm_fk", $this->form_encode_input($sexe_nm_fk_look)) . "</span><span id=\"id_read_off_sexe_nm_fk\" class=\"css_read_off_sexe_nm_fk css_sexe_nm_fk_line\" style=\"" . $sStyleReadInp_sexe_nm_fk . "\">";
   echo "<div id=\"idAjaxRadio_sexe_nm_fk\" class=\"css_sexe_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 == 2)
          {
              echo " </tr>\r\n";
              echo " <tr>\r\n";
              $y = 0;
          }
          echo "  <td class=\"scFormDataFontOdd css_sexe_nm_fk_line\">\r\n";
          echo "      <div class=\"sc radio\">";
          $tempOptionId = "id-opt-sexe_nm_fk-" . $x;
          echo "    <input id=\"" . $tempOptionId . "\" type=radio name=\"sexe_nm_fk\" value=\"$cadaradio[1]\" class=\"sc-ui-radio-sexe_nm_fk sc-ui-radio-sexe_nm_fk\"";
          if (trim($this->sexe_nm_fk) === trim($cadaradio[1])) 
          { 
              echo " checked" ; 
          } 
          if (strtoupper($cadaradio[2]) == "S") 
          { 
              if (empty($this->sexe_nm_fk)) 
              { 
                  echo " checked" ; 
              } 
          } 
          echo "  onClick=\"" . $sCheckInsert . "\" >" ; 
          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_sexe_nm_fk_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_sexe_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 $sStyleHidden_nin_dumb = ('' == $sStyleHidden_nin) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_nin_dumb" style="<?php echo $sStyleHidden_nin_dumb; ?>"></TD>
<?php $sStyleHidden_prenom_malade_dumb = ('' == $sStyleHidden_prenom_malade) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_prenom_malade_dumb" style="<?php echo $sStyleHidden_prenom_malade_dumb; ?>"></TD>
<?php $sStyleHidden_nom_malade_dumb = ('' == $sStyleHidden_nom_malade) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_nom_malade_dumb" style="<?php echo $sStyleHidden_nom_malade_dumb; ?>"></TD>
<?php $sStyleHidden_age_malade_dumb = ('' == $sStyleHidden_age_malade) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_age_malade_dumb" style="<?php echo $sStyleHidden_age_malade_dumb; ?>"></TD>
<?php $sStyleHidden_unite_age_nm_fk_dumb = ('' == $sStyleHidden_unite_age_nm_fk) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_unite_age_nm_fk_dumb" style="<?php echo $sStyleHidden_unite_age_nm_fk_dumb; ?>"></TD>
<?php $sStyleHidden_sexe_nm_fk_dumb = ('' == $sStyleHidden_sexe_nm_fk) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_sexe_nm_fk_dumb" style="<?php echo $sStyleHidden_sexe_nm_fk_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_2"></a>
<script type="text/javascript">
function sc_control_tabs_2(iTabIndex)
{
  sc_change_tabs(iTabIndex == 2, 'hidden_bloco_2', 'id_tabs_2_2');
  if (iTabIndex == 2) {
    displayChange_block("2", "on");
  }
  sc_change_tabs(iTabIndex == 3, 'hidden_bloco_3', 'id_tabs_2_3');
  if (iTabIndex == 3) {
    displayChange_block("3", "on");
  }
  sc_change_tabs(iTabIndex == 4, 'hidden_bloco_4', 'id_tabs_2_4');
  if (iTabIndex == 4) {
    displayChange_block("4", "on");
  }
  sc_change_tabs(iTabIndex == 5, 'hidden_bloco_5', 'id_tabs_2_5');
  if (iTabIndex == 5) {
    displayChange_block("5", "on");
  }
  sc_change_tabs(iTabIndex == 6, 'hidden_bloco_6', 'id_tabs_2_6');
  if (iTabIndex == 6) {
    displayChange_block("6", "on");
  }
  sc_change_tabs(iTabIndex == 7, 'hidden_bloco_7', 'id_tabs_2_7');
  if (iTabIndex == 7) {
    displayChange_block("7", "on");
  }
  sc_change_tabs(iTabIndex == 8, 'hidden_bloco_8', 'id_tabs_2_8');
  if (iTabIndex == 8) {
    displayChange_block("8", "on");
  }
  sc_change_tabs(iTabIndex == 9, 'hidden_bloco_9', 'id_tabs_2_9');
  if (iTabIndex == 9) {
    displayChange_block("9", "on");
  }
  sc_change_tabs(iTabIndex == 10, 'hidden_bloco_10', 'id_tabs_2_10');
  if (iTabIndex == 10) {
    displayChange_block("10", "on");
  }
}
</script>
<ul class="scTabLine">
<li id="id_tabs_2_2" class="scTabActive"><a href="javascript: sc_control_tabs_2(2)">Coordonnées</a></li>
<li id="id_tabs_2_3" class="scTabInactive"><a href="javascript: sc_control_tabs_2(3)">Symptômes</a></li>
<li id="id_tabs_2_4" class="scTabInactive"><a href="javascript: sc_control_tabs_2(4)">Maladie</a></li>
<li id="id_tabs_2_5" class="scTabInactive"><a href="javascript: sc_control_tabs_2(5)">Antécédents</a></li>
<li id="id_tabs_2_6" class="scTabInactive"><a href="javascript: sc_control_tabs_2(6)">Prise en charge</a></li>
<li id="id_tabs_2_7" class="scTabInactive"><a href="javascript: sc_control_tabs_2(7)">Evolution</a></li>
<li id="id_tabs_2_8" class="scTabInactive"><a href="javascript: sc_control_tabs_2(8)">Interprétation et commentaires</a></li>
<li id="id_tabs_2_9" class="scTabInactive"><a href="javascript: sc_control_tabs_2(9)">Laboratoire destinataire</a></li>
<li id="id_tabs_2_10" class="scTabInactive"><a href="javascript: sc_control_tabs_2(10)">Résultats d’analyses</a></li>
</ul>
<div style='clear:both'></div>
<div id="div_hidden_bloco_2"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_2" 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['commune']))
           {
               $this->nmgp_cmp_readonly['commune'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['adresse_malade']))
           {
               $this->nmgp_cmp_readonly['adresse_malade'] = 'on';
           }
?>


   <?php
   if (!isset($this->nm_new_label['wilaya']))
   {
       $this->nm_new_label['wilaya'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_wilaya'] . "";
   }
   $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);
   $wilaya = $this->wilaya;
   $sStyleHidden_wilaya = '';
   if (isset($this->nmgp_cmp_hidden['wilaya']) && $this->nmgp_cmp_hidden['wilaya'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wilaya']);
       $sStyleHidden_wilaya = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wilaya = 'display: none;';
   $sStyleReadInp_wilaya = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["wilaya"]) &&  $this->nmgp_cmp_readonly["wilaya"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wilaya']);
       $sStyleReadLab_wilaya = '';
       $sStyleReadInp_wilaya = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wilaya']) && $this->nmgp_cmp_hidden['wilaya'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wilaya" value="<?php echo $this->form_encode_input($this->wilaya) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_wilaya_line" id="hidden_field_data_wilaya" style="<?php echo $sStyleHidden_wilaya; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_wilaya_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_wilaya_label" style=""><span id="id_label_wilaya"><?php echo $this->nm_new_label['wilaya']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['wilaya']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['wilaya'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["wilaya"]) &&  $this->nmgp_cmp_readonly["wilaya"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya'] = 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]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya'] = 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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $symptomes_val_str = "''";
   if (!empty($this->symptomes))
   {
       if (is_array($this->symptomes))
       {
           $Tmp_array = $this->symptomes;
       }
       else
       {
           $Tmp_array = explode(";", $this->symptomes);
       }
       $symptomes_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $symptomes_val_str)
          {
             $symptomes_val_str .= ", ";
          }
          $symptomes_val_str .= "'$Tmp_val_cmp'";
       }
   }
   $type_prelevement_nm_fk_val_str = "''";
   if (!empty($this->type_prelevement_nm_fk))
   {
       if (is_array($this->type_prelevement_nm_fk))
       {
           $Tmp_array = $this->type_prelevement_nm_fk;
       }
       else
       {
           $Tmp_array = explode(";", $this->type_prelevement_nm_fk);
       }
       $type_prelevement_nm_fk_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $type_prelevement_nm_fk_val_str)
          {
             $type_prelevement_nm_fk_val_str .= ", ";
          }
          $type_prelevement_nm_fk_val_str .= "'$Tmp_val_cmp'";
       }
   }
   $nm_comando = "SELECT code_wilaya, concat(code_wilaya, ' - ', nom_wilaya)  FROM \"public\".wilaya  ORDER BY code_wilaya";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya'][] = $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; 
   $wilaya_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->wilaya_1))
          {
              foreach ($this->wilaya_1 as $tmp_wilaya)
              {
                  if (trim($tmp_wilaya) === trim($cadaselect[1])) {$wilaya_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->wilaya) && trim($this->wilaya) === trim($cadaselect[1])) {$wilaya_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="wilaya" value="<?php echo $this->form_encode_input($wilaya) . "\"><span id=\"id_ajax_label_wilaya\">" . $wilaya_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_wilaya();
   $x = 0 ; 
   $wilaya_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->wilaya_1))
          {
              foreach ($this->wilaya_1 as $tmp_wilaya)
              {
                  if (trim($tmp_wilaya) === trim($cadaselect[1])) {$wilaya_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->wilaya) && trim($this->wilaya) === trim($cadaselect[1])) { $wilaya_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($wilaya_look))
          {
              $wilaya_look = $this->wilaya;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_wilaya\" class=\"css_wilaya_line\" style=\"" .  $sStyleReadLab_wilaya . "\">" . $this->form_format_readonly("wilaya", $this->form_encode_input($wilaya_look)) . "</span><span id=\"id_read_off_wilaya\" class=\"css_read_off_wilaya" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_wilaya . "\">";
   echo " <span id=\"idAjaxSelect_wilaya\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_wilaya_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_wilaya\" name=\"wilaya\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_wilaya'][] = ''; 
   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->wilaya) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wilaya)) 
              {
                  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_wilaya_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wilaya_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
   if (!isset($this->nm_new_label['commune']))
   {
       $this->nm_new_label['commune'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_commune'] . "";
   }
   $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);
   $commune = $this->commune;
   $sStyleHidden_commune = '';
   if (isset($this->nmgp_cmp_hidden['commune']) && $this->nmgp_cmp_hidden['commune'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['commune']);
       $sStyleHidden_commune = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_commune = 'display: none;';
   $sStyleReadInp_commune = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["commune"]) &&  $this->nmgp_cmp_readonly["commune"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['commune']);
       $sStyleReadLab_commune = '';
       $sStyleReadInp_commune = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['commune']) && $this->nmgp_cmp_hidden['commune'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="commune" value="<?php echo $this->form_encode_input($this->commune) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_commune_line" id="hidden_field_data_commune" style="<?php echo $sStyleHidden_commune; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_commune_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_commune_label" style=""><span id="id_label_commune"><?php echo $this->nm_new_label['commune']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['commune']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['commune'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["commune"]) &&  $this->nmgp_cmp_readonly["commune"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune'] = 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]['form_fiche_pro_sante_confirme_edit']['Lookup_commune']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune'] = 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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $nm_comando = "SELECT code_commune, nom_commune  FROM \"public\".commune  WHERE code_wilaya = '$this->wilaya' ORDER BY nom_commune";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_commune'][] = $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; 
   $commune_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->commune_1))
          {
              foreach ($this->commune_1 as $tmp_commune)
              {
                  if (trim($tmp_commune) === trim($cadaselect[1])) {$commune_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->commune) && trim($this->commune) === trim($cadaselect[1])) {$commune_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="commune" value="<?php echo $this->form_encode_input($commune) . "\"><span id=\"id_ajax_label_commune\">" . $commune_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_commune();
   $x = 0 ; 
   $commune_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->commune_1))
          {
              foreach ($this->commune_1 as $tmp_commune)
              {
                  if (trim($tmp_commune) === trim($cadaselect[1])) {$commune_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->commune) && trim($this->commune) === trim($cadaselect[1])) { $commune_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($commune_look))
          {
              $commune_look = $this->commune;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_commune\" class=\"css_commune_line\" style=\"" .  $sStyleReadLab_commune . "\">" . $this->form_format_readonly("commune", $this->form_encode_input($commune_look)) . "</span><span id=\"id_read_off_commune\" class=\"css_read_off_commune" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_commune . "\">";
   echo " <span id=\"idAjaxSelect_commune\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_commune_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_commune\" name=\"commune\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_commune'][] = ''; 
   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->commune) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->commune)) 
              {
                  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_commune_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_commune_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_wilaya_dumb = ('' == $sStyleHidden_wilaya) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wilaya_dumb" style="<?php echo $sStyleHidden_wilaya_dumb; ?>"></TD>
<?php $sStyleHidden_commune_dumb = ('' == $sStyleHidden_commune) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_commune_dumb" style="<?php echo $sStyleHidden_commune_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['lieu_travail']))
           {
               $this->nmgp_cmp_readonly['lieu_travail'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['tel_malade']))
           {
               $this->nmgp_cmp_readonly['tel_malade'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['adresse_malade']))
    {
        $this->nm_new_label['adresse_malade'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_adresse_malade'] . "";
    }
?>
<?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);
   $adresse_malade = $this->adresse_malade;
   $sStyleHidden_adresse_malade = '';
   if (isset($this->nmgp_cmp_hidden['adresse_malade']) && $this->nmgp_cmp_hidden['adresse_malade'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['adresse_malade']);
       $sStyleHidden_adresse_malade = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_adresse_malade = 'display: none;';
   $sStyleReadInp_adresse_malade = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["adresse_malade"]) &&  $this->nmgp_cmp_readonly["adresse_malade"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['adresse_malade']);
       $sStyleReadLab_adresse_malade = '';
       $sStyleReadInp_adresse_malade = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['adresse_malade']) && $this->nmgp_cmp_hidden['adresse_malade'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="adresse_malade" value="<?php echo $this->form_encode_input($adresse_malade) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_adresse_malade_line" id="hidden_field_data_adresse_malade" style="<?php echo $sStyleHidden_adresse_malade; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_adresse_malade_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_adresse_malade_label" style=""><span id="id_label_adresse_malade"><?php echo $this->nm_new_label['adresse_malade']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["adresse_malade"]) &&  $this->nmgp_cmp_readonly["adresse_malade"] == "on")) { 

 ?>
<input type="hidden" name="adresse_malade" value="<?php echo $this->form_encode_input($adresse_malade) . "\"><span id=\"id_ajax_label_adresse_malade\">" . $adresse_malade . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_adresse_malade" class="sc-ui-readonly-adresse_malade css_adresse_malade_line" style="<?php echo $sStyleReadLab_adresse_malade; ?>"><?php echo $this->form_format_readonly("adresse_malade", $this->form_encode_input($this->adresse_malade)); ?></span><span id="id_read_off_adresse_malade" class="css_read_off_adresse_malade<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_adresse_malade; ?>">
 <input class="sc-js-input scFormObjectOdd css_adresse_malade_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_adresse_malade" type=text name="adresse_malade" value="<?php echo $this->form_encode_input($adresse_malade) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=20"; } ?> maxlength=20 alt="{datatype: 'text', maxLength: 20, 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_adresse_malade_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_adresse_malade_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['lieu_travail']))
    {
        $this->nm_new_label['lieu_travail'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_lieu_travail'] . "";
    }
?>
<?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);
   $lieu_travail = $this->lieu_travail;
   $sStyleHidden_lieu_travail = '';
   if (isset($this->nmgp_cmp_hidden['lieu_travail']) && $this->nmgp_cmp_hidden['lieu_travail'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['lieu_travail']);
       $sStyleHidden_lieu_travail = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_lieu_travail = 'display: none;';
   $sStyleReadInp_lieu_travail = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["lieu_travail"]) &&  $this->nmgp_cmp_readonly["lieu_travail"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['lieu_travail']);
       $sStyleReadLab_lieu_travail = '';
       $sStyleReadInp_lieu_travail = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['lieu_travail']) && $this->nmgp_cmp_hidden['lieu_travail'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="lieu_travail" value="<?php echo $this->form_encode_input($lieu_travail) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_lieu_travail_line" id="hidden_field_data_lieu_travail" style="<?php echo $sStyleHidden_lieu_travail; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_lieu_travail_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_lieu_travail_label" style=""><span id="id_label_lieu_travail"><?php echo $this->nm_new_label['lieu_travail']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["lieu_travail"]) &&  $this->nmgp_cmp_readonly["lieu_travail"] == "on")) { 

 ?>
<input type="hidden" name="lieu_travail" value="<?php echo $this->form_encode_input($lieu_travail) . "\"><span id=\"id_ajax_label_lieu_travail\">" . $lieu_travail . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_lieu_travail" class="sc-ui-readonly-lieu_travail css_lieu_travail_line" style="<?php echo $sStyleReadLab_lieu_travail; ?>"><?php echo $this->form_format_readonly("lieu_travail", $this->form_encode_input($this->lieu_travail)); ?></span><span id="id_read_off_lieu_travail" class="css_read_off_lieu_travail<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_lieu_travail; ?>">
 <input class="sc-js-input scFormObjectOdd css_lieu_travail_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_lieu_travail" type=text name="lieu_travail" value="<?php echo $this->form_encode_input($lieu_travail) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=255 alt="{datatype: 'text', maxLength: 255, 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_lieu_travail_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_lieu_travail_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_adresse_malade_dumb = ('' == $sStyleHidden_adresse_malade) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_adresse_malade_dumb" style="<?php echo $sStyleHidden_adresse_malade_dumb; ?>"></TD>
<?php $sStyleHidden_lieu_travail_dumb = ('' == $sStyleHidden_lieu_travail) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_lieu_travail_dumb" style="<?php echo $sStyleHidden_lieu_travail_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['email_malade']))
           {
               $this->nmgp_cmp_readonly['email_malade'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['pays_origine']))
           {
               $this->nmgp_cmp_readonly['pays_origine'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['tel_malade']))
    {
        $this->nm_new_label['tel_malade'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_tel_malade'] . "";
    }
?>
<?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);
   $tel_malade = $this->tel_malade;
   $sStyleHidden_tel_malade = '';
   if (isset($this->nmgp_cmp_hidden['tel_malade']) && $this->nmgp_cmp_hidden['tel_malade'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['tel_malade']);
       $sStyleHidden_tel_malade = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_tel_malade = 'display: none;';
   $sStyleReadInp_tel_malade = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["tel_malade"]) &&  $this->nmgp_cmp_readonly["tel_malade"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['tel_malade']);
       $sStyleReadLab_tel_malade = '';
       $sStyleReadInp_tel_malade = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['tel_malade']) && $this->nmgp_cmp_hidden['tel_malade'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="tel_malade" value="<?php echo $this->form_encode_input($tel_malade) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_tel_malade_line" id="hidden_field_data_tel_malade" style="<?php echo $sStyleHidden_tel_malade; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_tel_malade_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_tel_malade_label" style=""><span id="id_label_tel_malade"><?php echo $this->nm_new_label['tel_malade']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["tel_malade"]) &&  $this->nmgp_cmp_readonly["tel_malade"] == "on")) { 

 ?>
<input type="hidden" name="tel_malade" value="<?php echo $this->form_encode_input($tel_malade) . "\"><span id=\"id_ajax_label_tel_malade\">" . $tel_malade . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_tel_malade" class="sc-ui-readonly-tel_malade css_tel_malade_line" style="<?php echo $sStyleReadLab_tel_malade; ?>"><?php echo $this->form_format_readonly("tel_malade", $this->form_encode_input($this->tel_malade)); ?></span><span id="id_read_off_tel_malade" class="css_read_off_tel_malade<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_tel_malade; ?>">
 <input class="sc-js-input scFormObjectOdd css_tel_malade_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_tel_malade" type=text name="tel_malade" value="<?php echo $this->form_encode_input($tel_malade) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> maxlength=10 alt="{datatype: 'text', maxLength: 10, 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_tel_malade_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_tel_malade_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['email_malade']))
    {
        $this->nm_new_label['email_malade'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_email_malade'] . "";
    }
?>
<?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);
   $email_malade = $this->email_malade;
   $sStyleHidden_email_malade = '';
   if (isset($this->nmgp_cmp_hidden['email_malade']) && $this->nmgp_cmp_hidden['email_malade'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['email_malade']);
       $sStyleHidden_email_malade = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_email_malade = 'display: none;';
   $sStyleReadInp_email_malade = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["email_malade"]) &&  $this->nmgp_cmp_readonly["email_malade"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['email_malade']);
       $sStyleReadLab_email_malade = '';
       $sStyleReadInp_email_malade = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['email_malade']) && $this->nmgp_cmp_hidden['email_malade'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="email_malade" value="<?php echo $this->form_encode_input($email_malade) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_email_malade_line" id="hidden_field_data_email_malade" style="<?php echo $sStyleHidden_email_malade; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_email_malade_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_email_malade_label" style=""><span id="id_label_email_malade"><?php echo $this->nm_new_label['email_malade']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["email_malade"]) &&  $this->nmgp_cmp_readonly["email_malade"] == "on")) { 

 ?>
<input type="hidden" name="email_malade" value="<?php echo $this->form_encode_input($email_malade) . "\"><span id=\"id_ajax_label_email_malade\">" . $email_malade . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_email_malade" class="sc-ui-readonly-email_malade css_email_malade_line" style="<?php echo $sStyleReadLab_email_malade; ?>"><?php echo $this->form_format_readonly("email_malade", $this->form_encode_input($this->email_malade)); ?></span><span id="id_read_off_email_malade" class="css_read_off_email_malade<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_email_malade; ?>">
 <input class="sc-js-input scFormObjectOdd css_email_malade_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_email_malade" type=text name="email_malade" value="<?php echo $this->form_encode_input($email_malade) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=60 alt="{enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >&nbsp;<?php if ($this->nmgp_opcao != "novo"){ ?><?php echo nmButtonOutput($this->arr_buttons, "bemail", "if (document.F1.email_malade.value != '') {window.open('mailto:' + document.F1.email_malade.value); }", "if (document.F1.email_malade.value != '') {window.open('mailto:' + document.F1.email_malade.value); }", "email_malade_mail", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
<?php } ?>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_email_malade_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_email_malade_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_tel_malade_dumb = ('' == $sStyleHidden_tel_malade) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_tel_malade_dumb" style="<?php echo $sStyleHidden_tel_malade_dumb; ?>"></TD>
<?php $sStyleHidden_email_malade_dumb = ('' == $sStyleHidden_email_malade) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_email_malade_dumb" style="<?php echo $sStyleHidden_email_malade_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['symptomes']))
           {
               $this->nmgp_cmp_readonly['symptomes'] = 'on';
           }
?>


   <?php
   if (!isset($this->nm_new_label['pays_origine']))
   {
       $this->nm_new_label['pays_origine'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_pays_origine'] . "";
   }
   $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);
   $pays_origine = $this->pays_origine;
   $sStyleHidden_pays_origine = '';
   if (isset($this->nmgp_cmp_hidden['pays_origine']) && $this->nmgp_cmp_hidden['pays_origine'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['pays_origine']);
       $sStyleHidden_pays_origine = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_pays_origine = 'display: none;';
   $sStyleReadInp_pays_origine = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["pays_origine"]) &&  $this->nmgp_cmp_readonly["pays_origine"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['pays_origine']);
       $sStyleReadLab_pays_origine = '';
       $sStyleReadInp_pays_origine = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['pays_origine']) && $this->nmgp_cmp_hidden['pays_origine'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="pays_origine" value="<?php echo $this->form_encode_input($this->pays_origine) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_pays_origine_line" id="hidden_field_data_pays_origine" style="<?php echo $sStyleHidden_pays_origine; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_pays_origine_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_pays_origine_label" style=""><span id="id_label_pays_origine"><?php echo $this->nm_new_label['pays_origine']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["pays_origine"]) &&  $this->nmgp_cmp_readonly["pays_origine"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine'] = 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]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine'] = 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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $nm_comando = "select nomenclature_item_code, nomenclature_item from \"public\".ref_nomenclature_items  where nomenclature_fk = 'PAYS' order by nomenclature_item_order, nomenclature_item";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_pays_origine'][] = $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; 
   $pays_origine_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->pays_origine_1))
          {
              foreach ($this->pays_origine_1 as $tmp_pays_origine)
              {
                  if (trim($tmp_pays_origine) === trim($cadaselect[1])) {$pays_origine_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->pays_origine) && trim($this->pays_origine) === trim($cadaselect[1])) {$pays_origine_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="pays_origine" value="<?php echo $this->form_encode_input($pays_origine) . "\"><span id=\"id_ajax_label_pays_origine\">" . $pays_origine_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_pays_origine();
   $x = 0 ; 
   $pays_origine_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->pays_origine_1))
          {
              foreach ($this->pays_origine_1 as $tmp_pays_origine)
              {
                  if (trim($tmp_pays_origine) === trim($cadaselect[1])) {$pays_origine_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->pays_origine) && trim($this->pays_origine) === trim($cadaselect[1])) { $pays_origine_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($pays_origine_look))
          {
              $pays_origine_look = $this->pays_origine;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_pays_origine\" class=\"css_pays_origine_line\" style=\"" .  $sStyleReadLab_pays_origine . "\">" . $this->form_format_readonly("pays_origine", $this->form_encode_input($pays_origine_look)) . "</span><span id=\"id_read_off_pays_origine\" class=\"css_read_off_pays_origine" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_pays_origine . "\">";
   echo " <span id=\"idAjaxSelect_pays_origine\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_pays_origine_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_pays_origine\" name=\"pays_origine\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   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->pays_origine) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->pays_origine)) 
              {
                  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_pays_origine_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_pays_origine_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


    <TD class="scFormDataOdd" colspan="1" >&nbsp;</TD>





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


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





<?php } ?>
<?php $sStyleHidden_pays_origine_dumb = ('' == $sStyleHidden_pays_origine) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_pays_origine_dumb" style="<?php echo $sStyleHidden_pays_origine_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_3"></a>
<div id="div_hidden_bloco_3" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_3" 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['autres_symptomes']))
           {
               $this->nmgp_cmp_readonly['autres_symptomes'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['maladie_suspectee_by_ia']))
           {
               $this->nmgp_cmp_readonly['maladie_suspectee_by_ia'] = 'on';
           }
?>


   <?php
   if (!isset($this->nm_new_label['symptomes']))
   {
       $this->nm_new_label['symptomes'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_symptomes'] . "";
   }
   $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);
   $symptomes = $this->symptomes;
   $sStyleHidden_symptomes = '';
   if (isset($this->nmgp_cmp_hidden['symptomes']) && $this->nmgp_cmp_hidden['symptomes'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['symptomes']);
       $sStyleHidden_symptomes = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_symptomes = 'display: none;';
   $sStyleReadInp_symptomes = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["symptomes"]) &&  $this->nmgp_cmp_readonly["symptomes"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['symptomes']);
       $sStyleReadLab_symptomes = '';
       $sStyleReadInp_symptomes = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['symptomes']) && $this->nmgp_cmp_hidden['symptomes'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="symptomes" value="<?php echo $this->form_encode_input($this->symptomes) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>
<?php  $this->symptomes_1 = explode(";", trim($this->symptomes)) ; ?>
    <TD class="scFormDataOdd css_symptomes_line" id="hidden_field_data_symptomes" style="<?php echo $sStyleHidden_symptomes; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_symptomes_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_symptomes_label" style=""><span id="id_label_symptomes"><?php echo $this->nm_new_label['symptomes']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["symptomes"]) &&  $this->nmgp_cmp_readonly["symptomes"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes'] = 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]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes'] = 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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $nm_comando = "SELECT nomenclature_item_code, nomenclature_item  FROM \"public\".ref_nomenclature_items  WHERE nomenclature_fk = 'SYMPTOMES' 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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_symptomes'][] = $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; 
   $symptomes_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]); } ; 
          foreach ($this->symptomes_1 as $Dados)
          {
              if ($Dados === $cadaselect[1])
              {
                  $symptomes_look .= $cadaselect[0] . "&nbsp;";
                  break;
              }
          }
          $x++; 
   }

?>
<input type="hidden" name="symptomes" value="<?php echo $this->form_encode_input($symptomes) . "\"><span id=\"id_ajax_label_symptomes\">" . $symptomes_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_symptomes();
   $x = 0 ; 
   $symptomes_look = ""; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          foreach ($this->symptomes_1 as $Dados)
          {
              if ($Dados === $cadaselect[1])
              {
                  $symptomes_look .= $cadaselect[0] . "<br>";
                  break;
              }
          }
          $x++; 
   }
          if (empty($symptomes_look))
          {
              $symptomes_look = $this->symptomes;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_symptomes\" class=\"css_symptomes_line\" style=\"" .  $sStyleReadLab_symptomes . "\">" . $this->form_format_readonly("symptomes", $this->form_encode_input($symptomes_look)) . "</span><span id=\"id_read_off_symptomes\" class=\"css_read_off_symptomes" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_symptomes . "\">";
   echo " <span id=\"idAjaxSelect_symptomes\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_symptomes_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_symptomes\" name=\"symptomes[]\" size=\"1\" alt=\"{type: 'select', enterTab: false}\" multiple>" ; 
   echo "\r" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          foreach ($this->symptomes_1 as $Dados)
          {
              if ($Dados === $cadaselect[1])
              {
                  echo " selected" ; 
                  break;
              }
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->symptomes)) 
              {
                  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_symptomes_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_symptomes_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['autres_symptomes']))
    {
        $this->nm_new_label['autres_symptomes'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_autres_symptomes'] . "";
    }
?>
<?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);
   $autres_symptomes = $this->autres_symptomes;
   $sStyleHidden_autres_symptomes = '';
   if (isset($this->nmgp_cmp_hidden['autres_symptomes']) && $this->nmgp_cmp_hidden['autres_symptomes'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['autres_symptomes']);
       $sStyleHidden_autres_symptomes = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_autres_symptomes = 'display: none;';
   $sStyleReadInp_autres_symptomes = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["autres_symptomes"]) &&  $this->nmgp_cmp_readonly["autres_symptomes"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['autres_symptomes']);
       $sStyleReadLab_autres_symptomes = '';
       $sStyleReadInp_autres_symptomes = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['autres_symptomes']) && $this->nmgp_cmp_hidden['autres_symptomes'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="autres_symptomes" value="<?php echo $this->form_encode_input($autres_symptomes) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_autres_symptomes_line" id="hidden_field_data_autres_symptomes" style="<?php echo $sStyleHidden_autres_symptomes; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_autres_symptomes_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_autres_symptomes_label" style=""><span id="id_label_autres_symptomes"><?php echo $this->nm_new_label['autres_symptomes']; ?></span></span><br>
<?php
$autres_symptomes_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($autres_symptomes));

?>

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

 ?>
<input type="hidden" name="autres_symptomes" value="<?php echo $this->form_encode_input($autres_symptomes) . "\"><span id=\"id_ajax_label_autres_symptomes\">" . $autres_symptomes_val . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_autres_symptomes" class="sc-ui-readonly-autres_symptomes css_autres_symptomes_line" style="<?php echo $sStyleReadLab_autres_symptomes; ?>"><?php echo $this->form_format_readonly("autres_symptomes", $this->form_encode_input($autres_symptomes_val)); ?></span><span id="id_read_off_autres_symptomes" class="css_read_off_autres_symptomes<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_autres_symptomes; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_autres_symptomes_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="autres_symptomes" id="id_sc_field_autres_symptomes" rows="2" cols="30"
 alt="{datatype: 'text', maxLength: 255, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $autres_symptomes; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_autres_symptomes_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_autres_symptomes_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


    <TD class="scFormDataOdd" colspan="1" >&nbsp;</TD>





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


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





<?php } ?>
<?php $sStyleHidden_symptomes_dumb = ('' == $sStyleHidden_symptomes) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_symptomes_dumb" style="<?php echo $sStyleHidden_symptomes_dumb; ?>"></TD>
<?php $sStyleHidden_autres_symptomes_dumb = ('' == $sStyleHidden_autres_symptomes) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_autres_symptomes_dumb" style="<?php echo $sStyleHidden_autres_symptomes_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_4"></a>
<div id="div_hidden_bloco_4" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_4" 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['maladie_suspectee_nm_fk']))
           {
               $this->nmgp_cmp_readonly['maladie_suspectee_nm_fk'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['antecedent_medicaux']))
           {
               $this->nmgp_cmp_readonly['antecedent_medicaux'] = 'on';
           }
?>


   <?php
   if (!isset($this->nm_new_label['maladie_suspectee_by_ia']))
   {
       $this->nm_new_label['maladie_suspectee_by_ia'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_maladie_suspectee_by_ia'] . "";
   }
   $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);
   $maladie_suspectee_by_ia = $this->maladie_suspectee_by_ia;
   $sStyleHidden_maladie_suspectee_by_ia = '';
   if (isset($this->nmgp_cmp_hidden['maladie_suspectee_by_ia']) && $this->nmgp_cmp_hidden['maladie_suspectee_by_ia'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['maladie_suspectee_by_ia']);
       $sStyleHidden_maladie_suspectee_by_ia = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_maladie_suspectee_by_ia = 'display: none;';
   $sStyleReadInp_maladie_suspectee_by_ia = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["maladie_suspectee_by_ia"]) &&  $this->nmgp_cmp_readonly["maladie_suspectee_by_ia"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['maladie_suspectee_by_ia']);
       $sStyleReadLab_maladie_suspectee_by_ia = '';
       $sStyleReadInp_maladie_suspectee_by_ia = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['maladie_suspectee_by_ia']) && $this->nmgp_cmp_hidden['maladie_suspectee_by_ia'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="maladie_suspectee_by_ia" value="<?php echo $this->form_encode_input($this->maladie_suspectee_by_ia) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_maladie_suspectee_by_ia_line" id="hidden_field_data_maladie_suspectee_by_ia" style="<?php echo $sStyleHidden_maladie_suspectee_by_ia; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_maladie_suspectee_by_ia_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_maladie_suspectee_by_ia_label" style=""><span id="id_label_maladie_suspectee_by_ia"><?php echo $this->nm_new_label['maladie_suspectee_by_ia']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["maladie_suspectee_by_ia"]) &&  $this->nmgp_cmp_readonly["maladie_suspectee_by_ia"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia'] = 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]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia'] = 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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $nm_comando = "SELECT nomenclature_item_code, nomenclature_item  FROM \"public\".ref_nomenclature_items  WHERE nomenclature_fk = 'MALADIES' 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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_by_ia'][] = $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; 
   $maladie_suspectee_by_ia_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->maladie_suspectee_by_ia_1))
          {
              foreach ($this->maladie_suspectee_by_ia_1 as $tmp_maladie_suspectee_by_ia)
              {
                  if (trim($tmp_maladie_suspectee_by_ia) === trim($cadaselect[1])) {$maladie_suspectee_by_ia_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->maladie_suspectee_by_ia) && trim($this->maladie_suspectee_by_ia) === trim($cadaselect[1])) {$maladie_suspectee_by_ia_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="maladie_suspectee_by_ia" value="<?php echo $this->form_encode_input($maladie_suspectee_by_ia) . "\"><span id=\"id_ajax_label_maladie_suspectee_by_ia\">" . $maladie_suspectee_by_ia_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_maladie_suspectee_by_ia();
   $x = 0 ; 
   $maladie_suspectee_by_ia_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->maladie_suspectee_by_ia_1))
          {
              foreach ($this->maladie_suspectee_by_ia_1 as $tmp_maladie_suspectee_by_ia)
              {
                  if (trim($tmp_maladie_suspectee_by_ia) === trim($cadaselect[1])) {$maladie_suspectee_by_ia_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->maladie_suspectee_by_ia) && trim($this->maladie_suspectee_by_ia) === trim($cadaselect[1])) { $maladie_suspectee_by_ia_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($maladie_suspectee_by_ia_look))
          {
              $maladie_suspectee_by_ia_look = $this->maladie_suspectee_by_ia;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_maladie_suspectee_by_ia\" class=\"css_maladie_suspectee_by_ia_line\" style=\"" .  $sStyleReadLab_maladie_suspectee_by_ia . "\">" . $this->form_format_readonly("maladie_suspectee_by_ia", $this->form_encode_input($maladie_suspectee_by_ia_look)) . "</span><span id=\"id_read_off_maladie_suspectee_by_ia\" class=\"css_read_off_maladie_suspectee_by_ia" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_maladie_suspectee_by_ia . "\">";
   echo " <span id=\"idAjaxSelect_maladie_suspectee_by_ia\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_maladie_suspectee_by_ia_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_maladie_suspectee_by_ia\" name=\"maladie_suspectee_by_ia\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   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->maladie_suspectee_by_ia) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->maladie_suspectee_by_ia)) 
              {
                  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_maladie_suspectee_by_ia_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_maladie_suspectee_by_ia_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
   if (!isset($this->nm_new_label['maladie_suspectee_nm_fk']))
   {
       $this->nm_new_label['maladie_suspectee_nm_fk'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_maladie_suspectee_nm_fk'] . "";
   }
   $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);
   $maladie_suspectee_nm_fk = $this->maladie_suspectee_nm_fk;
   $sStyleHidden_maladie_suspectee_nm_fk = '';
   if (isset($this->nmgp_cmp_hidden['maladie_suspectee_nm_fk']) && $this->nmgp_cmp_hidden['maladie_suspectee_nm_fk'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['maladie_suspectee_nm_fk']);
       $sStyleHidden_maladie_suspectee_nm_fk = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_maladie_suspectee_nm_fk = 'display: none;';
   $sStyleReadInp_maladie_suspectee_nm_fk = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["maladie_suspectee_nm_fk"]) &&  $this->nmgp_cmp_readonly["maladie_suspectee_nm_fk"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['maladie_suspectee_nm_fk']);
       $sStyleReadLab_maladie_suspectee_nm_fk = '';
       $sStyleReadInp_maladie_suspectee_nm_fk = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['maladie_suspectee_nm_fk']) && $this->nmgp_cmp_hidden['maladie_suspectee_nm_fk'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="maladie_suspectee_nm_fk" value="<?php echo $this->form_encode_input($this->maladie_suspectee_nm_fk) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_maladie_suspectee_nm_fk_line" id="hidden_field_data_maladie_suspectee_nm_fk" style="<?php echo $sStyleHidden_maladie_suspectee_nm_fk; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_maladie_suspectee_nm_fk_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_maladie_suspectee_nm_fk_label" style=""><span id="id_label_maladie_suspectee_nm_fk"><?php echo $this->nm_new_label['maladie_suspectee_nm_fk']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["maladie_suspectee_nm_fk"]) &&  $this->nmgp_cmp_readonly["maladie_suspectee_nm_fk"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_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]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $nm_comando = "SELECT nomenclature_item_code, nomenclature_item  FROM \"public\".ref_nomenclature_items  WHERE nomenclature_fk = 'MALADIES' 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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_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; 
   $maladie_suspectee_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->maladie_suspectee_nm_fk_1))
          {
              foreach ($this->maladie_suspectee_nm_fk_1 as $tmp_maladie_suspectee_nm_fk)
              {
                  if (trim($tmp_maladie_suspectee_nm_fk) === trim($cadaselect[1])) {$maladie_suspectee_nm_fk_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->maladie_suspectee_nm_fk) && trim($this->maladie_suspectee_nm_fk) === trim($cadaselect[1])) {$maladie_suspectee_nm_fk_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="maladie_suspectee_nm_fk" value="<?php echo $this->form_encode_input($maladie_suspectee_nm_fk) . "\"><span id=\"id_ajax_label_maladie_suspectee_nm_fk\">" . $maladie_suspectee_nm_fk_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_maladie_suspectee_nm_fk();
   $x = 0 ; 
   $maladie_suspectee_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->maladie_suspectee_nm_fk_1))
          {
              foreach ($this->maladie_suspectee_nm_fk_1 as $tmp_maladie_suspectee_nm_fk)
              {
                  if (trim($tmp_maladie_suspectee_nm_fk) === trim($cadaselect[1])) {$maladie_suspectee_nm_fk_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->maladie_suspectee_nm_fk) && trim($this->maladie_suspectee_nm_fk) === trim($cadaselect[1])) { $maladie_suspectee_nm_fk_look .= $cadaselect[0]; } 
          $x++; 
   }
          if (empty($maladie_suspectee_nm_fk_look))
          {
              $maladie_suspectee_nm_fk_look = $this->maladie_suspectee_nm_fk;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_maladie_suspectee_nm_fk\" class=\"css_maladie_suspectee_nm_fk_line\" style=\"" .  $sStyleReadLab_maladie_suspectee_nm_fk . "\">" . $this->form_format_readonly("maladie_suspectee_nm_fk", $this->form_encode_input($maladie_suspectee_nm_fk_look)) . "</span><span id=\"id_read_off_maladie_suspectee_nm_fk\" class=\"css_read_off_maladie_suspectee_nm_fk" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_maladie_suspectee_nm_fk . "\">";
   echo " <span id=\"idAjaxSelect_maladie_suspectee_nm_fk\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_maladie_suspectee_nm_fk_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_maladie_suspectee_nm_fk\" name=\"maladie_suspectee_nm_fk\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_maladie_suspectee_nm_fk'][] = ''; 
   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->maladie_suspectee_nm_fk) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->maladie_suspectee_nm_fk)) 
              {
                  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_maladie_suspectee_nm_fk_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_maladie_suspectee_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 $sStyleHidden_maladie_suspectee_by_ia_dumb = ('' == $sStyleHidden_maladie_suspectee_by_ia) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_maladie_suspectee_by_ia_dumb" style="<?php echo $sStyleHidden_maladie_suspectee_by_ia_dumb; ?>"></TD>
<?php $sStyleHidden_maladie_suspectee_nm_fk_dumb = ('' == $sStyleHidden_maladie_suspectee_nm_fk) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_maladie_suspectee_nm_fk_dumb" style="<?php echo $sStyleHidden_maladie_suspectee_nm_fk_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_5"></a>
<div id="div_hidden_bloco_5" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_5" 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['lieux_frequentes']))
           {
               $this->nmgp_cmp_readonly['lieux_frequentes'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['cas_similaires']))
           {
               $this->nmgp_cmp_readonly['cas_similaires'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['antecedent_medicaux']))
    {
        $this->nm_new_label['antecedent_medicaux'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_antecedent_medicaux'] . "";
    }
?>
<?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);
   $antecedent_medicaux = $this->antecedent_medicaux;
   $sStyleHidden_antecedent_medicaux = '';
   if (isset($this->nmgp_cmp_hidden['antecedent_medicaux']) && $this->nmgp_cmp_hidden['antecedent_medicaux'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['antecedent_medicaux']);
       $sStyleHidden_antecedent_medicaux = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_antecedent_medicaux = 'display: none;';
   $sStyleReadInp_antecedent_medicaux = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["antecedent_medicaux"]) &&  $this->nmgp_cmp_readonly["antecedent_medicaux"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['antecedent_medicaux']);
       $sStyleReadLab_antecedent_medicaux = '';
       $sStyleReadInp_antecedent_medicaux = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['antecedent_medicaux']) && $this->nmgp_cmp_hidden['antecedent_medicaux'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="antecedent_medicaux" value="<?php echo $this->form_encode_input($antecedent_medicaux) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_antecedent_medicaux_line" id="hidden_field_data_antecedent_medicaux" style="<?php echo $sStyleHidden_antecedent_medicaux; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_antecedent_medicaux_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_antecedent_medicaux_label" style=""><span id="id_label_antecedent_medicaux"><?php echo $this->nm_new_label['antecedent_medicaux']; ?></span></span><br>
<?php
$antecedent_medicaux_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($antecedent_medicaux));

?>

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

 ?>
<input type="hidden" name="antecedent_medicaux" value="<?php echo $this->form_encode_input($antecedent_medicaux) . "\"><span id=\"id_ajax_label_antecedent_medicaux\">" . $antecedent_medicaux_val . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_antecedent_medicaux" class="sc-ui-readonly-antecedent_medicaux css_antecedent_medicaux_line" style="<?php echo $sStyleReadLab_antecedent_medicaux; ?>"><?php echo $this->form_format_readonly("antecedent_medicaux", $this->form_encode_input($antecedent_medicaux_val)); ?></span><span id="id_read_off_antecedent_medicaux" class="css_read_off_antecedent_medicaux<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_antecedent_medicaux; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_antecedent_medicaux_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="antecedent_medicaux" id="id_sc_field_antecedent_medicaux" rows="2" cols="30"
 alt="{datatype: 'text', maxLength: 255, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $antecedent_medicaux; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_antecedent_medicaux_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_antecedent_medicaux_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['lieux_frequentes']))
    {
        $this->nm_new_label['lieux_frequentes'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_lieux_frequentes'] . "";
    }
?>
<?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);
   $lieux_frequentes = $this->lieux_frequentes;
   $sStyleHidden_lieux_frequentes = '';
   if (isset($this->nmgp_cmp_hidden['lieux_frequentes']) && $this->nmgp_cmp_hidden['lieux_frequentes'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['lieux_frequentes']);
       $sStyleHidden_lieux_frequentes = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_lieux_frequentes = 'display: none;';
   $sStyleReadInp_lieux_frequentes = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["lieux_frequentes"]) &&  $this->nmgp_cmp_readonly["lieux_frequentes"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['lieux_frequentes']);
       $sStyleReadLab_lieux_frequentes = '';
       $sStyleReadInp_lieux_frequentes = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['lieux_frequentes']) && $this->nmgp_cmp_hidden['lieux_frequentes'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="lieux_frequentes" value="<?php echo $this->form_encode_input($lieux_frequentes) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_lieux_frequentes_line" id="hidden_field_data_lieux_frequentes" style="<?php echo $sStyleHidden_lieux_frequentes; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_lieux_frequentes_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_lieux_frequentes_label" style=""><span id="id_label_lieux_frequentes"><?php echo $this->nm_new_label['lieux_frequentes']; ?></span></span><br>
<?php
$lieux_frequentes_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($lieux_frequentes));

?>

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

 ?>
<input type="hidden" name="lieux_frequentes" value="<?php echo $this->form_encode_input($lieux_frequentes) . "\"><span id=\"id_ajax_label_lieux_frequentes\">" . $lieux_frequentes_val . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_lieux_frequentes" class="sc-ui-readonly-lieux_frequentes css_lieux_frequentes_line" style="<?php echo $sStyleReadLab_lieux_frequentes; ?>"><?php echo $this->form_format_readonly("lieux_frequentes", $this->form_encode_input($lieux_frequentes_val)); ?></span><span id="id_read_off_lieux_frequentes" class="css_read_off_lieux_frequentes<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_lieux_frequentes; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_lieux_frequentes_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="lieux_frequentes" id="id_sc_field_lieux_frequentes" rows="2" cols="50"
 alt="{datatype: 'text', maxLength: 255, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $lieux_frequentes; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_lieux_frequentes_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_lieux_frequentes_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_antecedent_medicaux_dumb = ('' == $sStyleHidden_antecedent_medicaux) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_antecedent_medicaux_dumb" style="<?php echo $sStyleHidden_antecedent_medicaux_dumb; ?>"></TD>
<?php $sStyleHidden_lieux_frequentes_dumb = ('' == $sStyleHidden_lieux_frequentes) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_lieux_frequentes_dumb" style="<?php echo $sStyleHidden_lieux_frequentes_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['cas_similaires']))
    {
        $this->nm_new_label['cas_similaires'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_cas_similaires'] . "";
    }
?>
<?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);
   $cas_similaires = $this->cas_similaires;
   $sStyleHidden_cas_similaires = '';
   if (isset($this->nmgp_cmp_hidden['cas_similaires']) && $this->nmgp_cmp_hidden['cas_similaires'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['cas_similaires']);
       $sStyleHidden_cas_similaires = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_cas_similaires = 'display: none;';
   $sStyleReadInp_cas_similaires = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["cas_similaires"]) &&  $this->nmgp_cmp_readonly["cas_similaires"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['cas_similaires']);
       $sStyleReadLab_cas_similaires = '';
       $sStyleReadInp_cas_similaires = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['cas_similaires']) && $this->nmgp_cmp_hidden['cas_similaires'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="cas_similaires" value="<?php echo $this->form_encode_input($cas_similaires) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_cas_similaires_line" id="hidden_field_data_cas_similaires" style="<?php echo $sStyleHidden_cas_similaires; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_cas_similaires_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_cas_similaires_label" style=""><span id="id_label_cas_similaires"><?php echo $this->nm_new_label['cas_similaires']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["cas_similaires"]) &&  $this->nmgp_cmp_readonly["cas_similaires"] == "on")) { 

 if ("O" == $this->cas_similaires) { $cas_similaires_look = "Oui";} 
 if ("N" == $this->cas_similaires) { $cas_similaires_look = "Non";} 
?>
<input type="hidden" name="cas_similaires" value="<?php echo $this->form_encode_input($cas_similaires) . "\"><span id=\"id_ajax_label_cas_similaires\">" . $cas_similaires_look . "</span>"; ?>
<?php } else { ?>

<?php

 if ("O" == $this->cas_similaires) { $cas_similaires_look = "Oui";} 
 if ("N" == $this->cas_similaires) { $cas_similaires_look = "Non";} 
?>
<span id="id_read_on_cas_similaires"  class="css_cas_similaires_line" style="<?php echo $sStyleReadLab_cas_similaires; ?>"><?php echo $this->form_format_readonly("cas_similaires", $this->form_encode_input($cas_similaires_look)); ?></span><span id="id_read_off_cas_similaires" class="css_read_off_cas_similaires css_cas_similaires_line" style="<?php echo $sStyleReadInp_cas_similaires; ?>"><div id="idAjaxRadio_cas_similaires" style="display: inline-block"  class="css_cas_similaires_line">
<TABLE cellspacing=0 cellpadding=0 border=0><TR>
  <TD class="scFormDataFontOdd css_cas_similaires_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-cas_similaires" . $sc_seq_vert . "-1"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-cas_similaires sc-ui-radio-cas_similaires" type=radio name="cas_similaires" value="O"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_cas_similaires'][] = 'O'; ?>
<?php  if ("O" == $this->cas_similaires)  { echo " checked" ;} ?>  onClick="" ><span></span>
<label for="<?php echo $tempOptionId ?>">Oui</label> </div>
</TD>
  <TD class="scFormDataFontOdd css_cas_similaires_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-cas_similaires" . $sc_seq_vert . "-2"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-cas_similaires sc-ui-radio-cas_similaires" type=radio name="cas_similaires" value="N"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_cas_similaires'][] = 'N'; ?>
<?php  if ("N" == $this->cas_similaires)  { echo " checked" ;} ?>  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_cas_similaires_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_cas_similaires_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


    <TD class="scFormDataOdd" colspan="1" >&nbsp;</TD>





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


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





<?php } ?>
<?php $sStyleHidden_cas_similaires_dumb = ('' == $sStyleHidden_cas_similaires) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_cas_similaires_dumb" style="<?php echo $sStyleHidden_cas_similaires_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_6"></a>
<div id="div_hidden_bloco_6" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<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]['form_fiche_pro_sante_confirme_edit']['Lookup_hospitalisation'][] = 'O'; ?>
<?php  if ("O" == $this->hospitalisation)  { echo " checked" ;} ?>  onClick="do_ajax_form_fiche_pro_sante_confirme_edit_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]['form_fiche_pro_sante_confirme_edit']['Lookup_hospitalisation'][] = 'N'; ?>
<?php  if ("N" == $this->hospitalisation)  { echo " checked" ;} ?>  onClick="do_ajax_form_fiche_pro_sante_confirme_edit_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 (!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: '<?php echo $tmp_form_data; ?>', 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 (!isset($this->nm_new_label['spacer1']))
    {
        $this->nm_new_label['spacer1'] = "";
    }
?>
<?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);
   $spacer1 = $this->spacer1;
   $sStyleHidden_spacer1 = '';
   if (isset($this->nmgp_cmp_hidden['spacer1']) && $this->nmgp_cmp_hidden['spacer1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['spacer1']);
       $sStyleHidden_spacer1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_spacer1 = 'display: none;';
   $sStyleReadInp_spacer1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['spacer1']) && $this->nmgp_cmp_readonly['spacer1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['spacer1']);
       $sStyleReadLab_spacer1 = '';
       $sStyleReadInp_spacer1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['spacer1']) && $this->nmgp_cmp_hidden['spacer1'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="spacer1" value="<?php echo $this->form_encode_input($spacer1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_spacer1_line" id="hidden_field_data_spacer1" style="<?php echo $sStyleHidden_spacer1; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_spacer1_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_spacer1_label" style=""><span id="id_label_spacer1"><?php echo $this->nm_new_label['spacer1']; ?></span></span><br><input type="hidden" name="spacer1" value="<?php echo $this->form_encode_input($spacer1); ?>"><span id="id_ajax_label_spacer1"><?php echo nl2br($spacer1); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_spacer1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_spacer1_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_hospitalisation_dumb = ('' == $sStyleHidden_hospitalisation) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_hospitalisation_dumb" style="<?php echo $sStyleHidden_hospitalisation_dumb; ?>"></TD>
<?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>
<?php $sStyleHidden_spacer1_dumb = ('' == $sStyleHidden_spacer1) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_spacer1_dumb" style="<?php echo $sStyleHidden_spacer1_dumb; ?>"></TD>
<?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]['form_fiche_pro_sante_confirme_edit']['Lookup_evacuation'][] = 'O'; ?>
<?php  if ("O" == $this->evacuation)  { echo " checked" ;} ?>  onClick="do_ajax_form_fiche_pro_sante_confirme_edit_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]['form_fiche_pro_sante_confirme_edit']['Lookup_evacuation'][] = 'N'; ?>
<?php  if ("N" == $this->evacuation)  { echo " checked" ;} ?>  onClick="do_ajax_form_fiche_pro_sante_confirme_edit_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 (!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: '<?php echo $tmp_form_data; ?>', 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 (!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]['form_fiche_pro_sante_confirme_edit']['Lookup_structure_evacuation']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_structure_evacuation'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_structure_evacuation']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['Lookup_structure_evacuation']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_structure_evacuation'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_structure_evacuation']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['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_evacuation_dumb = ('' == $sStyleHidden_evacuation) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_evacuation_dumb" style="<?php echo $sStyleHidden_evacuation_dumb; ?>"></TD>
<?php $sStyleHidden_date_evacuation_dumb = ('' == $sStyleHidden_date_evacuation) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_evacuation_dumb" style="<?php echo $sStyleHidden_date_evacuation_dumb; ?>"></TD>
<?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 -->
   <a name="bloco_7"></a>
<div id="div_hidden_bloco_7" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- 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['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></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]['form_fiche_pro_sante_confirme_edit']['Lookup_evolution_nm_fk']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_evolution_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_evolution_nm_fk']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['Lookup_evolution_nm_fk']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_evolution_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_evolution_nm_fk']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['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_form_fiche_pro_sante_confirme_edit_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 (!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>
&nbsp;<span class="scFormDataHelpOdd"><?php echo $tmp_form_data; ?></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 (!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: '<?php echo $tmp_form_data; ?>', 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 (!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_evolution_nm_fk_dumb = ('' == $sStyleHidden_evolution_nm_fk) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_evolution_nm_fk_dumb" style="<?php echo $sStyleHidden_evolution_nm_fk_dumb; ?>"></TD>
<?php $sStyleHidden_date_sortie_dumb = ('' == $sStyleHidden_date_sortie) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_sortie_dumb" style="<?php echo $sStyleHidden_date_sortie_dumb; ?>"></TD>
<?php $sStyleHidden_date_deces_dumb = ('' == $sStyleHidden_date_deces) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_deces_dumb" style="<?php echo $sStyleHidden_date_deces_dumb; ?>"></TD>
<?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 -->
   <a name="bloco_8"></a>
<div id="div_hidden_bloco_8" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- 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['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="2" 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['commentaires_labo']))
    {
        $this->nm_new_label['commentaires_labo'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_commentaires_labo'] . "";
    }
?>
<?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_labo = $this->commentaires_labo;
   $sStyleHidden_commentaires_labo = '';
   if (isset($this->nmgp_cmp_hidden['commentaires_labo']) && $this->nmgp_cmp_hidden['commentaires_labo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['commentaires_labo']);
       $sStyleHidden_commentaires_labo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_commentaires_labo = 'display: none;';
   $sStyleReadInp_commentaires_labo = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['commentaires_labo']) && $this->nmgp_cmp_readonly['commentaires_labo'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['commentaires_labo']);
       $sStyleReadLab_commentaires_labo = '';
       $sStyleReadInp_commentaires_labo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['commentaires_labo']) && $this->nmgp_cmp_hidden['commentaires_labo'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="commentaires_labo" value="<?php echo $this->form_encode_input($commentaires_labo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_commentaires_labo_line" id="hidden_field_data_commentaires_labo" style="<?php echo $sStyleHidden_commentaires_labo; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_commentaires_labo_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_commentaires_labo_label" style=""><span id="id_label_commentaires_labo"><?php echo $this->nm_new_label['commentaires_labo']; ?></span></span><br>
<?php
$commentaires_labo_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($commentaires_labo));

?>

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

 ?>
<input type="hidden" name="commentaires_labo" value="<?php echo $this->form_encode_input($commentaires_labo) . "\">" . $commentaires_labo_val . ""; ?>
<?php } else { ?>
<span id="id_read_on_commentaires_labo" class="sc-ui-readonly-commentaires_labo css_commentaires_labo_line" style="<?php echo $sStyleReadLab_commentaires_labo; ?>"><?php echo $this->form_format_readonly("commentaires_labo", $this->form_encode_input($commentaires_labo_val)); ?></span><span id="id_read_off_commentaires_labo" class="css_read_off_commentaires_labo<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_commentaires_labo; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_commentaires_labo_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="commentaires_labo" id="id_sc_field_commentaires_labo" rows="2" 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_labo; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_commentaires_labo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_commentaires_labo_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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['labo_destination']))
           {
               $this->nmgp_cmp_readonly['labo_destination'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['commentaires_semep']))
    {
        $this->nm_new_label['commentaires_semep'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_commentaires_semep'] . "";
    }
?>
<?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_semep = $this->commentaires_semep;
   $sStyleHidden_commentaires_semep = '';
   if (isset($this->nmgp_cmp_hidden['commentaires_semep']) && $this->nmgp_cmp_hidden['commentaires_semep'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['commentaires_semep']);
       $sStyleHidden_commentaires_semep = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_commentaires_semep = 'display: none;';
   $sStyleReadInp_commentaires_semep = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['commentaires_semep']) && $this->nmgp_cmp_readonly['commentaires_semep'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['commentaires_semep']);
       $sStyleReadLab_commentaires_semep = '';
       $sStyleReadInp_commentaires_semep = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['commentaires_semep']) && $this->nmgp_cmp_hidden['commentaires_semep'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="commentaires_semep" value="<?php echo $this->form_encode_input($commentaires_semep) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_commentaires_semep_line" id="hidden_field_data_commentaires_semep" style="<?php echo $sStyleHidden_commentaires_semep; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_commentaires_semep_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_commentaires_semep_label" style=""><span id="id_label_commentaires_semep"><?php echo $this->nm_new_label['commentaires_semep']; ?></span></span><br>
<?php
$commentaires_semep_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($commentaires_semep));

?>

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

 ?>
<input type="hidden" name="commentaires_semep" value="<?php echo $this->form_encode_input($commentaires_semep) . "\">" . $commentaires_semep_val . ""; ?>
<?php } else { ?>
<span id="id_read_on_commentaires_semep" class="sc-ui-readonly-commentaires_semep css_commentaires_semep_line" style="<?php echo $sStyleReadLab_commentaires_semep; ?>"><?php echo $this->form_format_readonly("commentaires_semep", $this->form_encode_input($commentaires_semep_val)); ?></span><span id="id_read_off_commentaires_semep" class="css_read_off_commentaires_semep<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_commentaires_semep; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_commentaires_semep_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="commentaires_semep" id="id_sc_field_commentaires_semep" rows="2" 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_semep; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_commentaires_semep_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_commentaires_semep_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_commentaires_semep_dumb = ('' == $sStyleHidden_commentaires_semep) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_commentaires_semep_dumb" style="<?php echo $sStyleHidden_commentaires_semep_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_9"></a>
<div id="div_hidden_bloco_9" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['attached_file']))
           {
               $this->nmgp_cmp_readonly['attached_file'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['type_prelevement_nm_fk']))
           {
               $this->nmgp_cmp_readonly['type_prelevement_nm_fk'] = 'on';
           }
?>


   <?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" && $this->nmgp_opc_ant != "incluir") || */(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]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['labo_destination']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['php_cmp_required']['labo_destination'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (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]['form_fiche_pro_sante_confirme_edit']['Lookup_labo_destination']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_labo_destination'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_labo_destination']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['Lookup_labo_destination']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_labo_destination'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_labo_destination']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $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->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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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]['form_fiche_pro_sante_confirme_edit']['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) . "\"><span id=\"id_ajax_label_labo_destination\">" . $labo_destination_look . "</span>"; ?>
<?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" ; 
   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 (!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" && $this->nmgp_opc_ant != "incluir") || */(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\">" . $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" && $this->nmgp_opc_ant != "incluir") || (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) . "\"><span id=\"id_ajax_label_attached_file\">" . $attached_file . "</span>"; ?>
<?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 } ?>
<div id="id_sc_dragdrop_attached_file" class="scFormDataDragNDrop"  style="<?php echo $sStyleReadInp_attached_file ?>"><?php echo $this->Ini->Nm_lang['lang_errm_mu_dragimg'] ?></div>
</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 } 
?> 






<?php $sStyleHidden_labo_destination_dumb = ('' == $sStyleHidden_labo_destination) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_labo_destination_dumb" style="<?php echo $sStyleHidden_labo_destination_dumb; ?>"></TD>
<?php $sStyleHidden_attached_file_dumb = ('' == $sStyleHidden_attached_file) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_attached_file_dumb" style="<?php echo $sStyleHidden_attached_file_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_10"></a>
<div id="div_hidden_bloco_10" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_10" 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 ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['date_reception_prelevement']))
           {
               $this->nmgp_cmp_readonly['date_reception_prelevement'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['date_resultats_labo']))
           {
               $this->nmgp_cmp_readonly['date_resultats_labo'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['resultats_labo']))
           {
               $this->nmgp_cmp_readonly['resultats_labo'] = 'on';
           }
?>


   <?php
   if (!isset($this->nm_new_label['type_prelevement_nm_fk']))
   {
       $this->nm_new_label['type_prelevement_nm_fk'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_type_prelevement_nm_fk'] . "";
   }
   $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);
   $type_prelevement_nm_fk = $this->type_prelevement_nm_fk;
   $sStyleHidden_type_prelevement_nm_fk = '';
   if (isset($this->nmgp_cmp_hidden['type_prelevement_nm_fk']) && $this->nmgp_cmp_hidden['type_prelevement_nm_fk'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['type_prelevement_nm_fk']);
       $sStyleHidden_type_prelevement_nm_fk = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_type_prelevement_nm_fk = 'display: none;';
   $sStyleReadInp_type_prelevement_nm_fk = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["type_prelevement_nm_fk"]) &&  $this->nmgp_cmp_readonly["type_prelevement_nm_fk"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['type_prelevement_nm_fk']);
       $sStyleReadLab_type_prelevement_nm_fk = '';
       $sStyleReadInp_type_prelevement_nm_fk = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['type_prelevement_nm_fk']) && $this->nmgp_cmp_hidden['type_prelevement_nm_fk'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="type_prelevement_nm_fk" value="<?php echo $this->form_encode_input($this->type_prelevement_nm_fk) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>
<?php  $this->type_prelevement_nm_fk_1 = explode(";", trim($this->type_prelevement_nm_fk)) ; ?>
    <TD class="scFormDataOdd css_type_prelevement_nm_fk_line" id="hidden_field_data_type_prelevement_nm_fk" style="<?php echo $sStyleHidden_type_prelevement_nm_fk; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_type_prelevement_nm_fk_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_type_prelevement_nm_fk_label" style=""><span id="id_label_type_prelevement_nm_fk"><?php echo $this->nm_new_label['type_prelevement_nm_fk']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["type_prelevement_nm_fk"]) &&  $this->nmgp_cmp_readonly["type_prelevement_nm_fk"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_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]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_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_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;
   $old_value_date_reception_prelevement = $this->date_reception_prelevement;
   $old_value_date_resultats_labo = $this->date_resultats_labo;
   $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_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;
   $unformatted_value_date_reception_prelevement = $this->date_reception_prelevement;
   $unformatted_value_date_resultats_labo = $this->date_resultats_labo;

   $type_prelevement_nm_fk_val_str = "''";
   if (!empty($this->type_prelevement_nm_fk))
   {
       if (is_array($this->type_prelevement_nm_fk))
       {
           $Tmp_array = $this->type_prelevement_nm_fk;
       }
       else
       {
           $Tmp_array = explode(";", $this->type_prelevement_nm_fk);
       }
       $type_prelevement_nm_fk_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $type_prelevement_nm_fk_val_str)
          {
             $type_prelevement_nm_fk_val_str .= ", ";
          }
          $type_prelevement_nm_fk_val_str .= "'$Tmp_val_cmp'";
       }
   }
   $nm_comando = "SELECT nomenclature_item  FROM \"public\".ref_nomenclature_items  WHERE nomenclature_item_code  IN ($type_prelevement_nm_fk_val_str)  ORDER BY nomenclature_item";

   $this->date_declaration = $old_value_date_declaration;
   $this->date_declaration_hora = $old_value_date_declaration_hora;
   $this->age_malade = $old_value_age_malade;
   $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;
   $this->date_reception_prelevement = $old_value_date_reception_prelevement;
   $this->date_resultats_labo = $old_value_date_resultats_labo;

   $_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) 
       { 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['Lookup_type_prelevement_nm_fk'][] = $rs->fields[0];
              $nmgp_def_dados .= $rs->fields[0] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $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; 
   $type_prelevement_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]); } ; 
          foreach ($this->type_prelevement_nm_fk_1 as $Dados)
          {
              if ($Dados === $cadaselect[1])
              {
                  $type_prelevement_nm_fk_look .= $cadaselect[0] . "&nbsp;";
                  break;
              }
          }
          $x++; 
   }

?>
<input type="hidden" name="type_prelevement_nm_fk" value="<?php echo $this->form_encode_input($type_prelevement_nm_fk) . "\"><span id=\"id_ajax_label_type_prelevement_nm_fk\">" . $type_prelevement_nm_fk_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_type_prelevement_nm_fk();
   $x = 0 ; 
   $type_prelevement_nm_fk_look = ""; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          foreach ($this->type_prelevement_nm_fk_1 as $Dados)
          {
              if ($Dados === $cadaselect[1])
              {
                  $type_prelevement_nm_fk_look .= $cadaselect[0] . "<br>";
                  break;
              }
          }
          $x++; 
   }
          if (empty($type_prelevement_nm_fk_look))
          {
              $type_prelevement_nm_fk_look = $this->type_prelevement_nm_fk;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_type_prelevement_nm_fk\" class=\"css_type_prelevement_nm_fk_line\" style=\"" .  $sStyleReadLab_type_prelevement_nm_fk . "\">" . $this->form_format_readonly("type_prelevement_nm_fk", $this->form_encode_input($type_prelevement_nm_fk_look)) . "</span><span id=\"id_read_off_type_prelevement_nm_fk\" class=\"css_read_off_type_prelevement_nm_fk" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_type_prelevement_nm_fk . "\">";
   echo " <span id=\"idAjaxSelect_type_prelevement_nm_fk\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_type_prelevement_nm_fk_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_type_prelevement_nm_fk\" name=\"type_prelevement_nm_fk[]\" size=\"1\" alt=\"{type: 'select', enterTab: false}\" multiple>" ; 
   echo "\r" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          foreach ($this->type_prelevement_nm_fk_1 as $Dados)
          {
              if ($Dados === $cadaselect[1])
              {
                  echo " selected" ; 
                  break;
              }
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->type_prelevement_nm_fk)) 
              {
                  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_type_prelevement_nm_fk_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_type_prelevement_nm_fk_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['date_reception_prelevement']))
    {
        $this->nm_new_label['date_reception_prelevement'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_reception_prelevement'] . "";
    }
?>
<?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_reception_prelevement = $this->date_reception_prelevement;
   $sStyleHidden_date_reception_prelevement = '';
   if (isset($this->nmgp_cmp_hidden['date_reception_prelevement']) && $this->nmgp_cmp_hidden['date_reception_prelevement'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_reception_prelevement']);
       $sStyleHidden_date_reception_prelevement = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_reception_prelevement = 'display: none;';
   $sStyleReadInp_date_reception_prelevement = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["date_reception_prelevement"]) &&  $this->nmgp_cmp_readonly["date_reception_prelevement"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_reception_prelevement']);
       $sStyleReadLab_date_reception_prelevement = '';
       $sStyleReadInp_date_reception_prelevement = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_reception_prelevement']) && $this->nmgp_cmp_hidden['date_reception_prelevement'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_reception_prelevement" value="<?php echo $this->form_encode_input($date_reception_prelevement) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_date_reception_prelevement_line" id="hidden_field_data_date_reception_prelevement" style="<?php echo $sStyleHidden_date_reception_prelevement; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_date_reception_prelevement_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_date_reception_prelevement_label" style=""><span id="id_label_date_reception_prelevement"><?php echo $this->nm_new_label['date_reception_prelevement']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["date_reception_prelevement"]) &&  $this->nmgp_cmp_readonly["date_reception_prelevement"] == "on")) { 

 ?>
<input type="hidden" name="date_reception_prelevement" value="<?php echo $this->form_encode_input($date_reception_prelevement) . "\"><span id=\"id_ajax_label_date_reception_prelevement\">" . $date_reception_prelevement . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_date_reception_prelevement" class="sc-ui-readonly-date_reception_prelevement css_date_reception_prelevement_line" style="<?php echo $sStyleReadLab_date_reception_prelevement; ?>"><?php echo $this->form_format_readonly("date_reception_prelevement", $this->form_encode_input($date_reception_prelevement)); ?></span><span id="id_read_off_date_reception_prelevement" class="css_read_off_date_reception_prelevement<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_reception_prelevement; ?>"><?php
$tmp_form_data = $this->field_config['date_reception_prelevement']['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_reception_prelevement_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_reception_prelevement" type=text name="date_reception_prelevement" value="<?php echo $this->form_encode_input($date_reception_prelevement) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date_reception_prelevement']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_reception_prelevement']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '<?php echo $tmp_form_data; ?>', 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_reception_prelevement_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_reception_prelevement_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['date_resultats_labo']))
    {
        $this->nm_new_label['date_resultats_labo'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_date_resultats_labo'] . "";
    }
?>
<?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_resultats_labo = $this->date_resultats_labo;
   $sStyleHidden_date_resultats_labo = '';
   if (isset($this->nmgp_cmp_hidden['date_resultats_labo']) && $this->nmgp_cmp_hidden['date_resultats_labo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date_resultats_labo']);
       $sStyleHidden_date_resultats_labo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date_resultats_labo = 'display: none;';
   $sStyleReadInp_date_resultats_labo = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["date_resultats_labo"]) &&  $this->nmgp_cmp_readonly["date_resultats_labo"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date_resultats_labo']);
       $sStyleReadLab_date_resultats_labo = '';
       $sStyleReadInp_date_resultats_labo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date_resultats_labo']) && $this->nmgp_cmp_hidden['date_resultats_labo'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="date_resultats_labo" value="<?php echo $this->form_encode_input($date_resultats_labo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_date_resultats_labo_line" id="hidden_field_data_date_resultats_labo" style="<?php echo $sStyleHidden_date_resultats_labo; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_date_resultats_labo_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_date_resultats_labo_label" style=""><span id="id_label_date_resultats_labo"><?php echo $this->nm_new_label['date_resultats_labo']; ?></span></span><br>
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["date_resultats_labo"]) &&  $this->nmgp_cmp_readonly["date_resultats_labo"] == "on")) { 

 ?>
<input type="hidden" name="date_resultats_labo" value="<?php echo $this->form_encode_input($date_resultats_labo) . "\"><span id=\"id_ajax_label_date_resultats_labo\">" . $date_resultats_labo . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_date_resultats_labo" class="sc-ui-readonly-date_resultats_labo css_date_resultats_labo_line" style="<?php echo $sStyleReadLab_date_resultats_labo; ?>"><?php echo $this->form_format_readonly("date_resultats_labo", $this->form_encode_input($date_resultats_labo)); ?></span><span id="id_read_off_date_resultats_labo" class="css_read_off_date_resultats_labo<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_date_resultats_labo; ?>"><?php
$tmp_form_data = $this->field_config['date_resultats_labo']['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_resultats_labo_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_date_resultats_labo" type=text name="date_resultats_labo" value="<?php echo $this->form_encode_input($date_resultats_labo) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date_resultats_labo']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date_resultats_labo']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '<?php echo $tmp_form_data; ?>', 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_resultats_labo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_resultats_labo_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_type_prelevement_nm_fk_dumb = ('' == $sStyleHidden_type_prelevement_nm_fk) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_type_prelevement_nm_fk_dumb" style="<?php echo $sStyleHidden_type_prelevement_nm_fk_dumb; ?>"></TD>
<?php $sStyleHidden_date_reception_prelevement_dumb = ('' == $sStyleHidden_date_reception_prelevement) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_reception_prelevement_dumb" style="<?php echo $sStyleHidden_date_reception_prelevement_dumb; ?>"></TD>
<?php $sStyleHidden_date_resultats_labo_dumb = ('' == $sStyleHidden_date_resultats_labo) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_date_resultats_labo_dumb" style="<?php echo $sStyleHidden_date_resultats_labo_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['resultats_labo']))
    {
        $this->nm_new_label['resultats_labo'] = "" . $this->Ini->Nm_lang['lang_public_fiche_prof_sante_fld_resultats_labo'] . "";
    }
?>
<?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);
   $resultats_labo = $this->resultats_labo;
   $sStyleHidden_resultats_labo = '';
   if (isset($this->nmgp_cmp_hidden['resultats_labo']) && $this->nmgp_cmp_hidden['resultats_labo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['resultats_labo']);
       $sStyleHidden_resultats_labo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_resultats_labo = 'display: none;';
   $sStyleReadInp_resultats_labo = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["resultats_labo"]) &&  $this->nmgp_cmp_readonly["resultats_labo"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['resultats_labo']);
       $sStyleReadLab_resultats_labo = '';
       $sStyleReadInp_resultats_labo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['resultats_labo']) && $this->nmgp_cmp_hidden['resultats_labo'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="resultats_labo" value="<?php echo $this->form_encode_input($resultats_labo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_resultats_labo_line" id="hidden_field_data_resultats_labo" style="<?php echo $sStyleHidden_resultats_labo; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_resultats_labo_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_resultats_labo_label" style=""><span id="id_label_resultats_labo"><?php echo $this->nm_new_label['resultats_labo']; ?></span></span><br>
<?php
$resultats_labo_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($resultats_labo));

?>

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

 ?>
<input type="hidden" name="resultats_labo" value="<?php echo $this->form_encode_input($resultats_labo) . "\"><span id=\"id_ajax_label_resultats_labo\">" . $resultats_labo_val . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_resultats_labo" class="sc-ui-readonly-resultats_labo css_resultats_labo_line" style="<?php echo $sStyleReadLab_resultats_labo; ?>"><?php echo $this->form_format_readonly("resultats_labo", $this->form_encode_input($resultats_labo_val)); ?></span><span id="id_read_off_resultats_labo" class="css_read_off_resultats_labo<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_resultats_labo; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_resultats_labo_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="resultats_labo" id="id_sc_field_resultats_labo" rows="3" cols="50"
 alt="{datatype: 'text', maxLength: 512, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $resultats_labo; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_resultats_labo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_resultats_labo_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


    <TD class="scFormDataOdd" colspan="2" >&nbsp;</TD>





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


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





<?php } ?>
</TABLE></div><!-- bloco_f -->
</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]['form_fiche_pro_sante_confirme_edit']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "R")
{
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['update'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-1';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['update']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['update']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['update']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['update']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['update'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "balterar", "scBtnFn_sys_format_alt()", "scBtnFn_sys_format_alt()", "sc_b_upd_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Ctrl + S)", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
    }
?> 
     </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if (isset($this->NMSC_modal) && $this->NMSC_modal == "ok") {
        $sCondStyle = '';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-2';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bsair", "scBtnFn_sys_format_sai_modal()", "scBtnFn_sys_format_sai_modal()", "sc_b_sai_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "__NM_HINT__ (Alt + Q)", "" . $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]['form_fiche_pro_sante_confirme_edit']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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> 
<?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,10);
  $nm_sc_blocos_aba    = array(2 => 2,3 => 2,4 => 2,5 => 2,6 => 2,7 => 2,8 => 2,9 => 2,10 => 2);
  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]['form_fiche_pro_sante_confirme_edit']['masterValue']))
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['under_dashboard']) {
?>
var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['parent_widget']; ?>']");
if (dbParentFrame && dbParentFrame[0] && dbParentFrame[0].contentWindow.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['masterValue']);
?>
}
<?php
    }
    else {
?>
if (parent && parent.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['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]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['under_dashboard']) {
?>
<script>
 var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['parent_widget']; ?>']");
 dbParentFrame[0].contentWindow.scAjaxDetailStatus("form_fiche_pro_sante_confirme_edit");
</script>
<?php
    }
    else {
        $sTamanhoIframe = isset($_POST['sc_ifr_height']) && '' != $_POST['sc_ifr_height'] ? '"' . $_POST['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailStatus("form_fiche_pro_sante_confirme_edit");
 parent.scAjaxDetailHeight("form_fiche_pro_sante_confirme_edit", <?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]['form_fiche_pro_sante_confirme_edit']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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("form_fiche_pro_sante_confirme_edit", <?php echo $sTamanhoIframe; ?>);
  }, 100);
 }
 else {
  parent.scAjaxDetailHeight("form_fiche_pro_sante_confirme_edit", <?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]['form_fiche_pro_sante_confirme_edit']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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_retour() {
		if ($("#sc_retour_top").length && $("#sc_retour_top").is(":visible")) {
		    if ($("#sc_retour_top").hasClass("disabled")) {
		        return;
		    }
			sc_btn_retour()
			 return;
		}
	}
	function scBtnFn_sys_format_alt() {
		if ($("#sc_b_upd_b.sc-unique-btn-1").length && $("#sc_b_upd_b.sc-unique-btn-1").is(":visible")) {
		    if ($("#sc_b_upd_b.sc-unique-btn-1").hasClass("disabled")) {
		        return;
		    }
			nm_atualiza ('alterar');
			 return;
		}
	}
	function scBtnFn_sys_format_sai_modal() {
		if ($("#sc_b_sai_b.sc-unique-btn-2").length && $("#sc_b_sai_b.sc-unique-btn-2").is(":visible")) {
		    if ($("#sc_b_sai_b.sc-unique-btn-2").hasClass("disabled")) {
		        return;
		    }
			scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
			 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-in"><?php echo $this->Ini->Nm_lang['lang_version_mobile']; ?></span>
<?php
       }
?>
<?php
$_SESSION['sc_session'][$this->Ini->sc_page]['form_fiche_pro_sante_confirme_edit']['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> 
