var theImages = new Array();
var whichImage;

function random() {

    theImages[0] = '/Portals/5/Banners/1.jpg';
    theImages[1] = '/Portals/5/Banners/2.jpg';
    theImages[2] = '/Portals/5/Banners/3.jpg';
    theImages[3] = '/Portals/5/Banners/4.jpg';
    theImages[4] = '/Portals/5/Banners/5.jpg';
    theImages[5] = '/Portals/5/Banners/6.jpg';
    theImages[6] = '/Portals/5/Banners/7.jpg';
    theImages[7] = '/Portals/5/Banners/8.jpg';
    theImages[8] = '/Portals/5/Banners/9.jpg';
    theImages[9] = '/Portals/5/Banners/10.jpg';
    theImages[10] = '/Portals/5/Banners/11.jpg';
    theImages[11] = '/Portals/5/Banners/12.jpg';
    
    var j = 0;
    var p = theImages.length;
    var preBuffer = new Array();
    for (i = 0; i < p; i++) {
        preBuffer[i] = new Image();
        preBuffer[i].src = theImages[i];
    }
    whichImage = Math.round(Math.random() * (p - 1));

    showImage();

}

function showImage() {
    document.write('<img width="950" height="319" src="' + theImages[whichImage] + '">');
}

