<!--
//<![CDATA[

//-------This page and code copyright Don Pickerel 2006 ---------------

			
    var point;
    var geocoder;

		// Creates a marker at the given point with the given number label
	function createSSMarker(spoint, place,tab2) 
		{
			// Our info window content
			var infoTabs = 
			[
				new GInfoWindowTab("Golf Clubs",place),
				new GInfoWindowTab("Weather","Coming Soon"),
			];
			// Create our "tiny" marker icon
			var icon = new GIcon();
			icon.image = "http://www.northcarolinatourist.com/assets/graphics/ski1.png";
			icon.shadow = "http://www.northcarolinatourist.com/assets/graphics/ski1s.png";
			icon.iconSize = new GSize(38,29);
			icon.shadowSize = new GSize(30,18);
			icon.iconAnchor = new GPoint(6, 20);
			icon.infoWindowAnchor = new GPoint(5, 1);   
			var htmls=[place, tab2,"Coming Soon"];
			var labels = ["Ski Resorts","Visit","Weather"];
		  var marker = new GMarker(spoint,icon);
		  GEvent.addListener(marker, "click", function() 
			{
          		// adjust the width so that the info window is large enough for this many tabs
          		if (htmls.length > 2) 
		  		{
            		htmls[0] = '<div style="width:'+htmls.length*88+'px">' + htmls[0] + '</div>';
          		}
          		var tabs = [];
          		for (var i=0; i<htmls.length; i++) 
		  		{
            		tabs.push(new GInfoWindowTab(labels[i],htmls[i]));
          		}
          		marker.openInfoWindowTabsHtml(tabs);
        	});
		  return marker;
		}


// ---------------- Yadkin wineries --------------------------
	function snowski_markers(mwhich)
	{
		var i,j;

		switch (mwhich)
		{
			case 1:
			i="<a href=\"http://www.appskimtn.com/\">Appalachian Ski Mtn</a>";
			j="940 Ski Mountain Rd&nbsp;&nbsp;Blowing Rock, NC 28605<br />828-295-7828 Reservations 800-322-2373<br />Slopes: 10 (2 Easiest, 5 More Difficult, 3 Most Difficult)<br />Ski Lifts:  5&nbsp;&nbsp;Peak Elevation:  4000&acute;<br />Base Elevation:  3635&acute;&nbsp;&nbsp;Vertical Drop:  365&acute;<br />Terrain Parks:  2 (Appaljack and Appal Jam\)<br /> ";

			point = new GLatLng(36.150078,-81.660129);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 2:
			i="<a href=\"http://www.cataloochee.com/\">Cataloochee Ski Area</a>";
			j="1080 Ski Lodge Road, Maggie Valley, NC 28751<br /> Ski Report: 828-926-3588 or 800-768-3588<br />Office: 828-926-0285 or 800-768-0285<br />Trails: 5 Lifts: 4 <br />Top Elevation: 5400 ft. Vertical Drop: 740 ft.";
			point = new GLatLng(35.515866,-83.130589);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 3:
			i="<a href=\"http://www.skihawk.com/\">Hawksnest Ski & Golf Resort</a>";
			j="2058 Skyland Dr, Seven Devils NC 28604<br /> 828.963.6561  800.822.4295<br />Summit 4,819&acute; Base 4200&acute; Vertical Drop 619&acute;<br /> Slopes&amp;Trails: 12 Lifts: 4<br />";
point = new GLatLng(36.147567,-81.823548);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 4:
			i="<a href=\"http://www.skisapphire.com/\">Sapphire Valley Ski</a>";
			j="Slopes&amp;Trails: 2&nbsp;Lifts: 1<br />Top: 3780&acute;&nbsp;&nbsp;Bottom:3580&acute;<br />Vertical Drop: 200&acute;<br />Longest Run: 1100&acute;&nbsp;&nbsp;Skiable Acres: 8<br />";
point = new GLatLng(35.115484,-82.993853);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 5:
			i="<a href=\"http://www.scalymountain.com/\">Scaly Mountain</a>";
			j="Tubing Only 2005 - 2006<br /> Top: 4025&acute;&nbsp;&nbsp;Bottom: 3800&acute;<br />Vertical Drop: 225&acute;<br />";
			point = new GLatLng(35.022230,-83.305683);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 6:
			i="<a href=\"http://www.skibeech.com/\">Ski Beech</a>";
			j="<br />1007 Beech Mountain Pkwy, Beech Mountain, NC<br />800-438-2093 and 828-387-2011<br />Slopes 15 &nbsp;Lifts 10<br />Peak elevation: 5,506&acute;Base elevation: 4,675&acute;<br />Vertical rise: 830&acute;<br />";
point = new GLatLng(36.180575,-81.873807);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 7:
			i="<a href=\"http://www.skisugar.com/conditions/\">Sugar Mountain</a>";
			j="1009 Sugar Mountain Dr, Banner Elk, NC 28604<br />800-SUGAR-MT (784-2768)<br />Summit: 5,300&acute;&nbsp;&nbsp;Base: 4,100&acute;<br />Vertical Drop: 	 1,200&nbsp;&nbsp;<br />Slopes 20 Lifts 9<br />115 Acres<br />&nbsp;";
point = new GLatLng(36.129229,-81.855764);
			map.addOverlay(createSSMarker(point, i,j));		
			break;
			case 8:
			i="<a href=\"http://www.skiwolfridgenc.com/\">Wolf Ridge Resort</a>";
			j="578 Valley View Circle Mars Hill, NC 28754<br />828.689.4111 800.817.4111<br />19 Slopes 5 Lifts<br />Top Elevation 4,700&acute; Base Elevation 4,000&acute;<br /> Vertical Drop 700&acute; 82 Acres<br />&nbsp;";
point = new GLatLng(35.955196,-82.512729);
			map.addOverlay(createSSMarker(point, i,j));		
			break;			
		}
		return point;		
		
	}
   function add_snowskimarker() 
   	{

			var y;

			for (y=1;y<=8;y++)
			{
			snowski_markers(y);
			}
	}
   	
    function load_snowski() 
	{
		add_snowskimarker();
       	map.setCenter(new GLatLng(35.515866,-83.130589), 7);
		map.openInfoWindowHtml(map.getCenter(),"<a href=\"http://www.northcarolinatourist.com/Guides/SkiResorts/snowski.php\" target=\"_blank\">North Carolina Ski Resorts</a><br />Each skier represents a ski resort.<br /> Click on the skier to get more information.  <br />Click anywhere and drag to move map. <br />Click the X top right to close this window.<br />&nbsp;");
    }

    function load_allgolfclub() 
	{

		add_snowskimarker();
	}

	function pointo_to_snowski()
	{
		var string_wine,ipoint, npoint,winenum,which_wine;
		var wdone=0;
		box = document.wineryf.whichwine;
		string_wine = box.options[box.selectedIndex].value;
		which_wine = parseInt(string_wine);

		if(which_wine == 0 ) {
        map.setCenter(new GLatLng(35.460669951495305, -79.5849609375), 7);
		return;
		}

		if(which_wine <99 ) {
		npoint = coastal_markers(which_wine);}

		if(which_wine > 300) {
		which_wine = which_wine - 300; 
		npoint = mountain_markers(which_wine);}
		
		if(which_wine > 200) {
		which_wine = which_wine - 200; 
		npoint = yadkin_markers(which_wine);}

		if(which_wine > 100) {
		which_wine = which_wine - 100; 
		npoint = piedmont_markers(which_wine);}

		map.setZoom(7);
		
		window.setTimeout(function() {
		map.panTo(npoint);
			}, 1000);


		window.setTimeout(function() {
		map.setZoom(11);
		map.panTo(npoint);
			}, 3000);


		window.setTimeout(function() {
		map.setZoom(15);
		map.panTo(npoint);
			}, 5000);


	}
	
 