<div align="right" id="formulario" style="display:none;"></div>

<div align="center">
  <form name="form1" method="post" action="">
     <table  align="center" bordercolor="#FF6600" bordercolordark="#FF6600">
      
	  <tr>
        <th colspan="2">ALTA DE EVENTOS </th>
      </tr>
      
      <tr>
        <th>BUSQUEDA       </th>
      </tr>
    
      <tr>
        <td colspan="2"><input type="submit" name="Submit" value="Buscar" class="bot_WsW"/>
        <input name="tbus" type="text" onBlur="may(this)" size="30"/></td>
      </tr>
      <tr>
        <th colspan="2">ALTA DE EVENTOS  </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 coalteve ORDER BY nparte1");
	include("DE10000.php");
	?>
<table width="532" border='1' bordercolor="#FF6600" bordercolordark="#FF6600">
      <tr>
        <td colspan="5"> 
          <div align="center"> 
			 <input type="Submit" name="bot3" value="Consultar"  onClick="openpage('CO10000_CO.php','_self')" class="original"/>
          <input type="button" name="bot2" value="Modificar" onClick="openpage('CO10000_MO.php','_self')" class="bot_WsW"/>
          <input type="button" name="bot1" value="Eliminar" onClick="openpage('CO10000_EL.php','_self')" class="bot_RjR"/>
          <input type="button" name="bot4" value="Imprimir " onClick="openpage('CO10000_IM.php','_self')" class="bot_WsW"/>
			
          </div >
   		</td></tr>
<tr>
      <th width="24"  nowrap><div align="center">SEL</div></th>
        <th width="43"  nowrap><div align="center">CLAVE</div></th>
		<th width="247"  nowrap><div align="center">DESCRIPCION</div></th>
		<th width="146"  nowrap><div align="center">GRAMAJE PARA CARNE</div></th>
		<th width="69"  nowrap><div align="center">STATUS</div></th>
    </tr>
	  <?php
$vart=(isset($_POST['tbus']))?$_POST['tbus']:"";
	echo '<input name="txt_bus" type="hidden" value="'.$vart.'">';
        $vars=(isset($_POST['submit']))?$_POST['submit']:"";
	if($vars=="")
	{
		echo '<input name="tip_bus" type="hidden" value="nombre">';
		@$sql = mysqli_query($con ,"SELECT * FROM coalteve WHERE np_desc1 like '%".$vart."%'");
	}
	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		echo '<td> <div align="center"><input name="bot" type="radio" value="'. $reg["nparte1"].'"></div></td>';
		echo "<td> <div align='center' style=' '>" . $reg["nparte1"] . "&nbsp;</div></td>";
		echo "<td> <div align='center' style=' '>" . $reg["np_desc1"] . "&nbsp;</div></td>";
		echo "<td> <div align='center' style=' '>" . $reg["grama"] . "&nbsp;</div></td>";
		echo "<td> <div align='center' style=' '>" . $reg["status"] . "&nbsp;</div></td>";
		echo "</tr>";
	}
	mysqli_close($con);
	?>
  </table>
</div>
</body>
</form>