<%@include file="/WEB-INF/includeTemplate.inc"%>
<%@page import="com.ejie.y42b.utils.Y42bUtils"%>

<jsp:useBean id="contact" scope="request" type="com.ejie.y42b.model.Contacto" />
<jsp:useBean id="etiquetas" scope="request" type="java.lang.String" />

<div id="contact_feedback"></div>
<form id="contactDetailForm">
	<input type="hidden" id="contacto_contactoId" value="<%=Y42bUtils.normalizarVacio(contact.getContactoId())%>"/>
	<input type="hidden" id="contactoLocalizacionNacional" value="<%=Y42bUtils.normalizarVacio(contact.getIsnacional())%>"/>
	<div class="y42b-row">
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.nombre"/>:</label>
		</div>
		<div class="y42b-colum80">	
			<input class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(Y42bUtils.encodeHtmlTag(contact.getNombre()))%>" disabled/>
		</div>	
	</div>
	<div class="y42b-row">
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.cargo"/>:</label>
		</div>
		<div class="y42b-colum80">	
			<input class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(Y42bUtils.encodeHtmlTag(contact.getCargo()))%>" disabled/>
		</div>	
	</div>
	
	
	<!-- residencia / estado-->
	<div class="y42b-row">
		<div class="y42b-colum20">	
			<label class="formulario_linea_label"><spring:message code="mant.localizacion"/>:</label>
		</div>
		<div id="localizacion_types" class="y42b-colum80">	
			<input type="radio" id="y42bContactoDetalleEstado" name="ent_extranjero" <%if("S".equals(contact.getIsnacional())){%>checked<%}%> disabled/><label class="y42b-label_radios" for="y42bEntidadDetalleEstado"><spring:message code="nora.estado"/></label>
			<input type="radio" id="y42bContactoDetalleExtranjero" name="ent_extranjero" <%if(!"S".equals(contact.getIsnacional())){%>checked<%}%> disabled/><label class="y42b-label_radios" for="y42bEntidadDetalleExtranjero"><spring:message code="nora.extranjero"/></label>
		</div>	
	</div>
	
	<div id="localizacion_info">
	<%if("S".equals(contact.getIsnacional())){ %>
		<div id="localizacion_nacional">
			<div class="y42b-row">
				<div class="y42b-colum20">
					<label class="formulario_linea_label"><spring:message code="mant.codigoPostal"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNoraCpId())%>" id="detalleContCodPostal" disabled/>
				</div>
			</div>
			<div class="y42b-row">
				<div class="y42b-colum20">		
					<label for="provincia" class="formulario_linea_label"><spring:message code="mant.provincia"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombreProvincia())%>" id="detalleContProvincia" disabled/>
				</div>
			</div>
			<div class="y42b-row">
				<div class="y42b-colum20">	
					<label for="municipio" class="formulario_linea_label"><spring:message code="mant.municipio"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombreMunicipio())%>" id="detalleContMunicipio" disabled/>
				</div>
			</div>
			<div class="y42b-row">
				<div class="y42b-colum20">
					<label for="localidad" class="formulario_linea_label"><spring:message code="mant.localidad"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombreLocalidad())%>" id="detalleContLocalidad" disabled/>
				</div>
			</div>
			<div class="y42b-row">
				<div class="y42b-colum20">
					<label class="formulario_linea_label"><spring:message code="mant.calle"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombreCalle())%>" id="detalleContCalle" disabled/>
				</div>
			</div>
			<%if(Y42bUtils.normalizarVacio(contact.getNoraProvinciaId()).equalsIgnoreCase("20") || Y42bUtils.normalizarVacio(contact.getNoraProvinciaId()).equalsIgnoreCase("48") || Y42bUtils.normalizarVacio(contact.getNoraProvinciaId()).equalsIgnoreCase("01")){%>
			<div class="y42b-row">
				<div class="y42b-colum20">
					<label class="formulario_linea_label"><spring:message code="mant.portal"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombrePortal())%>" id="detalleContPortal" disabled/>
				</div>
			</div>
			<%} %>	
		</div>
	<%} %>	
	<%if("N".equals(contact.getIsnacional())){ %>
		<div id="localizacion_internacional">
		<div class="y42b-row">
				<div class="y42b-colum20">	
					<label class="formulario_linea_label"><spring:message code="nora.cp"/>:</label>
				</div>
				<div class="y42b-colum80">	
					<input type="text" class="inputUpdate" id="detalleContCPExt" value="<%=Y42bUtils.normalizarVacio(contact.getNombreCp())%>" disabled/>
				</div>		
			</div>
				
			<div class="y42b-row">
				<div class="y42b-colum20">
					<label class="formulario_linea_label"><spring:message code="mant.pais"/>:</label>
				</div>
				<div class="y42b-colum80">	
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombrePais())%>" id="detalleContPais" disabled/>
				</div>
			</div>
			<div class="y42b-row">
				<div class="y42b-colum20">
					<label class="formulario_linea_label"><spring:message code="mant.calle"/>:</label>
				</div>
				<div class="y42b-colum80">
					<input type="text" class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getNombreCalle())%>" id="detalleContDireccion" disabled style="width: 76%; "/>
				</div>
			</div>
		</div>
	
	<%} %>	
	</div>		
	<div class="y42b-row">
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.telefono"/>:</label>
		</div>
		<div class="y42b-colum80">
			<input class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getTelefono())%>" disabled/>
		</div>
	</div>
	<div class="y42b-row">
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.fax"/>:</label>
		</div>
		<div class="y42b-colum80">	
			<input class="inputUpdate" value="<%=Y42bUtils.normalizarVacio(contact.getFax())%>" disabled/>
		</div>
	</div>
	<div class="y42b-row">
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.email"/>:</label>
		</div>
		<div class="y42b-colum80">		
			<input class="inputUpdate" id="contact_email" style="width: 18.5em !important;" maxlength="255" value="<%=Y42bUtils.normalizarVacio(contact.getEmail())%>" disabled/>
			<img src="${staticsUrl}/y42b/images/y42b-mail.png" width="20" height="20" id="y42bContactMAIL" style="cursor:pointer;padding-left: 4px;" onclick="y42bFunContactPincharEmail();"/>
			<i> </i>
		</div>
	</div>
	<div class="y42b-row">	
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.url"/>:</label>
		</div>
		<div class="y42b-colum80">	
			<input class="inputUpdate" id="contact_url" style="width: 18.5em !important;" maxlength="255" value="<%=Y42bUtils.normalizarVacio(contact.getUrl())%>" disabled/>
			<img src="${staticsUrl}/y42b/images/y42b-web.png" width="20" height="20" id="y42bContactURL" style="cursor:pointer;padding-top: 0;padding-left: 4px;" onclick="y42bFunContactPincharUrl()" />
			<i>(http://www.google.es)</i>
		</div>
	</div>	
	<div class="y42b-row">
		<div class="y42b-colum20">
			<label class="formulario_linea_label"><spring:message code="mant.entidad.etiquetas"/>:</label>
		</div>
		<div class="y42b-colum80">		
			<input type="text" class="inputUpdate" value="<%=etiquetas%>" disabled/>
		</div>
	</div>
	<div class="y42b-row titulo_fieldset">
		<spring:message code="mant.contacto.entidades"/>:
	</div>
	<div class="formulario_linea_sep"></div>
	<div id="entidades_tree_container">
		<div id="entity_tree"></div>
	</div>
	
</form>