<?php

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

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

<html<?php echo $_SESSION['scriptcase']['reg_conf']['html_dir'] ?>>
<HEAD>
 <TITLE><?php if ('novo' == $this->nmgp_opcao) { echo strip_tags("Customers"); } else { echo strip_tags("Customers"); } ?></TITLE>
 <META http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['scriptcase']['charset_html'] ?>" />
 <META http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"/>
 <META http-equiv="Last-Modified" content="<?php echo gmdate("D, d M Y H:i:s"); ?> GMT"/>
 <META http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"/>
 <META http-equiv="Cache-Control" content="post-check=0, pre-check=0"/>
 <META http-equiv="Pragma" content="no-cache"/>
 <link rel="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_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; ?>';
 </SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery.js"></SCRIPT>
 <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" />
 <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">
  #quicksearchph_t {
   position: relative;
  }
  #quicksearchph_t img {
   position: absolute;
   top: 0;
   right: 0;
  }
 </style>
 <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.fieldSelection.js"></SCRIPT>
 <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 ?>_tab.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_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar.css" />
<?php
include_once("../_lib/css/" . $this->Ini->str_schema_all . "_tab.php");
?>

<script>
var scFocusFirstErrorField = false;
var scFocusFirstErrorName  = "<?php echo $this->scFormFocusErrorName; ?>";
</script>

<?php
include_once("custbill_form_sajax_js.php");
?>
<script type="text/javascript">
if (document.getElementById("id_error_display_fixed"))
{
 scCenterFixedElement("id_error_display_fixed");
}
var posDispLeft = 0;
var posDispTop = 0;
var Nm_Proc_Atualiz = false;
function findPos(obj)
{
 var posCurLeft = posCurTop = 0;
 if (obj.offsetParent)
 {
  posCurLeft = obj.offsetLeft
  posCurTop = obj.offsetTop
  while (obj = obj.offsetParent)
  {
   posCurLeft += obj.offsetLeft
   posCurTop += obj.offsetTop
  }
 }
 posDispLeft = posCurLeft - 10;
 posDispTop = posCurTop + 30;
}
var Nav_permite_ret = "<?php if ($this->Nav_permite_ret) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_permite_ava = "<?php if ($this->Nav_permite_ava) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_binicio     = "<?php echo $this->arr_buttons['binicio']['type']; ?>";
var Nav_binicio_off = "<?php echo $this->arr_buttons['binicio_off']['type']; ?>";
var Nav_bavanca     = "<?php echo $this->arr_buttons['bavanca']['type']; ?>";
var Nav_bavanca_off = "<?php echo $this->arr_buttons['bavanca_off']['type']; ?>";
var Nav_bretorna    = "<?php echo $this->arr_buttons['bretorna']['type']; ?>";
var Nav_bretorna_off = "<?php echo $this->arr_buttons['bretorna_off']['type']; ?>";
var Nav_bfinal      = "<?php echo $this->arr_buttons['bfinal']['type']; ?>";
var Nav_bfinal_off  = "<?php echo $this->arr_buttons['bfinal_off']['type']; ?>";
function nav_atualiza(str_ret, str_ava, str_pos)
{
 if ('S' == str_ret)
 {
  if (Nav_binicio == 'image')
  {
      if (document.getElementById("sc_b_ini_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        document.getElementById("sc_b_ini_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ini_" + str_pos)){
        document.getElementById("sc_b_ini_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['binicio']['style'] ?>";
        document.getElementById("sc_b_ini_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['binicio']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['binicio']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bretorna == 'image')
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        document.getElementById("sc_b_ret_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        document.getElementById("sc_b_ret_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bretorna']['style'] ?>";
        document.getElementById("sc_b_ret_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['bretorna']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bretorna']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        }
      }
  }
 }
 else
 {
  if (Nav_binicio_off == 'image')
  {
      if (document.getElementById("sc_b_ini_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        document.getElementById("sc_b_ini_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ini_" + str_pos)) {
        document.getElementById("sc_b_ini_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['binicio_off']['style'] ?>";
        document.getElementById("sc_b_ini_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['binicio_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['binicio_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bretorna_off == 'image')
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        document.getElementById("sc_b_ret_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        document.getElementById("sc_b_ret_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bretorna_off']['style'] ?>";
        document.getElementById("sc_b_ret_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['bretorna_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bretorna_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        }
      }
  }
 }
 if ('S' == str_ava)
 {
  if (Nav_bavanca == 'image')
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        document.getElementById("sc_b_avc_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        document.getElementById("sc_b_avc_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bavanca']['style'] ?>";
        document.getElementById("sc_b_avc_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['bavanca']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bavanca']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bfinal == 'image')
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        document.getElementById("sc_b_fim_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        document.getElementById("sc_b_fim_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bfinal']['style'] ?>";
        document.getElementById("sc_b_fim_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['bfinal']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bfinal']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        }
      }
  }
 }
 else
 {
  if (Nav_bavanca_off == 'image')
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        document.getElementById("sc_b_avc_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        document.getElementById("sc_b_avc_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bavanca_off']['style'] ?>";
        document.getElementById("sc_b_avc_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['bavanca_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bavanca_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bfinal_off == 'image')
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        document.getElementById("sc_b_fim_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        document.getElementById("sc_b_fim_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bfinal_off']['style'] ?>";
        document.getElementById("sc_b_fim_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['bfinal_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bfinal_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        }
      }
  }
 }
}
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;
}
function navpage_atualiza(str_navpage)
{
    if (document.getElementById("sc_b_navpage_b")) document.getElementById("sc_b_navpage_b").innerHTML = str_navpage;
}
<?php

include_once('custbill_form_jquery.php');

?>

 var scQSInit = true;
 var scQSPos = {};
 $(function() {

  scJQElementsAdd('');

  scJQGeneralAdd();

  $('#SC_fast_search_t').keyup(function(e) {
   scQuickSearchKeyUp('t', e);
  });

  $("#hidden_bloco_0,#hidden_bloco_1,#hidden_bloco_2,#hidden_bloco_3,#hidden_bloco_4,#hidden_bloco_5").each(function() {
   $(this.rows[0]).bind("click", {block: this}, toggleBlock)
                  .mouseover(function() { $(this).css("cursor", "pointer"); })
                  .mouseout(function() { $(this).css("cursor", ""); });
  });

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

  var i, iTestWidth, iMaxLabelWidth = 0, $labelList = $(".scUiLabelWidthFix");
  for (i = 0; i < $labelList.length; i++) {
    iTestWidth = $($labelList[i]).width();
    sTestWidth = iTestWidth + "";
    if ("" == iTestWidth) {
      iTestWidth = 0;
    }
    else if ("px" == sTestWidth.substr(sTestWidth.length - 2)) {
      iTestWidth = parseInt(sTestWidth.substr(0, sTestWidth.length - 2));
    }
    iMaxLabelWidth = Math.max(iMaxLabelWidth, iTestWidth);
  }
  if (0 < iMaxLabelWidth) {
    $(".scUiLabelWidthFix").css("width", iMaxLabelWidth + "px");
  }
<?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).load(function() {
     scQuickSearchInit(false, '');
     $('#SC_fast_search_t').listen();
     scQuickSearchKeyUp('t', null);
     scQSInit = false;
   });
   function scQuickSearchSubmit_t() {
     nm_move('fast_search', 't');
   }

   function scQuickSearchInit(bPosOnly, sPos) {
     if (!bPosOnly) {
       if ('' == sPos || 't' == sPos) scQuickSearchSize('SC_fast_search_t', 'SC_fast_search_close_t', 'SC_fast_search_submit_t', 'quicksearchph_t');
     }
   }
   function scQuickSearchSize(sIdInput, sIdClose, sIdSubmit, sPlaceHolder) {
     var oInput = $('#' + sIdInput),
         oClose = $('#' + sIdClose),
         oSubmit = $('#' + sIdSubmit),
         oPlace = $('#' + sPlaceHolder),
         iInputP = parseInt(oInput.css('padding-right')) || 0,
         iInputB = parseInt(oInput.css('border-right-width')) || 0,
         iInputW = oInput.outerWidth(),
         iPlaceW = oPlace.outerWidth(),
         oInputO = oInput.offset(),
         oPlaceO = oPlace.offset(),
         iNewRight;
     iNewRight = (iPlaceW - iInputW) - (oInputO.left - oPlaceO.left) + iInputB + 1;
     oInput.css({
       'height': Math.max(oInput.height(), 16) + 'px',
       'padding-right': iInputP + 16 + <?php echo $this->Ini->Str_qs_image_padding ?> + 'px'
     });
     oClose.css({
       'right': iNewRight + <?php echo $this->Ini->Str_qs_image_padding ?> + 'px',
       'cursor': 'pointer'
     });
     oSubmit.css({
       'right': iNewRight + <?php echo $this->Ini->Str_qs_image_padding ?> + 'px',
       'cursor': 'pointer'
     });
   }
   function scQuickSearchKeyUp(sPos, e) {
     if ('' != scQSInitVal && $('#SC_fast_search_' + sPos).val() == scQSInitVal && scQSInit) {
       $('#SC_fast_search_close_' + sPos).show();
       $('#SC_fast_search_submit_' + sPos).hide();
     }
     else {
       $('#SC_fast_search_close_' + sPos).hide();
       $('#SC_fast_search_submit_' + sPos).show();
     }
     if (null != e) {
       var keyPressed = e.charCode || e.keyCode || e.which;
       if (13 == keyPressed) {
         if ('t' == sPos) scQuickSearchSubmit_t();
       }
     }
   }
 if($(".sc-ui-block-control").length) {
  preloadBlock = new Image();
  preloadBlock.src = "<?php echo $this->Ini->path_icones; ?>/" + sc_blockExp;
 }

 var show_block = {
    "hidden_bloco_0": true,
    "hidden_bloco_1": true,
    "hidden_bloco_2": true,
    "hidden_bloco_3": true,
    "hidden_bloco_4": true,
    "hidden_bloco_5": true
 };

 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 = 1; i < block.rows.length; i++) {
   if (show_block[block_id])
    $(block.rows[i]).show();
   else
    $(block.rows[i]).hide();
  }

  if (show_block[block_id]) {
    if ("hidden_bloco_6" == block_id) {
      scAjaxDetailHeight("custship_form", $($("#nmsc_iframe_liga_custship_form")[0].contentWindow.document).innerHeight());
    }
    if ("hidden_bloco_7" == block_id) {
      scAjaxDetailHeight("custbill_orders_grid", $($("#nmsc_iframe_liga_custbill_orders_grid")[0].contentWindow.document).innerHeight());
    }
    if ("hidden_bloco_8" == block_id) {
      scAjaxDetailHeight("custbill_invoice_grid", $($("#nmsc_iframe_liga_custbill_invoice_grid")[0].contentWindow.document).innerHeight());
    }
    if ("hidden_bloco_9" == block_id) {
      scAjaxDetailHeight("prices_grid", "1000");
    }
  }
 }

 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]['custbill_form']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['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]['custbill_form']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['recarga'];
}
?>
<body class="scFormPage" style="<?php echo $str_iframe_body; ?>">
<?php

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

?>
<div id="idJSSpecChar" style="display: none;"></div>
<script type="text/javascript">
function NM_tp_critica(TP)
{
    if (TP == 0 || TP == 1 || TP == 2)
    {
        nmdg_tipo_crit = TP;
    }
}
</script> 
<?php
 include_once("custbill_form_js0.php");
?>
<script type="text/javascript" src="<?php echo str_replace("{str_idioma}", $this->Ini->str_lang, "../_lib/js/tab_erro_{str_idioma}.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;
 }
 </script>
<form name="F1" method=post 
               action="./" 
               target="_self"> 
<input type=hidden name="nm_form_submit" value="1">
<input type=hidden name="nmgp_idioma_novo" value="">
<input type=hidden name="nmgp_schema_f" value="">
<input type=hidden name="nmgp_url_saida" value="">
<input type=hidden name="nmgp_opcao" value="">
<input type=hidden name="nmgp_ancora" value="">
<input type=hidden name="nmgp_num_form" value="<?php  echo NM_encode_input($nmgp_num_form); ?>">
<input type=hidden name="nmgp_parms" value="">
<input type=hidden name="script_case_init" value="<?php  echo NM_encode_input($this->Ini->sc_page); ?>"> 
<input type=hidden name="script_case_session" value="<?php  echo NM_encode_input(session_id()); ?>"> 
<?php
$int_iframe_padding = ('F' == $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe']) ? 0 : "0px";
?>
<?php
$_SESSION['scriptcase']['error_span_title']['custbill_form'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['custbill_form'] = '' != $this->Ini->Err_ico_title ? $this->Ini->path_icones . '/' . $this->Ini->Err_ico_title : '';
?>
<div style="display: none; position: absolute" id="id_error_display_table_frame">
<table class="scFormErrorTable">
<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"><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"><span id="id_error_display_table_text"></span></td></tr>
</table>
</div>
<div style="display: none; position: absolute" 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>
<script type="text/javascript">
var scMsgDefTitle = "<?php echo $this->Ini->Nm_lang['lang_usr_lang_othr_msgs_titl']; ?>";
var scMsgDefButton = "Ok";
var scMsgDefClick = "close";
var scMsgDefScInit = "<?php echo $this->Ini->page; ?>";
</script>
<table id="main_table_form"  align="left" cellpadding="<?php echo $int_iframe_padding; ?>" cellspacing=0 class="scFormBorder"  width="100%">
<?php
  if (!$this->Embutida_call && (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['mostra_cab']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['mostra_cab'] != "N"))
  {
?>
<tr><td>
<style>
#lin1_col1 { padding-left:9px; padding-top:7px;  height:27px; overflow:hidden; text-align:left;}			 
#lin1_col2 { padding-right:9px; padding-top:7px; height:27px; text-align:right; overflow:hidden;   font-size:12px; font-weight:normal;}
</style>

<div style="width: 100%">
 <div class="scFormHeader" style="height:11px; display: block; border-width:0px; "></div>
 <div style="height:37px; border-width:0px 0px 1px 0px;  border-style: dashed; border-color:#ddd; display: block">
 	<table style="width:100%; border-collapse:collapse; padding:0;">
    	<tr>
        	<td id="lin1_col1" class="scFormHeaderFont"><span><?php if ($this->nmgp_opcao == "novo") { echo "Customers"; } else { echo "Customers"; } ?></span></td>
            <td id="lin1_col2" class="scFormHeaderFont"><span><?php echo date($this->dateDefaultFormat()); ?></span></td>
        </tr>
    </table>		 
 </div>
</div>
</td></tr>
<?php
  }
?>
<tr><td>
<?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]['custbill_form']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar" 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
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "R")
{
    $NM_btn = false;
      if ($this->nmgp_botoes['qsearch'] == "on" && $opcao_botoes != "novo")
      {
          $OPC_cmp = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['fast_search'][0] : "";
          $OPC_arg = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['fast_search'][1] : "";
          $OPC_dat = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['fast_search'][2] : "";
?> 
           <script type="text/javascript">var change_fast_t = "";</script>
          <select class="scFormToolbarInput" style="vertical-align: middle;" name="nmgp_fast_search_t" onChange="change_fast_t = 'CH';">
<?php 
          $SC_Label_atu['bcode'] = (isset($this->nm_new_label['bcode'])) ? $this->nm_new_label['bcode'] : 'BCODE'; 
          $SC_Label_atu['name'] = (isset($this->nm_new_label['name'])) ? $this->nm_new_label['name'] : 'NAME'; 
          $SC_Label_atu['address1'] = (isset($this->nm_new_label['address1'])) ? $this->nm_new_label['address1'] : 'ADDRESS1'; 
          $SC_Label_atu['address2'] = (isset($this->nm_new_label['address2'])) ? $this->nm_new_label['address2'] : 'ADDRESS2'; 
          $SC_Label_atu['city'] = (isset($this->nm_new_label['city'])) ? $this->nm_new_label['city'] : 'CITY'; 
          $SC_Label_atu['state'] = (isset($this->nm_new_label['state'])) ? $this->nm_new_label['state'] : 'STATE'; 
          foreach ($SC_Label_atu as $CMP => $LABEL)
          {
              $OPC_sel = ($CMP == $OPC_cmp) ? " selected" : "";
              echo "           <option value='" . $CMP . "'" . $OPC_sel . ">" . $LABEL . "</option>";
          }
?> 
          </select>
          <select class="scFormToolbarInput" style="vertical-align: middle;" name="nmgp_cond_fast_search_t" onChange="change_fast_t = 'CH';">
<?php 
          $OPC_sel = ("eq" == $OPC_arg) ? " selected" : "";
           echo "           <option value='eq'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_exac'] . "</option>";
          $OPC_sel = ("ii" == $OPC_arg) ? " selected" : "";
           echo "           <option value='ii'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_stts_with'] . "</option>";
          $OPC_sel = ("qp" == $OPC_arg) ? " selected" : "";
           echo "           <option value='qp'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_like'] . "</option>";
?> 
          </select>
          <script type="text/javascript">var scQSInitVal = "<?php echo $OPC_dat ?>";</script>
          <span id="quicksearchph_t">
           <input type="text" id="SC_fast_search_t" class="scFormToolbarInput" style="vertical-align: middle" name="nmgp_arg_fast_search_t" value="<?php echo NM_encode_input($OPC_dat) ?>" size="10" onChange="change_fast_t = 'CH';" alt="{watermark:'<?php echo $this->Ini->Nm_lang['lang_othr_qk_watermark'] ?>', watermarkClass: 'scFormToolbarInputWm', maxLength: 255}">
           <img style="position: absolute; display: none; height: 16px; width: 16px" id="SC_fast_search_close_t" src="<?php echo $this->Ini->path_botoes ?>/<?php echo $this->Ini->Img_qs_clean; ?>" onclick="document.getElementById('SC_fast_search_t').value = ''; nm_move('fast_search', 't');">
           <img style="position: absolute; display: none; height: 16px; width: 16px" id="SC_fast_search_submit_t" src="<?php echo $this->Ini->path_botoes ?>/<?php echo $this->Ini->Img_qs_search; ?>" onclick="scQuickSearchSubmit_t();">
          </span>
<?php 
      }
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['new'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bnovo", "nm_move ('novo'); return false;", "nm_move ('novo'); return false;", "sc_b_new_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!$this->Embutida_call || $this->sc_evento == "novo" || $this->sc_evento == "insert" || $this->sc_evento == "incluir")) {
        $sCondStyle = ($this->nmgp_botoes['insert'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bincluir", "nm_atualiza ('incluir'); return false;", "nm_atualiza ('incluir'); return false;", "sc_b_ins_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!$this->Embutida_call || $this->sc_evento == "novo" || $this->sc_evento == "insert" || $this->sc_evento == "incluir")) {
        $sCondStyle = ($this->nmgp_botoes['insert'] == "on") && ($this->nm_flag_saida_novo != "S" || $this->nmgp_botoes['exit'] != "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bcancelar", "document.F5.submit();return false;", "document.F5.submit();return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['update'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "balterar", "nm_atualiza ('alterar'); return false;", "nm_atualiza ('alterar'); return false;", "sc_b_upd_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['delete'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bexcluir", "nm_atualiza ('excluir'); return false;", "nm_atualiza ('excluir'); return false;", "sc_b_del_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['FixDB'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "fixdb", "sc_btn_FixDB()", "sc_btn_FixDB()", "sc_FixDB_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['FixDB'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "fixdb", "sc_btn_FixDB()", "sc_btn_FixDB()", "sc_FixDB_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
?> 
     </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ('' != $this->url_webhelp) {
        $sCondStyle = '';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bhelp", "window.open('" . $this->url_webhelp. "', '', 'resizable, scrollbars'); ", "window.open('" . $this->url_webhelp. "', '', 'resizable, scrollbars'); ", "", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && ($nm_apl_dependente != 1 || $this->nm_Start_new) && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "R") && (!$this->Embutida_call)) {
        $sCondStyle = (($this->nm_flag_saida_novo == "S" || ($this->nm_Start_new && !$this->aba_iframe)) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] == "R") && (!$this->Embutida_call)) {
        $sCondStyle = ($this->nm_flag_saida_novo == "S" && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!$this->Embutida_call)) {
        $sCondStyle = (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && $nm_apl_dependente != 1 && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "R" && (!$this->aba_iframe || $this->is_calendar_app) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bsair", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!$this->Embutida_call)) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!$this->Embutida_call)) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente != 1 || $this->nmgp_botoes['exit'] != "on") && (!$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bsair", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?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]['custbill_form']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['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
  if ($this->nmgp_form_empty)
  {
       echo "</td></tr><tr><td align=center>";
       echo "<font face=\"" . $this->Ini->pag_fonte_tipo . "\" color=\"" . $this->Ini->cor_txt_grid . "\" size=\"2\"><b>" . $this->Ini->Nm_lang['lang_errm_empt'] . "</b></font>";
       echo "</td></tr>";
  }
  else
  {
?>
<script type="text/javascript">
var pag_ativa = "custbill_form_form0";
</script>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="" width=100%>
<tr>
<?php
    if (empty($nmgp_num_form) || $nmgp_num_form == "custbill_form_form0")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form0_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form0_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form0_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form0_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form0_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form0')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form0_font">Main</TD>
           <TD ID="id_custbill_form_form0_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form1")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form1_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form1_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form1_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form1_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form1_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form1')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form1_font">Contacts</TD>
           <TD ID="id_custbill_form_form1_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form2")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form2_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form2_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form2_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form2_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form2_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form2')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form2_font">Sales Categories</TD>
           <TD ID="id_custbill_form_form2_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form3")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form3_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form3_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form3_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form3_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form3_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form3')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form3_font">Sales Data</TD>
           <TD ID="id_custbill_form_form3_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form4")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form4_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form4_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form4_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form4_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form4_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form4')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form4_font">Customer Log</TD>
           <TD ID="id_custbill_form_form4_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form5")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form5_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form5_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form5_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form5_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form5_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form5')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form5_font">Ship To</TD>
           <TD ID="id_custbill_form_form5_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form6")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form6_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form6_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form6_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form6_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form6_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form6')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form6_font">Orders</TD>
           <TD ID="id_custbill_form_form6_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form7")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form7_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form7_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form7_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form7_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form7_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form7')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form7_font">Billing</TD>
           <TD ID="id_custbill_form_form7_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "custbill_form_form8")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_custbill_form_form8_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_custbill_form_form8_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_custbill_form_form8_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_custbill_form_form8_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_custbill_form_form8_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('custbill_form_form8')" class="<?php echo $css_fonte; ?>" ID="id_custbill_form_form8_font">Quotes</TD>
           <TD ID="id_custbill_form_form8_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<td width=100%></td>
</tr>
</TABLE>
</td></tr> 
<tr><td style="padding: 0px <?php echo ('' == $int_iframe_padding) ? '0' : $int_iframe_padding; ?>px">
<div id="custbill_form_form0" style='display: none; width: 1px; height: 0px; overflow: scroll'>
<?php $sc_hidden_no = 1; $sc_hidden_yes = 0; ?>
   <a name="bloco_0"></a>
   <table width="100%" height="100%" cellpadding="0"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_0"><!-- bloco_c -->
<?php
?>
<TABLE align="center" id="hidden_bloco_0" class="scFormTable" width="100%" style="height: 100%;">   <tr>


    <TD colspan="8" height="20" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont"><?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "<table style=\"border-collapse: collapse; height: 100%; width: 100%\"><tr><td style=\"vertical-align: middle; border-width: 0px; padding: 0px 2px 0px 0px\"><img src=\"" . $this->Ini->path_icones . "/" . $this->Ini->Block_img_col . "\" style=\"border: 0px; float: left\" class=\"sc-ui-block-control\"></td><td style=\"border-width: 0px; padding: 0px; width: 100%\" class=\"scFormBlockAlign\">"; } ?>Main<?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "</td></tr></table>"; } ?></TD>
       
      </TR>
     </TABLE>
    </TD>

   </tr>
<?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['updated']))
           {
               $this->nmgp_cmp_readonly['updated'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['bcode']))
    {
        $this->nm_new_label['bcode'] = "BCODE";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $bcode = $this->bcode;
   $sStyleHidden_bcode = '';
   if (isset($this->nmgp_cmp_hidden['bcode']) && $this->nmgp_cmp_hidden['bcode'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['bcode']);
       $sStyleHidden_bcode = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_bcode = 'display: none;';
   $sStyleReadInp_bcode = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['bcode']) && $this->nmgp_cmp_readonly['bcode'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['bcode']);
       $sStyleReadLab_bcode = '';
       $sStyleReadInp_bcode = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['bcode']) && $this->nmgp_cmp_hidden['bcode'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="bcode" value="<?php echo NM_encode_input($bcode) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_bcode" style="<?php echo $sStyleHidden_bcode; ?>;"><span id="id_label_bcode"><?php echo $this->nm_new_label['bcode']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['bcode']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['bcode'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_bcode" style="<?php echo $sStyleHidden_bcode; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["bcode"]) &&  $this->nmgp_cmp_readonly["bcode"] == "on") { 

 ?>
<input type=hidden name="bcode" value="<?php echo NM_encode_input($bcode) . "\">" . $bcode . ""; ?>
<?php } else { ?>
<span id="id_read_on_bcode" class="sc-ui-readonly-bcode" style=";<?php echo $sStyleReadLab_bcode; ?>"><?php echo NM_encode_input($this->bcode); ?></span><span id="id_read_off_bcode" style="white-space: nowrap;<?php echo $sStyleReadInp_bcode; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_bcode" type=text name="bcode" value="<?php echo NM_encode_input($bcode) ?>"
 size=4 maxlength=4 alt="{datatype: 'text', maxLength: 4, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_bcode_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_bcode_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['status']))
    {
        $this->nm_new_label['status'] = "STATUS";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $status = $this->status;
   $sStyleHidden_status = '';
   if (isset($this->nmgp_cmp_hidden['status']) && $this->nmgp_cmp_hidden['status'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['status']);
       $sStyleHidden_status = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_status = 'display: none;';
   $sStyleReadInp_status = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['status']) && $this->nmgp_cmp_readonly['status'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['status']);
       $sStyleReadLab_status = '';
       $sStyleReadInp_status = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['status']) && $this->nmgp_cmp_hidden['status'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="status" value="<?php echo NM_encode_input($status) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_status" style="<?php echo $sStyleHidden_status; ?>;"><span id="id_label_status"><?php echo $this->nm_new_label['status']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_status" style="<?php echo $sStyleHidden_status; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["status"]) &&  $this->nmgp_cmp_readonly["status"] == "on") { 

 ?>
<input type=hidden name="status" value="<?php echo NM_encode_input($status) . "\">" . $status . ""; ?>
<?php } else { ?>
<span id="id_read_on_status" class="sc-ui-readonly-status" style=";<?php echo $sStyleReadLab_status; ?>"><?php echo NM_encode_input($this->status); ?></span><span id="id_read_off_status" style="white-space: nowrap;<?php echo $sStyleReadInp_status; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_status" type=text name="status" value="<?php echo NM_encode_input($status) ?>"
 size=1 maxlength=1 alt="{datatype: 'text', maxLength: 1, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_status_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_status_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['updated']))
    {
        $this->nm_new_label['updated'] = "UPDATED";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $updated = $this->updated;
   $sStyleHidden_updated = '';
   if (isset($this->nmgp_cmp_hidden['updated']) && $this->nmgp_cmp_hidden['updated'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['updated']);
       $sStyleHidden_updated = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_updated = 'display: none;';
   $sStyleReadInp_updated = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["updated"]) &&  $this->nmgp_cmp_readonly["updated"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['updated']);
       $sStyleReadLab_updated = '';
       $sStyleReadInp_updated = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['updated']) && $this->nmgp_cmp_hidden['updated'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="updated" value="<?php echo NM_encode_input($updated) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_updated" style="<?php echo $sStyleHidden_updated; ?>;"><span id="id_label_updated"><?php echo $this->nm_new_label['updated']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_updated" style="<?php echo $sStyleHidden_updated; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["updated"]) &&  $this->nmgp_cmp_readonly["updated"] == "on")) { 

 ?>
<input type=hidden name="updated" value="<?php echo NM_encode_input($updated) . "\"><span id=\"id_ajax_label_updated\">" . $updated . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_updated" class="sc-ui-readonly-updated" style=";<?php echo $sStyleReadLab_updated; ?>"><?php echo NM_encode_input($this->updated); ?></span><span id="id_read_off_updated" style="white-space: nowrap;<?php echo $sStyleReadInp_updated; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_updated" type=text name="updated" value="<?php echo NM_encode_input($updated) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['updated']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['updated']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['updated']['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);
?>
&nbsp;<?php echo $tmp_form_data; ?></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_updated_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_updated_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['number']))
    {
        $this->nm_new_label['number'] = "NUMBER";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $number = $this->number;
   $sStyleHidden_number = '';
   if (isset($this->nmgp_cmp_hidden['number']) && $this->nmgp_cmp_hidden['number'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['number']);
       $sStyleHidden_number = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_number = 'display: none;';
   $sStyleReadInp_number = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['number']) && $this->nmgp_cmp_readonly['number'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['number']);
       $sStyleReadLab_number = '';
       $sStyleReadInp_number = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['number']) && $this->nmgp_cmp_hidden['number'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="number" value="<?php echo NM_encode_input($number) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_number" style="<?php echo $sStyleHidden_number; ?>;"><span id="id_label_number"><?php echo $this->nm_new_label['number']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_number" style="<?php echo $sStyleHidden_number; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["number"]) &&  $this->nmgp_cmp_readonly["number"] == "on") { 

 ?>
<input type=hidden name="number" value="<?php echo NM_encode_input($number) . "\">" . $number . ""; ?>
<?php } else { ?>
<span id="id_read_on_number" class="sc-ui-readonly-number" style=";<?php echo $sStyleReadLab_number; ?>"><?php echo NM_encode_input($this->number); ?></span><span id="id_read_off_number" style="white-space: nowrap;<?php echo $sStyleReadInp_number; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_number" type=text name="number" value="<?php echo NM_encode_input($number) ?>"
 size=11 alt="{datatype: 'integer', maxLength: 11, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['number']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['number']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, 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: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_number_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_number_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 * 2; ?>" >&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['tdate']))
           {
               $this->nmgp_cmp_readonly['tdate'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['terms']))
    {
        $this->nm_new_label['terms'] = "TERMS";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $terms = $this->terms;
   $sStyleHidden_terms = '';
   if (isset($this->nmgp_cmp_hidden['terms']) && $this->nmgp_cmp_hidden['terms'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['terms']);
       $sStyleHidden_terms = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_terms = 'display: none;';
   $sStyleReadInp_terms = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['terms']) && $this->nmgp_cmp_readonly['terms'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['terms']);
       $sStyleReadLab_terms = '';
       $sStyleReadInp_terms = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['terms']) && $this->nmgp_cmp_hidden['terms'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="terms" value="<?php echo NM_encode_input($terms) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_terms" style="<?php echo $sStyleHidden_terms; ?>;"><span id="id_label_terms"><?php echo $this->nm_new_label['terms']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['terms']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['terms'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_terms" style="<?php echo $sStyleHidden_terms; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["terms"]) &&  $this->nmgp_cmp_readonly["terms"] == "on") { 

 ?>
<input type=hidden name="terms" value="<?php echo NM_encode_input($terms) . "\">" . $terms . ""; ?>
<?php } else { ?>
<span id="id_read_on_terms" class="sc-ui-readonly-terms" style=";<?php echo $sStyleReadLab_terms; ?>"><?php echo NM_encode_input($this->terms); ?></span><span id="id_read_off_terms" style="white-space: nowrap;<?php echo $sStyleReadInp_terms; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_terms" type=text name="terms" value="<?php echo NM_encode_input($terms) ?>"
 size=15 maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_terms_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_terms_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['salesman']))
    {
        $this->nm_new_label['salesman'] = "SALESMAN";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $salesman = $this->salesman;
   $sStyleHidden_salesman = '';
   if (isset($this->nmgp_cmp_hidden['salesman']) && $this->nmgp_cmp_hidden['salesman'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['salesman']);
       $sStyleHidden_salesman = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_salesman = 'display: none;';
   $sStyleReadInp_salesman = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['salesman']) && $this->nmgp_cmp_readonly['salesman'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['salesman']);
       $sStyleReadLab_salesman = '';
       $sStyleReadInp_salesman = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['salesman']) && $this->nmgp_cmp_hidden['salesman'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="salesman" value="<?php echo NM_encode_input($salesman) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_salesman" style="<?php echo $sStyleHidden_salesman; ?>;"><span id="id_label_salesman"><?php echo $this->nm_new_label['salesman']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['salesman']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['salesman'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_salesman" style="<?php echo $sStyleHidden_salesman; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["salesman"]) &&  $this->nmgp_cmp_readonly["salesman"] == "on") { 

 ?>
<input type=hidden name="salesman" value="<?php echo NM_encode_input($salesman) . "\">" . $salesman . ""; ?>
<?php } else { ?>
<span id="id_read_on_salesman" class="sc-ui-readonly-salesman" style=";<?php echo $sStyleReadLab_salesman; ?>"><?php echo NM_encode_input($this->salesman); ?></span><span id="id_read_off_salesman" style="white-space: nowrap;<?php echo $sStyleReadInp_salesman; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_salesman" type=text name="salesman" value="<?php echo NM_encode_input($salesman) ?>"
 size=3 maxlength=3 alt="{datatype: 'text', maxLength: 3, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_salesman_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_salesman_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['tdate']))
    {
        $this->nm_new_label['tdate'] = "TDATE";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $tdate = $this->tdate;
   $sStyleHidden_tdate = '';
   if (isset($this->nmgp_cmp_hidden['tdate']) && $this->nmgp_cmp_hidden['tdate'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['tdate']);
       $sStyleHidden_tdate = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_tdate = 'display: none;';
   $sStyleReadInp_tdate = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["tdate"]) &&  $this->nmgp_cmp_readonly["tdate"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['tdate']);
       $sStyleReadLab_tdate = '';
       $sStyleReadInp_tdate = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['tdate']) && $this->nmgp_cmp_hidden['tdate'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="tdate" value="<?php echo NM_encode_input($tdate) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_tdate" style="<?php echo $sStyleHidden_tdate; ?>;"><span id="id_label_tdate"><?php echo $this->nm_new_label['tdate']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_tdate" style="<?php echo $sStyleHidden_tdate; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["tdate"]) &&  $this->nmgp_cmp_readonly["tdate"] == "on")) { 

 ?>
<input type=hidden name="tdate" value="<?php echo NM_encode_input($tdate) . "\"><span id=\"id_ajax_label_tdate\">" . $tdate . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_tdate" class="sc-ui-readonly-tdate" style=";<?php echo $sStyleReadLab_tdate; ?>"><?php echo NM_encode_input($this->tdate); ?></span><span id="id_read_off_tdate" style="white-space: nowrap;<?php echo $sStyleReadInp_tdate; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_tdate" type=text name="tdate" value="<?php echo NM_encode_input($tdate) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['tdate']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['tdate']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['tdate']['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);
?>
&nbsp;<?php echo $tmp_form_data; ?></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_tdate_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_tdate_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


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

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


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

<?php } ?>
   </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"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_1"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_1" class="scFormTable" width="100%" style="height: 100%;">   <tr>


    <TD colspan="2" height="20" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont"><?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "<table style=\"border-collapse: collapse; height: 100%; width: 100%\"><tr><td style=\"vertical-align: middle; border-width: 0px; padding: 0px 2px 0px 0px\"><img src=\"" . $this->Ini->path_icones . "/" . $this->Ini->Block_img_col . "\" style=\"border: 0px; float: left\" class=\"sc-ui-block-control\"></td><td style=\"border-width: 0px; padding: 0px; width: 100%\" class=\"scFormBlockAlign\">"; } ?>Address<?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "</td></tr></table>"; } ?></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['att']))
    {
        $this->nm_new_label['att'] = "ATT";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $att = $this->att;
   $sStyleHidden_att = '';
   if (isset($this->nmgp_cmp_hidden['att']) && $this->nmgp_cmp_hidden['att'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['att']);
       $sStyleHidden_att = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_att = 'display: none;';
   $sStyleReadInp_att = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['att']) && $this->nmgp_cmp_readonly['att'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['att']);
       $sStyleReadLab_att = '';
       $sStyleReadInp_att = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['att']) && $this->nmgp_cmp_hidden['att'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="att" value="<?php echo NM_encode_input($att) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_att" style="<?php echo $sStyleHidden_att; ?>;"><span id="id_label_att"><?php echo $this->nm_new_label['att']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_att" style="<?php echo $sStyleHidden_att; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["att"]) &&  $this->nmgp_cmp_readonly["att"] == "on") { 

 ?>
<input type=hidden name="att" value="<?php echo NM_encode_input($att) . "\">" . $att . ""; ?>
<?php } else { ?>
<span id="id_read_on_att" class="sc-ui-readonly-att" style=";<?php echo $sStyleReadLab_att; ?>"><?php echo NM_encode_input($this->att); ?></span><span id="id_read_off_att" style="white-space: nowrap;<?php echo $sStyleReadInp_att; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_att" type=text name="att" value="<?php echo NM_encode_input($att) ?>"
 size=25 maxlength=25 alt="{datatype: 'text', maxLength: 25, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_att_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_att_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 * 2; ?>" >&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['prefix']))
    {
        $this->nm_new_label['prefix'] = "PREFIX";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $prefix = $this->prefix;
   $sStyleHidden_prefix = '';
   if (isset($this->nmgp_cmp_hidden['prefix']) && $this->nmgp_cmp_hidden['prefix'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['prefix']);
       $sStyleHidden_prefix = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_prefix = 'display: none;';
   $sStyleReadInp_prefix = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['prefix']) && $this->nmgp_cmp_readonly['prefix'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['prefix']);
       $sStyleReadLab_prefix = '';
       $sStyleReadInp_prefix = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['prefix']) && $this->nmgp_cmp_hidden['prefix'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="prefix" value="<?php echo NM_encode_input($prefix) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_prefix" style="<?php echo $sStyleHidden_prefix; ?>;"><span id="id_label_prefix"><?php echo $this->nm_new_label['prefix']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_prefix" style="<?php echo $sStyleHidden_prefix; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["prefix"]) &&  $this->nmgp_cmp_readonly["prefix"] == "on") { 

 ?>
<input type=hidden name="prefix" value="<?php echo NM_encode_input($prefix) . "\">" . $prefix . ""; ?>
<?php } else { ?>
<span id="id_read_on_prefix" class="sc-ui-readonly-prefix" style=";<?php echo $sStyleReadLab_prefix; ?>"><?php echo NM_encode_input($this->prefix); ?></span><span id="id_read_off_prefix" style="white-space: nowrap;<?php echo $sStyleReadInp_prefix; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_prefix" type=text name="prefix" value="<?php echo NM_encode_input($prefix) ?>"
 size=5 maxlength=5 alt="{datatype: 'text', maxLength: 5, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_prefix_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_prefix_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 * 2; ?>" >&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['name']))
    {
        $this->nm_new_label['name'] = "NAME";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $name = $this->name;
   $sStyleHidden_name = '';
   if (isset($this->nmgp_cmp_hidden['name']) && $this->nmgp_cmp_hidden['name'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['name']);
       $sStyleHidden_name = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_name = 'display: none;';
   $sStyleReadInp_name = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['name']) && $this->nmgp_cmp_readonly['name'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['name']);
       $sStyleReadLab_name = '';
       $sStyleReadInp_name = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['name']) && $this->nmgp_cmp_hidden['name'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="name" value="<?php echo NM_encode_input($name) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_name" style="<?php echo $sStyleHidden_name; ?>;"><span id="id_label_name"><?php echo $this->nm_new_label['name']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['name']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['name'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_name" style="<?php echo $sStyleHidden_name; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["name"]) &&  $this->nmgp_cmp_readonly["name"] == "on") { 

 ?>
<input type=hidden name="name" value="<?php echo NM_encode_input($name) . "\">" . $name . ""; ?>
<?php } else { ?>
<span id="id_read_on_name" class="sc-ui-readonly-name" style=";<?php echo $sStyleReadLab_name; ?>"><?php echo NM_encode_input($this->name); ?></span><span id="id_read_off_name" style="white-space: nowrap;<?php echo $sStyleReadInp_name; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_name" type=text name="name" value="<?php echo NM_encode_input($name) ?>"
 size=30 maxlength=30 alt="{datatype: 'text', maxLength: 30, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_name_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_name_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 * 2; ?>" >&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['address1']))
    {
        $this->nm_new_label['address1'] = "ADDRESS1";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $address1 = $this->address1;
   $sStyleHidden_address1 = '';
   if (isset($this->nmgp_cmp_hidden['address1']) && $this->nmgp_cmp_hidden['address1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['address1']);
       $sStyleHidden_address1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_address1 = 'display: none;';
   $sStyleReadInp_address1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['address1']) && $this->nmgp_cmp_readonly['address1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['address1']);
       $sStyleReadLab_address1 = '';
       $sStyleReadInp_address1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['address1']) && $this->nmgp_cmp_hidden['address1'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="address1" value="<?php echo NM_encode_input($address1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_address1" style="<?php echo $sStyleHidden_address1; ?>;"><span id="id_label_address1"><?php echo $this->nm_new_label['address1']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['address1']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['address1'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_address1" style="<?php echo $sStyleHidden_address1; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["address1"]) &&  $this->nmgp_cmp_readonly["address1"] == "on") { 

 ?>
<input type=hidden name="address1" value="<?php echo NM_encode_input($address1) . "\">" . $address1 . ""; ?>
<?php } else { ?>
<span id="id_read_on_address1" class="sc-ui-readonly-address1" style=";<?php echo $sStyleReadLab_address1; ?>"><?php echo NM_encode_input($this->address1); ?></span><span id="id_read_off_address1" style="white-space: nowrap;<?php echo $sStyleReadInp_address1; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_address1" type=text name="address1" value="<?php echo NM_encode_input($address1) ?>"
 size=25 maxlength=25 alt="{datatype: 'text', maxLength: 25, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_address1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_address1_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 * 2; ?>" >&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['address2']))
    {
        $this->nm_new_label['address2'] = "ADDRESS2";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $address2 = $this->address2;
   $sStyleHidden_address2 = '';
   if (isset($this->nmgp_cmp_hidden['address2']) && $this->nmgp_cmp_hidden['address2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['address2']);
       $sStyleHidden_address2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_address2 = 'display: none;';
   $sStyleReadInp_address2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['address2']) && $this->nmgp_cmp_readonly['address2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['address2']);
       $sStyleReadLab_address2 = '';
       $sStyleReadInp_address2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['address2']) && $this->nmgp_cmp_hidden['address2'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="address2" value="<?php echo NM_encode_input($address2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_address2" style="<?php echo $sStyleHidden_address2; ?>;"><span id="id_label_address2"><?php echo $this->nm_new_label['address2']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_address2" style="<?php echo $sStyleHidden_address2; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["address2"]) &&  $this->nmgp_cmp_readonly["address2"] == "on") { 

 ?>
<input type=hidden name="address2" value="<?php echo NM_encode_input($address2) . "\">" . $address2 . ""; ?>
<?php } else { ?>
<span id="id_read_on_address2" class="sc-ui-readonly-address2" style=";<?php echo $sStyleReadLab_address2; ?>"><?php echo NM_encode_input($this->address2); ?></span><span id="id_read_off_address2" style="white-space: nowrap;<?php echo $sStyleReadInp_address2; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_address2" type=text name="address2" value="<?php echo NM_encode_input($address2) ?>"
 size=25 maxlength=25 alt="{datatype: 'text', maxLength: 25, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_address2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_address2_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 * 2; ?>" >&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['city']))
    {
        $this->nm_new_label['city'] = "CITY";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $city = $this->city;
   $sStyleHidden_city = '';
   if (isset($this->nmgp_cmp_hidden['city']) && $this->nmgp_cmp_hidden['city'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['city']);
       $sStyleHidden_city = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_city = 'display: none;';
   $sStyleReadInp_city = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['city']) && $this->nmgp_cmp_readonly['city'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['city']);
       $sStyleReadLab_city = '';
       $sStyleReadInp_city = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['city']) && $this->nmgp_cmp_hidden['city'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="city" value="<?php echo NM_encode_input($city) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_city" style="<?php echo $sStyleHidden_city; ?>;"><span id="id_label_city"><?php echo $this->nm_new_label['city']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['city']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['city'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_city" style="<?php echo $sStyleHidden_city; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["city"]) &&  $this->nmgp_cmp_readonly["city"] == "on") { 

 ?>
<input type=hidden name="city" value="<?php echo NM_encode_input($city) . "\">" . $city . ""; ?>
<?php } else { ?>
<span id="id_read_on_city" class="sc-ui-readonly-city" style=";<?php echo $sStyleReadLab_city; ?>"><?php echo NM_encode_input($this->city); ?></span><span id="id_read_off_city" style="white-space: nowrap;<?php echo $sStyleReadInp_city; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_city" type=text name="city" value="<?php echo NM_encode_input($city) ?>"
 size=17 maxlength=17 alt="{datatype: 'text', maxLength: 17, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_city_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_city_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 * 2; ?>" >&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['state']))
    {
        $this->nm_new_label['state'] = "STATE";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $state = $this->state;
   $sStyleHidden_state = '';
   if (isset($this->nmgp_cmp_hidden['state']) && $this->nmgp_cmp_hidden['state'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['state']);
       $sStyleHidden_state = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_state = 'display: none;';
   $sStyleReadInp_state = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['state']) && $this->nmgp_cmp_readonly['state'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['state']);
       $sStyleReadLab_state = '';
       $sStyleReadInp_state = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['state']) && $this->nmgp_cmp_hidden['state'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="state" value="<?php echo NM_encode_input($state) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_state" style="<?php echo $sStyleHidden_state; ?>;"><span id="id_label_state"><?php echo $this->nm_new_label['state']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['state']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['state'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_state" style="<?php echo $sStyleHidden_state; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["state"]) &&  $this->nmgp_cmp_readonly["state"] == "on") { 

 ?>
<input type=hidden name="state" value="<?php echo NM_encode_input($state) . "\">" . $state . ""; ?>
<?php } else { ?>
<span id="id_read_on_state" class="sc-ui-readonly-state" style=";<?php echo $sStyleReadLab_state; ?>"><?php echo NM_encode_input($this->state); ?></span><span id="id_read_off_state" style="white-space: nowrap;<?php echo $sStyleReadInp_state; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_state" type=text name="state" value="<?php echo NM_encode_input($state) ?>"
 size=2 maxlength=2 alt="{datatype: 'text', maxLength: 2, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_state_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_state_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 * 2; ?>" >&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['zip_code']))
    {
        $this->nm_new_label['zip_code'] = "ZIP CODE";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $zip_code = $this->zip_code;
   $sStyleHidden_zip_code = '';
   if (isset($this->nmgp_cmp_hidden['zip_code']) && $this->nmgp_cmp_hidden['zip_code'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['zip_code']);
       $sStyleHidden_zip_code = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_zip_code = 'display: none;';
   $sStyleReadInp_zip_code = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['zip_code']) && $this->nmgp_cmp_readonly['zip_code'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['zip_code']);
       $sStyleReadLab_zip_code = '';
       $sStyleReadInp_zip_code = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['zip_code']) && $this->nmgp_cmp_hidden['zip_code'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="zip_code" value="<?php echo NM_encode_input($zip_code) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_zip_code" style="<?php echo $sStyleHidden_zip_code; ?>;"><span id="id_label_zip_code"><?php echo $this->nm_new_label['zip_code']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['zip_code']) || $_SESSION['sc_session'][$this->Ini->sc_page]['custbill_form']['php_cmp_required']['zip_code'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_zip_code" style="<?php echo $sStyleHidden_zip_code; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["zip_code"]) &&  $this->nmgp_cmp_readonly["zip_code"] == "on") { 

 ?>
<input type=hidden name="zip_code" value="<?php echo NM_encode_input($zip_code) . "\">" . $zip_code . ""; ?>
<?php } else { ?>
<span id="id_read_on_zip_code" class="sc-ui-readonly-zip_code" style=";<?php echo $sStyleReadLab_zip_code; ?>"><?php echo NM_encode_input($this->zip_code); ?></span><span id="id_read_off_zip_code" style="white-space: nowrap;<?php echo $sStyleReadInp_zip_code; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_zip_code" type=text name="zip_code" value="<?php echo NM_encode_input($zip_code) ?>"
 size=5 maxlength=5 alt="{datatype: 'text', maxLength: 5, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_zip_code_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_zip_code_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 * 2; ?>" >&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['country']))
    {
        $this->nm_new_label['country'] = "COUNTRY";
    }
?>
<?php
   $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  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $country = $this->country;
   $sStyleHidden_country = '';
   if (isset($this->nmgp_cmp_hidden['country']) && $this->nmgp_cmp_hidden['country'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['country']);
       $sStyleHidden_country = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_country = 'display: none;';
   $sStyleReadInp_country = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['country']) && $this->nmgp_cmp_readonly['country'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['country']);
       $sStyleReadLab_country = '';
       $sStyleReadInp_country = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['country']) && $this->nmgp_cmp_hidden['country'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="country" value="<?php echo NM_encode_input($country) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_country" style="<?php echo $sStyleHidden_country; ?>;"><span id="id_label_country"><?php echo $this->nm_new_label['country']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_country" style="<?php echo $sStyleHidden_country; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["country"]) &&  $this->nmgp_cmp_readonly["country"] == "on") { 

 ?>
<input type=hidden name="country" value="<?php echo NM_encode_input($country) . "\">" . $country . ""; ?>
<?php } else { ?>
<span id="id_read_on_country" class="sc-ui-readonly-country" style=";<?php echo $sStyleReadLab_country; ?>"><?php echo NM_encode_input($this->country); ?></span><span id="id_read_off_country" style="white-space: nowrap;<?php echo $sStyleReadInp_country; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_country" type=text name="country" value="<?php echo NM_encode_input($country) ?>"
 size=15 maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_country_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_country_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['mtd']))
           {
               $this->nmgp_cmp_readonly['mtd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['qtd']))
           {
               $this->nmgp_cmp_readonly['qtd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['ytd']))
           {
               $this->nmgp_cmp_readonly['ytd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['jan']))
           {
               $this->nmgp_cmp_readonly['jan'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['feb']))
           {
               $this->nmgp_cmp_readonly['feb'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['mar']))
           {
               $this->nmgp_cmp_readonly['mar'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['apr']))
           {
               $this->nmgp_cmp_readonly['apr'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['may']))
           {
               $this->nmgp_cmp_readonly['may'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['jun']))
           {
               $this->nmgp_cmp_readonly['jun'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['jul']))
           {
               $this->nmgp_cmp_readonly['jul'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['aug']))
           {
               $this->nmgp_cmp_readonly['aug'] = 'on';
           }
?>


<?php } ?>
   </td></tr></table>
   </tr>
</TABLE></div><!-- bloco_f -->
   </div>
