<?php
  include("stilos/config.inc.php");
  include("../clases/BDConexion.php");
  include("../clases/clsEpp.php");
  include("funcion/funciones.php");
  include("Funciones.php");
  session_start();
  $objEqui=new clsEpp;
  
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><MMString:LoadString id="insertbar/formsHidden" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="Estilos.css" rel="stylesheet" type="text/css">
<link href="stilos/Estilos.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="js/calendario.js"></SCRIPT>
<!-- Copyright 2000,2001 Macromedia, Inc. All rights reserved. -->
<script language="JavaScript"> 
<!--
function EnviarcodPer(){
	var codper = document.form1.var_persona.value;
	window.location="cvp_consul_epp.php?dni="+codper;
	}
function volver(){
		window.location="fondo.php";
          }
//--> 
</script>
<script language="javascript" type="text/javascript">
 function EnviarConsulta(dni,x,y){
   if (document.form1.consulepp[0].checked == true){
							
			if (document.form1.var_persona.value==0){
			  alert('Debe Elegir un personal'); document.form1.var_persona.focus();
			     }else{ 
							var par;
							par = "width=" +x + ",height="+y+","
							par = par + "dependent=no,scrollbars=yes,resizable=yes,"
							par = par + "menubar=no,toolbar=no,status=no"
							var ventana = window.open('cvp_report_epp_pers_print.php?dni='+dni,"print1",par)
							ventana.focus();			
					}
                      
	}else{
  
      						var fechaIni = document.form1.fechaIni.value;
							var fechaFin = document.form1.fechaFin.value;
							var par;
							par = "width=" +x + ",height="+y+","
							par = par + "dependent=no,scrollbars=yes,resizable=yes,"
							par = par + "menubar=no,toolbar=no,status=no"
							var ventana = window.open('cvp_report_epp_pers_total_print.php?fecha1='+fechaIni+'&fecha2='+fechaFin,"print2",par)
							ventana.focus();	
  
  
    }
  }
</script>               
<style type="text/css">
<!--
.Estilo1 {color: #FFFFFF}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<script language="javascript" type="text/javascript">
  function EvaluaEstado(){
      if (document.form1.consulepp[0].checked == true) {
             document.getElementById('ppersona').style.display='block';
			 document.getElementById('prangofecha').style.display='none';
	      } else {
      		document.getElementById('ppersona').style.display='none';
			 document.getElementById('prangofecha').style.display='block';
      } 
}
</script>
</head>

<body background="../imagenes/fondo.jpg">

<table width="400" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="3"><p>&nbsp;</p>
    <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td width="25"><img src="../estilo_tabla/parte_sup_izq.gif" width="25" height="25"></td>
    <td width="680" background="../estilo_tabla/parte_sup_cen.gif" valign="bottom">
      <div align="left" > <span class="lblTituloReporte">Consultar  Equipos EPP</span></div></td>
    <td width="25"><img src="../estilo_tabla/parte_sup_der.gif" width="25" height="25" border="0" usemap="#MapMap"></td>
  </tr>
  <tr>
    <td width="25" background="../estilo_tabla/parte_med_izq.gif">&nbsp;</td>
    <td width="680" height="86" background="../estilo_tabla/parte_med_cen.gif"><div align="center">
        <table width="400" border="0" cellspacing="0" cellpadding="0">
		  <form name="form1" method="post" action="procesos/cvp_Epp_grabar.php" onSubmit='false'>
          <tr>
            <td width="649"><div align="left">
                <table width="400" border="1" cellpadding="0" cellspacing="0" style="<?=$stylo['tabla']?>" bgcolor="<?=$c_fondo['fondo tabla']?>" bordercolor="<?=$bordetabla?>">
                  <tr valign="top" class="lblForm" >
                    <td width="195" rowspan="2" bgcolor="<?=$c_fondo_tr["fondo tr"]?>" class="Estilo1 lblForm" valign="middle">	
                      <p align="center"><strong>Opciones de Consulta </strong></p></td>
                    <td width="5" height="16" class="lblForm">&nbsp;</td>
                    <td width="342" class="lblForm" ><input name="consulepp" type="radio" onClick="EvaluaEstado();" value="radiobutton" checked>
                      Por Persona </td>
                  </tr>
                  <tr valign="top" class="lblForm" >
                    <td class="lblForm">&nbsp;</td>
                    <td class="lblForm" ><input name="consulepp" type="radio" value="radiobutton" onClick="EvaluaEstado();">
Por Rango de Fechas </td>
                  </tr>
                  <tr valign="top" class="lblForm" align="center">
                    <td colspan="3" valign="middle" class="Estilo1 lblForm" >
						<div id="ppersona" style="display:block" align="center">
							<?php echo $objEqui->ListPersonal('var_persona',$dni)?>
                            <input type="hidden" name="dni" value="<?=$dni?>">
                        </div>  
						<div id="prangofecha" style="display:none" align="center">
								<input name="fechaIni" type="text" id="fechaIni"  size="15" value="<?=date("d/m/Y")?>">
								<a onMouseOver="window.status='Calendario';return true;" onMouseOut="window.status='';return true;"  href="javascript:show_calendar('form1.fechaIni');"><img src="../imagenes/calendar.jpg" alt="Calendario" width="16" height="15" border="0"></a>
								<input name="fechaFin" type="text" id="fechaFin"  size="15" value="<?=date("d/m/Y")?>">
								<a onMouseOver="window.status='Calendario';return true;" onMouseOut="window.status='';return true;"  href="javascript:show_calendar('form1.fechaFin');"><img src="../imagenes/calendar.jpg" alt="Calendario" width="16" height="15" border="0"></a> </div>
					  </td>
                    </tr>
                  <? 
			?>
                </table>
            </div></td>
          </tr>
          <tr>
            <td><div align="left"><span class="lblForm">
              </span></div></td>
          </tr>
          <tr>
              <td>
                <div align="center">
                  <table width="415" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="155"><div align="right">
                          <input type="button" name="Submit22" value=".:Consultar:." style="<?=$stylo['st2']?>" class="botira"  onClick="EnviarConsulta('<?=$dni?>',800,600);">
                      </div></td>
                      <td width="139">&nbsp;
                      </td>
                      <td width="121"><div align="left">
                          <input type="button" name="Submit2" value=".:Cancelar:." style="<?=$stylo['st2']?>" class="botira" onClick="volver();">
                      </div></td>
                    </tr>
                  </table>
              </div></td>
          </tr>
		  </form>
        </table>
    </div></td>
    <td background="../estilo_tabla/parte_med_der.gif">&nbsp;</td>
  </tr>
  <tr>
    <td><img src="../estilo_tabla/parte_inf_izq.gif" width="25" height="25"></td>
    <td height="25" background="../estilo_tabla/parte_inf_cen.gif">&nbsp;</td>
    <td><img src="../estilo_tabla/parte_inf_der.gif" width="25" height="25"></td>
  </tr>
</table>
<map name="MapMap">
  <area shape="rect" coords="2,5,22,21" href="fondo.php">
</map>
</body>

</html>

