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">Routenbeschreibung <strong>zur Adresse</strong> - <a href="javascript:fromhere(' + counter + ')">von der Adresse</a></p>';
to_htmls[counter] += '<p class="gmapDirItem" id="gmapDirItemTo"><label for="gmapDirSaddr" class="gmapDirLabel" id="gmapDirLabelTo">Startadresse: (Stra&szlig;e/Nr.:, Stadt, 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="Route anzeigen" type="submit" class="gmapDirButton" id="gmapDirButtonTo" /></p>';
to_htmls[counter] += '<input type="hidden" name="daddr" value="' + point.y + ', ' + point.x + '(' + 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">Routenbeschreibung <a href="javascript:tohere(' + counter + ')">zur Adresse</a> - <strong>von der Adresse</strong></p>';
from_htmls[counter] += '<p class="gmapDirItem" id="gmapDirItemFrom"><label for="gmapDirSaddr" class="gmapDirLabel" id="gmapDirLabelFrom">Zieladresse: (Stra&szlig;e/Nr.:, Stadt, 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>';
from_htmls[counter] += '<p class="gmapDirBtns" id="gmapDirBtnsFrom"><input value="Route anzeigen" type="submit" class="gmapDirButton" id="gmapDirButtonFrom" /></p>';
from_htmls[counter] += '<input type="hidden" name="daddr" value="' + point.y + ',' + point.x + '(' + title + ')' + '" /></form>';
html = html + '<br /><div id="gmapDirHead" class="gmapDir" style="white-space: nowrap;">Routenbeschreibung<br /> <a href="javascript:tohere(' + counter + ')">zur Adresse</a> |  <a href="javascript:fromhere(' + counter + ')">von der Adresse</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]);
}
function draw_lapano_map() {
if (GBrowserIsCompatible()) {
var mapObj = document.getElementById("lapano_map");
if (mapObj != "undefined" && mapObj != null) {
map = new GMap(document.getElementById("lapano_map"));
map.centerAndZoom(new GLatLng(51.47981,6.78431), 1);
var bds = map.getBoundsLatLng();
map.zoomTo(5);
bds = map.getBoundsLatLng();
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setMapType(G_HYBRID_MAP);
var point = new GLatLng(51.47981,6.78431);
var marker = createMarker(point, 'Landschaftspark Duisburg-Nord', '<div id="gmapmarker" style="white-space: nowrap;"><div class="tx_lumogooglemaps_pi1_infobox"><b>Landschaftspark Duisburg-Nord</b><br />Emscherstra&szlig;e 71, 47137 Duisburg</a></div></div>', 0);
map.addOverlay(marker);
}
}
else {
//
}
}

setTimeout('draw_lapano_map()', 400);
