var ListSize = 0;
var ListHead = 0;
var ListTail = 0;

// This function defines a segment entry in the list
// When created, it adds
function listEntry(mile, flags, terrain, traffic, scenery, name, path, file, info)
{
  this.mile     = mile;
  this.flags    = flags;
  this.name     = name;
  this.path     = path;
  this.file     = file;
  this.terrain  = terrain;
  this.traffic  = traffic;
  this.scenery  = scenery;
  this.info     = info;
  this.next     = 0;
  if (0 == ListHead) { ListHead      = this; }
  else               { ListTail.next = this; }
  ListTail = this;
  ListSize = ListSize + 1;
}
function displayWarning()
{
document.write("<p>");
//document.write("<table border='2' bgcolor='#FFFF80' style='font-size: x-small; font-family: sans-serif;'>");
document.write("<table border='2' bgcolor='#FFFF80'>");
document.write("<TR><TD><p><B><FONT COLOR='#CC0000'>WARNING!!!</FONT></B> ");
document.write("<font size='-1'>Bicycling can be a dangerous activity.  You are free to follow these ");
document.write("directions at your own risk. However, the administrators of this web site ");
document.write("can not be held responsible for any injuries, death, or damages while following these ");
document.write("suggested bicycle routes. Many route descriptions may be vague and most certainly do not ");
document.write("list all possible hazards. Also, many routes require on street riding in traffic lanes, ");
document.write("while others may require some off road terrain. You should be comfortable riding under ");
document.write("all types of conditions before attempting any of these routes.</font></p></TD></TR></TABLE>");
};


function displayTable(mask)
{
  // Display outer table (for Netscape background color workaround)
  document.write( "<table border='2' bgcolor='#ECEDD3'><tr><td>" );
  //Display inner table
  document.write( "<table>" );
  document.write( "<tr><th>Miles</th><th>Name</th><th colspan='3'>Info</th>");
  var current  = ListHead;
  do
  {
      if (current.flags & mask)
      {
          document.write( "<tr><td align='center'>", current.mile);
          document.write( "</td><td align='center'>");
          // urlString = new String(current.url);
          if (current.path != "")
          {
            document.write("<a href='",current.path,"/",current.file,"'>");
          }
          document.write( current.name );
          if (current.path != "") document.write("</a>");
          document.write( "</td><td colspan='3' align='left'>", current.info);
          if (current.flags & 0x002)
          {
              document.write( " <font color='Red'><i>(Unpaved&nbsp;Sections)</i></font>");
          }
          document.write( "</td><td rowspan='2' align='center'>");
          document.write( "<img src='",current.path,"/locator.gif' width='151' height='99' border='0'>");
          document.write( "</td></tr>");
          document.write( "<tr><td></td><td align='center'>");
          if (current.flags & 0x100)
          {
              document.write( " <IMG src='../img/new.gif' width='37' height='11' border='0'>");
          }
          document.write( "</td><td><b>Terrain:</b> ", current.terrain);
          document.write( "</td><td><b>Traffic:</b> ", current.traffic);
          document.write( "</td><td><b>Scenery:</b> ", current.scenery);
          document.write( "</td></tr><tr><td colspan='6'><hr></td></tr>");
      }
    current = current.next;
  } while (current != 0);
  // Close Inner Table
  document.write( "</table>");
  // Close Outer Table
  document.write( "</td></tr></table>");
}

// 0x001 = trail segment
// 0x002 = unpaved segment
// 0x004 = Best Ride
// 0x008 = After Work
// 0x010 = Urban Escape
// 0x020 = Invasion Route
// 0x040 = On Road Route
// 0x100 = New Route
new listEntry ( 10 , 0x009, 1, 2, 2, "Potomac Tour",   "potomac", "potomac.htm", "<i>D.C.</i> - A nice short tour of the downtown waterfront");
new listEntry ( 11 , 0x009, 2, 1, 3, "BWI Trail",      "bwi", "index.htm", "<i>Glen Burnie</i> - Paved trail around BWI Airport");
new listEntry ( 12 , 0x00A, 3, 3, 3, "Airpark Cruise", "airpark", "airpark.htm", "<i>Gaithersburg</i> - Short workout route around Montgomery County Airpark.");
new listEntry ( 13 , 0x009, 3, 3, 2, "Seneca Valley Tour", "seneca", "index.htm", "<i>Germantown</i> - A short workout route around Great Seneca State Park.");
new listEntry ( 14 , 0x00B, 2, 3, 2, "For The Boyds",  "boyds", "boyds.htm", "<i>Germantown</i> - A short workout route through Boyds and Black Hills State Park.");
new listEntry ( 16 , 0x00B, 3, 3, 2, "Key Chain Tour",  "keychain", "keychain.htm", "<i>Arlington</i> - Nice short ride out the C&amp;O Towpath and back using the W&amp;OD and Custis Trails.");
new listEntry ( 17 , 0x009, 2, 2, 3, "The Arlington Triangle",  "triangle", "triangle.htm", "<i>Arlington</i> - Park your car at Roosevelt Island on your way home and cruise around Arlington.");
new listEntry ( 18 , 0x009, 2, 4, 4, "Cascade Effect",  "cascade", "cascade.htm", "<i>Sterling</i> - Short loop around the Sterling, Va area. Pretty much all suburban terrain.");
new listEntry ( 18 , 0x005, 2, 1, 1, "Mount Vernon Trail",  "../trails/vernon", "vernon.htm", "<i>Washington/Mount Vernon</i> - Wonderful bike trail along the Potomac River to visit George Washington's Estate.  Complete round trip is 36 miles.");
new listEntry ( 19 , 0x050, 3, 3, 1, "Gettysburg Tour",  "Gettysburg", "index.htm", "<i>Gettysburg, PA</i> - A great ride around the famous Civil War Battlefield.");
new listEntry ( 20 , 0x007, 1, 2, 2, "The Zoo Review",  "zoo", "zoo.htm", "<i>Georgetown/Bethesda</i> - An excellent weekend ride around Northwest D.C. with an optional stop at the National Zoo.");
new listEntry ( 21 , 0x013, 3, 2, 1, "Antietam Battlefield Tour",  "antietam", "index.htm", "<i>Sharpsburg, MD</i> - A nice ride through the battlefield and then up the C&O Canal along the Potomac.");
new listEntry ( 23 , 0x050, 3, 2, 1, "Thurmont Ramble",  "thurmont", "thurmont.htm", "<i>Thurmont, MD</i> - Very nice tour of the valley at the foot of the Catoctin Mountains.");
new listEntry ( 23 , 0x050, 1, 2, 2, "Wye Not",  "WyeNot", "index.htm", "<i>Wye Mills, MD (Eastern Shore)</i> - An easy ride to break up your drive to the beaches. ");
new listEntry ( 24 , 0x003, 2, 3, 2, "Lost Blossom Tour",  "blossom", "index.htm", "<i>Northwest DC</i> - Tour some lesser known Cherry Blossom groves around Northwest DC. ");
new listEntry ( 25 , 0x050, 2, 3, 2, "Patuxent Wildlife Center Loop",  "pax", "index.htm", "<i>Greenbelt MD</i> - Popular Ride from Greenbelt Metro Station to the Wildlife Center");
new listEntry ( 25 , 0x012, 2, 2, 2, "Western Montgomery Loop",  "westmc", "westmc.htm", "<i>Poolesville, MD</i> - Nice easy tour of Western Montgomery County, MD and C&O Towpath.");
new listEntry ( 25 , 0x050, 3, 2, 1, "Peach Tree Loop",  "peachtree", "index.htm", "<i>Poolesville, MD</i> - Open road tour of various orchards in Western Montgomery County, MD");
new listEntry ( 26 , 0x054, 1, 2, 1, "Oxford Loop",  "oxford", "index.htm", "<i>Easton, MD</i> - Excellent loop ride on the Eastern Shore.");
new listEntry ( 27 , 0x007, 1, 1, 2, "A Ride to the Falls",  "falls", "index.htm", "<i>Georgetown</i> - A very popular ride out to Great Falls. A great picnic ride!");
new listEntry ( 27 , 0x009, 3, 3, 3, "Montgomery Lake Tour",  "lakes", "lakes.htm", "<i>Gaithersburg</i> - This quick jaunt around Gaithersburg is good if you only have a few hours to goof-off. Mostly uses side trails, with limited on-road action.");
new listEntry ( 27 , 0x052, 3, 1, 1, "Shenandoah River Ramble",  "shenandoah", "index.htm", "<i>Berryville</i> - A beautiful ride way, way out in the countyside, but worth it!");
new listEntry ( 30 , 0x003, 2, 3, 3, "The Great Washington Loop",  "dcloop", "dcloop.htm", "<i>D.C.</i> - A great tour of Washington's varied neighborhoods.");
new listEntry ( 33 , 0x060, 3, 4, 3, "Chesapeake Bound",  "chesapeake", "index.htm", "<i>Eastern Suburbs</i> - A fairly direct route to the Chesapeake Bay, via Annapolis, starting from New Carrollton.");
new listEntry ( 34 , 0x017, 3, 3, 1, "Waterford Double-Cross",  "doublex", "doublex.htm", "<i>Whites Ferry, MD</i> - Crosses the Potomac River twice (at Whites Ferry and Point-of-Rocks) with a stop in historic Waterford, VA. No skinny tires for this one.");
new listEntry ( 37 , 0x011, 4, 2, 1, "South Mountain Loop",  "south", "index.htm", "<i>Brunswick, MD</i> - A great ride around historic South Mountain, but watch out for the Blair Witch!");
new listEntry ( 38 , 0x050, 3, 3, 1, "Mason-Dixon Double-Cross",  "MasonDixon", "index.htm", "<i>Hagerstown, MD</i> - A beautiful ride through the Cumberland Valley.");
new listEntry ( 38 , 0x061, 3, 3, 3, "Greenbelt to Bay",  "greentobay", "index.htm", "<i>Eastern Suburbs</i> - A more &quot;bike friendlier&quot; route to the Chesapeake Bay, starting from Greenbelt.");
new listEntry ( 40 , 0x036, 1, 1, 1, "Northern Central Rail Trail",  "../trails/ncr", "ncr.htm", "<i>Ashland/York</i> - Excellent rail trail between Baltimore's northern suburbs and York, PA.  Up to 80 miles round trip.");
new listEntry ( 44 , 0x003, 3, 4, 2, "Little Fletcher",  "fletch2", "index.htm", "<i>Georgetown/Rockville</i> - A shorter version of the Fletcher Loop");
new listEntry ( 45 , 0x029, 1, 2, 1, "W&amp;OD Rail Trail",  "../trails/wad", "wad.htm", "<i>Washington/Purcellville</i> - A great rail trail through Northern Virginia.  Up to 90 miles round trip.");
new listEntry ( 46 , 0x050, 3, 2, 1, "North to Gettysburg",  "getty", "getty.htm", "<i>Thurmont, MD</i> - Great loop out to Gettysburg Battlefield and back.");
new listEntry ( 47 , 0x021, 3, 3, 3, "Washington to Baltimore",  "dc2balt", "index.htm", "<i>North Eastern Suburbs</i> - The often requested route. Round trip is nearly 100 miles. Spend the night at Baltimore's Inner Harbor and make this a great weekend ride.");
new listEntry ( 50 , 0x011, 4, 2, 1, "Sugarloaf Challenge Loop",  "loaf", "loaf.htm", "<i>Poolesville, MD</i> - Great tour of area around Sugarloaf Mountain. Hilly, but worth it.");
new listEntry ( 55 , 0x003, 2, 3, 2, "The Fletcher Loop",  "fletch", "fletch.htm", "<i>Georgetown/Gaithersburg</i> - A great route from Gaithersburg to Fletcher's Boathouse. On this trip you will use the Rock Creek Trail, the Capital Crescent Trail, and the C&O Towpath.");
new listEntry ( 56 , 0x054, 5, 3, 1, "The Blue Ridge Challenge",  "bluerdg", "index.htm", "<i>Marshall, VA</i> - They don't come much tougher than this one!");
new listEntry ( 67 , 0x061, 3, 4, 2, "DC to Thurmont",  "dc2thurmont", "index.htm", "<i>Northern Suburbs</i> - A &quot;no nonsense&quot; route to the north.");
new listEntry ( 72 , 0x001, 3, 3, 3, "Super Nova",  "supernova", "index.htm", "<i>Northern Virginia</i> - This challenging route shows the best and worst of Northern Virginia.");
new listEntry ( 75 , 0x007, 1, 3, 2, "The WODCO Loop",  "wodco", "wodco.htm", "<i>Western Suburbs</i> - This monster trail is real easy (nearly all flat!). It uses two of the most popular bike trails in the area.");
new listEntry ( 80 , 0x041, 3, 4, 2, "Tour Between Cities",  "cities", "index.htm", "<i>Northeast Suburbs</i> - A great route between Greenbelt, BWI, and Annapolis.");
new listEntry (104 , 0x003, 2, 3, 2, "Tkaczyk's All Terrain Century",  "century", "century.htm", "<i>Western Suburbs</i> - An even longer version of the WODCO loop! Uses many of the area's bike trails.");
new listEntry (105 , 0x050, 5, 4, 1, "Skyline Drive",  "skyline", "index.htm", "<i>Front Royal, VA</i> - Very tough ride through Shenandoah National Park.");
new listEntry (106 , 0x060, 2, 3, 1, "Bay-to-Beach",  "beach", "index.htm", "<i>Kent Island, MD</i> - Bike to the beach and leave the car at home.");
new listEntry (184 , 0x026, 1, 1, 1, "C&amp;O Towpath",  "../canal", "index.htm", "<i>Washington/Cumberland</i> - One of the best off-road bike trails in the US.");

