<%@page import="java.util.*,javax.sql.*,java.sql.*,javax.naming.*,m05bClasses.*" %>
<%@include file="/mantenimientosJSP/includes/m05b.inc"%>

<%
	// _______________________________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"%> 
<%  } %>
	<%@ include file="/m05bIdioma.inc"%>


<HTML>
<head>
		<title><%= resTit.getString("titAsigBusqueda")%></title>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
		<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/formateador.js"></script>
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Funciones.js"></script>
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Horas.js"></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
			var rutaCabecera;	//Camino de migas
			var detActual;		//Ventana actual
			urlIdioma = "<%=m05bConstantesPaginas.VEH_ASIG_BUSQUEDA%>";
			detActual = '<%=resCM.getString("cmAsigBusqueda")%>';
			rutaCabecera="";
			//rutaCabecera = "<%=m05bConstantesPaginas.DATOS_CABECERA%>" + urlIdioma + "'>\\"+detActual+"</a>";
		</SCRIPT>
		<%@ include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>

 <p>
<table  width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr><td colspan=3></td></tr>
	<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>
		<td>&nbsp</td>
		<td width="98%">
		 <FORM NAME="FormBusqAsignacion" METHOD="POST">
				<!-- Calendarios -->
				<% m05bComun comun = new m05bComun(); %>
				<%	String m05bCalendarEstilo = comun.leerPropiedad("m05bEstilos.Calendario");  %>
				<%=m05bCalendarEstilo%>
				<%	String m05bCalendarScripts = comun.leerPropiedad("m05bScripts.Calendario");  %>
				<%=m05bCalendarScripts%>
				<TABLE class="general">
					 <tr><td align="right" colspan="8">
							<input type="button" class="boton" name="<%= res.getString("etBOT_BUSCAR")%>" value="<%= res.getString("etBOT_BUSCAR")%>" ONCLICK="JavaScript:fncBuscar();return false;" onMouseOver="top.status='<%= res.getString("etBOT_STATUSBUSCAR")%>'; return false" onMouseOut="top.status=''; return false" />
					 </td></tr>
				</TABLE> 	 
				 <TABLE class="general">
				    <tr>
				       <td class="inputFieldTitle" width="33%" colspan="3"><%= res.getString("etSolicitud")%></td>
				       <td class="inputFieldTitle" colspan="6"><%= res.getString("etMatricula")%></td>
				       <!--td class="searchTitle" width="33%" colspan="3"><%= res.getString("etFinalizada")%></td-->
				    </tr>
					<tr>
				      <td align="left" colspan="3"><INPUT class="inputField" TYPE="TEXT" NAME="NSolicitud" value="<%=((request.getParameter("NSolicitud")==null)?"":request.getParameter("NSolicitud"))%>" size="22" maxlength="10" >
				      <td align="left" colspan="6"> <INPUT class="inputField" TYPE="TEXT" NAME="Matricula" value="<%=((request.getParameter("Matricula")==null)?"":request.getParameter("Matricula"))%>"size="22" maxlength="20"/> </td>
					  <!--td align="left" colspan="6"> <INPUT class="inputField" TYPE="CHECKBOX" NAME="Finalizada" VALUE="N"></td-->
		  			</tr>
				    <tr>
				       <td class="inputFieldTitle" colspan="3"><%= res.getString("etFechaDesde")%></td>
				       <td class="inputFieldTitle" colspan="3"><%= res.getString("etFechaHasta")%></td>
				       <td class="inputFieldTitle" colspan="3"><%= res.getString("etFechaDevolucion")%></td>
				    </tr>
					<tr>
					  <td width="10%" align="left"><INPUT class="inputField" TYPE="TEXT" NAME="Desde"  size="10" maxlength="10" value="<%=((request.getParameter("Desde")==null)?"":request.getParameter("Desde"))%>" onblur="javascript:formatearFecha(this);"></td>
					  <td width="5%" align="left"><a href='#' name='anchorDesde'  onClick='JavaScript:showCalendar("anchorDesde",idioma,document.all("Desde"),true,200,200,2002);return false;' onMouseOver="top.status='Ver Calendario'; return true" onMouseOut="top.status=''; return true" ><img border="0" src='<%=m05bConstantesPaginas.PATH_IMAGENES%>/p01calendario.gif'/></a></td>
					  <td align="left"><INPUT class="inputField" TYPE="TEXT" NAME="HoraDesde" size="5" maxlength="5" value="<%=((request.getParameter("HoraDesde")==null)?"":request.getParameter("HoraDesde"))%>" onBlur="javascript:formatearHora(this); ValidaHoras(this.value);"/></td>					  	  					  	   
					  <td width="10%" align="left"><INPUT class="inputField" TYPE="TEXT" NAME="Hasta"  size="10" maxlength="10" value="<%=((request.getParameter("Hasta")==null)?"":request.getParameter("Hasta"))%>" onblur="javascript:formatearFecha(this);"></td>
					  <td width="5%" align="left"><a href='#' name='anchorHasta'   onClick='JavaScript:showCalendar("anchorHasta",idioma,document.all("Hasta"),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' /></a></td>
					  <td align="left"><INPUT class="inputField" TYPE="TEXT" NAME="HoraHasta"  value="<%=((request.getParameter("HoraHasta")==null)?"":request.getParameter("HoraHasta"))%>" size="5" maxlength="5" onBlur="javascript:formatearHora(this); ValidaHoras(this.value);"/></td>
					  <td width="10%" align="left"><INPUT class="inputField" TYPE="TEXT" NAME="Devolucion"  size="10" maxlength="10" value="<%=((request.getParameter("Devolucion")==null)?"":request.getParameter("Devolucion"))%>"onblur="javascript:formatearFecha(this);"></td>
					  <td width="5%" align="left"><a href='#' name='anchorDevol'   onClick='JavaScript:showCalendar("anchorDevol",idioma,document.all("Devolucion"),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' /></a></td>
					  <td align="left"><INPUT class="inputField" TYPE="TEXT" NAME="HoraDevolucion"  value="<%=((request.getParameter("HoraDevolucion")==null)?"":request.getParameter("HoraDevolucion"))%>" size="5" maxlength="5" onBlur="javascript:formatearHora(this); ValidaHoras(this.value);"/></td>
		  			</tr>
				    <tr>
				       <td class="inputFieldTitle" colspan="3"><%= res.getString("etDNI")%></td>
				       <td class="inputFieldTitle" colspan="6"><%= res.getString("etNombre")%></td>
				    </tr>
					<tr>
				      <td align="left" colspan="3"><INPUT class="inputField" TYPE="TEXT" NAME="Dni" value="<%=((request.getParameter("Dni")==null)?"":request.getParameter("Dni"))%>" size="22" maxlength="10"/> </td>
				      <td align="left" colspan="6"><INPUT class="inputField" TYPE="TEXT" NAME="Nombre" value="<%=((request.getParameter("Nombre")==null)?"":request.getParameter("Nombre"))%>" size="84" maxlength="50"/> </td>
		  			</tr>
				</TABLE>
		</FORM>
		</td>
	</tr>
	<tr>
			<td colspan="3"><%@ include file="/mantenimientosJSP/includes/m05Pie_c.jsp"%></td>
	</tr>
</table>
<script>
document.FormBusqAsignacion.NSolicitud.focus();
</script>
<SCRIPT language='javascript'>
	function fncBuscar (){
		   var docu=document.FormBusqAsignacion;
		   if(existeCaracter(docu.NSolicitud.value,"\'")||existeCaracter(docu.NSolicitud.value,'\"')){
	 			alert(dameAlerta(idioma, 1));
	 			docu.NSolicitud.focus();
	 			return;
 		   }
 		   if(existeCaracter(docu.Matricula.value,"\'")||existeCaracter(docu.Matricula.value,'\"')){
	 			alert(dameAlerta(idioma, 1));
	 			docu.Matricula.focus();
	 			return;
 		   }
 		   if(existeCaracter(docu.Dni.value,"\'")||existeCaracter(docu.Dni.value,'\"')){
	 			alert(dameAlerta(idioma, 1));
	 			docu.Dni.focus();
	 			return;
 		   }
 		   if(existeCaracter(docu.Nombre.value,"\'")||existeCaracter(docu.Nombre.value,'\"')){
	 			alert(dameAlerta(idioma, 1));
	 			docu.Nombre.focus();
	 			return;
 		   }	
           doc=document.FormBusqAsignacion;
           formatearFecha(doc.Desde);
           formatearFecha(doc.Hasta);
           formatearFecha(doc.Devolucion);
           doc.action="m05bRelAsignacionesJsp.jsp";
           doc.submit();
    }
    setTimeout('initSlide();', 1);
</SCRIPT>
</BODY>
</HTML>