<%@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"%> 
<%	} 
	String persona = (String) session.getAttribute("persona");
%>	
<%@ include file="/m05bIdioma.inc"%>

<head>
         <title><%= resTit.getString("titLstTagSolicitud")%></title>
		<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

		<!--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">
					var comboDesc=new Array();
		</script>
			
		<script language="JavaScript">
			    function fncImprimir() {
					var docu= document.formSolicitud;
					var url="m05bTagPDFSoliJsp.jsp";
					docu.Cta.value=docu.NCta.options[docu.NCta.selectedIndex].value;
					if (docu.TarjetaTexto.value==""){
						alert(dameAlerta(idioma, 49));
					}else{
				        docu.action=url;
				        docu.submit();
				    }
			    }            
		    	
	
function RecogerSelectMultiple(){			  
    var Obj = document.formSolicitud('Tarjeta');
    var len = Obj.length
    	
    var i,texto,cont;
        texto="";
        cont=1;
    for (i=1; i<len; i++) {
      if (Obj[i].selected) {
      	stexto = Obj[i].text;
        sItem = stexto.split("|");
        matricula = sItem[0];
        tarjeta   = sItem[1];
      	  
      	   if (cont==1){ 
             texto= tarjeta;
                          }
            else{ 
            	texto=texto + "," +tarjeta;}
            cont=cont+1;
       }
   }
   document.formSolicitud.TarjetaTexto.value=texto;
          }   
</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_TAR_TAG%>";	
	var rutaCabecera;	//Camino de migas
	<% String ruta="/m05bParqueMovilWar/m05bImpSoliTagJsp.jsp" ; %>
    rutaCabecera = "<a style='text-decoration:none; font-size:8pt; color:yellow; font-family:verdana' href='" + urlIdioma + "'>\\<%= resCM.getString("cmLstTagSolicitud")%></a>";
 </SCRIPT>
 <%@ include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>
<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Pulsado.js"></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">
	<% 		m05bCombo miCombo = new m05bCombo();
		    m05bCombo miCombo2 = new m05bCombo();%>

			<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>
					<SCRIPT language="javascript">
    						var CmbDesc=new Array();
					
                    <%=miCombo.joinComboArray( m05bConstantes.COL_31_CUENTA+",DECODE("+m05bConstantes.COL_31_TAG+",'','0','1')",  m05bConstantes.COL_31_MATRICULA+"||'|'||"+m05bConstantes.COL_31_TARJETA+"||'|'||"+m05bConstantes.COL_31_TAG,m05bConstantes.TAB_BANCOS+","+m05bConstantes.TAB_TARJETAS + " WHERE "+ m05bConstantes.COL_31_CUENTA+"="+m05bConstantes.COL_03_NCUENTA,"" )%>
					</script>
					
		  <TABLE class="general">
		    <tr align="center">
		      <td width="5%"></td>
		      <td width="20%" align="left"  class="searchTitle"><%= res.getString("etBancoCuenta")%></td>
              <td align="left" >
			          <select class=inputField  NAME="NCta" onchange="javascript:document.formSolicitud.Tarjeta.disabled=false;Pulsado2(NCta.options[NCta.selectedIndex].value, document.formSolicitud.Tarjeta, CmbDesc,'',document.formSolicitud.Tag.value);return false;">
			               <option value=""> </option>
			               <%=miCombo2.popCombo( m05bConstantes.COL_03_NCUENTA, m05bConstantes.COL_03_NOMBRE, m05bConstantes.TAB_BANCOS, "", "", "" )%>
			          </select>
    		 </td>
    		  <td class="searchTitle" border="1">
                <input checked type="Radio" class=inputFieldTitle onclick="javascript:document.formSolicitud.Tag.value='0';Pulsado2(NCta.options[NCta.selectedIndex].value, document.formSolicitud.Tarjeta, CmbDesc,'',document.formSolicitud.Tag.value);" NAME="Tipo"   VALUE="0" width="40%"  border='0'/><%= res.getString("etSinTag")%>
                <input type="Radio" class=inputFieldTitle onclick="javascript:document.formSolicitud.Tag.value='1';Pulsado2(NCta.options[NCta.selectedIndex].value, document.formSolicitud.Tarjeta, CmbDesc,'',document.formSolicitud.Tag.value);"  NAME="Tipo"  VALUE="1" width="40%" border='0'/><%= res.getString("etConTag")%>   		  
                <input type="Radio" class=inputFieldTitle onclick="javascript:document.formSolicitud.Tag.value='2';Pulsado2(NCta.options[NCta.selectedIndex].value, document.formSolicitud.Tarjeta, CmbDesc,'',document.formSolicitud.Tag.value);"  NAME="Tipo"  VALUE="2" width="40%" border='0'/><%= res.getString("etTodas")%>  		  	  
    		  </td>
		    </tr>
    		</table>
    						   <br>
    						   <br>
    	   <table class="general">
    	   		  
    	    <tr align="center">
		      <td width="5%"></td>
    	    	
		      <td  width="20%"align="left"  class="searchTitle"></td>
    		  <td align="left" colspan="2">
   			    	  <select size="20" multiple class=inputField  NAME="Tarjeta" disabled onchange="javascript:RecogerSelectMultiple();">
   					  	       <option value=""> </option>
							       <%=miCombo.popComboDistinct( m05bConstantes.COL_31_CUENTA, m05bConstantes.COL_31_MATRICULA+"||'|'||"+m05bConstantes.COL_31_TARJETA+"||'|'||"+m05bConstantes.COL_31_TAG, m05bConstantes.TAB_BANCOS+","+m05bConstantes.TAB_TARJETAS, m05bConstantes.COL_31_CUENTA+"="+m05bConstantes.COL_03_NCUENTA, "","")%>
							  </select>
                </td>
            </tr>
		   </table>
		              <input type="hidden" name="Tag" value='0'>
		              <input type="hidden" name="TarjetaTexto" >
		              <input type="hidden" name="Cta" >
</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>