// Displays a table as:
//
//  C1      C2        C3              C4                   C5      C6       C7
//
//  1%     100px      1%               *                   1%     100px     1%
// +-+---------------+-+----------------------------------+-+--------------+-+
// | |+-------------+| |                                  | |+------------+| | <- R1
// | ||             || |    Queen Anne's Lace Curtains    | ||            || |
// | ||             || |                                  | ||            || |
// | ||[toolbox.jpg]|| |                                  | ||[basket.jpg]|| |
// | || ----------- || +----------------------------------+ || ---------- || |
// | ||    Tools    || |Cotton Lace From Queen Anne's Lace| ||  {items}   || | <- R2
// | ||    -----    || +----------------------------------+ ||  -------   || |
// | ||             || | Purveyors of Fine Scottish Lace  | ||            || | <- R3
// | |+-------------+| |   Curtains to Historic Homes     | |+------------+| |
// +-+---------------+-+----------------------------------+-+--------------+-+
//

function show_banner (location)
{
   // Get the current total number of orders;
   var current_total_orders=read_cookie('basket_total_cookie');

   if (current_total_orders == null)
   {
      current_total_orders=0;
   }

   document.writeln("<table class=\"banner\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
      document.writeln("<tr>");
         document.writeln("<td width=\"1%\" rowspan=\"3\"></td>");

         // Toolbox;
         document.writeln("<td width=\"100\" rowspan=\"3\">");
            document.writeln("<table class=\"banner\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
               document.writeln("<tr>");
                  document.writeln("<td align=\"center\" valign=\"middle\">");
                     if (location != "tools")
                     {
                        document.writeln("<a class=\"banner\" href=\"toolbox.html\" target=\"_blank\" onmouseover=\"Tip('Open the toolbox.  The toolbox contains various utilities which may assist you in selecting the best patterns and sizes to suit your needs.<br /><br />Please note that the toolbox will open in a new browser window or tab.', FONTFACE, 'Georgia', FONTSIZE, '12pt', WIDTH, 400, PADDING, 10, FOLLOWMOUSE, false, BORDERCOLOR, '#C0C0C0', BGCOLOR, '#000000', FONTCOLOR, '#FFFFFF', OFFSETY, -30, OFFSETX, 50, FADEIN, 200, FADEOUT, 200, DURATION, 20000, DELAY, 1000);\" onmouseout=\"UnTip()\">");
                        document.writeln("<img id=\"tools_img\" src=\"images/tools_off.gif\" onmouseover=\"this.src='images/tools_on.gif';\" onmouseout=\"this.src='images/tools_off.gif';\" border=\"0\">");
                        document.writeln("</a>");
                     }
                     else
                     {
                        document.writeln("<img id=\"tools_img\" src=\"images/tools_on.gif\" border=\"0\">");
                     }
                  document.writeln("</td>");
               document.writeln("</tr>");
               document.writeln("<tr>");
                  document.writeln("<td id=\"tools_txt\" class=\"banner\" align=\"center\" valign=\"middle\">");
                     document.writeln("<p class=\"banner\">toolbox</p>");
                  document.writeln("</td>");
               document.writeln("</tr>");
            document.writeln("</table>");
         document.writeln("</td>");

         document.writeln("<td width=\"1%\" rowspan=\"3\"></td>");

         document.writeln("<td class=\"banner\" width=\"*\" align=\"center\" valign=\"middle\">");
            document.writeln("<h1 class=\"banner\">Queen Anne's Lace Curtains</h1>");
         document.writeln("</td>");

         document.writeln("<td width=\"1%\" rowspan=\"3\"></td>");

         // Basket;
         document.writeln("<td width=\"100\" rowspan=\"3\">");
            document.writeln("<table class=\"banner\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
               document.writeln("<tr>");
                  document.writeln("<td id=\"basket_img\" align=\"center\" valign=\"middle\">");
                     if ((location != "basket1") && (location != "final") && (location != "tools"))
                     {
                        document.writeln("<a href=\"basket.html\" alt=\"View Basket\" title=\"View Basket\">");
                     }

                     if ((location != "basket") && (location != "basket1") && (location !="checkout") && (location !="final"))
                     {
                        if (current_total_orders == 0)
                        {
                           document.writeln("<img src=\"images/basket0_off.gif\" border=\"0\">");
                        }
                        if (current_total_orders == 1)
                        {
                           document.writeln("<img src=\"images/basket1_off.gif\" border=\"0\">");
                        }
                        if (current_total_orders == 2)
                        {
                           document.writeln("<img src=\"images/basket2_off.gif\" border=\"0\">");
                        }
                        if (current_total_orders == 3)
                        {
                           document.writeln("<img src=\"images/basket3_off.gif\" border=\"0\">");
                        }
                        if (current_total_orders > 3)
                        {
                           document.writeln("<img src=\"images/basket9_off.gif\" border=\"0\">");
                        }
                     }
                     else if (location != "final")
                     {
                        if (current_total_orders == 0)
                        {
                           document.writeln("<img src=\"images/basket0_on.gif\" border=\"0\">");
                        }
                        if (current_total_orders == 1)
                        {
                           document.writeln("<img src=\"images/basket1_on.gif\" border=\"0\">");
                        }
                        if (current_total_orders == 2)
                        {
                           document.writeln("<img src=\"images/basket2_on.gif\" border=\"0\">");
                        }
                        if (current_total_orders == 3)
                        {
                           document.writeln("<img src=\"images/basket3_on.gif\" border=\"0\">");
                        }
                        if (current_total_orders > 3)
                        {
                           document.writeln("<img src=\"images/basket9_on.gif\" border=\"0\">");
                        }
                     }
                     else
                     {
                        document.writeln("<img src=\"images/package.gif\" border=\"0\">");
                     }

                     if ((location != "basket1") && (location != "final") && (location != "tools"))
                     {
                        document.writeln("</a>");
                     }
                  document.writeln("</td>");
               document.writeln("</tr>");
               document.writeln("<tr>");
                  document.writeln("<td id=\"basket_txt\" class=\"banner\" align=\"center\" valign=\"middle\">");
                     if ((current_total_orders == 0) && (location != "final"))
                     {
                        document.writeln("<p class=\"banner\">empty");
                     }
                     if (current_total_orders == 1)
                     {
                        document.writeln("<p class=\"banner\">1 pattern");
                     }
                     if (current_total_orders > 1)
                     {
                        document.writeln("<p class=\"banner\">"+current_total_orders+" patterns");
                     }

                     if (location == "final")
                     {
                        document.writeln("<br />shipping order</p>");
                     }
                     else
                     {
                        document.writeln("</p>");
                     }
                  document.writeln("</td>");
               document.writeln("</tr>");
            document.writeln("</table>");
         document.writeln("</td>");

         document.writeln("<td width=\"1%\" rowspan=\"3\"></td>");
      document.writeln("</tr>");

      document.writeln("<tr>");
         document.writeln("<td class=\"banner\" width=\"*\" align=\"center\" valign=\"bottom\">");
            document.writeln("<h2 class=\"banner\">Cotton Lace From Queen Anne's Lace</h2>");
         document.writeln("</td>");
      document.writeln("</tr>");

      document.writeln("<tr>");
         document.writeln("<td class=\"banner\" width=\"*\" align=\"center\" valign=\"top\">");
            document.writeln("<h2 class=\"banner\">Purveyors of Fine Scottish Lace Curtains to Historic Homes</h2>");
         document.writeln("</td>");
      document.writeln("</tr>");
   document.writeln("</table>");
}

