class OfficeListTag extends BodyTagSupport {

    void getAboveBranches(XmlBuilder html, List<OfficeBO> officeList, String regional, String subregional, String area) {
        if (null != officeList) {

            XmlBuilder regionalHtml = null;
            XmlBuilder subregionalHtml = null;
            XmlBuilder areaHtml = null;

            for (int i = 0; i < officeList.size(); i++) {
                OfficeBO office = officeList.get(i);
                if (office.getOfficeLevel() == OfficeLevel.HEADOFFICE) {
                    html.singleTag("br");
                    html.startTag("span", "class", "fontnormalbold");
                    html.append(getLink(office.getOfficeId(), office.getOfficeName()));
                    html.singleTag("br");
                    html.endTag("span");
                } else if (office.getOfficeLevel() == OfficeLevel.REGIONALOFFICE) {
                    regionalHtml = processOffice(regionalHtml, office, regional);
                } else if (office.getOfficeLevel() == OfficeLevel.SUBREGIONALOFFICE) {
                    subregionalHtml = processOffice(subregionalHtml, office, subregional);
                } else if (office.getOfficeLevel() == OfficeLevel.AREAOFFICE) {
                    areaHtml = processOffice(areaHtml, office, area);
                }
            }

            outputLevel(html, regionalHtml);
            outputLevel(html, subregionalHtml);
            outputLevel(html, areaHtml);
        }
    }

    public  OfficeListTag();
    public  OfficeListTag(String action, String method, String flow);

}