/* The following is to control the zoom level of the map */

var zoomlevel = 3;
var largeimage = "NO";
var loading_complete = "NO";

function zoomin(imgobj) {
    var imgwidth = imgobj.width;
    var imgheight = imgobj.height;

    imgobj.width = imgwidth * 1.1;
    imgobj.height = imgheight * 1.1;

    zoomlevel++;

    // If the 'pre-load' is completed, upgrade to the higher detail map
    if (loading_complete == "YES" && largeimage == "NO") {
        localemap.src='images/locale/map1.jpg';
        largeimage = "YES";
    }
}

function zoomout(imgobj) {
    if (zoomlevel > 1)
    {
        var imgwidth = imgobj.width;
        var imgheight = imgobj.height;

        imgobj.width = imgwidth * 0.9;
        imgobj.height = imgheight * 0.9;

        zoomlevel--;

        // If the 'pre-load' is completed, upgrade to the higher detail map
        // This will help with load times on 'slower' connections.
        if (loading_complete == "YES" && largeimage == "NO") {
            localemap.src='images/locale/map1.jpg';
            largeimage = "YES";
        }

    }
}
