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

session_start();
set_time_limit(9000000);

error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set("memory_limit",'256M');   

date_default_timezone_set('UTC');

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>';
}
 
$_SESSION['accion']	= '00';
$_SESSION['ingreso'] = 0;
$nuevo_empl = 0;
$salrio = 0;
$fechasis = date('Y-m-d');

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

if (!isset($_GET['cedula'])) {
	$_SESSION['cedula'] = '';
	$_SESSION['cedula5'] = '';
	$_SESSION['CodigoEmpleado'] = '';
}
if (!isset($_GET['codigo'])) {
	$_SESSION['codigo'] = '';
	$_SESSION['codigo5'] = '';
	$_SESSION['CodigoEmpleado'] = '';
}

if (isset($_GET['cedula'])) {
	$cedula = $_GET['cedula'];
	$_SESSION['cedula'] = $_GET['cedula'];
	$_SESSION['cedula5'] = $_GET['cedula'];
	
	include('datos_personal.php');
	$FotoEmpl = $_SESSION['strimagen'];
	$codigoempl = $_SESSION['CodigoEmpleado'];	
}

if (isset($_GET['codigo'])) {
	$_SESSION['cedula5'] 	= '';
	$_SESSION['por_codigo'] = '';
	$_SESSION['cedula5'] 	= '';
	$codigo 				= $_GET['codigo'];
	$_SESSION['codigo'] 	= $_GET['codigo'];
	$_SESSION['codigo5'] 	= $_GET['codigo'];
	
	include('datos_personal.php');
	$FotoEmpl = $_SESSION['strimagen'];
	$codigoempl = $_SESSION['CodigoEmpleado'];	
}

if ($_SESSION['por_codigo'] != 0) {
	$codigo = $_SESSION['por_codigo'];
	$_SESSION['codigo'] = $_SESSION['por_codigo'];
	$_SESSION['codigo5'] = $_SESSION['por_codigo'];
	
	include('datos_personal.php');
	$FotoEmpl = $_SESSION['strimagen'];
	$codigoempl = $_SESSION['CodigoEmpleado'];
}

$Promocion = 0;
$strImagen = 'fotosilueta.jpg';
$_SESSION['tipo'] = 'AC';

if ($_SESSION['accion']	== '06' AND $_SESSION['no_existe'] == 1 AND $_SESSION['empleado_cancel'] == 0) {
	$nuevo_empl = 1;
}


if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}


if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
/* 
	$archivo = $_FILES["foto"]["tmp_name"];
	$tamanio = $_FILES["foto"]["size"];
	$tipo = $_FILES["foto"]["type"];
	$nombre = $_FILES["foto"]["name"];

    $fp = fopen($archivo, "rb");
    $contenido = fread($fp, $tamanio);
    $contenido = addslashes($contenido);
    fclose($fp);
	  	 
	$strImagen = 'fotosilueta.jpg';
	//------------------------------------
	DireccionBarrio,
	CodigoUbicacion, 
*/	
	$codigoempl		= $_POST['codigo'];
	$cedula 		= $_POST['cedula'];
	$apellidos 		= $_POST['apellido'];
	$nombre 		= $_POST['nombre'];
	$sexo 			= $_POST['sexo'];
	$EstadoCivil	= $_POST['EstadoCivil'];
	$FechaNacimiento	= $_POST['FechaNacimiento'];	
	$direccion		= $_POST['direccion'];
	$provincia		= $_POST['provincia'];
	$telefono		= $_POST['telefono'];
	$celular		= $_POST['celular'];
	$fechaingreso   = $_POST['fechaingreso'];
	$fechaefectividad = $_POST['fechaefectividad'];
	$salario		= $_POST['salario'];
	$tipocontrato	= 'F';
	$posicion		= $_POST['posicion'];	
	$depart			= $_POST['depart'];	
	$rango			= $_POST['rango'];	
	$institucion 	= 1;
	if ($rango == '00' OR $rango == '33') {
		$institucion = 2;
	}
	if ($rango == '01') {
		$institucion = 5;
	}
	if ($rango != '00' AND $rango != '33' AND $rango != '01') {
		$institucion = 1;
	}
	$tipocuentabanco = '';
	$cuentabanco	= $_POST['cuentabanco'];	
	$sueldonuevo 	= $_POST['sueldonuevo'];	
	$email 		= $_POST['email'];
	$cuentabanco = $_POST['cuentabanco'];
	$tiposangre	 = $_POST['tiposangre'];
	$celular	 = $_POST['celular'];
	$telefono 	= $_POST['telefono'];
	$tarjeta 	= '';
	$CodigoCamb	= $_POST['accion'];
	$cantidad	= 0;
	$ValorDeuda	= $_POST['salario'];
	$CodigoNomina = '';
	$TipoNomina = 0;
	$usuario = $_SESSION['strUsuario'];
	$hora = date('H:i:s');
	$Estado = 1;
	$Anexo = $_POST['anexo'];
	$Concepto	= $_POST['concepto'];
 	$strImagen = $_POST['strImagen'];

	$sql = "INSERT INTO accioneshistorico (CodigoEmpleado, Cedula, Apellidos, Nombres, Sexo, EstadoCivil, FechaNacimiento, Direccion,  
		DireccionProvincia, TelefonoCasa, TelefonoCelular, FechaIngreso, FechaEfectividad, Salario, TipoContrato, CodigoPosicion, 
		CodigoDepartamento, CodigoInstitucion, CodigoRango, TipoCuentaBancaria, CuentaBancaria, Tarjeta, CodigoCambio, Cantidad, ValorDeuda, 
		CodigoNomina, TipoNomina, UsuarioRegistro, FechaRegistro, HoraRegistro, UsuarioAct, Estado, Anexo, Concepto)
		VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	$params = array("$codigoempl", "$cedula", "$apellido ", "$nombre", "$sexo", "$EstadoCivil", "$FechaNacimiento", "$direccion", "$provincia", 
		"$telefono", "$celular", "$fechaingreso", "$fechaefectividad", "$salario", "$tipocontrato", "$posicion", "$depart", 
		"$institucion", "$rango", "$tipocuentabanco", "$cuentabanco", "$tarjeta", "$CodigoCamb", "$cantidad", "$ValorDeuda", 
		"$CodigoNomina", "$TipoNomina", "$usuario", "$fechasist", "$hora", "$usuario", "$Estado", "$Anexo", "$Concepto");
	
	$stmt = sqlsrv_query( $conn, $sql, $params);
	if( $stmt === false ) {
	 die( print_r( sqlsrv_errors(), true));
	}


	$insertGoTo = "personal_agregado.php?recordID=$numero";
	if (isset($_SERVER['QUERY_STRING'])) {
		$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
		$insertGoTo .= $_SERVER['QUERY_STRING'];
	}
	header(sprintf("Location: %s", $insertGoTo));
}

//-----------------------------------------------

if ($_SESSION['accion']	== '00') {
	$Acciones = sqlsrv_query($conn, "SELECT CodigoCambio, Cambio, Estado FROM Cambios 
	WHERE Estado = 1 AND (CodigoCambio = '08' OR CodigoCambio = '05' OR CodigoCambio = '31' OR CodigoCambio = '37' 
	OR CodigoCambio = '06' OR CodigoCambio = '35' OR CodigoCambio = '36' OR CodigoCambio = '34' 
	OR CodigoCambio = '07' OR CodigoCambio = '04' OR CodigoCambio = '33') ORDER BY Cambio");	
	//$Departamentos = sqlsrv_query($conn, "SELECT * FROM Cambios ORDER BY Cambio");
}
//-------------------------------------
if ($_SESSION['accion']	!= '00') {
	$cod_cambio = $_SESSION['accion'];
	
	$Acciones = sqlsrv_query($conn, "SELECT CodigoCambio, Cambio, Estado FROM Cambios 
	WHERE CodigoCambio = '$cod_cambio' ORDER BY Cambio");	
	//$Departamentos = sqlsrv_query($conn, "SELECT * FROM Cambios ORDER BY Cambio");
}
//------------------------------------
if ($_SESSION['accion']	!= '00' AND $_SESSION['accion']	!= '06' AND $_SESSION['no_existe'] == 1) {
	$Acciones = sqlsrv_query($conn, "SELECT CodigoCambio, Cambio, Estado FROM Cambios 
	WHERE Estado = 1 AND (CodigoCambio = '08' OR CodigoCambio = '05' OR CodigoCambio = '31' OR CodigoCambio = '37' 
	OR CodigoCambio = '06' OR CodigoCambio = '35' OR CodigoCambio = '36' OR CodigoCambio = '34' 
	OR CodigoCambio = '07' OR CodigoCambio = '04' OR CodigoCambio = '33') ORDER BY Cambio");	
	//$Departamentos = sqlsrv_query($conn, "SELECT * FROM Cambios ORDER BY Cambio");
} 

$TipoSangre = sqlsrv_query($conn, "SELECT CodigoSangre, Sangre FROM Sangres");
?>
<!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" />
<title>Documento sin título</title>
<link href="SpryAssets/SpryTabbedPanels_acc1.css" rel="stylesheet" type="text/css" />
<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="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script>
jQuery(function($){
$("#cedula").mask("999-9999999-9");
});
</script> 

<script type="text/javascript">
function solicitud_accions1() {	
	var cedula = document.getElementById("cedula").value;
	var accion = document.getElementById("accion").value;

	if (cedula != '___-_______-_') {
		window.location.href = 'solicitud_accion?cedula='+cedula+"&accion="+accion;
	}
	//----------------------------------------------------------------------------------------------------
}
</script>

<script type="text/javascript">
function solicitud_accions2() {	
	var codigo = document.getElementById("codigo").value;
	var accion = document.getElementById("accion").value;

	//----------------------------------------------------------------------------------------------------
	if (codigo != '') {
		window.location.href = 'solicitud_accion?codigo='+codigo+"&accion="+accion;
	}	
	//----------------------------------------------------------------------------------------------------
}
</script>

<script type="text/javascript">
function solicitud_accions3() {	
	var nombre = document.getElementById("txtnombre").value;
	var apellido = document.getElementById("txtapellido").value;

	//----------------------------------------------------------------------------------------------------
	if (apellido == '' && nombre != '') {
		window.location.href = 'impr_busca_empl?txtnombre='+nombre;
	}		
	//----------------------------------------------------------------------------------------------------
	if (apellido != '' && nombre == '') {
		window.location.href = 'impr_busca_empl?txtapellido='+apellido;
	}		
	//----------------------------------------------------------------------------------------------------
	if ( apellido != '' && nombre != '') {
		window.location.href = 'impr_busca_empl?txtapellido='+apellido+"&txtnombre="+nombre;
	}
}
</script>

<script type="text/javascript">
function solicitud_accions4() {	
	var cedula = document.getElementById("cedula").value;

	if (cedula != '___-_______-_') {
		window.location.href = 'solicitud_accion?cedula='+cedula;
	}
	//----------------------------------------------------------------------------------------------------
	if ((cedula == '___-_______-_' || cedula == '') && codigo != '') {
		window.location.href = 'solicitud_accion?codigo='+codigo;
	}	
	//----------------------------------------------------------------------------------------------------
	if ((cedula == '___-_______-_' || cedula == '') && codigo == '' && apellido == '' && nombre != '') {
		window.location.href = 'impr_busca_empl?txtnombre='+nombre;
	}		
	//----------------------------------------------------------------------------------------------------
	if ((cedula == '___-_______-_' || cedula == '') && codigo == '' && apellido != '' && nombre == '') {
		window.location.href = 'impr_busca_empl?txtapellido='+apellido;
	}		
	//----------------------------------------------------------------------------------------------------
	if ((cedula == '___-_______-_' || cedula == '') && codigo == '' && apellido != '' && nombre != '') {
		window.location.href = 'impr_busca_empl?txtapellido='+apellido+"&txtnombre="+nombre;
	}
}
</script>

<script language=javascript type=text/javascript>
	// SCRIP PARA QUE LA TECLA ENTER NO FUNCIONE, O NO ENVIE EL FORMULARIO
	function stopRKey(evt) {
	var evt = (evt) ? evt : ((event) ? event : null);
	var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
	if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
	}
	
	document.onkeypress = stopRKey; 
</script>

<script>
  function subirimagen()
  {
	  self.name = 'opener';
	  remote = open('gestionimagen.php', 'remote',
	'width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
	remote.focus();
	  }
</script>

<style type="text/css">
.desglose {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	text-align: center;
	color: #039;
}

.brillo:hover {
	font-weight: bold;
	color: #06C;
	background-color: #F4EA9F;
}

.Comic {
	font-family: "Comic Sans MS";
	font-weight: normal;
	font-size: 11px;
	color: #000;
}

.Comic10 {
	font-family: "Comic Sans MS";
	font-weight: normal;
	font-size: 10px;
	color: #000;
}

.Comic12 {
	font-family: "Comic Sans MS";
	font-weight: normal;
	font-size: 12px;
	color: #000;
}

.ComicNormal {
	font-family: "Comic Sans MS";
	font-weight: normal;
	font-size: 13px;
	color: #000;
}
.TitComic {
	font-family: "Comic Sans MS";
	font-weight: bold;
	font-size: 14px;
	color: #06F;
}

.Boton {
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7f7f7), color-stop(1, #B8A88F));
	background: -moz-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -webkit-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -o-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -ms-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: linear-gradient(to bottom, #f7f7f7 5%, #B8A88F 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#B8A88F',GradientType=0);
	background-color: #f7f7f7;
	border: 1px solid #B8A88F;
	font-family: Arial, Helvetica, sans-serif;
	color: #039;
}

.Boton2 {
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7f7f7), color-stop(1, #A8A8A8));
	background: -moz-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: -webkit-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: -o-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: -ms-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: linear-gradient(to bottom, #f7f7f7 5%, #A8A8A8 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#A8A8A8',GradientType=0);
	background-color: #f7f7f7;
	border: 1px solid #A8A8A8;
	font-family: Arial, Helvetica, sans-serif;
	color: #039;
}

.izqblanco {text-align: left;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 12px;
            color: #fff;
            text-align: left;	
}
.titrepderec {            font-family: Arial, Helvetica, sans-serif;
            font-size: 12px;
            font-weight: bold;
            text-align: center;
            color: #fff;
}
#alfabetos {border-collapse:collapse; background:buttonface;}
#contEncCol {scrollbar-face-color:buttonface; scrollbar-highlight-color:buttonface; scrollbar-shadow-color:buttonface; scrollbar-arrow-color:buttonface; scrollbar-track-color:buttonface; scrollbar-base-color:buttonface; scrollbar-3dlight-color:buttonface; scrollbar-darkshadow-color:buttonface; }
#contEncCol2 {scrollbar-face-color:buttonface; scrollbar-highlight-color:buttonface; scrollbar-shadow-color:buttonface; scrollbar-arrow-color:buttonface; scrollbar-track-color:buttonface; scrollbar-base-color:buttonface; scrollbar-3dlight-color:buttonface; scrollbar-darkshadow-color:buttonface; }
#contEncCol3 {scrollbar-face-color:buttonface; scrollbar-highlight-color:buttonface; scrollbar-shadow-color:buttonface; scrollbar-arrow-color:buttonface; scrollbar-track-color:buttonface; scrollbar-base-color:buttonface; scrollbar-3dlight-color:buttonface; scrollbar-darkshadow-color:buttonface; }
#contEncFil {scrollbar-face-color:buttonface; scrollbar-highlight-color:buttonface; scrollbar-shadow-color:buttonface; scrollbar-arrow-color:buttonface; scrollbar-track-color:buttonface; scrollbar-base-color:buttonface; scrollbar-3dlight-color:buttonface; scrollbar-darkshadow-color:buttonface; }

#encCol {height:100%}
#encCol2 {height:100%}
#encCol3 {height:100%}
/*
#contenedor{
	overflow: auto;
	width: 400px;
	<?php// if (isset($_SESSION['CodigoEmpleado']) AND $_SESSION['CodigoEmpleado'] != '') {?>
		height: 200px;
	<?php// }?>
	<?php// if (!isset($_SESSION['CodigoEmpleado']) OR $_SESSION['CodigoEmpleado'] == '') {?>
		height: 50px;
	<?php//}?>	
	text-align: left;
} 
*/
#contenedor {
	overflow: auto;
	width: 820px;
	<?php if (isset($_SESSION['CodigoEmpleado']) AND $_SESSION['CodigoEmpleado'] != '') {?>
		height: 145px;
	<?php }?>
	<?php if (!isset($_SESSION['CodigoEmpleado']) OR $_SESSION['CodigoEmpleado'] == '') {?>
		height: 50px;
	<?php }?>
	text-align: left;
}

#contenedor2 {
	overflow: auto;
	width: 620px;
	<?php if (isset($_SESSION['CodigoEmpleado']) AND $_SESSION['CodigoEmpleado'] != '') {?>
		height: 145px;
	<?php }?>
	<?php if (!isset($_SESSION['CodigoEmpleado']) OR $_SESSION['CodigoEmpleado'] == '') {?>
		height: 50px;
	<?php }?>
	text-align: left;
}
/*------------------------------------------------------------------------------------------------------------------------------------------------*/

.Boton1 {	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7f7f7), color-stop(1, #B8A88F));
	background: -moz-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -webkit-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -o-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -ms-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: linear-gradient(to bottom, #f7f7f7 5%, #B8A88F 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#B8A88F',GradientType=0);
	background-color: #f7f7f7;
	border: 1px solid #B8A88F;
	font-family: Arial, Helvetica, sans-serif;
	color: #039;
}
.TitEstado {	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
	color: #FFF;
}
.TitEstado {	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
}

.BotonBuscar {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color: #009;
	font-weight:bold;
	font-family:"Comic Sans MS";
	font-size:14px;
	padding: 2px 6px;
	text-decoration:none;
}
.BotonBuscar:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #019ad2), color-stop(1, #daf2fa));
	background:-moz-linear-gradient(top, #019ad2 5%, #daf2fa 100%);
	background:-webkit-linear-gradient(top, #019ad2 5%, #daf2fa 100%);
	background:-o-linear-gradient(top, #019ad2 5%, #daf2fa 100%);
	background:-ms-linear-gradient(top, #019ad2 5%, #daf2fa 100%);
	background:linear-gradient(to bottom, #019ad2 5%, #daf2fa 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#019ad2', endColorstr='#daf2fa',GradientType=0);
	background-color:#019ad2;
}
.BotonBuscar1 {	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#050505;
	font-family:Arial;
	font-size:14px;
	padding:5px 16px;
	text-decoration:none;
}
.ComicAzul1 {
	color: #06C;
	font-weight: bold;
}

input[type=text] {
	background: #FFFFFF;
	border: thin solid skyblue;	
	border-radius: 4px;
	color: #000;
	font-size: 12px;
	height: 14px;
	padding: 4px;
}

input[type="text"]:disabled {
/*    background: #EFF5FA; */
    background: #F0F0F0;
}

input:read-only {
    background-color: #F3F8FC;
}

.otrotexto {
	background: #FFFFFF;
	border: thin solid skyblue;	
	border-radius: 4px;
	color: #F60;
	font-size: 12px;
	height: 12px;
	padding: 4px;
}

.textbox {
    font-family: Arial, Helvetica, sans-serif;
	background: #FFFFFF;
	border: thin solid skyblue;	
	border-radius: 4px;
	color: #000;
	font-size: 12px;
	height: 12px;
	padding: 4px;
}

select {
  border: 0;
  outline: 0;
  background: transparent;
  background-color:transparent;
  border-bottom: 1px solid black;
  border-color:skyblue;
  color: #000;
  font-size: 11px;
}
.Boton3 {	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7f7f7), color-stop(1, #B8A88F));
	background: -moz-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -webkit-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -o-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: -ms-linear-gradient(top, #f7f7f7 5%, #B8A88F 100%);
	background: linear-gradient(to bottom, #f7f7f7 5%, #B8A88F 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#B8A88F',GradientType=0);
	background-color: #f7f7f7;
	border: 1px solid #B8A88F;
	font-family: Arial, Helvetica, sans-serif;
	color: #039;
}
.Boton21 {	background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f7f7f7), color-stop(1, #A8A8A8));
	background: -moz-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: -webkit-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: -o-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: -ms-linear-gradient(top, #f7f7f7 5%, #A8A8A8 100%);
	background: linear-gradient(to bottom, #f7f7f7 5%, #A8A8A8 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#A8A8A8',GradientType=0);
	background-color: #f7f7f7;
	border: 1px solid #A8A8A8;
	font-family: Arial, Helvetica, sans-serif;
	color: #039;
}
.BotonBuscar11 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#050505;
	font-family:Arial;
	font-size:14px;
	padding:5px 16px;
	text-decoration:none;
}


.border_tabla {
	border-radius: 14px 14px 14px 14px;
	-moz-border-radius: 14px 14px 14px 14px;
	-webkit-border-radius: 14px 14px 14px 14px;
	border: 1px solid #CCC;
}

.border_tabla2 {
	border-radius: 10px 10px 10px 10px;
	-moz-border-radius: 10px 10px 10px 10px;
	-webkit-border-radius: 10px 10px 10px 10px;
	border: 1px solid #CCC;
}

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

.asteric {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}

.BotonForma {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8fd6fc), color-stop(1, #0061a7));
	background:-moz-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-webkit-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-o-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-ms-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:linear-gradient(to bottom, #8fd6fc 5%, #0061a7 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fd6fc', endColorstr='#0061a7',GradientType=0);
	background-color:#8fd6fc;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #154682;
}
.BotonForma:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0061a7), color-stop(1, #8fd6fc));
	background:-moz-linear-gradient(top, #0061a7 5%, #8fd6fc 100%);
	background:-webkit-linear-gradient(top, #0061a7 5%, #8fd6fc 100%);
	background:-o-linear-gradient(top, #0061a7 5%, #8fd6fc 100%);
	background:-ms-linear-gradient(top, #0061a7 5%, #8fd6fc 100%);
	background:linear-gradient(to bottom, #0061a7 5%, #8fd6fc 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#8fd6fc',GradientType=0);
	background-color:#0061a7;
}

input#foto{
  color: transparent;
}
.BotonBuscar2 {	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color: #009;
	font-weight:bold;
	font-family:"Comic Sans MS";
	font-size:14px;
	padding: 2px 6px;
	text-decoration:none;
}
.BotonForma1 {	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8fd6fc), color-stop(1, #0061a7));
	background:-moz-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-webkit-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-o-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-ms-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:linear-gradient(to bottom, #8fd6fc 5%, #0061a7 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fd6fc', endColorstr='#0061a7',GradientType=0);
	background-color:#8fd6fc;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #154682;
}
.BotonForma11 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8fd6fc), color-stop(1, #0061a7));
	background:-moz-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-webkit-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-o-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-ms-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:linear-gradient(to bottom, #8fd6fc 5%, #0061a7 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fd6fc', endColorstr='#0061a7',GradientType=0);
	background-color:#8fd6fc;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #154682;
}
</style>
<link href="SpryAssets/SpryTabbedPanels_acc1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.BotonBuscar3 {	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color: #009;
	font-weight:bold;
	font-family:"Comic Sans MS";
	font-size:14px;
	padding: 2px 6px;
	text-decoration:none;
}
.BotonForma111 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8fd6fc), color-stop(1, #0061a7));
	background:-moz-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-webkit-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-o-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-ms-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:linear-gradient(to bottom, #8fd6fc 5%, #0061a7 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fd6fc', endColorstr='#0061a7',GradientType=0);
	background-color:#8fd6fc;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #154682;
}
.BotonBuscar31 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color: #009;
	font-weight:bold;
	font-family:"Comic Sans MS";
	font-size:14px;
	padding: 2px 6px;
	text-decoration:none;
}
.BotonBuscar32 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color: #009;
	font-weight:bold;
	font-family:"Comic Sans MS";
	font-size:14px;
	padding: 2px 6px;
	text-decoration:none;
}
.BotonBuscar321 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #daf2fa), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #daf2fa 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #daf2fa 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#daf2fa', endColorstr='#019ad2',GradientType=0);
	background-color:#daf2fa;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color: #009;
	font-weight:bold;
	font-family:"Comic Sans MS";
	font-size:14px;
	padding: 2px 6px;
	text-decoration:none;
}
.select { font-family: Arial, Helvetica, sans-serif;
	background: #FF9;
	border: thin solid skyblue;	
	border-radius: 4px;
	color: #000;
	font-size: 12px;
	padding: 4px;
}

.select2 { font-family: Arial, Helvetica, sans-serif;
	border: thin solid skyblue;	
	background: #FFF;
	border-radius: 4px;
	color: #000;
	font-size: 12px;
	padding: 4px;
}
</style>
<link href="SpryAssets/SpryTabbedPanels_acc1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.BotonForma1111 {background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8fd6fc), color-stop(1, #0061a7));
	background:-moz-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-webkit-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-o-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-ms-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:linear-gradient(to bottom, #8fd6fc 5%, #0061a7 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fd6fc', endColorstr='#0061a7',GradientType=0);
	background-color:#8fd6fc;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #154682;
}
.BotonForma2 {	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8fd6fc), color-stop(1, #0061a7));
	background:-moz-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-webkit-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-o-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:-ms-linear-gradient(top, #8fd6fc 5%, #0061a7 100%);
	background:linear-gradient(to bottom, #8fd6fc 5%, #0061a7 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fd6fc', endColorstr='#0061a7',GradientType=0);
	background-color:#8fd6fc;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #154682;
}
</style>
</head>

<body>
<table width="800" border="0" align="center" class="border_tabla3">
  <tr>
    <th height="694" align="left" scope="col"><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="form1" id="form1">
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">Datos Generales</li>
          <li class="TabbedPanelsTab" tabindex="0">Busqueda por Apellido / Nombre</li>
        </ul>
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">
            <table width="800" border="0" align="center">
              <tr>
                <th scope="col"><table width="800" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-align: right;" bordercolor="#CCCCCC" align="center" bgcolor="#FFFFFF">
                  <tr>
                    <td align="center"><table width="814" align="center" bgcolor="#EEECE3" class="ComicNormal">
                      <tr valign="baseline" bgcolor="#000099">
                        <td width="122" height="19" align="right" valign="middle"><span class="TitEstado"><a href="index1" class="TitEstado">INICIO</a></span></td>
                        <td colspan="7" align="left" valign="middle"><span class="TitEstado">DATOS PERSONALES</span></td>
                      </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">Cedula  Empleado :</td>
                        <td width="90" valign="middle"><input name="cedula" type="text" id="cedula" value="<?php echo $_SESSION['cedula']; ?>" size="10" autofocus="autofocus"/>
                          <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a></td>
                        <td colspan="2" valign="middle"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)">
                          <input name="button" type="button" class="BotonBuscar" id="button" value="Buscar" onclick="solicitud_accions1()"/>
                        </a></td>
                        <td colspan="3" valign="middle"><span class="TitComic">SELECCIONE ACCION A EFECTUAR</span></td>
                        <td width="123" rowspan="5" align="center" valign="top"><span class="style10"><img src="data:image/jpeg;base64,<?php echo base64_encode($FotoEmpl); ?>" alt="" width="100" height="120" border="1" align="top"/>
                          <?php if ($_SESSION['empleado_cancel'] == 1) {?>
                          <img src="empleado_cancel.gif" width="115" height="22" />
                          <?php }?>
                        </span></td>
                      </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap"><span class="ComicAzul1">Codigo</span> :</td>
                        <td valign="middle"><input name="codigo" id="codigo" type="text" style='text-transform:uppercase;' value="<?php echo $_SESSION['CodigoEmpleado']; ?>" size="3" /></td>
                        <td width="80" valign="middle"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)">
                          <input name="button3" type="button" class="BotonBuscar" id="button3" value="Buscar" onclick="solicitud_accions2()"/>
                        </a></td>
                        <td width="80" align="right" valign="middle"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)">
                          <input name="button6" type="button" class="BotonForma" id="button7" value="Salir" onclick="location='index1'"/>
                        </a></td>
                        <td colspan="3" valign="middle"><select required="required" name="accion" class="select" id="accion" style="width:250px">
                          <?php if ($_SESSION['accion']	== '00') {?><option value="00" disabled selected="selected">Seleccion Accion de Personal</option> <?php }?>
                          <?php
								while ($row_Acciones=sqlsrv_fetch_array($Acciones)) {
							?>
                          <option value="<?php echo $row_Acciones['CodigoCambio']?>"> <?php echo $row_Acciones['Cambio']?></option>
                          <?php
								}
								?>
                        </select></td>
                        </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                        <td colspan="6" valign="middle"><?php if ($_SESSION['no_existe'] == 1 AND $nuevo_empl == 0) {?><img src="empleado_no.gif" width="400" height="22" /><?php }?></td>
                        </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Apellido :</td>
                        <td colspan="6" valign="middle">
                          <input name="apellido" id="apellido" type="text" value="<?php echo $_SESSION['apellido']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="38" />
                          <input name="nombre" id="nombre" type="text" value="<?php echo $_SESSION['nombre']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="32" />
                        </td>
                        </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Direccion :</td>
                        <td colspan="4" valign="middle"><input name="direccion" type="text" id="direccion" value="<?php echo $_SESSION['direccion']; ?>" size="38" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> /></td>
                        <td align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                        <td width="144" valign="middle">&nbsp;</td>
                        </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Sexo :</td>
                        <td valign="middle"><label for="sexo"></label>
                          <select name="sexo" class="select2" id="sexo">
                            <option value="M" <?php if (!(strcmp("M", $_SESSION['sexo']))) {echo "selected=\"selected\"";} ?>>Masculino</option>
                            <option value="F" <?php if (!(strcmp("F", $_SESSION['sexo']))) {echo "selected=\"selected\"";} ?>>Femenino</option>
                          </select></td>
                        <td colspan="3" align="left" valign="middle" nowrap="nowrap">&nbsp; Estado Civil  :
                          <select name="EstadoCivil" class="select2" id="EstadoCivil">
                            <option value="C" <?php if (!(strcmp("C", $_SESSION['EstadoCivil']))) {echo "selected=\"selected\"";} ?>>Casado</option>
                            <option value="S" <?php if (!(strcmp("S", $_SESSION['EstadoCivil']))) {echo "selected=\"selected\"";} ?>>Soltero</option>
                          </select></td>
                        <td width="118" align="right" valign="middle" nowrap="nowrap">Telefono :</td>
                        <td colspan="2" align="left" valign="middle" nowrap="nowrap"><input name="telefono" type="text" id="telefono" value="<?php echo $_SESSION['telefono']; ?>" size="10" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?>  />
  &nbsp; Celular :
  <input name="celular" type="text" id="celular" value="<?php echo $_SESSION['celular']; ?>" size="10" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?>  /></td>
                        </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Rango :</td>
                        <td colspan="4" valign="middle"><input name="rango" type="text" id="rango" value="<?php echo $_SESSION['rango']; ?>" size="38" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?>  /></td>
                        <td width="118" align="right" valign="middle" nowrap="nowrap">Salario :</td>
                        <td colspan="2" align="left" valign="top"><input name="salario" type="text" id="salario" value="<?php echo number_format($_SESSION['salario'],2); ?>" 
                  <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="10"  style="text-align:right"/>
                          &nbsp; T Sangre :
                          <select required="required" name="tiposangre" class="select2" id="tiposangre" style="width:50px">
                            <?php if ($_SESSION['accion']	== '00') {?>
                            <option value="00" disabled="disabled" selected="selected">Seleccion Accion de Personal</option>
                            <?php }?>
                            <?php
								while ($row_TipoSangre=sqlsrv_fetch_array($TipoSangre)) {
							?>
                            <option value="<?php echo $row_TipoSangre['Sangre']?>"> <?php echo $row_Acciones['Sangre']?></option>
                            <?php
								}
								?>
                          </select></td>
                        </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Fecha Nacimiento :</td>
                        <td colspan="4" valign="middle"><input name="FechaNacimiento" type="text" id="FechaNacimiento" value="<?php echo $_SESSION['fechanac'] ?>" size="8" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?>  />
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edad :
                          <input name="edad" type="text" value="<?php echo $_SESSION['edad']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="4"  /></td>
                        <td align="right" valign="middle" nowrap="nowrap">Luga Nacimiento :</td>
                        <td colspan="2" valign="middle"><input name="lugarnac" type="text" value="<?php echo $_SESSION['lugarnac']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="36"  /></td>
                      </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Correo Electronico :</td>
                        <td colspan="4" valign="middle"><input name="email" type="text" value="<?php echo $_SESSION['email']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="38" /></td>
                        <td align="right" valign="middle" nowrap="nowrap">Cuenta Banco :</td>
                        <td colspan="2" valign="middle"><input name="cuentabanco" type="text" id="cuentabanco" value="<?php echo $_SESSION['cuentabanco']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="16" /></td>
                      </tr>
                      <tr valign="baseline">
                        <td width="122" align="right" valign="middle" nowrap="nowrap">Fecha Ingreso :</td>
                        <td colspan="4" valign="middle"><input name="fechaingreso" type="text" id="fechaingreso" value="<?php echo $_SESSION['fechaentra']; ?>" size="8" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?>  />
                          &nbsp;&nbsp; Fech Salida :
                          <input name="fechasal" type="text" value="<?php echo $_SESSION['fechasal']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="8"  /></td>
                        <td width="118" align="right" valign="middle" nowrap="nowrap">Sector :</td>
                        <td colspan="2" valign="middle"><select required="required" name="accion2" class="select" id="accion2" style="width:250px">
                          <?php if ($_SESSION['accion']	== '00') {?>
                          <option value="00" disabled="disabled" selected="selected">Seleccion Accion de Personal</option>
                          <?php }?>
                          <?php
								while ($row_Acciones=sqlsrv_fetch_array($Acciones)) {
							?>
                          <option value="<?php echo $row_Acciones['CodigoCambio']?>"> <?php echo $row_Acciones['Cambio']?></option>
                          <?php
								}
								?>
                        </select></td>
                      </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Provincia :</td>
                        <td colspan="4" valign="middle"><input name="provincia" type="text" id="provincia" value="<?php echo $_SESSION['DireccionProvincia']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="38"  /></td>
                        <td align="right" valign="middle" nowrap="nowrap">Municipio :</td>
                        <td colspan="2" valign="middle"><input name="municipio" type="text" id="municipio" value="<?php echo $_SESSION['DireccionMunicipio']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="36"  /></td>
                      </tr>
                      <tr valign="baseline">
                        <td align="right" valign="middle" nowrap="nowrap">Departamento  :</td>
                        <td colspan="4" valign="middle"><input name="depart" type="text" id="depart" value="<?php echo $_SESSION['depart']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="38"  /></td>
                        <td align="right" valign="middle" nowrap="nowrap">Posicion :</td>
                        <td colspan="2" valign="middle"><input name="posicion" type="text" id="posicion" value="<?php echo $_SESSION['posicion']; ?>" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="36"  /></td>
                      </tr>
                    </table></td>
                  </tr>
                </table>
                  <p></p></th>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="800" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-align: right;" bordercolor="#CCCCCC" align="center" bgcolor="#FFFFFF">
                  <tr>
                    <td align="center"><table width="800" align="center" bgcolor="#EEECE3" class="ComicNormal">
                      <tr valign="baseline">
                        <td colspan="2" align="left" valign="middle" nowrap="nowrap">
                        <div id="TabbedPanels2" class="TabbedPanels2">
                          <ul class="TabbedPanelsTabGroup">
                            <li class="TabbedPanelsTab" tabindex="0">Salario y Fecha Efectividad</li>
                            <li class="TabbedPanelsTab" tabindex="0">Concepto / Anexo</li>
                          </ul>
                          <div class="TabbedPanelsContentGroup">
                            <div class="TabbedPanelsContent">
                              <table width="800" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-align: right;" bordercolor="#CCCCCC" align="center" bgcolor="#FFFFFF">
                                <tr>
                                  <td align="center"><table width="800" align="center" bgcolor="#EEECE3" class="ComicNormal">
                                    <tr valign="baseline" bgcolor="#000099">
                                      <td width="122" height="19" align="right" valign="middle">&nbsp;</td>
                                      <td colspan="3" align="left" valign="middle"><span class="TitEstado">SALARIO Y FECHA</span></td>
                                    </tr>
                                    <tr valign="baseline">
                                      <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">&nbsp;</td>
                                      <td valign="middle">&nbsp;</td>
                                      <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">&nbsp;</td>
                                      <td valign="middle">&nbsp;</td>
                                    </tr>
                                    <tr valign="baseline">
                                    <?php if ($_SESSION['accion'] == '04' OR $_SESSION['accion'] == '06' OR $_SESSION['accion'] == '07') { ?>
                                      <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">Nuevo Salario :</td>
                                      <td valign="middle"><input name="sueldonuevo" type="text" id="sueldonuevo" value="" size="12" style="text-align:right"/>
                                        <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a></td> <?php }?>
                                      <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">Fecha Efectividad :</td>
                                      <td valign="middle"><input name="fechaefectividad" type="date" id="fechaefectividad" value="<?php echo date('Y-m-25') ?>" size="12"/></td>
                                    </tr>
                                    <tr valign="baseline">
                                      <td align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                                      <td valign="middle">&nbsp;</td>
                                      <td align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                                      <td align="right" valign="top">&nbsp;</td>
                                    </tr>
                                    <tr valign="baseline">
                                      <td align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                                      <td width="318" valign="middle">&nbsp;</td>
                                      <td width="136" align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                                      <td width="124" align="right" valign="top">&nbsp;</td>
                                    </tr>
                                  </table></td>
                                </tr>
                              </table>
                            </div>
                            <div class="TabbedPanelsContent">
                              <table width="800" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-align: right;" bordercolor="#CCCCCC" align="center" bgcolor="#FFFFFF">
                                <tr>
                                  <td align="center"><table width="800" align="center" bgcolor="#EEECE3" class="ComicNormal">
                                    <tr valign="baseline" bgcolor="#000099">
                                      <td width="122" height="19" align="right" valign="middle">&nbsp;</td>
                                      <td align="left" valign="middle"><span class="TitEstado">SALARIO Y FECHA</span></td>
                                    </tr>
                                    <tr valign="baseline">
                                      <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">Concepto :</td>
                                      <td valign="middle"><textarea name="concepto" cols="86" rows="4" id="concepto" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?>></textarea>
                                        <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a></td>
                                    </tr>

                                    <tr valign="baseline">
                                      <td align="right" valign="middle" nowrap="nowrap"><span class="ComicAzul1">Anexo :</span></td>
                                      <td valign="middle">
                                        <input type="text" name="anexo" id="anexo" value="" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="86" />
                                      </td>
                                    </tr>
                                    
                                    
                                    <tr valign="baseline">
                                      <td align="right" valign="middle" nowrap="nowrap"><span class="ComicAzul1">Documento Adj. : </span></td>
                                      <td valign="middle">
                                        <input type="text" name="strImagen" id="strImagen" value="" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="70" />
                                        <input type="button" name="button5" id="button4" value="Buscar Anexo" onclick="javascript:subirimagen();"/>
                                     </td>
                                    </tr>
                                  </table></td>
                                </tr>
                              </table>
                            </div>
                          </div>
                        </div></td>
                        </tr>
                      <tr valign="baseline">
                        <td width="146" align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                        <td width="650" valign="middle">                        
						<?php 
							$accion = 0;
							   if ($_SESSION['accion'] != '00' AND $_SESSION['no_existe'] == 0 AND $_SESSION['empleado_cancel'] == 0) {
								  $accion = 1;
								}
								//------------------------
								if ($_SESSION['accion'] == '06' AND $_SESSION['no_existe'] == 0) {		
									$accion = 0;
								}
								if ($_SESSION['accion'] == '06' AND $_SESSION['no_existe'] == 1) {		
									$accion = 1;
								}
								if ($_SESSION['accion'] == '04' AND $_SESSION['empleado_cancel'] == 1) {		
									$accion = 1;
								}
						?> 
                                  
                          <?php if ($accion == 1) { ?>
                          <input name="button4" type="submit" class="BotonForma111" id="button5" value="Grabar Accion" /><?php }?>
                          &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                          <input name="button4" type="button" class="BotonForma" id="button6" value="Salir" onclick="location='index1'"/></td>
                        </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td></td>
              </tr>
            </table>
          </div>
          <div class="TabbedPanelsContent">
            <table width="800" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-align: right;" bordercolor="#CCCCCC" align="center" bgcolor="#FFFFFF">
              <tr>
                <td align="center"><table width="830" align="center" bgcolor="#EEECE3" class="ComicNormal">
                  <tr valign="baseline" bgcolor="#000099">
                    <td width="122" height="19" align="right" valign="middle"><span class="TitEstado"><a href="index1" class="TitEstado">INICIO</a></span></td>
                    <td colspan="4" align="left" valign="middle"><span class="TitEstado">DATOS PERSONALES</span></td>
                  </tr>
                  <tr valign="baseline">
                    <td align="right" valign="middle" nowrap="nowrap" class="ComicAzul1">Apellido / Nombr Empleado :</td>
                    <td colspan="3" valign="middle"><input name="txtapellido" type="text" id="txtapellido" value="" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="26" placeholder="Seleccione Apellido"/>
                      <input name="txtnombre" type="text" id="txtnombre" value="" <?php if ($nuevo_empl != 1) { ?>readonly="readonly"<?php } ?> size="26" placeholder="Seleccione Nombre"/>
                      <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','boton_busca2.jpg',1)">
                        <input name="button2" type="button" class="BotonBuscar31" id="button2" value="Buscar" onclick="solicitud_accions3()"/>
                      </a></td>
                    <td width="106" align="right" valign="top">&nbsp;</td>
                  </tr>
                  <tr valign="baseline">
                    <td align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                    <td width="318" valign="middle">&nbsp;</td>
                    <td width="136" align="right" valign="middle" nowrap="nowrap">&nbsp;</td>
                    <td width="124" align="right" valign="top">&nbsp;</td>
                    <td width="106" align="right" valign="top">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
      <input type="hidden" name="MM_insert" value="form1" />
    </form></th>
  </tr>
</table>
<table width="800" border="0" align="center">
  <tr>  </tr>
</table>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
</script>
</body>
</html>