<div align="right" id="formulario" style="display:none;"></div>
<div align="right">
<a style="text-decoration:underline;cursor:pointer;" onClick="pedirDatos()"/><img src="logos/WER.gif" align="center"/></a>
</div>
<div align="center">
  <form name="form1" method="post" action="">
    <table  align="center" bordercolor="#FFCC00" bordercolordark="#FFCC00">
      <tr>
        <th>SUB-AGRUPADORES</th>
      </tr>
      
      <tr>
        <th>BUSQUEDA          </th>
      </tr>
    
      <tr>
        <td colspan="2"><input type="submit" name="Submit" value="Buscar" class="bot_WsW" />
		<img src="magnifier.png" alt="Buscar" onClick="alert('Buscar')" />
        <input name="tbus" type="text" onBlur="may(this)" size="30"/></td>
      </tr>
      <tr>
        <th colspan="2">SUB-AGRUPADORES</th>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
          <input name="tbus2" type="text" id="tbus" onBlur="may(this)" size="50"
		<?php

			if(isset($_POST['tbus'])){ 
				echo 'value="' . $_POST['tbus'] .  '"';
			}
		?>
		/>
        </div></td>
      </tr> 
    </table>
  </form>
</div>
<form name="frm1" method="post" action="" >
<body>
<div align="center">
<?php
 
	$sql = mysqli_query($con ,"SELECT * FROM fsubagrupadores order by codigo");
	include("DE10000.php");
	?>
<table width="820" border='1' bordercolor="#FFCC00" bordercolordark="#FFCC00">
      <tr>
        <td colspan="6"> 
          <div align="center">
			<input type="button" name="bot2" value="Modificar" onClick="openpage('AL20000_MO.php','_self')" class="original"/>
            <input type="button" name="bot4" value="Imprimir " onClick="openpage('AL20000_IM.php','_self')" class="bot_WsW"/>
            <!--input type="button" name="bot42" value="Exporta Exel" onClick="openpage('AL20000_IME.php','_self')"class="original"/-->
          </div >
   		</td></tr>
<tr>
      <th width="30"  nowrap><div align="center"><h4>SEL</h4></div></th>
        <th width="67"  nowrap><div align="center"><h4>CODIGO</h4></div></th>
		<th width="256"  nowrap><div align="center">
		  <h4>DESCRIPCION</h4>
	  </div></th>
		<th width="126"  nowrap><h4>AGRUPADOR</h4></th>
		<th width="201"  nowrap><h4>ALMACEN</h4></th>
      <th width="100"  nowrap><h4>STATUS</h4></th>
    </tr>
	  <?php

	echo '<input name="txt_bus" type="hidden" value="'.$_POST['tbus'].'">';
	if($_POST['r1']=="")
	{
		echo '<input name="tip_bus" type="hidden" value="nombre">';
		@$sql = mysqli_query($con ,"SELECT * FROM fsubagrupadores WHERE np_desc1 like '%".$_POST['tbus']."%'");
	}
	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		echo '<td> <div align="center"><input name="bot" type="radio" value="'. $reg["n_reg"].'"></div></td>';
		echo "<td> <div align='center' style=' '><strong>" . $reg["codigo"] . "&nbsp;</strong></div></td>";
		echo "<td> <div align='center' style=' '><strong>" . $reg["np_desc1"] . "&nbsp;</strong></div></td>";
		$agrupador=mysqli_fetch_array(mysqli_query($con ,"select * from fagrupadores where n_reg='".$reg['almacen']."'"));
		echo "<td> <div align='center' style=' '><strong>" . $agrupador["np_desc1"] . "&nbsp;</strong></div></td>";
		echo "<td> <div align='center' style=' '><strong>" . $reg["descripcion"] . "&nbsp;</strong></div></td>";
		echo "<td> <div align='center' style=' '><strong>" . $reg["t1"] . "&nbsp;</strong></div></td>";
		echo "</tr>";
	}
	mysqli_close($con);
	?>
  </table>
</div>
</body>
</form>