<%@page import="java.io.*,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" %>

<%//@ include file="/principalJSP/m05bintern.jsp"%>

<!-- Fecha de creacion: (31/01/05) -->
<%@ include file="/m05bIdioma.inc"%>

	
<HTML>

<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
<head>
	
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
 <% String sTipo=request.getParameter("Tipo");%>
		  <%if (sTipo.equals("0")){ %>
              <title><%= resTit.getString("titLstGasNoVerificados")%></title>
		  <%}else{%>
              <title><%= resTit.getString("titLstGasFestivos")%></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 (tipo=='0'){
					    url="m05bGastoPDFNoVerificadoJsp.jsp";}
			    	else if (tipo=='1'){
			    		url="m05bGastoPDFFestivoJsp.jsp";}
					docu.CodTarjeta.value=docu.Tarjeta.options[docu.Tarjeta.selectedIndex].value;
					docu.Matricula.value=docu.CMatricula.options[docu.CMatricula.selectedIndex].value;
					var cadena=docu.Grupo.options[docu.Grupo.selectedIndex].value;
                    var car	="";
					if (cadena!="***"){
					   car=cadena.charAt(0);
					}
				    docu.GRango.value=car;
				    cadena=docu.Rango.options[docu.Rango.selectedIndex].value;
				    if (cadena=="-1"){
				    	cadena="";}
					docu.CodRango.value=cadena;
					
 	               if ((docu.FecDesde.value != "") && (docu.FecHasta.value == "")) {
		    		  alert(dameAlerta(idioma, 34));
		    	   } else if ((docu.FecDesde.value == "") && (docu.FecHasta.value != "")) {
		    		  alert(dameAlerta(idioma, 35));
		    	   } else if (((docu.FecDesde.value != "") && (docu.FecHasta.value != ""))
		    	        && ((!(comparaFechas(docu.FecDesde.value, docu.FecHasta.value))))){
		               alert(dameAlerta(idioma, 67));
		           } else {					
					//if (document.formSolicitud.FecDesde.value != ""){
					//formatearFecha(document.formSolicitud.FecDesde);}
					//if (document.formSolicitud.FecHasta.value != ""){
					//formatearFecha(document.formSolicitud.FecHasta);}
	
					
			        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_GST_NOVERIFICADOS%>";
        <%}else{%>
          urlIdioma = "<%=m05bConstantesPaginas.LST_GST_FESTIVOS%>";
        <%}%>  
		var rutaCabecera;	//Camino de migas
		<% String ruta;
			if (sTipo.equals("0")){ 
			  ruta ="/m05bParqueMovilWar/m05bTarjGastosNoVerificadosJsp.jsp?Tipo=0" ;}
			else{
			  ruta ="/m05bParqueMovilWar/m05bTarjGastosNoVerificadosJsp.jsp?Tipo=1" ;
			}  
		%>
 </SCRIPT>
		<%
		  if (sTipo.equals("0")){ %>
		  <script>
		   detActual='<%= resCM.getString("cmLstGasNoVerificados")%>';
	       rutaCabecera="";
           /*rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstGasNoVerificados")%></a>";*/
		  </script>
		<%} else {%>
	     <script>
		   detActual='<%= resCM.getString("cmLstGasFestivos")%>';
	       rutaCabecera="";	     
           /*rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstGasFestivos")%></a>";*/
	    </script>
		<%}%>
 <%@ include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>
<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Pulsado.js"></script>
<script>
function RecogerSelectMultiple(){			  
    var Obj = document.formSolicitud('Situacion');
    var len = Obj.length
    	
    var i,texto,cont;
        texto="";
        cont=1;
    for (i=1; i<len; i++) {
      if (Obj[i].selected) {
      	   if (cont==1){ 
             texto= Obj[i].value;}
            else{ 
            	texto=texto + "," +Obj[i].value;}
            cont=cont+1;
       }
   }
   document.formSolicitud.SituacionTexto.value=texto;
   //PulsarMultiple(document.formSolicitud.Situacion.options[document.formSolicitud.Situacion.selectedIndex].value, document.formSolicitud.CMatricula, CmbDesc, '',texto);
          }   
</script> 
	 
<%
	String situacion = "";
	String Grupo="";
%>
<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%>
       					
	<% 		m05bCombo miCombo = new m05bCombo();
		    m05bCombo miCombo2 = new m05bCombo();%>
					<SCRIPT language="javascript">
    						var comboDesc=new Array();
					        <%=miCombo.joinComboArrayGrupos(campoTexto3)%>
					</script>
					<SCRIPT language="javascript">
    						var CmbDesc=new Array();
                    <%=miCombo.joinComboArray( m05bConstantes.COL_34_SITUACION + ", '" +m05bConstantes.PARAM_NOUSADO+"'",m05bConstantes.COL_34_MATRICULA , m05bConstantes.TAB_VEHICULOS, "")%>
					</script>
								
			<TABLE class="general">
			    <tr align="right">
					  <!--td width="100%" 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 width="100%" 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 width="100%" class="general"  style="VALIGN:TOP">
		  	<tr> 
		      <td width="100%">
		   		  <TABLE width="100%" class="general" >
		   		     <tr>
                      <td width="35%" colspan="2" class="inputFieldTitle" ><%= res.getString("etGrupoRangos")%></td>
					  <td  class="inputFieldTitle" colspan="4" ><%= res.getString("etRangos")%></td>
                     </tr>
		   		     <tr>
				      <td width="20%" align="left"  >
					     <select name="Grupo" class="inputField"  onchange="JavaScript:blur();" onKeypress="if (event.keyCode == 13){ Pulsado(Grupo.options[Grupo.selectedIndex].value.split('..')[0], document.formSolicitud.Rango, comboDesc, '');document.formSolicitud.CMatricula.text='';return false;} else {buscar_op(this,this);}" onclick="borrar_buffer();" onblur="Pulsado(Grupo.options[Grupo.selectedIndex].value.split('..')[0], document.formSolicitud.Rango, comboDesc, '');document.formSolicitud.CMatricula.text='';return false;borrar_buffer();">
					          <option value="***"></option>
					                <%=miCombo.GrupoRango(Grupo,campoTexto3)%>
					     </select>
    		    	 </td>
	                 <td width="15%"></td>
				     <td width="75%" align="left"  colspan="4">
				         <select class=inputField  NAME="Rango" onchange="javascript:document.formSolicitud.CMatricula.text='';" onKeypress="buscar_op(this,this)" onblur="borrar_buffer()" onclick="borrar_buffer()">
				    	     <option value=""> </option>	
				    	       	<%=miCombo.popCombo( m05bConstantes.COL_99_CODDESC, "NVL("+ campoTexto+m05bConstantes.COL_99_DESCRIPCION+","+m05bConstantes.COL_99_DESCRIPCION+")", m05bConstantes.TAB_DESCRIPCIONES, m05bConstantes.COL_99_CODTABLA, m05bConstantes.DESC_RANGOS, "")%>
				    	  </select>
				    </td>
					</tr>
					<tr>
					  <td height="15%" colspan="7">&nbsp;&nbsp;</td>
					</tr>
		   		
		   		     <tr>
		   		   	  <td width="35%" align="left" colspan="2" class="inputFieldTitle"><%= res.getString("etSituacion")%></td>
    		          <td class="inputFieldTitle" colspan="5" ><%= res.getString("etMatricula")%> </td>
                     </tr>
		   		     <tr valign="top">
                      <td width="20%" align="left" >
                       	  <select class=inputField size="6" multiple NAME="Situacion" onblur="javascript:RecogerSelectMultiple();borrar_buffer();return false;" onchange="javascript:document.formSolicitud.CMatricula.disabled=false;" onKeypress="buscar_op(this,this)" onclick="borrar_buffer()">
                       	     <option value=""> </option>
                       	     	 <%=miCombo.popCombo( m05bConstantes.COL_99_CODDESC, "NVL("+ campoTexto+m05bConstantes.COL_99_DESCRIPCION+","+m05bConstantes.COL_99_DESCRIPCION+")", m05bConstantes.TAB_DESCRIPCIONES, m05bConstantes.COL_99_CODTABLA, m05bConstantes.DESC_SITUACIONES, "" )%>
         				  </select>
					  </td>
					  <td width="15%"></td>
				      <td align="left"  colspan="4">
			  			  <select  class=inputField  NAME="CMatricula" onchange="JavaScript:document.formSolicitud.Grupo.text='';document.formSolicitud.Rango.text='';document.formSolicitud.Grupo.text='';" onKeypress="buscar_op(this,this)" onblur="borrar_buffer()" onclick="borrar_buffer()">
				    	     <option value=""> </option>	
						                <%=miCombo.ComMatricula(m05bConstantes.VEH_TODOS,"")%>
				    	  </select>
				      </td>
					</tr>
					<tr>
					 <td height="15%" colspan="7">&nbsp;&nbsp;</td>
					</tr>
		   		     <tr>
		   	          <td width="35%" colspan="2" align="left"  class="inputFieldTitle" ><%= res.getString("etTarjeta")%></td>
    		          <td  class="inputFieldTitle" colspan="2" ><%= res.getString("etFechaDesde")%></td>
    		          <td  class="inputFieldTitle" colspan="3" ><%= res.getString("etFechaHasta")%></td>          
                     </tr>
    		         <tr>
		   	          <td width="20%" align="left" >
				         <select class=inputField  NAME="Tarjeta" onKeypress="buscar_op(this,this)" onblur="borrar_buffer()" onclick="borrar_buffer()">
				    	     <option value=""> </option>	
				    	       	<%=miCombo.popComboCargarDistinct( m05bConstantes.COL_14_TARJETA, m05bConstantes.COL_14_TARJETA, m05bConstantes.TAB_HIST_TARJETAS)%>
				    	  </select>
                      </td>
     		  		  <td width="15%"></td>
                      <td width="9%" align="left"><INPUT class="inputField" TYPE="TEXT" NAME="FecDesde" VALUE="" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"></td>
                      <td width="25%" align="left"><a href='#' name='anchorFEntre'  onClick='JavaScript:showCalendar("anchorFEntre",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" align="bottom" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif' name="calendario1"/></td>
                      <td width="9%" align="left"><INPUT class="inputField" TYPE="TEXT" NAME="FecHasta" VALUE="" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"></td>
        			  <td width="28%" align="left"><a href='#' name='anchorFYEntre'  onClick='JavaScript:showCalendar("anchorFYEntre",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" align="bottom" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif' name="calendario2"/></td>
				     </tr>
				     <tr>
    		           <td   style="text-align: left" class="inputField" colspan="6">
    		              <input type="RADIO" class="inputField" NAME="CombPeaje" CHECKED VALUE="1" width="40%"  border='0'  /><%= res.getString("etCombustible")%>
    		           </td>
    		         </tr>
				     <tr>
    		           <td   style="text-align: left" class="inputField" colspan="6">    		        
                          <input type="RADIO" class="inputField" NAME="CombPeaje" VALUE="2" width="40%"  border='0'  /><%= res.getString("etPeaje")%>				
    		           </td>
    		         </tr>       
					 <tr>
    		           <td   style="text-align: left" class="inputField" colspan="6">    		                           
                          <input type="RADIO" class="inputField" NAME="CombPeaje" VALUE="3" width="40%"  border='0'  /><%= res.getString("etTodos")%>					
                       </td>
                     </tr>				
        		    </table>
    		  </td>
            <tr>
    	</table>
		              <input type="hidden" name="SituacionTexto" value="">
		              <input type="hidden" name="CodTarjeta" value="">
		              <input type="hidden" name="Matricula" value="">
		              <input type="hidden" name="GRango" value="">
		              <input type="hidden" name="CodRango" value="">
		              		
</FORM>		    		
		</td>
	</tr>
	<tr>
			<td colspan="3"><%@ include file="/mantenimientosJSP/includes/m05Pie_c.jsp"%></td>
	</tr>
</table>
<SCRIPT language='javascript'>
    setTimeout('initSlide();', 1);
</SCRIPT>
</BODY>
</HTML>