// Resample map areas
function resizeMap(map, xr, yr) {
        var areas = map.areas;
        for (var j = 0; j < areas.length; j++) {
                coords = areas(j).coords.split(',');
                for (var i = 0; i < coords.length; i++) {
                        if ((i % 2) == 0) {
                                coords[i] *= xr;
                        }
                        else {
                                coords[i] *= yr;
                        }
                }
                areas(j).coords = coords.join(',');
        }
}

// Resample image position
function moveImg(img, xr, yr) {
        img.style.posLeft *= xr;
        img.style.posTop *= yr;
        img.style.visibility = "visible";
}

// Resample and move image 
function moveSizeImg(img, xr, yr) {
        img.style.pixelWidth *= xr;
        img.style.pixelHeight *= yr;
        img.style.posLeft *= xr;
        img.style.posTop *= yr;
        img.style.visibility = "visible";
}



