﻿// Google maps
function load() {

function createMarker(point, Icon, info) {

    var marker = new GMarker(point, Icon);
    GEvent.addListener(marker, "click", function() {
	    marker.openInfoWindowHtml(info);
    });
    return marker;
    }
    
    
    if (GBrowserIsCompatible()) { 
	    var Icon = new GIcon();
	    Icon.image = "/images/ps_icon_google.png";
	    Icon.iconSize = new GSize(74, 54);
//	    Icon.shadow = "../bilder/ps_icon_shadow.png";
//	    Icon.shadowSize = new GSize(64, 60);
	    Icon.iconAnchor = new GPoint(25, 36);
	    Icon.infoWindowAnchor = new GPoint(12, 57);
	    Icon.transparent = "/images/blank.gif";
    	  
	    var map = new GMap2(document.getElementById("map"));
	    map.addControl(new GSmallMapControl());
	    map.addControl(new GMapTypeControl());
    	
	    map.setCenter(new GLatLng(57.771007,14.189900),13);
	    map.setMapType(G_NORMAL_MAP);
	    var point = new GLatLng(57.761007,14.189900);
	    map.addOverlay(createMarker(point, Icon, "<center><img src='/images/ps_eurostop.png'/><br><br>Ryhovsgatan 5</center>"));
	}
}