<?
session_start();
if ($_SESSION['estado'] != "ON")
		{
		?>
		<script>
			parent.location.href = '../index.php';
		</script>
		<? 
		exit();
		}
$id_empresa =$_SESSION['ss_empresa'];
$id_user = $_SESSION['ss_user'];		
?>
<?
include("../conex.php");
?>
<!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=iso-8859-1" />
<title>Cuenta Corriente Proveedor</title>
<script type="text/javascript" src="../css/validarut.js"></script>
<script language="javascript" src="../css/cal.js" type="text/javascript"></script>


<style type="text/css">
<!--
.Estilo11 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }
body {
	background-color: #CCCCCC;
	margin-left: 0px;
	margin-top: 3px;
	margin-right: 0px;
	margin-bottom: 0px;
}
select {
	clear: right;
	float: left;
	height: auto;
	width: 267px;
}
-->
</style></head>

</head>

<body alink="CCCCCC" link="CCCCCC" vlink="CCCCCC">


<form id="form1" name="form1" method="post" action="">
<div align="center">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
    <tr>
		<td width="100%">&nbsp;</td>
	</tr>
     <tr>
		<td width="100%">&nbsp;</td>
	</tr>
     <tr>
		<td width="100%">&nbsp;</td>
	</tr>
	<tr>
		<td width="100%">Cantidad de Cheques a Ingresar</td>
	</tr>
    <tr>
		<td width="100%">&nbsp;</td>
	</tr>
</table>

<table width="90%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="25%">&nbsp;</td>
      	<td width="40%">Nš de Cheques: &nbsp;</td>
      	<td width="20%" align="left"><input type="text" name="cantidad" id="cantidad" style="width:30px" onKeyPress="return validanum(event)">&nbsp;</td>
        <td width="15%">&nbsp;</td>
	</tr>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
    <tr>
		<td width="100%" align="center"><input type="button" name="button" id="button" value="Enviar" onClick="enviar()" /></td>
	</tr>
</table>

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

<script language="javascript">
<!-- Ingreso solo numeros -->
var nav4 = window.Event ? true : false;
function validanum(evt){
	var key = nav4 ? evt.which : evt.keyCode;
	return (key < 13 || (key >= 48 && key <= 57));
	}
</script>


<script language="javascript" type="text/javascript">
function cerrar()
	{
	window.top.open('','_parent','');window.top.close();
	}
function enviar()
	{
	if (document.form1.cantidad.value=='' || document.form1.cantidad.value==0)
		{
		alert ("Ingrese cantidad de cheques");
		return false
		}
	if (document.form1.cantidad.value>12)
		{
		alert ("No puede ingresar mas de 12 cheques");
		return false
		}
	
	window.opener.document.getElementById("txtval").value = document.form1.cantidad.value;
	window.opener.ingresa_cheques();
	cerrar();
	}

</script>