    function load() {
      if (GBrowserIsCompatible()) {
        this.map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(-13.423575, 151.783447), 4);
        map.setMapType(G_SATELLITE_MAP);
        document.getElementById("message").innerHTML = "(-13.423575, 151.783447), 4";
        map.addControl(new GSmallMapControl());
        var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10));
        var mapTypeControl = new GMapTypeControl();
        map.addControl(mapTypeControl, topRight);
        map.addControl(new GScaleControl());
        this.zoom = new DragZoomControl({}, {backButtonEnabled: true}, {});
        map.addControl(this.zoom);
        this.manager = new MarkerManager(map);
        GEvent.addListener(map, "moveend", function() {
                var center = map.getCenter();
                var zoomp = map.getZoom();
                document.getElementById("message").innerHTML = center.toString() + ", " + zoomp.toString();
        });
        
        // Create our  marker icon
        var whiteIcon = new GIcon();
        whiteIcon.image = "images/marker_white.png";
        whiteIcon.shadow = "images/marker_shadow.png";
        whiteIcon.iconSize = new GSize(16, 28);
        whiteIcon.shadowSize = new GSize(30, 30);
        whiteIcon.iconAnchor = new GPoint(8, 26);
        whiteIcon.infoWindowAnchor = new GPoint(7, 8);
        
        
        // Set up our GMarkerOptions object literal
        markerOptions = { icon:whiteIcon };
        
        //arrays
        var level4Labels = new Array();
        var level6Labels = new Array();
        var level7Labels = new Array();
        var markers = new Array();
        
        //map points
        var tofoaPoint = new GLatLng(-19.749747,-175.072999);
        var mutinyPoint = new GLatLng(-20.102329,-175.289294);
        var coupangPoint = new GLatLng(-10.163505,123.575299);
        var d890504Point = new GLatLng(-18.9666,-178.1333);// May 4
        var d890505Point = new GLatLng(-18.1666,-179.55);//Mar 5
        var d890508Point = new GLatLng(-16.0666,177.2333);//May 8
        var d890509Point = new GLatLng(-15.78333,176.18333);// May 9
        var d890510Point = new GLatLng(-15.28333,174.9333);//May 10
        var d890511Point = new GLatLng(-14.8333,173.28333);//May 11
        var d890512Point = new GLatLng(-14.55,171.78333);//May 12
        var d890513Point = new GLatLng(-14.28333,170.4666);//May 13
        var d890514Point = new GLatLng(-13.48333,169.11666);//May 14
        var d890516Point = new GLatLng(-13.55,165.48333);//May 16
        var d890517Point = new GLatLng(-14.18333,163.88333);//May 17
        var d890518Point = new GLatLng(-14.8666,162.18333);//May 18
        var d890519Point = new GLatLng(-14.61666,160.4333);//May 19
        var d890520Point = new GLatLng(-14.81666,159.1666);//May 20
        var d890521Point = new GLatLng(-14.48333,157.51666);//May 21
        var d890522Point = new GLatLng(-14.28333,156.3);//May 22
        var d890523Point = new GLatLng(-13.7333,153.4);//May 23
        var d890524Point = new GLatLng(-13.55,151.4666);//May 24
        var d890525Point = new GLatLng(-13.5333,149.61666);//May 25
        var d890526Point = new GLatLng(-13.68333,147.71666);//May 26
        var d890527Point = new GLatLng(-13.4333,145.8666);//May 27 
        var d890528Point = new GLatLng(-12.62,143.447);//May 28
        var d890531Point = new GLatLng(-11.929,143.21);//May 31 -11.9666, 143.25
        var d890602Point = new GLatLng(-11.3,142.88333);//Jun 2
        var d890603Point = new GLatLng(-10.51666,142.4666);//Jun 3
        var d890607Point = new GLatLng(-9.55,135.4333);//Jun 7
            
        
        //markers
        var tofoaMarker = new GMarker(tofoaPoint, markerOptions);
        GEvent.addListener(tofoaMarker, "click", function() {
            tofoaMarker.openInfoWindowHtml("<b>Tofoa Island</b><br />Bligh and his 18 men landed here the day after<br />the mutiny, to find provisions. However, the natives<br />were unfriendly and killed one of them before their escape on May 2nd.");
          });
        markers[0] = tofoaMarker;
        
        var mutinyMarker = new GMarker(mutinyPoint, markerOptions);
        GEvent.addListener(mutinyMarker, "click", function() {
                mutinyMarker.openInfoWindowHtml("<b>Mutiny</b><br />The mutineers put Bligh and 18 others off the ship<br />and into the 23' launch.");
        });
        markers[1] = mutinyMarker;
        
        var coupangMarker = new GMarker(coupangPoint, markerOptions);
        GEvent.addListener(coupangMarker, "click", function() {
                coupangMarker.openInfoWindowHtml("<b>Coupang, Timor</b><br />The launch and its crew reached Coupang on Jun 14, 1789.");
        });
        markers[2] = coupangMarker;
        
        // An ELabel with complex contents
        var tofoaDiv4 = '<div class="pbr"><div class="lbl" id="tofoa"><b> Tofoa </b></div></div>';
        var tofoaLabel4 = new ELabel(tofoaPoint, tofoaDiv4, null, new GSize(-50, 0), 65);
        level4Labels[0] = tofoaLabel4;
        
        var mutinyDiv4 = '<div class="ptr"><div class="lbl"><b> Mutiny </b></div></div>';
        var mutinyLabel4 = new ELabel(mutinyPoint, mutinyDiv4, null, new GSize(-62,25), 65);
        level4Labels[1] = mutinyLabel4;
        
        var coupangDiv4 = '<div class="pbl"><div class="lbl"><b> Coupang </b></div></div>';
        var coupangLabel4 = new ELabel(coupangPoint, coupangDiv4, null, null, 65);
        level4Labels[2] = coupangLabel4;
        
        var d890508Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 8, 1789 </b></nobr></div></div>';
        var d890508Label4 = new ELabel(d890508Point, d890508Div4, null, null, 65);
        level4Labels[3] = d890508Label4;
        
        var d890514Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 14, 1789 </b></nobr></div></div>';
        var d890514Label4 = new ELabel(d890514Point, d890514Div4, null, null, 65);
        level4Labels[4] = d890514Label4;
        
        var d890528Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 29, 1789 </b></nobr></div></div>';
        var d890528Label4 = new ELabel(d890528Point, d890528Div4, null, null, 65);
        level4Labels[5] = d890528Label4;
        
        var d890603Div4 = '<div class="pbl"><div class="lbl"><nobr><b> Jun 3, 1789 </b></nobr></div></div>';
        var d890603Label4 = new ELabel(d890603Point, d890603Div4, null, null, 65);
        level4Labels[6] = d890603Label4;
        
        var d890607Div4 = '<div class="pbl"><div class="lbl"><nobr><b> Jun 7, 1789 </b></nobr></div></div>';
        var d890607Label4 = new ELabel(d890607Point, d890607Div4, null, null, 65);
        level4Labels[7] = d890607Label4;
        
        var d890521Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 21, 1789 </b></nobr></div></div>';
        var d890521Label4 = new ELabel(d890521Point, d890521Div4, null, null, 65);
        level4Labels[8] = d890521Label4;
        
        //level 6
        var d890504Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 4, 1789 </b></nobr></div></div>';
        var d890504Label4 = new ELabel(d890504Point, d890504Div4, null, null, 65);
        level6Labels[0] = d890504Label4;
        
        var d890505Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 5, 1789 </b></nobr></div></div>';
        var d890505Label4 = new ELabel(d890505Point, d890505Div4, null, null, 65);
        level6Labels[1] = d890505Label4;
        
        var d890510Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 10, 1789 </b></nobr></div></div>';
        var d890510Label4 = new ELabel(d890510Point, d890510Div4, null, null, 65);
        level6Labels[2] = d890510Label4;
        
        var d890511Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 11, 1789 </b></nobr></div></div>';
        var d890511Label4 = new ELabel(d890511Point, d890511Div4, null, null, 65);
        level6Labels[3] = d890511Label4;
        
        var d890513Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 13, 1789 </b></nobr></div></div>';
        var d890513Label4 = new ELabel(d890513Point, d890513Div4, null, null, 65);
        level6Labels[4] = d890513Label4;
        
        var d890516Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 16, 1789 </b></nobr></div></div>';
        var d890516Label4 = new ELabel(d890516Point, d890516Div4, null, null, 65);
        level6Labels[5] = d890516Label4;
        
        var d890517Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 17, 1789 </b></nobr></div></div>';
        var d890517Label4 = new ELabel(d890517Point, d890517Div4, null, null, 65);
        level6Labels[6] = d890517Label4;
        
        var d890518Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 18, 1789 </b></nobr></div></div>';
        var d890518Label4 = new ELabel(d890518Point, d890518Div4, null, null, 65);
        level6Labels[7] = d890518Label4;
        
        var d890523Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 23, 1789 </b></nobr></div></div>';
        var d890523Label4 = new ELabel(d890523Point, d890523Div4, null, null, 65);
        level6Labels[8] = d890523Label4;
        
        var d890525Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 25, 1789 </b></nobr></div></div>';
        var d890525Label4 = new ELabel(d890525Point, d890525Div4, null, null, 65);
        level6Labels[9] = d890525Label4;
        
        var d890527Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 27, 1789 </b></nobr></div></div>';
        var d890527Label4 = new ELabel(d890527Point, d890527Div4, null, null, 65);
        level6Labels[10] = d890527Label4;
        
        var d890531Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 31, 1789 </b></nobr></div></div>';
        var d890531Label4 = new ELabel(d890531Point, d890531Div4, null, null, 65);
        level6Labels[11] = d890531Label4;
        
        var d890602Div4 = '<div class="pbl"><div class="lbl"><nobr><b> Jun 2, 1789 </b></nobr></div></div>';
        var d890602Label4 = new ELabel(d890602Point, d890602Div4, null, null, 65);
        level6Labels[12] = d890602Label4;
        
        //level 7 labels
        var d890509Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 9, 1789 </b></nobr></div></div>';
        var d890509Label4 = new ELabel(d890509Point, d890509Div4, null, null, 65);
        level7Labels[0] = d890509Label4;
        
        var d890512Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 12, 1789 </b></nobr></div></div>';
        var d890512Label4 = new ELabel(d890512Point, d890512Div4, null, null, 65);
        level7Labels[1] = d890512Label4;
        
        var d890519Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 19, 1789 </b></nobr></div></div>';
        var d890519Label4 = new ELabel(d890519Point, d890519Div4, null, null, 65);
        level7Labels[2] = d890519Label4;
        
        var d890524Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 24, 1789 </b></nobr></div></div>';
        var d890524Label4 = new ELabel(d890524Point, d890524Div4, null, null, 65);
        level7Labels[3] = d890524Label4;
        
        var d890526Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 26, 1789 </b></nobr></div></div>';
        var d890526Label4 = new ELabel(d890526Point, d890526Div4, null, null, 65);
        level7Labels[4] = d890526Label4;
        
        var d890520Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 20, 1789 </b></nobr></div></div>';
        var d890520Label4 = new ELabel(d890520Point, d890520Div4, null, null, 65);
        level7Labels[5] = d890520Label4;
        
        var d890522Div4 = '<div class="pbl"><div class="lbl"><nobr><b> May 22, 1789 </b></nobr></div></div>';
        var d890522Label4 = new ELabel(d890522Point, d890522Div4, null, null, 65);
        level7Labels[6] = d890522Label4;
        
        manager.addMarkers(markers, 3);
        manager.addMarkers(level4Labels, 4);
        manager.addMarkers(level6Labels, 6);
        manager.addMarkers(level7Labels, 7);
        
        var polyOptions = {geodesic:true};
        var polyline = new GPolyline([
            new GLatLng(-20.102329,-175.289294),
            new GLatLng(-19.775695,-175.0933),
            new GLatLng(-18.9666,-178.1333),// May 4
            new GLatLng(-18.1666,-179.55),//Mar 5
            new GLatLng(-17.8966,-180.0)
            ], "#ffff00", 2, 1);
        var polyline2 = new GPolyline([
            new GLatLng(-17.8966,180.0),
            new GLatLng(-17.5666,179.31666),
            new GLatLng(-16.8,178.1666),
            new GLatLng(-16.0666,177.2333),//May 8
            new GLatLng(-15.78333,176.18333),// May 9
            new GLatLng(-15.28333,174.9333),//May 10
            new GLatLng(-14.8333,173.28333),//May 11
            new GLatLng(-14.55,171.78333),//May 12
            new GLatLng(-14.28333,170.4666),//May 13
            new GLatLng(-13.48333,169.11666),//May 14
            new GLatLng(-13.55,165.48333),//May 16
            new GLatLng(-14.18333,163.88333),//May 17
            new GLatLng(-14.8666,162.18333),//May 18
            new GLatLng(-14.61666,160.4333),//May 19
            new GLatLng(-14.81666,159.1666),//May 20
            new GLatLng(-14.48333,157.51666),//May 21
            new GLatLng(-14.28333,156.3),//May 22
            new GLatLng(-13.7333,153.4),//May 23
            new GLatLng(-13.55,151.4666),//May 24
            new GLatLng(-13.5333,149.61666),//May 25
            new GLatLng(-13.68333,147.71666),//May 26
            new GLatLng(-13.4333,145.8666),//May 27
            new GLatLng(-12.868353,143.830003),
            new GLatLng(-12.862971,143.816546),
            new GLatLng(-12.624454,143.4437365),//May 28 //-12.8333,143.5666
            new GLatLng(-11.980896,143.262117),//correction
            new GLatLng(-11.929,143.21),//May 31
            new GLatLng(-11.49829,143.019922),
            new GLatLng(-11.3,142.88333),//Jun 2
            new GLatLng(-11.1333,142.81666),
            new GLatLng(-10.51666,142.4666),//Jun 3
            new GLatLng(-10.45,142.31666),
            new GLatLng(-10.4666,141.98333),
            new GLatLng(-11.2333,139.38333),
            new GLatLng(-9.55,135.4333),//Jun 7
            new GLatLng(-9.333,129.45),
            new GLatLng(-10.25,124.8),
            new GLatLng(-10.3833,123.8),
            new GLatLng(-10.383704,123.610638),
            new GLatLng(-10.373506,123.467474),
            new GLatLng(-10.35,123.41666),
            new GLatLng(-10.2,123.48333),
            new GLatLng(-10.1575,123.5547222),
            new GLatLng(-10.161666,123.573888)
            ], "#ffff00", 2, 1); 
        map.addOverlay(polyline);
        map.addOverlay(polyline2);
        
        manager.refresh();
      }
    }

    function reset() {
        this.map.setCenter(new GLatLng(-13.423575, 151.783447), 4);
    }
    function viewOne() {
        this.map.setCenter(new GLatLng(-16.657244,176.923828), 6);
    }
    function viewTwo() {
        this.map.setCenter(new GLatLng(-13.880746,163.762207), 6);
    }
    function viewThree() {
        this.map.setCenter(new GLatLng(-14.030015,155.972900), 7);
    }
    function viewFour() {
        this.map.setCenter(new GLatLng(-11.974845,143.4375), 6);
    }
    function viewFive() {
        this.map.setCenter(new GLatLng(-10.487812,129.418945), 6);
    }

