    // JavaScript to interpolate random images into a page.
    
    var imageNum = 9;                      // Number of alternative images
    var imageWidth = 185;                  // Identical width for all images
    var imageHeight = new Array(imageNum); // Variable height for images
    
    var quoteNum = 7;                     // Number of alternative quotes
    var quoteText = new Array(quoteNum);  // ALT text for quotes
    
    // Set up the images
    
    imageHeight[0] = 144;
    
    imageHeight[1] = 139;
    
    imageHeight[2] = 158;
    
    imageHeight[3] = 142;
    
    imageHeight[4] = 135;
    
    imageHeight[5] = 137;
    
    imageHeight[6] = 290;
    
    imageHeight[7] = 277;
    
    imageHeight[8] = 137;
    
    // Set up the quotes
    
    quoteText[0] = "Kindness in giving creates love. -- Lau Tzu";
    
    quoteText[1] = "Where you find no love, put love, and you will find love. -- John of the Cross";

	quoteText[2] = "Whoever does not love does not know God, for God is love. -- I John";

	quoteText[3] = "To do justice, to love kindness, and to walk humbly with your God. -- Micah";

	quoteText[4] = "A coward is incapable of exhibiting love; it is the prerogative of the brave. -- Mohandas K. Ghandi";

	quoteText[5] = "The man who foolishly does me wrong, I will return to him the protection of my most ungrudging love. -- Buddha";

	quoteText[6] = "Kind speech and forgiveness is better than alms followed by injury. -- Qu'ran";
    
    // pickRandom - Return a random number in a given range. If we're running
    // on an older browser that doesn't support 'Math.random()', we can fake
    // it by using the current time. This isn't ideal for mission-critical
    // security applications, but it's fine here. Note that we divide the
    // current time by 1000 to get rid of the milliseconds which Navigator
    // doesn't seem to take into account.
    
    function pickRandom(range) {
        if (Math.random)
            return Math.round(Math.random() * (range-1));
        else {
            var now = new Date();
            return (now.getTime() / 1000) % range;
        }
    }

    // Write out an IMG tag, using a randomly-chosen image name.
   
   function showRandomImage() { 
    var choice = pickRandom(imageNum);
    document.writeln('<img src="images/sidebar_image0' + (choice + 1) + '.jpg" width=185 alt="Photo"><br>');
	}

   function showRandomQuote() { 
    var choice = pickRandom(quoteNum);
    document.writeln('<img src="images/sidebar_quote0' + (choice + 1) + '.gif" width=185 height=126 alt="Science and Religion in Context">');
	}