var prevThumbnailId = null;

function initPrevThumbnailId ( initialThumbnailId ) {
    prevThumbnailId = initialThumbnailId;
    
    if ( prevThumbnailId != null ) {
        document.getElementById ( prevThumbnailId ).style.borderColor = '#002200';
    }
}

function loadDisplayImage ( imgSrc, imgAlt, imgElem, dispWidth, dispHeight, thumbnailId, newCurImgIdx ) {
    document.getElementById ( imgElem ).src = imgSrc;
    document.getElementById ( imgElem ).setAttribute ( 'alt', imgAlt );
    document.getElementById ( imgElem ).setAttribute ( 'width', dispWidth );
    document.getElementById ( imgElem ).setAttribute ( 'height', dispHeight );
    
    if ( prevThumbnailId != null ) {
        document.getElementById ( prevThumbnailId ).style.borderColor = '#ffffff';
        document.getElementById ( thumbnailId ).style.borderColor = '#002200';
        prevThumbnailId = thumbnailId;
    }
    curImgIdx = newCurImgIdx;
}
