var roundImg = new Image(); roundImg.src = "/images/round_img.gif"; var roundImgOver = new Image(); roundImgOver.src = "/images/round_hover.gif"; if (!document.myGetElementsByClassName) { document.myGetElementsByClassName = function(className) { var children = document.getElementsByTagName('*') || document.all; var elements = new Array(); for (var i = 0; i < children.length; i++) { var child = children[i]; var classNames = child.className.split(' '); for (var j = 0; j < classNames.length; j++) { if (classNames[j] == className) { elements.push(child); break; } } } return elements; } } function initSearchItem(){ var itemObj = document.myGetElementsByClassName('searchItem'); var iLen = itemObj.length; for(var i=0;i"; // Logo if(dataSplit[1]){ var imgSplit = dataSplit[1].split('##'); datStr+="
\""+
"; width = "240px"; }else{ width = "290px"; } datStr+="
"; datStr+="
"+ dataSplit[0] +"
"; datStr+="
"; datStr+="
"+ dataSplit[2].replace(/\[LB\]/g, "
") +"
"; datStr+="
"; datStr+=""; datStr+="
"; if(dataSplit[4]){ var emailSplit = dataSplit[4].split('***'); datStr+=""; } datStr+="
 
"; if(noshow!=-1){ datStr+="
"; datStr+="
 
"; datStr+="
\"Zurück
"; datStr+=""; datStr+="
"; } datStr+="
"; datStr+= ""; datStr+= ""; datStr+= ""; datStr+= "
Routenplaner
"; datStr+= '
End-Adresse:
' + '
' + ''+ ''+ '
'; datStr+= '
Startadresse:
' + '
' + ''+ ''+ '
'; return datStr; } function showAddrMode(mode){ var endAddr = document.getElementById('endAddr'); var stAddr = document.getElementById('stAddr'); switch(mode){ case 1: var focusField = document.getElementById('daddr1'); endAddr.className = (endAddr.className.indexOf('hiddendiv') > -1) ? endAddr.className.replace(/hiddendiv/,'visiblediv') : endAddr.className.replace(/visiblediv/,'hiddendiv'); stAddr.className = stAddr.className.replace(/visiblediv/,'hiddendiv'); //focusField.focus(); break; case 2: var focusField = document.getElementById('saddr2'); stAddr.className = (stAddr.className.indexOf('hiddendiv') > -1) ? stAddr.className.replace(/hiddendiv/,'visiblediv') : stAddr.className.replace(/visiblediv/,'hiddendiv'); // endAddr.className = endAddr.className.replace(/visiblediv/,'hiddendiv'); //focusField.focus(); break; case 0: endAddr.className = endAddr.className.replace(/visiblediv/,'hiddendiv'); stAddr.className = stAddr.className.replace(/visiblediv/,'hiddendiv'); break; } } var map = null; var myicon = "/images/gmapMarker.png"; var myshadowicon = "/images/gmapMarkerShadow.png"; var setIndex = false; var defaultAddress = "bamberg, germany"; var htmls = []; var to_htmls = []; var from_htmls = []; var reasons=[]; //loads the map function loadMap() { var icon = new GIcon(); icon.image = myicon; icon.shadow = myshadowicon; icon.iconSize = new GSize(22, 35); icon.shadowSize = new GSize(100, 33); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); var address = defaultAddress; if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); // Specify controls geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { }else{ map.setCenter(point, 10); var marker = new GMarker(point,icon); } } ); } } } // Not sure if required. function createMarker(point, mapObj, info, iIndex) { var letteredIcon = new GIcon(); letteredIcon.image = "/images/marker/"+ iIndex + ".png"; letteredIcon.shadow = myshadowicon; letteredIcon.iconSize = new GSize(22, 35); letteredIcon.shadowSize = new GSize(37, 30); letteredIcon.iconAnchor = new GPoint(6, 20); letteredIcon.infoWindowAnchor = new GPoint(5, 1); // Set up our GMarkerOptions object markerOptions = { icon:letteredIcon }; mapObj.setCenter(point, 12); var marker = new GMarker(point, markerOptions); GEvent.addListener(marker,"click",function(){ mapObj.setCenter(point, 15); mapObj.addOverlay(marker); var lat = marker.getPoint().lat(); var lng = marker.getPoint().lng(); var point = new GLatLng(lat,lng); marker.openInfoWindowHtml(showBalloon(info,iIndex,point)); }); return marker; } // info - the information to show in the popup bubble // address - the address Google Maps has to search for function showAddress(address,info,key) { var icon = new GIcon(); if(key > 0){ icon.image = "/images/marker/"+ key + ".png"; }else{ icon.image = "/images/gmapMarker.png"; } var backmapdiv = document.getElementById('backtomap'); if(backmapdiv){ backmapdiv.className = backmapdiv.className.replace(/visiblediv/,'hiddendiv'); } icon.shadow = myshadowicon; icon.iconSize = new GSize(22, 35); icon.shadowSize = new GSize(37, 30); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setUIToDefault(); geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { //alert(address + " not found"); } else { map.setCenter(point, 15); var marker = new GMarker(point,icon); map.addOverlay(marker); var lat = marker.getPoint().lat(); var lng = marker.getPoint().lng(); var point = new GLatLng(lat,lng); marker.openInfoWindowHtml(showBalloon(info,key,point)); // To add an event to a marker GEvent.addListener(marker, "click", function() { map.setCenter(point, 15); if(key > 0 || key==-1){ marker.openInfoWindowHtml(showBalloon(info,key,point)); } }); } } ); } } } // info - the information to show in the popup bubble // address - the address Google Maps has to search for function showAddresses(addressArray,infoArray) { setIndex = true; var icon = new GIcon(); icon.image = myicon; icon.shadow = myshadowicon; icon.iconSize = new GSize(22, 35); icon.shadowSize = new GSize(37, 30); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setUIToDefault(); geocoder = new GClientGeocoder(); var index=1; for(i=1;i'+ '

Antiquitäten Heiss
'+ 'Klingenweg 4
'+ '96250 Eggenbach
'+ 'Deutschland

'+ 'fon 09533-982856
'+ 'fax 09533-982857
'+ 'https://www.heiss-antik.de
'+ 'info@heiss-antik.de

'+ ''+ ''; var datStr = ''; datStr += '
Startadresse:
' + '
' + ''+ '
'; var infowindow = new google.maps.InfoWindow({ content: contentString + datStr }); marker.addListener('click', function() { infowindow.open(map, marker); }); google.maps.event.addListenerOnce(map, 'tilesloaded', function(){ var getDirectionsBtn = document.getElementById('getDirectionsBtn'); getDirectionsBtn.addEventListener('click', function() { calculateAndDisplayRoute(directionsService, directionsDisplay); }); }); infowindow.open(map, marker); } function calculateAndDisplayRoute(directionsService, directionsDisplay) { var destination = 'Antiquitäten Heiss Klingenweg 4 96250 Eggenbach/Ebensfeld,Deutschland'; directionsService.route({ origin: document.getElementById('saddr2').value, destination: destination, travelMode: 'DRIVING' }, function(response, status) { if (status === 'OK') { directionsDisplay.setDirections(response); } else { window.alert('Directions request failed due to ' + status); } }); }