//<![CDATA[
function toggleDiv(divid){
    if(document.getElementById(divid).style.display == 'none'){
      document.getElementById(divid).style.display = 'block';
    }else{
      document.getElementById(divid).style.display = 'none';
    }
}
function createMarker(point,html) {
	var marker = new GMarker(point,icon);
	GEvent.addListener(marker,'click',function(){marker.openInfoWindowHtml(html);});
	return marker;
}
function showMarker(marker){ //called from menu
	GEvent.trigger(marker,"click");
}
function OpenMarker(){//called from url. needs 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");
	}
}
//red
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);
var brownicon = new GIcon();//brown
brownicon.image = "maps/mm_20_brown.png";
brownicon.shadow = "maps/mm_20_shadow.png";
brownicon.iconSize = new GSize(12, 20);
brownicon.shadowSize = new GSize(22, 20);
brownicon.iconAnchor = new GPoint(6, 20);
brownicon.infoWindowAnchor = new GPoint(5, 1);

function initialize(){
if(GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(53.958964,-1.081037), 15);
		
var manager = new GAdsManager(map,"ca-pub-8858204890177449");
manager.enable();

var point = new GLatLng(53.962296,-1.082421);
Minster = createMarker(point,"<a href='york-minster.html'><img src='pics/thumbs/york_aug06_83.JPG' alt='York Minster' width='160' height='241' border='0'></a><p class='v12'><b>York Minster</b><br><a href='york-minster.html'>Photos of York Minster</a></p>");
map.addOverlay(Minster);

var point = new GLatLng(53.940597,-1.091466);
Knavesmire = createMarker(point,"<img src=\"pics/york_racecourse_thumb.jpg\" width=\"250\" height=\"163\" border='0' alt='York Racecourse'><p class='v12'><b>York Racecourse</b><br><a href=\"york-races.htm\">York Races, Fixtures</a></p>");
map.addOverlay(Knavesmire);

var point = new GLatLng(53.961748,-1.087636);
Museum = createMarker(point,"<a href=\"panoramic_photos/museum-gardens.htm\"><img src=\"panoramic_photos/museum_gardens_york.jpg\" alt=\"Museum Gardens York\" width=\"490\" height=\"141\" border=\"0\"></a><span class='v12'><p><b>The Yorkshire Museum</b>&nbsp;&nbsp;<a href='panoramic_photos/museum-gardens.htm'>Panoramic Photo Here</a></span>");
map.addOverlay(Museum);

var point = new GLatLng(53.955889,-1.079921);
Cliffords = createMarker(point,"<a href='gallery/cliffords-tower-york.htm'><img src='pics/thumbs/york_aug06_57.JPG' alt='Clifford\'s Tower' width='160' height='241' border='0'></a><p class='v12'><b>Clifford's Tower</b><br><a href='gallery/cliffords-tower-york.htm'>Large Photo</a></p>");
map.addOverlay(Cliffords);
	
var point = new GLatLng(53.960757,-1.096809);
NRM = createMarker(point,"<img src=\"attractions/nrm-thumb.jpg\" alt='National Railway Museum' width=\"160\" height=\"118\" border=\"0\"><p class='v12'><b>National Railway Museum</b><br><a href='attractions-in-york.htm#museum'>Photos & Info</a></p>");
map.addOverlay(NRM);

var point = new GLatLng(53.960042,-1.095688);
Big_Wheel = createMarker(point,"<img src=\"maps/images/yorkshire-wheel.jpg\" alt=\"The Yorkshire Wheel\" width=\"300\" height=\"214\" border=\"0\"><p class='v12'><b>The Yorkshire Wheel</b><br><a href='attractions-in-york.htm'>See Attractions in York</a></span>");
 map.addOverlay(Big_Wheel);
			
var point = new GLatLng(53.957329,-1.080189);
Viking = createMarker(point,"<a href='york-museums.htm'><img src=\"/pics/jorvik-viking-centre-york.jpg\" alt=\"JORVIK Viking Centre\" width=\"500\" height=\"191\" border=\"0\"></a><p class='v12'><b>JORVIK Viking Centre</b><br>&bull; <a href='york-museums.htm'>More Info</a><br>&bull; <a href='/whats-on/february.htm'>Jorvik Viking Festival</a></p>");
map.addOverlay(Viking);

var point = new GLatLng(53.955353,-1.078784);
Castle = createMarker(point,'<a href=\'panoramic-tour-of-york/york-castle-area.htm\'><img src="panoramic-tour-of-york/castle_area_york.jpg" alt="York Castle Area" width="490" height="164" border="0"></a><span class=\'v12\'><p><b>York Castle Museum</b>&nbsp;<a href=\'panoramic-tour-of-york/york-castle-area.htm\'>Panoramic Photo</a></span>');
map.addOverlay(Castle);

var point = new GLatLng(53.9601824,-1.08419);
Bettys = createMarker(point,"<a href='restaurants/bettys-tea-rooms'><img src='pics/thumbs/bettys-york.jpg' height='189' width='300' border='0'></a><p class='v12'><b>Betty\'s Tea Rooms</b><br><a href='restaurants/bettys-tea-rooms'>More Info</a></p>");
map.addOverlay(Bettys);

var point = new GLatLng(53.957928,-1.079138);
Hall = createMarker(point,'<a href=\'gallery/merchant-adventurers-hall.htm\'><img src=\"pics/thumbs/merchant_adventurers_hall.jpg\" width=\"150\" height=\"99\" border=\"0\"></a><p class=\'v12\'><b>Merchant Adventurers Hall</b><br><a href=\'gallery/merchant-adventurers-hall.htm\'>Large Photo Here</a></p>');
map.addOverlay(Hall);

var point = new GLatLng(53.962877,-1.078355);
Monk = createMarker(point,'<img src=\"gallery3/monk_bar_york_thumb.jpg\" width=\"170\" height=\"226\" border=\"0\"><p class=\'v12\'><b>Monk Bar</b><br><a href=\'york-photo-gallery-3-bars.htm\'>More Photos Here</a></p>');
map.addOverlay(Monk);

var point = new GLatLng(53.962757,-1.085007);
Bootham = createMarker(point,'<img src=\"gallery3/bootham_bar_thumb.jpg\" width=\"170\" height=\"227\" border=\"0\"><p class=\'v12\'><b>Bootham Bar</b><br><a href=\'york-photo-gallery-3-bars.htm\'>More Photos Here</a></p>');
map.addOverlay(Bootham);

var point = new GLatLng(53.955706,-1.091122);
Mickle = createMarker(point,'<img src=\"gallery3/monk_bar_thumb.jpg\" alt=\"Micklegate Bar\" width=\"170\" height=\"240\"><p class=\'v12\'><b>Micklegate Bar</b><br><a href=\'york-photo-gallery-3-bars.htm\'>More Photos Here</a></p>');
map.addOverlay(Mickle);

var point = new GLatLng(53.962366,-1.080533);
Williams = createMarker(point,'<a href=\'attractions/st-williams-college.htm\'><img src=\"pics/thumbs/st-williams-college.jpg\" width=\"220\" height=\"103\" border=\"0\"></a><span class=\'v12\'><p><a href=\'attractions/st-williams-college.htm\'><b>St. William\'s College</b></a></span>');
map.addOverlay(Williams);

var point = new GLatLng(53.962915,-1.086155);
Art = createMarker(point,'<a href=\'panoramic-york/exhibition-square.htm\'><img src=\"panoramic-york/exhibition_square.jpg\" alt=\"Exhibition Square\" width=\"490\" height=\"131\" border=\"0\"></a><p><span class=\'v12\'><b>York City Art Gallery</b>&nbsp;<a href=\'panoramic-york/exhibition-square.htm\'>Panoramic Photo of Exhibition Square</a></span>');
map.addOverlay(Art);

var point = new GLatLng(53.959197,-1.079975);
Shambles = createMarker(point,'<img src="pics/thumbs/shambles.jpg" alt=\"The Shambles\" width=\"160\" height=\"241\" border=\"0\"><p class=\'v12\'><b>The Shambles</b><br><a href=\'gallery2/the-shambles.html\'>Larger Photos & More Info</a></p>');
map.addOverlay(Shambles);

var point = new GLatLng(53.956955,-1.081869);
Dung = createMarker(point,'<a href=\'york-museums.htm#dungeons\'><img src=\"pics/dungeon.gif\" width=\"180\" height=\"153\" border=\"0\"></a><p class=\'v12\'><a href=\'york-museums.htm#dungeons\'><b>York Dungeons</b></a></p>');
map.addOverlay(Dung);

var point = new GLatLng(53.960958,-1.083333);
Stonegate = createMarker(point,"<a href='/stonegate/stonegate-york.htm'><img src='pics/thumbs/stonegate.jpg' width='160' height='241' border='0'></a><p class='v12'><b>Stonegate</b><br><a href='/stonegate/stonegate-york.htm'>More about Stonegate</a></p>");
map.addOverlay(Stonegate);

var point = new GLatLng(53.960011,-1.084792);
Mansion = createMarker(point,'<a href=\'gallery/mansion-house-york.htm\'><img src="pics/thumbs/york_aug06_46.JPG" alt="Mansion House York" width="160" height="106" border="0"></a><p class=\'v12\'><b>Mansion House</b><br>St Helen’s Square<br>Official residence of the Lord Mayor of York<br><a href=\'gallery/mansion-house-york.htm\'>Large Photo</a></p>');
map.addOverlay(Mansion);

var point = new GLatLng(53.962764,-1.080951);
Treasurer = createMarker(point,'<a href=\'gallery6/treasurers-house.htm\'><img src="gallery6/treasurers-house-thumb.jpg" alt="Treasurer\'s House" width="220" height="125" border="0"></a><p class=\'v12\'><b>Treasurer\'s House</b><br><a href=\'gallery6/treasurers-house.htm\'>A National Trust Property</a></p>');
map.addOverlay(Treasurer);

var point = new GLatLng(53.955245,-1.070791);
Walmgate = createMarker(point,'<a href=\'york-photo-gallery-3-bars.htm\'><img src="gallery3/walmgate_bar_thumb_2.jpg" alt="Walmgate Bar" width="170" height="111" border=\"0\"></a><p class=\'v12\'><b>Walmgate Barbican</b><br><a href=\'york-photo-gallery-3-bars.htm\'>More Photos Here</a></p>');
map.addOverlay(Walmgate);

var point = new GLatLng(53.956824,-1.080179);
Fairfax = createMarker(point,'<a href=\'georgian-york.htm\'><img src="gallery2/fairfax_house_thumb.jpg" alt=\"Fairfax House\" width=\"160\" height=\"241\" border=\"0\"></a><span class=\'v12\'><p><b>Fairfax House</b></p><a href=\'georgian-york.htm\'>Georgian York</a></span>');
map.addOverlay(Fairfax);

var point = new GLatLng(53.922096,-1.077411);
Outlet = createMarker(point,'<a href=\'shopping-in-york.htm\'><img src="/maps/images/logo.gif" alt=\"York Designer Outlet\" width=\"108\" height=\"88\" border=\"0\"></a><span class=\'v12\'><p><b>York Designer Outlet</b></p><a href=\'shopping-in-york.htm\'>Shopping in York</a></span>');
map.addOverlay(Outlet);

var point = new GLatLng(53.962431,-1.085281);
Tourist_Info = createMarker(point,'<a href=\'panoramic-york/exhibition-square.htm\'><img src="/maps/images/tourist-information" alt=\"Official York Tourist Info\" width=\"300\" height=\"208\" border=\"0\"></a><p class=\'v12\'><b>York Tourist Information</b><br>De Grey Rooms<br>Exhibition Square<br>York YO1 7HB<br>Tel. +44 (0)1904 550099 <br><a href=\'panoramic-york/exhibition-square.htm\'>Photo of Exhibition Square</a></p>');
map.addOverlay(Tourist_Info);

var point = new GLatLng(53.925687,-0.964903);
air = createMarker(point,"<a href='york-museums.htm#air_museum'><img src='/pics/air_museum.jpg' alt='Yorkshire Air Museum' width='250' height='148' border='0'></a><p class=\'v12\'><b>Yorkshire Air Museum</b><br>Halifax Way, Elvington, York YO41 4AU<br><a href='york-museums.htm#air_museum'>more info</a></p>");
map.addOverlay(air);

var point = new GLatLng(53.947019,-1.053067);
york_university = createMarker(point,"<img src='/maps/images/york-uni.jpg' alt='York University' width='250' height='250' border='0'></a><p class=\'v12\'><b>University of York</b><br>Heslington, York YO10 5DD</p>");
map.addOverlay(york_university);

var point = new GLatLng(53.960883,-1.082585);
barley = createMarker(point,"<a href='/panoramic_photos/barley-hall.htm'><img src='/panoramic_photos/barley_hall_york.jpg' alt='Barley Hall' width='490' height='205' border='0'></a><p class=\'v12\'><b>Barley Hall</b><br>Coffee Yard, which runs between Grape Lane and Stonegate<br></p>");
map.addOverlay(barley);

var point = new GLatLng(53.959778,-1.085876);
guildhall = createMarker(point,"<a href='/panoramas-of-york-3/york-guildhall.htm'><img src='/panoramas-of-york-3/york-guildhall-thumb.jpg' alt='York Guildhall' width='530' height='172' border='0'></a><p class=\'v12\'><b>York Guildhall</b> - Originally the seat of the York Medieval Guilds<br><a href='/panoramas-of-york-3/york-guildhall.htm'>Panorama Here</a></p>");
map.addOverlay(guildhall);

var point = new GLatLng(53.961898,-1.085152);
theatre = createMarker(point,"<img src='/whats-on/images/york-theatre-royal.png' alt='York Theatre Royal' width='150' height='64'><p class='v12'><b>York Theatre Royal</b><br>St. Leonard's Place, York YO1 7HD<br>Box Office Tel: 01904 623568</p>");
map.addOverlay(theatre);

var point = new GLatLng(53.957088,-1.0821);
opera = createMarker(point,"<img src='/whats-on/images/grand-opera-house-york.gif' alt='Grand Opera House York' width='95' height='88' border='0'><p class='v12'><b>Grand Opera House York</b><br>Cumberland Street, York YO1 9SW<br>Tel: 0844 847 2322 </p>");
map.addOverlay(opera);

var point = new GLatLng(53.941885,-1.054918);
fulford = createMarker(point,"<div class='v12'><img src='/pics/golf.jpg' alt='Fulford Golf Club' width='395' height='263' border='0'><p><b>Fulford Golf Club</b><br>Heslington Lane, York YO10 5DY<br>Tel: 01904 413579</p><a href='/york-golf-courses.htm'>Golf Clubs Near York</a>");
map.addOverlay(fulford);

//drop down list of attractions?
//st johns
//theatre

OpenMarker();


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

//]]>