jokes_allowed = 1; // This allows/disallows the Joke Break. (0 is off, 1 is on)
                   // To turn the Joke Break off, change the above variable
                   // from 1 to 0 (zero).

runads = 1;  // This turns advertising on or off (0 is off, 1 is on).
             // Tutorials that are re-posted on the Web should have
             // this value set to 1.



/*  Random number generator. If max=3 then function returns 1,2 or 3
===================================================================*/
function getRandom(max) {return (Math.floor(Math.random()*max))+1;}


/*******************************************************************\
   Titlepic generation equipment (random images at top of lessons)
\*******************************************************************/
function getTitlePic()
{
   thisPic = getRandom(9); // Number being number of pics available.
                           // Make sure the number here matches the
                           // quantity available below! There's no
                           // error checking.                                   WIDTH  HEIGHT
        if (thisPic == 1)  { titlepicInfo = new Array("titlepic01.gif", "left",  "150", "292"); }
   else if (thisPic == 2)  { titlepicInfo = new Array("titlepic02.gif", "right", "201", "155"); }
   else if (thisPic == 3)  { titlepicInfo = new Array("titlepic03.gif", "left",  "187", "246"); }
   else if (thisPic == 4)  { titlepicInfo = new Array("titlepic04.gif", "right", "230", "212"); }
   else if (thisPic == 5)  { titlepicInfo = new Array("titlepic05.gif", "left",  "228", "193"); }
   else if (thisPic == 6)  { titlepicInfo = new Array("titlepic06.gif", "right", "273", "181"); }
   else if (thisPic == 7)  { titlepicInfo = new Array("titlepic07.gif", "left",  "277", "229"); } // pointing teacher
   else if (thisPic == 8)  { titlepicInfo = new Array("titlepic08.gif", "right", "215", "219"); }
   else if (thisPic == 9)  { titlepicInfo = new Array("titlepic09.gif", "left",  "195", "211"); }

   // Lesson 1 is always the pointing teacher
   if(currDocDesc == "Lesson 1") { titlepicInfo = new Array("titlepic07.gif", "left",  "277", "229"); }

   titlepicName   = titlepicInfo[0];
   titlepicSide   = titlepicInfo[1];
   titlepicWidth  = titlepicInfo[2];
   titlepicHeight = titlepicInfo[3];

   if(NavType == "makapage")
   { textSizeLine1 = "4"; textSizeLine2 = "6"; } else
   { textSizeLine1 = "6"; textSizeLine2 = "4"; }

   if (titlepicSide == "left")
   {
      tpline1 = "<CENTER><TABLE BORDER=\"0\"><TR>";
      tpline2 = "<TD><IMG SRC=\"../makapage/pics/" + titlepicName + "\" WIDTH=\"" + titlepicWidth + "\" HEIGHT=\"" + titlepicHeight + "\" HSPACE = \"20\"></TD>";
      tpline3 = "<TD><FONT SIZE=\"" + textSizeLine1 + "\" FACE=\"arial,helvetica\"><NOBR>" + generalDesc + "</NOBR></FONT><BR>";
      tpline4 = "    <FONT SIZE=\"" + textSizeLine2 + "\" FACE=\"arial,helvetica\">\&nbsp\;" + currDocDesc + "</FONT></TD>";
      tpline5 = "</TR></TABLE></CENTER>";
   }
   else // we assume it's right
   {
      tpline1 = "<CENTER><TABLE BORDER=\"0\"><TR>";
      tpline2 = "<TD><FONT SIZE=\"" + textSizeLine1 + "\" FACE=\"arial,helvetica\"><NOBR>" + generalDesc + "</NOBR></FONT><BR>";
      tpline3 = "    <FONT SIZE=\"" + textSizeLine2 + "\" FACE=\"arial,helvetica\">\&nbsp\;" + currDocDesc + "</FONT></TD>";
      tpline4 = "<TD><IMG SRC=\"../makapage/pics/" + titlepicName + "\" WIDTH=\"" + titlepicWidth + "\" HEIGHT=\"" + titlepicHeight + "\" HSPACE = \"20\"></TD>";
      tpline5 = "</TR></TABLE></CENTER>";
   }

      tpline6 = "<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"100%\">";
      tpline7 = "<TR CLASS=\"titlebar\"><TD><IMG SRC=\"../other/empty.gif\" WIDTH=\"1\" HEIGHT=\"6\" BORDER=\"0\" ALT=\"\"></TD></TR>";
      tpline8 = "</TABLE>";

   return tpline1 + tpline2 + tpline3 + tpline4 + tpline5 + tpline6 + tpline7 + tpline8;
}








/*******************************************************************\
   Navtable generation equipment
\*******************************************************************/

/*  Returns list of color variables for writing the stylesheet
    controlled nav table. Up to 12 color schemes supported.
===================================================================*/
function colorMatrix(colIndex)
{
   //                makapage tables  forms   frames  other    HOME
   //                   01      02      03      04      05      06      07      08      09      10      11      12
   prevnextLink    = "0033FF  0033FF  0033FF  0033FF  0000DD  0077EE  0033FF  0033FF  0033FF  0033FF  0033FF  0033FF"; prevnextLink    =    prevnextLink.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   prevnextVisited = "0033FF  0033FF  0033FF  0033FF  0000DD  0077EE  0033FF  0033FF  0033FF  0033FF  0033FF  0033FF"; prevnextVisited = prevnextVisited.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   prevnextActive  = "FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000"; prevnextActive  =  prevnextActive.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   prevnextPtext   = "000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000"; prevnextPtext   =   prevnextPtext.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));

   titlebarPtext   = "000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000"; titlebarPtext   =   titlebarPtext.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   titlebarBgcolor = "CCDDEE  FFDDDD  CCEECC  FFCC99  CCDDCC  CCDDDD  CCDDEE  CCDDEE  CCDDEE  CCDDEE  CCDDEE  CCDDEE"; titlebarBgcolor = titlebarBgcolor.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));

   navwhiteLink    = "0033DD  DD0000  007711  CC0000  0033DD  0055EE  0033DD  0033DD  0033DD  0033DD  0033DD  0033DD"; navwhiteLink    =    navwhiteLink.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navwhiteVisited = "0033DD  DD0000  007711  CC0000  0033DD  0055EE  0033DD  0033DD  0033DD  0033DD  0033DD  0033DD"; navwhiteVisited = navwhiteVisited.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navwhiteActive  = "FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000"; navwhiteActive  =  navwhiteActive.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navwhitePtext   = "000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000"; navwhitePtext   =   navwhitePtext.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navwhiteBgcolor = "FFFFFF  FFFFFF  FFFFFF  FFFFFF  EEEEEE  FFFFFF  FFFFFF  FFFFFF  FFFFFF  FFFFFF  FFFFFF  FFFFFF"; navwhiteBgcolor = navwhiteBgcolor.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));

   navcolorLink    = "77FF77  EEEEBB  FFFF77  FFFFAA  EEEEBB  EEEEEE  77FF77  77FF77  77FF77  77FF77  77FF77  77FF77"; navcolorLink    =    navcolorLink.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navcolorVisited = "77FF77  EEEEBB  FFFF77  FFFFAA  EEEEBB  EEEEEE  77FF77  77FF77  77FF77  77FF77  77FF77  77FF77"; navcolorVisited = navcolorVisited.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navcolorActive  = "FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000  FF0000"; navcolorActive  =  navcolorActive.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navcolorPtext   = "000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000  000000"; navcolorPtext   =   navcolorPtext.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
   navcolorBgcolor = "002277  882222  226622  CC4400  445544  337777  002277  002277  002277  002277  002277  002277"; navcolorBgcolor = navcolorBgcolor.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));

   navtableWrap    = "666666  666666  666666  666666  666666  666666  666666  666666  666666  666666  666666  666666"; navtableWrap    =    navtableWrap.substring((colIndex-1)*8,((colIndex-1)*8)+(6*1));
}



/*  Get depth and Reusable PiecesParts
===================================================================*/
function getDepth()
{
   // add depth for relative links
   // for example... makapage = 0, makapage/dafonts = 1, makapage/dafonts/otherstuff = 2
   if (DepthOfPage == 0) { depth = ""; depth2 = "../other/"; depth3 = "../"; }
   if (DepthOfPage == 1) { depth = "../"; depth2 = "../../other/"; depth3 = "../"; }
   if (DepthOfPage == 2) { depth = "../../"; depth2 = "../../../other/"; depth3 = "../"; }
   if (DepthOfPage == 3) { depth = "../../../"; depth2 = "../../../../other/"; depth3 = "../"; }
   if (DepthOfPage == 4) { depth = "../../../../"; depth2 = "../../../../../other/"; depth3 = "../"; }
   if (DepthOfPage == 5) { depth = "../../../../../"; depth2 = "../../../../../../other/"; depth3 = "../"; }

   // special provision for anything directly in the webtutor folder
   if ((PathAndPage == "tutor_readme")||(PathAndPage == "donationware")||(PathAndPage == "printversion")) { depth2 = "other/"; depth3 = ""; }

}



function makapagePiecesParts()
{
   piecesParts = new Array(
      "<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"100%\"> ",
      "<TR ALIGN=\"center\"> ",
      "<TD><P CLASS=\"navwhite\"><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\">Lessons:<BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "index.html\">Intro</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson01.html\">1</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson02.html\">2</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson03.html\">3</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson04.html\">4</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson05.html\">5</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson06.html\">6</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson07.html\">7</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson08.html\">8</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson09.html\">9</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson10.html\">10</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson11.html\">11</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson12.html\">12</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson13.html\">13</A><BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson14.html\">14</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson15.html\">15</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson16.html\">16</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson17.html\">17</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson18.html\">18</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson19.html\">19</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson20.html\">20</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson21.html\">21</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson22.html\">22</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson23.html\">23</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson24.html\">24</A>",
      "</FONT></P></TD> ",
      "<TD><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\"><A CLASS=\"navwhite\" HREF=\"" + depth + "quik-index.html\">Index and<BR>Quick Reference</A></FONT></TD> ",
      "</TR> ",
      "</TABLE>"
      );
   assemblePiecesParts();
}


function tablesPiecesParts()
{
   piecesParts = new Array(
      "<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"100%\"> ",
      "<TR ALIGN=\"center\"> ",
      "<TD><P CLASS=\"navwhite\"><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\">Lessons:<BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "index.html\">Intro</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson01.html\">1</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson02.html\">2</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson03.html\">3</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson04.html\">4</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson05.html\">5</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson06.html\">6</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson07.html\">7</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson08.html\">8</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson09.html\">9</A><BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson10.html\">10</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson11.html\">11</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson12.html\">12</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson13.html\">13</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson14.html\">14</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson15.html\">15</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson16.html\">16</A>",
      "</FONT></P></TD> ",
      "<TD><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\"><A CLASS=\"navwhite\" HREF=\"" + depth + "quik-index.html\">Quick<BR>Reference</A></FONT></TD> ",
      "</TR> ",
      "</TABLE>"
      );
   assemblePiecesParts();
}

function formsPiecesParts()
{
   piecesParts = new Array(
      "<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"100%\"> ",
      "<TR ALIGN=\"center\"> ",
      "<TD><P CLASS=\"navwhite\"><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\">Lessons:<BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "index.html\">Intro</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson01.html\">1</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson02.html\">2</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson03.html\">3</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson04.html\">4</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson05.html\">5</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson06.html\">6</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson07.html\">7</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson08.html\">8</A><BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson09.html\">9</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson10.html\">10</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson11.html\">11</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson12.html\">12</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson13.html\">13</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson14.html\">14</A>",
      "</FONT></P></TD> ",
      "<TD><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\"><A CLASS=\"navwhite\" HREF=\"" + depth + "quik-index.html\">Quick<BR>Reference</A></FONT></TD> ",
      "</TR> ",
      "</TABLE>"
      );
   assemblePiecesParts();
}


function framesPiecesParts()
{
   piecesParts = new Array(
      "<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"100%\"> ",
      "<TR ALIGN=\"center\"> ",
      "<TD><P CLASS=\"navwhite\"><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\">Lessons:<BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "index.html\">Intro</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson01.html\">1</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson02.html\">2</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson03.html\">3</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson04.html\">4</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson05.html\">5</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson06.html\">6</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson07.html\">7</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson08.html\">8</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson09.html\">9</A><BR>",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson10.html\">10</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson11.html\">11</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson12.html\">12</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson13.html\">13</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson14.html\">14</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson15.html\">15</A> - ",
        "<A CLASS=\"navwhite\" HREF=\"" + depth + "lesson16.html\">16</A>",
      "</FONT></P></TD> ",
      "<TD><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\"><A CLASS=\"navwhite\" HREF=\"" + depth + "templates/main.html\">Templates</A></FONT></TD> ",
      "</TR> ",
      "</TABLE>"
      );
   assemblePiecesParts();
}

function otherPiecesParts()
{
   piecesParts = new Array(
      "<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"100%\">",
      "<TR ALIGN=\"center\">",
      "<TD><P CLASS=\"navwhite\"><FONT SIZE=\"-2\" FACE=\"verdana,arial,helvetica\">",
      "  <A CLASS=\"navwhite\" HREF=\"" + depth + depth3 + "makapage/index.html\">So, you want to make a Web Page!</A><BR>",
      "  <A CLASS=\"navwhite\" HREF=\"" + depth + depth3 + "tables/index.html\">Table Tutor</A> - ",
      "  <A CLASS=\"navwhite\" HREF=\"" + depth + depth3 + "forms/index.html\">Form Tutor</A> - ",
      "  <A CLASS=\"navwhite\" HREF=\"" + depth + depth3 + "frames/index.html\">Frames Tutor</A>",
      "</FONT></P></TD>",
      "</TR>",
      "</TABLE>"
      );
   assemblePiecesParts();
}

// Sorry about all the "depths". Things started getting hairy and I found
// myself putting out a bunch of little fires. Hey, it works.

/*  Assemble the above PiecesParts
===================================================================*/
function assemblePiecesParts()
{
   assembledParts = "";
   for (var i = 0; i < piecesParts.length; i++) { assembledParts = assembledParts + piecesParts[i]; }
}



/*  Put together nav info based on NavType. There can be up to 12.
===================================================================*/
function getNavInfo()
{
   getDepth();

   if (NavType == "makapage")
   {
      colorMatrix(1);
      makapagePiecesParts();
      generalDesc = "So, you want to make a Web Page!";
      spaceDashspace = " - ";
   }

   if (NavType == "tables")
   {
      colorMatrix(2);
      tablesPiecesParts();
      generalDesc = "Table Tutor";
      spaceDashspace = " - ";
   }

   if (NavType == "forms")
   {
      colorMatrix(3);
      formsPiecesParts();
      generalDesc = "Form Tutor";
      spaceDashspace = " - ";
   }

   if (NavType == "frames")
   {
      colorMatrix(4);
      framesPiecesParts();
      generalDesc = "Frames Tutor";
      spaceDashspace = " - ";
   }

   if (NavType == "other")
   {
      colorMatrix(5);
      otherPiecesParts();
      //spaceDashspace = "";
   }


}


/*  Function to write the style sheet
===================================================================*/
function writeStyleSheet()
{
   document.writeln("<ST"+"YLE TYPE=\"text/css\" TITLE=\"NavTable\"><!--");

   document.writeln("a.prevnext:link    {color:" + prevnextLink + "; text-decoration:none}");
   document.writeln("a.prevnext:visited {color:" + prevnextVisited + "; text-decoration:none}");
   document.writeln("a.prevnext:active  {color:" + prevnextActive + "; text-decoration:none}");
   document.writeln("p.prevnext         {color:" + prevnextPtext + "}");

   document.writeln("p.titlebar         {color:" + titlebarPtext + "}");
   document.writeln("tr.titlebar        {background-color:" + titlebarBgcolor + "}");

   document.writeln("a.navwhite:link    {color:" + navwhiteLink + "; text-decoration:none}");
   document.writeln("a.navwhite:visited {color:" + navwhiteVisited + "; text-decoration:none}");
   document.writeln("a.navwhite:active  {color:" + navwhiteActive + "; text-decoration:none}");
   document.writeln("p.navwhite         {color:" + navwhitePtext + "}");
   document.writeln("tr.navwhite        {background-color:" + navwhiteBgcolor + "}");

   document.writeln("a.navcolor:link    {color:" + navcolorLink + "; text-decoration:none}");
   document.writeln("a.navcolor:visited {color:" + navcolorVisited + "; text-decoration:none}");
   document.writeln("a.navcolor:active  {color:" + navcolorActive + "; text-decoration:none}");
   document.writeln("p.navcolor         {color:" + navcolorPtext + "}");
   document.writeln("tr.navcolor        {background-color:" + navcolorBgcolor + "}");

   document.writeln("table.navtable     {background-color:" + navtableWrap + "}");

   document.writeln("//--></ST"+"YLE>");
}


function startNavProcess()
{
   getNavInfo();

   prevArrow = "\&lt\;-- Back";
   nextArrow = "Next --\&gt\;";
   if(nextDocName == "") { nextArrow = ""; }
   if(prevDocName == "") { prevArrow = ""; }

   writeStyleSheet();

   // upper ad
   if(runads == 1) { document.write("<P ALIGN=\"center\"><SCR"+"IPT language=\"JavaScr"+"ipt\" SRC=\"http://junior.apk.net/~jbarta/wtads_top.js\"></SCR"+"IPT></P>"); }
}


/*  Gather and process all navigation variables/information
===================================================================*/
startNavProcess();
