
    //<![CDATA[

function link (bus){
var info = businessInfo [bus];


if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.224997739011485,-121.9832181930542),12);
// Add Controls	
		map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());

makeMarker (map,info);
}
}

	


    // This is called once for each business marker needed.
    function makeMarker(map, info) {
      var lat = info[0];
      var lon = info[1];
      var name = info[2];
      var addr = info[3];
      var phone = info[4];
 var hours = info[5];
 var img = info[6];
      var web = info[7];
      var marker = new GMarker(new GLatLng(lat,lon)); 
map.addOverlay(marker);

var WINDOW_HTML = '<div style="width: 210px; height: 235px; padding-right: 10px;padding-bottom: 2px; font-family: verdana,sans-serif; font-size: 8pt; text-align: center;">';

// If there's a break in the name, only the first part is in strong tags.
if (name.indexOf('<br>') > 0) {
    var pos = name.indexOf('<br>');
    WINDOW_HTML = WINDOW_HTML + '<strong>' + name.substring(0,pos) + '</strong>'+
        name.substring(pos);
} else {
    WINDOW_HTML = WINDOW_HTML + '<strong>' + name + '</strong>' + '<br> ';
}
WINDOW_HTML = WINDOW_HTML + '<img src=" ' + img + ' ">' + '<br> ';
WINDOW_HTML = WINDOW_HTML + '<br>' + addr + '<br>' + phone + '<br>' + hours + '<br>';


// Add a web link only if it is defined.
if (web != '' && web != null) {
    WINDOW_HTML = WINDOW_HTML + '<a href="http:\/\/' + web + ' " target="blank">' + web + '<\/a>';
}

WINDOW_HTML = WINDOW_HTML + '<\/div>';

marker.openInfoWindowHtml(WINDOW_HTML);
GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml(WINDOW_HTML); });
        return marker;
}  // End function makeMarker.


    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.22868822817218, -121.98148012161255),12);
		map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());


// Each business has one line in "[]" characters.  The fields are
// lat, lon, name, address, phone number, and web address.  The web
// address is optional.
businessInfo = new Array(

[37.12253175339396, -121.93244934082031, 'Burrell School Vineyards', '24060 Summit Road, Los Gatos', '408-353-6290','Open for Tasting Friday to Sunday, 11 a.m. to 5 p.m.', 'images/wine_burrell.jpg','burrellschool.com'],

[37.048312, -121.961963, 'Poetic Cellars', '5000 N. Rodeo Gulch Road, Soquel', '831-462-3478','Open Sat/Sun, noon til 5pm', 'images/wine_poeticcell.jpg','poeticcellars.com'],

[37.255148, -122.035985, 'Cinnabar Winery Tasting Room', '14612 Big Basin Way, Saratoga', '408-867-1012','Open for Tasting 11 a.m. to 5 p.m.', 'images/wine_cinnabar.jpg','cinnabarwine.com'],

[37.27586272719927, -122.05827713012695, 'Cooper-Garrod Estate Vineyards', '22645 Garrod Road, Saratoga', '408-867-7116','Open for tasting weekdays 12 - 5, weekends 11 - 5.', 'images/wine_garrod.jpg','cgv.com'],

[37.221923, -121.982576, 'Fleming Jenkins Tasting Room', '45 West Main Street, Los Gatos<br>', '408-358-4949<br>','Call for tasting hours<br>', 'images/wine_flemjenk2.jpg','flemingjenkinswinery.com'],

[37.255813,-122.035767, 'Big Basin Vineyards<br><br>', '14598 Big Basin Way, Suite B, Saratoga', '408-564-7346', 'Open Thursday-Monday 11am-5pm<br>Friday and Saturday till 7pm<br>', 'images/wine_bigbasin.jpg','bigbasinvineyards.com'],


[37.24870940020078, -122.07879066467285, 'Savannah-Chanelle Vineyards', '23600 Big Basin Way, Saratoga', '408-741-2934','Call for tasting information', 'images/wine_savannah.jpg','savannahchanelle.com'],

[37.110537251944784, -121.93416595458984, 'Silver Mountain Vineyards', 'near the junction of Summit Rd. and Old San Jose-Soquel Rd.', '408-741-2934','tasting room open Saturday afternoons 12:00 - 5:00', 'images/wine_silvermtn.jpg','silvermtn.com'],

[37.21459163743965, -121.98062181472778, 'Testarossa Winery', '300-A College Avenue Los Gatos', '408-354-6150','Daily Tasting Hours:<br>11 a.m. to 5 p.m.', 'images/wine_testarossa.jpg','testarossa.com'],

[37.105733, -121.880652, 'Loma Prieta Winery', '26985 Loma Prieta Way, Los Gatos<br>', '408-353-2950<br>','Open Saturdays and Sundays from noon to 5pm<br>', 'images/wine_lomaprieta.jpg','lomaprietawinery.com'],

[37.190708, -122.003024, 'Black Ridge Winery', '18550 Black Road, Los Gatos<br>', '408-399-6396<br>','Open by Appointment<br>', 'images/wine_blackridge.jpg','blackridgevineyards.com'],

[37.12138, -121.933769, 'Regale Winery and Vineyards', '24040 Summit Road, Los Gatos, CA<br>', '408-353-2500<br>', 'Please visit our website for tasting room hours<br>','images/wine_regale.jpg','regalewine.com'],

[37.222036, -121.98293, 'Los Gatos Gourmet', '109 W. Main St., Los Gatos, CA<br>', '408-354-3440<br>','Please check our website for hours<br>', 'images/wine_lggourmet.jpg','losgatosgrourmet.com'],


[37.258845, -122.055582, 'Mountain Winery', '114831 Pierce Rd, Saratoga, CA<br>', '408-741-2822<br>','Open daily from 11 - 5<br>', 'images/wine_mtnwinery.jpg','mountainwinery.com'],

[37.013414, -121.653692, 'Fortino Winery', '4525 Hecker Pass Hwy, Gilroy, CA<br>', '408-842-3305<br>','Open Tuesdays through Saturday 10am through 5pm Sundays 11:am - 5:00pm<br>', 'images/wine_fortino.jpg','fortinowinery.com'],

[37.22976,-121.979992, 'Enoteca La Storia', '416 North Santa Cruz Ave., Los Gatos, CA<br>', '408-625-7272<br>','Mon – Weds 10:00 AM – 9:00 PM,<br>Thurs 10:00 AM – 10:00 PM,<br>Fri and Sat 10:00 AM – 11:00 PM,<br>Sun. 12:00 PM – 8:00 PM 5pm,<br>Sundays 11am - 5:00pm<br>', 'images/wine_enoteca.jpg','enotecalastoria.com'],

[37.22976,-121.979992, 'Guglielmo Winery', '1480 East Main Ave.,<br> Morgan Hill, CA<br>','408-779-2145<br>','Open daily 10am - 5pm <br> Closed major Holidays<br>', 'images/wine_guglielmo.jpg','guglielmowinery.com'],

[37.16866120773569, -122.05076694488525, 'Byington Winery and Vineyards', '21850 Bear Creek Road, Los Gatos', '408-354-1111 EX.207','Open for Tasting 11 a.m. to 5 p.m.', 'images/wine_byington.jpg','byington.com']


);

markers = new Array();

for (i=0; i<businessInfo.length; i++) {
   markers[i] = makeMarker(map, businessInfo[i]);
}





// The new code ends here.  The old code below should be converted
// to more lines in the array above.





// Create marker and window for North Santa Cruz Ave. - 14
var marker14 = new GMarker(new GLatLng(37.22916661169174, -121.98094367980957)); 
map.addOverlay(marker14);

var WINDOW_HTML14 = '<div style="width: 210px; height: 150px; padding-right: 10px;padding-bottom: 2px; font-family: verdana, 			sans-serif; font-size: 11px; font-weight: bold; text-align: center;"><br><img src="images/shop_nsantacruz.jpg"><br>Click Markers or Links<br>for Store Information<\/div>';

marker14.openInfoWindowHtml(WINDOW_HTML14);
GEvent.addListener(marker14, "click", function() {
        marker14.openInfoWindowHtml(WINDOW_HTML14); });
		



}

 
}








       //]]>
   
