// JavaScript Document
    //<![CDATA[
  var timeoutID = 0;
  var map;
  var zoom = 10;
  var center_lat = "44.3717";//44.3717	-103.728
  var center_lon = "-103.728";
 
function onLoad()
{
        map = new GMap2(document.getElementById("map"));
	map.enableDoubleClickZoom();
    map.enableScrollWheelZoom();
	map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(center_lat, center_lon), zoom, G_HYBRID_MAP);

	ICOred  =  new GIcon();
	ICOred.image  =  "http://labs.google.com/ridefinder/images/mm_20_red.png";
	ICOred.shadow  =  "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	ICOred.iconSize  =  new GSize(12, 20);
	ICOred.shadowSize  =  new GSize(22, 20);
	ICOred.iconAnchor  =  new GPoint(6, 20);
	ICOred.infoWindowAnchor  =  new GPoint(3, 24);
	
	ICOyellow  =  new GIcon();
	ICOyellow.image  =  "http://labs.google.com/ridefinder/images/mm_20_yellow.png";
	ICOyellow.shadow  =  "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	ICOyellow.iconSize  =  new GSize(12, 20);
	ICOyellow.shadowSize  =  new GSize(22, 20);
	ICOyellow.iconAnchor  =  new GPoint(6, 20);
	ICOyellow.infoWindowAnchor  =  new GPoint(3, 24);
	
	ICOgreen  =  new GIcon();
	ICOgreen.image  =  "http://labs.google.com/ridefinder/images/mm_20_green.png";
	ICOgreen.shadow  =  "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	ICOgreen.iconSize  =  new GSize(12, 20);
	ICOgreen.shadowSize  =  new GSize(22, 20);
	ICOgreen.iconAnchor  =  new GPoint(6, 20);
	ICOgreen.infoWindowAnchor  =  new GPoint(3, 24);
	
	ICOwhite  =  new GIcon();
	ICOwhite.image  =  "http://labs.google.com/ridefinder/images/mm_20_white.png";
	ICOwhite.shadow  =  "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	ICOwhite.iconSize  =  new GSize(12, 20);
	ICOwhite.shadowSize  =  new GSize(22, 20);
	ICOwhite.iconAnchor  =  new GPoint(6, 20);
	ICOwhite.infoWindowAnchor  =  new GPoint(3, 24);
	
	ICObrown  =  new GIcon();
	ICObrown.image  =  "http://labs.google.com/ridefinder/images/mm_20_brown.png";
	ICObrown.shadow  =  "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	ICObrown.iconSize  =  new GSize(12, 20);
	ICObrown.shadowSize  =  new GSize(22, 20);
	ICObrown.iconAnchor  =  new GPoint(6, 20);
	ICObrown.infoWindowAnchor  =  new GPoint(3, 24);

	ICOdbs  =  new GIcon();
	ICOdbs.image  =  "/images/icodbs.png";
	ICOdbs.shadow  =  "/images/icodbs_sh.png";
	ICOdbs.iconSize  =  new GSize(31, 40);
	ICOdbs.shadowSize  =  new GSize(52, 40);
	ICOdbs.iconAnchor  =  new GPoint(16, 40);
	ICOdbs.infoWindowAnchor  =  new GPoint(3, 24);

//PointDBS
   var PointDBS_Text = "<p class='gm_hdr'>Deadwood Bicycles</p><p class='gm_txt'>&nbsp;&nbsp;&nbsp;180 Sherman Street<br />&nbsp;&nbsp;&nbsp;Deadwood, SD 57732<br />&nbsp;&nbsp;&nbsp;605.578.1345<br />&nbsp;&nbsp;&nbsp;DeadwoodBicycles.com<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/rides.html' target='_self'>Deadwood Bicycles Rides Page</a></p>";
   var PointDBS_Lat = 44.37190727;  //44.37190727, -103.72799635
   var PointDBS_Long = -103.72799635;
   var PointDBS = new GMarker(new GLatLng(PointDBS_Lat,PointDBS_Long),ICOdbs);
     GEvent.addListener(PointDBS, "click", function()
{
     PointDBS.openInfoWindowHtml(PointDBS_Text);
});

//Point01
   var Point01_Text = "<p class='gm_hdr'>Deadwood Trailhead - Mickelson Trail</p><p class='gm_txt'><br />The 108.8 Miles of the Mickelson Trail start here.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/mickelson_trail/mickelson_trail.html' target='_self'>Mickelson Trail Page</a></p>";
   var Point01_Lat = 44.3717;
   var Point01_Long = -103.728;
   var Point01 = new GMarker(new GLatLng(Point01_Lat,Point01_Long),ICOgreen);
     GEvent.addListener(Point01, "click", function()
{
     Point01.openInfoWindowHtml(Point01_Text);
});

//Point02
   var Point02_Text = "<p class='gm_hdr'>Old Baldy Trailhead</p><p class='gm_txt'><br />Old Baldy and Rimrock Trailheads<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/old_baldy.html' target='_self'>Old Baldy Page</a></p>";
   var Point02_Lat = 44.342387;
   var Point02_Long = -104.0043;
   var Point02 = new GMarker(new GLatLng(Point02_Lat,Point02_Long),ICOred);
     GEvent.addListener(Point02, "click", function()
{
     Point02.openInfoWindowHtml(Point02_Text);
});

//Point03
   var Point03_Text = "<p class='gm_hdr'>Crow Peak Trailhead</p><p class='gm_txt'><br />Crow Peak<br />A beautiful climb on single track. The view<br />well worth the effort.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/crowpeak.html' target='_self'>Crow Peak</a></p>";
   var Point03_Lat = 44.430899;
   var Point03_Long = -103.967614;
   var Point03 = new GMarker(new GLatLng(Point03_Lat,Point03_Long),ICOred);
     GEvent.addListener(Point03, "click", function()
{
     Point03.openInfoWindowHtml(Point03_Text);
});

//Point04
   var Point04_Text = "<p class='gm_hdr'>Eagle Cliff Entrance 1</p><p class='gm_txt'><br />Eagle Cliff Trail System<br />Predominately a cross-country ski area<br />some entrances are closed during the summer.<br />The trail can be a confusing maze<br />of single and dual track and meadows.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/eaglecliff.html' target='_self'>Eagle Cliff Trails</a></p>";
   var Point04_Lat = 44.2544;
   var Point04_Long = -103.9245;
   var Point04 = new GMarker(new GLatLng(Point04_Lat,Point04_Long),ICOred);
     GEvent.addListener(Point04, "click", function()
{
     Point04.openInfoWindowHtml(Point04_Text);
});

//Point05
   var Point05_Text = "<p class='gm_hdr'>Eagle Cliff Entrance 2</p><p class='gm_txt'><br />Eagle Cliff Trail System<br />Predominately a cross-country ski area<br />some entrances are closed during the summer.<br />The trail can be a confusing maze<br />of single and dual track and meadows.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/eaglecliff.html' target='_self'>Eagle Cliff Trails</a></p>";
   var Point05_Lat = 44.2649;
   var Point05_Long = -103.9179;
   var Point05 = new GMarker(new GLatLng(Point05_Lat,Point05_Long),ICObrown);
     GEvent.addListener(Point05, "click", function()
{
     Point05.openInfoWindowHtml(Point05_Text);
});

//Point06
   var Point06_Text = "<p class='gm_hdr'>Eagle Cliff Entrance 3</p><p class='gm_txt'><br />Eagle Cliff Trail System<br />Predominately a cross-country ski area<br />some entrances are closed during the summer.<br />The trail can be a confusing maze<br />of single and dual track and meadows.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/eaglecliff.html' target='_self'>Eagle Cliff Trails</a></p>";
   var Point06_Lat = 44.2443;
   var Point06_Long = -103.9262;
   var Point06 = new GMarker(new GLatLng(Point06_Lat,Point06_Long),ICObrown);
     GEvent.addListener(Point06, "click", function()
{
     Point06.openInfoWindowHtml(Point06_Text);
});

//Point07
   var Point07_Text = "<p class='gm_hdr'>Eagle Cliff Entrance 4</p><p class='gm_txt'><br />Eagle Cliff Trail System<br />Predominately a cross-country ski area<br />some entrances are closed during the summer.<br />The trail can be a confusing maze<br />of single and dual track and meadows.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/eaglecliff.html' target='_self'>Eagle Cliff Trails</a></p>";
   var Point07_Lat = 44.2311;
   var Point07_Long = -103.9369;
   var Point07 = new GMarker(new GLatLng(Point07_Lat,Point07_Long),ICObrown);
     GEvent.addListener(Point07, "click", function()
{
     Point07.openInfoWindowHtml(Point07_Text);
});

//Point08
   var Point08_Text = "<p class='gm_hdr'>Tinton</p><p class='gm_txt'><br />A beatiful serpentine trail through the northern Black Hills.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/tinton.html' target='_self'>Tinton Page</a></p>";
   var Point08_Lat = 44.47175503;
   var Point08_Long = -103.90023708;
   var Point08 = new GMarker(new GLatLng(Point08_Lat,Point08_Long),ICOred);
     GEvent.addListener(Point08, "click", function()
{
     Point08.openInfoWindowHtml(Point08_Text);
});

//Point09
   var Point09_Text = "<p class='gm_hdr'>Bear Butte Trailhead</p><p class='gm_txt'><br />A  treasured monument to Natives, this geological formation is one of several intrusions of igneous rock in the Black Hills that formed millions of years ago.<br /><a class='gm' href='http://www.sdgfp.info/Parks/Regions/NorthernHills/BearButte.htm' target='_self'>Bear Butte State Park</a><br />&nbsp;<br />For information on this segment use the link and see the Description. <br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point09_Lat = 44.45844;
   var Point09_Long = -103.43543;
   var Point09 = new GMarker(new GLatLng(Point09_Lat,Point09_Long),ICOgreen);
     GEvent.addListener(Point09, "click", function()
{
     Point09.openInfoWindowHtml(Point09_Text);
});

//Point10
   var Point10_Text = "<p class='gm_hdr'>Alkali Creek Trailhead</p><p class='gm_txt'><br />Exit 34 US I-90.  North of the highway, across from the National Cemetery. Turn left, and enter the horseshoe parking area a few hundred yards in.<br />&nbsp;<br />For information on this segment use the link and see the Description.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point10_Lat = 44.3754;
   var Point10_Long = -103.4688;
   var Point10 = new GMarker(new GLatLng(Point10_Lat,Point10_Long),ICOgreen);
     GEvent.addListener(Point10, "click", function()
{
     Point10.openInfoWindowHtml(Point10_Text);
});

//Point11
   var Point11_Text = "<p class='gm_hdr'>Elk Creek Trailhead</p><p class='gm_txt'><br />About 2 miles down Runkle Road, which is near the southern summit of Vanocker Canyon.<br />&nbsp;<br />For information on this segment use the link and see the Description.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point11_Lat = 44.30231;
   var Point11_Long = -103.51597;
   var Point11 = new GMarker(new GLatLng(Point11_Lat,Point11_Long),ICOgreen);
     GEvent.addListener(Point11, "click", function()
{
     Point11.openInfoWindowHtml(Point11_Text);
});

//Point12
   var Point12_Text = "<p class='gm_hdr'>Dalton Trailhead</p><p class='gm_txt'><br />For information on the trail to the north see Description<br />No GPS Data North or South<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point12_Lat = 44.23053;
   var Point12_Long = -103.472;
   var Point12 = new GMarker(new GLatLng(Point12_Lat,Point12_Long),ICOyellow);
     GEvent.addListener(Point12, "click", function()
{
     Point12.openInfoWindowHtml(Point12_Text);
});

//Point13
   var Point13_Text = "<p class='gm_hdr'>Box Elder Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px><br />&nbsp;<br />If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 44.19263<br />Lon: -103.51745<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point13_Lat = 44.19263;
   var Point13_Long = -103.51745;
   var Point13 = new GMarker(new GLatLng(Point13_Lat,Point13_Long),ICOwhite);
     GEvent.addListener(Point13, "click", function()
{
     Point13.openInfoWindowHtml(Point13_Text);
});

//Point14
   var Point14_Text = "<p class='gm_hdr'>Pilot Knob Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 44.14346<br />Lon: -103.55841<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point14_Lat = 44.14346;
   var Point14_Long = -103.55841;
   var Point14 = new GMarker(new GLatLng(Point14_Lat,Point14_Long),ICOwhite);
     GEvent.addListener(Point14, "click", function()
{
     Point14.openInfoWindowHtml(Point14_Text);
});

//Point15
   var Point15_Text = "<p class='gm_hdr'>Deer Creek Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 44.1075<br />Lon: -103.53667<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point15_Lat = 44.1075;
   var Point15_Long = -103.53667;
   var Point15 = new GMarker(new GLatLng(Point15_Lat,Point15_Long),ICOwhite);
     GEvent.addListener(Point15, "click", function()
{
     Point15.openInfoWindowHtml(Point15_Text);
});

//Point16
   var Point16_Text = "<p class='gm_hdr'>Rapid Creek Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 44.0775<br />Lon: -103.48594<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point16_Lat = 44.0775;
   var Point16_Long = -103.48594;
   var Point16 = new GMarker(new GLatLng(Point16_Lat,Point16_Long),ICOwhite);
     GEvent.addListener(Point16, "click", function()
{
     Point16.openInfoWindowHtml(Point16_Text);
});

//Point17
   var Point17_Text = "<p class='gm_hdr'>Brush Creek Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 44.04247<br />Lon: -103.45173<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point17_Lat = 44.04247;
   var Point17_Long = -103.45173;
   var Point17 = new GMarker(new GLatLng(Point17_Lat,Point17_Long),ICOwhite);
     GEvent.addListener(Point17, "click", function()
{
     Point17.openInfoWindowHtml(Point17_Text);
});

//Point18
   var Point18_Text = "<p class='gm_hdr'>Dakota Point Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 43.98508<br />Lon: -103.46071<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point18_Lat = 43.98508;
   var Point18_Long = -103.46071;
   var Point18 = new GMarker(new GLatLng(Point18_Lat,Point18_Long),ICOwhite);
     GEvent.addListener(Point18, "click", function()
{
     Point18.openInfoWindowHtml(Point18_Text);
});

//Point19
   var Point19_Text = "<p class='gm_hdr'>Flume Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 43.96551<br />Lon: -103.46006<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point19_Lat = 43.96551;
   var Point19_Long = -103.46006;
   var Point19 = new GMarker(new GLatLng(Point19_Lat,Point19_Long),ICOwhite);
     GEvent.addListener(Point19, "click", function()
{
     Point19.openInfoWindowHtml(Point19_Text);
});

//Point20
   var Point20_Text = "<p class='gm_hdr'>Samelius Trailhead</p><p class='gm_txt'><br />No Trail Info<br />Est. Date: Unknown.<br /><div style=font-size:9px>If you have trail information<br />for this segment, please<br />contact us at:<br /> velo@DeadwoodBicycles.com</div><br />&nbsp;<br />Lat: 43.92842<br />Lon: -103.48791<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/centennial.html' target='_self'>Centennial Trail</a></p>";
   var Point20_Lat = 43.92842;
   var Point20_Long = -103.48791;
   var Point20 = new GMarker(new GLatLng(Point20_Lat,Point20_Long),ICOwhite);
     GEvent.addListener(Point20, "click", function()
{
     Point20.openInfoWindowHtml(Point20_Text);
});
	 
//Point21
   var Point21_Text = "<p class='gm_hdr'>Lookout</p><p class='gm_txt'><br />Local ride, within city limits of Spearfish. Rideable year round.<br />&nbsp;<br /><a class='gm' href='http://deadwoodbicycles.com/rides/mtn/lookout.html' target='_self'>Lookout</a></p>";
   var Point21_Lat = 44.503974;
   var Point21_Long = -103.841057;
   var Point21 = new GMarker(new GLatLng(Point21_Lat,Point21_Long),ICOred);
     GEvent.addListener(Point21, "click", function()
{
     Point21.openInfoWindowHtml(Point21_Text);
});	 
	map.addOverlay(Point21);

    map.addOverlay(PointDBS);
	map.addOverlay(Point01);
    map.addOverlay(Point02);
    map.addOverlay(Point03);
    map.addOverlay(Point04);
    map.addOverlay(Point05);
    map.addOverlay(Point06);
    map.addOverlay(Point07);
    map.addOverlay(Point08);
    map.addOverlay(Point09);
    map.addOverlay(Point10);
    map.addOverlay(Point11);
    map.addOverlay(Point12);
    map.addOverlay(Point13);
    map.addOverlay(Point14);
    map.addOverlay(Point15);
    map.addOverlay(Point16);
    map.addOverlay(Point17);
    map.addOverlay(Point18);
    map.addOverlay(Point19);
    map.addOverlay(Point20);

// Add DBS Logo
function ctrlLogo() {}

	ctrlLogo.prototype = new GControl();
	ctrlLogo.prototype.initialize = function() {
	var contents = document.createElement("div");
	contents.style.width="120px";			// Fixed Width of the Logo, do not change
	contents.style.height="120px";			// Fixed Height of the Logo, do not change
	contents.innerHTML="<a href='http://deadwoodbicycles.com/rides/rides.html' target='_self'><img src='/images/logo_ctrl.png' alt='Deadwood Bicycles Logo' title='Click for Deadwood Bicycles Ride Page' border='0'></a>";
	document.getElementById('map').appendChild(contents);
	return contents;
      }
	ctrlLogo.prototype.printable=function(){return true};
	ctrlLogo.prototype.selectable=function(){return true};
	ctrlLogo.prototype.getDefaultPosition=function(){
	return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT,new GSize(15,15))
      }

  map.addControl(new ctrlLogo());

}

   //]]>