<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DFJSISCI.inc");
include("DF80000.php");
include("JQUERY.inc");
?>
<html>
<head>
<link rel="stylesheet" href="css/estilo1.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];
//	}
//	$("#tbus").autocomplete('DYAUTPROD.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
//	});
//});
function act_checkbox(va)
{
	if(va == true){
		document.form1.chk1.value = 0;
		
	}else{
		document.form1.chk1.value = 1;
		
	}
}
function checaDaatos(){
	var tbus=document.getElementById('tbus');
	var tbus2=document.getElementById('tbus2');
        var tbus3=document.getElementById('tbus3');
	var fec=document.getElementById('fec');
	if((tbus.value!="" && tbus2.value!="") || (tbus.value!="" && fec.value!="")){
		alert('Seleccione solo un buscador!!!');
		return false;
	}else{
	busca();
	}
	return true;
}
function busca(){
	getOnLayer({
			action:'rec_checkin_PR-SRV.php',
			idLayer:'regBus'
		},{
			tbus:ge('tbus').value,
            tbus2:ge('tbus2').value,
            tbus3:ge('tbus3').value,
            fec:ge('fec').value
			
	
			
	});
}

</script>
<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	width:1000px;
	height:180px;
	z-index:1;
	left: 93px;
	top: 240px;
}
</style>
<style>
#regBus{
height:400px;
overflow:auto;
}

</style>
</head>
<div align="center">
  <form name="form1" method="post" action="">
    <table width="458" border="0" align="center">
      <tr>
        <th colspan="2"><span class="Estilo1">REGISTRO DE HUESPEDES </span></th>
      </tr>
      <tr style="display:none">
        <th><img src="magnifier.png" alt="Buscar" onClick="alert('Buscar')" />FECHA DE LLEGADA </th>
        <th><div align="left">
        <input name="fec" type="text" class="emplea date" id="fec" size="9" maxlength="20"
			<?php
				$fecha = $dt_empres['fec_alta'];
	            $fechita = chfecha($fecha,'Y-m-d','d/m/Y');
				if(isset($_POST['fec'])){ //este es el truco
					//echo 'value="' . $_POST['fec'] .  '"';
				}else{
					//echo 'value="'.$fechita.'"';
				}
			?>onkeypress="return soloNumeros(event)"//solo fechas
		/>
            </div></th>
      </tr>
      <tr>
        <th> <img src="magnifier.png" alt="Buscar" onClick="alert('Buscar')" />APELLIDO</th>
        <th><div align="left">
          <input name="tbus2" id="tbus2" type="text" onBlur="may(this)" size="30"/>
        </div></th>
      </tr>
      <tr>
        <th width="192"><img src="magnifier.png" alt="Buscar" onClick="alert('Buscar')" /> NUMERO DE HABITACION </th>
        <th width="256"><div align="left">
          <input name="tbus" id="tbus" type="text" onBlur="may(this)" size="30"/>
        </div></th>
      </tr>
      <tr>
        <th> <img src="magnifier.png" alt="Buscar" onClick="alert('Buscar')" />FOLIO</th>
        <th><div align="left"> 
          <input name="tbus3" id="tbus3" type="text" onBlur="may(this)" size="30"/>
        </div></th>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
		<?php //<input name="Submit" type="submit" class="bot_WsW" value="Buscar" /> ?>
		 <input type="button" name="Submit" value="Buscar" class="bot_WsW" onClick="checaDaatos();"/>
        </div></td>
      </tr>
    </table>
  </form>
</div>
<div align="center">
<form name="frm1" id="frm1" method="post" action="">
<input name="vali" type="hidden" 
<?php
 
if (isset($_REQUEST['vali'])){
	echo ' value = "'.$_REQUEST['vali'].'"';
	$nr = $_REQUEST['vali'];
}else{
	echo ' value = "0"';
	$nr = 0;
}
$nr2 =  20;
print_r($fecha)
?>
/>
<table width="1003" border='1'>
      <tr>
        <th colspan="11"> <div align="center">
		  <input name="Submit6" type="button" class="original" onClick="openpage('rec_checkin_AG.php','_self')" value="Agregar"/>
          <input name="bot3" type="Submit" class="bot_WsW"  onClick="openpage('rec_checkin_CO.php','_self')" value="Consultar"/>
          <input name="bot2" type="button" class="original" onClick="openpage('rec_checkin_MO.php','_self')" value="Modificar"/>
          <input name="bot4" type="button" class="bot_WsW" onClick="openpage('rec_checkin_IM.php','_self')" value="Tarjeta de Registro"/>
		  <input name="Submit" type="button" class="original" onClick="openpage('valeryus60300_MO.php','_self')" value="Cambiar Hab"/>
		  <input name="bot5" type="button" class="bot_WsW" onClick="window.open('rec_checkin_RR.php?retPag=rec_checkin_AG.php','popuppage','width=800,height=500,top=100,left=50,scrollbars=yes,menubar=yes,status=yes')" value="Registrar Reservaciones"/>
		  <input name="bot6" type="button" class="original"  onClick="openpage('rec_checkin_AG.php?multiplo=true','_self')" value="Multiplo"/>
          <input name="bot62" type="button" class="bot_WsW"  onClick="openpage('rec_disponibilidad_MO.php','_self')" value="Extras"/>
        </div></th>
      </tr>
      <tr>
        <th width="49" nowrap><div align="center">SEL</div></th>
        <th width="73"  nowrap><div align="center">FOLIO</div></th>
		<th width="202"  nowrap><div align="center">HABITACION</div></th>
		<th width="91"  nowrap><div align="center">FOTOGRAFIA</div></th>
		<th width="105"  nowrap><div align="center">CLIENTE</div></th>
		<th width="125"  nowrap><div align="center">STATUS</div></th>
		<th width="125"  nowrap><div align="center">FECHA DE ENTRADA</div></th>
		<th width="125"  nowrap><div align="center">FECHA DE SALIDA</div></th>
		<th width="125"  nowrap><div align="center">TARIFA</div></th>
	  </tr>
     <tr>
	  <td colspan="10" height="300"><div id="regBus"></div></td>
	</tr>
    </table>
  </form>
</div>
</body>
</html>