/* Automatically generated.
 * Copyright (c) 2000-2006 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.
 */

import java.util.Date;
import ro.emid.common.utils.ObjectUtils;
import ro.emid.common.db.framework.ReportStatement;
import java.util.List;
import ro.emid.common.utils.pagination.PaginationController;
import ro.emid.common.db.AccessDB;
import ro.emid.common.utils.pagination.PaginationConstants;
import ro.emid.common.utils.sort.SortController;
import ro.emid.common.utils.sort.SortData;
import ro.emid.common.db.NomAccessDB;
import ro.emid.common.utils.StringUtils;
import java.io.File;
import java.util.Set;
import java.util.HashSet;
import ro.emid.common.db.CategoryAccessDB;
import ro.emid.incidente.IncidenteSessionUtils;
import ro.emid.common.types.*;
import ro.emid.incidente.util.RaportTop10InstalatiiExcelExporter;
import ro.emid.common.constants.*;
import ro.emid.common.utils.pagination.PaginationData;
import ro.emid.common.types.Category;
import ro.emid.incidente.IncidenteSessionUtils;
import ro.emid.common.utils.SessionUtils;
import ro.emid.common.types.User;
import ro.emid.common.constants.AppConstants;
import ro.emid.common.constants.RoleConstants;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public class JEE_jsp_WEB_2d_INF_pagelet_rapoarte_raport_2d_top10_2d_fi_1495030460748 extends com.sap.engine.services.servlets_jsp.lib.jspruntime.JspBase{
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(24,0);to=(27,2)]

    private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger("raportTop10Instalatii_jsp");
    private static final java.text.SimpleDateFormat _df = new java.text.SimpleDateFormat("yyyyMMdd");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(29,0);to=(42,2)]

    public static final int COD_ANS_LEA = 50;
    public static final int COD_ANS_LES = 51;

    private boolean exists(final String []arr, final String value){
        if( arr == null) return false;

        for (int i = 0; i < arr.length; i++) {
            if( arr[i] == null && value == null) return true;
            if( arr[i] != null && value != null && arr[i].equals( value)) return true;
        }
        return false;
    }
// end

	public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
	{
		//isXml=false
		JspFactory  _jspFactory     = JspFactory.getDefaultFactory();
		PageContext pageContext = _jspFactory.getPageContext(this,request,response,null,true,32768,true);
		ServletConfig config = pageContext.getServletConfig();
		ServletContext application = pageContext.getServletContext();
		com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl _jspx_pageContext = (com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl) pageContext;
		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();
		HttpSession session = pageContext.getSession();
		if (!response.isCommitted()) {
		response.setContentType("text/html;charset=UTF-8");
		}
		JspWriter   out     = pageContext.getOut();
		java.lang.Object page = this;
		try {
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(1,35);to=(2,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(2,53);to=(3,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(3,64);to=(4,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(4,35);to=(5,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(5,73);to=(6,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(6,47);to=(7,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(7,72);to=(8,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(8,61);to=(9,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(9,55);to=(10,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(10,50);to=(11,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(11,53);to=(12,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(12,33);to=(13,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(13,34);to=(14,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(14,38);to=(15,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(15,55);to=(16,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(16,60);to=(17,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(17,43);to=(18,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(18,78);to=(19,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(19,47);to=(20,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(20,67);to=(22,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(1,50);to=(2,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(2,60);to=(3,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(3,54);to=(4,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(4,46);to=(5,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(5,58);to=(6,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(6,50);to=(8,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(8,0);to=(34,2)]
			
    final boolean printVersion = request.getParameter("printVersion") != null && "true".equals( request.getParameter("printVersion")) || request.getAttribute("printVersion") != null && "true".equals( request.getAttribute("printVersion")) ;

    final User user = SessionUtils.getUserLogat(session);

    Category filiala = IncidenteSessionUtils.getFiliala(session);
    if(filiala == null){
        filiala = new Category();
    }

    Category sucursala = IncidenteSessionUtils.getSucursala(session);
    if(sucursala == null){
        sucursala = new Category();
    }

    Category centruExploatare = IncidenteSessionUtils.getCentru(session);
    if(centruExploatare == null){
        centruExploatare = new Category();
    }

    Category formatiaDeLucru = IncidenteSessionUtils.getFormatia(session);
    if(formatiaDeLucru == null){
        formatiaDeLucru = new Category();
    }

    boolean isCuSectiiSiCentre = ((sucursala != null && sucursala.isCuSectiiSiCentre()) || (centruExploatare != null && centruExploatare.isCuSectiiSiCentre()));

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(22,48);to=(24,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(27,2);to=(29,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(42,2);to=(48,12)]
			out.print("\r\n\r\n\r\n<TABLE border=0 cellPading=0 cellSpacing=0 width=\"100%\">\r\n    <TR>\r\n        <TD>\r\n            ");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(1,59);to=(2,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(2,0);to=(13,2)]
			
    if (user.getIeLevel() == RoleConstants.NIVEL_SUCURSALA) {
        filiala.setShowAsLink(false);
    } else if (user.getIeLevel() == RoleConstants.NIVEL_CENTRU) {
        filiala.setShowAsLink(false);
        sucursala.setShowAsLink(false);
    } else if (user.getIeLevel() == RoleConstants.NIVEL_FORMATIE) {
        filiala.setShowAsLink(false);
        sucursala.setShowAsLink(false);
        centruExploatare.setShowAsLink(false);
    }

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(13,2);to=(16,0)]
			out.print("\n<span class=\"localizare\">\n<span class=\"bold\">E\u015fti aici:</span>\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(16,0);to=(17,34)]
			if (filiala != null && filiala.getId() != -1) {
    if( filiala.isShowAsLink()){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(17,34);to=(18,34)]
			out.print("\n        <a title=\"Lista sucursale ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(18,34);to=(18,56)]
			out.print(filiala.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(18,56);to=(18,77)]
			out.print("\" class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(18,77);to=(18,103)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(18,103);to=(18,126)]
			out.print("?action=showSucursale\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(18,126);to=(18,148)]
			out.print(filiala.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(18,148);to=(19,4)]
			out.print("</a>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(19,4);to=(19,14)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(19,14);to=(20,8)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(20,8);to=(20,30)]
			out.print(filiala.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(20,30);to=(21,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(21,4);to=(21,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(21,9);to=(23,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(23,0);to=(23,5)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(23,5);to=(24,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(24,0);to=(24,55)]
			if( sucursala != null && sucursala.getId() != -1){ 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(24,55);to=(26,4)]
			out.print("\n    <span class=\"slash\">/</span>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(26,4);to=(26,38)]
			if( sucursala.isShowAsLink()){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(26,38);to=(27,29)]
			out.print("\n        <a title=\"Lista C.E. ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(27,29);to=(27,53)]
			out.print(sucursala.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(27,53);to=(27,74)]
			out.print("\" class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(27,74);to=(27,100)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(27,100);to=(27,120)]
			out.print("?action=showCentre\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(27,120);to=(27,144)]
			out.print(sucursala.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(27,144);to=(28,4)]
			out.print("</a>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(28,4);to=(28,14)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(28,14);to=(29,8)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(29,8);to=(29,32)]
			out.print(sucursala.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(29,32);to=(30,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(30,4);to=(30,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(30,9);to=(31,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(31,0);to=(31,5)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(31,5);to=(33,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(33,0);to=(33,68)]
			if( centruExploatare != null && centruExploatare.getId() != -1){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(33,68);to=(35,4)]
			out.print("\n    <span class=\"slash\">/</span>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(35,4);to=(35,45)]
			if( centruExploatare.isShowAsLink()){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(35,45);to=(36,35)]
			out.print("\n        <a title=\"Lista evenimente ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(36,35);to=(36,66)]
			out.print(centruExploatare.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(36,66);to=(36,87)]
			out.print("\" class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(36,87);to=(36,113)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(36,113);to=(36,137)]
			out.print("?action=showEvenimente\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(36,137);to=(36,168)]
			out.print(centruExploatare.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(36,168);to=(37,4)]
			out.print("</a>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(37,4);to=(37,14)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(37,14);to=(38,8)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(38,8);to=(38,39)]
			out.print(centruExploatare.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(38,39);to=(39,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(39,4);to=(39,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(39,9);to=(40,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(40,0);to=(40,5)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(40,5);to=(42,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(42,0);to=(42,66)]
			if( formatiaDeLucru != null && formatiaDeLucru.getId() != -1){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(42,66);to=(44,4)]
			out.print("\n    <span class=\"slash\">/</span>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(44,4);to=(44,44)]
			if( formatiaDeLucru.isShowAsLink()){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(44,44);to=(45,35)]
			out.print("\n        <a title=\"Lista evenimente ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(45,35);to=(45,65)]
			out.print(formatiaDeLucru.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(45,65);to=(45,86)]
			out.print("\" class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(45,86);to=(45,112)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(45,112);to=(45,136)]
			out.print("?action=showEvenimente\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(45,136);to=(45,166)]
			out.print(formatiaDeLucru.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(45,166);to=(46,4)]
			out.print("</a>\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(46,4);to=(46,14)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(46,14);to=(47,8)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(47,8);to=(47,38)]
			out.print(formatiaDeLucru.getName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(47,38);to=(48,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(48,4);to=(48,9)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(48,9);to=(49,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(49,0);to=(49,5)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/header-localizare.jsp";from=(49,5);to=(50,7)]
			out.print("\n</span>");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(48,57);to=(49,63)]
			out.print("\r\n            <span class=\"slash\">/</span> <A class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(49,63);to=(49,89)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(49,89);to=(56,0)]
			out.print("?action=rapoarte\">Rapoarte</A>\r\n            <span class=\"slash\">/</span> Raport top 10 instalatii (FI)\r\n        </TD>\r\n    </TR>\r\n</TABLE>\r\n\r\n\r\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(56,0);to=(389,2)]
			
    final boolean toate = true;
//    boolean toate = ObjectUtils.getIntValue( request.getParameter("toate"), -1) == 1;
    final boolean statii = ObjectUtils.getIntValue( request.getParameter("statii"), -1) == 1;
    final boolean linii = ObjectUtils.getIntValue( request.getParameter("linii"), -1) == 1;
    final boolean posturi = ObjectUtils.getIntValue( request.getParameter("posturi"), -1) == 1;
    final boolean derivatii = ObjectUtils.getIntValue( request.getParameter("derivatii"), -1) == 1;
    final boolean bobine = ObjectUtils.getIntValue( request.getParameter("bobine"), -1) == 1;
    final boolean celule = ObjectUtils.getIntValue( request.getParameter("celule"), -1) == 1;
    final boolean bare = ObjectUtils.getIntValue( request.getParameter("bare"), -1) == 1;
    final boolean trafo = ObjectUtils.getIntValue( request.getParameter("trafo"), -1) == 1;

    final String lea = ObjectUtils.getStringValue( request.getParameter("lea"));
    final String les = ObjectUtils.getStringValue( request.getParameter("les"));

    final String[] ansambluri = request.getParameterValues("ansamblu");

    final Date dataStart = ObjectUtils.getDateValue( request.getParameter("data_start"), AppConstants.FORMAT_DATA);
    Date dataStop  = ObjectUtils.getDateValue( request.getParameter("data_stop"), AppConstants.FORMAT_DATA);
    if( dataStop == null) dataStop = new Date();

    if( dataStart != null) session.setAttribute( "raportTop10.dataStart", dataStart); else session.removeAttribute( "raportTop10.dataStart");
    if( dataStop  != null) session.setAttribute( "raportTop10.dataStop", dataStop); else session.removeAttribute("raportTop10.dataStop");

    final int advancedFilters = ObjectUtils.getIntValue(request.getParameter("advancedFilters"), 0);

    final int tipInstalatieReq = ObjectUtils.getIntValue( request.getParameter("tipInstalatie"), -1);
    final long idInstalatieReq = ObjectUtils.getLongValue(request.getParameter("idInstalatie"), -1);
    final String denInstalatieReq = StringUtils.getNullSafe( request.getParameter("denInstalatie"), "");

    int nivelTensiune = -1;
    if ( advancedFilters == 1 ){
        nivelTensiune = ObjectUtils.getIntValue( request.getParameter( "nivelTensiune"), -1);
    }

    List result = null;
    class Totaluri{
        long countIncidente;
        long durataIncidente;
        double energieNelivrata;
        double costMent;
        double costDaune;
        double costExpl;
        double costTotal;
    }

    Totaluri totaluri = null;

    final PaginationData pd = PaginationController.getPaginationData( request, 20);

    final SortData sd = SortController.getSortData( request, "CNT", "DESC" );

    final ro.emid.common.types.CategoryCheckData checkData = IncidenteSessionUtils.getCategoriiSelectate(session);

    StringBuffer sql = null;
    if( toate || statii || linii || posturi || derivatii || bobine || celule || bare || trafo){

        final StringBuffer filter = new StringBuffer();
        final StringBuffer filter2 = new StringBuffer();

        final Category filialaRaport = filiala;
        final Category sucursalaRaport = sucursala;
        final Category centruRaport = centruExploatare;

        if( filialaRaport != null ) session.setAttribute( "raportTop10.filiala", filialaRaport);
        if( sucursalaRaport != null ) session.setAttribute( "raportTop10.sucursala", sucursalaRaport);
        if( centruRaport != null ) session.setAttribute( "raportTop10.centru", centruRaport);


        if( idInstalatieReq > 0){
            filter2.append(" AND inst.ID = ").append( idInstalatieReq );
        }

        if( filialaRaport != null && filialaRaport.getId() > 0){
            filter.append(" AND i.FILIALA_ID = ").append( filialaRaport.getId());
        }

        if( sucursalaRaport != null && sucursalaRaport.getId() > 0){
            filter.append(" AND i.SUCURSALA_ID = ").append( sucursalaRaport.getId());
        }

        if( centruRaport != null && centruRaport.getId() > 0){
            filter.append(" AND i.SECTIE_ID = ").append( centruRaport.getId());
        }

        if ( dataStart != null){
            filter.append( " AND i.DATA >= TO_DATE('").append( AppConstants.format(dataStart)).append("', 'DD.MM.YYYY') " );
        }

        if ( dataStop != null){
            filter.append( " AND i.DATA <= TO_DATE('").append( AppConstants.format(dataStop)).append("', 'DD.MM.YYYY') " );
        }

        final StringBuffer liniiFilter = new StringBuffer();

        if ( !StringUtils.isZeroLength( lea) && !StringUtils.isZeroLength( les) ){
            liniiFilter.append(" AND upper( remove_multiple_spaces( inst.TIP_OB)) IN ('").append(lea).append("','").append(les).append("') ");
        } else if( !StringUtils.isZeroLength( lea)) {
            liniiFilter.append(" AND upper( remove_multiple_spaces( inst.TIP_OB)) = '").append(lea).append("' ");
        } else if( !StringUtils.isZeroLength( les)){
            liniiFilter.append(" AND upper( remove_multiple_spaces( inst.TIP_OB)) = '").append(les).append("' ");
        }

        if( nivelTensiune == 1){ //IT
            filter.append(" AND i.TENSIUNE >= 110");
            session.setAttribute( "raportTop10.nivelTensiune", new Integer( 1));
        } else if( nivelTensiune == 2){ //MT
            filter.append(" AND i.TENSIUNE < 110");
            session.setAttribute( "raportTop10.nivelTensiune", new Integer( 2));
        } else {
            session.removeAttribute( "raportTop10.nivelTensiune");
        }

        if( ansambluri != null && ansambluri.length > 0 ){
            final StringBuffer inCond = new StringBuffer();
            for (int i = 0; i < ansambluri.length; i++) {
                final String idAnsamblu = ansambluri[i];

                if( inCond.length() > 0) inCond.append(',');

                inCond.append( idAnsamblu);
            }

            filter.append( " AND i.ANSAMBLU_ID IN (").append( inCond).append(") ");
        }

        //{Checked Categories
        //Filiale

        long ids[] = checkData.getIdFiliale();
        String condition = " AND (";
        if( ids.length > 0){
            filter.append( condition);
            filter.append(" FILIALA_ID IN (");
            for (int i = 0; i < ids.length; i++) {
                final long id = ids[i];
                filter.append( id).append( i < ids.length - 1 ? ", " : "") ;
            }
            filter.append(") ");

            condition = " OR ";
        }

        ids = checkData.getIdSucursale();
        if( ids.length > 0){
            filter.append( condition);
            filter.append(" SUCURSALA_ID IN (");
            for (int i = 0; i < ids.length; i++) {
                final long id = ids[i];
                filter.append( id).append( i < ids.length - 1 ? ", " : "") ;
            }
            filter.append(") ");

            condition = " OR ";
        }

        ids = checkData.getIdCentre();
        if( ids.length > 0){
            filter.append( condition);
            filter.append(" SECTIE_ID IN (");
            for (int i = 0; i < ids.length; i++) {
                final long id = ids[i];
                filter.append( id).append( i < ids.length - 1 ? ", " : "") ;
            }
            filter.append(") ");
            condition = " OR ";
        }

        if( condition.equals(" OR ")){
            filter.append(')');  //for AND ( FILIALA_ID IN(...) OR SUCURSLA_ID IN (...) OR SECTIE_ID IN (...))
        }
        //}

        boolean addUnion = false;
        sql = new StringBuffer();

        if ( toate || statii){
            sql.append(" SELECT 1 AS TIP, inst.CE, inst.COD_LF AS LF_ID, inst.DESC_LF, COUNT(*) CNT, SUM( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT " + " FROM incidente i INNER JOIN LF inst on (" + " i.STATIE_COD = inst.COD_LF " + " AND isSelected( i.LINIE_ID) = 0" + " AND isSelected( i.DERIVATIE_ID) = 0" + " AND isSelected( i.BARA_ID) = 0" + " AND isSelected( i.BOBINA_ID) = 0" + " AND isSelected( i.CELULA_ID) = 0" + " AND isSelected( i.TRAFO_ID) = 0" + " AND isSelected( i.PAPT_ID) = 0 " + " )" + "   WHERE 0=0 ").append(filter).append(filter2).append(" GROUP BY 1, inst.CE, inst.COD_LF, inst.DESC_LF ");
            addUnion = true;
        }

        if( toate || linii){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 2 AS TIP, inst.CE, inst.COD_LF AS LF_ID, inst.DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT \n" + " FROM incidente i INNER JOIN LF  inst on ( \n" + " i.LINIE_COD = inst.COD_LF \n" + " AND isSelected( i.STATIE_ID) = 0 \n" + " AND isSelected( i.DERIVATIE_ID) = 0 \n" + " AND isSelected( i.PAPT_ID) = 0 \n" + " AND isSelected( i.TRAFO_ID) = 0 \n" + " ) \n" + "   WHERE 0=0 ").append(filter).append(filter2).append(liniiFilter).append(" \n ").append(" GROUP BY 2, inst.CE, inst.COD_LF, inst.DESC_LF \n");
            addUnion = true;
        }

        if( toate || posturi){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 3 AS TIP, inst.CE, inst.COD_LF AS LF_ID, inst.DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT \n" + " FROM incidente i INNER JOIN LF inst on (i.PAPT_COD = inst.COD_LF) \n" + "   WHERE 0=0 ").append(filter).append(filter2).append(" \n").append(" GROUP BY 3, inst.CE, inst.COD_LF, inst.DESC_LF \n");
            addUnion = true;
        }

        if( toate || bobine){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 4 AS TIP, inst.CE, inst.NR_EQ AS LF_ID, inst.DESC_EQ AS DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT " + " FROM incidente i INNER JOIN EQ inst on (i.BOBINA_COD = inst.NR_EQ) " + "   WHERE 0=0 ").append(filter).append(filter2).append(" GROUP BY 4, inst.CE, inst.NR_EQ, inst.DESC_EQ ");
            addUnion = true;
        }

        if( toate || celule){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 5 AS TIP, inst.CE, inst.NR_EQ AS LF_ID, inst.DESC_EQ AS DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT " + " FROM incidente i INNER JOIN EQ inst on (i.CELULA_COD = inst.NR_EQ) " + "   WHERE 0=0 ").append(filter).append(filter2).append(" GROUP BY 5, inst.CE, inst.NR_EQ, inst.DESC_EQ ");
            addUnion = true;
        }

        if( toate || bare){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 6 AS TIP, inst.CE, inst.NR_EQ AS LF_ID, inst.DESC_EQ AS DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT" + " FROM incidente i INNER JOIN EQ inst on (i.BARA_COD = inst.NR_EQ) " + "   WHERE 0=0 ").append(filter).append(filter2).append(" GROUP BY 6, inst.CE, inst.NR_EQ, inst.DESC_EQ ");
            addUnion = true;
        }

        if( toate || derivatii){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 7 AS TIP, inst.CE, inst.NR_EQ AS LF_ID, inst.DESC_EQ AS DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT \n" + " FROM incidente i INNER JOIN EQ inst on (i.DERIVATIE_COD = inst.NR_EQ) \n" + "   WHERE 0=0 ").append(filter).append(filter2).append(liniiFilter).append(" \n").append(" GROUP BY 7, inst.CE, inst.NR_EQ, inst.DESC_EQ \n");
            addUnion = true;
        }

        if( toate || trafo){
            if( addUnion) sql.append(" UNION ");
            sql.append(" SELECT 8 AS TIP, inst.CE, inst.NR_EQ AS LF_ID, inst.DESC_EQ AS DESC_LF,  count(*) CNT, sum( i.DURATA_INCIDENT) DURATA_INCIDENTE, SUM( i.ENERGIE_NELIVR) EN, SUM( i.CHELT_MENT) CM, SUM( i.CHELT_DAUNE) CD, SUM( i.CHELT_EXPLOATARE) CEXP, SUM( i.CHELT_MENT + i.CHELT_DAUNE + i.CHELT_EXPLOATARE) CT " + " FROM incidente i INNER JOIN EQ inst on (i.TRAFO_COD = inst.NR_EQ) " + "   WHERE 0=0 ").append(filter).append(filter2).append(" GROUP BY 8, inst.CE, inst.NR_EQ, inst.DESC_EQ ");
            addUnion = true;
        }



        sql.append(  "   ) t ");
        sql.append(  "    INNER JOIN CATEGORIES c ON (t.CE=c.COD_SAP) ");
        sql.append(  "    INNER JOIN CATEGORIES s ON (c.ID_PARENT=s.ID) ");
        sql.append(  "    INNER JOIN CATEGORIES f ON (s.ID_PARENT=f.ID) ");

        final StringBuffer listSql = new StringBuffer()
                .append( "SELECT * FROM (SELECT a.*, ROWNUM AS rn FROM (" +
                        "SELECT f.NAME AS FILIALA, s.NAME AS SUCURSALA, c.NAME AS CENTRU, t.TIP, t.LF_ID, t.DESC_LF, t.CNT, t.DURATA_INCIDENTE, t.EN, t.CM, t.CD, t.CEXP, t.CT FROM (")
                .append( sql)
                .append( "   ORDER BY ").append(sd.getColumnName()).append(' ').append( sd.getDirection())
                .append( " )a WHERE ROWNUM <= ").append( pd.getQueryEndIndex())
                .append( ") WHERE ").append( pd.getStartIndex()).append(" <= rn ");

        final ReportStatement report = new ReportStatement( listSql.toString());

        result = report.getListOfArrays("run raport");

        final StringBuffer countSql = new StringBuffer("SELECT COUNT(*) FROM (").append( sql);

        pd.setTotalRowsCount( AccessDB.getLong( countSql.toString(), "Count Linii raport top 10 instalatii").intValue());
        pd.setResultRowCount( result != null ? result.size() : 0);


        //calculare totaluri
        final StringBuffer totalsSql = new StringBuffer("SELECT sum(t.CNT), sum( t.DURATA_INCIDENTE), sum( t.EN), sum(t.CM), sum(t.CD), sum(t.CEXP), sum(t.CT) FROM (").append( sql);

        final List totalsResult = new ReportStatement( totalsSql.toString()).getListOfArrays("get totaluri");

        if(totalsResult != null) for (int i = 0; i < totalsResult.size(); i++) {
            final Object[] objects = (Object[]) totalsResult.get(i);

            int k = 0;
            totaluri = new Totaluri();
            totaluri.countIncidente = ObjectUtils.getIntValue( objects[ k++], 0);
            totaluri.durataIncidente = ObjectUtils.getIntValue( objects[ k++], 0);
            totaluri.energieNelivrata = ObjectUtils.getDoubleValue( objects[ k++], 0);
            totaluri.costMent = ObjectUtils.getDoubleValue( objects[ k++],0);
            totaluri.costDaune = ObjectUtils.getDoubleValue( objects[ k++],0);
            totaluri.costExpl = ObjectUtils.getDoubleValue( objects[ k++],0);
            totaluri.costTotal = ObjectUtils.getDoubleValue( objects[ k++], 0);
            break;
        }

        session.setAttribute("raportTop10InstalatiiFilter", filter);
    }


    String publicPath = null;
    if( sql != null && ObjectUtils.getIntValue( request.getParameter("toExport"), 0) == 1){

        final String root = AppConstants.PUBLIC_RESOURCE_PATH + File.separator + "raport";


        final String folder = _df.format( new java.util.Date());
        //cleanup...
        final File[]folders = new File( root).listFiles();
        if( folders != null) for (int i = 0; i < folders.length; i++) {
            final File file = folders[i];
            if( !file.getName().equals( folder)){
                final File[]d=file.listFiles();
                if( d!=null) for (int j = 0; j < d.length; j++) {
                    final File file1 = d[j];
                    file1.delete();
                }
                file.delete( );  //cleanup
            }
        }

        File f = new File( root, folder);
        if( !f.exists()) f.mkdir();

        final String strDataStart = AppConstants.format(dataStart);
        final String strDataStop  = AppConstants.format(dataStop);

        final String fileName = "Raport top 10 instalatii " + strDataStart + " - " + strDataStop + '_' + System.currentTimeMillis() + ".xls";
        final String privatePath = root + File.separator + folder + File.separator + fileName;

        publicPath = AppConstants.WEB_RESOURCE_PATH + "/raport/" + folder + '/' + fileName;

        f = new File( privatePath);
        if( f.exists()){
            f.delete();
        }

        final String templatePath = GlobalAppConstants.PRIVATE_PATH + File.separator+"template"+File.separator+"Raport top 10 Instalatii.xls";

        final RaportTop10InstalatiiExcelExporter exporter = new RaportTop10InstalatiiExcelExporter();
        exporter.begin( templatePath, privatePath);

        final StringBuffer sqlExport = new StringBuffer()
                .append( " SELECT f.NAME AS FILIALA, s.NAME AS SUCURSALA, c.NAME AS CENTRU, t.TIP, t.LF_ID, t.DESC_LF, t.CNT, t.DURATA_INCIDENTE, t.EN, t.CM, t.CD, t.CEXP, t.CT FROM (")
                .append( sql)
                .append( "  ORDER BY ").append( sd.getColumnName()).append(' ').append( sd.getDirection());


        final ReportStatement report = new ReportStatement( sqlExport.toString());

        List resultExport = report.getListOfArrays("run export top 10");

        exporter.export( resultExport);

        resultExport = null;

        exporter.end();
    }

    final Nomenclator[] noms = NomAccessDB.getAllNom( NomConstants.NOM_ANSAMBLURI);


// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(389,2);to=(393,29)]
			out.print("\r\n\r\n<table width=\"100%\">\r\n<tr><td>\r\n<form name=\"zaforma\" action=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(393,29);to=(393,55)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(393,55);to=(393,109)]
			out.print("?action=raport-top10-fi\" method=\"post\" onsubmit=\"this.");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(393,109);to=(393,143)]
			out.print(PaginationConstants.JSP_RESET);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(393,143);to=(395,27)]
			out.print(".value=\'true\';\">\r\n<input type=\"hidden\" name=\"toExport\" value=\"0\">\r\n<input type=\"hidden\" name=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(395,27);to=(395,61)]
			out.print(PaginationConstants.JSP_RESET);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(395,61);to=(396,0)]
			out.print("\" value=\"\">\r\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(396,0);to=(396,33)]
			out.print(SortController.initSort( sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(396,33);to=(400,12)]
			out.print("\r\n<table class=\"gsaptd\" width=\"100%\" id=\"tableCuCheckboxuri\">\r\n    <tr>\r\n        <td align=\"left\">\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(400,12);to=(400,37)]
			 final int cols = 3; 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(400,37);to=(401,12)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(401,12);to=(401,44)]
			 final int n = noms.length; 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(401,44);to=(405,28)]
			out.print("\r\n            <table border=\"0\" width=\"100%\">\r\n                <tr valign=\"top\">\r\n                    <td>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(405,28);to=(406,68)]
			 for ( int k = 0; k < n; k++ ) {
                                final Nomenclator nom = noms[ k]; 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(406,68);to=(407,28)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(407,28);to=(407,62)]
			 if ( k % (  n/cols) == 0 ) { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(407,62);to=(409,28)]
			out.print("\r\n                    <td>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(409,28);to=(409,35)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(409,35);to=(412,28)]
			out.print("\r\n\r\n                        <nobr>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(412,28);to=(412,108)]
			 final boolean checked = exists( ansambluri, String.valueOf( nom.getId())); 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(412,108);to=(413,74)]
			out.print("\r\n                            <input type=\"checkbox\" name=\"ansamblu\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(413,74);to=(413,90)]
			out.print(nom.getId());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(413,90);to=(413,104)]
			out.print("\" id=\"ansamblu");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(413,104);to=(413,110)]
			out.print(k);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(413,110);to=(413,112)]
			out.print("\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(413,112);to=(413,143)]
			out.print((checked ? "checked" : ""));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(413,143);to=(414,32)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(414,32);to=(414,72)]
			 if( nom.getCod() == COD_ANS_LEA) { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(414,72);to=(416,32)]
			out.print("\r\n                                   onclick=\"toggleLeaFilters( this)\"\r\n                                ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(416,32);to=(416,78)]
			 }else if( nom.getCod() == COD_ANS_LES) { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(416,78);to=(418,32)]
			out.print("\r\n                                   onclick=\"toggleLesFilters( this)\"\r\n                                ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(418,32);to=(418,39)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(418,39);to=(419,57)]
			out.print("\r\n                                    ><label for=\"ansamblu");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(419,57);to=(419,63)]
			out.print(k);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(419,63);to=(419,71)]
			out.print("\"><nobr>");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(419,71);to=(419,94)]
			out.print(nom.getDescriere());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(419,94);to=(421,28)]
			out.print("</nobr></label>\r\n\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(421,28);to=(421,68)]
			 if( nom.getCod() == COD_ANS_LEA) { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(421,68);to=(423,80)]
			out.print("\r\n\r\n                            <select id=\"lea\"  name=\"lea\" style=\"font-size:10px; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(423,80);to=(423,116)]
			out.print(!checked ? "display:none;" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(423,116);to=(425,40)]
			out.print("\">\r\n                                <option></option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(425,40);to=(425,85)]
			out.print("LEA 6 KV".equals(lea) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(425,85);to=(426,40)]
			out.print(" >LEA 6 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(426,40);to=(426,86)]
			out.print("LEA 10 KV".equals(lea) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(426,86);to=(427,40)]
			out.print(" >LEA 10 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(427,40);to=(427,86)]
			out.print("LEA 20 KV".equals(lea) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(427,86);to=(428,40)]
			out.print(" >LEA 20 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(428,40);to=(428,86)]
			out.print("LEA 35 KV".equals(lea) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(428,86);to=(429,40)]
			out.print(" >LEA 35 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(429,40);to=(429,87)]
			out.print("LEA 110 KV".equals(lea) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(429,87);to=(431,28)]
			out.print(" >LEA 110 KV</option>\r\n                            </select>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(431,28);to=(431,74)]
			 } else if( nom.getCod() == COD_ANS_LES){ 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(431,74);to=(433,80)]
			out.print("\r\n\r\n                            <select id=\"les\"  name=\"les\" style=\"font-size:10px; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(433,80);to=(433,116)]
			out.print(!checked ? "display:none;" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(433,116);to=(435,40)]
			out.print("\">\r\n                                <option></option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(435,40);to=(435,85)]
			out.print("LES 6 KV".equals(les) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(435,85);to=(436,40)]
			out.print(" >LES 6 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(436,40);to=(436,86)]
			out.print("LES 10 KV".equals(les) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(436,86);to=(437,40)]
			out.print(" >LES 10 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(437,40);to=(437,86)]
			out.print("LES 20 KV".equals(les) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(437,86);to=(438,40)]
			out.print(" >LES 20 KV</option>\r\n                                <option ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(438,40);to=(438,87)]
			out.print("LES 110 KV".equals(les) ? "selected" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(438,87);to=(440,28)]
			out.print(" >LES 110 KV</option>\r\n                            </select>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(440,28);to=(440,35)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(440,35);to=(442,28)]
			out.print("\r\n                        </nobr><br>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(442,28);to=(442,35)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(442,35);to=(448,79)]
			out.print("\r\n                </tr>\r\n            </table>\r\n            <hr/>\r\n\r\n            &nbsp;&nbsp;<span style=\"font-weight:bold;\" title=\"Instalatie\">Instalatie:</span>\r\n            <input type=\"hidden\" id=\"idInstalatie\" name=\"idInstalatie\"  value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(448,79);to=(448,99)]
			out.print(idInstalatieReq);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(448,99);to=(449,80)]
			out.print("\" />\r\n            <input type=\"hidden\" id=\"tipInstalatie\" name=\"tipInstalatie\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(449,80);to=(449,101)]
			out.print(tipInstalatieReq);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(449,101);to=(451,88)]
			out.print("\" />\r\n            <input type=\"hidden\" id=\"isLF\" name=\"isLF\" value=\"\" />\r\n            <input type=\"text\" id=\"denInstalatie\" name=\"denInstalatie\" size=\"50\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(451,88);to=(451,135)]
			out.print(StringUtils.getNullSafe( denInstalatieReq));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(451,135);to=(454,73)]
			out.print("\" />\r\n\r\n            &nbsp;&nbsp;<span style=\"font-weight:bold;\" title=\"Nivel tensiune\">Nivel:</span>\r\n            <input type=\"radio\" name=\"nivelTensiune\" value=\"1\" id=\"ntIT\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(454,73);to=(454,113)]
			out.print(nivelTensiune == 1 ? "checked" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(454,113);to=(455,73)]
			out.print(" /><label for=\"ntIT\">IT</label>\r\n            <input type=\"radio\" name=\"nivelTensiune\" value=\"2\" id=\"ntMT\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(455,73);to=(455,113)]
			out.print(nivelTensiune == 2 ? "checked" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(455,113);to=(456,76)]
			out.print("/><label for=\"ntMT\">MT</label>\r\n            <input type=\"radio\" name=\"nivelTensiune\" value=\"3\" id=\"ntTOATE\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(456,76);to=(456,116)]
			out.print(nivelTensiune == 3 ? "checked" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(456,116);to=(460,81)]
			out.print("/><label for=\"ntTOATE\">Toate</label>\r\n\r\n            &nbsp;&nbsp;\r\n            <span title=\"Perioada producerii deranjamentelor\" style=\"font-weight:bold;\">Perioada:</span>\r\n            <input type=\"text\" id=\"data_start\" name=\"data_start\" size=\"8\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(460,81);to=(460,117)]
			out.print(AppConstants.format( dataStart));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(460,117);to=(460,169)]
			out.print("\" /> <a href=\"#\" id=\"trigger_data_start\" ><img src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(460,169);to=(460,224)]
			out.print(AppConstants.WEB_RESOURCE_PATH + "/images/cal.gif");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(460,224);to=(461,79)]
			out.print("\" width=\"16\" height=\"16\" border=\"0\" alt=\"Apasa pt. a selecta data.\"></a>&nbsp;&nbsp;-&nbsp;&nbsp;\r\n            <input type=\"text\" id=\"data_stop\" name=\"data_stop\" size=\"8\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(461,79);to=(461,114)]
			out.print(AppConstants.format( dataStop));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(461,114);to=(461,165)]
			out.print("\" /> <a href=\"#\" id=\"trigger_data_stop\" ><img src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(461,165);to=(461,220)]
			out.print(AppConstants.WEB_RESOURCE_PATH + "/images/cal.gif");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(461,220);to=(463,12)]
			out.print("\" width=\"16\" height=\"16\" border=\"0\" alt=\"Apasa pt. a selecta data.\"></a>\r\n\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(463,12);to=(463,94)]
			if( user.getIeLevel() < ro.emid.common.constants.RoleConstants.NIVEL_CENTRU){ 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(463,94);to=(464,183)]
			out.print("\r\n            <A href=\"#\" onClick=\"openCheckCategorii(); return false\" class=\"link\"><IMG alt=\"Click pentru a selecta mai multe sucursale/C.E.\" border=0 width=12 height=13 hspace=3 src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(464,183);to=(464,253)]
			out.print(AppConstants.WEB_RESOURCE_PATH + "/images/icon_mini_search.gif");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(464,253);to=(469,56)]
			out.print("\"></A>\r\n            <script type=\"text/javascript\">\r\n                var checkCategoriiWindow = null;\r\n                function openCheckCategorii(){\r\n                    if( checkCategoriiWindow) checkCategoriiWindow.close();\r\n                    checkCategoriiWindow = window.open(\'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(469,56);to=(469,82)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(469,82);to=(472,12)]
			out.print("?action=checkCategorie\',\'checkCategorie\', \'width=800 height=620, scrollbars=yes,status=yes,resizable=yes,top=10,left=50,dependent=yes,alwaysRaised=yes\');\r\n                }\r\n            </script>\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(472,12);to=(472,19)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(472,19);to=(477,12)]
			out.print("\r\n\r\n            &nbsp;&nbsp;<input type=\"submit\" value=\"Aplica\">\r\n            &nbsp;<input type=\"button\" value=\"Export\" onclick=\"document.zaforma.toExport.value = \'1\'; document.zaforma.submit();\" />\r\n\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(477,12);to=(527,14)]
			 if( checkData.someDataChecked()){

                final StringBuffer strCategorii = new StringBuffer("");
                final long[] idCentre = checkData.getIdCentre();
                final Set sucursaleSelectate = new HashSet();
                final Set filialeSelectate = new HashSet();
                for (int i = 0; i < idCentre.length; i++) {
                    final long id = idCentre[i];
                    final Category c = CategoryAccessDB.getById(id);
                    if (c != null) {
                        final Category s = CategoryAccessDB.getById(c.getId_parent());
                        if (s != null) {
                            final Category f = CategoryAccessDB.getById(s.getId_parent());
                            if (f != null) {
                                if (strCategorii.length() > 0) strCategorii.append("<br>");
                                strCategorii.append(f.getName()).append(", ").append(s.getName()).append(", ").append(c.getName());

                                sucursaleSelectate.add(new Long(s.getId()));
                                filialeSelectate.add(new Long(f.getId()));
                            }
                        }
                    }
                }

                final long[] idSucursale = checkData.getIdSucursale();
                for (int i = 0; i < idSucursale.length; i++) {
                    final long id = idSucursale[i];
                    if( !sucursaleSelectate.contains( new Long( id))){
                        final Category s = CategoryAccessDB.getById( id );
                        if( s != null){
                            final Category f = CategoryAccessDB.getById( s.getId_parent());
                            if( f != null){
                                if( strCategorii.length() > 0) strCategorii.append("<br>");
                                strCategorii.append(f.getName()).append(", ").append(s.getName());
                            }
                        }
                    }
                }

                final long[] idFiliale = checkData.getIdFiliale();
                for (int i = 0; i < idFiliale.length; i++) {
                    final long id = idFiliale[i];
                    if( !filialeSelectate.contains( new Long( id))){
                        final Category f = CategoryAccessDB.getById( id);
                        if( f != null){
                            if( strCategorii.length() > 0) strCategorii.append("<br>");
                            strCategorii.append(f.getName());
                        }
                    }
                }
            
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(527,14);to=(530,12)]
			out.print("\r\n\r\n            <br/>\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(530,12);to=(530,29)]
			out.print(strCategorii);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(530,29);to=(531,12)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(531,12);to=(531,19)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(531,19);to=(565,4)]
			out.print("\r\n        </td>\r\n    </tr>\r\n    <tr id=\"rowAdvancedFilters\" style=\"display:none\">\r\n        <td colspan=\"2\">\r\n\r\n        </td>\r\n    </tr>\r\n</table>\r\n\r\n<script type=\"text/javascript\">\r\n\r\n    function toggleLeaFilters(oCheck){\r\n        var selectu = $(\"lea\");\r\n        if( oCheck.checked){\r\n            Element.show( selectu);\r\n        }else{\r\n            Element.hide( selectu);\r\n        }\r\n    }\r\n\r\n    function toggleLesFilters(oCheck){\r\n        var selectu = $(\"les\");\r\n        if( oCheck.checked){\r\n            Element.show( selectu);\r\n        }else{\r\n            Element.hide( selectu);\r\n        }\r\n    }\r\n\r\n    var plusuAdvanced = new Plus( \"plusAdvancedFilters\", \"rowAdvancedFilters\", function(){\r\n        $(\"advancedFilters\").value= ( plusuAdvanced.getStatus() == PlusConstants.STATUS_MINUS ? \"1\" : \"0\");\r\n    });\r\n\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(565,4);to=(565,36)]
			 if( advancedFilters == 1){ 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(565,36);to=(567,4)]
			out.print("\r\n    plusuAdvanced.setMinus();\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(567,4);to=(567,11)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(567,11);to=(576,105)]
			out.print("\r\n</script>\r\n\r\n<TABLE id=\"table\" border=1 cellPadding=2 cellSpacing=1 width=\"100%\" class=\"gSAPTHEAD\" style=\"BACKGROUND-COLOR: white; margin-top:5px\">\r\n    <TR noSelect=\"true\">\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap width=\"10px\">#</TH>\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap >Instalatie</TH>\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap width=\"1%\">Sucursala</TH>\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap width=\"2%\">CE</TH>\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap width=\"100px\" style=\"text-decoration:underline\"> <nobr> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(576,105);to=(576,173)]
			out.print(SortController.printSortableColumn( "Nr. incidente", "CNT", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(576,173);to=(577,105)]
			out.print("</nobr></TH>\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap width=\"100px\" style=\"text-decoration:underline\"> <nobr> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(577,105);to=(577,189)]
			out.print(SortController.printSortableColumn( "Durata Incidente", "DURATA_INCIDENTE", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(577,189);to=(578,84)]
			out.print("</nobr></TH>\r\n        <TH             class=\"gsapthead\" noWrap style=\"text-decoration:underline\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(578,84);to=(578,153)]
			out.print(SortController.printSortableColumn( "Energie nelivr.", "EN", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(578,153);to=(584,87)]
			out.print("</TH>\r\n        <TH colspan=\"4\" class=\"gsapthead\" noWrap >Cheltuieli (ron)</TH>\r\n        <TH rowspan=\"2\" class=\"gsapthead\" noWrap width=\"50px\"> Cauze </TH>\r\n    </TR>\r\n    <tr noSelect=\"true\">\r\n        <TH class=\"gsapthead\" noWrap align=\"center\">(kWh)</TH>\r\n        <TH class=\"gsapthead\" noWrap align=\"center\" style=\"text-decoration:underline\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(584,87);to=(584,146)]
			out.print(SortController.printSortableColumn( "Ment.", "CM", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(584,146);to=(585,87)]
			out.print("</TH>\r\n        <TH class=\"gsapthead\" noWrap align=\"center\" style=\"text-decoration:underline\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(585,87);to=(585,146)]
			out.print(SortController.printSortableColumn( "Daune", "CD", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(585,146);to=(586,87)]
			out.print("</TH>\r\n        <TH class=\"gsapthead\" noWrap align=\"center\" style=\"text-decoration:underline\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(586,87);to=(586,148)]
			out.print(SortController.printSortableColumn( "Expl.", "CEXP", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(586,148);to=(587,87)]
			out.print("</TH>\r\n        <TH class=\"gsapthead\" noWrap align=\"center\" style=\"text-decoration:underline\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(587,87);to=(587,147)]
			out.print(SortController.printSortableColumn( "Total.", "CT", sd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(587,147);to=(589,4)]
			out.print("</TH>\r\n    </tr>\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(589,4);to=(589,32)]
			 if( result == null ) { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(589,32);to=(593,4)]
			out.print("\r\n    <tr>\r\n        <td colspan=\"15\">Selectati categoria sau categoriile de instalatii</td>\r\n    </tr>\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(593,4);to=(593,18)]
			 } else { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(593,18);to=(594,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(594,4);to=(594,34)]
			 if( result.size() == 0){ 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(594,34);to=(598,4)]
			out.print("\r\n    <tr>\r\n        <td colspan=\"12\">Nu exista fise de incident conform filtrului specificat.</td>\r\n    </tr>\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(598,4);to=(598,16)]
			 }else {
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(598,16);to=(599,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(599,4);to=(636,6)]
			 for (int i = 0; i < result.size(); i++) {
        final Object[] objects = (Object[]) result.get(i);

        final String numeFiliala   = (String) objects[ 0];
        final String numeSucursala = (String) objects[ 1];
        final String numeCentru    = (String) objects[ 2];

        final int tipInstalatie =  Integer.parseInt( objects[3].toString());

        String denTipInstalatie = "-";

        switch ( tipInstalatie){
            case 1: denTipInstalatie = "Statie"; break;
            case 2: denTipInstalatie = "Linie"; break;
            case 3: denTipInstalatie = "PA-PT"; break;
            case 4: denTipInstalatie = "Bobina"; break;
            case 5: denTipInstalatie = "Celula"; break;
            case 6: denTipInstalatie = "Bara"; break;
            case 7: denTipInstalatie = "Derivatie"; break;
            case 8: denTipInstalatie = "Trafo"; break;
            default:
                denTipInstalatie = "necunoscut";
                break;
        }

        final String idInstalatie = objects[4].toString();
        final String descInstalatie = objects[5].toString();
        final String countIncidente = objects[6].toString();

        final long durataIncidente = Integer.parseInt( objects[7].toString());

        final double energieNelivrata = Double.parseDouble( objects[8].toString());
        final double costMent = Double.parseDouble( objects[9].toString());
        final double costDaune = Double.parseDouble( objects[10].toString());
        final double costExpl = Double.parseDouble( objects[11].toString());

        final double costTotal = Double.parseDouble( objects[12].toString());
    
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(636,6);to=(639,27)]
			out.print("\r\n\r\n    <tr>\r\n        <td align=\"center\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(639,27);to=(639,35)]
			out.print(i+1);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(639,35);to=(641,26)]
			out.print("</td>\r\n        <td>\r\n            <label title=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(641,26);to=(641,47)]
			out.print(denTipInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(641,47);to=(641,50)]
			out.print(" - ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(641,50);to=(641,69)]
			out.print(descInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(641,69);to=(641,77)]
			out.print("\"><nobr>");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(641,77);to=(641,96)]
			out.print(descInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(641,96);to=(645,16)]
			out.print("</nobr></label>\r\n        </td>\r\n        <td nowrap>\r\n            <label title=\"Sucursala instalatie\">\r\n                ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(645,16);to=(645,34)]
			out.print(numeSucursala);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(645,34);to=(650,16)]
			out.print("\r\n            </label>\r\n        </td>\r\n        <td nowrap>\r\n            <label title=\"Centru Exploatare instalatie\">\r\n                ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(650,16);to=(650,31)]
			out.print(numeCentru);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(650,31);to=(654,120)]
			out.print("\r\n            </label>\r\n        </td>\r\n        <td align=\"center\">\r\n            <a class=\"link\" title=\"Click pentru vizualizare incidente\" href=\"javascript: openIncidenteByTipInstalatie( \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(654,120);to=(654,138)]
			out.print(tipInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(654,138);to=(654,142)]
			out.print("\', \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(654,142);to=(654,159)]
			out.print(idInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(654,159);to=(655,16)]
			out.print("\')\">\r\n                ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(655,16);to=(655,35)]
			out.print(countIncidente);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(655,35);to=(659,12)]
			out.print("\r\n            </a>\r\n        </td>\r\n        <td align=\"right\">\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(659,12);to=(659,35)]
			out.print(durataIncidente/60);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(659,35);to=(659,37)]
			out.print("h ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(659,37);to=(659,60)]
			out.print(durataIncidente%60);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(659,60);to=(661,27)]
			out.print("\'\r\n        </td>\r\n        <td align=\"right\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(661,27);to=(661,49)]
			out.print(energieNelivrata);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(661,49);to=(662,27)]
			out.print(" </td>\r\n        <td align=\"right\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(662,27);to=(662,41)]
			out.print(costMent);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(662,41);to=(663,27)]
			out.print(" </td>\r\n        <td align=\"right\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(663,27);to=(663,42)]
			out.print(costDaune);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(663,42);to=(664,27)]
			out.print(" </td>\r\n        <td align=\"right\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(664,27);to=(664,41)]
			out.print(costExpl);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(664,41);to=(665,27)]
			out.print(" </td>\r\n        <td align=\"right\"> ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(665,27);to=(665,42)]
			out.print(costTotal);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(665,42);to=(667,152)]
			out.print(" </td>\r\n        <td align=\"center\">\r\n            <a class=\"link\" title=\"Click pentru a vizualiza incidentele grupate pe cauze\" href=\"javascript: openIncidenteGrupatePeCauzeByTipInstalatie(\'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(667,152);to=(667,170)]
			out.print(tipInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(667,170);to=(667,174)]
			out.print("\', \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(667,174);to=(667,191)]
			out.print(idInstalatie);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(667,191);to=(672,4)]
			out.print("\')\">\r\n                vizualizare\r\n            </a>\r\n        </td>\r\n    </tr>\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(672,4);to=(672,11)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(672,11);to=(676,12)]
			out.print("\r\n\r\n    <tr noSelect=\"true\" class=\"paginationRow\">\r\n        <td colspan=\"4\" align=\"left\">\r\n            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(676,12);to=(676,61)]
			out.print(PaginationController.printPaginationData(pd));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(676,61);to=(678,45)]
			out.print("\r\n        </td>\r\n        <td align=\"center\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,45);to=(678,71)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,71);to=(678,79)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,79);to=(678,89)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,89);to=(678,90)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,90);to=(678,118)]
			out.print(totaluri.countIncidente);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,118);to=(678,119)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,119);to=(678,124)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(678,124);to=(679,44)]
			out.print("</td>\r\n        <td align=\"right\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,44);to=(679,70)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,70);to=(679,78)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,78);to=(679,88)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,88);to=(679,89)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,89);to=(679,121)]
			out.print(totaluri.durataIncidente/60);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,121);to=(679,123)]
			out.print("h ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,123);to=(679,155)]
			out.print(totaluri.durataIncidente%60);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,155);to=(679,156)]
			out.print("\'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,156);to=(679,161)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(679,161);to=(680,44)]
			out.print("</td>\r\n        <td align=\"right\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,44);to=(680,70)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,70);to=(680,78)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,78);to=(680,88)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,88);to=(680,89)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,89);to=(680,141)]
			out.print(AppConstants.format2(totaluri.energieNelivrata));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,141);to=(680,142)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,142);to=(680,147)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(680,147);to=(681,44)]
			out.print("</td>\r\n        <td align=\"right\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,44);to=(681,70)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,70);to=(681,78)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,78);to=(681,88)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,88);to=(681,89)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,89);to=(681,133)]
			out.print(AppConstants.format2(totaluri.costMent));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,133);to=(681,134)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,134);to=(681,139)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(681,139);to=(682,44)]
			out.print("</td>\r\n        <td align=\"right\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,44);to=(682,70)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,70);to=(682,78)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,78);to=(682,88)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,88);to=(682,89)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,89);to=(682,134)]
			out.print(AppConstants.format2(totaluri.costDaune));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,134);to=(682,135)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,135);to=(682,140)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(682,140);to=(683,44)]
			out.print("</td>\r\n        <td align=\"right\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,44);to=(683,70)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,70);to=(683,78)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,78);to=(683,88)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,88);to=(683,89)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,89);to=(683,133)]
			out.print(AppConstants.format2(totaluri.costExpl));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,133);to=(683,134)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,134);to=(683,139)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(683,139);to=(684,44)]
			out.print("</td>\r\n        <td align=\"right\" class=\"totalCell\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,44);to=(684,70)]
			if( totaluri == null){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,70);to=(684,78)]
			out.print(" &nbsp; ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,78);to=(684,88)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,88);to=(684,89)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,89);to=(684,135)]
			out.print(AppConstants.format02(totaluri.costTotal));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,135);to=(684,136)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,136);to=(684,141)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(684,141);to=(687,4)]
			out.print("</td>\r\n        <td>&nbsp;</td>\r\n    </tr>\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(687,4);to=(687,11)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(687,11);to=(688,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(688,4);to=(688,11)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(688,11);to=(759,40)]
			out.print("\r\n</TABLE>\r\n</form>\r\n\r\n</td></tr></table>\r\n\r\n<style type=\"text/css\">\r\n    .totalCell{\r\n        font-weight: bold;\r\n    }\r\n</style>\r\n\r\n<script type=\"text/javascript\">\r\n    Calendar.setup({\r\n        inputField  : \"data_start\",         // ID of the input field\r\n        ifFormat    : \"%d.%m.%Y\",    // the date format\r\n        button      : \"trigger_data_start\"       // ID of the button\r\n    });\r\n\r\n    Calendar.setup({\r\n        inputField  : \"data_stop\",         // ID of the input field\r\n        ifFormat    : \"%d.%m.%Y\",    // the date format\r\n        button      : \"trigger_data_stop\"       // ID of the button\r\n    });\r\n\r\n    function getCheckBoxes( element){\r\n        var r = new Array();\r\n        var t = element.getElementsByTagName(\"input\");\r\n        for( var i = 0; i < t.length; i++){\r\n            if( t[i].type && t[i].type==\"checkbox\"){\r\n                r.push( t[i]);\r\n            }\r\n        }\r\n\r\n        return r;\r\n    }\r\n\r\n    function onToateClicked( oChecku){\r\n        var disabled = oChecku.checked;\r\n\r\n        var fixed = [\r\n            $(\"statii\"),\r\n            $(\"linii\"),\r\n            $(\"posturi\"),\r\n            $(\"bobine\"),\r\n            $(\"derivatii\"),\r\n            $(\"celule\"),\r\n            $(\"bare\"),\r\n            $(\"trafo\")\r\n        ];\r\n\r\n        //getCheckBoxes( $( \"tableCuCheckboxuri\"))\r\n        doWork( fixed, function(element){\r\n            if( element != oChecku){\r\n                element.disabled = disabled;\r\n                if( element.checked){\r\n                    element.checked = false;\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    function doWork( arr, f){\r\n        for( var i = 0; i < arr.length; i++){\r\n            f( arr[i]);\r\n        }\r\n    }\r\n\r\n    var incidenteWindow = null;\r\n    function openIncidenteByTipInstalatie( tipInstalatie, codInstalatie){\r\n        if( incidenteWindow != null) incidenteWindow.close();\r\n        incidenteWindow = window.open( \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(759,40);to=(759,66)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(759,66);to=(765,40)]
			out.print("?action=showIncidenteFromRaportTop10&tipInstalatie=\'+tipInstalatie + \"&codInstalatie=\" + codInstalatie,\r\n                \'incidenteRaport\', \'top=50,left=50,width=850, height=550, status=yes,resizable=yes,dependent=yes,alwaysRaised=yes, scrollbars=yes\');\r\n    }\r\n\r\n    function openIncidenteGrupatePeCauzeByTipInstalatie( tipInstalatie, codInstalatie){\r\n        if( incidenteWindow != null) incidenteWindow.close();\r\n        incidenteWindow = window.open( \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(765,40);to=(765,66)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(765,66);to=(773,40)]
			out.print("?action=showIncidenteFromRaportTop10PeCauze&tipInstalatie=\'+tipInstalatie + \"&codInstalatie=\" + codInstalatie,\r\n                \'incidenteRaport\', \'top=50,left=50,width=1000, height=550, status=yes,resizable=yes,dependent=yes,alwaysRaised=yes, scrollbars=yes\');\r\n    }\r\n\r\n    function initInstalatieSugest(){\r\n\r\n        var ajaxDataProvider = new AjaxDataProvider( function(){\r\n            var value = $(\'denInstalatie\').value;\r\n            return value.length >= 2 ? \"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(773,40);to=(773,66)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(773,66);to=(799,4)]
			out.print("?action=instalatiiSugest&q=\" : null;\r\n        });\r\n\r\n        new InputSugest( $(\"denInstalatie\"), $(\"idInstalatie\"), ajaxDataProvider, {\r\n            beforeRequest : function(){\r\n                $(\'tipInstalatie\').value = \'\';\r\n                $(\'isLF\').value = \'\';\r\n            },\r\n\r\n            onSelect : function( item){\r\n                $(\'tipInstalatie\').value = item.tipInstalatie;\r\n                $(\'isLF\').value = item.isLF;\r\n            }\r\n        });\r\n    }\r\n\r\n    var table = new Table(\'table\', \"table\");\r\n\r\n    setTimeout(\"initInstalatieSugest()\", 1000);\r\n\r\n    function categoriesChecked(){\r\n        document.zaforma.submit();\r\n    }\r\n</script>\r\n\r\n<script type=\"text/javascript\">\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(799,4);to=(799,35)]
			 if ( publicPath != null){ 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(799,35);to=(802,27)]
			out.print("\r\n\r\n    setTimeout(function(){\r\n        window.location = \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(802,27);to=(802,42)]
			out.print(publicPath);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(802,42);to=(805,4)]
			out.print("\';\r\n    }, 500);\r\n\r\n    ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(805,4);to=(805,11)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/raport-top10-fi.jsp";from=(805,11);to=(806,9)]
			out.print("\r\n</script>");
// end
		} catch (ThreadDeath tde) { throw tde;
		} catch (OutOfMemoryError ome) { throw ome;
		} catch (Throwable t) {
			if (!(t instanceof SkipPageException)) {
				try {
					out.clear();
				} catch(java.io.IOException _jspioex) {}
				_jspx_pageContext.handlePageException(t);
			}
		}finally{
			_jspFactory.releasePageContext(pageContext);
		}
	}

}
