private Layer getLayer2(int i) {
    Layer layerInfo = new Layer(Layer.DIV);
    layerInfo.setOverflow("hidden");
    layerInfo.setVisibility("hidden");
    layerInfo.setPositionType("relative");
    layerInfo.setHeight("25");
    layerInfo.setID("lay" + i + "_2");
    // layerInfo.setMarkupAttribute("class", "ehealth_div_no_border");
    layerInfo.setStyleClass("ehealth_div_top");
    Link text1 = new Link();
    text1.setNoURL();
    text1.setID("text" + i + "_2");
    if (age != null && age.getYears() >= 70) {
      if (i == 1) {
        text1.setText("Besök 2004-05-05");
      } else if (i == 2) {
        text1.setText("Besök 2004-06-05");
      } else text1.setText("Besök 03-01-30 14.00-15.00 Gimo VC");
    } else {
      if (i == 1) {
        text1.setText("Besök 2004-05-05");
      } else if (i == 2) {
        text1.setText("Inskrivning 2004-06-18");
      } else text1.setText("Besök 03-01-30 14.00-15.00 Gimo VC");
    }

    text1.setOnClick("javascript:showHideLayer(" + i + ", 2);return false;");
    layerInfo.add(imageCircleU);
    layerInfo.add(text1);
    return layerInfo;
  }
  // private Layer getNavigationTree(IWContext iwc) {
  private Layer getNavigationTree() {
    Layer layersNav = new Layer(Layer.DIV);
    layersNav.setOverflow("scroll");
    layersNav.setPositionType("relative");
    layersNav.setWidth("320");
    layersNav.setHeight("400");

    layersNav.setStyleClass("ehealth_div_no_border");
    // layersNav.setMarkupAttribute("class", "ehealth_div");

    layersNav.setBackgroundImage(imageBgVertOut);

    Table table = new Table(3, 20);
    table.setNoWrap();
    table.setCellpadding(0);
    table.setCellspacing(0);
    table.setBorder(0);

    table.setWidth("280");
    table.setHeight("350");

    int row = 1;
    int i = 1;

    for (i = 1; i <= 4; i++) {
      table.mergeCells(2, row, 3, row);
      if (i <= 2) {
        table.add(getLayer1(i), 2, row);
        table.setHeight(1, row, "16");
        table.setHeight(2, row, "16");
        table.setWidth(1, row, "16");
        table.setWidth(2, row, "16");
        table.setVerticalAlignment(1, row, Table.VERTICAL_ALIGN_TOP);
        table.add(imageCircleD, 1, row++);
      }
      // table.setBackgroundImage(1, row, imageBgVert);
      table.setHeight(2, row, "16");
      table.setVerticalAlignment(1, row, Table.VERTICAL_ALIGN_TOP);
      table.add(getLayer2(i), 2, row++);
      table.setBackgroundImage(1, row, imageBgVert);
      table.setHeight(1, row, "20");
      table.setVerticalAlignment(1, row, Table.VERTICAL_ALIGN_TOP);
      table.add(getLayer3(i), 2, row++);
      table.setHeight(1, row, "10");
      table.setVerticalAlignment(1, row, Table.VERTICAL_ALIGN_TOP);
      table.setBackgroundImage(1, row++, imageBgVert);

      /*table.add(getLayer1(i), 2, row);
      table.add(getLayer2(i), 2, row);
      table.add(getLayer3(i), 2, row);
      */
    }
    table.setVerticalAlignment(1, row, Table.VERTICAL_ALIGN_TOP);
    table.setHeight(1, row, "25");
    table.setBackgroundImage(1, row++, imageBgVert);

    layersNav.add(table);
    return layersNav;
  }
 private Layer getLayer3(int i) {
   Layer layerInfo = new Layer(Layer.DIV);
   layerInfo.setOverflow("hidden");
   layerInfo.setVisibility("hidden");
   layerInfo.setPositionType("relative");
   layerInfo.setHeight("20");
   layerInfo.setWidth("260");
   layerInfo.setID("lay" + i + "_3");
   // layerInfo.setStyleClass("ehealth_div_no_border");
   layerInfo.setStyleClass("ehealth_row_outer_div");
   // layerInfo.setLeftPosition("10");
   layerInfo.setTopPosition("0");
   layerInfo.add(getInfoLayer(i));
   return layerInfo;
 }
  public UIComponent getOverviewForm() {
    Form myForm = new Form();
    myForm.setName(prmForm);
    Table T = new Table(3, 3);
    T.setCellpadding(0);
    T.setCellspacing(0);
    T.setBorder(0);
    T.setBorderColor("#000000");
    T.setVerticalAlignment(1, 1, Table.VERTICAL_ALIGN_TOP);
    T.setVerticalAlignment(3, 1, Table.VERTICAL_ALIGN_TOP);
    // T.setVerticalAlignment(1, 4, Table.VERTICAL_ALIGN_BOTTOM);
    // T.add(getNavigationTree(iwc), 1, 1);
    T.add(getNavigationTree(), 1, 1);
    //	T.add(getInfoLayer(), 2, 1);

    T.add(new Break(3), 3, 1);
    //		T.setHeight(1, 3, "130");
    // T.setHeight(1, 4, "90");
    T.setWidth(2, 1, "40");
    myForm.add(T);

    Page pVisit = this.getParentPage();
    if (pVisit != null) {
      Script S = pVisit.getAssociatedScript();
      // pVisit.setOnLoad("setRowColor(document.getElementById('inf1_1'));");

      S.addFunction("setRowColor(obj)", setRowColorScript());
      S.addFunction("showHideLayer(obj)", showHideLayerScript());
      Script timeScript = myForm.getAssociatedFormScript();
      if (timeScript == null) {
        timeScript = new Script();
        myForm.setAssociatedFormScript(timeScript);
      }
    }

    ArrayList texts1 = new ArrayList();
    ArrayList texts2 = new ArrayList();

    if (age != null && age.getYears() >= 70) {
      texts1.add(localize(keySet1Text1U1, "Texten"));
      texts1.add(localize(keySet1Text2U1, "Texten"));
      texts1.add(localize(keySet1Text3U1, "Texten"));
      texts1.add(localize(keySet1Text4U1, "Texten"));
      texts1.add(localize(keySet1Text5U1, "Texten"));

      texts2.add(localize(keySet2Text1U1, "Texten"));
      texts2.add(localize(keySet2Text2U1, "Texten"));
      texts2.add(localize(keySet2Text3U1, "Texten"));
      texts2.add(localize(keySet2Text4U1, "Texten"));
      texts2.add(localize(keySet2Text5U1, "Texten"));

    } else {
      texts1.add(localize(keySet1Text1U2, "Texten"));
      texts1.add(localize(keySet1Text2U2, "Texten"));
      texts1.add(localize(keySet1Text3U2, "Texten"));
      texts1.add(localize(keySet1Text4U2, "Texten"));
      texts1.add(localize(keySet1Text5U2, "Texten"));

      texts2.add(localize(keySet2Text1U2, "Texten"));
      texts2.add(localize(keySet2Text2U2, "Texten"));
      texts2.add(localize(keySet2Text3U2, "Texten"));
      texts2.add(localize(keySet2Text4U2, "Texten"));
      texts2.add(localize(keySet2Text5U2, "Texten"));
    }

    Layer layerOut = new Layer(Layer.DIV);
    layerOut.setVisibility("visible");
    layerOut.setOverflow("scroll");
    layerOut.setPositionType("absolute");
    layerOut.setWidth("280");
    layerOut.setHeight("170");
    layerOut.setMarkupAttribute("class", "ehealth_div");

    Layer layer = new Layer(Layer.DIV);
    layer.setVisibility("hidden");
    layer.setOverflow("hidden");
    layer.setPositionType("absolute");
    layer.setWidth("250");
    layer.setHeight("145");
    layer.setMarkupAttribute("class", "ehealth_div_no_border");

    int theRow = 1;
    int i = 1;

    Iterator iter1 = texts1.iterator();
    Iterator iter2 = texts2.iterator();

    while (iter1.hasNext()) {
      Layer layers = (Layer) layer.clone();
      layers.setID("info" + i + "_" + theRow);
      String text = (String) iter1.next();
      layers.add(text);
      layerOut.add(layers);

      theRow++;
    }
    i++;
    theRow = 1;
    while (iter2.hasNext()) {
      Layer layers = (Layer) layer.clone();
      layers.setID("info" + i + "_" + theRow);
      String text = (String) iter2.next();
      layers.add(text);
      layerOut.add(layers);

      theRow++;
    }

    T.add(layerOut, 3, 1);
    return myForm;
  }