<%
/******************************************************************************
 * Copyright (c) 2000-2011 E-DEAL
 *
 * E-DEAL S.A.
 * 41, rue Périer
 * 92120 Montrouge
 * France
 *
 * T: +33 (0)1 73 03 29 80
 * F: +33 (0)1 73 01 69 77
 * http://www.e-deal.com
 * 
 * La diffusion de ce code source sous quelque forme que ce soit sans
 * l'autorisation de E-DEAL est interdite.
 *
 * Vous êtes autorisés à modifier ce code source uniquement pour votre usage
 * propre et sous réserve que les mentions de copyright demeurent intactes.
 *
 * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
 * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
 * responsable des dommages pouvant résulter de l'utilisation de ce code
 * source.
 ******************************************************************************/
%><%@ page session="true" %>
<%@ page import="com.edeal.frontline.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="com.edeal.frontline.grid.GridData" %>
<%@ page import="com.edeal.frontline.navigation.FlRequest" %> 
<%@ page import="com.edeal.frontline.custom.*" %>
<%@ page import="com.edeal.frontline.custom.OtherMrq_Bean" %>
<%@ page import="com.edeal.frontline.custom.OtherLbls_Bean" %>
<%@ page import="com.edeal.frontline.custom.OtherGuides_Bean" %>
<%@ page import="com.edeal.frontline.services.addressnormalisation.*" %>
<%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %>
<jsp:useBean class="com.edeal.frontline.EnterpriseBean" id="Enterprise" scope="request"/>
<jsp:useBean class="com.edeal.frontline.custom.OtherMrq_Bean" id="OtherMrq_" scope="request"/>
<jsp:useBean class="com.edeal.frontline.custom.OtherLbls_Bean" id="OtherLbls_" scope="request"/>
<jsp:useBean class="com.edeal.frontline.custom.OtherGuides_Bean" id="OtherGuides_" scope="request"/>
<script language="javascript" src="<fl:webapp/>/js/utils.js"></script>
<%
	final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass());
	FlRequest flRequest = new FlRequest(request);
	FlContext context = flRequest.getContext();
	DataDictionary dico = context.getDataDictionary();
	
	String id = null;
	try {
		id = Enterprise.getID();
	} catch (FieldNotInitializedException e) {
	}
	
	String cmdStsRefID =  dico.getRefIdByCode("OppStuID", "ORD");
	String intTodo = dico.getRefIdByCode("IntType_", "ACT");
	String intCOR = dico.getRefIdByCode("IntType_", "COR");
	
	String typOrganisation = null;
	boolean isAssociation = false;
	try {
		typOrganisation = Enterprise.getEntTyeID();
		isAssociation = typOrganisation.equals((String)dico.getRefIdByCode("EntTyeID", "ASSO"));
	} catch (FieldNotInitializedException e) {}
	
	boolean isPartenaire = false;
	try {
		typOrganisation = Enterprise.getEntTyeID();
		isPartenaire = typOrganisation.equals((String)dico.getRefIdByCode("EntTyeID", "PART"));
	} catch (FieldNotInitializedException e) {}
	
	String name = null;
	try {
		name = Enterprise.getEntCorpName();
	} catch (FieldNotInitializedException e) {
	}
	
	String EntZip = null;
	try {
		EntZip = Enterprise.getEntZip();
	} catch(FieldNotInitializedException e) {
	}
	
	String entCity = null;
	try {
		entCity = Enterprise.getEntCity();
	} catch(FieldNotInitializedException e) {
	}
	
	String webAdr = null;
	try {
		webAdr = Enterprise.getEntWeb();
		if (!webAdr.startsWith("http://") && !webAdr.startsWith("https://")) {
			webAdr = "http://"+webAdr;
		}
		
	} catch (FieldNotInitializedException fnie) {
	}
	
	String entPhotoID_ = null;
	/*
	String po_LienPhotoExt = null;
	String po_LienPhotoInt = null;
	*/
	String po_apercuPhotoID = null;
	Photo_Bean entPhoto = null;

	try {
		entPhotoID_ = (String)Enterprise.getCustomProperty("EntPhotoID_");
	} catch (FieldNotInitializedException e) {
	}
	
	if (entPhotoID_ != null) {
		try {
			entPhoto = new Photo_Bean(entPhotoID_,context);
		} catch (FrontlineException e) {
		}
	}
	
	if(entPhoto != null) {
		try {
			po_apercuPhotoID = (String)entPhoto.getPo_Apercu();
		} catch (FieldNotInitializedException fne) {
			/*
			try {
				po_LienPhotoInt = (String)entPhoto.getPo_LienPhoto();
			} catch (FieldNotInitializedException fnie) {
			}
			try {
				po_LienPhotoExt = (String)entPhoto.getPo_LienPhotoExt();
			} catch (FieldNotInitializedException fnie) {
			}
			*/
		}
	}
	
	
	String printStr = Utils.getRequestParameter(context, request, "print");
	Boolean print = StringUtils.isNotEmpty(printStr);
	
	String datOpp = (String)request.getParameter("datOpp");
	String datInt = (String)request.getParameter("datInt");
	
	
	String objectTitle = Utils.getMessage(session, "L7009", "Quicklook");
	String listTitle = Utils.getMessage(session, "L30A2", "Liste des entreprises");
	String ou = "/quicklook.fl?id=" + id;
	
	String showFooter = !print ? "false" : "true";
%>

	<link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css">

	<script language="javascript">
	<% if(!isAssociation){ %>
	    runOnTime("refreshTxts();refreshCTR();refreshCorresps();refreshMissions();refreshInstancesAsso();refreshGiftCHQ();refreshPrestats();refreshPersons();refreshPerAsso();refreshOthLabs();refreshOthMrqs();refreshOthGds();refreshFermetures();refreshPrix();refreshResto();", 0);
	    runOnTime("refreshOpps('<%= datOpp != null && !datOpp.equals("") ? datOpp : "" %>')");
	    runOnTime("refreshCorresps('<%= datInt != null && !datInt.equals("") ? datInt : "" %>')");
	<% } else {%>
 		runOnTime("refreshCorresps();refreshInstancesAsso();refreshPersons();refreshCots();", 0);
	<% } %>
	
    function refreshInstancesAsso(){
		_grid__EVTASSO_js_.render();
	}
	function refreshPrestats(){
		_grid__ROO_EMB_js_.render();
		_grid__EQP_EMB_js_.render();
		_grid__ENV_EMB_js_.render();
	}
	
	
	function refreshResto(){
		_grid__RESTOS_js_.render();

		
	}
	
	
	function refreshPhotos() {
		_grid__PHOTO_EMB_js_.render();
	}
	function refreshGiftCHQ(){
		_grid__GCH_EMB3_js_.render();
	}
	function refreshPrix(){
		_grid__PRX_EMB_js_.render();
	}
	
	function refreshTurnovers(){
		_grid__TURNOVERS1_js_.render();
		_grid__TURNOVERS2_js_.render();
		_grid__TURNOVERS3_js_.render();
		_grid__TURNOVERS4_js_.render();
	}
	
	/* function refreshFidelity(){
		_grid__CQF_EMB_js_.render();
		_grid__TRF_EMB_js_.render();
	} */
	
	function refreshEnseignes(){
		_grid__ENSEIGNES_js_.render();
	}
	
	function refreshMissions(){
		_grid__AUDIT_js_.render();
		_grid__CLAS_EMB_js_.render();
	}
	
	function refreshWebCoformity(){
		_grid__WEBCONFORM_js_.render();
	}
	
	 
	function refreshPerAsso(){
		_grid__PER_ASSO_js_.render();
	}
	
	function refreshCTR(){
		_grid__CTR_EMB_js_.render();
	}
	
	function refreshPersons() {
		_grid__PER_EMB_js_.render({"PerEntID":"<%=Enterprise.getID()%>"},{"PerLocID":"LocEntID='<%=Enterprise.getID()%>'"});
	}
		
	function refreshCmds() {
		_grid__CMD_EMB_js_.render();
	}
	
	function refreshSols() {
		_grid__SOL_EMB_js_.render();
	}
	
	/* function refreshResas() {
		_grid__RESA_js_.render();
	} */
	
	function refreshTxts(){
		_grid__TEXTES_js_.render();
	}
	
    function testprintQuickLook(){
	   	if ((<%= print %>) == true) window.print();
	}
	
	function refreshOppsInts() {
	    if (document.getElementById('oppCheck').checked) {
		    refreshOpps(document.getElementById('oppDate').value);
	    } else {
	    	refreshOpps();
	    }
	    if (document.getElementById('intCheck').checked) {
	    	refreshCorresps(document.getElementById('intDate').value);
	    } else {
	    	refreshCorresps();
	    }
    }
    
	function refreshOpps(datOpp) {
	    if (datOpp == null) datOpp = "";
		var url = _grid__CMD_EMB_js_.getAjaxUrl();
		var params = {};
		params["OppEntID"] = "<%= Enterprise.getID() %>";
		params["OppDate$From"] = datOpp;
		params["code"] = "CMD_EMB";
		_grid__CMD_EMB_js_.callAjaxForHtml(url, params);
	}
		
	function refreshCorresps(datInt) {
		if (datInt == null) datInt = "";
		var url = _grid__CORRESLIST_js_.getAjaxUrl();
		var params = {};
		params["id"] = "<%= Enterprise.getID() %>";
		params["IntDate$From"] = datInt;
		params["code"] = "CORRESLIST";
		_grid__CORRESLIST_js_.callAjaxForHtml(url, params);
	}
	
	function refreshLocations(){
		myAjaxURL_LOC_EMB_QL = _grid__LOC_EMB_QL_js_.getAjaxUrl();
	    _grid__LOC_EMB_QL_js_.render("LocEntID",'<%= Enterprise.getID()%>')		
	}
	
	function refreshLnks() {
		_grid__EntLin_js_.render("EntName",encodeURIComponent('<%= Utils.formatToJavascript(name) %>'));
	}
	
	//chercher société avec siren
	function searchSociete() {
		entCorpName = '<%= Utils.formatToJavascript(name) %>';
		siren = '<fl:getProperty name="Enterprise" property="EntSiren" alt=""/>';
		EntZip = '<fl:getProperty name="Enterprise" property="EntZip" alt=""/>';
		if (siren != '') {
			if (siren.length > 9) {
				try {
					siren = siren.substring(0,9);
				} catch(e) {
				}
			}
			window.open('http://www.societe.com/cgi-bin/recherche?rncs=' + siren);
		} else if (entCorpName != '' || EntZip != '') {
			if (EntZip != '') {
				EntZip = EntZip.substring(0,2);
			}
			window.open('http://www.societe.com/cgi-bin/liste?nom=' + entCorpName + '&dep=' + EntZip);
		} else {
			window.open('http://www.societe.com');
		}
	}
	
	 function getElement(aID){
        return (document.getElementById) ? document.getElementById(aID) : document.all[aID];
    }

    function getIFrameDocument(aID){ 
        var rv = null; 
        var frame = getElement(aID);
        // if contentDocument exists, W3C  compliant (e.g. Mozilla) 
        if (frame.contentDocument)
            rv = frame.contentDocument;
        else 
        	//  Internet Explorer  
            rv = document.frames[aID].document;
        return rv;
    }

    function refreshOthLabs(){
		_grid__OTHLABELS_js_.render();
	}
	
	function refreshOthMrqs(){
		_grid__OTHMARQUES_js_.render();
	}
	
	function refreshOthGds(){
		_grid__OTHGUIDES_js_.render();
	}
	
	function refreshFermetures(){
		_grid__FER_EMB_js_.render();
	}
    function adjustMyFrameHeight(myFrame){
        var frame = getElement(myFrame);
        var frameDoc = getIFrameDocument(myFrame);
        frame.height = frameDoc.body.offsetHeight;
    }
    
	function doOnLoad() {
		<%if (po_apercuPhotoID != null) {%>
		apercu = new Image();
		apercu.src = '<fl:webapp/>/download?id=<%=po_apercuPhotoID%>';
		// Sometimes, for an unknown reason, we have to do it twice 
		if (apercu.width == 0 && apercu.height == 0) {
			apercu = new Image();
			apercu.src = '<fl:webapp/>/download?id=<%=po_apercuPhotoID%>';
		}
		<%}%>
	}
    
	function refreshCots() {
		_grid__COTISATION_js_.render();
	}
	
</script>
<fl:bigTabs objectTitle="<%= objectTitle %>" listTitle="<%= listTitle %>" ou="<%= ou %>" showFooter="<%= showFooter %>">
	<table class="container" cellpadding="0">
		<tr>
			<td colspan="5" class="titreFiche">
				<fl:getProperty name="Enterprise" property="EntCorpName" alt="" />
				<span>
					<a href="javascript:goSearchEnterprise();"><img src="<fl:webapp/>/icons/google-news.png" name="icon" border="0" width="20" height="20" style="vertical-align:baseline;" title="<fl:getMessage code="L7090" alt="google news"/>"></a>
				</span>	
			</td>
		</tr>
		<tr class="ligne_separation"><td colspan="5"></td></tr>
		<tr>
			<td class="column2">
				<table class="container" >	
					<% if(!isAssociation){ %><fl:fieldRead property="EntHotelID_" /><% } %>
					<fl:fieldRead property="EntTriName_" />
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:label code="LF002" label="Adresse Postale"/></span></td>
					</tr>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><fl:label code="FF02E" label="Voie"/></td>
						<td id="EntVoie_value" class="dataValue"><fl:getProperty name="Enterprise" property="EntVoieNum_" alt=""/>,<fl:getProperty name="Enterprise" property="EntBTQCode_" alt=""/>&nbsp;<fl:getProperty name="Enterprise" property="EntNatureVoieID_" alt=""/>&nbsp;<fl:getProperty name="Enterprise" property="EntLblVoie_" alt=""/></td>
					</tr>
					<fl:fieldRead property="EntGeoCplt_" alt="" />
					<fl:fieldRead property="EntPtRmCourrier_" alt="" />
					<fl:fieldRead property="EntLieuDit_" alt="" />
					<td class="dataLabel"><fl:getMessage code="FF096" alt="Code Postal/Ville"/></td>
					<td id="Ent.Zip_value" class="dataValue">
						<div title="">
							<fl:getProperty name="Enterprise" property="EntZip" alt="" postText="&nbsp;"/><fl:getProperty name="Enterprise" property="EntCity" alt="" postText=""/><% try { Enterprise.getEntZip(); Enterprise.getEntCity(); %><br><% } catch(FieldNotInitializedException e) { try { Enterprise.getEntCity(); %><br><% } catch (FieldNotInitializedException ex) {}} %>
						</div>
					</td>
					<fl:fieldRead property="EntCtrID" alt="" />
				</table>
				<table class="container" >	
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<fl:fieldRead property="EntPhone" format="phone"/>
					<fl:fieldRead property="EntSecondPhone_" format="phone" labelCode="FF0CA"/>
					<fl:fieldRead property="EntFax"/>
					<fl:fieldRead property="EntMail_" labelCode="FF0AB"/>
					<fl:fieldRead property="EntSecondMail_" labelCode="FF162"/>
					<% if(!isAssociation){ %><fl:fieldRead property="EntBillingMail_" /><% } %>
					<tr class="fieldline">
						<td id="EntWeb_label" class="dataLabel"><fl:label code="F200B" label="Web"/></td>
						<td id="EntWeb_value" class="dataValue"><div title="<fl:getProperty name="Enterprise" property="EntWeb" alt=""/>"><% if (webAdr != null) { %><a href="<%=webAdr%>" target="_blank"><fl:getProperty name="Enterprise" property="EntWeb" alt=""/></a><% } else { %>&nbsp;<% } %></div></td>
					</tr>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>				
				</table>
				<% if(!isAssociation){%>
				<table class="container">	
					<fl:fieldRead property="EntTyeID"/>
					<tr class="fieldline">
						<td id="EntConseiller_label" class="dataLabel"><fl:label code="FF03D" label="Conseiller Technique"/></td>
						<td id="EntConseiller_value" class="dataValue"><fl:getProperty name="Enterprise" property="EntActID" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>" alt=""/></td>
					</tr>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:label code="LF004" label="Structure Locale"/></span></td>
					</tr>
					<fl:fieldRead property="EntDispName_"/>
					<fl:fieldRead property="EntTypoStructure_"/>
				</table>
				<% } %>
			</td>
			<td class="separation"><div class="separation"></div></td>
			<td class="column2">
			<% if(!isAssociation){%>
				<table class="container" cellpadding="0">
					<tr class="fieldline">
						<td id="EntPhoto_label" class="dataLabel"><fl:label code="FF001" label="Photo"/></td>
						<td id="EntPhoto_value" class="dataValue">
						<%if(po_apercuPhotoID != null) { %>
							<!-- <img alt="" src='<fl:webapp/>/download?id=<%=po_apercuPhotoID%>' onclick="javascript:afficheImage()" height="250" width="400"> -->
							<img alt="" src='<fl:webapp/>/download?id=<%=po_apercuPhotoID%>' height="250" width="400">
						<%}%>
						</td>
					</tr>
					<% if(!isPartenaire){ %>
					<tr class="fieldline">
						<td id="EntLocality_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:label code="" label="Localité"/></span></td>
					</tr>
					<fl:fieldRead property="EntLocalityID_" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_localite_.fl\") %>"/>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<fl:fieldRead property="EntNextAuditDt_"/>
					<fl:fieldRead property="EntCheNbID_"/>					
					<fl:fieldRead property="EntCocNbID_"/>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<tr class="fieldline">
						<td id="EntLocality_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:label code="" label="Classement étoile"/></span></td>
					</tr>
					<fl:fieldRead property="EntStarClassID_"/>
					<fl:fieldRead property="EntNormStarDt_"/>
					<fl:fieldRead property="EntReclassDate_"/>
					<tr class="fieldline">
						<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
					</tr>
					<fl:fieldRead property="EntAnnexe_"/> 
					<% } %>
				</table>
				<%}else{%>
					<table class="container" cellpadding="0">
						<fl:fieldRead property="EntTyeID"/>
						<tr class="fieldline">
							<td id="EntVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;">&nbsp;</span></td>
						</tr>
						<tr class="fieldline">
							<td id="EntLocality_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:getMessage code="LF09E" alt="Association"/></span></td>
						</tr>
						<fl:fieldRead property="EntEditListLogis_" valueCodeIfFalse="L2006" valueCodeIfTrue="L2005"/> 	
						<fl:fieldRead property="EntAnimStatut_"/>
						<fl:fieldRead property="EntAffectedTaux_"/>
					</table>
				<% } %>
			</td>
		</tr>
	</table>
	<%-- NOTES --%>
	<fl:notes name="EntNotes" title="<%= Utils.getMessage(session, \"F2024\", \"Notes\") %>" nbPix="32"><fl:getProperty name="Enterprise" property="EntNotes" alt=""/></fl:notes>
		<% if(!isAssociation){ %>
	<fl:smallTabs name="tab1" >	
		<fl:sTab hideLink ="true" id="contact" title="<%= Utils.getMessage(session, \"L3106\", false, true, \"Contacts\") %>">
			<table class="container" cellpadding="0">
					<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF1FF" alt="Autres fonctions"/></td></tr>
					<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr> 		
			</table>
			<div><fl:grid  name="PER_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=PER_EMB&PerEntID=\" + Enterprise.getID() %>"/></div>
			<div><br/></div>
			<table class="container" cellpadding="0">
					<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF200" alt="Fonctions association"/></td></tr>
					<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr> 		
			</table>
			<div><fl:grid  name="PER_ASSO" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=PER_ASSO&pEntID=\" + Enterprise.getID() %>"/></div>
		</fl:sTab>
	</fl:smallTabs>
	<fl:smallTabs name="tab12" >
	<%-- Autres Marques--%>
			<fl:sTab id="Autres Marques" title="<%= Utils.getMessage(session, \"\", false, true, \"Autres Marques\") %>">		
					<table class="container" cellpadding="0">
					<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF070" alt="Autres marques"/></td></tr>
				     <tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>	
					</table>			
			<fl:grid name="OTHMARQUES" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=OTHMARQUES&Om_Tiers=\" + id %>"/>
			<table class="container" cellpadding="0">	
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="FF1D4" alt="Autres labels"/></td></tr>
						<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
					<fl:grid name="OTHLABELS" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=OTHLABELS&Ol_Tiers=\" + id %>"/>	
				<table class="container" cellpadding="0">
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="FF1D5" alt="Autres guides"/></td></tr>
					    <tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
					<fl:grid name="OTHGUIDES" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=OTHGUIDES&Og_Tiers=\" + id %>"/>
			</fl:sTab>
		</fl:smallTabs>	
	<fl:smallTabs name="tab2" >	
		<%-- Contrats --%>
		<fl:sTab hideLink ="true" id="Contrats" title="<%= Utils.getMessage(session, \"\", false, true, \"Contrats\") %>">
			<fl:grid name="CTR_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CTR_EMB&EntID=\" + id  %>"/>
		</fl:sTab>
	</fl:smallTabs>
	<fl:smallTabs name="tab3" >	
		<%-- Infos société --%>
					<fl:sTab id="infosoc" title="<%= Utils.getMessage(session, \"LF005\", false, true, \"Infos société\") %>">
			<table class="container" cellpadding="0">
			<tr>
			<td class="column3">
				<table class="data_column" cellpadding="0">
					<fl:fieldRead property="EntDispName_"/>
					<fl:fieldRead property="EntSiret"/>
					<fl:fieldRead property="EntSiren"/>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					<fl:fieldRead property="EntRCS_"/>
					<fl:fieldRead property="EntCodeAPE_"/>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					<fl:fieldRead property="EntTVAIntracom_"/>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					<fl:fieldRead property="EntCA_"/>
					<fl:fieldRead property="EntNbEmployees_"/>
					<fl:fieldRead property="EntAtvID_"/>
				</table>
			</td>
			<td class="separation"><div class="separation"></div></td>
			<td class="column3">
				<table class="data_column" cellpadding="0">
					<td class="titreInterneSmalltabs" colspan="5">
					<fl:getMessage code="LF00E" alt="Coordonnées GPS"/>
					</td>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					<fl:fieldRead property="EntGPSX_"/>
					<fl:fieldRead property="EntGPSY_"/>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					<td class="titreInterneSmalltabs" colspan="5">
					<fl:getMessage code="LF1D6" alt="Coordonnées Bancaires FIL"/>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					 </td> 
					<fl:fieldRead property="EntBanque_"/>
					<fl:fieldRead property="EntIBAN_"/>
					<fl:fieldRead property="EntBIC_"/>
					
					<td class="titreInterneSmalltabs" colspan="5">
					<fl:getMessage code="LF1D7" alt="Coordonnées Bancaires LIS"/>
					</td>
					<tr><td colspan="5" class="ligne_separation"/></tr>
					 </td> 
					<fl:fieldRead property="EntBanqueLis_"/>
					<fl:fieldRead property="EntIBANLis_"/>
					<fl:fieldRead property="EntBICLis_"/>
				</table>
			</td>
			<td class="separation"><div class="separation"></div></td>
			<td class="column3">
				<table class="data_column" cellpadding="0">
				<fl:fieldRead property="EntLimitedResto_" valueCodeIfTrue="L2005" valueCodeIfFalse="L2006"/>
				<fl:fieldRead property="EntMajGA_" valueCodeIfTrue="L2005" valueCodeIfFalse="L2006"/>
				</table>
			</td>
			</tr>
			</table>
			</fl:sTab>
	</fl:smallTabs>
	<fl:smallTabs name="tab4" >	
		<%-- Prestations --%>
		<fl:sTab hideLink ="true" id="prestas" title="<%= Utils.getMessage(session, \"LF006\", false, true, \"Prestations\") %>">
			<table class="container" cellpadding="0">
				<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF09D" alt="Chambres"/></td></tr>
				<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
			</table>
			<fl:grid  name="ROO_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=ROO_EMB&RooTiers=\" + id %>"/>
			<table class="container" cellpadding="0">
				<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF098" alt="Equipements"/></td></tr>
				<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
			</table>
			<fl:grid  name="EQP_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=EQP_EMB&Eq_TiersID=\" + id %>"/>
			<table class="container" cellpadding="0">
				<fl:fieldRead property="EntThema_"/>
				<fl:fieldRead property="EntSpokLngID_"/> 	 
						<fl:fieldRead property="EntBankCardID_"/>
			</table>
			<table class="container" cellpadding="0">
				<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="FF15E" alt="Envies"/></td></tr>
				<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
			</table>
			<fl:grid  name="ENV_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=ENV_EMB&EnvTiersID=\" + id %>"/>
			
			<table class="container" cellpadding="0">
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF099" alt="Fermetures"/></td></tr>
						<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
			<fl:grid  name="FER_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=FER_EMB&FerTiersID=\" + id %>"/>
			<table class="container" cellpadding="0">
						
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="LF0A8" alt="Restaurants"/></td></tr>
						<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
					<fl:grid  name="RESTOS" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=RESTOS&EntRatachHotelID_=\" + id %>"/>
			<table class="container" cellpadding="0">	
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="F60B8" alt="Prix"/></td></tr>
							<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
					<fl:grid  name="PRX_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=PRX_EMB&PrxTiersID=\" + id %>"/>
		</fl:sTab>
	</fl:smallTabs>
	<fl:smallTabs name="tab5" >	
		<%-- Commandes --%>
		<fl:sTab hideLink ="true" id="Commandes" title="<%= Utils.getMessage(session, \"\", false, true, \"Commandes\") %>" >
			<fl:grid name="CMD_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CMD_EMB&OppEntID=\" + id + \"&OppStuID=\" + cmdStsRefID %>"/>
		</fl:sTab>
	</fl:smallTabs>
	<fl:smallTabs name="tab6" >	
		<%-- Correspondances --%>
		<fl:sTab hideLink ="true" id="Correspondances" title="<%= Utils.getMessage(session, \"\", false, true, \"Correspondances\") %>">
			<fl:grid  name="CORRESLIST" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CORRESLIST&IntTiersConc_=\" + Enterprise.getID() + \"&IntType_=\" + intCOR %>" />
		</fl:sTab>
	</fl:smallTabs>
	
	<fl:smallTabs name="tab7" >	
		<fl:sTab hideLink ="true" id="Missions" title="<%= Utils.getMessage(session, \"LF1D1\", \"Historique décisions\") %>">
			<table class="container" cellpadding="0">
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="FF1BE" alt="Dossier"/></td></tr>
						<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
			<fl:grid name="CLAS_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CLAS_EMB&Cl_Tiers=\" + id  %>"/>
			<div><br/></div>
			<table class="container" cellpadding="0">
						<tr><td colspan="3" class="titreInterneSmalltabs"><fl:getMessage code="FF21F" alt="Classement"/></td></tr>
						<tr><td colspan="3" class="dataLabel">&nbsp;</td></tr>
					</table>
			<fl:grid name="AUDIT" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=AUDIT&Ds_HotelID=\" + id  %>"/>
		</fl:sTab>	
	</fl:smallTabs>
	<fl:smallTabs name="tab8" >	
		<fl:sTab hideLink ="true" id="EVTASSO" title="<%= Utils.getMessage(session, \"LF085\", \"Instances\") %>">
				<fl:grid name="EVTASSO" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=EVTASSO&EvtTiers_=\" + id  %>"/>
		</fl:sTab>
	</fl:smallTabs>
	
	<fl:smallTabs name="tab9" >	
		<%-- Chèques Cadeaux --%>
		<fl:sTab hideLink ="true" id="GCH_EMB3" title="<%= Utils.getMessage(session, \"LF095\", false, true, \"Chèques Cadeaux\") %>">
<!-- 		http://u-project2.umanis.com/view.php?id=46964 -->
			<fl:grid name="GCH_EMB3" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=GCH_EMB3&GchUseWithAdherent=\" + id %>"/>
		</fl:sTab>
	</fl:smallTabs>
	<%-- <fl:smallTabs name="tab15">
	Fidélisation
			<fl:sTab id="Fidelity" title="<%= Utils.getMessage(session, \"FF0AF\", \"Fidélisation\") %>" onselect="refreshFidelity();">
				<table class="container" cellpadding="0">
					<tr><td class="dataLabel"><fl:getMessage code="LF07F" alt="Chèques de Fidélité"/></td></tr>
					<tr><td class="dataLabel">&nbsp;</td></tr>
				</table>
				<fl:grid name="CQF_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CQF_EMB&Cf_UtilAdherent=\" + id %>"/>
				<table class="container" cellpadding="0">
					<tr><td class="dataLabel"><fl:getMessage code="LF080" alt="Transactions de Fidélité"/></td></tr>
					<tr><td class="dataLabel">&nbsp;</td></tr>
				</table>
				<fl:grid name="TRF_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=TRF_EMB&Tf_AdherentID=\" + id %>"/>
			</fl:sTab>
	</fl:smallTabs>
	<fl:smallTabs name="tab9" >	
		Réservations
		<fl:sTab hideLink ="true" id="Réservations" title="<%= Utils.getMessage(session, \"\", false, true, \"Réservations\") %>">
			<fl:grid name="RESA" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=RESA&Rs_HotelID=\" + id %>"/>
		</fl:sTab>
	</fl:smallTabs>
	 --%>
	
	<fl:smallTabs name="tab10" >	
		<fl:sTab hideLink ="true" id="Textes" title="<%= Utils.getMessage(session, \"\", false, true, \"Textes\") %>">
			<fl:grid name="TEXTES" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=TEXTES&TxtTiersID=\" + id %>"/>
		</fl:sTab>
	</fl:smallTabs>
	
	
	<% } else {%>
	<fl:smallTabs name="tab1" >	
		<fl:sTab hideLink ="true" id="contact" title="<%= Utils.getMessage(session, \"L3106\", false, true, \"Contacts\") %>" onselect="refreshPersons();">
				<div><fl:grid  name="PER_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=PER_EMB&PerEntID=\" + Enterprise.getID() %>"/></div>
		</fl:sTab>
	</fl:smallTabs>
	
	<fl:smallTabs name="tab2" >	
		<fl:sTab hideLink ="true" id="Correspondances" title="<%= Utils.getMessage(session, \"\", false, true, \"Correspondances\") %>" onselect="refreshCorresps();">
				<fl:grid  name="CORRESLIST" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CORRESLIST&IntTiersConc_=\" + Enterprise.getID() + \"&IntType_=\" + intCOR %>" />
		</fl:sTab>
	</fl:smallTabs>
	
	<fl:smallTabs name="tab3" >	
		<fl:sTab hideLink ="true" id="EVTASSO" title="<%= Utils.getMessage(session, \"LF085\", \"Instances\") %>" onselect="refreshInstancesAsso();">
				<fl:grid name="EVTASSO" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=EVTASSO&EvtTiers_=\" + id  %>"/>
			</fl:sTab>
	</fl:smallTabs>
	
	<fl:smallTabs name="tab4" >	
		<%-- Cotisations --%>
		<fl:sTab id="Cotisation" title="<%= Utils.getMessage(session, \"LF0AE\", \"Cotisations\") %>" onselect="refreshCots();">
			<fl:grid  name="COTISATION" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=COTISATION&CotEntID=\" + Enterprise.getID()%>" />
		</fl:sTab>
	</fl:smallTabs>
	<% } %>
	<% if (!print) { %>	
	<%--FICHIERS --%>
	<fl:smallTabs name="EntRead8" >	
		<fl:sTab hideLink ="true" id="FATTACH" title="<%= Utils.getMessage(session, \"L201C\", \"Documents joints\") %>">
			<div class="dataValue" style="width:100%;">
				<fl:attach name="Enterprise" colID="EntAttID" edit="false"/>
			</div>
		</fl:sTab>
	</fl:smallTabs>
	<% } %>	
</fl:bigTabs>