// JScript source code

var MaxCachedImgs = 10;
//
// Initialize empty image array
//
// pre-cache background image
var imageLoaderLibrary = new Array();
       

// Load an image chosen from select list
function loadCached(list) {
    var img = list.options[list.selectedIndex].value;
    document.thumbnail.src = imageLibrary[img].src;
}       

// Load the image chosen from select list
function ILSetBackgroundImage( ElemID, ImageFile, ImageWidth, ImageHeight )
{
    imageLoaderLibrary["image1"] = new Image(ImageWidth,ImageHeight);
    imageLoaderLibrary["image1"].src = ImageFile;

    if( imageLoaderLibrary["image1"].complete ) 
    {
        var obj = document.getElementById( ElemID );
        obj.style.backgroundImage = 'url('+ImageFile+')';
        obj.style.backgroundPosition = "center bottom";
        obj.style.backgroundRepeat = "no-repeat";
    }
    else {
        setTimeout("ILSetBackgroundImage()", 500 );
    }
}


