var brandgrensOverlay;
var brandgrensOverlayAdded;
var luchtFotoOverlay;
var map;

var markers = new Array();

/*** ICONS ***/
var baseIcon = new GIcon();
baseIcon.shadow = "http://brandgrens.z3.zicht.nl/images/markers/shadow.png";
baseIcon.iconSize = new GSize(33, 40);
baseIcon.shadowSize = new GSize(33, 40);
baseIcon.iconAnchor = new GPoint(21, 32);
baseIcon.infoWindowAnchor = new GPoint(27, 0);
// baseIcon.infoShadowAnchor = new GPoint(18, 25);

var icons = Array();
	
var icon = new GIcon(baseIcon);
icon.image = "http://brandgrens.z3.zicht.nl/images/markers/fotos.png";
icons[1] = icon;

markers[1] = new Array();

var icon = new GIcon(baseIcon);
icon.image = "http://brandgrens.z3.zicht.nl/images/markers/videos.png";
icons[2] = icon;

markers[2] = new Array();

var icon = new GIcon(baseIcon);
icon.image = "http://brandgrens.z3.zicht.nl/images/markers/panden.png";
icons[3] = icon;

markers[3] = new Array();

var icon = new GIcon(baseIcon);
icon.image = "http://brandgrens.z3.zicht.nl/images/markers/bominslagen.png";
icons[4] = icon;

markers[4] = new Array();

var icon = new GIcon(baseIcon);
icon.image = "http://brandgrens.z3.zicht.nl";
icons[5] = icon;

markers[5] = new Array();

var icon = new GIcon(baseIcon);
icon.image = "http://brandgrens.z3.zicht.nl";
icons[6] = icon;

markers[6] = new Array();


/*** MARKERS & LOCATIONS ***/
var activeMarker;
var locations = new Array();
var defaultTexts = new Array();
var introTexts = new Array();
var introIndex = 0;
var introInterval = 8000;
var introIntervalId;

var defaultText = {};
defaultText.locations_id = "3";
defaultText.types_id = "";
defaultText.title = "14 mei 1940:	Bombardement van Rotterdam";
defaultText.text = "13:27 uur: binnen een kwartier werd de historische stad verwoest.";
defaultText.visual = "/images/visuals/intro_step1.gif";
defaultText.address = "";
defaultText.city = "";
defaultText.gm_lon = "";
defaultText.gm_lat = "";
defaultText.gm_accuracy = "";
defaultText.is_default = "1";

introTexts[introTexts.length] = defaultText;

var defaultText = {};
defaultText.locations_id = "4";
defaultText.types_id = "1";
defaultText.title = "Foto standaard tekst";
defaultText.text = "Foto standaard tekst";
defaultText.visual = "";
defaultText.address = "";
defaultText.city = "";
defaultText.gm_lon = "";
defaultText.gm_lat = "";
defaultText.gm_accuracy = "";
defaultText.is_default = "1";

defaultTexts[1] = defaultText;

var defaultText = {};
defaultText.locations_id = "5";
defaultText.types_id = "2";
defaultText.title = "Video standaard tekst";
defaultText.text = "Video standaard tekst Video";
defaultText.visual = "";
defaultText.address = "";
defaultText.city = "";
defaultText.gm_lon = "";
defaultText.gm_lat = "";
defaultText.gm_accuracy = "";
defaultText.is_default = "1";

defaultTexts[2] = defaultText;

var marker = createMarker(new GLatLng('51.91367','4.481834'),icons[3],14);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "14";
locationObject.types_id = "3";
locationObject.title = "Schiedamsedijk hoekpand-95 met aan de achterzijde: Baan 168 - ongenummerd";
locationObject.text = "Bouwjaar hoekpand: 1939<br />Bouwjaar no 95: 1977<br /><br />Het vooroorlogse pand van de GGD, was op 14 mei 1940 nog in aanbouw, de oude<br />kadastrale kaart was op hier nog niet op de bijgewerkt. <br />Architect: A.J. van der Steur";
locationObject.visual = "/images/visuals/01a Schiedamsedijk 96.jpg";
locationObject.address = "Schiedamsedijk 95";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.481834";
locationObject.gm_lat = "51.91367";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[14] = locationObject;

var marker = createMarker(new GLatLng('51.917635','4.475572'),icons[3],15);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "15";
locationObject.types_id = "3";
locationObject.title = "Oude Binnenweg 102-52";
locationObject.text = "Bouwjaar no 102: 1931<br />Bouwjaar no 52: 1954<br />Straatnaam voor 1940: Binnenweg<br />No. 52 e.v. staan een paar meter achter de oude gevelrooilijn. Architect: H.D. Bakker";
locationObject.visual = "/images/visuals/02 Oude Binnenweg 102.jpg";
locationObject.address = "Oude Binnenweg 102";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.475572";
locationObject.gm_lat = "51.917635";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[15] = locationObject;

var marker = createMarker(new GLatLng('51.917548','4.474747'),icons[3],16);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "16";
locationObject.types_id = "3";
locationObject.title = "Mauritsstraat 98 - 96";
locationObject.text = "bouwjaar no 98: 1883<br />bouwjaar no 96: 1981";
locationObject.visual = "/images/visuals/03 Mauritsstraat 98.jpg";
locationObject.address = "Mauritsstraat 98";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.474747";
locationObject.gm_lat = "51.917548";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[16] = locationObject;

var marker = createMarker(new GLatLng('51.917957','4.474560'),icons[3],17);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "17";
locationObject.types_id = "3";
locationObject.title = "Mauritsstraat 36 - pleintje";
locationObject.text = "bouwjaar no 36: 1907<br />no. 36 was Mauritsstraat 84<br />Langs het pand liep een pad naar achter; deze gevel is als buitenmuur gebouwd.<br />functie: school, thans Piet Zwart, grafische opleiding";
locationObject.visual = "/images/visuals/04 Mauritsstraat 36.jpg";
locationObject.address = "Mauritsstraat 36";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.474560";
locationObject.gm_lat = "51.917957";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[17] = locationObject;

var marker = createMarker(new GLatLng('51.919109','4.474447'),icons[3],18);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "18";
locationObject.types_id = "3";
locationObject.title = "Van Oldebarneveltstraat 116 - 114";
locationObject.text = "bouwjaar no 116: 1879<br />bouwjaar no 114: 1956";
locationObject.visual = "/images/visuals/05 Van Oldenbarneveltstraat 116.jpg";
locationObject.address = "Van Oldebarneveltstraat 116";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.474447";
locationObject.gm_lat = "51.919109";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[18] = locationObject;

var marker = createMarker(new GLatLng('51.919680','4.472142'),icons[3],19);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "19";
locationObject.types_id = "3";
locationObject.title = "Mauritsweg 24 - 23";
locationObject.text = "bouwjaar no 24: 1877<br />bouwjaar no 23: 1956&nbsp;";
locationObject.visual = "/images/visuals/06 Mauritsweg 24.jpg";
locationObject.address = "Mauritsweg 24";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.472142";
locationObject.gm_lat = "51.919680";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[19] = locationObject;

var marker = createMarker(new GLatLng('51.92834985018029','4.474697113037109'),icons[3],20);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "20";
locationObject.types_id = "3";
locationObject.title = "Teilingerstraat 83 - 81";
locationObject.text = "bouwjaar no 83: 1923<br />bouwjaar no 81: 1952";
locationObject.visual = "/images/visuals/07 Teilingerstraat 83.jpg";
locationObject.address = "Teilingerstraat 83";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.474697113037109";
locationObject.gm_lat = "51.92834985018029";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[20] = locationObject;

var marker = createMarker(new GLatLng('51.928659','4.474073'),icons[3],21);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "21";
locationObject.types_id = "3";
locationObject.title = "Roo-Valkstraat 26 - 22";
locationObject.text = "bouwjaar no 26: 1905<br />bouwjaar no 22: 1953";
locationObject.visual = "/images/visuals/08 Roo-Valkstraat 26.jpg";
locationObject.address = "Roo-Valkstraat 26";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.474073";
locationObject.gm_lat = "51.928659";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[21] = locationObject;

var marker = createMarker(new GLatLng('51.930429','4.477941'),icons[3],22);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "22";
locationObject.types_id = "3";
locationObject.title = "Teilingersteraat 16 - 34";
locationObject.text = "bouwjaar no 16: 1889<br />bouwjaar no 34: 1981<br />no. 16 was Teilingerstraat 8: dit cijfer 8 is nog zichtbaar boven de voordeuren";
locationObject.visual = "/images/visuals/09 Teilingerstraat 16.jpg";
locationObject.address = "Teilingersteraat 16";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.477941";
locationObject.gm_lat = "51.930429";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[22] = locationObject;

var marker = createMarker(new GLatLng('51.930461','4.478337'),icons[3],23);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "23";
locationObject.types_id = "3";
locationObject.title = "Noordsingel 94 - 92";
locationObject.text = "bouwjaar no 94: 1889<br />bouwjaar no 92: 1951<br />no 92: Rehobot kerk";
locationObject.visual = "/images/visuals/10 Noordsingel 94.jpg";
locationObject.address = "Noordsingel 94";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.478337";
locationObject.gm_lat = "51.930461";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[23] = locationObject;

var marker = createMarker(new GLatLng('51.93017','4.479052'),icons[3],24);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "24";
locationObject.types_id = "3";
locationObject.title = "Noordsingel 70 - 72";
locationObject.text = "bouwjaar no 70: 1888<br />bouwjaar no 72: 1966<br />no 72: architect: Bosch-Hendriks-Campman, Rotterdam. functie: Horecavak school";
locationObject.visual = "/images/visuals/11 Noordsingel 70.jpg";
locationObject.address = "Noordsingel 70";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.479052";
locationObject.gm_lat = "51.93017";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[24] = locationObject;

var marker = createMarker(new GLatLng('51.927684','4.486558'),icons[3],25);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "25";
locationObject.types_id = "3";
locationObject.title = "Jonker Fransstraat 41 - 43";
locationObject.text = "bouwjaar no 41: 1874<br />bouwjaar no 43: 1955<br /><br />de panden ter weerszijde van de brandgrens hebben nu een gezamenlijke winkelpui.";
locationObject.visual = "/images/visuals/12 Jonker Fransstraat 41.jpg";
locationObject.address = "Jonker Fransstraat 41";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.486558";
locationObject.gm_lat = "51.927684";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[25] = locationObject;

var marker = createMarker(new GLatLng('51.92660983516987','4.498879909515381'),icons[3],26);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "26";
locationObject.types_id = "3";
locationObject.title = "Wollefoppenstraat 75 - 77";
locationObject.text = "bouwjaar no 75: 1892<br />bouwjaar no 77: 1956<br /><br />no. 75&nbsp; heeft in 1939 een nieuwe voorgevel gekregen.";
locationObject.visual = "/images/visuals/13 Wollefoppenstraat 75.jpg";
locationObject.address = "Wollefoppenstraat 75";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.498879909515381";
locationObject.gm_lat = "51.92660983516987";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[26] = locationObject;

var marker = createMarker(new GLatLng('51.928326','4.501809'),icons[3],27);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "27";
locationObject.types_id = "3";
locationObject.title = "Weteringstraat 359 - 357";
locationObject.text = "bouwjaar no 359: 1936<br />bouwjaar no 357: 1956<br /><br />no. 359 was Weteringstraat 51<br />oud no. 49 stond op de inventarisatie kaart als behouden, maar is alsnog gesloopt.";
locationObject.visual = "/images/visuals/14 Weteringstraat 359.jpg";
locationObject.address = "Weteringstraat 359";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.501809";
locationObject.gm_lat = "51.928326";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[27] = locationObject;

var marker = createMarker(new GLatLng('51.927608','4.503399'),icons[3],28);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "28";
locationObject.types_id = "3";
locationObject.title = "Kettingstraat 74 - 76";
locationObject.text = "bouwjaar no 74: 1894<br />bouwjaar no 76: 1957";
locationObject.visual = "/images/visuals/15 Kettingstraat 74.jpg";
locationObject.address = "Kettingstraat 74";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.503399";
locationObject.gm_lat = "51.927608";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[28] = locationObject;

var marker = createMarker(new GLatLng('51.92632533960729','4.503922462463379'),icons[3],29);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "29";
locationObject.types_id = "3";
locationObject.title = "Plantageweg 35 - 36";
locationObject.text = "bouwjaar no 35: 1893<br />bouwjaar no 36 nieuw: 1957<br /><br />oud no. 36 stond op de inventarisatie kaart als behouden, maar is alsnog gesloopt.";
locationObject.visual = "/images/visuals/16 Plantageweg 35.jpg";
locationObject.address = "Plantageweg 35";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.503922462463379";
locationObject.gm_lat = "51.92632533960729";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[29] = locationObject;

var marker = createMarker(new GLatLng('51.923569','4.501558'),icons[3],30);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "30";
locationObject.types_id = "3";
locationObject.title = "Dr Zamenhofstraat 57 - 55";
locationObject.text = "bouwjaar no 57: 1893<br />bouwjaar no 55: 1951<br /><br />no. 57 was Plantageweg 93<br />De Plantageweg liep van de Oudedijk tot de Oostzeedijk en is nu in twee&euml;n gedeeld; <br />het zuidelijke deel werd: Dr. Zamenhofstraat, met nieuwe huisnummers.";
locationObject.visual = "/images/visuals/17 Dr Zamenhofstraat 57.jpg";
locationObject.address = "Dr Zamenhofstraat 57";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.501558";
locationObject.gm_lat = "51.923569";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[30] = locationObject;

var marker = createMarker(new GLatLng('51.922246','4.50262'),icons[3],31);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "31";
locationObject.types_id = "3";
locationObject.title = "Infirmeriestraat 4 - 6";
locationObject.text = "bouwjaar no 4: 1901<br />bouwjaar no 6: 1947<br />&nbsp; <br />no 4&nbsp; was onderdeel van een complex met woningen op een pakhuis, caf&eacute; en winkel.<br />van no 4 is alleen de begane grondlaag met nieuwe gevel, nog aanwezig. <br />Boven het caf&eacute; en de winkel is de derde laag met kap verdwenen.<br />No 6: architect: Meischke en Schmidt, Rotterdam.&nbsp;";
locationObject.visual = "/images/visuals/18 Infirmeriestraat 4.jpg";
locationObject.address = "Infirmeriestraat 4";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.50262";
locationObject.gm_lat = "51.922246";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[31] = locationObject;

var marker = createMarker(new GLatLng('51.921485','4.506014'),icons[3],32);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "32";
locationObject.types_id = "3";
locationObject.title = "Oostzeedijk Begraafplaats - inrit P-garage";
locationObject.text = "De begraafplaats in 1696 gesticht door de Portugese Joodse gemeente.<br />bouwjaar no 252: 1982<br />De begraafplaats staat op de inventarisatie kaart uit 1940 als verwoest aangegeven, maar is toch gespaard gebleven. <br />Gebruik no 252: toegang parkeergarage van de kantoren aan de Admiraliteitskade.";
locationObject.visual = "/images/visuals/19 Oostzeedijk Begraaf.jpg";
locationObject.address = "Oostzeedijk";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.506014";
locationObject.gm_lat = "51.921485";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[32] = locationObject;

var marker = createMarker(new GLatLng('51.9223289788116','4.503750801086426'),icons[3],33);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "33";
locationObject.types_id = "3";
locationObject.title = "Oostzeedijk beneden 161 - 159";
locationObject.text = "bouwjaar no 161: 1937<br />bouwjaar no 159: 1947<br /><br />no. 161 was Oostzeedijk 197";
locationObject.visual = "/images/visuals/20 Oostzeedijkben 161.jpg";
locationObject.address = "Oostzeedijk 161";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.503750801086426";
locationObject.gm_lat = "51.9223289788116";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[33] = locationObject;

var marker = createMarker(new GLatLng('51.927098','4.506853'),icons[3],34);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "34";
locationObject.types_id = "3";
locationObject.title = "Noordeinde 32 - 36";
locationObject.text = "bouwjaar no 32: 1894<br />bouwjaar no 36: 1950<br /><br />no 34 stond op de inventarisatie kaart als behouden, maar is alsnog gesloopt.<br />no 36: Architect: A. Claus, Wassenaar.&nbsp; functie: Adviesbureau voor Autogene Lastechniek (AVAL) met leslokalen.";
locationObject.visual = "/images/visuals/21 Noordeinde 32.jpg";
locationObject.address = "Noordeinde 32";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.506853";
locationObject.gm_lat = "51.927098";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[34] = locationObject;

var marker = createMarker(new GLatLng('51.926992','4.507682'),icons[3],35);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "35";
locationObject.types_id = "3";
locationObject.title = "Sionstraat 33 - 37";
locationObject.text = "bouwjaar no 33: 1899<br />bouwjaar no 37: 1957&nbsp;&nbsp;&nbsp;";
locationObject.visual = "/images/visuals/22 Sionstraat 33.jpg";
locationObject.address = "Sionstraat 33";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.507682";
locationObject.gm_lat = "51.926992";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[35] = locationObject;

var marker = createMarker(new GLatLng('51.926996','4.508683'),icons[3],36);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "36";
locationObject.types_id = "3";
locationObject.title = "Gashouderstraat 27 - hoek Taborstraat";
locationObject.text = "bouwjaar no 27: 1902<br />bouwjaar hoekpand: 1960";
locationObject.visual = "/images/visuals/23 Gashouderstraat 27.jpg";
locationObject.address = "Gashouderstraat 27";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508683";
locationObject.gm_lat = "51.926996";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[36] = locationObject;

var marker = createMarker(new GLatLng('51.927304526058656','4.508954286575317'),icons[3],37);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "37";
locationObject.types_id = "3";
locationObject.title = "Taborstraat 15 - 17/21";
locationObject.text = "bouwjaar no 15: 1902<br />bouwjaar no 17 nieuw: 1960<br /><br />oud no. 17 stond op de inventarisatie kaart als behouden, maar is alsnog gesloopt.";
locationObject.visual = "/images/visuals/24 Taborstraat 15.jpg";
locationObject.address = "Taborstraat 15";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508954286575317";
locationObject.gm_lat = "51.927304526058656";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[37] = locationObject;

var marker = createMarker(new GLatLng('51.926531','4.510391'),icons[3],38);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "38";
locationObject.types_id = "3";
locationObject.title = "Willem Ruyslaan 5 - 7";
locationObject.text = "bouwjaar no 5: 1900<br />bouwjaar no 7: 1962";
locationObject.visual = "/images/visuals/25 Willem Ruyslaan 5.jpg";
locationObject.address = "Willem Ruyslaan 5";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.510391";
locationObject.gm_lat = "51.926531";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[38] = locationObject;

var marker = createMarker(new GLatLng('51.922847','4.508462'),icons[3],39);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "39";
locationObject.types_id = "3";
locationObject.title = "Oostmaasstraat 61 - 65";
locationObject.text = "bouwjaar no 61: 1927<br />bouwjaar no 65: 1987<br /><br />no 63 was een bijgebouw van no 61 en is als nummer vervallen, alleen de begane grondlaag met nieuwe gevel is nog aanwezig.";
locationObject.visual = "/images/visuals/26 Oostmaasstraat 61.jpg";
locationObject.address = "Oostmaasstraat 61";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508462";
locationObject.gm_lat = "51.922847";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[39] = locationObject;

var marker = createMarker(new GLatLng('51.92208415706467','4.508814811706543'),icons[3],40);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "40";
locationObject.types_id = "3";
locationObject.title = "Adamshofstraat 149 - tuin kopgevel";
locationObject.text = "bouwjaar no 149: 1912<br /><br />De vrijkomende bouwmuur is kopgevel geworden.";
locationObject.visual = "/images/visuals/27 Adamshofstraat 149.jpg";
locationObject.address = "Adamshofstraat 149";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508814811706543";
locationObject.gm_lat = "51.92208415706467";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[40] = locationObject;

var marker = createMarker(new GLatLng('51.921811','4.508644'),icons[3],41);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "41";
locationObject.types_id = "3";
locationObject.title = "Adamshofstraat 190 - tuin kopgevel";
locationObject.text = "bouwjaar no 190: 1912<br /><br />De vrijkomende bouwmuur is kopgevel geworden.";
locationObject.visual = "/images/visuals/28 Adamshofstraat 190.jpg";
locationObject.address = "Adamshofstraat 190";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508644";
locationObject.gm_lat = "51.921811";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[41] = locationObject;

var marker = createMarker(new GLatLng('51.92116440938245','4.508846998214722'),icons[3],42);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "42";
locationObject.types_id = "3";
locationObject.title = "Aegidiusstraat 239 - tuin kopgevel met berging";
locationObject.text = "bouwjaar no 239: 1901<br /><br />no. 239 was Aegidiusstraat 211; vernummerd vanwege verbouwing tot appartementen.<br />De vrijgekomen bouwmuur is nu kopgevel, waartegen een berging is gebouwd.";
locationObject.visual = "/images/visuals/29 Aegidiusstraat 239.jpg";
locationObject.address = "Aegidiusstraat 239";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508846998214722";
locationObject.gm_lat = "51.92116440938245";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[42] = locationObject;

var marker = createMarker(new GLatLng('51.91872930294874','4.508771896362305'),icons[3],43);
markers[3][markers[3].length] = marker;

var locationObject = {};
locationObject.locations_id = "43";
locationObject.types_id = "3";
locationObject.title = "Oostmaaslaan 255 - 257";
locationObject.text = "bouwjaar no 255: 1894<br />bouwjaar no 257: 1997";
locationObject.visual = "/images/visuals/30 Oostmaaslaan 255.jpg";
locationObject.address = "Oostmaaslaan 255";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.508771896362305";
locationObject.gm_lat = "51.91872930294874";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[43] = locationObject;

var defaultText = {};
defaultText.locations_id = "44";
defaultText.types_id = "3";
defaultText.title = "Standaard tekst over brandgrenspanden";
defaultText.text = "Standaard tekst over brandgrenspanden";
defaultText.visual = "";
defaultText.address = "";
defaultText.city = "";
defaultText.gm_lon = "";
defaultText.gm_lat = "";
defaultText.gm_accuracy = "";
defaultText.is_default = "1";

defaultTexts[3] = defaultText;

var marker = createMarker(new GLatLng('51.923870663458246','4.483280181884766'),icons[2],47);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "47";
locationObject.types_id = "2";
locationObject.title = "Binnenrotte";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/binnenrotte.flv";
locationObject.address = "Binnenrotte";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.483280181884766";
locationObject.gm_lat = "51.923870663458246";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[47] = locationObject;

var marker = createMarker(new GLatLng('51.91886164908389','4.486885070800781'),icons[2],105);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "105";
locationObject.types_id = "2";
locationObject.title = "Blaak";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/blaak.flv";
locationObject.address = "blaak";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.486885070800781";
locationObject.gm_lat = "51.91886164908389";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[105] = locationObject;

var marker = createMarker(new GLatLng('51.92410224241464','4.477701187133789'),icons[2],106);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "106";
locationObject.types_id = "2";
locationObject.title = "Cafe loos";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/cafe_loos.flv";
locationObject.address = "cafe loos";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.477701187133789";
locationObject.gm_lat = "51.92410224241464";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[106] = locationObject;

var marker = createMarker(new GLatLng('51.92166729534219','4.479589462280273'),icons[2],107);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "107";
locationObject.types_id = "2";
locationObject.title = "Coolsingel";
locationObject.text = "<p>Amateurfilm, verzameling Gemeentearchief Rotterdam</p>";
locationObject.visual = "/images/visuals/coolsingel.flv";
locationObject.address = "coolsingel";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.479589462280273";
locationObject.gm_lat = "51.92166729534219";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[107] = locationObject;

var marker = createMarker(new GLatLng('51.924525697987974','4.490017890930176'),icons[2],109);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "109";
locationObject.types_id = "2";
locationObject.title = "Goudsche singel";
locationObject.text = "<p>Amateurfilm, verzameling Gemeentearchief Rotterdam</p>";
locationObject.visual = "/images/visuals/goudsche_singel.flv";
locationObject.address = "goudsche singel";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.490017890930176";
locationObject.gm_lat = "51.924525697987974";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[109] = locationObject;

var marker = createMarker(new GLatLng('51.921402619223514','4.484953880310059'),icons[2],110);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "110";
locationObject.types_id = "2";
locationObject.title = "Groote kerkplein";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/groote_kerkplein.flv";
locationObject.address = "groote kerkplein";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.484953880310059";
locationObject.gm_lat = "51.921402619223514";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[110] = locationObject;

var marker = createMarker(new GLatLng('51.924313970700666','4.477829933166504'),icons[2],111);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "111";
locationObject.types_id = "2";
locationObject.title = "Hofplein";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/hofplein.flv";
locationObject.address = "hofplein";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.477829933166504";
locationObject.gm_lat = "51.924313970700666";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[111] = locationObject;

var marker = createMarker(new GLatLng('51.92132321608359','4.4875288009643555'),icons[2],112);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "112";
locationObject.types_id = "2";
locationObject.title = "Hoogstraat";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/hoogstraat.flv";
locationObject.address = "hoogstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.4875288009643555";
locationObject.gm_lat = "51.92132321608359";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[112] = locationObject;

var marker = createMarker(new GLatLng('51.921720230378654','4.4889020919799805'),icons[2],113);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "113";
locationObject.types_id = "2";
locationObject.title = "Hoogstraat 2";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/hoogstraat_2.flv";
locationObject.address = "hoogstraat 3";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.4889020919799805";
locationObject.gm_lat = "51.921720230378654";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[113] = locationObject;

var marker = createMarker(new GLatLng('51.92322885267802','4.476070404052734'),icons[2],114);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "114";
locationObject.types_id = "2";
locationObject.title = "Hotel Centraal";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/hotel_centraal.flv";
locationObject.address = "hotel centraal";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.476070404052734";
locationObject.gm_lat = "51.92322885267802";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[114] = locationObject;

var marker = createMarker(new GLatLng('51.927542703316696','4.486885070800781'),icons[2],115);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "115";
locationObject.types_id = "2";
locationObject.title = "Jonker Fransstraat";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/jonker_fransstraat.flv";
locationObject.address = "jonker fransstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.486885070800781";
locationObject.gm_lat = "51.927542703316696";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[115] = locationObject;

var marker = createMarker(new GLatLng('51.92230251166008','4.474310874938965'),icons[2],116);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "116";
locationObject.types_id = "2";
locationObject.title = "Kruiskade";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/kruiskade.flv";
locationObject.address = "kruiskade";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.474310874938965";
locationObject.gm_lat = "51.92230251166008";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[116] = locationObject;

var marker = createMarker(new GLatLng('51.922196642897966','4.482336044311523'),icons[2],117);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "117";
locationObject.types_id = "2";
locationObject.title = "Meent";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/meent.flv";
locationObject.address = "meent";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.482336044311523";
locationObject.gm_lat = "51.922196642897966";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[117] = locationObject;

var marker = createMarker(new GLatLng('51.921482022222975','4.48117733001709'),icons[2],118);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "118";
locationObject.types_id = "2";
locationObject.title = "Meent hoek Bulgersteynstraat";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/meent_hoek_bulgerstynstraat.flv";
locationObject.address = "meent hoek bulgerstynstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.48117733001709";
locationObject.gm_lat = "51.921482022222975";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[118] = locationObject;

var marker = createMarker(new GLatLng('51.92013215213121','4.480533599853516'),icons[2],119);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "119";
locationObject.types_id = "2";
locationObject.title = "Passage";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/passage.flv";
locationObject.address = "passage";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.480533599853516";
locationObject.gm_lat = "51.92013215213121";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[119] = locationObject;

var marker = createMarker(new GLatLng('51.933759','4.409907'),icons[2],120);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "120";
locationObject.types_id = "2";
locationObject.title = "Schie";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/schie.flv";
locationObject.address = "schie";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.409907";
locationObject.gm_lat = "51.933759";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[120] = locationObject;

var marker = createMarker(new GLatLng('51.92124381280325','4.482893943786621'),icons[2],122);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "122";
locationObject.types_id = "2";
locationObject.title = "Westewagenstraat";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/westewagenstraat.flv";
locationObject.address = "westewagenstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.482893943786621";
locationObject.gm_lat = "51.92124381280325";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[122] = locationObject;

var marker = createMarker(new GLatLng('51.917869043560415','4.487786293029785'),icons[2],123);
markers[2][markers[2].length] = marker;

var locationObject = {};
locationObject.locations_id = "123";
locationObject.types_id = "2";
locationObject.title = "Wijnhaven";
locationObject.text = "Amateurfilm, verzameling Gemeentearchief Rotterdam";
locationObject.visual = "/images/visuals/wijnhaven.flv";
locationObject.address = "wijnhaven";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.487786293029785";
locationObject.gm_lat = "51.917869043560415";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[123] = locationObject;

var marker = createMarker(new GLatLng('51.9394764117606','4.471993446350098'),icons[1],124);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "124";
locationObject.types_id = "1";
locationObject.title = "Gordelweg";
locationObject.text = "Puinresten na het bombardement van 14 mei 1940. Een verwoest deel van de christelijke ambachtsschool aan de Gordelweg. Bij het Noorderkanaal. Anonieme foto. Datering: 01/06/1940 t/m 31/06/1940";
locationObject.visual = "/images/visuals/AmbachtsschoolGordelweg-1940.jpg";
locationObject.address = "Gordelweg";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.471993446350098";
locationObject.gm_lat = "51.9394764117606";
locationObject.gm_accuracy = "8";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[124] = locationObject;

var marker = createMarker(new GLatLng('51.920782','4.479445'),icons[1],125);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "125";
locationObject.types_id = "1";
locationObject.title = "Coolsingel";
locationObject.text = "Na het opruimen van de puinresten als gevolg van het Duitse bombardement van 14 mei 1940. Op de voorgrond de Coolsingel met het stadhuis. Op de achtergrond het Hofplein. Foto van A. de Herder. Datering: 01/01/1946 t/m 31/12/1946";
locationObject.visual = "/images/visuals/Coolsingel-1946-Herder.jpg";
locationObject.address = "Coolsingel";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.479445";
locationObject.gm_lat = "51.920782";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[125] = locationObject;

var marker = createMarker(new GLatLng('51.922659','4.504771'),icons[1],126);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "126";
locationObject.types_id = "1";
locationObject.title = "Dijkstraat";
locationObject.text = "Gezicht op de door het Duitse bombardement van 14 mei 1940 getroffen Dijkstraat. Vanaf de Oostzeedijk gezien. Uit het zuiden. Anonieme foto. Datering: 14/05/1940 t/m 31/05/1940";
locationObject.visual = "/images/visuals/dijkstraat.jpg";
locationObject.address = "dijkstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.504771";
locationObject.gm_lat = "51.922659";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[126] = locationObject;

var marker = createMarker(new GLatLng('51.920663','4.495596'),icons[1],127);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "127";
locationObject.types_id = "1";
locationObject.title = "Haringvliet";
locationObject.text = "<p>Puinresten van gebouwen als gevolg van het Duitse bombardement van 14 mei 1940. Overzicht van het Haringvliet met het ooglijdersgesticht en het Oostplein met molen De Noord. Uit het zuiden. Op de achtergrond de Koninginnekerk. Anonieme foto. Datering: 06/1940 t/m 31/12/1940 </p>" + 
	"<p>&nbsp;</p>";
locationObject.visual = "/images/visuals/Haringvliet-1940.jpg";
locationObject.address = "Haringvliet";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.495596";
locationObject.gm_lat = "51.920663";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[127] = locationObject;

var marker = createMarker(new GLatLng('51.924303','4.478387'),icons[1],128);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "128";
locationObject.types_id = "1";
locationObject.title = "Hofplein";
locationObject.text = "Het Hofplein met station Hofplein en caf&eacute;-restaurant Loos. Foto van C.J. Nicolai. Datering: 01/06/1940 t/m 31/06/1940.";
locationObject.visual = "/images/visuals/Hofplein-1940-Nicolai.jpg";
locationObject.address = "Hofplein";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.478387";
locationObject.gm_lat = "51.924303";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[128] = locationObject;

var marker = createMarker(new GLatLng('51.921490','4.488659'),icons[1],129);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "129";
locationObject.types_id = "1";
locationObject.title = "Hoogstraat";
locationObject.text = "Puinresten na het bombardement van 14 mei 1940. De Hoogstraat uit het noordoosten. Foto van Fototechnische Dienst Gemeentewerken. Datering: 31/05/1940 t/m 31/12/1940";
locationObject.visual = "/images/visuals/Hoogstraat-1940.jpg";
locationObject.address = "Hoogstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.488659";
locationObject.gm_lat = "51.921490";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[129] = locationObject;

var marker = createMarker(new GLatLng('51.913664','4.478904'),icons[1],130);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "130";
locationObject.types_id = "1";
locationObject.title = "Schiedamsesingel";
locationObject.text = "Spelende kinderen in een ru&iuml;ne aan de Schiedamsesingel. Datering: 1940";
locationObject.visual = "/images/visuals/Schiedamsesingel-1940-2.jpg";
locationObject.address = "Schiedamsesingel 2";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.478904";
locationObject.gm_lat = "51.913664";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[130] = locationObject;

var marker = createMarker(new GLatLng('51.917974','4.485939'),icons[1],132);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "132";
locationObject.types_id = "1";
locationObject.title = "Wijnstraat";
locationObject.text = "De verwoeste Wijnstraat. Links zijn arbeiders bezig met puinruimwerkzaamheden. In het midden een paard en wagen met drie Duitse soldaten. Anonieme foto. Datering: 20/05/1940 t/m 30/05/1940";
locationObject.visual = "/images/visuals/wijnstraat.jpg";
locationObject.address = "wijnstraat";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.485939";
locationObject.gm_lat = "51.917974";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[132] = locationObject;

var marker = createMarker(new GLatLng('51.915635','4.477366'),icons[1],133);
markers[1][markers[1].length] = marker;

var locationObject = {};
locationObject.locations_id = "133";
locationObject.types_id = "1";
locationObject.title = "De Baan";
locationObject.text = "Puinresten na het bombardement van 14 mei 1940. Nog staand pand aan de Baan. Uit het oosten, op de achtergrond de Witte de Withstraat. Foto van J. van Rhijn. Datering: 06/1940 t/m 31/12/1940 <br />";
locationObject.visual = "/images/visuals/WittedeWith-1940-Rhijn.jpg";
locationObject.address = "Witte de With";
locationObject.city = "Rotterdam";
locationObject.gm_lon = "4.477366";
locationObject.gm_lat = "51.915635";
locationObject.gm_accuracy = "6";
locationObject.is_default = "0";
locationObject.marker = marker;
locations[133] = locationObject;

var defaultText = {};
defaultText.locations_id = "135";
defaultText.types_id = "";
defaultText.title = "14 mei 1940:	Bombardement van Rotterdam";
defaultText.text = "850 (circa)  doden <br />2.000  gewonden <br />258  hectare binnenstad in puin <br />25.000  woningen verwoest <br />80.000  mensen dakloos <br />11.000  overige panden verwoest";
defaultText.visual = "/images/visuals/intro_step2.gif";
defaultText.address = "";
defaultText.city = "Rotterdam";
defaultText.gm_lon = "";
defaultText.gm_lat = "";
defaultText.gm_accuracy = "";
defaultText.is_default = "1";

introTexts[introTexts.length] = defaultText;

var defaultText = {};
defaultText.locations_id = "136";
defaultText.types_id = "";
defaultText.title = "18 mei 1940: Opdracht voor herbouwplan Witteveen";
defaultText.text = "B&amp;W geven stadsarchitect ir. W.G. Witteveen opdracht voor een herbouwplan; eind 1940 is het schetsontwerp klaar";
defaultText.visual = "/images/visuals/intro_step3.gif";
defaultText.address = "";
defaultText.city = "Rotterdam";
defaultText.gm_lon = "";
defaultText.gm_lat = "";
defaultText.gm_accuracy = "";
defaultText.is_default = "1";

introTexts[introTexts.length] = defaultText;


/**
	@desc Creates a marker that can be added to the map
	@param (GLatLng) GLatLng object containing coordinates
	@param (GIcon) Icon for marker;
	@param (int) locations_id
**/
function createMarker(point, icon, locations_id) {
	// Set up our GMarkerOptions object
	markerOptions = { icon:icon};
	var marker = new GMarker(point, markerOptions);
	marker.locations_id = locations_id;
	
	GEvent.addListener(marker, "click", onMarkerClick);
	GEvent.addListener(marker, "mouseover", onMarkerMouseOver);
	return marker;
}

function closeOverlay() {	
    if (activeMarker) {
		if(activeMarker.overlay) {
			activeMarker.overlay.clearInterval();
	        map.removeOverlay(activeMarker.overlay);
			
			activeMarker.overlay = null;
		}
    }
    activeMarker = false;
    return false;
}

function handleIntro() {
	introIndex = (introIndex + 1) % introTexts.length;
	updateContent(introTexts[introIndex]);
}

function handleLegendaClick() {
	switch(this.value) {
		case "1":
		case "2":
		case "3":
			// Show markers from certain type
			var marks = markers[this.value];
			for(var i = 0; i < marks.length; i++) {
				if(this.checked) {
					map.addOverlay(marks[i]);
				} else {
					map.removeOverlay(marks[i]);
				}
			}
			break;
		case "4":
			if(this.checked) {
				map.addOverlay(bominslagenOverlay.tileOverlay);
			} else {
				map.removeOverlay(bominslagenOverlay.tileOverlay);
			}
			break;			
		case "5":
			if(this.checked) {
				map.addOverlay(luchtFotoOverlay.tileOverlay);
			} else {
				map.removeOverlay(luchtFotoOverlay.tileOverlay);
			}
			break;
		case "6":
		
			if(this.checked) {
				if(!brandgrensOverlayAdded) {
					map.addOverlay(brandgrensOverlay);
					brandgrensOverlayAdded = true;
				}
			} else {
				if(brandgrensOverlayAdded) {
					map.removeOverlay(brandgrensOverlay);
					brandgrensOverlayAdded = false;						
				}
			}
		
			break;
	}
	if(activeMarker) {
		closeOverlay();
	}
}

function handleOnLoad() {
	if (GBrowserIsCompatible()) {
		initGoogleMaps();
		initLegenda();
	} else {
		alert("Sorry, the Google Maps API is not compatible with this browser");
	}
	
	updateContent(introTexts[0]);
	introIntervalId = setInterval('handleIntro()',introInterval);
}

function initGoogleMaps() {
	map = new GMap2(document.getElementById("map"));
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(51.920045, 4.48930), 13);
	
	map.enableScrollWheelZoom();
	map.enableContinuousZoom();
	map.enableDoubleClickZoom();
	
	GEvent.addListener(map, "zoomend", onZoomEnd);
	
	map.setMapType(G_SATELLITE_MAP);
	// map.setMapType(G_HYBRID_MAP);
	
	// Brandgrens overlay
	brandgrensOverlay = new GGeoXml("http://brandgrens.z3.zicht.nl/brandgrens_def.kml");
	brandgrensOverlayAdded = false;
	
	luchtFotoOverlay = new LuchtFotoOverlay('luftwaffe');
	bominslagenOverlay = new LuchtFotoOverlay('bominslagen');
}

function initLegenda() {
	var checkboxes = document.getElementById('legenda').getElementsByTagName('input');
	for(var i = 0; i < checkboxes.length; i++) {
		checkboxes[i].onclick = handleLegendaClick;
		handleLegendaClick.apply(checkboxes[i]);
	}
}

function onMarkerClick() {
	clearInterval(introIntervalId);
	introIntervalId = null;

	var loc = locations[this.locations_id];
	
	if(!loc.text) {
		loc.text = defaultTexts[loc.types_id].text;
	}
	if(!loc.visual) {
		loc.visual = defaultTexts[loc.types_id].visual;
	}
	
	updateContent(loc);
}

function onMarkerMouseOver() {
	if (activeMarker){
		closeOverlay();
	}
	
	var loc = locations[this.locations_id];
	
	var rolloverText = loc.title;
	// if(!rolloverText) rolloverText = loc.title;
	
	activeMarker = this;
	activeMarker.overlay = new InfoBox(activeMarker, 24, -5, 8, rolloverText);

	map.addOverlay(activeMarker.overlay);
}

function onZoomEnd(oldLevel,newLevel) {
	if(brandgrensOverlayAdded) {
		map.removeOverlay(brandgrensOverlay);
		map.addOverlay(brandgrensOverlay);
	}
	closeOverlay();
}

function updateContent(loc) {
	// Visual
	var visual = document.getElementById('visual');
	
	var isVideo = (loc.visual.substr(loc.visual.length-3,3).toLowerCase() == 'flv');
	if(isVideo)  {
		var so = new SWFObject('http://brandgrens.z3.zicht.nl/flash/mediaplayer.swf','player','464','369','8');
		//so.addParam("allowfullscreen","true");
		so.addParam("bgcolor","#d6594f");
		
		so.addVariable('autostart','true');
		so.addVariable('file',loc.visual);
		so.addVariable('linkfromdisplay','false');
		so.addVariable('lightcolor','0xD6594F');
		so.addVariable('searchbar','false');
		so.addVariable('overstretch','none');
		so.addVariable("width","464");
		so.addVariable("height","369");
		so.write('visual');
	} else if(loc.visual) {
		var images = visual.getElementsByTagName("IMG");
		if(images[0]) {
			var img = images[0];
		} else {	
			visual.innerHTML = '';
			var img = document.createElement("IMG");
			visual.appendChild(img);			
		}
		img.alt = loc.title;
		img.src = loc.visual;
		
		if(introIntervalId) {
			img.onclick = function() {
				clearInterval(introIntervalId);
				introIntervalId = setInterval('handleIntro()',introInterval);
				handleIntro();
			}
		} else {
			img.onclick = null;
		}
	} else {
		visual.innerHTML = '';
	}
	
	// Title & Text
	var textContainer = document.getElementById("textContent");
	
	// Title
	var title = textContainer.getElementsByTagName("H1").item(0);
	title.innerHTML = loc.title;
	
	// Text
	var text = document.getElementById("text").innerHTML = loc.text;
}

/*** INFOBOX - START ***/
function InfoBox(marker,divHeight, anchorOffsetX, anchorOffsetY, divHtml) {
    this.marker = marker;
    this.divHeight = divHeight;
    this.anchorOffsetX = anchorOffsetX;
    this.divHtml = divHtml
    if (null == this.anchorOffsetX){
        this.anchorOffsetX = 0;
    }

    this.anchorOffsetY = anchorOffsetY;

    if (null == this.anchorOffsetY){
        this.anchorOffsetY = 0;
    }

}

InfoBox.prototype = new GOverlay();

InfoBox.prototype.clearInterval = function() {
	if(this.intervalId) clearInterval(this.intervalId);
}

InfoBox.prototype.setInterval = function() {
	if(this.intervalId) this.clearInterval();
	this.intervalId = setTimeout('closeOverlay()',500);
}

InfoBox.prototype.getBackgroundImageUrl = function() {
	var loc = locations[this.marker.locations_id];
	var imageUrl = icons[loc.types_id].image;
	
	var lastIndex = imageUrl.lastIndexOf("/");
	return imageUrl.substr(0,lastIndex) + "/rollovers" + imageUrl.substr(lastIndex,imageUrl.length);
}

InfoBox.prototype.initialize = function(map) {
    var div = document.createElement("div");
    div.style.position = "absolute";
	div.style.height = this.divHeight + "px";
    div.style.left 	= (map.fromLatLngToDivPixel(this.marker.getPoint()).x - this.anchorOffsetX)+ 'px';
    div.style.top 	= (map.fromLatLngToDivPixel(this.marker.getPoint()).y - this.divHeight - this.anchorOffsetY) + 'px';
	
	// div.className = "markerRollover";
	div.style.background = "url('"+this.getBackgroundImageUrl()+"') no-repeat top right";
	div.style.padding = "5px 8px 0px 4px";
	div.style.fontFamily = "Georgia, serif";
	div.style.fontSize = "10px";
	div.style.color = "#FFFFFF";
	
	// div.onmouseout = this.setInterval;
	// div.onmouseover = this.clearInterval;
	
	//div.box = this;
	//div.onclick = function() { this.box.remove(); }
	
	// div.style.overflow = "hidden";
	div.style.whiteSpace = "nowrap";
	// div.style.backgroundColor = "red";
	
    div.innerHTML = this.divHtml	
	
    map.getPane(G_MAP_FLOAT_PANE).appendChild(div);
    this.map_ = map;
    this.div_ = div;
    //this.marker.hide();
}

InfoBox.prototype.remove = function() {
    this.div_.parentNode.removeChild(this.div_);
}

InfoBox.prototype.redraw = function(force) {
    this.div_.style.left 	= (this.map_.fromLatLngToDivPixel(this.marker.getPoint()).x - this.anchorOffsetX)+ 'px';
    this.div_.style.top = (this.map_.fromLatLngToDivPixel(this.marker.getPoint()).y - this.divHeight - this.anchorOffsetY) + 'px';
}
/*** INFOBOX - END ***/

/*** TILE OVERLAY - START ***/
Function.prototype.bind = function ( scope ) {
    var ptr = this;
    return function () {
        return ptr.apply ( scope, arguments );
    };
}

function LuchtFotoOverlay (id) {
	if(id) {
		this.id = id;
	} else {
		this.id = 'luftwaffe';
	}
	
    this.tileLayer = new GTileLayer ( null, 0, 17 );
    this.tileLayer.getTileUrl = function ( point, zoom ) {
        return this.getTileUrl ( point, zoom );
    }.bind(this);
    this.tileLayer.isPng = function () { return true; }
    this.tileLayer.getOpacity = function() { return 0.95; }
    this.tileOverlay = new GTileLayerOverlay ( this.tileLayer );
}
  
    LuchtFotoOverlay.prototype.getTileUrl = function ( point, zoom ) {
        var mapName = this.id;
        var ret = 
            'maps.php?map_name=' + mapName
                + '&x=' + point.x 
                + '&y=' + point.y
                + '&z=' + (17-zoom)
                + '&debug=0';
        return ret;
    }
/*** TILE OVERLAY - END ***/

window.onload = handleOnLoad;