   function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"), {draggableCursor: 'crosshair', draggingCursor: 'pointer'});
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
		map.enableScrollWheelZoom();
		map.setCenter(new GLatLng(57.9,-3.2), 6); // Change the zoom..!
		
		for (var i = 0; i < mapindex.length; i++){
			var poly = new GPolygon.fromEncoded({ polylines: mapindex[i].polygons, fill: true, color: "#0000ff", opacity: 0.2, outline: true });
			poly.mapindex = i;
			map.addOverlay(poly);
			GEvent.addListener(poly, 'click', function(latlng) {
				if (mapindex[this.mapindex].url == '') { alert('For this sheet we do not have yet the scan online.'); } 
				else { window.open('http://www.nls.uk:8080/StyleServer/calcrgn?cat=Maps&item=/'+mapindex[this.mapindex].url+'&style=maps.xsl&wid=700&hei=500&browser=win_ie&plugin=false','jav','width=800,height=600,resizable=yes'); }
			});
			GEvent.addListener(poly, 'mouseover', function() {
				document.getElementById("sheetname").innerHTML = mapindex[this.mapindex].name;
				this.setFillStyle( { "color": "#ff0000" } ); this.setStrokeStyle( { "color": "#ff0000" } ); });
			GEvent.addListener(poly, 'mouseout', function() {
				document.getElementById("sheetname").innerHTML = "";
				this.setFillStyle( { "color": "#0000ff" } ); this.setStrokeStyle( { "color": "#0000ff" } ); });
		}
      }
    }