/* Automatically generated.
 * Copyright (c) 2000 by SAP AG, Walldorf.,
 * http://www.sap.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of SAP AG, Walldorf. You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms
 * of the license agreement you entered into with SAP.
 * Do not edit.
 */

package web;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import ro.emid.common.types.Category;
import ro.emid.common.db.CategoryAccessDB;
import ro.emid.common.constants.FiltruFSCConstants;
import ro.emid.common.utils.ObjectUtils;
import ro.emid.Application;
import ro.emid.common.utils.FSC;


public class tag_filtru_2d_localizare_1875650_1758654585203
	extends javax.servlet.jsp.tagext.SimpleTagSupport
{




	private JspContext jspContext;
	private java.io.Writer _jspx_sout;
	private java.lang.Boolean hideLabels;


	public java.lang.Boolean getHideLabels() {
		return this.hideLabels;
	}
	public void setHideLabels(java.lang.Boolean hideLabels) {
		this.hideLabels = hideLabels;
	}
	public void setJspContext(JspContext ctx) {
		super.setJspContext(ctx);
		java.util.ArrayList _jspx_nested = null;
		java.util.ArrayList _jspx_at_begin = null;
		java.util.ArrayList _jspx_at_end = null;
		this.jspContext = new com.sap.engine.services.servlets_jsp.lib.jspruntime.JspContextWrapper(ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null);
	}

	public JspContext getJspContext() {
		return this.jspContext;
	}

	public void doTag() throws JspException, java.io.IOException {
		com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl _jspx_pageContext = (com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl)jspContext;
		HttpServletRequest request = (HttpServletRequest) _jspx_pageContext.getRequest();
		HttpServletResponse response = (HttpServletResponse) _jspx_pageContext.getResponse();
		HttpSession session = _jspx_pageContext.getSession();
		ServletContext application = _jspx_pageContext.getServletContext();
		ServletConfig config = _jspx_pageContext.getServletConfig();
		JspWriter out = jspContext.getOut();
		com.sap.engine.services.servlets_jsp.server.application.InjectionWrapper _jspx_resourceInjector = ((com.sap.engine.services.servlets_jsp.server.application.ServletContextImpl)_jspx_pageContext.getServletContext()).getApplicationContext().getInjectionWrapper();


		if( getHideLabels() != null ) {
			_jspx_pageContext.setAttribute("hideLabels", getHideLabels());
		}
		try {
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(1,49);to=(2,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(2,54);to=(3,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(3,63);to=(4,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(4,52);to=(5,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(5,39);to=(6,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(6,44);to=(8,0)]
			out.print("\r\n\r\n");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(8,95);to=(10,0)]
			out.print("\r\n\r\n");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(10,0);to=(33,2)]
			
    if( hideLabels == null ) hideLabels = false;

    final long _fscFilialaId = ObjectUtils.getIntValue(request.getParameter(FiltruFSCConstants.FILIALA_ID));
    final long _fscSucursalaId = ObjectUtils.getIntValue(request.getParameter(FiltruFSCConstants.SUCURSALA_ID));
    final long _fscCentruId = ObjectUtils.getIntValue(request.getParameter(FiltruFSCConstants.CENTRU_ID));
    final int runReport = ObjectUtils.getIntValue(request.getParameter("run_report"));

    FSC fscRol = (FSC) request.getAttribute(FiltruFSCConstants.Role.FSC_ROL);
    FSC fscLocalizare = (FSC) request.getAttribute(FiltruFSCConstants.Localizare.FSC_LOCALIZARE);


    long filialaIdRole = fscRol.getFilialaId();
    long sucursalaIdRole = fscRol.getSucursalaId();
    long centruIdRole = fscRol.getCentruId();


    long filialaIdLc = fscLocalizare.getFilialaId();
    long sucursalaIdLc = fscLocalizare.getSucursalaId();
    long centruIdLc = fscLocalizare.getCentruId();

    boolean fscShowFilialaOnly = request.getAttribute( "fscShowFilialaOnly") != null;
    boolean fscHideCentru = request.getAttribute( "fscHideCentru") != null;

// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(33,2);to=(36,0)]
			out.print("\r\n\r\n\r\n");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(36,0);to=(36,21)]
			 if(!hideLabels){
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(36,21);to=(37,16)]
			out.print("\r\n    <label for=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(37,16);to=(37,50)]
			out.print(FiltruFSCConstants.FILIALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(37,50);to=(38,0)]
			out.print("\">Filiala:</label>\r\n");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(38,0);to=(38,5)]
			}
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(38,5);to=(39,14)]
			out.print("\r\n<select name=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(39,14);to=(39,48)]
			out.print(FiltruFSCConstants.FILIALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(39,48);to=(39,54)]
			out.print("\" id=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(39,54);to=(39,88)]
			out.print(FiltruFSCConstants.FILIALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(39,88);to=(40,4)]
			out.print("\" class=\"gsapselect\" style=\"margin-right: 10px;\">\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(40,4);to=(40,49)]
			  if (Application.runAsAparatCentral()){ 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(40,49);to=(42,4)]
			out.print("\r\n        <option value=\"-1\">Electrica SA:</option>\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(42,4);to=(43,73)]
			  final Category[] filiale = CategoryAccessDB.getAllCategoriesByParentId(-1);
        if (filiale != null) for (int i = 0; i < filiale.length; i++) {
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(43,73);to=(44,27)]
			out.print("\r\n            <option value=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(44,27);to=(44,50)]
			out.print(filiale[i].getId());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(44,50);to=(44,51)]
			out.print("\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(44,51);to=(44,109)]
			out.print(filiale[i].getId() == _fscFilialaId ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(44,109);to=(44,110)]
			out.print(">");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(44,110);to=(44,135)]
			out.print(filiale[i].getName());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(44,135);to=(45,4)]
			out.print("</option>\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(45,4);to=(45,12)]
			  } 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(45,12);to=(46,4)]
			out.print("\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(46,4);to=(48,32)]
			 }else{
        final Category category = CategoryAccessDB.getFiliala();
        if (category != null){
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(48,32);to=(49,27)]
			out.print("\r\n            <option value=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(49,27);to=(49,48)]
			out.print(category.getId());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(49,48);to=(49,50)]
			out.print("\">");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(49,50);to=(49,73)]
			out.print(category.getName());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(49,73);to=(50,8)]
			out.print("</option>\r\n        ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(50,8);to=(50,13)]
			}
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(50,13);to=(51,4)]
			out.print("\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(51,4);to=(51,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(51,9);to=(54,0)]
			out.print("\r\n</select>\r\n\r\n");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(54,0);to=(54,31)]
			 if( !fscShowFilialaOnly ){
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(54,31);to=(56,4)]
			out.print("\r\n\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(56,4);to=(56,25)]
			 if(!hideLabels){
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(56,25);to=(57,20)]
			out.print("\r\n        <label for=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(57,20);to=(57,56)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(57,56);to=(58,4)]
			out.print("\">Sucursala:</label>\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(58,4);to=(58,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(58,9);to=(60,23)]
			out.print("\r\n    <span id=\"sucursalaDiv\" style=\"margin-right: 10px;\">\r\n           <select id=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(60,23);to=(60,59)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(60,59);to=(60,67)]
			out.print("\" name=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(60,67);to=(60,103)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(60,103);to=(61,15)]
			out.print("\" class=\"gSAPSelect\" onchange=\"alert(1)\">\r\n               ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(61,15);to=(61,48)]
			 if (sucursalaIdRole == -1){ 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(61,48);to=(62,34)]
			out.print("\r\n               <option value=\"-1\">");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(62,34);to=(62,79)]
			out.print(hideLabels ? "Sucursala:" : "Selectati:");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(62,79);to=(63,15)]
			out.print("</option>\r\n               ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(63,15);to=(65,49)]
			} else{
                   Category sucursalaById = CategoryAccessDB.getById(sucursalaIdRole);
                   if (sucursalaById != null){ 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(65,49);to=(66,35)]
			out.print("\r\n                    <option value=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(66,35);to=(66,61)]
			out.print(sucursalaById.getId());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(66,61);to=(66,63)]
			out.print("\">");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(66,63);to=(66,91)]
			out.print(sucursalaById.getName());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(66,91);to=(67,15)]
			out.print("</option>\r\n               ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(67,15);to=(68,18)]
			  }
               }
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(68,18);to=(72,4)]
			out.print("\r\n           </select>\r\n    </span>\r\n\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(72,4);to=(72,28)]
			if( !fscHideCentru){
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(72,28);to=(73,8)]
			out.print("\r\n        ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(73,8);to=(73,29)]
			 if(!hideLabels){
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(73,29);to=(74,24)]
			out.print("\r\n            <label for=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(74,24);to=(74,57)]
			out.print(FiltruFSCConstants.CENTRU_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(74,57);to=(75,8)]
			out.print("\">C.E.:</label>\r\n        ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(75,8);to=(75,13)]
			}
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(75,13);to=(77,24)]
			out.print("\r\n        <span id=\"centruDiv\" style=\"margin-right: 10px;\">\r\n            <select id=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(77,24);to=(77,57)]
			out.print(FiltruFSCConstants.CENTRU_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(77,57);to=(77,65)]
			out.print("\" name=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(77,65);to=(77,98)]
			out.print(FiltruFSCConstants.CENTRU_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(77,98);to=(78,16)]
			out.print("\" class=\"gSAPSelect\">\r\n                ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(78,16);to=(78,46)]
			 if (centruIdRole == -1){ 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(78,46);to=(79,35)]
			out.print("\r\n                <option value=\"-1\">");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(79,35);to=(79,75)]
			out.print(hideLabels ? "C.E.:" : "Selectati:");
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(79,75);to=(80,16)]
			out.print("</option>\r\n                ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(80,16);to=(82,47)]
			} else{
                    Category centruById = CategoryAccessDB.getById(centruIdRole);
                    if (centruById != null){ 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(82,47);to=(83,31)]
			out.print("\r\n                <option value=\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(83,31);to=(83,54)]
			out.print(centruById.getId());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(83,54);to=(83,56)]
			out.print("\">");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(83,56);to=(83,81)]
			out.print(centruById.getName());
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(83,81);to=(84,16)]
			out.print("</option>\r\n                ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(84,16);to=(85,20)]
			  }
                } 
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(85,20);to=(88,4)]
			out.print("\r\n            </select>\r\n        </span>\r\n    ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(88,4);to=(88,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(88,9);to=(93,64)]
			out.print("\r\n\r\n    <script type=\"text/javascript\">\r\n\r\n        function fill_sucursala_select(selectedValue, disabled, firstShow) {\r\n            resetComboLeaveFirstOption(document.getElementById(\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(93,64);to=(93,100)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(93,100);to=(94,64)]
			out.print("\"));\r\n            resetComboLeaveFirstOption(document.getElementById(\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(94,64);to=(94,97)]
			out.print(FiltruFSCConstants.CENTRU_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(94,97);to=(97,53)]
			out.print("\"));\r\n\r\n            //var filialaId = document.filialaId[ document.filialaId.selectedIndex].value;\r\n            var filialaId = document.getElementById(\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(97,53);to=(97,87)]
			out.print(FiltruFSCConstants.FILIALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(97,87);to=(98,64)]
			out.print("\").value;\r\n            var params = \"parentId=\" + filialaId + \"&selectName=");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(98,64);to=(98,100)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(98,100);to=(98,185)]
			out.print("&disabled=\" + disabled + (selectedValue ? \"&selectedValue=\" + selectedValue : \"\") + (");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(98,185);to=(98,200)]
			out.print(hideLabels);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(98,200);to=(99,35)]
			out.print("?\"&selectatiOption=Sucursala:\":\"\");\r\n            var interSucursalaId = ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(99,35);to=(99,55)]
			out.print(sucursalaIdRole);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(99,55);to=(100,32)]
			out.print("\r\n            var interCentruId = ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(100,32);to=(100,49)]
			out.print(centruIdRole);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(100,49);to=(109,39)]
			out.print("\r\n\r\n            /*daca nu exista filiala sau daca exista valori venite din interceptor pentru sucursala si centru*/\r\n            if (filialaId == -1 || (interSucursalaId != -1 && interCentruId != -1)) {\r\n                return;\r\n            }\r\n            else{\r\n                /*daca exista valoare din interceptor pentru sucursala si nu exista valoare venita din interceptor pentru centru */\r\n                if (interSucursalaId != -1 && interCentruId == -1 && firstShow){\r\n                    fill_centru_select(");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(109,39);to=(109,106)]
			out.print(centruIdLc != -1 && runReport == 0 ? centruIdLc : _fscCentruId);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(109,106);to=(116,19)]
			out.print(", false);\r\n                    return;\r\n                }\r\n            }\r\n\r\n            getCategoriesFromServer(params, function (originalRequest) {\r\n                $(\'sucursalaDiv\').innerHTML = getResponseMesg(originalRequest.responseText);\r\n                $(\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(116,19);to=(116,55)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(116,55);to=(119,39)]
			out.print("\").onchange = fill_centru_select;\r\n\r\n                if( firstShow){\r\n                    fill_centru_select(");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(119,39);to=(119,106)]
			out.print(centruIdLc != -1 && runReport == 0 ? centruIdLc : _fscCentruId);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(119,106);to=(125,64)]
			out.print(", false);\r\n                }\r\n            });\r\n        }\r\n\r\n        function fill_centru_select(selectedValue, disabled) {\r\n            resetComboLeaveFirstOption(document.getElementById(\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(125,64);to=(125,97)]
			out.print(FiltruFSCConstants.CENTRU_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(125,97);to=(127,56)]
			out.print("\"));\r\n\r\n            var sucursalaId =  document.getElementById(\"");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(127,56);to=(127,92)]
			out.print(FiltruFSCConstants.SUCURSALA_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(127,92);to=(128,32)]
			out.print("\").value;\r\n            var interCentruId = ");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(128,32);to=(128,49)]
			out.print(centruIdRole);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(128,49);to=(132,66)]
			out.print("\r\n\r\n            if (sucursalaId == -1 || interCentruId != -1) return;\r\n\r\n            var params = \"parentId=\" + sucursalaId + \"&selectName=");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(132,66);to=(132,99)]
			out.print(FiltruFSCConstants.CENTRU_ID);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(132,99);to=(132,184)]
			out.print("&disabled=\" + disabled + (selectedValue ? \"&selectedValue=\" + selectedValue : \"\") + (");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(132,184);to=(132,199)]
			out.print(hideLabels);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(132,199);to=(141,34)]
			out.print("?\"&selectatiOption=C.E.:\":\"\");\r\n\r\n            getCategoriesFromServer(params, function (originalRequest) {\r\n                //alert(getResponseMesg(originalRequest.responseText));\r\n                $(\'centruDiv\').innerHTML = getResponseMesg(originalRequest.responseText);\r\n            });\r\n        }\r\n\r\n        setTimeout(function(){\r\n            fill_sucursala_select(");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(141,34);to=(141,110)]
			out.print(sucursalaIdLc != -1 && runReport == 0 ? sucursalaIdLc : _fscSucursalaId);
// end
// HTML // begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(141,110);to=(147,0)]
			out.print(", false, true);\r\n        }, 300);\r\n\r\n\r\n\r\n    </script>\r\n");
// end
// begin [file="D:/usr/sap/QOR/J00/j2ee/cluster/apps/JavaEE/emid-callcenter/servlet_jsp/emid-callcenter/root/WEB-INF/tags/filtru-localizare.tag";from=(147,0);to=(147,5)]
			}
// end

		} catch(Throwable t) {
			if(t instanceof SkipPageException)
				throw (SkipPageException) t;
			if(t instanceof java.io.IOException)
				throw (java.io.IOException) t;
			if(t instanceof IllegalStateException)
				throw (IllegalStateException) t;
			if(t instanceof JspException)
				throw (JspException) t;
			throw new JspException(t);
		} finally {
			((com.sap.engine.services.servlets_jsp.lib.jspruntime.JspContextWrapper)jspContext).syncEndTagFile();
		}
	}
}
