<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ui:page binding="#{UtilizadorFields.page1}" id="page1">
            <ui:html binding="#{UtilizadorFields.html1}" id="html1">
                <ui:head binding="#{UtilizadorFields.head1}" id="head1">
                    <ui:link binding="#{UtilizadorFields.link1}" id="link1" url="/resources/stylesheet.css"/>
                    <script>

			function showPdf()
			{
			    sOptions = " width = '" + screen.availWidth + "'";
			    sOptions += " height= '" + screen.availHeight + "'";
			    var wOpen;
				wOpen = window.open('./resources/pdf/Ajuda.pdf','', sOptions );
			   wOpen.focus();
			   wOpen.moveTo(0,0);
			   wOpen.resizeTo( screen.availWidth, screen.availHeight );
			}                        

                        function confirmeUserDeletion()
                        {
                            var hid = document.getElementById("form1:hidConfDelUser");
                            if(hid.value == "apagar")
                            {
                                hid.value = null;                            
                                var conf = confirm("Confirma eliminação do utilizador ?");
                                if(conf)
                                {
                                    window.location="UtilizadorFields.jsp?del_user=yes"; 
                                }
                                else
                                {
                                    window.location="UtilizadorFields.jsp?del_user=no";                                 
                                }
                            }
                        }                        
                    </script>
                </ui:head>
                <ui:body binding="#{UtilizadorFields.body1}" id="body1" onLoad="confirmeUserDeletion();" style="-rave-layout: grid">
                    <ui:form binding="#{UtilizadorFields.form1}" id="form1">
                        <h:panelGrid binding="#{UtilizadorFields.gridBase1}" columns="1" id="gridBase1"
                            style="height: 39px; left: 0px; top: 72px; position: absolute; width: 100%" styleClass="centerBlock">
                            <h:panelGrid binding="#{UtilizadorFields.gridLayout1}" columns="1" id="gridLayout1" style="height: 24px; width: 80%"
                                styleClass="centerBlock" width="456">
                                <h:panelGrid binding="#{UtilizadorFields.gridPanel1}" columnClasses="gridColLeft, gridColRightBottom" columns="2"
                                    id="gridPanel1" style="border-bottom: solid rgb(0, 0, 0) 1px; height: 24px; width: 100%" width="312">
                                    <ui:panelGroup binding="#{UtilizadorFields.groupPanel1}" id="groupPanel1" style="height: 24px; width: 216px">
                                        <ui:image binding="#{UtilizadorFields.image1}" id="image1" url="/resources/images/SIPRP_logo_small.jpg"/>
                                        <ui:image binding="#{UtilizadorFields.image2}" id="image2" url="/resources/images/logo_auchan_small1.jpg"/>
                                    </ui:panelGroup>
                                    <ui:panelGroup binding="#{UtilizadorFields.groupPanel2}" id="groupPanel2" style="height: 24px; width: 310px; top: 90%">
                                        <ui:staticText binding="#{UtilizadorFields.lblUser}" escape="false" id="lblUser" styleClass="labelBold "/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText1}" escape="false" id="staticText1" text="   "/>
                                        <ui:hyperlink action="#{UtilizadorFields.lnkAnalisesAcidente_action}" binding="#{UtilizadorFields.lnkAnalisesAcidente}"
                                            id="lnkAnalisesAcidente" text="analisar acidentes"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText18}" escape="false" id="staticText18" text=" | "/>
                                        <ui:hyperlink action="#{UtilizadorFields.lnkNewUser_action}" binding="#{UtilizadorFields.lnkNewUser1}" disabled="true"
                                            id="lnkNewUser1" style="" text="gerir utilizadores"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText17}" escape="false" id="staticText17" text=" | "/>
                                        <ui:hyperlink action="#{UtilizadorFields.lnkEditUser_action}" binding="#{UtilizadorFields.lnkEditUser1}" disabled="true"
                                            id="lnkEditUser1" text="alterar dados utilizador"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText2}" escape="false" id="staticText2" text=" | "/>
                                        <ui:hyperlink action="#{UtilizadorFields.lnkAjuda_action}" binding="#{UtilizadorFields.lnkAjuda}" id="lnkAjuda"
                                            onClick="showPdf();" style="" text="ajuda "/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText19}" id="staticText19" style="height: 22px; width: 0px" text="|"/>
                                        <ui:hyperlink action="#{UtilizadorFields.lnkLogout_action}" binding="#{UtilizadorFields.lnkLogout1}" id="lnkLogout1" text="sair&gt;&gt;"/>
                                    </ui:panelGroup>
                                </h:panelGrid>
                                <h:panelGrid binding="#{UtilizadorFields.gridMsg1}" columnClasses="gridColCenter" columns="1" id="gridMsg1"
                                    style="height: 24px; width: 100%" width="96">
                                    <ui:staticText binding="#{UtilizadorFields.txtMsg}" escape="false" id="txtMsg" style="height: 24px; width: 384px" styleClass="labelMsg"/>
                                </h:panelGrid>
                                <h:panelGrid binding="#{UtilizadorFields.gridPanel2}" cellpadding="0" cellspacing="0" columns="1" id="gridPanel2"
                                    style="border: 1px solid rgb(0, 0, 0); height: 24px; width: 100%" width="384">
                                    <h:panelGrid binding="#{UtilizadorFields.gridPanel3}" columnClasses="gridColLeft, gridColLeft" columns="1" id="gridPanel3"
                                        style="background-color: #668597; border-bottom: solid #000000 1px; height: 24px; width: 100%" width="312">
                                        <ui:panelGroup binding="#{UtilizadorFields.groupPanel3}" id="groupPanel3" style="height: 24px; width: 264px">
                                            <ui:staticText binding="#{UtilizadorFields.stCriarEditar}" id="stCriarEditar" style="height: 24px" styleClass="labelBold"/>
                                            <ui:staticText binding="#{UtilizadorFields.staticText3}" escape="false" id="staticText3"
                                                style="height: 24px; width: 120px" styleClass="labelBold" text="&amp;nbsp;UTILIZADOR"/>
                                        </ui:panelGroup>
                                    </h:panelGrid>
                                    <h:panelGrid binding="#{UtilizadorFields.gridPanel4}" columnClasses="gridColLeft" columns="2" id="gridPanel4"
                                        style="height: 24px; width: 80%" styleClass="centerBlock" width="336">
                                        <ui:staticText binding="#{UtilizadorFields.staticText9}" escape="false" id="staticText9"
                                            style="height: 24px; left: 72px; top: 240px; position: absolute; width: 118px" text="&amp;nbsp;"/>
                                        <h:panelGrid binding="#{UtilizadorFields.gridPanel10}" columnClasses="gridColRight" columns="1" id="gridPanel10" style="height: 24px; width: 100%">
                                            <ui:panelGroup binding="#{UtilizadorFields.groupPanel8}" id="groupPanel8" style="height: 24px">
                                                <ui:checkbox binding="#{UtilizadorFields.chkActivo}" id="chkActivo" style="height: 24px; width: 24px"/>
                                                <ui:staticText binding="#{UtilizadorFields.staticText6}" id="staticText6" style="height: 24px" text="Activo"/>
                                            </ui:panelGroup>
                                        </h:panelGrid>
                                        <ui:staticText binding="#{UtilizadorFields.staticText4}" id="staticText4" style="height: 24px; width: 144px"
                                            styleClass="labelCSS" text="Categoria:"/>
                                        <h:panelGrid binding="#{UtilizadorFields.gridPanel5}" columnClasses="gridColLeft" columns="1" id="gridPanel5"
                                            style="height: 24px" width="336">
                                            <ui:panelGroup binding="#{UtilizadorFields.groupPanel6}" id="groupPanel6" style="height: 24px; width: 528px">
                                                <ui:staticText binding="#{UtilizadorFields.stTipo}" escape="false" id="stTipo" style="height: 24px; width: 192px"/>
                                                <ui:panelGroup binding="#{UtilizadorFields.groupPanel7}" id="groupPanel7" style="height: 24px; width: 70px">
                                                    <ui:staticText binding="#{UtilizadorFields.staticText5}" escape="false" id="staticText5" style="" text="   "/>
                                                </ui:panelGroup>
                                            </ui:panelGroup>
                                        </h:panelGrid>
                                        <ui:staticText binding="#{UtilizadorFields.staticText8}" id="staticText8" style="height: 24px" styleClass="labelCSS" text="Estabelecimento: "/>
                                        <h:panelGrid binding="#{UtilizadorFields.gridPanel8}" columnClasses="gridColLeft" columns="1" id="gridPanel8"
                                            style="height: 24px" width="336">
                                            <ui:dropDown binding="#{UtilizadorFields.drpEstabelecimentos}" id="drpEstabelecimentos"
                                                items="#{SessionBean1.estabelecimentosOptions}" selected="#{SessionBean1.estabelecimentoChoice}"
                                                style="height: 24px; width: 300px" valueChangeListener="#{UtilizadorFields.drpEstabelecimentos_processValueChange}"/>
                                            <ui:staticText binding="#{UtilizadorFields.stEstabelecimento}" escape="false" id="stEstabelecimento" style="height: 24px; width: 192px"/>
                                        </h:panelGrid>
                                        <ui:staticText binding="#{UtilizadorFields.staticText11}" id="staticText11" style="height: 24px; width: 144px"
                                            styleClass="labelCSS" text="Nome:"/>
                                        <h:panelGrid binding="#{UtilizadorFields.gridPanel9}" cellpadding="0" cellspacing="0" columnClasses="gridColLeft"
                                            columns="1" id="gridPanel9" style="height: 24px" width="288">
                                            <ui:dropDown binding="#{UtilizadorFields.drpNome}" id="drpNome" items="#{SessionBean1.medicosOptions}"
                                                onChange="common_timeoutSubmitForm(this.form, 'gridBase1:gridLayout1:gridPanel2:gridPanel4:gridPanel9:drpNome');"
                                                selected="#{SessionBean1.medicoChoice}" style="height: 24px; width: 300px" valueChangeListener="#{UtilizadorFields.drpNome_processValueChange}"/>
                                            <ui:textField binding="#{UtilizadorFields.txtNome}" id="txtNome" style="height: 24px; width: 300px"/>
                                            <ui:staticText binding="#{UtilizadorFields.stNome}" escape="false" id="stNome" style="height: 24px; width: 192px"/>
                                        </h:panelGrid>
                                        <ui:staticText binding="#{UtilizadorFields.staticText13}" id="staticText13" style="height: 24px; width: 144px"
                                            styleClass="labelCSS" text="Login:"/>
                                        <ui:textField binding="#{UtilizadorFields.txtLogin}" id="txtLogin" style="height: 24px; width: 300px"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText14}" id="staticText14" style="height: 24px; width: 144px"
                                            styleClass="labelCSS" text="Password:"/>
                                        <ui:passwordField binding="#{UtilizadorFields.txtPassword}" id="txtPassword" style="width: 200px"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText7}" id="staticText7" style="height: 24px" styleClass="labelCSS" text="Confirme password:"/>
                                        <ui:passwordField binding="#{UtilizadorFields.txtConfPassword}" id="txtConfPassword" style="width: 200px"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText15}" id="staticText15" style="height: 24px" styleClass="labelCSS" text="E-mail:"/>
                                        <ui:textField binding="#{UtilizadorFields.txtEmail}" id="txtEmail" style="height: 24px; width: 300px"/>
                                        <ui:staticText binding="#{UtilizadorFields.lblRespLoja}" escape="false" id="lblRespLoja" style="height: 24px"
                                            styleClass="labelCSS" text="Respons&amp;aacute;vel Loja"/>
                                        <ui:checkbox binding="#{UtilizadorFields.chkRespLoja}" id="chkRespLoja" style="height: 24px; width: 24px"/>
                                        <ui:staticText binding="#{UtilizadorFields.lblGeral}" escape="false" id="lblGeral" style="height: 24px"
                                            styleClass="labelCSS" text="Geral"/>
                                        <ui:checkbox binding="#{UtilizadorFields.chkGeral}" id="chkGeral" style="height: 24px; width: 24px"/>
                                    </h:panelGrid>
                                    <h:panelGrid binding="#{UtilizadorFields.gridPanel6}" columns="1" id="gridPanel6" style="height: 24px; width: 90%"
                                        styleClass="centerBlock" width="336">
                                        <ui:panelGroup binding="#{UtilizadorFields.groupPanel4}" id="groupPanel4" style="height: 24px; width: 240px">
                                            <ui:staticText binding="#{UtilizadorFields.staticText10}" escape="false" id="staticText10"
                                                style="height: 24px; width: 144px" text=" "/>
                                        </ui:panelGroup>
                                    </h:panelGrid>
                                    <h:panelGrid binding="#{UtilizadorFields.gridPanel7}" columnClasses="gridColLeft, gridColRight" columns="2" id="gridPanel7"
                                        style="height: 24px; width: 80%" styleClass="centerBlock" width="336">
                                        <ui:button action="#{UtilizadorFields.butCancelar_action}" binding="#{UtilizadorFields.butCancelar}" id="butCancelar"
                                            style="height: 24px; width: 96px" text="Cancelar"/>
                                        <ui:panelGroup binding="#{UtilizadorFields.groupPanel5}" id="groupPanel5" style="height: 24px; width: 240px">
                                            <ui:button action="#{UtilizadorFields.butApagar_action}" binding="#{UtilizadorFields.butApagar}" id="butApagar"
                                                style="height: 24px; width: 119px" text="Apagar Utilizador "/>
                                            <ui:button action="#{UtilizadorFields.butGravar_action}" binding="#{UtilizadorFields.butGravar}" id="butGravar"
                                                style="height: 24px; width: 96px" text="Gravar"/>
                                        </ui:panelGroup>
                                    </h:panelGrid>
                                </h:panelGrid>
                                <h:panelGrid binding="#{UtilizadorFields.gridPanel11}" columnClasses="gridColCenter" columns="1" id="gridPanel11" style="height: 24px; width: 100%">
                                    <ui:panelGroup binding="#{UtilizadorFields.groupPanel9}" id="groupPanel9" style="border-bottom: solid rgb(255, 255, 255) 1px; height: 21px">
                                        <ui:staticText binding="#{UtilizadorFields.staticText12}" id="staticText12" text="Software desenvolvido por "/>
                                        <ui:image binding="#{UtilizadorFields.image3}" height="21" id="image3" url="/resources/images/logo_evolute_small.png" width="100"/>
                                        <ui:staticText binding="#{UtilizadorFields.staticText16}" escape="false" id="staticText16" text="&amp;nbsp;&amp;copy; 2008 "/>
                                    </ui:panelGroup>
                                </h:panelGrid>
                            </h:panelGrid>
                        </h:panelGrid>
                        <ui:hiddenField binding="#{UtilizadorFields.hidConfDelUser}" id="hidConfDelUser"/>
                    </ui:form>
                </ui:body>
            </ui:html>
        </ui:page>
    </f:view>
</jsp:root>
