<%@ page import="ro.emid.common.constants.AppConstants" %>
<%
    String jsonData = (String)request.getAttribute("jsonData");
	String infoObj = (String)request.getAttribute("infoObj");
	String savedView = (String)request.getAttribute("savedView");
	String postId = (String)request.getAttribute("postId");
	Long maifiId = (Long)request.getAttribute("maifiId");
%>
<html>
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style type="text/css">
            body
            {
                overflow: hidden;
                font: 12px arial sans-serif;
            }
            
             ul
            {
              padding: 0;
              list-style-type: none;
              font-size: 14px;
			  display: block;
            }

            li
            {
              background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAABkCAYAAABdELruAAAAP0lEQVR42u3PQQoAIAgEQP3/o6t7JAhdolkQD4sMZuwZazKKlGXniHRDOu6HfyKRSCQSiUQikUgkEolEIv0rTc/fNmQ78+lPAAAAAElFTkSuQmCC);
              background-repeat: no-repeat;
              padding-left: 13px;
            }
			
			li.pturi:hover 
			{
				background-color: bisque;
			}
			
			li.even-row 
			{
				background-color:#f8f8fd;
			}

            li:last-child
            {
              background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAHUlEQVR42mNkwAT/gZiRAQ/AK0mKplGbqGETThoACFgJCVdBEqAAAAAASUVORK5CYII=);
            }
            li > ul
            {
              margin-left: 5px;
            }
         </style>
    </head>
    <body>
        <h2>Selectie instalatii afectate</h2>
        <form action="<%=AppConstants.APP_NAME%>?action=saveMaifiInstalatii" method="post">
			<input type="hidden" name="maifiId" value="<%=maifiId%>" />
			<input type="hidden" name="postId" value="<%=postId%>" />
            <div id="treeContainer" style="width: 64%;margin-bottom: 20px;height: 475px;overflow: auto;border: 1px solid #99bbe8;overflow-x: hidden;">
				<div id="header-container" style="padding:10px;background: #ccddf3;width: 100%;">
					<a href="javascript:"><b>Mod browse</b></a>
					<a href="javascript:"><b>Mod selectie</b></a>
				</div>
            </div>
            <input type="submit" value="Salveaza" style="margin-left: 20px;background: #f8eeb5;border-radius: 3px;" />
            <input id="renunta" type="button" value="Renunta" style="background: #f8eeb5;border-radius: 3px;" />
        </form>
            <div id="detaliiContainer" style="width: 34%;height: 475px;position: absolute;top:46px;right:0;border: 1px solid #99bbe8;overflow:auto;">
                <div id="header-container" style="padding:10px;background: #ccddf3;">
                    <b>Detalii Instalatie</b>
                </div>
                <table width="95%" style="margin-left: auto;margin-right: auto;padding:10px;">
                    <tbody>
                        <tr>
                            <td>
                                <fieldset class="mt10" style="margin-bottom:10px;">
                                    <legend>Generale</legend>
                                    <table width="100%" style="font: 12px arial sans-serif;" class="table no-border" cellspacing="0">

                                        <tbody><tr><td width="200px">Localitate:</td><td id="localitateLf" class="align-right"></td></tr>
                                        <tr><td>Mediul:</td><td class="align-right" id="mediuLf">-</td></tr>
                                        <tr><td>Snom:</td><td class="align-right" id="snom"></td></tr>
                                        <tr><td>Pnom=0.92 * Snom:</td><td id="pnom" class="align-right"></td></tr>
                                        <tr><td>Grad Incarcare (%):</td><td class="align-right" id="gradIncarcare"></td></tr>
                                        <tr><td>An PIF:</td><td class="align-right" id="anPif"></td></tr>
                                        <tr><td>Stare:</td><td class="align-right">Activ</td></tr>
                                        <tr><td>Valabilitate:</td><td id="an" class="align-right"></td></tr>
                                        <tr><td>Ultima actualizare:</td><td id="dataSave" class="align-right"></td></tr>
                                    </tbody></table>
                                </fieldset>

                                <fieldset class="mt10" style="margin-bottom:10px;">
                                    <legend>Numar Consumatori : <span id="nrConsumatori">0</span></legend>
                                    <table width="100%" style="font: 12px arial sans-serif;" class="table no-border" cellspacing="0">
                                        <tbody><tr><td width="200px">Casnici:</td><td id="utilizatoriCasnici" class="align-right">0</td></tr>
                                        <tr><td>Mici:</td><td id="utilizatoriMici" class="align-right">0</td></tr>
                                        <tr><td>Mari:</td><td id="utilizatoriMari" class="align-right">0</td></tr>
                                    </tbody></table>
                                </fieldset>

                                <fieldset class="mt10" style="margin-bottom:10px;">
                                    <legend>Nr. consumatori / Nivel tensiune</legend>
                                    <table width="100%" style="font: 12px arial sans-serif;" class="table no-border" cellspacing="0">
                                        <tbody><tr><td width="200px">JT:</td><td id="utilizatoriJt" class="align-right">0</td></tr>
                                        <tr><td>MT:</td><td id="utilizatoriMt" class="align-right">0</td></tr>
                                        <tr><td>IT:</td><td id="utilizatoriIt" class="align-right">0</td></tr>
                                    </tbody></table>
                                </fieldset>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        <script type="text/javascript">
            var date = <%=jsonData%>;
			var infoDate = <%=infoObj%>;
			var savedData = <%=savedView%>;
		</script>
		<script type="text/javascript" src="<%=AppConstants.WEB_RESOURCE_PATH%>/scripts/popupInstalatii.js"></script>
    </body>
</html>
