<!--
document.write('<div id="map" style="width:500px; height: 500px;"></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(-1.01596, 53.8421), 11);
//-2.67909, 51.4763
//york -1.01596	53.8421


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

	var evidArray = ["http://www.adventureballoons.co.uk/"];
	var etitleArray = ["Adventure Balloons Website"];
	var html = createHTML("Adventure Balloons", "Winchfield Park", "London Road", "Hampshire", "RG27 8HY", evidArray, etitleArray);
	var point = new GPoint(-0.919234, 51.2924);
	var marker = createMarker(point, html, "Adventure Balloons");
	map.addOverlay(marker);
	

	var evidArray = ["http://www.ballooning.co.uk/"];
	var etitleArray = ["Aerosaurus Balloons Website"];
	var html = createHTML("Aerosaurus Balloons Ltd.", "Southbrook House", "Exeter", "Devon", "EX5 2PG", evidArray, etitleArray);
	var point = new GPoint(0.395427, 51.2003);
	var marker = createMarker(point, html, "Aerosaurus Balloons Ltd");
	map.addOverlay(marker);

	/*
	var evidArray = ["http://www.airborneballoons.co.uk/"];
	var etitleArray = ["Airborne Balloon Flights Website"];
	var html = createHTML("Airborne Balloon Flights", "The Hop Farm Country Park", "Paddock Wood", "Kent", "TN12 6PY", evidArray, etitleArray);
	var point = new GPoint(0, 0);
	var marker = createMarker(point, html, "Airborne Balloon Flights");
	map.addOverlay(marker);
	*/
	
	var evidArray = ["http://www.albaballooning.co.uk/"];
	var etitleArray = ["Alba Ballooning Website"];
	var html = createHTML("Alba Ballooning", "12 Gladstone Terrace", "Edinburgh", "", "EH9 1LT", evidArray, etitleArray);
	var point = new GPoint(-3.18413, 55.9383);
	var marker = createMarker(point, html, "Alba Ballooning");
	map.addOverlay(marker);
	
	
	var evidArray = ["http://www.essexballoons.co.uk/"];
	var etitleArray = ["Anglian Countryside Balloons Website"];
	var html = createHTML("Anglian Countryside Balloons", "21 King Edward Avenue", "Burnham on Crouch", "Essex", "CM0 8PB", evidArray, etitleArray);
	var point = new GPoint(0.810469, 51.6347);
	var marker = createMarker(point, html, "Anglian Countryside Balloons");
	map.addOverlay(marker);
	
	
	var evidArray = ["http://www.baileyballoons.co.uk/"];
	var etitleArray = ["Bailey Balloons Website"];
	var html = createHTML("Bailey Balloons", "44 Ham Green", "Bristol", " ", "BS20 0HA", evidArray, etitleArray);
	var point = new GPoint(-2.67909, 51.4763);
	var marker = createMarker(point, html, "Bailey Balloons Website");
	map.addOverlay(marker);
	
	
	var evidArray = ["http://www.balloonridesltd.co.uk/"];
	var etitleArray = ["Balloon Rides Website"];
	var html = createHTML("Balloon Rides Ltd.", "Charity Farm", "Selby", "North Yorkshire", "YO8 5SL", evidArray, etitleArray);
	var point = new GPoint(-1.01596, 53.8421);
	var marker = createMarker(point, html, "Balloon Rides Website");
	map.addOverlay(marker);
	
	/*-2.00651, 51.7493*/
	var evidArray = ["http://www.ballooninginthecotswolds.co.uk/"];
	var etitleArray = ["Ballooning in the Cotswolds Website"];
	var html = createHTML("Ballooning in the Cotswolds", "Fallowfield", "Daglingworth", "Cirencester", "GL7 7HZ", evidArray, etitleArray);
	var point = new GPoint(-2.00651, 51.7493);
	var marker = createMarker(point, html, "Ballooning in the Cotswolds");
	map.addOverlay(marker);
	
	/*-1.4197, 54.0421*/
	var evidArray = ["http://www.blueskyballoons.co.uk/"];
	var etitleArray = ["Blue Sky Balloons Website"];
	var html = createHTML("Blue Sky Balloons", "Moor Lane", "Knaresborough", "Yorkshire", "HG5 0RQ", evidArray, etitleArray);
	var point = new GPoint(-1.4197, 54.0421);
	var marker = createMarker(point, html, "Blue Sky Balloons");
	map.addOverlay(marker);
	
	/*1.28568, 52.6584*/
	var evidArray = ["http://www.broadlandballoons.co.uk/"];
	var etitleArray = ["Broadland Balloons Website"];
	var html = createHTML("Broadland Balloons", "The Richard Nash Group", "Vulcan Rd South", "Norfolk", "NR6 6AG", evidArray, etitleArray);
	var point = new GPoint(1.28568, 52.6584);
	var marker = createMarker(point, html, "Broadland Balloons Website");
	map.addOverlay(marker);
	
	/*0.101359, 50.9705*/
	var evidArray = ["http://www.globalballooning.com/"];
	var etitleArray = ["Global Ballooning Website"];
	var html = createHTML("Global Ballooning", "Arona", "Uckfield", "East Sussex", "TN22 1QT", evidArray, etitleArray);
	var point = new GPoint(0.101359, 50.9705);
	var marker = createMarker(point, html, "Global Ballooning Website");
	map.addOverlay(marker);
	
	/*-1.8064, 52.2235*/
	var evidArray = ["http://www.heartofenglandballoons.co.uk/"];
	var etitleArray = ["Heart of England Balloons Website"];
	var html = createHTML("Heart of England Balloons", "Walcote", "Alcester", "Warwickshire", "B49 6NA", evidArray, etitleArray);
	var point = new GPoint(-1.8064, 52.2235);
	var marker = createMarker(point, html, "Heart of England Balloons");
	map.addOverlay(marker);
	
	/*-2.92003, 54.3673*/
	var evidArray = ["http://www.high-adventure.co.uk/"];
	var etitleArray = ["High Adventure Website"];
	var html = createHTML("High Adventure", "Rayrigg Road", "Bowness on Windermere", "Cumbria", "LA23 3DN", evidArray, etitleArray);
	var point = new GPoint(-2.92003, 54.3673);
	var marker = createMarker(point, html, "High Adventure Website");
	map.addOverlay(marker);
	
	/*-1.8064, 52.2235*/
	var evidArray = ["http://www.the-balloon.co.uk/"];
	var etitleArray = ["Ballooning Business Website"];
	var html = createHTML("The Ballooning Business", "Central Booking Office", "Alcester", "Warwickshire", "B49 6NA", evidArray, etitleArray);
	var point = new GPoint(-1.8064, 52.2235);
	var marker = createMarker(point, html, "The Ballooning Business");
	map.addOverlay(marker);
	
	/*-1.98774, 52.8112*/
	var evidArray = ["http://www.wickersworld.co.uk/"];
	var etitleArray = ["Wickers World Website"];
	var html = createHTML("Wickers World", "Toldish Lane", "Great Haywood", "Staffordshire", "ST18 0RA", evidArray, etitleArray);
	var point = new GPoint(-1.98774, 52.8112);
	var marker = createMarker(point, html, "Wickers World Website");
	map.addOverlay(marker);
	
	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);
	
	/*1.00484, 52.3569 WIZZARD!*/
	

}
   //]]>