/* 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 ro.emid.common.utils.ObjectUtils;
import ro.emid.common.db.EchipamentAccessDB;
import ro.emid.common.db.IncidentAccessDB;
import ro.emid.common.db.RaportByCauzeRow;
import ro.emid.common.db.NomAccessDB;
import ro.emid.common.types.Nomenclator;
import java.util.Date;
import java.util.Base64;
import java.text.SimpleDateFormat;
import ro.emid.common.constants.AppConstants;
import ro.emid.common.types.Category;
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 javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public class JEE_jsp_WEB_2d_INF_pagelet_rapoarte_showEchipamenteFromRaportTop10PeCauze_1565207014356 extends com.sap.engine.services.servlets_jsp.lib.jspruntime.JspBase{

	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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(1,53);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(2,57);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(3,55);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(4,55);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(5,50);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(6,53);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(7,35);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(8,37);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(9,47);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(10,58);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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(11,50);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/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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(13,48);to=(15,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(15,0);to=(97,2)]
			
    final int tipInstalatie = ObjectUtils.getIntValue( request.getParameter("tipInstalatie"), -1);
    final String codInstalatie = ObjectUtils.getStringValue(request.getParameter("codInstalatie"));

    Category filialaRaport = (Category) session.getAttribute("raportTop10DinFE.filiala");
    Category sucursalaRaport = (Category) session.getAttribute("raportTop10DinFE.sucursala");
    Category centruRaport = (Category) session.getAttribute("raportTop10DinFE.centru");

    session.setAttribute("filiala", filialaRaport);
    session.setAttribute("sucursala", sucursalaRaport);
    session.setAttribute("centru", centruRaport);


    Date dataStart = (Date) session.getAttribute( "raportTop10DinFE.dataStart");
    Date dataStop  = (Date) session.getAttribute( "raportTop10DinFE.dataStop");


    StringBuffer sessionCond = (StringBuffer)session.getAttribute( "raportTop10InstalatiiFilterDinFE");
	if(sessionCond == null) {
		
		byte[] arr = Base64.getDecoder().decode(request.getParameter("sessionCond"));
		String decoded = new String(arr);
		sessionCond = new StringBuffer(decoded);
		
		Long sucursalaId = Long.parseLong(request.getParameter("sucursala"));
		Long centruId = Long.parseLong(request.getParameter("centru"));
		
		filialaRaport = new Category();
		filialaRaport.setId(1L);
		
		sucursalaRaport = new Category();
		centruRaport = new Category();
		
		sucursalaRaport.setId(sucursalaId);
		centruRaport.setId(centruId);
		
		dataStart = new SimpleDateFormat("M/dd/yyyy").parse(request.getParameter("dataStart"));
		dataStop = new SimpleDateFormat("M/dd/yyyy").parse(request.getParameter("dataStop"));
	}
    final StringBuffer condSql = new StringBuffer( sessionCond.toString());

     switch ( tipInstalatie){
        case 1: condSql.append(" AND STATIE_COD = ").append('\'').append(codInstalatie).append('\'').append(
                " AND isSelected( LINIE_ID) = 0 ")
                .append(" AND isSelected( DERIVATIE_ID) = 0")
                .append(" AND isSelected( BARA_ID) = 0")
                .append(" AND isSelected( BOBINA_ID) = 0")
                .append(" AND isSelected( CELULA_ID) = 0")
                .append(" AND isSelected( TRAFO_ID) = 0")
                .append(" AND isSelected( PAPT_ID) = 0 ");
        break;
        case 2: condSql.append(" AND LINIE_COD = ").append('\'').append(codInstalatie).append('\'').append(" AND isSelected( DERIVATIE_ID) = 0"); break;
        case 3: condSql.append(" AND PAPT_COD = ").append('\'').append(codInstalatie).append('\''); break;
        case 4: condSql.append(" AND BOBINA_COD = ").append('\'').append(codInstalatie).append('\''); break;
        case 5: condSql.append(" AND CELULA_COD = ").append('\'').append(codInstalatie).append('\''); break;
        case 6: condSql.append(" AND BARA_COD = ").append('\'').append(codInstalatie).append('\''); break;
        case 7: condSql.append(" AND DERIVATIE_COD = ").append('\'').append(codInstalatie).append('\''); break;
        case 8: condSql.append(" AND TRAFO_COD = ").append('\'').append(codInstalatie).append('\''); break;
        default:
            //nothing
            break;
    }

    session.setAttribute("rapoarteEchipamenteFiltru.append_to", condSql.toString());
    session.setAttribute("rapoarteEchipamenteFiltru.data_start", new Long( dataStart != null ? dataStart.getTime() : 0));
    session.setAttribute("rapoarteEchipamenteFiltru.data_stop", new Long( dataStop != null ? dataStop.getTime() : 0));


    final RaportByCauzeRow[] rows1;
    final RaportByCauzeRow[] rows2;
    if (sucursalaRaport.getId() != -1) {
        rows2 = EchipamentAccessDB.get_raport_by_cauze_by_sucursala(sucursalaRaport.getId(), dataStart != null ? dataStart.getTime() : 0, dataStop != null ? dataStop.getTime() : 0, condSql.toString());
        rows1 = EchipamentAccessDB.get_raport_by_grupe_cauze_by_sucursala(sucursalaRaport.getId(), dataStart != null ? dataStart.getTime() : 0, dataStop != null ? dataStop.getTime() : 0, condSql.toString());
    } else {
        rows2 = EchipamentAccessDB.get_raport_by_cauze_by_filiala(filialaRaport.getId(), dataStart != null ? dataStart.getTime() : 0, dataStop != null ? dataStop.getTime() : 0, condSql.toString());
        rows1 = EchipamentAccessDB.get_raport_by_grupe_cauze_by_filiala(filialaRaport.getId(), dataStart != null ? dataStart.getTime() : 0, dataStop != null ? dataStop.getTime() : 0, condSql.toString());
    }

    String classul = "class=";
    int j = 0;

    Nomenclator nom = 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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(97,2);to=(119,8)]
			out.print("\r\n\r\n<div style=\"margin: 10px\">\r\n\r\n    <h3>Deteriorari de echipamente pe cauze</h3>\r\n\r\n    <TABLE border=1 cellPadding=2 cellSpacing=1 width=\"100%\" class=\"gSAPTHEAD\" style=\"BACKGROUND-COLOR: white\">\r\n        <TR>\r\n            <TH class=\"gsapthead\" noWrap rowspan=\"2\">Cod<BR>grupa</TH>\r\n            <TH class=\"gsapthead\" noWrap rowspan=\"2\" width=\"50\">Cod<BR>cauza</TH>\r\n            <TH class=\"gsapthead\" noWrap rowspan=\"2\" width=\"100\">Cauza</TH>\r\n            <TH class=\"gsapthead\" noWrap rowspan=\"2\">Nr.Echipamente</TH>\r\n            <TH class=\"gsapthead\" noWrap rowspan=\"2\">Durata indisp.</TH>\r\n            <TH class=\"gsapthead\" noWrap colspan=\"4\">Cheltuieli (ron)</TH>\r\n        </TR>\r\n        <TR>\r\n            <TH class=\"gsapthead\" noWrap>Ment.</TH>\r\n            <TH class=\"gsapthead\" noWrap>Daune</TH>\r\n            <TH class=\"gsapthead\" noWrap>Exploatare</TH>\r\n            <TH class=\"gsapthead\" noWrap>Total</TH>\r\n        </TR>\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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(119,8);to=(122,78)]
			
            if ( null != rows1 && null != rows2) { //  sint date
                for (int i = 0; i < rows1.length ; i++) {
                    if (i+1 == rows1.length) classul="class=\"gsapthead\""; 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(122,78);to=(123,20)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(123,20);to=(123,37)]
			if (i > 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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(123,37);to=(129,20)]
			out.print("\r\n                        <tr>\r\n                            <td colspan=\"15\">\r\n                                &nbsp;\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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(129,20);to=(129,25)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(129,25);to=(131,24)]
			out.print("\r\n                    <TR class=\"gsapthead\">\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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(131,24);to=(131,224)]
			 final String codGrupa = (rows1[i].cauzaGrupa.getId() == -1) ? "&nbsp" : String.valueOf( (nom = NomAccessDB.getNom( rows1[i].cauzaGrupa.getId())) != null ? String.valueOf(nom.getCod()) : "&nbsp");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(131,224);to=(132,56)]
			out.print("\r\n                        <TD align=\"center\" valign=\"top\">");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(132,56);to=(132,69)]
			out.print(codGrupa);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(132,69);to=(135,28)]
			out.print("</TD>\r\n                        <td>&nbsp;</td>\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/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(135,75);to=(136,28)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(136,28);to=(136,57)]
			if( i+1 < rows1.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(136,57);to=(136,138)]
			out.print("<a class=\"link\" href=\"javascript: void(null)\" onclick=\"openEchipamenteByCauzaID( ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(136,138);to=(136,170)]
			out.print(rows1[i].cauzaGrupa.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(136,170);to=(136,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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(136,174);to=(136,179)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(136,179);to=(137,28)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(137,28);to=(137,67)]
			out.print(rows1[i].cauzaGrupa.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(137,67);to=(138,28)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(138,28);to=(138,57)]
			if( i+1 < rows1.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(138,57);to=(138,61)]
			out.print("</a>");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(138,61);to=(138,66)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(138,66);to=(140,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(140,42);to=(140,70)]
			out.print(rows1[i].t_nr_incidente);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(140,70);to=(141,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,42);to=(141,103)]
			if("Totale".equals( rows1[i].cauzaGrupa.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,103);to=(141,111)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,111);to=(141,121)]
			}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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,121);to=(141,122)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,122);to=(141,154)]
			out.print(rows1[i].t_durata_indisp/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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,154);to=(141,156)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,156);to=(141,188)]
			out.print(rows1[i].t_durata_indisp%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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,188);to=(141,190)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,190);to=(141,195)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(141,195);to=(142,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(142,42);to=(142,88)]
			out.print(AppConstants.format3(rows1[i].chelt_ment));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(142,88);to=(143,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(143,42);to=(143,89)]
			out.print(AppConstants.format3(rows1[i].chelt_daune));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(143,89);to=(144,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(144,42);to=(144,90)]
			out.print(AppConstants.format3(rows1[i].chelt_altele));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(144,90);to=(145,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(145,42);to=(145,92)]
			out.print(AppConstants.format3(rows1[i].t_chelt_totale));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(145,92);to=(147,20)]
			out.print("</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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(147,20);to=(147,124)]
			 for (; (j < rows2.length) && (rows2[j].cauzaGrupa.getId() == rows1[i].cauzaGrupa.getId()) ; j++) { 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(147,124);to=(148,24)]
			out.print("\r\n                    <TR ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(148,24);to=(148,36)]
			out.print(classul);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(148,36);to=(150,43)]
			out.print(">\r\n                        <TD align=\"center\">&nbsp;</TD>\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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(150,43);to=(150,209)]
			out.print((rows2[j].cauza.getId() == -1) ? "&nbsp" :  String.valueOf( (nom = NomAccessDB.getNom( rows2[j].cauza.getId())) != null ? String.valueOf(nom.getCod()) : "&nbsp"));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(150,209);to=(152,28)]
			out.print("</TD>\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/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(152,70);to=(153,109)]
			out.print("\r\n                            <a class=\"link\" href=\"javascript: void(null)\" onclick=\"openEchipamenteByCauzaID( ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(153,109);to=(153,141)]
			out.print(rows1[i].cauzaGrupa.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(153,141);to=(153,143)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(153,143);to=(153,170)]
			out.print(rows2[j].cauza.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(153,170);to=(154,32)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(154,32);to=(154,66)]
			out.print(rows2[j].cauza.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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(154,66);to=(157,42)]
			out.print("\r\n                            </a>\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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(157,42);to=(157,70)]
			out.print(rows2[j].t_nr_incidente);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(157,70);to=(158,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(158,42);to=(158,74)]
			out.print(rows2[j].t_durata_indisp/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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(158,74);to=(158,76)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(158,76);to=(158,108)]
			out.print(rows2[j].t_durata_indisp%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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(158,108);to=(159,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(159,42);to=(159,88)]
			out.print(AppConstants.format3(rows2[j].chelt_ment));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(159,88);to=(160,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(160,42);to=(160,89)]
			out.print(AppConstants.format3(rows2[j].chelt_daune));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(160,89);to=(161,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(161,42);to=(161,90)]
			out.print(AppConstants.format3(rows2[j].chelt_altele));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(161,90);to=(162,42)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(162,42);to=(162,92)]
			out.print(AppConstants.format3(rows2[j].t_chelt_totale));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(162,92);to=(164,20)]
			out.print("</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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(164,20);to=(164,40)]
			 } // for cauze 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(164,40);to=(165,16)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(165,16);to=(165,42)]
			 } // for grupe cauze 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(165,42);to=(166,8)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(166,8);to=(166,22)]
			 } 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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(166,22);to=(172,8)]
			out.print("\r\n            <TR>\r\n                <TD>\r\n                    Nu exista informatii...\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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(172,8);to=(172,15)]
			 } 
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(172,15);to=(183,32)]
			out.print("\r\n    </table>\r\n\r\n</div>\r\n<br>\r\n<br>\r\n\r\n\r\n<script type=\"text/javascript\">\r\n    var echipamenteWindow = null;\r\n    function openEchipamenteByComponentaId( idAnsamblu, idComponenta){\r\n        openEchipamenteWindow( \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(183,32);to=(183,58)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(183,58);to=(187,32)]
			out.print("?action=showEchipamenteFromRaport&idAnsamblu=\'+idAnsamblu + \"&idComponenta=\"+idComponenta);\r\n    }\r\n\r\n    function openEchipamenteByCauzaID( idCauzaGrupa, idCauza){\r\n        openEchipamenteWindow( \'");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/rapoarte/showEchipamenteFromRaportTop10PeCauze.jsp";from=(187,32);to=(187,58)]
			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/showEchipamenteFromRaportTop10PeCauze.jsp";from=(187,58);to=(196,0)]
			out.print("?action=showEchipamenteFromRaport&idCauzaGrupa=\'+idCauzaGrupa+\'&idCauza=\'+idCauza);\r\n    }\r\n\r\n    function openEchipamenteWindow( url){\r\n        if( echipamenteWindow != null) echipamenteWindow.close();\r\n        echipamenteWindow = window.open( url,\'echipamenteRaportTop10___\', \'top=50,left=50,width=950, height=550, status=yes,resizable=yes,dependent=yes,alwaysRaised=yes, scrollbars=yes\');\r\n    }\r\n</script>\r\n\r\n");
// 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);
		}
	}

}
