function mapSizeSmall()
{
    //document.getElementById('divTitleBar').style.backgroundPosition = 'center';
    if (window.onresize == mapSizeFullScreen) {
        window.onresize = null;
    }

    var mapsize = getMapSize();
    gszMapSize = 'small';

    if (window.goSmallMapSize === undefined) {
        alert('goSmallMapSize undefined.  Add the following code to the template file:\nvar goSmallMapSize = {\n    width:SMALL/INITIAL MAP WIDTH FROM .MAP FILE,\n    height:SMALL/INITIAL MAP HEIGHT FROM .MAP FILE\n};');
	window.goSmallMapSize = {
            width:605,
            height:349
        };
    }

    if (mapsize[0] != goSmallMapSize.width)
    {
        document.forms[0].NAV_CMD.value = '';
        applyMapSize( goSmallMapSize.width, goSmallMapSize.height );
    }

    var oAltFooter = document.getElementById('divAltFooter');
    var oFooter = document.getElementById('divFooter');
    if (oAltFooter !== null) {
        oAltFooter.style.display = 'none';
        oFooter.style.display = 'block';
    }
}

function SyncSpacer()
{
    if (document.getElementById('divSpacer') !== null) {
        document.getElementById('divSpacer').style.width = document.getElementById('divMaps').style.width;	
    }
}

var bRegisteredSyncSpacer = false;
function mapSizeFullScreen()
{
    if (!bRegisteredSyncSpacer) {
        goCWCJSAPI.RegisterEvent(MAP_SIZE_CHANGED, "SyncSpacer");
        bRegisteredSyncSpacer = true;
    }

    var oAltFooter = document.getElementById('divAltFooter');
    var oFooter = document.getElementById('divFooter');
    if (oAltFooter !== null) {
        oAltFooter.style.display = 'block';
        oFooter.style.display = 'none';
    }

    document.getElementById('divTitleBar').style.backgroundPosition = 'left';
    gszMapSize = 'fullscreen';
    document.forms[0].NAV_CMD.value = '';
    var mapWidth = document.getElementsByTagName('body')[0].clientWidth - gnNonMapWidth;
    var mapHeight = document.getElementsByTagName('body')[0].clientHeight - gnNonMapHeight;
    applyMapSize( mapWidth, mapHeight);

    window.onresize = mapSizeFullScreen;
}

