<!--
document.write('<div id="map" style="width:400px; height:350px;"></div>') ;
// -->
   
//<![CDATA[
function mapload() {

function createMarker(point, html) {
  // Create a lettered icon for this point using our icon class from above
  var icon = new GIcon(baseIcon);
  var marker = new GMarker(point, icon);
  // Show this marker's index in the info window when it is clicked
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(html);
  });
 
  return marker;
}

// info window html.

function createHTML(pname, paddress, pcity, pstate, pzipcode, evid, etitle) {
	var pfulladdress = pzipcode;
	var html = '<p><b>' + pname + '</b><br />' + paddress + '<br />' + pcity + ', <br />' + pstate + ' ' + pzipcode + '</p>';
	html += '<form action="http://maps.google.co.uk/maps" method="get" target="_blank"><p>';
	html += '<i>Your address</i>: <br /><input type="text" name="saddr" value="" size=20><br />';
	html += '<input type="hidden" name="daddr" value="' + pfulladdress + '" />';
	html += '<input type="submit" value="Directions"/></p></form>';
	html += '<p>More info from: ';
	for( var i = 0; i < evid.length; i++) {
		html += "<br /><a href=\"" + evid[i] + "\" target=\"_blank\">"+ etitle[i] + "</a></p>";
	}
	
	return html;
}

function centremap(){

map.centerAndZoom(new GPoint(-1.01596, 53.8421), 11);

}


var baseIcon = new GIcon();
baseIcon.image = "http://www.ballooning-rides.co.uk/images/google-icon.png";
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.infoShadowAnchor = new GPoint(18, 25);

// Center the map
var map = new GMap(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.centerAndZoom(new GPoint(-2.38901623, 52.02950952), 6);
//-2.67909, 51.4763
//york -1.01596	53.8421


// Add all markers and addresses in a floating window.

	var evidArray = ["http://www.awin1.com/awclick.php?gid=26664&mid=1109&awinaffid=48069&p=http://www.virginexperiencedays.co.uk/experiences/balloon-flight.html"];
	var etitleArray = ["Book your balloon flight now!"];
	var html = createHTML("Virgin Balloon Flights", "Eastnor Castle", "Ledbury", "Herefordshire", "HR8 1RL", evidArray, etitleArray);
	var point = new GPoint(-2.38901623, 52.02950952);
	var marker = createMarker(point, html, "Virgin Balloon Flights");
	map.addOverlay(marker);
	
}
   //]]>