   tabs = new Array (
        "Home|home|index|earth.jpg",
        "A/V Club|avclub|avclub|projector2.jpg",
        "Writing 101|writings|writing101|pen_and_quill.jpg",
        "Quote Server|quotes|quote|bubble.gif",
        "Drinking Games|drinks|drinks|martini_glass.jpg",
        "Links|links|links|link.jpg",
        "Feedback|feedback|feedback|mailbox2.gif" )

   yellow_images = new Array
   red_images = new Array
   icon_images = new Array

   for (i = 0 ; i < tabs.length ; i++)
   {
      tabImage = (tabs[i].split("|"))[1]
      iconImage = (tabs[i].split("|"))[3]

      yellow_images[i] = new Image
      yellow_images[i].src = "images/" + tabImage + "_yellow.jpg"

      red_images[i] = new Image
      red_images[i].src = "images/" + tabImage + "_red.jpg"
      
      icon_images[i] = new Image
      icon_images[i].src = "images/" + iconImage
   }

   function bodyBuilder(currentTab, iconImage)
   {
     // style sheet
     version = (navigator.appVersion.split(" "))[0]
     if((navigator.appName == "Netscape")  &&  (version < 5.0)  &&  (currentTab == 2))
     {
         // weird Netscape 4.7 bug on Writing 101 page, skip style sheet
     } 
     else
     {
       document.write("<STYLE TYPE=\"text/css\">\n" +
                    "<!--\n" +
                    " TABLE          { font-family:Helvetica,Arial,san-serif ; font-size:14 ; color:black ; }\n" +
                    " TABLE.writing  { font-family:\"Times New Roman\",Times,serif ; font-size:14 ; color:black ; }\n" +
                    " P.small { font-size: 75% }\n" +
                    " A:hover   { background : yellow }\n" +
                    " A:link    { text-decoration : none ; color : 0033ff }\n" +
                    " A:visited { text-decoration : none ; color : 990033 }\n" +
                    "-->\n" +
                    "</STYLE>\n")
     }
     
                    
     // main body is in a table with 2 cells
     document.write("<CENTER>\n" +
     		    "<TABLE WIDTH=700 CELLSPACING=0 FRAME=box RULES=rows BORDER=2 BORDERCOLOR=336666 CELLPADDING=10>\n" +
                    "<TR>\n");
                    
     // first cell is another table with links to various pages 
     document.write("<TD BACKGROUND=images/graydient.jpg>\n" +
                    "<CENTER>\n" +
                    "<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=0>\n" +
                    "<TR>\n");
                    
     document.write ("<TD WIDTH=60 ALIGN=CENTER>\n" +
                     "<IMG ALT=\"icon\" TITLE=\"icon\" NAME=\"icon\" SRC=\"images/" + (tabs[iconImage].split("|"))[3] + "\" BORDER=0></TD>\n");

     for (i = 0 ; i < tabs.length ; i++)
     {
        tabName  = (tabs[i].split("|"))[0]
        tabImage = (tabs[i].split("|"))[1]
        tabHref  = (tabs[i].split("|"))[2]

        document.write("<TD>\n");

        if (i == currentTab)
        {
           document.write("<IMG SRC=images/" + tabImage + "_gray.jpg ALT=\"" + tabName + "\" BORDER=0>\n");
        }
        else
        {
           document.write("<A HREF=\"" + tabHref + ".html\"\n" +
                          " onMouseOver=\"document." + tabImage + ".src=red_images[" + i + "].src;document.icon.src=icon_images[" + i + "].src\"\n" +
                          " onMouseOut=\"document." + tabImage + ".src=yellow_images[" + i + "].src;document.icon.src=icon_images[" + iconImage + "].src\">\n" +
                          "<IMG SRC=images/" + tabImage + "_yellow.jpg NAME=\"" + tabImage + "\" ALT=\"" + tabName + "\" TITLE=\"" + tabName + "\" BORDER=0></A>\n");
        }

        document.write("</TD>\n");
     }

     // close the inner table, start new cell where main body lives
     document.write("</TR>\n" +
                    "</TABLE>\n" +
                    "</CENTER>\n" +
                    "</TD>\n" +
                    "</TR>\n" +
                    "<TR>\n" +
                    "<TD BACKGROUND=images/graydient.jpg>\n");

   }

