<%@include file="/WEB-INF/includeTemplate.inc"%>
<jsp:useBean id="URL_ENVIO_CONFIRMACION" scope="request" type="java.lang.String" />
<jsp:useBean id="statics_path" scope="request" type="java.lang.String" />
<%@page import="com.ejie.y42b.constantes.Y42bAgendaConstantes" %>
<%
	String tipoAcceso = (String) request.getSession().getAttribute(Y42bAgendaConstantes.SESSIONTIPOACCESO);
%>

<script type="text/javascript">
		var y42bSearch_UsuarioTipoAcceso = "<%=tipoAcceso%>";
</script>

<input type="hidden" id="y42bSearch_CteTipoAcceso_Consulta" value="<%=Y42bAgendaConstantes.TIPOACCESO_CONSULTA%>"/>
<input type="hidden" id="y42bSearch_CteTipoAcceso_Modificacion" value="<%=Y42bAgendaConstantes.TIPOACCESO_MODIFICACION%>"/>
<input type="hidden" id="y42bSearch_CteTipoAcceso_Administrador" value="<%=Y42bAgendaConstantes.TIPOACCESO_ADMINISTRADOR%>"/>


<div class="y42b-cargando"  id="y42bSearchDivContent" style="display:none;z-index:2;left: 0;top: 0;width:100%;height:100%;background-color:grey;opacity:.30" ></div>
<form id="searchForm">
	<input type="hidden" id="searchEnvioId" />
	
	<input type="hidden" id="idUrlConf" class="inputUpdate"  maxlength="255" value="<%=URL_ENVIO_CONFIRMACION%>"/>
	<input type="hidden" id="idStaticsPath" class="inputUpdate"  maxlength="255" value="<%=statics_path%>"/>
	
	<div class="left boxTDoble" id="panelIzq">
		<div id="arbol.mostrar_entidades">
			<div id="arbol.no_activas">
				<input type="button" id="y42bsearchtree_expandir" class="ui-button ui-widget ui-state-default ui-corner-all" value="+">
				<input type="button" id="y42bsearchtree_contraer" class="ui-button ui-widget ui-state-default ui-corner-all" value="-">
			
				
			</div>
		</div>
		<div id="search_tree_container">
			<div id="search_tree"></div>
		</div>
		<input type="hidden" id="searchGroupIdList" name="grupoarr" />
		<input type="hidden" id="searchEntityIdList" name="entidadarr" />
	</div>
	
	<div class="right" id="panelDcho">
		<div id="search_avisos"></div>
		<div id="UPDATE_FORM_BUTTONS_SearchCodes" class="btn_gris">
		<input type="button" id="searchCodeSelectionButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.codeSelection"/>">
		</div>
		
		
		<div class="y42b-row_border">
				<p>
					<label class="formulario_linea_label"><spring:message code="search.selectionType"/>:</label>
				</p>
				<input type="radio" id="searchEntidad" name="tipo" value="E" checked/>
				<label for="searchType" class="espacio"><spring:message code="search.type.entity"/></label>
				<input type="radio" id="searchContact" name="tipo" value="C" />
				<label for="searchType" class="espacio"><spring:message code="search.type.contact"/></label>

				<p>
					<label class="formulario_linea_label"><spring:message code="comun.entidades"/>:</label>
					<input type="checkbox" id="searchActivasSi" name="activasSi"/> 
					<label class="espacio"><spring:message code="comun.activasSi"/></label>
					<input type="checkbox" id="searchActivasNo" name="activasNo"/> 
					<label class="espacio"><spring:message code="comun.activasNo"/></label>
					
				</p>
				
				
				<p>
					<label class="formulario_linea_label"><spring:message code="mant.entidad.codOrg"/>:</label>
					<input  id="searchCodOrg" name="codorg" size="5" maxlength="6"/>
				</p>
					
				
				
				<p>
					<label class="formulario_linea_label"><spring:message code="search.name"/>:</label>
					<input class="inputUpdate" id="searchName" name="nombre"/>
				</p>
				
				
				<div class="formulario_linea_sep3"></div>
				<p>
					<label class="formulario_linea_label"><spring:message code="search.entityType"/>:</label>
					<input type="checkbox" id="searchKontsumoGest" name="kontsumoGest" checked value="S" /><label class="espacio"><spring:message code="search.entityType.kontsumoGest"/></label>
					<input type="checkbox" id="searchFormativa" name="ofertaFormativa" checked value="S" /><label class="espacio"><spring:message code="search.entityType.formativa"/></label>
					<input type="checkbox" id="searchKontsumoNet" name="kontsumoNet" checked value="S" /><label class="espacio"><spring:message code="search.entityType.kontsumoNet"/></label>
					<input type="checkbox" id="searchConsultaWeb" name="consultaWeb" checked  value="S" /><label class="espacio"><spring:message code="search.entityType.consultaWeb"/></label>
				</p>
				<div id="search_DIVRBTipo" >
					<p >
						<p  class="formulario_linea_label"></p>					
						<input type="radio" style="cursor: pointer;" id="y42bSearch_RBCualquiera" name="tiporb" value="C" checked/><label class="y42b-label_radios" for="y42bSearch_RBCualquiera"><spring:message code="comun.cualquiera"/></label>
						<input type="radio" style="cursor: pointer;" id="y42bSearch_RBTodos" name="tiporb" value="T"/><label class="y42b-label_radios" for="y42bSearch_RBTodos"><spring:message code="comun.todos"/></label>
					</p>								
				</div>
				
				
				<!-- ------------------------------------------------------------------------------------------------------------------->
				<!-- ----- new nora ---------------------------------------------------------------------------------------------------->
				<!-- -------------------------------------------------------------------------------------------------------------------> 
				<!-- residencia / estado-->
				<p>
					<label class="formulario_linea_label"><spring:message code="mant.localizacion"/>:</label>
					<input type="radio" style="cursor: pointer;" id="y42bSearchTodos" name="isnacional" value=""/><label class="y42b-label_radios" for="y42bSearchTodos"><spring:message code="nora.todos"/></label>
					<input type="radio" style="cursor: pointer;" id="y42bSearchEstado" name="isnacional" value="S"/><label class="y42b-label_radios" for="y42bSearchEstado"><spring:message code="nora.estado"/></label>
					<input type="radio" style="cursor: pointer;" id="y42bSearchExtranjero" name="isnacional" value="N"/><label class="y42b-label_radios" for="y42bSearchExtranjero"><spring:message code="nora.extranjero"/></label>
				</p>								
				<div id="y42bSearch_ResidenciaExtranjeroNo" class="y42b-row y42b-row_combos">
					<p>
							<label class="formulario_linea_label"><spring:message code="nora.provincia"/>:</label>
							<select class="rup-combo" id="y42bSearch_ComboProvincia" name="provinciaId"></select>
					</p>
					<p>
							<label class="formulario_linea_label"><spring:message code="nora.municipio"/>:</label>
							<select class="rup-combo" id="y42bSearch_ComboMunicipio" name="municipioId"></select>
					</p>
					<p>
							<label class="formulario_linea_label"><spring:message code="nora.localidad"/>:</label>
							<select class="rup-combo" id="y42bSearch_ComboLocalidad" name="localidadId"></select>
					</p>
				</div>				
				<div id="y42bSearch_ResidenciaExtranjeroSi" class="y42b-row y42b-row_combos">
					<p>
							<label class="formulario_linea_label"><spring:message code="nora.pais"/>:</label>
							<select class="rup-combo" id="y42bSearch_ComboPais" name="paisId"></select>
					</p>
				</div>
				<div id="y42bSearch_ResidenciaTodosNo" class="y42b-row">
						<label class="formulario_linea_label"><spring:message code="nora.dirextranjero"/>:</label>
						<input type="text" id="y42bSearch_Direccion" name="nombreCalle" value="" class="longIinputmas50"/>  
				</div>
				
				<!-- ------------------------------------------------------------------------------------------------------------------->
				<!-- ----- fin new nora ------------------------------------------------------------------------------------------------>
				<!-- -------------------------------------------------------------------------------------------------------------------> 
				
<!--				
				<p>
				<label class="formulario_linea_label"><spring:message code="mant.localizacion"/>:</label>
				<input type="radio" id="searchNationalLocationRadio" name="isnacional" value="S" /><label for="locationType" class="espacio"><spring:message code="location.national"/></label>
				<input type="radio" id="searchInternationalLocationRadio" name="isnacional" value="N" /><label for="locationType" class="espacio"><spring:message code="location.international"/></label>
				<input type="radio" id="searchLocationRadioTodas" name="isnacional" value="" checked/><label for="locationType" class="espacio"><spring:message code="location.todas"/></label>
				</p>
				<div id="searchLocation">	
					<div id="searchNationalLocationDIV" >
						<p>
							<label class="formulario_linea_label"><spring:message code="location.province"/>:</label>
							<select class="rup-combo" id="searchProvinceId" name="provinciaId" ></select>
						</p>
						<p>
						 	<label for="municipio" class="formulario_linea_label"><spring:message code="location.municipality"/>:</label>
							<select class="rup-combo" id="searchMunicipalityId" name="municipioId" ></select>
						</p>
						<p>
							<label class="formulario_linea_label"><spring:message code="location.locality"/>:</label>
							<select class="rup-combo" id="searchLocalityId" name="localidadId" ></select>
						</p>
					</div>
					<div id="searchInternationalLocationDIV" style="dropdown">
						<p>
							<label class="formulario_linea_label"><spring:message code="location.country"/>:</label>
							<select class="rup-combo" id="searchCountryId" name="paisId" ></select>
						</p>	
						<p>	
							<label class="formulario_linea_label"><spring:message code="location.locality"/>:</label>
							<input class="inputUpdate" id="searchLocalidadInterId" name="nombreLocalidad" />
						</p>
						<p>						
							<label class="formulario_linea_label"><spring:message code="mant.compDir"/>:</label>
							<input class="inputUpdate" id="searchCalleId" name="nombreCalle" />
						</p>
					</div>
				</div>
-->				
				
					<div class="formulario_linea_sep"></div>
					<label class="formulario_linea_label"><spring:message code="date.ultimaFechaActuacion"/>:</label>
						<div class="formulario_bloque">
							<label style="text-align: right;"><spring:message code="date.after"/>:</label>
							<input type="text" id="searchDateAfter" name="fechaDesde" readonly="readonly" class="y42b-readonly" size="10"/>
							<img src="${staticsUrl}/y42b/images/y42b-basura.png" id="y42bSearchCleanDateAfter" style="cursor: pointer;" class="y42b-cuboBasura"  title="<spring:message code="comun.cleanDate"/>"/>
						</div>
						<div class="formulario_bloque">	
							<label style="text-align: right;"><spring:message code="date.before"/>:</label>
							<input type="text" id="searchDateBefore" name="fechaHasta" readonly="readonly" class="y42b-readonly" size="10"/>
							<img src="${staticsUrl}/y42b/images/y42b-basura.png" id="y42bSearchCleanDateBefore" style="cursor: pointer;" class="y42b-cuboBasura"  title="<spring:message code="comun.cleanDate"/>"/>
						</div>	
						
					
					<div class="formulario_linea_sep"></div>
					<div class="formulario_bloque">
						<label class="formulario_linea_label"><spring:message code="mant.entidad.etiquetas"/>:</label>
					</div>
						<input type="hidden" id="etiquetasIdList" name="etiquetaarr" value=""/>
						<input type="text" readonly="readonly" id="etiquetas" style="width: 26em !important;" value="" size="66"/>&nbsp;
						<input type="button" id="search_bt_editar_etiquetas" name="search_bt_editar_etiquetas" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="comun.editar"/>">
						&nbsp;
					<div class="formulario_linea_sep"></div>
				
			</div>	
	
				
		<div style="text-align: right">
			<input type="button" id="searchSearchButton" class="ui-button ui-widget ui-state-default ui-corner-all y42bGreeninput" value="<spring:message code="comun.buscar"/>">	
			<input type="button" id="searchCleanButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="comun.limpiar"/>">
		</div>
		
	</div>
	
	
</form>
<!-- //FIXME Migracion UDA V.2.4.4 (201504) - Aņadimos la capa multi para que funcione correctamente el rup_maint aņadido en el js -->
<div id="multi" style="display: none;"></div>
<div class="right" id="panelDchoBotton">
	<table id="searchResultGrid" cellpadding="0" cellspacing="0">
		<tbody><tr><td>&nbsp;</td></tr></tbody>
	</table>
	<div id="searchResultGridPager"></div>
	<div id="UPDATE_FORM_BUTTONS_MassiveActions" class="btn_gris">
		<input type="button" id="searchMassiveActionButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.massiveActions"/>">
	</div>
		
	<div id="searchDIVTamanyoSobreCombo" style="float:left;border:1px">
		<select id="searchEnvelopeType" class="rup-combo"></select>
	</div>
	<br>
	<br>
	<br>
	<div id="searchDIVExcelCombo" style="float:left;border:1px">
		<select id="searchExcelCombo" class="rup-combo"></select>
	</div>
	<br>
	
	<div class="right_buttons">
		<input type="button" id="searchEnvelopesButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.action.envelopes"/>">
		<input type="button" id="searchExcelButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.action.excel"/>">
		<input type="button" id="searchSendEmailButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.action.email"/>">
		<!-- <input type="button" id="searchSendEmailToAllButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.action.emailAll"/>"> -->
		<input type="button" id="searchDetailButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.action.detail"/>">
		<input type="button" id="searchModifyButton" class="ui-button ui-widget ui-state-default ui-corner-all" value="<spring:message code="search.action.modify"/>">
	</div>
</div>

<div id="searchCodeSelectionDialog"></div>
<div id="searchMassiveActionDialog"></div>
<div id="searchSendEmailDialog"></div>
<div id="searchDetailDialog"></div>

<div id="capaEtiquetas" ></div>
