


var gmarkers = [];
var address = [];
var points = [];
if(GBrowserIsCompatible()) { 
	var map = new GMap2(document.getElementById('map')); 
	map.enableContinuousZoom(); 
	map.enableDoubleClickZoom(); 
	map.addControl(new GLargeMapControl()); 
	map.addControl(new GScaleControl()); 
	var geocoder = new GClientGeocoder(); 
	var icon = new GIcon(); 
	icon.image = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.png'; 
	icon.shadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.png'; 
	icon.iconSize = new GSize(34,35); 
	icon.shadowSize = new GSize(34,35); 
	icon.iconAnchor = new GPoint(9,23); 
	icon.infoWindowAnchor = new GPoint(19,0); 
	icon.printImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.gif'; 
	icon.mozPrintImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_mozprint.png'; 
	icon.printShadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.gif'; 
	icon.transparent = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_transparent.png'; 
	var address_2 = {
	  infowindowtext: '<b>Design Express</b><br />Oosthaven 8<br /> 2801 PB Gouda<br/>  Tel. 0182-756660<br/>  Fax. 0182-756661<br/><a href=\'mailto:info@vectorworks.nl\'>info@vectorworks.nl</a><br /><a href=\'http://www.vectorworks.nl\'>www.vectorworks.nl</a><br/>',
	  full: 'Oosthaven 8, 2801 PB Gouda, Nederland'
	};

	address[2] = address_2.infowindowtext;

	geocoder.getLatLng (
	  address_2.full,
	  function(point) {
		if(point) {
		  points[2] = point; 
		  map.setCenter(point, 8);
		  var marker = new GMarker(point, icon);
		  GEvent.addListener(marker, 'click', function() {
			marker.openInfoWindowHtml(address_2.infowindowtext);
		  });
		  map.addOverlay(marker);
		  gmarkers[2] = marker;
		}
		else {
		  map.setCenter(new GLatLng(37.4419, -122.1419), 8);
		}
	  }
	); // end geocoder.getLatLng

	var address_1 = {
	  infowindowtext: '<b>Design Express</b><br /> O.L.-Vrouwstraat 92-94 <br /> 3550 Heusden-Zolder<br/> Tel. 015/71.96.00<br/>  Fax. 015/71.96.01<br/><a href=\'mailto:info@vectorworks.be\'>info@vectorworks.be</a><br /><a href=\'http://www.vectorworks.be\'>www.vectorworks.be</a><br/><br/><img src=\'http://vectorworks.be/images/zolderfoto.jpg\' height=\'95\' />',
	  full: 'Onze Lieve Vrouwstraat 92,  3550 Heusden-Zolder, Belgium'
	};

	address[1] = address_1.infowindowtext;

	geocoder.getLatLng (
	  address_1.full,
	  function(point) {
		if(point) {
		  points[1] = point; 
		  map.setCenter(point, 8);
		  var marker = new GMarker(point, icon);
		  GEvent.addListener(marker, 'click', function() {
			marker.openInfoWindowHtml(address_1.infowindowtext);
		  });
		  map.addOverlay(marker);
		  gmarkers[1] = marker;
		}
		else {
		  map.setCenter(new GLatLng(37.4419, -122.1419), 8);
		}
	  }
	); // end geocoder.getLatLng

	var address_0 = {
	  infowindowtext: '<b>Design Express</b><br /> Kleine Heide 26 <br /> 2811 Mechelen<br/>Tel 015/71.96.00<br />Fax 015/71.96.01<br /><a href=\'mailto:info@vectorworks.be\'>info@vectorworks.be</a><br /><a href=\'http://www.vectorworks.be\'>www.vectorworks.be</a><br/><br/><img src=\'http://vectorworks.be/images/defoto.jpg\' height=\'95\'/>',
	  full: 'Kleine heide 26, 2811 mechelen (leest), Belgium'
	};

	address[0] = address_0.infowindowtext;

	geocoder.getLatLng (
	  address_0.full,
	  function(point) {
		if(point) {
		  points[0] = point; 
		  map.setCenter(point, 8);
		  var marker = new GMarker(point, icon);
		  GEvent.addListener(marker, 'click', function() {
			marker.openInfoWindowHtml(address_0.infowindowtext);
		  });
		  map.addOverlay(marker);
		  marker.openInfoWindowHtml(address_0.infowindowtext);
		  gmarkers[0] = marker;
		}
		else {
		  map.setCenter(new GLatLng(37.4419, -122.1419), 8);
		}
	  }
	); // end geocoder.getLatLng

} // end if

function sideClick(i) {
   if (gmarkers[i]) {
	  gmarkers[i].openInfoWindowHtml(address[i]);
	  map.setCenter(points[i],8);
   } else {
	  var htstring = address[i];
	  var stripped = htstring.replace(/(<([^>]+)>)/ig,'');
	  alert('Location not found: ' +  stripped);
   } /*endif*/
} /*end function */