<?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("Nouvelle Fiche de déclaration de la maladie"); } else { echo strip_tags("Fiche malade"); } ?></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' => true,
                       'scrollUpPosition' => 'R',
                       'toolbarOrientation' => 'H',
                       'mobilePanes' => 'true',
                       'navigationBarButtons' => unserialize('a:0:{}'),
                       'mobileSimpleToolbar' => false,
                       'bottomToolbarFixed' => true
                   ]); ?>
            <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" />
 <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>
 <style type="text/css">
  .scSpin_age_obj {
   border: 0 !important;
   margin: 0 20px 0 0 !important;
  }
  #id_read_off_age .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]['fiche_pro_sante']['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" />
<?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 ?>fiche_pro_sante/fiche_pro_sante_<?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("fiche_pro_sante_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]['fiche_pro_sante']['btn_disabled']['first']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['first'] : 'off'); ?>";
var Nav_bavanca_macro_disabled  = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['forward']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['forward'] : 'off'); ?>";
var Nav_bretorna_macro_disabled = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['back']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['back'] : 'off'); ?>";
var Nav_bfinal_macro_disabled   = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['last']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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;
}
<?php

include_once('fiche_pro_sante_jquery.php');

?>

 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();

<?php
if (!isset($this->scFormFocusErrorName) || '' == $this->scFormFocusErrorName)
{
?>
  scFocusField('prenom');

<?php
}
?>
  $(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]['fiche_pro_sante']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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]['fiche_pro_sante']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['recarga'];
}
    $remove_margin = isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['remove_margin'] ? 'margin: 0; ' : '';
    $remove_border = isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['remove_border'] ? 'border-width: 0; ' : '';
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['link_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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]['fiche_pro_sante']['link_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['link_info']['remove_border']) {
        $remove_border = 'border-width: 0; ';
    }
    $vertical_center = '';
?>
<body class="scFormPage sc-app-contr" 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;
}

?>
<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("fiche_pro_sante_js0.php");
?>
<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" 
               action="fiche_pro_sante.php" 
               target="_self">
<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_url_saida" value="<?php echo $this->form_encode_input($nmgp_url_saida); ?>">
<input type="hidden" name="bok" value="OK">
<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="_sc_force_mobile" id="sc-id-mobile-control" value="" />
<?php
$_SESSION['scriptcase']['error_span_title']['fiche_pro_sante'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['fiche_pro_sante'] = '' != $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="450">
 <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
       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]['fiche_pro_sante']['where_filter']))
       {
           $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['prenom']))
    {
        $this->nm_new_label['prenom'] = "Prénom";
    }
?>
<?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 = $this->prenom;
   $sStyleHidden_prenom = '';
   if (isset($this->nmgp_cmp_hidden['prenom']) && $this->nmgp_cmp_hidden['prenom'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['prenom']);
       $sStyleHidden_prenom = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_prenom = 'display: none;';
   $sStyleReadInp_prenom = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['prenom']) && $this->nmgp_cmp_readonly['prenom'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['prenom']);
       $sStyleReadLab_prenom = '';
       $sStyleReadInp_prenom = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['prenom']) && $this->nmgp_cmp_hidden['prenom'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="prenom" value="<?php echo $this->form_encode_input($prenom) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="prenom" value="<?php echo $this->form_encode_input($prenom) . "\">" . $prenom . ""; ?>
<?php } else { ?>
<span id="id_read_on_prenom" class="sc-ui-readonly-prenom css_prenom_line" style="<?php echo $sStyleReadLab_prenom; ?>"><?php echo $this->form_format_readonly("prenom", $this->form_encode_input($this->prenom)); ?></span><span id="id_read_off_prenom" class="css_read_off_prenom<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_prenom; ?>">
 <input class="sc-js-input scFormObjectOdd css_prenom_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_prenom" type=text name="prenom" value="<?php echo $this->form_encode_input($prenom) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> maxlength=20 alt="{datatype: 'text', maxLength: 20, allowedChars: '<?php echo $this->allowedCharsCharset("abcdefghijklmnopqrstuvwxyz0123456789áéíóúàèìòùãõâêîôûäëïöüñýÿ¨´`^~ .-/") ?>', lettersCase: 'words', 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_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_prenom_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

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

 ?>
<input type="hidden" name="nom" value="<?php echo $this->form_encode_input($nom) . "\">" . $nom . ""; ?>
<?php } else { ?>
<span id="id_read_on_nom" class="sc-ui-readonly-nom css_nom_line" style="<?php echo $sStyleReadLab_nom; ?>"><?php echo $this->form_format_readonly("nom", $this->form_encode_input($this->nom)); ?></span><span id="id_read_off_nom" class="css_read_off_nom<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_nom; ?>">
 <input class="sc-js-input scFormObjectOdd css_nom_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_nom" type=text name="nom" value="<?php echo $this->form_encode_input($nom) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=4"; } ?> maxlength=3 alt="{datatype: 'text', maxLength: 3, allowedChars: '<?php echo $this->allowedCharsCharset("abcdefghijklmnopqrstuvwxyz0123456789áéíóúàèìòùãõâêîôûäëïöüñýÿ¨´`^~-/") ?>', lettersCase: 'upper', 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_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nom_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_prenom_dumb = ('' == $sStyleHidden_prenom) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_prenom_dumb" style="<?php echo $sStyleHidden_prenom_dumb; ?>"></TD>
<?php $sStyleHidden_nom_dumb = ('' == $sStyleHidden_nom) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_nom_dumb" style="<?php echo $sStyleHidden_nom_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['age']))
    {
        $this->nm_new_label['age'] = "Âge";
    }
?>
<?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 = $this->age;
   $sStyleHidden_age = '';
   if (isset($this->nmgp_cmp_hidden['age']) && $this->nmgp_cmp_hidden['age'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['age']);
       $sStyleHidden_age = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_age = 'display: none;';
   $sStyleReadInp_age = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['age']) && $this->nmgp_cmp_readonly['age'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['age']);
       $sStyleReadLab_age = '';
       $sStyleReadInp_age = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['age']) && $this->nmgp_cmp_hidden['age'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="age" value="<?php echo $this->form_encode_input($age) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="age" value="<?php echo $this->form_encode_input($age) . "\">" . $age . ""; ?>
<?php } else { ?>
<span id="id_read_on_age" class="sc-ui-readonly-age css_age_line" style="<?php echo $sStyleReadLab_age; ?>"><?php echo $this->form_format_readonly("age", $this->form_encode_input($this->age)); ?></span><span id="id_read_off_age" class="css_read_off_age<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_age; ?>">
 <input class="sc-js-input scFormObjectOdd scFormObjectOddSpin scSpin_age_obj css_age_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_age" type=text name="age" value="<?php echo $this->form_encode_input($age) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=4"; } ?> alt="{datatype: 'integer', maxLength: 5, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['age']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['age']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, negativePos: <?php echo (4 == $this->field_config['age']['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_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_age_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

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

   $old_value_age = $this->age;
   $this->nm_tira_formatacao();


   $unformatted_value_age = $this->age;

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

   $this->age = $old_value_age;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_sexe'][] = $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_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_1))
          {
              foreach ($this->sexe_1 as $tmp_sexe)
              {
                  if (trim($tmp_sexe) === trim($cadaselect[1])) {$sexe_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->sexe) && trim($this->sexe) === trim($cadaselect[1])) {$sexe_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="sexe" value="<?php echo $this->form_encode_input($sexe) . "\">" . $sexe_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_sexe();
   $x = 0 ; 
   $sexe_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_1))
          {
              foreach ($this->sexe_1 as $tmp_sexe)
              {
                  if (trim($tmp_sexe) === trim($cadaselect[1])) {$sexe_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->sexe) && trim($this->sexe) === trim($cadaselect[1])) {$sexe_look .= $cadaselect[0];} 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_sexe\" class=\"css_sexe_line\" style=\"" .  $sStyleReadLab_sexe . "\">" . $this->form_format_readonly("sexe", $this->form_encode_input($sexe_look)) . "</span><span id=\"id_read_off_sexe\" class=\"css_read_off_sexe css_sexe_line\" style=\"" . $sStyleReadInp_sexe . "\">";
   echo "<div id=\"idAjaxRadio_sexe\" class=\"css_sexe_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_line\">\r\n";
          echo "      <div class=\"sc radio\">";
          $tempOptionId = "id-opt-sexe-" . $x;
          echo "    <input id=\"" . $tempOptionId . "\" type=radio name=\"sexe\" value=\"$cadaradio[1]\" class=\"sc-ui-radio-sexe sc-ui-radio-sexe\"";
          if (trim($this->sexe) === trim($cadaradio[1])) 
          { 
              echo " checked" ; 
          } 
          if (strtoupper($cadaradio[2]) == "S") 
          { 
              if (empty($this->sexe)) 
              { 
                  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_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_sexe_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_age_dumb = ('' == $sStyleHidden_age) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_age_dumb" style="<?php echo $sStyleHidden_age_dumb; ?>"></TD>
<?php $sStyleHidden_sexe_dumb = ('' == $sStyleHidden_sexe) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_sexe_dumb" style="<?php echo $sStyleHidden_sexe_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 (!isset($this->nm_new_label['wilaya']))
   {
       $this->nm_new_label['wilaya'] = "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" && */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]['fiche_pro_sante']['php_cmp_required']['wilaya']) || $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['php_cmp_required']['wilaya'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wilaya"]) &&  $this->nmgp_cmp_readonly["wilaya"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_wilaya']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_wilaya'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_wilaya']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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]['fiche_pro_sante']['Lookup_wilaya']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_wilaya'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_wilaya']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_wilaya'] = array(); 
    }

   $old_value_age = $this->age;
   $this->nm_tira_formatacao();


   $unformatted_value_age = $this->age;

   $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'";
       }
   }
   $nm_comando = "SELECT code_wilaya, concat(code_wilaya, ' - ', nom_wilaya)  FROM \"public\".wilaya  ORDER BY code_wilaya";

   $this->age = $old_value_age;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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) . "\">" . $wilaya_look . ""; ?>
<?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]['fiche_pro_sante']['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'] = "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" && */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]['fiche_pro_sante']['php_cmp_required']['commune']) || $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['php_cmp_required']['commune'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["commune"]) &&  $this->nmgp_cmp_readonly["commune"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_commune']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_commune'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_commune']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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]['fiche_pro_sante']['Lookup_commune']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_commune'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_commune']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_commune'] = array(); 
    }

   $old_value_age = $this->age;
   $this->nm_tira_formatacao();


   $unformatted_value_age = $this->age;

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

   $this->age = $old_value_age;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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) . "\">" . $commune_look . ""; ?>
<?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]['fiche_pro_sante']['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>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_2"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<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 (!isset($this->nm_new_label['adresse']))
    {
        $this->nm_new_label['adresse'] = "Adresse";
    }
?>
<?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 = $this->adresse;
   $sStyleHidden_adresse = '';
   if (isset($this->nmgp_cmp_hidden['adresse']) && $this->nmgp_cmp_hidden['adresse'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['adresse']);
       $sStyleHidden_adresse = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_adresse = 'display: none;';
   $sStyleReadInp_adresse = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['adresse']) && $this->nmgp_cmp_readonly['adresse'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['adresse']);
       $sStyleReadLab_adresse = '';
       $sStyleReadInp_adresse = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['adresse']) && $this->nmgp_cmp_hidden['adresse'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="adresse" value="<?php echo $this->form_encode_input($adresse) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type="hidden" name="adresse" value="<?php echo $this->form_encode_input($adresse) . "\">" . $adresse . ""; ?>
<?php } else { ?>
<span id="id_read_on_adresse" class="sc-ui-readonly-adresse css_adresse_line" style="<?php echo $sStyleReadLab_adresse; ?>"><?php echo $this->form_format_readonly("adresse", $this->form_encode_input($this->adresse)); ?></span><span id="id_read_off_adresse" class="css_read_off_adresse<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_adresse; ?>">
 <input class="sc-js-input scFormObjectOdd css_adresse_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_adresse" type=text name="adresse" value="<?php echo $this->form_encode_input($adresse) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> 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_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_adresse_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['lieu_travail']))
    {
        $this->nm_new_label['lieu_travail'] = "Lieu de 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" && */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" && 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) . "\">" . $lieu_travail . ""; ?>
<?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=10"; } ?> 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_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_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>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_3"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_3"><!-- 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 (!isset($this->nm_new_label['symptomes']))
   {
       $this->nm_new_label['symptomes'] = "Signes cliniques (Symptômes)";
   }
   $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" && */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><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['php_cmp_required']['symptomes']) || $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['php_cmp_required']['symptomes'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["symptomes"]) &&  $this->nmgp_cmp_readonly["symptomes"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_symptomes']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_symptomes'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_symptomes']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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]['fiche_pro_sante']['Lookup_symptomes']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_symptomes'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_symptomes']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_symptomes'] = array(); 
    }

   $old_value_age = $this->age;
   $this->nm_tira_formatacao();


   $unformatted_value_age = $this->age;

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

   $this->age = $old_value_age;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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) . "\">" . $symptomes_look . ""; ?>
<?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 ($sc_hidden_yes > 0 && $sc_hidden_no > 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>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_4"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_4"><!-- 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 (!isset($this->nm_new_label['antecedents']))
    {
        $this->nm_new_label['antecedents'] = "Antécédents (ou autres informations)";
    }
?>
<?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);
   $antecedents = $this->antecedents;
   $sStyleHidden_antecedents = '';
   if (isset($this->nmgp_cmp_hidden['antecedents']) && $this->nmgp_cmp_hidden['antecedents'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['antecedents']);
       $sStyleHidden_antecedents = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_antecedents = 'display: none;';
   $sStyleReadInp_antecedents = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['antecedents']) && $this->nmgp_cmp_readonly['antecedents'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['antecedents']);
       $sStyleReadLab_antecedents = '';
       $sStyleReadInp_antecedents = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['antecedents']) && $this->nmgp_cmp_hidden['antecedents'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="antecedents" value="<?php echo $this->form_encode_input($antecedents) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_antecedents_line" id="hidden_field_data_antecedents" style="<?php echo $sStyleHidden_antecedents; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_antecedents_line" style="vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat css_antecedents_label" style=""><span id="id_label_antecedents"><?php echo $this->nm_new_label['antecedents']; ?></span></span><br>
<?php
$antecedents_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($antecedents));

?>

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

 ?>
<input type="hidden" name="antecedents" value="<?php echo $this->form_encode_input($antecedents) . "\">" . $antecedents_val . ""; ?>
<?php } else { ?>
<span id="id_read_on_antecedents" class="sc-ui-readonly-antecedents css_antecedents_line" style="<?php echo $sStyleReadLab_antecedents; ?>"><?php echo $this->form_format_readonly("antecedents", $this->form_encode_input($antecedents_val)); ?></span><span id="id_read_off_antecedents" class="css_read_off_antecedents<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_antecedents; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_antecedents_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="antecedents" id="id_sc_field_antecedents" rows="5" cols="10"
 alt="{datatype: 'text', maxLength: 20, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $antecedents; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_antecedents_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_antecedents_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_antecedents_dumb = ('' == $sStyleHidden_antecedents) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_antecedents_dumb" style="<?php echo $sStyleHidden_antecedents_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_5"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_5"><!-- 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 (!isset($this->nm_new_label['hospitalisation']))
    {
        $this->nm_new_label['hospitalisation'] = "Hospitalisation";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $hospitalisation = $this->hospitalisation;
   $sStyleHidden_hospitalisation = '';
   if (isset($this->nmgp_cmp_hidden['hospitalisation']) && $this->nmgp_cmp_hidden['hospitalisation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['hospitalisation']);
       $sStyleHidden_hospitalisation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_hospitalisation = 'display: none;';
   $sStyleReadInp_hospitalisation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['hospitalisation']) && $this->nmgp_cmp_readonly['hospitalisation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['hospitalisation']);
       $sStyleReadLab_hospitalisation = '';
       $sStyleReadInp_hospitalisation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['hospitalisation']) && $this->nmgp_cmp_hidden['hospitalisation'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="hospitalisation" value="<?php echo $this->form_encode_input($hospitalisation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

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

<?php

 if ("O" == $this->hospitalisation) { $hospitalisation_look = "Oui";} 
 if ("N" == $this->hospitalisation) { $hospitalisation_look = "Non";} 
?>
<span id="id_read_on_hospitalisation"  class="css_hospitalisation_line" style="<?php echo $sStyleReadLab_hospitalisation; ?>"><?php echo $this->form_format_readonly("hospitalisation", $this->form_encode_input($hospitalisation_look)); ?></span><span id="id_read_off_hospitalisation" class="css_read_off_hospitalisation css_hospitalisation_line" style="<?php echo $sStyleReadInp_hospitalisation; ?>"><div id="idAjaxRadio_hospitalisation" style="display: inline-block"  class="css_hospitalisation_line">
<TABLE cellspacing=0 cellpadding=0 border=0><TR>
  <TD class="scFormDataFontOdd css_hospitalisation_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-hospitalisation" . $sc_seq_vert . "-1"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-hospitalisation sc-ui-radio-hospitalisation" type=radio name="hospitalisation" value="O"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_hospitalisation'][] = 'O'; ?>
<?php  if ("O" == $this->hospitalisation)  { echo " checked" ;} ?>  onClick="" ><span></span>
<label for="<?php echo $tempOptionId ?>">Oui</label> </div>
</TD>
  <TD class="scFormDataFontOdd css_hospitalisation_line"> <div class="sc radio">
<?php $tempOptionId = "id-opt-hospitalisation" . $sc_seq_vert . "-2"; ?>
    <input id="<?php echo $tempOptionId ?>"  class="sc-ui-radio-hospitalisation sc-ui-radio-hospitalisation" type=radio name="hospitalisation" value="N"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['Lookup_hospitalisation'][] = 'N'; ?>
<?php  if ("N" == $this->hospitalisation)  { echo " checked" ;} ?><?php  if (empty($this->hospitalisation)) { 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_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['evacuation']))
    {
        $this->nm_new_label['evacuation'] = "Evacuation";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $evacuation = $this->evacuation;
   $sStyleHidden_evacuation = '';
   if (isset($this->nmgp_cmp_hidden['evacuation']) && $this->nmgp_cmp_hidden['evacuation'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['evacuation']);
       $sStyleHidden_evacuation = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_evacuation = 'display: none;';
   $sStyleReadInp_evacuation = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['evacuation']) && $this->nmgp_cmp_readonly['evacuation'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['evacuation']);
       $sStyleReadLab_evacuation = '';
       $sStyleReadInp_evacuation = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['evacuation']) && $this->nmgp_cmp_hidden['evacuation'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="evacuation" value="<?php echo $this->form_encode_input($evacuation) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

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

<?php

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






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


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





<?php } ?>
   </td></tr></table>
   </tr>
</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();
?>
    <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;
?>
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
        $sCondStyle = ($this->nmgp_botoes['ok'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-1';
        $buttonMacroLabel = "Envoyer";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['ok']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_disabled']['ok']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_label']['ok']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_label']['ok']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['btn_label']['ok'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bok", "scBtnFn_sys_format_ok()", "scBtnFn_sys_format_ok()", "sub_form_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "");?>
 
<?php
        $NM_btn = true;
?>
            </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
   </td></tr> 
   </table> 
   </td></tr></table> 
<?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);
?>
</td></tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 

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

</form> 
<script> 
<?php
  $nm_sc_blocos_da_pag = array(0,1,2,3,4,5);

  foreach ($this->Ini->nm_hidden_blocos as $bloco => $hidden)
  {
      if ($hidden == "off" && in_array($bloco, $nm_sc_blocos_da_pag))
      {
          echo "document.getElementById('hidden_bloco_" . $bloco . "').style.display = 'none';";
          if (isset($nm_sc_blocos_aba[$bloco]))
          {
               echo "document.getElementById('id_tabs_" . $nm_sc_blocos_aba[$bloco] . "_" . $bloco . "').style.display = 'none';";
          }
      }
  }
?>
</script> 
<script>
<?php
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['masterValue']))
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['under_dashboard']) {
?>
var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['parent_widget']; ?>']");
if (dbParentFrame && dbParentFrame[0] && dbParentFrame[0].contentWindow.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['masterValue'] as $cmp_master => $val_master)
        {
?>
    dbParentFrame[0].contentWindow.scAjaxDetailValue('<?php echo $cmp_master ?>', '<?php echo $val_master ?>');
<?php
        }
        unset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['masterValue']);
?>
}
<?php
    }
    else {
?>
if (parent && parent.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['masterValue'] as $cmp_master => $val_master)
        {
?>
    parent.scAjaxDetailValue('<?php echo $cmp_master ?>', '<?php echo $val_master ?>');
<?php
        }
        unset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['masterValue']);
?>
}
<?php
    }
}
?>
function updateHeaderFooter(sFldName, sFldValue)
{
  if (sFldValue[0] && sFldValue[0]["value"])
  {
    sFldValue = sFldValue[0]["value"];
  }
}
</script>
<?php
if (isset($_POST['master_nav']) && 'on' == $_POST['master_nav'])
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['under_dashboard']) {
?>
<script>
 var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['parent_widget']; ?>']");
 dbParentFrame[0].contentWindow.scAjaxDetailStatus("fiche_pro_sante");
</script>
<?php
    }
    else {
        $sTamanhoIframe = isset($_POST['sc_ifr_height']) && '' != $_POST['sc_ifr_height'] ? '"' . $_POST['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailStatus("fiche_pro_sante");
 parent.scAjaxDetailHeight("fiche_pro_sante", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
    }
}
elseif (isset($_GET['script_case_detail']) && 'Y' == $_GET['script_case_detail'])
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['dashboard_info']['under_dashboard']) {
    }
    else {
    $sTamanhoIframe = isset($_GET['sc_ifr_height']) && '' != $_GET['sc_ifr_height'] ? '"' . $_GET['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 if (0 == <?php echo $sTamanhoIframe; ?>) {
  setTimeout(function() {
   parent.scAjaxDetailHeight("fiche_pro_sante", <?php echo $sTamanhoIframe; ?>);
  }, 100);
 }
 else {
  parent.scAjaxDetailHeight("fiche_pro_sante", <?php echo $sTamanhoIframe; ?>);
 }
</script>
<?php
    }
}
?>
<?php
if (isset($this->NM_ajax_info['displayMsg']) && $this->NM_ajax_info['displayMsg'])
{
    $isToast   = isset($this->NM_ajax_info['displayMsgToast']) && $this->NM_ajax_info['displayMsgToast'] ? 'true' : 'false';
    $toastType = $isToast && isset($this->NM_ajax_info['displayMsgToastType']) ? $this->NM_ajax_info['displayMsgToastType'] : '';
?>
<script type="text/javascript">
_scAjaxShowMessage({title: scMsgDefTitle, message: "<?php echo $this->NM_ajax_info['displayMsgTxt']; ?>", isModal: false, timeout: sc_ajaxMsgTime, showButton: false, buttonLabel: "Ok", topPos: 0, leftPos: 0, width: 0, height: 0, redirUrl: "", redirTarget: "", redirParam: "", showClose: false, showBodyIcon: true, isToast: <?php echo $isToast ?>, toastPos: "", type: "<?php echo $toastType ?>"});
</script>
<?php
}
?>
<?php
if (isset($this->scFormFocusErrorName) && '' != $this->scFormFocusErrorName)
{
?>
<script>
scAjaxFocusError();
</script>
<?php
}
?>
<script type='text/javascript'>
bLigEditLookupCall = <?php if ($this->lig_edit_lookup_call) { ?>true<?php } else { ?>false<?php } ?>;
function scLigEditLookupCall()
{
<?php
if ($this->lig_edit_lookup && isset($_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['fiche_pro_sante']['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_sys_format_ok() {
		if ($("#sub_form_b.sc-unique-btn-1").length && $("#sub_form_b.sc-unique-btn-1").is(":visible")) {
		    if ($("#sub_form_b.sc-unique-btn-1").hasClass("disabled")) {
		        return;
		    }
			nm_atualiza('alterar');
			 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]['fiche_pro_sante']['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> 
