
function myclick(i) {
        GEvent.trigger(marker[i], "click");
      }
	  
//Create map
var map = new GMap2(document.getElementById("region"));
map.setCenter(new GLatLng(38.368426,-75.586527), 16);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());

//Create markers
var point0 = new GLatLng(38.365575,-75.586624);
var point1 = new GLatLng(38.978053,-76.495566);
var blueIcon = new GIcon(G_DEFAULT_ICON);
var redIcon = new GIcon(G_DEFAULT_ICON);
blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png";
redIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/red/blank.png";

var marker = new Array(2);
marker[0] = new GMarker(point0,{icon: blueIcon, title:"Vantage Point Solutions Group"});
marker[1] = new GMarker(point1,{icon: redIcon, title:"Vantage Point Solutions Group - Annapolis Office"});

//Create content
var boxtext0 = "<p class='box_text'><strong>Vantage Point Solutions Group</strong><br />"
	boxtext0 += "The Park Building<br />700 E. Main Street, Suite 100<br />Salisbury, MD  21804<br /><br />"
	boxtext0 += "<a href='http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=38.365575,-75.586624&hl=en&geocode=&mra=ls&sll=37.0625,-95.677068&sspn=46.226656,79.013672&ie=UTF8&z=16' target='blank'>Click here for driving directions</a></p>"
var pbox0 = "<img src='images/park_building_small.jpg' width='275' height='177' alt='The Park Building' /><br />"
	pbox0 += "<small>The Park Building - 700 E. Main Street</small>"
var infoTabs0 = [
      new GInfoWindowTab("Location", boxtext0),
      new GInfoWindowTab("Photo", pbox0)
      ];
	  
var boxtext1 = "<p class='box_text' style='padding:10px; margin:10px'><strong>Vantage Point Solutions Group<br />Annapolis Office</strong><br />"
	boxtext1 += "121 Cathedral St - Suite 2A<br />Annapolis, MD 21401<br /><br />"
	boxtext1 += "<a href='http://maps.google.com/maps?q=Vantage&hl=en&sll=38.977927,-76.495271&sspn=0.01116,0.01929&ie=UTF8&view=map&f=d&daddr=121+Cathedral+Street,+Suite+2A,+Annapolis,+MD&ll=38.97801,-76.495507&spn=0.006322,0.009645&z=17' target='blank'>Click here for driving directions</a></p>"

marker[0].showtabs = infoTabs0;

//Display markers and content
map.addOverlay(marker[0]);
map.addOverlay(marker[1]);

marker[0].openInfoWindowTabsHtml(infoTabs0);

GEvent.addListener(marker[0], "click", function() {
	map.setCenter(new GLatLng(38.368426,-75.586527), 16);
	marker[0].openInfoWindowTabsHtml(infoTabs0);
	});

GEvent.addListener(marker[1], "click", function() {
	map.setCenter(new GLatLng(38.979896,-76.495389), 16);
	marker[1].openInfoWindowHtml(boxtext1);
	});