<?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="DHSTYLES.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<script language="javascript">
$(document).ready(function(){
	function formatItem(row) {
		return " (<strong>" + row[1] + "</strong>)"+row[0];
	}
	$("#tap2").autocomplete('cat_grupos_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>
<style type="text/css">
#width_wrapper{
width:350px;
margin:0 auto;
margin-top:20px;
margin-bottom:40px;
border:0px solid #000;
background-color:#fff;
background-image:url(img/white_grid.png);
padding:15px;
position:absolute; top:40px; left:350px;
}
#width_wrapper td.titulo{
background-image:url(img/fondotitulos.jpg);
color:#FFF;
font-weight:bold;
text-align:center;
font-size:18px;
font-family:helvetica;
}
#width_wrapper td{
background-color:#28345d;
color:#FFF;
text-align:left;
padding:5px 5px 5px 5px;
}
</style>
<div style="position:absolute; top:20px; left:100px"><img src="img/logo2.png"/></div> 	
<body onLoad = "self.focus (); document.frm1.gcontacto.focus ()">
<div id="width_wrapper" align="center">
<form name="frm1" method="post" action="" enctype="multipart/form-data">
  
  <table width="456" align="center">
    <tr>  <td colspan="2" class="titulo"><div align="center">AGREGAR GRUPO Y PLAN</div> </td>  </tr>
    <tr>
      <th width="130"><strong>DESCRIPCION</strong></th>
      <td width="310" style="#A15E8D"><label>
      <input name="tap2" id="tap2" type="text" tabindex="1"
		  onBlur="may(this)" size="50"
		<?php

			if(isset($_REQUEST['tap2'])){ 
				echo 'value="' . $_REQUEST['tap2'] .  '"';
			}
		?>>
      </label></td>
    </tr>
      <tr>
        <th><strong>CONTACTO</strong></th>
        <td style="#A15E8D"><label>
          <input name="gcontacto" type="text" id="gcontacto" size="40" tabindex="2">
        </label></td>
      </tr>
      <tr>
        <th><strong>GUIA</strong></th>
        <td style="#A15E8D"><label>
          <input name="gguia" type="text" id="gguia" size="40" tabindex="3">
        </label></td>
      </tr>
      <tr>
        <th><strong>FECHA DE LLEGADA</strong></th>
        <td style="#A15E8D"><input name="gfechallegada" type="text" class="emplea" id="gfechallegada" tabindex="4" size="15" maxlength="15"
		  <?php

			  	echo 'value="'.date("d/m/Y").'"'; 
			  
			  ?>
		  />
            <input name="reset" id="bot" type="image" value"Cal" src="logos/cal4.jpg" tabindex="5"/>
            <script type="text/javascript">
				  	Calendar.setup(
    					{
      						inputField  : "gfechallegada",        // ID of the input field
      						ifFormat    : "%d/%m/%Y",    // the date format
      						button      : "bot"      // ID of the button
    					}
  					);
				                </script> </td>
      </tr>
      <tr>
        <th width="130"><strong>FECHA DE SALIDA</strong> </th>
        <td width="310" style="#A15E8D"><input name="gfechasalida" type="text" class="emplea" id="gfechasalida" tabindex="6" size="15" maxlength="20"
		  <?php

			  	echo 'value="'.date("d/m/Y").'"'; 
			  
			  ?>
		  />
            <input name="reset" id="bot2" type="image" value="Cal" src="logos/cal4.jpg" tabindex="7" />
        <script type="text/javascript">
				  	Calendar.setup(
    					{
      						inputField  : "gfechasalida",        // ID of the input field
      						ifFormat    : "%d/%m/%Y",    // the date format
      						button      : "bot2"      // ID of the button
    					}
  					);
				                </script></td>
      </tr>
      <tr>
        <td colspan="2" class="titulo"><div align="center">
        <input name="Submit22" type="Button" class="original" tabindex="8" onClick="openpage('cat_grupos_AC.php','_self')" value="Guardar">
        <input name="Submit2" type="Button" class="bot_WsW" tabindex="9" onClick="envia1('cat_grupos_PR.php','_self')" value="Regresar">
        </div></td>
      </tr>
    </table>
</form>
</div>
</body>
</html>
<?php
 mysqli_close($con);?>