//<![CDATA[
//Bath BandB


function toggleDiv(divid){
    if(document.getElementById(divid).style.display == 'none'){
      document.getElementById(divid).style.display = 'block';
    }else{
      document.getElementById(divid).style.display = 'none';
    }
}

function showMarker(marker){ //menu clicked
	if(marker){
		GEvent.trigger(marker,"click");
	}else{
		alert("Sorry not found");
	}
}

function initialize(){
	if(GBrowserIsCompatible()) {
		
		function createMarker(point,html) {
			var marker = new GMarker(point); //new GMarker(point,aicon);
			GEvent.addListener(marker,'click',function(){marker.openInfoWindowHtml(html);});
			return marker;
		}
		function OpenMarker(){ //null check?
			get_string = document.location.search;
			Charindex = get_string.indexOf('=');
			if(Charindex != -1){
				MarkerName = get_string.substr(Charindex+1,get_string.length - Charindex+1);
				GEvent.trigger(eval(MarkerName),"click"); //new
			}
		}
		
		
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(51.380473,-2.356911),15);

		/* blue A icon
		var aicon = new GIcon();
		aicon.image =  "/maps/a.png";
		aicon.shadow = "/maps/shadow50.png";
		aicon.iconSize = new GSize(20,34);
		aicon.shadowSize = new GSize(37,34);
		aicon.iconAnchor = new GPoint(9,34);
		aicon.infoWindowAnchor = new GPoint(9,2);
		aicon.infoShadowAnchor = new GPoint(18,25);
		*/

		var point = new GLatLng(51.379722,-2.350614);
		lynwood = createMarker(point,"<img src='pulteney-gardens.jpg' border='0' width='141' height='209' alt='Lynwood House'><p class='v12'><b>Lynwood House</b><br>4* Guest House<br>6 Pulteney Gardens, Bath BA2 4HG<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/146041_lynwood-house-bath.aspx'>Tariff / Booking</a></p>");
		map.addOverlay(lynwood);
			
		var point = new GLatLng(51.384112,-2.354634);
		windsor = createMarker(point,"<img src='thumbs/the-windsor.jpg' border='0' width='320' height='240' alt='The Windsor'><p class='v12'><b>The Windsor</b><br>4* Guest House<br>69 Great Pulteney Street, Bath BA2 4DL<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/146820_the-windsor-bath.aspx'>Tariff / Booking</a></p>");
		map.addOverlay(windsor);

		var point = new GLatLng(51.383814,-2.369881);
		royal = createMarker(point,"<p class='v12'><b>Royal Park</b><br>4* Silver Awarded Guest House<br>16 Crescent Gardens, Upper Bristol Rd, Bath BA1 2NA<br><a href='http://www.royalparkbath.co.uk' target='_blank'>www.royalparkbath.co.uk</a></p>");
		map.addOverlay(royal);

		var point = new GLatLng(51.375717,-2.368833);
		oldfields = createMarker(point,"<img src='thumbs/oldfields.jpg' border='0' width='326' height='200' alt='Oldfields'><p class='v12'><b>Oldfields</b><br>4* Guest House<br>102 Wells Road, Bath BA2 3AL<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/83825_oldfields-hotel-bath.aspx'>Tariff / Booking</a></p>");
		map.addOverlay(oldfields);

		var point = new GLatLng(51.37532,-2.368492);
		highways = createMarker(point,"<img src='thumbs/highways-house.jpg' border='0' width='271' height='186' alt='Highways House'><p class='v12'><b>Highways House</b><br>4* Bed & Breakfast<br>143 Wells Road, Bath BA2 3AL<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/1325_highways-house-bath.aspx'>Tariff / Booking</a></p>");
		map.addOverlay(highways);

		var point = new GLatLng(51.376,-2.363561);
		paradise = createMarker(point,"<img src='paradise-house.jpg' border='0' width='320' height='179' alt='Paradise House'><p class='v12'><b>Paradise House</b><br>5* Bed & Breakfast<br>86-88 Holloway, Bath BA2 4PX<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/4765_bath-paradise-house-bath.aspx'>Tariff / Booking</a></p>");
		map.addOverlay(paradise);

		var point = new GLatLng(51.37535,-2.369989);
		cheriton = createMarker(point,"<img src='thumbs/cheriton-house.jpg' border='0' width='300' height='200' alt='Cheriton House'><p class='v12'><b>Cheriton House</b><br>5* Guest House<br>9 Upper Oldfield Park, Bath BA2 3JX<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/98357_cheriton-house-bath.aspx'>Tariff / Booking</a></p>");
		map.addOverlay(cheriton);

		var point = new GLatLng(51.382809,-2.351473);
		ayrlington = createMarker(point,"<img src='thumbs/ayrlington.jpg' border='0' width='262' height='200' alt='The Ayrlington'><p class='v12'><b>The Ayrlington</b><br>5* Guest Accommodation<br>24/25 Pulteney Road, Bath BA2 4EZ<br><a href='http://www.ayrlington.com' target='_blank'>More Info</a></p>");
		map.addOverlay(ayrlington);

		var point = new GLatLng(51.383686,-2.36913);
		albany = createMarker(point,"<img src='thumbs/albany.jpg' border='0' width='193' height='197' alt='The Albany'><p class='v12'><b>The Albany</b><br>4* Guest House<br>24 Crescent Gardens, Upper Bristol Rd<br>Bath BA1 2NB<br><a href='http://www.albanybath.co.uk' target='_blank'>More Info</a></p>");
		map.addOverlay(albany);

		var point = new GLatLng(51.375497,-2.369294);
		dorian = createMarker(point,"<img src='thumbs/dorian.jpg' border='0' width='179' height='200' alt='Dorian House'><p class='v12'><b>Dorian House</b><br>5* Guest House<br>1 Upper Oldfield Park, Bath BA2 3JX<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/372_dorian-house-bath.aspx'>More Info</a></p>");
		map.addOverlay(dorian);

		var point = new GLatLng(51.383593,-2.351836);
		county = createMarker(point,"<img src='thumbs/the-county-hotel-bath.jpg' border='0' width='300' height='293' alt='The County Hotel'><p class='v12'><b>The County Hotel</b><br>5* Guest Accommodation<br>18-19 Pulteney Road, Bath BA2 4EZ<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/4937_county-hotel-bath.aspx'>More Info</a></p>");
		map.addOverlay(county);

		var point = new GLatLng(51.383594,-2.368565);
		number30 = createMarker(point,"<img src='thumbs/no-30.jpg' border='0' width='150' height='200' alt='30 Crescent Gardens'><p class='v12'><b>Number 30</b><br>4 Star Guest Accommodation<br>30 Crescent Gardens, Bath BA1 2NB<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/86808_number-30-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(number30);

		var point = new GLatLng(51.385065,-2.370814);
		parkside = createMarker(point,"<img src='thumbs/parkside.jpg' border='0' width='243' height='200' alt='Parkside'><p class='v12'><b>Parkside</b><br>4 Star Guest Accommodation<br>11 Marlborough Lane, Bath BA1 2NQ<br><a href='http://www.parksidebandb.co.uk' target='_blank'>More Info</a></p>");
		map.addOverlay(parkside);

		var point = new GLatLng(51.375973,-2.371727);
		athole = createMarker(point,"<img src='thumbs/athole.jpg' border='0' width='133' height='150' alt='Athole Guest House'><p class='v12'><b>Athole Guest House</b><br>4 Star Guest Accommodation<br>33 Upper Oldfield Park, Bath BA2 3JX<br><a href='http://www.atholehouse.co.uk' target='_blank'>More Info</a></p>");
		map.addOverlay(athole);

		var point = new GLatLng(51.386458,-2.363241);
		townhouse = createMarker(point,"<img src='thumbs/townhouse-bath.jpg' border='0' width='200' height='287' alt='The Town House'><p class='v12'><b>The Town House</b><br>Bed & Breakfast<br>7 Bennett Street, Bath BA1 2QJ<br><a href='http://www.thetownhousebath.co.uk' target='_blank'>More Info</a></p>");
		map.addOverlay(townhouse);

		var point = new GLatLng(51.379853,-2.357463);
		Henry = createMarker(point,"<img src='thumbs/the-henry-guest-house.jpg' border='0' width='170' height='228' alt='The Henry'><p class='v12'><b>The Henry</b><br>Guest House<br>6 Henry Street, Bath BA1 1JT<br><a href='http://www.thehenry.com' target='_blank'>More Info</a></p>");
		map.addOverlay(Henry);

		var point = new GLatLng(51.387886,-2.395669);
		apsley = createMarker(point,"<img src='thumbs/apsley-house-bath.jpg' border='0' width='300' height='225' alt='Apsley House'><p class='v12'><b>Apsley House</b><br>5* B&B<br>Newbridge Hill, Bath BA1 3PT<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/147040_apsley-house-hotel-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(apsley);

		var point = new GLatLng(51.383459,-2.367712);
		bathhouse = createMarker(point,"<img src='thumbs/bath-house-bandb.jpg' border='0' width='250' height='286' alt='The Bath House'><p class='v12'><b>The Bath House</b><br>4* Luxury B&B<br>40 Crescent Gardens, Upper Bristol Rd<br>Bath BA1 2NB<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/142591_the-bath-house-luxury-b-b-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(bathhouse);

		var point = new GLatLng(51.38421,-2.371336);
		marlborough = createMarker(point,"<img src='thumbs/marlborough-lane-bath.jpg' border='0' width='300' height='225' alt='Marlborough House'><p class='v12'><b>Marlborough House</b><br>4* Guest House<br>1 Marlborough Lane, Bath BA1 2NQ<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/69706_marlborough-house-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(marlborough);
		
		var point = new GLatLng(51.380533,-2.358866);
		abbeygreen = createMarker(point,"<img src='thumbs/b&b-bath.jpg' border='0' width='200' height='247' alt='Three Abbey Green'><p class='v12'><b>Three Abbey Green</b><br>4* Guest House<br>Abbey Green, Bath BA1 1NW<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/97691_three-abbey-green-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(abbeygreen); //same as hotel map!

		var point = new GLatLng(51.368341,-2.371274);
		meadowland = createMarker(point,"<img src='thumbs/bath_meadowland_b&b.jpg' border='0' width='300' height='225' alt='Bath Meadowland'><p class='v12'><b>Bath Meadowland</b><br>5* B&B<br>36 Bloomfield Park, Bath BA2 2BX<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/4548_bath-meadowland-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(meadowland);

		var point = new GLatLng(51.387433,-2.354174);
		chestnuts = createMarker(point,"<img src='thumbs/henrietta-road-bath.jpg' border='0' width='300' height='219' alt='Chestnuts House'><p class='v12'><b>Chestnuts House</b><br>4* B&B<br>16, Henrietta Road, Bath BA2 6LY<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/145626_chestnuts-house-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(chestnuts);

		//needs photo!
		var point = new GLatLng(51.377364,-2.373618);
		beckford = createMarker(point,"<img src=\"beckford-house-bath.jpg\" width=\"300\" alt=\"Beckford House\"><p class='v12'><b>Beckford House</b><br>4* B&B<br>59 Upper Oldfield Park, Bath BA2 3LB<br><a href='http://www.beckford-house.com' target='_blank'>More Info</a></p>");
		map.addOverlay(beckford);

		var point = new GLatLng(51.386936,-2.398982);
		new_bridge = createMarker(point,"<img src='newbridge-road.jpg' border='0' width='300' height='216' alt='Aquae Sulis'><p class='v12'><b>Aquae Sulis</b><br>4 Star Guest House<br>174-176 New Bridge Road, Bath BA1 3LE<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/145888_aquae-sulis-bath.aspx'>Tariff and Booking</a></p>");
		map.addOverlay(new_bridge);

		var point = new GLatLng(51.380931,-2.348636);
		tolley = createMarker(point,"<p class='v12'><b>Tolley Cottage</b><br>Bed & Breakfast<br>23 Sydney Buildings, Bath BA2 6BZ<br><a href='http://www.tolleycottage.co.uk' target='_blank'>More..</a></p>");
		map.addOverlay(tolley);

		var point = new GLatLng(51.301849,-2.325379);
		plaine = createMarker(point,"<p class='v12'><b>The Plaine</b><br>Bed and Breakfast<br>Bell Hill, Norton St Philip, Bath<br>Telephone 01373 834 723<br><a href='http://www.theplaine.co.uk' target='_blank'>Read more &raquo;</a></p>");
		map.addOverlay(plaine);
		
		var point = new GLatLng(51.384653,-2.349851);
		charlotte = createMarker(point,"<img src='sydney-place-bath.jpg' border='0' width='320' height='213' alt='Queen Charlottes Orangery Bath'><p class='v12'><b>Queen Charlotte\'s Orangery</b><br>4 Star Guest House<br>The Orangery<br>93a Sydney Place, Bath<br>Somerset, BA2 6NE<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/124477_queen-charlottes-orangery-bath.aspx?n=0&d=20080411'>Tariff and Booking &raquo;</a></p>");
		map.addOverlay(charlotte);

		var point = new GLatLng(51.383749,-2.369442);
		crescent = createMarker(point,"<img src='crescent-gardens-bath.jpg' border='0' width='320' height='240' alt='21 Crescent Gardens Bath'><p class='v12'><b>Crescent Guesthouse</b><br>4* Bed & Breakfast<br>21 Crescent Gardens, Bath BA1 2NA<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/146223_crescent-guesthouse-bath.aspx'>Tariff and Booking</a> &raquo;</p>");
		map.addOverlay(crescent);

		var point = new GLatLng(51.387486,-2.350559);
		greenways = createMarker(point,"<img src='forester-rd-bath.jpg' border='0' width='300' height='221' alt='Greenways'><p class='v12'><b>Greenways Guesthouse</b> 3 Star<br>1 Forester Road, Bathwick, Bath BA2 6QF<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/147461_greenways-bath.aspx'>Tariff and Booking</a> &raquo;</p>");
		map.addOverlay(greenways);

		var point = new GLatLng(51.390741,-2.338629);
		leonards = createMarker(point,"<p class='v12'><b>St Leonards</b> 4 Star<br>Warminster Road, Bath BA2 6SQ<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/87169_st-leonards-bath.aspx'>Tariff and Booking</a> &raquo;</p>");
		map.addOverlay(leonards);

		var point = new GLatLng(51.380837,-2.340258);
		hunters = createMarker(point,"<img src=\"bathwick-bandb.gif\" width=\"300\"><p class='v12'><b>Hunters Spinney</b><br>North Road, Bathwick, Bath BA2 6HP<br><a href='http://www.huntersspinney.co.uk' target='_blank'>More Information</a> &raquo;</p>");
		map.addOverlay(hunters);

		var point = new GLatLng(51.391814,-2.335016);
		tasburgh = createMarker(point,"<p class='v12'><b>Tasburgh House</b> 5 Star<br>Warminster Rd, Bath BA2 6SH<br><a href='http://www.bathtasburgh.co.uk' target='_blank'>More Information</a> &raquo;</p>");
		map.addOverlay(tasburgh);

		var point = new GLatLng(51.333394,-2.316919);
		priory = createMarker(point,"<p class='v12'><b>Priory Cottage</b><br>Abbey Lane, Hinton Charterhouse<br>Bath BA2 7TD<br><a href='http://www.priorycottagebath.co.uk' target='_blank'>More Information</a> &raquo;</p>");
		map.addOverlay(priory);

		var point = new GLatLng(51.383808,-2.369791);
		waltons = createMarker(point,"<img src='waltons-guest-house.jpg' border='0' width='199' height='301' alt='Waltons'><p class='v12'><b>Waltons Guest House</b><br>17 Crescent Gardens, Upper Bristol Road<br>Bath BA1 2NA<br><a href='http://www.bathguesthouse.com/' target='_blank'>More Information</a> &raquo;</p>");
		map.addOverlay(waltons);
		
		var point = new GLatLng(51.329604,-2.313778);
		friary = createMarker(point,"<img src='friary-dene-guest-house.jpg' border='0' width='320' height='214' alt='Friary Dene'><p class='v12'><b>Friary Dene Guest House</b><br>Frome Road, Hinton Charterhouse,<br>Bath<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/194233_friary-dene-bath.aspx'>More Information</a> &raquo;</p>");
		map.addOverlay(friary);
		
		var point = new GLatLng(51.368434,-2.368432);
		bloomfield = createMarker(point,"<img src='bloomfield-house.jpg' border='0' width='350' height='233' alt='Bloomfield House'><p class='v12'><b>Bloomfield House</b><br>146 Bloomfield Rd, Bath BA2 2AS<br><a href='http://www.laterooms.com/en/p3008/hotel-reservations/89957_bloomfield-house-bath.aspx'>More Information</a> &raquo;</p>");
		map.addOverlay(bloomfield);
		
		

		OpenMarker();
			
}else{
	alert("Sorry your browser is not compatible with our map.");
}

}
//]]>