var theImages = new Array();
var whichImage;

function random() {

    theImages[0] = '/Portals/0/Banners/00.jpg';
    theImages[1] = '/Portals/0/Banners/01.jpg';
    theImages[2] = '/Portals/0/Banners/02.jpg';
    theImages[3] = '/Portals/0/Banners/03.jpg';
    theImages[4] = '/Portals/0/Banners/04.jpg';
    theImages[5] = '/Portals/0/Banners/05.jpg';
    theImages[6] = '/Portals/0/Banners/06.jpg';
    theImages[7] = '/Portals/0/Banners/07.jpg';
    theImages[8] = '/Portals/0/Banners/08.jpg';
    theImages[9] = '/Portals/0/Banners/09.jpg';
    theImages[10] = '/Portals/0/Banners/10.jpg';
    theImages[11] = '/Portals/0/Banners/11.jpg';
    theImages[12] = '/Portals/0/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="1000" height="325" src="' + theImages[whichImage] + '">');
}

