<?php 

include("Funciones.php");
include("funcion/funciones.php");
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>EXAMEN FISICO - BARRETT RESOURCES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stilos/Estilos.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Estilo1 {font-size: 14px}
.Estilo3 {font-size: 16px}
.Estilo4 {font-size: 10px}
.Estilo5 {font-size: 9px}
.Estilo6 {font-size: 12px}
.Estilo7 {font-size: 11px}
.Estilo8 {font-size: 10.5px}
.Estilo9 {color: #FFFFFF}
-->
</style>
<SCRIPT language=JavaScript src="js/calendario.js"></SCRIPT>
<SCRIPT LANGUAGE=javascript>
function fn(form,field)
{
var next=0, found=false
var f=form
if(event.keyCode!=13) return;
for(var i=0;i<f.length;i++) {
if(field.name==f.item(i).name){
next=i+1;
found=true
break;
}
}
while(found){
if( f.item(next).disabled==false && f.item(next).type!='hidden'){
f.item(next).focus();
break;
}
else{
if(next<f.length-1)
next=next+1;
else
break;
}
}
}
</SCRIPT>
<script>
function enviar_url(form,url){
	
	if (form1.fecha.value==""){
			alert("Debe Ingresar la Fecha.\n y es Obligatorio");
			return;	
	  						}
	if (form1.nombres.value==""){
			alert("Debe Ingresar el Nombre del Trabajador.\n y es Obligatorio. \n presiona Buscar o Nuevo");
			btn_ver1.focus();
			return;	
	  						}
	if(form1.grabar.value)
	{
		form1.submit();
	}
}
function volver(form){
  location.reload('fondo.php');
  
  }
</script>
<script language="JavaScript"> 
<!--
//sURL,x,y
function Abrir_Ventanapopup1(sURL,x,y) { 
/*var especificaciones="top=0, left=0, toolbar=no,location=no, status=yes,menubar=no,scrollbars=no, resizable=no, width=1,height=1" 
var titulo="Titulo"
window.open(el_url,titulo,especificaciones);*/ 

if (!window.focus) return;
			var par;
			par = "width=" +x + ",height="+y+","
			par = par + "dependent=no,scrollbars=yes,resizable=no"
			par = par + "menubar=no,toolbar=no,status=yes"
			var ventana = window.open(sURL,"Ver",par)
			ventana.focus();
}
//--> 
</script>
<script language="JavaScript"> 
<!--
//sURL,x,y
function Abrir_Ventanapopup2(sURL,x,y) { 
/*var especificaciones="top=0, left=0, toolbar=no,location=no, status=yes,menubar=no,scrollbars=no, resizable=no, width=1,height=1" 
var titulo="Titulo"
window.open(el_url,titulo,especificaciones);*/ 

if (!window.focus) return;
			var par;
			par = "width=" +x + ",height="+y+","
			par = par + "dependent=no,scrollbars=yes,resizable=no"
			par = par + "menubar=no,toolbar=no,status=yes"
			var ventana = window.open(sURL,"Ver",par)
			ventana.focus();
}
//--> 
</script>
<script language="JavaScript" type="text/JavaScript">
function MensajeEditar(m){
if (m==1){window.alert("Se Guardó el Exámen Cardiológico satisfactoriamente")}
if (m==2){window.alert("Ya! Existe Un Exámen Cardiológico Registrado para el Trabajador")}
}
</script>
</head>

<?php

if($aler==1){
     echo "<body onLoad='MensajeEditar(1)'> ";
	} 
else {
     if (empty($aler)){echo "<body background='imagenes/fondo.jpg'>";}
	 if($aler==2){echo "<body onLoad='MensajeEditar(2)'  background='imagenes/fondo.jpg'>";}

    }
?>
<table width="460" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr class="lblCampo" >
    <td colspan="4"><div align="center">
        <table width="319" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;</td>
            <td valign="bottom">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td width="25"><img src="estilo_tabla/parte_sup_izq.gif" width="25" height="25"></td>
            <td width="409" background="estilo_tabla/parte_sup_cen.gif" valign="bottom">
              <div align="left" class="lblTitulo Estilo9" >Ex&aacute;men Cardiol&oacute;logico + EKG </div></td>
            <td width="25"><img src="estilo_tabla/parte_sup_der.gif" width="25" height="25" border="0" usemap="#Map"></td>
          </tr>
          <tr>
            <td width="25" background="estilo_tabla/parte_med_izq.gif">&nbsp;</td>
            <td width="409" height="86" background="estilo_tabla/parte_med_cen.gif"><div align="center">
              <form action="procesos/grabar_examencard.php" method="get" name="form1">
                <table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="74" rowspan="2">&nbsp;</td>
                    <td width="622"><div align="center" class="lblParrafo Estilo1"><em>DEPARTAMENTO DE QHSE- CR</em></div></td>
                    <td width="67" rowspan="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td><div align="center" class="lblParrafo"><em>Perenco Per&uacute; Limited Sucursal del Per&uacute;</em></div></td>
                  </tr>
                  <tr>
                    <td colspan="3"><table width="720" border="1" align="left" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="325" bgcolor="#009900"><div align="center" class="lblSubTitulo Estilo3">
                              <div align="center" class="Estilo9">
                                <div align="center"></div>
                              </div>
                          </div></td>
                          <td width="36" bgcolor="#009900"><span class="rdoBanners Estilo4">FECHA</span></td>
                          <td width="113" bgcolor="#009900" class="rdoBanners Estilo4"><input name="fecha" type="text" class="lblForm" id="fecha2" onKeyUp=fn(this.form,this) value="<? echo $fecha?>" size="12" readonly >
                            <a onMouseOver="window.status='Calendario';return true;" onMouseOut="window.status='';return true;"  href="javascript:show_calendar('form1.fecha');"><img src="imagenes/calendar.jpg" alt="Calendario" width="16" height="15" border="0"></a></td>
                          <td width="34" bgcolor="#009900"><span class="rdoBanners Estilo4">HORA</span></td>
                          <td width="200" bgcolor="#009900"><div align="left">
                            <input name="hora" type="text" class="lblForm" id="fechanac3" onKeyUp=fn(this.form,this) value="<?php $date=time(); $hora1 = date("H",$date); $hora2 = date("i",$date); $hora3 = date("H",$date); echo $horat=($hora1-1).":".$hora2.":".$hora3;?>" size="12" readonly >
                          </div></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td colspan="3"><table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td height="1"><input type="hidden" name="docid"></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td><div align="center" class="lblParrafo">DATOS DE IDENTIFICACI&Oacute;N DEL TRABAJADOR</div></td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" align="left" cellpadding="0" cellspacing="0">
                              <tr>
                                <td width="192" class="rdoBanners Estilo4">NOMBRE (Apellidos y nombres)</td>
                                <td colspan="2" bgcolor="#009900"><div align="left">
                                  <input name="nombres" type="text" class="lblForm" id="nombres2" size="50" readonly onKeyUp=fn(this.form,this)>
</div></td>
                                <td width="127" bordercolor="#009900"><input name="btn_ver1" type="button" class="botira" id="btn_ver1" style="<?=$stylo['st2']?>" value="Buscar" onClick="javascript:Abrir_Ventanapopup1('reg_clinico_ver4.php',465,300)" ></td>
                                <td width="127" bordercolor="#009900"><input name="btn_ver12" type="button" class="botira" id="btn_ver122" style="<?=$stylo['st2']?>" value="Nuevo" onClick="javascript:Abrir_Ventanapopup2('cvp_personal4.php',800,300)" ></td>
                              </tr>
                              <tr>
                                <td class="rdoBanners Estilo4">EDAD</td>
                                <td width="156" bgcolor="#009900"><div align="left">
                                  <input name="edad" type="text" class="lblForm" id="fechanac2" onKeyUp=fn(this.form,this) size="12">
</div>
                                  <div align="center"></div></td>
                                <td colspan="3" bgcolor="#009900" class="rdoBanners Estilo4">&nbsp;</td>
                                </tr>
                              <tr>
                                <td class="rdoBanners Estilo4">COMPA&Ntilde;IA</td>
                                <td bgcolor="#009900"><div align="left">
                                  <input name="comp" type="text" class="lblForm" id="comp" onkeyup=fn(this.form,this) size="30" >
                                </div></td>
                                <td width="106" class="rdoBanners Estilo4">OCUPACION</td>
                                <td colspan="2" class="rdoBanners Estilo4"><input name="ocupa" type="text" class="lblForm" id="lugarnac3" size="30" onKeyUp=fn(this.form,this)></td>
                                </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td bgcolor="#D4D3CA">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">ANTECEDENTES IMPORTANTES</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="ant_impor" cols="80" rows="2" class="lblForm" id="textarea" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td bgcolor="#D4D3CA">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">EXAMEN CLINICO </div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="exa_clini" cols="80" rows="2" class="lblForm" id="textarea2" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td bgcolor="#D4D3CA">&nbsp;</td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">ELECTROCARDIOGRAMA</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="elec_grama" cols="80" rows="2" class="lblForm" id="textarea3" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td bgcolor="#D4D3CA">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">INFORME</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="informe" cols="80" rows="2" class="lblForm" id="textarea4" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td bgcolor="#D4D3CA">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">CONCLUSIONES</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="conclu" cols="80" rows="2" class="lblForm" id="textarea5" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td bgcolor="#D4D3CA">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" cellspacing="1" cellpadding="1">
                            <tr>
                              <td width="231" class="rdoBanners Estilo4"><div align="right">EKG</div></td>
                              <td width="113" class="rdoBanners Estilo4"><input name="ekg" type="radio" class="lblForm" value="NORMAL" <?php if($filas['sexo']=='MASCULINO'){echo "checked";}?>>
                                NORMAL<span class="rdoBanners"></span></td>
                              <td width="91" class="rdoBanners Estilo4"><input name="ekg" type="radio" class="lblForm" value="ANORMAL" <?php if($filas['sexo']=='FEMENINO'){echo "checked";}?>>
                                  <span class="rdoBanners">ANORMAL</span></td>
                              <td width="262" class="rdoBanners Estilo4">&nbsp;</td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">RECOMENDACIONES</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="ekg_rec" cols="80" rows="2" class="lblForm" id="textarea6" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">RESTRICCIONES</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                <textarea name="ekg_restr" cols="80" rows="2" class="lblForm" id="textarea8" onKeyUp=fn(this.form,this)></textarea>
</div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr bgcolor="#009900">
                          <td><table width="720" border="1" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="229" bgcolor="#009900" class="rdoBanners"><div align="right" class="Estilo4">CONCLUSIONES</div></td>
                              <td width="462" bgcolor="#009900"><div align="left">
                                  <textarea name="ekg_conc" cols="80" rows="2" class="lblForm" id="textarea9" onKeyUp=fn(this.form,this)></textarea>
                              </div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td><div align="center">                          </div>                            <div align="center">
                            <table width="720" border="1" cellspacing="1" cellpadding="1">
                              <tr>
                                <td><div align="center">
                                  <input name="nuevo" type="reset" class="lblForm" id="nuevo" value=".:   Nuevo  :.">
                                </div></td>
                                <td><div align="center">
                                  <input name="grabar" type="button" class="lblForm" id="grabar" value=".:   Grabar:." onClick="enviar_url(form1,'procesos/grabar_examencard.php')">
                                </div></td>
                                <td><div align="center">
                                  <input name="salir" type="button" class="lblForm" id="salir" value=".:   Salir  :." onClick="volver(this.form);">
                                </div></td>
                              </tr>
                            </table>
</div>                            <div align="center">                          </div></td>
                          </tr>
                    </table></td>
                  </tr>
                </table>
                <div align="center"></div>
              </form>
                </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 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>
    </div></td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td colspan="4">
      <div align="center"> </div></td>
  </tr>
</table>
<map name="Map">
  <area shape="circle" coords="10,12,9" href="fondo.php">
</map>
</body>
</html>
