
		//<![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(39.09329838950983, -120.025634765625), 10, 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);

			icon4 = new GIcon();
			icon4.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/skiing.png";
			icon4.iconSize = new GSize(32, 32);
			icon4.iconAnchor = new GPoint(9, 34);
			icon4.infoWindowAnchor = new GPoint(9, 2);
			icon4.infoShadowAnchor = new GPoint(18, 25);

			icon5 = new GIcon();
			icon5.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/climbing.png";
			icon5.iconSize = new GSize(32, 32);
			icon5.iconAnchor = new GPoint(9, 34);
			icon5.infoWindowAnchor = new GPoint(9, 2);
			icon5.infoShadowAnchor = new GPoint(18, 25);

			icon6 = new GIcon();
			icon6.image = "http://www.trailstv.com/wp-content/themes/revolution_news-30/images/icons/kayaking.png";
			icon6.iconSize = new GSize(32, 32);
			icon6.iconAnchor = new GPoint(9, 34);
			icon6.infoWindowAnchor = new GPoint(9, 2);
			icon6.infoShadowAnchor = new GPoint(18, 25);

		}
		 
		function addPoints() {
		 
		newpoints[0] = new Array(-120.1025390625, 38.96047664397741, icon1, '1', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/vikingsholm-lake-tahoe/">Vikingsholm</a><br/>At the head of Emerald Bay where Eagle Creek wanders into the bay you will find a flat area of land surrounded by waterfalls, cliffs, steep slopes and the emerald waters of the bay.<br/><br/></div>');
		newpoints[1] = new Array(-120.10871887207031, 38.950331404752305, icon1, '2', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/eagle-falls-and-eagle-lake/">Eagle Falls</a><br/>Upper Eagle Falls are nice. Lower Eagle Falls from the road is beautiful. Lower Eagle falls from below are magnificent. Then throw a touch of Emerald Bay and Lake Tahoe and you have got one of the worlds most beautiful days.<br/><br/></div>');
		newpoints[2] = new Array(-119.92881774902344, 39.25020138287805, icon4, '3', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/snowboarding-skiing-at-diamond-peak/">Diamond Peak</a><br/>Located on the North Shore of Lake Tahoe, it is easy to get to, inexpensive and has no lines, well almost no lines. The fact that it is not that busy makes it great fun for everyone, more skiing and snowboarding.<br/><br/></div>');
		newpoints[3] = new Array(-120.03318786621094, 38.83489397530082, icon0, '4', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/big-meadows-lake-tahoe-rim-trail/">Big Meadows</a><br/>This section is moderately strenuous. Most of the trail is gentle up and down terrain or almost level through meadows or open fields.<br/><br/></div>');
		newpoints[4] = new Array(-119.99490737915039, 38.86136495622855, icon0, '5', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/mr-toads-wild-ride-lake-tahoe/">Mr Toads Wild Ride</a><br/>Mr Toads Wild Ride is one of the premier technical trails in the Lake Tahoe area. There are plenty of challenging technical sections with drops and rock gardens.<br/><br/></div>');
		newpoints[5] = new Array(-119.90521430969238, 39.307405653473495, icon1, '6', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/tahoe-meadows-loop-hike-and-bike/">Tahoe Meadows Interpretive Loop</a><br/>Its a hundred degrees in Reno and the mountains look appealing, actually so does that lake on the other side. Along SR 431 that winds around Mount Rose on its way to Incline Village, just past the Mount Rose peak is a small turn off to the left.<br/><br/></div>');
		newpoints[6] = new Array(-120.09017944335938, 38.92282516381189, icon1, '7', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/mt-tallac-hike/">Mt Tallac Hike</a><br/>Incredible views persist along the entire route to the summit of this peak, which dominates the South West shore of Lake Tahoe. The summit affords without question the best panorama in the Tahoe Sierra.<br/><br/></div>');
		newpoints[7] = new Array(-119.89774703979492, 39.313349293917305, icon1, '8', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/mt-rose-meadows-hike/">Hike Mt Rose Meadows</a><br/>If you are planning a trip to Mount Rose, you have come to the right place as most guides will tell you to park at the house on the North side of Hwy 431 and follow the Tahoe Rim Trail to the Mount Rose Trail.<br/><br/></div>');
		newpoints[8] = new Array(-119.9311351776123, 39.20083267063286, icon6, '9', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/kayaking-in-lake-tahoe/">Kayaking in Lake Tahoe</a><br/>Lake Tahoe has a tremendous amount of beauty just driving around. Imagine quietly paddling from Sand Harbor on the north east shore of Tahoe, to Thunderbird Lodge on the middle east shore.<br/><br/></div>');
		newpoints[9] = new Array(-119.91336822509766, 39.106087295867496, icon0, '10', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/the-flume-trail/">The Flume Trail</a><br/>This great ride begins at the Spooner Lake day use area in the Lake Tahoe Nevada State Park on the east side of Lake Tahoe.<br/><br/></div>');
		newpoints[10] = new Array(-120.02494812011719, 39.09383130692365, icon3, '11', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/sailing-in-lake-tahoe/">Sailing In Lake Tahoe</a><br/>Sailing in Lake Tahoe could be the most beautiful afternoon you could possibly think of. The winds, believe it or not, are better in the afternoons during the winter months.<br/><br/></div>');
		newpoints[11] = new Array(-120.231113, 39.323391, icon1, '12', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/hiking-glacier-meadow-loop/">Glacier Meadows</a><br/>Glacier Meadow Loop at Lake Tahoe is a very short, self-guided nature trail that begins and ends at the Eastbound I-80 rest stop on Donner Summit.<br/><br/></div>');
		newpoints[12] = new Array(-120.120049, 39.274772, icon4, '13', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/snowboarding-northstar-at-tahoe/">Northstar-At-Tahoe</a><br/>Our expertly crafted freestyle terrain is loaded with an assortment of jumps, hips, rails and boxes along with a 420-foot Superpipe, which has been ranked in TransWorld Snowboardings top ten  Pipes in North America for the past three years.<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;
		}
		 
		//]]>