
		//<![CDATA[
		var map;
		var icon0;
		var newpoints = new Array();
		 
		function addLoadEvent(func) { 
			var oldonload = window.onload; 
			if (typeof window.onload != 'function'){ 
				window.onload = func
			} else { 
				window.onload = function() {
					oldonload();
					func();
				}
			}
		}
		 
		addLoadEvent(loadMap);
		addLoadEvent(addPoints);
		 
		function loadMap() {
			map = new GMap2(document.getElementById("map"));
			map.addControl(new GLargeMapControl());
			map.addControl(new GMapTypeControl());
		
			map.setCenter(new GLatLng(38.8225909761771, -98.7890625), 4, G_PHYSICAL_MAP);
		 
			icon0 = new GIcon();
			icon0.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/biking.png";
			icon0.iconSize = new GSize(32, 32);
			icon0.iconAnchor = new GPoint(9, 34);
			icon0.infoWindowAnchor = new GPoint(9, 2);
			icon0.infoShadowAnchor = new GPoint(18, 25);
			
			icon1 = new GIcon();
			icon1.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/hiking.png";
			icon1.iconSize = new GSize(32, 32);
			icon1.iconAnchor = new GPoint(9, 34);
			icon1.infoWindowAnchor = new GPoint(9, 2);
			icon1.infoShadowAnchor = new GPoint(18, 25);
			
			icon2 = new GIcon();
			icon2.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/water.png";
			icon2.iconSize = new GSize(32, 32);
			icon2.iconAnchor = new GPoint(9, 34);
			icon2.infoWindowAnchor = new GPoint(9, 2);
			icon2.infoShadowAnchor = new GPoint(18, 25);
			
			icon3 = new GIcon();
			icon3.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/sailing.png";
			icon3.iconSize = new GSize(32, 32);
			icon3.iconAnchor = new GPoint(9, 34);
			icon3.infoWindowAnchor = new GPoint(9, 2);
			icon3.infoShadowAnchor = new GPoint(18, 25);
		}
		 
		function addPoints() {
		 
		newpoints[0] = new Array(-120.0091552734375, 38.94018471320357, icon1, '1', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/regions/lake-tahoe/">Lake Tahoe</a><br/>The Lake is the most spectacular alpine lake in North America. With 172 miles of hiking on the Tahoe Rim Trail, Kayaking, Sailing, Mountain Biking, Lake Tahoe is an outdoor wonderland.<br/><br/></div>');
		newpoints[1] = new Array(-111.621094, 39.485955, icon0, '2', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/tag/moab/">Moab, Utah</a><br/>Moab could be the greatest place on the planet for mountain biking. Click to see all the trails that have been blazed...<br/><br/></div>');
		newpoints[2] = new Array(-112.07771301269531, 33.33741240611175, icon0, '3', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/regions/arizona/">South Mountain, Phoenix</a><br/>The sights from this mountain is superb. A trip during the day is nice, but seeing the sunset from the summit is even better. And if you dont like the heights of the summit then you arent human...<br/><br/></div>');
		newpoints[3] = new Array(-81.94427490234375, 35.960639809156454, icon2, '4', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/tag/north-carolina/">Linville Falls, North Carolina</a><br/>North Carolina has some of the best kayaking on the East Coast. Linville Falls would be the start of the Linville River, class III and IV rapids.<br/><br/></div>');
		newpoints[4] = new Array(-105.512695, 39.393189, icon0, '5', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/tag/colorado/">Fruita, Colorado</a><br/>Lets get one thing straight: if you have come to Fruita looking for a mellow ride something that offers pleasure without pain, this one is not for you.<br/><br/></div>');
		newpoints[5] = new Array(-122.06634521484375, 44.19205137735955, icon0, '6', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/regions/pacific-northwest/">The Pacific North West</a><br/>You hear people quack on and on about the McKenzie River Trail and you begin to wonder whether any single trail can really be that great. Then you ride the McKenzie River Trail and you realize that, if anything, folks have been downplaying its greatness.<br/><br/></div>');
		newpoints[6] = new Array(-122.431641, 37.220997, icon0, '7', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/downieville-downhill/">Northern California</a><br/>Northern California has some of the most beautiful rides on the planet. From evergreen forests to giant sequoias, sea-side cruisers to high sierra technical rides, you can find it all in Northern California.<br/><br/></div>');
		newpoints[7] = new Array(-116.059570, 33.568251, icon0, '8', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/upper-oil-can-vancouver-bc/">Southern California</a><br/>Growing up in Southern Califonia, I am used to the semi-arid deserts, hills and lower altitude rides. Some of the most challenging singletracks and open roads exist in Southern California.<br/><br/></div>');

		for(var i = 0; i < newpoints.length; i++) {
		 
				var point = new GPoint(newpoints[i][0],newpoints[i][1]);
		 
				//Add overlay to map 
				var popuphtml = newpoints[i][4] ;
				var marker = createMarker(point,newpoints[i][2],popuphtml);
				map.addOverlay(marker);
			}
		}
		 
		function createMarker(point, icon, popuphtml) {
			var marker = new GMarker(point, icon);
			GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowHtml(popuphtml);
			});
			return marker;
		}
		 
		//