
function googleInfoTimeOut() {
	setTimeout('googleInfoBox()', 500);
}

function googleInfoBox() {
	htmlText = '<div id="gmapmarker" style="white-space: nowrap;"><div class="tx_lumogooglemaps_pi1_infobox"><b>Brackmann Aanbestedingsspecialist</b><br />Van Nelleweg 1604<br />3044 BC Rotterdam</div></div><br /><div id="gmapDirHead" class="gmapDir" style="white-space: nowrap;">Route: <a href="javascript:tohere(0)">Hier heen</a> - <a href="javascript:fromhere(0)">Hier vandaan</a></div>';
	map.openInfoWindowHtml(map.getCenter(), htmlText, GSize(0, -10));
}

/*************************************************
 * Created with GoogleMapAPI 1.7
 * Author: Monte Ohrt (monte AT ohrt DOT com)
 * Copyright 2005-2006 New Digital Group
 * http://www.phpinsider.com/php/code/GoogleMapAPI/
 *************************************************/

var points = [];
var markers = [];
var counter = 0;
var marker_html = [];
var to_htmls = [];
var from_htmls = [];
var icon = Array();
var map = null;

function createMarker(point, title, html, n) {
	if (n >= 1) {
	n = 0;
	}
	var marker = new GMarker(point, icon[n]);
	to_htmls[counter] = html;
	to_htmls[counter] += '<form class="gmapDir" id="gmapDirTo" style="white-space: nowrap;" action="http://maps.google.com/maps" method="get" target="_blank">';
	to_htmls[counter] += '<p class="gmapDirHead" id="gmapDirHeadTo">Route: <strong>Hier heen</strong> - <a href="javascript:fromhere(' + counter + ')">Hier vandaan</a></p>';
	to_htmls[counter] += '<p class="gmapDirItem" id="gmapDirItemTo"><label for="gmapDirSaddr" class="gmapDirLabel" id="gmapDirLabelTo">Start adres: (adres, stad, land)<br /></label><input type="text" size="40" maxlength="40" name="saddr" class="gmapTextBox" id="gmapDirSaddr" value="" onfocus="this.style.backgroundColor = \'#e0e0e0\';" onblur="this.style.backgroundColor = \'#ffffff\';" /></p>';
	to_htmls[counter] += '<p class="gmapDirBtns" id="gmapDirBtnsTo"><input value="Zoek route!" type="submit" class="gmapDirButton" id="gmapDirButtonTo" /></p>';
	to_htmls[counter] += '<input type="hidden" name="daddr" value="Van Nelleweg 1604,3004 HH, Rotterdam(' + title + ')' + '" /></form>';

	from_htmls[counter] = html;
	from_htmls[counter] += '<form class="gmapDir" id="gmapDirFrom" style="white-space: nowrap;" action="http://maps.google.com/maps" method="get" target="_blank">';
	from_htmls[counter] += '<p class="gmapDirHead" id="gmapDirHeadFrom">Route: <a href="javascript:tohere(' + counter + ')">Hier heen</a> - <strong>Hier vandaan</strong></p>';
	from_htmls[counter] += '<p class="gmapDirItem" id="gmapDirItemFrom"><label for="gmapDirSaddr" class="gmapDirLabel" id="gmapDirLabelFrom">Doel adres: (adres, stad, land)<br /></label><input type="text" size="40" maxlength="40" name="daddr" class="gmapTextBox" id="gmapDirSaddr" value="" onfocus="this.style.backgroundColor = \'#e0e0e0\';" onblur="this.style.backgroundColor = \'#ffffff\';" /></p>';
	from_htmls[counter] += '<p class="gmapDirBtns" id="gmapDirBtnsFrom"><input value="Zoek route!" type="submit" class="gmapDirButton" id="gmapDirButtonFrom" /></p>';
	from_htmls[counter] += '<input type="hidden" name="saddr" value="Van Nelleweg 1604,3004 HH, Rotterdam(' + title + ')' + '" /></form>';

	html = html + '<br /><div id="gmapDirHead" class="gmapDir" style="white-space: nowrap;">Route: <a href="javascript:tohere(' + counter + ')">Hier heen</a> - <a href="javascript:fromhere(' + counter + ')">Hier vandaan</a></div>';
	GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); });
	points[counter] = point;
	markers[counter] = marker;
	marker_html[counter] = html;
	counter++;
	return marker;
}

function click_sidebar(idx) {
markers[idx].openInfoWindowHtml(marker_html[idx]);
}

function showInfoWindow(idx,html) {
map.centerAtLatLng(points[idx]);
markers[idx].openInfoWindowHtml(html);
}

function tohere(idx) {
markers[idx].openInfoWindowHtml(to_htmls[idx]);
}

function fromhere(idx) {
markers[idx].openInfoWindowHtml(from_htmls[idx]);
}

/*************************************************
 * Created with GoogleMapAPI 1.7
 * Author: Monte Ohrt (monte AT ohrt DOT com)
 * Copyright 2005-2006 New Digital Group
 * http://www.phpinsider.com/php/code/GoogleMapAPI/
 *************************************************/



function draw_map_brackmann() {
	if (GBrowserIsCompatible()) {
		var mapObj = document.getElementById("map_brackmann");
		if (mapObj != "undefined" && mapObj != null) {
			map = new GMap(document.getElementById("map_brackmann"));
			map.centerAndZoom(new GPoint(4.435213, 51.922643), 2);
			var bds = map.getBoundsLatLng();
			for (var z = 2; bds.minX > 4.435213|| bds.minY > 51.922643|| bds.maxX < 4.435213|| bds.maxY < 51.922643; z++) {
				map.zoomTo(z);
				bds = map.getBoundsLatLng();
			}
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			/*map.setMapType(G_HYBRID_TYPE);*/
			var point = new GPoint(4.435213, 51.922643);
			var marker = createMarker(point, 'Brackmann Aanbestedingsspecialist','<div id="gmapmarker" style="white-space: nowrap;"><div class="tx_lumogooglemaps_pi1_infobox"><b>Brackmann Aanbestedingsspecialist</b><br />Van Nelleweg 1604<br />Rotterdam</div></div>', 0);
			map.addOverlay(marker);
		}
	} else {
		alert("Sorry, de Google Maps API is niet beschikbaar in deze browser.");
	}
}

