/************************************************
 * topnav.js
 ************************************************/

   function printMenu( addon )
   {
     //document.write('<h2>' + addon + '</h2>');
     document.write('<p>This is a ' + addon + ' paragraph</p>');
   }

//   <td style="width: 950px; height: 28px; background-color: rgb(0, 0, 102);">  \
// style="font-weight:bold; color: #FFFFFF; "
//<style type="text/css"> \
//a { text-decoration:none;font-weight:bold; background-color:#f0f0f0 } \
//</style> \

   menubarHead = '   \
   <div style="font-family: Helvetica,Arial,sans-serif; text-align: left; font-size: 20pt; ">  \
   <center> <table border="0"> <tr> \
   <td> \
   <p align="center"> \
   <b><font size="2">'

   // removed font-size:small;
   //    caused font to be too bigger and not fit topnav bar in IE
   //
   var menubar = [];
   menubar[0] = '   \
      <a href="index.htm" \
         id="home"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102);" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         HOME</a>'
   menubar[1] = '   \
      <a href="info.html" \
         id="info"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         CLUB INFO</a>'
   menubar[2] = '   \
      <a href="calendar.html" \
         id="calendar"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102);" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         CALENDAR</a>'
   menubar[3] = '   \
      <a href="racing.html" \
         id="racing"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         RACE INFO</a>'
   menubar[4] = '   \
      <a href="results.html" \
         id="results"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         RESULTS</a>'
   menubar[5] = '   \
      <a href="track.html" \
         id="track"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         OUR TRACK</a>'
   menubar[6] = '   \
      <a href="archive2011.html" \
         id="archive"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         ARCHIVE</a>'
   menubar[7] = '   \
      <a href="photo.html" \
         id="photo"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         PHOTOS</a>'
   menubar[8] = '   \
      <a href="newsletter.html" \
         id="newsletter"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         NEWSLETTER</a>'
   menubar[9] = '   \
      <a href="links.html" \
         id="links"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         LINKS</a>'
   menubar[10] = '   \
      <a href="contact.html" \
         id="contact"  \
         style="font-weight:bold; color: #FFFFFF; background-color:rgb(0,0,102)" \
         onMouseover="this.style.color=\'yellow\'" onmouseout="this.style.color=\'#FFFFFF\'"  > \
         CONTACT US</a>'

   menubarTail = '   \
   </font></b>  \
   </p>  \
</td>  \
</tr> </table> </center>  \
</div>';

   function topMenu( flag )
   {
      //alert("topMENU '" + flag + "' :" + menubar.length + ":" + document.links.length);
      
      document.write( menubarHead );

      for ( i=0; i<menubar.length; i++) {
         document.write( menubar[i] );
         if ( i < menubar.length-1 )
            document.write( '<font color="#ffffff" size="2">&nbsp;&middot;&nbsp;</font>' );
      }

      document.write( menubarTail );
  
      //var shref = document.getElementById(flag).href;
      var shref = document.getElementById(flag).style.background;
      //alert("topMENU '" + shref + "' :" );
      //document.getElementById(flag).style.color = "#404040";
      //document.getElementById(flag).style.background = "#aa4400";
      document.getElementById(flag).style.background = "#5050b0";
      document.getElementById(flag).style.textDecoration = "overline";

      
   }


