function writeIntro()
{
   // Write HTML for splash page Flash show.
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" id=\"intro\" width="523" height="375">\n');
   document.write('<param name="movie" value=\".\/flash\/intro.swf\">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="bgcolor" value="#000000">\n');
   document.write('<param name="allowScriptAccess" value="sameDomain">\n');

    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
   {
      document.write('<embed name=\"intro\" src=\".\/flash\/intro.swf\" quality="high" bgcolor="#000000" swLiveConnect="true" allowScriptAccess="sameDomain" width="523" height="375" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
      document.write('</embed>\n');
    }
   document.write('</object>\n');
}

function writeHeader()
{
   // Generate and normalize a random number between 1 and 5.

   var first = 1;
   var last = 5;
   var random = Math.round(Math.random() * (last - first)) + first;
   var str_random = random.toString();

   // Construct file name and id attribute from random number.
   var filename = "header" + str_random + ".swf";
   var objectid = "header" + str_random; 

   // Write HTML for header Flash.
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" id=\"' + objectid + '\" width="400" height="66">\n');
   document.write('<param name="movie" value=\".\/flash\/' + filename + '\">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="bgcolor" value="#000000">\n');
   document.write('<param name="allowScriptAccess" value="sameDomain">\n');

    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
   {
      document.write('<embed name=\"' + objectid + '\" src=\".\/flash\/' + filename + '\" quality="high" bgcolor="#000000" swLiveConnect="true" allowScriptAccess="sameDomain" width="400" height="66" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
      document.write('</embed>\n');
    } else {
      document.write('<img src=".\/images\/h_non-flash.gif" width="400" height="66">');
    }
   document.write('</object>\n');
}


function writeLink(thislink, pagetitle)
{

   // Construct file name passed variable.
   var filename = "b_" + thislink + ".swf";
   var htmlname = thislink + ".html";
  
   // Write HTML for header Flash.
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" id=\"' + thislink + '\" width="160" height="20">\n');
   document.write('<param name="movie" value=\".\/flash\/' + filename + '\">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="bgcolor" value="#000000">\n');
   document.write('<param name="allowScriptAccess" value="sameDomain">\n');

    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
   {
      document.write('<embed name=\"' + thislink + '\" src=\".\/flash\/' + filename + '\" quality="high" bgcolor="#000000" swLiveConnect="true" allowScriptAccess="sameDomain" width="160" height="20" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
      document.write('</embed>\n');
    } else 
   {
      document.write('<a href="' + htmlname + '">' + pagetitle + '</a>');
    }
   document.write('</object>\n');
}


function writeBikes()
{
   // Write HTML for Used (Pre-owned) Inventory slideshow.
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" id=\"used_inventory\" width="450" height="515">\n');
   document.write('<param name="movie" value=\".\/flash\/used_inventory.swf\">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="bgcolor" value="#000000">\n');
   document.write('<param name="allowScriptAccess" value="sameDomain">\n');

    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
   {
      document.write('<embed name=\"used_inventory\" src=\".\/flash\/used_inventory.swf\" quality="high" bgcolor="#000000" swLiveConnect="true" allowScriptAccess="sameDomain" width="450" height="515" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
      document.write('</embed>\n');
    } else {
      document.write('<img src=".\/images\/used_inventory\/ui1.jpg" width="400" height="300"><br>\n');
      document.write('<img src=".\/images\/used_inventory\/ui2.jpg" width="400" height="300"><br>\n');
      document.write('<img src=".\/images\/used_inventory\/ui3.jpg" width="400" height="300"><br>\n');
//      document.write('<img src=".\/images\/used_inventory\/ui4.jpg" width="400" height="300"><br>\n');
//      document.write('<img src=".\/images\/used_inventory\/ui5.jpg" width="400" height="300"><br>\n');
//      document.write('<img src=".\/images\/used_inventory\/ui6.jpg" width="400" height="300"><br>\n');
    }
   document.write('</object>\n');
}


function writeAbout()
{
   // Write HTML for Showroom and Staff Tour slideshow.
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" id=\"about_us\" width="450" height="515">\n');
   document.write('<param name="movie" value=\".\/flash\/about_us.swf\">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="bgcolor" value="#000000">\n');
   document.write('<param name="allowScriptAccess" value="sameDomain">\n');

    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
   {
      document.write('<embed name=\"about_us\" src=\".\/flash\/about_us.swf\" quality="high" bgcolor="#000000" swLiveConnect="true" allowScriptAccess="sameDomain" width="450" height="515" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
      document.write('</embed>\n');
    } else {
      document.write('Showroom and Staff Tours unavailable. Flash not installed.\n');
    }
   document.write('</object>\n');
}