<?php
 
session_start();
$com = "A";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
require_once("DFJQUERY.inc");
include("DF30000.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>

<script language="javascript">
function openWindow(dataGen,valores){
	var objDate=new Date();
	var getVars,getVarsAux,distPage;
	var idVentana;
	for(getVarsAux in valores){
		getVars +='&'+getVarsAux+'='+valores['getVarsAux'];
	}
	if(typeof dataGen.width=='undefined') dataGen.width='800';
	if(typeof dataGen.height=='undefined') dataGen.height='600';
	distPage='?tmr='+objDate.getHours()+objDate.getMinutes()+objDate.getSeconds()+objDate.getDay()+objDate.getMonth()+objDate.getFullYear();
	idVentana=window.open(dataGen.action+distPage+getVars,dataGen.name,'width='+dataGen.width+',height='+dataGen.height+',top=100,left=50,scrollbars=yes,menubar=yes,status=yes');
	return idVentana;
}
</script>
<script language="javascript">
$(document).ready(function(){
	function formatItem(row) {
		return " (<strong>" + row[1] + "</strong>)"+row[0];
	}
	$("#tap2").autocomplete('CXC10600_AU.php',{
		minChars: 1,                 //Caracteres Minimos antes de autocompletar
		//max:3                        //maximo de resultados mostrados, se manda como limit en autosugestion
		delay: 200,                  //Retardo de autocompletar 
		width: 500,                  //ancho del cuadro de despliegue
		highlight: false,            //Resalta letras coincidentes
		autoFill: false,             //autocompleta en texto la posible palabra
		scroll: true,				 //si cuadro tiene barra scroll
		scrollHeight: 300,           //alto del cuadro para el scroll
		formatItem:formatItem,	     //formato de presentacion de las posibles busquedas
		extraParams:{tipBus:'d'}     //Parametros Extra a Mandar en autosugestion
	});
});
</script>

<script language="javascript">
function ocultaMuestra(divVent){
	if(divVent.style.display=='none'){
		divVent.style.display='';

	}else{
		divVent.style.display='none';

	}
}	
	</script>
<body>

<blockquote>
  <form name="frm1" method="post" action=""  enctype="multipart/form-data">
    <table width="612"  align="center">
      <tr>
        <th colspan="4">AGREGAR PROVEEDOR. </th>
      </tr>
      <tr>
        <td width="77"><strong>PROVEEDOR.</strong></td>
        <td width="519" colspan="3"><select name="pdescrip" id="pdescrip" onChange="javascript: document.getElementById('frm1').submit()" tabindex="12">
          <option value="">-----SELECCIONE-----</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM tip_proveedores");
while($reg=mysqli_fetch_array($sql)){
	if($_POST['pdescrip']==$reg['pdescrip'] ){
		echo '<option value="' . $reg['pdescrip'] . '" selected>' . $reg['pdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['pdescrip'] . '">' . $reg['pdescrip'] . '</option>';
	}
}
?>
        </select>
          <span class="Estilo19">
          <input name="Submit22" type="Button" onClick="openpage('CXC10600_AC.php','_self')" value="Guardar">
          <input type="Button" name="Submit2" value="Regresar" onClick="envia1('CXC10600_PR.php','_self')">
  </span></td>
      </tr>
    </table>
    <div id="divVent" style="display:">
      <table width="411"  align="center"  >
      </table>
    </div>
  </form>
</blockquote>
</body>
</html>
<?php
 mysqli_close($con);?>
