//<![CDATA[

var map;

var points = [];
var markers = [];
var pophtmls = [];
var index = 0;

var infopanel;

function onLoad() {
if (GBrowserIsCompatible()) {
// infopanel = document.getElementById("infopanel");
map = new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint(-77.526480, 34.681050), 4);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
var dec = new GPoint(-77.526480, 34.681050);
var dec_marker = new GMarker(dec);
GEvent.addListener(dec_marker,
		 'click',
		 function() {
       dec_marker.openInfoWindowHtml("<div style='font-weight:bold;' class=textd>Southeastern Steel Choppers<br/>Phone: 910-455-0001<br/>121 Stillwood Road<br>Jacksonville, NC 28540</div>");
   } );
map.addOverlay(dec_marker);
dec_marker.openInfoWindowHtml("<div style='font-weight:bold;' class=textd>Southeastern Steel Choppers<br/>Phone: 910-455-0001<br/>121 Stillwood Road<br>Jacksonville, NC 28540</div>");

}
}

function addmarker(x,y,title,pophtml,image) {
  var point = new GPoint(parseFloat(x),parseFloat(y));
  points.push(point);
  var thisIcon = new GIcon();
  thisIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
  thisIcon.iconSize = new GSize(20,34);
  thisIcon.shadowSize = new GSize(37,34);
  thisIcon.iconAnchor = new GPoint(9,34);
  thisIcon.infoWindowAnchor = new GPoint(9,2);
  thisIcon.infoWindowAnchor = new GPoint(18,25);
  thisIcon.image = image;
  var marker = new GMarker(point,thisIcon);
  markers.push(marker);
  pophtmls.push(pophtml);
  GEvent.addListener(marker,
		 'click',
		 function() {
  marker.openInfoWindowHtml(' ' + pophtml + ' ');
  }
		 );

		 /*map.addOverlay(marker);
  infopanel.innerHTML = infopanel.innerHTML +
  '<a href="#" onClick="movemap(' + index + ');"><img src="' + image + '" border=0/>' +
  title +
  '</a>&nbsp;&nbsp;';
  */
  index++;
}

function movemap(index) {
  map.recenterOrPanToLatLng(points[index]);
  points[index].click;
  setTimeout('popthishtml(' + index + ')', 1100);
}

function popthishtml(index) {
markers[index].openInfoWindowHtml( pophtmls[index] )
}

//]]>