    //<![CDATA[
	var _map;
	_locations=new Array(new Array(),new Array(),new Array(),new Array(), new Array(), new Array());
	var _currentPlace;
	var _directions;

    function load(dCity) {
		//Wexford town
	_locations[0]['description']="<p><strong>Pettitt’s Supervalu – Wexford </strong><br />St. Aidans Shopping Centre, Wexford Town, <br />Co Wexford</p>";
	_locations[0]['lat']=52.33231;
	_locations[0]['lng']=-6.467675;
		//Wexford Quay
	_locations[1]['description']="<p><strong>Pettitt’s the Quay - Wexford</strong><br />Custom House Quay, Wexford Town<br />Co Wexford</p>";
	_locations[1]['lat']=52.339328;
	_locations[1]['lng']=-6.460631;	
		//Enniscorthy
	_locations[2]['description']="<p><strong>Pettitt’s Supervalu Enniscorthy</strong><br />The Duffry, Enniscorthy,<br />Co. Wexford</p>";
	_locations[2]['lat']=52.502701;
	_locations[2]['lng']=-6.573016;
		//Gorey
	_locations[3]['description']="<p><strong>Pettitt’s Gorey</strong><br />Main Street, Gorey,<br />Co. Wexford</p>";
	_locations[3]['lat']=52.676538;
	_locations[3]['lng']=-6.293492;	
		//Athy
	_locations[4]['description']="<p><strong>Pettitt’s Supervalu Athy</strong><br />Edmund Rice Square, Athy,<br />Co Kildare</p>";
	_locations[4]['lat']=52.992406;
	_locations[4]['lng']=-6.985631;	
		//Arklow
	_locations[5]['description']="<p><strong>Pettitt’s Arklow</strong><br />Wexford Road, Arklow,<br />Co Wicklow</p>";
	_locations[5]['lat']=52.790721;
	_locations[5]['lng']=-6.165433;	

	

      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
		this._map=map;
	    var directionsPanel = document.getElementById("route");
		var directions = new GDirections(map, directionsPanel);
	    this._directions=directions;

		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		for (var i=0; i<_locations.length; i++) {
			addPoint(map,i);
		}

		if (dCity == undefined) {
			map.setCenter(new GLatLng(52.682048,-6.718352), 8);
		}
		else {
			switchLocation(dCity);
			map.setZoom(15);
		}
		
      }
	  
	  function addPoint(map,locationID) {
	  	var point = new GLatLng(_locations[locationID]['lat'], _locations[locationID]['lng']);
		var street=new GMarker(point);
		map.setCenter(point, 13);
  		map.addOverlay(street);
		GEvent.addListener(street, "click", function() {
			map.openInfoWindow(point, _locations[locationID]['description']);
		});
		
		
	  }
	 
	}
	function showDirections(from, to) {
		_directions.load(from + " to " + to);
	}	
	function switchLocation(locationID) {
		var point=new GLatLng(_locations[locationID]['lat'], _locations[locationID]['lng']);
		 panTo(point);
		_map.openInfoWindow(point, _locations[locationID]['description']);
	}
	function panTo(point) {
	 	_map.panTo(point);
	}	

    //]]>
