<%@page import="java.util.*,javax.sql.*,java.sql.*,javax.naming.*,java.text.*, m05bClasses.*" %>
<!-- Para poder mostrar caracteres especiales en los mensajes javascript -->
<%@page contentType="text/html; charset=UTF-8" %>

<HTML>
<%	// _______________________________XLNETs______________________________________
	// Evaluar variable de session que indica si esta conectado a XLNets
	if (session.getAttribute("objetoSeguridad") == null)  { 
		// Verificar que no ha transcurrido el tiempo de sesion (web.xml) %>
			<%@ include file="/m05bControlAcceso.inc"%> 
<%	} 
	String persona = (String) session.getAttribute("persona");
%>	
<%@ include file="/m05bIdioma.inc"%>


<head>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
		<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
 <% String sTipo=request.getParameter("Tipo");%>
		  <%if (sTipo.equals("0")){ %>
          <title><%= resTit.getString("titLstResumenItvs")%></title>
		  <%}else if (sTipo.equals("1")){%>
          <title><%= resTit.getString("titLstRevisionVehiculos")%></title>
		  <%}else if (sTipo.equals("2")){%>
          <title><%= resTit.getString("titLstSiniestrosPorVehiculo")%></title>
		  <%}%>

		<!--script language="javascript1.2" src="<%//=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Fechas.js"></script-->
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Funciones.js"></script>
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/formateador.js"></script>
		<script language="JavaScript">
			    function fncImprimir(tipo) {
					var url="";
			    	var docu= document.formSolicitud;
			    	if ((docu.FecDesde.value=="") || (docu.FecHasta.value=="")){
			    		alert(dameAlerta(idioma, 37));
                   } else if (((docu.FecDesde.value != "") && (docu.FecHasta.value != ""))
		    	        && ((!(comparaFechas(docu.FecDesde.value, docu.FecHasta.value))))){
		               alert(dameAlerta(idioma, 67));
		           } else {	
			    	if (tipo=='0'){
					    url="m05bResumenPDFItvJsp.jsp";}
					else if (tipo=='1'){
					    url="m05bRevisionesPDFVehiculosJsp.jsp";}
					else if (tipo=='2'){
					    url="m05bSiniestrosPDFVehiculoJsp.jsp";}
					    
			        docu.action=url;
			        docu.submit();}
			    }            
		    	
		</SCRIPT>
			
</head>
<BODY style="cursor: wait" onkeydown="cancelaEnter();" onload="document.body.style.cursor='default';InitMenu();" onunload="document.body.style.cursor='wait';">
<div id='p01popUpWindowCalendar' style='position:relative; top:15px left:150px'></div>
 <SCRIPT language=JavaScript>
		var urlIdioma;		//URL recarga en funcion del idioma
			<%if (sTipo.equals("0")){ %>
        	 urlIdioma = "<%=m05bConstantesPaginas.LST_REV_RESUMENITV%>";
			<%}else if (sTipo.equals("1")){%>
        	 urlIdioma = "<%=m05bConstantesPaginas.LST_REV_VEHICULOS%>";
			<%}else if (sTipo.equals("2")){%>
        	 urlIdioma = "<%=m05bConstantesPaginas.LST_VEH_SINIESTROS%>";
        	<%}%>
    	var rutaCabecera;	//Camino de migas
			<%if (sTipo.equals("0")){ %>
			  ruta ="/m05bParqueMovilWar/m05bImpDesdeHastaJsp.jsp?Tipo=0" ;
			<%}else if (sTipo.equals("1")){%>
			  ruta ="/m05bParqueMovilWar/m05bImpDesdeHastaJsp.jsp?Tipo=1" ;
			<%}else if (sTipo.equals("2")){%>
			  ruta ="/m05bParqueMovilWar/m05bImpDesdeHastaJsp.jsp?Tipo=2" ;
			<%}%>
    	
		<% String ruta="";
			  
		
		%>
 </SCRIPT>
		<%
		  if (sTipo.equals("0")){ %>
		  <script>
		  	rutaCabecera="";
	        detActual='<%= resCM.getString("cmLstResumenItvs")%>';
            //rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstResumenItvs")%></a>";
		  </script>
		<%} else if (sTipo.equals("1")){%>
	     <script>
		  	rutaCabecera="";
	        detActual='<%= resCM.getString("cmLstRevisionVehiculos")%>';	     
           //rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstRevisionVehiculos")%></a>";
	     </script>
		<%} else if (sTipo.equals("2")){%>
	     <script>
		  	rutaCabecera="";
	        detActual='<%= resCM.getString("cmLstSiniestrosPorVehiculo")%>';	     
           //rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstSiniestrosPorVehiculo")%></a>";
	     </script>
		<%}%>
 <%@ include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>
<p>
<table  width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr valign="top">
		<td width="2%">
			<DIV ID="thessm" style="visibility:hidden;Position : Absolute ;Left : 0 ;Top : 80 ;Z-Index : 20;">
	      		<DIV ID="thessm2" style="Position : Absolute ;Left : (-150) ;Top : 0 ;Z-Index : 20;">
	                <%@ include file="/m05bMenuInicial.inc"%>
	       		</DIV>
			</DIV>
		<td>&nbsp</td>
		<td width="98%">
			<!-- Calendarios -->
       <FORM NAME="formSolicitud" METHOD="POST">
					<!-- Hojas de Estilo -->
						<%	String m05bCalendarEstilo = m05bFicheroProperties.getInstance().getParameter("m05bEstilos.Calendario");  %>
						<%=m05bCalendarEstilo%>
					<!-- Calendarios -->
						<%	String m05bCalendarScripts = m05bFicheroProperties.getInstance().getParameter("m05bScripts.Calendario");  %>
						<%=m05bCalendarScripts%>
       					
		    
								
			<TABLE class="general">
			    <tr >
					  <!--td  align="right"><INPUT TYPE="IMAGE" style="cursor:hand" VALUE="Aceptar" ONCLICK="JavaScript:fncImprimir('<%=sTipo%>');return false;" onMouseOver="top.status='Imprimir'; return true" onMouseOut="top.status=''; return true" src="<%=m05bConstantesPaginas.PATH_IMAGENES%>/imprimir.gif"></td-->
                      <td  align="right"><input type="button" class="boton" name="<%= res.getString("etBOT_PRESENTAR")%>" value="<%= res.getString("etBOT_PRESENTAR")%>" ONCLICK="JavaScript:fncImprimir('<%=sTipo%>');return false;" onMouseOver="top.status='<%= res.getString("etBOT_STATUSPRESENTAR")%>'; return false" onMouseOut="top.status=''; return false" /></td>				      					  					  
				</tr>
			</TABLE>
					
		  <TABLE class="general">
		  	<tr> 
		      <td width="5%">
		   		  <TABLE class="general">
				       <tr>
				       		 <%	if ((sTipo.equals("2")) || (sTipo.equals("0"))){ %>
				       		 <td colspan="3" class="inputFieldTitle">&nbsp;</td>
					         <td colspan="2"  align="left" class="inputFieldTitle"><%= res.getString("etFDesde")%></td> 
					         <td colspan="2"  align="left" class="inputFieldTitle"><%= res.getString("etFHasta")%></td>
					         <%}else{%>
					         <td colspan="2"  align="left" class="inputFieldTitle"><%= res.getString("etFDesde")%></td> 
					         <td colspan="2"  align="left" class="inputFieldTitle"><%= res.getString("etFHasta")%></td>
					   		 <%}%>
					    </tr>	 					 
						<tr> 
						     <%if ((sTipo.equals("2")) || (sTipo.equals("0"))){ %>
						     <td style="text-align: left" class="inputField" >
                             	<input checked type="Radio" class=inputField onclick="javascript:document.formSolicitud.Listado.value='0'" NAME="Tipo"   VALUE="0" width="40%"  border='0'/><%= res.getString("etTodas")%>
                           	 </td>
	    		             <td colspan="2"width="35%" style="text-align: left" class="inputField" >
	    		             <%if (sTipo.equals("2")) { %>
	                            <input type="Radio" class=inputField onclick="javascript:document.formSolicitud.Listado.value='1';"  NAME="Tipo"  VALUE="1" width="40%" border='0'/><%= res.getString("etPendientes")%> 		  
	                         <%}else{%>
	                            <input type="Radio" class=inputField onclick="javascript:document.formSolicitud.Listado.value='1';"  NAME="Tipo"  VALUE="1" width="40%" border='0'/><%= res.getString("etVencidas")%> 		  
	                         <%}%>
	                         </td>
	                         
	                         <td width="10%" align="left"><INPUT class="inputFieldOblig" TYPE="TEXT" NAME="FecDesde" VALUE="" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"></td>
							 <td width="10%" align="left"><a href='#' name='anchorFDesde'  onClick='JavaScript:showCalendar("anchorFDesde",idioma,document.all("FecDesde"),true,25,10,2002);return false;' onMouseOver="top.status='Ver Calendario'; return true" onMouseOut="top.status=''; return true" ><img border="0" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif' name="calendario5"/></td> 
							 <td width="10%" align="left"><INPUT class="inputFieldOblig" TYPE="TEXT" NAME="FecHasta" VALUE="" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"></td>
							 <td width="35%" align="left" ><a href='#' name='anchorFHasta'  onClick='JavaScript:showCalendar("anchorFHasta",idioma,document.all("FecHasta"),true,25,10,2002);return false;' onMouseOver="top.status='Ver Calendario'; return true" onMouseOut="top.status=''; return true" ><img border="0" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif' name="calendario6"/></td>
	                         <%}else{%>
							 <td width="10%" align="left"><INPUT class="inputFieldOblig" TYPE="TEXT" NAME="FecDesde" VALUE="" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"></td>
							 <td width="10%" align="left"><a href='#' name='anchorFDesde'  onClick='JavaScript:showCalendar("anchorFDesde",idioma,document.all("FecDesde"),true,25,10,2002);cambiaPosCal(20,175);return false;' onMouseOver="top.status='Ver Calendario'; return true" onMouseOut="top.status=''; return true" ><img border="0" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif' name="calendario5"/></td> 
							 <td width="10%" align="left"><INPUT class="inputFieldOblig" TYPE="TEXT" NAME="FecHasta" VALUE="" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"></td>
							 <td width="70%" align="left" ><a href='#' name='anchorFHasta'  onClick='JavaScript:showCalendar("anchorFHasta",idioma,document.all("FecHasta"),true,25,10,2002);return false;' onMouseOver="top.status='Ver Calendario'; return true" onMouseOut="top.status=''; return true" ><img border="0" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif' name="calendario6"/></td>
					    	 <%}%>
					    </tr>
    	         </table>
		              <input type="hidden" name="Listado" value='0'>
    	         				 
</FORM>		    		
		</td>
	</tr>
	<tr>
			<td colspan="7"><%@ include file="/mantenimientosJSP/includes/m05Pie_c.jsp"%></td>
	</tr>
</table>
<SCRIPT language='javascript'>
    setTimeout('initSlide();', 1);
</SCRIPT>
</BODY>
</HTML>