<html>
<head>
<title>Buscador de Provedores</title>
<script>
var cursor;
		if (document.all) {
		// Está utilizando EXPLORER
		cursor='hand';
		} else {
		// Está utilizando MOZILLA/NETSCAPE
		cursor='pointer';
		}

function buscar() {
	if (document.getElementById("iniciopagina").value=="") {
		document.getElementById("iniciopagina").value=1;
	} else {
		document.getElementById("iniciopagina").value=document.getElementById("paginas").value;
	}
	document.getElementById("form1").submit();
	document.getElementById("tabla_resultado").style.display="";
}

function enviar() {
	document.getElementById("form1").submit();
}

</script>
<link href="../estilos/estilos.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	height: 700px;
}
-->
</style></head>

<?php 

include('../conexion.php');
$cdgbar=$_GET["cdgbar"];
$cdgtippro=$_GET["cdgtippro"];
 ?>


<body onLoad="buscar()">
<form name="form1" id="form1" method="post" action="frame_cabys2.php" target="frame_resultado" onSubmit="buscar()">
  	  	<table class="fuente8" align="center" width="95%">
		
		<input type="hidden" id="cdgtippro" name="cdgtippro" value="<?php echo  $cdgtippro?>">
     <tr>
       <td width="7%" rowspan="2" class="busqueda">&nbsp;</td>
       <td width="7%" rowspan="2" class="busqueda">&nbsp;</td>
       <td>&nbsp;</td>
       <td width="61%" rowspan="2">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
     </tr>
     <tr>
       <td width="2%">&nbsp;</td>
       <td width="8%">&nbsp;</td>
       <td width="22%">&nbsp;</td></tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Descripción:</td>
		  <td>&nbsp;</td>
		  <td><input autofocus  onKeyPress="enviar();"  autocomplete="off" name="dscpro" type="text" id="dscpro" size="50" class="cajaGrande" onChange="buscar();" ></td>
		  <td>&nbsp;</td>
		  <td rowspan="2"><img src="../img/Search_Male_User_Icon_48.png" width="48" height="48" border="0" onClick="enviar()" onMouseOver="style.cursor=cursor"></td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Código:</td>
		  <td>&nbsp;</td>
		  <td><input id="cdgcab" name="cdgcab" type="text"  class="cajaMedia" maxlength="15" style='text-align:left;'  autocomplete="off"  onFocus=" siguienteCampo ='cdgpro';"  onChange="enviar()" title=""></td>
		  <td>&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Impuesto:</td>
           <?php 

                     
						
		    $tipo="SELECT DISTINCT CAST(impuesto AS INT) AS impuesto  FROM `codigoshacienda` ORDER BY impuesto ASC";
                        $resultado5 = $mysqli->query($tipo) 
                        
                ?>        
		  <td>&nbsp;</td>
		  <td><select id="impuesto" name="impuesto"  class="comboMedio" onChange="enviar();" >
           <option value="">Seleccione Impuesto</option>
        <?php
								while ($fila = $resultado5->fetch_assoc()) { ?>
        <option value="<?php echo  $fila["impuesto"]?>"><?php echo  $fila["impuesto"]?></option>
        <?php 
								} ?>
        </select></td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
	  </tr>
</table>
  
  
  
  <table width="95%" id="tabla_resultado" name="tabla_resultado" style="display:none" align="center">
	<tr>
  		<td>
			<iframe width="100%" height="470" id="frame_resultado" name="frame_resultado">
				<ilayer width="100%" height="470" id="frame_resultado" name="frame_resultado"></ilayer>
			</iframe>	
		</td>
	</tr>
</table>
<input type="hidden" id="iniciopagina" name="iniciopagina">
<input type="hidden" id="cdgbar" name="cdgbar" value="<?php echo $cdgbar;  ?>">
<table width="98%" border="0">
  <tr>
    <td><div align="center">
      <img src="../img/Symbol-Delete_48x48-32.png" width="48" height="48" onClick="window.close()" border="0" onMouseOver="style.cursor=cursor">
    </div></td>
  </tr>
</table>
<iframe id="frame_datos" name="frame_datos" width="0%" height="0" frameborder="0">
	<ilayer width="0" height="0" id="frame_datos" name="frame_datos"></ilayer>
</iframe>
</form>
</body>
</html>
