<?
session_start();
require('../valtiempoinact.php');
require("../conectar.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <head>
         <script language="javascript" src="js/jquery-1.2.6.min.js"></script>

		 <style>
		     .cont-busc{position:relative;width:850px;height:auto;min-height:400px !important;font-family:arial;color:#086A87;top:10px;overflow-x:hidden;margin:auto;}
			  .cont-busc .bar-busc{position:relative;width:900px;height:90px;font-family:arial;color:#086A87;top:0px;margin:auto;}
			  .cont-res{position:relative;width:900px;font-family:arial;color:#086A87;top:0px;margin:auto;}
			  .datos{border:0;-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px;-khtml-border-radius: 5px;border-collapse: collapse;color:#0d0d0d;font-size:11px;}
			  .datos .tl{-moz-box-shadow:inset 0 0 20px #000000;-webkit-box-shadow: inset 0 0 20px #000000;box-shadow: inset 0 0 20px #000000;}
			  .datos .trs{min-height:30px !important;max-height:30px !important;height:30px !important;background:url(images/tcancion.jpg) repeat-x;color:#ffffff;font-size:10px;}
              .datos .trsb{min-height:15px !important;max-height:15px !important;height:15px !important;background:url(images/tcancion2.png);color:#58D3F7;font-size:11px;}
			  .datos .trsb td{border-left:solid 1px #6E6E6E;}
			  .datos .trsb td:first-child{border-left:none;}
			  .datos .tr{min-height:20px !important;max-height:20px !important;height:20px !important;background:#ffffff;border-top:solid 1px #D8D8D8; color:#084B8A;font-size:10px;}
			  .datos .trb{min-height:20px !important;max-height:20px !important;height:20px !important;background:#ffffff;border-top:solid 1px #D8D8D8; color:#084B8A;font-size:13px;}
			  .datos .trb td{border-left:solid 1px #D8D8D8;padding-left:10px;}
			  .datos .trb td:first-child{border-left:none;}
			   
			  .datos .tr td{border-left:solid 1px #D8D8D8;padding-left:10px;}
			  .datos .tr td:first-child{border-left:none;}
	          .datos .tr:hover{background:#01A9DB;color:#ffffff;}	
	          .datos .tr:hover a{color:#ffffff;}
              .datos .tr1{min-height:20px !important;max-height:20px !important;height:20px !important;background:#E0F8F7;border-top:solid 1px #D8D8D8; color:#084B8A;font-size:10px;}	
              .datos .tr1 td{border-left:solid 1px #D8D8D8;padding-left:10px;}
			  .datos .tr1 td:first-child{border-left:none;}
	          .datos .tr1:hover{background:#01A9DB;color:#ffffff;}	
	          .datos .tr1:hover a{color:#ffffff;}	
			  .datos .activo{min-height:20px !important;max-height:20px !important;height:20px !important;background:#F3E2A9;border-top:solid 1px #D8D8D8; color:#084B8A;font-size:13px;}
			  .loading{position:fixed;left:50%;top:50%;width:250px;height:70px;margin-left:-125px;margin-top:-35px;display:none;background:url(images/bkloading.png);background-repeat:no-repeat;color:#ffffff;padding-top:25px;text-align:center;font-family:arial;font-size:12px;}
               .rentas{position:absolute;top:40px;width:800px;left:50%;margin-left:-421px;border:solid 1px  #D8D8D8; background:#FFFFFF; display:none;padding:20px;-Moz-box-shadow: 0 0 85px #000;-webkit-box-shadow: 0 0 85px #000; box-shadow: 0 0 85px #000;}
               .rentatab{border-collapse:collapse;color:#0d0d0d;font-family:arial;font-size:12px;}
               .rentatab .filatit{min-height:20px !important;max-height:20px !important;height:20px !important;background:#D8D8D8;border-top:solid 1px #D8D8D8;font-size:13px;}			   
               .rentatab .fila{min-height:20px !important;max-height:20px !important;height:20px !important;background:#ffffff;border-top:solid 1px #D8D8D8; color:#084B8A;font-size:12px;}
               .rentatab .fila td{border-left:solid 1px #D8D8D8;padding-left:5px;}
               .rentatab .fila td:first-child{border-left:none;}
               .cerrar{float:right;margin-top:-20px;margin-right:-20px;}	
			   .sinfor{text-decoration:none}
             
p#vtip { display: none; position: absolute; padding: 5px; left: 5px; font-size: 1em; background-color: #83C023; border: 1px solid #83C023; -moz-border-radius: 5px; -webkit-border-radius: 5px; z-index: 9999;color:#000000 }
p#vtip #vtipArrow { position: absolute; top: -10px; left: 5px }
.vtip{cursor:pointer;}			   
	     </style>
		 <script>
		 var pagina=0;
		     function buscar(v,l){
			    var todo=document.getElementById("todos");
				var ac=document.getElementById("activos");
				var ac=document.getElementById("inactivos");
				var nom,apa,ama;
				if(v){todo.value="no";todo.checked=false;}
				if(todo.value=="si"){
				 nom="";apa="";ama="";
				 tod=document.getElementById("todos").value;
				 document.getElementById("nombre").value="";
			     document.getElementById("apat").value="";
			     document.getElementById("amat").value="";
				 document.getElementById("activos").checked=false;
			     document.getElementById("inactivos").checked=false;
				 act=document.getElementById("activos").value;
				 inact=document.getElementById("inactivos").value;
				}else{
				 tod=document.getElementById("todos").value;
				 act=document.getElementById("activos").value;
				 inact=document.getElementById("inactivos").value;
			     nom=document.getElementById("nombre").value;
			     apa=document.getElementById("apat").value;
			     ama=document.getElementById("amat").value;
			     }
				 $(".loading").fadeIn('fast');load=true;
				 $.post("buscaE.php", {nomb:nom,apat:apa,amat:ama,todos:tod,pag:pagina,act:act,inact:inact}, function(data){
	                  $("#cont-res").html(data);
	             });
			 }
			 function select(id){
				 n=document.getElementById(id);
				 if(n.align=="false"){
			     $("#"+id).addClass("activo");
				 n.align="true";
				 }else{
				 $("#"+id).removeClass("activo");
				 n.align="false";
				 }
			 }
			 function abre(idc){
			     $.post("buscarentas.php", {idcliente:idc}, function(data){
	                  $(".rentas").html(data);
	             });
			     $(".rentas").slideDown('slow');
			 }
		 </script>
     </head>
	 <body>
	             <div class="cont-busc">
			     <div class="bar-busc">
				     <table class="datos" width="850">
					     <tr>
						     <td colspan="8" align="center" class="tl">
							     <b>Busqueda de Empleados</b>
							 </td>
					     </tr>
				         <tr class="trs">
						     <td>Nombre: </td>
							 <td><input type="text" name="nombre"  id="nombre" onkeyup="javascript:buscar(true,true);"></td>
							 <td>Apellido paterno: </td>
							 <td><input type="text" name="apat" id="apat" onkeyup="javascript:buscar(true,true);"></td>
							 <td>Apellido materno: </td>
							 <td><input type="text" name="amat" id="amat" onkeyup="javascript:buscar(true,true);"></td>
						 </tr>
						 <tr class="trs">
						     <td>Activos</td>
							 <td><input type="checkbox" name="activos" id="activos" value="" onclick="javascript:if(this.checked==1){this.value='act',buscar('true',true)}else{this.value='inact',buscar('true',true)}"></td>
						     <td>Inactivos</td>
							 <td><input type="checkbox" name="inactivos" id="inactivos" value="" onclick="javascript:if(this.checked==1){this.value='act',buscar('true',true)}else{this.value='inact',buscar('true',true)}"></td>
						     <td>Ver todos: </td>
							 <td><input type="checkbox" name="todos" id="todos" value="no" onclick="javascript:if(this.checked==1){this.value='si',buscar('',true)}else{this.value='no',buscar('',true)}"></td>
						 </tr>
				     </table>
				 </div>
				 <div id="cont-res" class="cont-res">
				 </div>
				 </div>
				<div class="loading">
			      <img src="images/loading.gif"><br>cargando datos...
				</div>
				<div class="rentas">
				</div>
     </body>
</html>