<%@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" %>

<%//@ 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">
        <title><%= resTit.getString("titLstVehiPorRango")%></title>
		<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
		<!--script language="javascript1.2" src="<%//=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Fechas.js"></script-->
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Funciones.js"></script>
			
		<script language="JavaScript">
			    function fncImprimir() {
					var url="m05bVehiPDFRangoJsp.jsp";
					document.formSolicitud.CodCentro.value=document.formSolicitud.Centro.options[document.formSolicitud.Centro.selectedIndex].value;
					var cadena=document.formSolicitud.Grupo.options[document.formSolicitud.Grupo.selectedIndex].value;
                    var car	="";				
					if (cadena!="***"){
					   car=cadena.charAt(0);
                     }
				    document.formSolicitud.GRango.value=car;
				    cadena=document.formSolicitud.Rango.options[document.formSolicitud.Rango.selectedIndex].value;
				    if (cadena=="-1"){
				    	cadena="";}
					document.formSolicitud.CodRango.value=cadena;
					var docu= document.formSolicitud;
			        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
    urlIdioma = "<%=m05bConstantesPaginas.LST_VEH_RANGO%>";
	var rutaCabecera;	//Camino de migas
	<% String ruta="/m05bParqueMovilWar/m05bVehiPorRangoJsp.jsp" ; %>
	rutaCabecera="";
	detActual='<%= resCM.getString("cmLstVehiPorRango")%>';
    //rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstVehiPorRango")%></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();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();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>
		   		       	  <td  align="left" width="40%" colspan="2" class="inputFieldTitle"><%=res.getString("etEstado") %></td>
                     	  <td  align="left" colspan="2" width="60%" class="inputFieldTitle"><%=res.getString("etCentro") %></td>
                     </tr>
		   		     <tr>
                      <td  align="left" colspan="2" valign="top">
                       	  <select class=inputField multiple size="6" NAME="Situacion" onblur="javascript:RecogerSelectMultiple();return false;" >
                       	     <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 align="left" colspan="2" valign="top">
			             <select class=inputField  NAME="Centro" onKeypress="buscar_op(this,this)" onblur="borrar_buffer()" onclick="borrar_buffer()">
			               <option value=""> </option>
			               <%=miCombo2.popCombo( m05bConstantes.COL_05_CODIGO, "NVL("+ campoTexto+m05bConstantes.COL_05_DESC+","+m05bConstantes.COL_05_DESC+")", m05bConstantes.TAB_CENTROS, "", "", "") %>
			             </select>
				       </td>
					</tr>
					<tr>
					 <td height="10%" colspan="4">&nbsp;&nbsp;</td>
					</tr>
								 
		   		     <tr>
    		            <td  class="inputFieldTitle" width="40%" colspan="2" ><%=res.getString("etGrupoRangos") %> </td>
    		            <td  class="inputFieldTitle" width="60%" colspan="2"  ><%=res.getString("etRango") %></td>
                     </tr>
		   		     <tr>
				      <td align="left" colspan="2" >
						 <select class=inputField  NAME="Grupo" onchange="JavaScript:blur();" onKeypress="if ((event.keyCode == 13)||(event.keyCode == 21)){blur();} else {buscar_op(this,this);}" onclick="borrar_buffer();" onblur="Pulsado(Grupo.options[Grupo.selectedIndex].value.split('..')[0], document.formSolicitud.Rango, comboDesc, '');document.formSolicitud.Rango.disabled=false; document.formSolicitud.Rango.focus(); return false;" >				        
					          <option value="***"></option>
					                <%=miCombo.GrupoRango(Grupo,campoTexto3)%>
					     </select>			
				      </td>
				      <td align="left" colspan="2"  >
 				         <select class=inputField  NAME="Rango" 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="10%" colspan="4">&nbsp;&nbsp;</td>
					</tr>
						 
		   		     <tr>
                       <td class="inputFieldTitle" width="40%" colspan="2"> <%=res.getString("etAgrupadoPor") %></td>
    		           <td class="inputFieldTitle" width="60%" ><%=res.getString("etOrdenadoPor") %> </td>
    		         </tr>
    		         	 
    		         <tr>
    		           <td width="40%" colspan="2" style="text-align: left" class="inputField" >
                          <input checked type="Radio" class=inputField onclick="javascript:document.formSolicitud.Agrupado.value='1';" NAME="Agrupado2"    width="40%"  border='0'/><%=res.getString("etDepartamento") %>
                       </td>
    		           <td width="60%" colspan="2" style="text-align: left" class="inputField" >
                          <input checked type="Radio" class=inputField onclick="javascript:document.formSolicitud.Ordenado.value='1';" NAME="Ordena"   VALUE="0" width="40%"  border='0'/><%=res.getString("etFMatriculacion") %>
                       </td>
                     </tr>
				    	
		   		     <tr>
    		           <td width="40%" colspan="2" style="text-align: left" class="inputField" >
                          <input type="Radio" class=inputField onclick="javascript:document.formSolicitud.Agrupado.value='0';"  NAME="Agrupado2"  width="40%" border='0'/><%=res.getString("etSinAgrupar") %> 		  
                       </td>
    		           <td width="60%" colspan="2" style="text-align: left" class="inputField" >
                          <input type="Radio" class=inputField onclick="javascript:document.formSolicitud.Ordenado.value='2';"  NAME="Ordena"  VALUE="1" width="40%" border='0'/><%=res.getString("etMatricula") %>		  
                       </td>
				     </tr>
				     	   

		   		     <tr>
		   	           <td width="40%" colspan="2"></td>
    		           <td  width="60%" colspan="2" style="text-align: left" class="inputField" >
                          <input type="Radio" class=inputField onclick="javascript:document.formSolicitud.Ordenado.value='3';"  NAME="Ordena"  VALUE="2" width="40%" border='0'/><%=res.getString("etCentro") %> 		  
                       </td>
				     </tr>


		   		     <tr>
		   	           <td width="40%" colspan="2"></td>
    		           <td width="60%" colspan="2" style="text-align: left" class="inputField" >
                          <input type="Radio" class=inputField onclick="javascript:document.formSolicitud.Ordenado.value='4';"  NAME="Ordena"  VALUE="3" width="40%" border='0'/><%=res.getString("etKmActuales") %> 		  
                       </td>
				     </tr>
        		    </table>
    		  </td>
            <tr>
    	</table>
		              <input type="hidden" name="Agrupado" value="1">
		              <input type="hidden" name="Ordenado" value="1">
		              <input type="hidden" name="SituacionTexto" value="">
		              <input type="hidden" name="CodCentro" 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>