
// Hardcoded functions to manipulate layers in this sample app.
// These functions rely of Chameleon JavaScript functions to get
// and set DHTML layer properties.

// sets the initial size in a group of layers on page draw
// results in layer sizes responding to map size.

function LayerSetSizeInit()

{
    var oImage = CWCDHTML_GetImage( 'mapimage' );
    var imgWidth = oImage.width;
    var imgHeight = oImage.height;

    // MainMapLayer (w+2, h+2)
    var oLayer = CWCDHTML_GetLayer( 'MainMapLayer' );
    oLayer.width = imgWidth + 2;
    oLayer.height = imgHeight + 2;

    // NavToolsLayer (w+20, h)
    var oLayer = CWCDHTML_GetLayer( 'NavToolsLayer' );
    oLayer.width = imgWidth + 20;

    // PanArrowsLayer (w+20, h)
    var oLayer = CWCDHTML_GetLayer( 'PanArrowsLayer' );
    oLayer.width = imgWidth + 20;
    oLayer.height = imgHeight + 20;

}

LayerSetSizeInit();
