//<![CDATA[

//Cheshire


var icon = new GIcon();
icon.image = "maps/mm_20_red.png";
icon.shadow = "maps/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

function showMarker(marker){ //global. called from menu
	
	if(marker){
		GEvent.trigger(marker,"click");
	}else if(touristmarkers[marker]){
		GEvent.trigger(touristmarkers[marker],"click");
	}else{
		alert("Sorry not found");
	}

} //end func

function createSmallMarker(point,html) {
	var marker = new GMarker(point,icon);
	GEvent.addListener(marker,'click',function(){marker.openInfoWindowHtml(html);});
	return marker;
}
function OpenMarker(){
	get_string = document.location.search;
	Charindex = get_string.indexOf('=');
	if(Charindex != -1){
		MarkerName=get_string.substr(Charindex+1, get_string.length - Charindex+1);
		varResult=showMarker(eval(MarkerName));
	}
}
function initialize(){//body onload
	if (GBrowserIsCompatible()){
	
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(53.167357,-2.60788),11);
		
		var manager = new GAdsManager(map,"ca-pub-8858204890177449");
		manager.enable();

		var point = new GLatLng(53.293695,-2.440424);
		showground = createSmallMarker(point,"<div class='bx'><b>The Cheshire Show</b><br>The largest county show in the North West<br>Held at Tabley House, Knutsford.<br><a href=\"http://www.cheshirecountyshow.org.uk\" target=\"_blank\">www.cheshirecountyshow.org.uk<a></div>");
		map.addOverlay(showground);
		
		var point = new GLatLng(53.330479,-2.383545);
  		tatton = createSmallMarker(point,"<div class='bx'><img src='pics/whats_on/orchids.jpg' alt='Tatton Park RHS Flower Show' width='268' height='400'><p><b>Tatton Park</b><br>One of England's finest historic estates.<br>Home to the <b>RHS Flower Show.</b><br><a href='/whats-on/rhs-flower-show-tatton-park-cheshire'>more</a><p>Knutsford, Cheshire WA16 6QN<br><a href=\"http://www.tattonpark.org.uk\" target='_blank'>tattonpark.org.uk</a></p></div>");
  		map.addOverlay(tatton);

		var point = new GLatLng(53.190016,-2.893438);
  		chester = createSmallMarker(point,"<div class='bx'><a href='/panoramics/watergate_street.htm'><img src='maps/images/watergate-street.jpg' border='0' alt='Map of Chester' height='171' width='490'></a><span class='v12'><p><b>The Historic City of Chester</b>&nbsp;&nbsp;<a href='/map-of-chester.htm'>Map of Chester Attractions Here</a></span></div>");
		map.addOverlay(chester);

		var point = new GLatLng(53.176862,-2.616527);
  		oulton = createSmallMarker(point,"<div class='bx'><img src='/pics/whats_on/oulton-park.jpg' alt='Oulton Park' width='300' height='202'><p class='v12'><b>Oulton Park Race Circuit</b><br>Little Budworth, Nr Tarporley<br>Cheshire CW6 9BW</p></div>");
  		map.addOverlay(oulton);

		var point = new GLatLng(53.26366,-2.881165);
  		oaks = createSmallMarker(point,"<div class='bx'><img src='pics/whats_on/mcarthurglen_cheshire_oaks.jpg' alt='McArthur Glen Cheshire' width='129' height='99'><p class='v12'><b>Cheshire Oaks Designer Outlet</b><br>Ellesmere Port<br>South Wirral, Cheshire CH65 9JJ</p>");
  		map.addOverlay(oaks);

		var point = new GLatLng(53.05733,-2.693421);
  		cholmondeley = createSmallMarker(point,"<div class='bx'><img src='/cheshire/cholmondeley.jpg' alt='cholmondeley' width='387' height='150'><p><b>Cholmondeley Castle</b><br>Cholmondeley, Malpas, Cheshire SY14 8EZ<br><br>Home of the <a href='/whats-on/pageant-of-power-cholmondeley-castle'>Pageant of Power</a></p></div>");
  		map.addOverlay(cholmondeley);
		
		var point = new GLatLng(53.233854,-2.304093);
  		jodrell = createSmallMarker(point,"<div class='bx'><img src='/cheshire/jodrell-bank.jpg' border='0' alt='Jodrell Bank' height='193' width='341'><p><b>Jodrell Bank Visitor Centre</b><br>Macclesfield, Cheshire SK11 9DL<br><a href='http://www.jb.man.ac.uk/viscen/' target='_blank'>website</a></p></div>");
  		map.addOverlay(jodrell);

		var point = new GLatLng(53.295824,-2.413559);
  		tabley = createSmallMarker(point,"<div class='bx'><img src='/cheshire/tabley-house.jpg'' border='0' alt='Tabley Cheshire' height='200' width='376'><p class='v12'><b>Tabley House</b><br>Knutsford, Cheshire WA16 0HB</p></div>");
  		map.addOverlay(tabley);

		var point = new GLatLng(53.344083,-2.24988);
  		mill = createSmallMarker(point,"<div class='bx'><img src='/whats-on/images/quarry-bank-mill.jpg' alt='Quarry Bank Mill' width='300' height='196' border='0'><p class='v12'><b>Quarry Bank Mill</b><br>Quarry Bank Road, Styal, Wilmslow<br>Cheshire SK9 4LA<br><a href='whats-on-in-cheshire.htm#mill'>More Info</a></p></div>");
  		map.addOverlay(mill);

		var point = new GLatLng(53.12432,-2.68959);
  		beeston = createSmallMarker(point,"<div class='bx'><img src='/pics/whats_on/beeston_castle.jpg' alt='Beeston Castle' width='330' height='308'><p class='v12'><b>Beeston Castle</b><br>Near Tarporley, Cheshire CW6 9TX<br><a href='whats-on-in-cheshire.htm#beeston'>More Info</a></p></div>");
  		map.addOverlay(beeston);

		var point = new GLatLng(53.324004,-2.490807);
  		arley = createSmallMarker(point,"<div class='bx'><img src='/pics/whats_on/arley.jpg' alt='Arley Hall' width='200' height='149' border='0'><p class='v12'><b>Arley Hall &amp; Gardens</b><br><a href='whats-on-in-cheshire.htm#arley'>More Info</a></p></div>");
  		map.addOverlay(arley);

		var point = new GLatLng(53.274241,-2.528358);
  		lift = createSmallMarker(point,"<div class='bx'><img src='whats-on/images/anderton-boat-lift.jpg' alt='Anderton Boat Lift' width='400' height='244'><p><b>The Anderton Boat Lift</b><br>Lift Lane, Anderton, Northwich<br>Cheshire CW9 6fW<br><a href='/whats-on-in-cheshire.htm#boat_lift'>more info</a></p></div>");
  		map.addOverlay(lift);

		var point = new GLatLng(53.227538,-2.884179);
  		zoo = createSmallMarker(point,"<div class='bx'><img src='/maps/images/chester-zoo.jpg' border='0' alt='Chester Zoo' height='217' width='143'><p class='v12'><b>Chester Zoo</b><br>Upton-by-Chester<br>Chester CH2 1LH<br><a href='whats-on-in-cheshire.htm#zoo'>More Info</a></p></div>");
		map.addOverlay(zoo);	

		
		
		OpenMarker();	

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

}

//]]>
