<?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>

<html<?php echo $_SESSION['scriptcase']['reg_conf']['html_dir'] ?>>
<HEAD>
 <TITLE><?php if ('novo' == $this->nmgp_opcao) { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmi_title'] . " pla_actualizacion_de_datos"); } else { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmu_title'] . " pla_actualizacion_de_datos"); } ?></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="Pragma" content="no-cache" />
 <link rel="shortcut icon" href="../_lib/img/grp__NM__bg__NM__grant_logo_peq (1).jpg">
<?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:3:{i:0;s:2:"NP";i:1;s:2:"FL";i:2;s:2:"RC";}'),
                       '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" />
<style type="text/css">
.ui-datepicker { z-index: 6 !important }
</style>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_sweetalert.css" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/sweetalert/sweetalert2.all.min.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/sweetalert/polyfill.min.js"></SCRIPT>
 <script type="text/javascript" src="<?php echo $this->Ini->url_lib_js ?>frameControl.js"></script>
<?php
foreach ($this->Ini->tippy_themes as $tippyTheme => $tippyThemeInfo) {
?>
 <link rel="stylesheet" href="<?php echo $tippyThemeInfo['file'] ?>" />
<?php
}
?>
 <script src="<?php echo $this->Ini->path_prod; ?>/third/tippyjs/popper.min.js"></script>
 <script src="<?php echo $this->Ini->path_prod; ?>/third/tippyjs/tippy-bundle.umd.min.js"></script>
 <script>
  $(function() {
  });
 </script>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/viewerjs/viewer.css" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/viewerjs/viewer.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.iframe-transport.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fileupload.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/malsup-blockui/jquery.blockUI.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/thickbox/thickbox-compressed.js"></SCRIPT>
    <style type="text/css">
        .sc-form-order-icon {
            padding: 0 2px;
        }
    </style>
<?php
           $formOrderUnusedVisivility = $_SESSION['scriptcase']['device_mobile'] && $_SESSION['scriptcase']['display_mobile'] ? 'visible' : 'hidden';
           $formOrderUnusedOpacity = $_SESSION['scriptcase']['device_mobile'] && $_SESSION['scriptcase']['display_mobile'] ? '0.5' : '1';
?>
    <style>
        .sc-form-order-icon-unused {
            visibility: <?php echo $formOrderUnusedVisivility ?>;
            opacity: 0.5;
        }
        .scFormLabelOddMult:hover .sc-form-order-icon-unused {
            visibility: visible;
            opacity: <?php echo $formOrderUnusedOpacity ?>;
        }
    </style>
<style type="text/css">
.sc-button-image.disabled {
        opacity: 0.25
}
.sc-button-image.disabled img {
        cursor: default !important
}
</style>
 <style type="text/css">
  .fileinput-button-padding {
   padding: 3px 10px !important;
  }
  .fileinput-button {
   position: relative;
   overflow: hidden;
   float: left;
   margin-right: 4px;
  }
  .fileinput-button input {
   position: absolute;
   top: 0;
   right: 0;
   margin: 0;
   border: solid transparent;
   border-width: 0 0 100px 200px;
   opacity: 0;
   filter: alpha(opacity=0);
   -moz-transform: translate(-300px, 0) scale(4);
   direction: ltr;
   cursor: pointer;
  }
 </style>
<?php
$miniCalendarFA = $this->jqueryFAFile('calendar');
if ('' != $miniCalendarFA) {
?>
<style type="text/css">
.css_read_off_fecha button {
        background-color: transparent;
        border: 0;
        padding: 0
}
.css_read_off_fecha_nacimiento button {
        background-color: transparent;
        border: 0;
        padding: 0
}
</style>
<?php
}
?>
 <style type="text/css">
   .select2-container {
     width: auto;
     flex-grow: 1;
   }
   .select2-selection {
     width: 100%;
   }
 </style>
<!--[if lt IE 9]>
<script type="text/javascript" src="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/jsignature/flashcanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/jsignature/jSignature.min.js"></script>
<?php

if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['margin_top']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['margin_top']) {
?>
<style>
.scFormBorder {
    padding-top: 0 !important;
}
.scBlockRowFirst .scFormTable {
    margin-top: <?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['margin_top'] ?>;
}
</style>
<?php
}

?>

<style type="text/css">
        .sc.switch {
                position: relative;
                display: inline-flex;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        .sc.radio input:checked + span:after {
                transform: translateX(-100%);
                transform: scale(1);
        }
</style>
<link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/select2/css/select2.min.css" type="text/css" />
<script type="text/javascript" src="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/select2/js/select2.full.min.js"></script>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput2.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fieldSelection.js"></SCRIPT>
 <?php
 if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['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/6/css/all.min.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
<?php
   include_once("../_lib/css/" . $this->Ini->str_schema_all . "_tab.php");
 }
?>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>form_pla_actualizacion_de_datos/form_pla_actualizacion_de_datos_mob_<?php echo strtolower($_SESSION['scriptcase']['reg_conf']['css_dir']) ?>.css" />

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

<?php
include_once("form_pla_actualizacion_de_datos_mob_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;
var scFormCtrlChanged = true;
function findPos(obj)
{
 var posCurLeft = posCurTop = 0;
 if (obj.offsetParent)
 {
  posCurLeft = obj.offsetLeft
  posCurTop = obj.offsetTop
  while (obj = obj.offsetParent)
  {
   posCurLeft += obj.offsetLeft
   posCurTop += obj.offsetTop
  }
 }
 posDispLeft = posCurLeft - 10;
 posDispTop = posCurTop + 30;
}
var Nav_permite_ret = "<?php if ($this->Nav_permite_ret) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_permite_ava = "<?php if ($this->Nav_permite_ava) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_binicio     = "<?php echo $this->arr_buttons['binicio']['type']; ?>";
var Nav_bavanca     = "<?php echo $this->arr_buttons['bavanca']['type']; ?>";
var Nav_bretorna    = "<?php echo $this->arr_buttons['bretorna']['type']; ?>";
var Nav_bfinal      = "<?php echo $this->arr_buttons['bfinal']['type']; ?>";
var Nav_binicio_macro_disabled  = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['first']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['first'] : 'off'); ?>";
var Nav_bavanca_macro_disabled  = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['forward']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['forward'] : 'off'); ?>";
var Nav_bretorna_macro_disabled = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['back']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['back'] : 'off'); ?>";
var Nav_bfinal_macro_disabled   = "<?php echo (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['last']) ? $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['last'] : 'off'); ?>";
function nav_atualiza(str_ret, str_ava, str_pos)
{
<?php
 if (isset($this->NM_btn_navega) && 'N' == $this->NM_btn_navega)
 {
     echo " return;";
 }
 else
 {
?>
 if ('S' == str_ret)
 {
<?php
    if (isset($this->nmgp_botoes['first']) && $this->nmgp_botoes['first'] == "on")
    {
?>
       if ("off" == Nav_binicio_macro_disabled) { $("#sc_b_ini_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
    if (isset($this->nmgp_botoes['back']) && $this->nmgp_botoes['back'] == "on")
    {
?>
       if ("off" == Nav_bretorna_macro_disabled) { $("#sc_b_ret_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
?>
 }
 else
 {
<?php
    if (isset($this->nmgp_botoes['first']) && $this->nmgp_botoes['first'] == "on")
    {
?>
       $("#sc_b_ini_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
    if (isset($this->nmgp_botoes['back']) && $this->nmgp_botoes['back'] == "on")
    {
?>
       $("#sc_b_ret_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
?>
 }
 if ('S' == str_ava)
 {
<?php
    if (isset($this->nmgp_botoes['last']) && $this->nmgp_botoes['last'] == "on")
    {
?>
       if ("off" == Nav_bfinal_macro_disabled) { $("#sc_b_fim_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
    if (isset($this->nmgp_botoes['forward']) && $this->nmgp_botoes['forward'] == "on")
    {
?>
       if ("off" == Nav_bavanca_macro_disabled) { $("#sc_b_avc_" + str_pos).prop("disabled", false).removeClass("disabled"); }
<?php
    }
?>
 }
 else
 {
<?php
    if (isset($this->nmgp_botoes['last']) && $this->nmgp_botoes['last'] == "on")
    {
?>
       $("#sc_b_fim_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
    if (isset($this->nmgp_botoes['forward']) && $this->nmgp_botoes['forward'] == "on")
    {
?>
       $("#sc_b_avc_" + str_pos).prop("disabled", true).addClass("disabled");
<?php
    }
?>
 }
<?php
  }
?>
}
function nav_liga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' == sImg.substr(sImg.length - 4))
 {
  sImg = sImg.substr(0, sImg.length - 4);
 }
 sImg += sExt;
}
function nav_desliga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' != sImg.substr(sImg.length - 4))
 {
  sImg += '_off';
 }
 sImg += sExt;
}
function summary_atualiza(reg_ini, reg_qtd, reg_tot)
{
    nm_sumario = "[<?php echo substr($this->Ini->Nm_lang['lang_othr_smry_info'], strpos($this->Ini->Nm_lang['lang_othr_smry_info'], "?final?")) ?>]";
    nm_sumario = nm_sumario.replace("?final?", reg_qtd);
    nm_sumario = nm_sumario.replace("?total?", reg_tot);
    if (reg_qtd < 1) {
        nm_sumario = "";
    }
    if (document.getElementById("sc_b_summary_b")) document.getElementById("sc_b_summary_b").innerHTML = nm_sumario;
}


/*----- Scriptcase Locale: JS Method: cambiar_label_firma ------*/

 function cambiar_label_firma() {
  $("#btn_sign_clear_firma .btn-label").text('Limpiar firma');
 } // cambiar_label_firma

/*----- END - Scriptcase Locale: JS Method: cambiar_label_firma ------*/



/*----- Scriptcase Locale: JS Method: conexito ------*/

 function conexito() {
  Swal.fire({
  	title: 'Registro',
  	text: 'Con exito',
  	type: 'success',
  	showConfirmButton: true,
  	confirmButtonText: 'Cerrar pantalla'
  }).then((val) => {
      //location.href="http://192.168.1.12/grant/index.php";
  	window.location.href='../app_Login/index.php';
  	// window.close();
  });
 } // conexito

/*----- END - Scriptcase Locale: JS Method: conexito ------*/

<?php

include_once('form_pla_actualizacion_de_datos_mob_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();

  sc_form_onload();

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

        setLabelCellMaxWidth();

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

<?php
    }
}
?>
 });

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

 var show_block = {
  
 };

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

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

  show_block[block_id] = !show_block[block_id];

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

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

  if (show_block[block_id]) {
  }
 }

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

</script>
</HEAD>
<?php
$str_iframe_body = ('F' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe']) ? 'margin: 2px;' : '';
 if (isset($_SESSION['nm_aba_bg_color']))
 {
     $this->Ini->cor_bg_grid = $_SESSION['nm_aba_bg_color'];
     $this->Ini->img_fun_pag = $_SESSION['nm_aba_bg_img'];
 }
if ($GLOBALS["erro_incl"] == 1)
{
    $this->nmgp_opcao = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['recarga'];
}
if ('' != $this->cedula)
{
    $this->lookup_cedula($look_rpc_cedula);
}
    $remove_margin = isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['remove_margin'] ? 'margin: 0; ' : '';
    $remove_border = isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['remove_border'] ? 'border-width: 0; ' : '';
    $remove_background = isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['remove_background']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['remove_background'] ? 'background-color: transparent; background-image: none; ' : '';
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['remove_margin']) {
        $remove_margin = 'margin: 0; ';
    }
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['remove_background']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['remove_background']) {
        $remove_background = 'background-color: transparent; background-image: none; ';
    }
    if ('' != $remove_margin && isset($str_iframe_body) && '' != $str_iframe_body) {
        $str_iframe_body = '';
    }
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['link_info']['remove_border']) {
        $remove_border = 'border-width: 0; ';
    }
    if ('' != $remove_background) {
?>
<style>
.scFormBorder { <?php echo $remove_background ?> }
.scFormToolbar { <?php echo $remove_background ?> }
</style>
<?php
    }
    $vertical_center = '';
?>
<body class="scFormPage sc-app-form" style="<?php echo $remove_margin . $remove_background . $str_iframe_body . $vertical_center; ?>">
<?php

if (isset($_SESSION['scriptcase']['form_pla_actualizacion_de_datos']['error_buffer']) && '' != $_SESSION['scriptcase']['form_pla_actualizacion_de_datos']['error_buffer'])
{
    echo $_SESSION['scriptcase']['form_pla_actualizacion_de_datos']['error_buffer'];
}
elseif (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    echo $sOBContents;
}

?>
<script type="text/javascript" src="<?php  echo $this->Ini->path_js . "/jsrsClient.js" ?>"> 
</script> 
<div id="idJSSpecChar" style="display: none;"></div>
<script type="text/javascript">
function NM_tp_critica(TP)
{
    if (TP == 0 || TP == 1 || TP == 2)
    {
        nmdg_tipo_crit = TP;
    }
}
</script> 
<?php
 include_once("form_pla_actualizacion_de_datos_mob_js0.php");
?>
<script type="text/javascript" src="<?php  echo $this->Ini->path_js . "/jsrsClient.js" ?>"> 
</script> 
<script type="text/javascript"> 
 function setLocale(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_idioma_novo.value = sLocale;
 }
 function setSchema(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_schema_f.value = sLocale;
 }
var scInsertFieldWithErrors = new Array();
<?php
foreach ($this->NM_ajax_info['fieldsWithErrors'] as $insertFieldName) {
?>
scInsertFieldWithErrors.push("<?php echo $insertFieldName; ?>");
<?php
}
?>
$(function() {
        scAjaxError_markFieldList(scInsertFieldWithErrors);
});
 </script>
<form  name="F1" method="post" 
               action="form_pla_actualizacion_de_datos_mob.php" 
               target="_self">
<input type="hidden" name="nmgp_url_saida" value="">
<?php
if ('novo' == $this->nmgp_opcao || 'incluir' == $this->nmgp_opcao)
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['insert_validation'] = md5(time() . rand(1, 99999));
?>
<input type="hidden" name="nmgp_ins_valid" value="<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['insert_validation']; ?>">
<?php
}
?>
<input type="hidden" name="nm_form_submit" value="1">
<input type="hidden" name="nmgp_idioma_novo" value="">
<input type="hidden" name="nmgp_schema_f" value="">
<input type="hidden" name="nmgp_opcao" value="">
<input type="hidden" name="nmgp_ancora" value="">
<input type="hidden" name="nmgp_num_form" value="<?php  echo $this->form_encode_input($nmgp_num_form); ?>">
<input type="hidden" name="nmgp_parms" value="">
<input type="hidden" name="script_case_init" value="<?php  echo $this->form_encode_input($this->Ini->sc_page); ?>">
<input type="hidden" name="NM_cancel_return_new" value="<?php echo $this->NM_cancel_return_new ?>">
<input type="hidden" name="_sc_force_mobile" id="sc-id-mobile-control" value="" />
<?php
$_SESSION['scriptcase']['error_span_title']['form_pla_actualizacion_de_datos_mob'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['form_pla_actualizacion_de_datos_mob'] = '' != $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="100%">
 <tr>
  <td>
  <div class="scFormBorder" style="<?php echo (isset($remove_border) ? $remove_border : ''); ?>">
   <table width='100%' cellspacing=0 cellpadding=0>
<tr><td>
<?php
$this->displayTopToolbar();
?>
<?php
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar sc-toolbar-top" style="padding: 0px; spacing: 0px">
    <table style="border-collapse: collapse; border-width: 0px; width: 100%">
    <tr> 
     <td nowrap align="left" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
}
    $NM_btn = false;
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R")
{
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['update'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-9';
        $buttonMacroLabel = "Finalizar registro";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['update']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['update']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['update']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['update']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['update'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "balterar", "scBtnFn_sys_format_alt()", "scBtnFn_sys_format_alt()", "sc_b_upd_t", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ('' != $this->url_webhelp) {
        $sCondStyle = '';
?>
<?php
        $buttonMacroDisabled = '';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['help']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['help']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['help']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['help']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['help'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bhelp", "scBtnFn_sys_format_hlp()", "scBtnFn_sys_format_hlp()", "sc_b_hlp_t", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ((!$this->Embutida_call || $this->form_3versions_single) && ((!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) || !$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard'] || (isset($this->is_calendar_app) && $this->is_calendar_app)))) {
        $sCondStyle = (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && $nm_apl_dependente != 1 && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && !$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-10';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bsair", "scBtnFn_sys_format_sai()", "scBtnFn_sys_format_sai()", "sc_b_sai_t", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ((!$this->Embutida_call) && ((!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) || !$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard'] || (isset($this->is_calendar_app) && $this->is_calendar_app)))) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-11';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "scBtnFn_sys_format_sai()", "scBtnFn_sys_format_sai()", "sc_b_sai_t", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ((!$this->Embutida_call) && ((!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) || !$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard'] || (isset($this->is_calendar_app) && $this->is_calendar_app)))) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente != 1 || $this->nmgp_botoes['exit'] != "on") && ((!$this->aba_iframe || $this->is_calendar_app) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-12';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bsair", "scBtnFn_sys_format_sai()", "scBtnFn_sys_format_sai()", "sc_b_sai_t", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['actualizaciondedatos'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = '';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['actualizaciondedatos']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['actualizaciondedatos']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['actualizaciondedatos']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['actualizaciondedatos']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['actualizaciondedatos'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "actualizaciondedatos", "scBtnFn_actualizaciondedatos()", "scBtnFn_actualizaciondedatos()", "sc_actualizaciondedatos_top", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['logo'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = '';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['logo']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['logo']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['logo']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['logo']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['logo'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "logo", "scBtnFn_logo()", "scBtnFn_logo()", "sc_logo_top", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R")
{
?>
   </td></tr> 
   </table> 
   </td></tr></table> 
<?php
}
?>
<?php
if (!$NM_btn && isset($NM_ult_sep))
{
    echo "    <script language=\"javascript\">";
    echo "      document.getElementById('" .  $NM_ult_sep . "').style.display='none';";
    echo "    </script>";
}
unset($NM_ult_sep);
?>
<?php if ('novo' != $this->nmgp_opcao || $this->Embutida_form) { ?><script>nav_atualiza(Nav_permite_ret, Nav_permite_ava, 't');</script><?php } ?>
</td></tr> 
<tr><td>
<?php
       echo "<div id=\"sc-ui-empty-form\" class=\"scFormPageText\" style=\"padding: 10px; font-weight: bold" . ($this->nmgp_form_empty ? '' : '; display: none') . "\">";
       echo $this->Ini->Nm_lang['lang_errm_empt'];
       echo "</div>";
  if ($this->nmgp_form_empty)
  {
       if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['where_filter']))
       {
           $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['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 class="scBlockRow scBlockRowFirst"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_0" class="scBlockFrame"><!-- bloco_c -->
<?php
   if (!isset($this->nmgp_cmp_hidden['id']))
   {
       $this->nmgp_cmp_hidden['id'] = 'off';
   }
   if (!isset($this->nmgp_cmp_hidden['firma2']))
   {
       $this->nmgp_cmp_hidden['firma2'] = 'off';
   }
   if (!isset($this->nmgp_cmp_hidden['yaestaregistrado']))
   {
       $this->nmgp_cmp_hidden['yaestaregistrado'] = 'off';
   }
?>
<TABLE align="center" id="hidden_bloco_0" class="scFormTable scFormDataOdd<?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['titulo']))
    {
        $this->nm_new_label['titulo'] = "";
    }
?>
<?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);
   $titulo = $this->titulo;
   $sStyleHidden_titulo = '';
   if (isset($this->nmgp_cmp_hidden['titulo']) && $this->nmgp_cmp_hidden['titulo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['titulo']);
       $sStyleHidden_titulo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_titulo = 'display: none;';
   $sStyleReadInp_titulo = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['titulo']) && $this->nmgp_cmp_readonly['titulo'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['titulo']);
       $sStyleReadLab_titulo = '';
       $sStyleReadInp_titulo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['titulo']) && $this->nmgp_cmp_hidden['titulo'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="titulo" value="<?php echo $this->form_encode_input($titulo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd css_titulo_line" id="hidden_field_data_titulo" style="<?php echo $sStyleHidden_titulo; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_titulo_line" style="padding: 0px"><input type="hidden" name="titulo" value="<?php echo $this->form_encode_input($titulo); ?>"><span id="id_ajax_label_titulo"><?php echo nl2br($titulo); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_titulo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_titulo_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_titulo_dumb = ('' == $sStyleHidden_titulo) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_titulo_dumb" style="<?php echo $sStyleHidden_titulo_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 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_1" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_1" class="scFormTable scFormDataOdd<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['cedula']))
           {
               $this->nmgp_cmp_readonly['cedula'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['fecha']))
    {
        $this->nm_new_label['fecha'] = "Fecha";
    }
?>
<?php
   $nm_cor_fun_cel  = (isset($nm_cor_fun_cel) && $nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = (isset($nm_img_fun_cel) && $nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $old_dt_fecha = $this->fecha;
   if (strlen($this->fecha_hora) > 8 ) {$this->fecha_hora = substr($this->fecha_hora, 0, 8);}
   $this->fecha .= ' ' . $this->fecha_hora;
   $this->fecha  = trim($this->fecha);
   $fecha = $this->fecha;
   $sStyleHidden_fecha = '';
   if (isset($this->nmgp_cmp_hidden['fecha']) && $this->nmgp_cmp_hidden['fecha'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fecha']);
       $sStyleHidden_fecha = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fecha = 'display: none;';
   $sStyleReadInp_fecha = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fecha']) && $this->nmgp_cmp_readonly['fecha'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fecha']);
       $sStyleReadLab_fecha = '';
       $sStyleReadInp_fecha = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fecha']) && $this->nmgp_cmp_hidden['fecha'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fecha" value="<?php echo $this->form_encode_input($fecha) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_fecha" style="<?php echo $sStyleHidden_fecha; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_fecha_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_fecha_label" style=" padding: 0px; width: 100%;"><span id="id_label_fecha"><?php echo $this->nm_new_label['fecha']; ?></span></td></tr><tr><td class="css_fecha_line" style="padding: 0px; width: 100%;"><input type="hidden" name="fecha" value="<?php echo $this->form_encode_input($fecha); ?>"><span id="id_ajax_label_fecha"><?php echo nl2br($fecha); ?></span>
<?php
$tmp_form_data = $this->field_config['fecha']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fecha_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fecha_text"></span></td></tr></table></td></tr></table></td></tr></table> </TD>
   <?php }?>
<?php
   $this->fecha = $old_dt_fecha;
?>






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


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





<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['periodo']))
           {
               $this->nmgp_cmp_readonly['periodo'] = 'on';
           }
?>


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

    <TD class="scFormDataOdd" id="hidden_field_data_cedula" style="<?php echo $sStyleHidden_cedula; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_cedula_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_cedula_label" style=" padding: 0px; width: 100%;"><span id="id_label_cedula"><?php echo $this->nm_new_label['cedula']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['cedula']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['cedula'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_cedula_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["cedula"]) &&  $this->nmgp_cmp_readonly["cedula"] == "on")) { 

 ?>
<input type="hidden" name="cedula" value="<?php echo $this->form_encode_input($cedula) . "\"><span id=\"id_ajax_label_cedula\">" . $cedula . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_cedula" class="sc-ui-readonly-cedula css_cedula_line" style="<?php echo $sStyleReadLab_cedula; ?>"><?php echo $this->form_format_readonly("cedula", $this->form_encode_input($this->cedula)); ?></span><span id="id_read_off_cedula" class="css_read_off_cedula<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_cedula; ?>">
 <input class="sc-js-input scFormObjectOdd css_cedula_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_cedula" type=text name="cedula" value="<?php echo $this->form_encode_input($cedula) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=20"; } ?> maxlength=20 alt="{datatype: 'text', maxLength: 20, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span><?php } ?>
 <SPAN id="id_lookup_cedula"><?php echo $look_rpc_cedula; ?></SPAN></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_cedula_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_cedula_text"></span></td></tr></table></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['periodo']))
   {
       $this->nm_new_label['periodo'] = "Periodo";
   }
   $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);
   $periodo = $this->periodo;
   $sStyleHidden_periodo = '';
   if (isset($this->nmgp_cmp_hidden['periodo']) && $this->nmgp_cmp_hidden['periodo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['periodo']);
       $sStyleHidden_periodo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_periodo = 'display: none;';
   $sStyleReadInp_periodo = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["periodo"]) &&  $this->nmgp_cmp_readonly["periodo"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['periodo']);
       $sStyleReadLab_periodo = '';
       $sStyleReadInp_periodo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['periodo']) && $this->nmgp_cmp_hidden['periodo'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="periodo" value="<?php echo $this->form_encode_input($this->periodo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_periodo" style="<?php echo $sStyleHidden_periodo; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_periodo_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_periodo_label" style=" padding: 0px; width: 100%;"><span id="id_label_periodo"><?php echo $this->nm_new_label['periodo']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['periodo']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['periodo'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_periodo_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["periodo"]) &&  $this->nmgp_cmp_readonly["periodo"] == "on")) { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "SELECT id, descripcion  FROM pla_actualizacion_periodo  ORDER BY descripcion";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_periodo'][] = $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; 
   $periodo_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->periodo_1))
          {
              foreach ($this->periodo_1 as $tmp_periodo)
              {
                  if (trim($tmp_periodo) === trim($cadaselect[1])) {$periodo_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->periodo) && trim($this->periodo) === trim($cadaselect[1])) {$periodo_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="periodo" value="<?php echo $this->form_encode_input($periodo) . "\"><span id=\"id_ajax_label_periodo\">" . $periodo_look . "</span>"; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_periodo();
   $x = 0 ; 
   $periodo_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->periodo_1))
          {
              foreach ($this->periodo_1 as $tmp_periodo)
              {
                  if (trim($tmp_periodo) === trim($cadaselect[1])) {$periodo_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->periodo)) {
                 if (trim($this->periodo) == trim($cadaselect[1])) { $periodo_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->periodo == $cadaselect[1]) { $periodo_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($periodo_look))
          {
              $periodo_look = $this->periodo;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_periodo\" class=\"css_periodo_line\" style=\"" .  $sStyleReadLab_periodo . "\">" . $this->form_format_readonly("periodo", $this->form_encode_input($periodo_look)) . "</span><span id=\"id_read_off_periodo\" class=\"css_read_off_periodo" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_periodo . "\">";
   echo " <span id=\"idAjaxSelect_periodo\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_periodo_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_periodo\" name=\"periodo\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if ($cadaselect[1] == "@ ") {$cadaselect[1]= trim($cadaselect[1]); } ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->periodo) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->periodo)) 
              {
                  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_periodo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_periodo_text"></span></td></tr></table></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['predio']))
   {
       $this->nm_new_label['predio'] = "Predio";
   }
   $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);
   $predio = $this->predio;
   $sStyleHidden_predio = '';
   if (isset($this->nmgp_cmp_hidden['predio']) && $this->nmgp_cmp_hidden['predio'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['predio']);
       $sStyleHidden_predio = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_predio = 'display: none;';
   $sStyleReadInp_predio = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['predio']) && $this->nmgp_cmp_readonly['predio'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['predio']);
       $sStyleReadLab_predio = '';
       $sStyleReadInp_predio = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['predio']) && $this->nmgp_cmp_hidden['predio'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="predio" value="<?php echo $this->form_encode_input($this->predio) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_predio" style="<?php echo $sStyleHidden_predio; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_predio_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_predio_label" style=" padding: 0px; width: 100%;"><span id="id_label_predio"><?php echo $this->nm_new_label['predio']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['predio']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['predio'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_predio_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["predio"]) &&  $this->nmgp_cmp_readonly["predio"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $nm_comando = "SELECT codigo, descripcion  FROM pre_predio  where codigo<>'999' ORDER BY descripcion";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio'][] = $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; 
   $predio_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->predio_1))
          {
              foreach ($this->predio_1 as $tmp_predio)
              {
                  if (trim($tmp_predio) === trim($cadaselect[1])) {$predio_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->predio) && trim($this->predio) === trim($cadaselect[1])) {$predio_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="predio" value="<?php echo $this->form_encode_input($predio) . "\">" . $predio_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_predio();
   $x = 0 ; 
   $predio_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->predio_1))
          {
              foreach ($this->predio_1 as $tmp_predio)
              {
                  if (trim($tmp_predio) === trim($cadaselect[1])) {$predio_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->predio)) {
                 if (trim($this->predio) == trim($cadaselect[1])) { $predio_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->predio == $cadaselect[1]) { $predio_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($predio_look))
          {
              $predio_look = $this->predio;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_predio\" class=\"css_predio_line\" style=\"" .  $sStyleReadLab_predio . "\">" . $this->form_format_readonly("predio", $this->form_encode_input($predio_look)) . "</span><span id=\"id_read_off_predio\" class=\"css_read_off_predio" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_predio . "\">";
   echo " <span id=\"idAjaxSelect_predio\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_predio_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_predio\" name=\"predio\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_predio'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;","Seleccione el predio") . "</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->predio) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->predio)) 
              {
                  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_predio_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_predio_text"></span></td></tr></table></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['celular_personal']))
    {
        $this->nm_new_label['celular_personal'] = "Celular Personal";
    }
?>
<?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);
   $celular_personal = $this->celular_personal;
   $sStyleHidden_celular_personal = '';
   if (isset($this->nmgp_cmp_hidden['celular_personal']) && $this->nmgp_cmp_hidden['celular_personal'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['celular_personal']);
       $sStyleHidden_celular_personal = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_celular_personal = 'display: none;';
   $sStyleReadInp_celular_personal = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['celular_personal']) && $this->nmgp_cmp_readonly['celular_personal'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['celular_personal']);
       $sStyleReadLab_celular_personal = '';
       $sStyleReadInp_celular_personal = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['celular_personal']) && $this->nmgp_cmp_hidden['celular_personal'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="celular_personal" value="<?php echo $this->form_encode_input($celular_personal) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_celular_personal" style="<?php echo $sStyleHidden_celular_personal; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_celular_personal_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_celular_personal_label" style=" padding: 0px; width: 100%;"><span id="id_label_celular_personal"><?php echo $this->nm_new_label['celular_personal']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['celular_personal']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['celular_personal'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_celular_personal_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["celular_personal"]) &&  $this->nmgp_cmp_readonly["celular_personal"] == "on") { 

 ?>
<input type="hidden" name="celular_personal" value="<?php echo $this->form_encode_input($celular_personal) . "\">" . $celular_personal . ""; ?>
<?php } else { ?>
<span id="id_read_on_celular_personal" class="sc-ui-readonly-celular_personal css_celular_personal_line" style="<?php echo $sStyleReadLab_celular_personal; ?>"><?php echo $this->form_format_readonly("celular_personal", $this->form_encode_input($this->celular_personal)); ?></span><span id="id_read_off_celular_personal" class="css_read_off_celular_personal<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_celular_personal; ?>">
 <input class="sc-js-input scFormObjectOdd css_celular_personal_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_celular_personal" type=text name="celular_personal" value="<?php echo $this->form_encode_input($celular_personal) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> maxlength=8 alt="{datatype: 'text', maxLength: 8, allowedChars: '<?php echo $this->allowedCharsCharset("0123456789") ?>', 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_celular_personal_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_celular_personal_text"></span></td></tr></table></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['celular_empresa']))
    {
        $this->nm_new_label['celular_empresa'] = "Celular Empresa";
    }
?>
<?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);
   $celular_empresa = $this->celular_empresa;
   $sStyleHidden_celular_empresa = '';
   if (isset($this->nmgp_cmp_hidden['celular_empresa']) && $this->nmgp_cmp_hidden['celular_empresa'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['celular_empresa']);
       $sStyleHidden_celular_empresa = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_celular_empresa = 'display: none;';
   $sStyleReadInp_celular_empresa = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['celular_empresa']) && $this->nmgp_cmp_readonly['celular_empresa'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['celular_empresa']);
       $sStyleReadLab_celular_empresa = '';
       $sStyleReadInp_celular_empresa = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['celular_empresa']) && $this->nmgp_cmp_hidden['celular_empresa'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="celular_empresa" value="<?php echo $this->form_encode_input($celular_empresa) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_celular_empresa" style="<?php echo $sStyleHidden_celular_empresa; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_celular_empresa_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_celular_empresa_label" style=" padding: 0px; width: 100%;"><span id="id_label_celular_empresa"><?php echo $this->nm_new_label['celular_empresa']; ?></span></td></tr><tr><td class="css_celular_empresa_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["celular_empresa"]) &&  $this->nmgp_cmp_readonly["celular_empresa"] == "on") { 

 ?>
<input type="hidden" name="celular_empresa" value="<?php echo $this->form_encode_input($celular_empresa) . "\">" . $celular_empresa . ""; ?>
<?php } else { ?>
<span id="id_read_on_celular_empresa" class="sc-ui-readonly-celular_empresa css_celular_empresa_line" style="<?php echo $sStyleReadLab_celular_empresa; ?>"><?php echo $this->form_format_readonly("celular_empresa", $this->form_encode_input($this->celular_empresa)); ?></span><span id="id_read_off_celular_empresa" class="css_read_off_celular_empresa<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_celular_empresa; ?>">
 <input class="sc-js-input scFormObjectOdd css_celular_empresa_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_celular_empresa" type=text name="celular_empresa" value="<?php echo $this->form_encode_input($celular_empresa) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> maxlength=8 alt="{datatype: 'text', maxLength: 8, allowedChars: '<?php echo $this->allowedCharsCharset("0123456789") ?>', 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_celular_empresa_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_celular_empresa_text"></span></td></tr></table></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_celular_empresa_dumb = ('' == $sStyleHidden_celular_empresa) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_celular_empresa_dumb" style="<?php echo $sStyleHidden_celular_empresa_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 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_2" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_2" class="scFormTable scFormDataOdd<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;">   <tr>
   <td style="border:0;padding:0;height:0" class="scUiLabelWidthFix"></td>
   </tr>
   <tr>


    <TD colspan="1" height="0" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont">Contacto de emergenca 1</TD>
       
      </TR>
     </TABLE>
    </TD>





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


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

    <TD class="scFormDataOdd" id="hidden_field_data_telefono_emergencia1" style="<?php echo $sStyleHidden_telefono_emergencia1; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_telefono_emergencia1_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_telefono_emergencia1_label" style=" padding: 0px; width: 100%;"><span id="id_label_telefono_emergencia1"><?php echo $this->nm_new_label['telefono_emergencia1']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['telefono_emergencia1']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['telefono_emergencia1'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_telefono_emergencia1_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["telefono_emergencia1"]) &&  $this->nmgp_cmp_readonly["telefono_emergencia1"] == "on") { 

 ?>
<input type="hidden" name="telefono_emergencia1" value="<?php echo $this->form_encode_input($telefono_emergencia1) . "\">" . $telefono_emergencia1 . ""; ?>
<?php } else { ?>
<span id="id_read_on_telefono_emergencia1" class="sc-ui-readonly-telefono_emergencia1 css_telefono_emergencia1_line" style="<?php echo $sStyleReadLab_telefono_emergencia1; ?>"><?php echo $this->form_format_readonly("telefono_emergencia1", $this->form_encode_input($this->telefono_emergencia1)); ?></span><span id="id_read_off_telefono_emergencia1" class="css_read_off_telefono_emergencia1<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_telefono_emergencia1; ?>">
 <input class="sc-js-input scFormObjectOdd css_telefono_emergencia1_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_telefono_emergencia1" type=text name="telefono_emergencia1" value="<?php echo $this->form_encode_input($telefono_emergencia1) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> maxlength=8 alt="{datatype: 'text', maxLength: 8, allowedChars: '<?php echo $this->allowedCharsCharset("0123456789") ?>', 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_telefono_emergencia1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_telefono_emergencia1_text"></span></td></tr></table></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['nombre_persona_emergencia1']))
    {
        $this->nm_new_label['nombre_persona_emergencia1'] = "Nombre";
    }
?>
<?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);
   $nombre_persona_emergencia1 = $this->nombre_persona_emergencia1;
   $sStyleHidden_nombre_persona_emergencia1 = '';
   if (isset($this->nmgp_cmp_hidden['nombre_persona_emergencia1']) && $this->nmgp_cmp_hidden['nombre_persona_emergencia1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['nombre_persona_emergencia1']);
       $sStyleHidden_nombre_persona_emergencia1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_nombre_persona_emergencia1 = 'display: none;';
   $sStyleReadInp_nombre_persona_emergencia1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['nombre_persona_emergencia1']) && $this->nmgp_cmp_readonly['nombre_persona_emergencia1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['nombre_persona_emergencia1']);
       $sStyleReadLab_nombre_persona_emergencia1 = '';
       $sStyleReadInp_nombre_persona_emergencia1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['nombre_persona_emergencia1']) && $this->nmgp_cmp_hidden['nombre_persona_emergencia1'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="nombre_persona_emergencia1" value="<?php echo $this->form_encode_input($nombre_persona_emergencia1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_nombre_persona_emergencia1" style="<?php echo $sStyleHidden_nombre_persona_emergencia1; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_nombre_persona_emergencia1_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_nombre_persona_emergencia1_label" style=" padding: 0px; width: 100%;"><span id="id_label_nombre_persona_emergencia1"><?php echo $this->nm_new_label['nombre_persona_emergencia1']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['nombre_persona_emergencia1']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['nombre_persona_emergencia1'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_nombre_persona_emergencia1_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["nombre_persona_emergencia1"]) &&  $this->nmgp_cmp_readonly["nombre_persona_emergencia1"] == "on") { 

 ?>
<input type="hidden" name="nombre_persona_emergencia1" value="<?php echo $this->form_encode_input($nombre_persona_emergencia1) . "\">" . $nombre_persona_emergencia1 . ""; ?>
<?php } else { ?>
<span id="id_read_on_nombre_persona_emergencia1" class="sc-ui-readonly-nombre_persona_emergencia1 css_nombre_persona_emergencia1_line" style="<?php echo $sStyleReadLab_nombre_persona_emergencia1; ?>"><?php echo $this->form_format_readonly("nombre_persona_emergencia1", $this->form_encode_input($this->nombre_persona_emergencia1)); ?></span><span id="id_read_off_nombre_persona_emergencia1" class="css_read_off_nombre_persona_emergencia1<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_nombre_persona_emergencia1; ?>">
 <input class="sc-js-input scFormObjectOdd css_nombre_persona_emergencia1_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_nombre_persona_emergencia1" type=text name="nombre_persona_emergencia1" value="<?php echo $this->form_encode_input($nombre_persona_emergencia1) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=100 alt="{datatype: 'text', maxLength: 100, 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_nombre_persona_emergencia1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nombre_persona_emergencia1_text"></span></td></tr></table></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['parentesco1']))
   {
       $this->nm_new_label['parentesco1'] = "Parentesco";
   }
   $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);
   $parentesco1 = $this->parentesco1;
   $sStyleHidden_parentesco1 = '';
   if (isset($this->nmgp_cmp_hidden['parentesco1']) && $this->nmgp_cmp_hidden['parentesco1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['parentesco1']);
       $sStyleHidden_parentesco1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_parentesco1 = 'display: none;';
   $sStyleReadInp_parentesco1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['parentesco1']) && $this->nmgp_cmp_readonly['parentesco1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['parentesco1']);
       $sStyleReadLab_parentesco1 = '';
       $sStyleReadInp_parentesco1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['parentesco1']) && $this->nmgp_cmp_hidden['parentesco1'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="parentesco1" value="<?php echo $this->form_encode_input($this->parentesco1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_parentesco1" style="<?php echo $sStyleHidden_parentesco1; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_parentesco1_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_parentesco1_label" style=" padding: 0px; width: 100%;"><span id="id_label_parentesco1"><?php echo $this->nm_new_label['parentesco1']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['parentesco1']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['parentesco1'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_parentesco1_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["parentesco1"]) &&  $this->nmgp_cmp_readonly["parentesco1"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "SELECT id, nombre  FROM pla_verificacion_domicilio_parentesco  ORDER BY nombre";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1'][] = $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; 
   $parentesco1_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->parentesco1_1))
          {
              foreach ($this->parentesco1_1 as $tmp_parentesco1)
              {
                  if (trim($tmp_parentesco1) === trim($cadaselect[1])) {$parentesco1_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->parentesco1) && trim($this->parentesco1) === trim($cadaselect[1])) {$parentesco1_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="parentesco1" value="<?php echo $this->form_encode_input($parentesco1) . "\">" . $parentesco1_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_parentesco1();
   $x = 0 ; 
   $parentesco1_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->parentesco1_1))
          {
              foreach ($this->parentesco1_1 as $tmp_parentesco1)
              {
                  if (trim($tmp_parentesco1) === trim($cadaselect[1])) {$parentesco1_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->parentesco1)) {
                 if (trim($this->parentesco1) == trim($cadaselect[1])) { $parentesco1_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->parentesco1 == $cadaselect[1]) { $parentesco1_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($parentesco1_look))
          {
              $parentesco1_look = $this->parentesco1;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_parentesco1\" class=\"css_parentesco1_line\" style=\"" .  $sStyleReadLab_parentesco1 . "\">" . $this->form_format_readonly("parentesco1", $this->form_encode_input($parentesco1_look)) . "</span><span id=\"id_read_off_parentesco1\" class=\"css_read_off_parentesco1" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_parentesco1 . "\">";
   echo " <span id=\"idAjaxSelect_parentesco1\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_parentesco1_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_parentesco1\" name=\"parentesco1\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco1'][] = ''; 
   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->parentesco1) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->parentesco1)) 
              {
                  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_parentesco1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_parentesco1_text"></span></td></tr></table></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_parentesco1_dumb = ('' == $sStyleHidden_parentesco1) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_parentesco1_dumb" style="<?php echo $sStyleHidden_parentesco1_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 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_3" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_3" class="scFormTable scFormDataOdd<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;">   <tr>
   <td style="border:0;padding:0;height:0" class="scUiLabelWidthFix"></td>
   </tr>
   <tr>


    <TD colspan="1" height="0" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont">Contacto de emergenca 2</TD>
       
      </TR>
     </TABLE>
    </TD>





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


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

    <TD class="scFormDataOdd" id="hidden_field_data_telefono_emergencia2" style="<?php echo $sStyleHidden_telefono_emergencia2; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_telefono_emergencia2_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_telefono_emergencia2_label" style=" padding: 0px; width: 100%;"><span id="id_label_telefono_emergencia2"><?php echo $this->nm_new_label['telefono_emergencia2']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['telefono_emergencia2']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['telefono_emergencia2'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_telefono_emergencia2_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["telefono_emergencia2"]) &&  $this->nmgp_cmp_readonly["telefono_emergencia2"] == "on") { 

 ?>
<input type="hidden" name="telefono_emergencia2" value="<?php echo $this->form_encode_input($telefono_emergencia2) . "\">" . $telefono_emergencia2 . ""; ?>
<?php } else { ?>
<span id="id_read_on_telefono_emergencia2" class="sc-ui-readonly-telefono_emergencia2 css_telefono_emergencia2_line" style="<?php echo $sStyleReadLab_telefono_emergencia2; ?>"><?php echo $this->form_format_readonly("telefono_emergencia2", $this->form_encode_input($this->telefono_emergencia2)); ?></span><span id="id_read_off_telefono_emergencia2" class="css_read_off_telefono_emergencia2<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_telefono_emergencia2; ?>">
 <input class="sc-js-input scFormObjectOdd css_telefono_emergencia2_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_telefono_emergencia2" type=text name="telefono_emergencia2" value="<?php echo $this->form_encode_input($telefono_emergencia2) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> maxlength=8 alt="{datatype: 'text', maxLength: 8, 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_telefono_emergencia2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_telefono_emergencia2_text"></span></td></tr></table></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['nombre_persona_emergencia2']))
    {
        $this->nm_new_label['nombre_persona_emergencia2'] = "Nombre";
    }
?>
<?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);
   $nombre_persona_emergencia2 = $this->nombre_persona_emergencia2;
   $sStyleHidden_nombre_persona_emergencia2 = '';
   if (isset($this->nmgp_cmp_hidden['nombre_persona_emergencia2']) && $this->nmgp_cmp_hidden['nombre_persona_emergencia2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['nombre_persona_emergencia2']);
       $sStyleHidden_nombre_persona_emergencia2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_nombre_persona_emergencia2 = 'display: none;';
   $sStyleReadInp_nombre_persona_emergencia2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['nombre_persona_emergencia2']) && $this->nmgp_cmp_readonly['nombre_persona_emergencia2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['nombre_persona_emergencia2']);
       $sStyleReadLab_nombre_persona_emergencia2 = '';
       $sStyleReadInp_nombre_persona_emergencia2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['nombre_persona_emergencia2']) && $this->nmgp_cmp_hidden['nombre_persona_emergencia2'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="nombre_persona_emergencia2" value="<?php echo $this->form_encode_input($nombre_persona_emergencia2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_nombre_persona_emergencia2" style="<?php echo $sStyleHidden_nombre_persona_emergencia2; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_nombre_persona_emergencia2_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_nombre_persona_emergencia2_label" style=" padding: 0px; width: 100%;"><span id="id_label_nombre_persona_emergencia2"><?php echo $this->nm_new_label['nombre_persona_emergencia2']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['nombre_persona_emergencia2']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['nombre_persona_emergencia2'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_nombre_persona_emergencia2_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["nombre_persona_emergencia2"]) &&  $this->nmgp_cmp_readonly["nombre_persona_emergencia2"] == "on") { 

 ?>
<input type="hidden" name="nombre_persona_emergencia2" value="<?php echo $this->form_encode_input($nombre_persona_emergencia2) . "\">" . $nombre_persona_emergencia2 . ""; ?>
<?php } else { ?>
<span id="id_read_on_nombre_persona_emergencia2" class="sc-ui-readonly-nombre_persona_emergencia2 css_nombre_persona_emergencia2_line" style="<?php echo $sStyleReadLab_nombre_persona_emergencia2; ?>"><?php echo $this->form_format_readonly("nombre_persona_emergencia2", $this->form_encode_input($this->nombre_persona_emergencia2)); ?></span><span id="id_read_off_nombre_persona_emergencia2" class="css_read_off_nombre_persona_emergencia2<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_nombre_persona_emergencia2; ?>">
 <input class="sc-js-input scFormObjectOdd css_nombre_persona_emergencia2_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_nombre_persona_emergencia2" type=text name="nombre_persona_emergencia2" value="<?php echo $this->form_encode_input($nombre_persona_emergencia2) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=100 alt="{datatype: 'text', maxLength: 100, 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_nombre_persona_emergencia2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nombre_persona_emergencia2_text"></span></td></tr></table></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['parentesco2']))
   {
       $this->nm_new_label['parentesco2'] = "Parentesco";
   }
   $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);
   $parentesco2 = $this->parentesco2;
   $sStyleHidden_parentesco2 = '';
   if (isset($this->nmgp_cmp_hidden['parentesco2']) && $this->nmgp_cmp_hidden['parentesco2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['parentesco2']);
       $sStyleHidden_parentesco2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_parentesco2 = 'display: none;';
   $sStyleReadInp_parentesco2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['parentesco2']) && $this->nmgp_cmp_readonly['parentesco2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['parentesco2']);
       $sStyleReadLab_parentesco2 = '';
       $sStyleReadInp_parentesco2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['parentesco2']) && $this->nmgp_cmp_hidden['parentesco2'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="parentesco2" value="<?php echo $this->form_encode_input($this->parentesco2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_parentesco2" style="<?php echo $sStyleHidden_parentesco2; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_parentesco2_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_parentesco2_label" style=" padding: 0px; width: 100%;"><span id="id_label_parentesco2"><?php echo $this->nm_new_label['parentesco2']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['parentesco2']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['parentesco2'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_parentesco2_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["parentesco2"]) &&  $this->nmgp_cmp_readonly["parentesco2"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "SELECT id, nombre  FROM pla_verificacion_domicilio_parentesco  ORDER BY nombre";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2'][] = $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; 
   $parentesco2_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->parentesco2_1))
          {
              foreach ($this->parentesco2_1 as $tmp_parentesco2)
              {
                  if (trim($tmp_parentesco2) === trim($cadaselect[1])) {$parentesco2_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->parentesco2) && trim($this->parentesco2) === trim($cadaselect[1])) {$parentesco2_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="parentesco2" value="<?php echo $this->form_encode_input($parentesco2) . "\">" . $parentesco2_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_parentesco2();
   $x = 0 ; 
   $parentesco2_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->parentesco2_1))
          {
              foreach ($this->parentesco2_1 as $tmp_parentesco2)
              {
                  if (trim($tmp_parentesco2) === trim($cadaselect[1])) {$parentesco2_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->parentesco2)) {
                 if (trim($this->parentesco2) == trim($cadaselect[1])) { $parentesco2_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->parentesco2 == $cadaselect[1]) { $parentesco2_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($parentesco2_look))
          {
              $parentesco2_look = $this->parentesco2;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_parentesco2\" class=\"css_parentesco2_line\" style=\"" .  $sStyleReadLab_parentesco2 . "\">" . $this->form_format_readonly("parentesco2", $this->form_encode_input($parentesco2_look)) . "</span><span id=\"id_read_off_parentesco2\" class=\"css_read_off_parentesco2" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_parentesco2 . "\">";
   echo " <span id=\"idAjaxSelect_parentesco2\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_parentesco2_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_parentesco2\" name=\"parentesco2\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_parentesco2'][] = ''; 
   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->parentesco2) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->parentesco2)) 
              {
                  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_parentesco2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_parentesco2_text"></span></td></tr></table></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_parentesco2_dumb = ('' == $sStyleHidden_parentesco2) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_parentesco2_dumb" style="<?php echo $sStyleHidden_parentesco2_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 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_4" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_4" class="scFormTable scFormDataOdd<?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['direccion']))
    {
        $this->nm_new_label['direccion'] = "Direccion";
    }
?>
<?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);
   $direccion = $this->direccion;
   $sStyleHidden_direccion = '';
   if (isset($this->nmgp_cmp_hidden['direccion']) && $this->nmgp_cmp_hidden['direccion'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['direccion']);
       $sStyleHidden_direccion = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_direccion = 'display: none;';
   $sStyleReadInp_direccion = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['direccion']) && $this->nmgp_cmp_readonly['direccion'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['direccion']);
       $sStyleReadLab_direccion = '';
       $sStyleReadInp_direccion = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['direccion']) && $this->nmgp_cmp_hidden['direccion'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="direccion" value="<?php echo $this->form_encode_input($direccion) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_direccion" style="<?php echo $sStyleHidden_direccion; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_direccion_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_direccion_label" style=" padding: 0px; width: 100%;"><span id="id_label_direccion"><?php echo $this->nm_new_label['direccion']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['direccion']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['direccion'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_direccion_line" style="padding: 0px; width: 100%;">
<?php
$direccion_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($direccion));

?>

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

 ?>
<input type="hidden" name="direccion" value="<?php echo $this->form_encode_input($direccion) . "\">" . $direccion_val . ""; ?>
<?php } else { ?>
<span id="id_read_on_direccion" class="sc-ui-readonly-direccion css_direccion_line" style="<?php echo $sStyleReadLab_direccion; ?>"><?php echo $this->form_format_readonly("direccion", $this->form_encode_input($direccion_val)); ?></span><span id="id_read_off_direccion" class="css_read_off_direccion<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_direccion; ?>">
 <textarea class="sc-js-input scFormObjectOdd css_direccion_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="white-space: pre-wrap;resize: vertical;" name="direccion" id="id_sc_field_direccion" rows="3" cols="30"
 alt="{datatype: 'text', maxLength: 32767, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" >
<?php echo $direccion; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_direccion_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_direccion_text"></span></td></tr></table></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['provincia']))
   {
       $this->nm_new_label['provincia'] = "Provincia";
   }
   $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);
   $provincia = $this->provincia;
   $sStyleHidden_provincia = '';
   if (isset($this->nmgp_cmp_hidden['provincia']) && $this->nmgp_cmp_hidden['provincia'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['provincia']);
       $sStyleHidden_provincia = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_provincia = 'display: none;';
   $sStyleReadInp_provincia = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['provincia']) && $this->nmgp_cmp_readonly['provincia'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['provincia']);
       $sStyleReadLab_provincia = '';
       $sStyleReadInp_provincia = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['provincia']) && $this->nmgp_cmp_hidden['provincia'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="provincia" value="<?php echo $this->form_encode_input($this->provincia) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_provincia" style="<?php echo $sStyleHidden_provincia; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_provincia_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_provincia_label" style=" padding: 0px; width: 100%;"><span id="id_label_provincia"><?php echo $this->nm_new_label['provincia']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['provincia']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['provincia'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_provincia_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["provincia"]) &&  $this->nmgp_cmp_readonly["provincia"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "SELECT numeroProvincia, nombre  FROM gen_provincia  ORDER BY nombre";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia'][] = $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; 
   $provincia_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->provincia_1))
          {
              foreach ($this->provincia_1 as $tmp_provincia)
              {
                  if (trim($tmp_provincia) === trim($cadaselect[1])) {$provincia_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->provincia) && trim($this->provincia) === trim($cadaselect[1])) {$provincia_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="provincia" value="<?php echo $this->form_encode_input($provincia) . "\">" . $provincia_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_provincia();
   $x = 0 ; 
   $provincia_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->provincia_1))
          {
              foreach ($this->provincia_1 as $tmp_provincia)
              {
                  if (trim($tmp_provincia) === trim($cadaselect[1])) {$provincia_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->provincia)) {
                 if (trim($this->provincia) == trim($cadaselect[1])) { $provincia_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->provincia == $cadaselect[1]) { $provincia_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($provincia_look))
          {
              $provincia_look = $this->provincia;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_provincia\" class=\"css_provincia_line\" style=\"" .  $sStyleReadLab_provincia . "\">" . $this->form_format_readonly("provincia", $this->form_encode_input($provincia_look)) . "</span><span id=\"id_read_off_provincia\" class=\"css_read_off_provincia" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_provincia . "\">";
   echo " <span id=\"idAjaxSelect_provincia\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_provincia_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_provincia\" name=\"provincia\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_provincia'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;","Seleccione la provincia") . "</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->provincia) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->provincia)) 
              {
                  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_provincia_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_provincia_text"></span></td></tr></table></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['canton']))
   {
       $this->nm_new_label['canton'] = "Canton";
   }
   $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);
   $canton = $this->canton;
   $sStyleHidden_canton = '';
   if (isset($this->nmgp_cmp_hidden['canton']) && $this->nmgp_cmp_hidden['canton'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['canton']);
       $sStyleHidden_canton = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_canton = 'display: none;';
   $sStyleReadInp_canton = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['canton']) && $this->nmgp_cmp_readonly['canton'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['canton']);
       $sStyleReadLab_canton = '';
       $sStyleReadInp_canton = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['canton']) && $this->nmgp_cmp_hidden['canton'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="canton" value="<?php echo $this->form_encode_input($this->canton) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_canton" style="<?php echo $sStyleHidden_canton; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_canton_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_canton_label" style=" padding: 0px; width: 100%;"><span id="id_label_canton"><?php echo $this->nm_new_label['canton']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['canton']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['canton'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_canton_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["canton"]) &&  $this->nmgp_cmp_readonly["canton"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton'] = array(); 
}
if ($this->provincia != "")
{ 
   $this->nm_clear_val("provincia");
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $nm_comando = "SELECT numeroCanton, nombre  FROM gen_canton    where numeroprovincia='$this->provincia' ORDER BY nombre";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton'][] = $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; 
   $canton_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->canton_1))
          {
              foreach ($this->canton_1 as $tmp_canton)
              {
                  if (trim($tmp_canton) === trim($cadaselect[1])) {$canton_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->canton) && trim($this->canton) === trim($cadaselect[1])) {$canton_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="canton" value="<?php echo $this->form_encode_input($canton) . "\">" . $canton_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_canton();
   $x = 0 ; 
   $canton_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->canton_1))
          {
              foreach ($this->canton_1 as $tmp_canton)
              {
                  if (trim($tmp_canton) === trim($cadaselect[1])) {$canton_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->canton)) {
                 if (trim($this->canton) == trim($cadaselect[1])) { $canton_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->canton == $cadaselect[1]) { $canton_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($canton_look))
          {
              $canton_look = $this->canton;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_canton\" class=\"css_canton_line\" style=\"" .  $sStyleReadLab_canton . "\">" . $this->form_format_readonly("canton", $this->form_encode_input($canton_look)) . "</span><span id=\"id_read_off_canton\" class=\"css_read_off_canton" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_canton . "\">";
   echo " <span id=\"idAjaxSelect_canton\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_canton_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_canton\" name=\"canton\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_canton'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;","Seleccione el canton") . "</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->canton) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->canton)) 
              {
                  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_canton_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_canton_text"></span></td></tr></table></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['distrito']))
   {
       $this->nm_new_label['distrito'] = "Distrito";
   }
   $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);
   $distrito = $this->distrito;
   $sStyleHidden_distrito = '';
   if (isset($this->nmgp_cmp_hidden['distrito']) && $this->nmgp_cmp_hidden['distrito'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['distrito']);
       $sStyleHidden_distrito = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_distrito = 'display: none;';
   $sStyleReadInp_distrito = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['distrito']) && $this->nmgp_cmp_readonly['distrito'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['distrito']);
       $sStyleReadLab_distrito = '';
       $sStyleReadInp_distrito = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['distrito']) && $this->nmgp_cmp_hidden['distrito'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="distrito" value="<?php echo $this->form_encode_input($this->distrito) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_distrito" style="<?php echo $sStyleHidden_distrito; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_distrito_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_distrito_label" style=" padding: 0px; width: 100%;"><span id="id_label_distrito"><?php echo $this->nm_new_label['distrito']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['distrito']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['distrito'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_distrito_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["distrito"]) &&  $this->nmgp_cmp_readonly["distrito"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito'] = array(); 
}
if ($this->provincia != "" && $this->canton != "")
{ 
   $this->nm_clear_val("provincia");
   $this->nm_clear_val("canton");
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $nm_comando = "SELECT numeroDistrito, nombre  FROM gen_distrito  where numeroprovincia='$this->provincia'   and numerocanton='$this->canton' ORDER BY nombre";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito'][] = $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; 
   $distrito_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->distrito_1))
          {
              foreach ($this->distrito_1 as $tmp_distrito)
              {
                  if (trim($tmp_distrito) === trim($cadaselect[1])) {$distrito_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->distrito) && trim($this->distrito) === trim($cadaselect[1])) {$distrito_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="distrito" value="<?php echo $this->form_encode_input($distrito) . "\">" . $distrito_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_distrito();
   $x = 0 ; 
   $distrito_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->distrito_1))
          {
              foreach ($this->distrito_1 as $tmp_distrito)
              {
                  if (trim($tmp_distrito) === trim($cadaselect[1])) {$distrito_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->distrito)) {
                 if (trim($this->distrito) == trim($cadaselect[1])) { $distrito_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->distrito == $cadaselect[1]) { $distrito_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($distrito_look))
          {
              $distrito_look = $this->distrito;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_distrito\" class=\"css_distrito_line\" style=\"" .  $sStyleReadLab_distrito . "\">" . $this->form_format_readonly("distrito", $this->form_encode_input($distrito_look)) . "</span><span id=\"id_read_off_distrito\" class=\"css_read_off_distrito" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_distrito . "\">";
   echo " <span id=\"idAjaxSelect_distrito\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_distrito_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_distrito\" name=\"distrito\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_distrito'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;","Seleccione el distrito") . "</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->distrito) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->distrito)) 
              {
                  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_distrito_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_distrito_text"></span></td></tr></table></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['correo_electronico']))
    {
        $this->nm_new_label['correo_electronico'] = "Correo Electronico";
    }
?>
<?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);
   $correo_electronico = $this->correo_electronico;
   $sStyleHidden_correo_electronico = '';
   if (isset($this->nmgp_cmp_hidden['correo_electronico']) && $this->nmgp_cmp_hidden['correo_electronico'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['correo_electronico']);
       $sStyleHidden_correo_electronico = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_correo_electronico = 'display: none;';
   $sStyleReadInp_correo_electronico = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['correo_electronico']) && $this->nmgp_cmp_readonly['correo_electronico'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['correo_electronico']);
       $sStyleReadLab_correo_electronico = '';
       $sStyleReadInp_correo_electronico = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['correo_electronico']) && $this->nmgp_cmp_hidden['correo_electronico'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="correo_electronico" value="<?php echo $this->form_encode_input($correo_electronico) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_correo_electronico" style="<?php echo $sStyleHidden_correo_electronico; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_correo_electronico_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_correo_electronico_label" style=" padding: 0px; width: 100%;"><span id="id_label_correo_electronico"><?php echo $this->nm_new_label['correo_electronico']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['correo_electronico']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['correo_electronico'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_correo_electronico_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["correo_electronico"]) &&  $this->nmgp_cmp_readonly["correo_electronico"] == "on") { 

 ?>
<input type="hidden" name="correo_electronico" value="<?php echo $this->form_encode_input($correo_electronico) . "\">" . $correo_electronico . ""; ?>
<?php } else { ?>
<span id="id_read_on_correo_electronico" class="sc-ui-readonly-correo_electronico css_correo_electronico_line" style="<?php echo $sStyleReadLab_correo_electronico; ?>"><?php echo $this->form_format_readonly("correo_electronico", $this->form_encode_input($this->correo_electronico)); ?></span><span id="id_read_off_correo_electronico" class="css_read_off_correo_electronico<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_correo_electronico; ?>">
 <input class="sc-js-input scFormObjectOdd css_correo_electronico_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_correo_electronico" type=text name="correo_electronico" value="<?php echo $this->form_encode_input($correo_electronico) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=200 alt="{datatype: 'text', maxLength: 200, 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_correo_electronico_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_correo_electronico_text"></span></td></tr></table></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['fecha_nacimiento']))
    {
        $this->nm_new_label['fecha_nacimiento'] = "Fecha Nacimiento";
    }
?>
<?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);
   $fecha_nacimiento = $this->fecha_nacimiento;
   $sStyleHidden_fecha_nacimiento = '';
   if (isset($this->nmgp_cmp_hidden['fecha_nacimiento']) && $this->nmgp_cmp_hidden['fecha_nacimiento'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fecha_nacimiento']);
       $sStyleHidden_fecha_nacimiento = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fecha_nacimiento = 'display: none;';
   $sStyleReadInp_fecha_nacimiento = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fecha_nacimiento']) && $this->nmgp_cmp_readonly['fecha_nacimiento'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fecha_nacimiento']);
       $sStyleReadLab_fecha_nacimiento = '';
       $sStyleReadInp_fecha_nacimiento = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fecha_nacimiento']) && $this->nmgp_cmp_hidden['fecha_nacimiento'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fecha_nacimiento" value="<?php echo $this->form_encode_input($fecha_nacimiento) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_fecha_nacimiento" style="<?php echo $sStyleHidden_fecha_nacimiento; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_fecha_nacimiento_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_fecha_nacimiento_label" style=" padding: 0px; width: 100%;"><span id="id_label_fecha_nacimiento"><?php echo $this->nm_new_label['fecha_nacimiento']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['fecha_nacimiento']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['fecha_nacimiento'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_fecha_nacimiento_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["fecha_nacimiento"]) &&  $this->nmgp_cmp_readonly["fecha_nacimiento"] == "on") { 

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

 <input class="sc-js-input scFormObjectOdd css_fecha_nacimiento_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_fecha_nacimiento" type=text name="fecha_nacimiento" value="<?php echo $this->form_encode_input($fecha_nacimiento) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=10"; } ?> alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['fecha_nacimiento']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['fecha_nacimiento']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}" ></span>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fecha_nacimiento_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fecha_nacimiento_text"></span></td></tr></table></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['estado_civil']))
   {
       $this->nm_new_label['estado_civil'] = "Estado Civil";
   }
   $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);
   $estado_civil = $this->estado_civil;
   $sStyleHidden_estado_civil = '';
   if (isset($this->nmgp_cmp_hidden['estado_civil']) && $this->nmgp_cmp_hidden['estado_civil'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['estado_civil']);
       $sStyleHidden_estado_civil = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_estado_civil = 'display: none;';
   $sStyleReadInp_estado_civil = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['estado_civil']) && $this->nmgp_cmp_readonly['estado_civil'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['estado_civil']);
       $sStyleReadLab_estado_civil = '';
       $sStyleReadInp_estado_civil = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['estado_civil']) && $this->nmgp_cmp_hidden['estado_civil'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="estado_civil" value="<?php echo $this->form_encode_input($this->estado_civil) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_estado_civil" style="<?php echo $sStyleHidden_estado_civil; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_estado_civil_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_estado_civil_label" style=" padding: 0px; width: 100%;"><span id="id_label_estado_civil"><?php echo $this->nm_new_label['estado_civil']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['estado_civil']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['estado_civil'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_estado_civil_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["estado_civil"]) &&  $this->nmgp_cmp_readonly["estado_civil"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "SELECT id, descripcion  FROM pla_estado_civil  ORDER BY descripcion";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil'][] = $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; 
   $estado_civil_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->estado_civil_1))
          {
              foreach ($this->estado_civil_1 as $tmp_estado_civil)
              {
                  if (trim($tmp_estado_civil) === trim($cadaselect[1])) {$estado_civil_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->estado_civil) && trim($this->estado_civil) === trim($cadaselect[1])) {$estado_civil_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="estado_civil" value="<?php echo $this->form_encode_input($estado_civil) . "\">" . $estado_civil_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_estado_civil();
   $x = 0 ; 
   $estado_civil_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->estado_civil_1))
          {
              foreach ($this->estado_civil_1 as $tmp_estado_civil)
              {
                  if (trim($tmp_estado_civil) === trim($cadaselect[1])) {$estado_civil_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->estado_civil)) {
                 if (trim($this->estado_civil) == trim($cadaselect[1])) { $estado_civil_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->estado_civil == $cadaselect[1]) { $estado_civil_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($estado_civil_look))
          {
              $estado_civil_look = $this->estado_civil;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_estado_civil\" class=\"css_estado_civil_line\" style=\"" .  $sStyleReadLab_estado_civil . "\">" . $this->form_format_readonly("estado_civil", $this->form_encode_input($estado_civil_look)) . "</span><span id=\"id_read_off_estado_civil\" class=\"css_read_off_estado_civil" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_estado_civil . "\">";
   echo " <span id=\"idAjaxSelect_estado_civil\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_estado_civil_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_estado_civil\" name=\"estado_civil\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_estado_civil'][] = ''; 
   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->estado_civil) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->estado_civil)) 
              {
                  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_estado_civil_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_estado_civil_text"></span></td></tr></table></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['sexo']))
   {
       $this->nm_new_label['sexo'] = "Sexo";
   }
   $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);
   $sexo = $this->sexo;
   $sStyleHidden_sexo = '';
   if (isset($this->nmgp_cmp_hidden['sexo']) && $this->nmgp_cmp_hidden['sexo'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['sexo']);
       $sStyleHidden_sexo = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_sexo = 'display: none;';
   $sStyleReadInp_sexo = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['sexo']) && $this->nmgp_cmp_readonly['sexo'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['sexo']);
       $sStyleReadLab_sexo = '';
       $sStyleReadInp_sexo = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['sexo']) && $this->nmgp_cmp_hidden['sexo'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="sexo" value="<?php echo $this->form_encode_input($this->sexo) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_sexo" style="<?php echo $sStyleHidden_sexo; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_sexo_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_sexo_label" style=" padding: 0px; width: 100%;"><span id="id_label_sexo"><?php echo $this->nm_new_label['sexo']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['sexo']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['sexo'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_sexo_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["sexo"]) &&  $this->nmgp_cmp_readonly["sexo"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "SELECT id, descripcion FROM pla_sexo ORDER BY descripcion";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo'][] = $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; 
   $sexo_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->sexo_1))
          {
              foreach ($this->sexo_1 as $tmp_sexo)
              {
                  if (trim($tmp_sexo) === trim($cadaselect[1])) {$sexo_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->sexo) && trim($this->sexo) === trim($cadaselect[1])) {$sexo_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="sexo" value="<?php echo $this->form_encode_input($sexo) . "\">" . $sexo_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_sexo();
   $x = 0 ; 
   $sexo_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->sexo_1))
          {
              foreach ($this->sexo_1 as $tmp_sexo)
              {
                  if (trim($tmp_sexo) === trim($cadaselect[1])) {$sexo_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->sexo)) {
                 if (trim($this->sexo) == trim($cadaselect[1])) { $sexo_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->sexo == $cadaselect[1]) { $sexo_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($sexo_look))
          {
              $sexo_look = $this->sexo;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_sexo\" class=\"css_sexo_line\" style=\"" .  $sStyleReadLab_sexo . "\">" . $this->form_format_readonly("sexo", $this->form_encode_input($sexo_look)) . "</span><span id=\"id_read_off_sexo\" class=\"css_read_off_sexo" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_sexo . "\">";
   echo " <span id=\"idAjaxSelect_sexo\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_sexo_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_sexo\" name=\"sexo\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_sexo'][] = ''; 
   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->sexo) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->sexo)) 
              {
                  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_sexo_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_sexo_text"></span></td></tr></table></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['nacionalidad']))
   {
       $this->nm_new_label['nacionalidad'] = "Nacionalidad";
   }
   $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);
   $nacionalidad = $this->nacionalidad;
   $sStyleHidden_nacionalidad = '';
   if (isset($this->nmgp_cmp_hidden['nacionalidad']) && $this->nmgp_cmp_hidden['nacionalidad'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['nacionalidad']);
       $sStyleHidden_nacionalidad = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_nacionalidad = 'display: none;';
   $sStyleReadInp_nacionalidad = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['nacionalidad']) && $this->nmgp_cmp_readonly['nacionalidad'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['nacionalidad']);
       $sStyleReadLab_nacionalidad = '';
       $sStyleReadInp_nacionalidad = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['nacionalidad']) && $this->nmgp_cmp_hidden['nacionalidad'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="nacionalidad" value="<?php echo $this->form_encode_input($this->nacionalidad) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_nacionalidad" style="<?php echo $sStyleHidden_nacionalidad; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_nacionalidad_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_nacionalidad_label" style=" padding: 0px; width: 100%;"><span id="id_label_nacionalidad"><?php echo $this->nm_new_label['nacionalidad']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['nacionalidad']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['nacionalidad'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_nacionalidad_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["nacionalidad"]) &&  $this->nmgp_cmp_readonly["nacionalidad"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $nm_comando = "SELECT pais, nacionalidad  FROM gen_paises  where nacionalidad<>'' ORDER BY nombre";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando;
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = '';
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando))
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad'][] = $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; 
   $nacionalidad_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->nacionalidad_1))
          {
              foreach ($this->nacionalidad_1 as $tmp_nacionalidad)
              {
                  if (trim($tmp_nacionalidad) === trim($cadaselect[1])) {$nacionalidad_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->nacionalidad) && trim($this->nacionalidad) === trim($cadaselect[1])) {$nacionalidad_look .= $cadaselect[0];} 
          $x++; 
   }

?>
<input type="hidden" name="nacionalidad" value="<?php echo $this->form_encode_input($nacionalidad) . "\">" . $nacionalidad_look . ""; ?>
<?php } else { ?>
<?php
   $todo = $this->Form_lookup_nacionalidad();
   $x = 0 ; 
   $nacionalidad_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->nacionalidad_1))
          {
              foreach ($this->nacionalidad_1 as $tmp_nacionalidad)
              {
                  if (trim($tmp_nacionalidad) === trim($cadaselect[1])) {$nacionalidad_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->nacionalidad)) {
                 if (trim($this->nacionalidad) == trim($cadaselect[1])) { $nacionalidad_look .= $cadaselect[0]; } 
          }
          elseif (isset($cadaselect[1]) && $this->nacionalidad == $cadaselect[1]) { $nacionalidad_look .= $cadaselect[0]; 
          }
          $x++; 
   }
          if (empty($nacionalidad_look))
          {
              $nacionalidad_look = $this->nacionalidad;
          }
   $x = 0; 
   echo "<span id=\"id_read_on_nacionalidad\" class=\"css_nacionalidad_line\" style=\"" .  $sStyleReadLab_nacionalidad . "\">" . $this->form_format_readonly("nacionalidad", $this->form_encode_input($nacionalidad_look)) . "</span><span id=\"id_read_off_nacionalidad\" class=\"css_read_off_nacionalidad" . $this->classes_100perc_fields['span_input'] . "\" style=\"white-space: nowrap; " . $sStyleReadInp_nacionalidad . "\">";
   echo " <span id=\"idAjaxSelect_nacionalidad\" class=\"" . $this->classes_100perc_fields['span_select'] . "\"><select class=\"sc-js-input scFormObjectOdd css_nacionalidad_obj" . $this->classes_100perc_fields['input'] . "\" style=\"\" id=\"id_sc_field_nacionalidad\" name=\"nacionalidad\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_nacionalidad'][] = ''; 
   echo "  <option value=\"\">" . str_replace("<", "&lt;","&nbsp;") . "</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->nacionalidad) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->nacionalidad)) 
              {
                  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_nacionalidad_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nacionalidad_text"></span></td></tr></table></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['talla_camisa']))
    {
        $this->nm_new_label['talla_camisa'] = "Talla Camisa";
    }
?>
<?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);
   $talla_camisa = $this->talla_camisa;
   $sStyleHidden_talla_camisa = '';
   if (isset($this->nmgp_cmp_hidden['talla_camisa']) && $this->nmgp_cmp_hidden['talla_camisa'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['talla_camisa']);
       $sStyleHidden_talla_camisa = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_talla_camisa = 'display: none;';
   $sStyleReadInp_talla_camisa = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['talla_camisa']) && $this->nmgp_cmp_readonly['talla_camisa'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['talla_camisa']);
       $sStyleReadLab_talla_camisa = '';
       $sStyleReadInp_talla_camisa = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['talla_camisa']) && $this->nmgp_cmp_hidden['talla_camisa'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="talla_camisa" value="<?php echo $this->form_encode_input($talla_camisa) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_talla_camisa" style="<?php echo $sStyleHidden_talla_camisa; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_talla_camisa_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_talla_camisa_label" style=" padding: 0px; width: 100%;"><span id="id_label_talla_camisa"><?php echo $this->nm_new_label['talla_camisa']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['talla_camisa']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['talla_camisa'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_talla_camisa_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["talla_camisa"]) &&  $this->nmgp_cmp_readonly["talla_camisa"] == "on") { 

 ?>
<input type="hidden" name="talla_camisa" value="<?php echo $this->form_encode_input($talla_camisa) . "\">" . $talla_camisa . ""; ?>
<?php } else { ?>
<span id="id_read_on_talla_camisa" class="sc-ui-readonly-talla_camisa css_talla_camisa_line" style="<?php echo $sStyleReadLab_talla_camisa; ?>"><?php echo $this->form_format_readonly("talla_camisa", $this->form_encode_input($this->talla_camisa)); ?></span><span id="id_read_off_talla_camisa" class="css_read_off_talla_camisa<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_talla_camisa; ?>">
 <input class="sc-js-input scFormObjectOdd css_talla_camisa_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_talla_camisa" type=text name="talla_camisa" value="<?php echo $this->form_encode_input($talla_camisa) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=2"; } ?> maxlength=2 alt="{datatype: 'text', maxLength: 2, 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_talla_camisa_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_talla_camisa_text"></span></td></tr></table></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['talla_zapatos']))
    {
        $this->nm_new_label['talla_zapatos'] = "Talla Zapatos";
    }
?>
<?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);
   $talla_zapatos = $this->talla_zapatos;
   $sStyleHidden_talla_zapatos = '';
   if (isset($this->nmgp_cmp_hidden['talla_zapatos']) && $this->nmgp_cmp_hidden['talla_zapatos'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['talla_zapatos']);
       $sStyleHidden_talla_zapatos = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_talla_zapatos = 'display: none;';
   $sStyleReadInp_talla_zapatos = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['talla_zapatos']) && $this->nmgp_cmp_readonly['talla_zapatos'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['talla_zapatos']);
       $sStyleReadLab_talla_zapatos = '';
       $sStyleReadInp_talla_zapatos = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['talla_zapatos']) && $this->nmgp_cmp_hidden['talla_zapatos'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="talla_zapatos" value="<?php echo $this->form_encode_input($talla_zapatos) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_talla_zapatos" style="<?php echo $sStyleHidden_talla_zapatos; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_talla_zapatos_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_talla_zapatos_label" style=" padding: 0px; width: 100%;"><span id="id_label_talla_zapatos"><?php echo $this->nm_new_label['talla_zapatos']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['talla_zapatos']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['talla_zapatos'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_talla_zapatos_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["talla_zapatos"]) &&  $this->nmgp_cmp_readonly["talla_zapatos"] == "on") { 

 ?>
<input type="hidden" name="talla_zapatos" value="<?php echo $this->form_encode_input($talla_zapatos) . "\">" . $talla_zapatos . ""; ?>
<?php } else { ?>
<span id="id_read_on_talla_zapatos" class="sc-ui-readonly-talla_zapatos css_talla_zapatos_line" style="<?php echo $sStyleReadLab_talla_zapatos; ?>"><?php echo $this->form_format_readonly("talla_zapatos", $this->form_encode_input($this->talla_zapatos)); ?></span><span id="id_read_off_talla_zapatos" class="css_read_off_talla_zapatos<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_talla_zapatos; ?>">
 <input class="sc-js-input scFormObjectOdd css_talla_zapatos_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_talla_zapatos" type=text name="talla_zapatos" value="<?php echo $this->form_encode_input($talla_zapatos) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=5"; } ?> alt="{datatype: 'integer', maxLength: 5, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['talla_zapatos']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['talla_zapatos']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, negativePos: <?php echo (4 == $this->field_config['talla_zapatos']['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_talla_zapatos_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_talla_zapatos_text"></span></td></tr></table></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_talla_zapatos_dumb = ('' == $sStyleHidden_talla_zapatos) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_talla_zapatos_dumb" style="<?php echo $sStyleHidden_talla_zapatos_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 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_5" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_5" class="scFormTable scFormDataOdd<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;">   <tr>
   <td style="border:0;padding:0;height:0" class="scUiLabelWidthFix"></td>
   </tr>
   <tr>


    <TD colspan="1" height="0" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont">Nucleo familiar : Familiares que viven bajo el mismo techo</TD>
       
      </TR>
     </TABLE>
    </TD>





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


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

    <TD class="scFormDataOdd css_nucle_line" id="hidden_field_data_nucle" style="<?php echo $sStyleHidden_nucle; ?>"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td width="100%" class="scFormDataFontOdd css_nucle_line" style="vertical-align: top;padding: 0px">
<?php
 if (isset($_SESSION['scriptcase']['dashboard_scinit'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['dashboard_app'] ][ $this->Ini->sc_lig_target['C_@scinf_nucle'] ]) && '' != $_SESSION['scriptcase']['dashboard_scinit'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['dashboard_app'] ][ $this->Ini->sc_lig_target['C_@scinf_nucle'] ]) {
     $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] = $_SESSION['scriptcase']['dashboard_scinit'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['dashboard_app'] ][ $this->Ini->sc_lig_target['C_@scinf_nucle'] ];
 }
 else {
     $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] = $this->Ini->sc_page;
 }
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_proc']  = false;
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_form']  = true;
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_call']  = true;
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_multi'] = false;
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_form_insert'] = 'on';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_form_update'] = 'on';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_form_delete'] = 'on';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_form_btn_nav'] = 'off';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_grid_edit'] = 'on';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_grid_edit_link'] = 'on';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_qtd_reg'] = '50';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_liga_tp_pag'] = 'parcial';
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['embutida_parms'] = "NM_btn_insert*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scoutlink_remove_margin*scinok*scoutlink_remove_border*scinok*scoutlink_remove_background*scinok*scout";
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['foreign_key']['id_encabezado'] = $this->nmgp_dados_form['id'];
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['where_filter'] = "id_encabezado = " . $this->nmgp_dados_form['id'] . "";
 $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['where_detal']  = "id_encabezado = " . $this->nmgp_dados_form['id'] . "";
 if ($_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_mob']['total'] < 0)
 {
     $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob']['where_filter'] = "1 <> 1";
 }
 $sDetailSrc = ('novo' == $this->nmgp_opcao) ? 'form_pla_actualizacion_de_datos_mob_empty.htm' : $this->Ini->link_form_pla_actualizacion_de_datos_nucleo_mob_edit . '?script_case_init=' . $this->form_encode_input($this->Ini->sc_page) . '&script_case_detail=Y';
 foreach ($_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo_mob'] as $i => $v)
 {
     $_SESSION['sc_session'][ $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init'] ]['form_pla_actualizacion_de_datos_nucleo'][$i] = $v;
 }
if (isset($this->Ini->sc_lig_target['C_@scinf_nucle']) && 'nmsc_iframe_liga_form_pla_actualizacion_de_datos_nucleo_mob' != $this->Ini->sc_lig_target['C_@scinf_nucle'])
{
    if ('novo' != $this->nmgp_opcao)
    {
        $sDetailSrc .= '&under_dashboard=1&dashboard_app=' . $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['dashboard_app'] . '&own_widget=' . $this->Ini->sc_lig_target['C_@scinf_nucle'] . '&parent_widget=' . $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['own_widget'];
        $sDetailSrc  = $this->addUrlParam($sDetailSrc, 'script_case_init', $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['form_pla_actualizacion_de_datos_nucleo_mob_script_case_init']);
    }
?>
<script type="text/javascript">
$(function() {
    scOpenMasterDetail("<?php echo $this->Ini->sc_lig_target['C_@scinf_nucle'] ?>", "<?php echo $sDetailSrc; ?>");
});
</script>
<?php
}
else
{
?>
<iframe border="0" id="nmsc_iframe_liga_form_pla_actualizacion_de_datos_nucleo_mob"  marginWidth="0" marginHeight="0" frameborder="0" valign="top" height="100%" width="100%" name="nmsc_iframe_liga_form_pla_actualizacion_de_datos_nucleo_mob"  scrolling="auto" src="<?php echo $sDetailSrc; ?>"></iframe>
<?php
}
?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_nucle_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_nucle_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_nucle_dumb = ('' == $sStyleHidden_nucle) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_nucle_dumb" style="<?php echo $sStyleHidden_nucle_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_6"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_6" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_6" class="scFormTable scFormDataOdd<?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['enfermedadescronicas']))
   {
       $this->nm_new_label['enfermedadescronicas'] = "Indique si padece alguna de las siguientes enfermedades";
   }
   $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);
   $enfermedadescronicas = $this->enfermedadescronicas;
   $sStyleHidden_enfermedadescronicas = '';
   if (isset($this->nmgp_cmp_hidden['enfermedadescronicas']) && $this->nmgp_cmp_hidden['enfermedadescronicas'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['enfermedadescronicas']);
       $sStyleHidden_enfermedadescronicas = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_enfermedadescronicas = 'display: none;';
   $sStyleReadInp_enfermedadescronicas = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['enfermedadescronicas']) && $this->nmgp_cmp_readonly['enfermedadescronicas'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['enfermedadescronicas']);
       $sStyleReadLab_enfermedadescronicas = '';
       $sStyleReadInp_enfermedadescronicas = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['enfermedadescronicas']) && $this->nmgp_cmp_hidden['enfermedadescronicas'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="enfermedadescronicas" value="<?php echo $this->form_encode_input($this->enfermedadescronicas_hidden) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>
<?php 
  $this->enfermedadescronicas_1 = array(); 
  if (!empty($this->enfermedadescronicas))
  {
      if (is_array($this->enfermedadescronicas)) {
          $temp = $this->enfermedadescronicas;
      } else {
          $temp = explode("@?@", trim($this->enfermedadescronicas));
      }
      foreach ($temp as $cada_entrada) 
      {
          $temp1 = explode("#?#", trim($cada_entrada));
          if (!empty($temp1))
          {
              $this->enfermedadescronicas_1[] = $temp1[0];
          } 
      } 
  } 
?> 

    <TD class="scFormDataOdd" id="hidden_field_data_enfermedadescronicas" style="<?php echo $sStyleHidden_enfermedadescronicas; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_enfermedadescronicas_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_enfermedadescronicas_label" style=" padding: 0px; width: 100%;"><span id="id_label_enfermedadescronicas"><?php echo $this->nm_new_label['enfermedadescronicas']; ?></span></td></tr><tr><td class="css_enfermedadescronicas_line" style="padding: 0px; width: 100%;"> 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas'] = array(); 
    }

   $old_value_fecha = $this->fecha;
   $old_value_fecha_hora = $this->fecha_hora;
   $old_value_fecha_nacimiento = $this->fecha_nacimiento;
   $old_value_talla_zapatos = $this->talla_zapatos;
   $old_value_id = $this->id;
   $this->nm_tira_formatacao();
   if ($this->nmgp_opcao != "nada") {
       $this->nm_converte_datas(false);
   }


   $unformatted_value_fecha = $this->fecha;
   $unformatted_value_fecha_hora = $this->fecha_hora;
   $unformatted_value_fecha_nacimiento = $this->fecha_nacimiento;
   $unformatted_value_talla_zapatos = $this->talla_zapatos;
   $unformatted_value_id = $this->id;

   $acepta_terminos_val_str = "";
   if (!empty($this->acepta_terminos))
   {
       if (is_array($this->acepta_terminos))
       {
           $Tmp_array = $this->acepta_terminos;
       }
       else
       {
           $Tmp_array = explode(";", $this->acepta_terminos);
       }
       $acepta_terminos_val_str = "";
       foreach ($Tmp_array as $Tmp_val_cmp)
       {
          if ("" != $acepta_terminos_val_str)
          {
             $acepta_terminos_val_str .= ", ";
          }
          $acepta_terminos_val_str .= $Tmp_val_cmp;
       }
   }
   $nm_comando = "select id, enfermedad from pla_enfermedades_cronicas order by orden";

   $this->fecha = $old_value_fecha;
   $this->fecha_hora = $old_value_fecha_hora;
   $this->fecha_nacimiento = $old_value_fecha_nacimiento;
   $this->talla_zapatos = $old_value_talla_zapatos;
   $this->id = $old_value_id;

   $_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) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_enfermedadescronicas'][] = $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; 
   $todox = str_replace("?#?@?#?", "?#?@ ?#?", trim($nmgp_def_dados)) ; 
   $todo  = explode("?@?", $todox) ; 
   $ind = 0 ; 
   $x = 0 ; 
   $enfermedadescronicas_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->enfermedadescronicas_1))
          {
              foreach ($this->enfermedadescronicas_1 as $tmp_enfermedadescronicas)
              {
                  if (trim($tmp_enfermedadescronicas) === trim($cadaselect[1])) {$enfermedadescronicas_look .= $cadaselect[0] . '__SC_BREAK_LINE__';}
              }
          }
          elseif (isset($cadaselect[1]) && is_string($this->enfermedadescronicas) && trim($this->enfermedadescronicas) === trim($cadaselect[1])) { $enfermedadescronicas_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_enfermedadescronicas\" class=\"css_enfermedadescronicas_line\" style=\"" .  $sStyleReadLab_enfermedadescronicas . "\">" . $this->form_format_readonly("enfermedadescronicas", $this->form_encode_input($enfermedadescronicas_look)) . "</span><span id=\"id_read_off_enfermedadescronicas\" class=\"css_read_off_enfermedadescronicas css_enfermedadescronicas_line\" style=\"" . $sStyleReadInp_enfermedadescronicas . "\">";
   echo "<div id=\"idAjaxCheckbox_enfermedadescronicas\" class=\"css_enfermedadescronicas_line\" style=\"display: inline-block\">\r\n";
   $y = 0 ; 
   echo "<table cellspacing=0 cellpadding=0 border=0>\r\n";
   echo " <tr>\r\n";
   unset($cadacheck); 
   while (!empty($todo[$x])) 
   {
          $cadacheck = explode("?#?", $todo[$x]) ; 
          if ($y == 1)
          {
              echo " </tr>\r\n";
              echo " <tr>\r\n";
              $y = 0;
          }
          echo "  <td class=\"scFormDataFontOdd  css_enfermedadescronicas_line\">\r\n";
          $tempOptionId = "id-opt-enfermedadescronicas-" . $x;
          echo "      <input type=checkbox id=\"" . $tempOptionId . "\" class=\"sc-ui-checkbox-enfermedadescronicas sc-ui-checkbox-enfermedadescronicas\" name=\"enfermedadescronicas[$ind]\" value=\"$cadacheck[1]\"" ; 
          foreach ($this->enfermedadescronicas_1 as $Dados)
          {
              if ($Dados === $cadacheck[1])
              {
                  echo " checked" ; 
                  break;
              }
          }
          if (strtoupper($cadacheck[2]) == "S") 
          {
              if (empty($this->enfermedadescronicas)) 
              {
                  echo " checked" ; 
              } 
          } 
          echo "  onClick=\"\" >" ; 
          echo "<label for=\"" . $tempOptionId . "\">" . $cadacheck[0] . "</label>";
          $x++ ; 
          $y++ ; 
          echo "  </td>\r\n";
?>          
<?php 
          $ind++; 
          $quant_calendar_enfermedadescronicas = $ind;
   } 
   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_enfermedadescronicas_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_enfermedadescronicas_text"></span></td></tr></table></td></tr></table></td></tr></table> </TD>
   





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

    <TD class="scFormDataOdd" id="hidden_field_data_otras_enfermedades" style="<?php echo $sStyleHidden_otras_enfermedades; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_otras_enfermedades_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_otras_enfermedades_label" style=" padding: 0px; width: 100%;"><span id="id_label_otras_enfermedades"><?php echo $this->nm_new_label['otras_enfermedades']; ?></span></td></tr><tr><td class="css_otras_enfermedades_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["otras_enfermedades"]) &&  $this->nmgp_cmp_readonly["otras_enfermedades"] == "on") { 

 ?>
<input type="hidden" name="otras_enfermedades" value="<?php echo $this->form_encode_input($otras_enfermedades) . "\">" . $otras_enfermedades . ""; ?>
<?php } else { ?>
<span id="id_read_on_otras_enfermedades" class="sc-ui-readonly-otras_enfermedades css_otras_enfermedades_line" style="<?php echo $sStyleReadLab_otras_enfermedades; ?>"><?php echo $this->form_format_readonly("otras_enfermedades", $this->form_encode_input($this->otras_enfermedades)); ?></span><span id="id_read_off_otras_enfermedades" class="css_read_off_otras_enfermedades<?php echo $this->classes_100perc_fields['span_input'] ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_otras_enfermedades; ?>">
 <input class="sc-js-input scFormObjectOdd scFormObjectOddWm  css_otras_enfermedades_obj<?php echo $this->classes_100perc_fields['input'] ?>" style="" id="id_sc_field_otras_enfermedades" type=text name="otras_enfermedades" value="<?php echo $this->form_encode_input($otras_enfermedades) ?>"
 <?php if ($this->classes_100perc_fields['keep_field_size']) { echo "size=50"; } ?> maxlength=200 alt="{datatype: 'text', maxLength: 200, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: 'Especifique otras enfermedades cronicas', 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_otras_enfermedades_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_otras_enfermedades_text"></span></td></tr></table></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['yaestaregistrado']))
    {
        $this->nm_new_label['yaestaregistrado'] = "yaestaregistrado";
    }
?>
<?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);
   $yaestaregistrado = $this->yaestaregistrado;
   if (!isset($this->nmgp_cmp_hidden['yaestaregistrado']))
   {
       $this->nmgp_cmp_hidden['yaestaregistrado'] = 'off';
   }
   $sStyleHidden_yaestaregistrado = '';
   if (isset($this->nmgp_cmp_hidden['yaestaregistrado']) && $this->nmgp_cmp_hidden['yaestaregistrado'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['yaestaregistrado']);
       $sStyleHidden_yaestaregistrado = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_yaestaregistrado = 'display: none;';
   $sStyleReadInp_yaestaregistrado = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['yaestaregistrado']) && $this->nmgp_cmp_readonly['yaestaregistrado'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['yaestaregistrado']);
       $sStyleReadLab_yaestaregistrado = '';
       $sStyleReadInp_yaestaregistrado = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['yaestaregistrado']) && $this->nmgp_cmp_hidden['yaestaregistrado'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="yaestaregistrado" value="<?php echo $this->form_encode_input($yaestaregistrado) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_yaestaregistrado" style="<?php echo $sStyleHidden_yaestaregistrado; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_yaestaregistrado_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_yaestaregistrado_label" style=" padding: 0px; width: 100%;"><span id="id_label_yaestaregistrado"><?php echo $this->nm_new_label['yaestaregistrado']; ?></span></td></tr><tr><td class="css_yaestaregistrado_line" style="padding: 0px; width: 100%;"><input type="hidden" name="yaestaregistrado" value="<?php echo $this->form_encode_input($yaestaregistrado); ?>"><span id="id_ajax_label_yaestaregistrado"><?php echo nl2br($yaestaregistrado); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_yaestaregistrado_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_yaestaregistrado_text"></span></td></tr></table></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['firma2']))
    {
        $this->nm_new_label['firma2'] = "firma2";
    }
?>
<?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);
   $firma2 = $this->firma2;
   if (!isset($this->nmgp_cmp_hidden['firma2']))
   {
       $this->nmgp_cmp_hidden['firma2'] = 'off';
   }
   $sStyleHidden_firma2 = '';
   if (isset($this->nmgp_cmp_hidden['firma2']) && $this->nmgp_cmp_hidden['firma2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['firma2']);
       $sStyleHidden_firma2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_firma2 = 'display: none;';
   $sStyleReadInp_firma2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['firma2']) && $this->nmgp_cmp_readonly['firma2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['firma2']);
       $sStyleReadLab_firma2 = '';
       $sStyleReadInp_firma2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['firma2']) && $this->nmgp_cmp_hidden['firma2'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="firma2" value="<?php echo $this->form_encode_input($firma2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_firma2" style="<?php echo $sStyleHidden_firma2; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_firma2_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_firma2_label" style=" padding: 0px; width: 100%;"><span id="id_label_firma2"><?php echo $this->nm_new_label['firma2']; ?></span></td></tr><tr><td class="css_firma2_line" style="padding: 0px; width: 100%;"><input type="hidden" name="firma2" value="<?php echo $this->form_encode_input($firma2); ?>"><span id="id_ajax_label_firma2"><?php echo nl2br($firma2); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_firma2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_firma2_text"></span></td></tr></table></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_firma2_dumb = ('' == $sStyleHidden_firma2) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_firma2_dumb" style="<?php echo $sStyleHidden_firma2_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_7"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0 class="scBlockRow"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_7" class="scBlockFrame"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_7" class="scFormTable scFormDataOdd<?php echo $this->classes_100perc_fields['table'] ?>" width="100%" style="height: 100%;">   <tr>
   <td style="border:0;padding:0;height:0" class="scUiLabelWidthFix"></td>
   </tr>
   <tr>


    <TD colspan="1" height="0" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont">Condiciones</TD>
       
      </TR>
     </TABLE>
    </TD>





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


   <?php
   if (!isset($this->nm_new_label['acepta_terminos']))
   {
       $this->nm_new_label['acepta_terminos'] = "Acepta Terminos";
   }
   $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);
   $acepta_terminos = $this->acepta_terminos;
   $sStyleHidden_acepta_terminos = '';
   if (isset($this->nmgp_cmp_hidden['acepta_terminos']) && $this->nmgp_cmp_hidden['acepta_terminos'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['acepta_terminos']);
       $sStyleHidden_acepta_terminos = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_acepta_terminos = 'display: none;';
   $sStyleReadInp_acepta_terminos = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['acepta_terminos']) && $this->nmgp_cmp_readonly['acepta_terminos'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['acepta_terminos']);
       $sStyleReadLab_acepta_terminos = '';
       $sStyleReadInp_acepta_terminos = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['acepta_terminos']) && $this->nmgp_cmp_hidden['acepta_terminos'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="acepta_terminos" value="<?php echo $this->form_encode_input($this->acepta_terminos) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>
<?php 
  if ($this->nmgp_opcao != "recarga") 
  {
      $this->acepta_terminos_1 = explode(";", trim($this->acepta_terminos));
  } 
  else
  {
      if (empty($this->acepta_terminos))
      {
          $this->acepta_terminos_1= array(); 
          $this->acepta_terminos= "";
      } 
      else
      {
          $this->acepta_terminos_1= $this->acepta_terminos; 
          $this->acepta_terminos= ""; 
          foreach ($this->acepta_terminos_1 as $cada_acepta_terminos)
          {
             if (!empty($acepta_terminos))
             {
                 $this->acepta_terminos.= ";"; 
             } 
             $this->acepta_terminos.= $cada_acepta_terminos; 
          } 
      } 
  } 
?> 

    <TD class="scFormDataOdd" id="hidden_field_data_acepta_terminos" style="<?php echo $sStyleHidden_acepta_terminos; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_acepta_terminos_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_acepta_terminos_label" style=" padding: 0px; width: 100%;"><span id="id_label_acepta_terminos"><?php echo $this->nm_new_label['acepta_terminos']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['acepta_terminos']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['acepta_terminos'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_acepta_terminos_line" style="padding: 0px; width: 100%;">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["acepta_terminos"]) &&  $this->nmgp_cmp_readonly["acepta_terminos"] == "on") { 

$acepta_terminos_look = "";
 if ($this->acepta_terminos == "1") { $acepta_terminos_look .= "" ;} 
 if (empty($acepta_terminos_look)) { $acepta_terminos_look = $this->acepta_terminos; }
?>
<input type="hidden" name="acepta_terminos" value="<?php echo $this->form_encode_input($acepta_terminos) . "\">" . $acepta_terminos_look . ""; ?>
<?php } else { ?>

<?php

$acepta_terminos_look = "";
 if ($this->acepta_terminos == "1") { $acepta_terminos_look .= "" ;} 
 if (empty($acepta_terminos_look)) { $acepta_terminos_look = $this->acepta_terminos; }
?>
<span id="id_read_on_acepta_terminos" class="css_acepta_terminos_line" style="<?php echo $sStyleReadLab_acepta_terminos; ?>"><?php echo $this->form_format_readonly("acepta_terminos", $this->form_encode_input($acepta_terminos_look)); ?></span><span id="id_read_off_acepta_terminos" class="css_read_off_acepta_terminos css_acepta_terminos_line" style="<?php echo $sStyleReadInp_acepta_terminos; ?>"><?php echo "<div id=\"idAjaxCheckbox_acepta_terminos\" style=\"display: inline-block\" class=\"css_acepta_terminos_line\">\r\n"; ?><TABLE cellspacing=0 cellpadding=0 border=0><TR>
  <TD class="scFormDataFontOdd css_acepta_terminos_line"><?php $tempOptionId = "id-opt-acepta_terminos" . $sc_seq_vert . "-1"; ?>
 <div class="sc switch">
 <input type=checkbox id="<?php echo $tempOptionId ?>" class="sc-ui-checkbox-acepta_terminos sc-ui-checkbox-acepta_terminos" name="acepta_terminos[]" value="1"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['Lookup_acepta_terminos'][] = '1'; ?>
<?php  if (in_array("1", $this->acepta_terminos_1))  { echo " checked" ;} ?> onClick="do_ajax_form_pla_actualizacion_de_datos_mob_event_acepta_terminos_onclick();" ><span></span>
<label for="<?php echo $tempOptionId ?>"></label> </div>
</TD>
</TR></TABLE>
<?php echo "</div>\r\n"; ?></span><?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_acepta_terminos_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_acepta_terminos_text"></span></td></tr></table></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['firma']))
    {
        $this->nm_new_label['firma'] = "Firma";
    }
?>
<?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);
   $firma = $this->firma;
   $sStyleHidden_firma = '';
   if (isset($this->nmgp_cmp_hidden['firma']) && $this->nmgp_cmp_hidden['firma'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['firma']);
       $sStyleHidden_firma = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_firma = 'display: none;';
   $sStyleReadInp_firma = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['firma']) && $this->nmgp_cmp_readonly['firma'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['firma']);
       $sStyleReadLab_firma = '';
       $sStyleReadInp_firma = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['firma']) && $this->nmgp_cmp_hidden['firma'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="firma" value="<?php echo $this->form_encode_input($firma) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_firma" style="<?php echo $sStyleHidden_firma; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_firma_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_firma_label" style=" padding: 0px; width: 100%;"><span id="id_label_firma"><?php echo $this->nm_new_label['firma']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['firma']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['php_cmp_required']['firma'] == "on") { ?> <span class="scFormRequiredMarkOdd">*</span> <?php }?></td></tr><tr><td class="css_firma_line" style="padding: 0px; width: 100%;"><span id="id_read_on_firma" style="<?php echo $sStyleReadLab_firma; ?>"><div id="sc-id-ronly-firma" style="width: 100%; background-color: #FFFFFF"><img style="border-width: 0" /></div>
</span><span id="id_read_off_firma" class="css_read_off_firma" style="<?php echo $sStyleReadInp_firma; ?>"><input type="hidden" name="firma" id="id_sc_field_firma" value="<?php echo $this->firma ?>" />
<div class="sc-ui-sign" id="sc-id-sign-firma" style="width: 100%; background-color: #FFFFFF"></div>
<div id="sc-id-disabled-firma" style="display: none; width: 100%; background-color: #FFFFFF"><img style="border-width: 0" /></div>
<br />
<?php echo nmButtonOutput($this->arr_buttons, "bclear", "scJQSignatureClear('firma')", "scJQSignatureClear('firma')", "btn_sign_clear_firma", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "", '', '', '', '', '', '', '', '', "");?>

</span></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_firma_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_firma_text"></span></td></tr></table></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['id']))
    {
        $this->nm_new_label['id'] = "Id";
    }
?>
<?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);
   $id = $this->id;
   if (!isset($this->nmgp_cmp_hidden['id']))
   {
       $this->nmgp_cmp_hidden['id'] = 'off';
   }
   $sStyleHidden_id = '';
   if (isset($this->nmgp_cmp_hidden['id']) && $this->nmgp_cmp_hidden['id'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['id']);
       $sStyleHidden_id = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_id = 'display: none;';
   $sStyleReadInp_id = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['id']) && $this->nmgp_cmp_readonly['id'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['id']);
       $sStyleReadLab_id = '';
       $sStyleReadInp_id = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['id']) && $this->nmgp_cmp_hidden['id'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="id" value="<?php echo $this->form_encode_input($id) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>
<?php if ((isset($this->Embutida_form) && $this->Embutida_form) || ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir")) { ?>

    <TD class="scFormDataOdd" id="hidden_field_data_id" style="<?php echo $sStyleHidden_id; ?>vertical-align: top;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd css_id_line" style="vertical-align: top;padding: 0px"><table style="border-spacing: 0px; border-width: 0px; border-collapse: collapse; width: 100%" cellspacing=0 cellpadding=0><tr><td class="scFormLabelOddFormat scFormLabelAboveOddFormat css_id_label" style=" padding: 0px; width: 100%;"><span id="id_label_id"><?php echo $this->nm_new_label['id']; ?></span></td></tr><tr><td class="css_id_line" style="padding: 0px; width: 100%;"><input type="hidden" name="id" value="<?php echo $this->form_encode_input($id); ?>"><span id="id_ajax_label_id"><?php echo nl2br($id); ?></span>
<span id="id_read_on_id" class="css_id_line" style="<?php echo $sStyleReadLab_id; ?>"><?php echo $this->form_format_readonly("id", $this->form_encode_input($this->id)); ?></span><span id="id_read_off_id" class="css_read_off_id" style="<?php echo $sStyleReadInp_id; ?>"><input type="hidden" name="id" value="<?php echo $this->form_encode_input($id) . "\">"?><span id="id_ajax_label_id"><?php echo nl2br($id); ?></span>
</span></td></tr><tr><td style="vertical-align: top; padding: 0"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_id_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_id_text"></span></td></tr></table></td></tr></table></td></tr></table> </TD>
   <?php }
      else
      {
         $sc_hidden_no--;
      }
?>
<?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">
<?php
$requiredMessage = $this->Ini->Nm_lang['lang_othr_reqr'];
?>
<span class="scFormRequiredOddColor">* <?php echo $requiredMessage; ?></span>
</td></tr> 
<tr><td>
<?php
$this->displayBottomToolbar();
?>
<?php
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar sc-toolbar-bottom" style="padding: 0px; spacing: 0px">
    <table style="border-collapse: collapse; border-width: 0px; width: 100%">
    <tr> 
     <td nowrap align="left" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
}
    $NM_btn = false;
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R")
{
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['update'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-13';
        $buttonMacroLabel = "Finalizar registro";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['update']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['update']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['update']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['update']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['update'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "balterar", "scBtnFn_sys_format_alt()", "scBtnFn_sys_format_alt()", "sc_b_upd_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ('' != $this->url_webhelp) {
        $sCondStyle = '';
?>
<?php
        $buttonMacroDisabled = '';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['help']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['help']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['help']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['help']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['help'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bhelp", "scBtnFn_sys_format_hlp()", "scBtnFn_sys_format_hlp()", "sc_b_hlp_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ((!$this->Embutida_call || $this->form_3versions_single) && ((!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) || !$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard'] || (isset($this->is_calendar_app) && $this->is_calendar_app)))) {
        $sCondStyle = (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && $nm_apl_dependente != 1 && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && !$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-14';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bsair", "scBtnFn_sys_format_sai()", "scBtnFn_sys_format_sai()", "sc_b_sai_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ((!$this->Embutida_call) && ((!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) || !$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard'] || (isset($this->is_calendar_app) && $this->is_calendar_app)))) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-15';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "scBtnFn_sys_format_sai()", "scBtnFn_sys_format_sai()", "sc_b_sai_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
    if ((!$this->Embutida_call) && ((!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) || !$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard'] || (isset($this->is_calendar_app) && $this->is_calendar_app)))) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente != 1 || $this->nmgp_botoes['exit'] != "on") && ((!$this->aba_iframe || $this->is_calendar_app) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
<?php
        $buttonMacroDisabled = 'sc-unique-btn-16';
        $buttonMacroLabel = "";

        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_disabled']['exit']) {
            $buttonMacroDisabled .= ' disabled';
        }
        if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) && '' != $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit']) {
            $buttonMacroLabel = $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['btn_label']['exit'];
        }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bsair", "scBtnFn_sys_format_sai()", "scBtnFn_sys_format_sai()", "sc_b_sai_b", "", "" . $buttonMacroLabel . "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "" . $buttonMacroDisabled . "", "", "", '', '', '', '', '', '', '', '', "");?>
 
<?php
        $NM_btn = true;
    }
if ($opcao_botoes != "novo" && $this->nmgp_botoes['summary'] == "on")
{
?> 
     <span nowrap id="sc_b_summary_b"></span> 
<?php 
}
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R")
{
?>
   </td></tr> 
   </table> 
   </td></tr></table> 
<?php
}
?>
<?php
if (!$NM_btn && isset($NM_ult_sep))
{
    echo "    <script language=\"javascript\">";
    echo "      document.getElementById('" .  $NM_ult_sep . "').style.display='none';";
    echo "    </script>";
}
unset($NM_ult_sep);
?>
<?php if ('novo' != $this->nmgp_opcao || $this->Embutida_form) { ?><script>nav_atualiza(Nav_permite_ret, Nav_permite_ava, 'b');</script><?php } ?>
<?php if (('novo' != $this->nmgp_opcao || $this->Embutida_form) && !$this->nmgp_form_empty && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F") { if ('parcial' == $this->form_paginacao) {?><script>summary_atualiza(<?php echo ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['reg_start'] + 1). ", " . $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['reg_qtd'] . ", " . ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['total'] + 1)?>);</script><?php }} ?>
<?php if (('novo' != $this->nmgp_opcao || $this->Embutida_form) && !$this->nmgp_form_empty && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['run_iframe'] != "F") { if ('total' == $this->form_paginacao) {?><script>summary_atualiza(1, <?php echo $this->sc_max_reg . ", " . $this->sc_max_reg?>);</script><?php }} ?>
</td></tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 

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

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

  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.visibility = 'hidden';";
          if (isset($nm_sc_blocos_aba[$bloco]))
          {
               echo "document.getElementById('id_tabs_" . $nm_sc_blocos_aba[$bloco] . "_" . $bloco . "').style.display = 'none';";
          }
      }
  }
?>
$(window).bind("load", function() {
<?php
  $nm_sc_blocos_da_pag = array(0,1,2,3,4,5,6,7);

  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';";
          echo "document.getElementById('hidden_bloco_" . $bloco . "').style.visibility = '';";
      }
  }
?>
});
</script> 
<script>
<?php
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['masterValue']))
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) {
?>
var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['parent_widget']; ?>']");
if (dbParentFrame && dbParentFrame[0] && dbParentFrame[0].contentWindow.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['masterValue'] as $cmp_master => $val_master)
        {
?>
    dbParentFrame[0].contentWindow.scAjaxDetailValue('<?php echo $cmp_master ?>', '<?php echo $val_master ?>');
<?php
        }
        unset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['masterValue']);
?>
}
<?php
    }
    else {
?>
if (parent && parent.scAjaxDetailValue)
{
<?php
        foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['masterValue'] as $cmp_master => $val_master)
        {
?>
    parent.scAjaxDetailValue('<?php echo $cmp_master ?>', '<?php echo $val_master ?>');
<?php
        }
        unset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['masterValue']);
?>
}
<?php
    }
}
?>
function updateHeaderFooter(sFldName, sFldValue)
{
  if (sFldValue[0] && sFldValue[0]["value"])
  {
    sFldValue = sFldValue[0]["value"];
  }
}
</script>
<?php
if (isset($_POST['master_nav']) && 'on' == $_POST['master_nav'])
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) {
?>
<script>
 var dbParentFrame = $(parent.document).find("[name='<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['parent_widget']; ?>']");
 dbParentFrame[0].contentWindow.scAjaxDetailStatus("form_pla_actualizacion_de_datos_mob");
</script>
<?php
    }
    else {
        $sTamanhoIframe = isset($_POST['sc_ifr_height']) && '' != $_POST['sc_ifr_height'] ? '"' . $_POST['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailStatus("form_pla_actualizacion_de_datos_mob");
 parent.scAjaxDetailHeight("form_pla_actualizacion_de_datos_mob", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
    }
}
elseif (isset($_GET['script_case_detail']) && 'Y' == $_GET['script_case_detail'])
{
    if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['dashboard_info']['under_dashboard']) {
    }
    else {
    $sTamanhoIframe = isset($_GET['sc_ifr_height']) && '' != $_GET['sc_ifr_height'] ? '"' . $_GET['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 if (0 == <?php echo $sTamanhoIframe; ?>) {
  setTimeout(function() {
   parent.scAjaxDetailHeight("form_pla_actualizacion_de_datos_mob", <?php echo $sTamanhoIframe; ?>);
  }, 100);
 }
 else {
  parent.scAjaxDetailHeight("form_pla_actualizacion_de_datos_mob", <?php echo $sTamanhoIframe; ?>);
 }
</script>
<?php
    }
}
?>
<?php
if (isset($this->NM_ajax_info['displayMsg']) && $this->NM_ajax_info['displayMsg'])
{
    $isToast   = isset($this->NM_ajax_info['displayMsgToast']) && $this->NM_ajax_info['displayMsgToast'] ? 'true' : 'false';
    $toastType = $isToast && isset($this->NM_ajax_info['displayMsgToastType']) ? $this->NM_ajax_info['displayMsgToastType'] : '';
?>
<script type="text/javascript">
_scAjaxShowMessage({title: scMsgDefTitle, message: "<?php echo $this->NM_ajax_info['displayMsgTxt']; ?>", isModal: false, timeout: sc_ajaxMsgTime, showButton: false, buttonLabel: "Ok", topPos: 0, leftPos: 0, width: 0, height: 0, redirUrl: "", redirTarget: "", redirParam: "", showClose: false, showBodyIcon: true, isToast: <?php echo $isToast ?>, toastPos: "", type: "<?php echo $toastType ?>"});
</script>
<?php
}
?>
<?php
if (isset($this->scFormFocusErrorName) && '' != $this->scFormFocusErrorName)
{
?>
<script>
scAjaxFocusError();
</script>
<?php
}
?>
<script type='text/javascript'>
bLigEditLookupCall = <?php if ($this->lig_edit_lookup_call) { ?>true<?php } else { ?>false<?php } ?>;
function scLigEditLookupCall()
{
<?php
if ($this->lig_edit_lookup && isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['sc_modal'])
{
?>
  parent.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
elseif ($this->lig_edit_lookup)
{
?>
  opener.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
?>
}
if (bLigEditLookupCall)
{
  scLigEditLookupCall();
}
<?php
if (isset($this->redir_modal) && !empty($this->redir_modal))
{
    echo $this->redir_modal;
}
?>
</script>
<?php
if ($this->nmgp_form_empty) {
?>
<script type="text/javascript">
scAjax_displayEmptyForm();
</script>
<?php
}
?>
<script type="text/javascript">
        function scBtnFn_sys_format_alt() {
                if ($("#sc_b_upd_t.sc-unique-btn-1").length && $("#sc_b_upd_t.sc-unique-btn-1").is(":visible")) {
                    if ($("#sc_b_upd_t.sc-unique-btn-1").hasClass("disabled")) {
                        return;
                    }
                        nm_atualiza ('alterar');
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_upd_b.sc-unique-btn-5").length && $("#sc_b_upd_b.sc-unique-btn-5").is(":visible")) {
                    if ($("#sc_b_upd_b.sc-unique-btn-5").hasClass("disabled")) {
                        return;
                    }
                        nm_atualiza ('alterar');
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_upd_t.sc-unique-btn-9").length && $("#sc_b_upd_t.sc-unique-btn-9").is(":visible")) {
                    if ($("#sc_b_upd_t.sc-unique-btn-9").hasClass("disabled")) {
                        return;
                    }
                        nm_atualiza ('alterar');
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_upd_b.sc-unique-btn-13").length && $("#sc_b_upd_b.sc-unique-btn-13").is(":visible")) {
                    if ($("#sc_b_upd_b.sc-unique-btn-13").hasClass("disabled")) {
                        return;
                    }
                        nm_atualiza ('alterar');
                        toggleToolbar(event, true); return;
                }
        }
        function scBtnFn_sys_format_hlp() {
                if ($("#sc_b_hlp_b").length && $("#sc_b_hlp_b").is(":visible")) {
                    if ($("#sc_b_hlp_b").hasClass("disabled")) {
                        return;
                    }
                        window.open('<?php echo $this->url_webhelp; ?>', '', 'resizable, scrollbars'); 
                        toggleToolbar(event, true); return;
                }
        }
        function scBtnFn_sys_format_sai() {
                if ($("#sc_b_sai_t.sc-unique-btn-2").length && $("#sc_b_sai_t.sc-unique-btn-2").is(":visible")) {
                    if ($("#sc_b_sai_t.sc-unique-btn-2").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_t.sc-unique-btn-3").length && $("#sc_b_sai_t.sc-unique-btn-3").is(":visible")) {
                    if ($("#sc_b_sai_t.sc-unique-btn-3").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_t.sc-unique-btn-4").length && $("#sc_b_sai_t.sc-unique-btn-4").is(":visible")) {
                    if ($("#sc_b_sai_t.sc-unique-btn-4").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_b.sc-unique-btn-6").length && $("#sc_b_sai_b.sc-unique-btn-6").is(":visible")) {
                    if ($("#sc_b_sai_b.sc-unique-btn-6").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_b.sc-unique-btn-7").length && $("#sc_b_sai_b.sc-unique-btn-7").is(":visible")) {
                    if ($("#sc_b_sai_b.sc-unique-btn-7").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_b.sc-unique-btn-8").length && $("#sc_b_sai_b.sc-unique-btn-8").is(":visible")) {
                    if ($("#sc_b_sai_b.sc-unique-btn-8").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_t.sc-unique-btn-10").length && $("#sc_b_sai_t.sc-unique-btn-10").is(":visible")) {
                    if ($("#sc_b_sai_t.sc-unique-btn-10").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_t.sc-unique-btn-11").length && $("#sc_b_sai_t.sc-unique-btn-11").is(":visible")) {
                    if ($("#sc_b_sai_t.sc-unique-btn-11").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_t.sc-unique-btn-12").length && $("#sc_b_sai_t.sc-unique-btn-12").is(":visible")) {
                    if ($("#sc_b_sai_t.sc-unique-btn-12").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_b.sc-unique-btn-14").length && $("#sc_b_sai_b.sc-unique-btn-14").is(":visible")) {
                    if ($("#sc_b_sai_b.sc-unique-btn-14").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_b.sc-unique-btn-15").length && $("#sc_b_sai_b.sc-unique-btn-15").is(":visible")) {
                    if ($("#sc_b_sai_b.sc-unique-btn-15").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_b_sai_b.sc-unique-btn-16").length && $("#sc_b_sai_b.sc-unique-btn-16").is(":visible")) {
                    if ($("#sc_b_sai_b.sc-unique-btn-16").hasClass("disabled")) {
                        return;
                    }
                        scFormClose_F6('<?php echo $nm_url_saida; ?>'); return false;
                        toggleToolbar(event, true); return;
                }
        }
        function scBtnFn_actualizaciondedatos() {
                if ($("#sc_actualizaciondedatos_top").length && $("#sc_actualizaciondedatos_top").is(":visible")) {
                    if ($("#sc_actualizaciondedatos_top").hasClass("disabled")) {
                        return;
                    }
                        
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_actualizaciondedatos_top").length && $("#sc_actualizaciondedatos_top").is(":visible")) {
                    if ($("#sc_actualizaciondedatos_top").hasClass("disabled")) {
                        return;
                    }
                        
                        toggleToolbar(event, true); return;
                }
        }
        function scBtnFn_logo() {
                if ($("#sc_logo_top").length && $("#sc_logo_top").is(":visible")) {
                    if ($("#sc_logo_top").hasClass("disabled")) {
                        return;
                    }
                        
                        toggleToolbar(event, true); return;
                }
                if ($("#sc_logo_top").length && $("#sc_logo_top").is(":visible")) {
                    if ($("#sc_logo_top").hasClass("disabled")) {
                        return;
                    }
                        
                        toggleToolbar(event, true); return;
                }
        }
</script>
<script type="text/javascript">
$(function() {
 $("#sc-id-mobile-in").mouseover(function() {
  $(this).css("cursor", "pointer");
 }).click(function() {
  scMobileDisplayControl("in");
 });
 $("#sc-id-mobile-out").mouseover(function() {
  $(this).css("cursor", "pointer");
 }).click(function() {
  scMobileDisplayControl("out");
 });
});
function scMobileDisplayControl(sOption) {
 $("#sc-id-mobile-control").val(sOption);
 nm_atualiza("recarga_mobile");
}
</script>
<?php
       if (isset($_SESSION['scriptcase']['device_mobile']) && $_SESSION['scriptcase']['device_mobile'])
       {
?>
<span id="sc-id-mobile-out"><?php echo $this->Ini->Nm_lang['lang_version_web']; ?></span>
<?php
       }
?>
<?php
$_SESSION['sc_session'][$this->Ini->sc_page]['form_pla_actualizacion_de_datos_mob']['buttonStatus'] = $this->nmgp_botoes;
?>
<script type="text/javascript">
   function sc_session_redir(url_redir)
   {
       if (window.parent && window.parent.document != window.document && typeof window.parent.sc_session_redir === 'function')
       {
           window.parent.sc_session_redir(url_redir);
       }
       else
       {
           if (window.opener && typeof window.opener.sc_session_redir === 'function')
           {
               window.close();
               window.opener.sc_session_redir(url_redir);
           }
           else
           {
               window.location = url_redir;
           }
       }
   }
</script>
</body> 
</html> 
