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

<?php
session_start();

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

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

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

$sigla = $_SESSION['sigla'];
$ip = $_SESSION['ip'];
$maquina = $_SESSION['maquina'];
$fechasist = date('Y-m-d');
$fecha11 = date('Y-m-01');
$fecha12 = date('Y-m-d');
$bodega = 1;
$estado = 0;
$tipo= 0;

$_SESSION['tipo'] = 'DP'; // DEPRECIACION

$idcliente = 0;
$idproducto = 0;

$tipo = $_SESSION['tipo'];
$valorfact = 0;
$impuesto = 0;
$totalfact = 0;

$_SESSION['inicncf'] = '';
$_SESSION['inicialncf'] = '';


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']);
}

mysql_select_db($database_conexionabm, $conexionabm);
$query_UltCaso = sprintf("SELECT * FROM f_deprec ORDER BY DEP_FEC_DEP DESC LIMIT 1");
$UltCaso = mysql_query($query_UltCaso, $conexionabm) or die(mysql_error());
$row_UltCaso = mysql_fetch_assoc($UltCaso);
$totalRows_UltCaso = mysql_num_rows($UltCaso);

$ult_fecha = $row_UltCaso['DEP_FEC_DEP']; 

?>
<!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><?php echo $_SESSION['titpagina'] ?></title>
<link rel="shortcut icon" href="images/favicon.ico" />

<script src="jquery-1.3.2.js" type="text/javascript"></script>
<script src="jquery.maskedinput-1.2.2.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");
$("#celular").mask("999-999-9999");
$("#celsospechoso").mask("999-999-9999");
$("#fecha122").mask("99-99-9999");
$("#fecha222").mask("99-99-9999");
$("#nombre").mask("aa?aaaaaaaaaaaaaaaaaaaaaaaaaaa");
});
</script> 

<script>
$(document).ready(function(){
   $('#boton_asiento').click(function() {
		remote = open('contab_asiento', 'remote',

   		'top=50,left=400, width=950,height=600 location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
		remote.focus()		
	});
});
</script>

<script>
$(document).ready(function(){
   $('#boton_imprime').click(function() {
		remote = open('impr_list_depreciacion', 'remote',

   		'top=50,left=300, width=1000,height=600 location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
		remote.focus()		
	});
});
</script>

<script>
function UltimoDia() {
	var fecha1 = document.form1.fecha1.value;
	
	var annio = fecha1.substr(0,4);
	var mes = fecha1.substr(5,2);
	var dia = fecha1.substr(8,2);
	var	ultdia = fecha1.substr(8,2);

	mes2 = parseInt(mes);
	mes = parseInt(mes2)+1;
	
	if (mes == 13) {
		mes = 01;
		annio = parseInt(annio) + 1
	}
	
	if (mes == 01) {
		ultdia = '31';
	}
	if (mes == 02) {
		ultdia = '28';
	}
	if (mes == 03) {
		ultdia = '31';
	}
	if (mes == 04) {
		ultdia = '30';
	}
	if (mes == 05) {
		ultdia = '31';
	}
	if (mes == 06) {
		ultdia = '30';
	}
	if (mes == 07) {
		ultdia = '31';
	}
	if (mes == 08) {
		ultdia = '31';
	}
	if (mes == 09) {
		ultdia = '30';
	}
	if (mes == 10) {
		ultdia = '31';
	}
	if (mes == 11) {
		ultdia = '30';
	}
	if (mes == 12) {
		ultdia = '31';
	}

	if (mes == 1) {
		mes = '01';
	}
	if (mes == 2) {
		mes = '02';
	}
	if (mes == 3) {
		mes = '03';
	}
		
	if (mes == 4) {
		mes = '04';
	}
		
	if (mes == 5) {
		mes = '05';
	}
		
	if (mes == 6) {
		mes = '06';
	}
		
	if (mes == 7) {
		mes = '07';
	}
		
	if (mes == 8) {
		mes = '08';
	}
	if (mes == 9) {
		mes = '09';
	}		
		

	fecha_texto = annio+"-"+mes+"-"+ultdia;
	document.form1.fecha1.value = fecha_texto;
//	document.form1.fecha3.value = fecha_texto;
} 	
</script>

<script language="javascript">
function pinta(){
	cual=document.getElementById("tabla").rows;

	for(a=0;a<cual.length;a++){
		color(a);
	}
}

function color(b){
	if(b%2==0)
		cual[b].style.backgroundColor="#fff";
	else
		cual[b].style.backgroundColor="#EFEFE9";
}
</script>

<style type="text/css">
#apDiv1 {
	position:absolute;
	left:17px;
	top:0px;
	width:1933px;
	height:92px;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:10px;
	top:17px;
	width:741px;
	height:123px;
	z-index:1;
}
#apDiv3 {
	position:absolute;
	left:1px;
	top:1px;
	width:100%;
	height:150px;
	z-index:1;
}
#apDiv4 {
	position:absolute;
	left:4px;
	top:153px;
	width:190px;
	height:390px;
	z-index:2;
	background-color: #FFFF99;
}
#apDiv5 {
	position:absolute;
	left:14px;
	top:242px;
	width:994px;
	height:161px;
	z-index:3;
	font-weight: bold;
}
#apDiv5 pre {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
}
#apDiv5 table tr td strong {
	color: #03F;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}

.brillo:hover {
	background-color: #F8E6D3;
	font-weight: normal;
	font-size: 12px;
	font-family: Arial, Helvetica, sans-serif;
	color: #000;
	font-style: normal;
	text-align: justify;
}
#Layer1 {
	position:absolute;
	left:3px;
	top:191px;
	width:841px;
	height:56px;
	z-index:4;
}
.producto1 {background-color: #FFF;
	width: 260px;
	float: left;
	margin: auto;
	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
	background-image: url(images/fondoproducto.jpg);
	background-repeat: no-repeat;
}
#apDiv12 {
	position:absolute;
	left:191px;
	top:158px;
	width:44px;
	height:20px;
	z-index:28;
	font-size: 14px;
}
#apDiv {	position:absolute;
	left:2px;
	top:190px;
	width:222px;
	height:111px;
	z-index:2;
	background-color: #CCCCCC;
	border-bottom-color: #000000;
	border-bottom-width: 2px;
	border-color: #000000;
	border-right-color: #000000;
	color: #000000;
}
#apDiv6 {
	position:absolute;
	left:245px;
	top:157px;
	width:274px;
	height:21px;
	z-index:29;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: bold;
	color: #009;
}
#apDiv7 {
	position:absolute;
	left:0px;
	top:178px;
	width:100%;
	height:1px;
	z-index:30;
	background-color: #FF9933;
}
.style4 {font-family: Arial, Helvetica, sans-serif}
.style7 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: normal;
}
#Layer20 {position:absolute;
	left:189px;
	top:-83px;
	width:103px;
	height:22px;
	z-index:125;
}
#Layer6 {	position:absolute;
	left:9px;
	top:126px;
	width:173px;
	height:23px;
	z-index:126;
}
.style9 {
	color: #0033CC;
	font-weight: bold;
}
.style10 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; }
.style11 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	font-weight: bold;
	color: #000066;
}
.style12 {font-size: 12px}
.aria {	font-family: Arial, Helvetica, sans-serif;
}
.arial {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 9px;
	font-weight: normal;
	color: #000;
	text-align: left;
}
.izq {	text-align: left;
}
.izq {	text-align: left;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #009;
}
.izq {
	font-size: 11px;
}
.arial .arial {
	font-size: 14px;
}

.coloruser {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
	color: #F33;
}
.fechas {font-family: Arial, Helvetica, sans-serif;
}
.fechas {	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: normal;
}
.invisibilidad {font-size: 12px;
	visibility: hidden;
}
#form1 label .style7 a {
	text-align: center;
}
#form1 label .style7 a {
	text-align: center;
}
#form1 table tr .fechas p {
	text-align: center;
}
.style11 {
	text-align: center;
	font-size: 14px;
}
.fechas1 {	font-family: Arial, Helvetica, sans-serif;
}
.style41 {font-size: 12}
.style411 {font-size: 12;
	text-align: right;
}
.style42 {	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
#form1 table tr .justicatabla.fechas.style41 {
	font-family: Arial, Helvetica, sans-serif;
}
#form1 table {
	font-size: 12px;
}

.desglose {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	text-align: center;
}

.totaldet {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	text-align: left;
}

.accion{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: normal;
	text-align: center;
	color: #000;
}

.titrepderec{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	text-align: center;
}


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

.totaltit {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
	text-align: center;
	color: #03C;
}

.desglose10 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	text-align: center;
}
.totaldet1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: normal;
	text-align: left;
	color: #000;
}
.borderradio1 {border-radius:8px;
}
.encabez {	font-size: 16px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #009;
}
.normal {	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
}
.textbox {border: 1px solid #A8D3FF;
  font-size: 12px;
  font-family: Arial, Verdana;
  border-radius: 4px;
  color: #2E3133;
  padding: 4px;
  height:20;
}
.titulos {	font-size: 12px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #FFFFFF;
}
.titulos2 {	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #FFFFFF;
}
.brillo .desglose {
	font-size: 11px;
}
.izq {
	text-align: left;
	color: #000;
}

.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;
}

.border_tabla4 {
	style="border-width: 1px;border: solid; border-color: #FF0000;"
}
.boton2 {	-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#019ad2;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:4px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
	width:125px;
	padding:8px 6px;
	text-decoration:none;
}


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

.boton21 {-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#019ad2;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:4px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
	width:125px;
	padding:8px 6px;
	text-decoration:none;
}
.boton22 {-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#019ad2;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:4px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
	width:125px;
	padding:8px 6px;
	text-decoration:none;
}
.boton23 {-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#019ad2;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:4px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
	width:125px;
	padding:8px 6px;
	text-decoration:none;
}
.boton231 {-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#019ad2;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:4px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
	width:125px;
	padding:8px 6px;
	text-decoration:none;
}
.boton232 {-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#019ad2;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:4px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
	width:125px;
	padding:8px 6px;
	text-decoration:none;
}
.boton3 {	
	-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #33bdef), color-stop(1, #019ad2));
	background:-moz-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-webkit-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-o-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:-ms-linear-gradient(top, #33bdef 5%, #019ad2 100%);
	background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
	background-color:#33bdef;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:2px 2px;
	text-decoration:none;
	text-shadow:0px -1px 0px #5b6178;
}
.boton3:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #019ad2), color-stop(1, #33bdef));
	background:-moz-linear-gradient(top, #019ad2 5%, #33bdef 100%);
	background:-webkit-linear-gradient(top, #019ad2 5%, #33bdef 100%);
	background:-o-linear-gradient(top, #019ad2 5%, #33bdef 100%);
	background:-ms-linear-gradient(top, #019ad2 5%, #33bdef 100%);
	background:linear-gradient(to bottom, #019ad2 5%, #33bdef 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#019ad2', endColorstr='#33bdef',GradientType=0);
	background-color:#019ad2;
}
</style>

<script type="text/javascript">
function LlamaDepreciacion() {	
	var fecha1 = document.form1.fecha1.value;

		$("#div_depreciacion").hide();
	
		var xhttp = new XMLHttpRequest();
		xhttp.onreadystatechange = function() {
			if (xhttp.readyState == 4 && xhttp.status == 200) {
				document.getElementById("div_depreciacion").innerHTML = xhttp.responseText;
				$("#div_depreciacion").show();
			}
		};
		xhttp.open("POST", "load_depreciacion", true);
		xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xhttp.send("fecha1="+fecha1);
}
</script>
</head>

<body onLoad="UltimoDia()">
<form id="form1" name="form1" method="post" action="">
  <table width="1024" align="center" class="border_tabla3">
    <tr valign="baseline">
      <td height="36" align="center" valign="middle"  class="fechas"><table width="800" align="center" bgcolor="#EFECE7">
        <tr valign="baseline" bgcolor="#000099">
          <td width="169" align="right" nowrap="nowrap"><a href="index1.php" class="titulos"><span class="titulos2">INICIO</span></a><span class="titulos2"> -</span></td>
          <td width="619" class="encabez"><span class="titulos"><span class="titulos2">DEPRECIACION</span></span></td>
          </tr>
        <tr valign="baseline">
          <td width="169" height="36" align="right" valign="middle"  class="justicatabla">Fecha Proxima Depreciacion  :</td>
          <td height="36" align="left" valign="middle"><span class="normal">
            <input name="fecha1" type="date" class="textbox" id="fecha1" value="<?php echo $ult_fecha; ?>" size="10" onblur="LlamaDepreciacion()"/>
            <button id="boton_buscar" class="boton3" type="button" style="background-image: url(img/img_buscar3.png); background-position:left; background-size:25px 25px; background-repeat:no-repeat; width:75px">Buscar</button>
&nbsp;&nbsp;          </span></td>
          </tr>
        <tr valign="baseline">
          <td align="right" valign="middle"  class="justicatabla">&nbsp;</td>
          <td align="left" valign="middle"  class="justicatabla">&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td align="right" valign="middle"  class="justicatabla"><label for="tipo"></label></td>
          <td align="left" valign="middle"  class="justicatabla">
            <input name="Botón5" type="button" class="boton2" style="background-image: url(img/depreciacion1.png); background-position:left; 
            background-size:35px 28px; background-repeat:no-repeat; width:110px" value="        Depreciar"/>
            <input name="Botón5" type="button" class="boton2" style="background-image: url(img/img_editar.png); background-position:left; 
            background-size:22px 25px; background-repeat:no-repeat; width:120px" value="   Gnra. Asiento"/>
            <input name="boton_asiento" id="boton_asiento" type="button" class="boton2" style="background-image: url(img/buscar3.png); background-position:left; 
            background-size:30px 25px; background-repeat:no-repeat; width:110px" value="   Ver Asiento"/>
            <input name="boton_imprime" id="boton_imprime" type="button" class="boton2" style="background-image: url(img/img_imprimir1.png); background-position:left; 
            background-size:25px 20px; background-repeat:no-repeat; width:100px" value="    Imprimir"/>
            <input name="Botón5" type="button" class="boton2" style="background-image: url(img/img_salir5.png); background-position:left; 
            background-size:25px 20px; background-repeat:no-repeat; width:100px" value="Salir" onclick="location='index1'"/></td>
        </tr>
        <tr valign="baseline">
          <td align="right" valign="middle"  class="justicatabla">&nbsp;</td>
          <td align="left" valign="middle"  class="justicatabla">&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr valign="baseline">
      <td height="21" align="center" valign="middle"  class="fechas"><div id="div_depreciacion"></div></td>
    </tr>
    <tr valign="baseline">
      <td height="36" align="center" valign="middle"  class="fechas">&nbsp;</td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<?php

?>
