<?php

  
    $sql_codigo_exist="SELECT ctg_geo_id, ctg_geo_desc FROM ctg_geografia WHERE ctg_geo_parent = \'0\' AND ctg_geo_id = \'codigo_actual\'";
    $sql_codigo_look ="SELECT ctg_geo_id, ctg_geo_desc FROM ctg_geografia WHERE ctg_geo_parent = \'0\'&codigo=ctg_geo_id&desc=ctg_geo_desc&orden=ctg_geo_desc";

    //echo "[".$_POST['codigo']."]";

    $sql="SELECT * FROM adm_config";
    //echo $sql;
    $result = $connection->Execute ( $sql );
    if ($connection->Affected_Rows() == 1)
        $info = $arr_label['datos_grabados'];
    $error = $connection->ErrorMsg();
    if (!$result->EOF) {
            $operador = $result->fields;

            if ($_POST['op'] != 'codigo')
                    $_POST['codigo'] = trim($operador['adm_cnf_pais']);

          $_POST['adm_cnf_siglas'] = trim($operador['adm_cnf_siglas']);
          $_POST['adm_cnf_licence'] = trim($operador['adm_cnf_licence']);
          $_POST['adm_cnf_licence2'] = trim($operador['adm_cnf_licence2']);
          $_POST['adm_cnf_ver'] = trim($operador['adm_cnf_ver']);
          $_POST['adm_cnf_lang'] = trim($operador['adm_cnf_lang']);
          $_POST['adm_cnf_tit_cor'] = trim($operador['adm_cnf_tit_cor']);
          $_POST['adm_cnf_firma'] = $operador['adm_cnf_firma'];
          $_POST['adm_cnf_firma2'] = $operador['adm_cnf_firma2'];
          $_POST['adm_cnf_desig1'] = $operador['adm_cnf_desig1'];
          $_POST['adm_cnf_desig2'] = $operador['adm_cnf_desig2'];
          $_POST['adm_cnf_cdvcor'] = $operador['adm_cnf_cdvcor'];

          $_POST['adm_cnf_formnr']=$operador['adm_cnf_formnr'];
          $_POST['adm_cnf_versnr']=$operador['adm_cnf_versnr'];
          $_POST['adm_cnf_sopnr']=$operador['adm_cnf_sopnr'];
          $_POST['adm_cnf_formnr2']=$operador['adm_cnf_formnr2'];
          $_POST['adm_cnf_versnr2']=$operador['adm_cnf_versnr2'];
          $_POST['adm_cnf_sopnr2']=$operador['adm_cnf_sopnr2'];
          $_POST['adm_cnf_superoff']=$operador['adm_cnf_superoff'];
          $_POST['adm_cnf_email_asoc1']=$operador['adm_cnf_email_asoc1'];
          $_POST['adm_cnf_email_asoc2']=$operador['adm_cnf_email_asoc2'];
          $_POST['adm_cnf_email_asoc3']=$operador['adm_cnf_email_asoc3'];
          $_POST['adm_cnf_email_asoc4']=$operador['adm_cnf_email_asoc4'];
          $_POST['adm_cnf_email_asoc5']=$operador['adm_cnf_email_asoc5'];
          $_POST['adm_cnf_email_asoc6']=$operador['adm_cnf_email_asoc6'];
          $_POST['adm_cnf_email_asoc7']=$operador['adm_cnf_email_asoc7'];
          $_POST['adm_cnf_email_asoc8']=$operador['adm_cnf_email_asoc8'];
          $_POST['adm_cnf_email_asoc9']=$operador['adm_cnf_email_asoc9'];

            /*
            $_POST['adm_cnf_prop_cor'] = trim($operador['adm_cnf_prop_cor']);
            $_POST['adm_cnf_fabr_cor'] = trim($operador['adm_cnf_fabr_cor']);
            $_POST['adm_cnf_enva_cor'] = trim($operador['adm_cnf_enva_cor']);
            $_POST['adm_cnf_impo_cor'] = trim($operador['adm_cnf_impo_cor']);
            $_POST['adm_cnf_dist_cor'] = trim($operador['adm_cnf_dist_cor']);
            $_POST['adm_cnf_repr_cor'] = trim($operador['adm_cnf_repr_cor']);
            $_POST['adm_cnf_acon_cor'] = trim($operador['adm_cnf_acon_cor']);
            $_POST['adm_cnf_alma_cor'] = trim($operador['adm_cnf_alma_cor']);
            $_POST['adm_cnf_labo_cor'] = trim($operador['adm_cnf_labo_cor']);
            $_POST['adm_cnf_pesc_cor'] = trim($operador['adm_cnf_pesc_cor']);
            $_POST['adm_cnf_penc_cor'] = trim($operador['adm_cnf_penc_cor']);
            */
            
            
            $_POST['adm_cnf_user'] = trim($operador['adm_cnf_user']);
            $_POST['adm_cnf_passw'] = trim($operador['adm_cnf_passw']);

            $_POST['email1'] = $operador[$catalogo_prefijo.'email1'];
            $_POST['email2'] = $operador[$catalogo_prefijo.'email2'];
            $_POST['email3'] = $operador[$catalogo_prefijo.'email3'];
            $_POST['ipint'] = $operador[$catalogo_prefijo.'ipint'];
            $_POST['ipext'] = $operador[$catalogo_prefijo.'ipext'];
            $_POST['acceso'] = $operador[$catalogo_prefijo.'acceso'];
            $_POST['masktels'] = $operador[$catalogo_prefijo.'masktels'];
            $_POST['maskdates'] = $operador[$catalogo_prefijo.'maskdates'];
            $_POST['maskvalues'] = $operador[$catalogo_prefijo.'maskvalues'];
            
            $_POST['sistema_logo'] = $operador['sistema_logo'];
            $_POST['sistema_siglas'] = $operador['sistema_siglas'];
            $_POST['sistema_name'] = $operador['sistema_name'];
            $_POST['sistema_version'] = $operador['sistema_version'];
            $_POST['adm_cfg_color'] = $operador['adm_cnf_color'];
            $_POST['adm_cnf_timref'] = $operador['adm_cnf_timref'];
            $_POST['adm_cnf_filesizeupl'] = $operador['adm_cnf_filesizeupl'];


            $_POST['adm_cnf_numfal'] = $operador['adm_cnf_numfal'];
            $_POST['adm_cnf_numfaldias'] = $operador['adm_cnf_numfaldias'];
            $_POST['adm_cnf_numbol'] = $operador['adm_cnf_numbol'];
            $_POST['adm_cnf_numboldias'] = $operador['adm_cnf_numboldias'];
            $_POST['adm_cnf_cod_acc_tm'] = $operador['adm_cnf_cod_acc_tm'];
            $_POST['adm_cnf_numrecfis'] = $operador['adm_cnf_numrecfis'];

            if($operador[$catalogo_prefijo.'actividades'] == '1') $_POST['cnf_actividades'] = " checked ";
            if($operador[$catalogo_prefijo.'mensajes'] == '1') $_POST['cnf_mensajes'] = " checked ";
            //if($operador[$catalogo_prefijo.'newing'] == '1') $_POST['cnf_newing'] = " checked ";
            if($operador[$catalogo_prefijo.'notas'] == '1') $_POST['cnf_notas'] = " checked ";
            if($operador[$catalogo_prefijo.'frame'] == '1') $_POST['cnf_frame'] = " checked ";

            if($operador['adm_cnf_backup'] == '1') $_POST['adm_cnf_backup'] = " checked ";
            if($operador['adm_cnf_revfalbol'] == '1') $_POST['adm_cnf_revfalbol'] = " checked ";

            $_POST['uts_costo'] = trim($operador['adm_cnf_uts_costo']);

            $_POST['modeofform']   = "u";
            
           	$_POST['button_graba'] = " class=button ";
        		$_POST['button_limpia'] = " class=button ";                       
    }


		if ($_POST['codigo']!=""){
		    $sql="SELECT ctg_geo_desc FROM ctg_geografia WHERE ctg_geo_id='".$_POST['codigo']."';";
		    //echo $sql;
		    $result=$connection->Execute($sql);
		    if (!$result->EOF) {
		        $operador = $result->fields;
		        $_POST['descripcion'] = clean_string($operador['ctg_geo_desc']);
		    }
		}
?>
<script type="text/javascript" src="includes/common.js"></script>
<script type="text/javascript">
function limpiar_datos(flag){   /*SAQUI SALI DE FORMA Y ENTRA A LISTADO*/




	if (flag == '5') {//viene de botones
	
	    <?=$pagina?>
	/*
		document.getElementById('codigo').value = "*";//para que salga al listado
		document.getElementById('form_standar').target= '';
		document.getElementById('form_standar').action= 'index.php';
		document.forms.form_standar.submit();
		*/
	} else {//solo desabilita graba aqui viene de graba op
	}
	return false;
}
function checkform_standar( form ) {
      var errorCount = 0;
      var campo = document.getElementById('enfoco');
      var etiqueta = '';

      if( form.codigo.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['pais_instalacion']?>';campo.value = 'codigo';}}

      if( form.adm_cnf_licence.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['licencia_a']?>';campo.value = 'adm_cnf_licence';}}
      if( form.adm_cnf_licence2.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['licencia_a']?>';campo.value = 'adm_cnf_licence2';}}

      if( form.adm_cnf_siglas.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['siglas']?>';campo.value = 'adm_cnf_siglas';}}
      if( form.adm_cnf_ver.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['version']?>';campo.value = 'adm_cnf_ver';}}

/*
      if( form.adm_cnf_lang.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['idioma']?>';campo.value = 'adm_cnf_lang';}}
*/
      if( form.adm_cnf_user.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['nom_usr_mst']?>';campo.value = 'adm_cnf_user';}}
      if( form.adm_cnf_passw.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['pas_usr_mst']?>';campo.value = 'adm_cnf_passw';}}
/*
      if(notValidEmail(form.email1)){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['email_primario']?>';campo.value='email1';}}
      if(notValidEmail(form.email2)){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['email_secundario']?>';campo.value='email2';}}
*/
      if(form.email1.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['email_primario']?>';campo.value='email1';}}
      if(form.email2.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['email_secundario']?>';campo.value='email2';}}
      if(form.adm_cfg_color.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['color']?>';campo.value='adm_cfg_color';}}
      if(form.adm_cnf_timref.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['timref']?>';campo.value='adm_cnf_timref';}}



      if(form.adm_cnf_cdvcor.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['adm_cnf_cdvcor']?>';campo.value='adm_cnf_cdvcor';}}
      
        if(notValidEmail(form.email3)){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['email_notify']?>';campo.value='email3';}}



      if(form.ipint.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['ip_interno']?>';campo.value='ipint';}}
      if(form.ipext.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['ip_externo']?>';campo.value='ipext';}}
      if(form.acceso.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['acceso']?>';campo.value='acceso';}}


      if(form.masktels.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['mask_tels']?>';campo.value='masktels';}}
      if(form.maskdates.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['mask_dates']?>';campo.value='maskdates';}}
      if(form.maskvalues.value == ''){errorCount++;if(errorCount==1){etiqueta='<?=$arr_label['mask_values']?>';campo.value='maskvalues';}}


      if( form.adm_cnf_tit_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['emp_ext']?>';campo.value = 'adm_cnf_tit_cor';}}
      /*
      if( form.adm_cnf_prop_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['distribuidores']?>';campo.value = 'adm_cnf_prop_cor';}}
      if( form.adm_cnf_fabr_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['propietarios']?>';campo.value = 'adm_cnf_fabr_cor';}}
      if( form.adm_cnf_enva_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['representantes']?>';campo.value = 'adm_cnf_enva_cor';}}
      if( form.adm_cnf_impo_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['fabricantes']?>';campo.value = 'adm_cnf_impo_cor';}}
      if( form.adm_cnf_dist_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['acondicionadores']?>';campo.value = 'adm_cnf_dist_cor';}}
      if( form.adm_cnf_repr_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['envasadores']?>';campo.value = 'adm_cnf_repr_cor';}}
      if( form.adm_cnf_acon_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['almacenes']?>';campo.value = 'adm_cnf_acon_cor';}}
      if( form.adm_cnf_alma_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['importadores']?>';campo.value = 'adm_cnf_alma_cor';}}
      if( form.adm_cnf_labo_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['laboratorios']?>';campo.value = 'adm_cnf_labo_cor';}}
      if( form.adm_cnf_pesc_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['patro_estudios']?>';campo.value = 'adm_cnf_pesc_cor';}}
      if( form.adm_cnf_penc_cor.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['patro_ensayos']?>';campo.value = 'adm_cnf_penc_cor';}}
*/


      if( form.uts_costo.value == ''){errorCount++;if (errorCount == 1) {etiqueta = '<?=$arr_label['costo_ut']?>';campo.value = 'uts_costo';}}

      if (errorCount) {
          call_dialog_msg(etiqueta);
          return false;
      }

	  grabar_load();
      return false
}
</script>

<script type="text/javascript" src="includes/jquery/ui/ui.tabs.js"></script>
<script type="text/javascript">
$(function() {    
    $( "#tabs" ).tabs({ selected: 0, 
                        collapsible: false });
});
</script>

<form name='form_standar' id='form_standar' action="index.php" method="post" enctype="multipart/form-data">
<?php include_once("includes/form_ctg_botones.php");?>
<?php include_once("includes/modal.php");?>
<table border=0 align=center width=80% cellpadding=3 cellspacing=1 style="margin-top:20px" class="marco_table ui-corner-all">
<?php include_once("includes/form_titulo.php");?>
<tr>
    <td>
    <div id="tabs">
    
        <table border=0 align=center width=100% cellpadding=3 cellspacing=1>
        <tr><td class=form_standar_cap><?=$arr_label['pais_instalacion']?></td>
            <td>
                <table width=100%>
                <tr>
                    <td><input size=10 maxlength="<?=$arr_campo['size']?>" class="text-input" id="codigo" name="codigo"  onKeyPress="return acceptAlfaNumeric(event);"  onFocus="limpiar_datos()"  onBlur="toupper(this);check_exist(this.value,this.id,'adm_cnf_licence','<?=$sql_codigo_exist?>','<?=$arr_label['pais_instalacion']?>');"  value="<?=$_POST['codigo']?>"></td>
                    <td>
                        <ul id="icons" class="ui-widget ui-helper-clearfix">
                        <li class="ui-state-default ui-corner-all" title="<?=$arr_label['busqueda_ttt'].' '.$arr_label['pais_instalacion']?>"><span class="ui-icon ui-icon-search" style='' onClick="limpiar_datos();check_look('','codigo','<?=$sql_codigo_look?>','adm_cnf_licence','<?=$arr_label['pais_instalacion']?>');"></span></li>
                        </ul>
                    </td>
                    <td width=100%><span class="fake_field" id="descripcion" name="descripcion"><?=$_POST['descripcion']?></span></td>
                </tr></table>
        </tr>
        <tr><td class=form_standar_cap><?=$arr_label['licencia_a']?></td>
            <td><input style='width:100%' maxlength=50 class="text-input" id="adm_cnf_licence" name="adm_cnf_licence" onKeyPress="return acceptStandar(event);"   value="<?=$_POST['adm_cnf_licence']?>"></td>
        </tr>
        <tr><td class=form_standar_cap><?=$arr_label['licencia_a']?></td>
            <td><input style='width:100%' maxlength=50 class="text-input" id="adm_cnf_licence2" name="adm_cnf_licence2" onKeyPress="return acceptStandar(event);"   value="<?=$_POST['adm_cnf_licence2']?>"></td>
        </tr>
        </table>   

        <ul>
        <li><a href="#tabs-1"><?php echo strtoupper($arr_label['info_general'])?></a></li>
        <li><a href="#tabs-2"><?=$arr_label['formatos']?></a></li>
        <!--<li><a href="#tabs-3"><?php echo strtoupper($arr_label['correlativos_iniciales'])?></a></li>-->
        <li><a href="#tabs-3"><?=$arr_label['sistema']?></a></li>
        <li><a href="#tabs-4"><?=$arr_label['fal_bol']?></a></li>
        <li><a href="#tabs-5"><?=$arr_label['firma_inhrr']?></a></li>
        <li><a href="#tabs-6"><?=$arr_label['emails_title']?></a></li>
        </ul>    

        <div id="tabs-1">
        <table border=0 align=center width=100% cellpadding=3 cellspacing=1>
        <tr>
            <td class=form_standar_cap><?=$arr_label['siglas']?></td>
            <td colspan=2><input style='width:100%' maxlength=25 class="text-input" id="adm_cnf_siglas" name="adm_cnf_siglas" onBlur="toupper(this);" onKeyPress="return acceptAlfa(event);"  value="<?=$_POST['adm_cnf_siglas']?>"></td>
            <td class=form_standar_cap><?=$arr_label['version']?></td>
            <td colspan=2><input style='width:100%' maxlength=100 class="text-input" id="adm_cnf_ver" name="adm_cnf_ver" onKeyPress="return acceptStandar(event);"   value="<?=$_POST['adm_cnf_ver']?>"></td>
        <tr>
            <td class=form_standar_cap><?=$arr_label['nom_usr_mst']?></td>
            <td colspan=2><input style='width:100%' maxlength=30 class="text-input" id="adm_cnf_user" name="adm_cnf_user"   value="<?=$_POST['adm_cnf_user']?>"></td>
            <td class=form_standar_cap><?=$arr_label['ip_interno']?></td>
            <td colspan=2><input style='width:100%' maxlength=15 class="text-input" id="ipint" name="ipint" onKeyPress="return acceptAlfaNumeric(event);" value="<?=$_POST['ipint']?>"></td>
        <tr>
            <td class=form_standar_cap><?=$arr_label['pas_usr_mst']?></td>
            <td colspan=2><input style='width:100%' maxlength=15 class="text-input" id="adm_cnf_passw" name="adm_cnf_passw"  value="<?=$_POST['adm_cnf_passw']?>"></td>
            <td class=form_standar_cap><?=$arr_label['ip_externo']?></td>
            <td colspan=2><input style='width:100%' maxlength=15 class="text-input" id="ipext" name="ipext" onKeyPress="return acceptAlfaNumeric(event);" value="<?=$_POST['ipext']?>"></td>
        </tr>

        <tr>
            <td class=form_standar_cap><?=$arr_label['email_primario']?></td>
            <td colspan=2><textarea id="email1" name="email1" rows=3 style='width:100%' title="<?=$arr_label['ejemplo']?>" maxlength="250" onkeyup="return ismaxlength(this)"><?=$_POST['email1']?></textarea>
            <td class=form_standar_cap><?=$arr_label['email_secundario']?></td>
            <td colspan=2><textarea id="email2" name="email2" rows=3 style='width:100%' title="<?=$arr_label['ejemplo']?>" maxlength="250" onkeyup="return ismaxlength(this)"><?=$_POST['email2']?></textarea>
        </tr>
        
        <tr>
            <td class=form_standar_cap><?=$arr_label['color']?></td>
            <td colspan=2><input style='width:100%' maxlength=25 class="text-input" id="adm_cfg_color" name="adm_cfg_color" onKeyPress="return acceptAlfaNumeric(event);" value="<?=$_POST['adm_cfg_color']?>"></td>

            <td class=form_standar_cap width="200px"><?=$arr_label['costo_ut']?></td>
		    <td colspan=2><input size="4" maxlength="4" class="text-input" onKeyPress="return acceptNumeric(event);" id="uts_costo" name="uts_costo" value="<?=$_POST['uts_costo']?>"></td>
        </tr>

        
        
        <tr>

            <td class="form_standar_cap"><?=$arr_label['emp_ext']?></td>
            <td colspan=2><input size=8 maxlength=8 class="text-input" id="adm_cnf_tit_cor" name="adm_cnf_tit_cor" value="<?=$_POST['adm_cnf_tit_cor']?>" onKeyPress="return acceptNumeric(event);"></td>

            <td class="form_standar_cap"><?=$arr_label['adm_cnf_filesizeupl']?></td>
            <td>

                <input size="1" maxlength=2 class="text-input" id="adm_cnf_filesizeupl" name="adm_cnf_filesizeupl" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_filesizeupl']?>">
            </td>

        </tr>



        <tr>
            

            <td class="form_standar_cap"><?=$arr_label['adm_cnf_cdvcor']?></td>
            <td colspan=2><input size=8 maxlength=8 class="text-input" id="adm_cnf_cdvcor" name="adm_cnf_cdvcor" value="<?=$_POST['adm_cnf_cdvcor']?>" onKeyPress="return acceptNumeric(event);"></td>            


            <td colspan=2 class=form_standar_cap style="text-align:left"><?=$arr_label['timref']?>&nbsp;&nbsp;

                <input size="3" maxlength=2 class="text-input" id="adm_cnf_timref" name="adm_cnf_timref" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_timref']?>">
            </td>
            
        </tr>

        
        <tr>
            <td class=form_standar_cap><?=$arr_label['email_notify']?></td>
		        <td colspan=4><input size="55" maxlength="100" class="text-input" id="email3" name="email3" value="<?=$_POST['email3']?>"></td>
        </tr>


        </table>   
        </div>


        <div id="tabs-2">
        <table border=0 align=center width=100% cellpadding=3 cellspacing=1>
        <tr>
            <td class=form_standar_cap><?=$arr_label['mask_tels']?></td>
            <td><input style='width:100%' maxlength=25 class="text-input" id="masktels" name="masktels" value="<?=$_POST['masktels']?>" onBlur="toupper(this);" onKeyPress="return acceptTels(event);"  ></td>

            <td class=form_standar_cap><?=$arr_label['mask_dates']?></td>
            <td>
            <select id=maskdates name=maskdates>
            <option value='1'>dd-mm-yyyy</option>
            <option value='2'>mm-dd-yyyy</option>
            </select></td>
            <td class=form_standar_cap><?=$arr_label['mask_values']?></td>
            <td>
                <select id=maskvalues name=maskvalues>
                <option value='1'>###,###.00</option>
                <option value='2'>###.###,00</option>
                </select></td>
        </table>   
        </div>
        
        <!--
        <div id="tabs-3">
        <table width=100% cellpadding=2 cellspacing=0 align=center class="marco_table ui-corner-all">
        <!--<tr><td colspan=6 align=center class=marco_titulo><?=$arr_label['correlativos_iniciales']?></td></tr>-->
        <!--
        <tr><td class=checkbox_cap><?=$arr_label['titulares']?>       </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_tit_cor" name="adm_cnf_tit_cor" value="<?=$_POST['adm_cnf_tit_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['distribuidores']?>  </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_dist_cor" name="adm_cnf_dist_cor" value="<?=$_POST['adm_cnf_dist_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['propietarios']?>    </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_prop_cor" name="adm_cnf_prop_cor" value="<?=$_POST['adm_cnf_prop_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
        <tr><td class=checkbox_cap><?=$arr_label['representantes']?>  </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_repr_cor" name="adm_cnf_repr_cor" value="<?=$_POST['adm_cnf_repr_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['fabricantes']?>     </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_fabr_cor" name="adm_cnf_fabr_cor" value="<?=$_POST['adm_cnf_fabr_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['acondicionadores']?></td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_acon_cor" name="adm_cnf_acon_cor" value="<?=$_POST['adm_cnf_acon_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
        <tr><td class=checkbox_cap><?=$arr_label['envasadores']?>     </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_enva_cor" name="adm_cnf_enva_cor" value="<?=$_POST['adm_cnf_enva_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['almacenes']?>       </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_alma_cor" name="adm_cnf_alma_cor" value="<?=$_POST['adm_cnf_alma_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['importadores']?>    </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_impo_cor" name="adm_cnf_impo_cor" value="<?=$_POST['adm_cnf_impo_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
        <tr><td class=checkbox_cap><?=$arr_label['laboratorios']?>    </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_labo_cor" name="adm_cnf_labo_cor" value="<?=$_POST['adm_cnf_labo_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['patro_estudios']?>  </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_pesc_cor" name="adm_cnf_pesc_cor" value="<?=$_POST['adm_cnf_pesc_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
            <td class=checkbox_cap><?=$arr_label['patro_ensayos']?>   </td><td><input size=8 maxlength=8 class="text-input" id="adm_cnf_penc_cor" name="adm_cnf_penc_cor" value="<?=$_POST['adm_cnf_penc_cor']?>" onKeyPress="return acceptNumeric(event);"></td>
        </table>
        </div>
        -->
        
        <div id="tabs-3">
        <table border=0 align=center width=100% cellpadding=3 cellspacing=1>
        <tr>
            <td class=form_standar_cap><?=$arr_label['acceso']?></td>
            <td>
                <select id=acceso name=acceso>
                <option value='1'><?=$arr_label['si']?></option>
                <option value='2'><?=$arr_label['no']?></option>
                </select>
            </td>
            <td class=form_standar_cap><?=$arr_label['idioma']?></td>
            <td>
                <select id=adm_cnf_lang name=adm_cnf_lang>
                <option value='1'><?=$arr_label['espanol']?></option>
                <option value='2'><?=$arr_label['ingles']?></option>
                <option value='3'><?=$arr_label['frances']?></option>
                <option value='4'><?=$arr_label['portugues']?></option>
                </select></td>
                
        <tr>
            <td class=form_standar_cap><?=$arr_label['siglas_sistema']?></td>
            <td><input size=25 maxlength=25 class="text-input" id="sistema_siglas" name="sistema_siglas" onKeyPress="return acceptAlfa(event);" value="<?=$_POST['sistema_siglas']?>"></td>
        <tr>
            <td class=form_standar_cap><?=$arr_label['nombre_sistema']?></td>
            <td colspan=3><input size=50 maxlength=50 class="text-input" id="sistema_name" name="sistema_name" onKeyPress="return acceptStandar(event);" value="<?=$_POST['sistema_name']?>"></td>
        <tr>
            <td class=form_standar_cap><?=$arr_label['logo_sistema']?></td>
            <td colspan=3><input size=50 maxlength=50 class="text-input" id="sistema_logo" name="sistema_logo" onKeyPress="return acceptStandadr(event);" value="<?=$_POST['sistema_logo']?>"></td>
		<tr>
			<td colspan="4">
			<table width="100%" cellpadding="0" cellspacing="0" align="center">
		    <tr>
	              <td class="form_standar_cap"><?=$arr_label['visible_frame']?></td>
	              <td><input type="checkbox" id="cnf_frame" name="cnf_frame" value="1" <?=$_POST['cnf_frame']?> ></td>
	              <td class=form_standar_cap><?=$arr_label['visible_notas']?></td>
	              <td width="35%"><input type="checkbox" id="cnf_notas" name="cnf_notas" value="1" <?=$_POST['cnf_notas']?> ></td>
            <tr>
	              <td class=form_standar_cap><?=$arr_label['visible_mensajes']?></td>
	              <td><input type="checkbox" id="cnf_mensajes" name="cnf_mensajes" value="1" <?=$_POST['cnf_mensajes']?> ></td>
	              <td class=form_standar_cap><?=$arr_label['visible_actividades']?></td>
	              <td><input type="checkbox" id="cnf_actividades" name="cnf_actividades" value="1" <?=$_POST['cnf_actividades']?> ></td>
		    </tr>
            <tr>
	              <td class=form_standar_cap><?=$arr_label['adm_cnf_backup']?></td>
	              <td><input type="checkbox" id="adm_cnf_backup" name="adm_cnf_backup" value="1" <?=$_POST['adm_cnf_backup']?> ></td>
	              <td class=form_standar_cap><?=$arr_label['adm_cnf_revfalbol']?></td>
	              <td><input type="checkbox" id="adm_cnf_revfalbol" name="adm_cnf_revfalbol" value="1" <?=$_POST['adm_cnf_revfalbol']?> ></td>
		    </tr>		    
<?php 
/*
            </tr>
		          <td class=form_standar_cap><?=$arr_label['nuevos_ingredientes']?></td>
		          <td><input type="checkbox" id="cnf_newing" name="cnf_newing" value="1" <?=$_POST['cnf_newing']?> ></td>
						</tr>
*/?>
            <tr>
                <td class=form_standar_cap width="25%"><?=$arr_label['code_duration']?></td>
                <td width="5%"><input size="3" maxlength=2 class="text-input" id="adm_cnf_cod_acc_tm" name="adm_cnf_cod_acc_tm" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_cod_acc_tm']?>"></td>                        
            </tr>
            
			</table></td>
		</tr>
        <tr>
            <td class=form_standar_cap style="text-align:left"><?=$arr_label['version_sistema']?></td>
        <tr>
            <td colspan=4><input size=100 maxlength=100 class="text-input" id="sistema_version" name="sistema_version" onKeyPress="return acceptStandar(event);" value="<?=$_POST['sistema_version']?>"></td>
        </table>   
        </div>  
        

        
              
        <div id="tabs-6">
            <table border=1 align=center width=100% cellpadding=3 cellspacing=1>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label1']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label11']?></td>
                    <td><textarea id="email_asoc1" name="email_asoc1" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc1']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label2']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label21']?></td>
                    <td><textarea id="email_asoc2" name="email_asoc2" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc2']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label3']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label31']?></td>
                    <td><textarea id="email_asoc3" name="email_asoc3" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc3']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label4']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label41']?></td>
                    <td><textarea id="email_asoc4" name="email_asoc4" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc4']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label5']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label51']?></td>
                    <td><textarea id="email_asoc5" name="email_asoc5" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc5']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label6']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label61']?></td>
                    <td><textarea id="email_asoc6" name="email_asoc6" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc6']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label7']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label71']?></td>
                    <td><textarea id="email_asoc7" name="email_asoc7" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc7']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label8']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label81']?></td>
                    <td><textarea id="email_asoc8" name="email_asoc8" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc8']?></textarea></td>                    
                </tr>
                <tr>
                    <td class=form_standar_cap width=25%><?=$arr_label['emails_label9']?></td>
                    <td class=form_standar_cap width=15%><?=$arr_label['emails_label91']?></td>
                    <td><textarea id="email_asoc9" name="email_asoc9" rows=1 style='width:100%' ><?=$_POST['adm_cnf_email_asoc9']?></textarea></td>                    
                </tr>
                        
            </table>   
        </div>  

        <div id="tabs-4">
        <table border=0 align=center width=100% cellpadding=3 cellspacing=1>
        <tr>
            <td class=form_standar_cap width="25%"><?=$arr_label['numfal']?></td>
            <td width="5%"><input size="3" maxlength=2 class="text-input" id="adm_cnf_numfal" name="adm_cnf_numfal" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_numfal']?>"></td>            
            
            <td class=form_standar_cap width="25%"><?=$arr_label['numbol']?></td>
            <td width="5%"><input size="3" maxlength=2 class="text-input" id="adm_cnf_numbol" name="adm_cnf_numbol" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_numbol']?>"></td>                        
                        
        </tr>
        
        <tr>
            <td class=form_standar_cap><?=$arr_label['numfaldias']?></td>
            <td><input size="3" maxlength=3 class="text-input" id="adm_cnf_numfaldias" name="adm_cnf_numfaldias" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_numfaldias']?>"></td>            

            <td class=form_standar_cap><?=$arr_label['numboldias']?></td>
            <td><input size="3" maxlength=3 class="text-input" id="adm_cnf_numboldias" name="adm_cnf_numboldias" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_numboldias']?>"></td>            

        </tr>
        <tr>
            <td><td>
            <td class=form_standar_cap width="25%">Numero de dias para recibir expediente fisico<?=$arr_label['numrecfis']?></td>
            <td width="5%"><input size="3" maxlength=2 class="text-input" id="adm_cnf_numrecfis" name="adm_cnf_numrecfis" onKeyPress="return acceptNumeric(event);" value="<?=$_POST['adm_cnf_numrecfis']?>"></td>            
                        
        </tr>        

        </table>   
        </div>  

        <div id="tabs-5">
        <table border=0 align=center width=100% cellpadding=3 cellspacing=1>
        <tr>        
              <td class=form_standar_cap><?=$arr_label['firma_name']?></td>
              <td><textarea id="adm_cnf_firma" name="adm_cnf_firma" rows=3 style='width:100%' title="<?=$arr_label['firma_name']?>"><?=$_POST['adm_cnf_firma']?></textarea></td>
        <tr>
              <td class=form_standar_cap><?=$arr_label['firma_name']?> 2</td>
              <td colspan=3><input size=50 maxlength=50 class="text-input" id="adm_cnf_firma2" name="adm_cnf_firma2" onKeyPress="return acceptStandar(event);" value="<?=$_POST['adm_cnf_firma2']?>"></td>

        <tr>
              <td class=form_standar_cap><?=$arr_label['firma_desig']?> 1</td>
              <td colspan=3><input size=50 maxlength=50 class="text-input" id="adm_cnf_desig1" name="adm_cnf_desig1" onKeyPress="return acceptStandar(event);" value="<?=$_POST['adm_cnf_desig1']?>"></td>
        
        <tr>
              <td class=form_standar_cap><?=$arr_label['firma_desig']?> 2</td>
              <td colspan=3><input size=50 maxlength=50 class="text-input" id="adm_cnf_desig2" name="adm_cnf_desig2" onKeyPress="return acceptStandar(event);" value="<?=$_POST['adm_cnf_desig2']?>"></td>
                    
        </div>  

              <tr><td class=form_standar_cap>QClab Anslyst Report <?php echo $arr_label['Form_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_formnr" id="adm_cnf_formnr" maxlength=15 size=15 value="<?php echo $_POST['adm_cnf_formnr']?>" type=text onKeyPress="return acceptAlfaNumeric(event);"></td>                
              </tr>
              <tr><td class=form_standar_cap>QClab Anslyst Report <?php echo $arr_label['Version_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_versnr" id="adm_cnf_versnr" maxlength=15 size=15 value="<?php echo $_POST['adm_cnf_versnr']?>" type=text onKeyPress="return acceptAlfaNumeric(event);"></td>                
              </tr>
              <tr><td class=form_standar_cap>QClab Anslyst Report <?php echo $arr_label['SOP_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_sopnr" id="adm_cnf_sopnr" maxlength=15 size=15 value="<?php echo $_POST['adm_cnf_sopnr']?>" type=text onKeyPress="return acceptAlfaNumeric(event);"></td>                
              </tr>

              <tr><td class=form_standar_cap>QClab Certificate of Anslyst <?php echo $arr_label['Form_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_formnr2" id="adm_cnf_formnr2" maxlength=15 size=15 value="<?php echo $_POST['adm_cnf_formnr2']?>" type=text onKeyPress="return acceptAlfaNumeric(event);"></td>                
              </tr>
              <tr><td class=form_standar_cap>QClab Certificate of Anslyst <?php echo $arr_label['Version_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_versnr2" id="adm_cnf_versnr2" maxlength=15 size=15 value="<?php echo $_POST['adm_cnf_versnr2']?>" type=text onKeyPress="return acceptAlfaNumeric(event);"></td>                
              </tr>
              <tr><td class=form_standar_cap>QClab Certificate of Anslyst <?php echo $arr_label['SOP_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_sopnr2" id="adm_cnf_sopnr2" maxlength=15 size=15 value="<?php echo $_POST['adm_cnf_sopnr2']?>" type=text onKeyPress="return acceptAlfaNumeric(event);"></td>                
              </tr>

              <tr><td class=form_standar_cap>QClab<?php echo $arr_label['SUP_Number']?></td>
                  <td><input class="text-input" name="adm_cnf_superoff" id="adm_cnf_superoff" maxlength=35 size=35 value="<?php echo $_POST['adm_cnf_superoff']?>" type=text onKeyPress="return acceptStandard(event);"></td>                
              </tr>
            
    </div>
   </td>
</tr>


</form>
</table>

<script type="text/javascript">
document.getElementById('acceso').value = '<?=$_POST['acceso']?>';
document.getElementById('adm_cnf_lang').value = '<?=$_POST['adm_cnf_lang']?>';
document.getElementById('maskdates').value = '<?=$_POST['maskdates']?>';
document.getElementById('maskvalues').value = '<?=$_POST['maskvalues']?>';
document.getElementById('adm_cnf_licence').focus();
</script>
