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

<head>
        <title><%= resTit.getString("titLstAsigVivas")%></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%>/m05Funciones.js"></script>
	    <script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/formateador.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
    urlIdioma = "<%=m05bConstantesPaginas.LST_ASIG_VIVAS%>";
	var rutaCabecera;	//Camino de migas
	<% String ruta="/m05bParqueMovilWar/m05bAsigVivasJsp.jsp" ; %>
    rutaCabecera="";
    detActual = '<%=resCM.getString("cmLstAsigVivas")%>';	
    //rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstAsigVivas")%></a>";
 </SCRIPT>
 <%m05bComun miComun = new m05bComun();%>
 <%@ include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>
<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Pulsado.js"></script>
		<script language="JavaScript">
			    function fncImprimir() {
			    	
					var url="m05bAsignacionPDFVivaJsp.jsp";
					document.formSolicitud.CodDpto.value=document.formSolicitud.Dpto.options[document.formSolicitud.Dpto.selectedIndex].value;
					document.formSolicitud.Matricula.value=document.formSolicitud.CMatricula.options[document.formSolicitud.CMatricula.selectedIndex].value;
					var docu= document.formSolicitud;
					if (document.formSolicitud.FecHasta.value != ""){
					formatearFecha(document.formSolicitud.FecHasta);}
			        docu.action=url;
			        docu.submit();
			      }          
		    	
			
	 
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;
          }   
</script> 
	 
<%
	String situacion = "";
%>
<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()%>
					</script>
								
			<TABLE class="general">
			    <tr align="right">
				      <!--td align="right"> <INPUT TYPE="IMAGE" style="cursor:hand" VALUE="Imprimir" ONCLICK="JavaScript:fncImprimir();return false;" onMouseOver="top.status='Imprimir asignaciones entre fechas'; return false" onMouseOut="top.status=''; return false" 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();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 colspan="6" width="100%" align="left"  class="inputFieldTitle"><%= res.getString("etDepartamento")%></td>
                     </tr>
		   		     <tr>
   					  <td align="left" colspan="4">
  					      	  <select class=inputField  NAME="Dpto" onKeypress="buscar_op(this,this)" onblur="borrar_buffer()" onclick="borrar_buffer()">
				               <option value=""> </option>
   					               <%=miCombo2.popCombo(m05bConstantes.COL_06_CODDPTO,"NVL("+campoTexto2+m05bConstantes.COL_06_DESCDPTO+","+m05bConstantes.COL_06_DESCDPTO+")", m05bConstantes.TAB_DEPARTAMENTOS, "", "","")%>
   					          </select>
   					   </td>
					</tr>
					<tr>
					  <td height="15%" colspan="6">&nbsp;&nbsp;</td>
					</tr>
				
		   		    <tr>
                      <td align="left" colspan="3" class="inputFieldTitle"><%= res.getString("etEstado")%></td>
    		          <td class="inputFieldTitle" ><%= res.getString("etMatricula")%> </td>
     		  		  <td class="inputFieldTitle" colspan="2"> <%= res.getString("etFecha")%> </td>
                     </tr>
		   		     <tr>
                      <td width="20%" align="left" colspan="2">
                       	  <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 width="5%"></td>
				      <td width="35%" align="left" valign="top">
			  			  <select style="vertical-align=top" class=inputField  NAME="CMatricula" onKeypress="buscar_op(this,this)" onblur="borrar_buffer()" onclick="borrar_buffer()">
				    	     <option value=""> </option>	
						               <%=miCombo.ComMatricula(m05bConstantes.VEH_TODOS,"")%>
				    	  </select>
				      </td>
				      <td align="left" width="10%" valign="top"><INPUT class="inputField" TYPE="TEXT" NAME="FecHasta" VALUE="<%=miComun.getFechaActual(campoTexto3)%>" size="10" maxlength="10" onblur="javascript:formatearFecha(this);return false;"/></td>
        			  <td align="left" valign="top"><a href='#' name='anchorFecHasta'  onClick='JavaScript:showCalendar("anchorFecHasta",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>
        		    </table>
    		  </td>
            <tr>
    	</table>
		              <input type="hidden" name="SituacionTexto" value="">
		              <input type="hidden" name="CodDpto" value="">
		              <input type="hidden" name="Matricula" 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>