
		//<![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), 9, 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);

		}
		 
		function addPoints() {
		 
		newpoints[0] = new Array(-120.07266998291016, 38.68984777807959, icon4, '1', '<div id="popup" style="width:320px; height:100px;"><a href="#nogo">Kirkwood Ski Resort</a><br/>With a base elevation of 7,800 feet, Kirkwood is the highest starting point of any major resort in Lake Tahoe. Locals and fans say Kirkwood catches the best snowstorms streaming in to the Sierra.<br/><br/></div>');
		newpoints[1] = new Array(-120.23540496826172, 39.199535650662554, icon4, '2', '<div id="popup" style="width:320px; height:100px;"><a href="#nogo">Squaw Valley USA</a><br/>Squaw Valley USA, site of the Winter Olympic Games in 1960, is a legendary vacation destination plunked down squarely at the end of a gorgeous Sierra valley.<br/><br/></div>');
		newpoints[2] = new Array(-119.9406623840332, 38.93604551413491, icon4, '3', '<div id="popup" style="width:320px; height:100px;"><a href="#nogo">Ski Heavenly</a><br/>Few ski resorts match Heavenlys scenic beauty and expansive network of lifts, terrain, trails, and snowmaking. Located on the south shore of Lake Tahoe, Heavenly is the regions largest mountain resort.<br/><br/></div>');
		newpoints[3] = new Array(-120.23815155029297, 39.16760145633732, icon4, '4', '<div id="popup" style="width:320px; height:100px;"><a href="http://www.trailstv.com/skiing-and-boarding-at-alpine-meadows/">Ski Alpine Meadows</a><br/>Alpine Meadows has been a favorite for Lake Tahoe locals for many years, and there is s a great reason why. The people...<br/><br/></div>');
		newpoints[4] = new Array(-120.12245178222656, 39.27691581029593, icon4, '5', '<div id="popup" style="width:320px; height:100px;"><a href="#nogo">Ski Northstar-at-Tahoe</a><br/>Northstar-at-Tahoe is the flagship of the Booth Creek network of winter resorts. Northstar offers an excellent family experience.<br/><br/></div>');
		newpoints[5] = new Array(-119.8857307434082, 39.32938464260975, icon4, '6', '<div id="popup" style="width:320px; height:100px;"><a href="#nogo">Ski Mt Rose</a><br/>Mount Rose is the closest serious skiing and riding to Reno and the Reno-Tahoe Airport. It may be close, but its boasts Lake Tahoes highest base area at 8,260 feet opening up a 1,800 foot vertical and 1,200 acres of skiing.<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;
		}
		 
		//]]>