<?
session_start();
if ($_SESSION['estado'] != "ON")
		{
		?>
		<script>
			parent.location.href = '../index.php';
		</script>
		<? 
		exit();
		}
$id_empresa = $_SESSION['ss_empresa'];
$id_user = $_SESSION['ss_user'];
$id_autoriza=42;
?>
<?
/*Sesiones*/
include("../conex.php");
include("../autoriza.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>Pago clientes</title>
<style type="text/css">
<!--
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>
<div align="center">
<p>Seleccione Proveedor </p>
<script type="text/javascript" src="../css/validarut.js"></script>
<script language="JavaScript" src="../css/cal.js" type="text/JavaScript"></script>
<form id="form1" name="form1" method="post" action="caja.php" target="mainFrame">

	<table width="665" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="47">R.U.T.</td>
    <td width="138"><input name="txtrut" id="txtrut" value="<?=$txtrut;?>" type="text" onBlur="comprueba()"  onkeypress="return valida(event);" size="23" maxlength="12"/></td>
    <td width="29" align="left"><a onClick="JavaScript:PopWindow('buscacliente.php')"> <img id="foto1" name="foto1" align="middle" border="0" src="../Images/modificar.gif" style="cursor:pointer" title="Presione aqui para buscar cliente" width="16" height="16" /> </a></td>
    
     <td width="10%" align="center"><input type="submit" name="Submit" value="Ver"/></td>
     
    <td width="69" align="right"><div align="left">Seņor: &nbsp;</div></td>
    <td width="291"><input name="txtrsoc" id="txtrsoc" type="text" size="42" value="<?=$txtrsoc;?>"  />    </td>
  
  </tr>
</table>

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

<script language="javascript" type="text/javascript">
var nav4 = window.Event ? true : false;
function cerrar()
	{
	window.top.open('','_parent','');
	window.top.close();
	}
function PopWindow(pagina)
	{
	if (pagina=='buscacliente.php')
		{
		window.open(pagina,'TEST','width=682,height=550,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=70,left=300');
		
		}
	else
		{
		window.open(pagina,'TEST','width=100,height=100,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no,top=70,left=300');
		}
	}
function comprueba()
	{
	if (Rut(document.form1.txtrut.value)) PopWindow('compruebaf.php?rutc='+document.form1.txtrut.value);
	}
	
function valida(evt)
	{
	var key = nav4 ? evt.which : evt.keyCode;
	if (key==13) document.form1.txtrsoc.focus()
	return (key <= 13 || (key >= 48 && key <= 57) || (key == 107) || (key == 75) || (key == 45) || (key == 46));
	}		
</script>