/*
 * Copyright (c) 2004, 2005, ADAPT project partners (IST-2001-37126).
 * 
 * RootNavigation.java
 */

package org.eu.adapt.demonstrator.web;

import java.io.IOException;
import java.io.PrintWriter;

public class Navigation
{
    private static final String LINK_BOX_STYLE  = "style=\"background-color: #388b23\"";
    private static final String LINK_TEXT_STYLE = "style=\"color: white; font-family: Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; text-decoration: underline\"";

    public static void generateNavigationHeader(String rootPath, PrintWriter writer)
        throws IOException
    {
        writer.println("<TABLE width=\"870\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">");
        writer.println("<TR>");
        writer.println("<TD width=\"128\" valign=\"top\">");

        writer.println("<TABLE width=\"100%\" border=\"0\" cellspacing=\"4\" cellpadding=\"4\">");
        writer.println("<TR><TD " + LINK_BOX_STYLE + "><A " + LINK_TEXT_STYLE + " href=\"" + rootPath + "/demo/index.html\">Demo</A></TD></TR>");
        writer.println("<TR><TD>&nbsp;</TD></TR>");
        writer.println("<TR><TD " + LINK_BOX_STYLE + "><A " + LINK_TEXT_STYLE + " href=\"" + rootPath + "/retailer/index.html\">Retailer</A></TD></TR>");
        writer.println("<TR><TD>&nbsp;</TD></TR>");
        writer.println("<TR><TD " + LINK_BOX_STYLE + "><A " + LINK_TEXT_STYLE + " href=\"" + rootPath + "/manufacturer_a/index.html\">Manufacturer A</A></TD></TR>");
        writer.println("<TR><TD " + LINK_BOX_STYLE + "><A " + LINK_TEXT_STYLE + " href=\"" + rootPath + "/manufacturer_b/index.html\">Manufacturer B</A></TD></TR>");
        writer.println("<TR><TD " + LINK_BOX_STYLE + "><A " + LINK_TEXT_STYLE + " href=\"" + rootPath + "/manufacturer_c/index.html\">Manufacturer C</A></TD></TR>");
        writer.println("</TABLE>");

        writer.println("</TD>");
        writer.println("<TD valign=\"top\">");
    }

    public static void generateNavigationFooter(PrintWriter writer)
        throws IOException
    {
        writer.println("</TD>");
        writer.println("</TR>");
        writer.println("</TABLE>");
    }
}