var map = new Array();
var mgr = new Array();
var geocoder = null;
function googlemap_initialize() {
 if (GBrowserIsCompatible()) {
for(var m = 0;m<mapids.length;m++)
{
map[m] = new GMap2(document.getElementById(mapids[m]));
map[m].addControl(new GSmallMapControl());map[m].enableScrollWheelZoom();
map[m].setCenter(new GLatLng(37.4419, -122.1419), 5);
mgr[m] = new GMarkerManager(map[m]);
 }
geocoder = new GClientGeocoder();
 }
}
function googlemap_showAddress(mapnr, address, zoom, icon, text, lat, lon) {
if(!zoom)
{
zoom = 3;
}
if(geocoder) {
geocoder.getLatLng(
address,
function(point) {
if(!point && lat && lon) {
point = new GLatLng(lon, lat);
}
if(!point) {
googlemap_alert(address + " not found");
} else {
googlemap_showAddressDirekt(mapnr, address, zoom, icon, text, point);
}
}
);
}
}
function googlemap_showAddressDirekt(mapnr, address, zoom, icon, text, point)
{
if(icon && text)
{
map[mapnr].addOverlay(createMarker(point, icon, text));
}
map[mapnr].setCenter(point, parseInt(zoom));
}
function googlemap_showAddresses(adressen, zooms, coords) {
for(var i=0; i<adressen.length; i++)
{
googlemap_showAddress(i, adressen[i], zooms[i], '', '', coords[i]);
}
}
var IconBusreise = new GIcon();
IconBusreise.image = "http://www.zebra-tours.de//viomatrix/imgs/pics/20091028_ke6qdt_zeb_pfeil_32_bus_res_32x56_sft_png.png";
IconBusreise.iconSize = new GSize(32,56);
IconBusreise.iconAnchor = new GPoint(16, 56);
IconBusreise.infoWindowAnchor = new GPoint(16, 28);
IconBusreise.shadow = "";
var IconEigenanreise2 = new GIcon();
IconEigenanreise2.image = "http://www.zebra-tours.de//viomatrix/imgs/pics/20091028_g1ncur_zeb_pfeil_32_res_32x56_sft_png.png";
IconEigenanreise2.iconSize = new GSize(32,56);
IconEigenanreise2.iconAnchor = new GPoint(16, 56);
IconEigenanreise2.infoWindowAnchor = new GPoint(16, 28);
IconEigenanreise2.shadow = "";
var IconZuganreise = new GIcon();
IconZuganreise.image = "http://www.zebra-tours.de//viomatrix/imgs/pics/20091028_rn6sa9_zeb_pfeil_32_zug_res_32x56_sft_png.png";
IconZuganreise.iconSize = new GSize(32,56);
IconZuganreise.iconAnchor = new GPoint(16, 56);
IconZuganreise.infoWindowAnchor = new GPoint(16, 28);
IconZuganreise.shadow = "";
var IconFlugreise = new GIcon();
IconFlugreise.image = "http://www.zebra-tours.de//viomatrix/imgs/pics/20091028_zouxhd_zeb_pfeil_32_flug_res_32x56_sft_png.png";
IconFlugreise.iconSize = new GSize(32,56);
IconFlugreise.iconAnchor = new GPoint(16, 56);
IconFlugreise.infoWindowAnchor = new GPoint(16, 28);
IconFlugreise.shadow = "";
var IconSchiffsreise = new GIcon();
IconSchiffsreise.image = "http://www.zebra-tours.de//viomatrix/imgs/pics/20091028_nmn91m_zeb_pfeil_32_schiff_res_32x56_sft_png.png";
IconSchiffsreise.iconSize = new GSize(32,56);
IconSchiffsreise.iconAnchor = new GPoint(16, 56);
IconSchiffsreise.infoWindowAnchor = new GPoint(16, 28);
IconSchiffsreise.shadow = "";
var IconEigenanreise = new GIcon();
IconEigenanreise.image = "http://www.zebra-tours.de//viomatrix/imgs/pics/20091028_9rkwhy_zeb_pfeil_32_auto_res_32x56_sft_png.png";
IconEigenanreise.iconSize = new GSize(32,56);
IconEigenanreise.iconAnchor = new GPoint(16, 56);
IconEigenanreise.infoWindowAnchor = new GPoint(16, 28);
IconEigenanreise.shadow = "";
function googlemap_setMarker(mapnr, address, icon, text, lat, lon) {
if(geocoder) {
geocoder.getLatLng(
address,
function(point) {
if(!point && lat && lon) {
point = new GLatLng(lon, lat);
}
if (!point) {
googlemap_alert(address + " not found");
} else {
if(icon && text)
{
mgr[mapnr].addMarker(createMarker(point, icon, text),5);
}
}
}
);
mgr[mapnr].refresh();
}
}
function createMarker(point, icon, text) {
if(!icon)
{
icon = G_DEFAULT_ICON;
}
var googlemap_myIcon = new GIcon(icon);
markerOptions = { icon:googlemap_myIcon };
var marker = new GMarker(point, markerOptions);
if(text)
{
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(text);
});
}
return marker;
}
function googlemap_alert(text)
{
}