var map = null; // The Google Map var gmMarkers = []; // array of marker objects var gmHtml = []; // array of HTML for each marker var gmHtml2 = []; var gmHtml3 = []; var shopIcon = new GIcon(); shopIcon.image = "http://www.suuntoservice.com/dealerlocator/icons/shop_1.png"; shopIcon.iconSize = new GSize(16, 16); shopIcon.iconAnchor = new GPoint(16, 16); shopIcon.infoWindowAnchor = new GPoint(9, 2); // shopIcon.infoShadowAnchor = new GPoint(16, 16); function gmMarkerClicked( url ) { window.opener.location.href = url; window.close(); } function gmCreateMarker( pt, html, icon ) { var marker = new GMarker(pt, icon); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } function gmCreateTabbedMarker(pt,htmls,labels, icon) { var marker = new GMarker(pt, icon); GEvent.addListener(marker, "click", function() { // adjust the width so that the info window is large enough for this many tabs if (htmls.length > 2) { htmls[0] = '
' + htmls[0] + '
'; } var tabs = []; for (var i=0; i" + gmHtml[i] + "")); tabs.push(new GInfoWindowTab("Info",gmHtml[i])); tabs.push(new GInfoWindowTab("Details",gmHtml2[i]+gmHtml3[i])); //tabs.push(new GInfoWindowTab("Services",gmHtml3[i])); if (typeof(gmMarkers[i]) != 'undefined') { gmMarkers[i].openInfoWindowTabsHtml( tabs ); } return true; } function mToPx(lat,zoom) { var c = 256 * Math.pow(2,zoom); // width of the world in pixels var d = 12756000 * Math.PI; // equatorial circumpherence of the world in metres var d = d * Math.cos(lat*Math.PI/180); // circumpherence at this latitude [cos() uses radians] return c/d; // pixels per metre } function setZoom(delta) { if(delta<0){ map.zoomOut(); }else{ map.zoomIn(); } } ///prevent page scroll function wheelevent(e) { if (!e) { e = window.event } if (e.preventDefault) { e.preventDefault() } e.returnValue = false; }