<?
session_start();
if ($_SESSION['estado'] != "ON")
		{
		?>
		<script>
			parent.location.href = '../index.php';
		</script>
		<? 
		exit();
		}
$id_empresa = $_SESSION['ss_empresa'];         // **************  20/07/09  **************
$id_user = $_SESSION['ss_user'];

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Informe Desposte</title>
<?
include("../conex.php");
$id_bodega=$_POST["lstbodega"];

if ($id_bodega==0) $bodegas='Todos';
else
	{
	$sql_bv = "SELECT * FROM bodega WHERE id = $id_bodega";
  	$resbv = mysql_query($sql_bv,$enlace);	
	while (mysql_fetch_object ($resbv))
			{
			$bodegas = mysql_result($resbv, 0, "descripcion");
			}
	}



$txtfecha=$_POST["txtfecha"];
$txtfecha1=$_POST["txtfecha1"];

$dia = substr ($txtfecha, 0, 2);
$dia1 = substr ($txtfecha1, 0, 2);
$mes = substr ($txtfecha, 3, 2);
$mes1 = substr ($txtfecha1, 3, 2);
$mes2=$mes;

$año = substr ($txtfecha, 6, 4);
$año1 = substr ($txtfecha1, 6, 4);

$ini = $año.'/'.$mes.'/'.$dia;
$fin = $año1.'/'.$mes1.'/'.$dia1;
 


?>
<style type="text/css">
<!--
.Estilo1 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;}
.Estilo4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
</head>
<body LINK="#FFFFFF" VLINK="#FFFFFF" ALINK="#FFFFFF"><br>
<div align="center" class="titulos2"> INFORME DE CAJA <?=$bodegas?>  Desde <?=$dia.'/'.$mes.'/'.$año?> Hasta <?=$dia1.'/'.$mes1.'/'.$año1?> </div>
<table width="23%"border="0"  align="center">
      <tr bgcolor="#CCCCCC">
	  	<th scope="col"><div align="left">Ventas </div></th>
</table>

<table width="52%"border="0"  align="center">
<tr bgcolor="#CCCCCC">
	  	<th scope="col"><div align="center">Fecha</div></th>
		<th scope="col"><div align="center">Documentos</div></th>
        <th scope="col"><div align="center">Valor</div></th>
      </tr>

<?	
			$credito=0;
			$contadov=0;
			$contado=0;
        	$documento=0;
			$tventa=0;
			$tvalor=0;
			$cont=0;
			$espacio=' ';
			$fecha ="";
   if ($id_bodega==0)
   {
	 $sqlfs = "SELECT * FROM salida, tipo_dcto, nombres WHERE fecha_emision>='$ini' AND fecha_emision<='$fin' AND  (tipo_dcto.descripcion='FACTURA' OR tipo_dcto.descripcion='NC' OR tipo_dcto.descripcion='ND') AND tipo_dcto.id = salida.tipo_dcto AND salida.empresa = $id_empresa AND rut=rut_cliente ORDER BY num_dcto";
  }
  else
  {
   $sqlfs = "SELECT * FROM salida, tipo_dcto, nombres WHERE fecha_emision>='$ini' AND fecha_emision<='$fin' AND  (tipo_dcto.descripcion='FACTURA' OR tipo_dcto.descripcion='NC' OR tipo_dcto.descripcion='ND') AND tipo_dcto.id = salida.tipo_dcto AND salida.empresa = $id_empresa AND rut=rut_cliente and bodega=$id_bodega ORDER BY num_dcto";
  }
  
		  	$resfs = mysql_query($sqlfs,$enlace);			
						
			while (mysql_fetch_object ($resfs))
				{
				$detalle = mysql_result($resfs, $cont, "descripcion");
				$nombre = mysql_result($resfs, $cont, "razon_social");
				$dcto = mysql_result($resfs, $cont, "num_dcto");
				$fecha = mysql_result($resfs, $cont, "fecha_emision");
				$dia = substr ($fecha, 8, 2);
				$ano = substr ($fecha, 2, 2);
				$mes = substr ($fecha, 5, 2);
				$fecha = "$dia/$mes/$ano";
				$venta = mysql_result($resfs, $cont, "total");
				$tipo_pago= mysql_result($resfs, $cont, "tipo_pago");
			if ($tipo_pago==3)  {$credito=$credito+$venta;} 
			    else {$contadov=$contadov+$venta;}
			
				$tventa=$tventa+$venta;        
				$venta=number_format($venta,0,',','.');
			
			$cont+=1;
			}
		$tcontado = $contadov;
		 $tventa=number_format($tventa,0,',','.');
		$contadov=number_format($contadov,0,',','.');
		$credito=number_format($credito,0,',','.');		
?>

<tr>
<td width="14%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong><?=$fecha?></strong></span></div></td>
				
<td width="56%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong>Total Ventas </strong></span></div></td>

<td width="30%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong> <?=$tventa?> </strong></span></div></td>


</tr>
<tr>
<td width="14%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Contado</strong></span></div></td>
				
<td width="56%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$contadov?></strong></span></div></td>
</tr>
<tr>
<td width="14%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Credito</strong></span></div></td>
<td width="56%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong> <?=$credito?> </strong></span></div></td>


</tr>
			
</table>
<table width="23%"border="0"  align="center">
  <tr bgcolor="#CCCCCC">
  	<th scope="col"><div align="left">Pagos </div></th>
</table>		
 <table width="61%"border="0"  align="center">
<tr bgcolor="#CCCCCC">
	  	<th scope="col"><div align="center">Fecha</div></th>
		<th scope="col"><div align="center">Factura</div></th>
        <th scope="col"><div align="center">Valor</div></th>
      </tr>

<?	
		$contado=0;
        $documento=0;
		if ($id_bodega==0)
		{
		$sql_cpc = "SELECT * FROM documentos_clientes WHERE  fecha_em>='$ini' AND fecha_em<='$fin'";
  		}
		else
		{
		$sql_cpc = "SELECT * FROM documentos_clientes, cabeza_pago_cliente, vendedor WHERE  id_cpc=cabeza_pago_cliente.id AND cabeza_pago_cliente.id_vendedor=vendedor.id AND vendedor.id_bodega=$id_bodega AND fecha_em>='$ini' AND fecha_em<='$fin'";
		}
		
		
		$res_cpc = mysql_query($sql_cpc,$enlace);
				
			$cont=0;
			while (mysql_fetch_object ($res_cpc))
			{
				$dcto = mysql_result($res_cpc, $cont, "monto");	
				$documento=$documento+$dcto;
		        $cont+=1;
			 }
			 
	if ($id_bodega==0)
	{		 
  
   $sqlfs = "SELECT * FROM pago_cliente, nombres, cabeza_pago_cliente, vendedor WHERE cabeza_pago_cliente.fecha>='$ini' AND cabeza_pago_cliente.fecha<='$fin' AND  tipo='A' AND empresa = $id_empresa AND pago_cliente.rut=nombres.rut AND id_cpc=cabeza_pago_cliente.id AND cabeza_pago_cliente.id_vendedor=vendedor.id  ORDER BY cabeza_pago_cliente.fecha";
   }
   else
   {
    $sqlfs = "SELECT * FROM pago_cliente, nombres, cabeza_pago_cliente, vendedor WHERE cabeza_pago_cliente.fecha>='$ini' AND cabeza_pago_cliente.fecha<='$fin' AND  tipo='A' AND empresa = $id_empresa AND pago_cliente.rut=nombres.rut AND id_cpc=cabeza_pago_cliente.id AND cabeza_pago_cliente.id_vendedor=vendedor.id AND id_bodega=$id_bodega ORDER BY cabeza_pago_cliente.fecha";
   }
  
		  	$resfs = mysql_query($sqlfs,$enlace);	
			$cont=0;
			
			while (mysql_fetch_object ($resfs))
				{
				$id_cpc= mysql_result($resfs, $cont, "id_cpc"); 
				$comprobante= mysql_result($resfs, $cont, "comprobante"); 
				$nombre = mysql_result($resfs, $cont, "razon_social");
				$fecha = mysql_result($resfs, $cont, "cabeza_pago_cliente.fecha");
				$dia = substr ($fecha, 8, 2);
				$ano = substr ($fecha, 2, 2);
				$mes = substr ($fecha, 5, 2);
				$fecha = "$dia/$mes/$ano";
                $detalle = mysql_result($resfs, $cont, "descripcion");	
				$valor = mysql_result($resfs, $cont, "valor");			
				$tvalor+=$valor;
				$valor=number_format($valor,0,',','.');
				$detallepagocontado='';
				$detallepagotranferencia='';
				$detallepagodocumento='';	
				
				 $contados= mysql_result($resfs, $cont, "contado");
				  $tranferencias= mysql_result($resfs, $cont, "tranferencia");
				   $documentos= mysql_result($resfs, $cont, "documento");
				 if ($contados!=0)  $detallepagocontado='Contado';
				 if ($tranferencias!=0)  $detallepagotranferencia='Transferencia';
				 if ($documentos!=0)  $detallepagodocumento='Documento';  
				
				
?>
<tr>
<td width="13%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong><?=$fecha?></strong></span></div></td>
				
<td width="76%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong><?=$detalle?><?=$espacio?><?=$nombre?><?=$espacio?> Tipo_Pago<?=$espacio?><?=$detallepagocontado?><?=$espacio?><?=$detallepagotranferencia?><?=$espacio?><?=$detallepagodocumento?> </strong></span></div></td>

<td width="11%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$valor?></strong></span></div></td>


</tr>			


<?
			
			$cont+=1;
			}
		 $contado=$tvalor-$documento;
		 $tcontado = $tcontado + $contado;
		  $tcontado=number_format($tcontado,0,',','.');
		 $tvalor=number_format($tvalor,0,',','.');
		$contado=number_format($contado,0,',','.');
		$documento=number_format($documento,0,',','.');		
?>

<tr>
<td width="13%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong></strong></span></div></td>
				
<td width="76%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong>Totales</strong></span></div></td>

<td width="11%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong> <?=$tvalor?> </strong></span></div></td>


</tr>
<tr>
<td width="13%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Contado</strong></span></div></td>
				
<td width="76%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$contado?></strong></span></div></td>
</tr>
<tr>
<td width="13%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Documento</strong></span></div></td>
<td width="76%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong> <?=$documento?> </strong></span></div></td>
</tr>		
</table>

<table width="23%"border="0"  align="center">
      <tr bgcolor="#CCCCCC">
	  	<th scope="col"><div align="left">Resumen </div></th>
</table>

 <table width="36%"border="0"  align="center">
<tr bgcolor="#CCCCCC">
	  	
		<th scope="col"><div align="center">Detalle</div></th>
        <th scope="col"><div align="center">Valor</div></th>
      </tr>
	<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Contado Ventas</strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$contadov?></strong></span></div></td>
</tr>
<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Contado Pagos Cta.Cte.</strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$contado?></strong></span></div></td>
</tr>
<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Total Contado</strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$tcontado?></strong></span></div></td>
</tr>
<tr>
<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong></strong></span></div></td>
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong></strong></span></div></td>

</tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Documento Pagos Cta.Cte.</strong></span></div></td>
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong> <?=$documento?> </strong></span></div></td>
</tr>		
</table>

<table width="23%"border="0"  align="center">
  <tr bgcolor="#CCCCCC">
  	<th scope="col"><div align="left">Documentos Recibidos </div></th>
</table>		
 <table width="58%"border="0"  align="center">
<tr bgcolor="#CCCCCC">
	  	<th scope="col"><div align="center">Fecha</div></th>
        <th scope="col"><div align="center">Banco</div></th>
		<th scope="col"><div align="center">NºCheque</div></th>
        <th scope="col"><div align="center">NºCuenta</div></th>
        <th scope="col"><div align="center">Vence</div></th>
        <th scope="col"><div align="center">Valor</div></th>
      </tr>

<?	
	
        $documento=0;
		
		if ($id_bodega==0)
		{
			$sql_cpc = "SELECT * FROM documentos_clientes, cabeza_pago_cliente, vendedor, banco WHERE  id_cpc=cabeza_pago_cliente.id AND cabeza_pago_cliente.id_vendedor=vendedor.id  AND fecha_em>='$ini' AND fecha_em<='$fin' AND banco.id=id_banco";
  		}
		else
		{
		$sql_cpc = "SELECT * FROM documentos_clientes, cabeza_pago_cliente, vendedor, banco WHERE  id_cpc=cabeza_pago_cliente.id AND cabeza_pago_cliente.id_vendedor=vendedor.id AND id_bodega=$id_bodega AND fecha_em>='$ini' AND fecha_em<='$fin' AND banco.id=id_banco";
		}
		
  		$res_cpc = mysql_query($sql_cpc,$enlace);
				
			$cont=0;
			while (mysql_fetch_object ($res_cpc))
			{
			$banco = mysql_result($res_cpc, $cont, "descripcion");
			$cheque = mysql_result($res_cpc, $cont, "cheque");
			$cuenta = mysql_result($res_cpc, $cont, "ctacte");
			$fecha = mysql_result($res_cpc, $cont, "fecha_em");
				$dia = substr ($fecha, 8, 2);
				$ano = substr ($fecha, 2, 2);
				$mes = substr ($fecha, 5, 2);
				$fecha = "$dia/$mes/$ano";

			$vence = mysql_result($res_cpc, $cont, "fecha_ven");
				$dia = substr ($vence, 8, 2);
				$ano = substr ($vence, 2, 2);
				$mes = substr ($vence, 5, 2);
				$vence = "$dia/$mes/$ano";

			$monto = mysql_result($res_cpc, $cont, "monto");	
			$documento+=$monto;
		     $monto=number_format($monto,0,',','.');	


?>
<tr>
<td width="12%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$fecha?></strong></span></div></td>
				
<td width="15%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$banco?></strong></span></div></td>
<td width="16%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$cheque?></strong></span></div></td>
<td width="19%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$cuenta?></strong></span></div></td>
<td width="16%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong><?=$vence?></strong></span></div></td>
<td width="22%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$monto?></strong></span></div></td>
</tr>

<?
   $cont+=1;
	}
	 $documento=number_format($documento,0,',','.');
?>
<tr>
<td width="12%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong></strong></span></div></td>
<td width="15%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong></strong></span></div></td>
<td width="16%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong></strong></span></div></td>				
<td width="19%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="center"><span class="Estilo1"><strong>Total Ventas </strong></span></div></td>
<td width="16%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong></strong></span></div></td>
<td width="22%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong> <?=$documento?> </strong></span></div></td>


</tr>
</table>



<?	
		$contado=0;
		$tranferencia=0;
        $documento=0;
		
		if ($id_bodega==0)
		{
		$sql_cpc = "SELECT * FROM cabeza_pago_cliente, vendedor WHERE cabeza_pago_cliente.id_vendedor=vendedor.id  AND fecha>='$ini' AND fecha<='$fin'";
  		}
		else
		{
		$sql_cpc = "SELECT * FROM cabeza_pago_cliente, vendedor WHERE cabeza_pago_cliente.id_vendedor=vendedor.id AND id_bodega=$id_bodega AND fecha>='$ini' AND fecha<='$fin'";
		}
		
  		$res_cpc = mysql_query($sql_cpc,$enlace);
				
			$cont=0;
			while (mysql_fetch_object ($res_cpc))
			{
			    $conta = mysql_result($res_cpc, $cont, "contado");
				 $tranf = mysql_result($res_cpc, $cont, "tranferencia");
				$dcto = mysql_result($res_cpc, $cont, "documento");	
			$contado+=$conta;
			$tranferencia+=$tranf;
     		$documento+=$dcto;	
		        $cont+=1;
	        }
		 $total = $contado + $tranferencia + $documento;
		 
		  $contado=number_format($contado,0,',','.');
		  $tranferencia=number_format($tranferencia,0,',','.');
		  $documento=number_format($documento,0,',','.');		
		  $total=number_format($total,0,',','.');
	
?>



<table width="23%"border="0"  align="center">
  <th scope="col"><div align="left"> </div></th>    
</table>
<table width="23%"border="0"  align="center">
      <tr bgcolor="#CCCCCC">
	  	<th scope="col"><div align="left">Control </div></th>
</table>

 <table width="36%"border="0"  align="center">
<tr bgcolor="#CCCCCC">
	  	
		<th scope="col"><div align="center">Detalle de pagos</div></th>
        <th scope="col"><div align="center">Valor</div></th>
      </tr>
	<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Pago contado</strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$contado?></strong></span></div></td>
</tr>
<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Transferencias</strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$tranferencia?></strong></span></div></td>
</tr>
<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Pago con dctos</strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$documento?></strong></span></div></td>
</tr>
<tr>
<td width="65%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="left"><span class="Estilo1"><strong>Total pagos </strong></span></div></td>
				
<td width="35%" style="border-color:#CCCCCC; border:solid; border-width:2px; border-right-width:1px"><div align="right"><span class="Estilo1"><strong><?=$total?></strong></span></div></td>
</tr>		
</table>		


		
<form name="form1" method="post" action="">
	<table width="150" border="0" align="center">
	<tr>
		<td width="30%" align="rigth">
			<input type="submit" name="salir" value="Salir" onClick="fun_salir();"/>
		</td>
		<td width="70%" align="right">
			<input type="button" name="imprimir" id="imprimir" value="Imprimir" onClick="fun_imprimir();">
		</td>
	</tr>
</table>
		<input name="idsalidaant" type="text" id="idsalidaant" style="visibility:hidden" size="1">
    </form>


  </div>
</body>
</html>

<script language="javascript" type="text/javascript">
function cerrar()
{
window.top.open('','_parent','');
window.top.close();
}
function fun_eliminar(cual)
	{
	document.form1.idsalidaant.value=cual;
	document.form1.action="anular.php";
	document.form1.target="_self";
	document.form1.submit();
	}
function fun_salir()
	{
	window.top.open('','_parent','');window.top.close();
	}
function fun_imprimir()
	{
	document.getElementById('salir').style.display = "none";
	document.getElementById('imprimir').style.display = "none";
	window.print();
	document.getElementById('salir').style.display = "block"
	document.getElementById('imprimir').style.display = "block";
	};
</script>