  var map;
  //define one variable here for each of your locations
  var rgh;
  var cardiac;
  var ridge;
  var outpatient;
  var midtown;
  var linden;
  var oncology;
  
  function initialize() {
    var myLatlng = new google.maps.LatLng(0,0);  //this is overwritten later, see bottom of this method
    var myOptions = {
      zoom: 16,  //note your zoom level goes here
      center: myLatlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    addLocations();
  }
  
  function addLocations() {
    //the div that shows in the info box, one per location
    var rghString = '<div id="content">'+
    '<h1 id="firstHeading">Tanasuk</h1>'+
    '<div id="bodyContent">'+
    '<p>Tanasuk is located in Amman, Jordan</p>' +
    '</div>'+
    '</div>';
    
    var cardiacString = '<div id="content">'+
    '<h1 id="firstHeading">Cambridge MedTouch</h1>'+
    '<div id="bodyContent">'+
    '<p>MedTouch has an office in Cambridge, MA</p>' +
    '</div>'+
    '</div>';
    
    var ridgeString = '<div id="content">'+
    '<h1 id="firstHeading">Houston MedTouch</h1>'+
    '<div id="bodyContent">'+
    '<p>MedTouch has an office in Houston, TX</p>' +
    '</div>'+
    '</div>';  
	
	    var outpatientString = '<div id="content">'+
    '<h1 id="firstHeading">Tanasuk</h1>'+
    '<div id="bodyContent">'+
    '<p>Tanasuk is located in Amman, Jordan</p>' +
    '</div>'+
    '</div>';
    
    var midtownString = '<div id="content">'+
    '<h1 id="firstHeading">Cambridge MedTouch</h1>'+
    '<div id="bodyContent">'+
    '<p>MedTouch has an office in Cambridge, MA</p>' +
    '</div>'+
    '</div>';
    
    var lindenString = '<div id="content">'+
    '<h1 id="firstHeading">Houston MedTouch</h1>'+
    '<div id="bodyContent">'+
    '<p>MedTouch has an office in Houston, TX</p>' +
    '</div>'+
    '</div>'; 

    var oncologyString = '<div id="content">'+
    '<h1 id="firstHeading">Houston MedTouch</h1>'+
    '<div id="bodyContent">'+
    '<p>MedTouch has an office in Houston, TX</p>' +
    '</div>'+
    '</div>'; 
	//the info box itself
    var rghInfoWindow = new google.maps.InfoWindow({
      content: rghString
    });

    var cardiacInfoWindow = new google.maps.InfoWindow({
      content: cardiacString
    });
    
    var ridgeInfoWindow = new google.maps.InfoWindow({
      content: ridgeString
    });    

	//the actual physical marker
    rgh = new google.maps.Marker({
        position: new google.maps.LatLng(43.1918670, -77.5866099), 
        map: map,
        title:"Rochester General Hospital"
    });
    
    cardiac = new google.maps.Marker({
        position: new google.maps.LatLng(43.2016410, -77.5683470), 
        map: map,
        title:"Cardiac Rehabilitation"
    });
    
    ridge = new google.maps.Marker({
        position: new google.maps.LatLng(43.2016410, -77.5683470), 
        map: map,
        title:"Physical Therapy - Ridge Road"
    });
	
	outpatient = new google.maps.Marker({
        position: new google.maps.LatLng(43.1951600, -77.6087952), 
        map: map,
        title:"Outpatient Dialysis"
    });
    
    midtown = new google.maps.Marker({
        position: new google.maps.LatLng(43.1413221, -77.5498311), 
        map: map,
        title:"Physical Therapy - Midtown"
    });
    
    linden = new google.maps.Marker({
        position: new google.maps.LatLng(43.1528841, -77.5046101), 
        map: map,
        title:"Physical/Occupational Therapy - Linden Oaks"
    });
	
    oncology = new google.maps.Marker({
        position: new google.maps.LatLng(43.1262180, -77.5183510), 
        map: map,
        title:"Linden Oaks Oncology"
    });
    
    //the function that displays the info box on marker click
    google.maps.event.addListener(rgh, 'click', function() {
      rghInfowindow.open(map,rgh); 
    });  
    
    google.maps.event.addListener(cardiac, 'click', function() {
      cardiacInfowindow.open(map,cardiac); 
    });

    google.maps.event.addListener(ridge, 'click', function() {
      ridgeInfowindow.open(map,ridge); 
    });
	
	google.maps.event.addListener(outpatient, 'click', function() {
      outpatientInfowindow.open(map,outpatient); 
    });  
    
    google.maps.event.addListener(midtown, 'click', function() {
      midtownInfowindow.open(map,midtown); 
    });

    google.maps.event.addListener(linden, 'click', function() {
      lindenInfowindow.open(map,linden); 
    });
	
	google.maps.event.addListener(oncology, 'click', function() {
      oncologyInfowindow.open(map,oncology); 
    });
    
    //centers the map on one of your markers when the map first opens
    centerOnLocation(rgh);        
  
  }
  
  
  //given a marker, make it the center of the map
  function centerOnLocation(marker) {
    map.panTo(marker.getPosition());        
  }
  
  
  //given the name of a marker, make it the center of the map
  function centerOnName(name) { 
    switch (name) {
      case "rgh": centerOnLocation(rgh); break;
      case "cardiac": centerOnLocation(cardiac); break;
      case "ridge": centerOnLocation(ridge); break;
	  case "outpatient": centerOnLocation(outpatient); break;
      case "midtown": centerOnLocation(midtown); break;
      case "linden": centerOnLocation(linden); break;
	  case "oncology": centerOnLocation(oncology); break;
    }
  }
  
