function load() {
//Create map
var map = new GMap2(document.getElementById("offices_map"));
map.setCenter(new GLatLng(38.39034,-75.111368), 12);
map.addControl(new GLargeMapControl());
//map.addControl(new GMapTypeControl());
var map2 = new GMap2(document.getElementById("offices_map2"));
//map2.setCenter(new GLatLng(38.365394,-75.587003), 15);
map2.setCenter(new GLatLng(38.393308,-75.571765), 12);
map2.addControl(new GLargeMapControl());
//map2.addControl(new GMapTypeControl());

//Create points
var point1 = new GLatLng(38.375408, -75.069048);
var point2 = new GLatLng(38.377668, -75.165974);
var point3 = new GLatLng(38.421741,-75.564476);

//Create markers
var blueIcon = new GIcon(G_DEFAULT_ICON);
blueIcon.image = "../images/bluemarker.png";
var redIcon = new GIcon(G_DEFAULT_ICON);
redIcon.image = "../images/redmarker.png";
var yellowIcon = new GIcon(G_DEFAULT_ICON);
yellowIcon.image = "../images/yellowmarker.png";

var marker1 = new GMarker(point1, {icon: blueIcon, title: "Ocean City Office"})		//Ocean City office
var marker2 = new GMarker(point2, {icon: redIcon, title: "Ocean Pines Office"}) 	//Ocean Pines office
var marker3 = new GMarker(point3, {icon: yellowIcon, title: "Salisbury Office"}) 	//North Salisbury office

//Info tabs content
var boxtext1 = "<p><b>Ocean City Office</b><br />";
boxtext1 += "5000 Coastal Highway, 1st Floor<br />";
boxtext1 += "Ocean City, Maryland 21842<br /><br />";
boxtext1 += "(410) 524-6700<br />";
boxtext1 += "1-866-4-REMAX-1<br /><br />";
boxtext1 += "<a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=5000+Coastal+Highway+Ocean+City,+Maryland+21842&sll=38.385485,-75.066297&sspn=0.012447,0.01929&ie=UTF8&hq=&hnear=5000+Coastal+Hwy,+Ocean+City,+Worcester,+Maryland+21842&ll=38.375409,-75.069044&spn=0.012448,0.01929&z=16' target='blank'>Click here for driving directions</a></p>";
var boxtext2 = "<p><b>Ocean Pines Office</b><br />";
boxtext2 += "11049 Racetrack Road<br />";
boxtext2 += "Berlin, Maryland 21811<br /><br />";
boxtext2 += "(410) 641-5222<br />";
boxtext2 += "1-877-4-REMAX-1<br /><br />";
boxtext2 += "<a href='http://maps.google.com/maps?f=q&source=s_q&output=html&hl=en&q=11049+Racetrack+Road+Berlin%2C+Maryland+21811&btnG=Search+Maps' target='blank'>Click here for driving directions</a></p>";
var boxtext3 = "<p><b>Salisbury Office</b><br />";
boxtext3 += "2815 North Salisbury Blvd, Suite A<br />";
boxtext3 += "Salisbury, Maryland 21804<br /><br />";
boxtext3 += "(410) 749-0057<br />";
boxtext3 += "1-866-4-REMAX-1<br />";
boxtext3 += "(410) 749-0888 (Fax)<br /><br />";
boxtext3 += "<a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2815+North+Salisbury+Blvd+21804&sll=38.42173,-75.564507&sspn=0.002828,0.004823&ie=UTF8&hq=&hnear=2815+N+Salisbury+Blvd,+Salisbury,+Wicomico,+Maryland+21804&z=16' target='blank'>Click here for driving directions</a></p>";

var pic1 = "<img src='images/oc-office-new.jpg' width='180' height='135' style='margin-top:15px' /><br /><small>Ocean City Office - 5000 Coastal Highway</small>";
var pic2 = "<img src='images/op-office.jpg' width='209' height='116' style='margin-top:15px' /><br /><small>Ocean Pines Office - 11049 Racetrack Road</small>";
var pic3 = "<img src='images/ns-office.jpg' width='209' height='116' style='margin-top:15px' /><br /><small>North Salisbury Office -<br />2815 North Salisbury Blvd, Suite A</small>";

var infoTabs1 = [
      new GInfoWindowTab("Location", boxtext1),
      new GInfoWindowTab("Photo", pic1)
      ];
var infoTabs2 = [
      new GInfoWindowTab("Location", boxtext2),
      new GInfoWindowTab("Photo", pic2)
      ];
var infoTabs3 = [
      new GInfoWindowTab("Location", boxtext3),
      new GInfoWindowTab("Photo", pic3)
      ];

	  
//Add tabs content to markers 
marker1.showtabs = infoTabs1;
marker2.showtabs = infoTabs2;
marker3.showtabs = infoTabs3;

//Display markers
map.addOverlay(marker1);
map.addOverlay(marker2);
map2.addOverlay(marker3);

//Display tabs on click
GEvent.addListener(marker1, "click", function() {
marker1.openInfoWindowTabsHtml(infoTabs1);});
GEvent.addListener(marker2, "click", function() {
marker2.openInfoWindowTabsHtml(infoTabs2);});
GEvent.addListener(marker3, "click", function() {
marker3.openInfoWindowTabsHtml(infoTabs3);});
}