<?php require_once('Connections/conexionabm.php'); 

session_start();
date_default_timezone_set('America/St_Lucia');

if (!isset($_SESSION['sigla'])) {
	echo '<script language = javascript>
		self.location = "index"
	</script>';
}

if (!isset($_SESSION['nombreuser'])) {
	echo '<script language = javascript>
		self.location = "index"
	</script>';
}

if (!isset($_SESSION['niveluser'])) {
	echo '<script language = javascript>
		self.location = "index"
	</script>';
}

$sigla = $_SESSION['sigla'];

//if (!isset($_SESSION['sistema'])) {
	$_SESSION['sistema'] = 100;
//}

$_SESSION['nombre_empl'] = '';
$checke = 0;
$checkmora = 0;
$checkbalanc = 0;
$addCliente=0;
$proceso = 0;
$continuaCliente = 0;

if (isset($_GET['continuaCliente'])) {
	$continuaCliente = $_GET['continuaCliente'];
}

if (isset($_GET['addCliente'])) {		// CREANDO CLIENTE NUEVO
	$addCliente = $_GET['addCliente'];
	$proceso 	= 1;
}


$dias  = array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado");    
$meses = array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
//---------------------------------------
$_SESSION['valor_comision'] = 0;
$_SESSION['valor_fact2'] = 0;
$_SESSION['tel_proveedor'] = '';
$_SESSION['numcotiza'] = '';
$_SESSION['vlor_impuesto'] = 0;
$_SESSION['cheque_fact'] = '';

$_SESSION['valor2'] 			= 0;
$_SESSION['valor_imponible2'] 	= 0;
$_SESSION['excento2'] 			= 0;
$_SESSION['valor_itbis2'] 		= 0;
$_SESSION['saldo_fact2'] 		= 0;

$_SESSION['valor'] 				= 0;
$_SESSION['valor_imponible'] 	= 0;
$_SESSION['excento'] 			= 0;
$_SESSION['valor_itbis'] 		= 0;
$_SESSION['saldo_fact'] 		= 0;
$_SESSION['valor_fact']			= 0;

$_SESSION['fechaordenc'] = date('Y-m-d');
$_SESSION['factura_existente'] = 0;
$_SESSION['fact_proveedor'] = '';
$_SESSION['idproveedor'] = '';
$_SESSION['proveedor'] = '';
$_SESSION['partida'] = '';
$_SESSION['saldo_fact'] = 0;
$_SESSION['PVD_DIASCREDITO'] = 0;
$_SESSION['PVD_DIASALERTA'] = 0;
$_SESSION['comision'] = 0;
$_SESSION['tipocomision'] = 0;
$_SESSION['fechaordenc'] = 0;
$_SESSION['valor_imponible'] = 0;
$_SESSION['cheque_fact'] = 0;

 		
$_SESSION['departamento'] = '';
$_SESSION['codactivo'] = '';
$_SESSION['act_codigo'] = '';
$_SESSION['act_mto_depreciado'] = '';
$_SESSION['Codigo_Interno'] = 0;
$_SESSION['act_desc'] = '';
$_SESSION['act_prov'] = '';
$_SESSION['act_depto'] = '';
$_SESSION['act_resp'] = '';
$_SESSION['act_costo'] = '';
$_SESSION['act_num_oc'] = '';
$_SESSION['act_valor_libros'] = '';
$_SESSION['act_valor_resid'] = 1.00;
$_SESSION['act_vida_util'] = 48;
$_SESSION['act_tipo_dep'] = '';
$_SESSION['act_fec_compra'] = date('Y-m-d');
$_SESSION['act_fec_ult_dep'] = '';
$_SESSION['act_tipo_act'] = '';
$_SESSION['act_fecha_capit'] = date('Y-m-d');
$_SESSION['act_serie'] = '';
$_SESSION['act_desincorp'] = '';
$_SESSION['act_fecha_desinc'] = '';
$_SESSION['act_asegurado'] = '';
$_SESSION['act_valor_seguro'] = '';
$_SESSION['tac_modelo'] = '';
$_SESSION['act_tipo_act'] = '';
$_SESSION['act_fecha_ven_gtia'] = '';
$_SESSION['act_valor_seguro'] = '';
$_SESSION['act_fecha_venc_seg'] = '';
$_SESSION['deprecia_acum'] = '';
$_SESSION['valor_por_depreciar'] = '';	
$_SESSION['act_mto_depreciado'] = '';
$_SESSION['act_desc'] = '';

$cantidad = 0;
$sql = "SELECT * FROM personal WHERE sigla ='$sigla' ORDER BY apellido";
if ($result = $mysqli->query($sql)) {
	while ($row_Recordset1= $result->fetch_assoc()) {	
		$cantidad = $cantidad + 1;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon"  href="favicon1.png" />
<title><?php echo $_SESSION['cia'] ?></title>

<link rel="stylesheet" type="text/css" href="css_hover/style_common.css" />
<link rel="stylesheet" type="text/css" href="css_hover/style10.css" />
<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css' /> 

<!--efecto lightbox-->
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery_min.js"></script>
<script type="text/javascript" src="js/slimbox2.js"></script>
<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" />
<!--efecto lightbox-->

<script src="jquery-1.3.2.js" type="text/javascript"></script>
<script src="jquery.maskedinput-1.2.2.js" type="text/javascript"></script>
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>

<script>
jQuery(function($){
$("#dinero").mask("999,99");
$("#hora1").mask("99:99:99");
$("#hora2").mask("99:99:99");
$("#horarecepcion").mask("99:99:99");
$("#valorprest").mask("999,999,99999");
$("#cedula").mask("999-9999999-9");
$("#cedulasospechoso").mask("999-9999999-9");
$("#telefono").mask("999-999-9999");
$("#celcontacto1").mask("999-999-9999");
$("#celcontacto2").mask("999-999-9999");
$("#celular").mask("999-999-9999");
$("#flota").mask("999-999-9999");
$("#fecha").mask("99-99-9999");
$("#fecha2").mask("99-99-9999");
$("#telefonop").mask("999-999-9999");
$("#celularp").mask("999-999-9999");
$("#telefonom").mask("999-999-9999");
$("#celularm").mask("999-999-9999");
$("#telcontacto").mask("999-999-9999");
$("#telefonosup").mask("999-999-9999");
$("#telconyugue").mask("999-999-9999");
});
</script> 



<script>
function calcularEdad()
{
    var fecha=document.getElementById("fechanac").value;
    if(validate_fecha(fecha)==true)
    {
        // Si la fecha es correcta, calculamos la edad
        var values=fecha.split("-");
        var dia = values[2];
        var mes = values[1];
        var ano = values[0];

        // cogemos los valores actuales
        var fecha_hoy = new Date();
        var ahora_ano = fecha_hoy.getYear();
        var ahora_mes = fecha_hoy.getMonth();
        var ahora_dia = fecha_hoy.getDate();
        
        // realizamos el calculo
        var edad = (ahora_ano + 1900) - ano;
        if ( ahora_mes < (mes - 1))
        {
            edad--;
        }
        if (((mes - 1) == ahora_mes) && (ahora_dia < dia))
        {
            edad--;
        }
        if (edad > 1900)
        {
            edad -= 1900;
        }

        document.getElementById("edad").value = edad;
    }else{
        alert('Fecha incorrecta, favor introducir una fecha valida...');
	   document.getElementById("fechanac").focus;
    }
}
</script>

<style type="text/css">
.brillo:hover {
	background-color: #FCF;
}

.fullHeight {
	position:absolute;
	top:0;
	bottom:0;
}

.fullHeight2 { 
	height:100vh;
}

#Layer1 {
	position:absolute;
	width:257px;
	height:393px;
	z-index:1;
	background-color: #CDDFF5;
	left: 16px;
	top: 241px;
}
#Layer2 {
	position:absolute;
	width:258px;
	height:673px;
	z-index:1;
	top: 243px;
	background-color: #D8D8D8;
	left: 287px;
}

body {
	background-color: #FFFFFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	height:100%;
}
.us {
	font-size: 12px;
}
.style3 {
	font-size: 12px;
	color: #666666;
}
.style4 {
	color: #333333;
	text-align: center;
}
/*.menubar {
	font-size: 12px;
	width: auto;
}
.menubar {
	font-size: 12px;
	width: auto;
}*/
body table tr td table tr td {
	color: #033;
	font-size: 24px;
}
.menubrt {
	color: #FFFFFF;
	font-size: 12px;
}

.style41 {


	color: #FFFFFF;



	text-align: center;
}
.style4 {
	text-align: left;
	color: #FFFFFF;
}
/*
----------------------------------------------------------------
-------------------------------------------------------------------
----------------------------------------------------------------------
*/
.boton_menu2 {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7f7f7), color-stop(1, #d1cfd1));
	background:-moz-linear-gradient(top, #f7f7f7 5%, #d1cfd1 100%);
	background:-webkit-linear-gradient(top, #f7f7f7 5%, #d1cfd1 100%);
	background:-o-linear-gradient(top, #f7f7f7 5%, #d1cfd1 100%);
	background:-ms-linear-gradient(top, #f7f7f7 5%, #d1cfd1 100%);
	background:linear-gradient(to bottom, #f7f7f7 5%, #d1cfd1 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#d1cfd1',GradientType=0);
	background-color:#d9d9d9;
	-moz-border-radius:15px;
	-webkit-border-radius:15px;
	border-radius:5px;
	border:1px solid skyblue;
	display:inline-block;
	cursor:pointer;
	color:#000;
	font-family:Arial;
	font-size:14px;
	padding:5px 5px;
	text-decoration:none;
	text-shadow:0px 1px 0px #e1e2ed;	
	width:120px;
	height:75px;
}
.boton_menu2:hover {
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7faf0), color-stop(1, #b6c2ae));
	background: -moz-linear-gradient(top, #f7faf0 5%, #b6c2ae 100%);
	background: -webkit-linear-gradient(top, #f7faf0 5%, #b6c2ae 100%);
	background: -o-linear-gradient(top, #f7faf0 5%, #b6c2ae 100%);
	background: -ms-linear-gradient(top, #f7faf0 5%, #b6c2ae 100%);
	background: linear-gradient(to bottom, #f7faf0 5%, #b6c2ae 100%);

	background-image: url(img/img_depura1.png);
	background-size: 30px 28px;
	background-position: center top;
	background-repeat: no-repeat;	

	background-color: #dde6ca;
}
/*
----------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
*/

/*
button {
 border: none;
 background: #3a7999;
 color: #f2f2f2;
 padding: 10px;
 font-size: 18px;
 border-radius: 5px;
 position: relative;
 box-sizing: border-box;
 transition: all 500ms ease;
}

button:hover:before {
 width: 100%;
}

button {
 transform-style: preserve-3d;
}

button:after {
 top: -100%;
 left: 0px;
 width: 100%;
 position: absolute;
 background: #3a9999;
 border-radius: 5px;
 content: 'Flipped';
 transform-origin: left bottom;
 transform: rotateX(90deg);
}

button:hover {
 transform-origin: center bottom;
 transform: rotateX(-90deg) translateY(100%);
}

a.button {
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;
}
*/

.tit_mod {
	font-weight: bold;
	font-size: 16px;
	font-family: Tahoma, Geneva, sans-serif;
	color: #036;
}
a:link {
	text-decoration: none;
	color: #B70000;
}

.menu {
	color: #000;
}
.Letra_Menu {
	color: #000;
	font-size: 13px;
}
a:visited {
	text-decoration: none;
	color: #B70000;
}
a:hover {
	text-decoration: none;
	color: #B70000;
}
a:active {
	text-decoration: none;
	text-align: left;
	color: #B70000;
	font-size: 14px;
}
.zoom{
	/* Aumentamos la anchura y altura durante 2 segundos */
	transition: width 0.5s, height 0.5s, transform 0.5s;
	-moz-transition: width 0.5s, height 0.5s, -moz-transform 0.5s;
	-webkit-transition: width 0.5s, height 0.5s, -webkit-transform 0.5s;
	-o-transition: width 0.5s, height 0.5s,-o-transform 0.5s;
}
.zoom:hover{
	/* tranformamos el elemento al pasar el mouse por encima al doble de
	   su tamaño con scale(2). */
	transform : scale(1.1);
	-moz-transform : scale(1.1);      /* Firefox */
	-webkit-transform : scale(1.1);   /* Chrome - Safari */
	-o-transform : scale(1.1);        /* Opera */
}
.tit_mod1 {	font-weight: bold;
	font-size: 16px;
	font-family: Tahoma, Geneva, sans-serif;
	color: #F2EFEA;
}

.border_tabla {
	border-radius: 14px 14px 14px 14px;
	-moz-border-radius: 14px 14px 14px 14px;
	-webkit-border-radius: 14px 14px 14px 14px;
}

.border_tabla2 {
	border-radius: 10px 10px 10px 10px;
	-moz-border-radius: 10px 10px 10px 10px;
	-webkit-border-radius: 10px 10px 10px 10px;
}

.border_tabla3 {
	border: 1px solid #CCC;
}

.border_tabla4 {
	style="border-width: 1px;border: solid; border-color: #FF0000;"
}

.normal {
	font-size: 16px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
}

.normalCliente {
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
}

.normal14 {
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
}

.Gestion {
	font-size: 36px;
}
.Gestion {
	font-weight: bold;
}
.Gestion {
	color: #D90000;
	font-family: sans-serif;
	font-size: 26px;
}
.Gestion .Gestion .Gestion {
	color: #BB0000;
	font-size: 32px;
}
.

.Boton_Rojo11 {	-moz-box-shadow:inset 0px 1px 0px 0px #f5978e;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f5978e;
	box-shadow:inset 0px 1px 0px 0px #f5978e;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #cf2317), color-stop(1, #960d00));
	background:-moz-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-webkit-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-o-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-ms-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:linear-gradient(to bottom, #cf2317 5%, #960d00 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cf2317', endColorstr='#960d00',GradientType=0);
	background-color: #F00;
	-moz-border-radius:11px;
	-webkit-border-radius:11px;
	border-radius:50px;
	border:1px solid #d02718;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:17px;
	padding:10px 40px;
	text-decoration:none; 
	text-align:center;
	text-shadow:0px 1px 0px #810e05;
}

.Boton_Rojo11:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #a3230a), color-stop(1, #f5b6a6));
	background:-moz-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:-webkit-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:-o-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:-ms-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:linear-gradient(to bottom, #a3230a 5%, #f5b6a6 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#a3230a', endColorstr='#f5b6a6',GradientType=0);
	background-color:#a3230a;
}

.Boton_Rojo2 {	-moz-box-shadow:inset 0px 1px 0px 0px #f5978e;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f5978e;
	box-shadow:inset 0px 1px 0px 0px #f5978e;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #cf2317), color-stop(1, #960d00));
	background:-moz-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-webkit-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-o-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-ms-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:linear-gradient(to bottom, #cf2317 5%, #960d00 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cf2317', endColorstr='#960d00',GradientType=0);
	background-color: #F00;
	-moz-border-radius:11px;
	-webkit-border-radius:11px;
	border-radius:50px;
	border:1px solid #d02718;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:17px;
	padding:4px 20px;
	text-decoration:none; 
	text-align:center;
	text-shadow:0px 1px 0px #810e05;
}

.Boton_Rojo2:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #a3230a), color-stop(1, #f5b6a6));
	background:-moz-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:-webkit-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:-o-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:-ms-linear-gradient(top, #a3230a 5%, #f5b6a6 100%);
	background:linear-gradient(to bottom, #a3230a 5%, #f5b6a6 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#a3230a', endColorstr='#f5b6a6',GradientType=0);
	background-color:#a3230a;
}

.Boton_selecc {	
	background-color: #FFF;
	border-radius:10px;
	color: #C10000;
	font-family:Arial;
	font-size:20px;
	font-weight:bold;
	border:0px;
	padding:4px 10px;
	text-align:left;
	width:240px;
}

.Boton_selecc:hover {	
	background-color: #E80000;
	color:#FFF;
}

.boton_menu {	
	-moz-box-shadow:inset 0px 1px 0px 0px #f5978e;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f5978e;
	box-shadow:inset 0px 1px 0px 0px #f5978e;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #cf2317), color-stop(1, #960d00));
	background:-moz-linear-gradient(top, #960d00 5%, #F00 100%);
	background:-webkit-linear-gradient(top, #960d00 5%, #F00 100%);
	background:-o-linear-gradient(top, #960d00 5%, #F00 100%);
	background:-ms-linear-gradient(top, #960d00 5%, #F00 100%);
	background:linear-gradient(to bottom, #960d00 5%, #F00 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#F00', endColorstr='#960d00',GradientType=0);
	background-color: #F00;
	border-left:5px solid #A60000;;
	border-right:5px solid #A60000;;
	border-bottom:5px solid #A60000;;
	border-radius:0px 0px 15px 15px;
	display:inline-block;
	cursor:pointer;
	color:#fff;
	font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	font-size:18px;
	font-weight:bold;
	padding:5px 5px;
	text-decoration:none;
	width:250px;
	height:70px;
}

.boton_menu:hover {
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #a3230a), color-stop(1, #f5b6a6));
	background: -moz-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background: -webkit-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background: -o-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background: -ms-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background: linear-gradient(to bottom, #cf2317 5%, #960d00 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cf2317', endColorstr='#960d00',GradientType=0);
	background-color: #cf2317;
	font-size: 20px;
}

.seleccion {
	color:#B70000;
}

.seleccion:hover {
	background-color: #F9DE73; 
	color:#B70000;
	font-weight:bold;	
}

.gris1 {
	color: #666;
}
.gris2 {
	color: #666;
	font-weight: bold;
}
</style>

<style> 
/* TABLA RESPONSIVE */
body{
	margin: 0;
	font-family: sans-serif;
	background-image: url();
	background-repeat: no-repeat;
}

.responsiv{
	max-width: 100%;
	border-collapse: collapse;
}

.responsiv td,.responsiv th{
	padding: 0px 0px;
	text-align: center;
	font-size: 12px;
}

.responsiv th{
	color: #FFFFFF;
	text-align: center;
}



/*responsive*/

@media(max-width: 500px){
	.responsiv thead{
		display: none;
	}

	.responsiv, .responsiv tbody, .responsiv tr, .responsiv td{
		display: block;
		width: 100%;
	}
	.responsiv tr{
		margin-bottom:15px;
	}
	.responsiv td{
		text-align: center;
		position: relative;
	}
	.responsiv td::before{
		content: attr(data-label);
		position: absolute;
		font-size:15px;
		font-weight: bold;
		text-align: left;
	}
}

#form1 .responsiv tr td table tr td {
	color: #C00;
}
.responsiv tr td table {
	text-align: center;
}
.responsiv tr td table tr td table tr td {
	text-align: left;
	font-size: 12px;
	color: #000000;
}

.aumento:hover {
	transform: scale(1.05);
	transition-duration: 0.5s;
	box-shadow: 5px 6px 14px -3px #949494;
	text-align: right;
}

.Boton_Rojo21 {-moz-box-shadow:inset 0px 1px 0px 0px #f5978e;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f5978e;
	box-shadow:inset 0px 1px 0px 0px #f5978e;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #cf2317), color-stop(1, #960d00));
	background:-moz-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-webkit-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-o-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:-ms-linear-gradient(top, #cf2317 5%, #960d00 100%);
	background:linear-gradient(to bottom, #cf2317 5%, #960d00 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cf2317', endColorstr='#960d00',GradientType=0);
	background-color: #F00;
	-moz-border-radius:11px;
	-webkit-border-radius:11px;
	border-radius:50px;
	border:1px solid #d02718;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:17px;
	padding:10px 40px;
	text-decoration:none; 
	text-align:center;
	text-shadow:0px 1px 0px #810e05;
}
.textobox41 {	
	font-family: Arial, Helvetica, sans-serif;
	border: solid #CCC;	
	border-radius: 50px;
	color: #000;
	font-size: 14px;
	width: 300px;
	height: 22px;
	padding: 4px;
	background-color: #FFF;	
	font-weight: normal;
}
.responsiv tr td table tr td {
	text-align: left;
}

.izquierda {
	text-align: left;
}

.derecha {
	text-align: right;
}
	
arialtit1 {
	font-family: Arial, Helvetica, sans-serif;
}
.time {
	font-family: "Times New Roman", Times, serif;
	color: #B70000;
}
.time1 {	font-family: "Times New Roman", Times, serif;
	color: #B70000;
	font-size: 18px;
}

.botonImportExp {
	box-shadow: 3px 4px 0px 0px #899599;
	background:linear-gradient(to bottom, #ededed 5%, #bab1ba 100%);
	background-color:#ededed;
	border-radius:3px;
	border:1px solid #d6bcd6;
	display:inline-block;
	cursor:pointer;
	color:#000000;
	font-family:Arial;
	font-size:12px;
	padding:8px 13px;
	text-decoration:none;
	text-shadow:0px 1px 0px #e1e2ed;
}
.botonImportExp:hover {
	background-color: #DCD5C7;
	font-weight:bold;
}
.botonImportExp:active {
	position:relative;
	top:1px;
}
</style>
<script type="text/JavaScript">
function deshabilitaRetroceso(){
    window.location.hash="no-back-button";
    window.location.hash="Again-No-back-button" //chrome
    window.onhashchange=function(){window.location.hash="no-back-button";}
}

</script>
<script>
function div_Administracion() {
//	alert('ESTAMOS AQUI')
	element = document.getElementById("div_administracion");
	element2 = document.getElementById("div_imagen1");
	
	if($('#div_administracion').is(':visible')) {	
		element.style.display='none';
        element2.style.display='block';	   
	}else{
		element.style.display='block';
        element2.style.display='none';		   
	}
}
</script>

<script>
function MenuAdministracion() {
        element = document.getElementById("div_cheque");
        element2 = document.getElementById("div_administracion");
        element3 = document.getElementById("div_rrhh");
		
		if($('#div_cheque').is(':visible')) {	
            element.style.display='none';
            element2.style.display='block';
            element3.style.display='none';		   		   
		}else{
            element.style.display='block';
            element2.style.display='none';		   
		}
}
</script>

<script>
function MenuRrhh() {
        element = document.getElementById("div_cheque");
        element2 = document.getElementById("div_rrhh");
        element3 = document.getElementById("div_administracion");
		
		if($('#div_cheque').is(':visible')) {	
            element.style.display='none';
            element2.style.display='block';
            element3.style.display='none';		   		   
		}else{
            element.style.display='block';
            element2.style.display='none';		   
		}
}
</script>

<script>
function MuestraMenu() {
        element = document.getElementById("div_menuPrinc");
//        element2 = document.getElementById("div_administracion");
		
		if($('#div_menuPrinc').is(':visible')) {	
            element.style.display='none';
//            element2.style.display='block';
		   
		}else{
            element.style.display='block';
//            element2.style.display='none';		   
		}
}
</script>

<script type="text/javascript">
function load_inicializa() {	
	inicial = 1;
	proceso = document.getElementById('procesar').value;
	$("#div_bienvenida").show("slow");
	$("#div_personal").hide("fast");

	if (proceso == 1) {
        element = document.getElementById("div_cheque");
        element2 = document.getElementById("div_rrhh");
        element3 = document.getElementById("div_administracion");
		
		if($('#div_cheque').is(':visible')) {	
            element.style.display='none';
            element2.style.display='block';
            element3.style.display='none';		   		   
		}else{
            element.style.display='block';
            element2.style.display='none';		   
		}
				
		Localiza_personal()
	}
	if (proceso != 1) {
		$("#div_cliente").hide("slow");
	
		var xhttp = new XMLHttpRequest();
		xhttp.onreadystatechange = function() {
			if (xhttp.readyState == 4 && xhttp.status == 200) {
				document.getElementById("div_cliente").innerHTML = xhttp.responseText;
				$("#div_cliente").show("slow");
			}
		};
	
		xhttp.open("POST", "inicial_g_administ.php", true);
	
		xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xhttp.send("inicial ="+inicial );
	}
}
//-------------------------------------------------------------------------------------
function load_maximixa1() {	
	inicial = 1;
	
	$("#div_cliente").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "maximixa_adm1.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("inicial ="+inicial );
}
//-------------------------------------------------------------------------------------
function load_minimiza1() {	
	inicial = 1;
	
	$("#div_cliente").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "inicial_g_administ.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("inicial ="+inicial );
}
</script>

<script type="text/javascript">
function Localiza_Cliente() {	
	cliente = 1;
			
	$("#div_cliente").hide("slow");
	$("#div_cliente2").hide("slow");
	$("#div_bienvenida").hide("slow");
	$("#div_personal").hide("slow");
	

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "cia2.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("cliente="+cliente);
}

function Localiza_Clientes() {	
	$("#div_cliente").hide("slow");
	$("#div_clientes").hide("slow");
	$("#div_bienvenida").hide("slow");
	$("#div_personal").hide("slow");
	$("#div_clientes").show("slow");
}
</script>

<script type="text/javascript">
function Localiza_personal() {				
	cliente = 1;
	
	$("#div_cliente").hide("slow");
	$("#div_clientes").hide("slow");
	$("#div_bienvenida").hide("slow");
	$("#div_personal").show("slow");

/* 	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "personal_seleccion.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("cliente="+cliente); */
}
</script>

<script type="text/javascript">
function Localiza_personal_add() {
	cliente = 1;
					
	$("#div_clientes").hide("slow");
	$("#div_cliente").hide("slow");
	$("#div_personal").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "personal_solicitud.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("cliente="+cliente);
}

function Localiza_cliente_add() {
	cliente = 1;
					
	$("#div_clientes").hide("slow");
	$("#div_cliente").hide("slow");
	$("#div_personal").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "cia2.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("cliente="+cliente);
}
</script>

<script type="text/javascript">
function Localiza_personal_edit(idpersonal) {				
	idempl = idpersonal;
	
	$("#div_cliente").hide("slow");
	$("#div_clientes").hide("slow");
	$("#div_personal").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "personal_solicitud_edit.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("idempl="+idempl);
}

function Localiza_cliente_edit(idcliente) {				
	idempl = idcliente;
	
	$("#div_clientes").hide("slow");
	$("#div_cliente").hide("slow");
	$("#div_personal").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "cliente_edit.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("idcliente="+idcliente);
}


function cliente_puesto_trabajo(idcliente) {

	self.name = 'opener';		
	remote = open('mapifica_personal_cliente_add?idcliente='+idcliente, 'remote',
			'top=10,left=400, width=1024,height=800, location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();	
}	
</script>


<script type="text/javascript">
function Localiza_personal_print(idpersonal) {		
	idempl = idpersonal;
			
	$("#div_cliente").hide("slow");
	$("#div_clientes").hide("slow");

	var xhttp = new XMLHttpRequest();
	xhttp.onreadystatechange = function() {
		if (xhttp.readyState == 4 && xhttp.status == 200) {
			document.getElementById("div_cliente").innerHTML = xhttp.responseText;
			$("#div_cliente").show("slow");
		}
	};

	xhttp.open("POST", "personal_solicitud_impr.php", true);

	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhttp.send("idempl="+idempl);
}
</script>
<script>
  function subirimagen1()
  {
	  self.name = 'opener';
	  remote = open('gestionimagen1', 'remote',
	'width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();
	  }
</script>	  

<script>
function imprimeEstado(idempl) {
	
	self.name = 'opener';		
	remote = open('personal_solicitud_print?idempl='+idempl, 'remote',
			'top=10,left=400, width=1024,height=800, location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();	
}

function imprimeEstadoClte(idcliente) {
	self.name = 'opener';		
	remote = open('cliente_solicitud_print.php?idcliente='+idcliente, 'remote',
			'top=10,left=400, width=1024,height=800, location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();	
}	
</script>

<script>
function vistaPrevia(idempl) {
	
	self.name = 'opener';		
	remote = open('personal_solicitud_view?idempl='+idempl, 'remote',
			'top=10,left=400, width=1024,height=800, location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();	
}

function vistaPreviaClte(idcliente) {
	self.name = 'opener';		
	remote = open('cliente_solicitud_view?idcliente='+idcliente, 'remote',
			'top=10,left=400, width=1024,height=800, location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();		
}
</script>

<script>
  function mapificaCliente() {
	  nombre_cia = document.getElementById('nombre_comercial').value;
	  telefono_cia = document.getElementById('telefono_legal').value;
	  
	  if (nombre_cia != '') {
			self.name = 'opener';
			remote = open('mapifica_cliente?nombre_cia='+nombre_cia+'&telefono_cia='+telefono_cia, 'remote',
			'width=960,height=700,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
			remote.focus();
	  }
	  }
</script>
</head>
<?php if ($continuaCliente != 1) {?>
	<body onload="load_inicializa()">
<?php }?>
<?php if ($continuaCliente == 1) {?>
	<body onload="Localiza_Clientes()">
<?php }?>
<!--<table  border="1" align="center" cellpadding="0" cellspacing="0" class="responsiv" max-width="1400px" bgcolor="#CCCCCC">-->
<table width="100%"  class="responsiv" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; color: #FFF; font-size: 14px;" bordercolor="#CCCCCC" align="center">
  <tr bgcolor="#FFFFFF">
    <td width="1917" height="15" align="center" valign="top" bgcolor="#E7E7E7"><table width="100%" border="0">
      <tr bgcolor="#E7E7E7">
        <td width="26%" rowspan="4" valign="middle"><label for="procesar"></label>
          <input name="procesar" type="text" id="procesar" value="<?php echo $proceso ?>" hidden="true"/></td>
        <td width="39%" rowspan="4" bgcolor="#E7E7E7" style="text-align:left">
          <input name="txtbuscar" type="text" class="textobox41" id="txtbuscar" placeholder="BUSCAR"/>
        </td>
        <td width="22%" align="right" style="text-align:right"><a href="#"><img src="images/boton_left_gris1.png" width="46" height="46" class="aumento" onclick="location='index_rigo'"/></a></td>
        <td width="5%" align="center" style="text-align: center"><img src="images/boton_left_gris2.png" width="46" height="46" class="aumento" /></td>
        <td align="right" style="text-align:right"><input name="button" type="submit" class="Boton_Rojo2" id="button" value="SALIDA" onclick="location='cerrar'"/></td>
      </tr>
      <tr bgcolor="#E7E7E7">
        <td colspan="2" align="right" valign="bottom" style="text-align:right"><span class="gris1">Usuario</span></td>
        <td width="8%" rowspan="2" align="left" valign="middle" style="text-align:left"><img src="images/img_usuario.JPG" width="66" height="53" /></td>
      </tr>
      <tr bgcolor="#E7E7E7">
        <td height="15" colspan="2" align="right" valign="top" style="text-align:right"><span class="gris2"><?php echo $_SESSION['nombreuser']?></span> <span class="gris2"><?php echo $_SESSION['apellidouser']?></span></td>
      </tr>
    </table></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="67" align="center" valign="top">
    <table width="100%"  class="responsiv" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; color: #FFF; font-size: 14px;" bordercolor="#CCCCCC" align="center">
      <tr valign="middle" bgcolor="#CDCDCD">
        <td colspan="3" align="center" bgcolor="#CDCDCD"><table width="100%" border="0" align="center">
          <tr>
            <td width="20" align="left" valign="middle"><img src="images/img_index_dminist2.jpg" width="108" height="75" /></td>
            <td width="20" align="center" valign="middle"><span class="Gestion">GESTION <br/>
ADMINISTRATIVA</span></td>
            <td width="20" align="center" valign="top">&nbsp;</td>
            <td width="768" align="right" valign="middle" style="text-align:right"><img src="images/mostrar.jpg" alt="" width="40" height="32" onclick="MuestraMenu()"/></td>
            <td width="249" align="right" valign="top"><button class="boton_menu">SEGUIMIENTO DE ASIGNACIONES</button></td>
            <td width="149" align="right" valign="top"><button class="boton_menu">NOVEDADES</button></td>
            <td width="159" align="right" valign="top"><button class="boton_menu">ACCIONES NO COMPLETADAS</button></td>
            <td width="353" align="center" valign="middle">&nbsp;</td>
            <td width="36" align="center" valign="middle">&nbsp;</td>
            <td width="30" align="center" valign="middle"><img src="images/operador_rojo.png" width="60" height="83" class="aumento" /></td>
            <td width="30" align="center" valign="middle"><img src="images/mantenimiento_rojo.png" width="71" height="83" class="aumento" /></td>
            </tr>        
        </table>       
       </td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td width="15%" rowspan="2" align="left" valign="top" bgcolor="#C3C3C3">
          <div id="div_menuPrinc">
            <table width="290" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE">
              <tr>
                <td width="35" align="right" bgcolor="#C3C3C3"><img src="images/laterar1.png" alt="5" width="35" height="40" /></td>
                <td width="270" bgcolor="#C3C3C3"><input name="button2" type="button" class="Boton_selecc" id="button2" value="INICIO" onclick="location='index_rigo'"/></td>
                </tr>
              <tr>
                <td align="right" bgcolor="#C3C3C3"><img src="images/laterar1.png" alt="4" width="35" height="40" /></td>
                <td bgcolor="#C3C3C3"><input name="button3" type="button" class="Boton_selecc" id="button3" value="ADMINISTRACION" onclick="MenuAdministracion()"/></td>
                </tr>
              <tr id="tabla_a_desplegar">
                <td colspan="2" align="right" bgcolor="#EEEEEE">
                  <div id="div_administracion" hidden="true">
                    <table  width="100%" border="0" >
                      <tr>
                        <td width="10%" style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" width="20" height="18"/></span></td>
                        <td width="90%" class="seleccion" style="font-size:18px"><span class="time" onclick="Localiza_Clientes()"><a href="#">Clientes</a></span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Facturas</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Proveedores</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Cuentas Por Cobrar</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Cuentas Por Pagar</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Nomina</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Inventario de Equipos</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right">&nbsp;</td>
                        <td>&nbsp;</td>
                        </tr>
                      </table>
                    </div>                  
                  </td>
                </tr>
              <tr>
                <td align="right" bgcolor="#C3C3C3"><img src="images/laterar1.png" alt="3" width="35" height="40" /></td>
                <td bgcolor="#C3C3C3"><input name="button4" type="button" class="Boton_selecc" id="button4" value="RECURSOS HUMANOS" onclick="MenuRrhh()"/></td>
                </tr>
              <tr>
                <td colspan="2" align="right" bgcolor="#EEEEEE">
                  <div id="div_rrhh" hidden="true">
                    <table  width="100%" border="0" >
                      <tr>
                        <td width="10%" style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" width="20" height="18"/></span></td>
                        <td width="90%" class="seleccion" style="font-size:18px"><span class="time" onclick="Localiza_personal()"><a href="#">Ingreso de Personal</a></span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Accion de Personal</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Reportes</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Capacitación</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right"><span class="time"><img src="images/laterar_verde_derecha.png" alt="" width="20" height="18" /></span></td>
                        <td class="seleccion" style="font-size:18px"><span class="time">Evaluacion Psicológica</span></td>
                        </tr>
                      <tr>
                        <td style="text-align:right">&nbsp;</td>
                        <td>&nbsp;</td>
                        </tr>
                      </table>
                    </div>                 
                  </td>
                </tr>
              <tr>
                <td align="right" bgcolor="#C3C3C3"><img src="images/laterar1.png" alt="2" width="35" height="40" /></td>
                <td bgcolor="#C3C3C3"><input name="button5" type="button" class="Boton_selecc" id="button5" value="LEGALES" /></td>
                </tr>
              </table>        
            </div>
          <div id="div_cheque"></div></td>
        <td colspan="2" align="center" valign="top" bgcolor="#FFFFFF" style="text-align: center; font-family: 'Times New Roman', Times, serif; font-size: 24px;">
          <div id="div_bienvenida">
            <table width="100%" border="0">
              <tr>
                <td colspan="8" align="center" valign="middle" style="text-align: center; font-family: 'Times New Roman', Times, serif; font-size: 24px;">Te damos la bienvenida a SGCS</td>
                </tr>
              <tr>
                <td colspan="8" align="center" valign="middle" style="text-align: center; font-family: 'Times New Roman', Times, serif;"><span style="text-align: center; font-family: 'Times New Roman', Times, serif; font-size: 18px;">Para comerzar te recomendamos estos pasos</span></td>
                </tr>
              <tr>
                <td width="5%" align="right" style="text-align:right"><img src="images/config1.png" alt="1" width="50" height="50" /></td>
                <td width="20%" align="center"><span class="time1">Configura tu Plataforma</span></td>
                <td width="5%" align="center"><img src="images/img_nuevo1.png" alt="5" width="50" height="60" /></td>
                <td width="20%" align="center"><span class="time1">Ingresa tu Personal</span></td>
                <td width="5%" align="center"><img src="images/nuevo4.png" alt="7" width="60" height="59" /></td>
                <td width="20%" align="center"><span class="time1">Ingresa tus Clientes</span></td>
                <td width="5%" align="center"><img src="images/inventario.png" alt="6" width="50" height="50" /></td>
                <td width="20%" align="center"><span class="time1">Organiza tu Inventario</span></td>
                </tr>
              </table>
          </div>          
          </td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td width="85%" colspan="2" align="center" valign="top" bgcolor="#FFFFFF" style="text-align: center; font-family: 'Times New Roman', Times, serif; font-size: 24px;">
        <div id="div_cliente"></div>
        <div id="div_personal" hidden="true">
                <table width="90%" border="0" align="center" class="border_tabla3">
                  <tr class="total">
                    <th height="46" colspan="8" align="center" class="total" scope="col">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr bgcolor="#ECE9DF">
                        <td width="41%" height="46" style="font-weight:bold; font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size:14px">INGRESO DE PERSONAL</td>
                        <td width="59%" style="text-align:right">
                          <input name="button" type="button" class="botonImportExp" id="button" 
                      style="background-image: url(img/importar2.png); background-position:left; background-size:30px 30px; background-repeat:no-repeat; width:100px;" value="    Importar" />
                          &nbsp;&nbsp;
                          <input name="button" type="button" class="botonImportExp" id="button" 
                      style="background-image: url(img/export3.png); background-position:left; background-size:30px 30px; background-repeat:no-repeat; width:100px;" value="    Exportar" />
                          &nbsp;&nbsp; 
                            <input name="button2" type="button" class="botonImportExp" id="button2" 
                      style="background-image: url(img/nuevo4.png); background-position:left; background-size:30px 30px; background-repeat:no-repeat; width:150px;" value="    Nuevo Personal"  onclick="Localiza_personal_add()" />
                        </td>
                      </tr>
                    </table>
                    </th>
                  </tr>
                  <tr class="total">
                    <th align="center" class="total" scope="col">&nbsp;</th>
                    <th height="24" colspan="7" align="right" class="total" style="text-align: right" scope="col">&nbsp;</th>
                  </tr>
                  <tr align="right" bgcolor="#003366" class="tit_mod">
                    <th width="16" class="total" scope="col">CK</th>
                    <th width="40" class="total" style="text-align:center" scope="col">ITEM</th>
                    <th width="20" class="total" style="text-align:left" scope="col">&nbsp;</th>
                    <th height="21" class="total" style="text-align:left" scope="col">NOMBRE</th>
                    <th width="300" style="text-align:left" scope="col">FUNCION</th>
                    <th width="112" style="text-align:center" scope="col">CEDULA</th>
                    <th width="112" style="text-align:center" scope="col">CELULAR</th>
                    <th width="99" style="text-align:center" scope="col">ACCIONES</th>
                  </tr>
                  <?php 
                    $lin = 0;
                    $linea = 1;
                    $sql = "SELECT * FROM personal 
					INNER JOIN cargos ON personal.cargo = cargos.codigo
					WHERE personal.sigla ='$sigla' AND cargos.sigla='$sigla' ORDER BY apellido";
                    if ($result = $mysqli->query($sql)) {
                        while ($row_Recordset1= $result->fetch_assoc()) {	
                            $item = str_pad($row_Recordset1['idpersonal'],4,"0",STR_PAD_LEFT);	
                    ?>
                      <tr <?php if ($linea==2) { ?>bgcolor="#F8F4EF"<?php }?> class="brillo">
                        <td align="center" class="arial" style="text-align:center"><input name="checkbox" type="checkbox" class="checkbox" id="checkbox" />
                        <label for="checkbox"></label></td>
                        <td align="center" class="arial" style="text-align:center"><span class="normal"><?php echo $item; ?></span></td>
                        <td class="arial"><span style="text-align:center">
                          <?php if ($row_Recordset1['strimagen'] != '') {?>
                          <a href="documentos/productos/<?php echo $row_Recordset1['strimagen']; ?>" rel="lightbox"><img src="documentos/productos/<?php echo $row_Recordset1['strimagen']; ?>" alt="3" width="25" height="25" border="0" />
                          <?php }?>
                          <?php if ($row_Recordset1['strimagen'] == '') {?>
                          <img src="images/usuarioblanco.jpg" alt="5" name="imagenusuario" width="25" height="25" id="imagenusuario2" />
                          <?php }?>
                        </span></td>
                        <td align="center" class="arial" style="text-align:left"><span class="normal"><?php echo $row_Recordset1['apellido']; ?> <?php echo $row_Recordset1['nombre']; ?></td>
                        <td align="center" class="arial" style="text-align:left"><span class="normal"><?php echo $row_Recordset1['descripcion']; ?></td>
                        <td align="center" class="arial" style="text-align:center"><span class="normal"><?php echo $row_Recordset1['cedula']; ?></td>
                        <td align="center" class="arial" style="text-align:center"><span class="normal"><?php echo $row_Recordset1['celular']; ?></td>
                        <td class="arial11" style="text-align:center"><table width="100%" border="0">
                          <tr>
                            <td align="center"><a href="#"><img src="img/ojos_ver2.png" width="20" height="20" title="Vista Previa" onclick="vistaPrevia(<?php echo $row_Recordset1['idpersonal']; ?>)"/></a></td>
                            <td align="center"><a href="#"><img src="img/img_printer1.png" name="boton_impr" title="Imprimir formulario" width="25" height="20" id="2boton_impr2" onclick="imprimeEstado(<?php echo $row_Recordset1['idpersonal']; ?>)"/></a></td>
                            <td align="center"><a href="#"><img src="img/edita1.png" width="20" height="20" title="Editar personal" onclick="Localiza_personal_edit(<?php echo $row_Recordset1['idpersonal'] ?>)"/></a></td>
                          </tr>
                        </table></td>
                  </tr>
                      <?php 
                          if ($linea > 2) {
                              $linea = 1;
                          }
                          $linea = $linea + 1;
                          
                          $lin = $lin + 1;
                          }; 
                        }
                    ?>
                </table>        
        </div>
        <div id="div_clientes" hidden="true">
          <table width="90%" border="0" align="center" class="border_tabla3">
            <tr class="total">
              <th height="46" colspan="7" align="center" class="total" scope="col"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr bgcolor="#ECE9DF">
                  <td width="42%" height="46" style="font-weight:bold; font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size:14px">INGRESO DE CLIENTES</td>
                  <td width="58%" style="text-align:right"><input name="button" type="button" class="botonImportExp" id="button" 
                              style="background-image: url(img/importar2.png); background-position:left; background-size:30px 30px; background-repeat:no-repeat; width:100px;" value="    Importar" />
                    &nbsp;&nbsp;
                    <input name="button2" type="button" class="botonImportExp" id="button" 
                              style="background-image: url(img/export3.png); background-position:left; background-size:30px 30px; background-repeat:no-repeat; width:100px;" value="    Exportar" />
                    &nbsp;&nbsp;
                    <input name="button2" type="button" class="botonImportExp" id="button2" 
                              style="background-image: url(img/nuevo4.png); background-position:left; background-size:30px 30px; background-repeat:no-repeat; width:150px;" value="    Nuevo Cliente"  onclick="Localiza_cliente_add()" /></td>
                </tr>
              </table>
              </th>
            </tr>
            <tr class="total">
              <th align="center" class="total" scope="col">&nbsp;</th>
              <th height="24" colspan="6" align="right" class="total" style="text-align: right" scope="col">&nbsp;</th>
            </tr>
            <tr bgcolor="#003366" class="tit_mod">
              <th width="16" height="20" align="center" class="total" scope="col">CK</th>
              <th width="50" class="total" style="text-align:center" scope="col">ITEM</th>
              <th class="total" style="text-align:left" scope="col">NOMBRE COMERCIAL</th>
              <th align="left" style="text-align:left" scope="col">RAZON SOCIAL</th>
              <th width="100" style="text-align:center" scope="col">RNC</th>
              <th width="100" style="text-align:center" scope="col">TELEFONO</th>
              <th width="99" style="text-align:center" scope="col">ACCIONES</th>
            </tr>
            <?php 
                            $lin = 0;
                            $linea = 1;
                            $sql2 = "SELECT * FROM clientes 
                            WHERE sigla='$sigla' ORDER BY nombre_comercial";
                            if ($result2 = $mysqli->query($sql2)) {
                                while ($row_Recordset2= $result2->fetch_assoc()) {	
                                    $item = str_pad($row_Recordset2['idcliente'],4,"0",STR_PAD_LEFT);	
                            ?>
            <tr <?php if ($linea==2) { ?> bgcolor="#E8F8FF"<?php }?> class="brillo">
              <td align="center" class="arial" style="text-align:center"><input name="checkbox" type="checkbox" class="checkbox" id="checkbox" />
                <label for="checkbox"></label></td>
              <td align="center" class="arial" style="text-align:center"><span class="normalCliente"><?php echo $item; ?></span></td>
              <td align="center" class="arial" style="text-align: left; font-size: 12px;"><span class="normalCliente"><?php echo $row_Recordset2['nombre_comercial']; ?></td>
              <td align="center" class="arial" style="text-align:left"><span class="normalCliente"><?php echo $row_Recordset2['razon_social']; ?></td>
              <td align="center" class="arial" style="text-align:center"><span class="normalCliente"><?php echo $row_Recordset2['rnc']; ?></td>
              <td align="center" class="arial" style="text-align:center"><span class="normalCliente"><?php echo $row_Recordset2['telefono_legal']; ?></td>
              <td class="arial11" style="text-align:center"><table width="100%" border="0">
                <tr>
                  <td align="center"><a href="#"><img src="img/ojos_ver2.png" alt="8" width="20" height="20" title="Vista Previa" onclick="vistaPreviaClte(<?php echo $row_Recordset2['id']; ?>)"/></a></td>
                  <td align="center"><a href="#"><img src="img/img_printer1.png" alt="7" name="boton_impr" width="25" height="20" id="2boton_impr2" title="Imprimir formulario" onclick="imprimeEstadoClte(<?php echo $row_Recordset2['id']; ?>)"/></a></td>
                  <td align="center"><a href="#"><img src="img/edita1.png" alt="6" width="20" height="20" title="Editar Cliente" onclick="Localiza_cliente_edit(<?php echo $row_Recordset2['id'] ?>)"/></a></td>
                  <td align="center"><a href="#"><img src="img/img_seguridad2.png" alt="6" width="20" height="25" title="Agrega Personal al Cliente" onclick="cliente_puesto_trabajo(<?php echo $row_Recordset2['id'] ?>)"/></a></td>
                  </tr>
              </table></td>
            </tr>
            <?php 
                                  if ($linea > 2) {
                                      $linea = 1;
                                  }
                                  $linea = $linea + 1;
                                  
                                  $lin = $lin + 1;
                                  }; 
                                }
                            ?>
          </table>
        </div>        
        </td>
      </tr>
    </table></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="center" valign="middle" bgcolor="#9A0000" background="images/raya_roja.png"><img src="images/LOGO.png" width="105" height="100"/></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" valign="middle" bgcolor="#E9E9E9">@ <?php echo $_SESSION['cia'] ?>, <?php echo $_SESSION['direcc_cia'] ?>, <?php echo $_SESSION['tel_cia'] ?>, <?php echo $_SESSION['email_cia'] ?></td>
  </tr>
</table>
</body>
</html>