// JavaScript Document
function mapload(whichmap,resultLat,resultLng,pc,whichicon) {
	var point = new GLatLng(resultLat,resultLng);
	var redIcon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/redmarker.png");
	var plusIcon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/plusmarker.png");
	var homeIcon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/homemarker.png");
	var nkIcon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/unknownmarker.png");
	var t1Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t1marker.png");
	var t2Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t2marker.png");
	var t3Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t3marker.png");
	var t4Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t4marker.png");
	var t5Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t5marker.png");
	var t6Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t6marker.png");
	var t7Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t7marker.png");
	var t8Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t8marker.png");
	var t9Icon = new GIcon(G_DEFAULT_ICON,"http://www.rvadirectory.org.uk/siteimages/mapmarkers/t9marker.png");
	
	icontouse = eval(whichicon);
    if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById(whichmap));
        map.addControl(new GSmallZoomControl());
		map.setCenter(point, 15);
        map.addOverlay(new GMarker(point,{icon:icontouse}));
		GEvent.addListener(map, "click", function(marker, point) {
  			if (marker) {
    			window.open('http://maps.google.co.uk/maps?q='+pc,'_blank');
  				}
			});
      	}
    }