<%--
  ~ This file is part of DebGen Biobank Software developed by ASTRID Research.
  ~ All rights reserved. Reproduction, modification, use or disclosure
  ~ to third parties without express authority is forbidden.
  ~
  ~ Copyright ASTRID Research Inc., Hungary, 2009-2011.
  ~
  ~ ASTRID Research
  ~ Headquaters: Csapo utca 42. Debrecen H-4029 HUNGARY
  ~ Phone: +36-52-533-173        Fax: +36-52-533-174
  ~ Web: http://www.astrid.hu    E-mail: info@astrid.hu
  ~
  ~ Project name: DebGen Biobank Software project.
  ~ URLS:
  ~ Developers: Istvan Zoltan Nagy (istvan.nagy@astrid.hu)
  --%>

<%--
    Document   : choosetype
    Created on : Dec 14, 2009, 10:40:14 AM
    Author     : inagy
--%>

<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/WEB-INF/dateformat.tld" prefix="da" %>
<script type="text/javascript" src="javascript/telepulesek.js"></script>
<%--<link type="text/css" href="stylesheet/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="javascript/jquery-1.3.2.js"></script>
<script type="text/javascript" src="javascript/ui.core.js"></script>--%>
<script type="text/javascript" src="javascript/ui.datepicker.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheet/jquery.autocomplete.css" />
<%--<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<!--script type="text/javascript" src="javascript/jquery-1.3.1.min.js"></script-->--%>
<script type="text/javascript">
    $(document).ready(function(){

        autocompleteOff();
    });

    function toggleList() {
        var all = document.getElementById("all");
        var match = document.getElementById("match");
        if (all.style.display == 'none') {
            all.style.display = 'block';
            match.style.display = 'none';
        } else {
            all.style.display = 'none';
            match.style.display = 'block';
        }
    }

</script>
<script type="text/javascript" src="javascript/jquery.autocomplete.js"></script>
<div class="window500">
    <div class="title"><fmt:message key="biobankModule" /></div>
    <div class="content">
        <div style="padding: 10px;">
            <table border="0" cellspacing="10" cellpadding="5">
                <tbody>
                    <tr>
                        <td id="head" class="patientheader" ></td>
                        <td><fmt:message key="BIOBANK_MODULE_DATA" /></td>
                </tr>
                </tbody>
            </table>
            <div id="line" style="width: 476px;" class="patientline">
                <fmt:message key="BIOBANK_MODULE_DATA" />
            </div>

            <div id="userdiv">
                <table class="formtable" border="0" width="477px" cellspacing="0" cellpadding="3">
                    <tbody>
                        <tr>
                            <td style="width: 120px;"><fmt:message key="patientCode" />:</td>
                    <td style="width: 340px;"><a href="showpatient.html?patient=${patient.id}">${patient.patientCode}</a>
                    </td>
                    </tr>
                    <c:if test="${not patient.named or not user.dataRecorder}">
                        <tr>
                            <td style="width: 120px;" ><fmt:message key="monogram" />:</td>
                        <td>
                            ${patient.anonymousData.monogram}
                        </td>
                        </tr>
                    </c:if>
                    <c:if test="${patient.named and user.dataRecorder}">
                        <tr>
                            <td style="width: 120px;"><fmt:message key="BETEG_NEV" />:</td>
                        <td>${patient.identity.patientName}</td>
                        </tr>
                        <tr>
                            <td style="width: 120px;"><fmt:message key="TAJ" />:</td>
                        <td>${patient.identity.tajNumber}</td>
                        </tr>
                    </c:if>
                    </tbody>
                </table>
                <div align="right"><c:if test="${not empty matching}"><a href="javascript:toggleList();"><fmt:message key="toggleMatchingAll"/></a></c:if></div>
                <div id="match" style="display: ${not empty matching ? 'block' : 'none'}">
                    <c:if test="${empty cit or cit}">
                        <div id="citogenetical" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="citogenModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=1"><fmt:message key="citogenModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${matching}">
                                    <c:if test="${template.objectType eq 'citogen'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=1&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${empty fish or fish}">
                        <div id="fish" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="fishModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=2"><fmt:message key="fishModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${matching}">
                                    <c:if test="${template.objectType eq 'fish'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=2&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${empty acho or acho}">
                        <div id="acho" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="achoModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=3"><fmt:message key="achoModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${matching}">
                                    <c:if test="${template.objectType eq 'acho'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=3&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${empty hypo or hypo}">
                        <div id="hypo" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="hypoModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=4"><fmt:message key="hypoModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${matching}">
                                    <c:if test="${template.objectType eq 'hypo'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=4&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${empty fmr or fmr}">
                        <div id="fmr" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="fmr1Module" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=5"><fmt:message key="fmr1Module" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${matching}">
                                    <c:if test="${template.objectType eq 'fmr1'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=5&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </c:if>
                </div>
                <div id="all" style="display: ${empty matching ? 'block' : 'none'}">
                        <div id="citogenetical" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="citogenModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=1"><fmt:message key="citogenModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${templates}">
                                    <c:if test="${template.objectType eq 'citogen'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=1&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                        <div id="fish" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="fishModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=2"><fmt:message key="fishModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${templates}">
                                    <c:if test="${template.objectType eq 'fish'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=2&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                        <div id="acho" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="achoModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=3"><fmt:message key="achoModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${templates}">
                                    <c:if test="${template.objectType eq 'acho'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=3&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                        <div id="hypo" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="hypoModule" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=4"><fmt:message key="hypoModule" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${templates}">
                                    <c:if test="${template.objectType eq 'hypo'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=4&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                        <div id="fmr" align="left" style="width: 477px">
                            <div class="patientline"><fmt:message key="fmr1Module" /></div>
                            <div align="center" style="width: 477px">
                                <%--<div class="button" align="left"
                                     style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=5"><fmt:message key="fmr1Module" /></a>
                                </div>--%>
                                <c:forEach var="template" items="${templates}">
                                    <c:if test="${template.objectType eq 'fmr1'}">
                                        <div class="button" align="left"
                                             style="width: 380px; padding-left: 20px; margin-top: 5px; height: 25px; background: url('pics/buttonbgr.png');"><a class="menulink" style="display: block; width: 400px; padding-top: 4px;" href="createmodule.html?patient=${patient.id}${not empty request ? '&request=' : ''}${not empty request ? request.id : ''}&type=5&fill=${template.id}">${template.templateName}</a>
                                        </div>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                </div>
            </div>
            <br/>
        </div>
    </div>
    <div class="copyright">
        &copy; 2009-2010 Astrid Research Inc.
    </div>
</div>
