/* functions for Standard components of ElevenSmooth pages
 *
 * creates the bottom navigation links and the upper right navigation boxes
 * with the single, shared source code.
 */

			// onMouseOut, restore a links font
function LinkPlain(IdName) {
//   S = document.getElementById(IdName).innerHTML;
//   pos = S.indexOf("silver");
//   if (pos > 0) {
//      S = S.substr(pos+6, S.length);
//      pos=S.indexOf(">");
//      S=S.substr(pos+1,S.length);
//      S=S.substring(0, S.length-11);
//      document.getElementById(IdName).innerHTML = S;
//   }
}



			// onMouseOver, change a links font
function LinkBold(IdName) {
//   S = document.getElementById(IdName).innerHTML;
//   pos = S.indexOf("silver");
//   if(pos < 14) {
//      S = "<B><Font color='silver'>" 
//        +  S
//        + "</font></b>";
//      document.getElementById(IdName).innerHTML = S;
//   }
}


			// Create a link 
			//   Name is used for the mouse events
			//   Destination is the href
                        //   OuterLeft and Right are [] at bottom of page, blank at top
                        //   OuterLeft also holds &nbsp; for indents
                        //   Text is the label
function WriteLink(Name, Destination, OuterLeft, Text, OuterRight) {
   S =  OuterLeft                  //[
      + '<a href="'                //<a href="
      + Destination                //ElevenFAQ.html
      + '" '                       // "
      + 'ID="'                     //ID="
      + Name                       // FAQlink
      + '" '                       // "
      + 'class="navlink" '         // class="navlink"
      + 'onMouseOver="LinkBold('   // onMouseOver="LinkBold(
      + "'" + Name + "');"         // 'FAQlink');
      + '" '                       // "
      + 'onMouseOut="LinkPlain('   // onMouseOut="LinkPlain('
      + "'" + Name + "');"         // 'FAQlink');
      + '"'                        // "
      + ">" + Text + "</a>"        // >FAQ</a>
      + OuterRight                 //]
   document.write(S);
}


                       // function for bottom navigation links
function BottomLk2(PathPrefix) {
   document.write("<br><br><br><center>");
   WriteLink("Homebot",  PathPrefix + "index.html",         "[", "Home",    "]");
   WriteLink("Introbot", PathPrefix + "ElevenIntro.html",   "[", "Intro",   "]");
   WriteLink("Progbot",  PathPrefix + "Progress.html",      "[", "Progress","]");
   WriteLink("Planbot",  PathPrefix + "ElevenPlan.html",    "[", "Planner", "]");
   WriteLink("Factbot",  PathPrefix + "ElevenFactors.html", "[", "Factors", "]");
   document.write("<br/>");
   WriteLink("Downbot",  PathPrefix + "ElevenDown.html",    "[", "Download", "]");
   WriteLink("Contactbot",PathPrefix + "ElevenContact.html","[", "Contact",  "]");
   WriteLink("Helpbot",  PathPrefix + "ElevenHelp.html",    "[", "Help",     "]");
   WriteLink("FAQbot",   PathPrefix + "ElevenFAQ.html",     "[", "FAQ",      "]");
   document.write("</center>");
}

function BottomLinks() {
   BottomLk2("");
}
 



                      // function for top navigation links
                      // "Name" indicates current page, which
                      // gets a label without a link
function TopLinks(Name) {
   document.write("<TABLE BORDER=1 CELLPADDING=6 ALIGN=RIGHT><TR><TD ALIGN=LEFT>");
   if(Name=="Introtop") {
      document.write("<FONT COLOR=#990000>Introduction</FONT>");
   } else {
      WriteLink("Introtop", "ElevenIntro.html",   "", "Introduction",   "");
   }
   document.write("<br/>");

   if(Name=="Hometop") {
      document.write("<FONT COLOR=#990000>News</FONT>");
   } else {
      WriteLink("Hometop",  "index.html",         "", "News",    "");
   }
   document.write("<br/>");


  if(Name=="Downtop") {
      document.write("<FONT COLOR=#990000>Downloads</FONT>");
   } else {
      WriteLink("Downtop",  "ElevenDown.html",    "", "Downloads","");
   }
   document.write("<br/>");

  if(Name=="FAQtop") {
      document.write("<FONT COLOR=#990000>FAQ</FONT>");
   } else {
      WriteLink("FAQtop",   "ElevenFAQ.html",     "", "FAQ",      "");
   }
   document.write("<br/>");

  if(Name=="Facttop") {
      document.write("<FONT COLOR=#990000>Factors</FONT>");
   } else {
      WriteLink("Facttop",  "ElevenFactors.html", "", "Factors", "");
   }
   document.write("<br/>");

  if(Name=="Progtop") {
      document.write("&nbsp; &nbsp; <FONT COLOR=#990000>Progress</FONT><br/>");
   } else if ((Name=="Facttop") || (Name=="Plantop")) {
      WriteLink("Progtop",  "Progress.html",    "&nbsp; &nbsp; ", "Progress", "");
      document.write("<br/>");
   }

  if(Name=="Plantop") {
      document.write("&nbsp; &nbsp; <FONT COLOR=#990000>Planner</FONT><br/>");
   } else if ((Name=="Facttop") || (Name=="Progtop")) {
      WriteLink("Plantop",  "ElevenPlan.html",    "&nbsp; &nbsp; ", "Planner", "");
      document.write("<br/>");
   }

  if(Name=="Contacttop") {
      document.write("<FONT COLOR=#990000>Contact</FONT>");
   } else {
      WriteLink("Contacttop",  "ElevenContact.html", "", "Contact", "");
   }
   document.write("<br/>");




   WriteLink("Forumtop",  "http://www.mersenneforum.org/forumdisplay.php?s=&forumid=31", "", "Forum", "");
   document.write("<br/>");

  if(Name=="Helptop") {
      document.write("<FONT COLOR=#990000>Help</FONT>");
   } else {
      WriteLink("Helptop",  "ElevenHelp.html",    "", "Help",     "");
   }
 
   document.write("</TD></TR></TABLE>");
}