﻿// JScript File
<!---Hide From Browsers that don't support JS

//The array which is going to hold the image information.
var imageArray = new Array();
imageArray[0] = "images/stationery_frontpage.jpg";
imageArray[1] = "images/wedding_frontpage.jpg";
imageArray[2] = "images/boatman_geller_frontpg.gif";
imageArray[3] = "images/letterpress_holiday_frontpg.gif";
//imageArray[2] = "images/holiday_frontpg_08.gif";
//imageArray[3] = "";

function getFrontPageImage()
{
    //math.random generates a number that is >= 0 and < 1
    //math.floor truncates anything after the decimal
    //your multiplier should always be the same size as your array - 
    //which may be misleading, but remember, we're dealing with a 0 index.
    
    var rand = Math.floor(Math.random()*imageArray.length); //a random number between 0 and multiplier
    var imgPath = "<img src='" + imageArray[rand] + "' alt='Papier Gourmet' border='0' width='780' height='400' />";
    document.getElementById("homePage").innerHTML = imgPath;
}        
//Stop the hiding------>